Skip to content

Instantly share code, notes, and snippets.

View lf-'s full-sized avatar
💭
GitHub 💧🧊

Jade Lovelace lf-

💭
GitHub 💧🧊
View GitHub Profile
@lf-
lf- / get_essid.c
Last active September 5, 2022 21:34
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <linux/wireless.h>
#include <errno.h>
int main(int argc, const char* argv[]) {
# $Id: PKGBUILD 108637 2014-03-30 21:43:19Z bluewind $
# Maintainer: Florian Pritz <bluewind@xinu.at>
# Contributor: josephgbr <rafael.f.f1@gmail.com>
_pkgbasename=gmp
pkgname=lib32-$_pkgbasename
pkgver=6.0.0
pkgrel=1
pkgdesc="A free library for arbitrary precision arithmetic (32-bit)"
arch=('x86_64')
@lf-
lf- / id_rsa.pub
Created August 30, 2015 17:06
archfiend key
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyd8ONbBImUNCesdvUM6re8KEXCBqC7hnqzvBwBgWdM7Y9U+pXn3YtEw5zmhAlawNNr8R0WyArCyUuhFxWmUyQfCzVNMnxpchgC8DdZ+sr1DV0mEaAl7tTSp2LzvZfXnfq8qdeIsLxCMJjQr7vM5CqyrQHWqdPT5x3J1wnPAGG2zabGLJSA/B/r9aOhFElf1KlFUZWP4PVFrOfqo4Byb/rRIb9eDBUtf1tbU8kzaXcPjMQEKj53VuQ+pCgQhAQjxmFiWNG8zoKuO9AeNXJZCmihuDmkBCrPGoM9D2+iAYT/GEzxC3n0K2xrVCFIEzCUQXyrs0RQ9Q2Tq75mAAxzXxj lf@archfiend
Boot process:
1. EFI runs unencrypted EFI application
2. EFI application gets password, decrypts and runs initrd
3. initrd gets root password, decrypts root
Attack:
Stage 1:
1. EFI runs attacker-controlled EFI application
2. EFI application pretends to be original EFI application, gets password
3. EFI application decrypts initrd, doesn't run it, exfiltrates it along with password
option domain-name "boot.lfcode.ca";
option domain-name-servers 8.8.8.8, 8.8.4.4;
subnet 10.254.0.0 netmask 255.255.255.0 {
option routers 10.254.0.1;
option subnet-mask 255.255.255.0;
range 10.254.0.10 10.254.0.254;
# pxe
filename "pxeboot";
#!/bin/ksh
if [ "x$1" == x ]; then
echo "Usage: $0 ifaces dir" >&2
echo "ifaces -- comma-separated network interfaces" >&2
echo "dir -- path to put output files in" >&2
exit 1
fi
IFS=',' set -A ifaces $1
#!/usr/bin/env python3
import subprocess
import re
import sys
OUTPUT_RE = r'(.+) = (.+)'
PROP_CURRENT = '_NET_CURRENT_DESKTOP(CARDINAL)'
PROP_DESKTOPS = '_NET_DESKTOP_NAMES(UTF8_STRING)'
cat file | python2 -c 'import json,sys;print json.dumps({"files":{"f":{"content":sys.stdin.read()}}})' | curl -d '@-' https://api.github.com/gists | grep -Pom1 '(?<="url": ")(.+)(?=")' | sed 's@api\.@gist.@;s@gists/@@'
import json
import os
import os.path
import platform
import requests
import shutil
import subprocess
import time
@lf-
lf- / fail.js
Created March 12, 2017 06:54
because js
var a = ''
var b = []
if (a == b && !a && b) {
console.log('win')
}