register_command("hide", "Unlink a process from ActiveProcessLinks.\n(usage: hide <pid|name>)", {"process"}, function(target)
if not target then
ntos.command_usage()
return
end
local p = ntos.process(target)
local apl = p.eprocess + ntos.offset_of("_EPROCESS", "ActiveProcessLinks")
local flink = ntos.read_qword(apl) local blink = ntos.read_qword(apl + 8)
ntos.write_qword(blink, flink) ntos.write_qword(flink + 8, blink) ntos.write_qword(apl, apl) ntos.write_qword(apl + 8, apl)
print(("hid %s (pid %d) from process list"):format(p.name, p.pid))
end)