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

cannot decode 990 Pro 4B2QJXD7 #1

Open
prahal opened this issue Mar 1, 2024 · 1 comment
Open

cannot decode 990 Pro 4B2QJXD7 #1

prahal opened this issue Mar 1, 2024 · 1 comment

Comments

@prahal
Copy link

prahal commented Mar 1, 2024

https://download.semiconductor.samsung.com/resources/software-resources/Samsung_SSD_990_PRO_4B2QJXD7.iso

LC_ALL=C ./sfwd.sh ../Samsung_SSD_990_PRO_4B2QJXD7.iso 
Decompressing iso...
Decompressing initrd...
Extracting fumagician...
Dumping Key...
base64: invalid input
Decrypting...
^C

I had to halt it.

LC_ALL=C ./sfwd2.sh ../Samsung_SSD_990_PRO_4B2QJXD7.iso 
Decompressing iso...
Decompressing initrd...
Extracting fumagician...
Dumping Key...
base64: invalid input
KEY: 4add7a
Decrypting...
hex string is too short, padding with zero bytes to length
hex string is too short, padding with zero bytes to length
hex string is too short, padding with zero bytes to length
hex string is too short, padding with zero bytes to length
Done.

I cannot unzip -t 4B2QJXD7.bin so I belive it is not correct.

Also ./samsung-magic.py < ../fw/root/fumagician/DSRD.enc does not output XML so I believe the python version is also broken.

@prahal
Copy link
Author

prahal commented Mar 1, 2024

Duplicate of chrivers/samsung-firmware-magic#4
If I extract the key with strings ../fw/root/fumagician/fumagician | grep -E '^[A-Za-z0-9+/]{42}[AEIMQUYcgkosw048]=$' | base64 -d | xxd -p -c 32

then replace the key value in samdecrypt.sh, then:

bash ./samdecrypt.sh ../fw/root/fumagician/DSRD.enc
cat ../fw/root/fumagician/DSRD.bin 
<SSD>
<SN>ALL</SN>
<MOD>ALL</MOD>
<CURFW>0B2QJXD7</CURFW>
<NEWFW>4B2QJXD7</NEWFW>
<MFW>4B2QJXD7_20231109.bin</MFW>
<MFW>4B2QJXD7_30231109.bin</MFW>
</SSD>
<SSD>
<SN>ALL</SN>
<MOD>ALL</MOD>
<CURFW>1B2QJXD7</CURFW>
<NEWFW>4B2QJXD7</NEWFW>
<MFW>4B2QJXD7_20231109.bin</MFW>
<MFW>4B2QJXD7_30231109.bin</MFW>
</SSD>
<SSD>
<SN>ALL</SN>
<MOD>ALL</MOD>
<CURFW>2B2QJXD7</CURFW>
<NEWFW>4B2QJXD7</NEWFW>
<MFW>4B2QJXD7_20231109.bin</MFW>
<MFW>4B2QJXD7_30231109.bin</MFW>
</SSD>
<SSD>
<SN>ALL</SN>
<MOD>ALL</MOD>
<CURFW>3B2QJXD7</CURFW>
<NEWFW>4B2QJXD7</NEWFW>
<MFW>4B2QJXD7_20231109.bin</MFW>
<MFW>4B2QJXD7_30231109.bin</MFW>
</SSD>
<SSD>
<SN>ALL</SN>
<MOD>ALL</MOD>
<CURFW>0B2QJXG7</CURFW>
<NEWFW>4B2QJXD7</NEWFW>
<MFW>4B2QJXD7_20231109.bin</MFW>
<MFW>4B2QJXD7_30231109.bin</MFW>
</SSD>

and:

bash ./samdecrypt.sh ../fw/root/fumagician/4B2QJXD7.enc
unzip -t ../fw/root/fumagician/4B2QJXD7.bin 
Archive:  ../fw/root/fumagician/4B2QJXD7.bin
    testing: 4B2QJXD7_20231109.enc    OK
    testing: 4B2QJXD7_20231109.enc    OK
    testing: 4B2QJXD7_30231109.enc    OK
No errors detected in compressed data of ../fw/root/fumagician/4B2QJXD7.bin.

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

1 participant