We has tubez!

Thoughts from your friendly neighborhood webhost.
  • rss
  • Home
  • About

Setup an SSH SOCKS proxy!

Matt | December 16, 2008 | 6:29 pm

For episode 416 of HAK5, I showed how easy it really is to tunnel all kinds of traffic from HTTP, FTP, and more over a secure SSH Socks proxy.

Some of you may be thinking to yourself… “HOLY CRAP WHAT ARE THESE TERMS?!”  And I’m here to assure you that it’s going to be OK! Really it is.

What you’ll need

  • An SSH server to act as your proxy.
    Simple enough really!  If you’re using windows I highly recommend freeSSHd.  If you’re on a mac check out this page for instructions on how to enable remote logon.  Linux users, you should know how to do this. ;)
  • An SSH client on the computer you’re using.
    Mac and *nix machines have SSH built right in at the command line. Windows users can do like I did in the episode and download plink (available here).  There are other people out there that will recommend Cygwin, but for this purpose, it’s really overkill.

How proxies work

In a nutshell, what you’re doing with a proxy is setting up a middle-person (no not a pineapple, but close) between you and the internet. Using the proxy, your browser hands off web page requests to the proxy server, which handles the request and fetches the page for you from the internet. The web site actually thinks the request is coming from the proxy server, not your computer, which is a good way to obscure your originating IP address.

Additionally, the connection between your computer and the proxy happens over SSH, an encrypted protocol. This prevents wifi sniffers from seeing what you’re doing online.

Start your SSH tunnel

So you’ve got your ssh server setup at your house or workplace. Great! To connect to it we’re going to setup a local proxy server on your client that you’ll be browsing the internet from, which will then “tunnel” web traffic from your local machine to the remote server over SSH. The command to run on your linux / mac client in a terminal window is : ssh -ND 9999 you@example.com

For Windows it’s as simple as browsing to the directory you saved plink to and runningplink.exe -N -D 9999 you@example.com

Of course, you’re going to replace the you with your username on your SSH server and example.com with your server domain name or IP address. What that command does is accept requests from your local machine on port 9999 and hands that request off to your server at example.com for processing.

When you execute either of those commands, you’ll be prompted for your password.  After you authenticate, nothing will happen. The -N tells ssh not to open an interactive prompt, so it will just hang there, waiting. That’s exactly what you want.

Set Firefox to use SOCKS proxy

Once your proxy’s up and running, configure Firefox to use it. From Firefox’s Tools menu, choose Options, and from the Advanced section choose the Network tab. Next to “Configure how Firefox connects to the Internet” hit the “Settings” button and enter the SOCKS information, which is the server name (localhost) and the port you used (in the example above, 9999.)

Save those settings and hit up a web page. When it loads, visit http://www.ipchicken.com to see if it’s using your remote ssh server to tunnel traffic.  If you are, GOLDEN!

If you feel there’s something I’ve missed, hit me up here (http://www.mattlestock.com)

PS: Remember that you’ll need to open your firewall a bit by cracking open port 9999 on your local machine and port 22 on your server for SSH.

Comments
12 Comments »
Categories
Hak5
Comments rss Comments rss
Trackback Trackback

Format your computer, and don’t worry about drivers!

Matt | December 8, 2008 | 7:30 pm

Hey guys, just a post here giving a little more info on what I talked about on episode 415 of Hak5.

After installing a fresh copy of your Windows OS of choice, the biggest headache for most of us is the arduous task of trying to locate drivers for all of our different components. So this post is all about making your reinstall a little less troublesome.

Here’s a list of some of the better driver backup utilities!

DriverBackup2 is a lightweight driver-backup tool. The application is portable with a caveat: you’ll need administrative privileges for full use. You can opt to backup one or all of your drivers, the backed up files are dumped into a tree structure based on driver name. DriverBackup2 also allows you to restore and delete unnecessary drivers. If you ever hunted for obscure drivers online, when installing legacy or obscure hardware for instance, DriverBackup2 will save you the hassle of searching them out again.

Double Driver lists all the hardware drivers installed on your system and creates backups of both the actual drivers and lists of the driver names. While handy with any computer, Double Driver really shines if you have a computer that came with pre-installed drivers that are hard if not impossible to come by. With a few clicks you’ll have those archaic laptop drivers backed up and ready to put back to work after a fresh install.

DriverMax allows you to easily reinstall all your Windows drivers. No more searching for rare drivers on discs or on the web or inserting one installation CD after the other. Simply export all your drivers (or just the ones that work ok) to a folder or a compressed file. After reinstalling Windows all drivers can be back in place in less than 5 minutes.

DriverView is a helpful upgrade from looking through devices individually in the Device Manager, but the real value here is in the list generation. Create an HTML-formatted backup list for your future troubleshooting needs or export to text to show friends or forum members just what’s gone wrong.  While it doesn’t actually backup drivers, if you’re still into doing things the old fashion way, DriverView is a great choice!

Now that we’ve got all of the corporate slogans and descriptions out of the way, my personal favorite is the first link we’ve talked about here.  The interface is the least cluttered, and the process really couldn’t be any easier.  For those of you who are looking to deploy driver backups in an automated fashion, there’s a built in commandline builder!  Like I said, I’ve personally used it and really does make life alot easier after a reinstall.

So check it out and if you have any questions, remember: matt@hak5.org – http://revision3.com/forum/  or http://forums.hak5.org

Till Next Week!
Trust Your Technolust

Comments
No Comments »
Categories
Work Related
Comments rss Comments rss
Trackback Trackback

Hak5 Shownotes for Episode 414

Matt | December 2, 2008 | 9:47 am

Hey guys, here’s my notes for the Webmin / Usermin segment I did on episode 414 of HAK5.

Talking about making your life easier if you’re a linux system admin I demonstratred the great and free tools Webmin and Usermin available from http://webmin.com/

Here’s a great screenshot of visual iptables editing.

IPTable Editor

Installing the package is as easy as RPM -i webmin-1.441-1.noarch.rpm
Once installed goto https://yourserver.com:10000 and login with a user like root.
After you’ve logged in you can just start clicking through the menus and see what you can do with this great piece of software.

During the show I explained how to create custom commands and deploy them to users with the webmin addon (http://webmin.com/usermin.html).

If you have any questions, feel free to post a comment or send me an email: matt [at] hak5 [dot] org

Comments
No Comments »
Categories
Hak5
Comments rss Comments rss
Trackback Trackback

Navigation

  • Hak5
  • Misc Thoughts
  • SAP
  • Work Related

Search

rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox