当前位置:网站首页>找出隐形资产--利用Hosts碰撞突破边界
找出隐形资产--利用Hosts碰撞突破边界
2022-06-24 15:45:00 【Bypass】
从攻击者的视角来进行资产的梳理,采用全端口扫描+子域名收集的方式,识别所有的企业资产暴露面。但即使是这样,往往会因为配置错误或是未及时回收等原因,依然存在着一些隐形资产。
01、业务场景
一般情况下,使用域名访问网站需要两步,一是DNS域名解析到服务器ip地址,二是将域名绑定到服务器的IP地址,大多时候我们会禁止通过IP直接访问网站,从而防止恶意解析和ip扫描探测,确保用户访问只能通过正确的域名才能到业务系统。
以一个企业级部署架构为例,使用Lvs+Nginx构建高可用web架构。在这种模式下,只需绑定一个公网ip,就可以实现内网所有服务端口通过nginx代理的唯一端口映射到外网环境。
基于这个企业级部署架构,存在两种典型的漏洞场景:
(1)测试环境或预生产环境,将公网的域名解析清除了,但是Nginx配置没有及时清除,绑定正确的host才能正常访问到。
(2)出于安全性考虑,外网Nginx和内网Nginx是需要做严格区分,但这里却没区分内外网。使用同一个Nginx完成内网和外网服务配置,通过公网域名解析到公网,内网DNS解析到内网。这个时候,绑定正确的host就可以访问到内网系统。
02、Hosts碰撞技术
基于以上场景,域名解析记录里找不到域名记录,通过IP端口也访问不到网站,只有去检查nginx配置情况,才会发现配置不当可能引发的安全问题。
那么,从攻击者的角度,那该怎么去发现这些隐形资产呢?
这里分享一个技术,叫Hosts碰撞技术,通过将域名和IP进行捆绑碰撞,一旦匹配到后端代理服务器上的域名绑定配置,就可以访问到对应的业务系统,从而发现隐形资产。
当然,除了可以用来找到隐形资产,我们也可以利用这种方式找到业务系统的真实IP,从而绕过云WAF的安全防护。
03、自动化扫描工具
hostscan:自动化Host碰撞工具
https://github.com/cckuailong/hostscanHosts_scan:用于IP和域名碰撞匹配访问的python脚本
https://github.com/fofapro/Hosts_scan边栏推荐
- How to easily realize online karaoke room and sing "mountain sea" with Wang Xinling
- leetcode 139. Word Break 單詞拆分(中等)
- Special topic of IM code scanning login Technology (III): easy to understand. A detailed principle of IM code scanning login function is enough
- Logging is not as simple as you think
- Vim编辑器的最常用的用法
- Why is it easy for enterprises to fail in implementing WMS warehouse management system
- 在Gradle 中对Junit5 测试框架引用
- April 26, 2021: the length of the integer array arr is n (3 < = n < = 10^4), and each number is
- Summary of common tools and usage
- Istio FAQ: return 426 status code
猜你喜欢

Three solutions for Jenkins image failing to update plug-in Center

Using oasis to develop a hop by hop (I) -- Scene Building

【附下载】汉化版Awvs安装与简单使用
![[application recommendation] the hands-on experience and model selection suggestions of apifox & apipost in the recent fire](/img/dd/24df91a8a1cf1f1b9ac635abd6863a.png)
[application recommendation] the hands-on experience and model selection suggestions of apifox & apipost in the recent fire

一文理解OpenStack网络

CAP:多重注意力机制,有趣的细粒度分类方案 | AAAI 2021

Understanding openstack network

Jenkins 镜像无法更新插件中心的3种解决方法

One article explains Jackson configuration information in detail
![[download attached] installation and simple use of Chinese version of awvs](/img/3b/f26617383690c86edff465c9a1099e.png)
[download attached] installation and simple use of Chinese version of awvs
随机推荐
Solution of intelligent all in one machine in expressway service area
Mongodb Getting started Practical Tutoriel: Learning Summary Table des matières
April 23, 2021: there are n cities in the TSP problem, and there is a distance between any two cities
Mysql之Binlog
Istio FAQ: failed to resolve after enabling smart DNS
Firefox browser uses plug-ins to set up proxy
Remote connection raspberry pie in VNC Viewer Mode
Some experiences of K project: global template highlights
How to efficiently transfer enterprise business data?
great! The novel website project is completely open source
Siggraph 2022 | truly restore the hand muscles. This time, the digital human hands have bones, muscles and skin
【Prometheus】6. Prometheus and kubernetes (incomplete)
Improving the classification of motor imagery by combining EEG and MEG signals in BCI
2021-04-29: given an array arr, it represents a row of balloons with scores. One for each blow
Introduction to new features of ECMAScript 2019 (ES10)
国产芯片的赶超,让美国手机芯片龙头高通害怕了,出招应对竞争
如何实现容器内的SqlServer的数据库迁移
How to use nested tags in thymeleaf3 Tags
在Gradle 中对Junit5 测试框架引用
Two problems of qtreewidget returning as DLL in singleton mode