Видеорегистратор rvi-1nr16840
Скачал прошивку RVi-IPN82-4K,RVi-IPN161L-4K,RVi-IPN162-16P-4K,RVi-IPN162-PRO-4K,RVI-IPN164-4KV.2,RVi-IPN168-4KV.2,RVi-IPN322L-4K,RVi-1NR16140,RVi-1NR16240,RVi-1NR16240-P,RVi-1NR16440,RVi-1NR16840,RVi-1NR322_17112020.bin
переименовал в RVi-1NR16840.bin
запустил команду
#binwalk -t RVi-1NR16840.bin
DECIMAL HEXADECIMAL DESCRIPTION
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
0 0x0 Zip archive data, at least v2.0 to extract, compressed size: 4579, uncompressed size: 13783, name: Install.lua
4641 0x1221 Zip archive data, at least v2.0 to extract, compressed size: 283875, uncompressed size: 361024, name: u-boot.bin.img
288581 0x46745 Zip archive data, at least v2.0 to extract, compressed size: 5264960, uncompressed size: 5294990, name: uImage.img
5553602 0x54BDC2 Zip archive data, at least v2.0 to extract, compressed size: 37660029, uncompressed size: 37703744, name: romfs-x.squashfs.img
43213702 0x2936386 Zip archive data, at least v2.0 to extract, compressed size: 6484121, uncompressed size: 6488128, name: web-x.squashfs.img
49697892 0x2F65464 Zip archive data, at least v2.0 to extract, compressed size: 2470, uncompressed size: 4160, name: custom-x.squashfs.img
49700434 0x2F65E52 Zip archive data, at least v2.0 to extract, compressed size: 84264, uncompressed size: 98368, name: logo-x.squashfs.img
49784768 0x2F7A7C0 Zip archive data, at least v1.0 to extract, compressed size: 128, uncompressed size: 128, name: sign.img
49785548 0x2F7AACC End of Zip archive, footer length: 22
открыл с помощью hexcurse файл RVi-1NR16840.bin и сменил заголовок DH на PK.
Разархивировал
пробовал разные варианты:
#dumpimage -l romfs-x.squashfs.img
Image Name: NVR4X-S2
Created: Wed Nov 18 01:35:53 2020
Image Type: ARM Linux Kernel Image (gzip compressed)
Data Size: 37703680 Bytes = 36820.00 KiB = 35.96 MiB
Load Address: a0f00000
Entry Point: a4500000
#file romfs-x.squashfs.img
romfs-x.squashfs.img: u-boot legacy uImage, NVR4X-S2, Linux/ARM, OS Kernel Image (gzip), 37703680 bytes, Tue Nov 17 15:35:53 2020, Load Address: 0xA0F00000, Entry Point: 0xA4500000, Header CRC: 0x9F6DCCB5, Data CRC: 0x61E2B85F
#binwalk -t romfs-x.squashfs.img
DECIMAL HEXADECIMAL DESCRIPTION
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
0 0x0 uImage header, header size: 64 bytes, header CRC: 0x9F6DCCB5, created: 2020-11-17 15:35:53, image size: 37703680 bytes, Data Address: 0xA0F00000, Entry Point: 0xA4500000, data CRC: 0x61E2B85F, OS: Linux,
CPU: ARM, image type: OS Kernel Image, compression type: gzip, image name: "NVR4X-S2"
2624516 0x280C04 Zlib compressed data, best compression
2701747 0x2939B3 Zlib compressed data, best compression
5706682 0x5713BA 7-zip archive data, version 0.3
18467693 0x119CB6D 7-zip archive data, version 0.4
21457691 0x1476B1B 7-zip archive data, version 0.4
22170083 0x15249E3 mcrypt 2.5 encrypted data, algorithm: "~_xa", keysize: 26871 bytes, mode: "2",
22479301 0x15701C5 7-zip archive data, version 0.4
26619482 0x1962E5A Zlib compressed data, best compression
29280036 0x1BEC724 Zlib compressed data, best compression
29428508 0x1C10B1C 7-zip archive data, version 0.3
31263516 0x1DD0B1C Zlib compressed data, best compression
32533166 0x1F06AAE Zlib compressed data, best compression
37654648 0x23E9078 Zlib compressed data, best compression
37658521 0x23E9F99 Zlib compressed data, best compression
37660666 0x23EA7FA Zlib compressed data, best compression
37664622 0x23EB76E Zlib compressed data, best compression
37666850 0x23EC022 Zlib compressed data, best compression
37670569 0x23ECEA9 Zlib compressed data, best compression
37672762 0x23ED73A Zlib compressed data, best compression
37677795 0x23EEAE3 Zlib compressed data, best compression
37683380 0x23F00B4 Zlib compressed data, best compression
37689100 0x23F170C Zlib compressed data, best compression
37695530 0x23F302A Zlib compressed data, best compression
37695783 0x23F3127 Zlib compressed data, best compression
при попытке разархивировать, получаем кучу мусора
#binwalk -e romfs-x.squashfs.img
#ls -alh _romfs-x.squashfs.img.extracted/
итого 98M
drwxr-xr-x 2 top top 4,0K мар 25 21:59 .
drwxr-xr-x 5 top top 4,0K мар 26 18:14 ..
-rw-r--r-- 1 top top 0 мар 25 21:43 1962E5A
-rw-r--r-- 1 top top 11M мар 25 21:43 1962E5A.zlib
-rw-r--r-- 1 top top 0 мар 25 21:43 1BEC724
-rw-r--r-- 1 top top 8,1M мар 25 21:43 1BEC724.zlib
-rw-r--r-- 1 top top 0 мар 25 21:43 1DD0B1C
-rw-r--r-- 1 top top 6,2M мар 25 21:43 1DD0B1C.zlib
-rw-r--r-- 1 top top 0 мар 25 21:43 1F06AAE
-rw-r--r-- 1 top top 5,0M мар 25 21:43 1F06AAE.zlib
-rw-r--r-- 1 top top 8,0K мар 25 21:43 23E9078
-rw-r--r-- 1 top top 48K мар 25 21:43 23E9078.zlib
-rw-r--r-- 1 top top 8,0K мар 25 21:43 23E9F99
-rw-r--r-- 1 top top 45K мар 25 21:43 23E9F99.zlib
-rw-r--r-- 1 top top 8,0K мар 25 21:43 23EA7FA
...
нужно добавить ключ для ssh и собрать обратно