Day 43: Reverse Shell with OpenSSL

int0x33
int0x33
Feb 11, 2019 · 2 min read
Image for post
Image for post

There are a lot of ways to get shells, like walking down the beach and picking them up or going to Taco Bell…oh wait, wrong blog, I mean you can get shells with netcat, php, perl, .net, lolbins etc etc etc but one of my favourites has to be OpenSSL reverse shell. What what?! Do I mean the openssl we used to hijack shadow file, yes, the openssl that nearly every https needing lib in your system uses, yes and finally the openssl people use to generate their keys etc, yes the same openssl and you can use it to get a reverse shell.

Prep

To start the server we need to generate keys on the attacker box, let’s just say Kali for arguments sake.

Start the Listener (Pentest Box)

Launch Reverse Shell (Target Box)

On the target box, the compromised machine you have RCE on, run this…

Image for post
Image for post

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store