Skip to content
Spiderfootplus

Type to search. Press / or Ctrl K from any page.

Exposure template · critical

Private key file exposed

Private key file exposed. Spiderfootplus requests /id_rsa, /id_dsa, /id_ecdsa on each web host and reports a match.

What it checks

On every web host the scan discovers, Spiderfootplus sends 6 GET requests and reports a finding when the response matches. It only reads; it never logs in, writes or exploits.

/id_rsa/id_dsa/id_ecdsa/.ssh/id_rsa/server.key/private.key

Detect it

# Every exposure template, with the rest of the web checks$ spiderfootplus scan example.com -p web # List the templates and their severities$ spiderfootplus templates

template_scan is marked invasive: it requests paths a normal visitor would not. Only scan hosts you are authorised to test.

Fix it: remove the file and rotate what it exposed

  1. Delete the file from the web root, or move it outside the directory the server publishes.
  2. Deny dotfiles, backups and dumps at the server or CDN (for example a rule matching /\. and *.bak, *.sql, *.old).
  3. Assume anything in the file was read: rotate passwords, API keys, tokens and private keys it contained.
  4. Fix the deploy step that shipped it, so the next release does not put it back.

Write your own

Templates are YAML in a nuclei-compatible format. See Write a vulnerability template to add a check like this one.