Exetools  

Go Back   Exetools > General > General Discussion

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-23-2004, 12:25
SOLAR SOLAR is offline
Friend
 
Join Date: Aug 2004
Posts: 126
Rept. Given: 6
Rept. Rcvd 2 Times in 2 Posts
Thanks Given: 12
Thanks Rcvd at 6 Times in 6 Posts
SOLAR Reputation: 2
Functions within a Dll

Hey members..I have a dilemma...I have a dll (semcomn.dll) and I
dont know anything of the dll other than it has a few functions
inside of it..two functions mainly I'm interested in the Decrypt and
Encrypt functions.

The dilemma is I dont know what are the parameters that are being
passed to these two functions...

Here's the code for the program

Code:
#include <stdio.h>
#include <windows.h>

//	Compile with:
//
//		cl /c agent_pwd.c
//		link agent_pwd.obj

//	Run in ...\Program Files\Microsoft SQL Server\80\Tools\Binn OR place SEMCOMN.RLL in Resources\<LANGID>\ dir below current

// This is host_login_password from msdb.dbo.sp_get_sqlagent_properties
#define EncStr "\x7c\x3b\x57\x65\xee\xe0\x7c\x11\x3a\x5a\xe0\x41\xf8\xa3\x21\x16\x63\xb8\xf6\xbe\xf7\xd6\xfd\x3f\xb5\x19\x4b\xbe\x6b\xc0\xd9\x53"

int main(int argc, char * argv[])
{

BYTE Buff[100];
FARPROC pDecrypt;
HINSTANCE hSEMCOMN;
DWORD dwSize, i;

hSEMCOMN = LoadLibrary("SEMCOMN.DLL");

if(hSEMCOMN!=NULL){
	pDecrypt = GetProcAddress(hSEMCOMN, "Decrypt");

	if(pDecrypt!=NULL){

		dwSize = sizeof(Buff);

		// Actually, I do not know format of this function, but beleive that it is:
		// Decrypt(EncryptedData, EncryptedDataSize, ClearData, SizeOfClearData)
		// Last two params are pointers, as usual
		(pDecrypt)(EncStr, sizeof(EncStr), Buff, &dwSize);

		printf("PASSWORD: ");
		for(i=0;i<dwSize;i++)
			printf("%c", Buff[i]);
		printf("\n");

	} else {
		printf("Cannot get address of Decrypt(...), %d\n", GetLastError());
	}

} else {
	printf("Cannot load SEMCOMN.DLL, %d\n", GetLastError());
}

if(hSEMCOMN)
	FreeLibrary(hSEMCOMN);

return 0;
}
This is not my code...I have emailed the creator and waitin for a
reply...but any assistance from any of the members here will be
great help!!

Thnx in advance
SOLAR
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Execryptor EC functions LaBBa General Discussion 1 04-02-2010 00:21
Timer Functions bedrock General Discussion 9 05-24-2005 23:09
where are second level dll functions raygun General Discussion 2 01-24-2005 05:56


All times are GMT +8. The time now is 13:59.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( Since 1998 )