GitHub泄露监控系统Hawkeye

Github作为渗透测试中较为常用的打开突破口的点,由员工安全意识不足导致的敏感信息泄露,例如运维人员上传的脚本中有个人Mail邮箱账号密码,登陆后可以导出通信录继续暴力爆破,然后导出邮件内容搜索VPN等关键字获取一些关键信息。
Github的搜索可以自由组合一些关键字,例如:

"test.com" "smtp"
"test.com" "mail"
"test.com" "mysql"
"test.com" "jdbc"
"test.com" "svn"
"test.com" "pop"
"test.com" "ftp"

"test.com" "user"
"test.com" "username"
"test.com" "账号"

"test.com" "password"
"test.com" "passwd"
"test.com" "pwd"
"test.com" "pass"
"test.com" "密码"

"test.com" "内部"

推荐的一套GitHub泄露监控系统,地址:

https://github.com/0xbug/Hawkeye

克隆项目到本地

git clone https://github.com/0xbug/Hawkeye.git --depth 1

安装依赖 (修改/usr/local/bin/python3 为你系统的Python 3 路径)

cd Hawkeye
pip install virtualenv
virtualenv --python=/usr/local/bin/python3 venv
source venv/bin/activate
pip install -r deploy/requirements.txt

配置文件

cp config.ini.example config.ini
vim config.ini

github 帐户配置

[GitHub]
USERNAME = 帐号
PASSWORD = 密码

MongoDB 认证配置

yum install mongodb
/usr/local/mongodb/bin/mongod -dbpath=/usr/local/mongodb/data -logpath=/usr/local/mongodb/logs
> use Hawkeye
switched to db Hawkeye
> db.addUser("git","hehe123")
{
	"user" : "git",
	"readOnly" : false,
	"pwd" : "2cb2f4cc98430db51a2335446fa84930",
	"_id" : ObjectId("59accc87fff25e9f045afc45")
}

[MongoDB]
HOST = localhost
PORT = 27017
ACCOUNT = git
PASSWORD = hehe123

告警配置(ENABLE:是否开启告警功能)

[Notice]
ENABLE = 1
MAIL_SERVER = 邮件服务器
MAIL_PORT = smtp端口
FROM = 发件人
PASSWORD = 密码

python Hawkeye.py
然后访问 http://0.0.0.0:5000/ 进行关键词、告警、黑名单、定时任务配置