Skip to content

Instantly share code, notes, and snippets.

$NumberOfLogicalProcessors = Get-CimInstance win32_processor | Select-Object -ExpandProperty NumberOfLogicalProcessors
ForEach ($core in 1..$NumberOfLogicalProcessors) {
start-job -ScriptBlock {
$result = 1;
foreach ($loopnumber in 1..2147483647) {
$result = 1;
foreach ($loopnumber1 in 1..2147483647) {
$result = 1;
@jimbrig
jimbrig / ps_Errors.ps1
Created August 3, 2023 18:56 — forked from techthoughts2/ps_Errors.ps1
Working with PowerShell Errors
function Reset-Errors {
$Global:Error.Clear()
$psISE.Options.ErrorForegroundColor = '#FFFF0000'
$Global:ErrorView = 'NormalView'
}
Reset-Errors
#generate an error
function Show-Error {
Get-Item c:\doesnotexist.txt
@jimbrig
jimbrig / extract_har.py
Created August 3, 2023 00:34 — forked from Lewiscowles1986/extract_har.py
Python 3 script to extract images from HTTP Archive (HAR) files
import json
import base64
import os
# make sure the output directory exists before running!
folder = os.path.join(os.getcwd(), "imgs")
with open("src.har", "r") as f:
har = json.loads(f.read())
@jimbrig
jimbrig / Invoke-WDigest.ps1
Created July 21, 2023 23:45 — forked from r00t-3xp10it/Invoke-WDigest.ps1
WDigest credential caching [Memory]
<#
.SYNOPSIS
WDigest credential caching [Memory]
Author: @r00t-3xp10it
Credits: @wh0nsq [BypassCredGuard.exe]
Credits: @BenjaminDelpy [mi`mi`katz.exe]
Tested Under: Windows 10 (19044) x64 bits
Required Dependencies: Administrator privileges
Optional Dependencies: WDigest, BypassCredGuard.exe
@jimbrig
jimbrig / Invoke-VaultCmd.ps1
Created July 21, 2023 23:45 — forked from r00t-3xp10it/Invoke-VaultCmd.ps1
Manage Windows Password Vault Items
<#
.SYNOPSIS
Manage Windows Password Vault Items
Author: @r00t-3xp10it
Tested Under: Windows 10 (19044) x64 bits
Required Dependencies: VaultSvc, VaultCmd
Optional Dependencies: none
PS cmdlet Dev version: v1.3.8
@jimbrig
jimbrig / Find-Strings.ps1
Created July 21, 2023 23:45 — forked from r00t-3xp10it/Find-Strings.ps1
Search for strings inside files
<#
.SYNOPSIS
Search for Strings\Regex inside files
Author: @r00t-3xp10it (ssa redteam)
Tested Under: Windows 10 (19044) x64 bits
Required Dependencies: none
Optional Dependencies: VaultSvc, VaultCmd
PS cmdlet Dev version: v1.1.21
@jimbrig
jimbrig / Get-ComputerGeolocation.ps1
Created July 21, 2023 23:45 — forked from r00t-3xp10it/Get-ComputerGeolocation.ps1
Retrieves the Computer's geographical location
<#
.SYNOPSIS
Retrieves the Computer's geographical location
Author: @r00t-3xp10it
Addapted from: @colsw {stackoverflow}
Tested Under: Windows 10 (19044) x64 bits
Required Dependencies: Device.Location.GeoCoordinateWatcher
Optional Dependencies: Curl\ipapi.co {native}
PS cmdlet Dev version: v1.0.3
@jimbrig
jimbrig / Invoke-LazySign.ps1
Created July 21, 2023 23:45 — forked from r00t-3xp10it/Invoke-LazySign.ps1
Sign a Windows binary with a self-signed certificate
<#
.SYNOPSIS
Sign a Windows binary with a self-signed certificate
Author: @r00t-3xp10it (ssa redteam)
Tested Under: Windows 10 (19043) x64 bits
Required Dependencies: Administrator privileges
Optional Dependencies: New-SelfSignedCertificate
PS cmdlet Dev version: v1.0.6
@jimbrig
jimbrig / WindowsUpdateLog.ps1
Created July 21, 2023 23:45 — forked from r00t-3xp10it/WindowsUpdateLog.ps1
Convert ETL logfiles into readable data
<#
.SYNOPSIS
Convert ETL logfiles into readable data
Author: @r00t-3xp10it (ssa redteam)
Tested Under: Windows 10 (19043) x64 bits
Required Dependencies: Get-WindowsUpdateLog {native}
Optional Dependencies: none
PS cmdlet Dev version: v1.1.8
@jimbrig
jimbrig / DLLSearch.ps1
Created July 21, 2023 23:44 — forked from r00t-3xp10it/DLLSearch.ps1
List DLLs loaded by running processes!
<#
.SYNOPSIS
List DLLs loaded by running processes!
Author: @r00t-3xp10it
Tested Under: Windows 10 (19043) x64 bits
Required Dependencies: Get-Process {native}
Optional Dependencies: none
PS cmdlet Dev version: v1.0.3