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

Method Detach

TestConsole/Helper/ProcessList.cs:129–159  ·  view source on GitHub ↗

Detaches r77 from the specified process. The process to detach. , if this process was detached successfully; otherwise, .

(ProcessModel process)

Source from the content-addressed store, hash-verified

127 /// otherwise, <see langword="false" />.
128 /// </returns>
129 public static async Task<bool> Detach(ProcessModel process)
130 {
131 return await Task.Run(() =>
132 {
133 if (!ProcessEx.IsRunning(process.Id))
134 {
135 Log.Warning(
136 new LogFileItem(process.Name),
137 new LogTextItem($"(PID {process.Id}) is no longer running.")
138 );
139 return false;
140 }
141
142 if (!HelperDll.Detach(process.Id))
143 {
144 Log.Warning(
145 new LogTextItem("Detaching from"),
146 new LogFileItem(process.Name),
147 new LogTextItem($"(PID {process.Id}) failed.")
148 );
149 return false;
150 }
151
152 Log.Information(
153 new LogTextItem("Detached from"),
154 new LogFileItem(process.Name),
155 new LogTextItem($"(PID {process.Id}).")
156 );
157 return true;
158 });
159 }
160 /// <summary>
161 /// Injects all processes with the r77 DLL using reflective DLL injection.
162 /// </summary>

Callers

nothing calls this directly

Calls 2

WarningMethod · 0.80
InformationMethod · 0.80

Tested by

no test coverage detected