Skip to content

Commit f2f98bf

Browse files
author
ryan nemeth
committed
fix date
1 parent bae5a8f commit f2f98bf

File tree

16 files changed

+227
-29
lines changed

16 files changed

+227
-29
lines changed

config.toml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,3 @@ name = "Tags"
100100
url = "/tags/"
101101
weight = 5
102102

103-
# [module]
104-
# [[module.imports]]
105-
# path = "github.com/alex-shpak/hugo-book"
106-
#
107-
# [[module.imports.mounts]]
108-
# source = "themes/book/layouts"
109-
# target = "layouts/notes"
110-
#

content/posts/2025-11-23-modify-machine-code.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Modify Machine Code in Executables"
3-
date: '2025-11-26T16:01:00+00:00'
3+
date: '2025-11-23T16:01:00+00:00'
44
author: Ryan
55
layout: post
66
draft: false
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
2+
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
3+
<channel>
4+
<title>Assembly on GeekyRyan</title>
5+
<link>http://localhost:1313/categories/assembly/</link>
6+
<description>Recent content in Assembly on GeekyRyan</description>
7+
<generator>Hugo</generator>
8+
<language>en</language>
9+
<lastBuildDate>Sun, 23 Nov 2025 16:01:00 +0000</lastBuildDate>
10+
<atom:link href="http://localhost:1313/categories/assembly/index.xml" rel="self" type="application/rss+xml" />
11+
<item>
12+
<title>Modify Machine Code in Executables</title>
13+
<link>http://localhost:1313/posts/2025-11-23-modify-machine-code/</link>
14+
<pubDate>Sun, 23 Nov 2025 16:01:00 +0000</pubDate>
15+
<guid>http://localhost:1313/posts/2025-11-23-modify-machine-code/</guid>
16+
<description>&lt;h1 id=&#34;modifying-machine-code-in-executables&#34;&gt;Modifying Machine Code in Executables&lt;/h1&gt;&#xA;&lt;p&gt;In this post, we’ll walk through a simple but fun reverse-engineering exercise: taking a compiled C program, locating the machine instructions responsible for printing characters, and modifying those bytes directly in the executable.&lt;/p&gt;&#xA;&lt;p&gt;This is a great way to build intuition around how compilers translate code, how functions map to assembly, and how tools like &lt;code&gt;objdump&lt;/code&gt; and &lt;code&gt;xxd&lt;/code&gt; help us inspect and patch binaries.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;the-source-program&#34;&gt;The Source Program&lt;/h2&gt;&#xA;&lt;p&gt;We’ll start with a minimal C program that prints &lt;code&gt;&amp;quot;ab\n&amp;quot;&lt;/code&gt;:&lt;/p&gt;</description>
17+
</item>
18+
</channel>
19+
</rss>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
2+
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
3+
<channel>
4+
<title>Containers on GeekyRyan</title>
5+
<link>http://localhost:1313/categories/containers/</link>
6+
<description>Recent content in Containers on GeekyRyan</description>
7+
<generator>Hugo</generator>
8+
<language>en</language>
9+
<lastBuildDate>Wed, 25 Dec 2024 00:00:00 +0000</lastBuildDate>
10+
<atom:link href="http://localhost:1313/categories/containers/index.xml" rel="self" type="application/rss+xml" />
11+
<item>
12+
<title>Linux Containers</title>
13+
<link>http://localhost:1313/posts/2024-12-25-linux-containers/</link>
14+
<pubDate>Wed, 25 Dec 2024 00:00:00 +0000</pubDate>
15+
<guid>http://localhost:1313/posts/2024-12-25-linux-containers/</guid>
16+
<description>&lt;h1 id=&#34;notes&#34;&gt;NOTES&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Containers in Linux are implemented with various namespaces and cgroups.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h1 id=&#34;introduction&#34;&gt;Introduction&lt;/h1&gt;&#xA;&lt;p&gt;If you work in tech, it’s rare to have a day where you don’t think or read about containerization. Docker, Kubernetes, Mesos, OpenShift, containerd, Azure Kubernetes Service, Amazon Elastic Kubernetes Service—the list of terms and platforms sometimes feels endless.&lt;/p&gt;&#xA;&lt;p&gt;The reality is that nearly every major technology company relies on containers at scale. OpenAI, Google, Amazon, Netflix, and even large portions of Microsoft Azure run their infrastructure on container platforms (most notably Kubernetes). But what exactly is a “container”? We’re often told that a container is just a process running on a host system, wrapped in some clever isolation. That’s true at a very high level, but it misses the nuance. The inner workings of containers rely on powerful, low-level Linux kernel features that go far beyond a simple process.&lt;/p&gt;</description>
17+
</item>
18+
</channel>
19+
</rss>

public/categories/golang/index.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<link>http://localhost:1313/posts/2025-11-02-go-mod-breaks-tests/</link>
1414
<pubDate>Sun, 02 Nov 2025 16:01:00 +0000</pubDate>
1515
<guid>http://localhost:1313/posts/2025-11-02-go-mod-breaks-tests/</guid>
16-
<description>&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;&#xA;&lt;p&gt;If you’ve ever initialized a new Go project with &lt;code&gt;go mod init main&lt;/code&gt; and later tried to write tests for it, you may have seen this cryptic error:&lt;/p&gt;&#xA;&lt;h3&gt;&lt;/h3&gt;&#xA;&lt;p&gt;cannot import &amp;ldquo;main&amp;rdquo;&lt;/p&gt;&#xA;&lt;h3&gt;&lt;/h3&gt;&#xA;&lt;p&gt;At first glance, this doesn’t make much sense — after all, your code and tests are both in &lt;code&gt;package main&lt;/code&gt;. However, there’s a subtle interaction between how Go handles modules, packages, and test harnesses that causes this issue. Let’s walk through what’s actually happening.&lt;/p&gt;</description>
16+
<description>&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;&#xA;&lt;p&gt;If you’ve ever initialized a new Go project with &lt;code&gt;go mod init main&lt;/code&gt; and later tried to write tests for it, you may have seen this cryptic error:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;cannot import &amp;#34;main&amp;#34;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;At first glance, this doesn’t make much sense — after all, your code and tests are both in &lt;code&gt;package main&lt;/code&gt;. However, there’s a subtle interaction between how Go handles modules, packages, and test harnesses that causes this issue. Let’s walk through what’s actually happening.&lt;/p&gt;</description>
1717
</item>
1818
<item>
1919
<title>Detecting MIME Types in Go</title>

public/categories/index.xml

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,43 @@
66
<description>Recent content in Categories on GeekyRyan</description>
77
<generator>Hugo</generator>
88
<language>en</language>
9-
<lastBuildDate>Sun, 02 Nov 2025 16:01:00 +0000</lastBuildDate>
9+
<lastBuildDate>Sun, 23 Nov 2025 16:01:00 +0000</lastBuildDate>
1010
<atom:link href="http://localhost:1313/categories/index.xml" rel="self" type="application/rss+xml" />
1111
<item>
12-
<title>Golang</title>
13-
<link>http://localhost:1313/categories/golang/</link>
14-
<pubDate>Sun, 02 Nov 2025 16:01:00 +0000</pubDate>
15-
<guid>http://localhost:1313/categories/golang/</guid>
12+
<title>Assembly</title>
13+
<link>http://localhost:1313/categories/assembly/</link>
14+
<pubDate>Sun, 23 Nov 2025 16:01:00 +0000</pubDate>
15+
<guid>http://localhost:1313/categories/assembly/</guid>
1616
<description></description>
1717
</item>
1818
<item>
1919
<title>Programming</title>
2020
<link>http://localhost:1313/categories/programming/</link>
21-
<pubDate>Sun, 02 Nov 2025 16:01:00 +0000</pubDate>
21+
<pubDate>Sun, 23 Nov 2025 16:01:00 +0000</pubDate>
2222
<guid>http://localhost:1313/categories/programming/</guid>
2323
<description></description>
2424
</item>
25+
<item>
26+
<title>Reverse Engineering</title>
27+
<link>http://localhost:1313/categories/reverse-engineering/</link>
28+
<pubDate>Sun, 23 Nov 2025 16:01:00 +0000</pubDate>
29+
<guid>http://localhost:1313/categories/reverse-engineering/</guid>
30+
<description></description>
31+
</item>
32+
<item>
33+
<title>Systems</title>
34+
<link>http://localhost:1313/categories/systems/</link>
35+
<pubDate>Sun, 23 Nov 2025 16:01:00 +0000</pubDate>
36+
<guid>http://localhost:1313/categories/systems/</guid>
37+
<description></description>
38+
</item>
39+
<item>
40+
<title>Golang</title>
41+
<link>http://localhost:1313/categories/golang/</link>
42+
<pubDate>Sun, 02 Nov 2025 16:01:00 +0000</pubDate>
43+
<guid>http://localhost:1313/categories/golang/</guid>
44+
<description></description>
45+
</item>
2546
<item>
2647
<title>TIL</title>
2748
<link>http://localhost:1313/categories/til/</link>

public/categories/programming/index.xml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,21 @@
66
<description>Recent content in Programming on GeekyRyan</description>
77
<generator>Hugo</generator>
88
<language>en</language>
9-
<lastBuildDate>Sun, 02 Nov 2025 16:01:00 +0000</lastBuildDate>
9+
<lastBuildDate>Sun, 23 Nov 2025 16:01:00 +0000</lastBuildDate>
1010
<atom:link href="http://localhost:1313/categories/programming/index.xml" rel="self" type="application/rss+xml" />
11+
<item>
12+
<title>Modify Machine Code in Executables</title>
13+
<link>http://localhost:1313/posts/2025-11-23-modify-machine-code/</link>
14+
<pubDate>Sun, 23 Nov 2025 16:01:00 +0000</pubDate>
15+
<guid>http://localhost:1313/posts/2025-11-23-modify-machine-code/</guid>
16+
<description>&lt;h1 id=&#34;modifying-machine-code-in-executables&#34;&gt;Modifying Machine Code in Executables&lt;/h1&gt;&#xA;&lt;p&gt;In this post, we’ll walk through a simple but fun reverse-engineering exercise: taking a compiled C program, locating the machine instructions responsible for printing characters, and modifying those bytes directly in the executable.&lt;/p&gt;&#xA;&lt;p&gt;This is a great way to build intuition around how compilers translate code, how functions map to assembly, and how tools like &lt;code&gt;objdump&lt;/code&gt; and &lt;code&gt;xxd&lt;/code&gt; help us inspect and patch binaries.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;the-source-program&#34;&gt;The Source Program&lt;/h2&gt;&#xA;&lt;p&gt;We’ll start with a minimal C program that prints &lt;code&gt;&amp;quot;ab\n&amp;quot;&lt;/code&gt;:&lt;/p&gt;</description>
17+
</item>
1118
<item>
1219
<title>Understanding Why “module main” Breaks Go Tests</title>
1320
<link>http://localhost:1313/posts/2025-11-02-go-mod-breaks-tests/</link>
1421
<pubDate>Sun, 02 Nov 2025 16:01:00 +0000</pubDate>
1522
<guid>http://localhost:1313/posts/2025-11-02-go-mod-breaks-tests/</guid>
16-
<description>&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;&#xA;&lt;p&gt;If you’ve ever initialized a new Go project with &lt;code&gt;go mod init main&lt;/code&gt; and later tried to write tests for it, you may have seen this cryptic error:&lt;/p&gt;&#xA;&lt;h3&gt;&lt;/h3&gt;&#xA;&lt;p&gt;cannot import &amp;ldquo;main&amp;rdquo;&lt;/p&gt;&#xA;&lt;h3&gt;&lt;/h3&gt;&#xA;&lt;p&gt;At first glance, this doesn’t make much sense — after all, your code and tests are both in &lt;code&gt;package main&lt;/code&gt;. However, there’s a subtle interaction between how Go handles modules, packages, and test harnesses that causes this issue. Let’s walk through what’s actually happening.&lt;/p&gt;</description>
23+
<description>&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;&#xA;&lt;p&gt;If you’ve ever initialized a new Go project with &lt;code&gt;go mod init main&lt;/code&gt; and later tried to write tests for it, you may have seen this cryptic error:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;cannot import &amp;#34;main&amp;#34;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;At first glance, this doesn’t make much sense — after all, your code and tests are both in &lt;code&gt;package main&lt;/code&gt;. However, there’s a subtle interaction between how Go handles modules, packages, and test harnesses that causes this issue. Let’s walk through what’s actually happening.&lt;/p&gt;</description>
1724
</item>
1825
</channel>
1926
</rss>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
2+
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
3+
<channel>
4+
<title>Reverse Engineering on GeekyRyan</title>
5+
<link>http://localhost:1313/categories/reverse-engineering/</link>
6+
<description>Recent content in Reverse Engineering on GeekyRyan</description>
7+
<generator>Hugo</generator>
8+
<language>en</language>
9+
<lastBuildDate>Sun, 23 Nov 2025 16:01:00 +0000</lastBuildDate>
10+
<atom:link href="http://localhost:1313/categories/reverse-engineering/index.xml" rel="self" type="application/rss+xml" />
11+
<item>
12+
<title>Modify Machine Code in Executables</title>
13+
<link>http://localhost:1313/posts/2025-11-23-modify-machine-code/</link>
14+
<pubDate>Sun, 23 Nov 2025 16:01:00 +0000</pubDate>
15+
<guid>http://localhost:1313/posts/2025-11-23-modify-machine-code/</guid>
16+
<description>&lt;h1 id=&#34;modifying-machine-code-in-executables&#34;&gt;Modifying Machine Code in Executables&lt;/h1&gt;&#xA;&lt;p&gt;In this post, we’ll walk through a simple but fun reverse-engineering exercise: taking a compiled C program, locating the machine instructions responsible for printing characters, and modifying those bytes directly in the executable.&lt;/p&gt;&#xA;&lt;p&gt;This is a great way to build intuition around how compilers translate code, how functions map to assembly, and how tools like &lt;code&gt;objdump&lt;/code&gt; and &lt;code&gt;xxd&lt;/code&gt; help us inspect and patch binaries.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;the-source-program&#34;&gt;The Source Program&lt;/h2&gt;&#xA;&lt;p&gt;We’ll start with a minimal C program that prints &lt;code&gt;&amp;quot;ab\n&amp;quot;&lt;/code&gt;:&lt;/p&gt;</description>
17+
</item>
18+
</channel>
19+
</rss>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
2+
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
3+
<channel>
4+
<title>Systems on GeekyRyan</title>
5+
<link>http://localhost:1313/categories/systems/</link>
6+
<description>Recent content in Systems on GeekyRyan</description>
7+
<generator>Hugo</generator>
8+
<language>en</language>
9+
<lastBuildDate>Sun, 23 Nov 2025 16:01:00 +0000</lastBuildDate>
10+
<atom:link href="http://localhost:1313/categories/systems/index.xml" rel="self" type="application/rss+xml" />
11+
<item>
12+
<title>Modify Machine Code in Executables</title>
13+
<link>http://localhost:1313/posts/2025-11-23-modify-machine-code/</link>
14+
<pubDate>Sun, 23 Nov 2025 16:01:00 +0000</pubDate>
15+
<guid>http://localhost:1313/posts/2025-11-23-modify-machine-code/</guid>
16+
<description>&lt;h1 id=&#34;modifying-machine-code-in-executables&#34;&gt;Modifying Machine Code in Executables&lt;/h1&gt;&#xA;&lt;p&gt;In this post, we’ll walk through a simple but fun reverse-engineering exercise: taking a compiled C program, locating the machine instructions responsible for printing characters, and modifying those bytes directly in the executable.&lt;/p&gt;&#xA;&lt;p&gt;This is a great way to build intuition around how compilers translate code, how functions map to assembly, and how tools like &lt;code&gt;objdump&lt;/code&gt; and &lt;code&gt;xxd&lt;/code&gt; help us inspect and patch binaries.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;the-source-program&#34;&gt;The Source Program&lt;/h2&gt;&#xA;&lt;p&gt;We’ll start with a minimal C program that prints &lt;code&gt;&amp;quot;ab\n&amp;quot;&lt;/code&gt;:&lt;/p&gt;</description>
17+
</item>
18+
</channel>
19+
</rss>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
2+
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
3+
<channel>
4+
<title>Terraform on GeekyRyan</title>
5+
<link>http://localhost:1313/categories/terraform/</link>
6+
<description>Recent content in Terraform on GeekyRyan</description>
7+
<generator>Hugo</generator>
8+
<language>en</language>
9+
<lastBuildDate>Mon, 09 Jan 2023 00:00:00 +0000</lastBuildDate>
10+
<atom:link href="http://localhost:1313/categories/terraform/index.xml" rel="self" type="application/rss+xml" />
11+
<item>
12+
<title>Deploy Azure Kubernetes Service with NAT Gateway using Terraform</title>
13+
<link>http://localhost:1313/posts/2023-01-09-deploy-aks-with-nat-gateway-using-tf-copy/</link>
14+
<pubDate>Mon, 09 Jan 2023 00:00:00 +0000</pubDate>
15+
<guid>http://localhost:1313/posts/2023-01-09-deploy-aks-with-nat-gateway-using-tf-copy/</guid>
16+
<description>&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Azure NAT Gateway is a fully managed highly resilient NAT (Network Address Translation) service provided by Microsoft. After creating a NAT Gateway and then associating it with a subnet, all devices in that subnet will automatically route outbound traffic through the gateway. This is because NAT Gateway takes precedence over other outbound routing methods and replaces the default Internet destination of a subnet. However, the presence of custom UDRs for virtual appliances and ExpressRoute override NAT gateway for directing internet bound traffic (route to the 0.0.0.0/0 address prefix).&lt;/p&gt;</description>
17+
</item>
18+
</channel>
19+
</rss>

0 commit comments

Comments
 (0)