Skip to content

Instantly share code, notes, and snippets.

@yeuchimse
yeuchimse / lasactf_nested.py
Created March 23, 2016 04:42
Hello unicorn ~( O_o )~
'''
The last file has a bug (missing the <push buffer> instruction), need to fix it manually into:
004010E5 68 00040000 push 0x400
004010EA 68 2C204000 push file99.0040202C
004010EF E8 0CFFFFFF call file99.00401000
Flag: lasactf{n3st_<censored>_stuff!}
@yeuchimse
__author__ = 'yeuchimse'
import struct
FileMode = ['rb', 'wb', 'ab', 'r+b', 'w+b', 'a+b']
Registers = ['eax', 'ebx', 'ecx', 'edx', 'esi', 'edi', 'esp', 'ebp']
# region ...
def format_code(v):
1B230016010B02FA0E02C40802CB15020F02C10981F50001C212F7FF16020101020001CD190118DAFF20011D0034F52401F6283E0023012D163557506C566F586515745A20634D15734C73416558213F16310B3004130B37D6260C3502160C350227F5CA0B37F2160B37F5160B37E5160B37EE160B37EE160B37EE160B37CA160935003E04300B37D62112C9FF3E84D800B1FF30043E84DF00B1FF30043E84D100B1FF30043E84D300B1FF30043E84DA00B1FF30043E84C100B1FF30043E84D300B1FF30043E84DB05310BB1E53584CA05310BB1F33584CA05310BB1EE3584CA05310B36043403FE0737C0151F14003E02DA0037FF160B37F03502CA233E02C40037FF160B37E63502CA233E02FF23110B34002D10350034023604300632083C0A3E0C380E3A16320B37013E0532222B173514171E270021222B0D3514171E3D00211B10003E02DA0037FF160B37F03502CA233E02C40037FF160B37E63502CA233E02FF233E023421110B37F03E0432133400370235DB28CBCA003702260135023700DE1D8BFF260235C428B7CA133500E60B37C13B02FD02350228A7CA0B37F5160B37F0160B37E5160B37EE160B37EE160B37EE160B37CA160B37013E05320030C4171E220021222B123514171E380021222B0835142E25350B37EF3502CA233E02C50037FF160B37F13502CA233E02D30037FF160B37CA160B3701142434
@yeuchimse
yeuchimse / Program.cs
Last active December 18, 2015 14:19
DEF CON CTF 2013.OMGACM.3 (grandprix)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Sockets;
using System.IO;
namespace DTF.CON.CTF._2013_OMGACM.grandprix {
class Program {
@yeuchimse
yeuchimse / Program.cs
Last active December 18, 2015 14:09
DEF CON CTF 2013.OMGACM.2 (diehard)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Sockets;
using System.IO;
namespace DTF.CON.CTF._2013_OMGACM.diehard {
class Program {