Author Archives: odzhan

Windows Data Structures and Callbacks, Part 1

Windows Data Structures and Callbacks, Part 1 Contents Introduction Function Table List Event Tracing DLL Notifications Secure Memory Configuration Manager (CM) Vectored Exception Handling (VEH) Windows Error Reporting (WER) 1. Introduction A process can contain thousands of pointers to executable … Continue reading

Posted in data structures, redteam, security | Tagged , , , | Leave a comment

Windows Process Injection: Command Line and Environment Variables

Windows Process Injection: Command Line and Environment Variables Contents Introduction Shellcode Environment Variables Command Line Window Title Runtime Data 1. Introduction There are many ways to load shellcode into the address space of a process, but knowing precisely where it’s … Continue reading

Posted in assembly, injection, malware, process injection, programming, redteam, security, shellcode, windows | Tagged , , , , , | Leave a comment

Windows Process Injection: EM_GETHANDLE, WM_PASTE and EM_SETWORDBREAKPROC

Introduction Edit Controls Writing CP-1252 Compatible Code Initialization Set RAX to 0 Set RAX to 1 Set RAX to -1 Load and Store Data Two Byte Instructions Prefix Codes Generating Shellcode Injecting and Executing Demonstration Encoding Arbitrary Data Encoding Decoding … Continue reading

Posted in assembly, injection, process injection, programming, redteam, security, shellcode, windows | Tagged , , , , | 3 Comments

Shellcode: Encoding Null Bytes Faster With Escape Sequences

Introduction Quick post about a common problem removing null bytes in the loader generated by Donut. Replacing opcodes that contain null bytes with equivalent snippets is enough to solve the problem for a shellcode of no more than a few … Continue reading

Posted in assembly, donut, security, shellcode, windows | Tagged , , | 1 Comment

Invoking System Calls and Windows Debugger Engine

Introduction Quick post about Windows System calls that I forgot about working on after the release of Dumpert by Cn33liz last year, which is described in this post. Typically, EDR and AV set hooks on Win32 API or NT wrapper … Continue reading

Posted in assembly, programming, redteam, security, windows | Tagged , , , , , | 1 Comment

Shellcode: Recycling Compression Algorithms for the Z80, 8088, 6502, 8086, and 68K Architectures.

Recycling Compression Algorithms for the Z80, 8088, 6502, 8086, and 68K Architectures. Contents Introduction History Entropy Coding Universal code Lempel-Ziv (LZ77/LZ1) Lempel-Ziv-Storer-Szymanski (LZSS) Lempel-Ziv-Bell (LZB) Intel 8088 / 8086 LZE LZ4 LZSA aPLib MOS Technology 6502 Exomizer Pucrunch Zilog 80 … Continue reading

Posted in compression, encryption, iot, linux, optimization, programming, shellcode, windows | Tagged , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Another method of bypassing ETW and Process Injection via ETW registration entries.

Contents Introduction Registering Providers Locating the Registration Table Parsing the Registration Table Code Redirection Disable Tracing Further Research 1. Introduction This post briefly describes some techniques used by Red Teams to disrupt detection of malicious activity by the Event Tracing … Continue reading

Posted in etw, process injection, redteam, security, shellcode, windows | Tagged , , , , | 1 Comment

Shellcode: Data Compression

Introduction This post examines data compression algorithms suitable for position-independent codes and assumes you’re already familiar with the concept and purpose of data compression. For those of you curious to know more about the science, or information theory, read Data … Continue reading

Posted in assembly, compression, linux, malware, programming, security, shellcode, windows | Tagged , , , , | 2 Comments

MiniDumpWriteDump via COM+ Services DLL

Introduction This will be a very quick code-oriented post about a DLL function exported by comsvcs.dll that I was unable to find any reference to online. UPDATE: Memory Dump Analysis Anthology Volume 1 that was published in 2008 by Dmitry … Continue reading

Posted in windows | Tagged , , , | 1 Comment

Windows Process Injection: Asynchronous Procedure Call (APC)

Introduction An early example of APC injection can be found in a 2005 paper by the late Barnaby Jack called Remote Windows Kernel Exploitation – Step into the Ring 0. Until now, these posts have focused on relatively new, lesser-known … Continue reading

Posted in assembly, injection, malware, process injection, programming, shellcode, windows | Tagged , , , | Leave a comment