Skip to main content

What exactly should we be logging?

A structured look at what data to collect for security purposes and when to collect it

Image showing graph amongst trees

petmal via Getty Images

As a security architect and the technical leader for the Logging Made Easy project, I am often asked “what logs should I be collecting?”

I absolutely hate the standard ‘it depends’ response. So, I’ve been answering with a question of my own: “For what?” This has led to a number of interesting discussions on the topic of who should be logging what, and when.

This blog-post is my attempt to extract the wisdom from these conversations. To make this more accessible I’ve chosen to structure these ruminations around the 14 headings used by the Adversarial Tactics, Techniques, and Common Knowledge (ATT&CK) taxonomy, from MITRE.

By the time you’ve finished reading you will have the tools and knowledge to ask the right questions about your systems. You can then identify what log data will help you to spot the activities which attackers are likely to use as they hide, persist and explore your systems.

Available resources

Before getting down to specifics, take some time to think about the logging practices, sources and tools available to you.

Picking the right tool is part of the journey - you wouldn't expect a chef to use a single knife, nor would you expect a developer to work with a single technology stack. You need to decide what are the ‘right tools for the job at hand'.

Doing away with ‘one size’ solutions

The now deprecated Good Practice Guide 13 (GPG 13) attempted to state a minimal expected standard for event logging. Unfortunately, this prescriptive approach turned out to be restrictive because it didn't factor in the varying types of deployments possible and assumed that all logging sources were available and meaningful.

In the face of this problem, it's tempting to just turn your logging capability up to 11 and gather everything you can. This ‘everything on’ approach seems simple, but is likely to waste storage and processing resources, as you handle the inevitable deluge. It is also very likely that you will only increase the noise within your monitoring, making important events harder to detect and respond to.

In case your were wondering, turning event logging off is not the answer either. Unfortunately, there's no one-size-fits-all solution to this problem.

Alternatives to ATT&CK

There are a few different ways to determine the logging set up that is most suitable for you. In this blog-post we’ll be exploring the use of the ATT&CK framework, but there are at least a couple of other approaches:

  • Outcomes based:

    You could begin by agreeing what outcomes you want to be able to achieve with your logs. You may well already have these as they can form part of the key design requirements for a system. An example logging requirement could be: We must be able to tell who was logged on to any system at any specific time in the past year, and whether they logged on locally or remotely.

     

    Many sources of cyber security guidance, including things such as the NCSC’s guidance on protecting bulk personal data and Cyber Assessment Framework (CAF) Objective C, provide some contextualised outcomes.

  • Threat Modelling and Attack Trees:

    In the NCSC's upcoming guidance on How to build a SOC, we use threat modelling and attack trees to identify logging requirements. We then link these newly found logging requirements to the components of the system that would likely be attacked, and identify the corresponding log files that would include the right data.






Written by

Adam B Senior Security Architect