找回密码
 注册
搜索
热搜: 回贴

使用 GetStartupInfo 检查自己是否被"调试",GetStartupInfo,反跟踪技术

2010-1-30 18:16| 发布者: admin| 查看: 195| 评论: 0|原作者: 夙玉


使用 GetStartupInfo 检查自己是否被"调试",GetStartupInfo,反跟踪技术
2008年06月23日 星期一 下午 01:58
在使用 CreateProcess 创建进程时,需要传递

STARTUPINFO 的结构的指针,

而常常我们并不会一个一个设置其结构的值,

连把其他不用的值清0都会忽略,

而 ollydbg 也这样做了,

我们可以使用 GetStartupInfo 检查启动信息,

如果很多值为"不可理解"的,那么就说明自己不是由 explorer 来创建的.(explorer.exe 使用 shell32 中 ShellExecute 的来运行程序, ShellExecute 会清不用的值)



还有一点 ollydbg 会向 STARTUPINFO 中的 dwFlags 设置 STARTF_FORCEOFFFEEDBACK,而 explorer 不会







////////////////////////

//ex



#include

#include



#pragma comment(linker, "/subsystem:windows /entry:main")



int main()

{

STARTUPINFO si;



GetStartupInfo(&si);



if (

(si.dwX != 0) ||

(si.dwY != 0) ||

(si.dwXCountChars != 0) ||

(si.dwYCountChars != 0) ||

(si.dwFillAttribute != 0) ||

(si.dwXSize != 0) ||

(si.dwYSize != 0) ||

(si.dwFlags & STARTF_FORCEOFFFEEDBACK)

)

{

MessageBox(NULL, "found debugger!", NULL, 0);

}

else

{

MessageBox(NULL, "no found debugger!", NULL, 0);

}



return 0;

}


最新评论

QQ|小黑屋|最新主题|手机版|微赢网络技术论坛 ( 苏ICP备08020429号 )

GMT+8, 2024-9-30 01:38 , Processed in 0.126668 second(s), 12 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

返回顶部