Hands-On Threat-Hunting Lab — Practice Golden SAML Detection Using the Free SIEM Environment…
嗯,用户让我用中文总结一篇文章,控制在100字以内,而且不需要特定的开头。首先,我得仔细阅读这篇文章,理解它的主要内容。 文章分为两部分,第一部分讲的是Golden SAML攻击的分解,第二部分是实践威胁狩猎实验室,使用免费的SIEM环境来检测Golden SAML。看起来这是一个教学性质的文章,帮助读者通过实际操作来学习如何检测这种攻击。 用户的需求是总结内容,所以我要抓住主要点:文章结构、主题、目标读者以及实践活动。同时要注意字数限制,确保在100字以内。 可能用户是安全领域的学生或从业者,他们希望快速了解文章内容而不必阅读全文。因此,总结需要简洁明了,涵盖关键信息:两部分的内容、SIEM环境的使用、以及目标是帮助读者实践检测攻击。 最后,组织语言时要直接描述内容,不使用“这篇文章总结了”之类的开头。确保信息准确且符合用户的要求。 </think> 文章分为两部分:第一部分详细解析了Golden SAML攻击的机制;第二部分提供了一个基于免费SIEM环境的实践实验室,指导读者检测此类攻击。通过分析证书盗窃、伪造SAML令牌、OAuth持久化、邮箱访问和数据外泄等环节,并结合MITRE ATT&CK框架和威胁狩猎任务,帮助读者掌握Golden SAML攻击链的全生命周期检测与应对。 2025-12-15 07:48:58 Author: infosecwriteups.com(查看原文) 阅读量:5 收藏

Dhruv Patel

This blog is divided into two sections:
Part 1: Golden SAML Attack : Attack Breakdown
Part 2: Hands-On Threat-Hunting Lab — Practice Golden SAML Detection Using the Free SIEM Environment Provided (Current)

If you’re new here, I’m building a hands-on SOC series where you can practice real investigations in my SIEM.
This is Part 2 of the Golden SAML series — check out Part 1 to learn the attack details.
You’ll need access to the free SIEM environment for this lab. If you already have it, welcome back! Otherwise, request access using the link below.

New reader SIEM access request : Please Click Here !!

Press enter or click to view image in full size

Image created by author using chatgpt

🔬 1. Hypothesis

“An attacker has leveraged the theft of the AD FS token-signing certificate to forge SAML tokens and authenticate as a privileged Azure AD account. We suspect persistence via OAuth applications, mailbox access, and potential data exfiltration.”

This hypothesis anchors the entire investigation.
Readers must test whether the log data and alerts support (or refute) this claim.

🗺️ 2. MITRE ATT&CK Mapping

Here’s how each phase of the Golden SAML activity aligns with the MITRE ATT&CK framework.
This helps you understand exactly which adversary techniques are in play throughout the attack chain.

Press enter or click to view image in full size

Image created by author using ChatGPT

🔔 3. Alerts Generated (75 Alerts Across 9 Detection Rules)

Press enter or click to view image in full size

Screenshot taken by author

In order to see the alert, please click this link or go to the SIEM and then go to Alert and match the time range mentioned above.

Press enter or click to view image in full size

Image created by author using chatgpt

🔍 4. Investigation Steps (Correct Findings)

This is where the student becomes a SOC analyst.

You can use discover with following settings for getting all the logs you need for investigation:

Press enter or click to view image in full size

Screenshot taken by author

Step 1 — Start With Certificate Theft Alerts

  • Look for early AD FS activity
  • Identify certificate export event(s)
  • Extract the fingerprint for pivoting

Step 2 — Pivot on the Token Thumbprint

Search logs for:

tokenIssuerThumbprint: <stolen_thumbprint>

This uncovers all forged SAML sign-ins.

Step 3 — Investigate Privileged Sign-ins

  • Global Admin logging in from a foreign IP
  • Authentication method = Federated, requirement = Single Factor
  • Unexpected or untrusted tokenIssuerName

Step 4 — Look for Persistence via OAuth Apps

Search for new service principals with suspicious permissions.

Step 5 — Inspect Mailbox Access

Identify mailbox access using OAuth service principal identities.

Step 6 — Check for Exfiltration

Look for inbox rules that forward to external domains.

Step 7 — Map Graph Recon

Locate broad Graph API queries that enumerate:

  • Users
  • Groups
  • DirectoryRoles
  • ServicePrincipals
  • Mailboxes

This completes the timeline that proves the attacker achieved persistence and reconnaissance.

🧩 5. Threat Hunting and Final Task for the Reader: Build a Correlation Rule

Press enter or click to view image in full size

Screenshot taken by author

As you investigate alerts, you can document your findings directly in an Elastic SIEM case. I’ve created a case template for this lab that also includes helpful threat-hunting queries. Feel free to use it — I’ll be reviewing all submitted cases, so if you have questions, add them directly inside your case.

Get Dhruv Patel’s stories in your inbox

Join Medium for free to get updates from this writer.

Here’s your final challenge:

“Write a detection rule that correlates certificate theft → forged SAML tokens → OAuth persistence → mailbox access → exfiltration → Graph recon.”

The rule should:

✔ Combine multiple alerts

✔ Span a realistic timeframe (20–60 min)

✔ Use userPrincipalName, tokenIssuer, IP, and servicePrincipalId as pivots

✔ Detect the sequence of Golden SAML behaviors

You may choose:

  • EQL sequence rule
  • KQL with joins + event sequence
  • Timeline-based detection
  • Custom rule logic in Elastic Security

Goal:
Detect Golden SAML as a full attack chain, not as isolated alerts.

📁 6. Add Findings to the Case Template

Use the provided case template to:

  • Document every alert you found
  • Attach screenshots of your Timeline
  • Explain the reconstructed attack path
  • Paste your correlation rule
  • Summarize your conclusions as a SOC analyst

When complete, your case should look like a real incident-response briefing.

That’s the end of Lab 2! If you like hands-on SOC exercises and want more real-world attack walkthroughs, make sure to subscribe.
Your feedback helps me improve every lab, so feel free to drop a comment.
Have a new attack you want to see broken down like this? Tell me!
And if you don’t have SIEM access yet, you can request it here — I’ll set you up.


文章来源: https://infosecwriteups.com/hands-on-threat-hunting-lab-practice-golden-saml-detection-using-the-free-siem-environment-e30edaea3d29?source=rss----7b722bfd1b8d---4
如有侵权请联系:admin#unsafe.sh