after converting batch file to exe Windows Defender shows the file as trojan why? [closed]
Asked Answered
C

1

5

i wrote a batch script to delete shortcut virus from a usb drive and to display the hidden folder and files.

@ECHO OFF
TITLE SHORTCUT VIRUS REMOVER
ECHO SHORTCUT VIRUS TEMPORARY REMOVER
ECHO THIS TOOL IS MADE BY BHARGAB(MAXYSPARK)
SET /P DRIVE=ENTER THE DRIVE LEETER 
CD /D %DRIVE%:
DEL *.LNK
ATTRIB -H -R -S /S /D /L %DRIVE%:\*.*
PAUSE

but after converting the batch(.bat) file to .exe file using Bat To Exe Converter the .exe file is detected as Trojan Virus Why???? Screenshot Of Windows defender

I've allowed the file in Windows defender.

Cortico answered 23/8, 2015 at 15:29 Comment(2)
Files with .bat extension are considered as a threat in Windows. But I'm not sure after being converted to .exe file is still a threat. Btw, I think Windows Defender detect it as Trojan is because your script is related to hidden files and external drive like usb. (But detected as Trojan is still weird)Garlaand
I suspect that Defender treats all "executables with batch file hidden inside" as potential Trojan.Mind
B
9

It is because you haven't converted them to the correct architecture for your machine. I have had the same issue with the same antivirus and it was fixed by converting to x64 not x32 (default)

Basilicata answered 29/8, 2015 at 20:4 Comment(4)
I have had the same issue and my domain name has been banned because of a link to a setup file containing an exe file generated with "bat to exe converter". If your need is to avoid the ms-dos black Window that shows up when starting a BAT file, you can use quiet.exe : joeware.net/freetools/tools/quietPanslavism
this is a correct answer. upvotedLesbian
no it is not. Defender stopped considering BAT packagers as malwares but SOPHOS and others still do. The problem is with the very concept of packaging a batch in an exe, which is considered dangerous in some environments. Nothing you can do about it.Novice
This is not a correct anwer. I am having the same issue. My system is Windows 64 and I have tried to compile a simple batch Test.exe in 32 bits (format invisible = 21 viruses), 32 bits (format visible = 21 viruses); 64 bits (format invisible = 14 viruses); 64 bits (format visible = 14 viruses) using VirusTotal and "Exe to Bat converter.exe". By the way, the exe converter had no viruses.Absorptivity

© 2022 - 2024 — McMap. All rights reserved.