This repository was archived by the owner on Jun 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 61
/
Copy pathproxenet.1
216 lines (187 loc) · 5.9 KB
/
proxenet.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
.TH PROXENET "1" "August 2016" "proxenet v0.4" "User Commands"
.SH NAME
proxenet \- manual page for proxenet
.SH DESCRIPTION
.I proxenet
is a multi-threaded proxy which allows you to manipulate HTTP requests
and responses using your favorite scripting language. No need to learn Java
(like for Burp), or Python (like for mitmproxy).
.I proxenet
supports many languages (see the section "Language Versions") and more can be easily
added. It can also be used for Man-In-The-Middle attack, to automate the
interception and manipulation on-the-fly of HTTP/HTTPS requests and responses.
.SH BASIC OPTIONS
.TP
\fB\-h\fR, \fB\-\-help\fR
Show help
.TP
\fB\-V\fR, \fB\-\-version\fR
Show version
.TP
\fB\-d\fR, \fB\-\-daemon\fR
Start as daemon
.TP
\fB\-v\fR, \fB\-\-verbose\fR
Increase verbosity (default: 0)
.TP
\fB\-n\fR, \fB\-\-no\-color\fR
Disable colored output
.TP
\fB\-l\fR, \fB\-\-logfile=\fR/path/to/logfile
Log actions in file (default stdout)
.TP
\fB\-x\fR, \fB\-\-plugins=\fR/path/to/plugins/dir
Specify plugins directory (default: '~/.proxenet/plugins')
.PP
.SH INTERCEPT OPTIONS
.TP
\fB\-I\fR, \fB\-\-intercept\-only\fR
Intercept only hostnames matching pattern (default mode)
.TP
\fB\-E\fR, \fB\-\-intercept\-except\fR
Intercept everything except hostnames matching pattern
.TP
\fB\-m\fR, \fB\-\-pattern\fR=\fI\,PATTERN\/\fR
Specify a hostname matching pattern (default: '*')
.TP
\fB\-N\fR, \fB\-\-no\-ssl\-intercept\fR
Do not intercept any SSL traffic
.TP
\fB\-i\fR, \fB\-\-ie\-compatibility\fR
Toggle old IE compatibility mode (default: on)
.PP
.SH NETWORK OPTIONS
.TP
\fB\-4\fR
IPv4 only (default)
.TP
\fB\-6\fR
IPv6 only (default: IPv4)
.TP
\fB\-t\fR, \fB\-\-nb\-threads\fR=\fI\,N\/\fR
Number of threads (default: 20)
.TP
\fB\-b\fR, \fB\-\-bind\fR=\fI\,bindaddr\/\fR
Bind local address (default: 'localhost')
.TP
\fB\-p\fR, \fB\-\-port\fR=\fI\,N\/\fR
Bind local port file (default: '8008')
.TP
\fB\-X\fR, \fB\-\-proxy\-host\fR=\fI\,proxyhost\/\fR
Forward to proxy
.TP
\fB\-P\fR \fB\-\-proxy\-port\fR=\fI\,proxyport\/\fR
Specify port for proxy (default: '8080')
.TP
\fB\-D\fR, \fB\-\-use\-socks\fR
The proxy to connect to is supports SOCKS4 (default: 'HTTP')
.PP
.SH SSL OPTIONS
.TP
\fB\-c\fR, \fB\-\-certfile=\fR/path/to/ssl.crt
Specify SSL cert to use (default: '~/.proxenet/keys/proxenet.crt')
.TP
\fB\-k\fR, \fB\-\-keyfile=\fR/path/to/ssl.key
Specify SSL private key file to use (default: '~/.proxenet/keys/proxenet.key')
.TP
\fB\-\-keyfile\-passphrase\fR=\fI\,MyPwd\/\fR
Specify the password for this SSL key (default: '')
.TP
\fB\-\-sslcli\-certfile=\fR/path/to/ssl.crt
Path to the SSL client certificate to use
.TP
\fB\-\-sslcli\-domain\fR=\fI\,my\/\fR.ssl.domain.com
Domain to use for invoking the client certificate (default: '*')
.TP
\fB\-\-sslcli\-keyfile=\fR/path/to/key.crt
Path to the SSL client certificate private key
.TP
\fB\-\-sslcli\-keyfile\-passphrase\fR=\fI\,MyPwd\/\fR
Specify the password for the SSL client certificate private key (default: '')
.PP
.SH CONFIGURATION
To start,
.I proxenet
requires to find :
.TP
- a valid plugin directory, which can be done easily by executing the command:
$ mkdir -p ~/.proxenet/plugins/autoload
.TP
- and a valid path for the internal Certificate Authority (CA). The script
.I proxenet-setup-ca.sh
(by default in /opt/proxenet/misc) will generate it for you.
$ mkdir -p ~/.proxenet/keys && cd ~/.proxenet/keys &&
/opt/proxenet/misc/proxenet-setup-ca.sh keys
.I proxenet
is now ready to be used.
.SH COMMAND INTERFACES
.I proxenet
can be controlled via a command line interface, or a web interface. Both tools
can be found in the misc/ directory (by default, /opt/proxenet/misc).
The command line tool will directly communicate with
.I proxenet
Unix socket automatically created when it starts.
$ /opt/proxenet/misc/proxenet-control-cli.py
[*] 2016/06/06 10:16:41: Connected
Welcome on proxenet control interface
Type `help` to list available commands
>>> help
Command list
info -> Command 'info':Display information about environment
quit -> Command 'quit':Make proxenet leave kindly
help -> Command 'help':Show this menu
plugin -> Command 'plugin':Get/Set info about plugin
>>> plugin load 1RemoveAcceptEncodingHeader.py
Plugin '1RemoveAcceptEncodingHeader.py' successfully added
.I proxenet
web interface tool will spawn a web server binding by default on
localhost:8009/tcp and allow you to control it directly from your web
browser. The web server is based on `bottle` Python package so make sure it is
installed.
.SH PLUGINS
.I proxenet
was purposely made to be extremely extensible, and as such, it is easy
to write plugins for it in your favorite language. You just have to implement
two functions called (by default)
.I proxenet_response_hook()
and
.I proxenet_request_hook()
These two functions have the following properties:
.TP
- Take 3 arguments:
.TP
.I request_id/response_id
type Integer which corresponds to the request/response identifier. This
parameter is unique for each request and allows linking a request to its
response(s) from the server (as a response can be delivered in different
chunks).
.PP
.TP
.I request/response
type String - the request/response itself. The format (depending of the
interpreter), is either a regular string or an array of bytes.
.PP
.TP
.I uri
type String - the full URI
.PP
- Return a String (or array of bytes)
.PP
To use, simply drop the new plugin into the default plugins directory (as
defined by CFG_DEFAULT_PLUGINS_PATH (by default ./proxenet-plugins), or by
specifying the command line option -x. .
You can then load the plugin via the web interface or the command client during runtime.
.IP
.B >>> plugin load 1MyNewPlugin.rb
.PP
.IP
Plugin '1MyNewPlugin.rb' successfully added!
.PP
.SH "SEE ALSO"
The full documentation for
.B proxenet
is maintained on the ReadTheDocs page, available at https://proxenet.readthedocs.org/en/latest/.
.SH AUTHOR
proxenet was written by hugsy <hugsy __AT__ blah __DOT__ cat>
.SH LICENSE
proxenet is released under license GPLv2.