Search code examples
pythonpython-3.xpython-3.6libraries

Concerned about malicious libraries in my project


So for a while now I have been building my virtual assistant in python which has required the use of several external libraries. I have also been converting the scripts to an exe using pyinstaller. However only the other day, windows defender told me that there was something wrong which was only affecting the exe file I had created

It said Trojan: Win32/Wacatac.C!ml

I simply don't understand how this was only flagged up now and not before considering I have been working on this project for over a month now.

Here is a list of the modules I have used:

newsapi, Wikipedia, threading, autocorrect, random, time,email, calendar, datetime, math, sys, webbrowser, pyttsx3, io, speech_recognition,imaplib, pickle, wmi, docx, comtypes, googletrans, qhue, pyowm, ast, pyaudio, pycaw, tkinter, smtplib, email, bs4, requests


Solution

  • It's a false positive. There's nothing malicious about your third-party modules, the issue has to do with PyInstaller.

    PyInstaller comes with pre-compiled bootloader binaries. Since many actual amateur viruses are written in Python, and then converted to executables using PyInstaller, most anti-virus software will flag those pre-compiled bootloader binaries as being malicious. The only real solution is to compile your own bootloader.