Multiple Vulnerabilities in 7-Zip Could Allow for Arbitrary Code Execution

Discussion in 'other security issues & news' started by ronjor, Jan 30, 2018.

  1. ronjor

    ronjor Global Moderator

    Joined:
    Jul 21, 2003
    Posts:
    177,004
    Location:
    Texas
    MS-ISAC ADVISORY NUMBER: 2018-009
     
  2. xxJackxx

    xxJackxx Registered Member

    Joined:
    Oct 23, 2008
    Posts:
    9,145
    Location:
    USA
    I wonder is this only applies to 7-Zip or any software that supports the format...
     
  3. stapp

    stapp Global Moderator

    Joined:
    Jan 12, 2006
    Posts:
    27,164
    Location:
    UK
    Note..

    SYSTEMS AFFECTED:
    • 7-Zip versions prior to 18.00
     
  4. Sampei Nihira

    Sampei Nihira Registered Member

    Joined:
    Apr 7, 2013
    Posts:
    3,800
    Location:
    Italy
    Also Bandizip 5.19 (XP)
    I recommend replacing the entire contents of the 7-zip folder.:thumb:
     
  5. WildByDesign

    WildByDesign Registered Member

    Joined:
    Sep 24, 2013
    Posts:
    2,587
    Location:
    Toronto, Canada
    Here are some Windows 10 RS3+ Process Mitigations for hardening 7-Zip:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <root>
      <AppConfig Executable="7z.exe">
        <DEP Enable="true" EmulateAtlThunks="false" OverrideDEP="false"></DEP>
        <ASLR Enable="true" ForceRelocateImages="false" OverrideForceRelocateImages="false" BottomUp="true" HighEntropy="true" OverrideBottomUp="false"></ASLR>
        <StrictHandle Enable="true" OverrideStrictHandle="false"></StrictHandle>
        <ExtensionPoints DisableExtensionPoints="true" OverrideExtensionPoint="false"></ExtensionPoints>
        <ControlFlowGuard Enable="true" SuppressExports="false" OverrideCFG="false"></ControlFlowGuard>
        <Fonts DisableNonSystemFonts="true" AuditOnly="false" OverrideFontDisable="false" Audit="false"></Fonts>
        <ImageLoad BlockRemoteImageLoads="true" OverrideBlockRemoteImageLoads="false" BlockLowLabelImageLoads="true" OverrideBlockLowLabel="false" AuditRemoteImageLoads="false" AuditLowLabelImageLoads="false"></ImageLoad>
        <Payload EnableExportAddressFilter="true" OverrideExportAddressFilter="false" AuditEnableExportAddressFilter="false" EnableExportAddressFilterPlus="true" OverrideExportAddressFilterPlus="false" AuditEnableExportAddressFilterPlus="false" EnableImportAddressFilter="true" OverrideImportAddressFilter="false" AuditEnableImportAddressFilter="false" EnableRopStackPivot="true" OverrideEnableRopStackPivot="false" AuditEnableRopStackPivot="false" EnableRopCallerCheck="true" OverrideEnableRopCallerCheck="false" AuditEnableRopCallerCheck="false" EnableRopSimExec="true" OverrideEnableRopSimExec="false" AuditEnableRopSimExec="false"></Payload>
        <SEHOP Enable="true" TelemetryOnly="false" OverrideSEHOP="false"></SEHOP>
        <Heap TerminateOnError="true" OverrideHeap="false"></Heap>
        <ChildProcess DisallowChildProcessCreation="true" OverrideChildProcess="false" Audit="false"></ChildProcess>
      </AppConfig>
      <AppConfig Executable="7zFM.exe">
        <DEP Enable="true" EmulateAtlThunks="false" OverrideDEP="false"></DEP>
        <ASLR Enable="true" ForceRelocateImages="false" OverrideForceRelocateImages="false" BottomUp="true" HighEntropy="true" OverrideBottomUp="false"></ASLR>
        <StrictHandle Enable="true" OverrideStrictHandle="false"></StrictHandle>
        <ExtensionPoints DisableExtensionPoints="true" OverrideExtensionPoint="false"></ExtensionPoints>
        <ControlFlowGuard Enable="true" SuppressExports="false" OverrideCFG="false"></ControlFlowGuard>
        <Fonts DisableNonSystemFonts="true" AuditOnly="false" OverrideFontDisable="false" Audit="false"></Fonts>
        <ImageLoad BlockRemoteImageLoads="true" OverrideBlockRemoteImageLoads="false" BlockLowLabelImageLoads="true" OverrideBlockLowLabel="false" AuditRemoteImageLoads="false" AuditLowLabelImageLoads="false"></ImageLoad>
        <Payload EnableExportAddressFilter="true" OverrideExportAddressFilter="false" AuditEnableExportAddressFilter="false" EnableExportAddressFilterPlus="true" OverrideExportAddressFilterPlus="false" AuditEnableExportAddressFilterPlus="false" EnableImportAddressFilter="true" OverrideImportAddressFilter="false" AuditEnableImportAddressFilter="false" EnableRopStackPivot="true" OverrideEnableRopStackPivot="false" AuditEnableRopStackPivot="false" EnableRopCallerCheck="true" OverrideEnableRopCallerCheck="false" AuditEnableRopCallerCheck="false" EnableRopSimExec="true" OverrideEnableRopSimExec="false" AuditEnableRopSimExec="false"></Payload>
        <SEHOP Enable="true" TelemetryOnly="false" OverrideSEHOP="false"></SEHOP>
        <Heap TerminateOnError="true" OverrideHeap="false"></Heap>
        <ChildProcess DisallowChildProcessCreation="true" OverrideChildProcess="false" Audit="false"></ChildProcess>
      </AppConfig>
      <AppConfig Executable="7zG.exe">
        <DEP Enable="true" EmulateAtlThunks="false" OverrideDEP="false"></DEP>
        <ASLR Enable="true" ForceRelocateImages="false" OverrideForceRelocateImages="false" BottomUp="true" HighEntropy="true" OverrideBottomUp="false"></ASLR>
        <StrictHandle Enable="true" OverrideStrictHandle="false"></StrictHandle>
        <ExtensionPoints DisableExtensionPoints="true" OverrideExtensionPoint="false"></ExtensionPoints>
        <ControlFlowGuard Enable="true" SuppressExports="false" OverrideCFG="false"></ControlFlowGuard>
        <Fonts DisableNonSystemFonts="true" AuditOnly="false" OverrideFontDisable="false" Audit="false"></Fonts>
        <ImageLoad BlockRemoteImageLoads="true" OverrideBlockRemoteImageLoads="false" BlockLowLabelImageLoads="true" OverrideBlockLowLabel="false" AuditRemoteImageLoads="false" AuditLowLabelImageLoads="false"></ImageLoad>
        <Payload EnableExportAddressFilter="true" OverrideExportAddressFilter="false" AuditEnableExportAddressFilter="false" EnableExportAddressFilterPlus="true" OverrideExportAddressFilterPlus="false" AuditEnableExportAddressFilterPlus="false" EnableImportAddressFilter="true" OverrideImportAddressFilter="false" AuditEnableImportAddressFilter="false" EnableRopStackPivot="true" OverrideEnableRopStackPivot="false" AuditEnableRopStackPivot="false" EnableRopCallerCheck="true" OverrideEnableRopCallerCheck="false" AuditEnableRopCallerCheck="false" EnableRopSimExec="true" OverrideEnableRopSimExec="false" AuditEnableRopSimExec="false"></Payload>
        <SEHOP Enable="true" TelemetryOnly="false" OverrideSEHOP="false"></SEHOP>
        <Heap TerminateOnError="true" OverrideHeap="false"></Heap>
        <ChildProcess DisallowChildProcessCreation="true" OverrideChildProcess="false" Audit="false"></ChildProcess>
      </AppConfig>
    </root>

    Note that I do have Child Process Policy mitigation enabled as well which will ensure that none of those 7-Zip binaries create child processes. This could be beneficial with self extracting type of 7-Zip malware, potentially. But Child Process mitigation can be disabled if it is problematic during regular usage.

    One mitigation that I found particularly problematic with 7-Zip is ASLR's Disallow Stripped Images.
     
  6. mary7

    mary7 Registered Member

    Joined:
    Oct 17, 2017
    Posts:
    57
    Location:
    Italy
    question: for programs like malwearebytes that use a 7zip library, do we need to update this library?

    I don t use 7zip But some programs lire malwearebytes have its library
     
  7. deBoetie

    deBoetie Registered Member

    Joined:
    Aug 7, 2013
    Posts:
    1,832
    Location:
    UK
    It looks like the current version of Peazip uses 7zip backend at 17.01 beta which is vulnerable.
     
  8. mary7

    mary7 Registered Member

    Joined:
    Oct 17, 2017
    Posts:
    57
    Location:
    Italy
    I asked for Malwarebytes and they release in the first week of February a new version of MBam 3 with the 7z.dll without the vulnerabilities.

    I have a question, I use WinRar and I see that there is a file called 7zxa.dll version 16.2.0 it needs to be replace whith the new 18.1 or can be have problems WinRar in his execution after this change?

    Edit in the 7zip folder there isn't a 7zxa.dll so it can't be changed for the WinRar
     
    Last edited: Feb 1, 2018
  9. guest

    guest Guest

    Third-party programs which are using the 7-Zip library and were released prior the release of 7-Zip 18.00/18.01 can be considered vulnerable.
    New releases of affected programs (PeaZip, etc.) are needed.
     
  10. mary7

    mary7 Registered Member

    Joined:
    Oct 17, 2017
    Posts:
    57
    Location:
    Italy
    For the 7zxa.dll that is in WinRar it was also update at version 18.1 it can be found in the package called 7z1801-extra.7z
     
  11. Palancar

    Palancar Registered Member

    Joined:
    Oct 26, 2011
    Posts:
    2,500
    Haven't checked yet but I wonder if Debian is going to automatically update 7z in their repositories? I have it and use it alot for simple little files. More like privacy stuff then security.

    Edit: I went and checked and I only see older versions for debian. I realize 7 Zip 18.01 was only released on 1-28-18, so I am hoping that Debian quickly offers the latest and greatest! My 7Z vaults are pretty small and I only have 10 or so to redo when I get my hands on 18.01. Its only been a few days.
     
    Last edited: Feb 2, 2018
  12. Palancar

    Palancar Registered Member

    Joined:
    Oct 26, 2011
    Posts:
    2,500
    Just a quick note. Debian did send out 7 zip updates a couple of days ago. Apt-get grabs them as needed.
     
  13. beethoven

    beethoven Registered Member

    Joined:
    Dec 27, 2004
    Posts:
    1,414
    from the Bandizip forum and the developer:
    Bandizip does not use 7zip(or p7zip) to extract rar or zip(shrink) formats. So, I believe Bandizip does not have these problems. If he/she release POC samples of this problem, I will check it again.
     
  14. beethoven

    beethoven Registered Member

    Joined:
    Dec 27, 2004
    Posts:
    1,414
    How would this vulnerability be used with respect to malwarebyte?
     
  15. mary7

    mary7 Registered Member

    Joined:
    Oct 17, 2017
    Posts:
    57
    Location:
    Italy

    I don't know if the vulnerabilities can be used with Malwarebytes but when there was on 2016 a vulnerability in 7zip library it was necessary to change the 7zip.dll that is in the program
     
  16. shmu26

    shmu26 Registered Member

    Joined:
    Jul 9, 2015
    Posts:
    1,550
    Partitioning softwares often have 7zip. I would assume you can just paste the new file into their folder.
     
  17. Sampei Nihira

    Sampei Nihira Registered Member

    Joined:
    Apr 7, 2013
    Posts:
    3,800
    Location:
    Italy
    Bandizip 5.19 use 7zip:

    4.JPG
     
  18. BoerenkoolMetWorst

    BoerenkoolMetWorst Registered Member

    Joined:
    Dec 22, 2009
    Posts:
    4,943
    Location:
    Outer space
    MWB probably uses it to unpack 7zip files to be able to scan them. So if a 7zip file is dropped on the PC and it is scanned by realtime protection(not sure if it scans packed files, or scanned when executed), a malicious 7zip file can exploit the vulnerability and potentially have system rights because MWB has system rights.
     
  19. guest

    guest Guest

    This folder is not available on newer versions.
    Btw.: Bandizip has been updated to v6.12 today.

    But ok, you are using XP and must use 5.x
    FYI: v5.20 (for XP) is available :)
     
  20. Sampei Nihira

    Sampei Nihira Registered Member

    Joined:
    Apr 7, 2013
    Posts:
    3,800
    Location:
    Italy
    TH.:)
    Almost certainly they corrected that vulnerability.
    I preceded them.;)
     
  21. deBoetie

    deBoetie Registered Member

    Joined:
    Aug 7, 2013
    Posts:
    1,832
    Location:
    UK
    Seems like Peazip (6.5.1 on Windows) is now updated:

    http://www.peazip.org/changelog.html

    2018 02 18

    6.5.1
    BACKEND
    (Windows) 7z 18.01 to fix CVE-2017-17969 and CVE-2018-5996 vulnerabilities in the 17.x backend
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.