Advent of Cyber 2025 - Day 19 - ICS/Modbus - Claus for Concern

🎄 Saving Christmas from King Malhare

An ICS & Modbus Incident Response Story

Introduction

Snow blankets Wareville as chaos erupts inside the TBFC headquarters. What should have been the busiest Christmas shipping day quickly turns into a nightmare. Warehouse workers stare in disbelief as delivery drones return empty—not because deliveries failed, but because the wrong items were delivered.

Instead of Christmas presents, citizens across Wareville are receiving chocolate eggs and Easter bunnies.

Something is very wrong.

This is the story of how an Industrial Control System (ICS) was compromised, how the Modbus protocol was abused, and how understanding PLC logic helped save Christmas.


❄️ The Incident

Inside the command center, everything appears normal:

  • 1,000 packages in stock

  • 98% delivery success rate

  • All systems operational

Yet customer complaints flood the phone lines.

A logistics manager explains:

“The system says we delivered a teddy bear, but the customer received a chocolate bunny. Same weight. Same size. Different item.”

Suddenly, a message flashes briefly on a monitoring screen:

🐰 EGGSPLOIT v6.66 – Property of HopSec Island
“Why should Christmas have all the fun?” – King Malhare

This was not a prank. It was a deliberate ICS attack.


📝 A Mysterious Discovery

Near a PLC terminal, a crumpled note lies on the floor:

TBFC DRONE CONTROL – REGISTER MAP
(For maintenance use only)

Holding Registers

  • HR0: Package Type

    • 0 = Christmas Gifts

    • 1 = Chocolate Eggs

    • 2 = Easter Baskets

  • HR1: Delivery Zone (1–9 normal, 10 = ocean dump)

  • HR4: System Signature / Version

Coils

  • C10: Inventory Verification

  • C11: Protection / Override

  • C12: Emergency Dump

  • C13: Audit Logging

  • C14: Christmas Restored

  • C15: Self-Destruct

⚠️ CRITICAL: Never change HR0 while C11 = True

This note turned out to be the key to saving Christmas.


🎛️ Understanding SCADA & PLCs

What is SCADA?

SCADA (Supervisory Control and Data Acquisition) systems act as the central control layer in industrial environments. They monitor and control:

  • Conveyor belts

  • Robotic arms

  • Industrial drones

  • Routing and inventory systems

At TBFC, SCADA managed inventory selection, routing logic, CCTV feeds, and safety operations.

What is a PLC?

A Programmable Logic Controller (PLC) is a hardened industrial computer designed to:

  • Run continuously (24/7)

  • Execute real-time control logic

  • Interface directly with sensors and actuators

Unlike traditional computers, PLCs do not crash easily. When compromised, they continue executing malicious logic reliably—making them extremely dangerous.


🌐 Modbus: Power Without Security

Modbus is one of the oldest industrial communication protocols. It was designed for simplicity, not security.

Key security weaknesses:

  • ❌ No authentication

  • ❌ No encryption

  • ❌ No authorization

If an attacker can access port 502, they can read and write PLC values freely.

King Malhare exploited exactly this flaw.


🔍 Reconnaissance

Network scanning revealed:

  • Port 80 – CCTV feed

  • Port 502 – Modbus TCP (unauthenticated)

The CCTV feed confirmed the issue visually: Easter eggs moving through a Christmas production line.


📊 Modbus Investigation

Using Python and the pymodbus library, the PLC was interrogated directly.

Findings

  • HR0 = 1 → Chocolate Eggs selected

  • HR4 = 666 → Eggsploit signature

  • C10 = False → Inventory verification disabled

  • C11 = True → Protection trap enabled

  • C13 = False → Audit logging disabled

⚠️ Critical discovery:
Changing HR0 while C11 is enabled would trigger a self-destruct sequence.

This was not malware—it was a logic bomb.


☠️ The Trap Mechanism

If triggered:

  • C15 (Self-Destruct) activates

  • 30-second countdown begins

  • C12 (Emergency Dump) engages

  • Inventory is dumped into the ocean (Zone 10)

One wrong action would destroy all inventory.


🛠️ Safe Remediation Strategy

In ICS environments, order matters.

Correct recovery steps:

  1. Disable protection → C11 = False

  2. Restore package type → HR0 = 0 (Christmas Gifts)

  3. Enable inventory verification → C10 = True

  4. Enable audit logging → C13 = True

  5. Confirm no emergency dump or self-destruct active

Following this sequence safely restored the system.


🎉 Christmas Restored

The PLC automatically activated:

  • C14 = True → Christmas Restored

The CCTV feed updated instantly:
🎁 Christmas presents returned to the conveyor belts.

Final flag retrieved:
THM{…}

Christmas was saved.


📌 Lessons Learned

This incident highlights real-world ICS security risks:

  • Industrial protocols lack built-in security

  • Logic manipulation can be more dangerous than malware

  • Dashboards may show false confidence

  • Small configuration changes can have physical consequences

  • Documentation and system knowledge are critical


🔐 Final Thoughts

King Malhare didn’t exploit a software vulnerability—he exploited assumptions.

As IT and OT systems continue to merge, attacks like this will become more common. Cybersecurity professionals must understand industrial logic, not just traditional IT security.

Sometimes, the difference between disaster and success is a crumpled note on the floor.

🎄

Comments

Popular Posts