eWPTXv3 - Notes
GitHubPortfolioTwitter/X MediumCont@ctHome
  • πŸ“eWPTXv3
    • Web Application Penetration Testing Methodology
      • 1.1 Introduction to Web App Security Testing
        • 1.1.1 Web Application
        • 1.1.2 Web App Architecture
        • 1.1.3 HTTP/HTTPS
      • 1.2 Web App Pentesting Methodology
    • Web Application Reconnaissance
      • 2.1 Information Gathering
        • 2.1.1 DNS Recon
          • 2.1.1.1 DNS Zone Transfer
          • 2.1.1.2 Subdomain Enumeration
        • 2.1.2 WAF Recon
      • 2.2 Passive Crawling & Spidering
      • 2.3 Web Server Fingerprinting
        • 2.3.1 File & Directory Brute-Force
      • 2.4 Web Proxies
        • 2.4.1 Burp Suite
        • 2.4.2 OWASP ZAP
    • Authentication Attacks
      • 6.1 HTTP Attacks
        • 6.1.1 HTTP Method Tampering
        • 6.1.2 Attacking HTTP Authentication
      • 6.2 Session Attacks
        • 6.2.1 Session Hijacking
        • 6.2.2 Session Fixation
        • 6.2.3 Session Hijacking via Cookie Tampering
      • 6.3 JWT Attacks
      • 6.4 CSRF
    • Injection Vulnerabilities
      • 4.1 Command Injection
      • 4.2 Cross-Site Scripting (XSS)
        • 4.2.1 XSS Anatomy
        • 4.2.2 Reflected XSS
        • 4.2.3 Stored XSS
        • 4.2.4 DOM-Based XSS
        • 4.2.5 Identifying & Exploiting XSS with XSSer
      • 4.3 ​SQL Injection (SQLi)
        • 4.3.1 DB & SQL Introduction
        • 4.3.2 SQL Injection (SQLi)
        • 4.3.3 In-Band SQLi
        • 4.3.4 Blind SQLi
        • 4.3.5 NoSQL
        • 4.3.6 SQLMap
        • 4.3.7 Mitigation Strategies
    • API Penetration Testing
      • 5.1 API Testing
    • Server-Side Attacks
      • 6.1 Server-side request forgery (SSRF)
      • 6.2 Deserialization
      • 6.3 ​File & Resource Attacks
        • 6.1 File Upload Vulnerability
        • 6.2 Directory Traversal
        • 6.3 File Inclusion (LFI and RFI)
          • 6.3.1 Local File Inclusion (LFI)
          • 6.3.2 Remote File Inclusion (RFI)
        • 6.4 CMS Pentesting
          • 6.4.1 Wordpress, Drupal & Magento
    • Filter Evasion & WAF Bypass
      • 7.1 Obfuscating attacks using encodings
    • πŸ“„Report
      • How to write a PT Report
  • πŸ›£οΈRoadMap / Exam Preparation
  • πŸ“”eWPTX Cheat Sheet
Powered by GitBook
On this page
  • Web Server Fingerprinting
  • Nmap
  • Burp Suite
  • Metasploit
  • Curl
  • Discovering specific folders with Brute Force tools
  • Web Server Scanning with Nikto
  • Automated Web Recon With OWASP Amass
  1. eWPTXv3
  2. Web Application Reconnaissance

2.3 Web Server Fingerprinting

Previous2.2 Passive Crawling & SpideringNext2.3.1 File & Directory Brute-Force

Last updated 1 month ago

Web Server Fingerprinting

A web server fingerprint is essentially a unique identifier or signature of a web server's software, configuration, and sometimes even its hardware characteristics. It's like a digital footprint that can reveal details about the server's underlying technology stack, such as the operating system, web server software (e.g., Apache, Nginx), version numbers, installed modules, and other relevant information.

Web server fingerprints can be obtained through various means, including:

  1. HTTP Headers: Web servers often include specific headers in their HTTP responses that can reveal information about the server software and its version. For example, the "Server" header typically discloses the name and version of the server software being used.

  2. Error Pages: The format and content of error pages (e.g., 404 Not Found) can sometimes provide clues about the web server software and its version.

  3. Response Behavior: Certain behaviors or responses from the server can also be indicative of the server type and version. For example, the way the server handles certain requests or supports specific features may help identify it.

  4. Banner Grabbing: This involves directly connecting to the server and analyzing the banners or initial responses it provides, which often contain information about the server software and version.

We can use following methods and tool to do a Web Server Fingerprint:

Nmap

We can use Nmap for first scanning on all ports with the flag: -p0-

sudo nmap -p0- sV <Target> -oG nmap/port

After it, we can use searchsploit to discover potential exploit and search nmap script and eventually grep for detailed results

ls -al /usr/share/nmap/scripts/ | grep -e "apache"

And e.g. use http-enum to discover port 80

sudo nmap -sV -p 80 β€”script=http-enum <target>
command
result

--open

only open ports

sC

run default scripts

sV

enumerate versions

-p0-

search all ports [0 - 65535]

--min-rate

minimun packet sent for second

vvv

more verbosity

Burp Suite

  • Intercept request

  • Forward request

  • See WebServer value into response

Metasploit

We can use a metasploit module called http_version to retrieve info regarding webserver

  • use scannet/http/http_version

  • set rhosts <target>

  • run

Curl

Curl displays source code content (passive method)

  • curl http://<target>

Discovering specific folders with Brute Force tools

Or try to discover information regarding folders presents only in determinated webserver such as cgi-bin (Apache) and HttpClient (IIS). We can research folder using brute force tools like as: dirb, gobuster, wefuzz.

Web Server Scanning with Nikto

  • Find SQL injection, XSS, and other common vulnerabilities

  • Identify installed software (via headers, favicons, and files)

  • Guess subdomains

  • Includes support for SSL (HTTPS) websites

  • Saves reports in plain text, XML, HTML or CSV

  • β€œFish” for content on web servers

  • Report unusual headers

  • Check for server configuration items like multiple index files, HTTP server options, and so on

  • Has full HTTP proxy support

  • Guess credentials for authorization (including many default username/password combinations)

  • Is configured with a template engine to easily customize reports

  • Exports to Metasploit

Automated Web Recon With OWASP Amass

Information Gathering Techniques Used:

Technique
Data Sources

APIs

360PassiveDNS, Ahrefs, AnubisDB, BeVigil, BinaryEdge, BufferOver, BuiltWith, C99, Chaos, CIRCL, DNSDB, DNSRepo, Deepinfo, Detectify, FOFA, FullHunt, GitHub, GitLab, GrepApp, Greynoise, HackerTarget, Hunter, IntelX, LeakIX, Maltiverse, Mnemonic, Netlas, Pastebin, PassiveTotal, PentestTools, Pulsedive, Quake, SOCRadar, Searchcode, Shodan, Spamhaus, Sublist3rAPI, SubdomainCenter, ThreatBook, ThreatMiner, URLScan, VirusTotal, Yandex, ZETAlytics, ZoomEye

Certificates

Active pulls (optional), Censys, CertCentral, CertSpotter, Crtsh, Digitorus, FacebookCT

DNS

Brute forcing, Reverse DNS sweeping, NSEC zone walking, Zone transfers, FQDN alterations/permutations, FQDN Similarity-based Guessing

Routing

ASNLookup, BGPTools, BGPView, BigDataCloud, IPdata, IPinfo, RADb, Robtex, ShadowServer, TeamCymru

Scraping

AbuseIPDB, Ask, Baidu, Bing, CSP Header, DNSDumpster, DNSHistory, DNSSpy, DuckDuckGo, Gists, Google, HackerOne, HyperStat, PKey, RapidDNS, Riddler, Searx, SiteDossier, Yahoo

Web Archives

Arquivo, CommonCrawl, HAW, PublicWWW, UKWebArchive, Wayback

WHOIS

AlienVault, AskDNS, DNSlytics, ONYPHE, SecurityTrails, SpyOnWeb, WhoisXMLAPI

Perform automatic scan

amass enum -d zonetransfer.me
amass enum -passive -d zonetransfer.me
amass enum -passive -d zonetransfer.me -src -ip -brute -dir /home/kali/Desktop/ZTME_Brute/

A great tool that help us for Web Server Scanning is , that permit us to:

The performs network mapping of attack surfaces and external asset discovery using open source information gathering and active reconnaissance techniques.

πŸ“
Nikto
OWASP Amass Project
GitHub - sullo/nikto: Nikto web server scannerGitHub
GitHub - owasp-amass/amass: In-depth Attack Surface Mapping and Asset DiscoveryGitHub
Logo
Logo
Nmaphttps://www.kali.org/tools/nmap/ https://nmap.org/
Niktohttps://www.kali.org/tools/nikto/