Executable and Linkable Format (ELF), is the default binary format on Linux-based systems.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#ifdef _WIN64 | |
#define DECLARE_STRING(var, str) __attribute__((section(".text"))) char var[] = "\xe8\x00\x00\x00\x00\x58\x48\x83\xc0\x06\xc3" str; | |
#elif _WIN32 | |
#define DECLARE_STRING(var, str) __attribute__((section(".text"))) char var[] = "\xe8\x00\x00\x00\x00\x58\x83\xc0\x05\xc3" str; | |
#endif | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
IDA plugin to display the calls and strings referenced by a function as hints. | |
Installation: put this file in your %IDADIR%/plugins/ directory. | |
Author: Willi Ballenthin <william.ballenthin@fireeye.com> | |
Licence: Apache 2.0 | |
''' | |
import idc | |
import idaapi | |
import idautils |
theme | class | highlighter | fonts | ||||||
---|---|---|---|---|---|---|---|---|---|
default |
text-center |
MaskRay |
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef struct _STARTUPINFOW { | |
UINT32 cb; | |
LPWSTR lpReserved; | |
LPWSTR lpDesktop; | |
LPWSTR lpTitle; | |
UINT32 dwX; | |
UINT32 dwY; | |
UINT32 dwXSize; | |
UINT32 dwYSize; | |
UINT32 dwXCountChars; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Requirements: | |
# clang - The classes/structs you want to dump must be used in code at least once, not just defined. | |
# MSVC - The classes/structs you want to dump must have "MEOW" in the name for "reportSingleClass" to work. | |
# Usage: | |
# $ make dump_vtables file=test.cpp | |
dump_vtables: | |
clang -cc1 -fdump-record-layouts -emit-llvm $(file) > clang-vtable-layout-$(file).txt | |
clang -cc1 -fdump-vtable-layouts -emit-llvm $(file) > clang-record-layout-$(file).txt | |
g++ -fdump-lang-class=$(file).txt $(file) | |
cl.exe $(file) /d1reportSingleClassLayoutMEOW > msvc-single-class-vtable-layout-$(file).txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const std::uint64_t current_thread = reinterpret_cast<std::uint64_t>(current_thread); | |
*reinterpret_cast<ULONG*>(current_thread + 0x560) = FALSE; // this offset is for my OS version which is windows 11 23h2, you can get offsets at https://www.vergiliusproject.com/ | |
dbg("thread dbg status %i\n", PsIsThreadTerminating(current_thread)); | |
//now the 1line version (meme): | |
*reinterpret_cast<ULONG*>(reinterpret_cast<std::uint64_t>(KeGetCurrentThread()) + 0x560) = FALSE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// you can hook syscalls without triggering KPP or PG, that's just a project for fun | |
PVOID DisgustingPatchGuard = Utils::FindPatternImage( KBase, "\x40\x53\x48\x83\xEC\x30\x8B\x41\x18" ); | |
if ( !DisgustingPatchGuard ) | |
{ | |
Utils::ThrowException( _( "C4GE: FAILED TO FIND PATCHGUARD INITIALIZATION CONTEXT" ) ); | |
return STATUS_INVALID_ADDRESS; | |
} | |
DisgustingPatchGuard = RVA( DisgustingPatchGuard, 7 ); | |
if ( !DisgustingPatchGuard ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
rm -rf CMake* | |
export NDK=/home/syoyo/local/android-ndk-r10e | |
export SYSROOT=$NDK/platforms/android-21/arch-arm64 | |
export CC="$NDK/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-gcc" | |
export CXX="$NDK/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-g++" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# script that creates clang/llvm cross toolchain for aarch64 android target | |
# compile a hello world program that runs on AOSP Android: | |
# test with: adb push hello /data/cache && adb shell /data/cache/hello | |
# GCC: | |
# C: aarch64-linux-android-gcc hello.c -o hello -pie | |
# C++: aarch64-linux-android-g++ hello.cc -o hello -pie -fPIC -static-libgcc \ | |
# -nostdlib -L/usr/local/aarch64-linux-android/lib -lc++ -lc -nostdinc++ \ | |
# -I/usr/local/aarch64-linux-android/include/c++/v1 -std=c++11 | |
# Clang/LLVM: |
NewerOlder