Invoke-DropNet
August 14, 2021 ยท View on GitHub
I created this tool as a small research I did on dropping process network connections. You can read more about this research here.
Invoke-DropNet
Show all the TCP connections and allows you to close any network connection each time it is being established based on a given parameters.

Requirements
Admin privileges to close the network connection. Otherwise it will also be able to show you the connections status.
Basic Usage
- Open PowerShell and run:
Import-Module .\Invoke-Dropnet.ps1or copy & paste KetshashInvoke-DropNet.ps1 content to PowerShell sessionInvoke-DropNet <arguments>
Invoke-DropNet
Parameters:
- AutoClose - Will loop over the connections until exiting and close them.
- Milliseconds - How much time to wait before running again on all the connections (default: 300 milliseconds).
- ProcessID - Filter connections by PID of the process.
- LocalPort - Filter connections by PID of the process.
- RemotePor - Filter connections by RemotePort.
- LocalIPAddress - Filter connections by LocalIPAddress.
- RemoteIPAddress - Filter connections by RemoteIPAddress.
- State - Filter connections by State.
Example:
Invoke-DropNet -AutoClose -LocalPort 6666 -State "ESTABLISHED"