<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Posts on 0xGently</title><link>https://0xgently.github.io/en/posts/</link><description>Recent content in Posts on 0xGently</description><generator>Hugo</generator><language>en</language><copyright>Content is licensed under CC BY 4.0. © 0xGently</copyright><lastBuildDate>Tue, 27 Oct 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://0xgently.github.io/en/posts/index.xml" rel="self" type="application/rss+xml"/><item><title>Custom GetProcAddress</title><link>https://0xgently.github.io/en/posts/custom_getprocaddress/</link><pubDate>Tue, 27 Oct 2026 00:00:00 +0000</pubDate><guid>https://0xgently.github.io/en/posts/custom_getprocaddress/</guid><description>&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;When developing with C or C++ on Windows systems, we generally use &lt;code&gt;GetProcAddress&lt;/code&gt; to call a function inside a DLL. The process is fundamentally simple: the DLL is loaded into memory with &lt;code&gt;LoadLibrary&lt;/code&gt;, and then the DLL&amp;rsquo;s handle value and the name of the searched function are passed to &lt;code&gt;GetProcAddress&lt;/code&gt;. But how exactly does this process work in the background? How does the operating system find the string value we provided inside a massive memory block and return its address to us? In this post, instead of using standard Windows APIs, we are writing our own &lt;code&gt;GetProcAddress&lt;/code&gt; function by parsing the memory structure of a PE file.&lt;/p&gt;</description></item><item><title>Custom GetModuleHandle</title><link>https://0xgently.github.io/en/posts/custom_getmodulehandle/</link><pubDate>Sun, 25 Oct 2026 00:00:00 +0000</pubDate><guid>https://0xgently.github.io/en/posts/custom_getmodulehandle/</guid><description>&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;Analyzing exactly how Windows APIs work under the hood gives us many new techniques and tactics when writing malware. In this post, we will explore how to implement one of the most frequently used APIs, &lt;code&gt;GetModuleHandle&lt;/code&gt;, from scratch without calling a single Windows API. Of course, one of the main reasons for doing this is to hide this heavily used function from the IAT (Import Address Table).&lt;/p&gt;
&lt;p&gt;As you know, &lt;code&gt;GetModuleHandle&lt;/code&gt; returns the base memory address of a loaded module given its DLL name. What it actually does is quite straightforward: it scans a list of loaded modules maintained by the OS loader for each process. This list resides inside the Process Environment Block (PEB) structure. The focus of this post will be to show, step by step, how to manually access the PEB and parse this list.&lt;/p&gt;</description></item><item><title>Local APC Injection</title><link>https://0xgently.github.io/en/posts/apc_%C4%B1nj/</link><pubDate>Wed, 21 Oct 2026 00:00:00 +0000</pubDate><guid>https://0xgently.github.io/en/posts/apc_%C4%B1nj/</guid><description>&lt;h1 id="apc-injection"&gt;Apc Injection&lt;/h1&gt;
&lt;p&gt;Today, there are many techniques we use to execute our payload when writing certain malware. In this post, we will focus on the APC Injection technique, which is one of the most fundamental and effective methods where we use the natural operation of the operating system to our advantage. Without wasting time on standard parts that are repeated in every injection, like memory allocation, we will focus directly on the technique.&lt;/p&gt;</description></item><item><title> Process Enumeration-1</title><link>https://0xgently.github.io/en/posts/createtoolhelp32snapshot/</link><pubDate>Sat, 17 Oct 2026 00:00:00 +0000</pubDate><guid>https://0xgently.github.io/en/posts/createtoolhelp32snapshot/</guid><description>&lt;p&gt;In this article, I will explain how to gather information about processes or threads using the &lt;code&gt;CreateToolhelp32Snapshot&lt;/code&gt; function.&lt;/p&gt;
&lt;p&gt;If we want to interact with a target process in the tools we develop or the malware we write, we first need to pinpoint exactly where that process resides in the system.&lt;/p&gt;
&lt;p&gt;We will divide our operation into two main stages.
First, starting with plain text (such as a process name like &lt;code&gt;notepad.exe&lt;/code&gt;), we will scan all the processes on the system and extract our target&amp;rsquo;s unique identification number, namely its PID. In the second stage, using this PID we obtained, we will dive into the target process and capture a valid thread that we can manipulate or hijack.&lt;/p&gt;</description></item><item><title>Thread Hijacking</title><link>https://0xgently.github.io/en/posts/thread_hijacking/</link><pubDate>Fri, 09 Oct 2026 00:00:00 +0000</pubDate><guid>https://0xgently.github.io/en/posts/thread_hijacking/</guid><description>&lt;h2 id="remote_thread_creation"&gt;Remote_Thread_Creation&lt;/h2&gt;
&lt;p&gt;In this article, I will talk about a technique in which we suspend a legitimate process, inject shellcode into its memory region, and then manipulate the RIP/EIP registers of its existing thread.&lt;/p&gt;
&lt;p&gt;In the cybersecurity world, APIs such as &lt;code&gt;CreateRemoteThread&lt;/code&gt; are generally the preferred choice for executing code inside a target process. However, these functions are monitored very tightly by security mechanisms (AV/EDR) and blocked instantly. Thread Hijacking, on the other hand, instead of creating a brand-new and suspicious thread from scratch, aims to &amp;ldquo;steal&amp;rdquo; the route of an already existing legitimate thread.&lt;/p&gt;</description></item><item><title>Process Enumeration-2</title><link>https://0xgently.github.io/en/posts/enum_process/</link><pubDate>Thu, 08 Oct 2026 00:00:00 +0000</pubDate><guid>https://0xgently.github.io/en/posts/enum_process/</guid><description>&lt;h2 id="process-enumeration"&gt;Process Enumeration&lt;/h2&gt;
&lt;h3 id="finding-the-targets-pid-value-enumprocesses"&gt;Finding the Target&amp;rsquo;s PID Value (EnumProcesses)&lt;/h3&gt;
&lt;p&gt;When developing malware, we often need a legitimate running process (e.g., notepad.exe or explorer.exe) on the system to execute techniques like hiding or running our payload. We need to speak Windows&amp;rsquo; language and find the PID (Process ID) value of that process.&lt;/p&gt;
&lt;p&gt;This process of listing the active processes on the system to find our target&amp;rsquo;s PID or gather similar information about processes is generally called Process Enumeration. In this article, we will look step-by-step at how to do this from scratch using the standard Windows EnumProcesses API.&lt;/p&gt;</description></item><item><title>Process Enumeration-3</title><link>https://0xgently.github.io/en/posts/ntquerysysteminformation/</link><pubDate>Mon, 05 Oct 2026 00:00:00 +0000</pubDate><guid>https://0xgently.github.io/en/posts/ntquerysysteminformation/</guid><description>&lt;h2 id="process-enumeration"&gt;Process Enumeration&lt;/h2&gt;
&lt;h3 id="finding-the-targets-pid-value-ntquerysysteminformation"&gt;Finding the Target&amp;rsquo;s PID Value (NtQuerySystemInformation)&lt;/h3&gt;
&lt;p&gt;During malware development ,we generally need a legitimate process that already exists on the system (such as notepad.exe, explorer.exe, or svchost.exe) to hide our payload in memory or to execute various techniques in a stable manner.&lt;/p&gt;
&lt;p&gt;This is exactly where we refer to the practice of listing the currently active processes on the system to extract our target&amp;rsquo;s PID value or to collect telemetry about processes, generally known as Process Enumeration. In our previous article, we looked step-by-step at how to perform this operation from scratch using Windows’ standard &lt;code&gt;EnumProcesses&lt;/code&gt; API. However, in the cybersecurity world, there are always more complex and harder-to-learn ways&amp;hellip;&lt;/p&gt;</description></item><item><title>What are Prologue and Epilogue in Assembly?</title><link>https://0xgently.github.io/en/posts/assembly/</link><pubDate>Thu, 21 May 2026 00:00:00 +0000</pubDate><guid>https://0xgently.github.io/en/posts/assembly/</guid><description>&lt;p&gt;When writing programs in high-level languages, there are many operations handled automatically in the background that we must manage manually in low-level languages (especially Assembly). Among the most critical of these are the &lt;strong&gt;prologue&lt;/strong&gt; and &lt;strong&gt;epilogue&lt;/strong&gt; sequences.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Diagram of Prologue Operation on the Stack" loading="lazy" src="https://0xgently.github.io/assets/img/assembly-image.webp"&gt;&lt;/p&gt;
&lt;p&gt;Before diving into this topic, let&amp;rsquo;s touch upon a few fundamental concepts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Register:&lt;/strong&gt; The fastest data storage area within the CPU; data to be processed is held here.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Stack:&lt;/strong&gt; A memory area operating on a LIFO (Last In, First Out) basis, holding temporary data during function calls.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Stack Frame:&lt;/strong&gt; A block of memory allocated on the stack each time a function is called, containing arguments and local variables.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;ESP/RSP:&lt;/strong&gt; The stack pointer; it points to the top of the stack. It is called ESP in x86 and RSP in x64 architecture.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;EBP/RBP:&lt;/strong&gt; The base pointer; it holds the base address of the stack frame and serves as a reference point for accessing variables.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Calling Convention:&lt;/strong&gt; A set of rules determining how arguments are passed to functions and how return values are retrieved.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Push:&lt;/strong&gt; Pushes a value onto the stack, moving the stack pointer down.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Pop:&lt;/strong&gt; Pops the value from the top of the stack, moving the stack pointer up.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;All these concepts form the foundation for understanding prologue and epilogue operations. Essentially, these two sequences consist entirely of setting up and tearing down the stack frame.&lt;/p&gt;</description></item><item><title>RC4 Encryption</title><link>https://0xgently.github.io/en/posts/rc4/</link><pubDate>Mon, 20 Apr 2026 00:00:00 +0000</pubDate><guid>https://0xgently.github.io/en/posts/rc4/</guid><description>&lt;h2 id="rc4-encryption"&gt;RC4 Encryption&lt;/h2&gt;
&lt;p&gt;RC4 is a symmetric stream cipher that encrypts data byte by byte rather than in blocks. Under the hood, it consists of two primary phases: the Key-Scheduling Algorithm (KSA), where the key is initialized and permuted in memory, and the Pseudo-Random Generation Algorithm (PRGA), which generates keystream bytes to be XORed with the data. Thanks to its symmetric architecture, the exact same routine is utilized for both encryption and decryption.&lt;/p&gt;</description></item><item><title>XOR Encryption</title><link>https://0xgently.github.io/en/posts/xor/</link><pubDate>Wed, 15 Apr 2026 00:00:00 +0000</pubDate><guid>https://0xgently.github.io/en/posts/xor/</guid><description>&lt;h2 id="xor-encryption"&gt;XOR Encryption&lt;/h2&gt;
&lt;p&gt;In the world of malware development, one of the most critical factors determining the lifespan of your payload is how effectively you can conceal it. If you embed shellcode or a PE file into memory in plain text, static analysis tools and antivirus (AV) signatures will flag it within seconds.&lt;/p&gt;
&lt;p&gt;This is precisely where payload encryption comes into play. In this post, we will examine the XOR algorithm—one of the most fundamental yet heavily modified encryption techniques in the malware domain. We will start from the basics and progress toward complex, position-dependent rolling structures.&lt;/p&gt;</description></item><item><title>IPv4/IPv6 DeObfuscation</title><link>https://0xgently.github.io/en/posts/%C4%B1pv4_deobf/</link><pubDate>Fri, 10 Apr 2026 00:00:00 +0000</pubDate><guid>https://0xgently.github.io/en/posts/%C4%B1pv4_deobf/</guid><description>&lt;h2 id="ipv4v6-deobfuscation"&gt;IPv4/v6 DeObfuscation&lt;/h2&gt;
&lt;p&gt;In this post, we will examine how a network configuration function, which looks completely ordinary from the outside, is transformed into a shellcode decoder. Our goal is to understand the attacker&amp;rsquo;s mindset and design our defensive systems to catch these types of &amp;ldquo;normal-looking anomalies.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: You can find the entirety of the code explained in this text at &lt;a href="https://github.com/0xGently/malware-development-library/tree/main/Payload-Encryption-and-Obfuscation/06-IPv4_IPv6_DeObf"&gt;malware-development-library&lt;/a&gt; Furthermore, once you establish the logic of this topic and examine the full version of the code, you can also construct DeObfuscation processes applied to other techniques. They are pretty much the same anyway; you only need to make a few modifications, that is all.&lt;/p&gt;</description></item><item><title>Chacha20 Encryption</title><link>https://0xgently.github.io/en/posts/chacha20/</link><pubDate>Wed, 01 Apr 2026 00:00:00 +0000</pubDate><guid>https://0xgently.github.io/en/posts/chacha20/</guid><description>&lt;h2 id="chacha20-encryption"&gt;ChaCha20 Encryption&lt;/h2&gt;
&lt;p&gt;In this post, I will talk about ChaCha20. Frankly, I thought about how to introduce the topic, but I couldn&amp;rsquo;t come up with a sensible introductory sentence. Therefore, I prefer to dive straight into the subject.&lt;/p&gt;
&lt;p&gt;File size and simplicity are everything. There is only one reason we prefer ChaCha20: it is compact, fast, and eliminates the need to write an extra decryption routine.&lt;/p&gt;
&lt;p&gt;So why do we choose ChaCha20? Because it is exceptionally fast, does not rely on dedicated CPU cryptographic hardware extensions (such as AES-NI), and is far less cumbersome to implement from scratch in C/C++. Furthermore, we use the exact same code for both encryption and decryption, which minimizes the overall stub size of the software.&lt;/p&gt;</description></item><item><title>IPv4/IPv6 Obfuscation</title><link>https://0xgently.github.io/en/posts/%C4%B1pv4_obf/</link><pubDate>Thu, 05 Feb 2026 00:00:00 +0000</pubDate><guid>https://0xgently.github.io/en/posts/%C4%B1pv4_obf/</guid><description>&lt;h2 id="ipv4ipv6-obfuscation"&gt;IPv4/IPv6 Obfuscation&lt;/h2&gt;
&lt;p&gt;In the world of cybersecurity, when we want to hide data, we generally have two fundamental paths ahead of us: we either encrypt the data directly (such as AES, RC4, or XOR) or we obfuscate it.&lt;/p&gt;
&lt;p&gt;When developing software, obfuscating the code sometimes plays a critical role not only in protecting intellectual property but also in bypassing security mechanisms. For example, suppose we have a shellcode and we want to hide it. Although encryption is the first solution that comes to mind, it might not always be the smartest route. This is because encrypted data causes the &lt;strong&gt;entropy (randomness rate)&lt;/strong&gt; in that specific section of the file to skyrocket, and this situation immediately catches the radar of security analysts or AV/EDR solutions. At this point, obfuscating without drawing attention transforms into a much more logical alternative.&lt;/p&gt;</description></item><item><title>Packet Crafting with Scapy</title><link>https://0xgently.github.io/en/posts/packet-crafting/</link><pubDate>Wed, 21 May 2025 00:00:00 +0000</pubDate><guid>https://0xgently.github.io/en/posts/packet-crafting/</guid><description>&lt;p&gt;&lt;img alt="Scapy Logo" loading="lazy" src="https://0xgently.github.io/assets/img/scapy-image.webp"&gt;&lt;/p&gt;
&lt;p&gt;In the world of network security and cybersecurity, understanding how a packet is formed, how it can be manipulated, and how to craft custom packets is a crucial skill. The Python programming language and the Scapy library provide an excellent platform for learning these skills. In this post, I will detail step-by-step the fundamentals of creating and analyzing network packets using Scapy.&lt;/p&gt;
&lt;h2 id="1-what-is-scapy-and-why-is-it-important"&gt;1. What is Scapy and Why is it Important?&lt;/h2&gt;
&lt;p&gt;Scapy is a powerful network packet manipulation library written in Python. Essentially, it allows us to:&lt;/p&gt;</description></item></channel></rss>