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
Malware Analysis
How do Antivirus know which program called which API from the kernel space?
Message
<blockquote data-quote="436880927" data-source="post: 824123"><p>They do not have to rely on API hooking all of the time - it depends on what the AV needs to do.</p><p></p><p><strong>Kernel-mode callbacks </strong>can be used by AVs for intercepting process creation and termination (<em>PsSetCreateProcessNotifyRoutine/Ex/Ex2</em>, including support for <em>Pico processes</em> with the *<em>Ex2 </em>version on Windows 10), process thread creation (<em>PsSetCreateThreadNotifyRoutine</em>/Ex), process image loading (PsSetLoadImageNotifyRoutine/<em>Ex</em>), handle object creation and duplication for process/thread/desktop objects (<em>ObRegisterCallbacks</em>) and more.</p><p></p><p></p><p>[URL unfurl="true"]https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/content/wdm/nf-wdm-iogetcurrentprocess[/URL]</p><p></p><p>When the hook handler is called, you'll be executing under the context of the process which is responsible for the system call which led up to the official kernel API being called. However, you should note that if you're also intercepting API calls from trusted callers (e.g. code executing with a CPL of 0) then the responsible process will be ntoskrnl.exe, so beware of that.</p></blockquote><p></p>
[QUOTE="436880927, post: 824123"] They do not have to rely on API hooking all of the time - it depends on what the AV needs to do. [B]Kernel-mode callbacks [/B]can be used by AVs for intercepting process creation and termination ([I]PsSetCreateProcessNotifyRoutine/Ex/Ex2[/I], including support for [I]Pico processes[/I] with the *[I]Ex2 [/I]version on Windows 10), process thread creation ([I]PsSetCreateThreadNotifyRoutine[/I]/Ex), process image loading (PsSetLoadImageNotifyRoutine/[I]Ex[/I]), handle object creation and duplication for process/thread/desktop objects ([I]ObRegisterCallbacks[/I]) and more. [URL unfurl="true"]https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/content/wdm/nf-wdm-iogetcurrentprocess[/URL] When the hook handler is called, you'll be executing under the context of the process which is responsible for the system call which led up to the official kernel API being called. However, you should note that if you're also intercepting API calls from trusted callers (e.g. code executing with a CPL of 0) then the responsible process will be ntoskrnl.exe, so beware of that. [/QUOTE]
Insert quotes…
Verification
Post reply
Top