<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by iDOR on Medium]]></title>
        <description><![CDATA[Stories by iDOR on Medium]]></description>
        <link>https://medium.com/@idor69?source=rss-df88c4dc92bf------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*SPROdZd2fErDuEXwXs3c-A.jpeg</url>
            <title>Stories by iDOR on Medium</title>
            <link>https://medium.com/@idor69?source=rss-df88c4dc92bf------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 04:40:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@idor69/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Shellcode 101: Demystifying the Building Blocks of Exploits]]></title>
            <link>https://idor69.medium.com/shellcode-101-demystifying-the-building-blocks-of-exploits-3021c5f8e02c?source=rss-df88c4dc92bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/3021c5f8e02c</guid>
            <dc:creator><![CDATA[iDOR]]></dc:creator>
            <pubDate>Wed, 27 Aug 2025 11:30:16 GMT</pubDate>
            <atom:updated>2025-08-27T13:17:59.684Z</atom:updated>
            <content:encoded><![CDATA[<h3>The Story Begins: A Strange Process in Memory</h3><p>It’s 2 AM in the lab. You’ve just landed code execution on a vulnerable service during a red team engagement. The exploit worked — you smashed the buffer and hijacked execution flow.</p><p>Now inside the target process, you drop in a tiny blob of custom machine instructions. Seconds later, the innocent notepad.exe spawns a cmd.exe window.</p><p>That tiny blob is <strong>shellcode</strong> — the lightweight payload that exploit developers and malware operators have been using for decades. It’s compact, stealthy, and powerful, turning a crash into code execution and a vulnerability into full system compromise.</p><h3>What is Shellcode?</h3><p><strong>Shellcode</strong> is a <em>small, position-independent, and often null-free sequence of machine code</em> (opcodes) designed to be <strong>injected into a vulnerable process and executed</strong>.</p><p>Its name comes from its original use: spawning a command shell. But modern shellcode can do much more — open a calculator, create new users, inject DLLs, or establish a reverse shell connection.</p><p>Think of it as a <strong>payload seed</strong> — compact and minimal, but capable of delivering much larger malicious functionality once executed.</p><h3>Key Properties of Shellcode</h3><p>To understand shellcode, it’s important to know the qualities that make it reliable inside unpredictable memory environments:</p><ul><li><strong>Position-Independent Code (PIC):</strong> No hardcoded addresses. Shellcode must find its own memory location and resolve functions dynamically.</li><li><strong>Null-Free:</strong> Avoids 0x00 bytes, since many vulnerable functions treat NULL as a string terminator.</li><li><strong>Compact:</strong> Kept small to fit into constrained buffer spaces during exploitation.</li></ul><h3>Types of Shellcode</h3><p>Shellcode can be classified in <strong>two main ways</strong>: by its <em>purpose</em> (what it does) or by its <em>properties</em> (how it behaves).</p><ol><li>Classification by Purpose / Function :</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/1*qCC-N666u3ewZFdM0J_eAg.png" /></figure><p>2. Classification by Format / Properties :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*3f4iiBXIOmjYyqcrQIZUvg.png" /></figure><h3>Putting It All Together: An Advanced Example</h3><p>A popular payload might be:</p><p><strong>windows/x64/meterpreter/reverse_https</strong></p><p>What does this tell us?</p><ul><li>windows/x64: Targets Windows 64-bit.</li><li>meterpreter: Loads the advanced Meterpreter payload.</li><li>reverse_https: Connects back to attacker over HTTPS.</li><li><strong>Staged:</strong> A tiny stager fetches the full payload.</li><li><strong>Encoded:</strong> Usually obfuscated to evade detection.</li><li><strong>PIC &amp; Null-Free:</strong> Ensures reliability in memory.</li></ul><h3>How Defenders Detect Shellcode</h3><p>Attackers rely on shellcode to slip into memory — but defenders have ways to hunt it:</p><ul><li><strong>Memory Forensics:</strong> Tools like Volatility (malfind, yarascan) detect injected code regions.</li><li><strong>Behavioral Indicators:</strong> Normal apps spawning abnormal children (e.g., notepad.exe → cmd.exe).</li><li><strong>Suspicious API Chains:</strong> Allocating RWX memory (VirtualAlloc), writing payloads, and spawning remote threads.</li><li><strong>Network Artifacts:</strong> Stagers making tiny beacon connections before pulling larger payloads.</li><li><strong>YARA Rules:</strong> Detect common shellcode byte patterns or encoded blobs.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3021c5f8e02c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>