4
« on: February 24, 2016, 01:10:37 pm »
Harvesting Emails with SimplyEmail
Collecting a list of emails is always a priority when doing reconnaissance on an organization, group, or even just an individual. Many times when you go whaling (phishing a single person, like an executive), the only way you can get your target to take a peek at your awesome website, is by coaxing them with an email.
Lots of folks already know about theHarvester for harvesting lists of emails. I always run a script that condenses the output from theHarvester, goog-mail, goohost, and metasploits auxiliary/gather/search_email_collector. Today, we are going to take a look at a new email collection tool called SimplyEmail.
SimplyEmail improves on theHarvester by making the searches individual modules. This makes it significantly easier to add to. In version 1.2 (latest at time of writing) there are 26 modules including searches of:
* Github
* Google
* Yahoo
* Flickr
* PasteBin
* PGP
* Reddit
* Linkedin
* Exalead
* And more...
Install
Install by doing:
git clone https://github.com/killswitch-GUI/SimplyEmail.git
cd ./SimplyEmail
./Setup.sh
The Setup.sh file will pull down the dependencies and install them for you. Then we can test that it is installed by listing the modules with:
./SimplyEmail.py -l
Usage:
To then run all modules against your target do:
./SimplyEmail.py -all -e example.com
or in verbose.
./SimplyEmail.py -all -v -e example.com
If we add the -s flag for no scope, it will return any emails that are mentioned on the pages. Use this one carefully if you are doing a spear phishing engagement, it could have lots of false positives. Could be useful if going after a small org. You would have to manually verify that they are addresses for the people you are targeting afterwards.
./SimplyEmail.py -all -v -e example.com -s
One of the awesome options of SimplyEmail is -verify flag. This will look up the MX server and verify that the email is valid. Keep in mind that at this point you are sending packets to your target environment.
./SimplyEmail.py -all -v -verify -e example.com
Another interesting option is the -n flag. I'm not positive what this flag does, but I'm pretty sure that it creates an address name by mangling usernames and then testing it against the target MX server.
./SimplyEmail.py -all -v -verify -n -e example.com
Results:
Control group:
I selected an organization of interest to me and decided to do some test runs. My homebrew script that uses theHarvester, goog-mail, goohost, and metasploits auxiliary/gather/search_email_collector returned 46 emails. I normally only do manual false positive testing to make sure that the emails are valid. Accuracy varies.
SimplyEmail tests:
Running the tool, several errors popped up, especially ones from beautifulsoup. I don't think they effected the performance and were ignored. Also, I did not have a canar.io API key, so while running all of the modules, it was skipped over.
1. Running the following returned 62 emails:
./SimplyEmail.py -all -e example.com
2. Running with the -s option returned 148,104 results. However, they were emails from pretty much everywhere including hotmail, MIT, and verizon. Lots of potential false positives. Tens of thousands of them.
./SimplyEmail.py -all -v -e example.com -s
3. I ran with both of the following and didn't see much difference between them. I couldn't tell if the -n flag was useful but the -verify definitely got rid of some of the false positives. I ended up with 30 valid emails, that I didn't have to manually verify.
./SimplyEmail.py -all -v -verify -e example.com
./SimplyEmail.py -all -v -verify -n -e example.com
Conclusion:
For now, I am running both my homebrew and SimplyEmail to collect email lists, then comparing the output. I may try to either integrate it into my script or perhaps over time, as SimplyEmail becomes more feature rich, out right replace my script. The verbose flag was not very useful for simply scraping email, the tool is plenty verbose in it's default state. It may be more useful when developing a module. The following is the command that I recommend to run from now on when using SimplyEmail, play with the flags and see if anything reveals some missed data. If doing a blackbox test, remember that the verify option will send packets to the targets MX server. Remember, it's better to have one loud bang, than a long creaking noise. Don't keep verifying lists of emails, get a good list and run with it.
./SimplyEmail.py -all -verify -e example.com