PInvoke is safe?

Discussion of other issues
bigguy
Posts: 4
Joined: Thu Feb 09, 2017 3:21 pm
Location: Pyongyang, North Korea

PInvoke is safe?

Postby bigguy » Tue Aug 29, 2017 7:26 pm

Hello, I am wondering if it is safe to virtualize a Export method and then PInvoke from C# UI program?

Also from my testing if "GetStatusCode" is not virtualized it cannot access other virtualized functions :D

Example:

C++

Code: Select all

extern "C"
{
   __declspec(dllexport) int __cdecl GetStatusCode();
}

// Virtualized.
int GetStatusCode() {
   return ProtectMethod(); // Virtualized also
}

Admin
Site Admin
Posts: 1311
Joined: Mon Aug 21, 2006 8:19 pm
Location: Russia, E-burg
Contact:

Re: PInvoke is safe?

Postby Admin » Wed Aug 30, 2017 4:02 am

Please notice that any function called from C# isn't safe because a cracker can change the result in your .NET application without modification of the protected DLL.

bigguy
Posts: 4
Joined: Thu Feb 09, 2017 3:21 pm
Location: Pyongyang, North Korea

Re: PInvoke is safe?

Postby bigguy » Thu Aug 31, 2017 5:38 pm

Doesn't matter if they modify the C# application since it only processes and displays data through the protected DLL. They would need to modify the DLL for them to do some damage.

My question is if Exported functions that are protected are as safe as normal ones.

Edit: also doesn't matter if they change the real data in c# app since it would be useless and just a fake screen since most requests are processed by a server.

Admin
Site Admin
Posts: 1311
Joined: Mon Aug 21, 2006 8:19 pm
Location: Russia, E-burg
Contact:

Re: PInvoke is safe?

Postby Admin » Sat Sep 02, 2017 4:57 am

My question is if Exported functions that are protected are as safe as normal ones.

Yes, it's also safe.


Return to “Offtopic”

Who is online

Users browsing this forum: No registered users and 1 guest