Skip to content

Installation and Building

Simone Margaritelli edited this page Jan 30, 2024 · 11 revisions

Installing from Docker Hub

A Docker image is available on Docker Hub:

docker run -it evilsocket/legba -h 

When using wordlist files, remember to share them via a docker volume. Moreover you'll want to use the host network in order to reach the target, for instance:

docker run \
  -v $(pwd):/data \ # shared the current directory as /data inside the container
  --network host \ # docker will use the same network of the host
  -it evilsocket/legba:latest \
  ssh --username root --password /data/your-wordlist.txt --target 192.168.1.1

To make your life simple you can also use this docker-compose file.

Installing from Crates.io

THE CRATES.IO BUILD DOES NOT INCLUDE ALL FEATURES BY DEFAULT, IT IS HIGHLY RECOMMENDED TO USE LEGBA VIA DOCKER

Legba is published as a binary crate on crates.io, if you have Cargo installed you can:

cargo install legba

This will compile its sources and install the binary in $HOME/.cargo/bin/legba.

Building from Sources

Building the project from sources requires Rust to be installed. After cloning this repository, install libcrypto-dev and libsmbclient-dev on your host, then you can build the project with:

cargo build --release --features http_relative_paths

The binary will be compiled inside the ./target/release folder.

Building the Docker Image

Alternatively it is possible to build a Docker container:

docker build -t legba .

And then run it via:

docker run legba --help # or any other command line
Clone this wiki locally