Skip to content

giovino/wf-email-urls

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

wf-email-urls

A script to submit urls seen in the message body of UCE to whiteface

Requirements

  1. py-cgmail
  2. py-whitefacesdk

Goals

  1. To demonstrate how to interact with Whiteface using the Whiteface SDK

Requirements

  1. A Whiteface account
  2. A Whiteface account token; within Whiteface:
  3. Select your username
  4. Select "tokens"
  5. Select "Generate Token
  6. A Whiteface feed; within Whiteface
  7. Select (the plus sign)
  8. Select Feed
  9. Choose a feed name (e.g. port scanners)
  10. Choose a feed description (hosts blocked in firewall logs)
  11. A Linux mail server with procmail installed
  • procmail is only one way this script could be used

Install

  1. Create a virtual environment for this project.
  2. Install py-cgmail and py-whitefacesdk within the virtual environment.
  3. Download the wf-email-urls.py script
$ wget https://raw.githubusercontent.com/giovino/wf-email-urls/master/wf-email-urls.py
  1. Edit wf-email-urls.py to fill in (WHITEFACE_USER, WHITEFACE_FEED, WHITEFACE_TOKEN)
  2. Leverage procmail to feed spam email through standard in. This is just an example, you will want to customize it appropriately.
# Process spam emails to have the urls in the message body submitted
# to whiteface
:0 c
* ^X-Spam-Level: \*\*\*\*\*
| /path/to/venv/bin/python2.7 /path/to/whiteface-submit.py

About

A script to submit urls seen in the message body of UCE to whiteface

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages