Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* By Souhail Hammou : @Dark_Puzzle
- More details here : http://rce4fun.blogspot.com/
- */
- #include <iostream>
- #include <conio.h>
- #include <Windows.h>
- using namespace std;
- //Windows 7 only (32-bit applications)
- //For 64-bit applications the pointer to the FEA is at : heap_handle+0x178
- //Trick can be easily bypassed by attaching the process instead of running it inside a debugger.
- int main() {
- int* heap = (int*) GetProcessHeap();
- cout << heap << endl;
- __asm{ add heap,0xd4 }
- LPVOID LFH = (LPVOID) *heap;
- if(LFH == NULL) {
- cout << "Debugger Detected...Exiting" << endl;
- }
- else {
- cout << "No Debugger Detected...Do Stuff" << endl;
- }
- _getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement