Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SyscallGuard Plugin #7

Open
kiwidoggie opened this issue May 11, 2021 · 0 comments
Open

SyscallGuard Plugin #7

kiwidoggie opened this issue May 11, 2021 · 0 comments
Labels
Driver Kernel Kernel Code Development Plugins

Comments

@kiwidoggie
Copy link
Owner

kiwidoggie commented May 11, 2021

At this point a complete rewrite of the SyscallGuard system will need to be written. What is SyscallGuard you ask? This is something that will be enabled by default for Mira users that will prevent other code from calling arbitrary syscalls that could be used for escalation of privileged, effectively disabling syscall11 or sys_kexec.

This means that all usermode programs will not have the ability to execute code as kernel without going through the Mira device driver.

This will help to curve the malicious payloads that are currently available, and hopefully prevent people from bricking their units as often.

The way that the SyscallGuard plugin originally worked, which will need modification/variant.

  • Iterate through all of the syscalls
  • Hook all syscalls to jump to a common stub
  • Check the rax and other registers/stack for what was called, what the arguments are
  • Determine if the rax syscall number matches one we explicitly deny and handle accordingly.

BTW: All syscall error codes must be a positive error number. Returning a negative number causes the IOCTL handler to crash, just don't do it. Return proper error codes from errno.h.

@kiwidoggie kiwidoggie changed the title Fix SyscallGuard plugin SyscallGuard Plugin Oct 23, 2021
@kiwidoggie kiwidoggie added Driver Kernel Kernel Code Development labels Oct 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Driver Kernel Kernel Code Development Plugins
Projects
None yet
Development

No branches or pull requests

1 participant