1
- |PyPI version | |Build Status | |Coverage Status | |BCH compliance |
1
+ `PyPI version <https://badge.fury.io/py/SpamScope >`__ `Build
2
+ Status <https://travis-ci.org/SpamScope/spamscope> `__ `Coverage
3
+ Status <https://coveralls.io/github/SpamScope/spamscope?branch=develop> `__
4
+ `BCH compliance <https://bettercodehub.com/ >`__
2
5
3
6
.. figure :: https://raw.githubusercontent.com/SpamScope/spamscope/develop/docs/logo/spamscope.png
4
7
:alt: SpamScope
@@ -26,20 +29,55 @@ folder <./topologies/>`__, but you can make others topologies.
26
29
27
30
Schema topology
28
31
32
+ What Does SpamScope do?
33
+ =======================
34
+
35
+ SpamScope gets the raw emails (both RFC822 and Outlook formats) in input
36
+ and returns an JSON object. Then it extracts urls and attachments (if
37
+ they are zipped extracts the content files). All informations are saved
38
+ in JSON objects. This is the first analysis. After that SpamScope runs a
39
+ *phishing * module, that gives a *phishing score * to the emails.
40
+
41
+ Then you can enable/disable post processing modules, that connect
42
+ SpamScope with third party tools. There are three main categories: - raw
43
+ emails analysis - attachments analysis - sender emails analysis
44
+
45
+ It’s possible to add new modules in these three categories, if you want
46
+ connect SpamScope with others tools.
47
+
48
+ Raw emails analysis
49
+ -------------------
50
+
51
+ These modules (see `here <./src/modules/mails >`__) analyze the raw
52
+ emails: - SMTP dialect - SpamAssassin
53
+
54
+ Attachments analysis
55
+ --------------------
56
+
57
+ These modules (see `here <./src/modules/attachments >`__) analyze the
58
+ attachments of emails: - Apache Tika - Store sample on disk (as default
59
+ SpamScope saves samples in JSON objects) - Thug - VirusTotal - Zemana
60
+
61
+ Sender emails analysis
62
+ ----------------------
63
+
64
+ SpamScope can detects the exact sender IP and then it can analyze it
65
+ (see `here <./src/modules/networks >`__): - Shodan - VirusTotal
66
+
29
67
Why should I use SpamScope
30
68
==========================
31
69
32
- - It' s very fast: the job is splitted in functionalities that work in
70
+ - It’ s very fast: the job is splitted in functionalities that work in
33
71
parallel.
34
- - It' s flexible: you can choose what SpamScope has to do.
35
- - It' s distributed: SpamScope uses Apache Storm, free and open source
72
+ - It’ s flexible: you can choose what SpamScope has to do.
73
+ - It’ s distributed: SpamScope uses Apache Storm, free and open source
36
74
distributed realtime computation system.
37
75
- It makes JSON output that you can save where you want.
38
- - It' s easy to setup: there are docker images and docker-compose ready
76
+ - It’ s easy to setup: there are docker images and docker-compose ready
39
77
for use.
40
- - It' s integrated with Apache Tika, VirusTotal, Thug, Shodan and
78
+ - It’ s integrated with Apache Tika, VirusTotal, Thug, Shodan and
41
79
SpamAssassin (for now).
42
- - It' s free and open source (for special functions you can contact me).
80
+ - It’ s free and open source (for special functions you can contact me).
43
81
- It can analyze Outlook msg.
44
82
45
83
Distributed
@@ -58,12 +96,12 @@ SpamScope comes with the following bolts: - **tokenizer** splits mail in
58
96
token like headers, body, attachments and it can filter emails,
59
97
attachments and ip addresses already seen - **phishing ** looks for your
60
98
keywords in email and connects email to targets (bank, your customers,
61
- etc.) - **raw \_ mail ** is for all third party tools that analyze raw
62
- mails like SpamAssassin - **attachments ** analyzes all mail attachments
63
- and uses third party tools like VirusTotal - **network ** analyzes all
64
- sender ip addresses with third party tools like Shodan - **urls **
65
- extracts all urls in email and attachments - **json \_ maker ** and
66
- ** outputs ** make the json report and save it
99
+ etc.) - **raw_mail ** is for all third party tools that analyze raw mails
100
+ like SpamAssassin - **attachments ** analyzes all mail attachments and
101
+ uses third party tools like VirusTotal - **network ** analyzes all sender
102
+ ip addresses with third party tools like Shodan - **urls ** extracts all
103
+ urls in email and attachments - **json_maker ** and ** outputs ** make the
104
+ json report and save it
67
105
68
106
Store where you want
69
107
--------------------
@@ -80,21 +118,21 @@ and/or remove spouts and bolts.
80
118
API
81
119
---
82
120
83
- For now SpamScope doesn' t have its own API, because it isn' t tied to any
84
- tecnology. If you use ``Redis `` as spout (input), you' ll use Redis API
85
- to put mails in topology. If you use ``Elasticsearch `` as output, you' ll
121
+ For now SpamScope doesn’ t have its own API, because it isn’ t tied to any
122
+ tecnology. If you use ``Redis `` as spout (input), you’ ll use Redis API
123
+ to put mails in topology. If you use ``Elasticsearch `` as output, you’ ll
86
124
use Elasticsearch API to get results.
87
125
88
- It' s possible to develop a middleware API that it talks with input,
89
- output and changes the configuration, but now there isn' t.
126
+ It’ s possible to develop a middleware API that it talks with input,
127
+ output and changes the configuration, but now there isn’ t.
90
128
91
129
Apache 2 Open Source License
92
130
============================
93
131
94
132
SpamScope can be downloaded, used, and modified free of charge. It is
95
133
available under the Apache 2 license.
96
134
97
- | Donate |
135
+ ` Donate < https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=VEPXYP745KJF2 >`__
98
136
99
137
SpamScope on Web
100
138
================
@@ -104,6 +142,8 @@ SpamScope on Web
104
142
- `The Honeynet Project <http://honeynet.org/node/1329 >`__
105
143
- `securityonline.info <http://securityonline.info/pcileech-direct-memory-access-dma-attack-software/ >`__
106
144
- `jekil/awesome-hacking <https://github.com/jekil/awesome-hacking >`__
145
+ - `Linux Security
146
+ Expert <https://linuxsecurity.expert/tools/spamscope/> `__
107
147
108
148
Authors
109
149
=======
@@ -124,7 +164,7 @@ For Python requirements you can read: \* `mandatory
124
164
requirements <./requirements.txt> `__ \* `optional
125
165
requirements <./requirements_optional.txt> `__
126
166
127
- *Thug * is another optional requirement, that it' s not in requirements.
167
+ *Thug * is another optional requirement, that it’ s not in requirements.
128
168
See `Thug section <#thug-optional >`__ for more details.
129
169
130
170
Apache Storm
@@ -197,32 +237,32 @@ errors in Apache Storm. To avoid any issue set
197
237
198
238
::
199
239
200
- nr. user agents * timeout_thug < supervisor.worker.timeout.secs
240
+ nr. user agents * timeout_thug < supervisor.worker.timeout.secs
201
241
202
242
The best value for ``threshold `` is 1.
203
243
204
244
VirusTotal (optional)
205
245
---------------------
206
246
207
- It' s possible add to results (for mail attachments and sender ip
247
+ It’ s possible add to results (for mail attachments and sender ip
208
248
address) the VirusTotal report. You need a private API key.
209
249
210
250
Shodan (optional)
211
251
-----------------
212
252
213
- It' s possible add to results the Shodan report for sender ip address.
253
+ It’ s possible add to results the Shodan report for sender ip address.
214
254
You need a private API key.
215
255
216
256
Elasticsearch (optional)
217
257
------------------------
218
258
219
- It' s possible to store the results in Elasticsearch. In this case you
259
+ It’ s possible to store the results in Elasticsearch. In this case you
220
260
should install ``elasticsearch `` package.
221
261
222
262
Redis (optional)
223
263
----------------
224
264
225
- It' s possible to store the results in Redis. In this case you should
265
+ It’ s possible to store the results in Redis. In this case you should
226
266
install ``redis `` package.
227
267
228
268
Configuration
@@ -231,12 +271,12 @@ Configuration
231
271
Read the `example of main configuration
232
272
file <./conf/spamscope.example.yml> `__. The default value where
233
273
SpamScope will search the configuration file is
234
- ``/etc/spamscope/spamscope.yml ``, but it' s possible to set the
274
+ ``/etc/spamscope/spamscope.yml ``, but it’ s possible to set the
235
275
environment variable ``SPAMSCOPE_CONF_FILE ``:
236
276
237
277
::
238
278
239
- $ export SPAMSCOPE_CONF_FILE=/etc/spamscope/spamscope.yml
279
+ $ export SPAMSCOPE_CONF_FILE=/etc/spamscope/spamscope.yml
240
280
241
281
When you change the configuration file, SpamScope automatically reloads
242
282
the new changes.
@@ -252,21 +292,21 @@ Topologies
252
292
==========
253
293
254
294
SpamScope comes with three topologies: -
255
- `spamscope \_ debug <./topologies/spamscope_debug.py >`__: the output are
295
+ `spamscope_debug <./topologies/spamscope_debug.py >`__: the output are
256
296
JSON files on file system. -
257
- `spamscope \_ elasticsearch <./topologies/spamscope_elasticsearch.py >`__:
297
+ `spamscope_elasticsearch <./topologies/spamscope_elasticsearch.py >`__:
258
298
the output are stored in Elasticsearch indexes. -
259
- `spamscope \_ redis <./topologies/spamscope_redis.py >`__: the output are
299
+ `spamscope_redis <./topologies/spamscope_redis.py >`__: the output are
260
300
stored in Redis.
261
301
262
302
If you want submit SpamScope topology use ``spamscope-topology submit ``
263
303
tool. For more details `see SpamScope cli tools <src/cli/README.md >`__:
264
304
265
305
::
266
306
267
- $ spamscope-topology submit --topology {spamscope_debug,spamscope_elasticsearch,spamscope_redis}
307
+ $ spamscope-topology submit --topology {spamscope_debug,spamscope_elasticsearch,spamscope_redis}
268
308
269
- It' s possible to change the default settings for all Apache Storm
309
+ It’ s possible to change the default settings for all Apache Storm
270
310
options. I suggest to change these options:
271
311
272
312
- **topology.tick.tuple.freq.secs **: reload configuration of all bolts
@@ -297,16 +337,16 @@ variables:
297
337
298
338
::
299
339
300
- $ export THUG_ENABLED=True
301
- $ export VIRUSTOTAL_ENABLED=True
302
- $ export VIRUSTOTAL_APIKEY="your key"
303
- $ export ZEMANA_ENABLED=True
304
- $ export ZEMANA_APIKEY="your key"
305
- $ export ZEMANA_PARTNERID="your partner id"
306
- $ export ZEMANA_USERID="your userid"
307
- $ export SHODAN_ENABLED=True
308
- $ export SHODAN_APIKEY="your key"
309
- $ export SPAMASSASSIN_ENABLED=True
340
+ $ export THUG_ENABLED=True
341
+ $ export VIRUSTOTAL_ENABLED=True
342
+ $ export VIRUSTOTAL_APIKEY="your key"
343
+ $ export ZEMANA_ENABLED=True
344
+ $ export ZEMANA_APIKEY="your key"
345
+ $ export ZEMANA_PARTNERID="your partner id"
346
+ $ export ZEMANA_USERID="your userid"
347
+ $ export SHODAN_ENABLED=True
348
+ $ export SHODAN_APIKEY="your key"
349
+ $ export SPAMASSASSIN_ENABLED=True
310
350
311
351
Output example
312
352
==============
@@ -338,14 +378,3 @@ Screenshots
338
378
:alt: SpamScope Map
339
379
340
380
SpamScope Map
341
-
342
- .. |PyPI version | image :: https://badge.fury.io/py/SpamScope.svg
343
- :target: https://badge.fury.io/py/SpamScope
344
- .. |Build Status | image :: https://travis-ci.org/SpamScope/spamscope.svg?branch=master
345
- :target: https://travis-ci.org/SpamScope/spamscope
346
- .. |Coverage Status | image :: https://coveralls.io/repos/github/SpamScope/spamscope/badge.svg?branch=develop
347
- :target: https://coveralls.io/github/SpamScope/spamscope?branch=develop
348
- .. |BCH compliance | image :: https://bettercodehub.com/edge/badge/SpamScope/spamscope?branch=develop
349
- :target: https://bettercodehub.com/
350
- .. |Donate | image :: https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif
351
- :target: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=VEPXYP745KJF2
0 commit comments