0

When i create a Batch-File and Compile it to an .exe file (with Bat to Exe Converter), i suffer from a problem that when i execute the .exe file of the Batch my AntiVirus pop-up as the file is a threat or a virus, but i don't have any malicious codes inside the file, just a normal Batch-File Game or something. Can someone please explain to me why is this happens and how to prevent it (Because if i uploaded the file to the Internet for the other users to use it can happen to them as what happened to me), And Thanks!

  • 2
    Just leave it as a bat file then? Compiled bat files are a common attack vector so your AV probably flagged it due to that since there isn't a lot of need to wrap bats in exes. – EBGreen Jun 15 '18 at 15:02
  • 1
    BAT file can NEVER be compiled in exe file. DELETE that Converter as soon as possible. Those "converter" just wraps the batch file in an exe. – Biswapriyo Jun 15 '18 at 15:08
  • Just to be clear, as @Biswapriyo pointed out, these are not actually compiled. At best they are encoded. Often they are simply self extracting zip files. – EBGreen Jun 15 '18 at 15:13
  • That means i have a downloaded a Virus?!, that's why the AntiVirus sometimes when i execute the converter pop-up. Here is where i downloaded the converter i think it's the official website : f2ko.de/en/b2e.php – Sheep1Man Jun 15 '18 at 15:30
  • 1
    I think that it is unlikely that the converter itself is a virus. I will point out that this scenario never works for me: "Hey guys, I think I downloaded a virus. Go to this URL and see..." – EBGreen Jun 15 '18 at 15:51
3

no cyber security expert, but i have experienced this as well. Also this happens if you use binary executable compression tools like UPX.

It seems that these tools add signature to the executable binary that make them be detected as virus by your Antivirus software heuristic algorithm.

I quickly googled to help you out, but it turns out this is a problem for over a decade now. Apart from simply not using these mechanisms if it is not necessary, https://superuser.com/a/1117751/428630 offers the advice to send your binary to the AV creator in question to report a false positive. good luck!

0

EBGreen in the comments was pretty much spot on. Antivirus programs like to play it safe with batch files wrapped in executables as they can be used to drop malware and whatnot.

The wrapper program itself is most likely safe, but it's the method that it uses that causes the antivirus to trip.

Instead of wrapping the batch file, just develop a program that launches it for the user, drop a shortcut file in the same folder, or if it doesn't need any special configuration, just ask the user to run the batch file directly. There already exists software out there that runs directly from batch scripts.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.