Posted by: Jonathan
Information Profiling is one of the most important steps in any penetration test. Consultants should investigate all publicly available information about their client prior to starting testing. This includes investigating if the client’s domain or emails have been compromised. Several services exist to assist with this such as Have I Been Pwnd (HIBP). Most of these services are also nice enough to provide an API and while we love using them, we don’t like entering one email or domain at a time therefore Pastepwnd was born.
Pastepwnd is a python based script to assist with recursively looking up emails or domains against the HIBP and Hacked Emails APIs to help identify compromises. If any compromises were identified Pastepwnd will output the data to an HTML file with links to the Pastebin that contains the compromise and an cached version incase the paste has already been removed.
Pastepwnd can be found at in our Github repository located at: https://github.com/leapsecurity/Pastepwnd. Open up a terminal and perform a clone of the repository using
git clone https://github.com/leapsecurity/Pastepwnd.git. Once you have the repository on your system go ahead and install the requests dependency necessary to run the script. This can easily be done with the requirements.txt file we included in the directory and pip using the following command:
pip install -r requirements.txt. Now you should be able to run it without any issues.
The help menu describes the program well, users may use pastepwnd and provide a file with multiple emails or domains to check for compromises, but for the purposes of this demo we will quickly check the email@example.com email for compromises as shown below.
As shown in the image above, Pastepwnd will produce an HTMl file with the results. Open that up with your favorite browser to see the results in table output along with links to the pastes.
Pastepwnd was created to assist with Information Profiling but also with blue teaming and end users in mind. This tool checks organizations to ensure there hasn’t been any publicly available or published information about potential compromises.
Leap Security is the trusted, dependable, and authoritative source for Information Security services. Leap Security prides itself on providing honest, tailored cyber security solutions that ensure every organization’s needs are met. Headquartered in South Florida, Leap Security travels and has resources across the nation to help secure environments. Security is not a product, but a step-by-step process. Take a Leap with your security today. Reach out to us on twitter @LeapSecurity or email at firstname.lastname@example.org at anytime.