第10篇:信息收集~资产监控拓展


在这里插入图片描述


正文

1.1.Github监控

便于收集整理最新exp或poc
便于发现相关测试目标的资产

概念
poc和exp (全称Exploit)的区别就是,poc是漏洞验证程序,exp是漏洞利用程序。

网络爬虫,找github上新发布的一些相关资源

爬取关键词
CVE-2020(自定义年份)
ctcms
python注意
python3使用pip安装库函数(requests、pandas)
爬虫嘛,可能就被锁定ip了

使用代码:注意缩进

#Title: wechat push CVE-2020
#Date: 2020-5-9
#Exploit Author: weixiao9188
#Version: 4.0
#Tested on: Linux,windows
#cd /root/sh/git/ && nohup python3 /root/sh/git/git.py &
#coding:UTF-8
import requests
import json
import time
import os
import pandas as pd
time_sleep = 60 #每隔20秒爬取一次
while(True):
	headers1 = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.25 Safari/537.36 Core/1.70.3741.400 QQBrowser/10.5.3863.400"}
	#判断文件是否存在
	datas = []
	response1=None
	response2=None
	if os.path.exists("olddata.csv"):
	#如果文件存在则每次爬取10个
		df = pd.read_csv("olddata.csv", header=None)
		datas = df.where(df.notnull(),None).values.tolist()#将提取出来的数据中的nan转化为None
		requests.packages.urllib3.disable_warnings()
		response1 = requests.get(url="https://api.github.com/search/repositories?q=CVE-2020&sort=updated&per_page=10",headers=headers1,verify=False)
		response2 = requests.get(url="https://api.github.com/search/repositories?q=RCE&ssort=updated&per_page=10",headers=headers1,verify=False)
	else:
	#不存在爬取全部
		datas = []
		requests.packages.urllib3.disable_warnings()
		response1 = requests.get(url="https://api.github.com/search/repositories?q=CVE-2020&sort=updated&order=desc",headers=headers1,verify=False)
		response2 = requests.get(url="https://api.github.com/search/repositories?q=RCE&ssort=updated&order=desc",headers=headers1,verify=False)
	data1 = json.loads(response1.text)
	data2 = json.loads(response2.text)
	for j in [data1["items"],data2["items"]]:
		for i in j:
			s = {"name":i['name'],"html":i['html_url'],"description":i['description']}
			s1 =[i['name'],i['html_url'],i['description']]
			if s1 not in datas:
				print(s1)

可以绑定 Server酱消息推送

1.2.各种子域名查询

#DNS、备案、证书
#全球节点请求cdn
枚举爆破或解析子域名对应
便于发现管理员相关的注册信息

在这里插入图片描述
寻找域名:

  • 暴力破解,ping各种前缀的域名去测试
  • 从主站提取,系统导航
  • 站长工具备案信息、whois查询
  • ip反查域名

1.3.黑暗引擎相关搜索

fofa、shodan、zoomeye

1.4.微信公众号接口获取、内部群内部应用内部接口

做大大的公司,微信公众号或者微信小程序

社会工程学,加群慢慢套点信息


案例部分

2.1.黑暗引擎实现域名端口等收集

fofa使用讲解
在这里插入图片描述

2.2.全自动域名收集枚举优秀脚本

以xxxxx为例,从标题、域名等搜集
以xxxxx为例,全自动脚本使用收集

  1. 工具:提莫
    注意事项:借助多个第三方接口,面临需要优化的问题;各种api需要配置,可能需要翻个墙;采用python2.7
    运行时,调用各种接口去爬取访问,结果会保存在output文件夹中

  2. 工具:layer子域名挖掘机4.2版本。窗口化工具

缺不少库函数,缺什么装什么,终于…
在这里插入图片描述

Windows下python2和python3的共存设置

2.3.SRC目标中的信息收集全覆盖

补天上专属SRC上简易测试

结合fofa引擎搜索,查看端口对应的服务版本,在结合github爬虫找相关漏洞信息

2.4.利用其它第三方接口获取更多信息

  1. 网站证书查询-crt.sh
  2. DNS历史查询-dnsdb.io(收费)
  3. ipip全球ping(收费)
  4. DNS历史查询-securitytrails
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值