Log in

View Full Version : DLL used by VB Application for Object Type


peterg70
January 24th, 2005, 06:52
I have an application that uses a DLL (C++ compiled) which provides a Object type

The program is in VB6 and using the following code I can insert the Evaulation License and Username and the KeyIsValid returns True.
i.e.

Private Sub SubmitLicenseBtn_Click()

Dim Licensecheck As Object
Set Licensecheck = DLL.ServerManager
Licensecheck.LicenseKey = "0000-0000-0000-0000"
If Not Licensecheck.KeyIsValid Then
MsgBox Licensecheck.KeyStatus, vbExclamation, "License Check"
End If
LicenseStatus.Text = Licensecheck.KeyStatus
Set Licensecheck = Nothing

End Sub

Where DLL.ServerManager has the following variables
KeyIsValid
KeyStatus
UserName
LicenseKey

But the problem I am having is how to intercept the functions in the DLL that are performing the License Checks.They are not listed via the view Names Functions.

Brute forcing doesn't help as the username forms part of the license check and I need to examine the routine. to determine where the check sum is before Bruteforcing it.

Any thoughts appreciated.

dELTA
January 24th, 2005, 07:34
I'm not sure what you're saying here, is the problem that you want to find a good breakpoint for a method of a COM-object in a DLL? I remember there should be some threads about it on this board already in that case. And what are there "view names functions" that you mention?

bilbo
January 24th, 2005, 12:06
If dELTA hypothesis is correct (you want to dive yourself in some ActiveX secrets) you can always follow this approach:

(1) get a trace of the called methods:
http://www.kogosoft.com/olespy.htm OR
http://staff.develop.com/jasonw/comspy/

(2) obtain the addresses of the called methods inside the DLL:
http://www.microsoft.com/msj/0399/comtype/comtype.aspx

(3) play with breakpoints and assembly code

All the links are very old, but yet useful...

Regards, bilbo

babar0ga
January 24th, 2005, 17:41
Quote:
[Originally Posted by bilbo]
(2) obtain the addresses of the called methods inside the DLL:
http://www.microsoft.com/msj/0399/comtype/comtype.aspx


Yes, great nfo there...
I must add that with VS 6 there is TLBINF32.DLL installed on the system which can provide even more useful info about type libraries...

bilbo
January 25th, 2005, 08:19
Yup, babar0ga,

"You learn something new every day", as said Kayaker in another thread... (even if it is not completely true that TLBINF32.DLL can provide MORE info on type libraries: it just offers other interfaces to get the info).

By the way, the same code in MSJ magazine has been reused by Dieter Spaar in his COM Interface Plugin for IDA (02/11/2002):
http://www.datarescue.com/freefiles/com_plugin_V1_21.zip

Regards, bilbo