Skip to content

Instantly share code, notes, and snippets.

#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,
@oopsmishap
oopsmishap / yara.cpp
Last active October 29, 2024 22:18
Yara Pattern Search
#include <vector>
#include <string_view>
#include <cstdint>
#include <cctype>
#include <limits>
#include <array>
namespace util
{
namespace detail
#pragma once
#include <memory>
#include <string>
#include <vector>
#include <fmt/core.h>
#include <stdexcept>
#include <zasm/zasm.hpp>
#include <windows.h>
@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:
@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_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 / _jmp_deobfuscator.md
Last active June 27, 2024 07:44
IDA Jmp Deobfuscation Script
@oopsmishap
oopsmishap / pxor_string_decrypt_wip.py
Last active November 26, 2023 22:19
WIP: pxor string via janky emulation
import time
from typing import List
import pefile
from capstone import *
from capstone.x86 import *
import re
import struct
# SAMPLE_PATH = 'bin/enc_string_test.bin32'
SAMPLE_PATH = 'bin/2cd2f077ca597ad0ef234a357ea71558d5e039da9df9958d0b8bd0efa92e74c9.bin32'
#pragma once
#include <stdint.h>
#include "win_helper.h"
namespace poc_kit
{
namespace pattern
{
@oopsmishap
oopsmishap / _hellowrold.ipynb
Last active May 28, 2023 22:20
hellowrold malware
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.