Quick Start
This page provides an overview in how to getting started with ForTrace++, after the successful installation.
Installation of VMs
Note
Please read the instructions in libvirt Tuning.
This section is concerned with the installation of VMs through Virtual Machine Manager. There are other GUI frontends to libvirt available, however they are not discussed in this guide.
Installation of a Windows VM
Installation of a Windows 10 VM
Please install a new VM via Virtual Machine Manager on your host VM. For this scenario we will use a Windows 10 machine. The ISO can be downloaded directly from Microsoft below this Link. Every version of Windows 10 should be compatible to this scenario. Regarding the language, please select ‘English International’ or ‘English (United States)’, since ForTrace++ assumes the OS to be set to English.
Open Virtual Machine Manager
Select ‘Create a new virtual machine’
Select ‘Local install media (ISO image or CDROM)’ > Forward
Enter the path to the downloaded Windows 10 ISO and choose the correct operating system you are installing (this should be done automatically) > Forward
Select a suitable amount of memory and CPUs, for example
Memory: 8192
CPU: 6
Select ‘Create a disk image for the virtual machine’ and allocate at least 40GiB > Forward
Give the VM a meaningful name (should default to ‘win10’). This name is important for later steps. Under ‘Network selection’ make sure the ‘default’ network is selected > Finish
Configuration of Windows and installation of necessary programs
Boot the Windows 10 VM that you have created in the previous step
Complete the general Windows setup, for it is not automated at this moment
You may leave the values for ‘Language to install’ and ‘Time and currency format’, but change the value of ‘Keyboard or input method’ to US
During the windows setup you are asked for a product key. Select ‘I don’t have a product key’
Install the ‘Windows 10 Home’ edition for the two scenarios
Select ‘United States’ for the region and ‘US’ for keyboard layout
Create a local account with the username fortrace and the password fortrace
NOTE: any other combination of username and password is fine as well but has to be updated in the configuration files of the scenarios
Answer the security questions as you like, since we don’t need them for this scenario
Adjust the privacy setting for your device as you prefer
Skip the ‘customise experience step’
Select Not now in the ‘Let Cortana help you get things done’ screen
Continue with the displayed Microsoft Edge setup
You can sign in with a Google account if you prefer, but you don’t have to do so for these scenarios
For ‘Overall appearance’ just select the default values
On the start page you are greeted with a cookie banner, which you can but don’t have to accept
Disable mouse acceleration
Press ‘meta+r’ to open the Run dialogue
Enter ‘main.cpl’ to open the Mouse Properties
Select the registry card ‘Pointer Options’ and disable the option ‘Enhance pointer precision’
Open ‘Settings’
Open ‘Network & Internet’
Open ‘Properties’ of the active Ethernet connection to the libvirt network
Set the ‘Network Profile’ to Private
Open ‘Settings’
Open ‘System’
Select ‘Notifications & actions’
Disable ‘Get notifications from apps and other senders’
Disable all checkboxes in the screen to stop Windows from nagging you
Due to SeaBIOS limitation: Disable SecureBootEncodeUEFI to suppress CMD popup Source
Open ‘Task Scheduler’
Navigate to ‘Task Scheduler Library\Microsoft\Windows\PI’
Select ‘SecureBootEncodeUEFI’ and click ‘Disable’
Open ‘Settings’
Open ‘Update & Security’
Apply the recent Windows Updates and wait for all of them to be downloaded
It is the best to make sure all updates are applied before the snapshot is taken so the VM does not start to behave strangely
Most likely it will be necessary to perform a restart, hence hit ‘Update and restart’
Power off the VM and create a snapshot (once the VM is off)
Select ‘Manage VM snapshots’ (located in second ribbon)
Select the ‘+’ symbol to create a new snapshot and give it the name ‘init_setup’.
Like the VM name, the snapshot name is important for the execution of the scenario
Installation of a Windows 11 VM
Follow this guide to install a Windows 11 VM, with a local account, and optimize it.
Installation of a Linux VM
Interaction with ForTrace++
There are two major approaches to interact with ForTrace++: the programmatic approach or the interaction through the Generator component.
Programmatic
This approach relies on the API offered through ForTrace++.
Non-Programmatic
Generator with YAML files
YAML Configuration Files
The YAML configuration files can and should be used to configure existing scenarios that are using the ForTrace++ API. Hence, it is possible to generate slightly different datasets without the need to write extra code. When creating new scenarios, programmers are encouraged to supply said configuration files and offer the possibility to make changes to their scenario through a configuration file.
The general layout of a ForTrace++ YAML configuration file
Root configuration
Since configuration files are used VM-centric, meaning one configuration is used to control one VM, another kind of configuration file is necessary to enable scenarios with multiple VMs: the root configuration file.
This kind of configuration can be identified by looking at the domain entry of the
file:
1domain:
2 - "<Path_to_another_yaml_file>"
3 - "<Path_to_another_yaml_file>"
Domain Section
A normal, non-root YAML configuration of ForTrace++ is domain-centric. Thus, the
domain section contains the most general and relevant information to interact with a
domain. The configuration below is taken from the first Linux example.
1domain:
2 username: "kali"
3 password: "kali"
4 name: "kali"
5 network: "default"
6 os_type: OSType.LINUX
7 shell_type: ShellType.ZSH
8 package_manager: PackageManager.APT
9 desktop_environment: DesktopEnvironmentType.GNOME
10 start_sniffer: False
11 snapshot: "clean-install"
12 dump_ram: False
13 dump_images: False
username: Name of the main user of the system. This name will be used to perform the installation of any required software.password: Password of the main username: Name of the VM to be bootednetwork: Name of the network the VM should be bound to. It might beNone, so the VM is not connected to any networkos_type: Expected operating system type. Seefortrace.utility.distribution_constants.OSTypefor all supported types. Use full qualified names, e.g.,OSType.Linuxshell_type: This feature is mainly Linux/macOS specific and is used to define the type of the shell that is opened when establishing a shell connection via virsh. Please check which login shell is used by your distribution. Seefortrace.utility.distribution_constants.ShellTypefor all supported values. Use full qualified names, e.g.,ShellType.ZSHpackage_manager: Package manager to be used for installing packages. Seefortrace.utility.distribution_constants.PackageManagerfor all supported types. Use full qualified names, e.g.,PackageManager.APTdesktop_environment: Desktop environment of the domain. Omit this line when dealing with domain without one. Seefortrace.utility.distribution_constants.DesktopEnvironmentTypefor all supported types. Use full qualified names, e.g.,DesktopEnvironmentType.GNOMEstart_sniffer: Can either beTrueorFalseand determines whether the network traffic of this domain is captured with dumpcap. Please make sure it is installed and correctly configured as described in the Installation instructions.snapshot: Specify a snapshot from which the guest should be booted. If the snapshot does not exist, it will be created from the current state of the guest and is available for future iterations.dump_ram: Can either beTrueorFalseand determines whether ForTrace++ should perform a RAM dump, once the scenario is completeddump_images: Can either be a bool or a list, depending on the configuration of the domain.Falseor the absence of this parameter means that no image dump should be performed, once the scenario is concluded. If a domain has more than one disk, either a list of disks to be dumped, orTruecan be specified, where the latter means that all disks of the domain will be dumped. If a list of names is provided, use the ones from the libvirt domain XML file of the domain, found in the disk section, in the target sub-element, named dev (in the snipped below, the disk is named sda).
1<disk type="file" device="disk">
2 <driver name="qemu" type="qcow2" discard="unmap"/>
3 <source file="/var/lib/libvirt/images/win10.qcow2"/>
4 <target dev="sda" bus="sata"/>
5 <address type="drive" controller="0" bus="0" target="0" unit="0"/>
6</disk>
Generator Section
This generator section contains parameters used to configure the semi-random action generator’s behavior.
1generator:
2 seed: 1234
3 action_delta_minimum: 5
4 action_delta_maximum: 10
5 actions:
6 web_browsing:
7 application: "Firefox"
8 operations:
9 - name: "browsing"
10 amount: 30
11 source: c-http-0
12 enable_scraping: True
13 - name: "browsing"
14 amount: 10
15 source: c-http-1
16 enable_scraping: True
17 - name: "download"
18 amount: 10
19 source: c-http-2
20 - name: "web_search"
21 amount: 5
22 source: c-web-search
23 # search_engine: "Google"
24 file_management:
25 application: "Files"
26 operations:
27 - name: 'copy'
28 amount: 5
29 source: web_browsing
30 destination: "/home/kali/Documents"
31 - name: 'to_trash'
32 amount: 5
33 source: web_browsing
34 - name: 'open'
35 amount: 2
36 source: attackProFTPD
37 attackProFTPD:
38 generator:
39 import: "from examples.Linux.ProFTPD_attack.kali_attacker import ProFTPAttack"
40 construct:
41 template: "ProFTPAttack($domain, $config, $key)"
42 substitutions:
43 key: "value"
generator: This section controls the behavior of the ForTrace++ Generator componentfortrace.generator.Generatorseed: Specify the seed of the Generator here. It can be used to run reproducible scenarios (same seed = same scenario)action_delta_minimum: The minimum amount of seconds that has to pass between two distinct action elementsaction_delta_maximum: The maximum amount of seconds that can pass between two distinct action elementsactions: This section defines action elements, the Generator will executeweb_browsing: Default action supported by the Generator on all operating systems. With ‘application’ one is able to define the application to be used. Make sure the browser is truly supported and installed on the system. Below you may specify the ‘operations’ to be performed. Refer to the Generator’s _execute_action_http to see the supported operationsfile_management: Like web browsing, this is an operation supported per default for each operating system. As source one may specify the name of an action, as long as it yields any files to be used. If you specify a collection, make sure the files are already present on the VM.attackProFTPD: Special kind of action. The nested ‘generator’ section must follow this distinctive pattern, because the Generator will create this object. The ‘import’ statement is used to import the object at runtime, thus keeping the Generator import statements as small as possible and support new classes without rewriting the Generator’s code. Below ‘construct’ the actual call to the imported objects constructor. The values $domain and $config are automatically substituted by the Generator. Further arguments can be specified in the ‘substitutions’ section with key:value pairs.