Skip to content

Instantly share code, notes, and snippets.

@oopsmishap
oopsmishap / ZeusVM_Miasm.ipynb
Last active January 30, 2024 11:26
ZeusVM handler semantics extractor
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@oopsmishap
oopsmishap / ZeusVM_disassembler.py
Last active January 21, 2024 10:23
Disassmble ZeusVM VM Code to a readable format
from enum import Enum
class HandlerType(Enum):
Zero = 0
Shuffle = 1
Rc4 = 2
Imm = 3
RegReg = 4
RegImm = 5
Reg = 6
@oopsmishap
oopsmishap / ZeusVM_disassembly_to_C.py
Last active January 21, 2024 10:24
Transpile ZeusVM disassembly into valid C to compile
class ZeusVMToC:
def __init__(self, diasm_file, output_file=None):
self.diasm_file = diasm_file
self.output_file = output_file
self.line_num = 0
self.data_ptr_mov = 0
def tokenize(self):
with open(self.diasm_file, 'r') as f:
#pragma once
#include <memory>
#include <string>
#include <vector>
#include <fmt/core.h>
#include <stdexcept>
#include <zasm/zasm.hpp>
#include <windows.h>
@oopsmishap
oopsmishap / yara.cpp
Last active February 3, 2025 19:10
Yara Pattern Search
#include <vector>
#include <string_view>
#include <cstdint>
#include <cctype>
#include <limits>
#include <array>
namespace util
{
namespace detail
@oopsmishap
oopsmishap / tttlauncher.cpp
Last active January 28, 2025 21:46
TTDRecord Wrapper
#include <windows.h>
#include <stdio.h>
#include <wchar.h>
#include <Unknwn.h>
typedef enum _TTD_LOG_LEVEL
{
TTD_LOG_LEVEL_ERROR = 1,
TTD_LOG_LEVEL_WARNING,
TTD_LOG_LEVEL_INFO,