Open Advanced Windows Exploitation
  • Introduction
    • Welcome
      • Subscribe
      • Contents
      • Intended Audience
      • Required Software and Tools
      • Thank You and Support
  • Custom Shellcode
    • 64-bit Architecture
      • 64-bit Enhancements
      • Calling Conventions
    • Shellcode Workflow
      • Visual Studio Code
      • Netwide Assembler
      • Windbg Preview
      • Workflow
    • Writing Shellcode
      • NULL-Free Position-Independent Shellcode
      • Finding kernel32.dll
      • Resolving Symbols
      • Finding VMAs
      • MessageBox Shellcode
      • Avoiding NULL
      • GetLastError
    • Reverse Shell
      • Exercise
      • Solution
  • Exploit Mitigations
    • Understanding the Battlefield
      • Memory Corruption
      • Vulnerability Primitives
      • Overview of Mitigations
    • Our Old Foes
      • DEP
      • ASLR
  • Memory Management
    • Memory Basics
      • Pages
      • Shared Memory
    • Memory Management
      • The Stack
      • The Heap
        • Heap Grooming and Overflow
        • Virtual Functions in C++
        • The Heap Continued
        • Kernel Mode Heap
      • Managed Memory
  • The Kernel
    • Kernel Basics
      • Kernel Structures
      • Kernel Debugging Options
      • Navigating the Kernel
      • Analysing the Kernel
    • Access Tokens
      • Access Token Basics
      • Token Theft
  • Drivers
    • Driver Basics
      • Implementing a Driver
      • Reversing Our Driver
      • A Basic User Mode Application
  • First Kernel Exploit
    • A Kernel Exploit
      • CVE 2020-17382
      • IDA Free
      • Writing A Basic Fuzzer
      • Controlling RIP
      • Meet SMEP
      • ROP to the Rescue
      • kASLR
      • Priv Esc Shellcode
    • Exploit Code
  • References
    • References
Powered by GitBook
On this page
  • Download and Install
  • NASM Language Support Extension
  1. Custom Shellcode
  2. Shellcode Workflow

Visual Studio Code

Visual Studio Code (VS Code) is a free, lightweight, and highly extensible source code editor developed by Microsoft. It is widely used by developers for various programming languages and platforms.

PreviousShellcode WorkflowNextNetwide Assembler

Last updated 1 year ago

We can use Microsoft Visual Studio Code with the NASM Language Support Extension to write our shellcode. It is very lightweight, meaning it doesn't take up much disk space, it runs very quickly, and it is very easy to use. We will use Visual Studio Community later to write exploit code in C, but for now Visual Studio Code suits our needs.

Download and Install

The latest version of Visual Studio Code can be found at .

Download the x64 installer for Windows 8, 10, 11 and run it. The version being used by the author is 1.78.2. When it is installed you can start the application and you will be presented with the welcome page:

Create a folder to organise your work in and open it in Visual Studio Code.

NASM Language Support Extension

This NASM Language Support Extension provides easy syntax highlighting and diagnostics for assembly files. It will check files with the extensions .asm, .nasm, and .s. This extension was published by "doinkythederp".

Installing the NASM Language Support Extension for Visual Studio Code is also very easy. From the sidebar press the Extensions button, then search for 'NASM Language Support':

From here you can install the extension.

https://code.visualstudio.com/download
Visual Studio Code welcome page
Installing NASM Language Support in Visual Studio Code