MCPcopy Create free account
hub / github.com/bytecode77/r77-rootkit / DetachAll

Method DetachAll

TestConsole/Helper/ProcessList.cs:200–230  ·  view source on GitHub ↗

Detaches r77 from all running processes.

()

Source from the content-addressed store, hash-verified

198 /// Detaches r77 from all running processes.
199 /// </summary>
200 public static async Task DetachAll()
201 {
202 await Task.Run(() =>
203 {
204 int injectedCount = GetInjectedCount();
205
206 if (injectedCount == 0)
207 {
208 Log.Information(new LogTextItem("No processes are injected."));
209 return;
210 }
211
212 if (!HelperDll.DetachAll())
213 {
214 Log.Error(new LogTextItem("Detaching processes failed."));
215 return;
216 }
217
218 int newInjectedCount = GetInjectedCount();
219
220 if (newInjectedCount < injectedCount)
221 {
222 Log.Information(new LogTextItem($"Detached from {injectedCount - newInjectedCount} processes."));
223 }
224
225 if (newInjectedCount > 0)
226 {
227 Log.Warning(new LogTextItem($"{newInjectedCount} processes could not be detached."));
228 }
229 });
230 }
231 /// <summary>
232 /// Hides a process ID by entering the PID into the r77 configuration system.
233 /// </summary>

Callers

nothing calls this directly

Calls 3

InformationMethod · 0.80
ErrorMethod · 0.80
WarningMethod · 0.80

Tested by

no test coverage detected