Skip to content

Hackbrowser stability: browser dies after ~10 requests, agent unaware #84

Description

@badchars

Bug Summary

Hackbrowser is unstable in visible (non-headless) mode. The Chromium browser closes prematurely after capturing only ~8-10 requests, and the agent continues running unaware that the browser has died. Crawling coverage is severely limited as a result.

Symptoms

1. Browser dies prematurely

  • In visible mode (not headless), the browser closes after capturing only ~8-10 HTTP requests
  • Drag-and-drop interactions or window manipulation can cause immediate crash
  • The crawling phase barely starts before the browser exits

2. Agent doesn't detect browser death

  • After the browser closes, the agent keeps running as if it's still alive
  • No health check or heartbeat mechanism to detect that the browser process is gone
  • Agent continues issuing commands to a dead browser — wasting tokens and time

3. Crawling is insufficient

  • Only ~8-10 requests captured before browser dies
  • Modern SPAs need hundreds of requests to map the full attack surface
  • No retry or recovery mechanism when crawling is interrupted

4. Usability friction

  • The credential input → Start Scanning → overlay flow is clunky
  • Overall hackbrowser UX needs stabilization and simplification

Expected Behavior

  1. Browser should remain stable throughout the full crawling phase (minutes, not seconds)
  2. If the browser process dies, the agent should detect it immediately and either:
    • Auto-restart the browser and resume crawling, OR
    • Report the failure cleanly and stop
  3. Crawling should capture the full application surface (all routes, forms, API calls) before stopping
  4. Window interactions (drag, resize, minimize) should not crash the browser

Steps to Reproduce

  1. Start a web pentest session with hackbrowser in visible mode
  2. Enter credentials in the overlay
  3. Click "Start Scanning"
  4. Observe: crawling starts, captures ~8-10 requests
  5. Browser window closes unexpectedly
  6. Agent continues running, unaware browser is dead

Affected Components

  • packages/hackbrowser/ — browser lifecycle management
  • packages/cyberstrike/src/tool/hackbrowser.ts — agent-side browser control
  • Browser process health monitoring (missing)
  • Crawling depth/coverage logic

Priority

High — hackbrowser is the primary recon tool for web pentesting. If it can't reliably crawl a target, the entire vuln testing pipeline receives incomplete data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions