| 제목 | Netcore磊科 Router Firmware NAP930 V0.1.241010.141410 Use of Hard-coded Cryptographic Key |
|---|
| 설명 | A use of hard-coded cryptographic key vulnerability (CWE-798/CWE-321) was identified in the Netcore NAP930 WiFi 6 access point, firmware version V0.1.241010.141410 (OpenWrt 21.02-SNAPSHOT, mediatek/mt7981, aarch64 cortex-a53).
The configuration backup/restore library /lib/functions/backup_common.sh, used by the /cgi-bin/backup web endpoint (uhttpd, ports 80/443/23355), encrypts and decrypts configuration archives with a hard-coded passphrase:
aes_pass="netcore123"
openssl enc -e -aes-128-cbc -pbkdf2 -in backup.tar.gz -out backup.tar.gz_aes -pass pass:$aes_pass
The passphrase is embedded in the read-only firmware (squashfs), identical on every unit of this firmware line, never rotated, and trivially extractable from the vendor's public firmware image (visible with strings). The AES-128-CBC envelope therefore provides no confidentiality against anyone who can read the firmware.
An authenticated user (any valid web session; factory-fresh devices ship with an empty root password) downloads the archive via:
GET /cgi-bin/backup?action=backup&sid=<32-hex session id>
The downloaded file (e.g. 19008 bytes, "openssl enc'd data with salted password") is decrypted offline with one command:
openssl enc -d -aes-128-cbc -pbkdf2 -pass pass:netcore123 -in backup.tar.gz -out plain.tgz && tar xzf plain.tgz
yielding the complete /etc/config tree: Wi-Fi SSID and passphrase (wificfg), DDNS/VPN account passwords (ddns, vpn_client), network topology, management and MAC data.
The same key also decrypts on restore: a forged backup containing etc/config/model.bak with the device's up_model value bypasses the model check, after which "tar -C / -xzf" extracts attacker-controlled relative paths to absolute locations as root (e.g. etc/rc.d/S99backdoor) - an arbitrary-file-write to RCE path for sibling firmware sharing this library. On this exact firmware the restore path is currently blocked by an unrelated build defect (/usr/bin/truncate is a symlink to /dev/null, so the multipart footer is never stripped and decryption fails with result:[2]); the disclosure direction (action=backup) is fully exploitable.
Impact: complete offline disclosure of device configuration - Wi-Fi credentials granting immediate network access to physically proximate attackers, reusable third-party DDNS/VPN credentials, and internal topology data; plus a forged-backdoor restore primitive on affected sibling firmware.
The vulnerability was dynamically verified against the firmware emulated with qemu-aarch64 user-mode emulation: a backup downloaded via action=backup was decrypted with the hard-coded passphrase (openssl exit 0), yielding the full configuration tree; the forged-restore arbitrary write (etc/pwned_by_restore written to /etc/ as root with a repaired truncate) and the on-device rejection with the original broken truncate were both reproduced. |
|---|
| 원천 | ⚠️ https://github.com/senxitoyshuyi-ui/HACKALL/blob/main/netcore_NAP930%20V0.1.241010.141410%20Router/NAP930_backup_hardcoded_aes_key.md |
|---|
| 사용자 | yyycl (UID 100580) |
|---|
| 제출 | 2026. 08. 15. PM 01:02 (2 개월 ago) |
|---|
| 모더레이션 | 2026. 09. 28. PM 08:38 (1 month later) |
|---|
| 상태 | 수락 |
|---|
| VulDB 항목 | 411140 [Netcore NAP930 0.1.241010.141410 Backup/Restore backup_common.sh aes_pass 약한 암호화] |
|---|
| 포인트들 | 20 |
|---|