Shhgit

Shhgit能够帮助广大研究人员以近乎实时的方式寻找GitHub(包括Gists)、GitLab和BitBucket提交代码中的敏感数据和敏感文件。实际上,在GitHub中发现敏感数据并不算什么新鲜事了。目前也有很多很好的工具可以帮助我们去寻找开源代码库中的敏感信息。比如说,类似gitrob和truggleHog这样的工具,可以帮助我们挖掘commit历史记录并寻找特定代码库的机密令牌。除此之外,GitHub本身也可以通过他们的令牌搜索项目来寻找敏感信息。它们的目标是实时识别提交代码中的秘密令牌,并通知服务提供商采取行动。所以从理论上讲,如果任何AWS密钥被提交到了GitHub,Amazon就会收到通知并自动撤销它们。

Shhgit的主要目标是唤起用户的安全意识,并能够主动采取行动。虽然我不知道GitHub令牌扫描项目的内部工作机制,但是社区也可以做出很多努力来防止网络犯罪分子利用这个信息宝库。

通过对签名的一些调整,Shhgit将能够给我们提供非常优秀的功能。

工具安装

广大用户可以直接使用预编译的代码或使用Go来进行源码编译。

1、在用户设备上安装Go环境。

2、执行下列命令下载并构建Shhgit:

go get github.com/eth0izzle/shhgit

3、或者使用下列命令将项目源码克隆至本地,并进行手动构建:

git clone https://github.com/eth0izzle/shhgit.gitGO111MODULE=on CGO_ENABLED=0 go build -v -i -o shhgit

除此之外,广大用户也可以直接在Docker环境中使用Shhgit。首先,获取config.yaml文件副本,并插入到你GitHub凭证中,然后执行下列命令:

docker run -v $(pwd)/config.yaml:/config.yaml:ro eth0izzle/shhgit

工具使用

Shhgit可以通过两种方式工作:通过GitHub、GitLab和BitBucket公共代码库搜索,或处理本地目录种的文件。

默认配置下,Shhgit能够以前者,也就是公共模式运行,并且需要访问公共GitHub API。此时,我们将需要一个令牌和访问权限,无论使用哪一种令牌,API的速率限制为每个账户每小时5000次请求。提供的账户唯一令牌越多,处理事件的速度就越快。大家可以按照这篇【文档】来生成一个灵台,并且不需要任何权限。接下来,将其写入config.yaml文件中的github_access_tokens域。

跟其他工具不同的是,我们不需要给Shhgit传递目标,我们只需要运行“$ shhgit”就可以获取所有匹配120种自带规则的GitHub commit并寻找敏感数据/文件了。

如需以本地模式运行工具的话,则需要传递“—local”参数。

选项

--clone-repository-timeout        Maximum time it should take to clone a repository in seconds (default 10)--config-path        Searches for config.yaml from given directory. If not set, tries to find if from shhgit binary's and current directory--csv-path        Specify a path if you want to write found secrets to a CSV. Leave blank to disable--debug        Print debugging information--entropy-threshold        Finds high entropy strings in files. Higher threshold = more secret secrets, lower threshold = more false positives. Set to 0 to disable entropy checks (default 5.0)--local        Specify local directory (absolute path) which to scan. Scans only given directory recursively. No need to have Github tokens with local run.--maximum-file-size        Maximum file size to process in KB (default 512)--maximum-repository-size        Maximum repository size to download and process in KB) (default 5120)--minimum-stars        Only clone repositories with this many stars or higher. Set to 0 to ignore star count (default 0)--path-checks        Set to false to disable file name/path signature checking, i.e. just match regex patterns (default true)--process-gists        Watch and process Gists in real time. Set to false to disable (default true)--search-query        Specify a search string to ignore signatures and filter on files containing this string (regex compatible)--silent        Suppress all output except for errors--temp-directory        Directory to store repositories/matches (default "%temp%\shhgit")--threads        Number of concurrent threads to use (default number of logical CPUs)配置

config.yaml文件由七个元素组成,项目以提供了默认配置文件:

github_access_tokens: # provide at least one token  - 'token one'  - 'token two'webhook: '' # URL to a POST webhook.webhook_payload: '' # Payload to POST to the webhook URLblacklisted_extensions: [] # list of extensions to ignoreblacklisted_paths: [] # list of paths to ignoreblacklisted_entropy_extensions: [] # additional extensions to ignore for entropy checkssignatures: # list of signatures to check  - part: '' # either filename, extension, path or contents    match: '' # simple text comparison (if no regex element)    regex: '' # regex pattern (if no match element)    name: '' # name of the signature

签名

Shhgit自带了120种签名方案,我们可以通过编辑config.yaml文件来进行签名的添加和删除:

Chef private key, Potential Linux shadow file, Potential Linux passwd file, Docker configuration file, NPM configuration file, Environment configuration file, Contains a private key, AWS Access Key ID Value, AWS Access Key ID, AWS Account ID, AWS Secret Access Key, AWS Session Token, Artifactory, CodeClimate, Facebook access token, Google (GCM) Service account, Stripe API key, Google OAuth Key, Google Cloud API KeyGoogle OAuth Access Token, Picatic API key, Square Access Token, Square OAuth Secret, PayPal/Braintree Access Token, Amazon MWS Auth Token, Twilo API Key, MailGun API Key, MailChimp API Key, SSH Password, Outlook team, Sauce Token, Slack Token, Slack Webhook, SonarQube Docs API Key, HockeyApp, Username and password in URI, NuGet API Key, Potential cryptographic private key, Log file, Potential cryptographic key bundle, Potential cryptographic key bundlePotential cryptographic key bundle, Potential cryptographic key bundle, Pidgin OTR private key, OpenVPN client configuration file, Azure service configuration schema file, Remote Desktop connection file, Microsoft SQL database file, Microsoft SQL server compact database file, SQLite database file, SQLite3 database file, Microsoft BitLocker recovery key fileMicrosoft BitLocker Trusted Platform Module password file, Windows BitLocker full volume encrypted data file, Java keystore file, Password Safe database file, Ruby On Rails secret token configuration file, Carrierwave configuration file, Potential Ruby On Rails database configuration file, OmniAuth configuration file, Django configuration file1Password password manager database file, Apple Keychain database file, Network traffic capture file, GnuCash database file, Jenkins publish over SSH plugin file, Potential Jenkins credentials file, KDE Wallet Manager database file, Potential MediaWiki configuration file, Tunnelblick VPN configuration file, Sequel Pro MySQL database manager bookmark file, Little Snitch firewall configuration file, Day One journal file, Potential jrnl journal file, Chef Knife configuration file, cPanel backup ProFTPd credentials fileRobomongo MongoDB manager configuration file, FileZilla FTP configuration file, FileZilla FTP recent servers file, Ventrilo server configuration file, Terraform variable config file, Shell configuration file, Shell configuration file, Shell configuration file, Private SSH key, Private SSH key, Private SSH key, Private SSH key, SSH configuration file, Potential cryptographic private key, Shell command history fileMySQL client command history file, PostgreSQL client command history file, PostgreSQL password file, Ruby IRB console history file, Pidgin chat client account configuration file, Hexchat/XChat IRC client server list configuration file, Irssi IRC client configuration file, Recon-ng web reconnaissance framework API key database, DBeaver SQL database manager configuration file, Mutt e-mail client configuration file, S3cmd configuration file, AWS CLI credentials file, SFTP connection configuration file, T command-line Twitter client configuration file, Shell configuration fileShell profile configuration file, Shell command alias configuration file, PHP configuration file, GNOME Keyring database file, KeePass password manager database file, SQL dump file, Apache htpasswd file, Configuration file for auto-login process, Rubygems credentials file, Tugboat DigitalOcean management tool configuration, DigitalOcean doctl command-line client configuration file, git-credential-store helper credentials file, GitHub Hub command-line client configuration file, Git configuration file

工具运行截图

许可证协议

本项目的开发与发布遵循MIT开源许可证协议。

项目地址

Shhgit:https://github.com/eth0izzle/shhgit

精彩推荐

github里的默认域_研究人员如何使用Shhgit搜索GitHub中的敏感数据相关推荐

  1. github里的默认域_恕我直言!你对Python里的import一无所知

    写 Python 通常我们会怎样导包?可能大部分情况下都是用 import,但除了 import 你还会些什么呢?下面我们来介绍一些骚操作. 1. 直接 import 人尽皆知的方法,直接导入即可 i ...

  2. github里的默认域_GitMAD 一款扫描Github上的敏感信息和数据泄漏工具

    GitMAD是一个用于发现Github上的敏感信息和数据泄漏的工具.通过给定关键字或域,GitMAD便会搜索Github上托管的代码,以查找是否存在匹配项.一旦找到了匹配项,GitMAD将克隆存储库并 ...

  3. github里的默认域_FProbe 获取域/子域的列表,并探查工作中的http / https服务器。...

    ‍ 安装 GO111MODULE=on go get -u github.com/theblackturtle/fprobe 特征 获取域/子域的列表,并探查工作中的http / https服务器. ...

  4. 模拟撞击_研究人员打造出能让橄榄球头盔承受住反复撞击的液态纳米泡沫

    ▼密歇根州立大学(MSU)的工程师们制作出了一种新型的液体泡沫内衬,他们称这种内衬可以帮助橄榄球头盔更好地承受反复撞击以此提高其使用寿命和使用者的安全性.这种材料还将比目前使用的泡沫衬垫更薄.更轻,另 ...

  5. 有机发光二极管显示器测试方法_研究人员证明有机激光二极管将不再是梦

    图1所示.有机半导体激光二极管在电激励下产生蓝色激光发射的原理图 有机激光二极管从梦想走向现实:深入的特性描述表明,通过直接电刺激有机薄膜实现激光发射是可能的,考拉科技公司成立是为了进一步发展这项技术 ...

  6. 三阶魔方还原步骤图_研究人员开发的AI成功在1.2秒内还原三阶魔方

    据外媒报道,在2018年3月,麻省理工学院学生Ben Katz和软件开发人员Jared Di Carlo曾共同创建了机器人装置,以0.38秒解开三阶魔方.尽管魔方解开技术的最新重大进展并没有导致比Ka ...

  7. springmvc使用requestmapping无法访问控制类_研究人员称人类使用的新烟碱类杀虫剂让蜜蜂无法入睡...

    来自布里斯托尔大学的科学家进行了研究,显示常见的杀虫剂可以阻止蜜蜂和苍蝇睡个好觉.就像人类一样,许多昆虫也需要睡眠才能正常工作.然而,如果它们接触过新烟碱类杀虫剂,它们的睡眠就会受到影响,新烟碱类杀虫 ...

  8. 如何去实现机械灵巧手玩魔方和弹钢琴_研究人员开发机械 “影子手”:玩转魔方不在话下...

    人类可以相对轻松地玩弄魔方,但对于机器人来说,这一直以来都非常困难.(常见的2x2x2魔方共有367.416万个内部组合.)这并不是说没有机器人能玩得转魔方--麻省理工学院的一项发明最近以破纪录的0. ...

  9. github组织存储库使用_为什么我不使用您的GitHub存储库

    github组织存储库使用 by Sam Westreich, PhD 由Sam Westreich博士 为什么我不使用您的GitHub存储库 (Why I'm not using your GitH ...

  10. 神经网络 并行预测_研究人员研究了为什么神经网络可以有效地进行预测

    人工智能,机器学习和神经网络是日常生活中越来越多的术语.面部识别,对象检测以及人的分类和分割是机器学习算法的常见任务,这些算法现在已得到广泛使用.所有这些过程的基础都是机器学习,这意味着计算机可以捕获 ...

最新文章

  1. 平台型OA=高性价比OA?
  2. JavaEE企业级快速开发平台jeesite4的使用和快速搭建项目
  3. python函数内的作用域包括什么_python菜鸟求问关于嵌套函数中作用域范围应该怎么理解?...
  4. Delphi 生日提醒的方法《LceMeaning》
  5. 什么是 ARM 架构处理器?
  6. 使用了无效的sql语句_使用SQL语句创建数据库
  7. pip安装环境报错[Errno 99] Cannot assign requested address问题解决
  8. 白盒测试和黑盒测试的区别
  9. crm登录系统是什么系统?
  10. 密码学复习笔记2【分组密码/S-DES、DES】
  11. 常用性能工具:工欲善其事,必先利其器
  12. 图片去除下间隙(图片3像素)的方法
  13. 面试遇到这么一位满嘴骚话的 HR,真牛皮!
  14. 关于AD9361的配置与测试,万能测试模板
  15. IDEA代理配置(插件无法下载)
  16. C 语言的fseek()
  17. java怎样定义一个对象数组,java定义一个对象数组
  18. Realsense L515 例程详解 Tutorial 1
  19. Nvidia显卡命名的各部分的含义
  20. 最全python爬虫面试笔试题及答案汇总,三万多字,持续更新,适合新手,应届生

热门文章

  1. Nodejs教程15:net模块初探
  2. 帝国cms安装 mysql支持错误_帝国CMS安装时 mysql出错。
  3. Spark调优之推测执行
  4. 《Vision based autonomous driving - A survey of recent methods》读书笔记
  5. php 正则 标点符号,js正则匹配中文标点符号
  6. 基于PHP美食食谱的外文翻译,翻译研究 | 中文菜谱英文翻译方法详解
  7. 山东理工ACM 1445 素数
  8. 网络攻击还是网络战争?
  9. puppeteer学习(三)——抓取“相关搜索”关键词搜索豆瓣图书榜
  10. 扫码点餐外卖配送小程序开发功能