On this page

The ransom note shows up on a Monday morning. The encryption ran overnight on Sunday. The attacker had been inside for weeks, after signing in to the VPN with a contractor’s account that should have been switched off months earlier. It needed only a password.

That is how ransomware gets in at most companies. No movie-style hacking, just a door someone left open: a firewall that missed a patch, a login with no second factor, a supplier’s remote support tool. Encryption is the last step, not the first.

So ransomware prevention starts with the doors. Verizon’s 2026 Data Breach Investigations Report found ransomware in 48% of all breaches. Here are the seven doors we find open most often in penetration testing, how a pentest proves each one, and what to close first.

Key takeaways

  • Attackers get in first, through an exposed device, a weak login or a supplier. The ransomware runs last.
  • Most of the doors are visible from outside, so a pentest can find them before an attacker does.
  • If you only do three things: patch edge devices against the KEV catalog, put phishing-resistant MFA on every remote login, and keep backups attackers cannot reach.

How ransomware gets in: the attack in five steps

Most modern ransomware is run by people. The #StopRansomware Guide from CISA, the FBI, NSA and MS-ISAC describes double extortion: attackers steal your data, then encrypt it, so good backups alone do not end it. A typical attack:

  1. Initial access through one of the doors below.
  2. Discovery of admin accounts, file servers, hypervisors and backups.
  3. Privilege escalation toward domain admin or equivalent cloud access.
  4. Data theft of whatever hurts most if published.
  5. Encryption, often across every server at once, often on a weekend.

Steps 2 to 4 are where you can still catch an attack. Step 1 is where you stop it.

1. Unpatched VPNs, firewalls and edge devices

This is the biggest door right now. The 2026 DBIR found that 31% of breaches start with exploitation of a vulnerability, overtaking stolen credentials as the top entry point for the first time in the report’s 19 years. Verizon’s 2026 release adds that attackers are using AI to shrink the time from known flaw to exploitation from months to hours.

Edge devices face the internet, guard the network and rarely run endpoint protection. Our March 2026 Xpose covers a firewall management flaw a ransomware group exploited for more than a month before a fix existed, and the June 2026 Xpose a VPN flaw linked to a ransomware affiliate.

How a pentest finds it: an external network penetration test fingerprints every internet-facing service and confirms whether a known flaw is actually reachable, not just present. A product version on a login page is often enough to match a device to a public advisory.

How to close it:

  • Keep a list of every edge device, its version and its owner.
  • Treat anything in CISA’s Known Exploited Vulnerabilities catalog as an emergency change. Entries known to be used in ransomware campaigns are flagged. Those go first.
  • Take management interfaces off the internet, and check patched devices for signs of compromise. A patch does not evict an attacker.

2. Remote access that needs only a password

MITRE ATT&CK tracks this as External Remote Services (T1133): VPNs, Citrix, RDP and similar services used to enter a network. CISA’s advisory on Akira ransomware, updated in November 2025, says the group was seen getting in through VPN services with no multifactor authentication configured.

MFA is often “on” for staff while a service account, legacy portal or contractor group is excluded. Attackers need only one weak login.

How a pentest finds it: testers enumerate every external login surface and check which ones accept a password alone, within agreed rules of engagement. The gap is usually a forgotten exception: a second VPN profile, a test portal, a jump host with RDP opened “temporarily”.

How to close it:

  • Require phishing-resistant MFA on every VPN, remote desktop, webmail and admin login, with no standing exceptions.
  • Never expose RDP directly to the internet, and shut down portals nobody uses.
  • Alert on bursts of failed logins across many accounts, the signature of password spraying.

3. Stolen, reused and leaked credentials

Until this year, stolen credentials were the top entry point in the DBIR. Exploitation has now overtaken them, but a stolen login is still a common way in. Passwords leak through other sites’ breaches, infostealer malware and phishing, and some criminals specialize in selling that access to ransomware groups.

A valid login looks normal: no exploit, no malware, often no alert.

How a pentest finds it: internal and Active Directory testing shows what one valid account can reach. An ordinary domain account plus a weak or reused password is often the shortest route to admin. Our guide to employee passwords on the dark web explains how those passwords leave your company.

How to close it:

  • MFA everywhere, plus a password manager and unique passwords for work accounts.
  • Disable accounts the day people leave, contractors included.
  • Watch for your domain’s credentials in breach data. Our sister product XposeFinder monitors dark web breach sources and delivers verified credentials linked to a business’s domain.

4. Phishing and social engineering

Phishing has moved beyond email. CISA’s guide lists advanced forms of social engineering as their own access vector, and wants staff trained to spot illegitimate websites and search results. Verizon’s 2026 release found that social engineering over text messages and voice calls succeeds 40% more often than email phishing. A call to the help desk asking for an MFA reset is now a standard opening move.

How a pentest finds it: someone will eventually click, so the question is what that click gives an attacker. An “assumed breach” internal test starts from a normal user’s account and laptop, where a successful phish lands, and shows how far an attacker gets.

How to close it:

  • Filter email, block macros and risky attachment types, and set up SPF, DKIM and DMARC.
  • Make the help desk verify identity before resetting any password or MFA device.
  • Limit what a standard user can reach, so a successful phish stays small.

5. Forgotten and public-facing applications

MITRE calls this Exploit Public-Facing Application (T1190). The dangerous apps are rarely your main website. They are the staging server with production data, an old CMS, a file transfer tool or an admin panel nobody has updated since launch.

How a pentest finds it: attack surface discovery maps every subdomain and live host, then web application penetration testing goes deep on the ones that matter. Our research team monitors the internet for new vulnerabilities and exposures every single day and reports them privately through responsible disclosure.

How to close it:

  • Give every internet-facing host an owner, and shut down whatever nobody claims.
  • Patch or retire old CMS installs, plugins and self-hosted tools.
  • Keep staging environments off the internet or behind authentication. A web application firewall is not a patch.

6. Suppliers, MSPs and remote management tools

Your IT provider and software vendors often have remote access, sometimes as admins. Verizon’s 2026 release found that breaches involving a third party jumped 60% and now make up 48% of all breaches. CISA’s guide lists third parties and managed service providers as a ransomware access vector in their own right.

Once inside, the Akira group uses legitimate remote tools such as AnyDesk and LogMeIn to move between systems, CISA notes. That traffic blends in with normal IT work.

How a pentest finds it: a grey-box penetration test with vendor access in scope shows what each third-party account and tool can actually reach.

How to close it:

  • List every vendor with access, what they can reach and who approved it.
  • Give vendor accounts least privilege and MFA, and disable them when the work ends.
  • Allow only approved remote support tools and block the rest.

7. The inside door: flat networks, weak Active Directory and reachable backups

Attackers do not get in here. This door turns one compromised laptop into every server encrypted at once, and decides whether you can recover.

The Akira advisory describes operators exploiting unpatched Veeam backup servers and stealing the domain’s credential database to take over a domain administrator account. Backups joined to the domain and reachable from the network are not a safety net. They are a target.

How a pentest finds it: an internal and Active Directory pentest maps the paths from a normal account to domain admin, and checks whether backups can be reached or deleted from the production network. The path is often a short chain of medium findings: a stale service account password, one local admin password on every server, a flat network. See internal vs external network penetration testing for what each test covers.

How to close it:

  • Segment the network so user devices cannot reach servers, hypervisors and backup systems directly.
  • Use separate admin accounts, unique local admin passwords and a short list of domain admins.
  • Keep offline, encrypted backups and regularly test a full restore, as the CISA guide advises. Give backup systems their own credentials, outside the domain.

Ransomware entry points at a glance

Door What attackers abuse Test that proves it First fix
1. Edge devices Known flaws in VPNs and firewalls External network pentest Patch KEV entries first
2. Password-only remote access VPN, RDP or portals without MFA External network pentest Phishing-resistant MFA
3. Stolen credentials Leaked or reused passwords Internal and AD pentest Unique passwords, disable leavers
4. Social engineering Email, text, voice, help-desk resets Assumed-breach internal test Help-desk identity checks
5. Public-facing apps Forgotten, unpatched apps and panels Attack surface discovery, web app pentest An owner for every host
6. Third parties Vendor accounts and remote tools Grey-box test, vendor access in scope Least privilege, approved tools
7. The inside door Flat networks, weak AD, reachable backups Internal and AD pentest Segmentation, immutable backups

Ransomware prevention checklist: what to close first

A simple rule: if a door is reachable from the internet without a valid password, it is this week’s problem. If it needs a valid account, it is this month’s. If it needs an attacker already inside, it belongs in your next internal test.

This week

  1. Check every internet-facing device against the KEV catalog.
  2. Fix every remote login that works with a password alone.
  3. Disable accounts of people and vendors who have left.

This month

  1. Run attack surface discovery across all your domains and give every live host an owner.
  2. Confirm backups are offline or immutable, and restore one critical system end to end.
  3. Review vendor access and remove remote tools nobody approved.

This quarter

  1. Commission an external and internal pentest, including Active Directory, and track every finding to a retest. See our sample pentest report (PDF) for what good output looks like.
  2. Write a one-page incident plan: who decides, and who calls IT, legal, the insurer and incident response.

What a pentest can and cannot do

A pentest cannot patch your firewall or block next month’s zero-day. It shows you the doors from the attacker’s side, with proof. A scanner says a VPN version is old. A tester shows that the old VPN, plus a contractor account without MFA, plus a flat network, adds up to domain admin. See penetration testing vs vulnerability scanning for where each stops, and how often to run a penetration test, because every test is a snapshot.

Where AI-powered pentesting fits

Most of these doors share one root cause: nobody has a current, verified picture of what is exposed. WhyXpose is an AI-powered pentesting platform built for that, with human experts checking every result.

  • AI-guided recon and scanning. WhyXpose AI agents plan and run recon and scan pipelines across your domains and choose next steps, so forgotten hosts and exposed edge devices (doors 1, 2 and 5) reach your list first.
  • AI triage. AI drops false positives and ranks findings by risk, so your team starts with what an attacker would use first.
  • Expert verification. Certified penetration testers and CVE holders verify every finding with a reproducible proof of concept and a CVSS 3.1 score, including the Active Directory paths behind door 7.
  • Tracked to the fix. Findings live in the WhyXpose vulnerability management platform, with AI-drafted fixes reviewed by experts, retests after you fix and one-click PDF reports.

WhyXpose is verified under the Cyber Verification Programs for Anthropic Claude and OpenAI Codex, and also runs self-hosted open-source AI models. More than 1,000 companies have been secured to date. Scheduled scans and monitoring in the platform are coming soon.

Frequently asked questions

What is the most common way ransomware gets in?

In Verizon’s 2026 DBIR, exploitation of vulnerabilities was the top entry point for breaches overall, at 31%, ahead of stolen credentials. In practice that means unpatched VPNs, firewalls and public-facing apps, then password-only remote access, leaked credentials and phishing.

Can antivirus or EDR stop ransomware?

It helps, and CISA’s guide recommends EDR. But human-operated attacks use valid accounts and legitimate admin tools, and often disable security software first. Treat EDR as one layer next to patching, MFA, segmentation and offline backups.

Can a penetration test prevent ransomware?

Not on its own. It finds and proves the doors ransomware groups use, such as exposed edge devices, password-only logins and paths to domain admin, so you can close them first. Pair an external test with an internal and Active Directory test, and retest after fixes.

Are small businesses targets for ransomware?

Yes. In Verizon’s 2025 DBIR release, IDC’s Craig Robinson noted that at organizations without mature IT and security, often SMB-sized, ransomware was present in 88% of breaches.

Not sure which of these doors are open at your company? Find out before an attacker does. Get a demo of WhyXpose, or talk to a pentester about an external and internal test.

Put this guide into practice

Web, API, mobile and network pentests by certified testers, with a verified proof of concept for every finding.

Explore pentest services