Network, Mobile, and Cloud Forensics Questions
Forensics across specialized evidence sources. Covers network forensics and traffic-log analysis, mobile device forensics, cloud and virtual-environment investigation, cloud storage and synchronization forensics, and Internet-of-Things device forensics. The specialization layer for evidence that does not live on a single seized disk.
You're investigating a suspected intrusion, and you have both an on-premises Windows server and an AWS EC2 Linux instance in scope. How does your evidence collection strategy differ between the two, and why? Think about what you'd actually have available to you in each case and what order you'd move in.
Sample Answer
Direct answer
The strategies diverge mainly on what's physically reachable: with the on-prem Windows server you can walk up to it, so live memory acquisition and a full disk image taken through a write-blocker, a piece of hardware that sits between the drive and your workstation and lets reads through while physically refusing to pass any write back to the source, are both realistically on the table in a way they simply aren't for a cloud instance you can't touch. With the EC2 Linux instance, you're acquiring everything through AWS's own mechanisms, live memory over a remote session if you can get a matching kernel module in place, and disk state via an EBS snapshot rather than a physical image, EBS being the network-attached block storage that serves as an instance's disks, so the copy is requested through the API instead of taken off physical media, while also picking up cloud-native evidence (CloudTrail, VPC Flow Logs) that the on-prem server has no equivalent of.
Structured elaboration
What's actually available to you, and why that drives everything else. On the Windows server, you have physical or at least local console access, meaning tools like a RAM-capture utility can be run directly, and a full disk image can be taken with a write-blocker to guarantee you're not altering the source. You also get the Windows-specific artifact set: Event Logs, the registry, Volume Shadow Copy snapshots that may hold earlier point-in-time states of files, and $MFT/prefetch data ($MFT is the NTFS master file table, the volume's own index of every file on it, including entries for files that have since been deleted, and prefetch files are Windows' record of which executables were run and when). None of that has a direct equivalent on the EC2 instance. For the EC2 Linux instance, you have no physical access at all, acquisition has to go through AWS's control plane, an EBS snapshot for disk state (crash-consistent, taken without needing to stop the instance) and, for live memory, a remote session (SSM Run Command or equivalent, where an AWS agent already running inside the instance picks up a command you post to the API, so you never open a network path to the box yourself) running an acquisition tool that needs a kernel module or agent matching the running kernel version exactly, which is a real practical constraint physical acquisition doesn't have.
Order of operations, and why it differs. On the Windows server, you'd typically go memory first (most volatile, lost on any reboot), then the disk image, since both are achievable without materially changing the state of anything you haven't already captured. On the EC2 instance, the practical order is often EBS snapshot first, since it's fast, doesn't require the instance to keep running, and gives you a safety net, followed by a live memory attempt if the instance is still up and you can get a compatible acquisition tool onto it in time, since the window to do that shrinks the longer the compromised instance stays running (and staying running itself carries risk).
What each environment gives you that the other doesn't. The EC2 instance comes with cloud-native evidence the Windows server simply has no analog for: CloudTrail (who did what through the AWS API, including anything that touched this instance's configuration or IAM role), VPC Flow Logs (network activity independent of anything logged on the host itself), and the instance's own metadata/IAM role usage history. The Windows server's advantage is depth and certainty of local artifacts, a full disk image you personally verified with a write-blocker is about as forensically solid as evidence gets, versus an EBS snapshot where you're trusting AWS's snapshot mechanism to have captured a consistent point-in-time state.
Worked example
Concretely: on the Windows server, you plug in a write-blocker, image the full disk, and separately run a RAM-capture tool locally, both completed in your physical presence and independently hash-verified by you. On the EC2 Linux instance, you request an EBS snapshot through the AWS console or CLI with no physical step involved at all, and if you also need live memory, you open a remote session and run an acquisition tool matched to that instance's exact running kernel version, a mismatched module will either fail outright or, worse, produce an unreliable capture you can't fully trust.
Trade-offs and pitfalls
The mistake to avoid is applying on-prem instincts to the cloud instance, reaching for a physical-acquisition mindset (wanting to "image the disk" the traditional way) when the actual available and forensically appropriate technique is an EBS snapshot plus cloud-native logs. The reverse mistake, treating the on-prem server as if cloud logging exists for it, undercuts your evidence by implying you looked for artifacts that were never going to be there. Order of volatility, the rule that you collect whatever disappears soonest first, still governs both, but what's physically achievable, and in what order without losing the more volatile evidence first, is genuinely different between the two.
A suspicious account in your AWS environment has been used to upload sensitive company files to an external S3 bucket. Walk me through your forensic plan: what logs and artifacts you would go after, how you would preserve them so they hold up legally, and how you would tie what you find in AWS back to evidence on the compromised host.
Sample Answer
Direct answer
The plan has to run on two tracks at once: pull and preserve the cloud-provider-side evidence (identity and access logs, S3-specific object and access logs, network flow logs) before it ages out of retention, while simultaneously pulling host-side evidence off the compromised machine so you can tie the AWS-side activity back to a specific process, user, or credential on that host. Everything gets collected under least-privilege, read-only access, with hashes and a documented chain of custody (an unbroken written record of who held each piece of evidence, when, and what they did to it) from the moment it's pulled, because this kind of evidence rarely stays only inside AWS, it ends up compared against endpoint and network data and, often, presented in a written report to people who weren't in the room for the collection.
Structured elaboration
Cloud-side artifacts, and how to validate rather than just trust them. Start with CloudTrail: management events show who assumed which role or used which access key, data events (which must be explicitly enabled for S3, they're not on by default) show the actual GetObject/PutObject calls against the bucket. Pull S3 server access logs and, if the destination is a bucket you don't control, VPC Flow Logs, the connection-level record of traffic entering and leaving the account's virtual network, for the network path the exfiltration took. Don't take provider-supplied data at face value: request it through the account's own logging pipeline (not screenshots or a support ticket summary) and validate it, CloudTrail supports log file integrity validation using SHA-256 digests that are themselves signed, so you can cryptographically confirm a delivered log file hasn't been altered since CloudTrail wrote it. Pull CloudWatch (metrics and any custom application logging that fed into it) as a secondary artifact source, it often has finer-grained timing than CloudTrail's near-real-time-but-not-instant delivery. Frame the analysis around attribution from the start, whose IAM principal (IAM is AWS's identity and permissions system, and a principal is the specific user or role an action was carried out as), whose access key, whose source IP, so every artifact you collect is being evaluated against "does this identify or corroborate who did it," not just "does this show that something happened."
Host-side artifacts, collected in parallel. On the compromised host (or the instance the suspicious account was operating from), pull what tells you how the credentials were obtained or used locally: process and network state if it's still live, a packet capture or Zeek-style connection/DNS logs if you have monitoring in place (Zeek watches network traffic and writes one summary record per connection and per DNS lookup instead of storing the raw packets, which is why it survives on disk long enough to be useful weeks later), and osquery or equivalent host telemetry for process lineage and file access around the time of the upload. This is what actually connects an AWS API call to a human action, CloudTrail tells you an access key made a call, host evidence tells you which process, on which machine, used that key.
Preservation and legal constraints while you collect. Operate under least-privilege, read-only roles for the collection itself, you're not trying to fix anything yet, you're trying to not become part of the story. Snapshot EBS volumes, the virtual disks attached to an AWS instance, for consistency before you start pulling files off a live host, so your host-side evidence reflects one coherent point in time rather than a moving target. If a legal hold applies, make sure it explicitly covers the relevant log retention settings and S3 lifecycle policies, a CloudTrail trail or an S3 bucket with an aggressive lifecycle-expiration rule can quietly delete the evidence you need before you've pulled it, so extending retention or exporting to a separate, access-controlled bucket is often the first action, not an afterthought.
Tying it together and reporting it. Cross-team coordination matters here as much as the technical collection, security needs to scope what happened, legal needs to weigh in on preservation obligations and any external disclosure requirements, and the timeline you build has to be defensible to both. When you validate the integrity of what you collected, use ETags carefully. An ETag is the short fingerprint string S3 records against every stored object, and how it is computed depends on how the object was written: for a simple, single-part upload not encrypted through KMS (Key Management Service, the AWS service that stores and controls encryption keys) the ETag matches the object's MD5 hash and is directly useful for verifying you have the exact bytes that were exfiltrated, but for a multipart upload or an SSE-KMS-encrypted object (server-side encryption, where S3 itself encrypts the object using a KMS key) the ETag is not a straightforward MD5, it's derived from the individual part hashes plus a part-count suffix (or an opaque value under KMS), so you compute and record your own hash of anything you download rather than assuming the ETag alone proves integrity in every case. The output is usually a written forensic report: represent chain of custody as a table (artifact, source, collector, timestamp, hash) rather than prose, so a reader who wasn't present can verify every claim traces back to a specific, hashed piece of evidence.
Worked example
Say the suspicious account is an IAM user whose access key shows up in CloudTrail making a burst of s3:GetObject calls against an internal bucket, followed by s3:PutObject calls against an external bucket owned by a different AWS account. Your first two pulls are the CloudTrail events for that access key ID across the relevant time window (validated against their signed digest files) and the S3 server access logs for both buckets. Be careful how you join those two: a request ID is a string S3 generates to uniquely identify one request, so it links a server access log line to the CloudTrail data event for that SAME call, and it does NOT link a GetObject on the source bucket to a PutObject on the destination, which are two separate requests carrying two separate IDs. The read-to-write correlation has to be built from the fields the two requests genuinely share: the same access key ID or assumed-role principal, the same source IP and user-agent string, matching object keys and matching object sizes, and a read that consistently precedes its write by a plausible interval. State which of those actually matched and which did not, because an exfiltration finding resting only on 'these happened around the same time' is far weaker than one where principal, key name, byte count and ordering all line up. In parallel, you pull EDR (endpoint detection and response, the security agent installed on a host that continuously records process launches, file access, and network connections) or osquery process history from the host where that access key's credentials were configured, looking for what spawned the AWS CLI or SDK call, an interactive shell session, a script, a compromised CI job, since that answers "how" and "who," not just "what."
Trade-offs and pitfalls
The single most common gap is not enabling S3 data events before an incident happens, without them CloudTrail shows you role assumption and console activity but not the actual object-level reads, so if that's the case here, say so plainly rather than implying you have full visibility you don't. The second is treating cloud logs as self-authenticating just because they came from AWS's console, always validate the digest chain and record what you validated. And don't let the multi-cloud instinct narrow to AWS-only habits, or to raw compute (IaaS) only, the same shape of plan, identity/access logs, provider-native network flow logs, host-side telemetry, applies whether the environment is AWS, GCP, or Azure, and whether the workload is IaaS compute you have host access to or a PaaS-managed service where you're relying entirely on provider-side logging, the artifact names change (CloudTrail versus Azure Activity Log versus GCP Cloud Audit Logs) but the evidentiary logic doesn't.
Walk me through your general process for collecting digital evidence from a cloud-hosted environment, AWS, Azure, or GCP. What do you prioritize preserving first, and how do you make sure the chain of custody and forensic soundness hold up once everything's collected?
Sample Answer
Direct answer
The process is the same shape regardless of provider: identify everything in scope across accounts and regions, preserve the most time-sensitive and access-controlled artifacts first (before retention windows or lifecycle policies remove them), acquire through the provider's own export/logging mechanisms rather than ad hoc screenshots or manual copies, and document a chain of custody (an unbroken written record of who handled each artifact, when, and under what authority), with hashes, at every handoff. What you prioritize preserving first is anything that expires or that an attacker with residual access could still delete or disable, identity and access logs (AWS CloudTrail, which by default records management, meaning control-plane, API activity in an account, with data-plane events such as object-level storage reads and writes captured only where data events were explicitly enabled beforehand, plus its equivalents Azure Activity Log and GCP Cloud Audit Logs, which draw the same control-plane versus data-plane line) and any active legal holds or retention extensions on them. Work out which side of that line the evidence you need sits on before you conclude you have coverage of it.
Structured elaboration
Scope and identify first. In a cloud environment "the evidence" isn't a single machine, it's spread across accounts, projects, regions, and services (compute, storage, managed databases, and IAM, the provider's identity and access management service that decides which person or system is allowed to do what). Before collecting anything, map what's actually in scope: which accounts/subscriptions/projects, which regions, and which service-level logs exist for each (not every service logs the same way, or logs at all, by default).
Preserve before you lose the option to. The first concrete action, before deep analysis, is usually to extend or lock retention on logging that would otherwise expire or be overwritten (CloudTrail trail retention, Azure Activity Log's default 90-day window, GCP audit log retention), and to apply a legal hold (a formal instruction that overrides the normal deletion and rotation rules because the data may be needed as evidence) or move copies of relevant logs into separate, access-restricted storage that isn't subject to the same lifecycle policies as production data. If an attacker still has active credentials, this is also the moment to consider whether preserving evidence conflicts with the need to cut off ongoing access, revoking access can also alert the attacker or trigger destructive behavior, so this decision usually involves more than just the forensic examiner.
Acquire through provider-native, verifiable channels. Export logs and artifacts through the provider's official API or console mechanisms rather than manual copy-paste, so you get complete, unaltered records, and where the provider offers cryptographic integrity validation (signed log digests, or object versioning with immutability locks, where every write is kept as its own retrievable version and the lock stops anyone deleting or overwriting it for a set period), use it. Snapshot volatile or running resources (VM disk snapshots, managed database point-in-time snapshots) so your evidence reflects a coherent moment rather than a system that kept changing under you.
Chain of custody, end to end. Hash every artifact at the moment you pull it, record who collected it, from where, under what authority, and store that alongside the artifact itself. Because cloud evidence usually gets compared against host-level or third-party evidence later, and often ends up summarized in a written report for people who weren't part of the collection, the documentation needs to stand on its own, a reader should be able to trace any claim in your report back to a specific, hashed piece of evidence and how it was obtained.
Worked example
Concretely: an incident spans an AWS production account and a GCP data-processing project. Within the first hour you extend CloudTrail retention (or move copies into a locked, separate bucket) and do the equivalent for GCP's Cloud Audit Logs, before either provider's default retention window becomes a factor. You then snapshot the relevant EC2/EBS volumes (AWS virtual machines and the disk volumes attached to them) and Compute Engine persistent disks, export IAM and audit logs through each provider's own API, and hash everything as it lands in your own evidence storage, with a custody log noting who pulled each artifact, from which account or project, and when.
Trade-offs and pitfalls
The most common mistake is treating "the cloud console" as a stable source of truth and pulling evidence manually through the UI as you go, rather than exporting it programmatically with integrity guarantees, manual collection is harder to defend and easier to challenge. The second is preserving compute and storage evidence while forgetting that identity and access logs are usually the most time-limited and the most central to proving who did what, prioritize those alongside anything actively expiring. And don't assume the process is provider-specific enough to require a completely different playbook for AWS versus Azure versus GCP, the underlying logic, scope, preserve, acquire verifiably, document custody, is portable; only the artifact names and APIs change.
Write a Splunk SPL query that surfaces web server access log entries from the last 7 days where a client got back a response bigger than 1MB and the referrer domain was external. Assume each event has clientip, bytes, referrer, uri, and _time fields. Walk me through the query and how you'd tune it to run efficiently at scale.
Sample Answer
Direct Answer
The query filters to the last seven days, extracts the referrer's domain from the URL, and keeps only events where that domain is external and the response size exceeds 1 MB (1,048,576 bytes). Below is the actual Splunk Search Processing Language (SPL) query, walked through clause by clause, followed by a Python re-implementation of the same filtering logic that I've actually run against synthetic log rows to confirm the logic behaves as intended.
Structured Elaboration
index=web sourcetype=access_combined earliest=-7d@d latest=now
| rex field=referrer "^\w+://(?<referrer_domain>[^/]+)"
| where isnotnull(referrer_domain) AND referrer_domain!="corp.example.com" AND bytes>1048576
| table _time clientip bytes referrer uri
| sort -_time
index=web sourcetype=access_combined earliest=-7d@d latest=now: the base search.earliest=-7d@dscopes to the last 7 full days (snapped to day boundaries),latest=nowcloses the window at the present. Putting the time window and index/sourcetype filters directly in the base search lets Splunk prune to only the relevant time-bucketed index files before scanning a single event, the single biggest performance lever available.rex field=referrer "^\w+://(?<referrer_domain>[^/]+)": extracts everything between the scheme (http://orhttps://) and the next/into a new fieldreferrer_domain, using a named capture group,rex's standard syntax for field extraction via regular expression.where isnotnull(referrer_domain) AND referrer_domain!="corp.example.com" AND bytes>1048576: keeps only events with a parseable referrer domain that isn't the organization's own domain (adjust the literal to the real internal domain), and wherebytesexceeds 1 MB. Using the exact byte count (1,048,576) rather than a rounded value avoids an off-by-a-few-percent bug at the boundary.tableandsort -_time: shapes the output to the fields that matter for review, newest first.
Worked Example
I ran the equivalent filtering logic in Python against a small synthetic set of log rows (same shape as the fields given: clientip, bytes, referrer, uri, _time), pinned to a fixed "now" so the 7-day window is deterministic:
from datetime import datetime, timedelta
from urllib.parse import urlparse
INTERNAL_DOMAIN = "corp.example.com"
NOW = datetime(2026, 8, 31, 12, 0, 0)
log_events = [
{"clientip": "10.1.2.10", "bytes": 1_500_000, "referrer": "https://drive.partner-cloud.com/upload", "uri": "/export/report.csv", "_time": NOW - timedelta(days=1)},
{"clientip": "10.1.2.11", "bytes": 400_000, "referrer": f"https://{INTERNAL_DOMAIN}/dashboard", "uri": "/export/report.csv", "_time": NOW - timedelta(days=1)},
{"clientip": "10.1.2.12", "bytes": 2_100_000, "referrer": "https://drive.partner-cloud.com/upload", "uri": "/api/bulk", "_time": NOW - timedelta(days=9)},
{"clientip": "10.1.2.13", "bytes": 900_000, "referrer": "-", "uri": "/api/bulk", "_time": NOW - timedelta(days=2)},
{"clientip": "10.1.2.14", "bytes": 5_200_000, "referrer": "https://storage.thirdparty.net/put", "uri": "/api/bulk", "_time": NOW - timedelta(hours=3)},
]
def is_external_referrer(referrer: str) -> bool:
if referrer in ("-", ""):
return False
host = urlparse(referrer).netloc
return host != "" and INTERNAL_DOMAIN not in host
matches = [
e for e in log_events
if e["_time"] >= NOW - timedelta(days=7)
and e["bytes"] > 1_048_576
and is_external_referrer(e["referrer"])
]
for m in matches:
print(f"{m['_time']:%Y-%m-%d %H:%M} clientip={m['clientip']} bytes={m['bytes']} referrer={m['referrer']} uri={m['uri']}")
print()
print("total matching events:", len(matches))
Output:
2026-08-30 12:00 clientip=10.1.2.10 bytes=1500000 referrer=https://drive.partner-cloud.com/upload uri=/export/report.csv
2026-08-31 09:00 clientip=10.1.2.14 bytes=5200000 referrer=https://storage.thirdparty.net/put uri=/api/bulk
total matching events: 2
The five synthetic rows exercise every edge the filter needs to handle correctly: an internal-referrer event correctly excluded despite being large, an event outside the 7-day window correctly excluded despite matching on size and referrer, and an event with a missing referrer ("-") correctly excluded rather than crashing the filter. Only the two genuinely-matching rows survive, confirming the filter logic (not the SPL syntax itself, which needs a live Splunk instance to execute) does what the question asks.
Trade-offs & Pitfalls
- How to tune it to run efficiently at scale: push every filter you can into the base search string (index, sourcetype, time range) rather than into a later
whereclause, since Splunk can use those to skip entire buckets of data before scanning events;rexandwhereonly run on whatever survives the base search, so the narrower that base search is, the less work they do. - For a query run repeatedly (a saved search or a dashboard panel), consider
tstatsagainst an accelerated data model. A data model is a named schema that maps messy raw events onto a fixed set of named fields (those are its modeled fields), and accelerating it tells Splunk to build and keep refreshing a pre-summarized, pre-indexed copy containing just those fields;tstatsis the command that queries that summary directly instead of scanning raw events. So ifbytes,referrer, anduriare modeled fields,tstatsis substantially faster at scale. This requires the data model and its acceleration to already exist, which is a setup cost, not a free win. - Regex-based field extraction (
rex) runs per-event at search time, which is more expensive than a field already extracted at index time; if this query runs often enough to matter, promotingreferrer_domainto an index-time or accelerated field is worth the operational investment. - A referrer value that doesn't match the regex silently produces no
referrer_domainfield, which theisnotnullcheck correctly excludes rather than erroring, but it's worth explicitly reviewing how many events fall into that "unparseable referrer" bucket, since a malformed or missing referrer on a large upload is itself sometimes a signal worth a separate look.
The suspect's messaging app data looks deleted on a seized, non-rooted Android device, so physical acquisition is off the table. What would you actually try in order to recover that data or evidence of it, and what are you up against with each approach?
Sample Answer
Direct answer
Without root and without physical acquisition, the practical recovery menu is narrow: an ADB (Android Debug Bridge) logical pull, only if the device is unlocked with debugging enabled and only for apps that allow it, the app's own export or backup feature if it has one, notification and cache remnants, and cloud-side copies obtained via legal process, each recovering a different slice rather than the deleted data itself.
Structured elaboration
- ADB logical acquisition: works only if the device is unlocked with USB debugging enabled, and even then
adb backupfor a specific app succeeds only if that app opted in, many chat apps explicitly disable it. Treat this as a narrow, app-dependent attempt rather than a general method; a successful pull returns whatever the app chose to include in its own backup format, not raw deleted rows. - App-level export features: some messaging apps let a user manually export chat history, a built-in feature, not a forensic tool. If accessible on an unlocked device, this captures currently-visible history, though it won't surface anything already deleted from the app's own view.
- Notification remnants, and the storage that is genuinely reachable without root: be precise about what the
adbshell user can and cannot read, because this is where non-rooted acquisitions get overstated. The persisted notification history sits under/data/system/, and an app's private data sits under/data/data/<package>/; on a production build the shell user can read neither, soadb pullagainst those paths returns permission errors, not evidence. What an unlocked, debugging-enabled device does give you isadb shell dumpsys notification(the notification service's own dump of active and recently posted notifications, which on many builds carries the message text a chat app posted, and which you capture immediately because it is memory-resident and short-lived), plusadb pullof the app's directories on shared external storage, typically/sdcard/Android/media/<package>/and, subject to the scoped-storage restrictions newer Android versions place on it,/sdcard/Android/data/<package>/. Those external directories frequently retain thumbnails or attachment remnants after the parent message is deleted from the app's database. Record which paths returned data and which returned permission denied, because that distinction is what tells a reader whether you were blocked or the data was genuinely absent. - Cloud-side copies: if the app or the OS syncs anything to a cloud account, that copy is a separate legal target, requested through appropriate legal process. It may retain content the on-device app already purged, since cloud sync and local deletion don't always run on the same schedule.
- Provider records: as a last resort, the messaging service's own server-side logs, delivery metadata, sometimes with limited retention, can be requested via legal process to corroborate that specific messages were sent and received, even without recovering their content.
Worked example
A non-rooted, unlocked phone shows an empty or near-empty conversation with a specific contact in the suspect's messaging app. adb backup for that package returns nothing usable, the app opted out. adb pull of the app's external cache directory recovers two orphaned thumbnail images with timestamps matching the window under investigation, no accompanying text. A request to the app's cloud-sync provider, where legally supported for that specific app, is submitted in parallel. The final report documents what was recovered, two timestamped media remnants and fragments captured from the live notification service, and states plainly that the message content itself wasn't recoverable through logical means given the constraints of a non-rooted device with no authorized physical acquisition.
Trade-offs and pitfalls
Don't let "we tried ADB and it failed" read in a report as "there was nothing to find," each fallback channel, cache, notifications, cloud, provider, is independent and can succeed even when the primary method fails, work through all of them before concluding data is unrecoverable. Always get explicit authorization or legal process before contacting a service provider or pulling cloud data, that's a separate legal step from the on-device work.
Unlock Full Question Bank
Get access to all Network, Mobile, and Cloud Forensics interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.