当前位置:网站首页>找出隐形资产--利用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 implement SQLSERVER database migration in container
- Summary of common tools and usage
- My network relationship with "apifox"
- 我与“Apifox”的网络情缘
- 如何扩展aws主机上的磁盘空间
- HMM to CRF understanding and learning notes
- Istio FAQ: region awareness does not take effect
- 【云原生 | Kubernetes篇】Kubernetes基础入门(三)
- One article explains Jackson configuration information in detail
- "Industry foresight" future development trend of intelligent security monitoring industry
猜你喜欢
![Software test [high frequency] interview questions sorted out by staying up late (latest in 2022)](/img/33/2c2256fd98b908ddaf5573f644ad7f.png)
Software test [high frequency] interview questions sorted out by staying up late (latest in 2022)

Apple is no match for the longest selling mobile phone made in China, and has finally brought back the face of the domestic mobile phone

Build go command line program tool chain

Nifi from introduction to practice (nanny level tutorial) - environment

构建Go命令行程序工具链

Several common DoS attacks

VNC Viewer方式的远程连接树莓派

【面试高频题】难度 3/5,可直接构造的序列 DP 题

Most common usage of vim editor

用 Oasis 开发一个跳一跳(一)—— 场景搭建
随机推荐
From practical teaching to competition exercise, Tencent experts personally teach Ti-One platform operation strategy!
D. Solve The Maze(思维+bfs)Codeforces Round #648 (Div. 2)
60 divine vs Code plug-ins!!
Golang+redis reentrant lock
A new weapon to break the memory wall has become a "hot search" in the industry! Persistent memory enables workers to play with massive data + high-dimensional models
Using alicloud RDS for SQL Server Performance insight to optimize database load - first understanding of performance insight
Software test [high frequency] interview questions sorted out by staying up late (latest in 2022)
Wi-Fi 7 来啦,它到底有多强?
如何实现容器内的SqlServer的数据库迁移
2021-04-24: handwriting Code: topology sorting.
Why is it easy for enterprises to fail in implementing WMS warehouse management system
Reference to junit5 test framework in gradle
How does the effective date of SAP PP ECM affect the work order?
Mongodb introductory practical tutorial: learning summary directory
MySQL toolset: the official performance testing tool mysqlslap
Golang+redis distributed mutex
Detailed explanation of estab of Stata regression table output
Still worried about missing measurements? Let's use Jacobo to calculate the code coverage
[cloud native | kubernetes chapter] Introduction to kubernetes Foundation (III)
Nature刊登量子计算重大进展:有史以来第一个量子集成电路实现