Infrastructure Identification
Web Servers
Web Servers
The first thing we can do to identify the webserver version is to look at the response headers.
neutron@kali[/kali]$ curl -I "http://${TARGET}"
HTTP/1.1 200 OK
Date: Thu, 23 Sep 2021 15:10:42 GMT
Server: Apache/2.4.25 (Debian)
X-Powered-By: PHP/7.3.5
Link: <http://192.168.10.10/wp-json/>; rel="https://api.w.org/"
Content-Type: text/html; charset=UTF-8
WafW00f is a web application firewall (WAF
) fingerprinting tool that sends requests and analyses responses to determine if a security solution is in place.
neutron@kali[/kali]$ sudo apt install wafw00f -y
We can use options like -a
to check all possible WAFs in place instead of stopping scanning at the first match, read targets from an input file via the -i
flag, or proxy the requests using the -p
option.
neutron@kali[/kali]$ wafw00f -v https://www.tesla.com
______
/ \
( Woof! )
\ ____/ )
,, ) (_
.-. - _______ ( |__|
()``; |==|_______) .)|__|
/ (' /|\ ( |__|
( / ) / | \ . |__|
\(_)_)) / | \ |__|
~ WAFW00F : v2.1.0 ~
The Web Application Firewall Fingerprinting Toolkit
[*] Checking https://www.tesla.com
[+] The site https://www.tesla.com is behind CacheWall (Varnish) WAF.
[~] Number of requests: 2
Aquatone is a tool for automatic and visual inspection of websites across many hosts and is convenient for quickly gaining an overview of HTTP-based attack surfaces by scanning a list of configurable ports, visiting the website with a headless Chrome browser, and taking and screenshot. This is helpful, especially when dealing with huge subdomain lists.
neutron@kali[/kali]$ sudo apt install golang chromium-driver
neutron@kali[/kali]$ go get github.com/michenriksen/aquatone
neutron@kali[/kali]$ export PATH="$PATH":"$HOME/go/bin"
Use cat
in our subdomain list and pipe the command to aquatone
via:
neutron@kali[/kali]$ cat facebook_aquatone.txt | aquatone -out ./aquatone -screenshot-timeout 1000
aquatone v1.7.0 started at 2021-10-06T10:14:42+01:00
Targets : 30
Threads : 2
Ports : 80, 443, 8000, 8080, 8443
Output dir : aquatone
edge-star-shv-01-cdg2.facebook.com: port 80 open
edge-extern-shv-01-waw1.facebook.com: port 80 open
whatsapp-chatd-edge-shv-01-ams4.facebook.com: port 80 open
edge-secure-shv-01-ham3.facebook.com: port 80 open
sv-se.facebook.com: port 80 open
ko.facebook.com: port 80 open
https://edge-secure-shv-01-ham3.facebook.com/: screenshot timed out
https://sv-se.facebook.com/: screenshot timed out
https://ko.facebook.com/: screenshot timed out
https://synthetic-e2e-elbprod-sli-shv-01-otp1.facebook.com/: screenshot successful
Calculating page structures... done
Clustering similar pages... done
Generating HTML report... done
Writing session file...Time:
- Started at : 2021-10-06T10:14:42+01:00
- Finished at : 2021-10-06T10:15:01+01:00
- Duration : 19s
Requests:
- Successful : 12
- Failed : 5
- 2xx : 10
- 3xx : 0
- 4xx : 2
- 5xx : 0
Screenshots:
- Successful : 2
- Failed : 10
Wrote HTML report to: aquatone/aquatone_report.html
When it finishes, we will have a file called aquatone_report.html
where we can see screenshots, technologies identified, server response headers, and HTML.
Whatweb
Whatweb recognizes web technologies, including content management systems (CMS), blogging platforms, statistic/analytics packages, JavaScript libraries, web servers, and embedded devices. In this case, we will use an aggression level of 3 via the -a
flag and verbose output via -v
.
neutron@kali[/kali]$ whatweb -a3 https://www.facebook.com -v
WhatWeb report for https://www.facebook.com
Status : 200 OK
Title : <None>
IP : 31.13.92.36
Country : IRELAND, IE
Summary : Strict-Transport-Security[max-age=15552000; preload], PasswordField[pass], Script[text/javascript], X-XSS-Protection[0], HTML5, X-Frame-Options[DENY], Meta-Refresh-Redirect[/?_fb_noscript=1], UncommonHeaders[x-fb-rlafr,x-content-type-options,x-fb-debug,alt-svc]
Detected Plugins:
[ HTML5 ]
HTML version 5, detected by the doctype declaration
[ Meta-Refresh-Redirect ]
Meta refresh tag is a deprecated URL element that can be
used to optionally wait x seconds before reloading the
current page or loading a new page. More info:
https://secure.wikimedia.org/wikipedia/en/wiki/Meta_refresh
String : /?_fb_noscript=1
[ PasswordField ]
find password fields
String : pass (from field name)
[ Script ]
This plugin detects instances of script HTML elements and
returns the script language/type.
String : text/javascript
<SNIP>
[ X-Frame-Options ]
This plugin retrieves the X-Frame-Options value from the
HTTP header. - More Info:
http://msdn.microsoft.com/en-us/library/cc288472%28VS.85%29.
aspx
String : DENY
[ X-XSS-Protection ]
This plugin retrieves the X-XSS-Protection value from the
HTTP header. - More Info:
http://msdn.microsoft.com/en-us/library/cc288472%28VS.85%29.
aspx
String : 0
<SNIP>