Simple Linux lookup Backdoor idea and shell script sharing _linux Shell

Source: Internet
Author: User

Each process will have a PID, and each PID will have a corresponding directory under the/proc directory, which is the implementation of Linux (current kernel 2.6) system.

General backdoor procedures, in the PS and other processes to see the tool can not be found, because these common tools and even the system library in the system after the invasion has been basically passive hands and feet (the internet spread a large number of rootkit. If it is a kernel-level trojan, then the method is invalid.
Because the modification system kernel is relatively complex (if the kernel has been modified, or the kernel-level trojan, it is more difficult to find), so in/proc, basically still can find the traces of the Trojan horse.

Ideas:

The process ID that exists in/proc is not visible in PS (hidden), and there must be a problem.

Copy Code code as follows:
#!/bin/bash

Str_pids= "' Ps-a | awk ' {print '} ';
For i in/proc/[[:d igit:]]*;
Todo
If echo "$str _pids" | Grep-qs ' basename ' "$i";
Then
:
Else
echo "Rootkit ' s PID: $ (basename" $i ")";
Fi
Done

Discuss:

Whether or not the system (Linux) is hacked, the complexity depends largely on how well the intruder "cleanup" works. For an invasion to do homework, it would be a delicate and painful thing to get rid of it, usually in a professional third party tool (with Open-source, like Tripwire, like aide).
and professional tools, deployment, use relatively troublesome, and not all administrators can skilled use.

In fact, the Linux system itself has provided a set of "checksum" mechanisms that have not been modified in the inspection system. For example, the RPM package management system provides the-V feature:

Copy Code code as follows:
Rpm-va

Can verify all the packages on the system, output and installation of the modified files and related information. But the RPM system may also be corrupted, such as being modified.

Related Article

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.