An open-source, high-performant traffic generator, designed to be as convenient and reliable as it is possible. It generates numerous UDP packets which lets you test your server against the abnormaly high activity.
Pulse · Stargazers · Releases · Contributing
Table of contents
- Going deeper
- Legal disclaimer
Linux-accelerated. Anevicon communicates with a Linux kernel by a few specific system calls to reduce the CPU load significantly. However, it makes the program platform-dependent.
Functional. I've tried to implement as many things to make a multi-functional tool and stay simple at the same time. Such features as multiple tests, verbosity levels, and even IP spoofing are supported.
Written in Rust. How you can see, all the logic is written completely in Rust, which means that it leverages bare-metal performance and high-level safety (no SIGSEGV, SIGILL, and other "funny" stuff).
- Platform-dependend. Like most of pentesting utilities, this project is developed for only Linux-based systems. If you are a Windows user, you probably need a virtual machine or another computer with Linux.
Building from crates.io
$ cargo install anevicon
Building from sources
$ git clone https://github.com/Gymmasssorla/anevicon.git $ cd anevicon $ cargo build --release
$ wget https://github.com/Gymmasssorla/anevicon/releases/download/vX.X.X/anevicon-x86_64-linux $ chmod a+x anevicon-x86_64-linux
||Allow sockets to send packets to a broadcast address specified using the
||Prints help information|
||Displays an interactive menu of network interfaces to use. If unset, a default one will be used|
||Prints version information|
||A format for displaying local date and time in log messages. Type
||Unsigned integer||None||Specifies the
||Repeatedly send a random-generated packet with a specified bytes length|
||A count of packets for sending. When this limit is reached, then the program will exit|
||A count of packets which the program will send using only one system call. After the operation completed, a test summary will have been printed|
||Socket address||None||A receiver of generated traffic, specified as an IP-address and a port number, separated by a colon.
This option can be specified several times to identically test multiple receivers in parallel mode.
||Filename||None||Interpret the specified file content as a single packet and repeatedly send it to each receiver|
||String||None||Interpret the specified UTF-8 encoded text message as a single packet and repeatedly send it to each receiver|
||A time interval between
||A timeout of sending every single packet. If a timeout is reached, then a packet will be sent later|
||A sender of generated traffic, specified as an IP-address and a port number, separated by a colon.
A sender may not be a local interface's address, it can be absolutely any valid IPv4/IPv6 address. It can be used to send spoofed packets.
||A whole test duration. When this limit is reached, then the program will exit.
Exit might occur a few seconds later because of long
||From 0 to 5||
||Enable one of the possible verbosity levels. The zero level doesn't print anything, and the last level prints everything.
Note that specifying the 4 and 5 verbosity levels might decrease performance, do it only for debugging.
||A waiting time span before a test execution used to prevent a launch of an erroneous (unwanted) test|
First of all, please remember that Anevicon uses raw sockets that require root permissions, so in order to run Anevicon you must already have them. Just type the commands below before running Anevicon:
$ sudo -s $ PATH+=":/home/gymmasssorla/.cargo/bin"
All you need is to provide the testing server address, which consists of an IP address and a port number, separated by the colon character. By default, all sending sockets will have your local address:
# Test example.com:80 using your local address $ anevicon --receiver=184.108.40.206:80
In some situations, you don't need to transmit the maximum possible amount of packets, you might want to decrease the intensity of packets sending. To do so, there is one more straightforward option called
# Test example.com:80 waiting for 270 microseconds after each sendmmsg syscall $ anevicon --receiver=220.127.116.11:80 --send-periodicity=270us
Anevicon also has the functionality to test multiple receivers in parallel mode, thereby distributing the load on your processor cores. To do so, just specify the
--receiver option several times.
# Test example.com:80 and google.com:13 in parallel $ anevicon --receiver=18.104.22.168:80 --receiver=22.214.171.124:13
There is also an ability to bind all future sockets to a specific network interface. Consider the
--select-if flag, which displays an interactive menu of network interfaces in a command line:
# Test example.com with a custom network interface using --select-if $ anevicon --receiver=126.96.36.199:80 --select-if
Note that the command above might not work on your system due to the security reasons. To make your test deterministic, there are two end conditions called
--packets-count (a test duration and a packets count, respectively):
# Test example.com:80 with the two limit options $ anevicon --receiver=188.8.131.52:80 --test-duration=3min --packets-count=7000
By default, Anevicon will generate a random packet with a default size (32768). In some kinds of UDP-based tests, packet content makes sense, and this is how you can specify it using the
# Test example.com:80 with the custom file 'message.txt' $ anevicon --receiver=184.108.40.206:80 --send-file="message.txt" # Test example.com:80 with the custom text message $ anevicon --receiver=220.127.116.11:80 --send-message="How do you do?"
Also, you are able to specify one or more random packets with your own lengths using the
--random-packet option. This example specifies two random-generated packets with the sizes 1454 and 29400:
# Test example.com:80 with two random packets $ anevicon --receiver=18.104.22.168:80 --random-packet=1454 --random-packet=29400
Consider specifying a custom verbosity level from 0 to 5 (inclusively), which is done by the
--verbosity option. There is also the
--date-time-format option which tells Anevicon to use your custom date-time format.
# Use a custom date-time format and the last verbosity level $ anevicon --receiver=22.214.171.124:80 --date-time-format="%F" --verbosity=5
Different verbosity levels print different logging types. As you can see in the table below, the zero verbosity level prints nothing, and the last one prints everything. The levels in the middle print logs selectively:
IP address spoofing
One of the most interesting options is
--sender. It accepts a source address of all future datagrams and can be an absolutely any valid IPv4/IPv6 address, not only your network interface's. Take a look at this example:
# Test example.com:80 using the 126.96.36.199:173 sender $ anevicon --receiver=188.8.131.52:80 --sender=184.108.40.206:173
The command above will run a test to http://example.com/, assigning source addresses to
220.127.116.11:173 (A Google's IP), therefore, the destination server will be thinking that all the packets are from Google. This is called IP spoofing.
v5.2.0 introduced the multiple messages functionality, which means that you can specify several messages to be sent to a tested web server (but order is not guaranteed).
# Test example.com:80 with these messages # 1) A custom file "file.txt"; # 2) A text message "Hello, Pitty! You're my worst friend."; # 3) A text message "Hello, Scott! This is just a test."; # 4) A text message "Goodbye, Albret! You're my best friend."; # 5) A random packet of 5355 bytes; # 6) A random packet of 2222 bytes. $ anevicon --receiver=18.104.22.168:80 \ --send-file="file.txt" \ --send-message="Hello, Pitty! You're my worst friend." \ --send-message="Hello, Scott! This is just a test." \ --send-message="Goodbye, Albert! You're my best friend." \ --random-packet=5355 \ --random-packet=2222
Well, it's time to understand the internals of Anevicon. First, it constructs an iterator of N messages (specified by both
--random-packet), where N is a number of packets specified by
--packets-count. Each of these packets is accepted by an optimized sending buffer.
An optimized sending buffer is a data structure representing a sending buffer which can contain M messages, where M is a number of packets transmitted per a
sendmmsg system call. When this buffer is full, it flushes all its messages by (surprise!)
sendmmsg, thereby providing much better performance than an ordinary buffer.
That is, Anevicon has been designed to minimize a number of system calls to your Linux kernel. Yes, we can instead use such libraries as netmap/PF_RING/DPDK, but then users might be confused with running Anevicon on their systems. Anyway, I think that
sendmmsg provides pretty well performance for all needs.
Here is a visual demonstration of the described process. You enter
anevicon --receiver=22.214.171.124:80 --packets-count=7 --send-message="First" --send-message="Second" --send-message="Third" --packets-per-syscall=3 and the program generates an iterator over ten messages that will be processed by an optimized sending buffer with the capacity of three:
You are always welcome for any contribution to this project! But before you start, you should read the appropriate document to know about the preferred development process and the basic communication rules.
Anevicon was developed as a means of testing stress resistance of web servers, and not for hacking, that is, the author of the project IS NOT RESPONSIBLE for any damage caused by your use of his program.