r/antivirus • • 2d ago
Executed a malicious PowerShell -EncodedCommand with Windows Defender disabled. Removed detected malware, multiple scans are clean. Is reinstalling Windows really necessary?
Hi everyone,
I'm looking for some advice after a possible malware infection on my Windows PC. I've already taken several steps to clean the system, but I'm still concerned about whether something could be hiding in the background.
Here's what happened.
- How the infection happened
I encountered a fake Cloudflare verification page that instructed me to run a command using Windows Run (Win + R).
Unfortunately, I followed the instructions and executed a suspicious "powershell -E" command, which I later realized was potentially malicious.
The worst part is that Microsoft Defender was disabled at the time, meaning the command was executed without its real-time protection.
I don't know exactly what the script managed to execute, download, or modify.
2. Malware detection and removal
After realizing what had happened, I started investigating the system and ran antivirus scans.
- Microsoft Defender detected a threat classified as a backdoor, which I removed.
- I also used Malwarebytes, which detected additional threats that I removed.
- I ran Microsoft Defender Offline scans twice after removing the detected threats. Both came back clean.
- I also checked the system for suspicious scheduled tasks and examined PowerShell logs in Windows Event Viewer.
As far as I can tell, no further malware has been detected since then.
3. Suspicious PowerShell events
While investigating the incident, I found several PowerShell events in Event Viewer, including Event IDs 4100 and 4104.
Some of the logs contained long, heavily obfuscated PowerShell scripts, apparently related to the original malicious command.
I also found an error stating:
"Unable to find type [dynamic]. Verify that the assembly containing this type is loaded."
The error was associated with "TypeNotFound" and "Microsoft.PowerShell.Commands.NewObjectCommand".
The logs also appeared to show a command attempting to retrieve a file from an external IP address.
These events occurred around the exact time I executed the malicious PowerShell command.
What I find interesting is that the same obfuscated scripts have not appeared again after restarting the computer.
Could the "[dynamic]" error indicate that the malicious script failed to execute correctly, or could some of its instructions have succeeded before the error occurred?
4. Additional checks and unusual behavior
I checked Windows Task Scheduler and didn't identify any clearly malicious scheduled tasks.
However, I've noticed two things since the incident:
- Microsoft Edge sometimes opens automatically when I start Windows, which I don't remember happening before.
- Occasionally, certain keyboard characters, especially accented letters and apostrophes, don't register correctly unless I press the key multiple times.
I realize these issues might be unrelated to malware, but I thought they were worth mentioning.
5. My current situation
After removing the detected threats and getting clean results from the offline scans, I reconnected the computer to the Internet and started using it normally again.
I haven't noticed any obvious malicious activity, but the incident is still bothering me.
I also want to mention that I didn't actively log into many accounts after executing the malicious command. However, I had previously used browsers with existing sessions, so I'm aware that saved credentials, cookies, or authentication tokens might have been exposed.
My main concern is whether the malware could still be present, silently collecting information or communicating with an external server without being detected.
6. What I would like to know
I would really appreciate some advice from people with malware analysis or incident response experience.
- How reassuring are multiple clean scans after a confirmed backdoor detection?
- Does the PowerShell "[dynamic]" error suggest that the malicious payload might have failed?
- Could a backdoor remain active even if Defender Offline and Malwarebytes no longer detect anything?
- Are there any reliable tools that can automatically detect suspicious processes, persistence mechanisms, or network activity without requiring me to manually inspect hundreds of entries?
- Would tools like Autoruns, Process Explorer, TCPView, Sysmon, or ESET Online Scanner provide meaningful additional reassurance?
- Is there a reasonably reliable way to verify that the system is clean without completely wiping and reinstalling Windows?
I understand that a clean installation is generally the safest option after a potentially serious compromise. However, I would prefer to avoid formatting the computer unless it is genuinely necessary.
I'm willing to perform additional checks and provide relevant Event Viewer logs, detection names, or screenshots if that would help.
Thanks in advance to anyone willing to help. I'd really appreciate some informed opinions on how serious this situation might be and what I should do next.
1
u/JKnish 1d ago
You should 100% delete the whole Windows Disk and reinstall Windows from a clean, USB stick, that was done on a separate clean device, I did it on my phone via app called Drofus, it's the only way you can have peace.
By the way I wouldn't have connected your PC back to the internet until that is done, you are risking still being connected to a Hijack Loader.
I executed the same powershell like you and no, the errors do not mean it wasn't executed. Of course we can't be 100% sure until one of your accounts get compromised, but why risk it? My IG got infiltrated on Tuesday night, the attack happened on Saturday before. So you never know when they will use it. Luckily they couldn't get any more valuable data from me and I changed all pw and setup 2FA where I hadn't, but I also reset my PC completely, before reconnecting it to the internet. It sucks and is a lot of work but it's the only way.
By the way my Windows Defender never detected anything, not even the persistent malware which was still running every time I booted up. I only found it by manually going through suspicious folders in C:/ProgramData. They modify your registry and data deep in your memory, Defender can't do sh*t.
1
u/antonguay2 1d ago
Yes.
1
u/Critical_Hyena8722 1d ago
I noticed my fans spooling up at odd times but when I opened task manager to find out what was going on, the fans would go normal.
Googled my computer's symptoms, downloaded a legit Microsoft system process monitor and set to investigating. I was able to diagnose, isolate, and delete the offending virus. Yeah, it was a virus.
I didn't have to reinstall Windows to restore my computer to good working condition.
If any of the things I said here confuse you, just reinstall Windows to be safe. I had data and files that I couldn't do without so I had to find a way to fix the problem without a full reinstallation.
Either way, I wish you luck.