Skip to content

Instantly share code, notes, and snippets.

View hyuunnn's full-sized avatar
๐Ÿ˜ตโ€๐Ÿ’ซ

Hyun Yi hyuunnn

๐Ÿ˜ตโ€๐Ÿ’ซ
View GitHub Profile
import angr
p = angr.Project("./angrybird")
init = p.factory.blank_state(addr=0x4007da)
path_group = p.factory.path_group(init,threads=8)
aa = path_group.explore(find=0x404fda, avoid=0x404f97)
print path_group.found[0].state.posix.dumps(1)
from struct import *
from socket import *
from time import *
s = socket(AF_INET, SOCK_STREAM)
s.connect(("192.168.93.141",9909))
p = lambda x:pack("<L",x)
up = lambda x:unpack("<L",x)[0]
from pwn import *
from struct import *
elf = ELF('./ropasaurusrex-85a84f36f81e11f720b1cf5ea0d1fb0d5a603c0d')
libc = ELF("/lib/i386-linux-gnu/libc.so.6")
rop = ROP(elf)
up = lambda x:unpack("<L",x)[0]
binsh = "/bin/sh"
dynamic = 0x08049530
import pefile
import sys
import binascii
import argparse
class icon_rule_maker():
def __init__(self):
self.pe = pefile.PE(args.path)
self.EntryPoint = self.pe.OPTIONAL_HEADER.AddressOfEntryPoint
self.ImageBase = self.pe.OPTIONAL_HEADER.ImageBase
import xlsxwriter
import os
import sys
import argparse
import requests
import hashlib
class retrohunt_searcher():
def __init__(self):
self.API_KEY = ""
RAW = ํŒŒ์ผ์—์„œ์˜ ์ฃผ์†Œ
RVA = ๋ฉ”๋ชจ๋ฆฌ์—์„œ์˜ ์ฃผ์†Œ
VirtualAddress = ๋ฉ”๋ชจ๋ฆฌ์—์„œ์˜ ์„น์…˜ ์‹œ์ž‘ ์œ„์น˜ (idaapi Segments()๋กœ ๊ฐ€๋Šฅ) SegStart
PointerToRawData = ํŒŒ์ผ์—์„œ์˜ ์„น์…˜ ์‹œ์ž‘ ์œ„์น˜ (offset = idaapi.get_fileregion_offset(ea))
0x1c094 = 0x41E494 - 0x41c000 + 0x19c00
RAW = RVA - VirtualAddress + PointerToRawData
VirtualAddress = RVA + ImageBase
import struct
import sys
import hexdump
import csv
import os
import argparse
# https://gist.github.com/skochinsky/07c8e95e33d9429d81a75622b5d24c8b
PRODID_MAP = {
0: "Unknown",
# root$ tor
# Oct 01 13:57:48.308 [notice] Opening Socks listener on 127.0.0.1:9050
import requests
proxies = {
'http': 'socks5h://localhost:9050',
'https': 'socks5h://localhost:9050'
}
@hyuunnn
hyuunnn / r2_decoder.py
Last active October 9, 2018 10:28
r2pipe script
import r2pipe
class test:
def __init__(self):
self.r2 = r2pipe.open("7410597531f22a3f89bb8d133488252360c5dc701862f86c4f60fd79722f7e37")
self.r2.cmd("aaa")
self.decode_addr = 0x40159d
self.xrefs = self.r2.cmdj("axtj {}".format(self.decode_addr))
def decode(self, string):
@hyuunnn
hyuunnn / RecentFileCache_parser.py
Last active October 11, 2018 03:07
RecentFileCache.bcf parser
import binascii
import struct
class REC():
def __init__(self):
self.signature = b'\xfe\xff\xee\xff\x11\x22\x00\x00\x03\x00\x00\x00\x01\x00\x00\x00'
self.data = open("RecentFileCache.bcf","rb").read()
self.data_size = len(self.data)
self.offset = 20