🛡 Pentestas help

Windows agent (Python)

Same Python codebase as the Linux agent, installed via PowerShell and registered as a Windows Service (via NSSM) or Scheduled Task fallback. Good choice for headless Windows servers and environments where the .NET runtime is unavailable.

For an interactive browse-and-capture experience, use the Windows .NET agent instead.

Prerequisites

  • Windows 10 1803+ / Windows Server 2019+ (for tar.exe availability).
  • Python 3.10+ on PATH, or the py launcher.
  • PowerShell run as Administrator.

Install

From an elevated PowerShell:

powershell
iwr -useb https://app.pentestas.com/agent/install.ps1 | iex
Install-PentestasAgent -Key pa_YOUR_KEY

The installer:

  • Creates C:\Program Files\Pentestas\Agent\ and a virtualenv inside it.
  • Downloads the agent tarball from the platform.
  • Installs dependencies into the venv.
  • Writes a restricted-ACL config.env with the key.
  • Registers a service (via NSSM if available, else a hardened Scheduled Task running as SYSTEM).

Parameters

Parameter Purpose
-Key pa_… (required) Agent key
-PlatformUrl wss://… Platform URL (default wss://app.pentestas.com/api/agents/ws)
-InstallDir <path> Install location (default C:\Program Files\Pentestas\Agent)
-SkipBrowser Skip mitmproxy; smaller install

Verify

powershell
Get-Service PentestasAgent    # if NSSM was available
Get-ScheduledTask -TaskName PentestasAgent   # fallback
Get-Content "C:\Program Files\Pentestas\Agent\state\agent.log" -Tail 50 -Wait

You should see connected to … within 5 seconds.

Uninstall

powershell
Stop-Service PentestasAgent -ErrorAction SilentlyContinue
sc.exe delete PentestasAgent
Unregister-ScheduledTask -TaskName PentestasAgent -Confirm:$false -ErrorAction SilentlyContinue
Remove-Item -Recurse -Force "C:\Program Files\Pentestas\Agent"

When to pick this over .NET

  • You need a service, not an interactive UI.
  • Your environment already bans .NET runtimes or requires a specific Python compliance baseline.
  • You're running on Windows Server Core (no GUI).

Otherwise, the .NET variant is strictly better for end-user use cases.

See also