Punchabunch Just Made SSH Local Forwarding Stupid Easy « Null Byte :: WonderHowTo

SSH local forwarding is a must for covering your tracks and getting out there to do your work. Also called SSH tunneling, this process will put one or more steps between your machine and the machine you're working on, for security and other purposes. It can be a bit daunting for newbies to get down, and that's wherePunchabunchcomes in.Punchabunch is a new SSH local port-forwarding script from Michael S. Fischer of Zendesk that will easily get you hopping away from your machine. All you need here is Linux, as in Kali, Ubuntu, or Debian. Whichever you prefer.Step 1: Get GoAs simple as Punchabunch is, at this point, it requires you to have Google'sGoorGoLangprogramming language installed on your system. If you're not sure whether or not you already have Go, open up your terminal, then type thegocommand and hit enter. If it looks like it does below, you're good to go.If you don't see the above after typinggo, you'll need to install GoLang, and it's really simple to do. Just use the following two commands to get it done.sudo apt-get updatesudo apt install golang-goAfterward, if you type thegocommand again, you should see what's pictured above.Step 2: Ready Your Go EnvironmentBefore you can install Punchabunch, you have to get our Go environment set up correctly. To do that, you need to type a few lines into the terminal so that Go knows where it lives, and so that Go will put its apps in the right place. Enter the two lines below one at a time, so Go will live in a directory just beneath your home directory, and moving forward, you'll know where to find everything it installs.export GOPATH=$HOME/goexport PATH=$PATH:$GOROOT/bin:$GOPATH/binStep 3: Install PunchabunchNow, download Punchabunch by entering the following command in your terminal:go get github.com/zendesk/punchabunchThis will tell Go to pull Punchabunch from GitHub, and put it in the right place, which is ingo/binbeneath your home directory, like mentioned earlier.Step 4: Set Up PunchabunchWith Go installed, and the Punchabunch parts living where they're supposed to be, we can easily set things up now. Change into your Punchabunch directory, which is at~/go/src/github.com/zendesk/punchabunch, then rename the included TOML file, which is calledconfig.example.toml, to the new nameexample.toml. The following command will copy the default TOML file into a new one calledexample.toml.cp config.example.toml example.tomlNow, open up and edit that file to populate it with your server data. I'm editing the file with the Vi editor.Don't Miss:An Intro to Vim, the Unix Text Editor Every Hacker Should Be Familiar WithDon't be intimidated by the "bastion" term you'll see. A bastion host is just a single-purpose computer designed to handle your SSH forwarding connections. You might have one or more of your own servers for this, such as in a secured corporate environment, on your own network, or another online place you use. Any computer running SSH that accepts incoming connections from youcanserve as the bastion host.Also needed are port numbers for each server, defined here by "listen." Most network setups don't usually run the traditional port for SSH forwarding, so you'll need to figure that out for your configuration.Finally, know where you want to go after your stop at the bastion host—that's the "forward" address here.Step 5: Run PunchabunchNow that you've got everything straight, and the information in place for the servers you want to hit, it's time to run Punchabunch. Remember, you're running Go now, so this will run through Go, but it will feel like a regular script because of the way we set everything up. Just make sure you're still in~/go/src/github.com/zendesk/punchabunchto run the following command.punchabunchNote: I'm running the script with the default configuration, which will fail in my case, but the failure to connect will prove it's working because it tried!To prevent this error, make sure that your settings reflect real bastion, or "jump" servers, that you actually use.What Punchabunch Is & Isn'tTo be fair, Punchabunch doesn't do anything that an assortment of other scripts can't do, it just simplifies the setup and ongoing maintenance. Remember theexample.tomlfile? Just input whatever servers you want to use, then run it. Sure, the Go or GoLang setup complicated this exercise a bit, but now you've got the world of Go open to you, and this won't be the last time we visit Go.Follow Null Byte onTwitterandGoogle+Follow WonderHowTo onFacebook,Twitter,Pinterest, andGoogle+Want 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 LicenseCover image and screenshots by EvilToddler/Null ByteRelatedHow To:Use SSH Local Port Forwarding to Pivot into Restricted NetworksHow To:Run Your Favorite Graphical X Applications Over SSHHow To:Use the Chrome Browser Secure Shell App to SSH into Remote DevicesHacking Windows 10:How to Use SSH Tunnels to Forward Requests & Hack Remote RoutersHow To:Use Remote Port Forwarding to Slip Past Firewall Restrictions UnnoticedHow To:Configure a Reverse SSH Shell (Raspberry Pi Hacking Box)Rasberry Pi:Connecting on ComputerSSH the World:Mac, Linux, Windows, iDevices and Android.How To:Spy on SSH Sessions with SSHPry2.0How To:Enable the New Native SSH Client on Windows 10How To:Scan Websites for Interesting Directories & Files with GobusterSPLOIT:How to Make an SSH Brute-Forcer in PythonHow To:Create a Native SSH Server on Your Windows 10 SystemHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 15 (Creating a Secure Tunnel to MySQL)How To:Hack Metasploitable 2 Part 1How To:Locate & Exploit Devices Vulnerable to the Libssh Security FlawHow To:Use the Cowrie SSH Honeypot to Catch Attackers on Your NetworkHow To:Set Up an SSH Server with Tor to Hide It from Shodan & HackersHow To:Share Your LAN Minecraft World with Your Linux-Savvy FriendsHow To:Remotely Control Computers Over VNC Securely with SSHHow To:Create an SSH Tunnel Server and Client in LinuxHow To:Safely Log In to Your SSH Account Without a PasswordHow To:Create a Free SSH Account on Shellmix to Use as a Webhost & MoreHow To:Push and Pull Remote Files Securely Over SSH with PipesNews:Stupid GlueNews:More Stupid Math Jokes...How To:Quickly Encrypt Your Web Browsing Traffic When Connected to Public WiFiHow To:Get the 'What Goes Up...' Achievement in Modern Warfare 3News:Goat Tug of WarNews:All you have to know about this serverNews:Japan World Cup Horse RacingNews:Wussup im new so show me around, k?News:MembersNews:Foam Pit Pool PrankNews:LA Live on PBS July 31stNews:KCRW podcast on ereaders & the physical bookHow To:Create a Reverse Shell to Remotely Execute Root Commands Over Any Open Port Using NetCat or BASHHow To:Run an FTP Server from Home with LinuxNews:Richard Stallman's RiderCoupeville:Mussels, Suds, & Pool