-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
COleScript::Compile hook not working #75
Comments
Nice that you're trying to make this work :-) My first assumption would be: you looked at the 64-bit .dll, but wscript.exe loads the 32-bit .dll (or the other way around, but I think that's less likely). So in that case - different dll with different PE timestamp etc. |
Thanks for your reply @jbremer, but actually I did look at the 32-bit version of Looking at the
I was wondering if something similar should be done with the new definition of the COleScript::Compile function in the version of vbscript.dll i'm working on. Maybe here the start address of the function is not the "real" start address of the function? Below i screenshot of the function in the DLL used in the article (the hook definition in the master branch refers to it): |
Well, all those screenshots show 64-bit x86, so ;-) |
Hi guys, first of all thanks alot for your excellent work.
I'm having issues in getting the
COleScript::Compile
hook defined ininsn/vbscript.yml
to work properly, and that's confirmed by theDEBUG:Error resolving function vbscript!COleScript_Compile through our custom callback
log messages I see in theanalysis.log
file.I followed the steps described in this article to set up my hook, since my
C:\Windows\System32\vbscript.dll
has a different sha256 (9cb3ace7916fbe3876970f58870a6635f32ebeb0ab4aecece7a96be31434b2eb
) I had to change both the offset of the PE timestamp and the one of the function inside the DLL, while I wasn't able to figure out what doesstack: 56
refers to (how should be set this parameter?). Below you can see my definition of the hook:Despite of this, the hook seems not working yet. Is there some useful documentation about this "special" hooks? I can't find nothing but that article on the web, and I have no idea what is wrong with the above definition.
I'm working with a Windows 7 Professional x64 (SP1) VM and the sample I'm using for tests is a simple "Hello World" VBS script. My version of
vbscript.dll
is 5.8.9200.16521.(I've tried with
bitmode: 64
too)Edit:
I checked the steps I followed to reach the above definition on the same
vbscript.dll
version used in the article, and they seems to be correct since I can obtain the same offsets used in the production version of this hook. What am i missing?The text was updated successfully, but these errors were encountered: