.. / CVE-2014-6271

Exploit for ShellShock - Remote Code Execution (CVE-2014-6271)

Description:

GNU Bash through 4.3 processes trailing strings after function definitions in the values of environment variables, which allows remote attackers to execute arbitrary code via a crafted environment, as demonstrated by vectors involving the ForceCommand feature in OpenSSH sshd, the mod_cgi and mod_cgid modules in the Apache HTTP Server, scripts executed by unspecified DHCP clients, and other situations in which setting the environment occurs across a privilege boundary from Bash execution, aka ShellShock.

Proof of Concept

PoC exploit

Nuclei Template

View the template here CVE-2014-6271.yaml

Validate with Nuclei

echo "$URL" | nuclei -t ~/nuclei-templates/http/cves/2014/CVE-2014-6271.yaml
Copy

Try the exploit in a lab environment:

Lab Machine Link
Hack The Box Shocker Go to Practice

References:

http://www.us-cert.gov/ncas/alerts/TA14-268A
https://nvd.nist.gov/vuln/detail/CVE-2014-7169
https://nvd.nist.gov/vuln/detail/CVE-2014-6271
http://www.kb.cert.org/vuls/id/252743
http://advisories.mageia.org/MGASA-2014-0388.html