crowbar

Overview

Crowbar is a terminal-based web security proxy written in Rust. It intercepts, inspects, and modifies HTTP/HTTPS traffic in real time — entirely from your terminal. Think Burp Suite or ZAP, but keyboard-driven and zero-GUI.

Core capabilities:

Installation

Crowbar requires Rust 1.85+ (edition 2024).

$ git clone https://github.com/polera/crowbar.git
$ cd crowbar
$ cargo build --release

The binary lands at target/release/crowbar. Move it somewhere on your $PATH.

Quick Start

# Start with defaults (127.0.0.1:8080)
$ crowbar

# Custom bind address
$ crowbar --bind 0.0.0.0:9090

# Start with intercept enabled, scoped to a domain
$ crowbar --intercept --scope '*.example.com'

# Load a saved session
$ crowbar --load ~/.crowbar/sessions/my-session.json

Point your browser or tool at 127.0.0.1:8080 as an HTTP proxy. For HTTPS, install the CA certificate first (see below).

CA Certificate Setup

On first run, Crowbar generates a root CA at ~/.crowbar/ca.pem. To intercept HTTPS traffic, add this CA to your browser or OS trust store.

Export the certificate

# Print to stdout
$ crowbar ca-export

# Save to a file
$ crowbar ca-export /tmp/crowbar-ca.pem

macOS

$ sudo security add-trusted-cert -d -r trustRoot \
    -k /Library/Keychains/System.keychain ~/.crowbar/ca.pem

Firefox

Settings → Privacy & Security → Certificates → View Certificates → Import → select ~/.crowbar/ca.pem → trust for websites.

Linux (Debian/Ubuntu)

$ sudo cp ~/.crowbar/ca.pem /usr/local/share/ca-certificates/crowbar.crt
$ sudo update-ca-certificates

Proxy & Intercept

The proxy tab is the first thing you see. It shows the current bind address, intercept status, and any pending intercepted request.

With intercept off, traffic flows through and is logged to history. With intercept on, each request pauses for your review. You can:

Scope

Scope filters limit which hosts are captured. Patterns use glob matching, so *.example.com captures all subdomains.

$ crowbar --scope '*.example.com' --scope 'api.internal.dev'

History

Every proxied request/response pair is recorded. The history tab lists all entries with method, host, path, status, and size. Use / to filter by any field.

From the history view you can:

Response bodies are syntax-highlighted for JSON and HTML, with pretty-printing applied automatically.

Repeater

The repeater lets you edit and resend any request manually. Send a request from history with r, then modify it and hit Ctrl+Enter to send.

The repeater is ideal for testing payloads, probing API endpoints, and verifying fixes to discovered issues.

Match & Replace Rules

Define rules to automatically modify traffic as it passes through the proxy. Rules can target requests, responses, or both.

SettingOptions
TargetRequest, Response, or Both
ScopeURL, Headers, Body, or All
ModeLiteral or Regex

Each rule has a name, match pattern, replacement string, and can be toggled on/off with Enter. In the rules tab, press a to add, x to delete.

Passive Scanner

Crowbar passively scans proxied responses for common security issues. Findings are attached to history entries and categorized by severity.

CheckSeverity
Missing HSTS headerMedium
Missing Content-Security-PolicyMedium
Missing X-Frame-OptionsLow
Missing X-Content-Type-OptionsLow
Cookie without Secure flagMedium
Cookie without HttpOnly flagLow
Cookie without SameSite flagLow
Server header disclosureInfo
X-Powered-By header disclosureInfo
Stack trace in response bodyHigh

Stack trace detection covers Java, Python, Go, and .NET patterns.

WebSocket Support

Crowbar captures WebSocket handshakes and relays frames between client and server. Captured messages are displayed with timestamps, direction (client → server or server → client), and payload content.

Both text and binary frames are supported.

Encoding Tools

The tools tab provides an interactive encoder/decoder. Type or paste input and see the output update in real time.

ToolDescription
URL Encode/DecodeRFC 3986 percent-encoding
Base64 Encode/DecodeStandard Base64 conversion
Hex Encode/DecodeHexadecimal byte representation

Switch between tools with l/h, edit input with e.

Macros & Sequences

Chain multiple requests into a sequence and execute them in order. Useful for multi-step workflows like login → action → verify.

Keyboard Shortcuts

Global

KeyAction
Tab / Shift+TabSwitch tabs
15Jump to tab
?Show help
Ctrl+SSave session
q / Ctrl+CQuit

Proxy Tab

KeyAction
iToggle intercept on/off
fForward intercepted request
dDrop intercepted request
eEdit intercepted request
bChange bind address
CExport CA certificate

History Tab

KeyAction
j / kNavigate entries
g / GJump to first / last
/Filter
EnterView details
rSend to repeater
mAdd to macro
cExport as curl
wExport as raw HTTP
hExport all as HAR

Repeater Tab

KeyAction
Ctrl+EnterSend request
eEdit request
dToggle diff view
MToggle macro view
j / kScroll request
J / KScroll response

Rules Tab

KeyAction
aAdd new rule
xDelete selected rule
EnterToggle enabled/disabled
n / p / eEdit name / pattern / replacement
tCycle target (Request → Response → Both)
sCycle scope (URL → Headers → Body → All)
RToggle regex mode

Tools Tab

KeyAction
eEdit input
l / hNext / previous tool
j / kScroll output

CLI Reference

Main command

crowbar [OPTIONS]
FlagDescriptionDefault
--bind <ADDR>Proxy bind address127.0.0.1:8080
--interceptStart with intercept enabledoff
--scope <PATTERN>Host scope (repeatable)all hosts
--config <PATH>Config file path~/.crowbar/config.toml
--load <PATH>Load session from file

Subcommands

# Export the CA certificate
$ crowbar ca-export [OUTPUT_PATH]

# Import a HAR file
$ crowbar import <FILE> --name <SESSION_NAME>

Configuration

Optionally configure defaults in ~/.crowbar/config.toml. CLI flags always override config file values.

# ~/.crowbar/config.toml
bind = "127.0.0.1:8080"
intercept = false
scope = ["*.example.com"]

File locations

PathPurpose
~/.crowbar/config.tomlConfiguration file
~/.crowbar/ca.pemRoot CA certificate
~/.crowbar/ca.keyRoot CA private key
~/.crowbar/sessions/Saved sessions
~/.crowbar/exports/Exported files
~/.crowbar/crowbar.logProxy log

Sessions & Export

Save your current session with Ctrl+S. Sessions are stored as JSON in ~/.crowbar/sessions/ and can be reloaded with --load.

Export formats

FormatKeyDescription
HARhHTTP Archive — standard format, compatible with browser dev tools and other proxies
curlcExecutable curl command for reproducing the request
Raw HTTPwRaw HTTP request/response text

Importing

$ crowbar import recording.har --name my-session

Imports a HAR file as a session for further analysis in Crowbar.