pyfa-org / Pyfa

Python fitting assistant, cross-platform fitting tool for EVE Online
GNU General Public License v3.0
1.59k stars 402 forks source link

pyfa-v2.57.0-win.exe reported as Trojan:Win32/Wacatac.B!ml in Windows Defender #2550

Closed diamondmx closed 7 months ago

diamondmx commented 7 months ago

Bug Report

image

Windows Defender reports latest patch as Trojan:Win32/Wacatac.B!ml

Expected behavior:

No infection warnings

Actual behavior:

Windows believes this file contains a specific threat

Detailed steps to reproduce:

Run latest windows installer, then execute PyFA

Fits involved in EFT format (Edit > To Clipboard > EFT):

N/A

Release or development git branch? Please note the release version or commit hash:

pyfa-v2.57.0-win.exe

Operating system and version (eg: Windows 10, OS X 10.9, OS X 10.11, Ubuntu 16.10):

Win10 Home 22H2

Other relevant information:

Previous install (2 versions ago) did not trigger this warning, merely the unknown program warning.

DarkFenX commented 7 months ago

Older versions use very old pyinstaller version (I upgraded from pyinstaller 3.6 to 6.2 this release). Given it has lots of security issues I'd try to stay on current one if possible.

There are lots of reports in pyinstaller repository: https://github.com/pyinstaller/pyinstaller/issues?q=is%3Aissue+trojan+is%3Aclosed Specifically on this trojan version: https://github.com/pyinstaller/pyinstaller/issues?q=is%253Aissue+wacatac+is%253Aclosed

Seems like the only way to deal with it is to report to microsoft as false positive, and add exception (is there a way to do it?) as a temporary measure. What pyinstaller maintainers say about the issue (here):

The reason that this is happening only on the latest PyInstaller is because the cycle of PyInstaller users reporting false positives to MS Defender Services -> MS Defender memorises the new bootloaders baked into PyInstaller built programs and adds it to its whitelist -> that whitelist gets put into a security update -> you install said update on your machine (probably automatically). This happens every new release...

Given that it's demonstrated that it is nothing more than a big cache of checksums (just much less efficient), I generally recommend that you turn MS Defender off.

The only way I could fix that is downgrading pyinstaller until first version which doesn't get false positives, but even if nothing breaks, it will take effort and time.

DarkFenX commented 7 months ago

For the reference:

Zip has quite a few of reds, but I guess it's because pyinstaller 6.2 was released just 3 weeks ago: https://github.com/pyinstaller/pyinstaller/releases/tag/v6.2.0 (and exe doesn't get them because some AV tools can't read inno setup files)

Madman045 commented 7 months ago

Hi, not just windows defender, Bitdefender is also reporting it as an infected file, this time its W64/S-4497c8ad!Eldorado

Virus Total also confirms this

image

DarkFenX commented 7 months ago

I know. I just linked it. Doesn't make it a true positive nevertheless. Anyone who's able to read the code can inspect diff between v2.57.0 and v2.56.0 and see there is no trojan.

Tomorrow I will try building with older pyinstaller versions (e.g. 6.1.0 and 6.0.0) and see how AV monitors react to that. If it solves the issue, I can move to those just for windows.

PlutusPleion commented 7 months ago

Hybrid-Analysis:

https://www.hybrid-analysis.com/sample/34bb4da701f57403a9df423cf9551404ccf41586b930fd9432ffbda795cbbcff

100% malicious? Can we get a 3rd party opinion? Do I need to reinstall windows?

DarkFenX commented 7 months ago

It has happened before multiple times. Once it even reached reddit, you can read it here.

Don't reinstall windows (although I won't hold you back if you really want to).

If you are really paranoid, you can take those steps to ensure build wasn't compromised by me (or ask an IT guy you trust):

This should prove that there was no tampering with code on my side.

Or just upload to virustotal and see it for yourself, that most AV monitors don't detect anything. Follow links I provided above for explanation of why new versions of pyinstaller trigger it. Since this issue keeps reappearing, I am really annoyed about the way (mostly) lower-end AV tools handle it (or, rather, sharing sentiment of the pyinstaller development team).

As I said, I will try rolling back pyinstaller versions one by one and using virustotal to see which one is mostly red-free. But, it will take time.

DarkFenX commented 7 months ago

pyinstaller 6.1.0:

Seems to be much better. I will fix some issues related to linux build and make a release later today/tomorrow.

DarkFenX commented 7 months ago

Fixed in v2.57.1

lynkfox commented 7 months ago

fyi - its popped back up in 2.57.2 on windows - same threat.

DarkFenX commented 7 months ago

I don't see anything flipping back, at least on virustotal. I also didn't change anything relevant. Make a screenshot of the issue. I suspect it's regular warning of defender when it sees new binary which wasn't launched by sufficient amount of users. If not... no idea why it could flip back.

lynkfox commented 7 months ago

Oh don't worry I 100% know it's a false positive - as you said earlier the code is clear. And I looked to see if an old file got reverted too in the commits :)

1MQ7zzT

(Date is EU format d/m/y)