GRUB Security Lab: Boot-Time Privilege Escalation & Hardening

Attack Simulation: Gaining Root Access via GRUB Objective Demonstrate how physical access to a Linux system can be abused to gain root privileges by modifying GRUB boot parameters. Prerequisites OS: Linux Ubuntu Access to GRUB menu during boot No GRUB password protection enabled Attack Steps Reboot the system and access the GRUB menu. Select the default Linux entry and press e to edit boot parameters. Locate the line starting with: linux /boot/vmlinuz-… Modify the line Boot the modified entry using Ctrl + X ...

June 11, 2026 · 2 min

USB Automounting with systemd

Objective Setting up automatic USB drive mounting on a Linux server using systemd mount and automount units Environment OS: Ubuntu Tools: system, USB drive Step 1 - Find Partition UUID Prerequisite: Plugin USB drive blkid /dev/sdb1 Note: UUID and filesystem type Step 2 - Create the Mount Unit sudo nano /etc/systemd/system/mnt-usb.mount Step 3 - Create Automount Unit sudo nano /etc/systemd/system/mnt-usb.automount Step 4 - Enable and Start sudo systemctl enable mnt-usb.automount sudo systemctl start mnt-usb.automount Step 5 - Verify and test Check the automount is active: ...

June 6, 2026 · 1 min

DNS Lab - Dnsmasq, Client resolver, Caching

🧪 DNS Lab 📌 Objective Understand DNS from a systems perpective ⚙️ Environment Virtualization: VirtualBox OS: ( 1 DNS Server VM + 1 Client VM) 🛠️ Lab Network Topology 🧩 Phase 1 — Direct DNS (No Cache) Client VM -> dnsmasq (192.168.10.10) Used for: Break #1 (Wrong DNS Server) Break #2 (Wrong DNS Record) 🧩 Phase 2 — Direct DNS (No Cache) Clint VM -> systemd-resolved (127.0.0.53) [CACHE] -> dnsmasq (192.168.10.10) [DNS SERVER] ...

May 5, 2026 · 2 min

Systemd Restart Behavior: Why Restart=on-failure Didn't Work

🧪 Systemd Service Restart Behavior Lab 📌 Objective To test and understand how systemd handles automatic service restarts using the Restart=on-failure policy. ⚙️ Environment OS: Ubuntu (systemd-based) Tools: systemctl, journalctl, bash 🛠️ Setup 1. Create a test script sudo nano /usr/local/bin/labtest.sh #!/bin/bash while true; do echo "lab service is alive: $(date)" sleep 10 done Make it executable: sudo chmod +x /usr/local/bin/labtest.sh 2. Create a system service sudo nano /etc/systemd/system/labtest.service [Unit] Description=Lab test service After=network.target [Service] ExecStart=/usr/local/bin/labtest.sh Restart=on-failure StandardOutput=journal [Install] WantedBy=multi-user.target Step 3 — Start the service sudo systemctl daemon-reload sudo systemctl enable labtest sudo systemctl start labtest systemctl status labtest ...

April 14, 2026 · 2 min