|
1 | 1 | package main |
2 | 2 |
|
3 | 3 | import ( |
4 | | - "fmt" |
5 | | - "os" |
6 | | - // Anti-Virtualization |
7 | | - "github.com/EvilBytecode/GoDefender/AntiVirtualization/TriageDetection" |
8 | | - "github.com/EvilBytecode/GoDefender/AntiVirtualization/MonitorMetrics" |
9 | | - "github.com/EvilBytecode/GoDefender/AntiVirtualization/VirtualboxDetection" |
10 | | - "github.com/EvilBytecode/GoDefender/AntiVirtualization/VMWareDetection" |
11 | | - "github.com/EvilBytecode/GoDefender/AntiVirtualization/KVMCheck" |
12 | | - "github.com/EvilBytecode/GoDefender/AntiVirtualization/UsernameCheck" |
13 | | - "github.com/EvilBytecode/GoDefender/AntiVirtualization/USBCheck" |
14 | | - "github.com/EvilBytecode/GoDefender/AntiVirtualization/RecentFileActivity" |
15 | | - |
16 | | - |
17 | | - // Anti-Debug |
18 | | - "github.com/EvilBytecode/GoDefender/AntiDebug/IsDebuggerPresent" |
19 | | - "github.com/EvilBytecode/GoDefender/AntiDebug/RemoteDebugger" |
20 | | - "github.com/EvilBytecode/GoDefender/AntiDebug/pcuptime" |
21 | | - "github.com/EvilBytecode/GoDefender/AntiDebug/CheckBlacklistedWindowsNames" |
22 | | - "github.com/EvilBytecode/GoDefender/AntiDebug/RunningProcesses" |
23 | | - //"github.com/EvilBytecode/GoDefender/AntiDebug/ParentAntiDebug" |
24 | | - "github.com/EvilBytecode/GoDefender/AntiDebug/KillBadProcesses" |
25 | | - "github.com/EvilBytecode/GoDefender/AntiDebug/UserAntiAntiDebug" |
26 | | - "github.com/EvilBytecode/GoDefender/AntiDebug/InternetCheck" |
27 | | - |
28 | | - // Process Related |
29 | | - //"github.com/EvilBytecode/GoDefender/Process/CriticalProcess" |
| 4 | + "log" |
| 5 | + |
| 6 | + // AntiDebug |
| 7 | + "GoDefenderREWRITE/AntiDebug/CheckBlacklistedWindowsNames" |
| 8 | + "GoDefenderREWRITE/AntiDebug/InternetCheck" |
| 9 | + "GoDefenderREWRITE/AntiDebug/IsDebuggerPresent" |
| 10 | + "GoDefenderREWRITE/AntiDebug/KillBadProcesses" |
| 11 | + "GoDefenderREWRITE/AntiDebug/ParentAntiDebug" |
| 12 | + "GoDefenderREWRITE/AntiDebug/RunningProcesses" |
| 13 | + "GoDefenderREWRITE/AntiDebug/RemoteDebugger" |
| 14 | + "GoDefenderREWRITE/AntiDebug/pcuptime" |
| 15 | + |
| 16 | + // AntiVirtualization |
| 17 | + "GoDefenderREWRITE/AntiVirtualization/KVMCheck" |
| 18 | + "GoDefenderREWRITE/AntiVirtualization/MonitorMetrics" |
| 19 | + "GoDefenderREWRITE/AntiVirtualization/RecentFileActivity" |
| 20 | + "GoDefenderREWRITE/AntiVirtualization/TriageDetection" |
| 21 | + "GoDefenderREWRITE/AntiVirtualization/UsernameCheck" |
| 22 | + "GoDefenderREWRITE/AntiVirtualization/VirtualboxDetection" |
| 23 | + "GoDefenderREWRITE/AntiVirtualization/VMWareDetection" |
30 | 24 | ) |
31 | 25 |
|
32 | 26 | func main() { |
33 | | - /* |
34 | | - ANTIDEBUG |
35 | | - ----------- |
36 | | - - IsDebuggerPresent |
37 | | - - RemoteDebugger |
38 | | - - PC Uptime Check |
39 | | - - Running Proccesses Count |
40 | | - - Check blacklisted windows |
41 | | - - KillBlacklisted Proceseses |
42 | | - - Parent AntiDebug |
43 | | - */ |
44 | | - RecentFileActivity.RecentFileActivityCheck() |
45 | | - USBCheck.PluggedIn() |
46 | | - userantiantidebug.AntiAntiDebug() |
47 | | - IsDebuggerPresent.IsDebuggerPresent() |
48 | | - remotedebuggercheck.RemoteDebugger() |
49 | | - pcuptime.CheckUptime(1200) |
50 | | - runningprocesses.CheckRunningProcessesCount(50) |
51 | | - blacklistcheck.CheckBlacklistedWindows() |
52 | | - //parentantidebug.ParentAntiDebug() |
53 | | - processkiller.KillProcesses() |
54 | | - |
55 | | - /* |
56 | | - AntiVirulization |
57 | | - ---------------- |
58 | | - - Triage Check |
59 | | - - VMWare Check |
60 | | - - Anti KVM |
61 | | - - Username Check |
62 | | - - |
63 | | - */ |
64 | | - |
65 | | - InternetCheck.CheckConnection() |
66 | | - triagecheck.TriageCheckDebug() |
67 | | - MonitorMetrics.IsScreenSmall() |
68 | | - VirtualboxDetection.GraphicsCardCheck() |
69 | | - fmt.Println("Debug Check: VirtualBox isnt present") |
70 | | - VMWare.GraphicsCardCheck() |
71 | | - fmt.Println("Debug Check: VMWare isnt present") |
72 | | - if kvmcheck.CheckForKVM() { |
73 | | - os.Exit(-1) |
| 27 | + // AntiDebug checks |
| 28 | + if connected, _ := InternetCheck.CheckConnection(); connected { |
| 29 | + log.Println("[DEBUG] Internet connection is present") |
| 30 | + } else { |
| 31 | + log.Println("[DEBUG] Internet connection isn't present") |
| 32 | + } |
| 33 | + |
| 34 | + if parentAntiDebugResult := ParentAntiDebug.ParentAntiDebug(); parentAntiDebugResult { |
| 35 | + log.Println("[DEBUG] ParentAntiDebug check failed") |
| 36 | + } else { |
| 37 | + log.Println("[DEBUG] ParentAntiDebug check passed") |
| 38 | + } |
| 39 | + |
| 40 | + if runningProcessesCountDetected, _ := RunningProcesses.CheckRunningProcessesCount(50); runningProcessesCountDetected { |
| 41 | + log.Println("[DEBUG] Running processes count detected") |
| 42 | + } else { |
| 43 | + log.Println("[DEBUG] Running processes count passed") |
| 44 | + } |
| 45 | + |
| 46 | + if pcUptimeDetected, _ := pcuptime.CheckUptime(1200); pcUptimeDetected { |
| 47 | + log.Println("[DEBUG] PC uptime detected") |
| 48 | + } else { |
| 49 | + log.Println("[DEBUG] PC uptime passed") |
| 50 | + } |
| 51 | + |
| 52 | + KillBadProcesses.KillProcesses() |
| 53 | + CheckBlacklistedWindowsNames.CheckBlacklistedWindows() |
| 54 | + // Other AntiDebug checks |
| 55 | + if isDebuggerPresentResult := IsDebuggerPresent.IsDebuggerPresent1(); isDebuggerPresentResult { |
| 56 | + log.Println("[DEBUG] Debugger presence detected") |
| 57 | + } else { |
| 58 | + log.Println("[DEBUG] Debugger presence passed") |
| 59 | + } |
| 60 | + |
| 61 | + if remoteDebuggerDetected, _ := RemoteDebugger.RemoteDebugger(); remoteDebuggerDetected { |
| 62 | + log.Println("[DEBUG] Remote debugger detected") |
| 63 | + } else { |
| 64 | + log.Println("[DEBUG] Remote debugger passed") |
| 65 | + } |
| 66 | + ////////////////////////////////////////////////////// |
| 67 | + |
| 68 | + // AntiVirtualization checks |
| 69 | + if recentFileActivityDetected, _ := RecentFileActivity.RecentFileActivityCheck(); recentFileActivityDetected { |
| 70 | + log.Println("[DEBUG] Recent file activity detected") |
| 71 | + } else { |
| 72 | + log.Println("[DEBUG] Recent file activity passed") |
| 73 | + } |
| 74 | + |
| 75 | + if vmwareDetected, _ := VMWareDetection.GraphicsCardCheck(); vmwareDetected { |
| 76 | + log.Println("[DEBUG] VMWare detected") |
| 77 | + } else { |
| 78 | + log.Println("[DEBUG] VMWare passed") |
| 79 | + } |
| 80 | + |
| 81 | + if virtualboxDetected, _ := VirtualboxDetection.GraphicsCardCheck(); virtualboxDetected { |
| 82 | + log.Println("[DEBUG] Virtualbox detected") |
| 83 | + } else { |
| 84 | + log.Println("[DEBUG] Virtualbox passed") |
| 85 | + } |
| 86 | + |
| 87 | + if kvmDetected, _ := KVMCheck.CheckForKVM(); kvmDetected { |
| 88 | + log.Println("[DEBUG] KVM detected") |
| 89 | + } else { |
| 90 | + log.Println("[DEBUG] KVM passed") |
74 | 91 | } |
75 | | - usernamecheck.CheckForBlacklistedNames() |
76 | | - fmt.Println("IF YOURE HERE YOU PASSED LOL") |
77 | | - /* |
78 | | - EXTRA THINGS NOW: |
79 | | - */ |
80 | | - //programutils.SetDebugPrivilege() this is for devs who plan on continuing |
81 | | - //programutils.SetProcessCritical() // this automatically gets the SeDebugPrivillige |
82 | | - fmt.Scanln() |
| 92 | + |
| 93 | + if blacklistedUsernameDetected := UsernameCheck.CheckForBlacklistedNames(); blacklistedUsernameDetected { |
| 94 | + log.Println("[DEBUG] Blacklisted username detected") |
| 95 | + } else { |
| 96 | + log.Println("[DEBUG] Blacklisted username passed") |
| 97 | + } |
| 98 | + |
| 99 | + if triageDetected, _ := TriageDetection.TriageCheck(); triageDetected { |
| 100 | + log.Println("[DEBUG] Triage detected") |
| 101 | + } else { |
| 102 | + log.Println("[DEBUG] Triage passed") |
| 103 | + } |
| 104 | + if isScreenSmall, _ := MonitorMetrics.IsScreenSmall(); isScreenSmall { |
| 105 | + log.Println("[DEBUG] Screen size is small") |
| 106 | + } else { |
| 107 | + log.Println("[DEBUG] Screen size is not small") |
| 108 | + } |
| 109 | + |
| 110 | + // Continue with other checks... (you can add ones related to critical process or sedebugprivvilege) |
83 | 111 | } |
0 commit comments