hardcoded-creds
Skill này làm gì
Hướng dẫn này nói về việc tìm mật khẩu, khóa và tài khoản mặc định có sẵn trong firmware thiết bị. Dành cho nhóm bảo mật sản phẩm muốn gỡ chúng trước khi xuất xưởng hoặc xác nhận chúng đã không còn.
Khi nào nên dùng
- ✓Khi một nhóm sản phẩm giải nén firmware của chính họ và muốn tìm mật khẩu có sẵn.
- ✓Khi một thiết bị có tài khoản quản trị mặc định có thể chưa được đổi.
- ✓Khi chứng chỉ hoặc khóa đám mây có thể được lưu dạng văn bản thuần trong ảnh thiết bị.
Liên kết skill
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/iot/hardcoded-creds/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Bạn có thể tìm trong firmware đã trích xuất của chúng tôi các mật khẩu có sẵn, tài khoản mặc định hoặc khóa nhúng mà khách hàng không nên có không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent kiểm tra các file tài khoản, file cấu hình và chuỗi ký tự trong hệ thống file đã trích xuất, rồi báo cáo thông tin đăng nhập tìm được và khuyên gỡ bỏ chúng.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Hardcoded Credentials
Extracted rootfs often contains plaintext or weakly hashed credentials, embedded TLS private keys, cloud API tokens, and hardcoded admin accounts. This playbook covers the full triage path from raw rootfs to validated cred.
Prerequisites
- Extracted rootfs from
binwalk-extractskill (path:/tmp/squashfs_rootor similar). - Tools:
john,hashcat,openssl,trufflehog,strings, standard GNU utilities.
ROOT=/tmp/squashfs_root # set once; referenced throughout
Phase 1 — Account Databases
/etc/passwd + /etc/shadow
# Check for non-standard shells (telnetd, /bin/sh) and disabled-but-present accounts
grep -v "nologin\|false" "$ROOT/etc/passwd"
# Extract hashed passwords
cat "$ROOT/etc/shadow" 2>/dev/null || echo "shadow not present"
# Identify hash types
# $1$ = MD5, $5$ = SHA-256, $6$ = SHA-512, $y$ = yescrypt, no-$ = DES
awk -F: '{print $1, $2}' "$ROOT/etc/shadow" | grep -v '^\*\|^!\|^:$'
# Crack with hashcat (shadow format)
hashcat -m 1800 "$ROOT/etc/shadow" /usr/share/wordlists/rockyou.txt # $6$ SHA-512
hashcat -m 500 "$ROOT/etc/shadow" /usr/share/wordlists/rockyou.txt # $1$ MD5
hashcat -m 1500 "$ROOT/etc/shadow" /usr/share/wordlists/rockyou.txt # DES
# john fallback (handles multi-type auto)
unshadow "$ROOT/etc/passwd" "$ROOT/etc/shadow" > /tmp/unshadowed.txt
john /tmp/unshadowed.txt --wordlist=/usr/share/wordlists/rockyou.txt
john /tmp/unshadowed.txt --show
BusyBox-specific user configs
# BusyBox httpd uses /etc/httpd.conf for auth
find "$ROOT/etc" -name "httpd.conf" -o -name ".htpasswd" | xargs cat 2>/dev/null
# BusyBox udhcpd / telnetd startup stanzas
grep -r "telnetd\|login\|password" "$ROOT/etc/inittab" "$ROOT/etc/init.d/" \
"$ROOT/etc/rc.d/" 2>/dev/null | grep -v "^Binary"
# BusyBox shadow format check (some use MD5 without $1$ prefix)
grep -E '^[^:]+:[^:!*]{3,}' "$ROOT/etc/shadow" 2>/dev/null
Phase 2 — SSH / Dropbear Keys
# Host keys (baked into firmware = same key across all units of same model)
find "$ROOT" -name "dropbear_*_host_key" -o -name "ssh_host_*_key" 2>/dev/null
# Convert Dropbear key to OpenSSH PEM for use
dropbearconvert dropbear openssh "$ROOT/etc/dropbear/dropbear_rsa_host_key" \
/tmp/host_rsa.pem
openssl rsa -in /tmp/host_rsa.pem -text -noout | head -20
# Authorized keys embedded for backdoor accounts
find "$ROOT" -path "*/.ssh/authorized_keys" | xargs cat 2>/dev/null
# Check if root has a passwordless authorized_key → instant SSH root on any unit
grep -r "authorized_keys\|ssh-rsa\|ecdsa-sha2" "$ROOT" 2>/dev/null | head -10
Phase 3 — Web Interface Credentials
# CGI / Lua / PHP / lighttpd configs
find "$ROOT" -name "*.lua" -o -name "*.cgi" -o -name "*.php" | \
xargs grep -l "password\|passwd\|credential\|secret\|admin" 2>/dev/null | head -20
# Plaintext credentials in web config files
grep -rn "admin\|password\|passwd\|secret\|token" \
"$ROOT/etc/lighttpd/" "$ROOT/etc/nginx/" "$ROOT/etc/httpd/" 2>/dev/null
# Hardcoded credentials in Lua/CGI scripts
grep -rn '"admin"\|"root"\|"1234"\|"password"' "$ROOT/usr/lib/lua/" \
"$ROOT/www/" "$ROOT/usr/share/www/" 2>/dev/null | head -30
Phase 4 — Strings-Based Secret Sweep
# Broad strings dump: capture all printable sequences ≥ 8 chars
find "$ROOT" -type f -executable | while read f; do
strings "$f" 2>/dev/null
done > /tmp/all_strings.txt
# Filter credential-like patterns
grep -iE 'password|passwd|secret|api.?key|token|credential|auth' /tmp/all_strings.txt \
| grep -vE '^(#|//|<!|<html|<head)' | sort -u | head -100
# AWS / GCP / Azure key patterns
grep -E 'AKIA[0-9A-Z]{16}|AIza[0-9A-Za-z_-]{35}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}' \
/tmp/all_strings.txt
# JWT tokens
grep -oP 'eyJ[A-Za-z0-9+/=]+\.[A-Za-z0-9+/=]+\.[A-Za-z0-9+/=_-]+' \
/tmp/all_strings.txt | head -10
trufflehog filesystem scan
# trufflehog works on directories — point at rootfs
trufflehog filesystem "$ROOT" --only-verified 2>/dev/null
# Without --only-verified for broader sweep:
trufflehog filesystem "$ROOT" --json 2>/dev/null | \
python3 -c "import sys,json; [print(json.dumps(r, indent=2)) for r in map(json.loads, sys.stdin)]"
Phase 5 — MQTT / Cloud / IoT-Platform Tokens
# MQTT broker credentials
grep -rn "mqtt\|MQTT\|mosquitto" "$ROOT" --include="*.conf" --include="*.cfg" \
--include="*.json" --incl
Câu hỏi thường gặp
Thông tin đăng nhập thường được tìm thấy ở đâu?
Hướng dẫn chỉ đến các file tài khoản, cấu hình máy chủ web và cài đặt đăng nhập từ xa trong firmware.
Mật khẩu mặc định có phải là rủi ro không?
Có. Hướng dẫn nói các tài khoản mặc định không bao giờ được đổi là một điểm yếu phổ biến.
Đội nên làm gì với một phát hiện?
Gỡ thông tin đăng nhập khỏi firmware và đổi mọi bí mật đã bị lộ.
Chi tiết
Mô tả gốc của tác giả
Systematic hunt for hardcoded credentials, API keys, certificates, and default passwords in extracted IoT firmware. Covers /etc/shadow and passwd parsing, busybox httpd configs, telnet/dropbear stanzas, MQTT/cloud API key extraction, and cross-referencing against known default-credential databases.
Độ phổ biến
- Sao GitHub
- 6.5k
- Vị trí xếp hạng
- #14099
- Giấy phép
- Apache-2.0
- Cập nhật
- 1/11/2026
Bình luận
- …
Thêm skill từ kho mã này
detector-overview
6.5kGiúp agent của bạn đọc code mà một công cụ quét đã đánh dấu, rồi quyết định điểm nào là lỗ hổng bảo mật thật và điểm nào là báo động giả.
exploiter-overview
6.5kGiúp agent của bạn ghép nhiều lỗ hổng bảo mật đã xác nhận thành một chuỗi kiểm thử và kiểm tra chuỗi đó có thể gây hậu quả đến đâu.
llm-redteam-overview
6.5kGiúp agent của bạn tìm đúng hướng dẫn red-team AI cho một bài kiểm thử, bao quát 15 nhóm chiến thuật từ prompt injection đến lạm dụng mô hình.
aatmf-t01-prompt-injection
6.5kGiải thích prompt injection, khi các chỉ dẫn ẩn cố ghi đè một hệ thống AI, để chuyên gia bảo mật có thể kiểm tra lỗi này.
Skill tương tự
reverse-engineer-anything
422kGiúp agent của bạn xem bên trong các app và package đã phát hành để giải thích tính năng, so sánh phiên bản hoặc hướng dẫn dựng lại bằng công cụ REA.
1password
394kGiúp agent của bạn cài đặt CLI của 1Password, đăng nhập, và đọc hoặc đưa thông tin bí mật vào mà không in giá trị ra cuộc trò chuyện.
healthcheck
394kGiúp agent của bạn rà soát bảo mật máy tính hoặc máy chủ đang chạy OpenClaw, như SSH, tường lửa, cập nhật và sao lưu, rồi đề xuất cách sửa an toàn.