Sergeant
[Question][Program] Session Key + HMAC
.RAR with ONLY SOURCE: HMACSHA1.rar
Included in the .RAR is a class that implements HMACSHA1(C++ Class Implementation of HMAC-SHA - CodeProject)
Here is the int main(){}
Code:
#include <iostream>
#include <iomanip>
#include "HMAC_SHA1.h"
using namespace std;
int main()
{
//BYTE Key[20];
unsigned char Key[] = { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 };
BYTE digest[20];
//unsigned char Message[] = "Hi There";
unsigned char Message[] = { 0x48, 0x69, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65, 0x0 };
memset(Key, 0x0b, 20);
CHMAC_SHA1 HMAC_SHA1;
HMAC_SHA1.HMAC_SHA1(Message, strlen((const char *)Message), Key, sizeof(Key), digest);
std::cout <<"\n\nMessage: " << Message;
std::cout <<"\n\nHMACSHA1: ";
for(int i=0;i<sizeof(digest);i++)
std::cout << setfill('0') << setw(2) << hex << (int)digest[i];
//I get: b617318655057264e28bc0b6fb378c8ef146be00
// Check with digest equal to 0xb617318655057264e28bc0b6fb378c8ef146be00
int a;
std::cout << "\n\nYou may now quit...";
std::cin >> a;
return 0;
}
Everything works fine... but
From earlier discussions I am under the impression that I must use the HMAC seeds that are hard coded in the WOW.EXE and also the session key that you have to read from memory. My question is, how do I implement this class to get the right HMACSHA1?
Should the "session key" be xord with the opad and ipad, and the message be the HMAC seeds?
Any detail or knowledge would be really helpful.
Thanks.
P.S. CryptoAPI for win32 is WAYYYYYYYY to complicated. I would love to use OPENSSL but I cant cause of OS. Any suggestions to implement HMACSHA1 in C++ would be greatly appreciated.
EDIT:
I have gotten the HMACSHA1 working correctly. Now, what else is there todo besides running the code through the scramble for the two charts? Is there another step to complete the scramble chart?
Last edited by adapa; 09-20-2011 at 06:35 PM.
These ads disappear when you log in.