CSE Roadmap

Common tier · about 3 hours · 12 parts

Part 2 of 12 · 2 min read

A crossing with no control is worth finding before any attack list

Of everything a diagram can show, the one thing worth flagging first is a line that goes from less trusted to more trusted with nothing standing in the way.

Think of walking a building's floor plan and marking every door that opens from the public lobby straight into the vault, with no lock. You do not need to know what a burglar might do yet. You already know that door is the first thing worth fixing.

An asset is something worth protecting, a trust boundary is a line across which data moves between different levels of trust. A flow that crosses from a less trusted node to a more trusted one with no recognised control is a structural finding you can make from the diagram alone, before enumerating a single specific threat.

A worked example. The fictional support agent's data-flow diagram has 7 nodes and 6 flows. Before any controls are added, exactly 3 flows cross from a less trusted node to a more trusted one with nothing in their control set: customer to agent, web content to agent, and agent to tools. Adding validation to the customer flow, quarantine to the web flow, and authorisation plus approval to the tools flow clears all three -- the check goes from 3 flagged crossings to 0 using the same structural rule, not a new list of attacks.

The key lines. From code/mini-threats/threats.py:

# from code/mini-threats/threats.py
def unmitigated_crossings(system):
    """Flows from a less trusted node to a more trusted one with no recognised control, ranked by destination sensitivity then trust gap."""
    bad = []
    for f in system.flows:
        s, d = system.nodes[f.src], system.nodes[f.dst]
        gap = TRUST[d.trust] - TRUST[s.trust]
        if gap > 0 and not (f.controls & CONTROLS):
            bad.append((f"{f.src}->{f.dst}", f.label, d.sensitivity, gap))
    return sorted(bad, key=lambda x: (-x[2], -x[3], x[0]))

Read it as: the function needs only the trust levels of the two endpoints and whether f.controls intersects the known CONTROLS set. It does not know or care what the attack would actually look like. That is exactly why it can run before a single specific threat has been named. It is checking a structural property of the diagram, not predicting behaviour.

Asset, trust boundary, data-flow diagram

An asset is something worth protecting, such as customer data or the ability to issue a refund. A trust boundary is a line across which data moves between different levels of trust. A data-flow diagram (DFD) shows external actors, processes, data stores and flows, with trust boundaries marked.

Example: "3 flows flagged, 0 after controls" is the DFD and trust boundaries doing real analytical work -- the diagram alone, with no threat list yet, already told you where to look first.