# Run My Code! (code injection on Windows)

DevFeed: [Run My Code! (code injection on Windows)](<https://devfeed.tech/articles/run-my-code-code-injection-on-windows-39725.md>)

Original publisher: [Read original article](<https://www.timdbg.com/posts/run-my-code/>)

Author: Tim Misiak

Published: 2023-08-27T22:13:28Z

Content type: tutorial

Language: en

Sources: [TimDbg](<https://devfeed.tech/sources/timdbg.md>)

Topics: [Code](<https://devfeed.tech/topics/code.md>), [Processes](<https://devfeed.tech/topics/processes.md>), [Windows](<https://devfeed.tech/topics/windows.md>), [Programming](<https://devfeed.tech/topics/programming.md>)

Tags: [binaries](<https://devfeed.tech/tags/binaries.md>), [buffer-overflow](<https://devfeed.tech/tags/buffer-overflow.md>), [code](<https://devfeed.tech/tags/code.md>), [processes](<https://devfeed.tech/tags/processes.md>), [programming](<https://devfeed.tech/tags/programming.md>), [windbg](<https://devfeed.tech/tags/windbg.md>), [windows](<https://devfeed.tech/tags/windows.md>)

## AI overview

This article explains code injection on Windows, focusing on ways to run code inside another process without relying on a security vulnerability. It introduces static injection through patching, DLL injection, and dynamic code injection, and discusses drawbacks of modifying binaries on disk, including effects on repeated runs and code signing.

## Source excerpt

The first time I realized it was possible to get a process to run some extra little code I had written, it felt like the ultimate cheat code. My first attempt was a little patch for Civilization 2 to fix some high CPU usage. Then I discovered that you could inject code at run-time. And when I discovered the ability to change how OS functions worked, it started to feel like I could do anything!