Fixing a compilation issue, wherein two global vars, conf and chan, were defined...
[revinetd.git] / README
blob63c1385c727d60c2694fcdddfa4f4f9ce272b381
1 Revinetd version 1.0.1
3 Revinetd is the GNU Version of the TCP gender changer.
5 Portions Copyright (C) 2003-2008 Steven M. Gill
6 Portions Copyright (C) 2003-2004 Alexandre Carmel-Veilleux
7 Portions Copyright (C) 2020      Thomas P.
9 The getopt.c and getopt.h files included in this distributions are
10 borrowed from the GNU libc distributions and are included to
11 provide long arguments functionality to operating systems that
12 do not include it. They are GPL licensed under the same term as
13 this software and are copyrighten to The Free Software Foundation.
15 This program is free software; you can redistribute it and/or
16 modify it under the terms of the GNU General Public License
17 as published by the Free Software Foundation; either version 2
18 of the License, or (at your option) any later version.
20 This program is distributed in the hope that it will be useful,
21 but WITHOUT ANY WARRANTY; without even the implied warranty of
22 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23 GNU General Public License for more details.
25 You should have received a copy of the GNU General Public License
26 along with this program; if not, write to the Free Software
27 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, 
28 USA.
30 This program can be used to proxy information from one port to 
31 another using two modes:
33 - Server Mode (Listen-Listen)
34 - Relay Agent Mode (Connect-Connect)
36 The main reason for using this program is for situations when the 
37 established connection path is the opposite from the data flow.  Typically 
38 most firewalls are configured in a more insecure manner for outbound 
39 traffic then inbound.  If we want to connect to a service (e.g  NetBIOS) 
40 that is filtered by a firewall, we can utilize a Relay Agent Mode 
41 revinetd instance to connect to the target service and outbound through 
42 the firewall's more liberal filtering rules.  On the other side, a 
43 Server Mode revinetd instance will accept a connection from the 
44 client computer and the connect-connect mode instance.  The picture below 
45 shows the connection and data flow:
47 Data Flow: (Client initiated traffic such as NetBIOS or VNC)
49      (Outside / Internet)      Firewall          (Inside)
50                                   |
51 Client ---> Server Mode ----------|---------> Relay Agent Mode ---> Service
52                                   |
55 Connection Flow:
57      (Outside / Internet)      Firewall          (Inside)
58                                   |
59 Client ---> Server Mode <---------|---------- Relay Agent Mode ---> Service
60                                   |
62 As you can see the Relay Agent Mode instance initiates the connection back
63 to the Server Mode instance through the firewall.  Since most firewalls are
64 configured with a more liberal rule set on the inside, there are typically
65 more options to connect out with then connect in.  The trick is gaining
66 access to install the Relay Agent Mode instance on the inside.
68 You may say, "What's the point?" or "This sounds a lot like what a hacker 
69 will do!" The answer is yes, that's what a hacker could or would do.  
71 The idea is already out there as is stated in Compass Security's excellent 
72 paper entitled "TCP/IP Gender Changer" and can be located at:
74 http://www.csnc.ch/downloads/docs/techdocs/TCP-IP_GenderChanger_CSNC_V1.0.pdf
76 What we are doing here is providing the tool to penetration testers to 
77 show why it is just as important to secure a firewall from connectivity on 
78 both sides.  There are a lot of good pen testers out there who just don't 
79 have the time to write these programs and we are providing this to them.  
80 I do NOT, however, condone any use of this product for any malicous 
81 activity.  We are merely providing an easy-to-use connectivity tool to 
82 pen testers to help get the point accross.
84 Though I have no evidence, I am sure that there are most likely many 
85 hackers who whave used netcat or the like with some shell scripts to 
86 accomplish the same task. 
88 USAGE:
90 Server Mode
92 revinetd -s -c <address1:port1> -l <address2:port2> 
94 -l tells Server mode where the relay agent will connect and -c tells the
95 server where the client will connect.  Of course on  *nix  systems,
96 anything below 1024 needs root access.
98 Relay Agent Mode
100 revinetd -r -t <host1:port1> -b <host2:port2>
102 -t is the target to connect to (ultimate destination), and -b is the
103 server callback port (peer which has -l listening).  Specify host:port
104 format for both (e.g. localhost:1234 or 127.0.0.1:1234).
106 NOTE:  This has only been tested on the following configurations:
108 Linux 2.4,2.6
109 OpenBSD 2.9+
110 FreeBSD 4.4+
112 Cygwin with gcc 3.2.2 ** Do not connect to loopback... use the network 
113 adapter's address instead.
115 revinetd now compiles under solaris without monkeying around with the
116 makefile, but still needs testing!
118 Please feel free to send us your successes or any pathces need to get
119 revinetd working on your system.