Review Old Backup and Unreferenced Files for Sensitive Information
High-Level Description
Old backup files, unreferenced pages, and forgotten content can expose sensitive information including source code, credentials, and outdated vulnerable functionality. These files often contain debugging information, database credentials, or reveal application logic that aids attackers. This test focuses on discovering such files through inference, brute-forcing, and examining publicly available information.
What to Check
File Types to Discover
Backup files (.bak, .old, .backup, ~)
Temporary files (.tmp, .swp, .temp)
Archive files (.zip, .tar, .gz, .rar)
Editor files (.bak, ~, .orig)
Unreferenced pages
Old versions of files
Development/test files
Snapshot directories
Log files
Database dumps
Naming Conventions
Pattern
Description
file~
Emacs backup
file.bak
Generic backup
file.old
Old version
file.orig
Original version
file.save
Saved version
file.swp
Vim swap file
file.tmp
Temporary file
Copy of file
Manual copy
file (1).ext
Duplicate
file_backup
Backup naming
file_YYYYMMDD
Date-based backup
How to Test
Step 1: Inference from Naming Schemes
# If you find viewuser.asp, try:
files=("edituser.asp" "adduser.asp" "deleteuser.asp"
"listuser.asp" "createuser.asp" "updateuser.asp"
"modifyuser.asp" "removeuser.asp")
for file in "${files[@]}"; do
status=$(curl -s -o /dev/null -w "%{http_code}" "https://target.com/$file")
echo "$file: $status"
done
Step 2: Test Backup Extensions
#!/bin/bash
TARGET=$1
FILE=$2 # e.g., config.php
# Backup extensions
extensions=(
".bak" ".backup" ".old" ".orig" ".save" ".swp" ".tmp"
".copy" ".1" ".2" "~" "_backup" "_old" "_bak"
".txt" ".src" ".inc" ".dev" ".test"
"-backup" "-old" "-copy" ".BACKUP" ".BAK"
)
for ext in "${extensions[@]}"; do
test_file="${FILE}${ext}"
status=$(curl -s -o /dev/null -w "%{http_code}" "https://$TARGET/$test_file")
if [ "$status" == "200" ]; then
echo "[FOUND] $test_file"
fi
done
# Also test prefix patterns
prefixes=("backup_" "old_" "copy_" "bak_" "." "_")
for prefix in "${prefixes[@]}"; do
test_file="${prefix}${FILE}"
status=$(curl -s -o /dev/null -w "%{http_code}" "https://$TARGET/$test_file")
if [ "$status" == "200" ]; then
echo "[FOUND] $test_file"
fi
done
Step 3: Archive File Discovery
# Common archive files
archives=(
"backup.zip" "backup.tar.gz" "backup.tar" "backup.rar"
"site.zip" "www.zip" "html.zip" "web.zip"
"database.sql" "db.sql" "dump.sql" "backup.sql"
"files.zip" "archive.zip" "old.zip"
)
for file in "${archives[@]}"; do
status=$(curl -s -o /dev/null -w "%{http_code}" "https://target.com/$file")
if [ "$status" == "200" ]; then
echo "[CRITICAL] Archive found: $file"
fi
done
# Date-based backups
for year in 2023 2024 2025; do
for month in 01 02 03 04 05 06 07 08 09 10 11 12; do
file="backup_${year}${month}.zip"
status=$(curl -s -o /dev/null -w "%{http_code}" "https://target.com/$file")
if [ "$status" == "200" ]; then
echo "[FOUND] $file"
fi
done
done
Step 4: Source Code Review
# Look in HTML source for hidden links
curl -s https://target.com | grep -oP 'href="[^"]*"' | sort -u
# Look for commented code
curl -s https://target.com | grep -oP '<!--.*?-->'
# Look in JavaScript
curl -s https://target.com | grep -oP 'src="[^"]*\.js[^"]*"' | while read js; do
curl -s "https://target.com$js" | grep -iE 'admin|backup|test|dev|hidden'
done
Step 5: Robots.txt Analysis
# Check robots.txt for hidden paths
curl -s https://target.com/robots.txt
# Test disallowed paths
curl -s https://target.com/robots.txt | grep "Disallow" | awk '{print $2}' | while read path; do
status=$(curl -s -o /dev/null -w "%{http_code}" "https://target.com$path")
echo "$path: $status"
done
Run npx skillmds@latest add cyberstrikeus/wstg-conf-04 in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Review Old Backup and Unreferenced Files for Sensitive Information It is listed under Coding & Dev Tools on SkillMD.
SkillMD's automated safety review verdict for this skill is PASS. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
cyberstrikeus (@cyberstrikeus) published this skill. Their other Agent Skills are listed on their SkillMD profile.