# ReSi - Zettel 08 - **Abgebende**: Robin Bundschuh, Fabian Odenthal, Rahel Müller - **Link zum md**: <https://hackmd.io/@Plebshot/rJYZv3Lou> ## Aufgabe 1 - Signaturerkennung ___ ## Aufgabe 2 - Lokale Änderungen ### (1) Machen Sie sich mit den auf dem Desktop zur Verfügung gestellten Tools FakeNet, RegShot, Process Monitor, Process Explorer, strings2 (nutzbar über cmd), YaraGUI und Wireshark vertraut. Auf der Arbeitsfläche Ihrer VM finden Sie Verknüpfungen zu den Tools. Beschreiben Sie kurz, welchen Zweck die erwähnten Tools erfüllen - **FakeNet**: >FakeNet is a tool developed by Andrew Honig and Mike Sikorski. Its objective is to aid the malware analysts in the dynamic analysis of malicious softwares. The tool simulates a network so that malware interacting with a remote host continues to run allowing the analyst to observe the malware’s network activity from within a safe environment. It is able to intercept any traffic, including DNS, HTTP, HTTPS, SMTP, SMTP over SSL and has the ability to display SSL based traffic (e.g. HTTPS, SMTP/SSL) in clear [<https://www.aldeid.com/wiki/FakeNet>]. - **RegShot**: >Regshot is a small, free and open-source registry compare utility that allows you to quickly take a snapshot of your registry and then compare it with a second one - done after doing system changes or installing a new software product. The changes report can be produced in text or HTML format and contains a list of all modifications that have taken place between the two snapshots. In addition, you can also specify folders (with subfolders) to be scanned for changes as well. [<https://github.com/Seabreg/Regshot>] - **ProcessMonitor**: >Process Monitor is an advanced monitoring tool for Windows that shows real-time file system, Registry and process/thread activity. It combines the features of two legacy Sysinternals utilities, Filemon and Regmon, and adds an extensive list of enhancements including rich and non-destructive filtering, comprehensive event properties such as session IDs and user names, reliable process information, full thread stacks with integrated symbol support for each operation, simultaneous logging to a file, and much more. Its uniquely powerful features will make Process Monitor a core utility in your system troubleshooting and malware hunting toolkit. [<https://docs.microsoft.com/en-us/sysinternals/downloads/procmon>] - **ProcessExplorer**: >The Process Explorer display consists of two sub-windows. The top window always shows a list of the currently active processes, including the names of their owning accounts, whereas the information displayed in the bottom window depends on the mode that Process Explorer is in: if it is in handle mode you'll see the handles that the process selected in the top window has opened; if Process Explorer is in DLL mode you'll see the DLLs and memory-mapped files that the process has loaded. Process Explorer also has a powerful search capability that will quickly show you which processes have particular handles opened or DLLs loaded. [<https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer>] - **string2**: >Strings2 is a Windows 32bit and 64bit command-line tool for extracting strings from binary data. On top of the classical Sysinternals strings approach, this improved version is also able to dump strings from process address spaces and also reconstructs hidden assembly local variable assignment ASCII/unicode strings. Currently, the ASM-string extracting approach only supports the x86 instruction set. [<https://github.com/glmcdona/strings2>] - **YaraGUI**: >This is a GUI for the binary pattern matching scanner YARA. [<https://github.com/xxxzsx-archive/YARA-GUI>] Und weil das so toll viel aussagt: **Yara**: >YARA is a tool aimed at (but not limited to) helping malware researchers to identify and classify malware samples. With YARA you can create descriptions of malware families (or whatever you want to describe) based on textual or binary patterns. Each description, a.k.a. rule, consists of a set of strings and a boolean expression which determine its logic. [<https://github.com/VirusTotal/yara>] - **Wireshark**: >Wireshark is the world’s foremost and widely-used network protocol analyzer. It lets you see what’s happening on your network at a microscopic level and is the de facto (and often de jure) standard across many commercial and non-profit enterprises, government agencies, and educational institutions. [<https://www.wireshark.org/>] Ich kann toll Suchmaschinen benutzen oder? ### (2) Starten Sie das Programm FakeNet, RegShot, Process Monitor und Process Explorer mit Administrator-Rechten. Erstellen Sie mit RegShot einen ersten „Shot“, also einen „Abzug“ der aktuellen Registry Viel aussagender und relevanter Screenshot: ![1st_shot](https://i.imgur.com/NRUMNm5.png) ### (3) Führen Sie die Schadsoftware aus. Diese hat den Namen „Malicious“ und befindet sich auf dem Desktop. Viel aussagender und relevanter Screenshot 2 - Electric Boogaloo: ![malicious](https://i.imgur.com/34nltdd.png) ### (4) Erstellen Sie nach Beenden von „Malicious“ den zweiten Shot und vergleichen Sie den ersten mit dem zweiten Shot. Beschreiben Sie, was durch die Aktivität von „Malicious“ in der Registry passiert ist. Fügen Sie die relevanten Passagen der erzeugten Vergleichsdatei zwischen den beiden Shots in Ihre Lösungsdokumentation zu dieser Teilaufgabe ein Fun fact: ich hatte zuerst irgendwie 123 Änderungen. Nach Reset und erneutem Versuchen sah der Snapchotvergleich dann so aus: ![pwned_registry](https://i.imgur.com/3UIuCHh.png) Ohne viel Verständis der Registry kann man rauslesen, dass hier irgendwelche Tracing Mechanismen für bpk_RASAPI32 und bkp_RASMANCS ausgeschaltet werden. Zudem wird noch GDIPlus hinzugefügt. Kurzes benutzen der Suchmaschine meiner Wahl sagt uns: >Windows GDI+ is a class-based API for C/C++ programmers. It enables applications to use graphics and formatted text on both the video display and the printer. Applications based on the Microsoft Win32 API do not access graphics hardware directly. Instead, GDI+ interacts with device drivers on behalf of applications. GDI+ is also supported by Microsoft Win64. [<https://docs.microsoft.com/en-us/windows/win32/gdiplus/-gdiplus-gdi-start>] >rasapi32.dll is the Remote Access API (RAS), used by Windows applications to control modem connections. [<https://www.processlibrary.com/en/directory/files/rasapi32/24102/>] Die Suche nach bkp_RASMANCS ergibt interessante Ergebnisse, die sofort alle Alarmglocken leuten lassen sollten: ![bkp_RASMANCS](https://i.imgur.com/wi8fZMY.png) Das wohl interessanteste ist, dass der ´...\\CurrentLanguage\\Help´ Key auf einen sehr langen Hexstring gesetzt wird, der vermutlich ein ausführbares (schädliches) Programm oder ähnliches darstellt. ### (5) Was sehen Sie während der Ausführung der Schadsoftware in Process Monitor und Process Explorer? Welche Programme werden hinzugefügt? Welche ausgeführt? Welche Dateien werden regelmäßig erstellt? Erstellen Sie geeignete Bildschirmfotos Ihres Desktops und fügen Sie diese der Lösung bei Im Process Monitor kann man genau verfolgen, welche Aktionen nach dem Ausführen von `malicious.exe` passiert sind. ![monitor](https://i.imgur.com/wQOQVz0.png) Jetzt ist meine Motivation aber wegen Übermüdung am Ende und ich mag Windoof nicht. :( ___ ## Aufgabe 3 - Netzwerkverkehr ___ ## Afugabe 4 - Malwareerkennung