Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

BlockAll

BlockAll

Stop binaries in a folder from phoning home.
Creates Windows Firewall rules to block inbound + outbound network traffic for every executable inside a directory you pick.

Download BlockAll.exe   Windows 10 / 11   .NET 8


Download

Grab the latest portable build: BlockAll.exe (~69 MB, self-contained — no .NET runtime install required).

Double-click. Accept the UAC prompt. That's it.

What it does

Recursively walks a folder, finds every file matching a configurable set of extensions (*.exe, *.dll, *.js, *.swf, *.api, *.ocx by default), and creates two Windows Firewall rules per file — one inbound, one outbound — across all three profiles (Domain / Private / Public).

Uses direct INetFwPolicy2 COM access; orders of magnitude faster than New-NetFirewallRule. Thousands of rules per second on a warm firewall service.

Features

  • Folder picker + drag-drop a folder anywhere onto the window.
  • Live progress bar with ETA and rules-per-second readout.
  • Session history persisted to %LOCALAPPDATA%\BlockAll\history.json — every block run is recorded.
  • One-click Undo for any past session.
  • Hash-pinning (SHA-256 per file): a Verify command flags any file an installer has swapped out from under your rules.
  • Firewall snapshot taken before every session (netsh advfirewall export) as a defensive backup.
  • Re-scan: catches up missing rules and picks up new files added since the last run. Works across machines.
  • Portable session file: each run drops BlockAll-session.json + BlockAll-summary.txt into the target folder. Copy the folder to another machine and re-scan there — same rules, no extra setup.
  • Explorer right-click integration (opt-in): adds "BlockAll this folder" to the folder context menu.

Usage

  1. Double-click BlockAll.exe. Accept the UAC prompt.
  2. Click Browse…, drag a folder onto the window, or paste a path into the box.
  3. Adjust the extension list if you want.
  4. Click Block.

Rules appear in wf.msc (Windows Defender Firewall with Advanced Security) under group name BlockAll-<8-char-id> — two rules per file (-IN and -OUT).

To remove the rules later, right-click the session in the history grid and choose Undo.

Re-running on the same folder

Click Block on a folder that already has a BlockAll-session.json and you'll be asked:

It looks like this directory has already been scanned. Would you like to re-scan it?

  • Yes — top up missing rules and add any newly-discovered files.
  • No — start a fresh session (replaces the existing summary).
  • Cancel — bail.

Replaying a session on another machine

Copy the target folder (with the BlockAll-session.json in it) to the second machine. Open BlockAll there, point it at the folder, click Block, choose Re-scan. Same rules get created.

Build from source

Requires the .NET 8 SDK.

cd src/BlockAll
dotnet publish -c Release -o ../../dist

Output: dist/BlockAll.exe — single-file, self-contained, ~69 MB.

Notes

  • Requires Administrator (firewall rules need elevation; the manifest self-elevates on launch).
  • Tested on Windows 10 22H2 and Windows 11.
  • Rules apply to all three firewall profiles (Domain, Private, Public). Direction is always inbound + outbound.
  • BlockAll does not phone home, does not touch the network, and stores nothing outside %LOCALAPPDATA%\BlockAll, the target folder, and the Windows Firewall ruleset.

About

Blocks files in chosen directories from "phoning home" via firewall rules. Reversible.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages