Identifying a web application firewall

A Web Application Firewall (WAF) inspects packets sent to a web server to identify and block potentially malicious packets, usually based on signatures or regular expressions. device or software.

Undetected WAF blocking requests or banning IP addresses can cause a lot of problems in penetration testing. When conducting penetration testing, the reconnaissance phase should include detection and identification of WAFs, intrusion detection systems (IDS), or intrusion prevention systems (IPS). This is necessary in order to take the necessary measures to prevent suspension or blocking.

This article uses various methods and tools included in Kali Linux to detect and identify the presence of his web application firewall between the target and us.


There are two ways to identify a WAF

    -- using nmap script

    -- using the tool wafw00f


1] Nmap has some scripts to test for the presence of a WAF Included.

    nmap — script http-waf-detect 192.168.0.100 -p80



There is no WAF on this server because no WAF is detected on this server.

2] Try the same command on a real firewalled server. Here we use example.com

    nmap — script http-waf-detect www.example.com -p80



Imperva is one of the leading brands in the web application firewall market


3] Nmap has another script that can help identify the device being used more precisely. Here is the script: 

    nmap --script=http-waf-fingerprint www.example.com -p80


4] Another tool included with Kali Linux to detect WAF identifying IDS is wafw00f. Let's assume www.example.com is a WAF protected website.     

    wafw00f  www.example.com




WAF detection works by sending specific requests to server and then analyzing the response; for example, in the case of http-waf-detect, it sends some basic malicious packets and compare the responses, looking for indicators that the packets are blocked, denied, or detected. The same thing happens with http-waf-fingerprint, but this script also interprets this response and tries to classify it according to known patterns of various IDSs and WAFs. The same applies to wafw00f.




#WAF #firewall #security


Comments

Popular posts from this blog

Need of Security Awareness

Security breaches of remote working