Skip to content

Instantly share code, notes, and snippets.

View alexander-hanel's full-sized avatar
😶

Alexander Hanel alexander-hanel

😶
View GitHub Profile
@alexander-hanel
alexander-hanel / dll_exports.py
Last active November 1, 2023 20:57 — forked from OALabs/dll_exports.py
Build dictionary of DLL exports (Windows API Names)
import os
import pefile
import json
INTERESTING_DLLS = [
'kernel32.dll', 'comctl32.dll', 'advapi32.dll', 'comdlg32.dll',
'gdi32.dll', 'msvcrt.dll', 'netapi32.dll', 'ntdll.dll',
'ntoskrnl.exe', 'oleaut32.dll', 'psapi.dll', 'shell32.dll',
'shlwapi.dll', 'srsvc.dll', 'urlmon.dll', 'user32.dll',
@alexander-hanel
alexander-hanel / EXAMPLE.md
Created January 4, 2024 18:10
Open cmd as Admin

from cmd or Run

powershell -Command "Start-Process cmd -Verb RunAs"
@alexander-hanel
alexander-hanel / example.py
Created February 12, 2024 23:29
A hackish way to extract arguments passed to a function from hex-rays decompiler output
import idautils
ea = 0x000000140013188
name = ida_name.get_ea_name(ea)
print("found")
# get xrefs to function
xrefs = [x for x in idautils.CodeRefsTo(ea, 0)]
for func in xrefs: