How to Configure a Reverse SSH Shell (Raspberry Pi Hacking Box) « Null Byte :: WonderHowTo

If you've been watching the latest USA TV Series Mr Robot, you will have seen the Raspberry Pi used by Fsoeciety to control the HVAC system. OTW covers this very wellherewith his take on setup they may of used.However I had a very different take. A netcat bind shell is great, until you want to start launching airodump-ng capture attacks a SSH shell seems like the best option however if the box is behind a firewall, you're gonna need a reverse ssh shell. For this tutorial you will need a server that is either exposed on the internet (on something like aVPS) or port forwarded.I have written a script to make this whole process a lot easier, and you can grab itin this awesome blue fuzzy highlighting link of magic. And I will show you how to do use it. You can find out manuallyhere.Step 1: Upload the Script to Your Devices!Download the script to each of your devices, you can easily download this withwgethttps://gist.githubusercontent.com/pry0cc/dd0fd2d7bd1a72787975/raw/ec19286bc55954ccaeba203f6dc2d0e2632453ea/reverse-ssh.shStep 2: Set Up a Handler on Your ServerChoose a device to be your server, this will typically be aVPSor something of that sort that is internet facing. Or... It can be something on your local network, in this example I will using my remote VPS as the server, and my laptop as the attack client (the device i will be controlling). Though this setup, I will be able to control my laptop, from my server without ever portforwarding.Image viaimgur.comOn my server I will set up the handler with./reverse_ssh.ssh -s <my servers external ip> <the port I want to use>so in my case it is../reverse_ssh.ssh -s 100.100.100.100 30 (that IP is only a placeholder :P this would actually be your servers IP).This will hang there waiting for a connection. This is when we move onto our client or attack box (this could be the Raspberry Pi)Step 3: Set Up a Connect Listener on Your Client/PiThe syntax works like this../reverse_ssh.sh -c <ip of handler> <port of handler> <reconnect time in seconds>The script will attempt to connect to the server until it establishes a connection with it. Once established, it will stop printing "Attempting connection" and will hang. This is when we should hop on over to our attack client.Image viaimgur.comStep 4: Pwn the World!Image viaimgur.comIf we did everything correctly, our server should present us with a password login prompt, it says "localhost", which actually infact means our remote client. Once we enter the password, we will have our reverse ssh root shell! From here we can do anything the client can do, including firing up airodump-ng and doing some WEP cracking :)PRY0CCWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedHow To:Set Up a Headless Raspberry Pi Hacking Platform Running Kali LinuxHow To:Discover & Attack Raspberry Pis Using Default Credentials with Rpi-hunterHow To:Build a Beginner Hacking Kit with the Raspberry Pi 3 Model B+How To:Build a Portable Pen-Testing Pi BoxHow To:Load Kali Linux on the Raspberry Pi 4 for the Ultimate Miniature Hacking StationHow To:Set Up Network Implants with a Cheap SBC (Single-Board Computer)Rasberry Pi:Connecting on ComputerHow To:Set Up Kali Linux on the New $10 Raspberry Pi Zero WHow To:Automate Hacking on the Raspberry Pi with the USB Rubber DuckyHow To:Lock Down Your DNS with a Pi-Hole to Avoid Trackers, Phishing Sites & MoreThe Hacks of Mr. Robot:How to Build a Hacking Raspberry PiHow To:Log into Your Raspberry Pi Using a USB-to-TTL Serial CableHow To:Wardrive with the Kali Raspberry Pi to Map Wi-Fi DevicesHow To:Hack WPA WiFi Passwords by Cracking the WPS PINHow To:Share Wi-Fi Adapters Across a Network with Airserv-NgHow To:Use the Chrome Browser Secure Shell App to SSH into Remote DevicesRaspberry Pi:Physical Backdoor Part 1How To:Use VNC to Remotely Access Your Raspberry Pi from Other DevicesHow To:Boot Multiple Operating Systems on the Raspberry Pi with BerryBootHow To:Enable Monitor Mode & Packet Injection on the Raspberry PiOpen Sesame:Make Siri Open Your Garage Door via Raspberry PiHow To:Use Remote Port Forwarding to Slip Past Firewall Restrictions UnnoticedRaspberry Pi:Hacking PlatformHow To:Detect Bluetooth Low Energy Devices in Realtime with Blue HydraHow To:Build an Off-Grid Wi-Fi Voice Communication System with Android & Raspberry PiHow To:Create an SSH Tunnel Server and Client in LinuxHow To:Create a Reverse Shell to Remotely Execute Root Commands Over Any Open Port Using NetCat or BASHHow To:Create a Free SSH Account on Shellmix to Use as a Webhost & MoreHow To:Safely Log In to Your SSH Account Without a PasswordHow To:Push and Pull Remote Files Securely Over SSH with Pipes