Issue #35 - Added option for blocked IPs.

This commit is contained in:
daniel goldberg 2016-09-21 11:35:41 +03:00
parent 084cee78fd
commit 3549bb351e
3 changed files with 8 additions and 1 deletions

View File

@ -172,6 +172,8 @@ class Configuration(object):
range_size = 1 range_size = 1
range_fixed = ['',] range_fixed = ['',]
blocked_ips = ['', ]
# TCP Scanner # TCP Scanner
HTTP_PORTS = [80, 8080, 443, HTTP_PORTS = [80, 8080, 443,
8008, # HTTP alternate 8008, # HTTP alternate
@ -210,7 +212,6 @@ class Configuration(object):
smb_download_timeout = 300 # timeout in seconds smb_download_timeout = 300 # timeout in seconds
smb_service_name = "InfectionMonkey" smb_service_name = "InfectionMonkey"
# system info collection # system info collection
collect_system_info = True collect_system_info = True

View File

@ -10,6 +10,7 @@
"range_fixed": [ "range_fixed": [
"" ""
], ],
"blocked_ips": [""],
"current_server": "41.50.73.31:5000", "current_server": "41.50.73.31:5000",
"psexec_passwords": [ "psexec_passwords": [
"Password1!", "Password1!",

View File

@ -52,6 +52,11 @@ class NetworkScanner(object):
if victim.ip_addr in self._ip_addresses: if victim.ip_addr in self._ip_addresses:
continue continue
# skip IPs marked as blocked
if victim.ip_addr in WormConfiguration.blocked_ips:
LOG.info("Skipping %s due to blacklist" % victim)
continue
LOG.debug("Scanning %r...", victim) LOG.debug("Scanning %r...", victim)
# if scanner detect machine is up, add it to victims list # if scanner detect machine is up, add it to victims list