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 <wdm.h> | |
__declspec(dllexport) | |
__declspec(noinline) | |
void* | |
GetNtoskrnlBaseAddress() | |
{ | |
// | |
// From Windows Internals part 1, chapter 2: | |
// |
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
#ifndef MBEDTLS_CONFIG_H | |
#define MBEDTLS_CONFIG_H | |
#define MBEDTLS_PLATFORM_C | |
#define MBEDTLS_GCM_C | |
#define MBEDTLS_PKCS1_V15 | |
#define MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED | |
#define MBEDTLS_SSL_PROTO_TLS1_2 | |
#define MBEDTLS_AES_C | |
#define MBEDTLS_ASN1_PARSE_C |
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
#!python3 | |
import struct | |
import binascii | |
import hashlib | |
def resumable_sha256(message_with_pad: bytes, state: [int]) -> str: | |
""" | |
Modified implementation of sha256 that allows resuming from arbitrary hash state. The original sha256 hashing state |
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
.386 | |
.model flat | |
extern _IsDebuggerPresentProxy@0:proc | |
public __imp__IsDebuggerPresent@0 | |
public _IsDebuggerPresent@0 | |
.data |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
A script to get the version of Python by which the file was compiled | |
""" | |
from __future__ import print_function | |
import binascii | |
import os |
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
# CMakeLists.txt | |
cmake_minimum_required(VERSION 3.0) | |
project(example) | |
set(CMAKE_CXX_STANDARD 11) | |
find_package(SDL2 REQUIRED) | |
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") | |
set(CMAKE_COMPILER_IS_CLANGCXX 1) | |
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
// | |
// sysenter/KiFastCallEntry/IA32_SYSENTER_EIP hooking driver | |
// | |
// Barakat Soror (https://twitter.com/barakatsoror) | |
// | |
#include <wdm.h> | |
#include <intrin.h> | |
#ifndef _X86_ |
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 <wdm.h> | |
#include <ntddkbd.h> | |
// | |
// Per-device object extension | |
// | |
typedef struct _DEVICE_EXTENSTION | |
{ | |
// | |
// Driver must not be deleted as long as there is a pending IRP |
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
cl /MT /LD winmm.c User32.lib Advapi32.lib | |
mkdir "\\?\C:\Windows " | |
mkdir "\\?\C:\Windows \System32" | |
copy "C:\Windows\System32\WinSAT.exe" "C:\Windows \System32\" | |
copy "winmm.dll" "C:\Windows \System32\" | |
"C:\Windows \System32\WinSAT.exe" |
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 <Windows.h> | |
#include <iphlpapi.h> | |
#include <cstdio> | |
#pragma comment(lib, "iphlpapi.lib") | |
static void Ip4ToString(DWORD ip4, char ip4_string[16]) | |
{ | |
if (ip4 == 0) | |
{ |
NewerOlder