optus-sagemcom-fast-3864-hacks icon indicating copy to clipboard operation
optus-sagemcom-fast-3864-hacks copied to clipboard

Config decryption doesn't work, difficult solution

Open penbob3 opened this issue 6 years ago • 6 comments

After trying and failing with the decryption method, I've found a different and much more difficult alternative. What you do it solder to the UART headers in the router, then boot and reset. Login with one of the default passwords listed in the readme, then plug the router into the internet. The password will change but you'll still be logged in (This might also be possible via telnet?). Then you can use dumpcfg command to get the whole file, find the password, and base64 decode it.

penbob3 avatar Jul 28 '19 10:07 penbob3

Thanks for your effort! Since you have console access are you able to provide a copy of the httpd binary. I gave some instructions here before https://github.com/mattimustang/optus-sagemcom-fast-3864-hacks/issues/12.

With that file I can extract the changed cryptographic key.

mattimustang avatar Jul 29 '19 02:07 mattimustang

keys.txt iv.txt These are the two files I got

penbob3 avatar Jul 30 '19 01:07 penbob3

i can't spot any potential keys or IV's in there. Can you upload the httpd binary and I'll take a look? also which modem firmware version are you running?

mattimustang avatar Jul 30 '19 06:07 mattimustang

httpd Here's the binary, but github wouldnt let me upload the actual file so I added .gif, just remove it when you download it. I'll check the firmware version now.

penbob3 avatar Jul 30 '19 06:07 penbob3

8.382.1_F@ST3864AC_Optus is my version. Also, have you considered the possibility of monitoring outgoing requests to the Optus management and update server and using that to download a full firmware file?

penbob3 avatar Jul 30 '19 06:07 penbob3

Thanks. I couldn't find the encrypt/decrypt routines in that binary. You can dump the firmware using the nanddump command.

Set up a netcat listener to receiver the file on the computer you want to dump it to:

nc -l -p 4444 > mtd0

On the modem run:

nanddump /dev/mtd0 | nc 192.168.0.2 4444

repeat for /dev/mtd1, mtd2, mtd3, mtd4, and mtd5 changing the file name to dump it to on the remote computer each time.

zip them up and upload them here or to a file sharing site and post a link.

mattimustang avatar Jul 30 '19 08:07 mattimustang