Skip to content

Instantly share code, notes, and snippets.

View PavelBlinnikov's full-sized avatar

Blinnikov Pavel PavelBlinnikov

  • Moscow
View GitHub Profile
@PavelBlinnikov
PavelBlinnikov / extract_vmkmod.py
Created October 13, 2026 13:42
Slopped script for extraction of /usr/lib/vmware/vmkmod from ESX depot zip
#!/usr/bin/env python3
"""Extract /usr/lib/vmware/vmkmod from an ESXi offline depot (.zip).
An offline bundle is a zip of VIB packages. Each VIB is an ar archive.
Bootbank payloads are gzip streams. Small driver VIBs gunzip to a VMware
visor tar (vmtar). The large esx-base tardisks (s, sb, vmx, vim) are
gzip around an xz stream, and that xz stream is the visor tar.
A visor header is a 512-byte ustar-style header with magic ``visor``.
Member bytes are not stored after each header. The uint32 at offset 0x1F0
@PavelBlinnikov
PavelBlinnikov / esxi_remake_gs.py
Created September 4, 2026 19:23
esxi_remake_gs.py
import idautils
import ida_bytes
import ida_idaapi
import ida_segment
from keystone import *
ks = Ks(KS_ARCH_X86, KS_MODE_64)
def create_gs_segment():
start = 0x41420000
@PavelBlinnikov
PavelBlinnikov / esxi_syscall_group.py
Last active October 24, 2026 14:06
esxi_syscall_group.py
def get_sysClasses():
groups = ["UserLinux_SyscallTable", "Linux64_SyscallTable", "UWVMKPrivateSyscall_HandlerTable", "UW64VMKPrivateSyscall_HandlerTable", "UWVMKSyscall_HandlerTable", "UW64VMKSyscall_HandlerTable"]
sysClasses = {0xffffffff: ["alwaysAllowSys", []]}
sysClasses_addr = ida_name.get_name_ea(idaapi.BADADDR, "sysClassIdentifiers")
i = 0
while True:
class_val = idc.get_strlit_contents(ida_bytes.get_qword(sysClasses_addr + i * 8))
if class_val is None:
@PavelBlinnikov
PavelBlinnikov / parse.py
Created December 23, 2021 15:56
Find all child SMI handlers in IDB
import idautils
def find():
guid = b'\xb7\xbf\xcc\xf4\xe0\xf6\xfdG\x9d\xd4\x10\xa8\xf1P\xc1\x91'
for i in range(ida_ida.inf_get_min_ea(), ida_ida.inf_get_max_ea(), 0x1000):
data = ida_bytes.get_bytes(i, 0x1000)
if guid in data:
return i+data.index(guid)
return False