Skip to content

Sysinject hacks#1283

Draft
ryandmaggio wants to merge 29 commits into
devfrom
sysinject_hacks
Draft

Sysinject hacks#1283
ryandmaggio wants to merge 29 commits into
devfrom
sysinject_hacks

Conversation

@ryandmaggio

Copy link
Copy Markdown
Contributor

Everything should be in order for 32 bit arm and x86 support. I left in the broken x86-64 code incase we want to do that in the future, so we have something to work off of, but I can remove it for neatness if need be.

let abe_callback = Callback::new();
abe_callback.after_block_exec(move |cpu, _, _| {
if panda::current_asid(cpu) == injected_asid {
if !panda::in_kernel_mode(cpu) {

@lacraig2 lacraig2 Feb 24, 2023

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ASID//PC pair?```suggestion
if !panda::in_kernel_mode(cpu) {

Comment thread panda/plugins/sysinject_rs/README.md Outdated
`sysinject` allows for the injection of syscalls into the guest at arbitrary points.

The function `inject_syscall` takes 4 arguments
1) `cpu`, the cpu state. This is standard for panda plugins.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check formatting on github.

@lacraig2

Copy link
Copy Markdown
Member

Check on MIPS issues

@ryandmaggio ryandmaggio marked this pull request as draft February 24, 2023 19:01
@ryandmaggio

Copy link
Copy Markdown
Contributor Author
  • add support for each syscall
  • edit inject_syscall to catch a flag for if the syscall returns
  • edit inject_syscall to be more discerning about when to do the callback
  • add more documentation

Comment thread panda/plugins/sysinject/src/lib.rs Outdated

#[panda::init]
fn init(_: &mut PluginHandle) -> bool {
#[cfg(any(feature = "x86_64", feature = "aarch64", feature = "mips64", feature = "mipsl"))]{

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mipsel?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this work for mipsel?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Classic mipsel misspell, oops

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants