ComputerSecurityStudent (CSS) [Login] [Join Now]




|UNIX >> SSH >> Current Page |Views: 88134

(Tunnel HTTP Traffic Using Putty)

{ Putty, SSH, Firefox SOCK Proxy }


Section 0: Background Information
  1. Tunnel HTTP traffic using Putty and Firefox SOCKS Proxy
    • Sometimes companies block access to social networking and email websites.  Occasionally, there might be a good reason to access your personal email during work. 
    • Or may be you are at a coffee shop and want to check your bank account on an open network. 
    • In either case, you can create a SSH tunnel using Putty between your PC and external server outside the network you are currently on.  Then you can point your Firefox SOCKS Proxy to direct all traffic using the SSH Tunnel.

  2. Pre-Requisite Lab
    1. BackTrack: Lesson 1: Installing BackTrack 5 R1
    2. BackTrack: Lesson 8: Configuring the SSH Server
      • Do If Putty Cannot Connect to BackTrack

  3. Lab Notes
    • In this lab we will do the following:
      1. Create and Configure a Putty SSH Tunnel
      2. Configure Firefox SOCK Proxy
      3. Test if traffic is still blocked

  4. Legal Disclaimer
    • As a condition of your use of this Web site, you warrant to computersecuritystudent.com that you will not use this Web site for any purpose that is unlawful or that is prohibited by these terms, conditions, and notices.
    • In accordance with UCC § 2-316, this product is provided with "no warranties, either express or implied." The information contained is provided "as-is", with "no guarantee of merchantability."
    • In addition, this is a teaching website that does not condone malicious behavior of any kind.
    • Your are on notice, that continuing and/or using this lab outside your "own" test environment is considered malicious and is against the law.
    • © 2012 No content replication of any kind is allowed without express written permission.

 

Section 1: Power On PENTEST-WXP
  1. Edit Virtual Machine Settings
    • Instructions:
      1. Click on PENTEST-WXP
        • PENTEST-WXP is a Windows XP SP3 Virtual Machine.
      2. Click on Edit virtual machine

     

  2. Configure Network Adapter
    • Instructions:
      1. Select Network Adapter
      2. Click the radio button "Bridged: Connected directly to the physical network."
      3. Click the Okay button

     

  3. Start PENTEST-WXP
    • Instructions:
      1. Click on PENTEST-WXP
      2. Click on Play virtual machine

     

  4. Send Ctrl+Alt+Del
    • Instructions:
      1. Virtual Machine --> Send Ctrl+Alt+Del

     

  5. Logging into PENTEST-WXP.
    • Instructions:
      1. Username: administrator
      2. Password: Provide the Password

     

  6. Open a Command Prompt
    • Instructions:
      1. Start --> All Programs --> Accessories --> Command Prompt

     

  7. Obtain PENTEST-WXP's IP Address
    • Instructions:
      1. ipconfig
    • Note(FYI):
      • In my case, PENTEST-WXP's IP Address is 192.168.1.111.
      • Your IP Address will be different. 

 

Section 2: Power On BackTrack
  1. Start Up VMWare Player
    • Instructions:
      1. Click the Start Button
      2. Type Vmplayer in the search box
      3. Click on Vmplayer

     

  2. Open a Virtual Machine
    • Instructions:
      1. Click on Open a Virtual Machine
    •  

     

  3. Open the BackTrack5R1 VM
    • Instructions:
      1. Navigate to where the BackTrack5R1 VM is located
      2. Click on on the BackTrack5R1 VM
      3. Click on the Open Button
    •  

     

  4. Edit the BackTrack5R1 VM
    • Instructions:
      1. Select BackTrack5R1 VM
      2. Click Edit virtual machine settings
    •  

     

  5. Edit Virtual Machine Settings
    • Instructions:
      1. Click on Network Adapter
      2. Click on the Bridged Radio button
      3. Click on the OK Button
    •  

     

  6. Play the BackTrack5R1 VM
    • Instructions:
      1. Click on the BackTrack5R1 VM
      2. Click on Play virtual machine
    •  

     

  7. Login to BackTrack
    • Instructions:
      1. Login: root
      2. Password: toor or <whatever you changed it to>.
    •  

     

  8. Bring up the GNOME
    • Instructions:
      1. Type startx
    •  

     

Section 3: Bring up a console terminal
  1. Start up a terminal window
    • Instructions:
      1. Click on the Terminal Window
    •  

     

  2. Obtain the IP Address
    • Instructions:
      1. ifconfig -a
    • Note(FYI):
      • My IP address 192.168.1.111.
      • In your case, it will probably be different.

 

Section 4: Start the SSH Server
  1. Start Up Putty

 

Section 5: Create Putty Tunnel
  1. Start Up Putty
    • Instructions:
      1. Click on Putty

     

  2. Putty Basic Configuration
    • Note(FYI):
      1. Replace 192.168.1.111 with BackTrack's IP Address obtained from (Section 3, Step 2).
    • Instructions:
      1. Host Name: 192.168.1.111
      2. Port: 22
      3. Connection type: SSH
      4. Saved Sessions: backtrack
      5. Click the Save Button

     

  3. Tunnel Configuration
    • Instructions:
      1. Click on Connection --> SSH --> Tunnels
      2. Click on the Auto Radio Button
      3. Source port: 9999
      4. Click on the Dynamic Radio Button
      5. Click on the Add Button

     

  4. Enable Logging
    • Instructions:
      1. Click on Session --> Logging
      2. Session Logging: Click on the radio button "All session output"

     

  5. Open Session
    • Instructions:
      1. Click on Session
      2. Click the Save Button
      3. Click the Open Button

     

  6. Putty Security Alert
    • Instructions:
      1. Click the Yes Button

     

  7. Login to BackTrack
    • Instructions:
      1. Login: root
      2. Password: <Supply Password>

 

Section 5: Configure Firefox Proxy Settings
  1. Open Firefox
    • Instructions:
      1. Start --> All Programs --> Mozilla Firefox

     

  2. Open Options
    • Instructions:
      1. Tools --> Options

     

  3. Configure how Firefox connects to the Internet
    • Instructions:
      1. Click Advanced
      2. Click the Network Tab
      3. Click the Settings button

     

  4. Configure Firefox Proxy Settings
    • Instructions:
      1. Click the radio button "Manual proxy configuration:"
      2. SOCKS Host: "localhost"
      3. Port: "9999"
      4. Click on the radio button "SOCKS v5"
      5. No Proxy for: "localhost, 127.0.0.1"
      6. Click the OK button

     

  5. Close Out Options
    • Instructions:
      1. Click the OK button

 

Section 6: Test Proxy Tunnel
  1. Test Proxy Tunnel
    • Instructions:
      1. Place the blocked URL (facebook, youtube, etc) in the Address Textbox
        • I used http://www.cnn.com

 

Section 7: View Putty Log
  1. Open Event Log
    • Instructions:
      1. Click on the Putty Icon
      2. Click on Event Log

     

  2. View the Event Log
    • Instructions:
      1. Scroll through the event log from top to bottom.  You will see how Firefox forward its traffic through the SSH tunnel over port 9999.

 

Section 8: Bring up a console terminal
  1. Proof of Lab
    • Instructions:
      1. netstat -nao | find "192.168.1.108"
        • Replace 192.168.1.108 with BackTrack's IP Address obtain from (Section x, Step y).
      2. netstat -nao | find /c "9999"
      3. date
      4. echo "Your Name"
        • This should be your actual name.
        • e.g., echo "John Gray"
    • Proof of Lab Instructions:
      1. Do a PrtScn
      2. Paste into a word document
      3. Upload to Moodle

 

 



Help ComputerSecurityStudent
pay for continued research,
resources & bandwidth