Deny system call using ptrace
Stanislav Ochotnicky
stanislav.ochotnicky at kmit.sk
Sat Mar 31 23:01:13 UTC 2007
Hi,
I'm trying to create sort of user-space access control system based on
allowing/denying syscalls. I was able (after a few problems) to start
ptracing program, stop at every enter/exit from system call, inspect
arguments etc. What I'm however trying to do, is denying access to
syscalls. In linux I was able to do this by changing register eax to
SYS_getpid or other safe system call using ptrace(PT_SETREGS,..).
Problem is, that FreeBSD kernel seems to ignore changed register, and
execute original system call.
If I do PT_SETREGS and right after that PT_GETREGS, I can see that
register was changed, so that should be ok.
It is possible I'm missing something, or there is another option. I'd be
grateful for any advice or idea.
Thanks,
S.O.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20070331/5a49ab26/signature.pgp
More information about the freebsd-hackers
mailing list