11 Review of whether Linux is an invasive method

Source: Internet
Author: User

11 reviews Whether Linux is compromised method one, check the system log LASTB command

Check system errors log in, Count IP retries

Second, check the system users 1, CAT/ETC/PASSWD

To see if there is an exception for the system user

2, grep "0"/etc/passwd

See if new users are generated, UID and GID 0 users

3, Ls-l/etc/passwd

Check the modification time of passwd to see if you want to add users without knowing

4. See if a privileged user exists

Awk-f: ' $3= =0 {print '} '/etc/passwd

5. See if there is an empty password account

Awk-f: ' Length ($) = =0 {print $} '/etc/shadow

Third, check the exception process 1, note the process of UID 0

To view a process using the PS-EF command

2. View the ports and files opened by the process

Lsof-p PID Command View

3. Check Hidden processes
    • Ps-ef | awk ' {print} ' | Sort-n | Uniq >1
    • Ls/porc |sort-n|uniq >2
    • Diff 1 2
Iv. checking Abnormal system files
    • Find/-uid 0–perm-4000–print
    • Find/-size +10000k–print
    • Find/-name "..." –print
    • Find/-name "..." –print
    • Find/-name "." –print
    • Find/-name "" –print
V. Check System file integrity
    • Rpm–qf/bin/ls
    • Rpm-qf/bin/login
    • Md5sum–b file name
    • Md5sum–t file name
Vi. checking the integrity of RPM
    • Rpm-va #注意相关的/sbin,/bin,/usr/sbin,/usr/bin
Output Format Description:S – File size differsm – Mode differs (permissions)5 – MD5 sum differsd – Device number mismatchl – readlink path Mismatchu – User Ownership DIFFERSG – Group ownership Differst – modification time differs   
VII. Check the network
    • IP link | grep Promisc (normal NIC should not be in Promisc mode, there may be sniffer)
    • Lsof–i
    • NETSTAT–NAP (see TCP/UDP ports that are not properly open)
    • Arp–a
Eight, check the system planning tasks
    • Crontab–u root–l
    • Cat/etc/crontab
    • ls/etc/cron.*
Nine, check the system back door
    • Cat/etc/crontab
    • ls/var/spool/cron/
    • Cat/etc/rc.d/rc.local
    • Ls/etc/rc.d
    • Ls/etc/rc3.d
X. Inspection system Services
    • Chkconfig-list
    • Rpcinfo-p (view RPC service)
XI. Examination of Rootkits
    • Rkhunter-c
    • Chkrootkit-q

Reproduced: Original: http://www.centoscn.cn/2663.html

11 Review of whether Linux is an invasive method

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.