MAUSEZAHN(8)
π MAUSEZAHN(8) π
part of the netsniff-ng toolkit bestie! β¨
β¨ NAME β¨
mausezahn β a fast, versatile packet generator with a Cisco-cli π
πΈ SYNOPSIS πΈ
mausezahn { [options] "<arg-string> | <hex-string>" }
π¦ DESCRIPTION π¦
okay so mausezahn is a fast traffic generator that lets you send nearly every possible and impossible packet π. unlike trafgen(8), mausezahn's packet config is on a protocol-level instead of byte-level, and it also comes with a built-in Cisco-like command-line interface, which makes it suitable as a network traffic generator box in your network lab π.
next to network labs, it can also be used as a didactical tool and for security audits including penetration and DoS testing. as a traffic generator, mausezahn is also able to test IP multicast or VoIP networks. Packet rates close to the physical limit are reachable, depending on the hardware platform π₯.
mausezahn supports two modes, ''direct mode'' and a multi-threaded ''interactive mode'' β¨.
the ''direct mode'' allows you to create a packet directly on the command line and every packet parameter is specified in the argument list when calling mausezahn π .
the ''interactive mode'' is an advanced multi-threaded configuration mode with its own command line interface (CLI). this mode allows you to create an arbitrary number of packet types and streams in parallel, each with different parameters π.
the interactive mode utilizes a completely redesigned and more flexible protocol framework called ''mops'' (mausezahn's own packet system). the look and feel of the CLI is very close to the Cisco IOS^tm command line interface π«Ά.
you can start the interactive mode by executing mausezahn with the ''-x'' argument (an optional port number may follow, otherwise it is 25542). then use telnet(1) to connect to this mausezahn instance. if not otherwise specified, the default login and password combination is mz:mz and the enable password is: mops. this can be changed in /etc/netsniff-ng/mausezahn.conf π.
the direct mode supports two specification schemes: the ''raw-layer-2'' scheme, where every single byte to be sent can be specified, and ''higher-layer'' scheme, where packet builder interfaces are used (using the ''-t'' option) πΈ.
to use the ''raw-layer-2'' scheme, simply specify the desired frame as a hexadecimal sequence (the ''hex-string''), such as:
mausezahn eth0 "00:ab:cd:ef:00 00:00:00:00:00:01 08:00 ca:fe:ba:be"
in this example, whitespaces within the byte string are optional and separate the Ethernet fields (destination and source address, type field, and a short payload). the only additional options supported are ''-a'', ''-b'', ''-c'', and ''-p''. the frame length must be greater than or equal to 15 bytes π.
the ''higher-layer'' scheme is enabled using the ''-t <packet-type>'' option. this option activates a packet builder, and besides the ''packet-type'', an optional ''arg-string'' can be specified. the ''arg-string'' contains packet-specific parameters, such as TCP flags, port numbers, etc. (see example section) π.
β¨ OPTIONS β¨
mausezahn provides a built-in context-specific help. append the keyword ''help'' after the configuration options. the most important options are:
-x [<port>]β start mausezahn in interactive mode with a Cisco-like CLI. usetelnetto log into the local mausezahn instance. if no port has been specified, port25542is used by default π .-6β specify IPv6 mode (IPv4 is the default) β¨.-l <IP>β specify the IP address mausezahn should bind to when in interactive mode, default:0.0.0.0π.-R <PRIO>β set priority of sent packets. this configuresSO_PRIORITYat the socket through which the packets are sent. usual priority numbers are0..15, but the value can also be a class ID for purposes of Qdisc classification. in that case, a class ID such is1234:5678would be specified as0x12345678π₯.-vβ Verbose mode. capital-Vis even more verbose π.-Sβ Simulation mode, i.e. don't put anything on the wire. this is typically combined with the verbose mode π«Ά.-qβ Quiet mode where only warnings and errors are displayed π.-c <count>β send the packetcounttimes (default:1, infinite:0) π.-d <delay>β apply delay between transmissions. the delay value can be specified in usec (default, no additional unit needed), or in msec (e.g.100mor100msec), or in seconds (e.g.100sor100sec). note: mops also supports nanosecond delay resolution if you need it (see interactive mode) β.-rβ multiply the specified delay with a random value π².-p <length>β pad the raw frame to specified length using zero bytes. note that for raw layer 2 frames the specified length defines the whole frame length, while for higher layer packets the number of additional padding bytes are specified πΈ.-a <src-mac|keyword>β use specified source MAC address with hexadecimal notation such as00:00:aa:bb:cc:dd. by default the interface MAC address will be used. the keywords ''rand'' and ''own'' refer to a random MAC address (only unicast addresses are created) and the own address, respectively. you can also use the keywords mentioned below although broadcast-type source addresses are officially invalid π.-b <dst-mac|keyword>β use specified destination MAC address. by default, a broadcast is sent in raw layer 2 mode or to the destination hosts or gateway interface MAC address in normal (IP) mode. you can use the same keywords as mentioned above, as well as ''bc'' or ''bcast'', ''cisco'', and ''stp'' π .-A <src-ip|range|rand>β use specified source IP address, default is own interface address. optionally, the keyword ''rand'' can again be used for a random source IP address or a range can be specified, such as ''192.168.1.1-192.168.1.100'' or ''10.1.0.0/16''. also, a DNS name can be specified for which mausezahn tries to determine the corresponding IP address automatically π.-B <dst-ip|range>β use specified destination IP address (default is broadcast i.e.255.255.255.255). as with the source address (see above) you can also specify a range or a DNS name π.-t <packet-type [help] | help>β create the specified packet type using the built-in packet builder. currently, supported packet types are: ''arp'', ''bpdu'', ''ip'', ''udp'', ''tcp'', ''rtp'', and ''dns''. currently, there is also limited support for ''icmp''. type ''-t help'' to verify which packet builders your actual mausezahn version supports. also, for any particular packet type, for example ''tcp'' type ''mausezahn -t tcp help'' to receive a more in-depth context specific help π.-T <packet-type>β make this mausezahn instance the receiving station. currently, only ''rtp'' is an option here and provides precise jitter measurements. for this purpose, start another mausezahn instance on the sending station and the local receiving station will output jitter statistics. see ''mausezahn -T rtp help'' for a detailed help π«Ά.-Q <[CoS:]vlan> [, <[CoS:]vlan>, ...]β specify 802.1Q VLAN tag and optional Class of Service. an arbitrary number of VLAN tags can be specified (that is, you can simulate QinQ or even QinQinQinQ..). multiple tags must be separated via a comma or a period (e.g. "5:10,20,2:30"). VLAN tags are not supported for ARP and BPDU packets (in which case you could specify the whole frame in hexadecimal using the raw layer 2 interface of mausezahn) π.-M <label[:cos[:ttl]][bos]> [, <label...>]β specify a MPLS label or even a MPLS label stack. optionally, for each label the experimental bits (usually the Class of Service, CoS) and the Time To Live (TTL) can be specified. if you are really crazy you can set and unset the Bottom of Stack (BoS) bit for each label using the ''S'' (set) and ''s'' (unset) option. by default, the BoS is set automatically and correctly. any other setting will lead to invalid frames. enter ''-M help'' for detailed instructions and examples π₯.-P <ascii-payload>β specify a cleartext payload. alternatively, each packet type supports a hexadecimal specification of the payload (see for example ''-t udp help'') πΈ.-f <filename>β read the ASCII payload from the specified file π.-F <filename>β read the hexadecimal payload from the specified file. actually, this file must be also an ASCII text file, but must contain hexadecimal digits, e.g. "aa:bb:cc:0f:e6...". you can use also spaces as separation characters β¨.
π USAGE EXAMPLE π
okay so if you want the full comprehensive tea, go look at the two HOWTO sections coming up next, they're literally the whole vibe. but here's the snack-sized version, bestie π
π¦ mausezahn eth0 -c 0 -d 2s -t bpdu vlan=5 π¦
mausezahn eth0 -c 0 -d 2s -t bpdu vlan=5
sends BPDU frames for VLAN 5, the kind Cisco's PVST+ type of STP is out here using. and by default mausezahn just assumes you wanna be the root bridge β main character energy fr, it's not asking first π
π¦ mausezahn eth0 -c 128000 -a rand -p 64 π¦
mausezahn eth0 -c 128000 -a rand -p 64
this one does a CAM table overflow attack. yes that's as feral as it sounds π
π¦ mausezahn eth0 -c 0 -Q 5,100 -t tcp flags=syn,dp=1-1023 -p 20 -A rand -B 10.100.100.0/24 π¦
mausezahn eth0 -c 0 -Q 5,100 -t tcp flags=syn,dp=1-1023 -p 20 -A rand -B 10.100.100.0/24
a SYN flood attack against another VLAN using VLAN hopping β¨ heads up though: this only works if you're connected to the same VLAN that's configured as the native VLAN on the trunk. so we're assuming the victim VLAN is VLAN 100 and the native VLAN is VLAN 5. we're attacking every host in VLAN 100 that uses an IP prefix of 10.100.100.0/24, also trying out all ports between 1 and 1023, and using a random source IP address. go off π
π¦ mausezahn eth0 -c 0 -d 10msec -B 230.1.1.1 -t udp dp=32000,dscp=46 -P "Multicast test packet" π¦
mausezahn eth0 -c 0 -d 10msec -B 230.1.1.1 -t udp dp=32000,dscp=46 -P "Multicast test packet"
sends IP multicast packets to the multicast group 230.1.1.1 using a UDP header with destination port 32000, and sets the IP DSCP field to EF (46). one frame every 10 msec, so cute and punctual π
π¦ mausezahn eth0 -Q 6:420 -M 100,200,300:5 -A 172.30.0.0/16 -B target.anynetwork.foo -t udp sp=666,dp=1-65535 -p 1000 -c 10 π¦
mausezahn eth0 -Q 6:420 -M 100,200,300:5 -A 172.30.0.0/16 -B target.anynetwork.foo -t udp sp=666,dp=1-65535 -p 1000 -c 10
sends UDP packets to the destination host target.anynetwork.foo using all possible destination ports and sends every packet with all possible source addresses of the range 172.30.0.0/16. plus a source port of 666 and three MPLS labels β 100, 200, and 300 β with the outer one (300) carrying QoS field 5. sends the frame with a VLAN tag 420 and CoS 6, eventually pads with 1000 bytes, and repeats the whole thing 10 times. it's giving thorough πβ¨
π¦ mausezahn -t syslog sev=3 -P "Main reactor reached critical temperature." -A 192.168.33.42 -B 10.1.1.9 -c 6 -d 10s π¦
mausezahn -t syslog sev=3 -P "Main reactor reached critical temperature." -A 192.168.33.42 -B 10.1.1.9 -c 6 -d 10s
sends six forged syslog messages with severity 3 to a Syslog server at 10.1.1.9, uses a forged source IP address 192.168.33.42, and lets mausezahn decide which local interface to use (it's a big girl, she can pick π«Ά). inter-packet delay of 10 seconds.
π¦ mausezahn -t tcp flags=syn|urg|rst, sp=145, dp=145, win=0, s=0-4294967295, ds=1500, urg=666 -a bcast -b bcast -A bcast -B 10.1.1.6 -p 5 π¦
mausezahn -t tcp flags=syn|urg|rst, sp=145, dp=145, win=0, s=0-4294967295, ds=1500, urg=666 -a bcast -b bcast -A bcast -B 10.1.1.6 -p 5
sends an invalid TCP packet with only a 5 byte payload as layer-2 broadcast, and also uses the broadcast MAC address as the source address π³. target should be 10.1.1.6 but with a broadcast source address. source and destination port shall both be 145 and the window size 0. sets the TCP flags SYN, URG, and RST simultaneously and sweeps through the whole TCP sequence number space with an increment of 1500. finally sets the urgent pointer to 666, i.e. pointing to nowhere. chaos, but make it structured π
π CONFIGURATION FILE π
when mausezahn is running in interactive mode, it automatically looks for and reads a configuration file at /etc/netsniff-ng/mausezahn.conf for custom options β but only if the file is actually there, otherwise it just uses the defaults set at compile time. no file? no problem, she's got backup defaults π
πΈ Config file: /etc/netsniff-ng/mausezahn.conf πΈ
the config file contains lines of the form:
option = value
options supported in the configuration file are:
userβ username for authentication (default:mz)passwordβ password for authentication (default:mz)enableβ password to enter privilege mode (default:mops)portβ the listening port for the CLI (default:25542)listen-addrβ IP address to bind CLI to (default:0.0.0.0)management-onlyβ set management interface (no data traffic is allowed to pass through)cli-deviceβ interface to bind CLI to (default:all) not fully implementedautomopsβ path to automops file (contains XML data describing protocols) in development
πΈ Example: πΈ
$ cat /etc/netsniff-ng/mausezahn.conf
user = mzadmin
password = mzpasswd
enable = privilege-mode-passwd
port = 65000
listen-addr = 127.0.0.1
π¦ INTERACTIVE MODE HOWTO π¦
π Telnet: π
to use interactive mode you gotta start mausezahn as a server first:
# mausezahn -x
now you can telnet(1) to that server using the default port number 25542, but an arbitrary port number can also be specified:
# mausezahn -x 99
mausezahn accepts incoming telnet connections on port 99.
mz: Problems opening config file. Will use defaults
either from another terminal or from another host, try to telnet to the mausezahn server:
caprica$ telnet galactica 99
Trying 192.168.0.4...
Connected to galactica.
Escape character is '^]'.
mausezahn <version>
Username: mz
Password: mz
mz> enable
Password: mops
mz#
highly recommend configuring your own login credentials in /etc/netsniff-ng/mausezahn.conf (see the configuration file section) β don't be out here using the defaults, bestie, that's not the move π
π Basics: π
so you've reached the mausezahn prompt, slay. let's try some common commands. you can use the '?' character at any time for context-specific help β¨
ngl, Cisco-like short form of commands are accepted in interactive mode. for example, one can use "sh pac" instead of "show packet"; another common example is to use "config t" in place of "configure terminal". for readability though, this manual will keep going with the full commands.
first try out the show command:
mz# show ?
mausezahn maintains its own ARP table and observes anomalies. there's an entry for every physical interface (however this host has only one):
mz# show arp
Intf Index IP address MAC address last Ch UCast BCast Info
----------------------------------------------------------------------------------
eth0 [1] D 192.168.0.1 00:09:5b:9a:15:84 23:44:41 1 1 0 0000
the column Ch tells us that the announced MAC address has only changed one time (= when it was learned). the columns Ucast and BCast tell us how often this entry was announced via unicast or broadcast respectively.
let's check our interfaces:
mz# show interface
Available network interfaces:
real real used (fake) used (fake)
device IPv4 address MAC address IPv4 address MAC address
---------------------------------------------------------------------------------------
> eth0 192.168.0.4 00:30:05:76:2e:8d 192.168.0.4 00:30:05:76:2e:8d
lo 127.0.0.1 00:00:00:00:00:00 127.0.0.1 00:00:00:00:00:00
2 interfaces found.
Default interface is eth0.
π Defining packets: π
let's check the current packet list:
mz# show packet
Packet layer flags: E=Ethernet, S=SNAP, Q=802.1Q, M=MPLS,
I/i=IP/delivery_off, U=UDP, T=TCP
PktID PktName Layers Proto Size State Device Delay Count/CntX
1 sysARP_servic... E----- ARP 60 config lo 100 msec 1/0 (100%)
1 packets defined, 0 active.
so we notice there's already one system-defined packet process; it's been created and used only once (during startup) by mausezahn's ARP service. currently its state is config, which means the process is sleeping π΄ iconic, honestly
π General packet options: π
now let's create our own packet process and switch into the global configuration mode:
mz# configure terminal
mz(config)# packet
Allocated new packet PKT0002 at slot 2
mz(config-pkt-2)# ?
...
name Assign a unique name
description Assign a packet description text
bind Select the network interface
count Configure the packet count value
delay Configure the inter-packet delay
interval Configure a greater interval
type Specify packet type
mac Configure packet's MAC addresses
tag Configure tags
payload Configure a payload
port Configure packet's port numbers
end End packet configuration mode
ethernet Configure frame's Ethernet, 802.2, 802.3, or SNAP settings
ip Configure packet's IP settings
udp Configure packet's UDP header parameters
tcp Configure packet's TCP header parameters
like yes there are a lot of options here but normally you only need a few of them. when you configure lots of different packets though, you might wanna assign a reasonable name and description for them:
mz(config-pkt-2)# name Test
mz(config-pkt-2)# description This is just a test
you can, for example, change the default settings for the source and destination MAC or IP addresses using the mac and ip commands:
mz(config-pkt-2)# ip address destination 10.1.1.0 /24
mz(config-pkt-2)# ip address source random
in the example above, we configured a range of addresses (all hosts in the network 10.1.1.0 should be addressed). plus we spoof our source IP address. and of course, we can also add one or more VLAN and, or, MPLS tag(s):
mz(config-pkt-2)# tag ?
dot1q Configure 802.1Q (and 802.1P) parameters
mpls Configure MPLS label stack
mz(config-pkt-2)# tag dot ?
Configure 802.1Q tags:
VLAN[:CoS] [VLAN[:CoS]] ... The leftmost tag is the outer tag in the frame
remove <tag-nr> | all Remove one or more tags (<tag-nr> starts with 1),
by default the first (=leftmost,outer) tag is removed,
keyword 'all' can be used instead of tag numbers.
cfi | nocfi [<tag-nr>] Set or unset the CFI-bit in any tag (by default
assuming the first tag).
mz(config-pkt-2)# tag dot 1:7 200:5
π Configure count and delay: π
mz(config-pkt-2)# count 1000
mz(config-pkt-2)# delay ?
delay <value> [hour | min | sec | msec | usec | nsec]
specify the inter-packet delay in hours, minutes, seconds, milliseconds, microseconds or nanoseconds. the default unit is milliseconds (i.e. when no unit is given).
mz(config-pkt-2)# delay 1 msec
Inter-packet delay set to 0 sec and 1000000 nsec
mz(config-pkt-2)#
π Configuring protocol types: π
mausezahn's interactive mode supports a growing list of protocols and only relies on the MOPS architecture (and not on libnet as is the case with the legacy direct mode):
Okay bestie, so you just typed type and now the CLI is asking you <em>which</em> packet type you want. The lineup is:
arpbpduigmpiplldptcpudp
Like, pick your fighter. Watch how it works:
mz(config-pkt-2)# type
Specify a packet type from the following list:
arp
bpdu
igmp
ip
lldp
tcp
udp
mz(config-pkt-2)# type tcp
mz(config-pkt-2-tcp)#
Not me dropping straight into a whole new sub-mode π
Because once you say tcp, you get your own little TCP config prompt with its own lil menu:
seqnrβ configure the TCP sequence numberacknrβ configure the TCP acknowledgement numberhlenβ configure the TCP header lengthreservedβ configure the TCP reserved fieldflagsβ configure a combination of TCP flags all at oncecwrβ set or unset the TCP CWR flageceβ set or unset the TCP ECE flagurgβ set or unset the TCP URG flagackβ set or unset the TCP ACK flagpshβ set or unset the TCP PSH flagrstβ set or unset the TCP RST flagsynβ set or unset the TCP SYN flagfinβ set or unset the TCP FIN flagwindowβ configure the TCP window sizechecksumβ configure the TCP checksumurgent-pointerβ configure the TCP urgent pointeroptionsβ configure TCP optionsendβ end TCP configuration mode
Slay, let's flip some flags:
mz(config-pkt-2-tcp)# flags syn fin rst
Current setting is: --------------------RST-SYN-FIN
mz(config-pkt-2-tcp)# end
mz(config-pkt-2)# payload ascii This is a dummy payload for my first
packet
mz(config-pkt-2)# end
See how the flag readout is literally just vibes with dashes? --------------------RST-SYN-FIN, iconic honestly.
Now let's spin up a second packet, because why have one when you can have two. Say we want an LLDP process:
mz(config)# packet
Allocated new packet PKT0003 at slot 3
mz(config-pkt-3)# type lldp
mz(config-pkt-3-lldp)# exit
mz(config)# exit
In that example we literally just rode with the default LLDP settings and didn't touch a single extra LLDP option or TLV. Lowkey minimal effort, highkey fine. Back at the top level of the CLI, let's see what we did:
mz# show packet
Packet layer flags: E=Ethernet, S=SNAP, Q=802.1Q, M=MPLS,
I/i=IP/delivery_off, U=UDP, T=TCP
PktID PktName Layers Proto Size State Device
Delay Count/CntX
1 sysARP_servic... E----- ARP 60 config lo
100 msec 1/0 (100%)
2 Test E-Q-IT 125 config eth0
1000 usec 1000/1000 (0%)
3 PKT0003 E----- LLDP 36 config eth0
30 sec 0/0 (0%)
3 packets defined, 0 active.
That Layers column? It's telling you which big protocols got stacked together. Like, packet-id 2 ("Test") is out here using Ethernet (E), IP (I), and TCP (T), and on top of all that an 802.1Q tag (Q) got inserted. Multitasking queen.
Now let's actually start one of these packet processes:
mz# start slot 3
Activate [3]
mz# show packet
Packet layer flags: E=Ethernet, S=SNAP, Q=802.1Q, M=MPLS,
I/i=IP/delivery_off, U=UDP, T=TCP
PktID PktName Layers Proto Size State Device
Delay Count/CntX
1 sysARP_servic... E----- ARP 60 config lo
100 msec 1/0 (100%)
2 Test E-Q-IT 125 config eth0
1000 usec 1000/1000 (0%)
3 PKT0003 E----- LLDP 36 config eth0
30 sec 0/1 (0%)
3 packets defined, 1 active.
Look at that last line, 3 packets defined, 1 active. β we did that. β¨
Let's get a closer look at one specific packet process, because the details are giving main character energy:
mz# show packet 2
Packet [2] Test
Description: This is just a test
State: config, Count=1000, delay=1000 usec (0 s 1000000 nsec),
interval= (undefined)
Headers:
Ethernet: 00-30-05-76-2e-8d => ff-ff-ff-ff-ff-ff [0800 after 802.1Q
tag]
Auto-delivery is ON (that is, the actual MAC is adapted upon
transmission)
802.1Q: 0 tag(s); (VLAN:CoS)
IP: SA=192.168.0.4 (not random) (no range)
DA=255.255.255.255 (no range)
ToS=0x00 proto=17 TTL=255 ID=0 offset=0 flags: -|-|-
len=49664(correct) checksum=0x2e8d(correct)
TCP: 83 bytes segment size (including TCP header)
SP=0 (norange) (not random), DP=0 (norange) (not random)
SQNR=3405691582 (start 0, stop 4294967295, delta 0) -- ACKNR=0
(invalid)
Flags: ------------------------SYN----, reserved field is 00,
urgent pointer= 0
Announced window size= 100
Offset= 0 (times 32 bit; value is valid), checksum= ffff (valid)
(No TCP options attached) - 0 bytes defined
Payload size: 43 bytes
Frame size: 125 bytes
1 ff:ff:ff:ff:ff:ff:00:30 05:76:2e:8d:81:00:e0:01
81:00:a0:c8:08:00:45:00 00:67:00:00:00:00:ff:06
33 fa:e4:c0:a8:00:04:ff:ff ff:ff:00:00:00:00:ca:fe
ba:be:00:00:00:00:a0:07 00:64:f7:ab:00:00:02:04
65 05:ac:04:02:08:0a:19:35 90:c3:00:00:00:00:01:03
03:05:54:68:69:73:20:69 73:20:61:20:64:75:6d:6d
97 79:20:70:61:79:6c:6f:61 64:20:66:6f:72:20:6d:79
20:66:69:72:73:74:20:70 61:63:6b:65:74
mz#
Not the hex dump showing off π That's the whole frame, byte by byte, no secrets between us.
Wanna stop one or more packet processes? Use the stop command. And the "emergency stop" β the big red button, the stop all β goes like this:
mz# stop all
Stopping
[3] PKT0003
Stopped 1 transmission processe(s)
fr fr, stop all is the nuclear option. Use it when you need everything to just stop.
Now, the launch command is your shortcut for the packet processes you use all the time. Say you want to act like a STP-capable bridge β you'd start a BPDU process with the typical parameters:
mz# launch bpdu
Allocated new packet sysBPDU at slot 5
mz# show packet
Packet layer flags: E=Ethernet, S=SNAP, Q=802.1Q, M=MPLS,
I/i=IP/delivery_off, U=UDP, T=TCP
PktID PktName Layers Proto Size State Device
Delay Count/CntX
1 sysARP_servic... E----- ARP 60 config lo
100 msec 1/0 (100%)
2 Test E-Q-IT 125 config eth0
1000 usec 1000/1000 (0%)
3 PKT0003 E----- LLDP 36 config eth0
30 sec 0/12 (0%)
4 PKT0004 E---I- IGMP 46 config eth0
100 msec 0/0 (0%)
5 sysBPDU ES---- BPDU 29 active eth0
2 sec 0/1 (0%)
5 packets defined, 1 active.
So now a Configuration BPDU gets sent every 2 seconds, claiming to be the root bridge β and usually confusing the LAN π Note that only packet 5 (the last row, bestie) is active and therefore actually sending packets, while every other packet is sitting in state config β meaning they've been configured but they are, at this moment, doing absolutely nothing. Sleeping beauties.
Configuring a greater interval: β°
Sometimes you wanna send a burst of packets at a greater interval. Same energy, just spaced out:
mz(config)# packet 2
Modify packet parameters for packet Test [2]
mz(config-pkt-2)# interval
Configure a greater packet interval in days, hours, minutes, or
seconds
Arguments: <value> <days | hours | minutes | seconds>
Use a zero value to disable an interval.
mz(config-pkt-2)# interval 1 hour
mz(config-pkt-2)# count 10
mz(config-pkt-2)# delay 15 usec
Inter-packet delay set to 0 sec and 15000 nsec
So now this packet is sent ten times with an inter-packet delay of 15 microseconds, and the whole lil routine repeats every hour. Clockwork queen. π
When you peek at the packet list, an interval shows up as an extra flag: i when it's inactive, or I when it's active:
mz# show packet
Packet layer flags: E=Ethernet, S=SNAP, Q=802.1Q, M=MPLS,
I/i=IP/delivery_off, U=UDP, T=TCP
PktID PktName Layers Proto Size State Device
Delay Count/CntX
1 sysARP_servic... E----- ARP 60 config lo
100 msec 1/0 (100%)
2 Test E-Q-IT 125 config-i eth0
15 usec 10/10 (0%)
3 PKT0003 E----- LLDP 36 config eth0
30 sec 0/12 (0%)
4 PKT0004 E---I- IGMP 46 config eth0
100 msec 0/0 (0%)
5 sysBPDU ES---- BPDU 29 active eth0
2 sec 0/251 (0%)
5 packets defined, 1 active.
mz# start slot 2
Activate [2]
mz# show packet
Packet layer flags: E=Ethernet, S=SNAP, Q=802.1Q, M=MPLS,
I/i=IP/delivery_off, U=UDP, T=TCP
PktID PktName Layers Proto Size State Device
Delay Count/CntX
1 sysARP_servic... E----- ARP 60 config lo
100 msec 1/0 (100%)
2 Test E-Q-IT 125 config+I eth0
15 usec 10/0 (100%)
3 PKT0003 E----- LLDP 36 config eth0
30 sec 0/12 (0%)
4 PKT0004 E---I- IGMP 46 config eth0
100 msec 0/0 (0%)
5 sysBPDU ES---- BPDU 29 active eth0
2 sec 0/256 (0%)
5 packets defined, 1 active.
Note that flag I means an interval has been specified for packet 2. The process isn't active right this second (only packet 5 is active here) but it will become active at a regular interval. Periodt. And if you wanna verify the actual interval, just look at the packet details with the show packet 2 command.
Load prepared configurations: π
You can prep packet configurations using the exact same commands you'd type into the CLI, then load them in. So say we've got a file called test.mops that contains:
configure terminal
packet
name IGMP_TEST
desc This is only a demonstration how to load a file to mops
type igmp
Then we can add this packet config to our packet list with the load command:
mz# load test.mops
Read commands from test.mops...
Allocated new packet PKT0002 at slot 2
mz# show packet
Packet layer flags: E=Ethernet, S=SNAP, Q=802.1Q, M=MPLS,
I/i=IP/delivery_off, U=UDP, T=TCP
PktID PktName Layers Proto Size State Device
Delay Count/CntX
1 sysARP_servic... E----- ARP 60 config lo
100 msec 1/0 (100%)
2 IGMP_TEST E---I- IGMP 46 config eth0
100 msec 0/0 (0%)
2 packets defined, 0 active.
Bestie, the file src/examples/mausezahn/example_lldp.conf contains another example β a whole list of commands to create a bogus LLDP packet. You can load that config right from the mausezahn command line like this:
mz# load /home/hh/tmp/example_lldp.conf
...that is, if you copied the file into that path. Then when you enter show packet you'll see a brand new packet entry in the packet list. Use the start slot <nr> command to activate it.
You can stash your own packet creations in a file like this and just load them whenever you need them. Every single command inside such a configuration file gets executed on the command line interface exactly as if you had typed it in yourself β so be careful about the order and don't forget to use configure terminal as the first command. The order matters, okay? Don't skip the first line. π
You can even load other files from within a central config file. Nested files, inception-core. π
π DIRECT MODE HOWTO π
π’ How to specify hexadecimal digits:
okay so this is the part where mausezahn lets you go absolutely feral with raw bytes, and honestly? iconic. Many arguments allow direct byte input. Bytes are written as two hexadecimal digits. And when you've got multiple bytes, you separate them with spaces, colons, or dashes β whichever one you vibe with, bestie. All three of these byte strings are equivalent:
"aa:bb cc-dd-ee ff 01 02 03-04 05"
"aa bb cc dd ee ff:01:02:03:04 05"
To begin with, you may want to send an arbitrary fancy (possibly invalid) frame right through your network card:
mausezahn ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:08:00:ca:fe:ba:be
or equivalent but more readable:
mausezahn ff:ff:ff:ff:ff:ff-ff:ff:ff:ff:ff:ff-08:00-ca:fe:ba:be
π Basic operations:
All major command line options are listed when you execute mausezahn without arguments. For practical usage, keep the following special (not so widely known) options in mind:
-rβ Multiplies the specified delay with a random value.-p <length>β Pad the raw frame to specified length (using random bytes).-P <ASCII Payload>β Use the specified ASCII payload.-f <filename>β Read the ASCII payload from a file.-F <filename>β Read the hexadecimal payload from a file.-Sβ Simulation mode: DOES NOT put anything on the wire. This is typically combined with one of the verbose modes (-vorV).
Many options require a keyword or a number but the -t option is an exception since it requires both a packet type (such as ip, udp, dns, etc) and an argument string which is specific for that packet type. Here are some simple examples:
mausezahn -t help
mausezahn -t tcp help
mausezahn eth3 -t udp sp=69,dp=69,p=ca:fe:ba:be
Note: Don't forget that on the CLI the Linux shell (usually the Bash) interprets spaces as a delimiting character. That is, if you are specifying an argument that consists of multiple words with spaces in between, you MUST group these within quotes. π
For example, instead of
mausezahn eth0 -t udp sp=1,dp=80,p=00:11:22:33
you could either omit the spaces
mausezahn eth0 -t udp sp=1,dp=80,p=00:11:22:33
or, for greater safety, use quotes:
mausezahn eth0 -t udp "sp=1,dp=80,p=00:11:22:33"
In order to monitor what's going on, you can enable the verbose mode using the -v option. The opposite is the quiet mode (-q) which will keep mausezahn absolutely quiet (except for error messages and warnings).
Don't confuse the payload argument p=... with the padding option -p. The latter is used outside the quotes! π«Ά
π§ The automatic packet builder:
An important argument is -t which invokes a packet builder. Currently there are packet builders for ARP, BPDU, CDP, IP, partly ICMP, UDP, TCP, RTP, DNS, and SYSLOG. (Additionally you can insert a VLAN tag or a MPLS label stack but this works independently of the packet builder.)
You get context specific help for every packet builder using the help keyword, such as:
mausezahn -t bpdu help
mausezahn -t tcp help
For every packet you may specify an optional payload. This can be done either via hexadecimal notation using the payload (or short p) argument or directly as ASCII text using the -P option:
mausezahn eth0 -t ip -P "Hello World" # ASCII payload
mausezahn eth0 -t ip p=68:65:6c:6c:6f:20:77:6f:72:6c:64 # hex payload
mausezahn eth0 -t ip "proto=89, \
p=68:65:6c:6c:6f:20:77:6f:72:6c:64, \ # same with other
ttl=1" # IP arguments
Note: The raw link access mode only accepts hexadecimal payloads (because you specify everything in hexadecimal here.) π
β±οΈ Packet count and delay:
By default only one packet is sent. If you want to send more packets then use the count option -c <count>. When count is zero then mausezahn will send forever. By default, mausezahn sends at maximum speed (and this is really fast ;-)). If you don't want to overwhelm your network devices or have other reasons to send at a slower rate then you might want to specify a delay using the -d <delay> option.
If you only specify a numeric value it is interpreted in microsecond units. Alternatively, for easier use, you might specify units such as seconds, sec, milliseconds, or msec. (You can also abbreviate this with s or m.)
Note: Don't use spaces between the value and the unit!
Here are typical examples:
Send an infinite number of frames as fast as possible:
mausezahn -c 0 "aa bb cc dd ...."
Send 100,000 frames with a 50 msec interval:
mausezahn -c 100000 -d 50msec "aa bb cc dd ...."
Send an unlimited number of BPDU frames in a 2 second interval:
mausezahn -c 0 -d 2s -t bpdu conf
Note: mausezahn does not support fractional numbers. If you want to specify for example 2.5 seconds then express this in milliseconds (2500 msec).
π― Source and destination addresses:
As a mnemonic trick keep in mind that all packets run from "A" to "B". You can always specify source and destination MAC addresses using the -a and -b options, respectively. These options also allow keywords such as rand, own, bpdu, cisco, and others.
Similarly, you can specify source and destination IP addresses using the -A and -B options, respectively. These options also support FQDNs (i.e. domain names) and ranges such as 192.168.0.0/24 or 10.0.0.11-10.0.3.22. Additionally, the source address option supports the rand keyword (ideal for "attacks").
Note: When you use the packet builder for IP-based packets (e.g. UDP or TCP) then mausezahn automatically cares about correct MAC and IP addresses (i.e. it performs ARP, DHCP, and DNS for you). But when you specify at least a single link-layer address (or any other L2 option such as a VLAN tag or MPLS header) then ARP is disabled and you must care for the Ethernet destination address for yourself.
Layer-2:
β¨ Direct link access:
mausezahn allows you to send ANY chain of bytes directly through your Ethernet interface:
mausezahn eth0 "ff:ff:ff:ff:ff:ff ff:ff:ff:ff:ff:ff 00:00 ca:fe:ba:be"
This way you can craft every packet you want but you must do it by hand. π
Note: On Wi-Fi interfaces the header is much more complicated and automatically created by the Wi-Fi driver.
As an example to introduce some interesting options, lets continuously send frames at max speed with random source MAC address and broadcast destination address, additionally pad the frame to 1000 bytes:
mausezahn eth0 -c 0 -a rand -b bcast -p 1000 "08 00 aa bb cc dd"
The direct link access supports automatic padding using the -p <total frame length> option. This allows you to pad a raw L2 frame to the desired length. You must specify the total length, and the total frame length must have at least 15 bytes for technical reasons. Zero bytes are used for padding.
πΈ ARP:
mausezahn provides a simple interface to the ARP packet. You can specify the ARP method (request|reply) and up to four arguments: sendermac, targetmac, senderip, targetip, or short smac, tmac, sip, tip. By default, an ARP reply is sent with your own interface addresses as source MAC and IP address, and a broadcast destination MAC and IP address. Send a gratuitous ARP request (as used for duplicate IP address detection):
mausezahn eth0 -t arp
ARP cache poisoning:
mausezahn eth0 -t arp "reply, senderip=192.168.0.1, targetmac=00:00:0c:01:02:03, \
targetip=172.16.1.50"
where by default your interface MAC address will be used as sendermac, senderip denotes the spoofed IP address, targetmac and targetip identifies the receiver. By default, the Ethernet source address is your interface MAC and the destination address is the broadcast address. You can change this using the flags -a and -b.
π¦ BPDU:
mausezahn provides a simple interface to the 802.1D BPDU frame format (used to create the Spanning Tree in bridged networks). By default, standard IEEE 802.1D BPDUs are sent and it is assumed that your computer wants to become the root bridge (rid=bid). Optionally the 802.3 destination address can be a specified MAC address, broadcast, own MAC, or Cisco's PVST+ MAC address. The destination MAC can be specified using the -b command which, besides MAC addresses, accepts keywords such as bcast, own, pvst, or stp (default). PVST+ is supported as well. Simply specify the VLAN for which you want to send a BPDU:
mausezahn eth0 -t bpdu "vlan=123, rid=2000"
See mausezahn -t bpdu help for more details.
π CDP:
mausezahn can send Cisco Discovery Protocol (CDP) messages since this protocol has security relevance. Of course lots of dirty tricks are possible; for example arbitrary TLVs can be created (using the hex-payload argument for example p=00:0e:00:07:01:01:90) and if you want to stress the CDP database of some device, mausezahn can send each CDP message with another system-id using the change keyword:
mausezahn -t cdp change -c 0
Some routers and switches may run into deep problems ;-) See mausezahn -t cdp help for more details.
π 802.1Q VLAN Tags:
mausezahn allows simple VLAN tagging for IP (and other higher layer) packets. Simply use the option -Q <[CoS:]VLAN>, such as -Q 10 or -Q 3:921. By default CoS=0. For example send a TCP packet in VLAN 500 using CoS=7:
mausezahn eth0 -t tcp -Q 7:500 "dp=80, flags=rst, p=aa:aa:aa"
You can create as many VLAN tags as you want! This is interesting to create QinQ encapsulations or VLAN hopping: Send a UDP packet with VLAN tags 100 (outer) and 651 (inner):
mausezahn eth0 -t udp "dp=8888, sp=13442" -P "Mausezahn is great" -Q 100,651
Don't know if this is useful anywhere but at least it is possible:
mausezahn eth0 -t udp "dp=8888, sp=13442" -P "Mausezahn is great" \
-Q 6:5,7:732,5:331,5,6
Mix it with MPLS:
mausezahn eth0 -t udp "dp=8888, sp=13442" -P "Mausezahn is great" -Q 100,651 -M 314
When in raw Layer 2 mode you must create the VLAN tag completely by yourself. For example if you want to send a frame in VLAN 5 using CoS 0 simply specify 81:00 as type field and for the next two bytes the CoS (PCP), DEI (CFI), and VLAN ID values (all together known as TCI):
mausezahn eth0 -b bc -a rand "81:00 00:05 08:00 aa-aa-aa-aa-aa-aa-aa-aa-aa"
π·οΈ MPLS labels
okay so bestie, mausezahn can literally stack MPLS headers on your frame, one or more, no cap π
. You just use the option -M <label:CoS:TTL:BoS> β and literally only the label is mandatory, everything else is optional garnish β¨.
Here's the tea on the colon-separated fields:
- First number = the label. Mandatory. Periodt.
- Second number = the experimental bits (which is usually the CoS, iykyk).
- Third number = the TTL. Default is
255if you don't say anything. - The Bottom of Stack flag gets set automatically, because otherwise the frame would be invalid π. But if you're feeling chaotic you can set or unset it yourself with the
S(set) ands(unset) argument.
Heads up: the BoS must be the last argument in each MPLS header definition. Last. Final. The end. Don't put anything after it π
Some examples, because vibes are better with examples:
Use MPLS label 214:
mausezahn eth0 -M 214 -t tcp "dp=80" -P "HTTP..." -B myhost.com
Use three labels (the 214 is now the outer):
mausezahn eth0 -M 9999,51,214 -t tcp "dp=80" -P "HTTP..." -B myhost.com
Use two labels, one with CoS=5 and TTL=1, the other with CoS=7:
mausezahn eth0 -M 100:5:1,500:7 -t tcp "dp=80" -P "HTTP..." -B myhost.com
Unset the BoS flag (which will result in an invalid frame):
mausezahn eth0 -M 214:s -t tcp "dp=80" -P "HTTP..." -B myhost.com
Layer 3-7
IP, UDP, and TCP packets can be padded using the -p option π«Ά. Currently 0x42 is used as the padding byte β a.k.a. 'the answer', iconic πΈ. And no, you cannot pad DNS packets (it would be useless anyway, so don't even try π).
π IP
mausezahn lets you send literally any IP packet β malformed, correct, chaotic, whatever your heart desires π. Every single field in the IP header is yours to manipulate, main character energy.
The IP addresses go in via the -A and -B options, which mean source and destination address respectively. And you're not limited to boring single addresses either:
- You can specify an address range.
- You can specify a host name (FQDN).
- The source address can also be random β¨.
By default, the source address is your interface IP address, and the destination address is a broadcast address. That's the baseline, bestie.
Some examples:
ASCII payload:
mausezahn eth0 -t ip -A rand -B 192.168.1.0/24 -P "hello world"
Hexadecimal payload:
mausezahn eth0 -t ip -A 10.1.0.1-10.1.255.254 -B 255.255.255.255 p=ca:fe:ba:be
Will use correct source IP address:
mausezahn eth0 -t ip -B www.xyz.com
Now, the Type of Service (ToS) byte. Two ways to serve it:
- Specify it directly with two hexadecimal digits β which means you can also easily set the Explicit Congestion Notification (ECN) bits (LSB 1 and 2). π
- Or if you only want a common DSCP value (bits 3-8), use a decimal number in the range
0..63.
Packet sent with DSCP = Expedited Forwarding (EF):
mausezahn eth0 -t ip dscp=46,ttl=1,proto=1,p=08:00:5a:a2:de:ad:be:af
If you leave the checksum as zero (or unspecified), the correct checksum will be automatically computed for you, no stress π . But note β you can only use a wrong checksum when you also specify at least one L2 field manually. That's the rule, fr fr.
π¦ UDP
mausezahn supports super easy UDP datagram generation, slay β¨. Just specify the destination address (-B option) and optionally an arbitrary source address (-A option), and as arguments you may specify the port numbers using the dp (destination port) and sp (source port) arguments, plus a payload.
You can also easily specify a whole port range, which will result in sending multiple packets. Obsessed with the efficiency honestly.
Some examples:
Send test packets to the RTP port range:
mausezahn eth0 -B 192.168.1.1 -t udp "dp=16384-32767, \
p=A1:00:CC:00:00:AB:CD:EE:EE:DD:DD:00"
Send a DNS request as local broadcast (often a local router replies):
mausezahn eth0 -t udp dp=53,p=c5-2f-01-00-00-01-00-00-00-00-00-00-03-77-77-\
77-03-78-79-7a-03-63-6f-6d-00-00-01-00-01"
Additionally, you may specify the length and checksum using the len and sum arguments (they'll be set correctly by default, don't worry).
Note: several protocols have the same arguments, such aslen(length) andsum(checksum). So if you specified a UDP type packet (via-t udp) and want to modify the IP length, then use the alternate keywordsiplenandipsum. π
Also note that you must specify at least one L2 field, which tells mausezahn to build everything without the help of your kernel β because the kernel would not allow modifying the IP checksum and the IP length. The kernel is a hater, basically π.
π ICMP
Right now, mausezahn only supports the following ICMP methods: PING (echo request), Redirect (various types), and Unreachable (various types). Additional ICMP types will be supported in future π.
Currently, you would need to tailor them by yourself, e.g. using the IP packet builder (setting proto=1). Use mausezahn -t icmp help for help on the currently implemented options.
π₯ TCP
mausezahn lets you easily tailor any TCP packet, and it's giving total control π
. Similarly as with UDP, you can specify source and destination port (ranges) using the sp and dp arguments.
Then you can directly specify the desired flags using an "|" as delimiter if you want to specify multiple flags. Iconic.
For example, a SYN-Flood attack against host 1.1.1.1 using a random source IP address and periodically using all 1023 well-known ports could be created via:
mausezahn eth0 -A rand -B 1.1.1.1 -c 0 -t tcp "dp=1-1023, flags=syn" \
-P "Good morning! This is a SYN Flood Attack. \
We apologize for any inconvenience."
β οΈ Be careful with such SYN floods and only use them for firewall testing. Check your legal position! Do not be reckless, bestie, fr fr. π¨
Remember that a host with an open TCP session only accepts packets with correct socket information (addresses and ports) and a valid TCP sequence number (SQNR). So if you want to try a DoS attack by sending a RST-flood and you do NOT know the target's initial SQNR (which is normally the case), then you may want to sweep through a range of sequence numbers:
mausezahn eth0 -A legal.host.com -B target.host.com \
-t tcp "sp=80,dp=80,s=1-4294967295"
Fortunately, the SQNR must match the target host's acknowledgement number plus the announced window size. Since the typical window size is something between 40000 and 65535, you are MUCH quicker when using an increment via the ds argument:
mausezahn eth0 -A legal.host.com -B target.host.com \
-t tcp "sp=80, dp=80, s=1-4294967295, ds=40000"
In the latter case mausezahn will only send 107375 packets instead of 4294967295 (which results in a duration of approximately 1 second compared to 11 hours!). The glow-up is real ππ₯.
Of course, you can tailor any TCP packet you like. As with other L4 protocols, mausezahn builds a correct IP header, but you can additionally access every field in the IP packet (also in the Ethernet frame). Every field. All of them. Periodt.
πΈ DNS
mausezahn supports UDP-based DNS requests or responses π¦. Typically you may want to send a query or an answer. As usual, you can modify every flag in the header β full customisation, no limits β¨.
Here is an example of a simple query:
mausezahn eth0 -B mydns-server.com -t dns "q=www.ibm.com"
You can also create server-type messages:
mausezahn eth0 -A spoofed.dns-server.com -B target.host.com \
"q=www.topsecret.com, a=172.16.1.1"
The syntax according to the online help (-t dns help) is:
query|q = <name>[:<type>] ............. where type is per default "A"
(and class is always "IN")
answer|a = [<type>:<ttl>:]<rdata> ...... ttl is per default 0.
= [<type>:<ttl>:]<rdata>/[<type>:<ttl>:]<rdata>/...
Note: If you only use thequeryoption, then a query is sent. If you additionally add ananswer, then an answer is sent. That's the whole vibe check. π
Examples:
q = www.xyz.com
q = www.xyz.com, a=192.168.1.10
q = www.xyz.com, a=A:3600:192.168.1.10
q = www.xyz.com, a=CNAME:3600:abc.com/A:3600:192.168.1.10
Please try out mausezahn -t dns help to see the many other optional command line options, bestie π.
π§ RTP and VoIP path measurements
mausezahn can send arbitrary Real Time Protocol (RTP) packets π¦. By default, a classical G.711 codec packet of 20 ms segment size and 160 bytes is assumed.
You can measure jitter, packet loss, and reordering along a path between two hosts running mausezahn. The jitter measurement is either done following the variance low-pass filtered estimation specified in RFC 3550, or using an alternative "real-time" method which is even more precise (the RFC-method is used by default). Two options, both valid, choose your fighter π
.
For example, on Host1 you start a transmission process:
mausezahn -t rtp -B 192.168.1.19
And on Host2 (192.168.1.19) a receiving process which performs the measurement:
mausezahn -T rtp
Note that the option flag with the capital"T"means that it is a server RTP process, waiting for incoming RTP packets from anymausezahnsource. Capital T = server mode, don't forget it, iykyk π₯
In case you want to restrict the measurement to a specific source, or you want to perform a bidirectional measurement, you must specify a stream identifier. Here is an example for bidirectional measurements which logs the running jitter average in a file:
Host1# mausezahn -t rtp id=11:11:11:11 -B 192.168.2.2 &
Host1# mausezahn -T rtp id=22:22:22:22 "log, path=/tmp/mz/"
Host2# mausezahn -t rtp id=22:22:22:22 -B 192.168.1.1 &
Host2# mausezahn -T rtp id=11:11:11:11 "log, path=/tmp/mz/"
In any case the measurements are printed continuously onto the screen; by default it looks like this:
0.00 0.19 0.38 0.57
|-------------------------|-------------------------|-------------------------|
#########
0.07 msec
####################
0.14 msec
##
0.02 msec
###
0.02 msec
#########
0.07 msec
####
0.03 msec
#########
0.07 msec
#############
0.10 msec
##
0.02 msec
###########################################
0.31 msec
#########
0.07 msec
##############################################
0.33 msec
###############
0.11 msec
##########
0.07 msec
###############
0.11 msec
##########################################################
0.42 msec
#####
0.04 msec
More information is shown using the txt keyword:
mausezahn -T rtp txt
Got 100 packets from host 192.168.0.3: 0 lost (0 absolute lost), 1 out of order
Jitter_RFC (low pass filtered) = 30 usec
Samples jitter (min/avg/max) = 1/186/2527 usec
Delta-RX (min/avg/max) = 2010/20167/24805 usec
Got 100 packets from host 192.168.0.3: 0 lost (0 absolute lost), 1 out of order
Jitter_RFC (low pass filtered) = 17 usec
Samples jitter (min/avg/max) = 1/53/192 usec
Delta-RX (min/avg/max) = 20001/20376/20574 usec
Got 100 packets from host 192.168.0.3: 0 lost (0 absolute lost), 1 out of order
Jitter_RFC (low pass filtered) = 120 usec
Samples jitter (min/avg/max) = 0/91/1683 usec
Delta-RX (min/avg/max) = 18673/20378/24822 usec
See mausezahn -t rtp help and mz -T rtp help for more details π.
π -- Syslog:
okay so the traditional Syslog protocol is literally everywhere β it's widely used even in professional networks β and it's sometimes vulnerable π. like, for example, you might insert forged Syslog messages by spoofing your source address (e.g. impersonate the address of a legit network device):
mausezahn -t syslog sev=3 -P "You have been mausezahned." -A 10.1.1.109 -B 192.168.7.7
and just like that, they've been mausezahned πβ¨ see mausezahn -t syslog help for more details.
π¨ NOTE π¨
bestie this is the part where we get serious for a sec π«Ά
when multiple ranges are specified, e.g. destination port ranges and destination address ranges, then all possible combinations of ports and addresses are used for packet generation β¨. furthermore, this can be mixed with other ranges e.g. a TCP sequence number range. note that combining ranges can lead to a very huge number of frames to be sent. as a rule of thumb you can assume that about 100,000 frames and more are sent in a fraction of one second, depending on your network interface. π
mausezahn has been designed as a fast traffic generator, so you might easily overwhelm a LAN segment with myriads of packets π. and because mausezahn could also support security audits it is possible to create malicious or invalid packets, SYN floods, port and address sweeps, DNS and ARP poisoning, etc. π₯
therefore, don't use this tool when you are not aware of the possible consequences or have only a little knowledge about networks and data communication. if you abuse mausezahn for 'unallowed' attacks and get caught, or damage something of your own, then this is completely your fault. so the safest solution is to try it out in a lab environment π§ͺ.
also have a look at the netsniff-ng(8) note section on how you can properly setup and tune your system πΈ
βοΈ LEGAL βοΈ
mausezahn is licensed under the GNU GPL version 2.0. periodt π
π HISTORY π
mausezahn was originally written by Herbert Haas. according to his website [1], he unfortunately passed away in 2011, thus leaving this tool unmaintained π. it has been adopted and integrated into the netsniff-ng toolkit and is further being maintained and developed from there π«Ά. the maintainers are Tobias Klauser <tklauser@distanz.ch> and Daniel Borkmann <dborkma@tik.ee.ethz.ch> π
π SEE ALSO π
go read these next, iykyk π
βοΈ AUTHOR βοΈ
Manpage was written by Herbert Haas and modified by Daniel Borkmann. iconic behavior fr fr π
π COLOPHON π
this page is part of the Linux netsniff-ng toolkit project π. a description of the project, and information about reporting bugs, can be found at http://netsniff-ng.org/. go check it out bestie π¦
and that's a wrap on MAUSEZAHN(8) π this whole thing lives under Linux, dated 03 March 2013 β yes, that date, we're vintage and thriving π
β and it's filed as MAUSEZAHN(8), section 8, admin commands, main character energy only πβ¨ byeeeee π«Ά
π¦ where this page comes from
- arch rolling: netsniff-ng 0.6.9-2 Β· GPL-2.0-only
- debian bookworm: netsniff-ng 0.6.8-3 Β· GPL-2.0-only
- debian trixie: netsniff-ng 0.6.9-1 Β· GPL-2.0-only
- epel 10: netsniff-ng 0.6.9-2.el10_1 Β· GPL-2.0-only
- epel 9: netsniff-ng 0.6.8-11.el9 Β· GPLv2
- fedora 43: netsniff-ng 0.6.9-4.fc43 Β· GPL-2.0-only
- fedora 44: netsniff-ng 0.6.9-5.fc44 Β· GPL-2.0-only
- nixos 26.05: netsniff-ng 0.6.9
- nixpkgs unstable: netsniff-ng 0.6.9
- ubuntu jammy: netsniff-ng 0.6.8-2build1 Β· GPL-2.0-only
- ubuntu noble: netsniff-ng 0.6.8-3build2 Β· GPL-2.0-only
- ubuntu questing: netsniff-ng 0.6.9-1
- ubuntu resolute: netsniff-ng 0.6.9-2 Β· GPL-2.0-only
- ubuntu stonking: netsniff-ng 0.6.9-2build1 Β· GPL-2.0-only
- Copyright 2013 Herbert Haas, modified by Daniel Borkmann
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms