Self-built tmp File System defense Trojan with little experience

Source: Internet
Author: User
Tags tmp file

Faults:The server is infiltrated. Intruders create self-run files, automatically create and execute files under/tmp, and automatically detect and disable iptables.Discovery process:1. log on to the server and run the netstat-anp | grep LIS command to find that an abnormal connection exists. 2. Run ps-aux to check that the process address corresponding to the abnormal connection pid is yums under/tmp ** * file 3. After yums is deleted and processes are deleted, yums * is re-created, the connection will be re-established.Solution:1. Write a script to automatically kill and delete related processes and files, and write a script to enable iptables once a minute to temporarily resolve the problem: 1. Self-built tmp File System defense Trojan (files under/tmp cannot be executed)

Dd if =/dev/zero of = /. tmpfs bs = 100 M count = 10mke2fs-j /. tmpfscp-av/tmp. oldmount-o loop, noexec, nosuid, rw /. tmpfs/tmpchmod 1777/tmpmv-f/tmp. old/*/tmp/rm-fr/tmp. old

 


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.