A lightweight PowerShell script designed to audit local network activity by mapping active TCP listening ports directly to their originating processes and executable paths.
- Port Mapping: Identifies all local TCP addresses and ports currently in a
Listenstate. - Process Resolution: Automatically resolves the process name and Process ID (PID) tied to each active port.
- Path Tracing: Fetches the absolute file path of the running executable for deeper security verification.
- Automated Reporting: Generates and exports a cleanly formatted table directly to a text file on your Desktop.
- Windows Operating System
- PowerShell 5.1 or higher
- Administrator privileges (Highly recommended so the script can resolve paths for restricted system processes)
- Open PowerShell as an Administrator.
- Clone this repository or copy the script into a file named
PortAudit.ps1. - Execute the script:
.\PortAudit.ps1