MSc thesis · FAST-NUCES, Karachi
FARIDA: Controller-assisted IoT routing security
Fast Accurate Robust Intrusion Detection Application. I built a Java and Contiki/Cooja prototype to study how a controller could detect routing anomalies and coordinate a defensive response in low-power IoT networks.
Original topology from my thesis
I earned an A in MS Thesis II (CS592) at FAST-NUCES, Karachi. These original scenario drawings show how I set up the routing comparison. A sink mote connected the simulated sensor network to the SD-IoT controller. In the single-hop design, sensor motes could reach the sink directly. The multi-hop arrangements used other motes to relay traffic.
Chapter 7 notes that simulated mote placements could differ from the scenario drawings.
How a low-power IoT network routes traffic
A wireless sensor node, or mote, can pass a packet to a neighbour it can reach by radio. If the sink is out of reach, relay motes forward the packet one hop at a time. When a link changes, the network needs to find a usable path again. Packet delivery, delay and control traffic help show how well it does that.
I studied RPL as a point of comparison for my SD-IoT routing design. RPL is an IPv6 routing protocol for low-power and lossy networks. It groups routes around a root in a destination-oriented directed acyclic graph (DODAG). A node’s Rank describes its relative position in that graph, and a route towards the root passes through parents of successively lower Rank. IETF RPL specification (RFC 6550)
In my archived prototype, Contiki’s Rime stack and SDN-WISE packet types carried traffic and reports. The sink linked the wireless simulation to a Java controller, where I could study route selection using a network-wide view. This let me compare what a node knew about its immediate neighbours with what the controller could infer across the topology.
What I built
A sensor sees its own neighbours. A controller that combines reports from several sensors can reason about the network as a whole. My thesis asked how useful that view would be for routing and for recognising unexpected changes.
I developed FARIDA for my MSc thesis, Secure Centralized SD-IoT Routing in IoT Based Network, at FAST-NUCES, Karachi. I used a Java controller to maintain a network view and support route selection. FARIDA added monitoring that compared recent observations with a reference view, and a way for simulated Contiki nodes to apply a controller decision.
The prototype builds on the upstream SDN-WISE project. I evaluated routing performance across three topologies in Contiki/Cooja.
- Observe the networkSimulated Contiki motes report what they see locally.
- Compare network viewsThe Java controller compares recent observations with a reference view.
- Coordinate a responseSimulated nodes apply a decision from the controller.
Intrusion detection and prevention design
The thesis set out to connect intrusion detection (IDS) with intrusion prevention (IPS) in the routing prototype. I put the comparison at the controller and modelled the response in the network.
- Detection in the Java controller
- Combine local reports into a network view and compare recent routing observations with a reference. An exception warrants further investigation. A link fading or a mote moving can also change the topology.
- Prevention in the simulated network
- Coordinate a controller decision to isolate a suspect node and apply it on the Contiki side. Isolating a legitimate relay can cut off other sensors that depend on it, so false isolation is an availability risk in its own right.
- Separate evaluation for detection and response
- My thesis measured routing performance across the three topologies. A follow-on IDS/IPS evaluation would need independently labelled scenarios and separate measurements of false alerts, incorrect isolation, time to enforcement and packet delivery after a response.
What the archived code shows
- Java controller and topology graph
Controller.javaandNetworkGraph.javamatch byte for byte between the July implementation archive and the performance snapshot. The upstream controller integration already provides the bridge, topology graph and basic routing. FARIDA added comparison of recent and reference observations and controller-side review of routing exceptions.- Contiki nodes and the routing stack
- The archived node project uses Contiki’s Rime stack and SDN-WISE packet types. The prototype connected controller decisions to simulated node behaviour. The thesis used RPL as a point of comparison for routing concepts.
- Cooja and measurement tooling
- The archive contains Cooja scenarios, Java measurement code (
ScriptSDNWISE.java) and a workbook covering convergence, packet loss, control overhead, rule installation and delay. The measurement code differs between snapshots, so a rerun needs an exact match between the tool, scenario and log.
Routing threats I studied
FARIDA raised a practical question: when the controller observes a routing change, is there enough evidence to distinguish an ordinary change in connectivity from a security problem?
- Sinkhole defence
- Chapter 6 describes the controller-side defence and how the prototype coordinates a response in the simulated network. See printed pages 64 to 70.
- HELLO flood
- Section 6.8 documents a simulation scenario addressing signalling and neighbour-discovery risk. See printed page 69.
- Other routing threats
- Chapter 3 discusses blackhole, rank attacks and denial of service in the prior work. Chapter 9 identifies wormhole, Sybil and ID cloning as potential extensions. See printed pages 36, 38 and 109.
What the recovered archive supports
The recovered code includes a single-hop Cooja performance scenario and separate regular and simulation test node trees. The performance archive has 32 text log files across 11 run directories, including alternate exports of some runs. The workbook covers convergence, packet loss, control overhead, rule installation and delay. The recovered files do not tie those measurements to individual attack scenarios or establish per-threat detection accuracy.
The thesis archive also retains a paper on wormholes in sensor networks. Chapter 9 identifies wormhole coverage as future work.
This work gave me practical experience tracing packet paths across sensor, relay and sink nodes, relating node observations to the controller graph, and designing routing-security experiments around availability as well as detection.
Historical simulation results
The experiments used eight simulated Tmote Sky motes in 30-minute runs, with idealised transmission and reception settings. The means below summarise the 10 entries per topology in Chapter 8, Table 8.2, printed page 90.
| Topology | Mean PDR | Observed range |
|---|---|---|
| Single-hop mesh | 99.0% | 97.61% to 100% |
| Multi-hop 1 | 73.1% | 68.09% to 77.14% |
| Multi-hop 2 | 79.7% | 73.80% to 82.38% |
Handling ordinary topology changes
I checked mote availability across the three topologies and measured how long the controller took to register a mote being removed or added. I monitored the controller’s online and offline status and its network graph. These tests helped me examine how the controller responds to routine topology changes, which can also produce anomalies. See Chapter 8, printed pages 103 to 107, including Tables 8.14 and 8.15.
What the evidence supports
Packet delivery differed substantially across the three topologies in this simulation. The thesis also records a convergence timing anomaly linked to clock synchronisation and controller startup. The recovered configuration and logs need to be matched to individual runs. The results have no independent reproduction or field validation. Detection accuracy and false-isolation rates would need their own evaluation.
The source is the archived 129-page thesis submission, FINAL REPORT MS FINISH.pdf. Chapters 4 to 6 cover the architecture and prototype, and Chapter 8 records the experiments.
Research direction: machine learning for routing defence
My follow-on research proposal explored energy-efficient IoT security using machine learning alongside software-defined networking. I proposed a separate evaluation in environments using RPL and 6LoWPAN. This direction grew out of the FARIDA prototype.
- Recover one reference run. Match the archived controller, firmware, Cooja scenario and log. Establish a reproducible baseline for delivery, latency and control traffic.
- Test whether a model adds useful context. In an offline simulation study, compare the original rules with a simple interpretable model that flags unusual routing observations for a researcher to review. Hold out entire runs and topologies so near-duplicate observations cannot leak into the evaluation.
- Measure the cost of errors. Test legitimate changes in connectivity, load and node availability. Report false alerts, triage delay and resource cost. Measure detection only where independent labels support it, and keep response decisions under human review.
