NetSec

Ramblings of a NetSec addict

  • Ramblings
    • OSCP Review
    • OSCE Review
    • So you want to be a Hacker?
    • InfoSec Topics
  • Tutorials
    • Simple Buffer Overflows
    • Converting Metasploit Module to Stand Alone
  • Hacking Snippets
    • Basic Information
      • Spawning a TTY Shell
      • Finding Public Exploits
    • Metasploit
      • Creating Metasploit Payloads
    • Passwords
      • Cracking Network Passwords (Hydra)
      • Generating Wordlists
      • Identifying Hashes (Hash Identifier)
      • Cracking Hashes (oclHashcat)
      • Obtaining Windows Passwords
    • Privilege Escalation
      • Linux Privilege Escalation Scripts
    • Port Redirection
      • Port Redirection with Rinetd
      • Dynamic Port Forwarding (SSH)
      • Remote Port Forwarding (SSH)
      • Local Port Forwarding (SSH)
      • Port Forwarding with Metasploit
    • Tools
      • Netcat
  • OS Tips
    • Linux
      • Simple Linux Commands
    • Windows
      • Simple Windows Commands
    • Programs
      • Remote Desktop (rdesktop)
      • Fixing Metasploit Slow Search
      • Encoding / Decoding Base64
  • Programming
    • Python Snippets
      • Multi-Threaded Brute Forcer
      • Writing Shellcode to a File
    • Programs
  • Peach Pits
    • FTP
      • Fuzz Username / Password
      • Fuzz FTP Commands
  • Vulnerable VMs
    • Walkthroughs
      • pWnOS 2.0

Port Forwarding with Metasploit

Peleus

Once a meterpreter shell is obtained on a system a larger range of options is available to the Penetration Tester for accessing the system. In a hypothetical scenario the victim is running a vulnerable mail server on port 25, and we have a remote exploit we wish to use against it. Unfortunately for us it’s behind a firewall. After getting a meterpreter shell via a client side attack we want to somehow bypass the firewall and get access to port 25. Meterpreters portfwd can do this.

Tool
portfwd
[Read more…]

Filed Under: Port Redirection Tagged With: metasploit, port forwarding

Local Port Forwarding (SSH)

Peleus

Port forwarding can be one of the more confusing aspects of pivoting between machines and networks. Both remote and local SSH forwarding can be even more confusing in the sense it matters who is initiating the connection, and who the destination server is. I’ll run through local port forwarding here, and in a seperate page, cover remote forwarding.

To begin with we will outline the concept, then we will follow this up with an example.

[Read more…]

Filed Under: Port Redirection Tagged With: local, port forwarding, ssh

Remote Port Forwarding (SSH)

Peleus

Port forwarding can be one of the more confusing aspects of pivoting between machines and networks. Both remote and local SSH forwarding can be even more confusing in the sense it matters who is initiating the connection, and who the destination server is. I’ll run through remote port forwarding here, and in a seperate page, cover local forwarding.

To begin with we will outline the concept, then we will follow this up with an example.

[Read more…]

Filed Under: Port Redirection Tagged With: port forwarding, remote, ssh

Dynamic Port Forwarding (SSH)

Peleus

Dynamic Port Forwarding is the third major method of port redirection with SSH. Where as previously both local and remote port forwarding allowed interaction with a single port, dynamic allows a full range of TCP communication across a range of ports. The tool proxychains is also used to force any program you wish to use through the dynamic proxy.

Preparation
Firstly we have to ensure that proxychains is set up to appropriately tunnel the program through our port forward. Open /etc/proxychains.conf and look at the bottom line. You require a socks4 proxy on 127.0.0.1 followed by an unused port. Most likely you’ll have the default value of 9050 in there which is what tor uses. From this point “changing the port in proxychains” means going in and editing this port value. Personally I remove the # from quiet_mode to suppress the output but this is more of a user preference.

[Read more…]

Filed Under: Port Redirection Tagged With: dynamic, port forwarding, ssh

Port Redirection with Rinetd

Peleus

SSH is fantastic for port redirection in a lot of cases, but what if you want to set up a redirection of incoming and outgoing ports without the hassle of setting up SSH servers? Rinetd is a great program that will let you do this.

Tool
Rinetd – [Linux Download] [Windows Download]

[Read more…]

Filed Under: Port Redirection Tagged With: port forwarding, port redirect, rinetd

Copyright © 2022 · Genesis Sample on Genesis Framework · WordPress · Log in