![]() ![]() delCloudCfgfrom("/tmp/backupfolder/ori-backup-user-config.bin") os.execute( "tar -cf /tmp/backup -C /tmp/backupfolder. " >/dev/null 2>&1")Įnd end -打包 ( "nvrammanager -r /tmp/backupfolder/ori-backup-user-config.bin -p user-config >/dev/null 2>&1")Ĭcryfile( "/tmp/backupfolder/ori-backup-user-config.bin", "/tmp/backupfolder/ori-backup-user-config.bin") Os.execute( "mkdir /tmp/backupfolder >/dev/null 2>&1")įor i, v in ipairs(extern_partitions) do if v ~= nil then ( "nvrammanager -r /tmp/backupfolder/ori-backup-". Local model = uci_r:get( "locale", "sysinfo", "model") or "" if model = "Archer C6 v2" then - 备份extern分区, 如有特殊情况的分区,再特殊处理 local extern_partitions = uci_r:get_profile( "backup_restore", "extern_partition") or nil if extern_partitions ~= nil then extern_partitions = util.split(extern_partitions, " ") #!/usr/bin/lua local firm = require "" local util = require "luci.util" local cry = require "" local configtool = require "" local fs = require "luci.fs" local uci = require "" local uci_r = uci.cursor() The only thing that turned out on Google is As I verified after successfully obtaining the shell - it’s not present on the device itself, so this must be some unused functionality. That key file is nowhere to be found in firmware files, it’s also not referenced by plaintext name in any other place that could create it dynamically, for example from MAC address. Secondly we see mention of -kfile /etc/secretkey which suggests that instead of a hard-coded key in the library we have some key file located on flash memory. First - mentioned mode of AES256 differs (here it’s CBC nice comparison is bin.extracted % strings squashfs-root/usr/lib/lua/luci/model/a Other researchers had success with locating a (which is a central cryptographic library for UI and management tools of the router) and extracting encryption key and IV for AES256 in ECB mode - simply by listing strings. The squashfs file is automatically extracted and there we have an unencrypted filesystem of what’s going to land on router’s flash memory. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |