Jump to content
View in the app

A better way to browse. Learn more.

Tuts 4 You

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

NtGlobalFlag

Featured Replies

Posted

I'm learning Anti-RE techniques and I have simple problem with NtGlobalFlag :)
 

void PEBglobalflags() {
	BOOL f = FALSE;
	__asm {
		xor eax, eax
		mov eax, fs:[0x30]
		movzx eax, [eax+0x68]
		mov f, eax
	}
	if (f) {
		MessageBox(nullptr, L"Dbg", L"", 0);
		exit(1);
	}
}


Using this method can not detect dbgr.
eax is always 0, instead of 0x70.

Image: https://ibb.co/b89vYv

Windows 10 - 86_64, application x86, MSVC 2017, 

Edited by Aldhard Oswine

+0x068 NtGlobalFlag     : Uint4B

 

its a dword... so your movzx is probably the issue...

try mov eax, dword ptr fs:[0x68]

the compiler should have bitched at you anyway for the asm being 'wrong'

and its a shitty antidebug method nehows.. theres much better out there..

next time, to fix it yourself, try puting in a DebugBreak() at the start of the function, compile, load it up in olly and trace then you'll see the problem...

Edited by evlncrn8

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.