🔍 Shhgit – поиск секретов в GitHub в реальном времени |

🔍 Shhgit – поиск секретов в GitHub в реальном времени

Обзоры

В поисках секретов на GitHub нет ничего нового.

В зависимости от того, на какой стороне devops вы сидите, есть множество отличных инструментов, которые помогут в этом.

Уже есть популярные инструменты, такие как gitrob и truggleHog, сосредоточены на копании в истории коммитов, чтобы найти секретные токены из определенных репозиториев, пользователей или организаций.

Как сканировать репозиторий GitHub на учетные данные

Что касается защиты, то сами GitHub активно ищут секреты в своем проекте.

Их цель – идентифицировать секретные токены в зафиксированном коде в режиме реального времени и уведомлять поставщика услуг.

Теоретически, если какие-либо секретные ключи AWS будут переданы на GitHub, Amazon получит уведомление и автоматически отзовет их.

Shhgit был разработан в целях повысить осведомленность и показать распространенность этой проблемы.

Я надеюсь, что GitHub сделает больше для предотвращения использования злоумышленниками данных секретов.

Если немного подправить сигнатуры, shhgit станет отличным дополнением к вашему набору bug bounty.

Запуск из Docker

Отредактируйте config.yaml и вставьте свои учетные данные github

Установка

Вы можете использовать предварительно скомпилированные бинарники или собрать из исходников:
Установите Go для своей платформы.
Выполните:
$ go get github.com/eth0izzle/shhgit
что загрузит и соберет shhgit. 
shhgit необходим доступ к общедоступному API GitHub, поэтому вам нужно будет получить и предоставить токен доступа.
API имеет жесткое ограничение скорости в 5000 запросов в час для каждой учетной записи, независимо от того, какой токен используется.
Чем больше уникальных токенов для учетной записи вы предоставите, тем быстрее вы сможете обрабатывать события.
Следуйте этому руководству, чтобы сгенерировать токен; для этого не требуются какие-либо права.
А затем поместите его под github_access_tokens в config.yaml.
Обратите внимание, что это противоречит условиям GitHub – обходить их ограничения скорости.
Используйте несколько токенов на свой страх и риск.
Просто запустите $ shhgit, чтобы начать смотреть коммиты GitHub и находить секреты или конфиденциальные файлы, соответствующие 120 включенным сигнатурам.
В качестве альтернативы вы можете отказаться от сигнатур использовать shhgit с поисковым запросом, например чтобы найти все ключи AWS, вы можете использовать
 shhgit --search-query AWS_ACCESS_KEY_ID = AKIA
--clone-repository-timeout
        Maximum time it should take to clone a repository in seconds (default 10)
--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)
--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 proces   s 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 состоит из 6 элементов. Предоставляется значение по умолчанию.
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 Key
Google 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 bundle
Potential cryptographic key bundle, Potential cryptographic key bundle, Pidgin OTR private key, OpenVP   N 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 file
Microsoft 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 file
1Password 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 file
Robomongo 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 file
MySQL 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 file
Shell 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
Пожалуйста, не спамьте и никого не оскорбляйте. Это поле для комментариев, а не спамбокс. Рекламные ссылки не индексируются!
Добавить комментарий