{"id":53295,"date":"2025-04-10T09:03:08","date_gmt":"2025-04-10T13:03:08","guid":{"rendered":"https:\/\/www.kaspersky.com\/blog\/?p=53295"},"modified":"2025-04-10T09:03:08","modified_gmt":"2025-04-10T13:03:08","slug":"archive-and-disk-image-threats-and-security-policies","status":"publish","type":"post","link":"https:\/\/www.kaspersky.com\/blog\/archive-and-disk-image-threats-and-security-policies\/53295\/","title":{"rendered":"Security measures for handling archive files in organizations"},"content":{"rendered":"<p>Archiving programs designed to simplify file storage and transfers have become common tools not only for users but also for attackers. Malicious archives are regularly found in both targeted attacks and ransomware incidents. Attackers mainly use them to bypass security measures, deceive users, and, of course, extract stolen data. This means cybersecurity and IT departments should pay close attention to how archives are handled in operating systems, business applications, and security tools. Let\u2019s now look at how attackers can use archives.<\/p>\n<h3>Delivering malware by bypassing \u201cMark of the Web\u201d warnings<\/h3>\n<p>Due to the logical features and vulnerabilities of certain archivers, when unpacked in Windows, the extracted files may not receive the \u201cdownloaded from the internet\u201d attribute (<a href=\"https:\/\/en.wikipedia.org\/wiki\/Mark_of_the_Web\" target=\"_blank\" rel=\"nofollow noopener\">Mark of the Web<\/a>, or MotW). Technically, these attributes are stored in an NTFS alternate data stream: Zone.Identifier. If this identifier points to an external source (ZoneID = 3 or 4), Windows shows a warning when you attempt to run the executable file, and Office automatically opens potentially unsafe documents in Protected View.<\/p>\n<p>By exploiting flaws in archivers, <a href=\"https:\/\/securitythisday.com\/russian-cybercrime-groups-exploiting-7-zip-flaw-to-bypass-windows-motw-protections\/\" target=\"_blank\" rel=\"nofollow noopener\">attackers bypass this layer of protection<\/a>. The most recent vulnerability of this type is <a href=\"https:\/\/jvn.jp\/en\/jp\/JVN59547048\/\" target=\"_blank\" rel=\"nofollow noopener\">CVE-2025-31334<\/a> in WinRAR, but there are others: <a href=\"https:\/\/www.cve.org\/CVERecord?id=CVE-2025-0411\" target=\"_blank\" rel=\"nofollow noopener\">CVE-2025-0411<\/a> in 7-Zip, <a href=\"https:\/\/www.cve.org\/CVERecord?id=CVE-2024-8811\" target=\"_blank\" rel=\"nofollow noopener\">CVE-2024-8811<\/a> in WinZip, and more. Note that some archivers don\u2019t support MotW at all, and only apply it to certain file extensions, or only do so when files are unpacked in a certain way. A <a href=\"https:\/\/github.com\/nmantani\/archiver-MOTW-support-comparison\" target=\"_blank\" rel=\"nofollow noopener\">table comparing MotW support in archivers is available on GitHub<\/a>.<\/p>\n<h3>Automatic malware execution via archiver vulnerabilities<\/h3>\n<p>When a user performs a seemingly safe action (like viewing an archive or opening a harmless-looking file within it), under certain conditions the archiver can execute a malicious file or shellcode. A recent example of such a vulnerability was <a href=\"https:\/\/www.cve.org\/CVERecord?id=CVE-2024-11477\" target=\"_blank\" rel=\"nofollow noopener\">CVE-2024-11477<\/a> in the Zstandard algorithm, used by 7-Zip for compression. This flaw hasn\u2019t been seen in real-world attacks yet \u2014 unlike <a href=\"https:\/\/nvd.nist.gov\/vuln\/detail\/cve-2023-38831\" target=\"_blank\" rel=\"nofollow noopener\">CVE-2023-38831<\/a> in WinRAR, which was widely exploited by attackers ranging from <a href=\"https:\/\/blog.google\/threat-analysis-group\/government-backed-actors-exploiting-winrar-vulnerability\/\" target=\"_blank\" rel=\"nofollow noopener\">APT espionage groups<\/a> to <a href=\"https:\/\/www.bleepingcomputer.com\/news\/security\/winrar-zero-day-exploited-since-april-to-hack-trading-accounts\/\" target=\"_blank\" rel=\"nofollow noopener\">initial access brokers<\/a>. This WinRAR vulnerability allowed execution of a file from an archive when trying to view an image if the EXE file was placed in a folder with the same name as the image.<\/p>\n<p>In March 2025, a similar defect was discovered in an unusual place \u2014 the Vim editor, popular among *nix users. Its standard tar.vim plugin lets users view and edit files directly inside TAR archives. <a href=\"https:\/\/github.com\/vim\/vim\/security\/advisories\/GHSA-wfmf-8626-q3r3\" target=\"_blank\" rel=\"nofollow noopener\">CVE-2025-27423<\/a> allowed arbitrary shell command execution when editing a file from a malicious archive.<\/p>\n<h3>Server compromise via archive uploads<\/h3>\n<p>If an organization has a public web app that can handle archive uploads (such as attaching files to forms), vulnerabilities in archive unpacking can be used to hijack servers. A classic method is Zip Slip, which uses symbolic links in archives to bypass input sanitization and exploit path traversal vulnerabilities to compromise server-side applications.\u00a0 A list of various ZIP-handling libraries where this vulnerability has been patched (there are over 20 CVEs) is <a href=\"https:\/\/github.com\/snyk\/zip-slip-vulnerability\" target=\"_blank\" rel=\"nofollow noopener\">available on GitHub<\/a>. It\u2019s worth checking out to see how many instances of software can be affected by this flaw.<\/p>\n<p>Even though Zip Slip was first described in 2018, logical flaws in server-side archive unpacking are still common \u2014 as seen in <a href=\"https:\/\/cristivlad.medium.com\/rce-through-zip-unarchiving-9d9d11e91449\" target=\"_blank\" rel=\"nofollow noopener\">this 2025 pentest<\/a> and the recent vulnerability <a href=\"https:\/\/www.cvedetails.com\/cve\/CVE-2024-12905\/\" target=\"_blank\" rel=\"nofollow noopener\">CVE-2024-12905 in tar-fs<\/a>.<\/p>\n<h3>Bypassing security with corrupted archives<\/h3>\n<p>Attackers may intentionally corrupt archive contents so that automated scanners and security tools fail to analyze them fully. However, the victim can still manually recover and open the respective file with minimal effort. A recent example is the <a href=\"https:\/\/www.scworld.com\/news\/corrupted-word-documents-used-in-phishing-campaign\" target=\"_blank\" rel=\"nofollow noopener\">exploitation of MS Office\u2019s \u201cdocument recovery\u201d feature<\/a> \u2014 since Office files are essentially ZIP archives. Security tools and archivers may fail to scan such documents, but Word can restore and open them.<\/p>\n<h3>Masking malware with exotic formats<\/h3>\n<p>Beyond common formats like ZIP, RAR, and TAR\/TAR.GZ, attackers frequently use <a href=\"https:\/\/thedfirreport.com\/2023\/04\/03\/malicious-iso-file-leads-to-domain-wide-ransomware\/\" target=\"_blank\" rel=\"nofollow noopener\">disk image<\/a> files (ISO, IMG, VHD), <a href=\"https:\/\/cybernews.com\/security\/hackers-abuse-tax-day-lure-microsoft-warns\/\" target=\"_blank\" rel=\"nofollow noopener\">Windows archives<\/a> (CAB, MSI), and even legacy or obscure archive types: <a href=\"https:\/\/www.bleepingcomputer.com\/news\/security\/compression-file-formats-of-the-past-come-haunting-in-spam-campaigns\/\" target=\"_blank\" rel=\"nofollow noopener\">ARJ<\/a>, ACE, ICE, and others. Security tools often don\u2019t handle these well, while modern universal archivers like WinRAR can still open them.<\/p>\n<h3>Disguising malware using the Matryoshka method<\/h3>\n<p>Mail scanners and other security tools often have configurable limits to reduce server load (for example, they may skip scanning very large files or nested archives). If an attacker creates a \u201cmatryoshka doll\u201d (aka a \u201cRussian doll\u201d), of several nested archives, there\u2019s a higher chance that the innermost archive won\u2019t be automatically scanned in the targeted organization.<\/p>\n<h3>Bypassing security tools and tricking users using legitimate archive features<\/h3>\n<p>Attackers often combine social engineering and technical tricks to get users to perform desired actions with archives without triggering security alerts. These techniques include the following:<\/p>\n<p><strong>Encrypted archives.<\/strong> A classic trick from the early 2000s, which still works today. The victim receives a password-protected archive, and the password is either sent in a separate email or instant message, or hinted at within the original email itself: \u201cThe password is the current year repeated twice\u201d. For example, this method was used in the <a href=\"https:\/\/www.bleepingcomputer.com\/news\/security\/here-are-the-new-emotet-spam-campaigns-hitting-mailboxes-worldwide\/\" target=\"_blank\" rel=\"nofollow noopener\">Emotet<\/a> malware campaigns.<\/p>\n<p><strong>Self-extracting archives.<\/strong> These were originally useful in the days before archive utilities were built into all operating systems. Today, they allow attackers to easily install malware by bundling all the necessary components into a single file. For instance, the <a href=\"https:\/\/decoded.avast.io\/threatresearch\/needledropper\/\" target=\"_blank\" rel=\"nofollow noopener\">NeedleDropper<\/a> attack used a self-extracting archive to extract a popular legitimate tool, AutoIT, along with malicious AutoIT scripts, which were then executed. The attacker simply needs to trick the victim into running the archive.<\/p>\n<p><strong>A combination of the above.<\/strong> <a href=\"https:\/\/www.trustwave.com\/en-us\/resources\/blogs\/spiderlabs-blog\/archive-sidestepping-self-unlocking-password-protected-rar.html\" target=\"_blank\" rel=\"nofollow noopener\">Some attacks<\/a> use self-extracting archives that, once executed, unpack a password-protected inner archive. Technically, this password is stored within the outer archive, but few security tools can detect it there and use.<\/p>\n<p><strong>Double-extension archives.<\/strong> Another classic is a self-extracting archive with a \u201c.pdf.exe\u201d extension and an Acrobat Reader icon assigned by the archiver. For victims who are not too IT-savvy, these tricks are still convincing.<\/p>\n<p><strong>Multi-volume archives.<\/strong> This function was originally used to split large files across CDs, flash drives and so on. Today, this rarely-used feature is still supported by archivers. Attackers use it to divide malware among volumes, or bypass scanning entirely, as some tools are configured only to scan ZIP or RAR files, but not R01, R02, and so on.<\/p>\n<p><strong>Polyglot files.<\/strong> Attackers can combine different file types into a single one, so, for example, one app opens the file as a PDF and another as a ZIP archive. This works in part because technical ZIP file headers are located at the end of the file, not at the beginning. We recently covered an <a href=\"https:\/\/www.kaspersky.com\/blog\/polyglot-malware-masking-technique\/53263\/\" target=\"_blank\" rel=\"noopener nofollow\">attack by the Head Mare group<\/a>, where phishing emails contained a polyglot file made of both a malicious EXE file (with the PhantomPyramid backdoor) and a small, harmless ZIP archive. When clicked normally, it would open as a ZIP, but when launching the shortcut inside, the same polyglot file would execute as an EXE via PowerShell.\u00a0 Another version of the same method <a href=\"https:\/\/www.bleepingcomputer.com\/news\/security\/hackers-now-use-zip-file-concatenation-to-evade-detection\/\" target=\"_blank\" rel=\"nofollow noopener\">combines two archives in one polyglot file<\/a>.<\/p>\n<p><strong>Self-extracting archives as launch tools.<\/strong> A more exotic variant \u2014 which has been seen in <a href=\"https:\/\/www.crowdstrike.com\/en-us\/blog\/self-extracting-archives-decoy-files-and-their-hidden-payloads\/\" target=\"_blank\" rel=\"nofollow noopener\">actual attacks<\/a> \u2014 involves self-extracting archives that contain no actual files but include post-extraction commands to launch system tools like PowerShell or CMD, which are common in <a href=\"https:\/\/www.kaspersky.com\/blog\/lotl-attacks-detection-hardening-guidance\/50826\/\" target=\"_blank\" rel=\"noopener nofollow\">LotL<\/a> attacks.<\/p>\n<h3>Data exfiltration<\/h3>\n<p>Compressing data and encrypting an archive before exiting the attacked network is well documented under MITRE ATT&amp;CK technique <a href=\"https:\/\/attack.mitre.org\/techniques\/T1560\/\" target=\"_blank\" rel=\"nofollow noopener\">T1560<\/a>. Attackers use all options available: everything from basic archive tools on infected machines to popular archiving libraries built into the malware. In LotL attacks, attackers can combine techniques, using Windows utilities to collect files from other hosts and simultaneously archive them (<a href=\"https:\/\/attack.mitre.org\/techniques\/T1560\/001\/\" target=\"_blank\" rel=\"nofollow noopener\">diantz<\/a>).<\/p>\n<h2>Protective measures when handling archives<\/h2>\n<p>These measures should be prioritized and adapted based on the profile of your organization, department, and role.\u00a0 To protect yourself:<\/p>\n<p><strong>Test your security tools<\/strong> with tricky cases: exotic archive formats, corrupted archives, and polyglot files. If direct testing is difficult, ask your vendor\u2019s tech-support whether these cases are covered. At a minimum, test your mail gateway, NGFW, EDR\/XDR solution, and sandbox (if it\u2019s a separate solution). For example, in <a href=\"https:\/\/www.kaspersky.com\/small-to-medium-business-security\/mail-security-appliance?icid=gl_kdailyplacehold_acq_ona_smm__onl_b2b_kasperskydaily_wpplaceholder____\" target=\"_blank\" rel=\"noopener nofollow\">Kaspersky Secure Mail Gateway<\/a>, the sandbox is an integral part of the security architecture and prevents most malicious attachments from opening.<\/p>\n<p><strong>Set up safe extraction.<\/strong> Ensure your security solution can scan deeply nested archives and large files. Different tools will vary in this area: while mail filters can thoroughly scan attachments and detonate them in a sandbox, NGFWs will probably just check the reputation of the archive itself and its visible files.\u00a0 Therefore, deeper analysis should be used on both endpoints and mail gateways, while web filters and NGFWs should apply lighter checks within their limitations. In any case, archives that exceed reasonable analysis capabilities should be blocked or quarantined.<\/p>\n<p><strong>Block dangerous archives.<\/strong> Uploading archives in exotic formats, as well as self-extracting archives, is rarely necessary, so this functionality can be blocked on hosts. Additionally, using trusted application management (apps allowlist, application control), you can prohibit the execution of all archivers except the one or two that are permitted and actually used within the organization. It\u2019s important to analyze the use of built-in OS archiving tools and block those that aren\u2019t used by employees or the IT department. Make sure that none of the approved tools for Windows machines are ones that have no support for Mark-of-the-Web (MotW).<\/p>\n<p><strong>Block automatic mounting of disk images. <\/strong>Although disk images are not exactly archives, attackers use them in similar ways. Usage of disk images should be disabled through group policy for all employees who don\u2019t need it for legitimate business purposes.<\/p>\n<p><strong>Monitor the use of archivers on endpoints.<\/strong> Ensure that your EDR solution and monitoring tools (SIEM, XDR) have rules to help detect suspicious activity related to archives: launching files from temporary folders, launching processes from within an archiver, and so on. Monitoring is also needed to detect data theft attempts indicated by archiving data from network folders, creating password-protected archives, creating very large archives, and so on.<\/p>\n<p><strong>Restrict the use of archives in server-side applications.<\/strong> If uploading archived files is not a critically important business function, it\u2019s better to disable this feature in CMS, CRM, and other online applications. Ensuring its security can be challenging. If archives are required, be sure that the folders where these archives are uploaded are monitored by an EDR agent on the server, that the server application itself is updated regularly, and that the permissions granted to the application don\u2019t allow it to write files to any folders outside its designated directories.<\/p>\n<p>Include archivers and archive-processing applications in your <strong>vulnerability management program<\/strong>. Archivers should be updated no less frequently than the operating system and office software.<\/p>\n<p><strong>Train employees.<\/strong> Cybersecurity training for employees should cover phishing as well as general rules for safe handling of archives: pay attention to any pop-ups or unexpected prompts when opening familiar file types (DOC, PDF), only extract archives using the archiving application approved by the company, and if an archive immediately prompts for a password upon clicking the file, don\u2019t extract it under any circumstances and immediately report it to the security team.<\/p>\n<input type=\"hidden\" class=\"category_for_banner\" value=\"mdr\">\n","protected":false},"excerpt":{"rendered":"<p>Archives are being used in targeted phishing and other attacks on organizations. What tools, settings, and policies can mitigate the threat?<\/p>\n","protected":false},"author":2722,"featured_media":53296,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1999,3051,3052],"tags":[499,4629,4644,2141,19,36,76,420,4646,321,422,131,4645],"class_list":{"0":"post-53295","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-business","8":"category-enterprise","9":"category-smb","10":"tag-apt","11":"tag-archivers","12":"tag-archives","13":"tag-business","14":"tag-email","15":"tag-malware-2","16":"tag-phishing","17":"tag-ransomware","18":"tag-rar","19":"tag-technology","20":"tag-threats","21":"tag-tips","22":"tag-zip"},"hreflang":[{"hreflang":"x-default","url":"https:\/\/www.kaspersky.com\/blog\/archive-and-disk-image-threats-and-security-policies\/53295\/"},{"hreflang":"en-in","url":"https:\/\/www.kaspersky.co.in\/blog\/archive-and-disk-image-threats-and-security-policies\/28752\/"},{"hreflang":"en-ae","url":"https:\/\/me-en.kaspersky.com\/blog\/archive-and-disk-image-threats-and-security-policies\/23991\/"},{"hreflang":"en-gb","url":"https:\/\/www.kaspersky.co.uk\/blog\/archive-and-disk-image-threats-and-security-policies\/28869\/"},{"hreflang":"ru","url":"https:\/\/www.kaspersky.ru\/blog\/archive-and-disk-image-threats-and-security-policies\/39366\/"},{"hreflang":"ru-kz","url":"https:\/\/blog.kaspersky.kz\/archive-and-disk-image-threats-and-security-policies\/29024\/"},{"hreflang":"en-au","url":"https:\/\/www.kaspersky.com.au\/blog\/archive-and-disk-image-threats-and-security-policies\/34815\/"},{"hreflang":"en-za","url":"https:\/\/www.kaspersky.co.za\/blog\/archive-and-disk-image-threats-and-security-policies\/34447\/"}],"acf":[],"banners":"","maintag":{"url":"https:\/\/www.kaspersky.com\/blog\/tag\/archivers\/","name":"archivers"},"_links":{"self":[{"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/posts\/53295","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/users\/2722"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/comments?post=53295"}],"version-history":[{"count":3,"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/posts\/53295\/revisions"}],"predecessor-version":[{"id":53299,"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/posts\/53295\/revisions\/53299"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/media\/53296"}],"wp:attachment":[{"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/media?parent=53295"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/categories?post=53295"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/tags?post=53295"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}