Skip to content

Instantly share code, notes, and snippets.

View co-devs's full-sized avatar
🏔️
things are happening

Mike Devens co-devs

🏔️
things are happening
View GitHub Profile
@co-devs
co-devs / dir-bytes-print.ps1
Created October 20, 2020 17:21
Print first 32 bytes of each file in dir
$files = gci ./; foreach ($f in $files) {writeoutput `n`n$f; $bytes = get-content $f.FullName -encoding byte -totalcount 32; write-output $bytes | format-hex}
$ip='10.0.0.1';([System.Net.Dns]::GetHostByAddress($ip).HostName)
@co-devs
co-devs / sysmon_lolbas_profiler.ps1
Created June 15, 2020 14:38 — forked from leoloobeek/sysmon_lolbas_profiler.ps1
Profile Sysmon logs to discover which LOLBAS binaries have ran and what they're command line arguments were
#https://github.com/LOLBAS-Project/LOLBAS
$lolbins = @("Atbroker.exe","Bash.exe","Bitsadmin.exe","Certutil.exe","Cmdkey.exe","Cmstp.exe","Control.exe","Csc.exe","Dfsvc.exe","Diskshadow.exe","Dnscmd.exe","Esentutl.exe","Eventvwr.exe","Expand.exe","Extexport.exe","Extrac32.exe","Findstr.exe","Forfiles.exe","Ftp.exe","Gpscript.exe","Hh.exe","Ie4uinit.exe","Ieexec.exe","Infdefaultinstall.exe","Installutil.exe","Makecab.exe","Mavinject.exe","Microsoft.Workflow.Compiler.exe","Mmc.exe","Msbuild.exe","Msconfig.exe","Msdt.exe","Mshta.exe","Msiexec.exe","Odbcconf.exe","Pcalua.exe","Pcwrun.exe","Presentationhost.exe","Print.exe","Reg.exe","Regasm.exe","Regedit.exe","Register-cimprovider.exe","Regsvcs.exe","Regsvr32.exe","Replace.exe","Rpcping.exe","Rundll32.exe","Runonce.exe","Runscripthelper.exe","Sc.exe","Schtasks.exe","Scriptrunner.exe","SyncAppvPublishingServer.exe","Verclsid.exe","Wab.exe","Wmic.exe","Wscript.exe","Xwizard.exe","Appvlp.exe","Bginfo.exe","Cdb.exe","csi.exe","dnx.exe","Dxcap.exe","Mftrace.exe","Msdep
iex([System.Text.Encoding]::Unicode.GetString([System.Convert]::FromBase64String('aQBlAHgAKABOAGUAdwAtAE8AYgBqAGUAYwB0ACAAUwB5AHMAdABlAG0ALgBOAGUAdAAuAFcAZQBiAEMAbABpAGUAbgB0ACkALgBEAG8AdwBuAGwAbwBhAGQAUwB0AHIAaQBuAGcAKAAnAGgAdAB0AHAAcwA6AC8ALwBnAGkAcwB0AC4AZwBpAHQAaAB1AGIAdQBzAGUAcgBjAG8AbgB0AGUAbgB0AC4AYwBvAG0ALwBjAG8ALQBkAGUAdgBzAC8ANgA1AGUAMAA3ADEANgAwAGQANAA2AGYANwA2AGEAMgAyADUAOQBkAGYAYQBkADkAZgAyAGMAYwAzAGUAZABiAC8AcgBhAHcALwBjADgAMwA5ADcAMQAwADMAOABkADcAMgA1ADgAOABlAGUAOQBjADAAYgBlADIAOAA4AGMAMgA5ADkANwA1ADkAMQBlADkAYwAxAGEAZgBmAC8AYwBhAHQALQBmAGEAYwB0AHMALgBwAHMAMQAnACkA')))
Add-Type -AssemblyName System.Speech
$SpeechSynth = New-Object System.Speech.Synthesis.SpeechSynthesizer
$CatFact = (ConvertFrom-Json (Invoke-WebRequest -Uri 'https://catfact.ninja/fact' -UseBasicParsing)).fact
$SpeechSynth.Speak("did you know?")
$SpeechSynth.Speak($CatFact)
@co-devs
co-devs / windows_hardening.cmd
Created May 11, 2020 02:23 — forked from mackwage/windows_hardening.cmd
Script to perform some hardening of Windows OS
:: Windows 10 Hardening Script
:: This is based mostly on my own personal research and testing. My objective is to secure/harden Windows 10 as much as possible while not impacting usability at all. (Think being able to run on this computer's of family members so secure them but not increase the chances of them having to call you to troubleshoot something related to it later on). References for virtually all settings can be found at the bottom. Just before the references section, you will always find several security settings commented out as they could lead to compatibility issues in common consumer setups but they're worth considering.
:: Obligatory 'views are my own'. :)
:: Thank you @jaredhaight for the Win Firewall config recommendations!
:: Thank you @ricardojba for the DLL Safe Order Search reg key!
:: Thank you @jessicaknotts for the help on testing Exploit Guard configs and checking privacy settings!
:: Best script I've found for Debloating Windows 10: https://github.com/Sycnex/Windows10Debloater
:
#!/bin/sh
colordiff -yW"`tput cols`" $1 $2 | less -r

Keybase proof

I hereby claim:

  • I am co-devs on github.
  • I am codevs (https://keybase.io/codevs) on keybase.
  • I have a public key ASB3sjJV0g5jd-vRWuG-eCZhzUG5gwMgYhrYuKnnN3T-Kgo

To claim this, I am signing this object: