Skip to content

Commit 78bbda2

Browse files
committed
readme changes
1 parent e925dab commit 78bbda2

File tree

1 file changed

+32
-4
lines changed

1 file changed

+32
-4
lines changed

README.md

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,39 @@
11
# Go-win-process-injector
22

33
## Description
4-
During my researches on process injection in Go, i have only found shellcode injections. But, in my case, I needed to include complex code in the process i was injecting into without instability linked to my action.
4+
This program is highly configurable process injector made in Go that can run both in interactive mode or as a Windows Service.
55

6-
This complex code was compiled in a Go DLL. However, Go does not incorporate logic similar to DllMain to allow direct execution of a function once the code has been injected. This program therefore takes care of finding the address of the target function and then executing it in the context of the process where the injection took place.
6+
This project was born when during my researches on process injections in Go. I needed to execute complex code made in Go with a DLL injection but Go does not incorporate logic similar to DllMain to allow direct execution once the code has been injected. This injector takes care of finding the address of the target function and then executing it in the context of the process where the injection took place.
77

8-
## Instruction, example and sequence of the injection
8+
## Compilation
9+
* Install golang latest version [here](https://go.dev/)
10+
* compile to exe with `go build -ldflags "-s -w" .`
11+
12+
## YAML Config File example
13+
```
14+
injector_log_level: "LOGLEVEL_INFO" # use LOGLEVEL_DEBUG for a verbose logging
15+
injector_log_file: "C:\\Windows\\Temp\\goprocinjector.log" # let blank if you don't want to log in a file
16+
process_injections: # add your DLL injection as a list like in this example
17+
- name: "ClipboardMonitor_WebBrowser"
18+
processes:
19+
- "firefox.exe"
20+
- "chrome.exe"
21+
process_injection_dll_path: "C:\\Users\\shado\\Desktop\\clipboardMonitor\\ClipboardMonitor.dll"
22+
process_injection_dll_function: "ClipboardMonitor"
23+
process_injection_refresh_interval: 5
24+
- name: "ClipboardMonitor_Explorer"
25+
processes:
26+
- "explorer.exe"
27+
process_injection_dll_path: "C:\\Users\\shado\\Desktop\\clipboardMonitor\\ClipboardMonitor.dll"
28+
process_injection_dll_function: "ClipboardMonitor"
29+
process_injection_refresh_interval: 30
30+
```
31+
32+
## Execution
33+
* Just launch executable with `goprocinjector.exe -c "C:\\Path\\To\\Your\\goprocinjector.yaml"`
34+
* You can also register it as a windows service with `sc ceate` if your want a permanent execution at Windows startup
35+
36+
## Injection code details
937

1038
Quick and easy way:
1139
* Use injectInProcess() to inject in the specified PID and call any selected function inside the memory space of this process
@@ -17,7 +45,7 @@ If you want more details on how it works:
1745
* findSymbolRVA() identify the relative virtual address of your function in the dll
1846
* Finally, callRemoteFunction() execute it in a new thread of your target PID
1947

20-
Process output:
48+
## Process output:
2149
```
2250
[INFO] Starting process injection...
2351
[INFO] Found process: Notepad.exe (PID: 17472)

0 commit comments

Comments
 (0)