APT Simulator is a Windows Batch script that uses a set of tools and output files to make a system look as if it was compromised. In contrast to other adversary simulation tools, APT Simulator is deisgned to make the application as simple as possible. You don't need to run a web server, database or any agents on set of virtual machines. Just download the prepared archive, extract and run the contained Batch file as Administrator. Running APT Simulator takes less than a minute of your time.
- POCs: Endpoint detection agents / compromise assessment tools
- Test your security monitoring's detection capabilities
- Test your SOCs response on a threat that isn't EICAR or a port scan
- Prepare an environment for digital forensics classes
- Because it's simple: Everyone can read, modify or extend it
- It runs on every Windows system without any prerequisites
- It is closest to a real attacker working on the command line
- Download the latest release from the "release" section
- Extract the package on a demo system (Password: apt)
- Start a cmd.exe as Administrator
- Navigate to the extracted program folder and run APTSimulator.bat
If you script includes a tool, web shell, auxiliary or output file, place them in the folders ./toolset
or ./workfiles
. Running the build script build_pack.bat
will include them in the encrypted archives enc-toolset.7z
and enc-files.7z
.
"%ZIP%" e -p%PASS% %TOOLARCH% -aoa -o%APTDIR% toolset\tool.exe > NUL
"%ZIP%" e -p%PASS% %FILEARCH% -aoa -o%APTDIR% workfile\tool-output.txt > NUL
The following table shows the different test cases and the expected detection results.
- AV = Antivirus
- NIDS = Network Intrusion Detection System
- EDR = Endpoint Detection and Response
- SM = Security Monitoring
- CA = Compromise Assessment
Test Case | AV | NIDS | EDR | SM | CA |
---|---|---|---|---|---|
Collect Local Files | X | ||||
C2 Connects | (X) | X | X | X | |
DNS Cache 1 (Cache Injection) | (X) | X | X | X | |
Malicious User Agents (Malware, RATs) | X | X | X | ||
Ncat Back Connect (Drop & Exec) | X | X | X | X | |
WMI Backdoor C2 | X | X | X | ||
LSASS Dump (with Procdump) | X | X | X | ||
Mimikatz 1 (Drop & Exec) | X | X | X | X | |
WCE 1 (Eventlog entries) | X | X | X | ||
Active Guest Account Admin | X | X | X | ||
Fake System File (Drop & Exec) | X | X | X | ||
Hosts File (AV/Win Update blocks) | (X) | X | X | ||
Obfuscated JS Dropper | (X) | X | X | X | X |
Obfuscation (RAR with JPG ext) | (X) | ||||
Nbtscan Discovery (Scan & Output) | X | X | (X) | X | |
Recon Activity (Typical Commands) | X | X | X | ||
PsExec (Drop & Exec) | X | X | X | ||
Remote Execution Tool (Drop) | (X) | X | |||
At Job | X | X | X | ||
RUN Key Entry Creation | X | X | X | ||
Scheduled Task Creation | X | X | X | ||
StickyKey Backdoor | X | X | |||
UserInitMprLogonScript Persistence | (X) | X | X | ||
Web Shells | X | (X) | X | ||
WMI Backdoor | X | X |
- drops pwdump output to the working dir
- drops directory listing to the working dir
- Uses Curl to access well-known C2 servers
- Looks up several well-known C2 addresses to cause DNS requests and get the addresses into the local DNS cache
- Uses malicious user agents to access web sites
- Drops a PowerShell Ncat alternative to the working directory and runs it to back connect to a well-known attacker domain
- Using Matt Graeber's WMIBackdoor to contact a C2 in certain intervals
- Dumps LSASS process memory to a suspicious folder
- Dumps mimikatz output to working directory (fallback if other executions fail)
- Run special version of mimikatz and dump output to working directory
- Run Invoke-Mimikatz in memory (github download, reflection)
- Creates Windwows Eventlog entries that look as if WCE had been executed
- Activates Guest user
- Adds Guest user to the local administrators
- Drops suspicious executable with system file name (svchost.exe) in %PUBLIC% folder
- Runs that suspicious program in %PUBLIC% folder
- Adds entries to the local hosts file (update blocker, entries caused by malware)
- Runs obfuscated JavaScript code with wscript.exe and starts decoded bind shell on port 1234/tcp
- Drops a cloaked RAR file with JPG extension
- Scanning 3 private IP address class-C subnets and dumping the output to the working directory
- Executes command used by attackers to get information about a target system
- Dump a renamed version of PsExec to the working directory
- Run PsExec to start a command line in LOCAL_SYSTEM context
- Drops a remote execution tool to the working directory
No test cases yet
- Creates an at job that runs mimikatz and dumps credentials to file
- Create a suspicious new RUN key entry that dumps "net user" output to a file
- Creates a scheduled task that runs mimikatz and dumps the output to a file
- Creates a scheduled task via XML file using Invoke-SchtasksBackdoor.ps1
- Tries to replace sethc.exe with cmd.exe (a backup file is created)
- Tries to register cmd.exe as debugger for sethc.exe
- Creates a standard web root directory
- Drops standard web shells to that diretory
- Drops GIF obfuscated web shell to that diretory
- Using the UserInitMprLogonScript key to get persistence
- Using Matt Graeber's WMIBackdoor to kill local procexp64.exe when it starts
Since version 0.8.0 APTSimulator features a batch mode provided by @juju4 that allows to run it in in a scripted way e.g. via Ansible
APTSimulator.bat -b
This repo contains tools and executables that can harm your system's integrity and stability. Do only use them on non-productive test or demo systems.
The CALDERA automated adversary emulation system https://github.com/mitre/caldera
Infection Monkey - An automated pentest tool https://github.com/guardicore/monkey
Flightsim - A utility to generate malicious network traffic and evaluate controls https://github.com/alphasoc/flightsim