Image Has Safe Exception Handlers is no supported

c++ / delphi package - dll injection and api hooking

Image Has Safe Exception Handlers is no supported

Postby TCS » Tue Aug 26, 2014 6:25 am

Hey,

When linking to MadCodeHook binaries with VS2013 (I guess it also happens in earlier versions), the linker fails because safe exception Handling is no supported in the MadCodeHook lib (/SAFESEH option http://msdn.microsoft.com/en-us/library/9a89h429.aspx).
It is possible to add this feature quite easily by recompiling MadCodeHook with a newer version of CRT (or newer visual studio...)
TCS
 
Posts: 33
Joined: Tue Aug 19, 2014 8:58 pm

Re: Image Has Safe Exception Handlers is no supported

Postby choochy2003 » Mon Sep 01, 2014 5:55 am

I spoke with Mathias a while back about this and he mentioned that this can not be enabled for the 32bit static lib, because the 32bit static lib is still based on the Delphi source code. Delphi still does not support enabling of SafeSEH for 32 bit binaries. Although, I do have information from EMBT that they are looking into its support in future compiler releases.
choochy2003
 
Posts: 79
Joined: Fri Mar 21, 2008 4:52 am

Re: Image Has Safe Exception Handlers is no supported

Postby TCS » Wed Sep 03, 2014 7:08 am

Okay, thanks!
TCS
 
Posts: 33
Joined: Tue Aug 19, 2014 8:58 pm

Re: Image Has Safe Exception Handlers is no supported

Postby _NN_ » Sun Jul 08, 2018 7:38 am

Is there any improvement since 2014 here ?
Currently I get:
1>madCHook32.lib(madCHook.obj) : error LNK2026: module unsafe for SAFESEH image.


SafeSEH is something that is mandatory by several clients same way as ASLR.
_NN_
 
Posts: 53
Joined: Mon Jan 21, 2013 4:00 pm

Re: Image Has Safe Exception Handlers is no supported

Postby madshi » Sun Jul 08, 2018 9:03 am

The Delphi based static lib doesn't support SafeSEH, but I suppose compiling the C++ code base to create a 32bit static lib should work. No complaints with 64bit, right?
madshi
Site Admin
 
Posts: 9880
Joined: Sun Mar 21, 2004 5:25 pm

Re: Image Has Safe Exception Handlers is no supported

Postby _NN_ » Sun Jul 08, 2018 9:07 am

SafeSEH flag is irrelevant for 64-bit since SEH in 64-bit is already table based.
_NN_
 
Posts: 53
Joined: Mon Jan 21, 2013 4:00 pm

Re: Image Has Safe Exception Handlers is no supported

Postby madshi » Mon Jul 09, 2018 7:44 am

Ah yes. Hmmmm... So anyway, I think using the C++ sources it should probably be possible to create a SafeSEH compatible 32bit static lib.
madshi
Site Admin
 
Posts: 9880
Joined: Sun Mar 21, 2004 5:25 pm

Re: Image Has Safe Exception Handlers is no supported

Postby _NN_ » Wed Jul 11, 2018 6:57 am

Can you compile lib using C++ and add it to madchook package?
Thanks
_NN_
 
Posts: 53
Joined: Mon Jan 21, 2013 4:00 pm

Re: Image Has Safe Exception Handlers is no supported

Postby madshi » Wed Jul 11, 2018 7:37 am

Yes, that should be possible.
madshi
Site Admin
 
Posts: 9880
Joined: Sun Mar 21, 2004 5:25 pm

Re: Image Has Safe Exception Handlers is no supported

Postby _NN_ » Wed Jul 11, 2018 12:42 pm

That would be great ! :greenBalloon:
Waiting for an update.
_NN_
 
Posts: 53
Joined: Mon Jan 21, 2013 4:00 pm

Re: Image Has Safe Exception Handlers is no supported

Postby madshi » Thu Jul 19, 2018 12:25 pm

C++ based static libs in the latest test build now:

http://madshi.net/madCollectionBeta.exe
madshi
Site Admin
 
Posts: 9880
Joined: Sun Mar 21, 2004 5:25 pm

Re: Image Has Safe Exception Handlers is no supported

Postby _NN_ » Sun Jul 22, 2018 1:01 pm

Not Found
The requested URL /madCollectionBeta.exe was not found on this server.
_NN_
 
Posts: 53
Joined: Mon Jan 21, 2013 4:00 pm

Re: Image Has Safe Exception Handlers is no supported

Postby madshi » Sun Jul 22, 2018 4:40 pm

Ooops, sorry. Should work now.
madshi
Site Admin
 
Posts: 9880
Joined: Sun Mar 21, 2004 5:25 pm

Re: Image Has Safe Exception Handlers is no supported

Postby _NN_ » Thu Sep 20, 2018 10:21 am

Thanks.
C++ library compiles with SafeSEH.
_NN_
 
Posts: 53
Joined: Mon Jan 21, 2013 4:00 pm


Return to madCodeHook

Who is online

Users browsing this forum: No registered users and 4 guests