Skip to content

Instantly share code, notes, and snippets.

View ewilded's full-sized avatar
🌴
On vacation

Julian Horoszkiewicz ewilded

🌴
On vacation
View GitHub Profile
#include <stdio.h>
#include <windows.h>
#include <conio.h>
#define HACKSYS_HEVD_IOCTL_STACK_OVERFLOW_GS CTL_CODE(FILE_DEVICE_UNKNOWN, 0x801, METHOD_NEITHER, FILE_ANY_ACCESS)
#define KTHREAD_OFFSET 0x124 // nt!_KPCR.PcrbData.CurrentThread
#define EPROCESS_OFFSET 0x050 // nt!_KTHREAD.ApcState.Process
#define PID_OFFSET 0x0B4 // nt!_EPROCESS.UniqueProcessId
#define FLINK_OFFSET 0x0B8 // nt!_EPROCESS.ActiveProcessLinks.Flink
@ewilded
ewilded / HEVD_fuzz
Created October 2, 2021 14:47
A sample application capable of interacting with the HEVD module, made for fuzzing/learning purposes
#include <stdio.h>
#include <windows.h>
#include <conio.h>
#define HACKSYS_HEVD_IOCTL_STACK_OVERFLOW CTL_CODE(FILE_DEVICE_UNKNOWN, 0x800, METHOD_NEITHER, FILE_ANY_ACCESS)
#define HACKSYS_HEVD_IOCTL_STACK_OVERFLOW_GS CTL_CODE(FILE_DEVICE_UNKNOWN, 0x801, METHOD_NEITHER, FILE_ANY_ACCESS)
#define KTHREAD_OFFSET 0x124 // nt!_KPCR.PcrbData.CurrentThread
#define EPROCESS_OFFSET 0x050 // nt!_KTHREAD.ApcState.Process
#define PID_OFFSET 0x0B4 // nt!_EPROCESS.UniqueProcessId
#define FLINK_OFFSET 0x0B8 // nt!_EPROCESS.ActiveProcessLinks.Flink
#define TOKEN_OFFSET 0x0F8 // nt!_EPROCESS.Token
@ewilded
ewilded / PE_parse_and_catalog.py
Last active September 18, 2021 15:49
Import_Table_catalog
import sqlite3
import argparse
import os
import subprocess
import re
# This script iterates over all executable files within given directory (e.g. C:\Windows, C:\Program Files)
# and runs `rabin2 -i EXEPATH` in order to obtain its import table, then saves the import table into the database (SQLite).
# We will use this database later for further analysis purposes.
package burp;
import java.util.Random;
public class BuildUnencodedRequest
{
private Random random = new Random();
private IExtensionHelpers helpers;
BuildUnencodedRequest(IExtensionHelpers helpers)
@ewilded
ewilded / spectre.c
Created January 5, 2018 08:27 — forked from rootkea/spectre.c
PoC from Spectre Attacks: Exploiting Speculative Execution (https://spectreattack.com/spectre.pdf)
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#ifdef _MSC_VER
#include <intrin.h> /* for rdtscp and clflush */
#pragma optimize("gt",on)
#else
#include <x86intrin.h> /* for rdtscp and clflush */
#endif