Maersk and NotPetya: The Day Global Shipping Went Manual
On June 27, 2017, A.P. Moller - Maersk — the world's largest container shipping company — was hit by NotPetya, destructive malware that arrived through a routine update to Ukrainian tax software. Its container businesses shut down, bookings stopped, and terminals slowed, yet its ships never stopped sailing. Maersk contained the attack in a day, took bookings again in two days, and rebuilt across 500 locations — at a cost it put at $200–300 million. This is the documented story of how it happened, how the company recovered, and the network controls it left behind.
The short answer
On Tuesday, June 27, 2017, A.P. Moller - Maersk, the world's largest container shipping company, was hit by malware later known as NotPetya. It did not arrive in a phishing email or through a break-in aimed at Maersk. It arrived inside a routine software update for MeDoc, the accounting program used to file tax returns in Ukraine — attackers had planted backdoors (hidden ways back into a computer) in that software, and every customer who took the update took the malware with it. Inside Maersk, the malware spread from machine to machine, scrambled files, and — where it got administrator rights — overwrote the part of the disk a computer needs to start up, leaving machines unusable. Maersk shut down its container shipping, ports, and forwarding businesses to stop the spread. The ships never stopped sailing and no customer data was lost, but bookings and terminals were disrupted for days. Maersk contained the attack within a day, was accepting bookings again on June 29, and restored services across 500 locations over the following week. The company told investors the attack would cost it $200–300 million, mostly revenue lost in July. The UK and U.S. governments later said the Russian military built NotPetya to disrupt Ukraine — and that Maersk and hundreds of other firms worldwide were the spillover.
The company: what Maersk did
A.P. Moller - Maersk is a Danish transport and energy group, and in 2017 its best-known business, Maersk Line, was the world's largest container shipping line — the company that carries other companies' goods around the world in steel boxes, on fixed schedules, like a bus service for freight. If a factory in one country sold goods to a warehouse in another, there was a fair chance a Maersk ship carried them.
The scale matters, so here it is from Maersk's own second-quarter 2017 report. In that one quarter Maersk Line carried 2.7 million FFE (FFE means forty-foot equivalent units — a standard way of counting containers) and ran a fleet of 282 owned and 364 chartered ships with room for about 3.4 million TEU (twenty-foot equivalent units, the smaller standard container count). Its port arm, APM Terminals, operated 76 terminals — the ports where ships are loaded and unloaded. Its forwarding arm, Damco, arranged shipments for customers door to door. The whole group took in $9.6 billion of revenue in that quarter alone.
None of that moves on paper. A modern shipping line is a computer system with ships attached: bookings, container tracking, terminal loading plans, and billing all run on connected IT systems, shared across the shipping, ports, and forwarding businesses and their partners. That connectedness is exactly what NotPetya fed on.
The problem: a trusted update, a flat network, and a wiper
Three facts, each documented in a primary source, set the trap.
First, the delivery channel was trusted software. The U.S. Cybersecurity and Infrastructure Security Agency's predecessor alert (NCCIC Alert TA17-181A) states that NotPetya's delivery mechanism on June 27, 2017 was the Ukrainian tax accounting software M.E.Doc, and that the attackers had used a backdoor to compromise M.E.Doc's development environment as far back as April 14, 2017. That backdoor let them run commands, steal files, and download further attack tools onto any machine running the software. Maersk's own report says the same thing in fewer words: the MeDoc software "contained backdoors into the networks of users of the software, which were used by the malware to enter via the software's automatic update system." In plain English: the update itself was the attack. No employee had to click anything, and no firewall rule was broken — the malware walked in through a door the business had deliberately opened for a supplier.
Second, once inside, the malware could move sideways fast. CISA's analysis lists how NotPetya spread within a network. It carried a modified version of a tool called Mimikatz that steals the Windows passwords held in a computer's memory. With a stolen password — especially an administrator's — it could use ordinary Windows management tools (WMI and PsExec, both built for system administrators) to install itself on the next machine, and the next. It could also spread through two exploits called EternalBlue and EternalRomance, which attacked an old Windows file-sharing feature (SMBv1). Microsoft had released a patch for those holes — security update MS17-010, on March 14, 2017, more than three months earlier — but any unpatched machine was still open. Why this matters: a network where every workstation can talk to every other workstation, and where one administrator password works in many places, gives this kind of malware a motorway instead of a maze.
What this shows: inside a flat network, NotPetya hopped from machine to machine with stolen passwords and built-in admin tools. Where Maersk's businesses sat on separate networks (right), the spread had nowhere to go.
Third, it was built to destroy, not to bargain. NotPetya looked like ransomware — crime software that scrambles your files and demands payment to unscramble them. CISA's analysts found the tell: the malware encrypted files with a randomly generated key and showed the victim an ID, but "there is no evidence of a relationship between the encryption key and the victim's ID, which means it may not be possible for the attacker to decrypt the victim's files even if the ransom is paid." CISA's verdict: "It behaves more like destructive malware rather than ransomware." The UK government said the same: the attack "masqueraded as a criminal enterprise but its purpose was principally to disrupt." There was no ransom that could fix Maersk. The only way back was to rebuild.
Maersk's own report kills a comforting myth: it called NotPetya "a previously unseen type of malware," and said "updates and patches applied to both the Windows systems and antivirus were not an effective protection in this case." Patching still mattered — it closed one spreading route — but no single layer was going to stop this.
What happened in June and July 2017
April 14, 2017 (or earlier) — Per CISA, the attackers' backdoor is already inside M.E.Doc's development environment, waiting inside the trusted update channel.
Tuesday, June 27, 2017 — NotPetya is released through M.E.Doc and detonates across Ukraine first — CISA notes its alert covers an event that hit "multiple countries and affecting multiple sectors" that day — then worldwide. Maersk is one of many global companies hit. Inside Maersk, IT systems go down across multiple sites. The company responds by closing down infected networks. Because Maersk Line, APM Terminals, and Damco share systems and interfaces with each other and with partners around the world, Maersk shuts those three businesses' systems down as a precaution. Maersk's chairman, Jim Hagemann Snabe, later told a World Economic Forum panel in Davos that he was woken by a 4 a.m. phone call on June 27 with news of the attack (reported contemporaneously in January 2018).
Wednesday, June 28, 2017 — Maersk confirms publicly that it "has been hit as part of a global cyber attack named Petya on the 27 June 2017," that the issue is contained, and that it is working on a technical recovery plan "with key IT-partners and global cyber security agencies." The same announcement draws the line that held: Maersk Oil, Maersk Drilling, Maersk Supply Services, Maersk Tankers, Maersk Training, Svitzer, and Maersk Container Industry are not operationally affected; Maersk Line's vessels "are maneuverable, able to communicate and crews are safe"; APM Terminals is impacted in a number of ports. The malware, Maersk later reported, "was contained to only impact the container related businesses" — six of the group's nine businesses, including all of its energy businesses, upheld normal operations throughout.
Thursday, June 29, 2017 — Two days after the attack, Maersk Line is able to accept bookings from customers with existing accounts again. The business is running, but on workarounds and partial systems.
Week of July 3–9, 2017 — Maersk "gradually progressed to more normalised operations for Maersk Line, Damco and APM Terminals." To bring services back "safely and without further disruption," it begins "to systematically bring back users and applications in 500 locations." Snabe later put the full rebuild at 4,000 new servers, 45,000 new PCs, and 2,500 applications, reinstalled in about ten days — work he called a heroic effort, done while staff ran the business manually.
August 16, 2017 — Maersk publishes its second-quarter report and puts a price on the attack (see The damage, below).
February 15, 2018 — The UK government publicly attributes NotPetya. The National Cyber Security Centre (NCSC) assesses the Russian military was "almost certainly" responsible, and the UK judges the Russian government responsible. The White House issues a matching statement the same day, calling NotPetya "the most destructive and costly cyber-attack in history" (as recorded in CISA's updated alert).
October 15, 2020 — A U.S. federal grand jury indicts six officers of Unit 74455 of Russia's GRU (its military intelligence agency) over NotPetya and other attacks, the U.S. Department of Justice announces.
The damage
Maersk's own figure is the one to use. In its second-quarter 2017 report, the company guided investors that the attack would hit results by $200–300 million, "of which the majority relates to lost revenue in July," and that "the vast majority of the impact of the cyber-attack was in Maersk Line." Chief Executive Søren Skou said it directly: business volumes "were negatively affected for a couple of weeks in July" and "we expect the cyber-attack will impact results negatively by USD 200-300m." Chairman Snabe later described the damage as $250–300 million in his Davos remarks — inside the same range, at the top end. Note what the money was: mostly shipments Maersk could not book or carry in July, plus the cost of running and rebuilding — not a ransom. No ransom was paid, and per CISA, paying could not have restored the files anyway.
The operational damage was just as concrete. The system shutdowns, Maersk reported, "resulted in significant business interruption during the shutdown period," with a limited financial effect in the second quarter and the larger effect in the third, "due to temporary lost revenue in July." Bookings stopped, then ran on workarounds. Terminals were impacted in a number of ports. Email and shared systems inside the container businesses were down or deliberately shut off.
Two things did not happen, and Maersk stated both plainly. First: "While the businesses were significantly affected by this cyber-attack, no data breach or data loss to third-parties has occurred." Customer data was not stolen — this was destruction, not theft. Second: Maersk "remained in full control of all vessels throughout the situation, and all employees were safe." The IT network failed; the physical operation — ships, crews, cargo — did not. That gap between a dead IT network and a still-sailing fleet is the whole reason the recovery story is worth studying.
Maersk was also not alone, and the official record puts its loss in context. The U.S. indictment covered three named NotPetya victims — a FedEx subsidiary (TNT Express), a large U.S. pharmaceutical manufacturer, and a Pennsylvania health system — which "together suffered nearly $1 billion in losses." The UK statement put the wider European disruption at "hundreds of millions of pounds." Destruction at this scale, the UK concluded, was the point: NotPetya's "primary targets were Ukrainian financial, energy and government sectors," and its "indiscriminate design caused it to spread further." Maersk was collateral damage in an attack on a country.
How they recovered
Maersk's recovery worked because the company treated it as an operations problem first and a computer problem second. The documented sequence:
Contain first, even if it hurts. As soon as Maersk knew systems were affected, it closed down infected networks — and shut down the three container businesses' systems as a precaution because of their global interfaces. Deliberately turning off your own booking system is a painful call. It is also why the attack stayed inside the container businesses and never reached the six businesses that kept operating.
Keep the physical business moving by hand. Ships kept sailing under full control, crews stayed in communication, and terminals worked around their systems. Bookings made before the attack were still on record, and within two days Maersk Line was taking new bookings from existing customers again — at first through workarounds, not the normal systems. In plain terms: the company fell back to running a shipping line the slow way while the fast way was rebuilt underneath it.
Rebuild in a deliberate order, at fleet scale. From the week of July 3, Maersk brought back users and applications systematically across 500 locations, in its own words "to reinstate services safely and without further disruption" — clean systems first, reconnected carefully, rather than everything switched back on at once and re-infected. Snabe's Davos figures give the rebuild its true size: roughly 4,000 servers, 45,000 PCs, and 2,500 applications reinstalled in about ten days. That is not a restore-from-backup story; a wiper that overwrites the boot record leaves machines that must be rebuilt, and Maersk effectively rebuilt the container businesses' entire IT estate while the business ran on manual processes.
Tell people what is happening. Maersk confirmed the attack publicly the next day, named which businesses were and were not affected, and gave investors a cost range seven weeks later. Customers could plan around a problem they could see — and the second-quarter report still showed Maersk Line profitable with full-year guidance unchanged.
The fix: technology and controls that came out of it
Maersk's second-quarter report is brief on the fix — it says information security "has a high business priority," that the company "has put in place different and further protective measures and is continuing to review its systems to defend against attacks." The detailed control list for a NotPetya-class attack comes from CISA's alert, written from the official analysis of this exact malware. Read together, they are the checklist this case leaves behind:
Segment the network so one infection cannot become every infection. CISA's prevention list is explicit: "Segregate networks and functions," use host firewalls, and "block workstation-to-workstation communications to limit unnecessary lateral communications." Maersk's own experience proves both halves: where businesses were separate (the energy businesses), operations never stopped; where systems were shared and flat (the container businesses), one infection became a global shutdown. Segmentation is not a diagram exercise — it is the difference between an incident and a company-wide outage.
What this shows: the before and after of segmentation. Flat (left): everything reaches everything. Segmented (right): walls between groups contain one infection to one segment — the control CISA put at the top of its list after NotPetya.
Treat credentials as blast radius. NotPetya's most effective spreader was not an exploit; it was stolen administrator passwords reused through normal admin tools. CISA's advice: manage privileged accounts, apply least privilege (people and systems get only the access they need), do not hand out administrator access unless it is truly needed, and secure or disable remote WMI and PsExec-style remote execution where the business does not need them. One all-powerful password is a master key to the whole estate.
Patch the known holes and retire the old protocols. EternalBlue and EternalRomance attacked SMBv1, and a patch had existed since March 14, 2017. CISA recommends applying MS17-010, disabling SMBv1, and blocking SMB (TCP port 445) at the network boundary. Maersk's point that patching alone did not stop NotPetya is true — and incomplete as a defense strategy: the patch closed the exploit route, leaving only the credential route, which is slower and noisier. Layers are not excuses for each other; they multiply.
Backups you have tested, and a continuity plan you have written down. CISA: "Conduct regular backups of data and test your backups regularly as part of a comprehensive disaster recovery plan," and "implement a security incident response and business continuity plan" so the response "is simply to restore the data from a known clean backup." Maersk's ships sailing and bookings returning in two days is what a working continuity plan looks like from the outside. The time to discover your backups or your manual fallback do not work is a drill, not a state-sponsored wiper.
Do not count on paying. CISA "recommends against paying ransoms" generally — and in this case the payment email address had been shut down by its provider, and the encryption had no working decryption path at all. Any recovery plan whose final step is "pay and restore" is not a plan for destructive malware.
Know your suppliers' update channels. The entry point was a trusted vendor's automatic update. That does not mean refusing updates — unpatched systems were the other half of this attack. It means knowing which third-party software can push code into your network, limiting where that software runs (a Ukrainian tax program does not need to sit on a flat network with the whole company), and being able to isolate the systems that run it.
What this means for you
Enterprise network engineers
This is your case study. Maersk in 2017 is most large enterprises today: a shared, flat internal network, powerful admin credentials that work in many places, third-party software everywhere, and business units connected because connecting them was convenient. Your NotPetya homework is concrete: can a workstation talk to every other workstation? Can one stolen admin password administer the whole estate? Is SMBv1 still enabled anywhere? Do you know — from a list, not from memory — which vendor software auto-updates inside your network, and what those machines can reach? And when (not if) leadership asks you to shut a business unit's systems down to contain something, is that decision rehearsed or improvised? Maersk's energy businesses show the payoff for separation that already exists before the bad day.
Hyperscaler engineers
Your version of this failure is the compromised dependency and the over-privileged control plane. NotPetya rode a trusted update channel and then moved with legitimate admin tooling — the same shape as a poisoned software package or a stolen cloud credential with broad permissions. The controls rhyme with Maersk's: strict segmentation between tenants, fleets, and management networks; short-lived, narrowly scoped credentials instead of standing master keys; staged, verifiable rollouts for anything that can push code; and the ability to isolate and rebuild an entire fleet segment fast. Maersk rebuilt 45,000 PCs in about ten days with 2017 tooling — a hyperscaler should be able to re-image a compromised fleet segment in hours, and should have practiced it.
HFT / low-latency engineers
Two lessons transfer sharply. First, the corporate network and the trading network must be different worlds: malware that takes out email must have no path — none — to order entry, market data, or risk systems, because in a market incident you will not get two days to work by hand. Second, Maersk's ships kept operating without the shore systems. Know your equivalent: what keeps working, degraded but safe, if the corporate layer vanishes — and which single shared service (identity, time sync, file shares) quietly connects the worlds you think are separate.
Try it yourself
NotPetya spread because internal networks let any machine reach almost any other machine, and because broad rules are easy to write and hard to review. You can practice the review half of that problem with Packet Path's free Firewall / ACL Analyzer: paste in access-list rules and it flags shadowed, redundant, and overly broad entries — the "permit anything to anywhere" lines that turn one infected workstation into a company-wide incident. Pair it with the free Network Config Verifier to compare device configs side by side and catch the drift — an old protocol still enabled on one box, a rule that exists on one firewall and not its pair — that segmentation plans die from. Neither tool stops a wiper. Both build the habit that does: know what your network actually allows, not what you meant it to allow.
Sources
Primary source — A.P. Moller - Maersk, Interim Report Q2 2017 (August 16, 2017), "Cyber-attack" section and guidance: the MeDoc backdoor and update-system entry, containment to the container businesses, shutdowns, June 28 containment and recovery plan, June 29 bookings, the July 3–9 normalization across 500 locations, "no data breach or data loss to third-parties," full control of vessels, and the USD 200–300m expected impact. https://www.hellenicshippingnews.com/wp-content/uploads/2017/08/Maersk_Interim_Report_Q2_2017.pdf
A.P. Møller - Mærsk A/S, "Cyber attack update" announcement (June 28, 2017): confirmation of the June 27 attack, systems down across multiple sites, the businesses not operationally affected, vessels maneuverable and crews safe, APM Terminals impacted in a number of ports. Copy of the company's press release: https://zenodo.org/records/19379859/files/Maersk%20-%20Corporate%20press%20release.pdf?download=1
U.S. National Cybersecurity and Communications Integration Center (NCCIC/CISA), Alert TA17-181A, "Petya Ransomware" (first issued July 1, 2017; updated February 15, 2018 with the U.S. attribution): M.E.Doc delivery and the April 14, 2017 backdoor, Mimikatz/WMI/PsExec and EternalBlue/EternalRomance propagation, MS17-010 (March 14, 2017), the master-boot-record destruction, why decryption was not possible, and the prevention and remediation guidance quoted in "The fix." Archived copy: https://dspace.njstatelib.org/server/api/core/bitstreams/3102359f-fa78-4b53-bcc5-868f00d45177/content
UK Government / National Cyber Security Centre, "Foreign Office Minister condemns Russia for NotPetya attacks" (February 15, 2018): the NCSC assessment that the Russian military was almost certainly responsible, the UK judgement that the Russian government was responsible, the attack's purpose (disruption, masquerading as a criminal enterprise), its Ukrainian primary targets, and its indiscriminate spread. https://www.gov.uk/government/news/foreign-office-minister-condemns-russia-for-notpetya-attacks
U.S. Department of Justice, "Six Russian GRU Officers Charged in Connection with Worldwide Deployment of Destructive Malware" (October 19, 2020; indictment returned October 15, 2020): the six Unit 74455 officers, the June 27, 2017 NotPetya attacks, and the nearly $1 billion in losses to the three victims identified in the indictment. https://www.justice.gov/usao-wdpa/pr/six-russian-gru-officers-charged-connection-worldwide-deployment-destructive-malware
Contemporaneous reporting of company statements: The Register (January 25, 2018) and BleepingComputer (January 25, 2018) on Chairman Jim Hagemann Snabe's World Economic Forum panel remarks — the 4 a.m. June 27 call, the reinstall of 4,000 servers, 45,000 PCs and 2,500 applications in about ten days, and his $250–300 million damage estimate. https://www.theregister.com/security/2018/01/25/it-heroes-saved-maersk-from-notpetya-with-ten-day-reinstallation-blitz/538891
- Maersk was not the target. The UK and U.S. governments said NotPetya was built to disrupt Ukraine — Maersk was hit because an office used the compromised Ukrainian tax software.
- The malware was a wiper dressed as ransomware: CISA found no link between the ransom key and the victim ID, so paying could not restore files. Recovery meant rebuilding, not decrypting.
- Separation saved the rest of the group: the attack stayed inside the container businesses — six of Maersk's nine businesses, including all of its energy businesses, kept operating normally.
- Recovery was a logistics operation: contained in a day, bookings back on June 29, and users and applications systematically restored across 500 locations during the week of July 3–9.