GBU Germany | Big Data and Security | science + computing ag P E E K AB O O E x t e n d E m a i l K now a word with K? At t a c h m e n t B e h a v i o r Ob s e r v a t i o n Ow l
GBU Germany | Big Data and Security | science + computing ag „PeekabooAV macht Cuckoo Sandbox zum AV.“ „Es ist die Verbindung zwischen Mail-System und Verhaltensanalyse.“ „Peekaboo verwaltet die Jobs und Samples, startet die Analyse, wertet aus und entscheidet.“ Was ist PeekabooAV?
GBU Germany | Big Data and Security | science + computing ag 3,5 Aufgaben Analyse verhindern um Ressourcen zu sparen Submit zur Verhaltensanalyse an Cuckoo Auswertung des Reports Treffen der Entscheidung (Good, Unknown, Bad)
GBU Germany | Big Data and Security | science + computing ag ▶ Felix Bauer – Atos HPC security, s+c Security Solutions, Tübingen ▶ Michael Weiser – Services Nord, Berlin ▶ Christoph Herrmann - Services Nord, Berlin ▶ Wir haben dieses Projekt vor 2 Jahren begonnen ▶ Kontakt: – @peekabooAV – GitHub scVENUS/PeekabooAV – YouTube Atos Tech Talks 9 Das Team
GBU Germany | Big Data and Security | science + computing ag ▶ Moderne Technologien der Malwareanalyse und Erkennung nutzen und schaffen ▶ OpenSource nutzen und stärken ▶ Die Cyber-Welt sicherer machen 10 Ziele
GBU Germany | Big Data and Security | science + computing ag ▶ Phishing – Email ist eines der Haupteinfallstore für Schadsoftware und Angriffe auf Firmen ▶ Links zu versuchten Webseiten ▶ Anhänge – ZIP-Dateien – JavaScript, Microsoft Office, PDF … – Ransomware – … ▶ Herausforderungen der modernen Malwareerkennung – Polymorphie, gezielte Angriffe, Zerodays – … E-Mail und Malware
GBU Germany | Big Data and Security | science + computing ag ▶ .* ▶ .rt, .webm, .tiff, .docx, csv ………… ▶ Dank Metasploit kann das jeder leicht nachvollziehen Verbieten jeglicher Anhänge 17 Dateien die Verwundbarkeiten triggern können
GBU Germany | Big Data and Security | science + computing ag ▶ Problem: – Emailformat ist hässlich – Verarbeitung und Interpretation sind Glückssache – Header, Encodings, Typen, Signatures, HTML Mails, Verschlüsselung …. ▶ Zum Glück gibt es Amavis ▶ Amavis (~30.000 Zeilen Perl) ▶ Industriestandard zur Anbindung von Virenscannern an Mailsysteme ▶ Kann infizierte Mails direkt bei Zustellung ablehnen Email Formate und Anhänge
GBU Germany | Big Data and Security | science + computing ag ▶ Amavis zerlegt die Mails und produziert Dateien p001 … p00x ▶ Original Dateiname ist entscheidend ▶ Original Dateinameserweiterung – Entscheided darüber welche Anwendung die Datei verarbeitet ▶ Datenfelder aus Amavis: – name_declared – type_declared – size – digest – queue_id ▶ dump.info Daten werden über den Socket als JSON an Peekaboo übergeben 21 Plugin für Amavis – dump.info
GBU Germany | Big Data and Security | science + computing ag ▶ Ausführung in einer kontrollierten, isolierten Umgebung (Sandbox) ▶ Beobachtung der ausgeführten Aktionen verraten Schadcode ▶ Signaturen identifizieren Aktionen als ungewollt, ungewöhnlich, exploit Versuch, Einnisten im Betriebssystem … Verhaltensanalyse
GBU Germany | Big Data and Security | science + computing ag ▶ Maschinenabbild des Unternehmens in der VM – Gleiche Software, gleiche Version – Gleiche Verwundbarkeiten – Gleiche Angriffsvektoren 25 Virtuelle Maschinen als Sandbox
GBU Germany | Big Data and Security | science + computing ag ▶ Korrektes Extrahieren der Anhänge ▶ Bestimmung des Dateityps ▶ Exploit Wahrscheinlichkeit ▶ Angriff auf Emailanwendung ▶ Angriffe auf Endpoint Protection ▶ Archive und Container ▶ Sandbox-Erkennung 26 Herrausforderungen
GBU Germany | Big Data and Security | science + computing ag ▶ Korrektes Extrahieren der Anhänge amavis ▶ Bestimmung des Dateityps name_declared ▶ Exploit Wahrscheinlichkeit gleicher Softwarestand ▶ Angriff auf Emailanwendung noch in Arbeit ▶ Angriffe auf die Enpoint Protection noch in Arbeit ▶ Archive und Container auspacken ▶ Sandbox-Erkennung Erkennungserkennung 27 Herrausforderungen
GBU Germany | Big Data and Security | science + computing ag ▶ https://cuckoo.sh/docs/index.html ▶ OpenSource (GPLv3) ▶ Support for „all“ hypervisors ▶ Agent.py runs in VMs ▶ Snapshot of running machines ▶ Analysis ▶ Debugger, API hooks, sniffer … gather data ▶ Communication over host only network ▶ Automated report generation Cuckoo Sandbox
GBU Germany | Big Data and Security | science + computing ag Macro-less Code Exec in MSWord ▶ https://sensepost.com/blog/2017/macro- less-code-exec-in-msword/ ▶ Dynamic Data Exchange (DDE) 39 Analysis Report Powershell-evilserver-ninja.docx 1
GBU Germany | Big Data and Security | science + computing ag ▶ Mailsystem empfängt Email (Postfix) ▶ Postfix benutzt Amavis ▶ Amavis ruft Peekaboo auf ▶ Peekaboo – Bekommt die Anhänge von Amavis – Analysiert sie – Startet, falls nötig, eine Verhaltensanalse – Wertet vollautomatisiert aus – und entscheidet ▶ Meldet zurück an Amavis ▶ Gibt die Mail zurück ans Mailsystem 45 Ablauf
GBU Germany | Big Data and Security | science + computing ag ▶ 1 email ▶ 3 attachments ▶ 3 samples ▶ Erster Anhang ist known ▶ Zweiter ist auf der whitelist ▶ Dritter startet Powershell-Prozess und wird als schädliche erkannt 48 Ablauf IV
GBU Germany | Big Data and Security | science + computing ag ▶ https://vmcloak.readthedocs.io/ ▶ http://jbremer.org/vmcloak3/ ▶ Automatische Erzeugung von Virtuellen Maschinen ▶ Analyse VMs für die Cuckoo Sandbox ▶ Mit VM-Verschleierung, Handware-Profile … 53 VMCloak (Zukunftsmusik)
GBU Germany | Big Data and Security | science + computing ag ▶ Geschrieben in Python ▶ Verarbeitet Parallel (Worker Model) ▶ Statische Tests ▶ Toolbox ▶ Verhaltensanalyse mit Cuckoo Sandbox ▶ Ausgewertet von konfigurierbarem Regelwerk ▶ Fast unbegrenzte Möglichkeiten ▶ Installer verfügbar auf GitHub – https://github.com/scVENUS/PeekabooAV-Installer/ Peekaboo Technologie und Funktionalität
GBU Germany | Big Data and Security | science + computing ag ▶ Sample Datenbank – Enthält Hashes und Ergebnis (#3) ▶ Peekaboo und Cuckoo laufen selbst in VM oder Container – Als weitere Hürde gegen Ausbrüche – Datenschutz – Skalierbarkeit 57 More Features
GBU Germany | Big Data and Security | science + computing ag https://github.com/scVENUS/PeekabooAV/releases/tag/v1.7 ▶ give threads names for easier identification ▶ add configuration for rule cuckoo_analysis_failed to override what constitutes failure and what reliably indicates success ▶ localise client communication, i.e. have the system report findings in English by default but provide gettext-compatible translation templates for other languages ▶ add German translation (which was hard-coded in the source before) ▶ add configuration option to force language of client communication beyond $LANG and friends ▶ massively speed up shutdown ▶ make the malware_reports directory configurable ▶ add reporting of an overall analysis result (not just per sample-results) to correctly convey failures in addition to good/bad decisions to the client ▶ usage of separate python virtualenvs for peekaboo and cuckoo is now recommended because we use newer module versions than cuckoo ▶ make internal configuration defaults work so that peekaboo.conf can be mostly empty in standard setups ▶ log multiple analysis jobs per sample in analysis_jobs to get an actual job log ▶ multi-node concurrency coordinated via DB, see section [cluster] in peekaboo.conf.sample ▶ remove analysis_results table from DB schema for simplicity and performance, bump version to 6 ▶ many bug fixes, internal cleanups and improviments PeekabooAV 1.7 released 24 April 2019
GBU Germany | Big Data and Security | science + computing ag ▶ OpenSource seit 19. Mai 2017 ▶ https://github.com/scVENUS/PeekabooAV ▶ Verfügbar, nutzerbar und erweiterbar von jedem ▶ GPLv3 ▶ Installer: https://github.com/scVENUS/PeekabooAV-Installer 61 Open Source Release
GBU Germany | Big Data and Security | science + computing ag ▶ Inline – Email wird erst nach dem Scan zugestellt (bisher nicht im Einsatz) ▶ BCC – Kopie der Mail wird gescannt, Warnung wird nachgeliefert ▶ Forward – Nutzer leiten auffällige Mails weiter (gut für verschlüsselte Nachrichten) 65 Betriebsarten
GBU Germany | Big Data and Security | science + computing ag ▶ Erweiterungen ▶ Weitere Tests, Regeln, Signaturen ▶ Anbindung weiterer Systeme (MISP, TheHIVE … SOC) ▶ … 68 Was kommt als Nächstes?
GBU Germany | Big Data and Security | science + computing ag ▶ Leeres Word-Dokument ▶ docx ▶ An Peekaboo geben oder direkt an Cuckoo ▶ Per Mail verschicken 73 Aufgabe 1 – Word-Dokument analysieren
GBU Germany | Big Data and Security | science + computing ag ▶ https://github.com/a0rtega/pafish ▶ https://github.com/David-Reguera-Garcia-Dreg/anticuckoo/ 76 Aufgabe 5 – crash cuckoo und pafish
GBU Germany | Big Data and Security | science + computing ag ▶ Exploits Microsoft Word ▶ https://cape.contextis.com/analysis/70091/ ▶ MalScore 7.9 Malicious ▶ SetUnhandledExceptionFilter detected (possible anti-debug) ▶ Dynamic (imported) function loading detected ▶ Tries to suspend Cuckoo threads to prevent logging of malicious activity ▶ Sniffs keystrokes ▶ A process attempted to delay the analysis task by a long amount of time. ▶ A possible heap spray exploit has been detected 78 Aufgabe 7 – createHugeTable2.docx
GBU Germany | Big Data and Security | science + computing ag ▶ T302 VMware Escapology How to Houdini The Hypervisor AbdulAziz Hariri Joshua Smith – https://youtu.be/uRemWLNBSZg ▶ Windows VMs – https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/ ▶ MISP – https://www.misp-project.org/ ▶ The Hive – https://thehive-project.org/ 80 Links …
GBU Germany | Big Data and Security | science + computing ag ▶ https://www.corelan.be/ ▶ … ▶ Hacking The Art of Exploitation ▶ Malware Analyst‘s Cookbook ▶ Practical Malware Analysis ▶ Security Engineering ▶ The Art of Memory Forensics ▶ Antivirus Hackers Handbook 81 Literatur und Links