Find a course

Module 3: Common VulnerabilitiesLesson 8 of 1015 min

Unpatched Systems, Misconfigurations and Privilege

See how missing patches, default passwords and misconfigurations open doors, how privilege escalation works, and how least privilege and segmentation help.

Step 1 of 11Learn

WannaCry and the two-month gap

On March 14, 2017, Microsoft released a security update fixing a critical flaw in Windows file sharing (SMB), tracked as CVE-2017-0144. On May 12, the WannaCry ransomware began spreading across the world, using exactly that flaw. Within days it had infected an estimated 200,000 or more computers in some 150 countries, disrupting hospitals in the UK's National Health Service, factories, railways and telecom companies.

Every machine WannaCry infected through that flaw was missing a patch that had been available for about two months. Some ran old Windows versions no longer supported, for which Microsoft took the unusual step of releasing an emergency patch.

WannaCry illustrates the single most common class of finding in network penetration tests: known vulnerabilities in unpatched software. Attackers don't need secret zero-day exploits when published exploits for old flaws work.

Why do organizations fall behind? Patching can break things, especially on specialized systems like medical devices and factory controllers. Systems nobody owns get forgotten. Testing and downtime windows are scarce. And the volume is relentless: tens of thousands of new CVEs each year.

The answer is a vulnerability management process: know your assets, scan regularly, prioritize by severity and real-world exploitation, patch within defined timelines, and isolate what can't be patched.

Step 2 of 11Timeline

WannaCry: from patch to outbreak

  1. Mar 14, 2017
    Microsoft releases the SMB fix

    The update for CVE-2017-0144 is available to every supported Windows system.

  2. Apr 14, 2017
    Exploit leaks publicly

    A working exploit for the flaw is published online, so anyone can use it.

  3. May 12, 2017
    WannaCry starts spreading

    Unpatched machines are infected worldwide, including UK hospitals. A researcher registers a "kill switch" domain that slows the spread.

  4. May 13, 2017
    Emergency patches for old Windows

    Microsoft takes the unusual step of patching unsupported versions such as Windows XP.

Step 3 of 11Practice · Work it out

A patch was released on March 14 and an outbreak exploiting the flaw began on May 12 of the same year. How many days of patching window did organizations have?

Step 4 of 11Learn

Default credentials and misconfigurations

In 2016, the Mirai botnet infected hundreds of thousands of internet-connected cameras, video recorders and routers. It used no advanced exploit. It simply tried a list of about 60 factory-default usernames and passwords, such as admin/admin. The resulting botnet launched some of the largest denial-of-service attacks seen at the time, temporarily knocking major websites offline by attacking a DNS provider.

Security misconfiguration covers a wide family of mistakes, all common in tests:

  • Default credentials left unchanged on devices, databases and admin panels.
  • Unnecessary services running and exposed, like an old file-sharing service or a database port reachable from the internet.
  • Public cloud storage: storage buckets accidentally set to allow public access have exposed billions of records over the years.
  • Verbose error messages that reveal software versions, file paths or database queries.
  • Directory listing enabled on web servers, exposing backup files and configuration files.
  • Weak protocols still enabled, such as old TLS versions or unencrypted management interfaces.
  • Overly permissive firewall rules, such as allow any to any rules added for a quick fix and never removed.

Misconfigurations are attractive to attackers because they're easy to find with automated scanning and need no exploit development. They're also among the cheapest issues to fix once discovered, which makes them high-value report findings.

Step 5 of 11Practice · Select all that apply

Which of these are security misconfigurations? Select all that apply.

Select all that apply.

Step 6 of 11Learn

Privilege escalation

A tester or attacker who gains a foothold usually starts with limited rights, perhaps a normal user account or a web server process. Privilege escalation is the process of gaining higher rights.

  • Vertical escalation means moving up: from a normal user to administrator on Windows, or to root on Linux.
  • Horizontal escalation means moving sideways to another account at the same level, such as reading another customer's data or using a colleague's account.

Common escalation paths found in tests:

  • Missing local patches: kernel or system service flaws that let a normal user run code as administrator.
  • Misconfigured services: a service that runs as SYSTEM or root but whose program file or configuration can be modified by ordinary users. Replace the file, restart the service, and your code runs with full privileges.
  • Stored credentials: passwords in scripts, configuration files, browser storage or shared drives. An administrator's password saved in a deployment script is a frequent finding.
  • Overly broad rights: users added to administrator groups for convenience, or Linux sudo rules allowing programs that can spawn a shell.
  • Credential reuse: the same local administrator password on every workstation, so compromising one compromises all.

In Windows domains, escalation often ends with domain administrator rights, which give control over every account and machine in the organization. For that reason, tests frequently measure how many steps it took to get from a single phished user to domain admin.

Vertical vs horizontal privilege escalationNormal user(foothold)Administrator /rootAnother user,same levelVertical:move upHorizontal:move sideways

Step 7 of 11Note

Step 8 of 11Learn

Defenses: least privilege, segmentation, defense in depth

The attack path above shows why no single control is enough. Strong environments layer defenses so that each failure is caught by another layer. This is defense in depth.

Key principles that testers recommend again and again:

  • Least privilege: users, services and applications get only the access they need. Administrators use separate admin accounts only for admin tasks, not for email and browsing. Service accounts get narrow permissions.
  • Network segmentation: divide the network into zones, such as user workstations, servers, payment systems and building controls, with firewalls between them allowing only necessary traffic. A compromised laptop in the marketing department shouldn't be able to reach the payment database at all.
  • Patch and configuration management: hardening standards, such as the CIS Benchmarks, define secure baseline settings; automated tools check systems against them.
  • Unique local admin passwords: tools such as Microsoft's LAPS give each machine its own randomized local administrator password, breaking credential-reuse chains.
  • Monitoring and response: logging and endpoint detection tools that spot suspicious behavior, such as unusual logins or credential theft tools, with people ready to act on alerts.
  • Zero trust: an approach that removes automatic trust based on network location and verifies every user, device and request continuously.

A penetration test report is most valuable when it shows not just individual bugs but which missing principles allowed the chain to succeed.

Defense in depth: each layer catches what the one before missesPerimeter firewallblocks obvious outsidetrafficPatching and hardening (CISBenchmarks)removes known flawsNetwork segmentationcontains a breached laptopLeast privilege and unique adminpasswordslimits what stolen accesscan doMonitoring and responsespots what got through

Step 9 of 11Practice · Match the pairs

Match each defense to the attack step it most directly blocks.

Tap an answer, then tap the place where it belongs (or drag it there).

  1. Network segmentation
  2. Unique local admin passwords
  3. Separate admin accounts used only for admin tasks
  4. Timely patching

Step 10 of 11Practice · Choose one

A tester finds that every workstation shares the same local administrator password. Which control best fixes this?

Step 11 of 11Practice · True or false

If an organization has a strong perimeter firewall, internal network segmentation adds little security value.