OmniGuard nsite.tech
← All articles
· 3 min read

The credentials sitting in plain text on your disk right now

Recovery codes, .env files, exported keys and VPN configs accumulate quietly in Documents and Downloads. Finding them is easy; deciding what to do is the real work.

credentialssecretshygiene

Almost every machine has them. Not through carelessness exactly — each file arrived for a good reason and was never dealt with afterwards.

A recovery-code text file downloaded while setting up two-factor authentication. A .env from a project. A WireGuard config. A licence key in Downloads. An exported SSH key "temporarily".

Individually, each is a small thing. Together they are a list of everything an attacker needs, in plain text, in predictable locations.

Why this matters more than it sounds

Anything running as your user can read them. Not just malware with administrator rights — any process in your session. A malicious npm package, a browser extension with file access, a document macro. None of that requires privilege escalation, because the files are already readable by you.

Recovery codes are the sharpest example. They are designed to bypass two-factor authentication. A file of them beside a saved browser password is a complete account takeover in one directory.

Find them

A quick sweep of the usual places:

Get-ChildItem $HOME\Documents, $HOME\Downloads, $HOME\Desktop, $HOME\OneDrive -Recurse -File `
  -Include *.pem,*.key,*.ppk,*.kdbx,.env,*.env,id_rsa,id_ed25519,*.ovpn,*.conf `
  -ErrorAction SilentlyContinue | Select-Object FullName, Length, LastWriteTime

And by name, which catches the recovery-code files:

Get-ChildItem $HOME -Recurse -File -ErrorAction SilentlyContinue |
  Where-Object { $_.Name -match '(?i)recovery|backup.?code|secret|credential|password' } |
  Select-Object FullName, LastWriteTime

Expect more results than you think. On a developer machine, twenty is normal.

Two caveats on the results. .env.example, .env.sample and .env.template are meant to be committed and contain placeholders — they are not findings. And a .conf file is only interesting if it actually contains a key; VPN configs usually do.

Decide, then act

Sort what you find into three piles:

Delete. Most of it. An old licence key, a .env from a finished project, a recovery-code file for an account you no longer have. If you do not need it, the safest handling is for it not to exist.

Move into a password manager. Recovery codes, API keys, anything you genuinely need later. Every serious password manager stores secure notes and file attachments. This is what they are for.

Encrypt in place. Some things have to stay as files — SSH keys, VPN configs, certificate bundles. Put a passphrase on the key itself (ssh-keygen -p), or keep the directory in an encrypted container.

If you encrypt a bundle, verify before deleting

If you archive a set of files into an encrypted container, do not delete the originals on the strength of the archive being created. Verify every member reads back correctly through the passphrase first.

An encrypted archive that cannot be opened is not a backup — and you will find out months later, at the worst moment. Write the archive, close it, reopen it with the passphrase, confirm the contents, and only then remove the originals.

Then stop generating them

The files accumulate because the workflow produces them. Set the browser to ask where to save downloads, so nothing lands in Downloads unnoticed. Put recovery codes straight into the password manager at setup rather than saving the file "for now". Keep project secrets outside the project directory.

The cleanup is a one-off. The habit is what keeps the machine clean next year.

OmniGuard puts this on autopilot — threats, network, Bluetooth and hardening in one console.
Download OmniGuard