Skip to main content

Samsung SSD firmware encoder/decoder.

Here is a little program that can
obfuscate and deobfuscate
Samsung SSD firmware files.

I'm against obfuscation because it's
a stupid malpractice aimed only
to keep off unliterate people.

Use as you please and drop me a comment/email
if it was useful to you.

Donations are welcome.


#include <stdio.h>
#define HI_NIBBLE(b) (((b) >> 4) & 0x0F)
#define LO_NIBBLE(b) ((b) & 0x0F)

FILE *infile;
FILE *infile2;
FILE *outfile;
int i, j, t;

char table[2][16] = {
  {0x1, 0x3, 0x5, 0x7, 0x9, 0xb, 0xd, 0xf, 0xe, 0xc, 0xa, 0x8, 0x6, 0x4, 0x2, 0x0},
  {0xf, 0x0, 0xe, 0x1, 0xd, 0x2, 0xc, 0x3, 0xb, 0x4, 0xa, 0x5, 0x9, 0x6, 0x8, 0x7}
};

int
main (int argc, char *argv[])
{
  if (argc <= 3)
    printf ("Usage: %s enc/dec infile outfile\n", argv[0]);
  else
    {
      infile = fopen (argv[2], "r");
      outfile = fopen (argv[3], "w");
      while (1)
 {
   i = fgetc (infile);
   if (feof (infile))
     break;
   if (strcmp (argv[1], "enc") == 0)
     {
       t = 0;
     }
   else if (strcmp (argv[1], "dec") == 0)
     {
       t = 1;
     }
   else
     printf ("Usage: %s enc/dec infile outfile\n", argv[0]);

   j = ((table[t][HI_NIBBLE (i)]) << 4) | LO_NIBBLE (i);
   fputc (j, outfile);
 }
      fclose (infile);
      fclose (outfile);
      return 0;
    }
}

Comments

  1. The above script produces only 6 bit long file containing word "".
    (the source file was DSRD.ENC, 129 bytes.
    Where is the problem?

    ReplyDelete
    Replies
    1. https://github.com/Zibri/Samsung-SSD-Firmware-Decrypt

      Delete
  2. hmm probably is a new type of file... with old ones (so far tested) it works.

    ReplyDelete

Post a Comment

Popular posts from this blog

TP-LINK Configuration file encrypt and decrypt.

Here we go! TP-Link is another company that thinks that security by obscurity could ever work. If you "backup" the configuration from most TP-Link routers, you will get a .BIN file which is "encrypted". Use this utility below, to decrypt it (so you can edit it) and encrypt it again. Have fun. Drop files here or

Huawei E585 Unlock download!

Here is the unlocker for you to download! Highlights: 1) very fast (2-3 seconds) 2) Compatible with Xp, Vista and Win7 3) easy to use. Instructions: Download the program. Run the program. Donate via paypal and PASTE the  confirmation number  of your donation. The transaction id should work after a minute from your donation. Donate using the window opened by the program. The code will work only on the PC you run the program. This program works only with Huawei E585. Send me an email if you need an unlimited version. (Unlimited number of unlocks) Note: If the program says "Connect card." that means that E585 drivers are not installed correctly. Remove any "wifi manager" and old drivers, then reinstall E585 drivers from it's virtual cdrom. Please be sure that you have run "autorun.exe" which should have appeared in a pop-up window when you first inserted the Mifi.  This is required to install all the drivers that are needed for the modificatio...

Huawei E585 Unlock download!!!

Here is the unlocker for you to download! Highlights: 1) very fast (2-3 seconds) 2) Compatible with Xp, Vista and Win7 3) easy to use. Instructions: Download the program. Donate via paypal and PASTE the confirmation number  of your donation. The transaction id should work after a minute from your donation. Donate using the window opened by the program. The code will work only on the PC you run the program. This program works only with Huawei E585. Send me an email if you need an unlimited version. (Unlimited number of unlocks) Note: If the program says "Connect card." that means that E585 drivers are not installed correctly. Remove any "wifi manager" and old drivers, then reinstall E585 drivers from it's virtual cdrom. Please be sure that you have run "autorun.exe" which should have appeared in a pop-up window when you first inserted the Mifi.  This is required to install all the drivers that are needed for the modification.  If you have ...