RECOVERY FILE / 014RECOVERED

Hacked Website Rebuilt from a Backup and a Web Archive

An electrical contractor's home page had filled up with casino links and around 100 photos, banners and logos had vanished from the site. The only material available was a backup from the hosting provider. The investigation traced the hack to a stolen administrator login, removed every change the attacker made while keeping the owner's own updates, and recovered most of the deleted images from a public web archive.

SYMPTOMS

Blocks of casino and gambling links had appeared at the bottom of the home page, and photos, banners and client logos were missing across the site. The site had to be recovered from a backup supplied by the hosting provider.

FINDINGS

The website was not broken into through the server. The attacker logged in with the password for a shared administrator account belonging to the business's previous web agency, with almost 2,000 password logins in a single month. The site was also under constant password-guessing attacks, with more than 1,000 attempts against the owner's own login in that month alone.

Over about seven weeks the attacker:
- Created 20 hidden administrator accounts and nine application passwords, so they could keep getting back in even if a password was changed.
- Published 46 casino articles in Italian, French and Polish, backdated so they looked like old posts.
- Inserted gambling links into 15 pages and added 13 blocks of casino links to the home page, including one shrunk to a single pixel so visitors could not see it.

Around 100 photos, banners and logos were later deleted from the server.

The review also found an old single sign-on add-on left by the previous agency that let anyone log in as any user by forging a browser header, database dumps and backup archives that could be downloaded publicly, and updates switched off, leaving the page builder and form plugin years out of date with serious known vulnerabilities. WordPress core and the free plugins matched their official versions, no malicious code was found in the website files, and the security plugin had blocked the attacker's attempts to upload files.

RECOVERY ACTION

The backup was restored into an isolated local environment and every file and database change was reviewed. An older database copy, from more than a year before the attack, was found sitting inside the backup. Every page was compared against it element by element, so the injected sections could be removed exactly while the owner's own later changes, such as new banners and team updates, were kept.

The hidden administrator accounts, application passwords, logged-in sessions, spam articles, spam page and spam categories were removed. The sign-on backdoor and the publicly downloadable backups were taken out of the website.

For the deleted images, the public web archive's index was searched for every missing file and the exact archived copies were downloaded one at a time. Each file was checked to be a genuine image with no hidden code before it went back into its original location. This recovered 48 original images. Ten more were restored from archived resized versions, and three logos were rebuilt from cropped copies found in an old copy of the site files, matched by comparing image fingerprints. The cleaned site was then set up on a private, non-indexed staging copy for the owner to review before launch.

VERIFICATION

WordPress core and all free plugins were verified against official checksums, and every cleaned page was compared against the clean reference copy to confirm only the attacker's content had been removed. Every recovered image was confirmed as a genuine image file. About a dozen photos on the service pages, mostly from a professional photo shoot, were never captured by the archive and no copies survived on the live server, so the originals were requested from the owner.

Anonymised historical recovery completed by the team behind Dr Web. Scope and findings vary by website.

Get My Website Checked