Lines Matching refs:process
158 uint8_t ReadChildByte(const pid_t process, const uintptr_t address) { in ReadChildByte() argument
159 uintptr_t data = ptrace(PTRACE_PEEKDATA, process, address, nullptr); in ReadChildByte()
163 void WriteChildByte(const pid_t process, const uintptr_t address, in WriteChildByte() argument
168 uintptr_t data = ptrace(PTRACE_PEEKDATA, process, address, nullptr); in WriteChildByte()
170 ptrace(PTRACE_POKEDATA, process, address, data); in WriteChildByte()
173 void ReadChildMemory(const pid_t process, uintptr_t process_address, in ReadChildMemory() argument
176 *bytes = ReadChildByte(process, process_address); in ReadChildMemory()
180 void WriteChildMemory(const pid_t process, uintptr_t process_address, in WriteChildMemory() argument
183 WriteChildByte(process, process_address, *bytes); in WriteChildMemory()
202 bool ExecuteShellCode(const pid_t process, const uint8_t* shell_code, in ExecuteShellCode() argument
208 ptrace(PTRACE_GETREGSET, process, 1, ®isters_iovec); in ExecuteShellCode()
211 ReadChildMemory(process, PROGRAM_COUNTER(registers), memory_backup.get(), in ExecuteShellCode()
213 WriteChildMemory(process, PROGRAM_COUNTER(registers), shell_code, in ExecuteShellCode()
217 ptrace(PTRACE_CONT, process, NULL, NULL); in ExecuteShellCode()
219 waitpid(process, &status, 0); in ExecuteShellCode()
225 ptrace(PTRACE_SETREGSET, process, 1, ®isters_iovec); in ExecuteShellCode()
226 WriteChildMemory(process, PROGRAM_COUNTER(registers), memory_backup.get(), in ExecuteShellCode()