Skip to content

Instantly share code, notes, and snippets.

View Changochen's full-sized avatar

Ne0 Changochen

View GitHub Profile
@Changochen
Changochen / private_fork.md
Created November 6, 2022 02:59 — forked from 0xjac/private_fork.md
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@Changochen
Changochen / gist:835b3767e54db4de38c178aad848276f
Created October 22, 2022 01:08 — forked from chrisdone/gist:02e165a0004be33734ac2334f215380e
Build and run minimal Linux / Busybox systems in Qemu

Common

export OPT=/opt
export BUILDS=/some/where/mini_linux
mkdir -p $BUILDS

Linux kernel

@Changochen
Changochen / gist:cf6d5c6e111ebf3a11a967bafb2df551
Created September 19, 2022 02:03 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@Changochen
Changochen / latency.txt
Created August 11, 2022 01:10 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@Changochen
Changochen / flamegraph_rust.md
Created February 7, 2022 02:50 — forked from dlaehnemann/flamegraph_rust.md
flamegraphing rust binaries' cpu usage with perf
@Changochen
Changochen / phpcoll.c
Created May 9, 2018 03:38 — forked from saelo/phpcoll.c
Find php md5 collisions
/*
* Find php md5 collisions (var_dump(md5('240610708') == md5('QNKCDZO'));)
*
* gcc -Ofast -std=c99 -lcrypto -o phpcoll phpcoll.c
*
* Copyright (c) 2015 Samuel Groß
*/
#include <stdio.h>
#include <unistd.h>
@Changochen
Changochen / pwn.js
Created May 9, 2018 03:36 — forked from saelo/pwn.js
Exploit for the "roll a d8" challenge of PlaidCTF 2018
//
// Quick and dirty exploit for the "roll a d8" challenge of PlaidCTF 2018.
// N-day exploit for https://chromium.googlesource.com/v8/v8/+/b5da57a06de8791693c248b7aafc734861a3785d
//
// Scroll down do "BEGIN EXPLOIT" to skip the utility functions.
//
// Copyright (c) 2018 Samuel Groß
//
//
@Changochen
Changochen / README.MD
Created April 25, 2017 10:18 — forked from ihciah/README.MD
Pwnable.kr md5 calculator writeup

Pwnable.kr md5 calculator writeup

ihciah@gmail.com

In process_hash, the size of input is 1024, the size after b64d is 512, however, it should be 1024*3/4, so there's a buffer overflow here.

Because of the stack canary, we can do nothing. I was confused here until I noticed the canary is also used in my_hash to generate random number. Since the canary is gs:0x14, it's always the same in all function calls.

We can calculate the canary value from the captcha because the seed of randomization is the current time, we can fetch it from http request to http://pwnable.kr.

After trying input b64e("AAAA"*(768/4)) to the program, jump to pass the canary check and break at ret, we can notice that the top of stack is AAAA....