balrog.git


balrog

~ ELF file analysis tool to be used after firmware extraction
git clone https://github.com/djnnvx/balrog.git
log | files | refs | archive | README

README.md (1042B)

      1 # balrog
      2 
      3 Ranks the call sites in a firmware ELF tree that are worth opening in a decompiler.
      4 
      5 This tool is meant to be used with `moria` and `mithril`. Basically, you can
      6 think of it as a triager for ELF files, once you've extracted a firmware and looked
      7 for CVEs. What deserves your attention first ?
      8 
      9 - https://github.com/nmatt0/moria
     10 - https://github.com/nmatt0/mithril
     11 
     12 ```sh
     13 moria -e firmware.bin              # unpack
     14 mithril firmware.bin.extracted/    # secrets, SBOM, CVEs
     15 balrog scan firmware.bin.extracted/
     16 ```
     17 
     18 ## Build
     19 
     20 ```sh
     21 cargo build --release
     22 CC_x86_64_unknown_linux_musl=x86_64-linux-musl-gcc \
     23   cargo build --release --target x86_64-unknown-linux-musl   # static binary
     24 ```
     25 
     26 ## Use
     27 
     28 ```
     29 balrog scan <path>...          rank risky calls, grouped by class
     30 balrog scan -j <path>          JSON
     31 balrog scan --class exec <p>   one class only
     32 balrog scan --min 100 <p>      score floor
     33 balrog scan --per-bin 2 <p>    cap findings per class per binary
     34 balrog imports <file>          resolved imports and their stub addresses
     35 ```
     36