XboxHacker BBS
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 19, 2013, 08:49:23 PM


Login with username, password and session length


Pages: 1
  Print  
Author Topic: How decrypt extended.bin (c#)?  (Read 2450 times)
zouzzz
Master Hacker
****
Posts: 326


View Profile
« on: January 11, 2010, 03:07:55 PM »

Hi,

I'm looking for a source code or a C # function who can decrypt a extended.bin file.
(HMAC_SHA1,  RC4 ?)

Thanks a lot.  Smiley
Logged

q36
Master Hacker
****
Posts: 325


View Profile
« Reply #1 on: January 11, 2010, 05:45:54 PM »

hmacsha1 with cpukey/rc4, should be same as keyvault.
Logged
zouzzz
Master Hacker
****
Posts: 326


View Profile
« Reply #2 on: January 12, 2010, 02:51:17 AM »

HMAC_SHA1 : http://msdn.microsoft.com/en-us/library/system.security.cryptography.hmacsha1.aspx ?
rc4 : http://dotnet-snippets.com/dns/rc4-encryption-SID577.aspx ?



Okay, nobody had writen a function please ?
 Roll Eyes Thanks.
« Last Edit: January 12, 2010, 08:40:55 AM by zouzzz » Logged

q36
Master Hacker
****
Posts: 325


View Profile
« Reply #3 on: January 12, 2010, 03:27:45 PM »

Shouldn't it be in the flashtool source for decrypting the keyvault?

http://www.xboxhacker.org/index.php?topic=12124.msg79207#msg79207

http://www.megaupload.com/?d=G92CPTZW

Logged
zouzzz
Master Hacker
****
Posts: 326


View Profile
« Reply #4 on: January 13, 2010, 05:03:03 AM »

Because i want a code in c#.
Logged

q36
Master Hacker
****
Posts: 325


View Profile
« Reply #5 on: January 13, 2010, 05:29:01 AM »

I dunno if anyone is going to do that for you. Why not just look at the source for flashtool, figure it out, and write your own?
Logged
TheFallen93
Master Hacker
****
Posts: 177


View Profile
« Reply #6 on: January 13, 2010, 06:07:23 AM »

Code:
public byte[] HMAC_SHA1(byte[] Key, byte[] Message)
        {
            byte[] K = new byte[0x40];
            byte[] opad = new byte[20 + 0x40];
            byte[] ipad = new byte[Message.Length + 0x40];

            Array.Copy(Key, K, 16);

            for (int i = 0; i < 64; i++)
            {
                opad[i] = (byte)(K[i] ^ 0x5C);
                ipad[i] = (byte)(K[i] ^ 0x36);
            }

            // Copy Buffer
            Array.Copy(Message, 0, ipad, 0x40, Message.Length);

            // Get First Hash
            SHA1CryptoServiceProvider sha = new SHA1CryptoServiceProvider();
            byte[] Hash1 = sha.ComputeHash(ipad);

            // Copy to OPad
            Array.Copy(Hash1, 0, opad, 0x40, 20);

            return sha.ComputeHash(opad);
        }

        public void RC4(ref Byte[] bytes, Byte[] key)
        {
            Byte[] s = new Byte[256];
            Byte[] k = new Byte[256];
            Byte temp;
            int i, j;

            for (i = 0; i < 256; i++)
            {
                s[i] = (Byte)i;
                k[i] = key[i % key.GetLength(0)];
            }

            j = 0;
            for (i = 0; i < 256; i++)
            {
                j = (j + s[i] + k[i]) % 256;
                temp = s[i];
                s[i] = s[j];
                s[j] = temp;
            }

            i = j = 0;
            for (int x = 0; x < bytes.GetLength(0); x++)
            {
                i = (i + 1) % 256;
                j = (j + s[i]) % 256;
                temp = s[i];
                s[i] = s[j];
                s[j] = temp;
                int t = (s[i] + s[j]) % 256;
                bytes[x] ^= s[t];
            }
        }
Logged
zouzzz
Master Hacker
****
Posts: 326


View Profile
« Reply #7 on: January 13, 2010, 03:41:15 PM »

Thanks.
Logged

Pages: 1
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM