Skip to content

Instantly share code, notes, and snippets.

View peta909's full-sized avatar
🏠
Working from home

Mark Lim peta909

🏠
Working from home
View GitHub Profile
@peta909
peta909 / PE PACKER
Created October 19, 2023 12:22 — forked from securitygab/PE PACKER
A simple x86 packer that uses APLib,
#########################################
# Created by @kuroi_dotsh - KuroiSH #
# Website: https://dengisan.nl/ #
# E-mail: [email protected] #
#########################################
;
; The executable is stored in the final section, so that it does not need
; relocations (as we can simply load it over our own headers and pad with
; virtualsize to keep our module running).
@icecr4ck
icecr4ck / idapython_cheatsheet.md
Last active November 14, 2024 03:57
Cheatsheet for IDAPython
@jthuraisamy
jthuraisamy / windows-toolkit.md
Last active April 12, 2022 20:00
Windows Toolkit

Windows Toolkit

Binary

Native Binaries

IDA Plugins Preferred Neutral Unreviewed

manual import resolution

example from 0f5d5d07c6533bc6d991836ce79daaa1:

_0:00F20012 33 D2                   xor     edx, edx
_0:00F20014 64 8B 52 30             mov     edx, fs:[edx+30h] // TEB->PEB
_0:00F20018 8B 52 0C                mov     edx, [edx+0Ch]    // PEB->LDR_DATA
_0:00F2001B 8B 52 14                mov     edx, [edx+14h]    // LDR_DATA->InMemoryOrderLinks (_LDR_DATA_TABLE_ENTRY)
                                                              // alt: 0xC: InLoadOrderLinks
 // alt: 0x1C: InInitializationOrderLinks
@hasherezade
hasherezade / main.cpp
Last active September 12, 2024 05:53
Get PEB64 from a WOW64 process
#include <Windows.h>
#include <iostream>
#include "ntdll_undoc.h"
PPEB get_default_peb()
{
#if defined(_WIN64)
return (PPEB)__readgsqword(0x60);
#else
@JamesPHoughton
JamesPHoughton / gist:0f4f269e93a2b85958d8
Created September 15, 2014 14:23
Recursively unpack zip files in python
from zipfile import ZipFile
def unpack_zip(zipfile='', path_from_local=''):
filepath = path_from_local+zipfile
extract_path = filepath.strip('.zip')+'/'
parent_archive = ZipFile(filepath)
parent_archive.extractall(extract_path)
namelist = parent_archive.namelist()
parent_archive.close()
for name in namelist: