Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

Is it possible to disable CFG on per call basis? #1

Open
dennisbabkin opened this issue Sep 23, 2019 · 0 comments
Open

Is it possible to disable CFG on per call basis? #1

dennisbabkin opened this issue Sep 23, 2019 · 0 comments

Comments

@dennisbabkin
Copy link

dennisbabkin commented Sep 23, 2019

This is not really an issue, just a question. (I can't seem to find any info on the subject other than your repository here.)

Say, for a dynamically resolved function call (provided that it's not suppressed via exports), is there a way to disable CFG checks on that function call only? Say in this example:

typedef BOOL /*__declspec(guard(ignore))*/ (WINAPI* FN_GdiFlush)(void);
FN_GdiFlush pfbGdiFlush = (FN_GdiFlush)::GetProcAddress(::LoadLibrary(L"gdi32.dll"), "GdiFlush");
ASSERT(pfbGdiFlush);
pfbGdiFlush();      //Disable __guard_dispatch_icall_fptr() function call here and go with just `call [rax]`

My hope was that using uncommented version of __declspec(guard(ignore)), would do the trick:

Untitled-1

@dennisbabkin dennisbabkin changed the title Is it possibly to disable CFG on per call basis? Is it possible to disable CFG on per call basis? Sep 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant