You Used to Call Me On My Shell Phone

Jacob Swinsinski (DarkWolf)

Wild West Hackin' Fest @ Mile High 2026 · Day 1

Overview

In "You Used to Call Me On My Shell Phone," Jacob Swinsinski, a seasoned reverse engineer and vulnerability researcher at Darkwolf, delivers a comprehensive guide to Windows shellcode development specifically tailored for beginners. The talk, born from a challenging six-month research endeavor, addresses a significant gap in accessible and beginner-friendly documentation for this critical area of cybersecurity. Swinsinski's primary motivation is to establish a new standard, simplifying the entry point for security researchers and penetration testers into the complex world of Windows exploitation.

Watch on YouTube

Visual summary for You Used to Call Me On My Shell Phone by Jacob Swinsinski
Visual summary for You Used to Call Me On My Shell Phone by Jacob Swinsinski

Key moments

  1. 0:00 Introduction and motivation for shellcode talk
  2. 8:30 Windows vs. Linux shellcode architecture differences
  3. 16:00 How dynamic Win API function resolving works
  4. 23:00 Demo: Building simple Message Box A shellcode
  5. 28:30 Real-world demo: Buffer overflow for reverse shell
  6. 34:00 Q&A: Why Windows API addresses are static
  7. 40:00 Q&A: Logic behind sizing Nopsleds

You Used to Call Me On My Shell Phone

Speakers: Jacob Swinsinski (DarkWolf)

Conference: Wild West Hackin' Fest @ Mile High

YouTube: https://www.youtube.com/watch?v=hy4AmbjSjEs

Overview

In "You Used to Call Me On My Shell Phone," Jacob Swinsinski, a seasoned reverse engineer and vulnerability researcher at Darkwolf, delivers a comprehensive guide to Windows shellcode development specifically tailored for beginners. The talk, born from a challenging six-month research endeavor, addresses a significant gap in accessible and beginner-friendly documentation for this critical area of cybersecurity. Swinsinski's primary motivation is to establish a new standard, simplifying the entry point for security researchers and penetration testers into the complex world of Windows exploitation.

The presentation meticulously breaks down the intricacies of Windows shellcode, contrasting it with its Linux counterpart and highlighting the unique challenges posed by the Windows API. Swinsinski aims to empower attendees with the knowledge to confidently understand, develop, and deploy Windows shellcode for offensive security engagements, as well as to inform defensive strategies. By demystifying concepts such as dynamic WinAPI resolution, undocumented structures, and memory management, the talk provides a foundational understanding essential for anyone venturing into advanced Windows exploitation.

This talk is particularly relevant for penetration testers, security researchers, and anyone operating in the offensive or defensive cybersecurity realms. It underscores the importance of understanding low-level machine code and system internals, not just for exploiting vulnerabilities but also for comprehending how advanced threats operate. Swinsinski's work seeks to make a notoriously difficult subject approachable, fostering a new generation of researchers capable of tackling proprietary operating systems with confidence and precision.

Background

▶ Watch: Introduction and motivation for shellcode talk (0:00)

Jacob Swinsinski's journey into Windows shellcode development was spurred by his own experience transitioning from Linux-based exploitation to the Windows environment, a shift he initially anticipated would be straightforward but quickly proved otherwise. With five years of experience in reverse engineering and vulnerability research (REVR), preceded by roles in red team operations for defense agencies and state entities, and a stint in purple teaming, Swinsinski brought a wealth of practical knowledge to his research. His current work at Darkwolf focuses heavily on vulnerability research, complemented by his role as a part-time red teamer and a business owner running a cybersecurity company in Tampa, Florida. This diverse background provided him with a unique perspective on the challenges faced by practitioners.

The core problem Swinsinski identified was the inherent difficulty and lack of quality, beginner-friendly resources for Windows shellcode development. Unlike Linux, where direct syscalls can be leveraged, Windows relies entirely on its Windows API. This necessitates dynamic memory resolving at runtime to locate and call API functions, significantly increasing the complexity and byte size of Windows shellcode compared to its Linux equivalent. This dynamic resolution process is a fundamental prerequisite before any malicious actions can be performed, presenting a steep learning curve for newcomers.

Shellcode, at its essence, is a piece of machine code written in assembly language, acting as a micro-program executed by attackers post-exploitation, typically following a memory corruption vulnerability like a buffer overflow. Its capabilities are vast, limited only by the attacker's creativity, ranging from obtaining reverse or bind shells, establishing backdoors for persistence, setting up C2 callbacks, to performing privilege escalation. Shellcode can be delivered via memory corruption bugs (e.g., string format vulnerabilities, buffer overflows) or network-based methods.

Attackers typically acquire shellcode in two ways: custom development in assembly or generation via tools like MSFvenom or third-party sources (e.g., Exploit DB, Shell-Storm, GitHub). Custom development, while time-consuming, offers the highest stealth, often bypassing antivirus (AV) and Endpoint Detection and Response (EDR) defenses due to its unique signature. Conversely, pre-generated shellcode is convenient but carries risks of being compromised, backdoored, or readily detected by security solutions. Swinsinski emphasizes that understanding these distinctions is crucial for both offensive and defensive strategies.

A pivotal challenge in Windows shellcode development lies in navigating undocumented structures within the Windows internals. Specifically, the Process Environment Block (PEB), a proprietary Windows structure, is not fully open-source like many Linux counterparts. Microsoft's decision to keep certain documentation private aims to increase the difficulty for reverse engineers and attackers. Despite this, Swinsinski's research demonstrates that consistent patterns and offsets within these structures can be reliably exploited, forming the bedrock of his standardized approach to shellcode development. Understanding these underlying mechanisms, including processes (programs running in userland) and threads (subsets of execution within a process), along with their associated PEB and TEB (Thread Environment Block) data structures, is critical for grasping how shellcode navigates and manipulates memory.

Key Findings

▶ Watch: How dynamic Win API function resolving works (16:00)

Swinsinski's research culminates in several key findings that demystify Windows shellcode development, particularly for beginners. The most significant discovery is the establishment of a standardized, repeatable technique for dynamic WinAPI function address resolution at runtime. This process is often perceived as a major hurdle in Windows exploitation, but Swinsinski demonstrates that its underlying mechanics are consistent and can be leveraged reliably.

Central to this technique is the traversal of the Process Environment Block (PEB). The talk highlights that while Windows is a proprietary OS and many internal structures are undocumented, the offsets within the PEB and TEB (Thread Environment Block) are static and do not change across different executions. This crucial insight means that once the logic to navigate these structures is established, it can be reused consistently in shellcode.

The core steps involve:

  1. Locating kernel32.dll: This essential DLL holds many critical WinAPI functions. Shellcode achieves this by iterating through the PEB and accessing its Loader member, which points to a linked list called InMemoryOrderModuleList. This list contains pointers to all modules (DLLs) loaded within the current process.
  2. Accessing the Export Address Table (EAT): Once kernel32.dll is located in memory, its EAT (sometimes referred to as the Import Address Table or IAT in a different context) can be accessed to find the addresses of specific functions.
  3. Resolving functions with GetProcAddress: The address of GetProcAddress itself is resolved first. This function then acts as a programmatic "lookup tool" to find the addresses of any other desired WinAPI functions within kernel32.dll or other loaded modules. For example, WinExec or MessageBoxA.

Swinsinski provides a simplified programmatic equation for consistently walking the PEB: PB + 0xC reliably points to the DLL Base (the Loader member), which in turn leads to InMemoryOrderLinks. Further calculations, such as DLL Base - 0x18 (offset to InMemoryOrderLinks) and subsequently 0x10, allow for consistent resolution of functions within kernel32.dll. This methodical approach transforms a seemingly complex task into a series of predictable steps.

Another key finding emphasizes that shellcode is position-independent in memory. This means it can execute effectively regardless of its loaded memory address, a critical characteristic for exploitation scenarios where the exact memory location might be unpredictable. The speaker also underlines the trade-off between assembly language and higher-level languages like C. While assembly requires significantly more lines of code (e.g., 120 lines for a task C can do in 3), it offers maximum control over CPU instructions, making it ideal for highly optimized and stealthy malicious payloads. This control is essential for bypassing modern security defenses that might detect standard API calls or larger binary sizes.

Technical Deep Dive

▶ Watch: Demo: Building simple Message Box A shellcode (23:00)

The technical core of Swinsinski's talk revolves around the intricate process of dynamic Windows API function address resolution in assembly. This mechanism is what distinguishes Windows shellcode from its Linux counterpart and is the primary challenge for beginners.

At a high level, the shellcode's execution flow is as follows:

  1. Initial Shellcode Execution: The malicious payload gains initial control.
  2. PEB Iteration: The shellcode begins iterating through the Process Environment Block (PEB). This is a critical data structure maintained by the operating system for each process, containing information about the process itself, including its loaded modules.
  3. Locating kernel32.dll: The objective is to find the base address of kernel32.dll in memory. This is achieved by accessing the Loader member within the PEB, which is a pointer to the _LDR_DATA_TABLE_ENTRY structures in the InMemoryOrderModuleList. This linked list enumerates all modules (DLLs) currently loaded into the process's address space. The talk specifies that the Loader member is consistently found at an offset of 0xC from the PEB's base address.
  4. Export Address Table (EAT) Access: Once kernel32.dll's base address is identified, the shellcode must locate its Export Address Table (EAT). The EAT contains pointers to all the functions exported by the DLL.
  5. Resolving Functions: The first function typically resolved is GetProcAddress. This function, provided by Windows, allows an application to retrieve the address of an exported function from a specified DLL. Once GetProcAddress is found, the shellcode can then use it to dynamically resolve the addresses of any other desired WinAPI functions, such as WinExec, CreateProcessA, LoadLibraryA, or MessageBoxA, which are crucial for carrying out malicious actions.

Swinsinski highlights that the reliability of this technique stems from the fact that crucial offsets within the PEB structure, such as the Loader member (at 0xC), remain constant across different Windows versions and executions. This allows for a programmatic, hardcoded approach in assembly. The derived formula for function resolution involves PB + 0xC to get the DLL Base, followed by DLL Base - 0x18 (for InMemoryOrderLinks) and then 0x10 to navigate to the desired module entry and resolve functions.

Understanding CPU registers is paramount for writing effective shellcode. Swinsinski categorizes them into:

  • Special Purpose Registers:
  • EAX / RAX: (32-bit / 64-bit respectively) Primarily used to store return values from WinAPI functions and for temporary data manipulation.
  • EIP / RIP: (Instruction Pointer) Critically important, as it holds the memory address of the next instruction to be executed by the CPU. By overwriting or redirecting EIP/RIP, attackers can divert the program's execution flow to their malicious shellcode, enabling position-independent code.
  • General Purpose Registers:
  • ESI / RSI (Source Index) and EDI / RDI (Destination Index): Used in memory operations to point to source and destination buffers, respectively, during data transfers. Other general-purpose registers like EBX, ECX, EDX also play roles in storing temporary values and function arguments depending on the calling convention.

The talk also addresses critical pitfalls and "gotchas" in shellcode development:

  • Compatibility Issues: A common mistake is using the wrong compiler or shellcode architecture (x86 vs. x64) for the target binary. This is vital because x86 and x64 architectures have different calling conventions. For example, x86 often uses stdcall (parameters pushed right-to-left onto the stack) or fastcall (parameters passed in CPU registers), while x64 uses __fastcall (parameters passed in specific registers like RCX, RDX, R8, R9). Mismatched conventions lead to exploitation failures.
  • Null Bytes and Bad Characters: Shellcode, especially when injected into C-based environments, can be prematurely truncated by null bytes (0x00) or other "bad characters" (e.g., \r, \n) if the underlying buffer handling functions interpret them as string terminators. Attackers must ensure their shellcode is stripped of these characters or encoded to avoid them.
  • Nopsleds: A nopsled (No-Operation sled) is a sequence of NOP instructions (0x90 in x86/x64 assembly). In buffer overflow exploits, the exact memory address where shellcode will land can be uncertain due to factors like ASLR (Address Space Layout Randomization) or memory misalignment. A nopsled acts as a "landing pad" for the instruction pointer; if EIP/RIP lands anywhere within the sled, it will simply execute NOPs until it reaches the actual shellcode, effectively absorbing imprecision and increasing the reliability of the exploit.

Demo / Proof of Concept

▶ Watch: Q&A: Why Windows API addresses are static (34:00)

Swinsinski's presentation included several compelling demonstrations, starting with simpler payloads and escalating to a full reverse shell exploitation scenario. This progressive approach effectively illustrated the building blocks of Windows shellcode.

The initial demonstration focused on building a MessageBoxA payload. This serves as an ideal beginner payload because it avoids the complexities of network programming and byte order issues. The goal is simply to make a WinAPI call to display a message box. The process involved:

  1. Assembly Code: Writing the assembly instructions to dynamically resolve MessageBoxA and call it with specific parameters (e.g., title and message strings).
  2. Compilation and Linking: Using a tool like NASM (Netwide Assembler) to compile the assembly into an object file, then linking it to create an executable (.exe).
  3. Byte Array Extraction: Utilizing a utility like object dump to extract the raw machine code (the byte array) from the compiled executable.
  4. C Loader: Demonstrating a simple C program (a "loader") designed to allocate memory, copy the extracted shellcode byte array into it, and then execute it. The demo showed the MessageBoxA popping up successfully, providing "instant gratification" and confirming the core shellcode logic was sound. This validates the dynamic resolution mechanism before adding network complexities.

Building on this, Swinsinski presented a reverse shell payload. While not exploiting a specific vulnerability at this stage, this demo showcased the network capabilities of shellcode. The shellcode, again loaded via a C program, initiated a connection back to a Netcat listener running on a Kali Linux box. This illustrated how the dynamically resolved WinAPI functions (WSASocket, connect, CreateProcessA for cmd.exe redirection) could be leveraged to establish command-and-control.

The culmination of the demo section was the exploitation of a real-world vulnerable application: Vaughn Server. This open-source binary, available on GitHub, was chosen for its suitability for demonstrating the full REVR (Reverse Engineering and Vulnerability Research) methodology:

  1. Vulnerability Discovery: By triaging the source code, Swinsinski identified a memory corruption bug in function 3. This function accepted char* input but used strcpy to copy it into a char buffer[2000] without any bounds checking. This classic pattern immediately indicated a buffer overflow vulnerability.
  2. Fuzzing: To confirm and characterize the vulnerability, Swinsinski used a fuzzer to send an oversized input (e.g., 2010 'A' characters) to the vulnerable function.
  3. Debugging: Using a debugger, he demonstrated how the oversized input successfully overflowed the buffer and overwrote the return address, eventually leading to the Instruction Pointer (EIP) being overwritten with 0x41414141 (the hexadecimal representation of 'AAAA'). This confirmed control over the execution flow.
  4. Exploitation: With control established, Swinsinski then crafted an exploit using the reverse shell shellcode. This involved:
  • Including a nopsled to account for potential memory misalignment and provide a reliable landing zone.
  • Setting up a Netcat listener on the attacker machine.
  • Delivering the crafted exploit (containing the nopsled and reverse shell shellcode) over the network to Vaughn Server.
  • The successful execution resulted in a reverse shell back to the Netcat listener on the Kali box, granting the attacker a command prompt on the compromised Windows machine. Swinsinski also humorously noted the "black magic" involved in writing a custom encoder for Metasploit's SGN encoder to exploit an x86 binary on his ARM Mac, highlighting the platform compatibility challenges.

Defensive Implications

▶ Watch: Q&A: Logic behind sizing Nopsleds (40:00)

Understanding the intricacies of Windows shellcode development, as detailed by Jacob Swinsinski, provides critical insights for strengthening defensive postures against advanced persistent threats and targeted attacks. The talk highlights several areas where defenders can focus their efforts.

Firstly, the emphasis on dynamic WinAPI function address resolution reveals a common pattern in custom shellcode. While this technique is necessary for Windows exploitation, it also presents an opportunity for detection. Endpoint Detection and Response (EDR) solutions can be tuned to monitor for unusual or chained sequences of API calls, particularly those related to PEB/TEB traversal followed by calls to functions like GetProcAddress, LoadLibrary, VirtualAlloc, and CreateRemoteThread. While generic API hooking is common, looking for the specific, repeatable PEB walking patterns described in the talk could help identify custom, stealthy payloads that might bypass signature-based detections.

The discussion of undocumented Windows structures like the PEB, while challenging for researchers, also implies that highly sophisticated attackers might leverage similar knowledge. Defenders should be aware that even if Microsoft's internal documentation is private, determined adversaries will reverse engineer these structures. This reinforces the need for behavioral analysis over purely signature-based detection, as custom shellcode will not have known signatures.

The talk underscores the persistent threat of memory corruption vulnerabilities, specifically buffer overflows. The Vaughn Server example, with its use of strcpy without bounds checking, is a classic vulnerability that still exists in legacy or poorly coded applications. Defenders must prioritize patching known vulnerabilities and advocate for secure coding practices, including using safer string handling functions (e.g., strncpy_s, snprintf) that prevent buffer overflows. Regular vulnerability assessments and static/dynamic application security testing (SAST/DAST) are crucial for identifying such flaws before they are exploited.

The concept of nopsleds and position-independent code is also relevant for defense. While nopsleds aid exploitation by providing a landing zone, their presence can sometimes be a detectable artifact. EDRs and memory forensics tools can scan for large sequences of 0x90 (NOP) instructions, which are often indicative of an attempt to execute shellcode. Furthermore, the ability of shellcode to execute anywhere in memory means that defenses like Address Space Layout Randomization (ASLR), while effective against simpler exploits, can be circumvented by shellcode that dynamically resolves addresses at runtime. This necessitates layered defenses, including Data Execution Prevention (DEP) and Control Flow Guard (CFG), which aim to prevent code execution from non-executable memory regions and ensure legitimate control flow, respectively.

Finally, the demonstration of a reverse shell highlights the need for robust network monitoring. Detecting outbound connections to unusual or untrusted IP addresses, especially on non-standard ports, is a fundamental defensive measure. Implementing firewall rules, Intrusion Detection/Prevention Systems (IDS/IPS), and Security Information and Event Management (SIEM) systems to alert on suspicious network activity is paramount. The use of custom encoders for Metasploit, as mentioned by Swinsinski, indicates that attackers are constantly evolving methods to evade network-based detections, requiring continuous updates to threat intelligence and detection rules.

Key Takeaways

  • Windows vs. Linux Shellcode: Windows shellcode is inherently more complex and larger than Linux shellcode due to its reliance on dynamic WinAPI function address resolution at runtime, rather than direct syscalls.
  • PEB as the Foundation: The Process Environment Block (PEB) is central to Windows shellcode development, providing a reliable, static structure for locating loaded modules like kernel32.dll and subsequently resolving crucial WinAPI functions.
  • Repeatable Resolution Technique: Despite the proprietary nature of Windows internals, specific offsets within the PEB (e.g., 0xC for the Loader member) are consistent, enabling a standardized and reusable assembly-level technique for dynamic address resolution.
  • Assembly for Control and Stealth: Writing shellcode in assembly offers maximum control over CPU instructions and can lead to smaller, stealthier payloads that are less likely to be detected by AV/EDR compared to generated or higher-level code.
  • Common Pitfalls and Mitigation: Developers must account for compatibility issues (x86 vs. x64 calling conventions), avoid null bytes and bad characters that can truncate shellcode, and utilize nopsleds to absorb imprecision and ensure reliable exploit landing.
  • Comprehensive Vulnerability Research: The talk demonstrated a full REVR workflow, from discovering a buffer overflow in Vaughn Server (due to strcpy without bounds checking) to fuzzing, debugging, and ultimately weaponizing the vulnerability with custom shellcode to achieve a reverse shell.

About the Speaker(s)

Jacob Swinsinski, known as DarkWolf, brings a rich and diverse background to the field of cybersecurity. With five years of dedicated experience in Reverse Engineering (RE) and Vulnerability Research (VR), he possesses a deep understanding of low-level system internals and exploitation techniques. Prior to his current focus, Swinsinski honed his skills in red team operations for various defense agencies and a state entity, where he was responsible for securing school districts. He also gained experience in purple teaming, bridging the gap between offensive and defensive security.

Currently, Jacob works as a government contractor for Darkwolf, primarily dedicating his time to vulnerability research, while also serving as a part-time red teamer. Beyond his corporate roles, he is an entrepreneur, owning and operating his own cybersecurity company. Through this venture, he contracts out services to secure small and local businesses in Tampa, Florida, and works with influencers and athletes to protect their digital footprints. Demonstrating a continuous passion for learning and exploration, Jacob has recently expanded his expertise into Signals Intelligence (SIGINT), developing an interest in RF (Radio Frequency) technologies.

Reviews

Dr. Zero (Offensive Security Researcher) — PASS

This isn't vulnerability research; it's a twenty-year-old Skape paper repackaged as a 'new discovery.' Walking the PEB to parse the EAT and resolve GetProcAddress is literally day two of any competent exploit dev course. If you need a 101 refresher on writing a basic MessageBoxA payload, it fills a slot, but framing this as a six-month research endeavor is fucking embarrassing.

Heather Calloway (CISO) — SOLID

This is a pedagogical walkthrough for junior red teamers learning Windows exploit development, not a strategic briefing for security leadership. The speaker executes cleanly on that narrow scope. For defenders, it serves as a baseline reminder of why modern endpoint controls must focus on behavioral execution chains rather than static signatures.

→ Top-rated talks at Wild West Hackin' Fest @ Mile High 2026

All talks from Wild West Hackin' Fest @ Mile High 2026