icon/x Created with Sketch.

Splunk Cookie Policy

We use our own and third-party cookies to provide you with a great online experience. We also use these cookies to improve our products and services, support our marketing campaigns, and advertise to you on our website and other websites. Some cookies may continue to collect information after you have left our website. Learn more (including how to update your settings) here.
Accept Cookie Policy

We are working on something new...

A Fresh New Splunkbase
We are designing a New Splunkbase to improve search and discoverability of apps. Check out our new and improved features like Categories and Collections. New Splunkbase is currently in preview mode, as it is under active development. We welcome you to navigate New Splunkbase and give us feedback.

Accept License Agreements

This app is provided by a third party and your right to use the app is in accordance with the license provided by that third-party licensor. Splunk is not responsible for any third-party apps and does not provide any warranty or support. If you have any questions, complaints or claims with respect to this app, please contact the licensor directly.

Thank You

Downloading Add-On for HaveIBeenPwned
SHA256 checksum (add-on-for-haveibeenpwned_231.tgz) 94b117bfb4e071ab418b61eb81f643e7f6e1f8a8cf2ee72a7c9c239a12e31532 SHA256 checksum (add-on-for-haveibeenpwned_230.tgz) 7dad653eed5282c776ad8df690c187cfaf717358855cb7b2cfd3cb94b07fd4b1 SHA256 checksum (add-on-for-haveibeenpwned_123.tgz) bbb7698bc76767e98ad710ffb481b33504fb79b0dafc637568724f583b44d711
To install your download
For instructions specific to your download, click the Details tab after closing this window.

Flag As Inappropriate

splunk

Add-On for HaveIBeenPwned

Splunk Cloud
This app is NOT supported by Splunk. Please read about what that means for you here.
Overview
Details
A Splunk® add-on providing a custom search command "haveibeenpwned" to query Troy Hunt's Have I Been Pwned API (https://haveibeenpwned.com/api/v3/) for known breaches of your (company's) domains or your friends'/family's/enemies'/hardly distantly related someone's/employees'/colleagues' mail adresses.

Please respect people's privacy and adhere to the service's acceptable use (https://haveibeenpwned.com/API/v3#AcceptableUse). I tried respecting the limits posed on the API's use in the command's source code, which is why you'll have to have a little patience when querying for large amounts of mail addresses.

I was unsatisfied with the publicly available Splunk add-ons already providing this functionality as they either didn't allow control over what and how is queried for or didn't format the output to my wishes. So I came up with my own Splunk add-on implementing these missing features.

Cross-compatible with Python 2 and 3. Tested on Splunk Enterprise 9.0.2 and 8.2.3 on Windows, Linux and Splunk Cloud.

Licensed under http://www.apache.org/licenses/LICENSE-2.0.

Feel free to submit issues via https://github.com/hRun/SA-haveibeenpwned/issues.

SA-haveibeenpwned

A Splunk® add-on providing a custom search command haveibeenpwned to query Troy Hunt's haveibeenpwned API (https://haveibeenpwned.com/api/v3/) for known breaches of your (company's) domains or your friends'/family's/enemies'/hardly distantly related someone's/employees'/colleagues' mail adresses.

Please respect people's privacy and adhere to the service's acceptable use (https://haveibeenpwned.com/API/v3#AcceptableUse). I tried respecting the limits posed on the API's use in the command's source code, which is why you'll have to have a little patience when querying for large amounts of mail addresses.

I was unsatisfied with the publicly available Splunk add-ons already providing this functionality as they either didn't allow control over what and how is queried for or didn't format the output to my wishes. So I came up with my own Splunk add-on implementing these missing features.

Cross-compatible with Python 2 and 3. Tested on Splunk Enterprise 9.0.2 and 8.2.3 on Windows, Linux and Splunk Cloud.

Licensed under http://www.apache.org/licenses/LICENSE-2.0.

Feel free to submit issues via https://github.com/hRun/SA-haveibeenpwned/issues.

Installation & Updating

Just unpack to $SPLUNK_HOME/etc/apps on your Splunk search head and restart the instance. Use the deployer in a distributed environment.

Important note on updating from version 2.1.0 to 2.2.x:

Due to changes in the HIBP API's rate limiting, a parameter to set the supplied API key's individual rate limit was added on the add-on's configuration page. It controls sleep intervals during search execution to prevent provoking API timeouts. The parameter is set to 10 requests per minute by default (current lowest tier). To make full use of your API plan, set it to the rate limit tied to the entered API key (as visible from https://haveibeenpwned.com/API/Key/Verify).

Important note on updating to add-on version 2.x.x:

When updating from add-on version 1.x.x to 2.x.x, you'll be required to reconfigure used API key and proxies (see Requirements & Setup). Un-privileged users without the list_storage_passwords capability will no longer be able to make use of mode=mail. A custom role can_query_hibp is supplied to empower such users (including all negative implications this capability brings with it until Splunk finally decides to fix it).

For legacy Splunk environments, if you prefer a slimmer implementation or if the stated capability limitations are not an option, please use add-on version 1.2.3. Overall functionality is exactly the same.

Set python.version=python2 or python.version=python3 in commands.conf if you would like to explicitly specify the Python version to use. Otherwise this will be determined by your instance's global settings. Set python.version=python2 in restmap.conf if you experience issues with the app's configuration page on older Splunk instances.

Requirements & Setup

Your Splunk instance requires acess to the internet (via a proxy) to query https://haveibeenpwned.com/api/v3/*. Configure proxies via the app's configuration page if required.

Unfortunately parts of the HIBP API now require an API key which you can obtain here: https://haveibeenpwned.com/API/Key. Specify your API key via the app's configuration page to be able to use mode=mail. mode=domain will work without an API key.

If you require using a proxy, unfortunately currently only HTTP(S) proxies are supported and only Basic Authentication. Support for SOCKS proxies and NTLM authentication will be added in a later verion of the app.

Usage

Use as a search command like so:

search index=example | table email | haveibeenpwned [mode=<mail|domain>] [threshold=<days>] [output=<text|json>] [pastes=<all|dated|none>] <field-list>

mode: Control whether to query for breaches regarding one or multiple domains or specific mail addresses. Default: mail.

threshold: Set how many days to look back for breaches. Default: 7 days.

output: Control whether to return the fetched and parsed data as plaintext or json formatted fields. Default: text.

pastes: Control whether to additionally query for account pastes or not or only those with a timestamp when using mode=mail. Default: dated.

Expect the search to take ~ 2 seconds per mail address when using mode=mail due to the API's acceptable use. Do not attempt to spam the search as it will only degrade the performance further.

Examples

Check a list of mail addresses from local logs for pwnage in the last year, also check for any related pastes

   search index=ad | table email | haveibeenpwned mode=mail threshold=365 pastes=all email

Check a domain for breaches during the last month and output as json

   | makeresults | eval mydomain="mydomain.com" | haveibeenpwned mode=domain threshold=31 output=json mydomain

History

v2.2.5

  • Ensured future Splunk Cloud compatibility (again)

v2.2.3

  • Updated Splunk Python SDK to v1.7.3, fixed a bug where proxy connections would hang

v2.2.2

  • Fixed issue where domain names were mismatched
  • Fixed issue where fields would not show up due to exceeding rate limits
  • Added command parameter to output fetched data as json
  • Added setting for API key rate limit, so sleeping intervals can be controlled
  • Updated Python SDK

v2.1.0

  • Re-packaged using Splunk Add-On Builder 4.1.0
  • Updated Splunk Python SDK to v1.6.19

v2.0.5

  • Bug fix

v2.0.4

  • Added appropriate reload triggers
  • Updated Splunk Python SDK to v1.6.18 and moved to ./lib/ directory

v2.0.3

  • Repackaged using Splunk Add-On Builder v4.0.0
  • Updated Splunk Python SDK to v1.6.16

v2.0.2

  • Updated Splunk Python SDK to v1.6.15, removing a bug which can cause Splunk instances to hang

v2.0.1

  • Fixed file permissions for Splunk Cloud vetting

v2.0.0

  • Implemented Splunk Cloud compatibility by relying on Splunk Add-On Builder for the add-on setup/configuration. Thanks to lukemonahan!

  • Improved conectivity tests, proxy and error handling

  • Added custom role for non-privileged users

  • Added add-on logo

v1.2.3

  • Updated Splunk Python SDK to v1.6.15, removing a bug which can cause Splunk instances to hang

v1.2.2

  • Fixed a bug where the Splunk search would fail if a paste was found for an account but does not return a title or date

  • Add option to control whether to report account pastes or not or just the ones with a timestamp

v1.2.1

  • Better connection state handling and URL encoding

  • Updated to Splunklib 1.6.14

v1.2.0

  • Overall enhancements and bug fixes

  • Implemented better sanity checks and error handling

TODO / Known Issues

  • Potentially add a mode to query the passwords API. As password hashes should not be stored in Splunk this should not be a valid use case.
  • Currently only HTTP(S) proxies are supported and only Basic Authentication. Add support for SOCKS proxies and NTLM authentication.

Release Notes

Version 2.3.1
Feb. 10, 2025
  • ensure future splunk cloud compatibility
Version 2.3.0
Oct. 7, 2024

Updated Splunk Python SDK to version 2.x

Version 1.2.3
March 4, 2021
  • Updated Splunk Python SDK to v1.6.15, removing a bug which can cause Splunk instances to hang

Subscribe Share

Are you a developer?

As a Splunkbase app developer, you will have access to all Splunk development resources and receive a 10GB license to build an app that will help solve use cases for customers all over the world. Splunkbase has 1000+ apps from Splunk, our partners and our community. Find an app for most any data source and user need, or simply create your own with help from our developer portal.

Follow Us:
Splunk, Splunk>,Turn Data Into Doing, Data-to-Everything, and D2E are trademarks or registered trademarks of Splunk LLC in the United States and other countries. All other brand names,product names,or trademarks belong to their respective owners.