Lbolt99
March 15th, 2002, 23:12
Hello, I'm playing around with trying to remove ASPR 1.3 from a .dll Below I've documented what I've done so far. I'm looking to see if I'm on the right track and any tips or tricks on .dll dumping and rebuilding.
Target: WebsnatcherIE v2.1
Files: webbnd32.dll in program dir, bdsutils.dll in windows\system
Protection: ASProtect 1.3 (?) on webbnd32.dll
Tools Used So Far: Sice 4.05/334, Icedump 6.025, Peditor 1.7
Basically, this is an Internet Explorer plug-in which displays all the
files a web page uses in a window like the history or favorites.
It allows point-and-click downloading of any of the files the page uses.
There is a stand-alone version also, Websnatcher 2.4. I have successfully removed ASP 1.3 from that. FWIW, the .idata needed rebuilding, as usual, but so far as I can tell there are no other ASPR tricks in there. Once ASPR was removed, the nag went away automatically ( I believe it was part of the ASPR wrapper itself).
I *think* I've found the OEP of the webbnd32.dll. After the break in softice at the getversion (the GetWhatWeWant API cluster is there) , I do a /tracex 022D1000 02314000, in reference to the loader info below:
Loader info on the .dll:
WINICE: Load32 Obj=0001 Add=0167:022D1000 Len=0000F200 Mod=WEBBND32
WINICE: Load32 Obj=0002 Add=0167:022F9000 Len=00004000 Mod=WEBBND32
WINICE: Load32 Obj=0003 Add=0167:022FD000 Len=00000E00 Mod=WEBBND32
WINICE: Load32 Obj=0004 Add=0167:02302000 Len=00010600 Mod=WEBBND32
WINICE: Load32 Obj=0005 Add=0167:02314000 Len=00001A00 Mod=WEBBND32
WINICE: Load32 Obj=0006 Add=0167:02317000 Len=0000C800 Mod=WEBBND32
WINICE: Load32 Obj=0007 Add=0167:02324000 Len=00000000 Mod=WEBBND32
This seems to break three times in the WebBnd32.dll code before
actually getting to the OEP. First, it breaks at a RET at 22D1014.
, which returns to the ASPR code. Tracex again and it breaks at
WEBBND32.DLL!?GetRunApplicationFunction
WebBnd32!?GetRunApplicationFunction@@YGXP6AXXZ@Z
015F:022E77FE PUSH EBP
015F:022E77FF MOV EBP,ESP
015F:022E7801 MOV EAX, [EBP+08]
015F:022E7804 MOV [WebBnd32!?ExecuteTrial@@YAXXZ],EAX
015F:022E7809 POP EBP
015F:022E780A RET 0004
015F:022E780D PUSH EBP
015F:022E780E MOV EBP,ESP
015F:022E7810 CALL [WebBnd32!?ExecuteTrial@@YAXXZ]
015F:022E7816 CMP DWORD PTR [EBP+0C],01
015F:022E781A JNZ 022E7840
015F:022E781C PUSH 022F9560
015F:022E7821 MOV EAX, [EBP+08]
015F:022E7824 PUSH EAX
015F:022E7825 PUSH 022FDAD8
Tracex again. (At this point, the nag appears and waits for click.)
Breaks again at WEBBND32.DLL!?GetRegistrationInfo:
WebBnd32!?GetRegistrationInformation@@YGXPAD@Z
015F:022D1070 PUSH EBP
015F:022D1071 MOV EBP,ESP
015F:022D1073 MOV EAX,[EBP+08]
015F:022D1076 MOV [022FD120],EAX
015F:022D107B POP EBP
015F:022D107C RET 0004
Tracex again. Finally, breaks at what appears to be the OEP.
At 22F0FDD. (offset 0x1FFDD from the load addr of the 1st
section) It's the usual PUSH EBP stuff. But, it's in WebBnd32!DllUnregisterServer. Is this is OEP, or am I on the wrong track?
Also, the exports may be screwed with. I downloaded ASPR 1.2 just to take a look at it, and this was in the online help:
"The main idea is the following: ASProtect looks through exports section of the module and searches some predefined function names. If it finds this name, the address of the function is remembered and the reference in the export table is deleted. When the module is loaded, the address of the necessary function is determined on different conditions and this function is invoked. "
This seems to occur at runtime (in Peditor, there are the usual
four entries in the exports section, along with five API calls
for ASPR). In the GetRunApplicationFunction routine included
above, the instr @ 7804 replaces the call statement @ 7810 with
one in brackets that looks suspiciously like the redirected
imports in an ASPRotected .EXE file.
I think that's whats going on..
My next step would be to dump the image with icedump, and then figure out from there what to do, as far as fixing the import table, export table, relocations, and anything else (?) I'm not sure how relevant those API calls before the (supposed) OEP are - maybe that part can just be trashed (?) It looks like they
just have to do with deciding whether to let the program run or not, and other useless junk (GetRegINfo?)
Has anyone else removed ASPR 1.3+ from a .dll? Any tips are
appreciated
Target: WebsnatcherIE v2.1
Files: webbnd32.dll in program dir, bdsutils.dll in windows\system
Protection: ASProtect 1.3 (?) on webbnd32.dll
Tools Used So Far: Sice 4.05/334, Icedump 6.025, Peditor 1.7
Basically, this is an Internet Explorer plug-in which displays all the
files a web page uses in a window like the history or favorites.
It allows point-and-click downloading of any of the files the page uses.
There is a stand-alone version also, Websnatcher 2.4. I have successfully removed ASP 1.3 from that. FWIW, the .idata needed rebuilding, as usual, but so far as I can tell there are no other ASPR tricks in there. Once ASPR was removed, the nag went away automatically ( I believe it was part of the ASPR wrapper itself).
I *think* I've found the OEP of the webbnd32.dll. After the break in softice at the getversion (the GetWhatWeWant API cluster is there) , I do a /tracex 022D1000 02314000, in reference to the loader info below:
Loader info on the .dll:
WINICE: Load32 Obj=0001 Add=0167:022D1000 Len=0000F200 Mod=WEBBND32
WINICE: Load32 Obj=0002 Add=0167:022F9000 Len=00004000 Mod=WEBBND32
WINICE: Load32 Obj=0003 Add=0167:022FD000 Len=00000E00 Mod=WEBBND32
WINICE: Load32 Obj=0004 Add=0167:02302000 Len=00010600 Mod=WEBBND32
WINICE: Load32 Obj=0005 Add=0167:02314000 Len=00001A00 Mod=WEBBND32
WINICE: Load32 Obj=0006 Add=0167:02317000 Len=0000C800 Mod=WEBBND32
WINICE: Load32 Obj=0007 Add=0167:02324000 Len=00000000 Mod=WEBBND32
This seems to break three times in the WebBnd32.dll code before
actually getting to the OEP. First, it breaks at a RET at 22D1014.
, which returns to the ASPR code. Tracex again and it breaks at
WEBBND32.DLL!?GetRunApplicationFunction
WebBnd32!?GetRunApplicationFunction@@YGXP6AXXZ@Z
015F:022E77FE PUSH EBP
015F:022E77FF MOV EBP,ESP
015F:022E7801 MOV EAX, [EBP+08]
015F:022E7804 MOV [WebBnd32!?ExecuteTrial@@YAXXZ],EAX
015F:022E7809 POP EBP
015F:022E780A RET 0004
015F:022E780D PUSH EBP
015F:022E780E MOV EBP,ESP
015F:022E7810 CALL [WebBnd32!?ExecuteTrial@@YAXXZ]
015F:022E7816 CMP DWORD PTR [EBP+0C],01
015F:022E781A JNZ 022E7840
015F:022E781C PUSH 022F9560
015F:022E7821 MOV EAX, [EBP+08]
015F:022E7824 PUSH EAX
015F:022E7825 PUSH 022FDAD8
Tracex again. (At this point, the nag appears and waits for click.)
Breaks again at WEBBND32.DLL!?GetRegistrationInfo:
WebBnd32!?GetRegistrationInformation@@YGXPAD@Z
015F:022D1070 PUSH EBP
015F:022D1071 MOV EBP,ESP
015F:022D1073 MOV EAX,[EBP+08]
015F:022D1076 MOV [022FD120],EAX
015F:022D107B POP EBP
015F:022D107C RET 0004
Tracex again. Finally, breaks at what appears to be the OEP.
At 22F0FDD. (offset 0x1FFDD from the load addr of the 1st
section) It's the usual PUSH EBP stuff. But, it's in WebBnd32!DllUnregisterServer. Is this is OEP, or am I on the wrong track?
Also, the exports may be screwed with. I downloaded ASPR 1.2 just to take a look at it, and this was in the online help:
"The main idea is the following: ASProtect looks through exports section of the module and searches some predefined function names. If it finds this name, the address of the function is remembered and the reference in the export table is deleted. When the module is loaded, the address of the necessary function is determined on different conditions and this function is invoked. "
This seems to occur at runtime (in Peditor, there are the usual
four entries in the exports section, along with five API calls
for ASPR). In the GetRunApplicationFunction routine included
above, the instr @ 7804 replaces the call statement @ 7810 with
one in brackets that looks suspiciously like the redirected
imports in an ASPRotected .EXE file.
I think that's whats going on..
My next step would be to dump the image with icedump, and then figure out from there what to do, as far as fixing the import table, export table, relocations, and anything else (?) I'm not sure how relevant those API calls before the (supposed) OEP are - maybe that part can just be trashed (?) It looks like they
just have to do with deciding whether to let the program run or not, and other useless junk (GetRegINfo?)
Has anyone else removed ASPR 1.3+ from a .dll? Any tips are
appreciated
