Skip to content

Instantly share code, notes, and snippets.

@santaklouse
santaklouse / HowToOTG.md
Created November 14, 2017 10:50 — forked from gbaman/HowToOTG.md
Simple guide for setting up OTG modes on the Raspberry Pi Zero

Raspberry Pi Zero OTG Mode

Simple guide for setting up OTG modes on the Raspberry Pi Zero - By Andrew Mulholland (gbaman).

The Raspberry Pi Zero (and model A and A+) support USB On The Go, given the processor is connected directly to the USB port, unlike on the B, B+ or Pi 2 B, which goes via a USB hub.
Because of this, if setup to, the Pi can act as a USB slave instead, providing virtual serial (a terminal), virtual ethernet, virtual mass storage device (pendrive) or even other virtual devices like HID, MIDI, or act as a virtual webcam!
It is important to note that, although the model A and A+ can support being a USB slave, they are missing the ID pin (is tied to ground internally) so are unable to dynamically switch between USB master/slave mode. As such, they default to USB master mode. There is no easy way to change this right now.
It is also important to note, that a USB to UART serial adapter is not needed for any of these guides, as may be documented elsewhere across the int

@santaklouse
santaklouse / blueborne-nexus5.py
Created November 17, 2017 04:39 — forked from jesux/blueborne-nexus5.py
Blueborne RCE PoC - Nexus5 6.0.1
import os
import sys
import time
import struct
import select
import binascii
import bluetooth
from bluetooth import _bluetooth as bt
@santaklouse
santaklouse / sshd_tunnel.sh
Created March 2, 2018 14:30 — forked from ripper/sshd_tunnel.sh
A script to launch user sshd limited to creation of reverse tunnels
#!/bin/sh
AUTHORIZED_KEYS=authorized_keys
HOST_RSA_KEY=ssh_host_rsa_key
SSHD=/usr/sbin/sshd
PORT=8443
case "$AUTHORIZED_KEYS" in /*) ;; *) AUTHORIZED_KEYS=$PWD/$AUTHORIZED_KEYS ;; esac
case "$HOST_RSA_KEY" in /*) ;; *) HOST_RSA_KEY=$PWD/$HOST_RSA_KEY ;; esac
@santaklouse
santaklouse / copymysql.sh
Created November 23, 2018 16:54 — forked from ecdundar/copymysql.sh
Copy MySQL Database One Server (Remote) To Another (Local) Server
#!/bin/bash
# copymysql.sh
# GENERATED WITH USING ARTUR BODERA'S SCRIPT
# Source script at: https://gist.github.com/2215200
MYSQLDUMP="/usr/bin/mysqldump"
MYSQL="/usr/bin/mysql"
@santaklouse
santaklouse / ngrok-selfhosting-setup.md
Created November 28, 2018 19:36 — forked from lyoshenka/ngrok-selfhosting-setup.md
How to setup Ngrok with a self-signed SSL cert

Intro

The plan is to create a pair of executables (ngrok and ngrokd) that are connected with a self-signed SSL cert. Since the client and server executables are paired, you won't be able to use any other ngrok to connect to this ngrokd, and vice versa.

DNS

Add two DNS records: one for the base domain and one for the wildcard domain. For example, if your base domain is domain.com, you'll need a record for that and for *.domain.com.

Different Operating Systems

@santaklouse
santaklouse / parseURLParameters.js
Last active February 9, 2021 16:56 — forked from pirate/parseURLParameters.js
Parse URL query parameters in ES6
const getUrlParams = search => {
let params = {};
search
.slice(search.indexOf('?') + 1)
.split('&')
.forEach(hash => {
const [key, val] = hash.split('=')
params[key] = val === void(0)
? true
: decodeURIComponent(val);
@santaklouse
santaklouse / openssl_commands.md
Created July 14, 2022 15:41 — forked from Hakky54/openssl_commands.md
Some list of openssl commands for check and verify your keys

openssl 🔐

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
@santaklouse
santaklouse / README.md
Last active August 2, 2022 13:34 — forked from Roni-Carta/wp-wordlist.sh
wp-wordlist helps you create wordlist of all the Wordpress' Themes and Plugins available

fuzz target.com wordpress site:

./fuzz.wp.sh https://target.com
@santaklouse
santaklouse / index.md
Created December 8, 2023 01:53 — forked from paj28/index.md

Unicode XSS via Combining Characters

Most application security practitioners are familiar with Unicode XSS, which typically arises from the Unicode character fullwidth-less-than-sign. It’s not a common vulnerability but does occasionally appear in applications that otherwise have good XSS protection. In this blog I describe another variant of Unicode XSS that I have identified, using combining characters. I’ve not observed this in the wild, so it’s primarily of theoretical concern. But the scenario is not entirely implausible and I’ve not otherwise seen this technique discussed, so I hope this is useful.

Recap of Unicode XSS

Lab: https://4t64ubva.xssy.uk/

A quick investigation of the lab shows that it is echoing the name parameter, and performing HTML escaping: