Exploit database

GH-6bd8db4cb1c6f5f0de06552343b4483f

googlesky/cve-2026-129351

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2026-129351

1 source

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.

Repository files1
googlesky/cve-2026-129351Revision 01c9d98171c4

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

lab/firmware/prepare.sh

Shell · 2,391 bytes
#!/usr/bin/env bash
# Fetch the TRENDnet TEW-657BRM v1.0R firmware 1.00.1, verify hashes, and
# unpack the vendor squashfs ("sqlz" magic — squashfs 2.1, big endian, LZMA)
# into lab/src/rootfs. The magic is swapped to the standard v2 big-endian
# "sqsh" and the filesystem is unpacked with sasquatch.
set -euo pipefail

ZIP_NAME="TEW-657BRMv1.0R(1.00.1).zip"
ZIP_URL="https://downloads.trendnet.com/TEW-657BRM/firmware/${ZIP_NAME//(/%28}"; ZIP_URL="${ZIP_URL//)/%29}"
ZIP_MD5="0e2104c9259073e0a1e3bbdb6d740840"
IMG_MD5="5dda131b6226e8c87c26aeafb0b19aba"     # TEW-657BRM-1001.img
BIN_MD5="5dc8a55bfe7a31702e43f56a09e1d46b"     # ad1006.bin (inside the img)
SQ_OFF=851968
SQ_LEN=2202071
MINI_HTTPD_MD5="1a026bd17b528f64d84b740f84efc817"

HERE="$(cd "$(dirname "$0")" && pwd)"
SRC="$HERE/../src"
mkdir -p "$SRC"
cd "$SRC"

if [ ! -f "$ZIP_NAME" ] || ! echo "$ZIP_MD5  $ZIP_NAME" | md5sum -c - >/dev/null 2>&1; then
    echo "[*] downloading firmware package"
    curl -fsSL "$ZIP_URL" -o "$ZIP_NAME"
fi
echo "[*] verifying package MD5"
echo "$ZIP_MD5  $ZIP_NAME" | md5sum -c -

if [ -d rootfs ] && [ -x rootfs/usr/sbin/mini_httpd ]; then
    echo "[*] rootfs already extracted"
    exit 0
fi

rm -rf x && mkdir x && python3 - "$ZIP_NAME" <<'EOF'
import sys, zipfile, glob, os
z = zipfile.ZipFile(sys.argv[1])
z.extractall("x")
img = glob.glob("x/**/*.img", recursive=True)[0]
print("[*] firmware image:", img)
z2 = zipfile.ZipFile(img)
print("[*] inner archive:", z2.namelist())
z2.extractall("x")
os.rename(img, "x/TEW-657BRM-1001.img")
EOF
echo "$IMG_MD5  x/TEW-657BRM-1001.img" | md5sum -c -
echo "$BIN_MD5  x/ad1006.bin" | md5sum -c -

echo "[*] carving squashfs (offset $SQ_OFF, len $SQ_LEN) and swapping sqlz -> sqsh"
dd if=x/ad1006.bin of=root.sq bs=1 skip=$SQ_OFF count=$SQ_LEN status=none
python3 - <<'EOF'
d = bytearray(open("root.sq","rb").read())
assert d[:4] == b"sqlz", d[:4]
d[0:4] = b"sqsh"
open("root.sq","wb").write(bytes(d))
EOF

rm -rf rootfs
if sasquatch -d rootfs root.sq >/dev/null 2>&1 && [ -x rootfs/usr/sbin/mini_httpd ]; then
    echo "[+] rootfs staged via sasquatch"
else
    echo "[!] sasquatch failed" >&2; exit 1
fi

ACTUAL=$(md5sum rootfs/usr/sbin/mini_httpd | awk '{print $1}')
if [ "$ACTUAL" != "$MINI_HTTPD_MD5" ]; then
    echo "[!] mini_httpd md5 mismatch: $ACTUAL != $MINI_HTTPD_MD5" >&2
    exit 1
fi
echo "[+] /usr/sbin/mini_httpd verified: $ACTUAL"