Skip to content

Instantly share code, notes, and snippets.

View magisterquis's full-sized avatar

Stuart magisterquis

View GitHub Profile
@magisterquis
magisterquis / dfdemoserver.go
Created October 26, 2019 17:37
HTTP fileserver which allows domain fronting
// Program dfdemoserver is an HTTP fileserver which allows domain fronting,
// meant for demos.
package main
/*
* dfdemoserver.go
* HTTP fileserver which allows domain fronting
* By J. Stuart McMurray
* Created 20190922
* Last Modified 20190922
@magisterquis
magisterquis / domainfront.go
Last active January 11, 2023 14:34
Domain fronting in Go
package main
import (
"crypto/tls"
"fmt"
"log"
"net/http"
"net/http/httputil"
)
@magisterquis
magisterquis / notes
Last active October 12, 2019 14:23
Notes and links for "Unix Admins, Go H4x0r!" demo, BSides Puerto Rico 2019
Link to the slides: https://docs.google.com/presentation/d/1D5_68h5EgEYCRDh_gpVRUc22xazUf5s0u7wBK_C8zkQ
Speakers' twitter handles: @fin_ack (Fernando)
@magisterquis (Stuart)
Commands executed during the demo:
ssh -v joe@10.1.1.5
ps awwwfux
egrep -A1 '^[sudo]{4}' .*history
sudo -l
@magisterquis
magisterquis / tapup.c
Last active September 11, 2019 17:38
/*
* tapup.c
* Bring up a tap device and discard frames
* By J. Stuart McMurray
* Created 20190911
* Last Modified 20190911
*/
#include <linux/if.h>
#include <linux/if_tun.h>
@magisterquis
magisterquis / qddoh.go
Last active August 5, 2019 09:33
Quick and Dirty DNS-over-HTTPS in Go
package main
import (
"encoding/base64"
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
@magisterquis
magisterquis / offensive_pcap_links
Last active October 1, 2019 04:35
Links for Offensive PCAP
@magisterquis
magisterquis / pcaphelloworld.c
Last active November 21, 2022 21:26
Hello, World! using pcap_inject.
/*
* pcaphelloworld.c
* Simple libpcap program
* By J. Stuart McMurray
* Created 20190527
* Last Modified 20190527
*/
#include <arpa/inet.h>
@magisterquis
magisterquis / evershell.c
Created February 10, 2019 03:10
Evershell, a little library that gets loaded by ld.so.preload.
/*
* evershell.c
* Little library to spawn a shell
* By J. Stuart McMurray
* Created 20190109
* Last Modified 20190109
*/
#include <sys/socket.h>
#include <sys/wait.h>
@magisterquis
magisterquis / quickdohtest.sh
Created October 26, 2018 21:09
Quick DNS over HTTPS test
https://dns.google.com/resolve?type=A&name=5468697320697320612074657374.example.com