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
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
General Security Discussions
Protecting processes from injection via SetWindowsHookEx() ?
Message
<blockquote data-quote="Mecanik" data-source="post: 730374" data-attributes="member: 71056"><p>Hello,</p><p></p><p>I am not sure if I posted this in the right category, but here it goes. As the title says, I am analysing and trying to find a way to stop malware from injecting my process via SetWindowsHookEx.</p><p></p><p>My process is currently protected via callbacks and other techniques, but this particular technique seems to be impossible to stop. ( at least now )</p><p></p><p>If we look at: <a href="http://blog.deniable.org/blog/2017/07/16/inject-all-the-things/" target="_blank">Inject All the Things - Shut Up and Hack</a> we can see different scenarios and information regarding injecting a process, where we can also see:</p><p></p><p></p><p></p><p>[CODE=cpp]GetWindowThreadProcessId(targetWnd, &dwProcessId);</p><p></p><p>HHOOK handle = SetWindowsHookEx(WH_KEYBOARD, addr, dll, threadID);[/CODE]</p><p></p><p>Maybe I should look at GetWindowThreadProcessId() to prevent getting the handle in the first place?</p><p></p><p>Long story short... does anyone know any "way" or "method" to prevent such technique ? If so, please do share. Any suggestions or feedback is highly appreciated!</p></blockquote><p></p>
[QUOTE="Mecanik, post: 730374, member: 71056"] Hello, I am not sure if I posted this in the right category, but here it goes. As the title says, I am analysing and trying to find a way to stop malware from injecting my process via SetWindowsHookEx. My process is currently protected via callbacks and other techniques, but this particular technique seems to be impossible to stop. ( at least now ) If we look at: [URL="http://blog.deniable.org/blog/2017/07/16/inject-all-the-things/"]Inject All the Things - Shut Up and Hack[/URL] we can see different scenarios and information regarding injecting a process, where we can also see: [SIZE=5][B][/B][/SIZE] [CODE=cpp]GetWindowThreadProcessId(targetWnd, &dwProcessId); HHOOK handle = SetWindowsHookEx(WH_KEYBOARD, addr, dll, threadID);[/CODE] Maybe I should look at GetWindowThreadProcessId() to prevent getting the handle in the first place? Long story short... does anyone know any "way" or "method" to prevent such technique ? If so, please do share. Any suggestions or feedback is highly appreciated! [/QUOTE]
Insert quotes…
Verification
Post reply
Top