Skip to content

Instantly share code, notes, and snippets.

View kcchu's full-sized avatar

Chu Ka-Cheong kcchu

View GitHub Profile
@kcchu
kcchu / malloc.c
Created October 9, 2016 21:01
glibc-2.23
/* Malloc implementation for multiple threads without lock contention.
Copyright (C) 1996-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Wolfram Gloger <[email protected]>
and Doug Lea <[email protected]>, 2001.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of the
License, or (at your option) any later version.

Awesome Pwnable

Meta

  • awesome-ctf - A curated list of CTF frameworks, libraries, resources and softwares

Heap Exploitation

  • malloc.c - malloc() implementation in glib-2.23 (as found in Ubuntu 16.04.1 LTS)
  • how2heap - Awesome collection of various heap exploitation techniques
@kcchu
kcchu / keybase.md
Last active November 7, 2017 06:47

Keybase proof

I hereby claim:

  • I am kcchu on github.
  • I am edwincheese (https://keybase.io/edwincheese) on keybase.
  • I have a public key whose fingerprint is 128C AD22 433F 3892 337D B882 7B63 14A0 D221 5DE7

To claim this, I am signing this object:

@kcchu
kcchu / terminal.txt
Last active October 19, 2017 03:56
Benchmark result of Rust crypto libraries: ring, rust-crypto and sodiumoxide
# Benchmark code: https://github.com/briansmith/crypto-bench
# 2.9 GHz Intel Core i7, Ubuntu 17.04
$ (cd ring && cargo bench); (cd rust_crypto && cargo bench); (cd sodiumoxide && cargo bench)
Finished release [optimized + debuginfo] target(s) in 0.51 secs
Running target/release/deps/crypto_bench_ring-c8db2f09335823cf
running 60 tests
test aead::seal_in_place::aes_128_gcm::tls12_1350 ... bench: 411 ns/iter (+/- 2) = 3284 MB/s
test aead::seal_in_place::aes_128_gcm::tls12_16 ... bench: 125 ns/iter (+/- 40) = 128 MB/s
@kcchu
kcchu / KittyCore.sol
Last active December 7, 2017 04:23
CryptoKitties
pragma solidity ^0.4.11;
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
@kcchu
kcchu / ssb_reverse.c
Last active February 22, 2022 14:02
SSB Reverse
char ____ZN7Backend6Google12SSBUtilities24shouldConsultWithTencentEv_block_invoke_2(void * _block) {
rax = [NSLocale currentLocale];
rax = [rax retain];
r14 = [[rax countryCode] retain];
[rax release];
rbx = [r14 isEqualToString:@"CN"] != 0x0 ? 0x1 : 0x0;
[r14 release];
rax = rbx;
return rax;
}