Skip to content

Instantly share code, notes, and snippets.

@yohanes
yohanes / rot.py
Created October 26, 2014 12:34
pwnium2014
import Image
import base64
import socket
import os
def process():
im = [None] * 10
im[0] = Image.open("x.png").rotate(90)
@yohanes
yohanes / kernelland.c
Created October 26, 2014 12:13
pwnium2014
#include <stdio.h>
#include <stdlib.h>
char flag[] = "Itofrjxb2`..c.2.6031]g6b1gg0^)b11cb^^-]z";
int main()
{
int ilen = strlen(flag);
int cl = 0;
@yohanes
yohanes / hidden.js
Created October 26, 2014 12:09
HACK.LU CTF 2014: HIDDEN IN PLAIN SIGHT
var fs = require('fs')
var crypto = require('crypto')
var HMAC_SECRET = ''
for (var i=0; i<20; i++) {
HMAC_SΕCRET = HMAC_SECRET + (Math.random()+'').substr(2)
}
function hmac_sign(path) {
var hmac = crypto.createHmac('sha256', HMAC_SECRET)
@yohanes
yohanes / solveguess.py
Created October 26, 2014 11:57
HACK.LU CTF 2014: GUESS THE FLAG
#!/usr/bin/python
import socket
import struct
import time
def recv_until(st):
ret = ""
while st not in ret:
ret += s.recv(8192)
return ret
@yohanes
yohanes / solvedalton.py
Created October 26, 2014 11:55
Dalton's Corporate Security Safe for Business
import requests
import subprocess
url = "https://wildwildweb.fluxfingers.net:1422/"
prescript = """
c = new Object();
var result=[]
mycontext = new Object();
mygradient = new Object();
mygradient.addColorStop = function() {}
@yohanes
yohanes / dalton.js
Created October 26, 2014 11:54
Dalton's Corporate Security Safe for Business
<script>var a=c.getContext('2d');
var e=a.createLinearGradient(0,0,c.width,0);
var s=(3).toString(36);
e.addColorStop('0','#c53ec9');e.addColorStop('1.0','#b3baf3');
a.fillStyle=e;a.font='bold 12px verdana';a.fillText(s,22,19);
var s=(9).toString(36);var v=a.createLinearGradient(0,0,c.width,0);
v.addColorStop('0','#884431');v.addColorStop('1.0','#c33861');
a.fillStyle=v;a.font=' 12px Gerogia';a.fillText(s,70,15);
var e=a.createLinearGradient(0,0,c.width,0);e.addColorStop('0','#c4ec8c');
var n=/b/.source;e.addColorStop('1.0','#825952');a.fillStyle=e;
@yohanes
yohanes / d4.py
Created October 26, 2014 11:51
Daemon 4 attacker HITB2014
import socket
import sys
def recv_until(st):
ret = ""
while st not in ret:
ret += s.recv(8192)
return ret
a = open("timemap.txt", "r")
@yohanes
yohanes / brute4.py
Created October 26, 2014 11:50
Daemon 4 .so HITB2014
import socket
import sys
import time
def recv_until(st):
ret = ""
while st not in ret:
ret += s.recv(8192)
return ret
@yohanes
yohanes / s4.c
Created October 26, 2014 11:50
Daemon 4 .so HITB2014
#define _GNU_SOURCE /* See feature_test_macros(7) */
#define _XOPEN_SOURCE /* See feature_test_macros(7) */
#include <time.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
time_t time(time_t *t)
{
@yohanes
yohanes / multisock.py
Created October 26, 2014 11:48
Daemon 2 HITB2014
#!/usr/bin/python
import select
import socket
import struct
import sys
ports_list=[]
for i in range(5000, 64000/4):