Flare VM Installation: Difference between revisions

From Elvis Wiki
(Removed redirect to CVE Webscraper)
Tag: Removed redirect
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
=CERT Tapioca=
CERT Tapioca ist ein Dienstprogramm zum Testen mobiler oder anderer Anwendungen mit MITM-Techniken, ist also ein network-layer man-in the-middle-proxy, welcher auf mitmproxy basiert. Die Entwicklung von CERT Tapioca wurde vom United States Army Armament Research, Development and Engineering Center (ARDEC) und dem United States Department of Homeland Security (DHS) gesponsert.


=Funktionalitäten=
Flare VM is a Windows distribution specifically designed for Malware Analysis. It includes all the relevant tools to get started in this field.
* Überprüfen, ob getestete Applikationen https Zertifikate validieren
* Überprüfen der verwendeten Cipher-Suiten, ob diese modernen Kryptographischen Standards entsprechen
* Aufgebaute Netzwerkverbindungen überprüfen
* Nach Strings im Network Traffic suchen


=System Requirements=
<span id="step-1-setup-virtual-machine"></span>
* Basis OS: Raspbian (Jessie oder Stretch), Raspberry Pi OS, Debian 10, Centos (7, 8, oder Stream 8), RedHat Enterprise Linux 7, Fedora (25 bis 33), openSUSE (15.x oder Tumbleweed), oder Ubuntu (16.04, 18.04, 20.04, oder 22.04).
== Step 1: Setup Virtual Machine ==
* RAM: 1 GB
* Bestehende Internet-Verbindung
* Die Möglichkeit, dem System wireless access bieten zu können, über:
  1. einen wired Netzwerkadapter, wo ein wireless Access Point angeschlossen werden kann
  2. einen USB wireless Adapter, welcher HOSTAP mode unterstützt.
 
=Pre-Installation=
Eine bereits installierte Linux Distribution ist notwendig, bare metal oder in einer virtuellen Maschine. Weiters notwendig:
* Internetverbindung
* User "tapioca" muss vorhanden sein, dieser soll administrative Rechte haben.
* Der User "tapioca" soll angemeldet sein.


==Verbindungsoptionen==
First, you need to setup a Windows 10 virtual machine. This can be done by downloading the ISO from Microsoft and installing it inside your preferred hypervisor, such as VirtualBox or VMware Workstation. The VM must satisfy the following requirements:
Wird ein wireless Adapter verwendet, soll dieser auf die statische IP `10.0.0.1/24` konfiguriert sein. Wird eine andere Adresse verwendet, müssen die Files tapioca.cfg und /etc/dhcp/dhcpd.conf angepasst werden.


=Installation=
* IMPORTANT: The network adapter of the virtual machine must be set to the Host-only settings. This is extremely important to prevent potential spreading of malware onto the host system or network.  
1. Tapioca Source Code vom Git-Repository klonen (https://github.com/CERTCC/tapioca) oder als zip herunterladen und entpacken.<br/>
* The hard drive of the VM must be at least 60 GB large, RAM should be at least 2 GB (more is recommended)
2. Der Code soll sich im Verzeichnis "/home/tapioca/tapioca" befinden.<br/>
* Your Windows Username should not include any spaces or special characters
3. Den Installer starten mit dem Befehl `./install_tapioca.sh` im entsprechenden Verzeichnis. Eingabeaufforderungen folgen.<br/>
* Tamper Protection and any Antivirus program must be disabled.
4. Nach Abschluss das System neu starten.<br/>
* Windows Updates should also be disabled.
5. Nach dem Neustart mit dem User "tapioca" einloggen und die Xfce login session wählen.<br/>


=Quick Start=
[[File:FlareVM-Configuration.png|thumb|none|alt=VM configuration (VMWare Workstation)|VM configuration (VMware Workstation)]]
==Testen von Applikationen auf Wireless Geräten über den HOSTAP Adapter==
1. Verbinden eines HOSTAP-fähigen WIFI Adapter zur Tapioca-Maschine.<br/>
2. Klicken des Software WIFI AP Buttons (Funkturm-Symbol), um den wireless Access Point zu aktivieren.<br/>
3. Gerät mit dem Tapioca Access Point verbinden.<br/>
4. Klick auf den Tapioca-GUI-Button, um die Haupttest-Schnittstelle zu starten.<br/>


==Testen von Applikationen auf Wireless Geräten über den Access Point==
1. Den zweiten Netzwerkadapter des OS der Tapioca Maschine auf `10.0.0.1/24` konfigurieren.<br/>
2. Falls dieses Netzwerk bei der Installation nicht bereits konfiguriert wurde, führe `./install_tapioca.sh` erneut aus oder bearbeite tapioca.cfg manuell, um diesen Netzwerkgerätenamen für internal_net anzugeben.<br/>
3. Wenn Tapioca in einer virtuellen Maschine verwendet wird, konfiguriere den zweiten Netzwerkadapter der Tapioca-VM zu einem ungenutzten physischen Netzwerkadapter.<br/>
4. Verbinde den Uplink-Port des Access Points mit dem Tapioca-LAN-Port.<br/>
5. Verbinden des Geräts mit dem Access Point.<br/>
6. Klick auf den Tapioca-GUI-Button, um die Haupttest-Schnittstelle zu starten.<br/>


==Testen von Applikationen auf virtuellen Maschinen==
<span id="step-2-install-flare-vm"></span>
1. Den zweiten Netzwerkadapter des OS der Tapioca Maschine auf `10.0.0.1/24` konfigurieren.<br/>
== Step 2: Install Flare VM ==
2. Verbinde den zweiten Tapioca-Netzwerkadapter mit einem benutzerdefinierten Netzwerk und stelle sicher, dass die Virtualisierungssoftware diesem virtuellen Netzwerk kein DHCP bereitstellt.<br/>
3. Falls dieses Netzwerk bei der Installation nicht bereits konfiguriert wurde, führe `./install_tapioca.sh` erneut aus oder bearbeite tapioca.cfg manuell, um diesen Netzwerkgerätenamen für "internal_net" anzugeben.<br/>
4. Verbinde den Netzwerkadapter der virtuellen Maschine, auf der sich die zu testende Anwendung befindet, mit demselben virtuellen Netzwerk, das du für den zweiten Netzwerkadapter der Tapioca-VM verwendet hast.<br/>
5. Klick auf den Tapioca-GUI-Button, um die Haupttest-Schnittstelle zu starten.<br/>


=Capture Modes=
Go to the official FlareVM Github repository (https://github.com/mandiant/flare-vm)
==All traffic with tcpdump mode==
Im Modus "All traffic with tcpdump" greift Tapioca nicht in die HTTPS-Aushandlung ein. Dadurch kann Tapioca den HTTPS-Handshake zwischen Client und Server untersuchen.


==Verify SSL validation mode==
# Download the install.ps1 script
Im Modus "Verify SSL validation" fängt Tapioca den Webverkehr ab, die HTTPS-Kommunikation zwischen dem Client und Tapioca verwendet das erwähnte ungültige Root-CA-Zertifikat. Jeder HTTPS-Verkehr, der durchgelassen wird, ist ein Hinweis, dass der Client HTTPS-Zertifikate nicht validiert.
# Open Powershell as Administrator
# Go to the directory the script is located in and run: Unblock-File ..ps1
# Enable script execution: Set-ExecutionPolicy Unrestricted
# Type Y to accept
# Finally, exeute the script: .\install.ps1 and enter your Windows password when prompted


==Full HTTPS inspection mode==
This installation can take some time (up to 3 hours). Your machine will reboot a few times during the installation.
Im Modus "Full HTTPS inspection" fängt Tapioca den Webverkehr ab, die HTTPS-Kommunikation zwischen dem Client und Tapioca verwendet ein gültiges Root-CA-Zertifikat vom mitmproxy, das auf dem Client installiert wurde. Dies ermöglicht die Suche nach Inhalten im Webverkehr, auch wenn dieser mit HTTPS verschlüsselt wurde. Diese Erfassung ist erforderlich, um Suchfunktionen im verschlüsselten, aber nicht gepinnten Netzwerkverkehr zu ermöglichen.


=Manuelles Ausführen von Scripts=
Once you see “Type ENTER to exit:”, type Enter to Exit the script - then, the installation is complete.
Falls die GUI nicht verwendet wird, oder Troubleshooting notwendig ist, können die Python-Scripts auch manuell gegen aufgezeichneten Netzwerkverkehr (z.B. pcap Files) ausgeführt werden.
 
* checkcrypto.py - Überprüft, ob die HTTPS-Verhandlungen sicher sind (pcap erforderlich)
Now, you should definitely save a snapshot of the VM so you can always revert back to this state if needed. In case of any failed package installations, the install script should also generate a failed_packages.txt file, in which the tools that failed to install correctly are listed. In case you need one of those tools, you can then install it manually. Now, you can get started with analyzing some malware samples!
* checknet.py - Auflistung der Hosts, die mit welchen Protokollen kontaktiert werden, sowie der aufgelösten Hostnamen (pcap erforderlich)
 
* checkssl.py - Validierung, dass ein Client überprüft, ob ein SSL-Zertifikat von einem vertrauenswürdigen Anbieter ausgestellt wurde (mitmproxy-Protokolldatei erforderlich)
== References ==
* search.py - Suche nach Zeichenfolgen in Netzwerkaufzeichnungen (pcap- und/oder mitmproxy-Protokolldatei erforderlich)
https://github.com/mandiant/flare-vm
 
https://www.mandiant.com/resources/blog/flare-vm-the-windows-malware
 
[[Category:Documentation]]

Latest revision as of 14:39, 6 November 2023

Flare VM is a Windows distribution specifically designed for Malware Analysis. It includes all the relevant tools to get started in this field.

Step 1: Setup Virtual Machine

First, you need to setup a Windows 10 virtual machine. This can be done by downloading the ISO from Microsoft and installing it inside your preferred hypervisor, such as VirtualBox or VMware Workstation. The VM must satisfy the following requirements:

  • IMPORTANT: The network adapter of the virtual machine must be set to the Host-only settings. This is extremely important to prevent potential spreading of malware onto the host system or network.
  • The hard drive of the VM must be at least 60 GB large, RAM should be at least 2 GB (more is recommended)
  • Your Windows Username should not include any spaces or special characters
  • Tamper Protection and any Antivirus program must be disabled.
  • Windows Updates should also be disabled.
VM configuration (VMWare Workstation)
VM configuration (VMware Workstation)


Step 2: Install Flare VM

Go to the official FlareVM Github repository (https://github.com/mandiant/flare-vm)

  1. Download the install.ps1 script
  2. Open Powershell as Administrator
  3. Go to the directory the script is located in and run: Unblock-File ..ps1
  4. Enable script execution: Set-ExecutionPolicy Unrestricted
  5. Type Y to accept
  6. Finally, exeute the script: .\install.ps1 and enter your Windows password when prompted

This installation can take some time (up to 3 hours). Your machine will reboot a few times during the installation.

Once you see “Type ENTER to exit:”, type Enter to Exit the script - then, the installation is complete.

Now, you should definitely save a snapshot of the VM so you can always revert back to this state if needed. In case of any failed package installations, the install script should also generate a failed_packages.txt file, in which the tools that failed to install correctly are listed. In case you need one of those tools, you can then install it manually. Now, you can get started with analyzing some malware samples!

References

https://github.com/mandiant/flare-vm

https://www.mandiant.com/resources/blog/flare-vm-the-windows-malware