Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Nested nullsoft installer detected as exe #542

Open
1 task done
aaronliu0130 opened this issue Mar 24, 2024 · 10 comments
Open
1 task done

[Bug]: Nested nullsoft installer detected as exe #542

aaronliu0130 opened this issue Mar 24, 2024 · 10 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@aaronliu0130
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

komac update -i Waterfox.Waterfox --version G6.0.11 --urls https://cdn1.waterfox.net/waterfox/releases/G6.0.11/WINNT_x86_64/Waterfox%20Setup%20G6.0.11.exe -o .
Despite the previous manifest having an installer type of nullsoft, komac changed it to exe. In one occasion, it got changed to portable.

@aaronliu0130 aaronliu0130 added bug Something isn't working help wanted Extra attention is needed labels Mar 24, 2024
@aaronliu0130 aaronliu0130 changed the title [Bug]: Nullsoft installer detected as exe [Bug]: Nested nullsoft installer detected as exe Mar 24, 2024
@aaronliu0130 aaronliu0130 changed the title [Bug]: Nested nullsoft installer detected as exe [Bug]: Nested inno installer detected as exe Mar 24, 2024
@aaronliu0130 aaronliu0130 changed the title [Bug]: Nested inno installer detected as exe [Bug]: Nested nullsoft installer detected as exe Mar 24, 2024
@russellbanks
Copy link
Owner

russellbanks commented Mar 24, 2024

This is a UPX installer rather than a Nullsoft installer which is why the installer type is exe. The installer type changing to portable is Komac trying to find if it's a generic installer rather than a known one like Nullsoft or Inno. I'll make a change to this so it gets identified as an exe.

@russellbanks
Copy link
Owner

I'll keep this open and see if there's a way to unpack UPX installers to find out what their underlying installer is.

@russellbanks russellbanks reopened this Mar 24, 2024
@aaronliu0130
Copy link
Author

Can it preserve the previous installer type if it's more specific than exe?

@a-mnich
Copy link

a-mnich commented May 14, 2024

@russellbanks I also had a case where the installer type was wrongly set to portable.
However based on the current komac implementation I would have expected that the basic installer logic applies here as the original filename contains "setup".
I can't seem to figure out why this didn't work here.

grafik

komac update --identifier mitmproxy.mitmproxy --version 10.3.0 --urls https://downloads.mitmproxy.org/10.3.0/mitmproxy-10.3.0-windows-x86_64-installer.exe

@russellbanks
Copy link
Owner

@russellbanks I also had a case where the installer type was wrongly set to portable. However based on the current komac implementation I would have expected that the basic installer logic applies here as the original filename contains "setup". I can't seem to figure out why this didn't work here.

Thanks for letting me know @a-mnich. I've been looking into this today and the issue appears to be that the StringFileInfo in the file doesn't lie on a 32-bit boundary when it should.

However, PowerShell and others like VirusTotal are still able to get the VSVersionInfo data despite that so I'm now experimenting with yara-x which is an early rewrite of VirusTotal's yara library, which is what they use to analyse malware.

@Utesgui
Copy link

Utesgui commented May 17, 2024

@russellbanks here is another case where komac set the InstallerType to portabel instead of nullsoft :) :
microsoft/winget-pkgs#153880

@russellbanks
Copy link
Owner

russellbanks commented May 17, 2024

@a-mnich, I've changed the PE analysis to use yara-x in 8cab840 which resolves the issue with mitmproxy.mitmproxy.

@russellbanks
Copy link
Owner

@russellbanks here is another case where komac set the InstallerType to portabel instead of nullsoft :) : microsoft/winget-pkgs#153880

@Utesgui, this one is an odd one because the installer isn't obvious that it's a Nullsoft installer. However, VirusTotal identifies as it likely to be Nullsoft. I'll work on the identifying installers when they don't have the usual identifiers for being a Nullsoft installer. For now, I've added a check so if the last InstallerType is not portable but the new one has been identified as portable, use the old installer type instead.

@aaronliu0130
Copy link
Author

Great! Could you perhaps add the same check for the new one being detected as exe?

@russellbanks
Copy link
Owner

@russellbanks here is another case where komac set the InstallerType to portabel instead of nullsoft :) : microsoft/winget-pkgs#153880

This is fixed in komac v2.7.0 as this brings much deeper analysis and understanding of Nullsoft installers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants