Skip to content

Instantly share code, notes, and snippets.

@symeonp
symeonp / order.py
Created April 14, 2023 08:12
Create order API
import json
import os
from datetime import datetime, timezone
from hashlib import sha256
import requests
from eosio_signer import EOSIOKey
HOST_NAME = os.getenv("BX_API_HOSTNAME")
PRIVATE_KEY = os.getenv("BX_PRIVATE_KEY")
@symeonp
symeonp / structured.rs
Last active October 27, 2022 14:33
Structured Aware Harness for tinybmp Rust crate
// Harness by https://twitter.com/addisoncrump_vr
#![cfg_attr(fuzzing, no_main)]
use arbitrary::{Arbitrary, Unstructured};
use embedded_graphics_core::geometry::Point;
use libfuzzer_sys::fuzz_target;
use rand::rngs::StdRng;
use rand::{RngCore, SeedableRng};
use std::num::{NonZeroI8, NonZeroU8};
#[cfg(not(fuzzing))]
@symeonp
symeonp / vlc fun
Created February 17, 2019 20:46
Compile VLC with ASAN+coverage
git revert e85682585ab27a3c0593c403b892190c52009960
Compiled using the following flags:
$ CC=clang-8 CXX=clang++-8 CCFLAGS="-fprofile-instr-generate -fcoverage-mapping" CXXFLAGS="-fprofile-instr-generate -fcoverage-mapping" ./configure --with-sanitizer=address --disable-xcb
$ ASAN_OPTIONS=detect_leaks=0 make -j4
@symeonp
symeonp / gist:a83373d394e578e70ec6333133536ee1
Created November 3, 2017 17:16
Foxit Custom Wrapper fuzz (from @abdhariri)
import ctypes
import sys
dll = ctypes.windll.LoadLibrary("ConvertToPDF_x86.dll")
try:
oConvertor = ctypes.c_int(dll.CreateFXPDFConvertor())
print oConvertor
print type(oConvertor)
@symeonp
symeonp / gist:2babd4c1931515c84fc56dfa03c2ff70
Created October 11, 2017 22:14
GDI wmf Out of Bounds Read (CVE-2017-11816)
0:000> g 76dfeff1
ModLoad: 76e30000 76e4f000 C:\Windows\system32\IMM32.DLL
ModLoad: 754a0000 7556d000 C:\Windows\system32\MSCTF.dll
ModLoad: 73d80000 73dc0000 C:\Windows\system32\uxtheme.dll
eax=03581220 ebx=00000050 ecx=00000000 edx=00000000 esi=03581114 edi=000000bc
eip=76dfeff1 esp=0025f6c0 ebp=0025f6d8 iopl=0 nv up ei pl nz ac po nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000212
GDI32!MRBDIB::vInit+0x131:
76dfeff1 e8927cfeff call GDI32!memcpy (76de6c88)
0:000> dds esp L3
@symeonp
symeonp / gist:19115640b42af801718bd9415dafbdc2
Created September 20, 2017 22:29
IE_MSXML6_null_pointer
Make sure you run from an elevated console: windbg -QY
then start Internet Explorer and *attach* it.
Also enable page heap with: gflags.exe /i "C:\Program Files (x86)\Internet Explorer\iexplore.exe" +hpa +ust
OS: Windows 7 x64
IE version: 11.0.9600.18792
(102c.efc): Break instruction exception - code 80000003 (first chance)
ntdll!DbgBreakPoint: