Level 2 of 7 · 12 lessons
AI in cybersecurity defence
Where machine learning genuinely helps defenders, where it quietly fails, and why a person still signs the decision.
Suggested study time: 10 hours, including the lesson checks.
- Patterns at scaleModels sort volume that people cannot read.
- Behaviour, not just rulesBaselines reveal the odd request.
- False positives costEvery alert spends a person's attention.
- Assist, never abdicateA human owns the outcome.
0 of 12 lessons marked done in this level. Progress stays in this browser.
Lessons
Open a lesson, read the short explanation, then answer the check. Each lesson links onward at the bottom of the level.
1. How AI supports security work
Models help with volume, language and pattern matching. They do not supply judgement.
Security teams use AI for four jobs: sorting large volumes of events, recognising patterns across many signals, reading and summarising text such as alerts and reports, and generating candidate responses for a human to check. Each job has a measurable baseline, which is what makes the tool worth buying or not.
Success is not that the model is impressive. It is that analysts close more real incidents, faster, with fewer missed detections. Agree the measure before deployment, then compare the model against your current process on the same data.
- Use AI for volume, patterns, language and drafts.
- Measure against the existing process.
- Keep a person accountable for decisions.
2. Machine learning for threat detection
Supervised models learn from labelled examples, and inherit the quality of those labels.
Supervised learning trains a model on examples marked malicious or benign. It can then score new events. Its accuracy depends on the labels, the balance of classes and whether the future looks like the training data. Attackers change behaviour, so models drift.
Unsupervised approaches group similar events without labels and highlight outliers. They need interpretation, because an outlier is not automatically an attack. In practice, good detection combines rules, models and human review, with each failure mode covered by another layer.
- Labels decide quality more than algorithms do.
- Expect drift as attacker behaviour changes.
- Combine models with rules and review.
3. Anomaly detection
Anomalies are differences from a learned normal, and normal differs by time and place.
Anomaly detection builds a baseline for a user, device or service and flags departures from it. A login at 3 a.m. is ordinary for a night-shift nurse and strange for an office worker. Seasonal patterns, new starters and system changes all create false alarms if the baseline is naive.
Tune by combining signals: impossible travel, unusual data volume, first-seen device, privilege use. Rank anomalies rather than listing them. A queue of five hundred anomalies is the same as no queue at all.
- Baselines must be per role and per season.
- Combine signals to cut noise.
- Rank findings, never dump them.
4. Behavioural analysis and UEBA
User and entity behaviour analytics watch what accounts do, not only where they log in from.
Behavioural analysis profiles how an account normally works: which systems, how much data, at what times, from which devices. It then scores activity that departs from that profile. This catches stolen sessions and insider misuse that look legitimate to a password check.
The privacy line matters. Behaviour monitoring should be proportionate, documented and limited to work systems. Tell staff what is collected. Retain scores no longer than needed, and require human investigation before any disciplinary or blocking action.
- Profile accounts, not just locations.
- Document the privacy boundary and tell staff.
- A score is a reason to investigate, not a verdict.
5. Automated threat intelligence
Threat feeds help most when they answer a question you already asked.
Threat intelligence describes adversaries, their tools and their targets. Automation collects indicators, enriches alerts and keeps blocklists current. Value comes from relevance: an indicator about a sector you are not in, or a campaign from three years ago, adds work without reducing risk.
Define intelligence requirements first. Then select feeds, set confidence thresholds and expiry for indicators, and record where each indicator came from. Use the same enrichment in detection and in hunting, so the two do not drift apart.
- Start from questions you need answered.
- Expire indicators or the list rots.
- Record the source and confidence of every indicator.
6. AI in email security
Email remains the main delivery route, so language models earn their place there.
Email filters already use machine learning to score sender reputation, content and links. Newer systems read intent and tone, detect impersonation of known contacts and spot conversation patterns used in payment fraud. They complement authentication checks such as SPF, DKIM and DMARC.
Attackers adapt by using legitimate services, short messages and voice follow-ups. So the control set must include user reporting, link isolation, attachment sandboxing and a fast route to remove a message from every inbox after a report.
- Pair content models with sender authentication.
- Make reporting one click for staff.
- Practise removing a bad message from all inboxes.
7. Fraud detection
Fraud models score transactions in context, and must explain enough to act on.
Fraud detection combines rules and models to score transactions by amount, device, location, velocity and history. In mobile money and banking, the cost of a false decline is a frustrated customer, while the cost of a missed fraud is a loss and a complaint. The threshold is a business decision.
Good systems show the reasons behind a score, allow a challenge such as a confirmation step, and feed confirmed outcomes back into the model. Watch for bias against groups who behave differently for legitimate reasons, such as new arrivals or informal traders.
- Tune thresholds against real business costs.
- Show reasons, not only scores.
- Feed confirmed outcomes back into the model.
8. Network traffic analysis
Flow data shows who talked to whom, how much and how often, without reading content.
Network analysis uses flow records, DNS queries and packet captures to find unusual communication. Models can baseline volumes per service and flag beaconing, large transfers or first-seen destinations. Encryption limits content inspection, so metadata becomes more important, not less.
Start with asset inventory and expected flows. Then alert on what should never happen, such as a database reaching the internet, before alerting on statistical oddities. Keep captures short and access-controlled, because packet data can contain personal information.
- Inventory assets before analysing flows.
- Alert first on forbidden flows, then on odd ones.
- Treat captures as personal data.
9. AI-assisted vulnerability management
Scanners produce lists. Risk comes from what is reachable, exploitable and important.
Vulnerability management finds, prioritises and fixes weaknesses. AI helps by deduplicating findings, predicting exploitability, mapping findings to assets and drafting fix guidance. It does not remove the need to verify a patch or test that a service still works.
Prioritise by exposure, exploit availability, business criticality and compensating controls. Publish a remediation rhythm that teams can meet. A short list that gets fixed beats a long list that gets ignored.
- Prioritise by exposure and criticality, not count.
- Verify that the fix closed the finding.
- A fixable rhythm beats a perfect list.
10. Predictive security analytics
Forecasting risk is useful for planning, and unreliable as a promise.
Predictive analytics estimates which assets are likely to be attacked or to fail, using exposure, history and threat activity. It supports budgeting, patching order and control placement. It cannot predict a specific novel attack, and should never be presented as certainty.
Use predictions to rank work, state confidence ranges, and review the model against outcomes each quarter. Where the model is wrong, record why. That record is more valuable than the score.
- Use forecasts to order work, not to promise outcomes.
- Publish confidence, not single numbers.
- Review predictions against what actually happened.
11. Limitations and false positives
Every detection has an error rate, and the cost lands on an analyst's attention.
Models fail in predictable ways: they miss novel attacks, flag harmless change, inherit bias from labels, and degrade when the environment shifts. False positives are not free. They consume the hours that real incidents need, and they teach staff to ignore alerts.
Measure precision and recall on your own traffic, review a sample of alerts every week, and keep a route for analysts to correct labels. Track mean time to triage as a first-class metric. If a detector cannot be tuned, retire it.
- Track precision and recall on real traffic.
- Alert fatigue is a security failure.
- Retire detections nobody can tune.
12. Human oversight
Automation is fine for reversible actions. Irreversible actions need a person.
Decide which actions a system may take alone. Blocking a known bad domain is reversible. Disabling an account, isolating a server or deleting data is not. Put approvals, rate limits and audit logs around anything that can stop work or destroy evidence.
Oversight must be real. A reviewer who approves two hundred suggestions an hour is a rubber stamp. Sample decisions, measure agreement, and give reviewers the context and authority to say no.
- Automate reversible actions first.
- Require approval for disruptive or destructive actions.
- Audit the reviewers as well as the model.