Lesson 3 of 3 Logging and Monitoring

Continuous Monitoring, Threat Intelligence and UEBA

Effective monitoring is continuous, tuned and informed by knowledge of adversaries. This lesson covers continuous monitoring and tuning, egress monitoring, threat intelligence and threat hunting, and user and entity behaviour analytics.

Learning outcomes

After completing this lesson, you will be able to:

  • Explain continuous monitoring, tuning and egress monitoring.
  • Describe threat intelligence, threat hunting and UEBA.

Continuous monitoring and tuning

Continuous monitoring watches networks, endpoints, identities and cloud services in near real time, usually through a security operations centre. Baselines of normal activity make anomalies visible. Tuning adjusts thresholds, suppresses known benign activity and adds rules for new threats, so that alerts stay meaningful. Clipping levels set thresholds below which events are not reported, such as allowing a few failed logins before alerting. Poor tuning causes alert fatigue, in which analysts start ignoring alerts.

Tuning is a continuous cycle rather than a one-off task. When a rule produces an alert, the analyst records whether it was a true or false positive. Rules with many false positives are refined, for example by excluding a vulnerability scanner's address from a port scan rule, and every exclusion is documented and reviewed, because an attacker who learns of a broad exclusion can hide behind it. After an incident or a red team exercise, the team asks which activity went undetected and adds detections for it. Clipping levels apply the same reasoning to routine events: one failed login is normal; twenty in a minute for one account is worth an alert.

True or false

Tuning for meaningful alerts

Exam skills 7.2.3

Check how tuning and clipping levels keep alerts meaningful.

Log in to try this activity Interactive activities are free with an account.

Egress monitoring

Egress monitoring watches traffic leaving the network for data exfiltration, command-and-control communication, DNS tunnelling and unauthorised uploads to cloud services. Data loss prevention inspects outbound content for sensitive data, while proxies, firewalls and DNS monitoring show where hosts connect and how much data they send. Encrypted traffic limits content inspection, so organisations use TLS inspection where lawful or analyse metadata such as destinations, volumes and timing. Steganography can hide data inside images or other files, and watermarking can help trace leaked documents.

Metadata analysis can reveal exfiltration even when content cannot be read. Malware that communicates with its operator often connects at regular intervals, such as every 60 seconds with slight variation, a pattern called beaconing that stands out against human browsing. A workstation that normally uploads a few megabytes a day and suddenly sends several gigabytes to a file-sharing service at night is also worth investigating. Egress monitoring is most effective when combined with egress filtering, which limits outbound connections to approved destinations and protocols, so that the remaining permitted traffic is smaller and easier to examine.

Select all that apply

Spotting exfiltration in metadata

Exam skills 7.2.4

Identify metadata patterns that suggest exfiltration or command and control.

Log in to try this activity Interactive activities are free with an account.

Threat intelligence and hunting

Threat intelligence is evidence-based knowledge about adversaries. Strategic intelligence informs executives about trends; operational intelligence describes campaigns and actors; tactical intelligence provides indicators of compromise (IoCs) such as malicious IP addresses, domains and file hashes, and techniques. Threat feeds deliver indicators, often in STIX format over TAXII, from commercial sources, governments and information sharing and analysis centres (ISACs).

Threat hunting proactively searches for attackers who have evaded automated detection, starting from a hypothesis based on intelligence or a technique in MITRE ATT&CK, and turns findings into new detection rules. Indicators age quickly as attackers change infrastructure, whereas detections based on behaviour remain useful longer.

A hunt follows a clear structure: a hypothesis, a search of the data, investigation of the results and conversion of what worked into automated detection.

The difference in how long indicators stay useful is often described as a pyramid of pain for attackers. Changing a file hash or an IP address costs an attacker almost nothing, so detections based on them are easily evaded. Changing the techniques they use, such as how they steal credentials or move laterally, is expensive, so detections based on behaviour force attackers to work much harder.

The following diagram shows the steps of a hypothesis-driven hunt.

A hypothesis-driven threat hunt. Threat intelligence describes an attacker technique; the hunter turns it into a hypothesis about what it would look like in the environment, queries for it and investigates the matches. The query that worked becomes an automated detection, and either result is useful.
Hunts start from intelligence, not from alerts.
Sort into groups

Which level of intelligence?

Exam skills 7.2.6

Classify each piece of threat intelligence by its level.

Log in to try this activity Interactive activities are free with an account.
Worked example

A threat hunt

Threat intelligence reports that attackers in the organisation's sector have recently used scheduled tasks to keep persistence on compromised servers. How would a threat hunter test whether this has happened?

The hunter's hypothesis is that a compromised server would have a scheduled task created outside change windows that runs a script from a user-writable folder. The hunter queries endpoint data for such tasks, investigates each match and either finds a compromise or confirms that the technique is absent.

Either outcome is useful, and the query that worked is turned into an automated detection so that the same technique raises an alert in future.

User and entity behaviour analytics

UEBA builds baselines for users, hosts, applications and service accounts using statistics and machine learning, then flags anomalies such as logins at unusual times, impossible travel between distant locations, access to data the user never touches or unusually large downloads. It is especially valuable against insider threats and compromised accounts, which use valid credentials that signature-based tools do not flag.

UEBA compares each entity both with its own history and with its peers. An engineer who normally accesses five code repositories and suddenly clones two hundred is unusual against their own baseline; a finance clerk who accesses the HR database is unusual against other finance clerks, even if it is their first week. Each anomaly adds to a risk score for the user, and an alert is raised when the combined score crosses a threshold, which reduces noise from single harmless deviations such as working late once.

Behaviour analytics raises privacy questions because it profiles employees' activity. Organisations address this by stating the monitoring in policy, limiting it to work systems, restricting who can see individual profiles and involving HR and legal counsel before acting on an alert about a person.

Scenario questions

Reading UEBA signals

Exam skills 7.2.7

Interpret behaviour analytics in common situations.

Log in to try this activity Interactive activities are free with an account.
Worked example

Detecting an insider

A sales employee who has resigned begins downloading large volumes of customer records from the CRM late at night, using their own valid account. Which capability is MOST likely to detect this?

Signature-based tools see only authorised activity by a valid user. UEBA would flag the deviation from the employee's normal volume and timing of access, especially if enriched with HR data showing the resignation, and egress monitoring with DLP could detect the records leaving the organisation.

Check yourself

What is a clipping level?

Show answer

A threshold below which events are not reported, such as a few failed logins.

Exam Tips

Remember for the exam

  • Tune continuously to avoid alert fatigue.
  • Egress monitoring and DLP detect exfiltration.
  • Threat hunting is proactive; behaviours outlast indicators.
  • UEBA detects misuse of valid credentials.