From 9361ac776d351f01dfbef816f9b4584a12ae751b Mon Sep 17 00:00:00 2001 From: Simone Margaritelli Date: Mon, 30 Oct 2023 17:56:34 +0100 Subject: [PATCH] new: benchmark table --- README.md | 37 ++++++++++++++++++++++++++++--------- src/main.rs | 2 -- 2 files changed, 28 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 46a57d0..2e55d1a 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,36 @@

-

- Release - Crate - Docker Hub - Rust Report - Software License -

+ Release + Crate + Docker Hub + Rust Report + Software License

`Legba` is a multiprotocol credentials bruteforcer / password sprayer and enumerator built with Rust and the Tokio asynchronous runtime in order to achieve -better performances and stability while consuming less resources than similar tools. +better performances and stability while consuming less resources than similar tools (see the benchmark below). -For the building instructions, usage and the list of supported protocols [check the project Wiki](https://github.com/evilsocket/legba/wiki). +For the building instructions, usage and the complete list of options [check the project Wiki](https://github.com/evilsocket/legba/wiki). + +## Supported Protocols/Features: + +AMQP (ActiveMQ, RabbitMQ, Qpid, JORAM and Solace), DNS subdomain enumeration, FTP, HTTP (basic authentication, NTLMv1, NTLMv2, multipart form, custom request and CSRF support), IMAP, Kerberos pre-authentication and user enumeration, LDAP, MongoDB, Microsoft SQL, MySQL, Oracle, PostgreSQL, POP3, RDP, Redis, SSH / SFTP, SMTP, STOMP (ActiveMQ, RabbitMQ, HornetQ and OpenMQ), Telnet, VNC. + +## Benchmark + +Here's a benchmark of `legba` versus `thc-hydra` running some common plugins, both targeting the same test servers on localhost. The benchmark has been executed on a macOS laptop with an M1 Max CPU, using a wordlist of 1000 passwords with the correct one being on the last line. Legba was compiled in release mode, Hydra compiled and installed via [brew formula](https://formulae.brew.sh/formula/hydra). + +Far from being an exhaustive benchmark (some legba features are simply not supported by hydra, such as CSRF token grabbing), this table still gives a clear idea of how using an asynchronous runtime can drastically improve performances. + +| Test Name | Hydra Tasks | Hydra CPU | Hydra Time | Legba Tasks | Legba CPU | Legba Time | +| --------- | ----------- | --------- | ---------- | ----------- | --------- | ---------- | +| HTTP basic auth | 16 | 3% | 7.100s | 10 | 3% | 1.560s **(🚀 4.5x faster)** | +| HTTP POST login (wordpress) | 16 | 4% | 14.854s | 10 | 2% | 5.045s **(🚀 2.9x faster)** | +| SSH | 16 | 0% | 7m29.85s * | 10 | 10% | 8.150s **(🚀 55.1x faster)** | +| MySQL | 4 ** | 162% | 9.819s | 4 ** | 47% | 2.542s **(🚀 3.8x faster)** | +| Microsoft SQL | 16 | 2% | 7.609s | 16 | 2% | 4.789s **(🚀 1.5x faster)** | + +* While this result would suggest a default delay between connection attempts used by Hydra. I've tried to study the source code to find such delay but to my knowledge there's none. For some reason it's simply very slow. +** For MySQL hydra automatically reduces the amount of tasks to 4, therefore legba's concurrency level has been adjusted to 4 as well. ## License diff --git a/src/main.rs b/src/main.rs index ce1ee3d..1017808 100644 --- a/src/main.rs +++ b/src/main.rs @@ -17,8 +17,6 @@ pub(crate) use crate::options::Options; pub(crate) use crate::plugins::Plugin; pub(crate) use crate::session::Session; -// TODO: Benchmark table. - fn setup() -> Result { print!( "{} v{}\n\n",