Skip to content

Instantly share code, notes, and snippets.

@CreateRemoteThread
Created May 1, 2017 16:42
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 CreateRemoteThread/06100cfcf80d1e6a0a4e08662149984a to your computer and use it in GitHub Desktop.
Save CreateRemoteThread/06100cfcf80d1e6a0a4e08662149984a to your computer and use it in GitHub Desktop.
#!/usr/bin/python
import base64
from Crypto.Cipher import AES
from Crypto import Random
BS = 16
pad = lambda s: s + (BS - len(s) % BS) * chr(BS - len(s) % BS)
unpad = lambda s : s[:-ord(s[len(s)-1:])]
class AESCipher:
def __init__( self, key, iv ):
self.key = key
self.iv = iv
def encrypt( self, raw ):
raw = pad(raw)
cipher = AES.new( self.key, AES.MODE_CBC, self.iv )
return base64.b64encode( cipher.encrypt( raw ) )
def decrypt( self, enc ):
enc = base64.b64decode(enc)
cipher = AES.new(self.key, AES.MODE_CBC, self.iv )
return cipher.decrypt( enc )
if __name__ == "__main__":
AES_STATICKEY = "\x3E\x4F\x56\x12\xEF\x64\x30\x59\x55\xD5\x43\xB0\xAE\x35\x08\x80"
AES_STATIC_IV = "\x80\x49\xE9\x10\x25\xA6\xB5\x48\x76\xC3\xB4\x86\x80\x90\xD3\xFC"
aes = AESCipher(AES_STATICKEY,AES_STATIC_IV)
print "Huawei Backdoor PW Hash: " + aes.decrypt("iLRV9ZMDUlwynR7IWKetzNBUdwy7PliQKJMauZ8dNtPr457Z1RA2CTwo+fQ8Mmz1SirjyLuutbbHIaHFP9uhh4bwOjg7Tj5/Bi61UzK/Qcc=")
print "Huawei Secondary Backdoor Hash: " + aes.decrypt("RVZJBgsF3YFR1r4q6ckTN3pJGjI4k75hp4RJl/ObngFggRNESQhA4VAdEoEoipKwYx28IuwGhpxTZvneMbj9bw2TPL3cSKCL9d7u4/ov/rA=")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment