Skip to content

Instantly share code, notes, and snippets.

Yohanes Nugroho yohanes

Block or report user

Report or block yohanes

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@yohanes
yohanes / rsa.diff
Created Apr 15, 2014
diff against http://cseweb.ucsd.edu/~hovav/papers/hs09.html for recreating private key from corrupted file. note you must fix the modulus from public key (openssl pkey -pubin -in public.pub -text -noout). See http://rentjong-team.blogspot.com/ for more info.
View rsa.diff
diff -ruN rsabits-orig/rsa.C rsabits/rsa.C
--- rsabits-orig/rsa.C 2014-04-15 10:09:53.406244277 +0700
+++ rsabits/rsa.C 2014-04-15 10:15:55.666047590 +0700
@@ -40,6 +40,8 @@
// C:
#include <sys/types.h>
+#include <stdio.h>
+#include <string.h>
#include <unistd.h>
@yohanes
yohanes / corrupted.pem
Created Apr 15, 2014
Example corrupted rsa key.
View corrupted.pem
Private-Key: (1024 bit)
modulus :
00:db:fa:bd:b1:49:5d:32:76:e7:62:6b:84:79:6e:
9f:c2:0f:a1:3c:17:44:f1:0c:8c:3f:3e:3c:2c:60:
40:c2:e7:f3:13:df:a3:d1:fe:10:d1:ae:57:7c:fe:
ab:74:52:aa:53:10:2e:ef:7b:e0:09:9c:02:25:60:
e5:7a:5c:30:d5:09:40:64:2d:1b:09:7d:d2:10:9a:
e0:2f:2d:cf:f8:19:8c:d5:a3:95:fc:ac:42:66:10:
78:48:b9:dd:63:c3:87:d2:53:8e:50:41:53:43:04:
20:33:ea:09:c0:84:15:5e:65:2b:0f:06:23:40:d5:
View crc32.cpp
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#define UPDC32(octet, crc) (crc_32_tab[((crc >> 24 ) ^ (octet)) & 0xff] ^ ((crc) << 8))
static uint32_t crc_32_tab[] = { /* CRC polynomial 0xedb88320 */
0x00000000, 0x04c11db7, 0x09823b6e, 0x0d4326d9,
@yohanes
yohanes / dalton.js
Created Oct 26, 2014
Dalton's Corporate Security Safe for Business
View dalton.js
<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 / solvedalton.py
Created Oct 26, 2014
Dalton's Corporate Security Safe for Business
View solvedalton.py
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 / hidden.js
Created Oct 26, 2014
HACK.LU CTF 2014: HIDDEN IN PLAIN SIGHT
View hidden.js
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 / guess-hitb2014c3.py
Created Oct 26, 2014
Guess challenge 3 HITB2014
View guess-hitb2014c3.py
import socket
import re
import time
def recv_until(st):
ret = ""
while st not in ret:
ret += s.recv(8192)
return ret
@yohanes
yohanes / solveguess.py
Created Oct 26, 2014
HACK.LU CTF 2014: GUESS THE FLAG
View solveguess.py
#!/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 / pcap-hitb2014c2.py
Created Oct 26, 2014
Extract data from pcap Challenge 2 HITB2014
View pcap-hitb2014c2.py
f = open("c2.pcap", "r")
lines = f.readlines()
for l in lines:
if ("G01" in l):
print l[l.index("G01"):]
View kernelland.c
#include <stdio.h>
#include <stdlib.h>
char flag[] = "Itofrjxb2`..c.2.6031]g6b1gg0^)b11cb^^-]z";
int main()
{
int ilen = strlen(flag);
int cl = 0;
You can’t perform that action at this time.