• Stars
    star
    140
  • Rank 259,935 (Top 6 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 6 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

System based on +500 blacklists and 5 external intelligences to detect internet potencially malicious hosts

A system based on +500 blacklists and 5 external intelligences to detect potentially malicious hosts on the internet.

Description

The tool parses more than 500 public blacklists around the internet in order to identify potencially malicious devices.

Among the final blacklist created merging all the others you can find ips, domains and urls that potencially:

  • Are infected with malware
  • Attack other hosts
  • Send spam
  • Contains phishing sites
  • Are bitcoin nodes
  • Are Tor exit nodes or web-to-tor hosts
  • Are public proxies
  • Have bad reputation
  • Are related to adware
  • Whitelisted domains (a whitelisted domain will also appeard so you can easily find false possitives. Please, always check if a domain has been categorized as "Whitelist")

All blacklists used to create a single and huge blacklist can be seen here.

When you require the blacklist it will start accessing and loading all the blacklists. This process could take from 5 to 10 minutes. The "database" will be a javascript huge dictionary in memmory. Each component will be and IP or Domain or IPRange potencially malicios that will have as atributes:

  • A title
  • An array of types (reason/s why this host is potencially malicious)
  • An array of urls (that points to the malicios part of the host)
  • Location (only filled if it is an IP)
  • The references that have pointed to this host.

Besides, the API of 5 external intelligences are used to check single IPs or domains not only against the huge database of hosts blacklisted but also against the intelligences. If the ip or domain has something suspicious it will be discovered.

malicious_comp = "IP/DOMAIN/RANGE": { 
                    title: "",
                    type: [],
                    urls: [],
                    location : {lat: "", lng: ""},
                    references: []
}

Whitelisting

It has been added some whitelisting so very used and common domains are whitelisted. Please, before deciding that a domain is malicious, check if it has been categorized as "Whitelist".

Visual representation of a portion of the final database

Please visit MalwareWorld to access to the main page of MalwareWolrd where you can check if a domain or IP is suspicious.

You can found some maps where some malicious IPs detected are represented (It is recommended to use Chrome):

Requisites

At least 4Gb of RAM are needed to run this project, 8Gb is recommended

External Intelligences Used

By default, when you check if an IP, Domain or Url is malicious it will be checked agaist the database created merging all the blacklists and against the activated extrnal inteligences. The external intelligences are:

By default, only the intelligences that don't require credentials to be used are activated. These are: Fortiguard and Spamcop.

If you want to deactivate Fortiguard or Spamcop, use:

mw.deactivateFortiguard()

mw.deactivateSpamcop()

In order to activate the other intelligences you have to set the credentials:

Activate Fraudguard:

mw.setFraudguardUser("<YOUR USERNAME>");

mw.setFraudguardPass("<YOUR PASSWORD>");

Activate ProjecHoneypot:

mw.setProjecthoneypotKey("<YOUR API KEY>");

Activate WOT:

mw.setWOTKey("<YOUR WOT API KEY>")

Activate OTX Alientvault:

mw.setOTXAlientvaultKey("<YOUR WOT API KEY>")

Huge Blacklists

If you only want the huge blacklist that MalwareWorld creates you can access to:

Installation

npm install malwareworld

How to use

The library has been made to be as simple as possible to use. Once the library has had time to load all the blacklists:

const mw = require('malwareworld')

Check if Malicious

You can check if an IP, Domain or URL is malicious just calling: mw.isMalicious(<INPUT>)

> mw.isMalicious("70.32.94.216").then(function(result){ 
        console.log(result);
    }, function(err) {
        console.log(err);
});

// Result:
{ malicious: true,
  '70.32.94.216':
   { title: 'honeypot_tracker/Malicious Host/Spammer',
     type: [ 'Bad Reputation', 'Spammer' ],
     urls: [],
     location: { lat: 34.0202, lng: -118.3928 },
     references:
      [ 'https://fraudguard.io/',
        'https://fortiguard.com/search?q=70.32.94.216&engine=8',
        'https://www.spamcop.net/w3m?action=checkblock&ip=70.32.94.216' ] 
   }
}

By default this method will check the INPUT against the database created using all the blacklists and against the activated external intelligeces.

If you don't want to create the database using the blacklists you can do:

mw.deactivateBlacklists()

You can get all the potencially malicious domains of the database with their descriptions calling:

mw.getMalDomainsList()

You can get all the potencially malicious IPs of the database with their descriptions calling:

mw.getMalIpsList()

You can get all the potencially malicious IP Ranges of the database with their descriptions calling:

mw.getMalRangesList()

You can get all the hosts of type of the database with their descriptions calling:

mw.getMalHostsOf(TYPE)

Types: BadReputation, Malware, KnownAttacker, Spammer, Phishing, CryptoCurrencies, Hidesource, Adware, DGA

You can get all the blacklist that does not respond calling:

mw.getNotRespondingLists()

Statistics

You can get general statistics of the status of the database and the blacklists by calling:

> mw.getGeneralStatistics()
{ num_ips: 165117,                    // Number of unique malicious IPs found
  num_domains: 118664,                // Number of unique malicious Domains found
  num_ranges: 46089,                  // Number of unique malicious IP Ranges found
  num_blacklists: 522,                // Number of blacklists used
  num_notResponding_blacklists: 0,    // Number of blacklists not loaded
  total_unique: 329870,               // Number of unique malicious hosts
  repeated: 116451,                   // Number of repetitions found between balcklists
  external_sources:                   // Check if the external sources are being used or not
   { fraudguard: false,
     fortiguard: true,
     projecthoneypot: false,
     simplespamcop: true,
     wot: false } 
}

You can access how much potencially malicious hosts were contained in each blacklist used and the sha1 of the response body by calling:

mw.getStatistics()

Renew data

You can reload all the blacklists calling:

mw.renewAllData()

You can reload all the not responding blacklists calling:

mw.renewNotRespondingData()

You can set an interval to reload every blacklists calling:

mw.renewtAllDataInterval(MINUTES)

You can set an interval to reload every not responding blacklists calling:

mw.renewNotRespondingDataInterval(MINUTES)

Port

You can set the isMalicious() function to listen in a port calling: mw.listenInPort(PORT)

Example

const mw = require('malwareworld');

mw.setFraudguardUser("<YOUR USERNAME>");
mw.setFraudguardPass("<YOUR PASSWORD>");
mw.setProjecthoneypotKey("<YOUR API KEY>");
mw.setWOTKey("<YOUR API KEY>");
mw.setOTXAlientvaultKey("<YOUR WOT API KEY>");

var day = 24**60;
var hour1   = 1**60;

mw.renewtAllDataInterval(day);      	  // Reload the blacklists every day
mw.renewNotRespondingData(hour1);       // Try to load the not responding blacklists every hour

mw.listenInPort(9999);                  // Expose the isMalicious() funtion in port 9999  

mw.isMalicious("malwareworld.com").then(function(result){  // Check if the domain malwareworld.com is malicious (No, it isn't)
        console.log(result);
    }, function(err) {
        console.log(err);
});

TODO

  • Integrate more blacklists and external intelligences.
  • If you know about blacklists or external intelligences that are not used, please contact me.

License

The MIT License (MIT)

Copyright (c) 2018 Carlos Polop

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

PLEASE, NOTICE THAT IF YOU ARE PLANNING TO USE THE DATABASE CREATED BY THIS SOFTWARE WITH COMMERCIAL PURPOSES YOU SHOULD CHECK THE LICENSE ASSOCIATE WITH EACH BLACKLIST THAT THIS SOFTWARE USES.

More Repositories

1

PEASS-ng

PEASS - Privilege Escalation Awesome Scripts SUITE (with colors)
C#
14,533
star
2

hacktricks

Welcome to the page where you will find each trick/technique/whatever I have learnt in CTFs, real life apps, and reading researches and news.
Python
7,927
star
3

Auto_Wordlists

Python
993
star
4

legion

Automatic Enumeration Tool based in Open Source tools
Python
851
star
5

PurplePanda

Identify privilege escalation paths within and across different clouds
Python
653
star
6

hacktricks-cloud

Python
450
star
7

fuzzhttpbypass

This tool use fuuzzing to try to bypass unknown authentication methods, who knows...
Python
202
star
8

BotPEASS

Use this bot to monitor new CVEs containing defined keywords and send alerts to Slack and/or Telegram.
Python
197
star
9

autoVolatility

Run several volatility plugins at the same time
Python
104
star
10

winPE

Windows privilege escalation with cmd
Batchfile
87
star
11

su-bruteforce

Shell
82
star
12

bf-aws-permissions

Shell
70
star
13

Leakos

Python
62
star
14

Gorks

Python
61
star
15

DDexec

Shell
46
star
16

Pastos

Python
41
star
17

aws_iam_review

Python
31
star
18

prepkal

Simple script to download some missing tools in Kali
Shell
29
star
19

bashReconScan

Bash Recon Scan - Recon and Scan a network using Bash
Shell
28
star
20

phpwebshelllimited

PHP
25
star
21

sh2bin

Go
23
star
22

KAOSK-backdoors

Automate the creation of Backdoors and postexplotation activities
Python
22
star
23

gcp_privesc_scripts

Shell
22
star
24

MalwarePoC

Windows Malware Probe of Concept
C++
20
star
25

Tapjacking-ExportedActivity

Kotlin
19
star
26

easy_stegoCTF

Brutteforce for stego CTFs
Python
17
star
27

github_archive_scraper

Python
16
star
28

KeyLoggerWin

Windows Keylogger in C++
C++
16
star
29

SlackDump

Python
16
star
30

DistrolessRCE

Python
15
star
31

Cloudtrail2IAM

Python
15
star
32

bf-aws-perms-simulate

Python
15
star
33

selenium_webBot

Selenium based bot that automatize the creation of accounts in a web page
Python
12
star
34

easy_cryptoCTF

Try to bruteforce several cypher algorithms that can be used in CTFs
Python
12
star
35

nse_winVulnDetection_csv

Checks if a windows machine with the smb service actve is vulnerable to the CVEs of a CSV file passed as argument to the script
Lua
12
star
36

AutoHackBruteOs

10
star
37

aws-Perms2ManagedPolicies

Python
10
star
38

BeefHook-Extension

BeefHook-Extension
JavaScript
10
star
39

tfstate2IAM

Python
9
star
40

hackthebox-machines-challenges-SirBroccoli

SirBroccolis hackthebox writeups (protected by password)
9
star
41

easy_BFopensslCTF

Bash script that given a password (or a wordlist) tries to decrypt an OpenSSL encrypted file using several algorithms.
Shell
9
star
42

bf_my_gcp_permissions

Python
9
star
43

MSF-Credentials

Ruby
9
star
44

aws_tools

Shell
8
star
45

sqlmap_to_unicode_template

Python
7
star
46

correct_dict

Detect and remove repeated words of a Wordlist
Python
7
star
47

docker-mitm

Dockerfile
7
star
48

LambdaLayerBackdoor

Python
7
star
49

telegram_sshBot

Python
6
star
50

CheerUp-Bot

Telegram bot to cheerUP people
Python
6
star
51

byte-flipping

Byte flipping attack inside cookie
Python
6
star
52

docker-ps-spy

C
6
star
53

hacktricks-bot

Python
6
star
54

DirtyNIB

Swift
5
star
55

exploiting_examples

C
5
star
56

AddSectionToPE

Add a section to the beginning or to the end of sections
C++
5
star
57

aws_find_external_accounts

Python
4
star
58

gcp_oauth_phishing_example

Python
4
star
59

gcp_gen_delegation_token

Python
4
star
60

docker_auth_profiler

Go
3
star
61

carlospolop

3
star
62

terraform_external_module_rev_shell

HCL
1
star
63

CHack_bot

Python
1
star
64

TestAWSOpenID

1
star