Skip to content

Instantly share code, notes, and snippets.

View stefan2904's full-sized avatar
🚲
¯\_(ツ)_/¯

Stefan stefan2904

🚲
¯\_(ツ)_/¯
View GitHub Profile
@stefan2904
stefan2904 / notebook2-pgp.ipynb
Last active November 17, 2016 01:04
Demo analysis of KONECT's Pretty Good Privacy network dataset ... (dataset from 2004)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@stefan2904
stefan2904 / attack.log
Created November 6, 2016 06:07
Hack the Vote 2016: "Just in Time" (web300)
$ php time_test.php
11/06/16 01:56
$ http http://kentucky.pwn.republican/inc.php\?p\=countdown | grep closes
<div style="text-align: center">0 days, 5 hours, and 3 minutes until registration closes</div></html>
@stefan2904
stefan2904 / fail.txt
Last active October 8, 2016 17:49
YouCompleteMe </3 pyenv
$ cd ctf
pyenv-virtualenv: deactivate
pyenv-virtualenv: activate ctf
$ python --version
Python 2.7.11
$ nvim
YouCompleteMe unavailable: requires Vim compiled with Python (2.6+ or 3.3+) support
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
#!/bin/sh
<<\EOF
<!--
Hey, you found the source code!
That is a sign you hopefully know better than to blindly run unknown commands
from the internet and/or are a curious person. We like you already.
~
$ cd .dotfiles
~/.dotfiles
$ ls
vim-f0rki vim-stefan
~/.dotfiles
$ mkdir foo
@stefan2904
stefan2904 / PasswordFactory.php
Last active October 4, 2016 21:10
Mediawiki -> PasswordFactory.php -> generateRandomPasswordString(), see also https://www.mediawiki.org/wiki/Manual:$wgPasswordPolicy
<?php
/**
* Generate a random string suitable for a password
*
* @param int $minLength Minimum length of password to generate
* @return string
*/
public static function generateRandomPasswordString( $minLength = 10 ) {
// Decide the final password length based on our min password length,
// stopping at a minimum of 10 chars.
@stefan2904
stefan2904 / index.php
Created October 2, 2016 17:49
TUM CTF: free_as_in_bavarian_beer (writeup on https://hack.more.systems )
<?php
/*
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
@stefan2904
stefan2904 / a.php
Created October 2, 2016 17:04
PHP's bcrypt ...
<?php
$options = ['salt' => "m7z6odpn/jenmx0ablkhge"];
// PHP's bcrypt implementation ignores input after binary-zero. So ...
echo password_hash("a\0", PASSWORD_DEFAULT, $options) . "\n";
echo password_hash("a\0bcd", PASSWORD_DEFAULT, $options) . "\n";
echo password_hash("a\0bcdasdasdads", PASSWORD_DEFAULT, $options) . "\n";
echo password_hash("a\0aaa", PASSWORD_DEFAULT, $options) . "\n";
##+%%+%+++%+++%+++%+++@*+%+++@*+#%+%#+%+++%+++%+++%+++%+++@**+%%+%+++%+++@*+%#+##+#%+%+++%+++%+++%+++@**+%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++@**+##+%%+%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++@*
##+%%+%+++%+++%+++%+++@*+%+++@*+#%+%#+%+++%+++%+++%+++%+++@**+%%+%+++%+++@*+%#+##+#%+%+++%+++%+++%+++@**+%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++@**+##+%%+%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++@*
##+%%
##+%%+%+++%+++%+++%+++@*+%+++@*+#%+%#+%+++%+++%+++%+++%+++@**+%%+%+++%+++@*+%#+##+#%+%+++%+++%+++%+++@**+%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++@**+##+%%+%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++@*
##+%%+%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++@*+%#+%+++@**+%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++%+++@**+%#+%+++%+++%+++%+++%+++@***
##+%%
##+%%
##+%%+%+++%+++%+++%+++@*+%+++@*+#%+%#+%+++%+++%+++%+++%+++@**+%%+%+++%+++@*+%#+##+#%+%+++%+++%+++%+++@**+%+++%++
@stefan2904
stefan2904 / solve.py
Created September 22, 2016 19:12
Google CTF - Unbreakable Enterprise Product Activation
#!/usr/bin/env python2
import angr
import claripy
proj = angr.Project('./unbreakable-enterprise-product-activation',
load_options={"auto_load_libs": False})
# TODO: create useful
length = 67