Skip to content

Instantly share code, notes, and snippets.

@AlLongley
AlLongley / CLSIDS.md
Last active May 1, 2024 14:05
WinInternals Notes
Write-Host "Hello World, via powershell cradle"
@AlLongley
AlLongley / exo_token.ps1
Created November 19, 2023 02:32
PowerShell Microsoft Graph/ExchangeOnline/API FUN
# There's no simple built-in equivalent of the powershell Get-AzAccessToken to dump the active Auth/Bearer/token
# from the session initiated with Connect-ExchangeOnline
# This dumps all active sessions in current PoSH context
[Microsoft.Exchange.Management.ExoPowershellSnapin.ConnectionContextFactory]::GetAllConnectionContexts() | ConvertTo-JSON
[Microsoft.Exchange.Management.ExoPowershellSnapin.ConnectionContextFactory]::GetAllConnectionContexts() | select PowerShellTokenInfo | ConvertTo-JSON
[Microsoft.Exchange.Management.ExoPowershellSnapin.ConnectionContextFactory]::GetAllConnectionContexts() | Where-Object {-not [System.String]::IsNullOrEmpty($_.PowerShellCredentials)} | select PowerShellTokenInfo | ConvertTo-JSON
@AlLongley
AlLongley / HAX.md
Last active September 18, 2023 06:05
AlLongley's HAX: Assorted CTF and tomfoolery snippets
@AlLongley
AlLongley / crt_sh_psql.sh
Created January 6, 2023 23:24
Fast DNS subdomain SSL certificate lookup directly from CRT.SH database crt_sh_psql.sh
#!/bin/bash
if [ "x$1" = "x" ];
then echo "You need to specify an input file containing domain names to iterate over!";echo "Usage: $0 list_of_domain_names.txt"
exit;
fi
if ! [ -x "$(command -v psql)" ]; then
echo 'Error: psql is not installed.' >&2
echo 'Try installing it: sudo apt install postgresql-client' >&2
Write-Host EXPLOITED
<?php phpinfo() ?>
@AlLongley
AlLongley / wat_5.zip
Last active February 13, 2021 05:18
Notepad++ LNK bomb
import glob
#AppData\Local\Google\Chrome\User Data\Default\shared_proto_db\*"
logfiles = glob.glob("*.ldb")
logfiles.extend(glob.glob("*.log"))
for fname in logfiles:
with open(fname,'rb') as fd:
ldbfile = fd.read()
downloads=[]
for entry in ldbfile.split(b'21_download,')[1:]: