Member-only story

OSCP Tip: Reverse Shell with BusyBox!

Jose Campo
2 min readOct 13, 2024

--

As an OSCP aspirant, we’re always on the lookout for quick and efficient ways to obtain a reverse shell during penetration tests. One lesser-known but powerful tool available on most Linux systems is BusyBox. Surprisingly, it comes pre-installed on almost every Linux distribution, making it an ideal go-to option when you’re limited by what’s available on the target machine.

What is BusyBox?

BusyBox is often referred to as the “Swiss Army knife” of embedded Linux. It combines many essential Unix utilities into a single executable, and it’s included on most Linux distributions, especially smaller or resource-constrained environments. Its versatility makes it a life saver during a pentest when other tools might be missing or limited.

The Problem with Netcat on Linux

In many pentesting scenarios, we often try to leverage Netcat (nc) to get a reverse shell. However, there’s a catch. The version of Netcat that comes with most Linux systems is the OpenBSD version, which, unfortunately, lacks the -e option that’s crucial for creating a reverse shell connection.

The -e option allows us to execute a program (like /bin/sh) after making a successful connection to the attacker’s machine. Without this, getting a reverse shell using Netcat becomes more…

--

--

Jose Campo
Jose Campo

No responses yet