ARTICLE

Common Website Backdoor Hiding Spots: Analysis of Nine Locations from Cleanup Cases

Back

Why does the site get reinfected after suspicious files are removed?

Website backdoors serve as re-entry paths left by attackers. Besides files in directories, common hiding places include scheduled tasks, SSH keys, login scripts, and hidden folders. Long-term maintenance experience shows these hidden channels often remain after visible files are deleted.

Administrators often report: "We had suspicious files removed, yet they reappear days later." This resembles a burglary where tools are taken but the changed lock and spare key go unnoticed. Suspicious files are obvious tools; the real return paths usually sit in rarely checked locations.

This article summarizes nine backdoor locations found in real incidents, explains why routine checks miss them, and provides the correct removal order plus the scope maintenance providers should cover. It targets business owners, IT contacts, and engineers, focusing on locations and inspection methods.

Why scanning or deleting suspicious files alone is insufficient?

Common approaches include running backdoor scanners or removing suspicious PHP files. These steps are necessary yet only address the file layer.

The issue lies in signature matching: it compares known malicious fragments and stays silent on misses. Many backdoors are not malicious files, such as:

  • A single line in scheduled tasks that periodically downloads and runs code
  • An extra SSH key identical in format to legitimate ones
  • An added command in login scripts that executes on every login
  • Attacker tools that decrypt database credentials using site config keys without obvious signatures

One case involved binaries disguised as system programs that were only found because their directory permissions were set to 000. A clean scan only means no known signatures exist, not that the host is secure.

Another mistake is treating removal as complete. Without locating the entry point, attackers can return through the same gap.

Nine common backdoor hiding locations

Locations are ordered from closest to website files outward. Early items are visible via FTP; later ones require host-level access.

1. Upload directory: backdoor files disguised as images

Upload directories allow external writes and frequently host backdoors. Disguise techniques include uncommon extensions, mixed case, trailing dots, or double extensions. List non-image files and confirm PHP execution is blocked.

2. Site configuration files: modified settings

Config files alter site behavior. Cases include directory locks that only allow attacker-specified filenames or rules that execute certain extensions as PHP. Every subdirectory may contain such files and must be compared.

3. Host scheduled tasks: system-level commands

Tasks reside in system directories outside website files. Attackers often place timed download-and-execute commands that restore deleted files within minutes. Review every account's schedule for unknown download instructions.

4. SSH keys: extra access credentials

Keys enable passwordless login; changing passwords has no effect. Common methods add new keys or prepend command directives. Each key's origin and settings must be verified individually.

5. Login startup files: execution on login

Startup files run on login. Attackers insert download-and-execute commands. Corresponding binaries must be located during cleanup.

6. Hidden home directories: permission-restricted folders

Dot-prefixed folders are often overlooked. Attackers may set permissions to 000 to hide tools. The method is to locate unopenable directories and examine them.

7. Temporary directories: attacker tools

Temp areas may contain password-decryption or lateral-probing tools without obvious signatures. Check account-isolated temporary locations.

8. Version control history: previously deleted files retained

Once committed, backdoors remain in the repository. Review commit logs and ensure version control folders cannot be read externally.

9. Legacy database tools and backup files

Outdated management interfaces or root-directory backups allow direct data access. Restrict sources or move backups out of the site.

Overview of locations, hidden content, and inspection methods

LocationHidden ContentWhy Hard to DetectInspection Method
Upload directoryImage-disguised filesNames appear normalList non-images and block execution
Config filesRules allowing specific files or preloading malicious codeNot program filesCompare all subdirectory configs
Host scheduleTimed execution commandsSystem-level storageReview each account's schedule
SSH keysExtra keys or command prefixesNormal formatVerify key origins
Login scriptsExecution commands and markersPlain text onlyInspect scripts and trace binaries
Hidden foldersPermission-restricted toolsTools cannot list themFind permission-000 items
Temp directoriesDecryption and probing toolsNo clear signaturesCheck account temp areas
Version controlPreviously submitted filesAlready deleted from siteReview commits and block external access
Database tools & backupsDirect login or download accessNot malicious filesRestrict sources and move backups

Correct removal sequence

Recommended order:

  1. Preserve evidence: back up suspicious files, schedules, keys, and logs with timestamps
  2. Identify entry point: trace back from earliest suspicious timestamps via access and login records
  3. Remove: address all nine locations
  4. Replace credentials: update every account password and key
  5. Harden settings: block PHP in uploads, update software, restrict legacy interfaces
  6. Re-check: verify nothing reappears after removal

Recommended scope for maintenance providers

Request providers confirm coverage of:

  • Website and upload directory suspicious files
  • All subdirectory config files
  • Every account's host schedule
  • SSH key verification
  • Login startup files
  • Permission-restricted hidden and temp directories
  • Version control history and external access checks
  • Intrusion entry point and timeline
  • Changed password and key list
  • Re-check date and results

Conclusion

Backdoor removal centers on locating every return path. Remember three points: a clean scan does not equal a clean host; preserve evidence before removal; require providers to detail the covered scope.

WhatsApp
Chatbot Icon ANGLIA AI Chatbot
×
For more efficient responses, please shorten your question