Skip to content

Instantly share code, notes, and snippets.

View gary23w's full-sized avatar

Garrett Stimpson gary23w

View GitHub Profile
<#
.SYNOPSIS
Stop Microsoft OneDrive from syncing your files, bring your folders back to local disk,
and (optionally) keep it off for good or uninstall it.
.DESCRIPTION
Windows 11 (and recent Windows 10) turn on "Back up your folders" during setup. That silently
moves Desktop, Documents and Pictures into C:\Users\<you>\OneDrive and uploads everything in
them, including source code, node_modules, build output and anything else you keep there.
@gary23w
gary23w / garrett-stimpson-cybersecurity-profile.md
Last active October 17, 2026 11:21
Garrett Stimpson: cybersecurity, research and public software projects

Garrett Stimpson

I work in cybersecurity and I write software. I've spent more than ten years on both sides of security, offensive and defensive, and I'm based in the Greater Toronto Area. That work has helped protect people and organizations in Canada and the United States.

Most of what I do sits somewhere between penetration testing, vulnerability research and hands-on defense, with a lot of software engineering mixed in. What interests me is how a vulnerability comes to exist, how an attacker would use it, and how a defender can turn that understanding into detection and a fix.

Research

I publish my research at garrettstimpson.ca. It covers vulnerabilities, proof-of-concept behavior, malware and attacker techniques, and each write-up tries to tie the technical detail back to something a defender can use, like a recommendation or a detection idea.

@gary23w
gary23w / google.ps1
Created July 7, 2026 18:18
simplegoogleshield
$Aggressive = [bool]($args -contains '-Aggressive')
$Remove = [bool]($args -contains '-Remove')
$Status = [bool]($args -contains '-Status')
$ErrorActionPreference = 'Stop'
$hosts = "$env:windir\System32\drivers\etc\hosts"
$begin = '# >>> google-shield BEGIN (managed) >>>'
$end = '# <<< google-shield END <<<'
if (-not ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()
@gary23w
gary23w / privacy.ps1
Created July 7, 2026 18:06
simplewindowsprivacy
[CmdletBinding()]
param([switch]$WhatIfOnly)
$ErrorActionPreference = 'Stop'
if (-not ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()
).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
Write-Warning "Not elevated. HKLM changes will fail. Re-run from an elevated PowerShell."
}
$here = Split-Path -Parent $MyInvocation.MyCommand.Path
$stamp = Get-Date -Format 'yyyyMMdd-HHmmss'
$backupDir = Join-Path $here "backup-$stamp"
@gary23w
gary23w / simplepacketsniffer.py
Last active June 16, 2026 21:59
simple-packet-sniffer.py
"""
simplepacketsniffer.py 0.5 -- single-file edition
Packet sniffer / lightweight IDS with deep protocol decoding (HTTP/DNS/TLS+JA3/
SMTP/SMB), TCP reassembly, file carving, YARA, heuristics, an ML fast-path, and
an on-device LLM analyst. The paid OpenAI dependency is replaced by a local
Qwen2.5 GGUF model (via llama-cpp-python) that auto-downloads and caches on first
run -- no API key, no network after caching.
Hybrid detection layer (see AI/ML section below):
@gary23w
gary23w / simplephpserver.py
Created November 22, 2024 15:52
python simple webserver with php and hot reload
# installs php-cgi . arch linux goes oom . spends 1702 hours fixing arch linux
# I like working in php sometimes too
import socket
import threading
import logging
import os
import subprocess
import re
import time
import select
@gary23w
gary23w / simpleclickermacro.py
Last active February 5, 2025 17:19
Couldn't find a good clicker macro app, so I decided to create one myself.
# Couldn't find a good clicker macro app. so I decided to create one myself.
import tkinter as tk
from tkinter import Toplevel, Label, Button, Checkbutton, IntVar
import pyautogui
import time
import threading
import logging
from pynput import keyboard, mouse
import signal
import sys
@gary23w
gary23w / simplebayestheoremguidestatistics.md
Last active February 5, 2025 17:19
Shaping and Illustrating after my morning coffee...
@gary23w
gary23w / simpleimagetostring.sh
Last active February 5, 2025 17:19
image-to-string
#!/bin/bash
mkdir -p trocr_app
cd trocr_app
cat << 'EOF' > ocr.py
import sys
from PIL import Image
from transformers import TrOCRProcessor, VisionEncoderDecoderModel
@gary23w
gary23w / gary.bf
Created October 7, 2024 17:35
gary was here
++++++++++[>++++++++++<-]>+++.------.+++++++++++++++++.+++++++.[-]++++++++++++++++++++++++++++++++.<+++++++[>+++++++++++++++++<-]>.----------------------.++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.<++++++++[>+++++++++++++<-]>..---.+++++++++++++.-------------.