web渗透-信息收集


渗透的本质也就是信息收集

0x01 域名信息收集

  1. whois查询
    • 域名,注册商,邮箱,电话,创建时间,过期时间,域名服务器,DNS服务器
    • https://www.aizhan.com
    • http://whois.chinaz.com/
    • https://whois.aliyun.com/
  2. 备案信息查询
    • https://www.tianyancha.com/
    • https://www.qichacha.com/
    • http://www.beian.gov.cn/portal/recordQuery
  3. whois反查
    • https://whois.chinaz.com/

0x02子域名信息收集

  1. Layer挖掘机
  2. Sublist3r
  3. subDomainsBrute
  4. site:baidu.com
  5. 证书
    • https://crt.sh/
    • https://search.censys.io/
  6. IP进行反查域名
    • https://site.ip138.com/
    • https://ipwhois.cnnic.net.cn/
    • https://dns.aizhan.com/aaa.com/
  7. DNS
    • https://rapiddns.io/subdomain

0x03站点信息收集

  1. CMS指纹识别

    • 工具识别
      • whatweb
    • 在线识别
      • https://www.yunsee.cn/
      • http://whatweb.bugscaner.com/look/
    • 手工识别
      • 根据HTTP响应头判断,重点关注X-Powered-By、cookie等字段
      • 根据HTML 特征,重点关注 body、title、meta等标签的内容和属性
      • 根据特殊的class判断。HTML 中存在特定 class 属性的某些 div 标签,
  2. 敏感目录/文件收集

    • 工具
      • dirbuster
      • dirsearch
      • 御剑
      • ffuf
    • 文件
      • robots.txt
      • 后台目录
      • 安装包
      • 上传目录
      • mysql管理接口
      • 安装页面
      • phpinfo
      • 编辑器
      • 短文件利用
  3. waf识别

    • wafw00f
  4. 识别网站脚本语言

    • 在域名后面加/index.asp /index.aspx /index.php /index.jsp
    • f12,响应头
    • cookie,session
    • site:域名 filetype:
    • 在线网站
      • https://builtwith.com/
      • https://w3techs.com/sites
    • 扫描目录
    • 报错信息

0x04 敏感信息收集

  1. google hack

    • Site:特定域名下进行搜索。
    • Domain:查询自身网站的外部链接。
    • Inurl:指令用于搜索查询词出现在url中的页面。
    • Intitle:进行搜索含关键字的标题。
    • Info:查找指定站点的一些基本信息。
    • Filetype:只搜索某些特定类型的文件格式。
    • Link:返回所有和xxxxxxx做了链接的URL
    • Index:返回的网页中在正文部分包含关键词。
    • Define:搜索某个词语的定义
    • And:利用and表示前后两个关键词是“与”的逻辑关系
    • cache:缓存里的内容
  2. Github信息泄露

    • 邮件配置
    • site:Github.com smtp @qq.com
    • 数据库信息
    • site:Github.com sa password
    • site:Github.com root password
    • site:Github.com User ID='sa'
    • svn信息泄露
    • site:Github.com svn
    • site:Github.com svn username
    • 综合泄露信息
    • site:Github.com password
    • site:Github.com ftp ftppassword
    • site:Github.com 密码
    • site:Github.com 内部

0x05 服务器信息收集

  1. Web服务器指纹识别

    • 手工
      • HTTP响应头中的Server、X-Powered-By、Cookie 等字段
      • HTTP头字段顺序分析,观察HTTP响应头的组织顺序,因为每个服务器都有一个内部的HTTP头排序方法。
      • 观察网站某些位置的HTML源码(特殊的class名称)及其注释(comment)部分
      • 观察网站页面后缀可以判断Web应用使用的编程语言和框架
      • 错误页面可以给你提供关于服务器的大量信息
    • 工具识别
      • whatweb
      • Nmap OS指纹初步判断操作系统
  2. 真实IP地址识别

    • 测试CDN,全球ping
      • https://ping.chinaz.com/
      • https://www.wepcc.com/
      • https://whoer.net/zh/ping
    • 绕过CDN
      1. 利用子域名
      2. 查询主域
      3. 扫描网站测试文件,phpinfo(),test,从中寻找真实的ip
      4. 国外访问
      5. 域名的历史解析记录
        • https://viewdns.info/
      6. Nslookup查询
        • https://tool.chinaz.com/nslookup
        • http://www.jsons.cn/nslookup/
  3. 网络空间搜索引擎

    • https://www.shodan.io/
    • https://www.zoomeye.org/
    • https://fofa.so/
  4. 让目标主动连接我们

    • 发邮件给我们。比如订阅、注册的时候会有注册连接发送到我们的邮件,然后查看邮件全文源代码或邮件标头,寻找邮件头中的邮件服务器域名IP就可以了。
    • 利用网站漏洞。比如有代码执行漏洞、SSRF、存储型的XSS都可以让服务器主动访问我们预设的web服务器,那么就能在日志里面看见目标网站服务器的真实IP
  5. 端口信息收集

    • masscan
    • nmap
    • 在线
      • http://tool.chinaz.com/port/
      • https://scan.top15.cn/
      • https://www.shodan.io/

0x06 社会工程学

  • https://www.zhihu.com/question/26113526
  • https://blog.csdn.net/Eastmount/article/details/100585715

借鉴:https://www.freebuf.com/articles/web/251083.html