Skip to content

Instantly share code, notes, and snippets.

@timsonner
timsonner / debian-debloat.md
Last active February 1, 2026 18:01
Debloat script / after fresh install

Remove bloat from Gnome/Debian Trixie

sudo apt purge --autoremove -y \
  gnome-software gnome-software-plugin-deb gnome-software-plugin-fwupd \
  "libreoffice*" "mythes-*" "hyphen-*" "hunspell-*" \
  "fcitx*" "mozc*" "anthy*" ibus-anthy \
  "hdate*" libhdate-common \
  "dict-*" "goldendict*" \
  "mlterm*" xiterm+thai \
  thunderbird yelp \
@timsonner
timsonner / exploit.py
Last active January 2, 2026 05:00
CVE-2024-25600 (Bricks Builder RCE)
# CVE-2024-25600 (Bricks Builder RCE)
import requests
import sys
import urllib3
import re
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
def fetch_nonce(target_url):

Bash Bangers

Copy 1st line from file, insert into first line of another file

awk 'NR==1' test.py | xargs -I{} sed -i '1s/.*/{}/' slice.py

Setup Python debugger pdb in file

Parse failed logins - Linux

Extract IP addresses from /var/log/secure

grep -Eo '\b([0-9]{1,3}\.){3}[0-9]{1,3}\b' /var/log/secure | sort| uniq -u

Extract usernames from failed login attempts from lastb

lastb | awk '{print $1}' | sort | uniq -u
@timsonner
timsonner / kali-setup.md
Last active June 6, 2025 07:34
Remove firefox, libreoffice, and kali-desktop-xfce. Install Edge, VS Code, Git, Xfce, and Synaptics DisplayLink driver.

Kali setup

# Get rid of Kali xfce
apt remove kali-desktop-xfce --allow-remove-essential
apt purge kali-desktop-xfce --autoremove
# Install xfce
apt install xfce4 lightdm
# Get rid of firefox
apt remove firefox-esr --allow-remove-essential
@timsonner
timsonner / ssh-setup.md
Created May 18, 2025 18:22
Linux SSH server setup and key pair generation

Linux SSH server setup and key pair generation

SSH server setup

# Install SSH server
apt install openssh-server
# Enable SSH server on startup
systemctl enable ssh
# Check SSH server status
systemctl status ssh
@timsonner
timsonner / opencti-docker-setup.md
Created May 18, 2025 17:44
OpenCTI docker setup for MacOS

OpenCTI docker setup for MacOS

Clone OpenCTI repo

git clone https://github.com/OpenCTI-Platform/docker.git
cd docker

Create .env file for OpenCTI setup for MacOS (use official docs for windows/linux)

create-env.sh

@timsonner
timsonner / proxmox-setup.md
Last active April 27, 2025 20:37
ProxMox developer workstation config notes

ProxMox Developer Workstation setup

  • Install ProxMox as usual
  • Edit /etc/network/interfaces to reflect the correct IP and interface of ethernet adapter
  • Edit /etc/resolv.conf to reflect DNS server, likely gateway of router or switch

Once internet connection established, install gnome

apt install gnome
@timsonner
timsonner / triage-security-events.md
Created April 13, 2025 12:34
Powershell. Lookup Windows security events quickly to corelate activity.
@timsonner
timsonner / reflective-pe-load.ps1
Created March 12, 2025 02:29
Load an executable into memory without touching disk using PowerShell to reflectively load a c# type
# Reflectively load a PE file
$code = @"
using System;
using System.Runtime.InteropServices;
using System.IO;
public class PELoader
{
[DllImport("kernel32.dll", SetLastError = true)]
private static extern IntPtr GetCurrentProcess();