DEV Community

Cover image for Monitoring, Detection, and Response: The Watchers That Make Defence Possible
VickkyKruz NetSec
VickkyKruz NetSec

Posted on Originally published at vickkykruzprogramming.dev

Monitoring, Detection, and Response: The Watchers That Make Defence Possible

In the last post we arrived at the central discipline of modern security: defence in depth, built on the assumption that no single wall holds, that breaches will happen, and that the job is to contain them when they do. But read that carefully and you will notice a promise we made and did not yet keep. To contain a breach, you have to know it is happening. And knowing is not automatic. An attacker inside your network does not send a notification.

This is the uncomfortable gap at the centre of security, and it is the subject of this post. All the walls in the world are worthless if nobody is watching them. A firewall that silently fails, a compromised laptop quietly spreading, an attacker patiently moving from system to system, none of it matters how many layers you built if no one ever notices. The defining principle here is simple and absolute: you cannot defend what you cannot see. The dark network, the one nobody is watching, is the vulnerable one, no matter how many firewalls guard its edge.

So this post is about visibility and the actions that follow from it, in four stages that together form the living, operational side of security. Monitoring, knowing what is happening and what normal looks like. Detection, spotting the attack in the noise. Prevention, deciding whether to block it automatically. And Response, what you actually do once you know. And because this post is about catching attacks, it is also, satisfyingly, the place where the SYN flood, the ARP poisoning, the port scan, and the hijack from earlier posts all return, no longer as threats to fear but as patterns you can recognise.

alt The Four Stages


Monitoring: You Can Only Spot the Abnormal If You Know the Normal

Everything begins with monitoring, because monitoring is what produces the raw material, the visibility, that detection and response depend on. Monitoring is the continuous gathering of information about what is happening on a network and its systems, and it comes from two main sources.

The first is logs. Nearly every system, device, and application keeps a record of what it does: who logged in and when, what connections were made, what errors occurred, what was accessed. Logs are the network's memory, the written account of events after they happen. On their own, scattered across hundreds of machines, they are nearly useless, but gathered and read, they are the single richest source of truth about what took place.

The second is traffic monitoring: watching the flows of data across the network itself, who is talking to whom, on what ports, in what volumes, in what patterns. This is the live view, the network's pulse, as opposed to the logs' written history.

But raw monitoring data, logs and flows, is just a firehose of facts. What turns it into something useful is one deceptively powerful idea: the baseline. A baseline is a picture of what normal looks like for your particular network. Normal volumes of traffic, normal connection patterns, normal login times, normal behaviour for each system. And here is why it matters so much: you can only recognise the abnormal if you already know the normal. An attack, almost by definition, is a deviation from normal. Without a baseline, a malicious spike looks like any other number. With one, it stands out.

This is the moment the whole series starts to pay off, because every attack we studied is, from the monitoring point of view, an anomaly against a baseline. The SYN flood from the TCP post is a sudden, massive spike in half-open connections, wildly abnormal against a normal connection pattern. The amplification attack is a flood of traffic volume far outside the baseline. The ARP poisoning from the quiet-protocols post shows up as a device suddenly claiming an IP address it never held before, or two machines claiming the same one. A port scan, the ICMP-driven reconnaissance we described, is one source methodically touching many ports in a pattern no legitimate user produces. The BGP hijack is a route for your addresses appearing from an origin that has never announced them. None of these announce themselves. All of them are visible, as anomalies, to someone who knows what normal looks like and is watching for the deviation. Monitoring is how the invisible becomes visible.

alt Every Attack We Studied, as an Anomaly (the payoff diagram)


Prevention: Detecting Versus Actually Blocking

An IDS detects and alerts. But an alert is just a warning: something has to happen next, and in the time it takes a human to read an alert and react, the attack may already have succeeded. This gap motivates the IDS's more aggressive sibling: the Intrusion Prevention System, or IPS.

The difference is one of position and power. Where an IDS sits to the side and only watches, an IPS sits inline, directly in the path of traffic, so that everything flows through it. This placement lets it do what an IDS cannot: not just detect an attack but actively stop it, in real time, with no human in the loop. It can drop the malicious packets, reset the connection, or block the offending address outright, the instant it decides something is an attack.

That power is genuinely valuable, because it removes the deadly delay between detection and response. But it comes with a real and double-edged risk, and the honesty of this series demands we name it. An IPS acts automatically on its own judgement, which means when it is wrong, it is wrong in real time, on live traffic. A false positive in an IDS produces an unnecessary alert someone can dismiss. A false positive in an IPS blocks legitimate traffic, cutting off real users or breaking a real service, automatically, with no one to catch the mistake first. And because the IPS sits inline, in the path of everything, if it fails, it can take the whole network down with it. This is why prevention is powerful but must be deployed with great care: the same automation that stops an attack in milliseconds can, if miscalibrated, inflict an outage just as fast. In practice, teams often run a new IPS in detection-only mode at first, watching what it would have blocked, and only let it act automatically once they trust that its judgement will not strangle legitimate traffic.

alt Signature vs Anomaly Detection, and IDS vs IPS


Response: Detection Is Useless Without Action

Here is a truth that the glossy security-product world tends to gloss over: detection without response is just expensive sadness. An alert that no one acts on changes nothing. The whole point of seeing the attack is to do something about it, and that doing is incident response, the structured process of reacting to a confirmed security incident.

Incident response follows a lifecycle, and while different frameworks name the steps slightly differently, the shape is consistent: you detect that something is wrong, you contain it to stop it spreading, which is exactly the segmentation and isolation thinking from the last post applied in anger, you eradicate the threat by removing the attacker's foothold, and you recover by restoring affected systems to normal and verifying they are clean. Around that core sit preparation beforehand and a lessons-learned review afterwards, so the next incident is handled better. It is firefighting, professionalised: contain the blaze, put it out, repair the damage, work out how it started.

And now the honest, sobering part, because the numbers here are genuinely humbling. The hardest problem in all of this is not responding to attacks, it is noticing them in the first place, in time. The period between an attacker getting in and anyone discovering them has a name, dwell time, and historically it has been frightening. A little over a decade ago, the global median dwell time was reportedly well over a year, attackers living inside networks, undetected, for hundreds of days. It has improved enormously since, with recent industry reports putting the global median at around ten days, but the improvement is uneven and the gap tells a story: organisations with round-the-clock monitoring detect intrusions in a fraction of the time of those without. And perhaps the most uncomfortable statistic of all is how breaches get discovered. A large share are still found not by the victim's own tools at all, but by an outside party telling them, or, bleakest of all, by the attacker announcing themselves through a ransomware demand. Every extra day of dwell time is more time for lateral movement, more compromised accounts, more stolen data, and a measurably higher cost. The entire discipline of monitoring and detection exists to drive that number down, and it remains one of the hardest problems in the field.


Putting It Together: The SOC and the SIEM

In a serious organisation, monitoring, detection, and response are not scattered tools but a coordinated operation, and two things tie them together.

The first is the SIEM, Security Information and Event Management. Remember that logs are useless scattered across hundreds of machines. A SIEM is the system that gathers all of them into one place, from endpoints, servers, network devices, firewalls, identity systems, everywhere, and then correlates them. Correlation is the magic: a failed login here, an odd connection there, a strange process somewhere else, each meaningless alone, can together form the unmistakable signature of an attack in progress. The SIEM is where the scattered facts of the whole network are assembled into a picture, and where detection rules watch that combined picture for trouble.

The second is the SOC, the Security Operations Centre: the team of human analysts who actually watch, investigate, and respond. This is the human heart of the whole discipline, and it matters because no tool is good enough to run unattended. The SOC analyst is the one who separates the real threat from the thousand false alarms, who investigates the ambiguous alert, who decides when to hit the alarm and start incident response. The tools provide visibility; the humans provide judgement.

And this is where the honest limits of the whole enterprise come into focus, because they are human limits as much as technical ones. There is alert fatigue: analysts flooded with far more alerts than anyone can investigate, most of them false positives, with the terrible risk that the one real threat is dismissed along with the noise. Studies have found analysts spend a large fraction of their time chasing false positives, and that exhaustion is itself a vulnerability. There is the evasion arms race: attackers constantly evolving to slip past detection, which is why no detection system is ever finished. And there is the encryption problem we met with firewalls, now biting detection too: more and more traffic is encrypted, which protects users but also blinds the watchers, who cannot inspect what they cannot decrypt. The tools are essential, but they do not replace skilled people, and anyone who tells you a product alone will keep you safe is selling something.

alt Dwell Time and the SOC/SIEM Reality


Commands to See It Yourself

Your own machine is logging and monitoring constantly. You can watch it.

Read your system's logs, the memory of what happened:

journalctl -xe              (recent system logs with explanations, on Linux with systemd)
journalctl -f               (follow new log entries live as they happen)
Enter fullscreen mode Exit fullscreen mode

Look specifically at authentication, who tried to log in:

sudo journalctl -u ssh            (SSH login activity)
sudo lastb                        (recent failed login attempts: a quiet record of people knocking)
last                              (recent successful logins)
Enter fullscreen mode Exit fullscreen mode

Run sudo lastb on any internet-facing machine and you may be surprised how many failed logins there are. That is the constant background noise of automated attacks, and seeing it is a small lesson in why monitoring matters.

Watch live connection activity, the network's pulse:

sudo ss -tunp               (current connections and the processes behind them)
Enter fullscreen mode Exit fullscreen mode

Going further, the tools the professionals use are worth knowing by name even if you only explore them lightly: Wireshark for deep inspection of captured traffic, Zeek for turning network traffic into rich logs, and Suricata as an open-source IDS and IPS you can actually run yourself. Pointing any of them at your own traffic for an afternoon teaches more about what a network really looks like than any amount of reading.


What You Now Understand

You came in with a promise from the last post that needed keeping: that defence in depth assumes breaches and must detect them. Now you know how.

You understand that it all rests on one principle, you cannot defend what you cannot see, and on four stages. Monitoring gathers the raw visibility, logs and traffic flows, and turns it into something useful through a baseline of normal, against which every attack in this series, the SYN flood, the amplification, the ARP poisoning, the port scan, the hijack, shows up as an anomaly. Detection identifies the attack with an IDS, using signature-based matching that is precise but blind to the new, anomaly-based detection that catches the new but drowns you in false positives, and in practice both together. Prevention steps up to an inline IPS that can block automatically, powerful because it closes the gap between seeing and acting, risky because a false positive now breaks real traffic in real time. And response, through the incident lifecycle of detect, contain, eradicate, recover, because detection without action is worthless, shadowed by the sobering reality of dwell time, the long stretch attackers so often go unnoticed.

And you understand how it comes together operationally: the SIEM correlating the scattered logs of the whole network into one picture, the SOC of human analysts providing the judgement no tool can, and the honest limits, alert fatigue, the evasion arms race, and encryption blinding the watchers, that mean technology never replaces skilled people.

But notice the one assumption underneath this entire post, because the finale is about to overturn it. Everything here, all the monitoring and detecting and responding, is built around watching for intruders who have gotten past the perimeter into a network we still, at some level, treat as having an inside and an outside. We are watching the trusted interior for signs of betrayal. The next and final post asks the radical question that follows naturally from everything this series has found: what if we stopped trusting the interior at all? What if nothing, inside or outside, was ever trusted by default, and everything had to prove itself, continuously, every time? That is Zero Trust, the destination this whole series has been walking toward, and it is Post 14.


This is Post 13 of the Networking Foundations series. If monitoring, detection, and response finally make sense as the living heart of security, and you can see how every attack we studied becomes something you can catch, share it with someone who thinks security is just about building walls. New here? Start with Post 1, and Post 12 on firewalls and defence in depth leads into this one. Subscribe to our newsletter to get the finale as it publishes.

Top comments (0)