Bash Remote Code Execution (Shellshock) - Nessus

Critical   Plugin ID: 77823

This page contains detailed information about the Bash Remote Code Execution (Shellshock) Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 77823
Name: Bash Remote Code Execution (Shellshock)
Filename: bash_remote_code_execution.nasl
Vulnerability Published: 2014-09-24
This Plugin Published: 2014-09-24
Last Modification Time: 2022-01-31
Plugin Version: 1.28
Plugin Type: local
Plugin Family: Gain a shell remotely
Dependencies: ssh_get_info.nasl

Vulnerability Information


Severity: Critical
Vulnerability Published: 2014-09-24
Patch Published: 2014-09-24
CVE [?]: CVE-2014-6271
CPE [?]: cpe:/a:gnu:bash
Exploited by Malware: True
In the News: True

Synopsis

A system shell on the remote host is vulnerable to command injection.

Description

The remote host is running a version of Bash that is vulnerable to command injection via environment variable manipulation. Depending on the configuration of the system, an attacker could remotely execute arbitrary code.

Solution

Update Bash.

Public Exploits


Target Network Port(s): 22
Target Asset(s): Services/ssh
Exploit Available: True (Metasploit Framework, Exploit-DB, GitHub, Core Impact)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the Bash Remote Code Execution (Shellshock) vulnerability:

  1. Metasploit: exploit/unix/smtp/qmail_bash_env_exec
    [Qmail SMTP Bash Environment Variable Injection (Shellshock)]
  2. Metasploit: exploit/linux/http/advantech_switch_bash_env_exec
    [Advantech Switch Bash Environment Variable Code Injection (Shellshock)]
  3. Metasploit: auxiliary/scanner/http/apache_mod_cgi_bash_env
    [Apache mod_cgi Bash Environment Variable Injection (Shellshock) Scanner]
  4. Metasploit: exploit/multi/http/apache_mod_cgi_bash_env_exec
    [Apache mod_cgi Bash Environment Variable Code Injection (Shellshock)]
  5. Metasploit: exploit/unix/dhcp/bash_environment
    [Dhclient Bash Environment Variable Injection (Shellshock)]
  6. Metasploit: exploit/multi/http/cups_bash_env_exec
    [CUPS Filter Bash Environment Variable Code Injection (Shellshock)]
  7. Metasploit: auxiliary/server/dhclient_bash_env
    [DHCP Client Bash Environment Variable Code Injection (Shellshock)]
  8. Metasploit: exploit/linux/http/ipfire_bashbug_exec
    [IPFire Bash Environment Variable Injection (Shellshock)]
  9. Metasploit: exploit/multi/ftp/pureftpd_bash_env_exec
    [Pure-FTPd External Authentication Bash Environment Variable Code Injection (Shellshock)]
  10. Metasploit: exploit/osx/local/vmware_bash_function_root
    [OS X VMWare Fusion Privilege Escalation via Bash Environment Code Injection (Shellshock)]
  11. Exploit-DB: exploits/linux/local/40938.py
    [EDB-40938: RedStar 3.0 Server - 'Shellshock' 'BEAM' / 'RSSMON' Command Injection]
  12. Exploit-DB: exploits/linux/remote/34765.txt
    [EDB-34765: GNU Bash - 'Shellshock' Environment Variable Command Injection]
  13. Exploit-DB: exploits/linux/remote/34766.php
    [EDB-34766: Bash - 'Shellshock' Environment Variables Command Injection]
  14. Exploit-DB: exploits/cgi/remote/34777.rb
    [EDB-34777: GNU Bash - Environment Variable Command Injection (Metasploit)]
  15. Exploit-DB: exploits/linux/remote/34862.rb
    [EDB-34862: Pure-FTPd - External Authentication Bash Environment Variable Code Injection (Metasploit)]
  16. Exploit-DB: exploits/linux/remote/34879.txt
    [EDB-34879: OpenVPN 2.2.29 - 'Shellshock' Remote Command Injection]
  17. Exploit-DB: exploits/linux/remote/35115.rb
    [EDB-35115: CUPS Filter - Bash Environment Variable Code Injection (Metasploit)]
  18. Exploit-DB: exploits/hardware/remote/36503.rb
    [EDB-36503: QNAP - Admin Shell via Bash Environment Variable Code Injection (Metasploit)]
  19. Exploit-DB: exploits/hardware/remote/36504.rb
    [EDB-36504: QNAP - Web Server Remote Code Execution via Bash Environment Variable Code Injection (Metasploit)]
  20. Exploit-DB: exploits/cgi/remote/38849.rb
    [EDB-38849: Advantech Switch - 'Shellshock' Bash Environment Variable Command Injection (Metasploit)]
  21. Exploit-DB: exploits/cgi/remote/39918.rb
    [EDB-39918: IPFire - 'Shellshock' Bash Environment Variable Command Injection (Metasploit)]
  22. Exploit-DB: exploits/hardware/remote/40619.py
    [EDB-40619: TrendMicro InterScan Web Security Virtual Appliance - 'Shellshock' Remote Command Injection]
  23. Exploit-DB: exploits/linux/remote/42938.rb
    [EDB-42938: Qmail SMTP - Bash Environment Variable Injection (Metasploit)]
  24. Exploit-DB: exploits/multiple/remote/48651.txt
    [EDB-48651: Qmail SMTP 1.03 - Bash Environment Variable Injection]
  25. Exploit-DB: exploits/cgi/webapps/34839.py
    [EDB-34839: IPFire - CGI Web Interface (Authenticated) Bash Environment Variable Code Injection]
  26. Exploit-DB: exploits/cgi/webapps/34895.rb
    [EDB-34895: Bash CGI - 'Shellshock' Remote Command Injection (Metasploit)]
  27. Exploit-DB: exploits/php/webapps/35146.txt
    [EDB-35146: PHP < 5.6.2 - 'Shellshock' Safe Mode / disable_functions Bypass / Command Injection]
  28. Exploit-DB: exploits/multiple/webapps/37816.txt
    [EDB-37816: Cisco Unified Communications Manager - Multiple Vulnerabilities]
  29. GitHub: https://github.com/0bfxgh0st-secondary/ShellShock
    [CVE-2014-6271: Local and Remote scan for shellshock vulnerability for Bash versions lower than ...]
  30. GitHub: https://github.com/0bfxgh0st/ShellShock
    [CVE-2014-6271: Local and Remote scan for shellshock vulnerability for Bash versions lower than ...]
  31. GitHub: https://github.com/0bfxgh0st/shellshock-scan
    [CVE-2014-6271: Light scan for ShellShock Vulnerability for Bash versions lower than 4.3.* ...]
  32. GitHub: https://github.com/0x00-0x00/CVE-2014-6271
    [CVE-2014-6271: Shellshock exploitation script that is able to upload and RCE using any vector due ...]
  33. GitHub: https://github.com/0xh4di/awesome-security
    [CVE-2014-6271]
  34. GitHub: https://github.com/0xkasra/CVE-2014-6271
    [CVE-2014-6271]
  35. GitHub: https://github.com/3vikram/Application-Vulnerabilities-Payloads
    [CVE-2014-6271]
  36. GitHub: https://github.com/84KaliPleXon3/Payloads_All_The_Things
    [CVE-2014-6271]
  37. GitHub: https://github.com/APSL/salt-shellshock
    [CVE-2014-6271: Salt recipe for shellshock (CVE-2014-6271)]
  38. GitHub: https://github.com/Addho/test
    [CVE-2014-6271]
  39. GitHub: https://github.com/AfvanMoopen/tryhackme-
    [CVE-2014-6271]
  40. GitHub: https://github.com/Anklebiter87/Cgi-bin_bash_Reverse
    [CVE-2014-6271: Written fro CVE-2014-6271]
  41. GitHub: https://github.com/Any3ite/CVE-2014-6271
    [CVE-2014-6271]
  42. GitHub: https://github.com/Aruthw/CVE-2014-6271
    [CVE-2014-6271]
  43. GitHub: https://github.com/BetaZeon/CyberSecurity_Resources
    [CVE-2014-6271]
  44. GitHub: https://github.com/BionicSwash/Awsome-Pentest
    [CVE-2014-6271]
  45. GitHub: https://github.com/BitTheByte/Eagle
    [CVE-2014-6271]
  46. GitHub: https://github.com/ByteHackr/HackingTools-2
    [CVE-2014-6271]
  47. GitHub: https://github.com/Cyberleet1337/Payloadswebhack
    [CVE-2014-6271]
  48. GitHub: https://github.com/D3Ext/PentestDictionary
    [CVE-2014-6271]
  49. GitHub: https://github.com/Delishsploits/PayloadsAndMethodology
    [CVE-2014-6271]
  50. GitHub: https://github.com/Dilith006/CVE-2014-6271
    [CVE-2014-6271]
  51. GitHub: https://github.com/EvilAnne/Python_Learn
    [CVE-2014-6271]
  52. GitHub: https://github.com/EvilHat/awesome-hacking
    [CVE-2014-6271]
  53. GitHub: https://github.com/EvilHat/awesome-security
    [CVE-2014-6271]
  54. GitHub: https://github.com/EvilHat/pentest-resource
    [CVE-2014-6271]
  55. GitHub: https://github.com/Fa1c0n35/Penetration-Testing02
    [CVE-2014-6271]
  56. GitHub: https://github.com/Fedex100/awesome-security
    [CVE-2014-6271]
  57. GitHub: https://github.com/GuynnR/Payloads
    [CVE-2014-6271]
  58. GitHub: https://github.com/H0j3n/EzpzCheatSheet
    [CVE-2014-6271]
  59. GitHub: https://github.com/Hemanthraju02/web-hacking
    [CVE-2014-6271]
  60. GitHub: https://github.com/Horovtom/BSY-bonus
    [CVE-2014-6271]
  61. GitHub: https://github.com/Jahismighty/pentest-apps
    [CVE-2014-6271]
  62. GitHub: https://github.com/Jean-Francois-C/Boot2root-CTFs-Writeups
    [CVE-2014-6271]
  63. GitHub: https://github.com/JowardBince/ShellShock
    [CVE-2014-6271: A python script intended to automate cgi-bin based exploitation of the ShellSchock ...]
  64. GitHub: https://github.com/Kaizhe/attacker
    [CVE-2014-6271]
  65. GitHub: https://github.com/LearnGolang/LearnGolang
    [CVE-2014-6271]
  66. GitHub: https://github.com/LubinLew/WEB-CVE
    [CVE-2014-6271]
  67. GitHub: https://github.com/Ly0nt4r/ShellShock
    [CVE-2014-6271]
  68. GitHub: https://github.com/Moe-93/penttest
    [CVE-2014-6271]
  69. GitHub: https://github.com/MrCl0wnLab/ShellShockHunter
    [CVE-2014-6271]
  70. GitHub: https://github.com/Muhammd/Awesome-Payloads
    [CVE-2014-6271]
  71. GitHub: https://github.com/MuirlandOracle/CVE-2014-6271-IPFire
    [CVE-2014-6271]
  72. GitHub: https://github.com/NCSU-DANCE-Research-Group/CDL
    [CVE-2014-6271]
  73. GitHub: https://github.com/Nieuport/Awesome-Security
    [CVE-2014-6271]
  74. GitHub: https://github.com/OshekharO/Penetration-Testing
    [CVE-2014-6271]
  75. GitHub: https://github.com/P0cL4bs/ShellShock-CGI-Scan
    [CVE-2014-6271: A script, in C, to check if CGI scripts are vulnerable to CVE-2014-6271 (The Bash ...]
  76. GitHub: https://github.com/Pilou-Pilou/docker_CVE-2014-6271.
    [CVE-2014-6271]
  77. GitHub: https://github.com/Prodject/Kn0ck
    [CVE-2014-6271]
  78. GitHub: https://github.com/QWERTSKIHACK/awesome-web-hacking
    [CVE-2014-6271]
  79. GitHub: https://github.com/R0B1NL1N/E-x-p-l-o-i-t-s
    [CVE-2014-6271]
  80. GitHub: https://github.com/RDKPatil/Penetration-test
    [CVE-2014-6271]
  81. GitHub: https://github.com/RainMak3r/Rainstorm
    [CVE-2014-6271: CVE-2014-6271 RCE tool]
  82. GitHub: https://github.com/SARATOGAMarine/Lastest-Web-Hacking-Tools-vol-I
    [CVE-2014-6271]
  83. GitHub: https://github.com/SaltwaterC/sploit-tools
    [CVE-2014-6271]
  84. GitHub: https://github.com/Secop/awesome-security
    [CVE-2014-6271]
  85. GitHub: https://github.com/Sindadziy/cve-2014-6271
    [CVE-2014-6271]
  86. GitHub: https://github.com/Sindayifu/CVE-2019-14287-CVE-2014-6271
    [CVE-2014-6271]
  87. GitHub: https://github.com/Soldie/Colection-pentest
    [CVE-2014-6271]
  88. GitHub: https://github.com/Soldie/Penetration-Testing
    [CVE-2014-6271]
  89. GitHub: https://github.com/Swordfish-Security/Pentest-In-Docker
    [CVE-2014-6271]
  90. GitHub: https://github.com/Trietptm-on-Awesome-Lists/become-a-penetration-tester
    [CVE-2014-6271]
  91. GitHub: https://github.com/UroBs17/hacking-tools
    [CVE-2014-6271]
  92. GitHub: https://github.com/Voxer/nagios-plugins
    [CVE-2014-6271]
  93. GitHub: https://github.com/XPR1M3/Payloads_All_The_Things
    [CVE-2014-6271]
  94. GitHub: https://github.com/XiphosResearch/exploits
    [CVE-2014-6271]
  95. GitHub: https://github.com/aalderman19/CyberSec-Assignement9
    [CVE-2014-6271]
  96. GitHub: https://github.com/abhinavkakku/Ethical-Hacking-Tutorials
    [CVE-2014-6271]
  97. GitHub: https://github.com/adm0i/Web-Hacking
    [CVE-2014-6271]
  98. GitHub: https://github.com/ajino2k/awesome-security
    [CVE-2014-6271]
  99. GitHub: https://github.com/akiraaisha/shellshocker-python
    [CVE-2014-6271: This is a Python Application that helps you detect if your machine that run bash is ...]
  100. GitHub: https://github.com/akr3ch/CVE-2014-6271
    [CVE-2014-6271: ShellShock interactive-shell exploit]
  101. GitHub: https://github.com/albinowax/ActiveScanPlusPlus
    [CVE-2014-6271]
  102. GitHub: https://github.com/alex14324/Eagel
    [CVE-2014-6271]
  103. GitHub: https://github.com/alexphiliotis/ShellShock
    [CVE-2014-6271: A python script intended to automate the exploitation of the ShellSchock ...]
  104. GitHub: https://github.com/amalaqd/InfoSecPractitionerToolsList
    [CVE-2014-6271]
  105. GitHub: https://github.com/amcai/myscan
    [CVE-2014-6271]
  106. GitHub: https://github.com/andr3w-hilton/Penetration_Testing_Resources
    [CVE-2014-6271]
  107. GitHub: https://github.com/andrysec/PayloadsAllVulnerability
    [CVE-2014-6271]
  108. GitHub: https://github.com/anhtu97/PayloadAllEverything
    [CVE-2014-6271]
  109. GitHub: https://github.com/antoinegoze/learn-web-hacking
    [CVE-2014-6271]
  110. GitHub: https://github.com/apkadmin/PayLoadsAll
    [CVE-2014-6271]
  111. GitHub: https://github.com/ariarijp/vagrant-shellshock
    [CVE-2014-6271: CVE-2014-6271の検証用Vagrantfileです]
  112. GitHub: https://github.com/b4keSn4ke/CVE-2014-6271
    [CVE-2014-6271: Shellshock exploit aka CVE-2014-6271]
  113. GitHub: https://github.com/b4keSn4ke/shellshock
    [CVE-2014-6271: Shellshock exploit aka CVE-2014-6271]
  114. GitHub: https://github.com/blackpars4x4/pentesting
    [CVE-2014-6271]
  115. GitHub: https://github.com/briskinfosec/Tools
    [CVE-2014-6271]
  116. GitHub: https://github.com/capture0x/XSHOCK
    [CVE-2014-6271]
  117. GitHub: https://github.com/catsecorg/CatSec-TryHackMe-WriteUps
    [CVE-2014-6271]
  118. GitHub: https://github.com/chanchalpatra/payload
    [CVE-2014-6271]
  119. GitHub: https://github.com/chuang76/writ3up
    [CVE-2014-6271]
  120. GitHub: https://github.com/cyberharsh/Shellbash-CVE-2014-6271
    [CVE-2014-6271]
  121. GitHub: https://github.com/czq945659538/-study
    [CVE-2014-6271]
  122. GitHub: https://github.com/dadglad/aawesome-security
    [CVE-2014-6271]
  123. GitHub: https://github.com/devhackrahul/Penetration-Testing-
    [CVE-2014-6271]
  124. GitHub: https://github.com/dinamsky/awesome-security
    [CVE-2014-6271]
  125. GitHub: https://github.com/dlitz/bash-cve-2014-6271-fixes
    [CVE-2014-6271: Collected fixes for bash CVE-2014-6271]
  126. GitHub: https://github.com/dokku-alt/dokku-alt
    [CVE-2014-6271]
  127. GitHub: https://github.com/erSubhashThapa/pentesting
    [CVE-2014-6271]
  128. GitHub: https://github.com/eric-erki/Penetration-Testing
    [CVE-2014-6271]
  129. GitHub: https://github.com/foobarto/redteam-notebook
    [CVE-2014-6271]
  130. GitHub: https://github.com/francisck/shellshock-cgi
    [CVE-2014-6271: A python script to enumerate CGI scripts vulnerable to CVE-2014-6271 on one specific ...]
  131. GitHub: https://github.com/gabemarshall/shocknaww
    [CVE-2014-6271: Simple script to check for CVE-2014-6271]
  132. GitHub: https://github.com/gipi/cve-cemetery
    [CVE-2014-6271]
  133. GitHub: https://github.com/googleinurl/Xpl-SHELLSHOCK-Ch3ck
    [CVE-2014-6271]
  134. GitHub: https://github.com/gpoojareddy/Security
    [CVE-2014-6271]
  135. GitHub: https://github.com/hacden/vultools
    [CVE-2014-6271]
  136. GitHub: https://github.com/hailan09/Hacker
    [CVE-2014-6271]
  137. GitHub: https://github.com/hilal007/E-Tip
    [CVE-2014-6271]
  138. GitHub: https://github.com/hktalent/myhktools
    [CVE-2014-6271]
  139. GitHub: https://github.com/hmlio/vaas-cve-2014-6271
    [CVE-2014-6271: Vulnerability as a service: showcasing CVS-2014-6271, a.k.a. Shellshock]
  140. GitHub: https://github.com/huangzhe312/pentest
    [CVE-2014-6271]
  141. GitHub: https://github.com/ilismal/Nessus_CVE-2014-6271_check
    [CVE-2014-6271: Quick and dirty nessus .audit file to check is bash is vulnerable to CVE-2014-6271 ...]
  142. GitHub: https://github.com/indiandragon/Shellshock-Vulnerability-Scan
    [CVE-2014-6271: Android app to scan for bash Vulnerability - CVE-2014-6271 also known as Shellshock ...]
  143. GitHub: https://github.com/infosecmahi/AWeSome_Pentest
    [CVE-2014-6271]
  144. GitHub: https://github.com/infoslack/awesome-web-hacking
    [CVE-2014-6271]
  145. GitHub: https://github.com/internero/debian-lenny-bash_3.2.52-cve-2014-6271
    [CVE-2014-6271: Debian Lenny Bash packages with cve-2014-6271 patches (i386 and amd64)]
  146. GitHub: https://github.com/jblaine/cookbook-bash-CVE-2014-6271
    [CVE-2014-6271: Chef cookbook that will fail if bash vulnerability found per CVE-2014-6271]
  147. GitHub: https://github.com/jottama/pentesting
    [CVE-2014-6271]
  148. GitHub: https://github.com/kk98kk0/Payloads
    [CVE-2014-6271]
  149. GitHub: https://github.com/kowshik-sundararajan/CVE-2014-6271
    [CVE-2014-6271: CS4238 Computer Security Practices]
  150. GitHub: https://github.com/ksang/shellshock
    [CVE-2014-6271: CVE 2014-6271 PoC Tool by kaitoY]
  151. GitHub: https://github.com/lethanhtrung22/Awesome-Hacking
    [CVE-2014-6271]
  152. GitHub: https://github.com/linuxjustin/Pentest
    [CVE-2014-6271]
  153. GitHub: https://github.com/linuxjustin/Tools
    [CVE-2014-6271]
  154. GitHub: https://github.com/lotusirous/vulnwebcollection
    [CVE-2014-6271]
  155. GitHub: https://github.com/lp008/Hack-readme
    [CVE-2014-6271]
  156. GitHub: https://github.com/mahyarx/pentest-tools
    [CVE-2014-6271]
  157. GitHub: https://github.com/majidkalantarii/WebHacking
    [CVE-2014-6271]
  158. GitHub: https://github.com/marrocamp/Impressionante-pentest
    [CVE-2014-6271]
  159. GitHub: https://github.com/marrocamp/Impressionante-teste-de-penetra-o
    [CVE-2014-6271]
  160. GitHub: https://github.com/marroocamp/Recursos-pentest
    [CVE-2014-6271]
  161. GitHub: https://github.com/mattclegg/CVE-2014-6271
    [CVE-2014-6271]
  162. GitHub: https://github.com/meherarfaoui09/meher
    [CVE-2014-6271]
  163. GitHub: https://github.com/minkhant-dotcom/awesome_security
    [CVE-2014-6271]
  164. GitHub: https://github.com/mochizuki875/CVE-2014-6271-Apache-Debian
    [CVE-2014-6271: This Repo is PoC environment of ...]
  165. GitHub: https://github.com/mostakimur/SecurityTesting_web-hacking
    [CVE-2014-6271]
  166. GitHub: https://github.com/mrhacker51/ReverseShellCommands
    [CVE-2014-6271]
  167. GitHub: https://github.com/nabaratanpatra/CODE-FOR-FUN
    [CVE-2014-6271]
  168. GitHub: https://github.com/nikamajinkya/PentestEx
    [CVE-2014-6271]
  169. GitHub: https://github.com/noname1007/awesome-web-hacking
    [CVE-2014-6271]
  170. GitHub: https://github.com/notsag-dev/htb-shocker
    [CVE-2014-6271]
  171. GitHub: https://github.com/npm/ansible-bashpocalypse
    [CVE-2014-6271: Patch for CVE-2014-6271]
  172. GitHub: https://github.com/nvnpsplt/hack
    [CVE-2014-6271]
  173. GitHub: https://github.com/oncybersec/oscp-enumeration-cheat-sheet
    [CVE-2014-6271]
  174. GitHub: https://github.com/oneplush/hacking_tutorials
    [CVE-2014-6271]
  175. GitHub: https://github.com/oneplus-x/Sn1per
    [CVE-2014-6271]
  176. GitHub: https://github.com/opsxcq/exploit-CVE-2014-6271
    [CVE-2014-6271: Shellshock exploit + vulnerable environment]
  177. GitHub: https://github.com/ozkanbilge/Payloads
    [CVE-2014-6271]
  178. GitHub: https://github.com/parveshkatoch/Penetration-Testing
    [CVE-2014-6271]
  179. GitHub: https://github.com/paulveillard/cybersecurity
    [CVE-2014-6271]
  180. GitHub: https://github.com/paulveillard/cybersecurity-penetration-testing
    [CVE-2014-6271]
  181. GitHub: https://github.com/paulveillard/cybersecurity-web-hacking
    [CVE-2014-6271]
  182. GitHub: https://github.com/persian64/CVE-2014-6271
    [CVE-2014-6271]
  183. GitHub: https://github.com/pr0code/web-hacking
    [CVE-2014-6271]
  184. GitHub: https://github.com/prasadnadkarni/Pentest-resources
    [CVE-2014-6271]
  185. GitHub: https://github.com/proclnas/ShellShock-CGI-Scan
    [CVE-2014-6271: A script, in C, to check if CGI scripts are vulnerable to CVE-2014-6271 (The Bash ...]
  186. GitHub: https://github.com/pwnGuy/shellshock-shell
    [CVE-2014-6271: A simple python shell-like exploit for the Shellschok CVE-2014-6271 bug.]
  187. GitHub: https://github.com/qinguangjun/awesome-security
    [CVE-2014-6271]
  188. GitHub: https://github.com/r3p3r/nixawk-awesome-pentest
    [CVE-2014-6271]
  189. GitHub: https://github.com/r3p3r/paralax-awesome-pentest
    [CVE-2014-6271]
  190. GitHub: https://github.com/r3p3r/paralax-awesome-web-hacking
    [CVE-2014-6271]
  191. GitHub: https://github.com/r4z0r5/SwissArmyShellshocker
    [CVE-2014-6271: A multifunctional tool for checking and exploiting the Shellshock(a. k. a. Bashd00r) ...]
  192. GitHub: https://github.com/rajangiri01/test
    [CVE-2014-6271]
  193. GitHub: https://github.com/ramnes/pyshellshock
    [CVE-2014-6271: :scream: Python library and utility for CVE-2014-6271 (aka. "shellshock")]
  194. GitHub: https://github.com/rashmikadileeshara/CVE-2014-6271-Shellshock-
    [CVE-2014-6271: This is an individual assignment for secure network programming]
  195. GitHub: https://github.com/renanvicente/puppet-shellshock
    [CVE-2014-6271: This module determine the vulnerability of a bash binary to the shellshock exploits ...]
  196. GitHub: https://github.com/roninAPT/pentest-kit
    [CVE-2014-6271]
  197. GitHub: https://github.com/rrreeeyyy/cve-2014-6271-spec
    [CVE-2014-6271]
  198. GitHub: https://github.com/rsc-dev/cve_db
    [CVE-2014-6271]
  199. GitHub: https://github.com/ryeyao/CVE-2014-6271_Test
    [CVE-2014-6271]
  200. GitHub: https://github.com/sachinis/pentest-resources
    [CVE-2014-6271]
  201. GitHub: https://github.com/samba234/Sniper
    [CVE-2014-6271]
  202. GitHub: https://github.com/sbilly/awesome-security
    [CVE-2014-6271]
  203. GitHub: https://github.com/sch3m4/RIS
    [CVE-2014-6271: CVE-2014-6271 Remote Interactive Shell - PoC Exploit]
  204. GitHub: https://github.com/scottjpack/shellshock_scanner
    [CVE-2014-6271: Python Scanner for "ShellShock" (CVE-2014-6271)]
  205. GitHub: https://github.com/securusglobal/BadBash
    [CVE-2014-6271: CVE-2014-6271 (ShellShock) RCE PoC tool]
  206. GitHub: https://github.com/shawntns/exploit-CVE-2014-6271
    [CVE-2014-6271]
  207. GitHub: https://github.com/shayezkarim/pentest
    [CVE-2014-6271]
  208. GitHub: https://github.com/shildenbrand/Exploits
    [CVE-2014-6271]
  209. GitHub: https://github.com/sobinge/PayloadsAllThesobinge
    [CVE-2014-6271]
  210. GitHub: https://github.com/sobinge/--1
    [CVE-2014-6271]
  211. GitHub: https://github.com/somhm-solutions/Shell-Shock
    [CVE-2014-6271: *CVE-2014-6271* Unix Arbitrary Code Execution Exploit commonly know as Shell Shock. ...]
  212. GitHub: https://github.com/spy86/Security-Awesome
    [CVE-2014-6271]
  213. GitHub: https://github.com/sunnyjiang/shellshocker-android
    [CVE-2014-6271: This is an Android Application that helps you detect if your machine that run bash ...]
  214. GitHub: https://github.com/takuzoo3868/laputa
    [CVE-2014-6271]
  215. GitHub: https://github.com/teedeedubya/bash-fix-exploit
    [CVE-2014-6271: Ansible role to check the CVE-2014-6271 vulnerability]
  216. GitHub: https://github.com/thanshurc/awesome-web-hacking
    [CVE-2014-6271]
  217. GitHub: https://github.com/tobor88/Bash
    [CVE-2014-6271]
  218. GitHub: https://github.com/trapp3rhat/CVE-shellshock
    [CVE-2014-6271]
  219. GitHub: https://github.com/u20024804/bash-3.2-fixed-CVE-2014-6271
    [CVE-2014-6271]
  220. GitHub: https://github.com/u20024804/bash-4.2-fixed-CVE-2014-6271
    [CVE-2014-6271]
  221. GitHub: https://github.com/u20024804/bash-4.3-fixed-CVE-2014-6271
    [CVE-2014-6271]
  222. GitHub: https://github.com/unusualwork/Sn1per
    [CVE-2014-6271]
  223. GitHub: https://github.com/uoanlab/vultest
    [CVE-2014-6271]
  224. GitHub: https://github.com/val922/cyb3r53cur1ty
    [CVE-2014-6271]
  225. GitHub: https://github.com/vishalrudraraju/Pen-test
    [CVE-2014-6271]
  226. GitHub: https://github.com/vonnyfly/shellshock_crawler
    [CVE-2014-6271: Using google to scan sites for "ShellShock" (CVE-2014-6271)]
  227. GitHub: https://github.com/w4fz5uck5/ShockZaum-CVE-2014-6271
    [CVE-2014-6271: Shellshock vulnerability attacker]
  228. GitHub: https://github.com/wanirauf/pentest
    [CVE-2014-6271]
  229. GitHub: https://github.com/wattson-coder/pablo_rotem_security
    [CVE-2014-6271]
  230. GitHub: https://github.com/winterwolf32/Penetration-Testing
    [CVE-2014-6271]
  231. GitHub: https://github.com/winterwolf32/awesome-web-hacking
    [CVE-2014-6271]
  232. GitHub: https://github.com/winterwolf32/awesome-web-hacking-1
    [CVE-2014-6271]
  233. GitHub: https://github.com/woltage/CVE-2014-6271
    [CVE-2014-6271]
  234. GitHub: https://github.com/wtsxDev/List-of-web-application-security
    [CVE-2014-6271]
  235. GitHub: https://github.com/wtsxDev/Penetration-Testing
    [CVE-2014-6271]
  236. GitHub: https://github.com/x2c3z4/shellshock_crawler
    [CVE-2014-6271: Using google to scan sites for "ShellShock" (CVE-2014-6271)]
  237. GitHub: https://github.com/xiaoy-sec/Pentest_Note
    [CVE-2014-6271]
  238. GitHub: https://github.com/x-o-r-r-o/PHP-Webshells-Collection
    [CVE-2014-6271]
  239. GitHub: https://github.com/zhang040723/web
    [CVE-2014-6271]
  240. GitHub: https://github.com/cj1324/CGIShell
    [CVE-2014-6271: Shellshock CVE-2014-6271 CGI Exploit, Use like Openssh via CGI]
  241. GitHub: https://github.com/cved-sources/cve-2014-6271
    [CVE-2014-6271: Cve-2014-6271]
  242. GitHub: https://github.com/huanlu/cve-2014-6271-huan-lu
    [CVE-2014-6271: Reading course]
  243. GitHub: https://github.com/justzx2011/bash-up
    [CVE-2014-6271: A auto script to fix CVE-2014-6271 bash vulnerability]
  244. GitHub: https://github.com/kelleykong/cve-2014-6271-mengjia-kong
    [CVE-2014-6271: System reading course]
  245. GitHub: https://github.com/ryancnelson/patched-bash-4.3
    [CVE-2014-6271: Patched-bash-4.3 for CVE-2014-6271]
  246. GitHub: https://github.com/themson/shellshock
    [CVE-2014-6271: Scripts associate with bourne shell EVN function parsing vulnerability CVE-2014-6271 ...]
  247. GitHub: https://github.com/villadora/CVE-2014-6271
    [CVE-2014-6271: Scaner for cve-2014-6271]
  248. GitHub: https://github.com/wenyu1999/bash-shellshock
    [CVE-2014-6271: Cve-2014-6271]
  249. GitHub: https://github.com/zalalov/CVE-2014-6271
    [CVE-2014-6271: Shellshock POC | CVE-2014-6271 | cgi-bin reverse shell]

Before running any exploit against any system, make sure you are authorized by the owner of the target system(s) to perform such activity. In any other case, this would be considered as an illegal activity.

WARNING: Beware of using unverified exploits from sources such as GitHub or Exploit-DB. These exploits and PoCs could contain malware. For more information, see how to use exploits safely.

Risk Information


CVSS Score Source [?]: CVE-2014-6271
CVSS V2 Vector: AV:N/AC:L/Au:N/C:C/I:C/A:C/E:H/RL:OF/RC:C
CVSS Base Score:10.0 (High)
Impact Subscore:10.0
Exploitability Subscore:10.0
CVSS Temporal Score:8.7 (High)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:8.7 (High)
CVSS V3 Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:H/RL:O/RC:C
CVSS Base Score:9.8 (Critical)
Impact Subscore:5.9
Exploitability Subscore:3.9
CVSS Temporal Score:9.4 (Critical)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:9.4 (Critical)
STIG Severity [?]: I
STIG Risk Rating: High

Go back to menu.

Plugin Source


This is the bash_remote_code_execution.nasl nessus plugin source code. This script is Copyright (C) 2014-2022 and is owned by Tenable, Inc. or an Affiliate thereof.

#TRUSTED 94247b0ad428d812da7f778cc09b9ecead2f24fedcf47b9e55e84d6e398cbc61237a6dc2944cdd33a2d5e9512d676685548b24607fecd28f305eba520f6d203a41dca430f9ee3dfcd2d53adcd0e7777339bb63492bb78438de41972b1d3eea65f0183ad43f9522ae1c4b584a8305b9df0e3ba5b990a64cf7d607a167c5f13ca7fb8c58e76160013541ff66a75900a680ff5afe41933c0b7a1a5d3435097ac85af464775da40a7822288e7adf5d1a494d30b0388f219a6bab2dddb0af6780b18480323d58367024ca0d136d3517e05e8d65a47f287b3b57744f9999e75e5f4527ae8640f689c1fa70fc29796af0f7239ccc3e007aba908279ab454ac79ef5a0940d7acc621fc01c1fd75c97f17912156854b1102711d2512ca25d480c2dfeceac088e104eb5c2bdd45a7293daffeeea761d4c88b831c7d49333ded13eee3b54e25406e13182fcb22b6a19f103738b19ec631cc3e99d28f46f58a286cb82d95ab13075b533102849c3fc092a5eaed36c8ad1417d3bf3d041fc1f8e758e83a062b8514daca6afdd10e23778b97cb3c821eeb469cc63668c35b78de25a4f3d98ab2c8c2f88f782e134a2e33280c6390c8cb83cd4641ed523c3f787ca765abffd85741bb92c9979b6b03a7a2ee9a3eeee1cbf7ed87d6871c11fed192668a72d265f02d472d82552cd9018ebb3fbea7034b35ba04b532d11d5b4cf9027d45a68174289
#
# (C) Tenable Network Security, Inc.
#

include('compat.inc');

if (description)
{
  script_id(77823);
  script_version("1.28");
  script_set_attribute(attribute:"plugin_modification_date", value:"2022/01/31");

  script_cve_id("CVE-2014-6271");
  script_bugtraq_id(70103);
  script_xref(name:"EDB-ID", value:"34765");
  script_xref(name:"EDB-ID", value:"34766");
  script_xref(name:"IAVA", value:"2014-A-0142");
  script_xref(name:"CISA-KNOWN-EXPLOITED", value:"2022/07/28");

  script_name(english:"Bash Remote Code Execution (Shellshock)");

  script_set_attribute(attribute:"synopsis", value:
"A system shell on the remote host is vulnerable to command injection.");
  script_set_attribute(attribute:"description", value:
"The remote host is running a version of Bash that is vulnerable to
command injection via environment variable manipulation. Depending on
the configuration of the system, an attacker could remotely execute
arbitrary code.");
  script_set_attribute(attribute:"see_also", value:"http://seclists.org/oss-sec/2014/q3/650");
  # https://securityblog.redhat.com/2014/09/24/bash-specially-crafted-environment-variables-code-injection-attack/
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?dacf7829");
  script_set_attribute(attribute:"see_also", value:"https://www.invisiblethreat.ca/post/shellshock/");
  script_set_attribute(attribute:"solution", value:
"Update Bash.");
  script_set_attribute(attribute:"agent", value:"unix");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C");
  script_set_cvss_temporal_vector("CVSS2#E:H/RL:OF/RC:C");
  script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H");
  script_set_cvss3_temporal_vector("CVSS:3.0/E:H/RL:O/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2014-6271");

  script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_set_attribute(attribute:"exploit_framework_core", value:"true");
  script_set_attribute(attribute:"exploited_by_malware", value:"true");
  script_set_attribute(attribute:"exploited_by_nessus", value:"true");
  script_set_attribute(attribute:"metasploit_name", value:'Qmail SMTP Bash Environment Variable Injection (Shellshock)');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
  script_set_attribute(attribute:"in_the_news", value:"true");

  script_set_attribute(attribute:"vuln_publication_date", value:"2014/09/24");
  script_set_attribute(attribute:"patch_publication_date", value:"2014/09/24");
  script_set_attribute(attribute:"plugin_publication_date", value:"2014/09/24");

  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:gnu:bash");
  script_set_attribute(attribute:"stig_severity", value:"I");
  script_end_attributes();

  script_category(ACT_ATTACK);
  script_family(english:"Gain a shell remotely");

  script_copyright(english:"This script is Copyright (C) 2014-2022 and is owned by Tenable, Inc. or an Affiliate thereof.");

  script_dependencies("ssh_get_info.nasl");
  script_require_ports("Services/ssh", 22);

  exit(0);
}

include("audit.inc");
include("global_settings.inc");
include("ssh_func.inc");
include("telnet_func.inc");
include("hostlevel_funcs.inc");
include("misc_func.inc");
include("data_protection.inc");

port = get_service(svc:"ssh", default:22, exit_on_fail:TRUE);
if (!get_port_state(port)) audit(AUDIT_PORT_CLOSED, port);

ret = ssh_open_connection();
if (!ret) audit(AUDIT_SOCK_FAIL, port, "SSH");

info_t = INFO_SSH;

filename = "nessus." + unixtime();
test_command = "echo Plugin output: $((1+1))";

term = "() { :;}; " + test_command + " > /tmp/" + filename;
command = "bash -c 'cat /tmp/" + filename + "'";
output = ssh_cmd(cmd:command, term:term, noexec:TRUE);
# attempt cleanup
cleanup = "rm /tmp/" + filename;
ssh_cmd(cmd:cleanup);

if ("Plugin output: 2" >!< output)
{
  if(info_t == INFO_SSH) ssh_close_connection();
  audit(AUDIT_HOST_NOT, "affected.");
}

test_command = "/usr/bin/id";
term2 = "() { :;}; " + test_command + " > /tmp/" + filename;
command = "bash -c 'cat /tmp/" + filename + "'";
output2 = ssh_cmd(cmd:command, term:term2, noexec:TRUE);
# attempt cleanup
cleanup = "rm /tmp/" + filename;
ssh_cmd(cmd:cleanup);

if(info_t == INFO_SSH) ssh_close_connection();

if (output2 =~ "uid=[0-9]+.*gid=[0-9]+.*")
{
  term = term2;
  output = output2;
}

report =
  '\n' + 'Nessus was able to set the TERM environment variable used in an SSH' +
  '\n' + 'connection to :' +
  '\n' +
  '\n' + term +
  '\n' +
  '\n' + 'and read the output from the file :' +
  '\n' +
  '\n' + data_protection::sanitize_uid(output:output) +
  '\n' +
  '\n' + 'Note: Nessus has attempted to remove the file /tmp/' + filename + '\n';

security_report_v4(
  port       : port,
  severity   : SECURITY_HOLE,
  extra      : report
);

The latest version of this script can be found in these locations depending on your platform:

  • Linux / Unix:
    /opt/nessus/lib/nessus/plugins/bash_remote_code_execution.nasl
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\bash_remote_code_execution.nasl
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/bash_remote_code_execution.nasl

Go back to menu.

How to Run


Here is how to run the Bash Remote Code Execution (Shellshock) as a standalone plugin via the Nessus web user interface (https://localhost:8834/):

  1. Click to start a New Scan.
  2. Select Advanced Scan.
  3. Navigate to the Plugins tab.
  4. On the top right corner click to Disable All plugins.
  5. On the left side table select Gain a shell remotely plugin family.
  6. On the right side table select Bash Remote Code Execution (Shellshock) plugin ID 77823.
  7. Specify the target on the Settings tab and click to Save the scan.
  8. Run the scan.

Here are a few examples of how to run the plugin in the command line. Note that the examples below demonstrate the usage on the Linux / Unix platform.

Basic usage:

/opt/nessus/bin/nasl bash_remote_code_execution.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a bash_remote_code_execution.nasl -t <IP/HOST>

Run the plugin with trace script execution written to the console (useful for debugging):

/opt/nessus/bin/nasl -T - bash_remote_code_execution.nasl -t <IP/HOST>

Run the plugin with using a state file for the target and updating it (useful for running multiple plugins on the target):

/opt/nessus/bin/nasl -K /tmp/state bash_remote_code_execution.nasl -t <IP/HOST>

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: IAVA | Information Assurance Vulnerability Alert:
  • 2014-A-0142
See also: Similar and related Nessus plugins:
  • 78385 - Bash Incomplete Fix Remote Code Execution Vulnerability (Shellshock)
  • 78067 - Bash Remote Code Execution (CVE-2014-6277 / CVE-2014-6278) (Shellshock)
  • 77857 - GNU Bash Local Environment Variable Handling Command Injection via Telnet (CVE-2014-7169) (Shellshock)
  • 77829 - GNU Bash Environment Variable Handling Code Injection (Shellshock)
  • 82581 - GNU Bash Incomplete Fix Remote Code Injection (Shellshock)
  • 33285 - EMC AlphaStor Library Manager Remote Code Execution
  • 67248 - Cisco Prime Data Center Network Manager RMI Remote Code Execution (credentialed check)
  • 67247 - Cisco Prime Data Center Network Manager RMI Remote Code Execution (uncredentialed check)
  • 119780 - Netatalk OpenSession Remote Code Execution
  • 62026 - Novell File Reporter Agent XML Parsing Remote Code Execution
  • 58119 - Symantec pcAnywhere awhost32 Remote Code Execution

Version


This page has been produced using Nessus Professional 10.1.2 (#68) LINUX, Plugin set 202205072148.
Plugin file bash_remote_code_execution.nasl version 1.28. For more plugins, visit the Nessus Plugin Library.

Go back to menu.