Skip to content

Instantly share code, notes, and snippets.

@haproxytechblog
Last active March 4, 2021 22:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save haproxytechblog/1a2df95767a5226fd135630db91510dc to your computer and use it in GitHub Desktop.
Save haproxytechblog/1a2df95767a5226fd135630db91510dc to your computer and use it in GitHub Desktop.
The HAProxy Enterprise WAF
$ python /usr/bin/sqlmap \
--random-agent \
--cookie="PHPSESSID={YOUR SESSION ID};security=low" \
--dbs \
--url="http://{YOUR SITE IP}/vulnerabilities/sqli/?id=&Submit=Submit" \
-p id
[09:24:38] [INFO] the back-end DBMS is MySQL
web server operating system: Linux Debian
web application technology: Apache 2.4.25
back-end DBMS: MySQL 5.0.12
[09:24:38] [INFO] fetching database names
available databases [2]:
[*] dvwa
[*] information_schema
$ ssh -i ./haproxy_demo.pem ubuntu@[HAPROXY_IP_ADDRESS]
$ sudo /opt/hapee-2.2/bin/hapee-lb-modsecurity-getcrs
global
module-load hapee-lb-modsecurity.so
frontend fe_main
filter modsecurity owasp_crs rules-file /etc/hapee-2.2/modsec.rules.d/lb-modsecurity.conf
$ sudo systemctl reload hapee-2.2-lb
$ python /usr/bin/sqlmap \
--random-agent \
--cookie="PHPSESSID={SESSION ID};security=low" \
--dbs \
--url="http://{SITE IP}/vulnerabilities/sqli/?id=&Submit=Submit" \
-p id
[09:51:40] [WARNING] GET parameter 'id' is not injectable
[09:51:40] [CRITICAL] all tested parameters appear to be not injectable.
[09:51:40] [WARNING] HTTP error codes detected during run:
403 (Forbidden) - 1 times
acl waf_blocked var(txn.owasp_crs.block) -m bool
http-request send-challenge ... if waf_blocked
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment