Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View al3xtjames's full-sized avatar

Alex James al3xtjames

View GitHub Profile
@thelastlin
thelastlin / libsk-libfido2_BUILD_FROM_OPENSSH.md
Last active April 23, 2024 02:59
Build libsk-libfido2.so from OpenSSH-portable

Tested on macOS Sonoma Developer beta 2 (23A5276g)

Build libsk-libfido2.so

Prerequisite

  1. Download openssh-portable source code, install libcrypto, libfido2;
  2. Configure openssh-portable build system by ./configure # [options].

Apply patch

# To set this up, first get tailscale working in an isolated linux shell:
# 1. sudo systemctl stop tailscaled.service
# 2. tailscaled -port 9993 -state tailscale-luks-setup.state -tun userspace-networking -socket ./tailscaled.sock
# 3. tailscale -socket ./tailscaled.sock up -hostname HOSTNAME-luks
# 4. tailscale -socket ./tailscaled.sock down
# 5. ctrl-c out of tailscaled
# 6 sudo systemctl start tailscaled.service
#
# Then add the .state file to your machine secrets and pass its path as tailscaleStatePath.
@joevt
joevt / ThunderboltUtil.sh
Last active April 7, 2024 09:31
A set of functions to examine and modify Thunderbolt DROMs
#! /bin/zsh
# ThunderboltUtil.sh v1.6
# by joevt Apr 2, 2024
#=========================================================================================
#
#
# Thunderbolt DROM Notes:
#
#
@saagarjha
saagarjha / CreateGhidraApp.sh
Last active April 13, 2024 12:35
Creates a Ghidra.app bundle for macOS
#!/bin/sh
set -eu
create_iconset() {
mkdir -p Ghidra.iconset
cat << EOF > Ghidra.iconset/Contents.json
{
"images":
[
@marcan
marcan / roca_test.py
Last active June 20, 2022 19:33
Non-obfuscated version of the ROCA Infineon RSA key test
#!/usr/bin/python
import sys
# Credit: https://crypto.stackexchange.com/questions/52292/what-is-fast-prime
generators = [
(2, 11), (6, 13), (8, 17), (9, 19), (3, 37), (26, 53), (20, 61), (35, 71),
(24, 73), (13, 79), (6, 97), (51, 103), (53, 107), (54, 109), (42, 127),
(50, 151), (78, 157),
]
@marcan
marcan / smbloris.c
Last active November 22, 2022 08:32
SMBLoris attack proof of concept
/* SMBLoris attack proof-of-concept
*
* Copyright 2017 Hector Martin "marcan" <marcan@marcan.st>
*
* Licensed under the terms of the 2-clause BSD license.
*
* This is a proof of concept of a publicly disclosed vulnerability.
* Please do not go around randomly DoSing people with it.
*
* Tips: do not use your local IP as source, or if you do, use iptables to block
@spaze
spaze / opera-vpn.md
Last active April 20, 2024 02:14
Opera VPN behind the curtains is just a proxy, here's how it works

2023 update

ℹ️ Please note this research is from 2016 when Opera has first added their browser "VPN", even before the "Chinese deal" was closed. They have since introduced some real VPN apps but this below is not about them.

🕵️ Some folks also like to use this article to show a proof that the Opera browser is a spyware or that Opera sells all your data to 3rd parties or something like that. This article here doesn't say anything like that.


When setting up (that's immediately when user enables it in settings) Opera VPN sends few API requests to https://api.surfeasy.com to obtain credentials and proxy IPs, see below, also see The Oprah Proxy.

The browser then talks to a proxy de0.opera-proxy.net (when VPN location is set to Germany), it's IP address can only be resolved from within Opera when VPN is on, it's 185.108.219.42 (or similar, see below). It's an HTTP/S proxy which requires auth.

commit 3f5e3bdbb45bc2cd9ae95972420eb11b0340f120
Author: Matthew Garrett <mjg59@coreos.com>
Date: Mon Feb 1 13:31:00 2016 +1100
Block most UEFI variable deletions
Some systems appear to become upset if certain UEFI non-volatile variables
are delted, to the point of no longer POSTing successfully. For a short-term
fix, let's just block deletion of most variables while we figure out a
better approach.
@freundTech
freundTech / js-horror.js
Last active January 24, 2020 22:21
Possibly the worst JavaScript ever written
this[([]+!![])[!![]+!![]+!![]]+"v"+([]+![])[![]+!![]]+([]+![])[!![]+!![]]](([]+![])[![]+![]]+([]+[][[]])[![]+![]]+([]+[][[]])[![]+!![]]+([]+typeof([]))[!![]+!![]+!![]+!![]]+([]+!![])[![]+![]]+([]+[][[]])[!![]+!![]+!![]+!![]+!![]]+([]+typeof([]))[![]+![]]+([]+[][[]])[![]+!![]]+" "+([]+![])[![]+!![]]+([]+!![])[![]+!![]]+([]+!![])[![]+!![]]+([]+![])[![]+!![]]+"y"+([]+[][[]])[!![]+!![]+!![]+!![]+!![]]+([]+![])[![]+![]]+"y"+"("+([]+!![])[![]+![]]+")"+"{"+"v"+([]+![])[![]+!![]]+([]+!![])[![]+!![]]+" "+([]+typeof([]))[![]+![]]+"="+"{"+([]+![])[![]+!![]]+":"+"\""+"("+"["+"]"+"+"+"!"+"["+"]"+")"+"["+"!"+"["+"]"+"+"+"!"+"!"+"["+"]"+"]"+"\""+","+(typeof(![]))[![]+![]]+":"+"\""+"("+([]+!![])[![]+![]]+"y"+"p"+([]+!![])[!![]+!![]+!![]]+([]+typeof([]))[![]+![]]+([]+![])[![]+![]]+"("+"!"+"["+"]"+")"+")"+"["+"!"+"["+"]"+"+"+"!"+"["+"]"+"]"+"\""+","+([]+typeof([]))[!![]+!![]+!![]+!![]]+":"+"\""+"("+"["+"]"+"+"+([]+!![])[![]+![]]+"y"+"p"+([]+!![])[!![]+!![]+!![]]+([]+typeof([]))[![]+![]]+([]+![])[![]+![]]+"("+"["+"]"+")"+")"+"[
@zchee
zchee / kernel-debug-kit-10.10.4-build-14E46
Created July 3, 2015 10:39
Kernel Debug Kit 10.10.4 build 14E46
OS X Yosemite Kernel Debug Kit Read Me
Please Note: After installation, the Kernel Debug Kit will be available at:
/Library/Developer/KDKs/
———————————————————————————————
The kernel file location has changed.
The kernel file location has moved to /System/Library/Kernels/kernel
DEVELOPMENT and DEBUG kernels
The OS X Yosemite Kernel Debug Kit includes the DEVELOPMENT and DEBUG kernel builds. These both have additional assertions and error checking compared to the RELEASE kernel. The DEVELOPMENT kernel can be used for every-day use and has minimal performance overhead, while the DEBUG kernel has much more error checking.