Website defacement
| Class | Availability and abuse |
|---|---|
| Also known as | Web defacement, external defacement |
| CWE | Depends on the weakness used to get in |
| MITRE ATT&CK | T1491.002 Defacement: External Defacement |
| Typical severity | High |
| Affects | Public websites run from a CMS, a web server or cloud storage, and domains whose DNS account can be taken over |
A website defacement changes what a public site shows without the owner's permission. The attacker swaps the pages for their own content, edits them, or sends visitors to a different server, which makes it the web's "virtual graffiti".1 The harm is classed as a loss of integrity.2
Description
Defacers want to deliver a message, to intimidate, or to claim credit for an intrusion, sometimes one that never happened.3 Political groups use it to spread their message; others are after money and send visitors on to commercial or infected sites.1 A defacement can also open a larger attack. The changed site may set up a drive-by compromise,2 or carry injected code that infects the devices of visitors.1 The same kind of change made to internal systems, seen only by an organization's staff, is classed separately as internal defacement.
Mechanism
To change a page, the attacker needs write access to wherever the page is stored or to the record that tells browsers where the site lives. The usual ways in are the Content management system (CMS) admin panel, SQL injection, DNS hijacking, malware and stolen cloud account credentials,4 and automated scanners find the weak sites first.1
| Route | What the attacker changes |
|---|---|
| CMS or hosting account | Signs in with a stolen or reset password and edits pages through the normal editor |
| Web application flaw | Uses an upload bug, remote code execution or a web shell to overwrite HTML, JavaScript or CSS files on the server |
| Server login | Replaces index.html over SSH |
| Cloud storage | Uploads altered files through the provider console or API to a site served from a bucket |
| DNS account | Points the domain at a server the attacker runs; the real site is untouched |
The first four rows follow the detection guidance for this technique, which covers hosted files overwritten after a web shell, the misuse of stolen credentials or the exploitation of a web flaw, and altered files uploaded to sites hosted in Amazon S3 or Azure Blob Storage.2
The DNS route leaves the site intact and changes where its name leads. A 2019 campaign against United States government domains, the subject of a CISA emergency directive, took three steps. The attacker obtained the password of an account that could edit DNS records, pointed the A, MX or NS records at an address it controlled, and then got a valid certificate for the domain, so visitors saw no browser warning.5 In 2012, DNS hijacking sent visitors of google.ro and paypal.ro to a defaced page.4
Impact
A defaced site leaves its users distrusting it and doubting what else it shows.2 Service may be interrupted, and the flaw used to get in may give access to data as well.4 A defaced page that carries a script or a redirect can infect visitors, and under DNS hijacking the attacker can decrypt the traffic and read any data visitors submit.15
Notable incidents
In January 2022, at least 70 Ukrainian government websites went offline, and provocative messages were posted on the main pages of several of them.6 CERT-UA said the attackers may have used CVE-2021-32648, a flaw in October CMS through which an attacker could request a password reset and then take over the account with a crafted request; it was fixed in Build 472 and version 1.1.5.7 The Security Service of Ukraine described a supply chain attack on a commercial company that held administration rights over the sites.6 CISA added the CVE to its Known Exploited Vulnerabilities catalog on 18 January 2022.7 Microsoft later linked the defacements to the group it calls Cadet Blizzard, which in the same month deployed WhisperGate, malware that wipes Master Boot Records.8
In 2019, the group known as Sandworm Team defaced about 15,000 websites of Georgian government, non-government and private organizations.2 The response steps are in Responding to unauthorised changes to a website.
Detection
Run a monitoring tool that tracks unauthorized changes to the website and raises an alert when one appears.14 The changes to look for are edits to hosted HTML, JavaScript and CSS files and uploads of altered files to cloud-hosted sites.2
For the DNS route, CISA required agencies to compare their public DNS records with the intended addresses, starting with NS records, and to watch Certificate Transparency logs for certificates they did not request.5
Prevention
- Turn on multi-factor authentication for every account that can publish: the CMS, the hosting provider, the DNS provider and the domain registrar.1 CISA advised against SMS codes and told agencies to move domains to a registrar that offers MFA.5
- Keep few admin accounts, remove those of people who left, and give each account the least privilege it needs.14
- Install updates for the CMS, its plug-ins and the server; the Ukraine case used a CMS flaw that had a fix.17 The Vulnerable dependencies article covers libraries.
- Keep backups away from the server, with older versions as well as the latest, so a clean copy can be restored.21
- Fix the input flaws that give write access, such as SQL injection and cross-site scripting.1
In SecFlash
SecFlash watches the pages of each app and reports changes on the Detections page: SF-DET-604 when the title and most of the text and layout changed between two looks, SF-DET-606 when the title or top heading now says "hacked by", and SF-DET-607 when the page has turned into another brand's sign-in page. Redirects are reported as SF-DET-605 for a page that now sends every visitor to another host, SF-DET-609 for a new meta refresh tag and SF-DET-608 for a full-size frame that shows another site.
See also
- Responding to unauthorised changes to a website
- Subdomain takeover
- Software supply chain compromise
- Exposed administration interface
- Category: Availability and abuse
References
- a b c d e f g h i j k Canadian Centre for Cyber Security (February 2024). "Website defacement (ITSAP.00.060)". cyber.gc.ca.
- a b c d e f g MITRE ATT&CK (version 1.2, last modified 24 October 2025). "Defacement: External Defacement, Sub-technique T1491.002". MITRE ATT&CK.
- back MITRE ATT&CK. "Defacement, Technique T1491". MITRE ATT&CK.
- a b c d e HKCERT (20 March 2024). "Defacement Attacks: Understanding and Prevention". HKCERT Security Blog.
- a b c d CISA (22 January 2019, since closed). "ED 19-01: Mitigate DNS Infrastructure Tampering". cisa.gov.
- a b Lakshmanan, Ravie (15 January 2022). "Massive Cyber Attack Knocks Down Ukrainian Government Websites". The Hacker News.
- a b c CVE Program. "CVE-2021-32648" (October CMS, october/system). cve.org.
- back Microsoft Threat Intelligence (14 June 2023). "Cadet Blizzard emerges as a novel and distinct Russian threat actor". Microsoft Security Blog.
External links
- Defacement: Internal Defacement, T1491.001, MITRE ATT&CK