Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python3 support + rename of mutiny module #6

Open
wants to merge 37 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
7b3ca5c
Readme updates are good, no?
Apr 3, 2018
d18172a
Fixed proxy_loop params for udp/stdin/stdout
Apr 4, 2018
f69200e
Lol, removed dumb signature idea for host conf
Apr 6, 2018
b07b2a6
Minor fixes for output sync
May 31, 2018
394a983
Perhaps fix up tables too
Jun 12, 2018
7dc505f
Fixed up --dont_kill hopefully, --expresp added
Jun 15, 2018
ec63c03
added expresp flag
Jun 15, 2018
d4897f3
Fixed minor output bug with --dont_kill, --outhook and fast timeout t…
Jun 16, 2018
b3dee1b
Minor hexdump fix and update to hook documentation
Jul 3, 2018
cce91e8
Timestamping added, courtesy of Claudio ^_^
Jul 4, 2018
7bee26b
removing redundant code
Jul 5, 2018
372497a
Added Websocket hooks for decoding. ALso changed self.userdata from a…
Jul 5, 2018
60b1380
Rough draft of api replaying via --dumpraw output.
Jul 6, 2018
4117a9a
Maybe the flag should be global.
Jul 6, 2018
681700e
And that's why I said rough draft
Jul 6, 2018
23bb00d
Minor improvements
Jul 9, 2018
8f2c9f5
Minor fix
Jul 9, 2018
706278a
Added commands to api_replayer: pasteraw,cmp(sorta shoddy)
Jul 10, 2018
392c4e3
Replayer template new cmd:del,copy,pasteraw,cmp
Jul 10, 2018
47387bb
Minor fix
Jul 10, 2018
9737374
Added server mode to replayer and also persistant socket mode
Jul 12, 2018
480184f
readline functionality added to replayer.
Jul 17, 2018
1d04927
pastehex and pastecarray added to replayer_template.py
Jul 20, 2018
86f0b78
pastecarray fix for missing bytes
Jul 20, 2018
f36a300
Added --tap option. Will now replicate post-recv traffic over a 127.0…
Jul 21, 2018
9bc8e63
Changed from spoofed l3 addrs to actual ones, since rawsockets are fu…
Jul 21, 2018
fed0f89
Added inbound/outbound hooks for lil_sshniffer to make things easier.…
Jul 26, 2018
eec3eb0
Added persistant storage parameter userdata={} to the hooks to pass d…
Jul 26, 2018
414a65c
Fix for issue #4
Aug 2, 2018
3164e08
Fix for finding replayer_template, update on help output
Aug 16, 2018
fc178d3
Fixed replayer_template cmp command
Aug 16, 2018
ee9ba3b
Fix for Ipv6+UDP recvfrom
Nov 15, 2018
e976b3c
Fixes for generate_certchain.sh
Oct 3, 2019
20ff9af
tfw no ones used a local ssl socket in years, lol
Oct 3, 2019
59518b6
minor fix for udp to tcp
Aug 12, 2020
f538ce0
python3 support
maxwschm Sep 30, 2022
9c1fd68
fixed mutiny import issue
theo-morales Jan 20, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 66 additions & 19 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,45 +18,92 @@ format that is suitable for fuzzing with the Mutiny Fuzzing Framework.
* Based off of the tcp proxy.py from Black Hat Python by Justin Seitz

```
[<_<] Decept proxy/sniffer [>_>]


usage: decept.py <local_host> <local_port> <remote_host> <remote_port> [OPTIONS]

optional arguments:
-h, --help show this help message and exit
--quiet Don't show hexdumps
--recv_first Receive stuff first?
--timeout TIMEOUT Timeout for outbound socket
--loglast LOGLAST Log the last packet (unimplimented)
--pcapdir PCAPDIR Directory to store pcaps (extensions required)
--pps Create a new pcap for each session
--snaplen SNAPLEN Length of packet truncation
--fuzzer FUZZFILE *.fuzzer output for mutiny (extensions required)
--dumpraw DUMPDIR Directory to dump raw packet files into
(fmt = %d-%s % (pkt_num,[inbound|outbound]))
--l_abstract Treat local socket as abstract namespace socket
--r_abstract Treat remote socket as abstract namespace socket


L4 options:
-l, --localEnd {ssl,udp,unix,tcp,unix_udp}
Local endpoint type
-r, --remoteEnd {ssl,udp,unix,tcp,unix_udp}
Remote endpoint type

L3 options:
--L3_proto PROTO L3 proxy, PROTO=>raw to access >= L3 (IPHDR_INCL=1)
otherwise, set Proto to OSPF/EIGRP/etc... and kernel
will craft the headers up till the protocol itself
--max-packet-len LEN Max amount of data per packet when sending data
--dont_kill For when you don't want the connection to die if
neither side sends packets for TIMEOUT seconds.
Use with --expect if you still need the session
to end though.
--expect RESPCOUNT Useful with --dont_kill. Wait for RESPCOUNT
responses from the remote server, and then kill
the connection. Good for fuzzing campaigns.

-l, {ssl,udp,tcp}|[L3 Proto] Local endpoint type
-r, {ssl,udp,tcp}|[L3 Proto] Remote endpoint type

--rbind_addr IPADDR IP address to use for remote side. Make sure that
you have the IP somewhere on an interface though.
--rbind_port PORT PORT to bind to for remote side.

SSL Options:
--lcert SSL_PEM_CERT Cert to use for accepting local SSL
(Optionally cert and key in one file)
--lkey SSL_PEM_KEY Private key for local cert
--rcert SSL_PEM_CERT Cert to use for connecting to remote SSL
(Optionally cert and key in one file)
--rkey SSL_PEM_KEY Private key for remote cert
--rverify HOSTNAME Verify remote side as host HOSTNAME before
connecting.

Hook Files:
Optional function definitions for processing data between inbound
and outbound endpoints. Can pass data between the hooks/proxy with
the userdata parameters. Look at `hooks` folder for some examples/
prebuilt useful things.

--hookfile <file> | Functions imported from file:
string outbound_hook(outbound,userdata=[]):
string inbound_hook(outbound,userdata=[]):

Tap Mode (--tap):
Decept will replicate any inbound/outbound traffic over localhost now
also, such that you can view traffic that has been decrypted or processed
by the inbound/outbound hooks in something more legit than the hexdump
function. (e.g. tcpdump/wireshark/tshark/etc)

Host Config File:
Optionally, instead of specifying a remote host, if you specify a valid
filename, you can multiplex HTTP/HTTPS connections to different URLs.
Please examine the example "hosts.conf" for more information.

------------------------------------------------------------------------

L2 usage: decept.py <local_int> <local_mac> <remote_int> <remote_mac>

L2 options:

--l2_filter MACADDR Ignore inbound traffic except from MACADDR
--l2_MTU MTU Set Maximum Transmision Unit for socket
--l2_forward Bridge the local interface and remote interface

--pcap PCAPDIR Directory to store pcaps
--pps Create a new pcap for each session
--snaplen SNAPLEN Length of packet truncation
--pcap_interface IFACE Specify which interface the packets will be
coming in on. "eth0" by default.

L4 Usage: decept.py 127.0.0.1 9999 10.0.0.1 8080
L3 Usage: decept.py 127.0.0.1 0 10.0.0.1 0 --L3_proto OSPF
L3 Usage: decept.py 127.0.0.1 0 10.0.0.1 0 -l icmp -r icmp
L2 Usage: decept.py lo 00:00:00:00:00:00 eth0 ff:aa:cc:ee:dd:00
Unix: decept.py localsocketname 0 remotesocketname 0
Abstract: decept.py \\x00localsocketname 0 \\x00remotesocketname 0

Arp Poisoning options:
--poison <config-file> Contains "mac1|mac2|ip1|ip2" to poison.
--poison_int <interface> Interface on which to poison (eth0 default)

```

# lil_sshniffer.py
Expand Down
Loading