Skip to content

Attack encyclopedia

NotPetya - the most destructive cyberattack in history

NotPetya - analysis of the 2017 cyberattack that caused over $10 billion in damages. Supply chain compromise via M.E.Doc, the Maersk recovery story, Sandworm/GRU attribution.

Józef SulwińskiJózef Sulwiński

Published 11 min read

NotPetyawipersupply chainSandwormMaersk
NotPetya - the most destructive cyberattack in history
Contents
  1. The fake update - anatomy of a supply chain attack
  2. A wiper in disguise - why data recovery was impossible
  3. Maersk - when the screens went dark at the port
  4. The domain controller from Ghana - how a power outage saved a global corporation
  5. Timeline
  6. $10 billion in damages - who paid the bill
  7. Attribution - Sandworm and Russian military intelligence
  8. Lessons for modern security
  9. Summary
  10. Sources

June 27, 2017. Ukraine’s Constitution Day. In Kyiv offices, employees are wrapping up last tasks before the holiday. On thousands of computers, a routine update of the M.E.Doc accounting software launches - software used by virtually every company filing taxes with the Ukrainian authorities. The update takes a few seconds. Then screens start going dark.

Not just in Ukraine. Within an hour, black screens displaying a ransom demand appear at the Copenhagen headquarters of Maersk - the world’s largest container shipping operator. In the laboratories of pharmaceutical giant Merck in New Jersey. In the factories of France’s Saint-Gobain. At the logistics hub of TNT Express in the Netherlands. At Mondelez plants, the maker of Cadbury chocolate. Even at Russia’s Rosneft - which is ironic, given that the attack was carried out by Russian military intelligence.

This is NotPetya. Not a virus. Not ransomware. A cyber weapon that spiraled out of control and caused damages exceeding $10 billion - the costliest single cyberattack in history.

The fake update - anatomy of a supply chain attack

To understand NotPetya, you first need to understand M.E.Doc.

M.E.Doc (short for “My Electronic Documents”) is a Ukrainian tax reporting application developed by a small company called Linkos Group, based in Kyiv. The software was not optional - Ukrainian law required its use for filing electronic tax returns. Every company doing business in Ukraine had to have it installed. That meant hundreds of thousands of installations, from small shops to branches of multinational corporations.

The Sandworm group - Unit 74455 of Russia’s Main Intelligence Directorate (GRU) - seized control of Linkos Group’s update servers in early 2017. Over several months they tested their access, carrying out smaller attacks (including an XData malware campaign in May). On June 27 they deployed the real payload.

The mechanism was simple, and brilliant for that reason. The M.E.Doc update server pushed a package containing a backdoor to all clients. Applications automatically downloaded and installed the update. The moment it executed, NotPetya gained a foothold in the victim’s network - with whatever privileges the update process held.

From there the worm operated on its own, using two propagation mechanisms:

  • EternalBlue - an exploit developed by the US NSA, stolen and published by the Shadow Brokers group in April 2017. It targeted a vulnerability in the Windows SMB protocol (MS17-010), enabling remote code execution without any user interaction.
  • Mimikatz - a modified version of the tool for extracting credentials from Windows memory. NotPetya harvested passwords and tokens from the infected machine, then used them to authenticate against other computers on the network via WMIC and PsExec.

The combination of these two vectors created a cascade effect. EternalBlue broke into machines that lacked current patches. Mimikatz captured domain administrator credentials and spread to patched machines that trusted authenticated users. In a flat corporate network - and most networks in 2017 were flat - NotPetya needed minutes, not hours, to reach every computer.

A wiper in disguise - why data recovery was impossible

Infected computers displayed a message modeled on the Petya ransomware: a demand to pay $300 in Bitcoin to a specified wallet address. An email contact address was even provided. It looked like standard ransomware.

But NotPetya was not ransomware. It was a wiper - a tool for irreversible data destruction, disguised as ransomware to mislead victims and analysts.

Analysts at Kaspersky Lab quickly identified the critical difference. In genuine Petya ransomware, each victim received a unique installation identifier linked to the encryption key. In NotPetya, the identifier shown on screen was a random string of characters - it bore no relation to the key used to encrypt the disk. Even if a victim paid the ransom, even if the attackers wanted to decrypt the data - they could not do so. The decryption key simply did not exist.

NotPetya overwrote the hard drive’s Master Boot Record and encrypted the file table (MFT). Windows stopped booting. Data on the disk became inaccessible. Irreversibly. This was not a financially motivated attack. It was a tool of destruction.

Maersk - when the screens went dark at the port

A.P. Moller-Maersk, the Danish transport group, operated a fleet of over 800 vessels in 2017. Its container terminals served 76 ports worldwide. The company handled nearly one-fifth of global container shipping. Every day, tens of thousands of container records passed through Maersk’s systems - where they were sailing from, where they were heading, what they contained, who was paying.

On June 27, within minutes of the first infection, NotPetya swept through Maersk’s entire corporate network. Employees in offices around the world watched the same thing happen - computers restarting and displaying the ransom screen. Disconnecting machines from the network could no longer stop anything.

The scale of damage that Maersk discovered in the following hours was unprecedented:

  • 45,000 computers - destroyed, requiring full reinstallation
  • 4,000 servers - destroyed
  • 2,500 applications - requiring redeployment
  • Offices worldwide - paralysed at the same time

A company that moved goods worth billions of dollars every day had been thrown back to the pre-computer era. Ports began tracking containers on paper. Truck drivers stood in multi-kilometer queues because nobody could electronically confirm which container they were supposed to collect. Ships entered ports, but nobody knew what was on board.

For ten days Maersk could not accept new transport orders. A company through which 20% of global container trade flowed stood paralyzed.

The domain controller from Ghana - how a power outage saved a global corporation

When Maersk’s IT teams began assessing the scale of the catastrophe, they reached a terrifying conclusion. NotPetya had destroyed every Active Directory domain controller - the servers that form the backbone of any Windows-based corporate network. A domain controller is a central registry: it stores information about every user, every computer, every permission in the organization. Without it, you cannot rebuild the network. You cannot assign permissions. You cannot verify who is who.

Maersk had roughly 150 domain controllers scattered around the world. They all synchronized with each other. When NotPetya infected one, it infected them all. Backup copies of servers from three to seven days earlier could be restored - but no backup of the domain controllers existed anywhere. No backup procedure had accounted for a scenario in which every domain controller in the world went down simultaneously. Nobody had ever considered such a scenario.

And then, amid the frantic search, a message arrived from the office in Ghana.

In the local Maersk office there stood one domain controller. An ordinary server in a small office on the west coast of Africa. Some time before the attack, a power outage had knocked it off the network, and the machine had not been reconnected when NotPetya struck. It survived with its data intact - the only surviving copy of the Active Directory structure for Maersk’s entire global network.

One server. In one office. On one continent. Saved by a power outage.

The link to Ghana was so slow that sending the several-hundred-gigabyte backup would have taken days, and nobody in the West African office had a British visa. So a staffer from Ghana flew to Nigeria and handed the drive at the airport to another Maersk employee, who flew it to London. In the United Kingdom, Maersk set up an emergency recovery center. Hundreds of IT specialists worked around the clock.

The rebuild took ten days. Under normal conditions, reinstalling infrastructure at that scale would have taken six months. Maersk did it in ten days - at the cost of an enormous effort by hundreds of people working day and night.

The total cost of the attack for Maersk was estimated at $250-300 million.

Timeline

Date Event
Early 2017 Sandworm gains control of M.E.Doc update servers
May 18, 2017 Test attack using XData ransomware via the M.E.Doc channel
June 27, 2017, morning M.E.Doc update server pushes infected package to clients
June 27, 10:30 UTC First reports of mass infections in Ukraine
June 27, 11:00-12:00 UTC NotPetya spreads globally - Maersk, Merck, Saint-Gobain, TNT Express, Mondelez
June 27, afternoon Screens go dark in Maersk offices worldwide
June 28 Kaspersky Lab publishes analysis: NotPetya is a wiper, not ransomware
June 29 - July 7 Maersk rebuilds infrastructure from the Ghana domain controller
July 2017 ESET publishes evidence of M.E.Doc server compromise
February 2018 US, UK, Australia, and Canada officially attribute the attack to Russia
October 2020 US Department of Justice indicts six GRU officers

$10 billion in damages - who paid the bill

The White House estimated global losses caused by NotPetya at over $10 billion, making it the costliest cyberattack in history.

Company Industry Estimated losses
Merck Pharmaceuticals $870M
FedEx / TNT Express Logistics $400M
Saint-Gobain Construction $384M
Maersk Maritime shipping $250-300M
Mondelez FMCG $150M+
Reckitt Benckiser FMCG $129M
Rosneft Energy Undisclosed

Ukraine suffered the heaviest losses - about 80% of all infections occurred in the country. Banks, ministries, airports, the Kyiv metro, energy operator Ukrenergo, and the monitoring zone around the Chernobyl nuclear plant were all affected.

Attribution - Sandworm and Russian military intelligence

On February 15, 2018, the governments of the United States, the United Kingdom, Australia, and Canada jointly attributed the NotPetya attack to Russian military intelligence (GRU). It was one of the broadest and most unambiguous acts of public cyber-attack attribution in history.

On October 19, 2020, the US Department of Justice filed formal charges against six officers of GRU Unit 74455, known as the Sandworm Team:

  • Yuriy Andrienko (32)
  • Sergey Detistov (35)
  • Pavel Frolov (28)
  • Anatoliy Kovalev (29)
  • Artem Ochichenko (27)
  • Petr Pliskin (32)

The indictment covered not only NotPetya but also attacks on the Ukrainian power grid (2015-2016), sabotage of the Pyeongchang Winter Olympics (Olympic Destroyer, 2018), and campaigns targeting Georgian government institutions. The Department of Justice described the group’s actions as “the most destructive and costly series of cyberattacks ever attributed to a single group.”

None of the indicted individuals have been arrested. All remain in Russia.

Lessons for modern security

1. The supply chain is an attack vector

NotPetya reached its victims through a trusted channel - the update mechanism of software that companies were required to install. The same pattern later repeated in the SolarWinds attack (2020), Kaseya (2021), and 3CX (2023). Verifying the integrity of software and its updates at every stage of the supply chain is a requirement, not an option.

2. Network segmentation saves organizations

NotPetya spread rapidly through flat corporate networks where a single compromised administrator account granted access to everything. Proper network segmentation - defining zones and conduits in accordance with IEC 62443, restricting lateral movement, applying the principle of least privilege - is a fundamental barrier that slows or stops the propagation of this type of attack.

3. Backups must be offline

Maersk was saved by chance - a power outage in Ghana. But that should not be anyone’s disaster recovery model. Backups of critical systems - domain controllers in particular - must exist in offline form, isolated from the production network. Ransomware and wipers target backups just as aggressively as production systems.

4. Patching vulnerabilities is not optional - it is basic hygiene

NotPetya exploited the EternalBlue exploit for the MS17-010 vulnerability, for which Microsoft had released a patch two months earlier (March 2017). Companies that installed the fix were immune to this vector. Companies that did not - including Maersk - paid hundreds of millions of dollars for the oversight.

5. What looks like ransomware may not be ransomware

NotPetya looked like ransomware. It demanded a ransom. It provided a Bitcoin wallet address. But it was a tool of destruction with no way to reverse the damage. Organizations must treat every incident as a potential destructive attack rather than assume that paying a ransom will solve the problem.

Summary

NotPetya started as a Russian military intelligence operation aimed at Ukraine. It ended as the costliest cyberattack in history, one that paralyzed global supply chains, froze ports on five continents, and proved that a single compromised update tool can cause damages exceeding $10 billion.

The story of the domain controller from Ghana - the only copy that survived because the power happened to go out - is not an anecdote. It is a warning. Maersk, a company worth billions, a global logistics empire, owes its business continuity to an accidental power failure in West Africa. No organization should base its continuity plan on luck.

Sources

  1. NotPetya - Wikipedia
  2. Maersk Reinstalled 45,000 PCs and 4,000 Servers to Recover From NotPetya Attack - Bleeping Computer
  3. Rebuilding after NotPetya: How Maersk moved forward - CSO Online
  4. ExPetr/Petya/NotPetya is a Wiper, Not Ransomware - Kaspersky Securelist
  5. US indicts Russian GRU Sandworm hackers for NotPetya - Bleeping Computer
  6. DOJ Charges 6 Sandworm APT Members in NotPetya Cyberattacks - Threatpost
  7. How Ghana Saved a Global Conglomerate from a Cyberattack - Phishing for Answers
  8. The Untold Story of NotPetya, the Most Devastating Cyberattack in History - Wired (2018)
  9. Inside a Domain Controller Nightmare - Redmondmag.com
  10. IT heroes saved Maersk from NotPetya with ten-day reinstallation blitz - The Register
  11. Petya Ransomware advisory - CISA

Need help in this area?

Our experts will help you assess the risk and plan next steps.

Talk to an expert

We'll discuss scope, methodology, and timeline.

Book a call