Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is the firmware data now encrypted? #16

Closed
GxdTxnz opened this issue Dec 22, 2024 · 6 comments
Closed

Is the firmware data now encrypted? #16

GxdTxnz opened this issue Dec 22, 2024 · 6 comments

Comments

@GxdTxnz
Copy link

GxdTxnz commented Dec 22, 2024

I tried to binwalk firmware I downloaded #9 from the link http://download.tplinkcloud.com/firmware/Tapo_C220v1_en_1.1.4_Build_231109_Rel.66857n_up_boot-signed_1700216548774.bin, but it didn't give any results.

┌──(root㉿kali)-[/home/gxdtxnz/Tapo]
└─# binwalk Tapo_C220v1_en_1.1.4_Build_231109_Rel.66857n_up_boot-signed_1700216548774.bin --run-as=root

DECIMAL       HEXADECIMAL     DESCRIPTION
--------------------------------------------------------------------------------

Then I checked the file through ent, and saw entropy readings close to 8, which means the file is encrypted.

┌──(root㉿kali)-[/home/gxdtxnz/Tapo]
└─# ent Tapo_C220v1_en_1.1.4_Build_231109_Rel.66857n_up_boot-signed_1700216548774.bin
Entropy = 7.999986 bits per byte.

Optimum compression would reduce the size
of this 11870292 byte file by 0 percent.

Chi square distribution for 11870292 samples is 230.89, and randomly
would exceed this value 85.85 percent of the times.

Arithmetic mean value of data bytes is 127.4709 (127.5 = random).
Monte Carlo value for Pi is 3.139363379 (error 0.07 percent).
Serial correlation coefficient is 0.000014 (totally uncorrelated = 0.0).

Does anyone have any information on this?

@GxdTxnz
Copy link
Author

GxdTxnz commented Dec 22, 2024

Results on the file that passes binwalk

┌──(root㉿kali)-[/home/gxdtxnz/Tapo]
└─# ent Tapo_C200v1_en_1.0.10_Build_200520_Rel.45325n_1594713621606.bin
Entropy = 7.613347 bits per byte.

Optimum compression would reduce the size
of this 8376416 byte file by 4 percent.

Chi square distribution for 8376416 samples is 24331013.46, and randomly
would exceed this value less than 0.01 percent of the times.

Arithmetic mean value of data bytes is 140.8094 (127.5 = random).
Monte Carlo value for Pi is 2.806927165 (error 10.65 percent).
Serial correlation coefficient is 0.245518 (totally uncorrelated = 0.0).

@DrmnSamoLiu
Copy link
Owner

Yes, new OTA firmwares are mostly encrypted now.

@JayFoxRox
Copy link

Yes. I have developed a decryptor (which works on some firmwares, as the format sometimes differs) but haven't found time to clean it up for a public release.

@GxdTxnz
Copy link
Author

GxdTxnz commented Dec 24, 2024

Any information about the encryption method (algorithm, etc.)? I would try to write it myself
@JayFoxRox

@GxdTxnz
Copy link
Author

GxdTxnz commented Dec 24, 2024

Or if you can share, I'd like to use it.

@blah99995
Copy link

https://watchfulip.github.io/28-12-24/tp-link_c210_v2.html

@GxdTxnz GxdTxnz closed this as completed Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants