{"id":219,"date":"2025-03-03T15:48:07","date_gmt":"2025-03-03T20:48:07","guid":{"rendered":"https:\/\/freshphish.info\/?p=219"},"modified":"2025-03-03T15:48:59","modified_gmt":"2025-03-03T20:48:59","slug":"malicious-svg-attachment","status":"publish","type":"post","link":"https:\/\/freshphish.info\/?p=219","title":{"rendered":"Malicious SVG Attachment"},"content":{"rendered":"\n<p>I&#8217;ve known for some time that .svg email attachments could be malicious, but this is the first time I&#8217;ve actually run across one. First, what is a .svg file? It&#8217;s a Scalable Vector Graphic file. Even though it&#8217;s typically displayed as an image, if you look at the source of the file, it&#8217;s essentially an xml file. I alerted my team of the possibility of these files being malicious a few months ago. I didn&#8217;t post here because I didn&#8217;t have an example of a malicious svg file. Now I do, so here it is.<\/p>\n\n\n\n<p>First, here is the email. It was sent from what appears to be a compromised email account since it was sent from hosts authorized in the SPF record to send using this domain. However, the domain isn&#8217;t protected by DMARC so it&#8217;s unlikely they take email security seriously. It&#8217;s posing as an Adobe shared file, saying to use the attachment to access the files.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"613\" src=\"https:\/\/freshphish.info\/wp-content\/uploads\/2025\/03\/EmailScreenshot-1024x613.jpg\" alt=\"\" class=\"wp-image-220\" srcset=\"https:\/\/freshphish.info\/wp-content\/uploads\/2025\/03\/EmailScreenshot-1024x613.jpg 1024w, https:\/\/freshphish.info\/wp-content\/uploads\/2025\/03\/EmailScreenshot-300x179.jpg 300w, https:\/\/freshphish.info\/wp-content\/uploads\/2025\/03\/EmailScreenshot-768x459.jpg 768w, https:\/\/freshphish.info\/wp-content\/uploads\/2025\/03\/EmailScreenshot.jpg 1130w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Looking at the source of the .svg file attachment, you can see the xml. It contains a script designating the source in the included base64 text. You&#8217;ll see I removed portions of the text that specify the email address of the recipient.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"897\" height=\"537\" src=\"https:\/\/freshphish.info\/wp-content\/uploads\/2025\/03\/svgattachment-1.jpg\" alt=\"\" class=\"wp-image-223\" srcset=\"https:\/\/freshphish.info\/wp-content\/uploads\/2025\/03\/svgattachment-1.jpg 897w, https:\/\/freshphish.info\/wp-content\/uploads\/2025\/03\/svgattachment-1-300x180.jpg 300w, https:\/\/freshphish.info\/wp-content\/uploads\/2025\/03\/svgattachment-1-768x460.jpg 768w\" sizes=\"auto, (max-width: 897px) 100vw, 897px\" \/><\/figure>\n\n\n\n<p>Decoding the base64, you can see an obfuscated script:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"618\" height=\"218\" src=\"https:\/\/freshphish.info\/wp-content\/uploads\/2025\/03\/decryptedbase64script.jpg\" alt=\"\" class=\"wp-image-222\" srcset=\"https:\/\/freshphish.info\/wp-content\/uploads\/2025\/03\/decryptedbase64script.jpg 618w, https:\/\/freshphish.info\/wp-content\/uploads\/2025\/03\/decryptedbase64script-300x106.jpg 300w\" sizes=\"auto, (max-width: 618px) 100vw, 618px\" \/><\/figure>\n\n\n\n<p>If you load it into a browser, which I did through Any.Run, you can see it ends up at a phishing page posing as an M365 signin page.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"541\" src=\"https:\/\/freshphish.info\/wp-content\/uploads\/2025\/03\/landingpage1-1024x541.jpg\" alt=\"\" class=\"wp-image-224\" srcset=\"https:\/\/freshphish.info\/wp-content\/uploads\/2025\/03\/landingpage1-1024x541.jpg 1024w, https:\/\/freshphish.info\/wp-content\/uploads\/2025\/03\/landingpage1-300x158.jpg 300w, https:\/\/freshphish.info\/wp-content\/uploads\/2025\/03\/landingpage1-768x406.jpg 768w, https:\/\/freshphish.info\/wp-content\/uploads\/2025\/03\/landingpage1.jpg 1053w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>I&#8217;d love to block all SVG files due to how easy it is to put together a malicious file, much like wanting to do this with html files, it&#8217;s not feasible since they are too commonly used in legitimate emails.<\/p>\n\n\n\n<p>&#8211;Matt<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve known for some time that .svg email attachments could be malicious, but this is the first time I&#8217;ve actually<\/p>\n<p><a href=\"https:\/\/freshphish.info\/?p=219\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\">Malicious SVG Attachment<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[12],"tags":[60,58,61,57,4,59,56],"class_list":["post-219","post","type-post","status-publish","format-standard","hentry","category-phish","tag-adobe","tag-attachment","tag-base64","tag-malicious","tag-phish","tag-scalable-vector-graphic","tag-svg"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/freshphish.info\/index.php?rest_route=\/wp\/v2\/posts\/219","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/freshphish.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/freshphish.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/freshphish.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/freshphish.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=219"}],"version-history":[{"count":1,"href":"https:\/\/freshphish.info\/index.php?rest_route=\/wp\/v2\/posts\/219\/revisions"}],"predecessor-version":[{"id":225,"href":"https:\/\/freshphish.info\/index.php?rest_route=\/wp\/v2\/posts\/219\/revisions\/225"}],"wp:attachment":[{"href":"https:\/\/freshphish.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=219"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/freshphish.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=219"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/freshphish.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=219"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}