极
极核实验室

Prevent Censys and Fofa from Leaking Website IP

AI summary
文章介绍了如何通过设置服务器IP站并配置特殊证书来防止Censys等工具泄露服务器IP地址。主要内容包括创建IP站、安装特殊证书并设置为默认站点,以及解释原理:当IP被访问时,特殊证书导致Censys无法匹配域名与证书信息,从而隐藏真实服务器IP。核心观点是通过特殊配置,可以有效避免IP地址被扫描工具记录,保障服务器安全。

Repost license

Request authorization before reposting and retain the authorization code, original URL, and go/affiliate links.

Original URL:https://www.geekcorelab.com/post/preventing-censys-and-fofa-from-leaking-website-ip-addresses

The commercial link is an authorized go short link that must stay on the reposted page. It records the source before sending readers to the original article.

This tutorial recommends using Rainyun CDN, which is affordable, fast, and does not charge extra for HTTPS traffic!

Although this CDN is a 1000GB high-defense CDN, if an attacker finds your server IP, they can completely bypass the CDN's defenses and directly put your server IP into blackhole (equivalent to unplugging the network cable).

Tutorial

First, create a website for your server IP.

Then enable SSL and place a special certificate into it (be sure not to set it to the SSL certificate of your own domain).

pemkey-1695470962Download

After setting the certificate of the IP site to this one, access the website again using the HTTPS protocol. If this prompt appears, it is successful.

Then set this IP site as the default site.

Principle

First, Censys will visit a domain name, and then record the certificate information corresponding to this domain name.

After that, it will conduct a "carpet search" of all IP addresses, one by one, "probing" them.

When the default site is not set to the IP site, IP access will by default access the first created website. If the IP is initially accessed using the HTTPS protocol, then it will directly access the first default website, but the URL is still an IP address. At this time, a certificate mismatch message will appear.

However, because the certificate will plainly show which website this certificate belongs to, Censys will match it against the previously recorded domain certificate information. If the match is successful, then your IP address has been leaked.

When the default site is set to the IP site, Censys will successfully access the IP site. However, because a special certificate is configured, it cannot match in the database that a known site uses this certificate, so Censys will not record which domain name this IP corresponds to.

Comments

Discussion

Be kind and keep the discussion friendly.

Complete your profile details to improve the chance of approval.

Your email will not be shown publicly.

Loading...

Markdown supported.

Discussion

0 comments

Internal link graph

Loading internal links…

View linked articles