TExcelTAD
Home › Cloud & Container Security › GuardDuty, Defender for Cloud and Security Command Center

GuardDuty, Defender for Cloud and Security Command Center

The rules of the previous lesson are yours: you write them, test them and tune them. Every major cloud also sells managed threat detection that runs inside the provider, with data you can't easily get yourself (the provider's own DNS resolver logs, threat intelligence on IP addresses, behaviour models trained across many customers). AWS GuardDuty, Microsoft Defender for Cloud and Google Security Command Center are the three flagships. They don't replace your own detections, and they produce a steady stream of findings that someone must triage. This lesson explains what each looks at, what a finding contains, and how to fold their output into one queue.

What they watch

AWS GuardDuty Microsoft Defender for Cloud Google Security Command Center
Foundational data CloudTrail management events, VPC flow logs, Route 53 resolver DNS logs (read by GuardDuty directly; you don't need to enable them) Azure Activity Log, resource provider telemetry Cloud Audit Logs, plus VPC flow logs, Cloud DNS logs and Data Access logs once you enable them (Event Threat Detection reads your Cloud Logging)
Optional protection plans S3 data events, EKS audit logs, runtime monitoring (EC2/EKS/ECS agents), malware scanning of EBS and S3, RDS login activity, Lambda network activity Defender plans for Servers, Containers, Storage, Key Vault, Resource Manager, databases, APIs Event Threat Detection, Container Threat Detection, VM Threat Detection (tier-dependent)
Posture (misconfiguration) separate: AWS Security Hub CSPM, AWS Config built in: secure score and recommendations built in: Security Health Analytics
Aggregation AWS Security Hub (findings in ASFF; OCSF in the newer Security Hub) Defender for Cloud, Microsoft Sentinel SCC findings, Chronicle / Google SecOps

Typical detections: credentials used from unusual places (including instance credentials used outside the instance), calls from known malicious or anonymising IPs, crypto-mining DNS lookups, disabled logging, unusual data access volumes, known-bad processes in containers, and attack sequences that chain several weak signals into one finding (newer GuardDuty extended threat detection and similar correlation features in the others).

Anatomy of a finding

GuardDuty finding types follow a fixed pattern that already tells you most of the story:

text
ThreatPurpose:ResourceType/ThreatName.Mechanism!Artifact
UnauthorizedAccess:IAMUser/InstanceCredentialExfiltration.OutsideAWS
CryptoCurrency:EC2/BitcoinTool.B!DNS
Stealth:IAMUser/CloudTrailLoggingDisabled
Policy:IAMUser/RootCredentialUsage

Each finding carries the affected resource (instance, access key, bucket, pod), the actor (IP, location, organisation, user agent), a severity (GuardDuty: Low 1.0–3.9, Medium 4.0–6.9, High 7.0–8.9, and Critical 9.0–10.0 for attack sequences), first and last seen times and a count. Defender alerts and SCC findings carry the same ideas under other names (severity as Low/Medium/High/Critical, MITRE tactics, the affected resource ID).

One triage queue

Three services in three shapes become one queue in the program below: normalise, deduplicate repeated findings on the same resource, add the asset's business criticality from the inventory, and sort. Findings are synthetic but use real-looking type names.

python · try it yourself
SEV_WORDS = {"Low": 2.0, "Medium": 5.0, "High": 8.0, "Critical": 9.5}
inventory = {  # resource -> (owner, criticality 1-3)
    "i-0a1b2c3d4e5f60001": ("shop-team", 3), "AKIA2LABQ7XKZ4TWNM3P": ("legacy", 2), "lab-app-uploads": ("shop-team", 3),
    "/subscriptions/0001/resourceGroups/rg-data/providers/Microsoft.KeyVault/vaults/kv-lab": ("data-team", 3),
    "projects/lab-dev/zones/europe-west1-b/instances/build-7": ("ci-team", 1),
}
raw = [
    ("guardduty", {"Type": "UnauthorizedAccess:IAMUser/InstanceCredentialExfiltration.OutsideAWS", "Severity": 8.0,
                   "Resource": "i-0a1b2c3d4e5f60001", "Count": 3}),
    ("guardduty", {"Type": "Recon:IAMUser/MaliciousIPCaller", "Severity": 5.0, "Resource": "AKIA2LABQ7XKZ4TWNM3P", "Count": 12}),
    ("guardduty", {"Type": "Recon:IAMUser/MaliciousIPCaller", "Severity": 5.0, "Resource": "AKIA2LABQ7XKZ4TWNM3P", "Count": 4}),
    ("guardduty", {"Type": "Policy:S3/BucketBlockPublicAccessDisabled", "Severity": 2.0, "Resource": "lab-app-uploads", "Count": 1}),
    ("defender", {"alertDisplayName": "Unusual access to Key Vault from a suspicious IP", "severity": "High",
                  "resourceId": "/subscriptions/0001/resourceGroups/rg-data/providers/Microsoft.KeyVault/vaults/kv-lab"}),
    ("scc", {"category": "Execution: Cryptocurrency Mining Hash Match", "severity": "HIGH",
             "resourceName": "projects/lab-dev/zones/europe-west1-b/instances/build-7"}),
]

def normalise(src, f):
    if src == "guardduty":
        return f["Type"], f["Severity"], f["Resource"], f.get("Count", 1)
    if src == "defender":
        return f["alertDisplayName"], SEV_WORDS[f["severity"]], f["resourceId"], 1
    return f["category"], SEV_WORDS[f["severity"].title()], f["resourceName"], 1

queue = {}
for src, f in raw:
    title, sev, res, count = normalise(src, f)
    key = (title, res)
    if key in queue:
        queue[key]["count"] += count                 # deduplicate: same finding, same resource
    else:
        owner, crit = inventory.get(res, ("unknown", 2))
        queue[key] = {"src": src, "title": title, "sev": sev, "res": res, "count": count, "owner": owner, "crit": crit}

for q in queue.values():
    q["priority"] = round(q["sev"] * (0.6 + 0.2 * q["crit"]), 1)   # severity scaled by asset criticality
for q in sorted(queue.values(), key=lambda q: -q["priority"]):
    short = q["res"].split("/")[-1]
    print(f"{q['priority']:4} {q['src']:9} sev {q['sev']:3} crit {q['crit']} x{q['count']:<3} {short:22} {q['owner']:10} {q['title']}")
 9.6 guardduty sev 8.0 crit 3 x3   i-0a1b2c3d4e5f60001    shop-team  UnauthorizedAccess:IAMUser/InstanceCredentialExfiltration.OutsideAWS
 9.6 defender  sev 8.0 crit 3 x1   kv-lab                 data-team  Unusual access to Key Vault from a suspicious IP
 6.4 scc       sev 8.0 crit 1 x1   build-7                ci-team    Execution: Cryptocurrency Mining Hash Match
 5.0 guardduty sev 5.0 crit 2 x16  AKIA2LABQ7XKZ4TWNM3P   legacy     Recon:IAMUser/MaliciousIPCaller
 2.4 guardduty sev 2.0 crit 3 x1   lab-app-uploads        shop-team  Policy:S3/BucketBlockPublicAccessDisabled

The weighting formula is a team choice, not a standard; the point is that severity alone is not priority. The three findings rated 8.0 by their services end up far apart: the two on critical production assets at 9.6, the crypto-mining hit on a throwaway build VM in the development project at 6.4. The two MaliciousIPCaller findings for the same access key collapse into one line with 16 occurrences. The instance credential finding shares the top of the list: it means a role's temporary credentials are being used from outside AWS, the signature of metadata credential theft.

How to use these services well

  • Enable them everywhere through the organisation (a delegated administrator account, auto-enable for new accounts and regions). A detector that is off in one region is a gap attackers can find by trying.
  • Send findings to one place (Security Hub, Sentinel, your SIEM) and triage them like your own alerts, with owners, SLAs and suppression rules that are reviewed.
  • Write suppression rules narrowly (finding type + exact resource or IP), with a comment and an expiry, never "suppress all Recon findings".
  • Keep your own rules for what matters most to you: managed services are tuned for the average customer and change their logic without asking you.
  • Generate sample findings (GuardDuty and Defender have sample/test alert features) to test routing and playbooks end to end.

Pitfalls

  • Treating "GuardDuty is on" as detection coverage without anyone reading its findings.
  • Turning on the foundational service but not the protection plans for the data you actually care about (S3, Kubernetes, runtime).
  • Disabling findings because they are noisy instead of fixing the cause: repeated Policy: findings are usually real misconfigurations.

Practice

1. Change the criticality of build-7 to 3. Where does it land in the queue?

Its priority becomes 8.0 × 1.2 = 9.6, level with the instance-credential finding. That is a reminder to keep criticality data current: a "dev" VM that holds production deployment credentials is not low-criticality.

2. What would you suppress, if anything, after investigating the two MaliciousIPCaller findings?

Nothing, until the key is dealt with: if the key belongs to a legacy integration and the IP is genuinely malicious, the finding is true and the response is leaked-key response. Only if the IP turns out to be your own scanner (a false positive) would a narrow suppression (type + key + IP, with expiry) be right.

3. Why do these services read DNS and flow logs "directly"?

GuardDuty consumes AWS's own independent streams of VPC flow logs and DNS resolver logs, so it works even if the customer never enabled those logs; but you then don't have them for your own investigations unless you enable them separately. Not every service works this way: Google's Event Threat Detection reads the logs in your Cloud Logging, so flow and DNS logs it should analyse must be turned on.

Test yourself

What does the GuardDuty finding type UnauthorizedAccess:IAMUser/InstanceCredentialExfiltration.OutsideAWS indicate?

  1. A public bucket
  2. An instance role's temporary credentials being used from outside AWS
  3. A failed login
  4. A crypto-mining binary

Why is severity alone not priority in the triage queue?

  1. Severities are random
  2. The same severity matters more on a critical production asset than on a throwaway one
  3. Low findings are always ignored
  4. Only GuardDuty has severities

Which is the right way to reduce noise from a managed detection service?

  1. Disable the service in quiet regions
  2. Narrow suppression rules (type + exact resource or IP) with a reason and expiry
  3. Suppress whole finding categories
  4. Lower all severities