Real-World Incident Report Template: Go To The HTB Blog To Download The Editable Version of This Report
Real-World Incident Report Template: Go To The HTB Blog To Download The Editable Version of This Report
Template
1
Real-world Incident Report
Executive Summary
2
HR01.samplecorp.com raise concerns. As a result, both company and client
data should be regarded as potentially compromised to some extent.
● Immediate Actions: SampleCorp's SOC and DFIR teams exclusively managed
the incident response procedures, without the involvement of any external
service providers. Immediate action was taken to isolate the compromised
systems from the network through the use of VLAN segmentation. To facilitate
a comprehensive investigation, the SOC and DFIR teams gathered extensive
data. This included getting access to network traffic capture files. Additionally,
all affected systems were plugged to a host security solution. As for event
logs, they were automatically collected by the existing Elastic SIEM solution.
● Stakeholder Impact:
○ Customers: While no extensive data exfiltration was identified, the
unauthorized access to both WKST01.samplecorp.com and
HR01.samplecorp.com raises concerns about the integrity and
confidentiality of customer data. As a precautionary measure, some
services were temporarily taken offline and some API keys were
revoked, leading to brief periods of downtime for customers. The
financial implications of this downtime are currently being assessed but
could result in loss of revenue and customer trust.
○ Employees: The compromised systems included
HR01.samplecorp.com, which typically houses sensitive employee
information. Although we have no evidence to suggest that employee
data was specifically targeted or extracted, the potential risk remains.
Employees may be subject to identity theft or phishing attacks if their
data was compromised.
○ Business Partners: Given that WKST01.samplecorp.com, a
development environment, was among the compromised systems,
there's a possibility that proprietary code or technology could have
been exposed. This could have ramifications for business partners who
rely on the integrity and exclusivity of SampleCorp's technology
solutions.
○ Regulatory Bodies: The breach of systems, could have compliance
implications. Regulatory bodies may impose fines or sanctions on
3
SampleCorp for failing to adequately protect sensitive data, depending
on the jurisdiction and the nature of the compromised data.
○ Internal Teams: The SOC and DFIR teams were able to contain the
threat effectively, but the incident will likely necessitate a review and
potential overhaul of current security measures. This could mean a
reallocation of resources and budget adjustments, impacting other
departments and projects.
○ Shareholders: The incident could have a short-term negative impact on
stock prices due to the potential loss of customer trust and possible
regulatory fines. Long-term effects will depend on the effectiveness of
the remedial actions taken and the company's ability to restore
stakeholder confidence.
4
Technical Analysis
The unauthorized entity successfully gained control over the following nodes within
SampleCorp's infrastructure:
From the logs, PowerShell was invoked from cmd.exe to execute the contents of a
remotely hosted script. The IP address of the remote host was an internal address,
5
192.168.220.66, indicating that an unauthorized entity was already present within the
internal network.
6
Additionally, cmd.exe and powershell.exe were spawned from wmiprvse.exe.
7
As already mentioned, the unauthorized entity then executed specific PowerShell
commands.
8
Brief Analysis of 192.168.220.66
From the logs, we identified four hosts on the network segment with corresponding
IP addresses and hostnames. The host 192.168.220.66, previously observed in the
logs of WKST01.samplecorp.com, confirms the presence of an unauthorized entity in
the internal network.
IP Hostname
192.168.220.20 DC01.samplecorp.com
192.168.220.200 WKST01.samplecorp.com
192.168.220.101 HR01.samplecorp.com
192.168.220.202 ENG01.samplecorp.com
The below table is the result of a SIEM query that aimed to identify all instances of
command execution initiated from 192.168.220.66, based on data from
WKST01.samplecorp.com.
beat.hostname.key
event_data.CommandLine.keyword: Descending word: Descending Count
whoami WKST01 1
9
... ... ...
The results suggest that the unauthorized entity has successfully infiltrated the hosts:
WKST01.samplecorp.com and HR01.samplecorp.com.
HR01.samplecorp.com
Network traffic details suggest a buffer overflow attempt on the service running at
port 31337 of HR01.samplecorp.com.
10
The network traffic was exported as raw binary for further analysis.
11
The extracted binary was analyzed in a shellcode debugger, scdbg.
12
A search for network connections between HR01.samplecorp.com and the
unauthorized entity was conducted using the aforementioned traffic capture file.
Results revealed connections back to the unauthorized entity on port 4444. This
indicates that the unauthorized entity successfully exploited a buffer overflow vuln to
gain command execution on HR01.samplecorp.com.
The depth of the technical analysis can be tailored to ensure that all stakeholders are
adequately informed about the incident and the actions taken in response. While
we've chosen to keep the investigation details concise in this module to avoid
13
overwhelming you, it's important to note that in a real-world situation, every claim or
statement would be backed up with robust evidence.
The primary catalysts for the incident were traced back to two significant
vulnerabilities. The first vulnerability stemmed from the continued use of an outdated
version of Acrobat Reader, while the second was attributed to a buffer overflow issue
present within a proprietary application. Compounding these vulnerabilities was the
inadequate network segregation of crucial systems, leaving them more exposed and
easier targets for potential threats. Additionally, there was a notable gap in user
awareness, evident from the absence of comprehensive training against phishing
tactics, which could have served as the initial entry point for the attackers.
Technical Timeline
● Initial Compromise
○ April 22nd, 2019, 00:27:27: One of the employees opened a malicious
PDF document (cv.pdf) on WKST01.samplecorp.com, which exploited
a known vulnerability in an outdated version of Acrobat Reader. This
led to the execution of a malicious payload that established initial
foothold on the system.
● Lateral Movement
○ April 22nd, 2019, 00:50:18: The unauthorized entity leveraged the
initial access to perform reconnaissance on the internal network. They
14
discovered a buffer overflow vulnerability in a proprietary HR
application running on HR01.samplecorp.com. Using a crafted payload,
they exploited this vulnerability to gain unauthorized access to the HR
system.
● Data Access & Exfiltration
○ April 22nd, 2019, 00:35:09: The unauthorized entity accessed various
directories on WKST01.samplecorp.com containing both proprietary
source code and API keys.
○ April 22nd, 2019, 01:30:12: The unauthorized entity located an
unencrypted database on HR01.samplecorp.com containing sensitive
employee and partner data, including Social Security numbers and
salary information. They compressed this data and exfiltrated it to an
external server via a secure SSH tunnel.
● C2 Communications
○ An unauthorized entity gained physical access to SampleCorp's
internal network. The Command and Control (C2) IP address identified
was an internal one: 192.168.220.66.
● Malware Deployment or Activity
○ The malware was disseminated via a malicious PDF document and
made extensive use of legitimate Windows binaries for staging,
command execution, and post-exploitation purposes.
○ Subsequently, shellcode was utilized within a buffer overflow payload to
infect HR01.samplecorp.com.
● Containment Times
○ April 22nd, 2019, 02:30:11: SampleCorp's SOC and DFIR teams
detected the unauthorized activities and immediately isolated
WKST01.samplecorp.com and HR01.samplecorp.com from the
network using VLAN segmentation.
○ April 22nd, 2019, 03:10:14: SampleCorp's SOC and DFIR teams
plugged a host security solution to both WKST01.samplecorp.com and
HR01.samplecorp.com to collect more data from the affected systems.
○ April 22nd, 2019, 03:43:34: The firewall rules were updated to block the
known C2 IP address, effectively cutting off the unauthorized entity's
remote access.
15
● Eradication Times
○ April 22nd, 2019, 04:11:00: A specialized malware removal tool was
used to clean both WKST01.samplecorp.com and
HR01.samplecorp.com of the deployed malware.
○ April 22nd, 2019, 04:30:00: All systems, starting with
WKST01.samplecorp.com were updated to the latest version of
Acrobat Reader, mitigating the vulnerability that led to the initial
compromise.
○ April 22nd, 2019, 05:01:08: The API keys that were accessed by the
unauthorized entity have been revoked.
○ April 22nd, 2019, 05:05:08: The login credentials of the user who
accessed the cv.pdf file, as well as those of users who have recently
signed into both WKST01.samplecorp.com and
HR01.samplecorp.com, have been reset.
● Recovery Times
○ April 22nd, 2019, 05:21:20: After ensuring that
WKST01.samplecorp.com was malware-free, the SOC team restored
the system from a verified backup.
○ April 22nd, 2019, 05:58:50: After ensuring that HR01.samplecorp.com
was malware-free, the SOC team restored the system from a verified
backup.
○ April 22nd, 2019, 06:33:44: The development team rolled out an
emergency patch for the buffer overflow vulnerability in the proprietary
HR application, which was then deployed to HR01.samplecorp.com.
16
Nature of the Attack
In this segment, we should meticulously dissect the modus operandi of the
unauthorized entity, shedding light on the specific tactics, techniques, and
procedures (TTPs) they employed throughout their intrusion. For instance, let's dive
into the methods the SOC team used to determine that the unauthorized entity
utilized the Metasploit framework in their operations.
Detecting Metasploit
To better understand the tactics and techniques of the unauthorized entity, we delved
into the malicious PowerShell commands executed.
Upon inspection, it became clear that double encoding was used, likely as a means
to bypass detection mechanisms. The SOC team successfully decoded the
malicious payload, revealing the exact PowerShell code executed within the memory
of WKST01.samplecorp.com.
17
By leveraging open source intelligence, our SOC team determined that this
PowerShell code is probably linked to the Metasploit post-exploitation framework.
To support our hypothesis that Metasploit was used, we dived deeper into the
detected shellcode. We specifically exported the packet bytes containing the
shellcode (as a.bin) and subsequently submitted them to VirusTotal for evaluation.
18
19
20
The results from VirusTotal affirmed our suspicion that Metasploit was in play. Both
metacoder and shikata are intrinsically linked to the Metasploit-generated shellcode.
21
Impact Analysis
In this segment, we should dive deeper into the initial stakeholder impact analysis
presented at the outset of this report. Given the company's unique internal structure,
business landscape, and regulatory obligations, it's crucial to offer a comprehensive
evaluation of the incident's implications for every affected party.
22
Response and Recovery Analysis
Containment Strategy
23
● Effectiveness: The containment strategies were successful in ensuring that
the threat actor did not escalate privileges or move to adjacent systems, thus
limiting the incident's impact.
Eradication Measures
Malware Removal
System Patching
24
● Fallback Procedures: System snapshots and configurations were backed up
before the patching process, ensuring a swift rollback if the update introduced
any system instabilities.
Recovery Steps
Data Restoration
System Validation
Post-Incident Actions
Monitoring
25
behaviors which could indicate compromise. In addition, inventory and asset
management activities commenced to facilitate the implementation of network
access controls.
● Tools and Technologies: Leveraging the capabilities of the existing Elastic
SIEM, advanced correlation rules will be implemented, specifically designed
to detect the tactics, techniques, and procedures (TTPs) identified in this
breach.
Lessons Learned
● Gap Analysis: The incident shed light on certain gaps, primarily around
network access controls, email filtering, network segregation, and user
training about potential phishing attempts with malicious documents.
● Recommendations for Improvement: Initiatives around inventory and asset
management, email filtering, and improved security awareness training are
prioritized.
● Future Strategy: A forward-looking strategy will involve more granular network
access controls and network segmentation, adopting a zero-trust security
model, and increasing investments in both security awareness training and
email filtering.
26
Annex A
Technical Timeline
Time Activity
April 22nd, One of the employees opened a malicious PDF document (cv.pdf) on
2019, WKST01.samplecorp.com, which exploited a known vulnerability in an outdated
00:27:27 version of Acrobat Reader. This led to the execution of a malicious payload that
established initial foothold on the system.
April 22nd, The unauthorized entity leveraged the initial access to perform reconnaissance on
2019, the internal network. They discovered a buffer overflow vulnerability in a proprietary
00:50:18 HR application running on HR01.samplecorp.com. Using a crafted payload, they
exploited this vulnerability to gain unauthorized access to the HR system.
April 22nd, SampleCorp's SOC and DFIR teams detected the unauthorized activities and
2019, immediately isolated WKST01.samplecorp.com and HR01.samplecorp.com from
02:30:11 the network using VLAN segmentation.
April 22nd, SampleCorp's SOC and DFIR teams plugged a host security solution to both
2019, WKST01.samplecorp.com and HR01.samplecorp.com to collect more data from
03:10:14 the affected systems.
April 22nd, The firewall rules were updated to block the known C2 IP address, effectively cutting
2019, off the unauthorized entity's remote access.
03:43:34
27
April 22nd, A specialized malware removal tool was used to clean both
2019, WKST01.samplecorp.com and HR01.samplecorp.com of the deployed malware.
04:11:00
April 22nd, All systems, starting with WKST01.samplecorp.com were updated to the latest
2019, version of Acrobat Reader, mitigating the vulnerability that led to the initial
04:30:00 compromise.
April 22nd, The API keys that were accessed by the unauthorized entity have been revoked.
2019,
05:01:08
April 22nd, The login credentials of the user who accessed the cv.pdf file, as well as those of
2019, users who have recently signed into both WKST01.samplecorp.com and
05:05:08 HR01.samplecorp.com, have been reset.
April 22nd, After ensuring that WKST01.samplecorp.com was malware-free, the SOC team
2019, restored the system from a verified backup.
05:21:20
April 22nd, After ensuring that HR01.samplecorp.com was malware-free, the SOC team
2019, restored the system from a verified backup.
05:58:50
April 22nd, The development team rolled out an emergency patch for the buffer overflow
2019, vulnerability in the proprietary HR application, which was then deployed to
06:33:44 HR01.samplecorp.com.
28
Real-world Incident Report Template
March 2024
29