<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Step-by-Step Linux Process Injection Guide on Mathscantor&#39;s Cybersecurity Blog</title>
		<link>https://mathscantor.github.io/series/step-by-step-linux-process-injection-guide/</link>
		<description>Recent content in Step-by-Step Linux Process Injection Guide on Mathscantor&#39;s Cybersecurity Blog</description>
		<generator>Hugo</generator>
		<language>en-us</language>
		
		
		
			<copyright>&lt;a href=&#34;https://creativecommons.org/licenses/by-nc/4.0/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;CC BY-NC 4.0&lt;/a&gt;</copyright>
		
		
			<lastBuildDate>Sun, 26 Jul 2026 12:37:00 +0800</lastBuildDate>
		
			<atom:link href="https://mathscantor.github.io/series/step-by-step-linux-process-injection-guide/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Step-by-Step Linux Process Injection Guide Part 3 - Shellcode and Remote Function Calls</title>
				<link>https://mathscantor.github.io/posts/linux-processing-injection-guide/part-3-shellcode-and-remote-calls/</link>
				<pubDate>Sun, 26 Jul 2026 12:37:00 +0800</pubDate>
				<guid>https://mathscantor.github.io/posts/linux-processing-injection-guide/part-3-shellcode-and-remote-calls/</guid>
				<description>&lt;h2 id=&#34;1-introduction&#34;&gt;1. Introduction&lt;/h2&gt;&#xA;&lt;p&gt;In Part 2 we attached to the target process and resolved the addresses of &lt;span style=&#34;font-family: Courier, monospace; font-weight: 600;&#34;&gt;malloc()&lt;/span&gt;, &lt;span style=&#34;font-family: Courier, monospace; font-weight: 600;&#34;&gt;free()&lt;/span&gt;, and &lt;span style=&#34;font-family: Courier, monospace; font-weight: 600;&#34;&gt;dlopen()&lt;/span&gt; inside the target despite ASLR. We know where those functions live, but we have not called them yet.&lt;/p&gt;&#xA;&lt;p&gt;This part covers the mechanism that makes remote function calls possible: a small shellcode trampoline. We will walk through how &lt;em&gt;linworm&lt;/em&gt; finds an executable memory region in the target, backs up the original bytes and registers, writes the trampoline into place, and then uses it to invoke any function by manipulating registers and resuming execution with &lt;span style=&#34;font-family: Courier, monospace; font-weight: 600;&#34;&gt;ptrace()&lt;/span&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Step-by-Step Linux Process Injection Guide Part 2 - Attaching and Defeating ASLR</title>
				<link>https://mathscantor.github.io/posts/linux-processing-injection-guide/part-2-attaching-and-defeating-aslr/</link>
				<pubDate>Sat, 18 Jul 2026 09:31:08 +0800</pubDate>
				<guid>https://mathscantor.github.io/posts/linux-processing-injection-guide/part-2-attaching-and-defeating-aslr/</guid>
				<description>&lt;h2 id=&#34;1-introduction&#34;&gt;1. Introduction&lt;/h2&gt;&#xA;&lt;p&gt;Before we can inject anything, we need to do two things:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Attach to the target process so we can control it.&lt;/li&gt;&#xA;&lt;li&gt;Figure out where libc functions like &lt;span style=&#34;font-family: Courier, monospace; font-weight: 600;&#34;&gt;malloc()&lt;/span&gt; and &lt;span style=&#34;font-family: Courier, monospace; font-weight: 600;&#34;&gt;dlopen()&lt;/span&gt; live inside the target&amp;rsquo;s address space.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;This part covers both. The first half is about stopping the target with &lt;span style=&#34;font-family: Courier, monospace; font-weight: 600;&#34;&gt;ptrace()&lt;/span&gt;. The second half is about defeating ASLR by resolving function addresses at runtime instead of hardcoding them.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Step-by-Step Linux Process Injection Guide Part 1 - Overview</title>
				<link>https://mathscantor.github.io/posts/linux-processing-injection-guide/part-1-overview/</link>
				<pubDate>Tue, 07 Jul 2026 23:51:00 +0800</pubDate>
				<guid>https://mathscantor.github.io/posts/linux-processing-injection-guide/part-1-overview/</guid>
				<description>&lt;h2 id=&#34;1-introduction&#34;&gt;1. Introduction&lt;/h2&gt;&#xA;&lt;p&gt;Process injection is a technique where one process forces another already-running process to load and execute arbitrary code. On Windows, the classic approach is &lt;span style=&#34;font-family: Courier, monospace; font-weight: 600;&#34;&gt;CreateRemoteThread()&lt;/span&gt; combined with &lt;span style=&#34;font-family: Courier, monospace; font-weight: 600;&#34;&gt;LoadLibrary()&lt;/span&gt;. On Linux, the equivalent relies on &lt;span style=&#34;font-family: Courier, monospace; font-weight: 600;&#34;&gt;ptrace()&lt;/span&gt;. It&amp;rsquo;s the same system call that debuggers like GDB use to attach to processes, read and write their memory, and manipulate their registers.&lt;/p&gt;&#xA;&lt;p&gt;This series walks through a full ptrace-based injection from start to finish. We will cover attaching to a target, setting up a shellcode trampoline, resolving function addresses despite ASLR, loading a shared library into the target&amp;rsquo;s address space, and restoring the target to its original state. By the end, you should understand every step well enough to read (or write) an injector yourself.&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
