Sharing a network configuration is a normal part of the job: support tickets, Reddit posts, team wikis, AI-assisted troubleshooting. The problem is that production configs are dense with credentials. A Cisco IOS running config typically contains encrypted passwords, pre-shared keys for every IPsec tunnel, SNMP community strings, and sometimes plaintext BGP neighbor passwords. Send that file without sanitizing it and you have effectively emailed your infrastructure credentials to a stranger.
There is no single official tool for this. Sysadmins reach for whatever is already in their workflow. Here is how the common approaches compare — and where each one breaks down.
Option 1: Bash One-Liners (sed / awk)
A sed-based sanitization script is the most common approach for engineers comfortable at the command line. The core idea is regex substitution applied to the exported config file before sharing it:
# Strip Cisco IOS passwords and SNMP strings sed -E \ -e 's/(password|secret) [0-9]+ [^ ]+/\1 7 [REDACTED]/g' \ -e 's/(snmp-server community) [^ ]+/\1 [SNMP_STRING]/g' \ running.cfg
Works well when: your configs follow a consistent vendor format you know well, you maintain a curated pattern list for your specific devices, and configs are shared occasionally rather than constantly.
Where it breaks: Cisco IOS alone has multiple password encoding formats (type 0, 4, 5, 7, 8, 9). FortiGate uses ENC-prefixed hashes with a different structure. BGP neighbor passwords sit on their own line with a non-obvious keyword. A script that handles IOS perfectly will miss half of what a FortiGate config contains. The deeper risk is silence: if your pattern fails to match, nothing warns you — the credential ships in the output.
Option 2: Notepad++ or VSCode Find-and-Replace
Both editors support regex-mode find and replace, which lets you substitute patterns interactively. The workflow: open the config, run a replacement for each credential type, scan visually, save the sanitized version.
Works well when: you are doing a one-off sanitization of a small config and want visual control over every substitution.
Where it breaks: it is entirely manual. You have to remember every pattern relevant to that vendor, run replacements one by one, and verify nothing was missed. With a 2,000-line firewall export this takes fifteen minutes and still relies on having a complete mental model of where credentials appear in that vendor’s syntax. Most people stop after three or four patterns and call it done.
Option 3: CyberChef Regex Pipeline
CyberChef is a powerful data transformation tool that supports chained regex operations. You can build a recipe that applies multiple substitution patterns in sequence, save it, and reuse it across sessions.
Works well when: you have a self-hosted CyberChef instance on your own infrastructure and a carefully maintained recipe for your vendor mix.
Where it breaks: no built-in network-vendor patterns, no pre-review step, and the public instance is not appropriate for sensitive configs. Self-hosting solves the privacy issue but adds operational overhead most teams would rather avoid.
Option 4: ScrubForge Chrome Extension
ScrubForge is a Chrome extension built specifically for network config sanitization. Paste a config, sanitize, review the output, copy the clean version. Nothing is uploaded — all pattern matching runs locally in your browser.
It ships with over 120 detection patterns across 12 network vendors. It replaces each unique credential with a consistent token — [PSK_1], [ADMIN_PASS_1], [SNMP_RO_1] — so the logical structure of the config is preserved. If the same password appears in five places, every instance becomes [ADMIN_PASS_1], which means an AI assistant can still reason about credential reuse without seeing the actual value. This pairs naturally with removing sensitive data from Cisco configs before AI-assisted troubleshooting sessions.
The free tier covers core sanitization. Pro adds custom dictionary import/export for unusual vendor formats, context profiles, and BYOK AI integration with five providers.
Side-by-Side Comparison
| Tool | Local only? | Pre-built patterns? | Review step? | Effort per use |
|---|---|---|---|---|
| bash / sed | Yes | No — maintain yourself | None | Low (once script is built) |
| VSCode / Notepad++ | Yes | No — manual per-config | Visual | High every time |
| CyberChef (self-hosted) | Yes | No — build your own recipe | Partial | Low (once recipe is built) |
| CyberChef (public) | No | No — build your own recipe | Partial | Low |
| ScrubForge (free) | Yes | 120+ patterns built in | Built-in review | Low |
Which One Should You Use?
- Scripting-comfortable team, consistent vendor environment: a maintained bash script works well. Budget time to update patterns when firmware changes keyword formats.
- One-off urgent sanitization, no scripting background: VSCode regex is a reasonable fallback — go slow and scan the output manually before sending.
- Team with self-hosted CyberChef already running: build a recipe and document it in your runbooks.
- Regular config sharing, multi-vendor environment, or AI-assisted troubleshooting: ScrubForge is the lower-friction option. The pre-built pattern library covers the vendor mix most teams deal with, and the built-in review step before copying catches anything unusual.
None of these tools guarantee a sanitized output is safe — that responsibility stays with the engineer who shares it. Spend thirty seconds reading the sanitized config before sending, regardless of which tool produced it.
Try ScrubForge free
120+ patterns, 12 vendors, fully local. No upload, no account required to use the core sanitization feature.
Install ScrubForge — Free