Hi, I extracted some parts of the firmware MTK-OPENWRT M7623-7623a-unielec-u7623-02-emmc-512m-squashfs-sysupgrade-emmc (1).bin using binwalk and now I would like to extract the dtb to decompile it, modify it and overwrite it directly into the router memory so I need to know where exactly it is located in the router memory. I tried the following to extract the dtb but it didn't work. I don't have the sources of this firmware
Scan Time: 2025-09-30 12:14:58
Target File: /UniElec_U7623-06/UniElec_stock_firmware/MTK-OPENWRT M7623-7623a-unielec-u7623-02-emmc-512m-squashfs-sysupgrade-emmc (1).bin
MD5 Checksum: 31be8ce11cb742e75e312117c66e4e46
Signatures: 391
DECIMAL HEXADECIMAL DESCRIPTION
--------------------------------------------------------------------------------
0 0x0 uImage header, header size: 64 bytes, header CRC: 0x100E82C3, created: 2020-05-16 18:32:20, image size: 2494231 bytes, Data Address: 0x80008000, Entry Point: 0x80008000, data CRC: 0xB52022D9, OS: Linux, CPU: ARM, image type: OS Kernel Image, compression type: none, image name: "ARM OpenWrt Linux-4.14.180"
64 0x40 Linux kernel ARM boot executable zImage (little-endian)
2400 0x960 device tree image (dtb)
15220 0x3B74 xz compressed data
15452 0x3C5C xz compressed data
2470608 0x25B2D0 device tree image (dtb)
44826624 0x2AC0000 Squashfs filesystem, little endian, version 4.0, compression:xz, size: 3380660 bytes, 1956 inodes, blocksize: 262144 bytes, created: 2020-05-16 18:32:20
Scan Time: 2025-09-30 12:15:05
Target File: /UniElec_U7623-06/_MTK-OPENWRT M7623-7623a-unielec-u7623-02-emmc-512m-squashfs-sysupgrade-emmc (1).bin.extracted/3C5C
MD5 Checksum: deeea9aa760ea2ba9534a93cb62d0ea3
Signatures: 391
DECIMAL HEXADECIMAL DESCRIPTION
--------------------------------------------------------------------------------
468 0x1D4 device tree image (dtb)
1852085 0x1C42B5 Certificate in DER format (x509 v3), header length: 4, sequence length: 774
2514377 0x265DC9 Certificate in DER format (x509 v3), header length: 4, sequence length: 8194
3445037 0x34912D Certificate in DER format (x509 v3), header length: 4, sequence length: 8193
4975521 0x4BEBA1 Certificate in DER format (x509 v3), header length: 4, sequence length: 5376
5719545 0x5745F9 Certificate in DER format (x509 v3), header length: 4, sequence length: 1284
6358656 0x610680 CRC32 polynomial table, little endian
6443195 0x6250BB Intel x86 or x64 microcode, sig 0x03000000, pf_mask 0x01, 20C0-18-20, rev 0x707b0400, size 192
7250452 0x6EA214 xz compressed data
7319928 0x6FB178 Unix path: /lib/firmware/updates/4.14.180
7409829 0x7110A5 Copyright string: "Copyright(c) Pierre Ossman"
7416940 0x712C6C Unix path: /sys/firmware/devicetree/base
7417821 0x712FDD Unix path: /sys/firmware/fdt': CRC check failed
7429105 0x715BF1 Neighborly text, "neighbor table overflow!tics"
7448740 0x71A8A4 Neighborly text, "NeighborSolicitsports"
7448760 0x71A8B8 Neighborly text, "NeighborAdvertisements"
7451694 0x71B42E Neighborly text, "neighbor %.2x%.2x.%pM lost rename link %s to %s"
8537296 0x8244D0 ASCII cpio archive (SVR4 with no CRC), file name: "dev", file name length: "0x00000004", file size: "0x00000000"
8537412 0x824544 ASCII cpio archive (SVR4 with no CRC), file name: "dev/console", file name length: "0x0000000C", file size: "0x00000000"
8537536 0x8245C0 ASCII cpio archive (SVR4 with no CRC), file name: "root", file name length: "0x00000005", file size: "0x00000000"
8537652 0x824634 ASCII cpio archive (SVR4 with no CRC), file name: "TRAILER!!!", file name length: "0x0000000B", file size: "0x00000000"
Results 1
$ dd if=MTK-OPENWRT\ M7623-7623a-unielec-u7623-02-emmc-512m-squashfs-sysupgrade-emmc\ \(1\).bin of=dtb.bin skip=64 count=$((2400 - 64 + 1))
2337+0 records in
2337+0 records out
1196544 bytes transferred in 0.014775 secs (80984365 bytes/sec)
$ dtc -f -I dtb -O dts dtb.bin
FATAL ERROR: Blob has incorrect magic number
Result 2
$ rm dtb.bin
$ dd if=MTK-OPENWRT\ M7623-7623a-unielec-u7623-02-emmc-512m-squashfs-sysupgrade-emmc\ \(1\).bin of=dtb.bin skip=15452 count=$((2470608 - 15452 + 1))
78958+1 records in
78958+1 records out
40426932 bytes transferred in 0.219497 secs (184179884 bytes/sec)
$ dtc -f -I dtb -O dts dtb.bin
FATAL ERROR: Blob has incorrect magic number
Result 3
$ rm dtb.bin
$ dd if=_MTK-OPENWRT\ M7623-7623a-unielec-u7623-02-emmc-512m-squashfs-sysupgrade-emmc\ \(1\).bin.extracted/3C5C of=dtb.bin count=469
469+0 records in
469+0 records out
240128 bytes transferred in 0.004282 secs (56078468 bytes/sec)
$ dtc -f -I dtb -O dts dtb.bin
FATAL ERROR: Blob has incorrect magic number
Nothing changed with the surely wrong commands
dd if=MTK-OPENWRT\ M7623-7623a-unielec-u7623-02-emmc-512m-squashfs-sysupgrade-emmc\ \(1\).bin of=dtb.bin skip=2400 count=$((15220 - 2400))
dd if=MTK-OPENWRT\ M7623-7623a-unielec-u7623-02-emmc-512m-squashfs-sysupgrade-emmc\ \(1\).bin of=dtb.bin skip=2470608 count=$((44826624 - 2470608))
dd if=_MTK-OPENWRT\ M7623-7623a-unielec-u7623-02-emmc-512m-squashfs-sysupgrade-emmc\ \(1\).bin.extracted/3C5C skip=468 of=dtb.bin count=$((1852085 - 468))
Can anyone help me?