Files
f126227d86 linux: Re-engineer injector
- Move to a fully asynchronous design, without any dangerous blocking
  calls. We are now able to process other events in the meantime, and
  also implement a failsafe timeout when waiting for signals.
- Move to helpers written in C instead of using Gum's CodeWriter APIs at
  runtime. In this way we make the injector easier to understand while
  also being able to handle increasingly complex targets.
- Support injection into containers, such as Flatpak apps.
- Support injection into processes without a dynamic linker present,
  such as programs built with "-static". This is for now an experimental
  feature.
- Have injector provide a control channel. In this way we can simplify
  payloads and take advantage of heavy lifting already done by the
  injector. The plan is to implement this in the other backends too, so
  we can expose this in our public API.
- Make use of memfd to avoid temporary files, when the kernel is recent
  enough.
- Optionally make use of pidfd to extract file-descriptor in situations
  where the target process cannot reach our abstract UNIX domain socket.
- Wait for system calls in parallel.

Co-authored-by: Håvard Sørbø <[email protected]>
Co-authored-by: Josiah <[email protected]>
2023-04-13 15:33:28 +02:00

23 lines
460 B
Python
Executable File

#!/usr/bin/env python3
import pexpect
import shlex
import sys
def run(arch: str, args: [str]):
child = pexpect.spawn("arm_now", ["start", arch, "--sync"])
child.expect("buildroot login: ")
child.sendline("root")
child.expect("# ")
child.sendline(shlex.join(["/root/frida-tests"] + args))
child.interact()
if __name__ == "__main__":
arch = sys.argv[1]
args = sys.argv[2:] if len(sys.argv) >= 3 else []
run(arch, args)