View a.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
https://godbolt.org/z/9633WhEYY | |
https://godbolt.org/z/bY66b7qqG | |
https://gist.github.com/vient/0264b17c517edc86c7ba211f4e3a8d58 |
View Makefile
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
.PHONY: nopie pie static hook clean | |
nopie: | |
gcc -no-pie main.c -o main | |
pie: | |
gcc main.c -o main | |
static: | |
gcc -static main.c -o main |
View solve.py
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 python3 | |
import functools | |
import operator | |
import sys | |
import z3 | |
def rev(state): | |
s = z3.Solver() | |
old = z3.Bools(' '.join(f'a{i}' for i in range(len(state)))) |
View 0ctf_plugin.py
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
import idaapi | |
import idc | |
# idautils.DecodeInstruction(here()).itype | |
JMP = 0x56 | |
JL = 0x40 | |
JLE = 0x41 | |
JG = 0x3E | |
JE = 0x55 | |
JZ = JE |
View ida_launcher.bat
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
@echo off | |
setlocal | |
rem TODO: get IDA directory from .idb handler in registry? | |
if not defined IDA_DIR ( | |
set IDA_DIR=C:\Program Files\IDA Pro 7.5 | |
) | |
set arg1_full_path=%~f1 |
View kek.py
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 python3 | |
import 𝗌𝔶𝘴 | |
import 𝚛𝖺𝔫ⅆom | |
import 𝒔𝘵𝓻𝒾𝚗𝒈 | |
import u𝘯𝕚c𝕠𝒹e𝖽𝙖𝕥𝖆 | |
from p𝔶𝘨m𝑒𝙣t𝑠 import ₗⅇₓₑrſ as L𝘦𝗑𝚎ᵣ𝐬 | |
𝖀𝗡𝕴𝑪O𝑫ℰ_𝘾𝐴𝙲ℋ𝐄𝕾 = {} | |
def 𝘧𝕚𝓵𝘭_u𝙣ⁱ𝙘𝗈de_𝓷𝙖𝐦𝙚𝕤(): |
View flair.py
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
import os | |
import sys | |
FLAIR_DIR = r'D:\work\ida\7.5\flair75\bin\win' | |
PCF = os.path.join(FLAIR_DIR, "pcf.exe") | |
SIGMAKE = os.path.join(FLAIR_DIR, "sigmake.exe") | |
def boost_lib_to_desc(lib): | |
assert 'mt-x' in lib, 'Only /MT libs' | |
tokens = lib.split('.')[0].split('-') |
View shellcode.s
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
.intel_syntax noprefix | |
.code64 | |
begin: | |
lea r8, [rip+begin] | |
lea r9, [rip+spinlock] | |
mov r10, 0xF0 | |
# save shellcode to the stack |
View goodname.cfg
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
//////////////////////// | |
// USER DEFINED RULES // | |
//////////////////////// | |
// MFC/ATL strings | |
R9000 : { ptn : "CStringT<char,\\s*StrTraitMFC(_DLL)?<char,\\s*(ATL::)?ChTraits(CRT|OS)<char>>>", rpl : "CStringA" }, | |
R9001 : { ptn : "CStringT<wchar_t,\\s*StrTraitMFC(_DLL)?<wchar_t,\\s*(ATL::)?ChTraits(CRT|OS)<wchar_t>>>", rpl : "CStringW" }, | |
R9002 : { ptn : "CStringT<char,\\s*StrTraitATL(_DLL)?<char,\\s*(ATL::)?ChTraits(CRT|OS)<char>>>", rpl : "CAtlStringA" }, | |
R9003 : { ptn : "CStringT<wchar_t,\\s*StrTraitATL(_DLL)?<wchar_t,\\s*(ATL::)?ChTraits(CRT|OS)<wchar_t>>>", rpl : "CAtlStringW" }, |
View kek.cpp
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 <iostream> | |
int main() { | |
for (size_t i = 1; i < 0x100000000ull; ++i) { | |
bool ok = true; | |
bool was[32] = { false }; | |
for (int j = 1; j <= 32 && ok; ++j) { | |
auto x = (1ull << j) - 1; | |
auto res = static_cast<uint32_t>(x * i) >> 27; | |
ok &= !was[res]; |
NewerOlder