How to Verify Your Antivirus Catches Script Threats (Without Wrecking Your Machine)

How do you actually know your antivirus sees a script the instant it runs in memory, rather than just scanning whatever sits quietly on disk? That question sits behind most of the antivirus testing I've done over the past four years, ever since one phishing link turned into three weeks of reimaging every endpoint at a company I worked for. Sysadmin guides love to talk about endpoint security in the abstract, but ransomware prevention stops being abstract the moment you're the one rebuilding machines at midnight. A subscription renewal and a green icon in the system tray tell you nothing about whether the product in question can actually catch a script mid-execution — and that gap is what this walkthrough is built to close.

The actual test is almost insultingly simple once you know it exists. Type one specific, harmless string into a PowerShell console inside an isolated machine, and if your security software prints that string back to you without blinking, its memory hook isn't working — full stop, no caveats. Getting to that one-line test, though, means understanding why file scanning alone stopped being enough years ago, and what a working hook is actually supposed to catch.

Why Antivirus Testing Needs More Than a Green Checkmark

Mechanical keyboard and mouse on a minimalist desk used during antivirus testing for script threats

Picture antivirus the way most homeowners picture a deadbolt. You install it, you hear the latch click, and you stop thinking about the door. Traditional signature-based file scanning works the same way — it checks a file's fingerprint against a known-bad list the moment that file lands on your drive, and if there's a match, it quarantines the thing before you even notice. That part works fine, and it always has.

Problems start once attackers stop dropping files altogether. Modern ransomware operators rarely hand you a bare executable anymore — doing that is the digital equivalent of a burglar wearing a name tag. Instead they lean on PowerShell, batch scripts, encoded command lines, and macro routines buried inside office attachments, all of it running in memory and borrowing legitimate Windows tools to do the dirty work. Security people call this living off the land, and if your antivirus only watches the hard drive, it never even sees this part of the attack happen.

That's exactly why the EICAR test file still gets passed around as the standard sanity check — a harmless 68-byte string that any scanner should flag the second you save it. I covered that test in detail when I wrote about testing antivirus effectiveness with EICAR after the breach, and it's still worth running. But it only proves your scanner can read a file sitting still on disk. It says nothing about scripts executing live in memory, which is where script-based attacks actually happen now.

Building a Disposable Test Environment

Desktop PC chassis with glowing internal components, the gaming rig used for endpoint security script tests

None of what follows should happen on a production machine, and you don't need to download anything sketchy from the dark web to run it either. Testing live script behavior on your actual work laptop is close to setting a couch on fire to check whether the smoke detector works, technically informative, deeply unnecessary, and the kind of mistake you only make once.

I run this on a checkpointed virtual machine under Hyper-V, or inside Windows Sandbox when I want something fully disposable, either way, nothing survives a reboot. Disable clipboard sharing and shared folders between the host and the test environment first, use payloads that only simulate bad behavior (an empty text file, a timestamp string, a calculator window popping open), and make sure whatever you trigger leaves an obvious, visible trace if the protection fails. A full-disk scan running inside that sandbox pushes the tower's cooling fan into a noticeably higher pitch once CPU load climbs past the 80 percent mark — it's a small thing, but it's one of the few physical signs that something's actually working under the hood instead of just reporting a status.

This kind of isolated testing matters more than people think, because I used to assume a solid perimeter firewall was enough protection on its own. It wasn't. The firewall at that old job did exactly what it was designed to do, it controlled what came in and out of the network, but it had nothing to say about a script executing locally on a machine that had already been handed a malicious attachment. Endpoint-level protection and network-level protection solve different problems, and trusting only one of them is how a single phishing click turns into a three-week recovery.

My neighbor Jodi Carver runs her own home-lab cluster for fun, and she'll happily spin up some open-source script-blocking tool I've never bothered installing, just to see where it breaks. I don't do that kind of experimentation on anything that touches client work or household backups, for those, I want a supported product with a vendor behind it, not a weekend project I have to babysit.

How to Test the AMSI Memory Hook Yourself

Handwritten notes beside a monitor while documenting antivirus testing results for script threats

Modern Windows leans on something called the Antimalware Scan Interface, or AMSI, to catch scripts that never touch the disk. Microsoft built this hook into PowerShell starting with version 5.0, creating a direct line between the command interpreter and whatever security engine is installed on the machine. When a script runs, PowerShell decodes it in memory and hands that plain-text buffer to your antivirus right before the processor executes a single instruction of it.

If that hook is broken, your security software is effectively deaf to this entire class of attack, no matter how good its file scanning is. Testing it takes one line, typed into a PowerShell console inside your isolated environment:

Write-Output 'AMSI Test Sample: 7e72c8ce-8610-4339-bb59-1f0e12e758b6'

A working hook stops that line cold, the console throws a red error claiming the content was blocked, and the string never prints. If it prints cleanly, with no complaint, your protection engine is either not wired into the interpreter at all or it's running but not actually listening.

I've watched this test fail in a way that still catches my attention every time. One suite I ran for the better part of a year looked fine on every dashboard metric, until I noticed, almost by accident, that its hook had stopped registering after a routine Windows update, and nothing in the interface flagged it. I only found out because I ran this exact test again out of habit. On a completely different occasion, my gaming rig stuttered mid-match for no obvious reason, and it turned out a real-time scan had kicked off on its own in the background, annoying in the moment, but it told me that engine was actually watching running processes instead of waiting for a scheduled pass.

What a Silent Pass Actually Means

Ultra-thin monitor in a sysadmin workstation used for ransomware prevention and script-threat checks

Several retail suites that score perfectly on static file detection fail this memory test completely, and the reason is almost always the same, their AMSI hook either never registered properly in the Windows Registry during installation, or it crashed quietly in the background with no fallback in place. A product can advertise an impenetrable firewall and twenty bundled features and still be a glorified paperweight if the piece that's supposed to catch live scripts isn't actually running.

A reader named Darla Buchanan emailed me after her office got hit with a credential-phishing campaign, asking whether the suite her IT department had just renewed would have caught the script that ran once someone clicked the link. I couldn't give her a straight answer from the renewal invoice alone, because a receipt tells you nothing about memory-level detection — the phishing link chain that gets a script onto a machine in the first place is a completely separate problem from what the endpoint does once that script starts running. She's gotten sharp at spotting social-engineering red flags since then, but that doesn't replace an actual test of what her antivirus catches.

This is where I also think about the three machines I actually run day to day, a Windows work box, a Mac mini that handles media duties, and the gaming rig already mentioned. Plenty of people make the kind of crucial antivirus setup mistakes that assume one install covers every device, which is part of why I wrote separately about putting antivirus on my Mac mini too. The lesson carries across every operating system: a hook that isn't actually hooked doesn't care how expensive the box said it was.

Where This Test Fits (And Where It Doesn't)

Being honest about what this one test doesn't cover matters just as much. It says nothing about a product's false-positive rate, which you'd need to track separately across normal daily use. It doesn't compare real-time protection against scheduled scanning, even though those two modes catch different things at different times. It has nothing to do with kernel-level protection, which operates further down the stack than a PowerShell hook ever reaches. And it won't tell you whether an engine leans on heuristics or straight signature matching under the hood, that's a question for a different comparison entirely.

A handful of other comparisons live entirely outside this test too. What you'll actually pay when a renewal notice lands a year later, and how that price compares to what you signed up for, is its own frustrating subject. So is the licensing math once you're covering more than one device on a single plan. A system-repair tool that cleans up Windows junk is solving a completely different problem than an antivirus engine, and treating the two as interchangeable is a mistake I see constantly. Running a bundled VPN alongside your security suite can quietly conflict with your DNS settings in ways that have nothing to do with script detection. And measuring how much a paid suite actually improves on the built-in Windows Defender baseline is a benchmark worth running on its own terms, not something this test answers either.

The list keeps going. Whether a gaming mode actually throttles background resource use the way the marketing claims is a separate benchmark from anything covered here. Containing lateral movement once something does get a foothold on your home network is a different layer of defense than catching one script on one machine. URL reputation blocking happens earlier in the chain, stopping a bad link before a script ever gets the chance to run, and outbound firewall rules control what a compromised process can talk to afterward, both matter, neither one is what AMSI testing checks. Identity monitoring is a bolt-on feature with a different scope than endpoint detection entirely, and a bundled password manager is a trust decision you make independently of how well the scanner handles scripts.

None of this replaces a few habits that matter regardless of which product you choose. Keep an offline backup as your fallback if every layer above fails anyway, ransomware prevention without a backup plan is still gambling. If you want to go further than the test here, a full ransomware simulation is a more involved exercise than typing one PowerShell string, and it belongs in a guide of its own. Switching suites without leaving a coverage gap in between is a logistics problem worth planning for separately, and knowing when to physically pull the network cable if something does slip through is a timing question that deserves its own protocol rather than a footnote here.

Make This a Habit, Not a One-Time Check

Physical security guards have a saying worth borrowing here: an alarm system is only as good as the last time someone deliberately tripped the sensor to check it still works. Nobody finds out a wire's been cut until the warehouse is already empty.

Run the AMSI string again after any major Windows update, after switching suites, and after any point release from your vendor, hooks break quietly, and nothing in a system tray icon will ever tell you that on its own. A green dashboard and a paid-up subscription describe your billing status, not your protection. Verification is the only thing that actually tells you whether the lock on the door still works, and it takes next to no time to check.