Setup an SSH SOCKS proxy!

Refer: http://www.mattlestock.com/
Software goodie: plink.exe

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.

What you’ll need is:

  • 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 running
plink.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.

Virtual PC and Windows 2003 Server activation

Refer: www.tipandtrick.net

To fix the Shared Network (NAT) Internet no connection or not working issue, the resolution is to manually assign the IP address for the DNS Server for the guest operating system to 192.168.131.254, the virtual gateway IP address used by Virtual PC. To make the change (in guest operating system), open Network Connections folder (in Windows Vista, access via Network and Sharing Center), and right click Local Area Connection network icon to select its Properties. Then double click on Internet Protocl (TCP/IP) under General tab or Internet Protocol Version 4 (TCP/IPv4) under Networking (for Windows Vista) tab.

Windows 2003 IP Settings for Virtual PC
Windows 2003 IP Settings for Virtual PC

Windows shortcut keys

There are a number of keyboard shortcuts and combinations that you can make use of instead of your mouse or your taskbar options. This article will give you the list of the most common shortcuts used while using a Windows operating system.

Windows System

  • Windows Key: will open the Start menu
  • Windows Key+Break: will display the System Properties dialogue box
  • Windows Key+D: will minimize the windows to show the Desktop
  • Windows Key+E: will open Internet Explorer
  • Windows Key+F: will open the Search option for files and folders
  • Windows Key+F+CTRL: will open Search option for computer
  • Windows Key+F1: will display Help/Assistance option
  • Windows Key+L: will lock your Desktop
  • Windows Key+M: will minimize or restore all windows
  • Windows Key+R: will open the RUN option
  • Windows Key+TAB: will switch between open items
  • Windows Key+U: will open Utility Manager
  • ALT+ Hyphen: will display the Multiple Document Interface child window’s System menu
  • ALT+ ENTER: will view the properties for the selected object
  • ALT+ ESC: will cycle through the items in the order that they were opened
  • ALT+ F4: will close all the window that is open
  • ALT+ SPACEBAR: will display the System menu
  • ALT+TAB: switch from one open program to another on your taskbar.
  • F1: used to request help/assistance
  • SHIFT: If you press and hold down the SHIFT key while inserting a CD-ROM it will skip the automatic-run feature
  • SHIFT+DELETE: will delete the file permanently
  • CTRL+ESC: will open the Start Menu
  • CTRL+SHIFT+ESC: will open task manager non-full screen

In a General Folder and text programs

  • Ctrl + A: will select all items
  • Ctrl + B: will organize your Favorites in Internet Explorer
  • Ctrl + C: will copy the selected item
  • Ctrl + F: will open the Search options
  • Ctrl + H: will allow you to replace some text
  • Ctrl + N: will create a new folder
  • Ctrl + O: will open a new document
  • Ctrl + P: will print the selected document
  • Ctrl + S: will save the current document
  • Ctrl + V: will copy the selected item
  • Ctrl + W: will close the current window
  • Ctrl + X: will cut the current item
  • Ctrl + Y: will repeat the last action that has been cancelled
  • Ctrl + Z: will undo the last action

In a General Folder

  • F10: Opens Menu Bar options
  • CTRL+F4: list the address menu paths
  • SHIFT+F10: Opens right click shortcut menu
  • ALT+DOWN ARROW: will open a drop-down list box
  • ALT+SPACE: will list the window's System menu
  • ALT+Underlined Letter in Menu: Opens the menu

For a Selected Item a Folder

  • F2: used to rename the item
  • F3: Opens the Search option
  • F5: will refresh the current folder
  • F6: will move along the panes in Windows Explorer
  • CTRL+ X: Cut an item
  • CTRL+ C: Copy an item
  • CTRL+ V: Paste an item
  • SHIFT+DELETE: will delete this item permanently.
  • ALT+ENTER: will open the properties option for the selected item.
  • CTRL+ G: will open the “Go To” Folder tool (in Windows 95 Windows Explorer only)
  • CTRL+ A: will select all the items in the current window
  • BACKSPACE: will switch to the parent folder

For Microsoft Word

  • CTRL+ N: will promptly open a Word document
  • CTRL+ O: will open a previously saved Word document
  • CTRL+ W: will close the current window without exiting Word
  • CTRL+ S: will save the current document
  • CTRL+ P: will promptly print the current document
  • CTRL+ Z: will undo the last action
  • CTRL+ Y: will restore an undone action
  • CTRL+ X: will cut the selected text
  • CTRL+ C: will copy the selected text
  • CTRL+ V: will paste the selected text
  • CTRL+ A: will select the whole document
  • CTRL+ F: will search for a specific text in the current document
  • CTRL+ B: will bold the selected text
  • CTRL+ I: will put in italics the selected text
  • CTRL+ U: will underline the selected text

For Microsoft Excel

  • CTRL+ N: will promptly open an Excel document
  • CTRL+ O: will open a previously saved Excel document
  • CTRL+ W: will close the current window without exiting Excel
  • CTRL+ S: will save the current document
  • CTRL+ P: will promptly print the current document
  • CTRL+ Z: will undo the last action
  • CTRL+ Y: will restore an undone action
  • CTRL+ X: will cut the selected text
  • CTRL+ C: will copy the selected text
  • CTRL+ V: will paste the selected text
  • CTRL+ A: will select the whole document
  • CTRL+ F: will search for a specific text in the current document
  • CTRL+ B: will bold the selected text
  • CTRL+ I: will put in italics the selected text
  • CTRL+ U: will underline the selected text
  • F1: will prompt the Help option
  • F2: will edit the document
  • F3: will paste the name
  • F4: will repeat the last action
  • F5: will open the Go To option
  • F6: will switch to the next pane
  • F7: will launch the Spell Check option
  • F8: will allow the Extend Mode
  • F9: will recalculate all workbooks
  • F10: will activate the menu bar
  • F11: will open a new chart
  • F12: will save the document.

For Microsoft PowerPoint

  • F4: will repeat the last action
  • F5: will start a slide show
  • F6: will switch to the next pane in a clockwise way
  • CTRL+ EQUAL SIGN: will apply a subscript formatting
  • CTRL+ ADDITION SIGN: will apply a superscript formatting
  • CTRL+ BACKSPACE: will delete a word
  • CTRL+ F: will find a particular text
  • CTRL+ K: will insert a hyperlink
  • CTRL+ M: will insert a slide
  • CTRL+ I: will set the text into italics
  • CTRL+ D: will copy the current slide
  • CTRL+ O: will open a previously saved PowerPoint file
  • CTRL+ T: will open a Font dialogue
  • CTRL+ Y: will repeat last action
  • CTRL+ G: to view guides
  • SHIFT+ ALT+ LEFT ARROW: will promote a paragraph
  • SHIFT+ F3: will capitalize the text
  • SHIFT+ALT+ RIGHT ARROW: will demote a paragraph
  • SHIFT+F6: will switch to the previous pane in an anticlockwise way.

For Internet Explorer

  • F1: will display the Internet Explorer help
  • F11: will allow the full screen option
  • TAB KEY: will enable you to move through the items, address bar and links on your webpage
  • ALT+HOME: will go to your home page
  • ALT+LEFT ARROW: will go to the previous page
  • SHIFT+F10: will display a shortcut menu for the link
  • CTRL+TAB: will move forward between tabs
  • SHIFT+CTRL+TAB: will move back between frames
  • UP ARROW KEY: will scroll towards the beginning of the webpage
  • DOWN ARROW KEY: will scroll towards the end to the webpage
  • PAGE UP: will scroll by sections towards the beginning of the webpage
  • PAGE DOWN: will scroll by sections towards the end of the webpage
  • HOME: will move directly to the beginning of the webpage
  • END: will move directly to the end of the webpage
  • CTRL+F: will find some text on the page
  • F5: will refresh the current page
  • ESC: will stop loading the page
  • CTRL+ N: will open a new window
  • CTRL+ E: will open the Search option in the Explorer bar
  • CTRL+ I: will open the Favorites option in Explorer bar
  • CTRL+ H: will open the History option in Explorer bar