Illustration: Port hiding of adore-ng

Source: Internet
Author: User

Port hiding prevents users from using commands such as netstat to obtain the port information to be hidden. Netstat is done by reading files in/proc/net. Strace can be seen that netstat's main operations include: Open/Read File/proc/NET/tcp,/proc/NET/udp,/proc/NET/raw ......,

For example:

Adore-ng implementation:

By default, adore hides TCP ports 2222 and 7350:

1. Find the subitem proc_net named TCP. Replace the get_info function of this subitem.

2. Our get_info function first calls the original get_info function of the system to obtain a buffer. The buffer contains the content of the/proc/NET/tcp file. Parse the data obtained by get_info, filter out the ports 2222 and 7350, and then load the filtered content into a new buffer. Finally, we will return the memory that we applied for and filtered out port 2222 and port 7350 information.

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.