Skip to content

Instantly share code, notes, and snippets.

@vngkv123
vngkv123 / simple_note.py
Last active September 5, 2017 14:51
MMA 2017 3rd simple note write-up
from pwn import *
import sys, time
context.binary = "./simple_note-b5bdfa5fdb0fb070867ac0298a0b2a850f22e712513038d92c24c40664fac56b"
binary = ELF("./simple_note-b5bdfa5fdb0fb070867ac0298a0b2a850f22e712513038d92c24c40664fac56b")
libc = ELF("./libc.so.6-4cd1a422a9aafcdcb1931ac8c47336384554727f57a02c59806053a4693f1c71")
if len(sys.argv) == 1:
p = process(["./simple_note-b5bdfa5fdb0fb070867ac0298a0b2a850f22e712513038d92c24c40664fac56b"], env={"LD_PRELOAD":"./libc.so.6-4cd1a422a9aafcdcb1931ac8c47336384554727f57a02c59806053a4693f1c71"})
log.info("PID : " + str(proc.pidof(p)[0]))
@vngkv123
vngkv123 / simple_note_ver2.py
Created September 4, 2017 03:27
MMA CTF 2017 3rd simple_note_ver2 write-up
from pwn import *
import sys, time
context.binary = "./note2"
binary = ELF("./note2")
libc = ELF("./libc.so.6-4cd1a422a9aafcdcb1931ac8c47336384554727f57a02c59806053a4693f1c71")
#context.log_level = "debug"
if len(sys.argv) == 1:
@vngkv123
vngkv123 / solve.py
Created September 4, 2017 15:39
MMA CTF 2017 3rd my_simple_cipher
import sys
import random
from pwn import *
from binascii import *
key = ["E", "N", "J", "0", "Y", "H"]
flag = ["T", "W", "C", "T", "F", "{"]
enc = unhexlify("7c153a474b6a2d3f7d3f7328703e6c2d243a083e2e773c45547748667c1511333f4f745e")
msg = "A" * 21 + "|" + "B" * 13
@vngkv123
vngkv123 / self_introduce.cs
Created September 10, 2017 15:48
C# Programming class task 1
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
@vngkv123
vngkv123 / solve_simple_calc.py
Created October 3, 2017 16:40
2016 Boston Key Party CTF simple_calc
from pwn import *
import time, sys
p = process(["./simple_calc"])
log.info("PID : " + str(proc.pidof(p)[0]))
pause()
context.binary = "./simple_calc"
binary = ELF("./simple_calc")
p.recvuntil("calculations: ")
@vngkv123
vngkv123 / struct_task1.c
Created October 5, 2017 14:28
file open, struct test1
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <fcntl.h>
struct data_struct{
char filename[512];
char data_buffer[1024];
};
@vngkv123
vngkv123 / dump file
Last active October 5, 2017 15:40
house_of_orange core dump
0x17ec400: 0x0068732f6e69622f 0x0000000000000061
0x17ec410: 0x00007fbe8030cbc8 0x00007fbe8030cbc8
0x17ec420: 0x0000000000000000 0x0000000000000000
0x17ec430: 0x0000000000000000 0x0000000000000000
0x17ec440: 0x0000000000000000 0x0000000000000000
0x17ec450: 0x0000000000000000 0x0000000000000000
0x17ec460: 0x0000000000000000 0x0000000000000000
0x17ec470: 0x0000000000000000 0x00000000004006e5
0x17ec480: 0x0000000000000000 0x0000000000000000
0x17ec490: 0x0000000000000000 0x0000000000000000
@vngkv123
vngkv123 / solve.py
Created October 5, 2017 15:54
2016 HITCON house_of_orange
from pwn import *
import sys, time
context.binary = "./houseoforange"
binary = ELF("./houseoforange")
p = process(["./houseoforange"])
def buildf(length, name, price, color):
p.recvuntil("choice : ")
@vngkv123
vngkv123 / ductf-2020-v8.js
Created September 19, 2020 13:48
d8ctf 2020
let u32 = new Uint32Array(2);
let f64 = new Float64Array(u32.buffer);
function u2d(l, h) {
u32[0] = l;
u32[1] = h;
return f64[0];
}
function d2u(v) {
#include <stdio.h>
#include <IOKit/IOKitLib.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <mach/mach.h>
#include <errno.h>
#include <dlfcn.h>
#include <fcntl.h>