python pyinstaller, nuitka, cx_freeze export to .exe show virus on virustotal.com

TheToolbox

Elite Member
Joined
Jul 25, 2021
Messages
1,568
Reaction score
643
Hello,

i am facing a long time this problem. if i want to export a python file to and executeable file it shows every time a trojana or maleware on the .exe file. After that i have read that it depends on the bootloader? Or someone says that i have to pay for the bootloader certificate? Can someone help me to fix this problem. I want to sell my software here on bhw but i cant if they show every time a virus. i have tested with a simple program that prints only "Hello World!" and it shows me a virus.

hope someone can help me, thats a big problem. :)
 
Hello,

i am facing a long time this problem. if i want to export a python file to and executeable file it shows every time a trojana or maleware on the .exe file. After that i have read that it depends on the bootloader? Or someone says that i have to pay for the bootloader certificate? Can someone help me to fix this problem. I want to sell my software here on bhw but i cant if they show every time a virus. i have tested with a simple program that prints only "Hello World!" and it shows me a virus.

hope someone can help me, thats a big problem. :)
False positives is a common problem with python generated executables. I've used pyinstaller and had huge trouble with it too.

There's a lot of things you can do but there isn't really a reliable solution. Here's a few things you can try:

- Make sure you have compile your own own bootloader binaries. Pyinstaller comes with precompiled binaries and they get flagged for some reason. So compile your own for your platform.
Instructions here: https://python.plainenglish.io/pyinstaller-exe-false-positive-trojan-virus-resolved-b33842bd3184

- If you are using --onefile, don't. Packaging as a single bundled file seems to kick more heuristics.

- Submit your exe with a false positive report to antivirus companies. I had submitted mine to Microsoft and defender stopped flagging it.
https://www.microsoft.com/en-us/wdsi/filesubmission
- Get a Standard or Extended Validation Code Signing Certificate and sign your app with it. This is recommended if you will update and recompile your app since that will create a new hash and antivirus will flag it again. Having certificates makes your app trustworthy.
Here's a guide:
https://stackoverflow.com/questions/252226/signing-a-windows-exe-filePrices usually come about $70-100/yr if you buy a certificate for 3 years or more.

I have seen that signing with a certificate and using a manually compiled bootloader works the best.
 
False positives is a common problem with python generated executables. I've used pyinstaller and had huge trouble with it too.

There's a lot of things you can do but there isn't really a reliable solution. Here's a few things you can try:

- Make sure you have compile your own own bootloader binaries. Pyinstaller comes with precompiled binaries and they get flagged for some reason. So compile your own for your platform.
Instructions here: https://python.plainenglish.io/pyinstaller-exe-false-positive-trojan-virus-resolved-b33842bd3184

- If you are using --onefile, don't. Packaging as a single bundled file seems to kick more heuristics.

- Submit your exe with a false positive report to antivirus companies. I had submitted mine to Microsoft and defender stopped flagging it.
https://www.microsoft.com/en-us/wdsi/filesubmission
- Get a Standard or Extended Validation Code Signing Certificate and sign your app with it. This is recommended if you will update and recompile your app since that will create a new hash and antivirus will flag it again. Having certificates makes your app trustworthy.
Here's a guide:
https://stackoverflow.com/questions/252226/signing-a-windows-exe-filePrices usually come about $70-100/yr if you buy a certificate for 3 years or more.

I have seen that signing with a certificate and using a manually compiled bootloader works the best.
Wow thank you so much! I will try it :)
 
Back
Top