Home / Blog / SIEM and Tools

Beginner SIEM and Tools

Virtual Machines, Containers and Serverless: Where the Logs Hide

A beginner guide to virtual machines, containers and serverless for SOC analysts, built around one shift where the logs live in three different places.

A SOC (Security Operations Centre) analyst used to ask "which server is this?" Today the honest answer is often "it is not a server". This guide explains virtual machines, containers and serverless in plain English, and shows why the words matter the moment you go looking for a log.

Why this trips up new analysts

The pain is not the theory. It is that the same alert can lead to three completely different places depending on how the workload runs, and nobody tells you which one you are in.

  • You get an alert about a host called web-07. You search for its logs by hostname and find almost nothing, because web-07 is a container that lived for four minutes and is already gone.
  • You try to log in and look around the machine, the way you would with a normal server. There is no machine to log in to, because the code ran as a serverless function.
  • You find activity on one host, but it turns out twenty other containers share that same host, so "contain the machine" is a much bigger decision than it looked.

So the first skill here is not deep cloud knowledge. It is recognising which of the three shapes you are dealing with, because that decides where the evidence lives and how fast you must move.

The three shapes in one minute

Here is the plain version, with the one detail that matters for investigations.

  • Virtual machine (VM): a whole pretend computer running on shared hardware. A layer called a hypervisor runs several VMs on one physical host, and each VM has its own full operating system. For you, a VM behaves like an ordinary server: it has a hostname, you can usually log in, and its logs sit where a server's logs normally sit.
  • Container: a packaged application that shares the host's operating system kernel instead of carrying its own. That makes containers small and fast to start, and it is why they often live for seconds or minutes. The catch for defenders: because they share the host kernel, an attacker who breaks out of a container can reach the host and every other container on it.
  • Serverless: you give the cloud provider a piece of code, and it runs that code on demand. There is no machine for you to manage or log in to. Amazon calls this AWS Lambda, Microsoft calls it Azure Functions. "Serverless" does not mean no servers, it means the servers are not yours to see.

If you remember one line: a VM is a computer, a container shares a computer, and serverless hides the computer. The National Institute of Standards and Technology (NIST) describes container security in Special Publication 800-190 if you want the deeper reference later.

A shift that lands in all three

Here is an illustrative example, not a real incident and not personal experience. It shows how the same curiosity plays out across the three shapes in one morning.

09:10, the VM alert

Your SIEM (Security Information and Event Management) tool raises an alert: a new service installed on VM-APP-12 (10.0.4.22). This one is familiar. It is a virtual machine, so it has a hostname, Windows event logs and a place you can look.

A short search lists service installs on that host so you can see the context.

index=wineventlog host=VM-APP-12 EventCode=7045
| table _time Service_Name Service_File_Name
| sort _time
  • Line 1 finds service installation events (event ID 7045) on that one virtual machine.
  • Line 2 shows the time, the service name and the file it runs from.
  • Line 3 puts the oldest first so you can read the order of events.

The service was installed by a patch job with a change ticket. You note it and move on. A VM investigation feels like a normal server, which is exactly why it is the gentle start.

10:30, the container that vanished

Next alert: suspicious process activity on host web-07. You search by hostname and find a handful of lines, then nothing. web-07 was a container, and it has already been replaced.

With containers you stop thinking "log in to the box" and start thinking "ask the orchestrator". Most container platforms are run by Kubernetes, and Kubernetes keeps an audit log of who asked it to do what. It is produced by the central component called the kube-apiserver. As far as I could verify, this audit log is not on by default: someone has to switch it on with an audit policy, so first check that your platform sends it to your SIEM.

If it does, you can ask who created containers recently. This is a plain illustrative filter, not a live query for your exact setup.

index=k8s_audit verb=create objectRef.resource=pods
| table stageTimestamp user.username objectRef.namespace sourceIPs{}
| sort stageTimestamp
  • Line 1 keeps only the audit events where someone created a pod, the Kubernetes name for one or more containers that run together.
  • Line 2 shows when it happened, which user asked, which namespace it landed in, and the source IP address.
  • Line 3 orders the results by time.

Two fields do the heavy lifting here. verb is the action, such as create, delete or exec, and user.username is who asked. A container is gone, but the record of the request to make it is not. That record is now your evidence.

There is also a bigger decision hiding in this alert. Because containers share the host kernel, an attacker breaking out of one to reach the host is a known move. MITRE ATT&CK, a public catalogue of attacker behaviour, calls it Escape to Host (T1611), and deploying a malicious container to run code is Deploy Container (T1610). So "just kill the container" might not be enough if the host itself is now in question. That is a lead you raise, not a call you make alone on your first week.

11:45, the code with no computer

Last one: an alert about odd behaviour from a payment function. There is no hostname. This is serverless, an AWS Lambda function, so there is no machine to open.

The good news is that the logs still exist, they are just kept by the cloud provider. A Lambda function sends its own output to Amazon CloudWatch Logs automatically, into a log group named after the function, usually /aws/lambda/<function-name>. That is the inside view: what the code printed while it ran.

The outside view is different and just as useful. AWS CloudTrail records the control plane, meaning the API calls that create, change or invoke resources. So you use two sources together:

  • CloudWatch Logs tells you what the function did while running.
  • CloudTrail tells you who changed or called the function, and from where.

If the function's logs are suddenly empty, that is itself worth a question, because someone may have changed the function's permissions so it can no longer write logs.

The habit that ties it together

Before you chase any alert on modern infrastructure, ask one question first: is this a VM, a container or serverless? The answer tells you where to look.

  • VM: treat it like a server. Hostname, operating system logs, you can usually log in.
  • Container: the box may be gone. Go to the orchestrator's audit log and read the request, and remember the host underneath it.
  • Serverless: there is no box. Read the provider logs, the inside view and the control plane view together.

Where this fits your studies

On the CompTIA CySA+ exam (CS0-003), virtualisation, containerisation and serverless sit under objective 1.1, System and Network Architecture Concepts. Check CompTIA's official objectives page for the current wording before you lean on any summary, including this one.

To build the muscle, try these, each free or low cost and on machines you are allowed to use:

  1. Install Docker on a test machine, start a container, then stop it, and notice how quickly it appears and disappears.
  2. Read the field names in a sample Kubernetes audit event (user, verb, objectRef, sourceIPs, stage) so they are familiar before you meet them under pressure.
  3. In a free AWS account, create a tiny Lambda function, run it, and find its logs in CloudWatch under /aws/lambda/.
  4. Read the first few pages of NIST SP 800-190 to see how a standard frames container risk.

Many of these workloads are controlled by identities and roles, so the same curiosity carries into identity work. If that side interests you, you can keep practising with the identity focused material at Identity Bytes Labs.

The shapes will keep changing, but the question underneath stays the same: what ran, who asked for it, and where did it leave a trace.

Written by Ben, Cybersecurity Student

Keep going

More in SIEM and Tools

IntermediateSIEM and Tools

What an Agentic SOC Is and Where Human Approval Fits

AI triage agents are reaching SOC queues. Learn what an agentic SOC is, how NCSC oversight models apply, and where analysts approve, review and own the outcome.

9 Nov 20268 min read