#
Scenario 2 Infrastructure
The infrastructure listed below is specific to Scenario 2, which assumes that protective/preventative actions may be performed within the target environment. Scenario 1 has different infrastructure requirements than those described here, so only use this document as a reference for 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 Carbanak 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 executable files hosted in Resources have been added to password protected zip files. The password for these files is "malware."
We provide a script to automatically decrypt these files:
cd carbanak
python3 Resources/utilities/crypt_executables.py -i ./ -p malware --decrypt
#
Emulation Team Infrastructure
- Attacker Desktop: tested and executed on Ubuntu 20.04 LTS
- Remote Desktop Client
- Attack Platform: tested and executed on Kali Linux 2019.1
- C2 Frameworks
- tmux
#
Emulation Team Infrastructure Configuration
This methodology assumes the following static IP address configuration:
#
A note about red team payloads
This evaluation utilizes payloads that model Carbanak malware.
Some pre-compiled payloads are available in the resources directory; however, they are configured to connect back to static IP address 192.168.0.4.
If you would like to build the payloads yourself, please make the necessary adjustments to the payload source to match your environment.
#
Attack Platform Setup
Download the Carbanak ATTACK Evaluations Library to the home directory
Enable SSH Port Forwarding
printf "\nGatewayPorts yes\n >> /etc/ssh/sshd_config systemctl restart sshd.service
Add low privilege SSH user
Enable Metasploit PostGRES database
Stage certain files for download
mkdir /var/files cp /home/<attacker>/Enterprise/carbanak/Resources/step7/Java-Update.exe /var/files/ cp /home/<attacker>/Enterprise/carbanak/Resources/step10/tightvnc-2.8.27-gpl-setup-64bit.msi /var/files/ cp /home/<attacker>/Enterprise/carbanak/Resources/step10/vnc-settings.reg /var/files/ chmod 777 -R /var/files
Generate SSH key to copy into domain
ssh-keygen -t rsa -f "/home/<attacker>/Enterprise/carbanak/Resources/setup/ssh/id_rsa" -P ""
#
Target Infrastructure
4 targets, all domain joined:
Domain Controller: tested and executed on Windows Server 2019 1809
HR Manager Workstation: tested and executed on Windows 10 1909
CFO Workstation: tested and executed on Windows 10 1909
- Domain user with local admin access on only this machine
Bank File Server: tested and executed on CentOS 7.7
#
Target Infrastructure Configuration
This methodology assumes the following hostname configurations:
#
Domain Controller Setup
If only testing detection capabilities, disable Windows Defender
The
set-defender.ps1
PowerShell script in the setup folder can be used to perform this.
#
HR Manager Workstation Setup
If only testing detection capabilities, disable Windows Defender
The
set-defender.ps1
PowerShell script in the setup folder can be used to perform this.Copy newly generated SSH keypair from attacker platform to the following directory:
C:\Users\<domain_user>.<domain>\
Disable OLE Security to enable execution of initial access payload
The
set-OLEsecurity.ps1
PowerShell script in the setup folder can be used to perform this.
#
CFO Workstation Setup
If only testing detection capabilities, disable Windows Defender
The
set-defender.ps1
PowerShell script in the setup folder can be used to perform this.Give the CFO user RDP privileges on only this machine by adding them to the following local groups:
Remote Desktop Users Remote Management Users
Copy Payment Transfer System executable onto Desktop of CFO user.
Cache CFO User's credentials in Microsoft Edge:
1. Open Edge 2. Navigate to github.com 3. Click "Sign In" 4. Enter fake creds: -Username: <cfo_user>@<domain_full> -Password: <fake_password> 5. Save credentials to password vault when prompted 6. Close Edge 7. Close RDP session
#
Bank File Server Setup
Ensure the server is domain joined to the rest of the domain:
Copy the following prop files to the
/var/tmp
directory:carbanak/Resources/step5/network-diagram-financial.xml carbanak/Resources/step5/help-desk-ticket.txt
Copy the newly generated SSH keypair's public key
id_rsa.pub
to the SSH Authorized Keys file:/home/<domain_user>/.ssh/authorized_keys
#
Setup Automation
The setup-teamsherver.sh
and setup-winhosts.ps1
scripts in the setup folder can be used to automate this process.
These scripts use the default hostnames, but require usernames and host IP addresses to be substituted in place of placeholder values.
Run
setup-teamserver.sh
on the Attack Platform.Note: The script assumes that this repo is downloaded to the
user's home directory. Run
setup-winhosts.ps1
on the Domain Controller.