Skip to content

About

No description, website, or topics provided.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Interceptor

Interceptor is a local HTTP/HTTPS interception proxy intended for authorized security testing, application debugging, and traffic analysis in controlled environments.

MVP Status

This version provides:

  • C++20 application with wxWidgets;
  • local HTTP proxy on 127.0.0.1:8080;
  • capture of simple HTTP requests;
  • HTTP/1.1 upstream forwarding in pass-through mode;
  • HTTPS support through CONNECT pass-through tunnels without TLS decryption;
  • opt-in TLS interception with a local CA, dynamic per-domain certificates, and manual CA export;
  • SQLite history;
  • UI with history, filters, request/response details, and logs;
  • architecture prepared for replay, HAR export, passive scanning, and WebSocket support.

Current intentional limitations:

  • TLS MITM is disabled by default and must be explicitly enabled before starting the proxy;
  • HTTPS content is not decrypted or stored in clear text when tunnel mode is used;
  • no CA certificate is installed automatically;
  • one client connection handles one request and then closes;
  • no bypass of system protections is provided.

Companion browser extension

A Firefox (Manifest V3) companion extension lives in extensions/firefox/. While its toolbar toggle is on it routes the browser through Interceptor and colours History rows by Firefox container, can send a page to the Repeater, and can strip security response headers. Pairing is a token generated in Settings → Browser bridge (opt-in, off by default). See the extension README for setup.

Ubuntu Dependencies

sudo apt install build-essential cmake ninja-build libwxgtk3.2-dev libsqlite3-dev libssl-dev gettext zlib1g-dev libbrotli-dev

libssl-dev is required to compile and enable TLS MITM interception. Without OpenSSL, the HTTP proxy and CONNECT pass-through tunnel remain available, but the MITM checkbox is disabled.

Build

cmake -S . -B build -G Ninja -DINTERCEPTOR_BUILD_TESTS=ON
cmake --build build

If Ninja is not installed:

cmake -S . -B build-make -G "Unix Makefiles" -DINTERCEPTOR_BUILD_TESTS=ON
cmake --build build-make

Debian Package

CPack is configured through CMake to generate a Debian package:

cmake -S . -B build -G Ninja -DINTERCEPTOR_BUILD_TESTS=ON
cmake --build build --target package

The generated .deb is written under build/, for example build/interceptor_1.20.0_amd64.deb.

Install The Generated .deb

On the target Ubuntu machine, install the generated package with apt so runtime dependencies are resolved automatically:

sudo apt install ./build/interceptor_1.20.0_amd64.deb

If the package file is in another directory, keep the leading ./ or provide an absolute path:

sudo apt install /path/to/interceptor_1.20.0_amd64.deb

If you use dpkg directly and dependency installation is incomplete, repair the install with:

sudo dpkg -i ./build/interceptor_1.20.0_amd64.deb
sudo apt -f install

After installation, launch Interceptor from the desktop application menu or from a terminal:

interceptor

The package installs the interceptor executable, desktop launcher, icon, themes, bundled plugin manifests, and translation files under the standard system locations.

Uninstall The .deb Package

Remove the installed package while keeping user configuration and project files:

sudo apt remove interceptor

Remove package-owned configuration files as well:

sudo apt purge interceptor

If the package was installed with dpkg, the same apt remove or apt purge commands still apply because the package name is interceptor.

Linux AppImage

Install or download appimagetool, then configure CMake with its path:

cmake -S . -B build -G Ninja \
  -DINTERCEPTOR_BUILD_TESTS=ON \
  -DINTERCEPTOR_APPIMAGETOOL=/path/to/appimagetool-x86_64.AppImage
cmake --build build --target appimage

If appimagetool is already available in PATH, the explicit INTERCEPTOR_APPIMAGETOOL value can be omitted.

The generated files are written under dist/:

  • dist/Interceptor-x86_64.AppImage
  • dist/Interceptor-x86_64.AppImage.sha256

Uninstall An AppImage

An AppImage is not installed through the package manager. To remove it, delete the downloaded file and checksum:

rm ~/Downloads/Interceptor-x86_64.AppImage
rm ~/Downloads/Interceptor-x86_64.AppImage.sha256

If you moved the AppImage elsewhere, remove it from that location instead. If your desktop environment or an AppImage helper created menu entries, remove the corresponding interceptor or Interceptor launcher from ~/.local/share/applications/.

Windows MSI Installer

On Windows, CPack is configured to generate an MSI installer through the WiX generator. Install WiX Toolset on the build machine, then run:

cmake -S . -B build-msi -G "Visual Studio 17 2022" -DINTERCEPTOR_BUILD_TESTS=OFF
cmake --build build-msi --config Release --target package

The generated .msi is written under build-msi/.

macOS DMG

On macOS, CPack is configured to generate a drag-and-drop DMG containing the Interceptor.app bundle:

cmake -S . -B build-dmg -G Ninja -DINTERCEPTOR_BUILD_TESTS=OFF
cmake --build build-dmg --target package

The generated .dmg is written under build-dmg/.

The app bundle loads packaged themes, plugin manifests, translations, and the application icon from Interceptor.app/Contents/Resources. User settings and the local TLS CA profile are stored under:

~/Library/Application Support/Interceptor/

Tests

The standard test suite is built when INTERCEPTOR_BUILD_TESTS=ON.

Run all standard tests:

ctest --test-dir build --output-on-failure

Run tests matching a name:

ctest --test-dir build -R proxy --output-on-failure
ctest --test-dir build -R storage --output-on-failure
ctest --test-dir build -R websocket --output-on-failure

Run one test executable directly:

./build/proxy_request_lifecycle_tests
./build/storage_schema_migration_tests

List registered tests:

ctest --test-dir build -N

Notes:

  • proxy, replay, WebSocket, and TLS integration tests open loopback sockets;
  • if those tests fail with socket() failed: Operation not permitted, run them in an environment that allows loopback sockets;
  • TLS MITM tests are registered only when OpenSSL is found at configure time;
  • tests are plain executables using assert, not a unit-test framework.

Load Tests And Benchmarks

Load tests are optional and are not built by default. They exercise large sessions, large bodies, long WebSocket sessions, active scan cancellation, and storage pressure. Use them before changing UI history models, SQLite storage, body spooling, WebSocket persistence/export, active scanner queues, or async write behavior.

Configure and build with load tests enabled:

cmake -S . -B build -G Ninja \
  -DINTERCEPTOR_BUILD_TESTS=ON \
  -DINTERCEPTOR_BUILD_LOAD_TESTS=ON
cmake --build build

Run only load tests:

ctest --test-dir build -L load --output-on-failure

Run the normal suite while excluding load tests:

ctest --test-dir build -LE load --output-on-failure

List load tests:

ctest --test-dir build -N -L load

Current load tests:

  • load_storage_session_tests: saves and queries 50k and 100k exchange sessions by default;
  • load_large_body_tests: saves, reloads, searches, and integrity-checks large spooled bodies;
  • load_websocket_long_running_tests: persists, reloads, and exports a long WebSocket session;
  • load_active_scan_cancellation_tests: validates cancellation with queued and in-flight active scan work;
  • load_storage_pressure_tests: drains a large AsyncWriteQueue workload with findings.

Default load volumes:

Variable Default Used by
INTERCEPTOR_LOAD_SESSION_SMALL 50000 load_storage_session_tests
INTERCEPTOR_LOAD_SESSION_LARGE 100000 load_storage_session_tests
INTERCEPTOR_LOAD_BODY_BYTES 33554432 load_large_body_tests
INTERCEPTOR_LOAD_WEBSOCKET_FRAMES 100000 load_websocket_long_running_tests
INTERCEPTOR_LOAD_ACTIVE_SCAN_QUEUE 100000 load_active_scan_cancellation_tests
INTERCEPTOR_LOAD_ACTIVE_SCAN_INFLIGHT 1000 load_active_scan_cancellation_tests
INTERCEPTOR_LOAD_STORAGE_PRESSURE_COUNT 25000 load_storage_pressure_tests

Fast smoke run with reduced load volumes:

INTERCEPTOR_LOAD_SESSION_SMALL=200 \
INTERCEPTOR_LOAD_SESSION_LARGE=400 \
INTERCEPTOR_LOAD_BODY_BYTES=1048576 \
INTERCEPTOR_LOAD_WEBSOCKET_FRAMES=1000 \
INTERCEPTOR_LOAD_ACTIVE_SCAN_QUEUE=2000 \
INTERCEPTOR_LOAD_ACTIVE_SCAN_INFLIGHT=100 \
INTERCEPTOR_LOAD_STORAGE_PRESSURE_COUNT=1000 \
ctest --test-dir build -L load --output-on-failure

Run a single load test:

INTERCEPTOR_LOAD_SESSION_SMALL=50000 \
INTERCEPTOR_LOAD_SESSION_LARGE=100000 \
./build/load_storage_session_tests

The load tests print elapsed times for major phases. They are regression guards, not a stable cross-machine performance benchmark; compare results on the same hardware and build profile when tracking performance changes.

Development Baseline

Milestone 0 project hygiene lives in:

  • CONTRIBUTING.md for the build, test, sanitizer, and manual proxy verification checklist;
  • docs/issue-taxonomy.md for roadmap-driven issue labels;
  • docs/coding-rules.md for ownership, threading, UI event, and storage write rules;
  • docs/plugin-api.md for plugin manifests, declarative extension payloads, ABI notes, and examples;
  • .github/workflows/ci.yml for Ubuntu CMake and sanitizer validation;
  • tests/fixtures/http/ and tests/support/ for deterministic local regression tests.

The default validation path is:

cmake --build build
ctest --test-dir build -LE load --output-on-failure

Each build directory maintains its own automatic build number in build-number.txt. The number is incremented by CMake on every build and exposed in the application title, logs, and About dialog.

Run

./build/interceptor

Then configure the browser or HTTP client manually:

  • HTTP proxy: 127.0.0.1
  • port: 8080

Local OAST Callback Usage

OAST support is a local-only Collaborator-style alternative for authorized testing. It is disabled by default and accepts callbacks only on a configured loopback HTTP endpoint.

Configure it in the application:

  1. Open Settings > Active Scanner > Active Web Checks.
  2. Enable Enable local OAST callback support.
  3. Set Callback base URL, for example:
http://127.0.0.1:9081/oast
  1. Set Authorization acknowledgement exactly to:
authorized-testing-only
  1. Keep SSRF checks with controlled callback or local endpoint only enabled when using OAST with active scanner observations.
  2. Apply settings.

Start and use the callback server:

  1. Use Tools > Start OAST callback server.
  2. Use Tools > Copy OAST callback URL.
  3. Paste the copied URL into the authorized parameter or payload under test.
  4. Check Diagnostics for runtime state, generated callback URL, callback count, and errors.
  5. Check Project Health if OAST is configured but not running.

Callback interactions are stored in SQLite as evidence and tied to the generated token, scan id, selected exchange id when available, and request label. No external OAST service or DNS polling is bundled.

TLS MITM Usage

TLS MITM mode is only for authorized environments and tests. It is never enabled automatically.

  1. Install OpenSSL dependencies and rebuild:
sudo apt install libssl-dev
cmake -S . -B build -G Ninja
cmake --build build
  1. Start Interceptor:
./build/interceptor
  1. Export the local CA:
  • menu TLS > Export CA certificate...;
  • save the file, for example interceptor-ca.pem;
  • Interceptor generates the CA in the local user profile:
    • Linux: ${XDG_CONFIG_HOME:-~/.config}/interceptor/ca/;
    • macOS: ~/Library/Application Support/Interceptor/ca/;
    • Windows: %APPDATA%\\Interceptor\\ca\\.
  1. Manually install the CA in the browser or OS.

Firefox:

  • Settings > Privacy & Security > Certificates > View Certificates;
  • Authorities tab;
  • Import;
  • choose interceptor-ca.pem;
  • trust it for identifying websites.

Chrome / Chromium on Ubuntu:

  • import the CA into the system trust store or the user NSS store;
  • user NSS example, if certutil is installed:
certutil -d sql:$HOME/.pki/nssdb -A -t "C,," -n "Interceptor Local CA" -i interceptor-ca.pem

macOS:

  • open Keychain Access;
  • import interceptor-ca.pem into the login keychain or System keychain;
  • set Interceptor Local CA to Always Trust for SSL only for the duration of the authorized test;
  • command-line System keychain example:
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain interceptor-ca.pem
  1. Explicitly configure the browser proxy:
  • HTTP proxy: 127.0.0.1
  • port: 8080
  • use the same proxy for HTTPS.
  1. In Interceptor, check Intercept TLS (MITM) before clicking Start proxy.

  2. Browse to an authorized HTTPS target. Intercepted HTTPS requests/responses appear in the history as decrypted HTTP exchanges.

Important points:

  • if the MITM checkbox is not enabled, HTTPS remains in CONNECT pass-through mode;
  • upstream TLS verification is enabled by default through the OpenSSL trust store;
  • the MVP intercepts one HTTP request per TLS tunnel and then closes the connection;
  • to remove trust, follow docs/remove-ca-trust.md; deleting the Interceptor profile directory alone does not remove browser/OS trust.

Structure

src/
  main.cpp
  app/        (.cpp + .hpp)
  ui/         (.cpp + .hpp)
  proxy/      (.cpp + .hpp)
  tls/        (.cpp + .hpp)
  http/       (.cpp + .hpp)
  storage/    (.cpp + .hpp)
  scanner/    (.cpp + .hpp)
  replay/     (.cpp + .hpp)
  export/     (.cpp + .hpp)
  utils/      (.cpp + .hpp)
tests/
  fixtures/   (raw HTTP golden and regression fixtures)
  support/    (deterministic local test servers and test helpers)
docs/
resources/

C++ Conventions

  • namespaces use PascalCase: Interceptor::Http, Interceptor::Proxy, Interceptor::Storage;
  • functions and methods use PascalCase: ParseRequest, Start, SaveExchange;
  • member data is prefixed with m: mStatusCode, mStoragePath;
  • local variables use lowerCamelCase: contentLength, proxyPort.

Technical Roadmap

Phase 1: HTTP proxy + UI + SQLite

  • stabilize HTTP parsing and forwarding;
  • improve keep-alive and multiple requests per connection;
  • add full-text search in the UI;
  • add persistent configuration.

Phase 2: TLS MITM with local CA

  • done: generate a local CA in the Interceptor profile;
  • done: export the CA certificate for manual installation;
  • done: dynamically generate per-domain certificates;
  • done: convert CONNECT pass-through to interception only when explicitly enabled by the user;
  • done: record TLS information;
  • remaining: support multiple HTTP requests per TLS tunnel;
  • remaining: expose more upstream TLS options in the UI.

Phase 3: Interception/modification

  • request/response queue;
  • toggleable intercept mode;
  • Forward / Drop / Edit / Replay actions;
  • timeouts and UI safeguards.

Phase 4: Replay

  • method/URL/headers/body editor;
  • standalone sending without a browser;
  • save the result in history.

Phase 5: HAR export

  • complete HAR export;
  • raw request export;
  • raw response export;
  • session JSON export.

Phase 6: Passive scanner

  • security findings with severity;
  • cookies without flags;
  • missing security headers;
  • exposed server versions;
  • obvious sensitive content.

Phase 7: WebSocket

  • Upgrade detection;
  • frame capture;
  • basic storage;
  • architecture for future modification support.

Phase 8: Linux/Windows/macOS packaging

  • socket abstraction;
  • per-OS user profiles;
  • .deb, AppImage, Windows installer, and macOS bundle packaging;
  • cross-platform CI.

License

Interceptor is free software, distributed under the GNU General Public License, version 3 or (at your option) any later version (GPL-3.0-or-later). See LICENSE for the full text.

About

No description, website, or topics provided.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages