RF 结果代码很可能是由于文件操作的意外系统调用(即 SYS_open()、SYS_close()、SYS_stat()、...)。当(1)目标程序实际执行文件操作时,和(或)当(2)它被动态链接并需要在运行时加载 .so 库时,就会发生这种情况。由于你的目标程序不调用文件操作,所以属于后一种情况。
然后,要解决 RF 结果,要么,
statically link the target program to avoid dependencies on shared libraries; or,
extend the policy rules in the wrapper script to handle relevant SYSCALL / SYSRET events;
对于静态链接系统调用,我们使用 ex 0,1,2 3-sys_read 1-sys_exit 等的系统调用代码通过链接获取更多详细信息链接以获取系统调用列表的代码:
http://docs.cs.up。 ac.za/programming/asm/derick_tut/syscalls.html
我改变这个:
x86_64=set([0,1,5,8,9,10,11,12,16,21,25,63,89,158,219,231])
为了这:
x86_64=set([0,1,2,3,4,5,8,9,10,11,12,16,21,25,63,89,158,219,231,])
在 sample2.py 中,它可以工作。
修改后的 sample2.py 可在我的 github 存储库链接中找到:
https ://github.com/palashmaran/libsandbox.git