43. IoT and OT Security – Cameras, Smart Devices, Plant Networks
43.3 Protocol Awareness – MQTT, CoAP, Modbus, DNP3
Concepts only – no weaponized write recipes.
| Protocol | Typical use | Blue note |
|---|---|---|
| MQTT | IoT pub/sub (sensors → broker → apps); ports often 1883 / 8883 | Require auth; prefer TLS (8883); ACL so one client cannot # subscribe everything |
| CoAP | Constrained devices, UDP-ish IoT | DTLS / careful exposure; rare on SME packing lines but exam modules mention it |
| Modbus TCP | Many PLCs; often port 502 | Historically little/no auth; treat as trusted-zone only; never map 502 to internet |
| DNP3 | Utilities / SCADA-style links | Secure authentication profiles exist – use them; still zone it |
Thodkyaat: MQTT broker = WhatsApp group admin for sensors. Open anonymous MQTT = anyone publishes fake "temperature OK". Modbus = often "speak and the PLC listens" inside the plant LAN – that is why segregation (next sections) matters more than a fancy IDS signature alone.
Aapan lab madhe Mosquitto (MQTT) shiku – own VM. Modbus write attacks, Stuxnet rebuilds, plant ladder downloads – nahi in this book.
| Red team (attacker) does | Blue team (defender) detects / stops |
|---|---|
| Anonymous MQTT publish/subscribe on open broker | allow_anonymous false; password file; TLS; ACL |
| Speaks Modbus to internet-exposed 502 | Never publish 502; OT firewall deny from IT; monitor |
| Floods CoAP/MQTT to DoS a weak device | Rate limits; dedicated IoT VLAN; capacity tests in change window |
Ravindra Bagale's Tip
Students download "Modbus exploit PDFs". CEH exam modules ask for protocol awareness – the Blue job = zoning + auth where possible. Interview: "I can explain MQTT auth and why Modbus must not face the WAN – I do not practise writes on live PLCs." Don't worry.
Ravindra Bagale's Tip – मराठी
Students "Modbus exploit PDF" download करतात. CEH exam modules protocol awareness मागतात – Blue job = zone + शक्य तिथे auth. Interview: "I can explain MQTT auth and why Modbus must not face the WAN – I do not practise writes on live PLCs." घाबरू नका.
Ravindra Bagale's Tip – हिंदी
Students "Modbus exploit PDF" download करते हैं. CEH exam modules protocol awareness माँगते हैं – Blue job = zone + जहाँ संभव हो auth. Interview: "I can explain MQTT auth and why Modbus must not face the WAN – I do not practise writes on live PLCs." घबराओ मत.
Lab
Read-only: man mosquitto.conf or docs – tick three: listener bind address, allow_anonymous, password_file. Write why binding 0.0.0.0 on a laptop with bridged adapter is dangerous. No Modbus tools.
Extended teaching notes
Why this lesson matters
Cameras, sensors and plant controllers often ship with weak defaults. Segment them from IT, change passwords, block inbound internet, and watch outbound traffic.
Real examples
Global: Mirai showed what default passwords on routers/cameras can do at scale. Indian SME (sample): a factory puts PLCs on a separate VLAN reachable only via a jump host.
Mini case study
Suppose we are on a purple-team exercise for an Indian mid-size company (sample data). Red notes a technique from this lesson against a lab clone. Blue must show the control that stops it, the log that would have fired, and the ticket that hardens production. That is the standard this course trains you for.
Defender's worksheet (do this today)
- Write the lesson title, date and the exact lab target you are allowed to use.
- List three owned systems (VMs, apps, or cloud accounts) where this lesson applies.
- Run one safe check from the lesson on a lab system only. Paste the command and output.
- Write a two-sentence fix you would give a teammate.
- Name one related public advisory (CERT-In, CISA, NVD, or a vendor bulletin) with its date.
Indian workplace (sample data)
Suppose we are a junior analyst at Infosys, TCS, Wipro or a fintech SOC in Bengaluru/Pune. Turn this lesson into one checklist item with an owner, a due date and a place to store evidence (ticket + screenshot).
Global practice
Compare your notes with OWASP, CIS Benchmarks, NIST CSF/IR guidance or a cloud Well-Architected security question. Write five lines on what overlaps.
Everyday analogy
Explain the risk and the fix to a family member without jargon. If they can repeat the warning, you understand it well enough to teach juniors.
Key terms
- Control: a safeguard (patch, config, process, detection).
- Finding: a weakness backed by evidence.
- Remediation: the fix plus how you verified it.
- Scope: systems you have written permission to touch.
- Least privilege: only the access the task needs.
- Defence in depth: several layers so one failure does not end the story.
Common mistakes
- Skipping written permission "just for a quick scan".
- Practising on hostel, office or public targets without authorisation.
- Collecting tool output without writing the fix.
- Copying attack steps onto production to "verify". Defenders verify with versions, configs and patches.
- Publishing screenshots that contain secrets, cookies or internal hostnames.
Recap
- Evidence, fix, owner, date.
- Own lab only.
- Fix > spectacle.