Skip to content

Installing the fault cli

fault is a designed to be easily installed on major systems such as Linux, macOS and Windows. We provide a variety of approaches to install fault depending on your environment.

Features Matrix

fault disables some of its features depending on the platform. Below is a summary of the capabilities per target.

Platform (OS) / Feature  Proxy Scenario Stealth (eBPF) AI Agent
Linux shared library ✅ ✅ ✅ ✅
Linux static (musl) ✅ ✅ ✅ ⛔
MacOSX ✅ ✅ ⛔ (2) ✅
Windows ✅ ✅ ⛔ (2) ⛔ (3)
  1. fault comes with binaries with and without eBPF support for the Linux platform.
  2. Stealth mode relies on the Linux kernel technology called eBPF and therefore is disabled elsewhere.
  3. AI Agent relies on the swiftide rust framework which doesn't support Windows. However, the agent runs fine on "Linux on Windows" via WSL.
  4. fault only supports 64 bits architectures: x86 and ARM.

When a feature is disabled, it won't appear in the CLI arguments.

Download the fault binary

The most direct route is to download the fault binary on your machine.

  • Download fault

    You can download the appropriate fault-cli binary for your platform from here.

  • Ensure fault can be found in your PATH

    export PATH=$PATH:`pwd`
    
    $env:Path += ';C:\directoy\where\fault\lives' 
    
  • Turn the binary into an executable

    On Linux and macOS you will need to make sure the binary gets the executable permission flipped on with:

    chmod a+x fault
    

Stealth Feature

fault stealth mode requires additional dependencies only available on Linux. Follow these instructions only if you intend on using the stealth feature. Otherwise, you may skip this section.

  • Download fault with ebpf support

    Instead, of fault-cli, you will need to download and run fault-cli-ebpf which comes with the appropriate stealth mode enabled.

    You can download fault-cli-ebpf here.

  • Turn the binary into an executable

    On Linux and macOS you will need to make sure the binary gets the executable permission flipped on with:

    chmod a+x fault
    
  • Download fault's ebpf programs

    You can download fault-ebpf-programs from here.

  • Copy them in their default location

    Move the fault-ebpf binary to $HOME/.local/bin

    mv fault-ebpf $HOME/.local/bin
    
  • Give privileges to fault to load and attach these ebpf programs

    eBPF is powerful Linux kernel level feature which requires elevated privileges to be used. While you can always run fault with sudo, it might be better to set privileges more specifically to the executable:

    sudo setcap cap_sys_admin,cap_bpf,cap_net_admin+ep `$HOME/.local/bin/fault`
    

Install using cargo

fault is a rust application. It can be installed using cargo which will recompile it on the machine.

  • Requirements

    fault expects rust 1.85+ and the nightly channel.

    rustup toolchain install nightly
    
  • Install the fault executable

    cargo +nightly install fault
    

AI Agent Feature

Info

fault AI Agent is not supported on Windows.

  • Install the fault executable with agent feature enabled

    cargo +nightly install fault --features agent
    

Stealth Feature

Info

fault AI Agent is only available on Linux.

  • Install the fault executable with stealth feature enabled

    In this case, you need to enable the stealth feature. when installing the fault executable.

    cargo +nightly install fault --features stealth
    
  • Install the ebpf binaries on Linux

    cargo +nightly install fault-ebpf-programs --target=bpfel-unknown-none -Z build-std=core
    
  • Give privileges to fault to load and attach these ebpf programs

    eBPF is powerful Linux kernel level feature which requires elevated privileges to be used. While you can always run fault with sudo, it might be better to set privileges more specifically to the executable:

    sudo setcap cap_sys_admin,cap_bpf,cap_net_admin+ep `$HOME/.cargo/bin/fault`