Vulnerability & Exploit Database

Back to search

Dhclient Bash Environment Variable Injection (Shellshock)

This module exploits the Shellshock vulnerability, a flaw in how the Bash shell handles external environment variables. This module targets dhclient by responding to DHCP requests with a malicious hostname, domainname, and URL which are then passed to the configuration scripts as environment variables, resulting in code execution. Due to length restrictions and the unusual networking scenario at the time of exploitation, this module achieves code execution by writing the payload into /etc/crontab and then cleaning it up after a session is created.

Free Metasploit Download

Get your copy of the world's leading penetration testing tool

 Download Now

Module Name

exploit/unix/dhcp/bash_environment

Authors

  • Stephane Chazelas
  • egypt <egypt [at] metasploit.com>

References

Targets

  • Automatic Target

Platforms

  • unix

Architectures

  • cmd

Reliability

Development

Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':

msf > use exploit/unix/dhcp/bash_environment msf exploit(bash_environment) > show targets ...targets... msf exploit(bash_environment) > set TARGET <target-id> msf exploit(bash_environment) > show options ...show and set options... msf exploit(bash_environment) > exploit

Related Vulnerabilities

Related Modules