Banner Grabing tool by Shounak Itraj
- Edit 'Urls' array in GrabBanners.py file.
- Add URL for which you want grab banners.
Type the following in the terminal.
git clone https://github.com/shounakitraj/BannerDetect.git /opt/bannerdetect
This tool works on Python 2.7 and you should have Beautifulsoup installed.
Library | Ubuntu | Windows |
---|---|---|
BeautifulSoup | pip install BeautifulSoup | C:\Python27\Scripts\easy_install.exe BeautifulSoup |
- If the page gets redirected during visiting any of the Servers, it runtime maintains the list
Urls
for the redirected Urls. - The script reads whole list of Redirected Urls.
- The output will be stored in
ReconOutput.txt
file. This file gets created in the same directory. - This Version of script checks following conditions:
- Change of HTTP Method
- Visiting Non-existing page (To generate 404 condition)
- Changing HTTP protocol. E.g. Use HTPT/1.1 instead of HTTP/1.1
- Changing HTTP Protocol version. E.g. Use HTTP/3.0
Ref: https://www.owasp.org/index.php/Fingerprint_Web_Server_(OTG-INFO-002)
This tool connects to the domains provided in the urls
, creates the URL in format 'https:///'. Then uses this URL for testing if any banners/versions are displayed by the server.
Web Server sometimes may reveal its version if the unexpected/malformed request is sent. We have used following methods to check if version can be grabbed. The functions written in this tool parses both Response Headers and Response Body. If it matches with some pre-defined regex then the respective header or respective HTML tag is shown in output.
Pre-defined Regex:
apache|JSP Engine|jetty|php|ssl
In this function request is send to Server with different methods. If the Server is not configured correctly then it may reveal the version information in the response. Following methods are used for testing.
- GET
- POST
- PUT
- TRACE
Server version can be grabbed in 404 error page. This function is written to visit some random page which is unlikely present on any Server.
According to OWASP document, sending malformed requests like changing HTTP protocol Name/Verb of Version is one of the useful test cases for determining Server version.