Github敏感信息收集

github基础搜索语法

利用以下语法,通过合理的排列组合,来搜索特定内容

仓库搜索

按照仓库、说明或者自诉文件内容进行搜索

通过限定符in限制在某一方面搜索,条件是可以共同使用的,可以提高精确度

jquery in:name //搜索名称中存在jquery的仓库

jquery in:description //说明中存在jquery的仓库

jquery in:readme //自诉文件中存在jquery的仓库

repo:owner/name //匹配特定仓库名
组织名和用户名
org:iqiyi  //来自这个的组织的
user:xxx //来自某个用户的

示例

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-vKkUEN2G-1646709696375)(ECC056BB7A71407B9616E1097281827C)]

使用示例

docker org:tencent  //这个添加了个关键字,在这个组织内搜索
按照大小搜索仓库

限定符 size
示例,他这里的进制是10的

size:1000 匹配恰好为 1 MB 的仓库。
size:>=30000 匹配至少为 30 MB 的仓库。
size:<50 匹配小于 50 KB 的仓库。
size:50…120 匹配介于 50 KB 与 120 KB 之间的仓库。

实例

springboot size:>3000000 //查找关于springboot且大小超过3G的项目
按照语言搜索仓库

按照其使用的主要语言进行搜索仓库

language:shell
language:java
使用许可搜索仓库
license:*LICENSE_KEYWORD*

license:apache-2.0//匹配根据 Apache License 2.0 授权的仓库。
共有和私有

就是开源和闭源

is:public  
is:public org:github//匹配 GitHub 拥有的公共仓库。  
is:private	
is:private pages //匹配您有访问权限且包含 “pages” 字样的私有仓库。

搜索代码

按照文件名搜索
filename:config.php
文件内容和文件路径

使用 in 限定符,您可以将搜索限制为源代码文件的内容、文件路径或两者。 如果省略此限定符,则只搜索文件内容。

api_token in:file //在文件内容中搜索,默认
api_token in:path //这个路径是包含后缀、文件名的
按照文件内容搜索
使用 path:/ 可搜索位于仓库根目录级别的文件
按照文件扩展名搜索
extension:ini 
搜索 wiki 页面

wiki的标题或者正文

in:title	
usage in:title //匹配含有 “usage” 字样的 wiki 页面。
in:body	
installation in:body//匹配其主要正文文本中含有 “installation” 字样的 wiki 页面。

使用搜索引擎语法配合github

这一块的功能就是结合搜索引擎语法,然后配合关键字进行搜索相关信息,但是这种方式效率地下,还需要自己费劲巴拉的去挨个去看,如果搜索的范围比较特定,情况应该会好很多,同时如果配合多个搜索引擎的话,写一个工具也应该是个不错的选择。

搜索邮箱信息

使用google 语法配合,搜索github中的邮件信息泄露

site:Github.com smtp
 
site:Github.com smtp @qq.com
 
site:Github.com smtp @126.com
 
site:Github.com smtp @163.com
 
site:Github.com smtp @sina.com.cn
 
site:Github.com smtp password
 
site:Github.com String password smtp
 
……
 

这种搜索方法确实可以搜索出一些东西,但是需要自己再去巴拉以下,有点麻烦

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-ZNGbVSNl-1646709696375)(F718A9DF73654E39A920AED8D0C364AA)]

收集数据库信息
site:Github.com sa password
 
site:Github.com root password
 
site:Github.com User ID=’sa’;Password
 
site:Github.com inurl:sql
收集SVN信息
site:Github.com svn
 
site:Github.com svn username
 
site:Github.com svn password
 
site:Github.com svn username password 
Github信息搜索示例

精准搜索

"testdev.admin.example.com" user:<username> <keytosearch>
"testdev.admin.example.com" user:<username> <keytosearch>
"testdev.admin.example.com" user:<username> auth_token
"testdev.admin.example.com" user:<username> apikey
"testdev.admin.example.com" user:<username> secret

"testdev.admin.example.com" org:<name of organisation> "Django" //组织名

"example.com" org:<name of organisation> "Django" /admin/dashboard //搜索端点
github敏感词
  YAML 文件
  config.properties
  passwd
  password
  README.md
  package.json
  REAMDE.md
  install.sh
  jsonp
  roperties
  config
  sql
  xsd
  xml
  setting
  Rakefile

github 工具

参考下面这两个链接

https://blog.csdn.net/wdsj_xh/article/details/105982982

https://cloud.tencent.com/developer/article/1757828

其中GSIL工具会遇到这么一个问题

cannot import name 'soft_unicode' from 'markupsafe' //问题

python -m pip install markupsafe==2.0.1 //解决方法

参考

https://notifybugme.medium.com/unauthorized-access-to-django-admin-dashboard-by-endpoint-leaked-on-github-5336969ddbbc
https://blog.shashank.co/2020/08/escalating-github-leak-to-takeover.html
https://tillsongalloway.com/finding-sensitive-information-on-github/index.html
https://addictivehackers.blogspot.com/2019/08/from-github-recon-to-account-takeover.html
https://medium.com/@mateusz.olejarka/finding-hidden-gems-vol-4-rakefile-a-k-a-how-to-get-aws-keys-again-ed0d840e0ec
https://www.smeegesec.com/2019/03/auditing-github-repo-wikis-for-fun-and.html
https://notifybugme.medium.com/how-github-recon-help-me-to-find-nine-full-ssrf-vulnerability-with-aws-metadata-access-531d931413a5
https://www.codeleading.com/article/22785913434/
https://blog.51cto.com/u_12632800/4809219
https://www.freebuf.com/articles/es/178342.html
https://blog.csdn.net/wdsj_xh/article/details/105982982
https://cloud.tencent.com/developer/article/1757828
https://blog.csdn.net/weixin_50464560/article/details/119539058

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值