Forums
New posts
Search forums
News
Security News
Technology News
Giveaways
Giveaways, Promotions and Contests
Discounts & Deals
Reviews
Users Reviews
Video Reviews
Support
Windows Malware Removal Help & Support
Inactive Support Threads
Mac Malware Removal Help & Support
Mobile Malware Removal Help & Support
Blog
Log in
Register
What's new
Search
Search titles only
By:
Search titles only
By:
Reply to thread
Menu
Install the app
Install
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Forums
Security
Malware Analysis
Opinion about behavioral analysis
Message
<blockquote data-quote="tim one" data-source="post: 666943" data-attributes="member: 25920"><p>Yes, to see if a process is under a debugger using IsDebuggerPresent is a common method.</p><p></p><p>For example:</p><p></p><p>[CODE]function IsDebuggerPresent:boolean; external 'kernel32.dll' ;</p><p></p><p>procedure CheckDebugger;</p><p>begin</p><p>if IsDebuggerPresent then</p><p>MessageBox('ok');</p><p>else</p><p>MessageBox('no');</p><p>end; [/CODE]</p><p></p><p>This function does exactly the same thing i.e. to check the third byte of the PEB, only that it uses a little different method:</p><p></p><p>[CODE]64:A1 1800000 MOV EAX,DWORD PTR FS:[18] //get the address of the TEB itself</p><p>8B40 30 MOV EAX,DWORD PTR DS:[EAX+30]//get the address of PEB</p><p>0FB640 02 MOVZX EAX,BYTE PTR DS:[EAX+2]//Gets the third byte and uses it as a response[/CODE]</p><p></p><p>If the byte is 1 then the answer will be positive; otherwise it is not.</p></blockquote><p></p>
[QUOTE="tim one, post: 666943, member: 25920"] Yes, to see if a process is under a debugger using IsDebuggerPresent is a common method. For example: [CODE]function IsDebuggerPresent:boolean; external 'kernel32.dll' ; procedure CheckDebugger; begin if IsDebuggerPresent then MessageBox('ok'); else MessageBox('no'); end; [/CODE] This function does exactly the same thing i.e. to check the third byte of the PEB, only that it uses a little different method: [CODE]64:A1 1800000 MOV EAX,DWORD PTR FS:[18] //get the address of the TEB itself 8B40 30 MOV EAX,DWORD PTR DS:[EAX+30]//get the address of PEB 0FB640 02 MOVZX EAX,BYTE PTR DS:[EAX+2]//Gets the third byte and uses it as a response[/CODE] If the byte is 1 then the answer will be positive; otherwise it is not. [/QUOTE]
Insert quotes…
Verification
Post reply
Top