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 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]

Syntax
Set the rinetd.conf file in the same directory (Windows) or /etc/rinetd.conf (Linux)

<bind address> <bind port> <connect address> <connect port>

<bind address> <bind port> <connect address> <connect port>

Breakdown
bind address / port : The “incoming” IP address, that which we wish to bind on and forwarding packets originally targeted to it onwards.
connect address / port : The “outgoing” IP address, that which we wish to send the packets onwards to.

Example
A server we have compromised is originally located on 10.1.1.223:80 and we wish to forward all the HTTP requests onto our malicious server at 10.1.1.250:8080.

rinetd.conf

#bindaddress #bindport #connectaddress #connectport
10.1.1.223 80 10.1.1.250 8080

#bindaddress #bindport #connectaddress #connectport 10.1.1.223 80 10.1.1.250 8080

Run Rinetd, all traffic being sent to the server on 10.1.1.223 will be routed to 10.1.1.250 port 8080. Likewise any responses from 10.1.1.250:8080 will be routed back through 10.1.1.223 to the original requester.

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

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