forked from p34709852/monkey
Revert longish import
This commit is contained in:
parent
cd716eb1c8
commit
997125eadd
|
@ -6,7 +6,7 @@ import requests
|
||||||
from requests.exceptions import Timeout, ConnectionError
|
from requests.exceptions import Timeout, ConnectionError
|
||||||
|
|
||||||
import infection_monkey.config
|
import infection_monkey.config
|
||||||
import infection_monkey.network.HostFinger
|
from infection_monkey.network.HostFinger import HostFinger
|
||||||
from common.data.network_consts import ES_SERVICE
|
from common.data.network_consts import ES_SERVICE
|
||||||
|
|
||||||
ES_PORT = 9200
|
ES_PORT = 9200
|
||||||
|
@ -15,7 +15,7 @@ LOG = logging.getLogger(__name__)
|
||||||
__author__ = 'danielg'
|
__author__ = 'danielg'
|
||||||
|
|
||||||
|
|
||||||
class ElasticFinger(infection_monkey.network.HostFinger.HostFinger):
|
class ElasticFinger(HostFinger):
|
||||||
"""
|
"""
|
||||||
Fingerprints elastic search clusters, only on port 9200
|
Fingerprints elastic search clusters, only on port 9200
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import infection_monkey.config
|
import infection_monkey.config
|
||||||
import infection_monkey.network.HostFinger
|
from infection_monkey.network.HostFinger import HostFinger
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class HTTPFinger(infection_monkey.network.HostFinger.HostFinger):
|
class HTTPFinger(HostFinger):
|
||||||
"""
|
"""
|
||||||
Goal is to recognise HTTP servers, where what we currently care about is apache.
|
Goal is to recognise HTTP servers, where what we currently care about is apache.
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -2,7 +2,7 @@ import errno
|
||||||
import logging
|
import logging
|
||||||
import socket
|
import socket
|
||||||
|
|
||||||
import infection_monkey.network.HostFinger
|
from infection_monkey.network.HostFinger import HostFinger
|
||||||
import infection_monkey.config
|
import infection_monkey.config
|
||||||
|
|
||||||
__author__ = 'Maor Rayzin'
|
__author__ = 'Maor Rayzin'
|
||||||
|
@ -10,7 +10,7 @@ __author__ = 'Maor Rayzin'
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class MSSQLFinger(infection_monkey.network.HostFinger.HostFinger):
|
class MSSQLFinger(HostFinger):
|
||||||
|
|
||||||
# Class related consts
|
# Class related consts
|
||||||
SQL_BROWSER_DEFAULT_PORT = 1434
|
SQL_BROWSER_DEFAULT_PORT = 1434
|
||||||
|
|
|
@ -2,7 +2,7 @@ import logging
|
||||||
import socket
|
import socket
|
||||||
|
|
||||||
import infection_monkey.config
|
import infection_monkey.config
|
||||||
import infection_monkey.network.HostFinger
|
from infection_monkey.network.HostFinger import HostFinger
|
||||||
from infection_monkey.network.tools import struct_unpack_tracker, struct_unpack_tracker_string
|
from infection_monkey.network.tools import struct_unpack_tracker, struct_unpack_tracker_string
|
||||||
|
|
||||||
MYSQL_PORT = 3306
|
MYSQL_PORT = 3306
|
||||||
|
@ -10,7 +10,7 @@ SQL_SERVICE = 'mysqld-3306'
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class MySQLFinger(infection_monkey.network.HostFinger.HostFinger):
|
class MySQLFinger(HostFinger):
|
||||||
"""
|
"""
|
||||||
Fingerprints mysql databases, only on port 3306
|
Fingerprints mysql databases, only on port 3306
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -5,7 +5,7 @@ import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import infection_monkey.config
|
import infection_monkey.config
|
||||||
import infection_monkey.network.HostFinger
|
from infection_monkey.network.HostFinger import HostFinger
|
||||||
import infection_monkey.network.HostScanner
|
import infection_monkey.network.HostScanner
|
||||||
|
|
||||||
__author__ = 'itamar'
|
__author__ = 'itamar'
|
||||||
|
@ -19,7 +19,7 @@ WINDOWS_TTL = 128
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class PingScanner(infection_monkey.network.HostScanner.HostScanner, infection_monkey.network.HostFinger.HostFinger):
|
class PingScanner(infection_monkey.network.HostScanner.HostScanner, HostFinger):
|
||||||
|
|
||||||
_SCANNED_SERVICE = ''
|
_SCANNED_SERVICE = ''
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ import struct
|
||||||
import logging
|
import logging
|
||||||
from odict import odict
|
from odict import odict
|
||||||
|
|
||||||
import infection_monkey.network.HostFinger
|
from infection_monkey.network.HostFinger import HostFinger
|
||||||
|
|
||||||
SMB_PORT = 445
|
SMB_PORT = 445
|
||||||
SMB_SERVICE = 'tcp-445'
|
SMB_SERVICE = 'tcp-445'
|
||||||
|
@ -99,7 +99,7 @@ class SMBSessionFingerData(Packet):
|
||||||
self.fields["bcc1"] = struct.pack("<i", len(self.fields["Data"]))[:2]
|
self.fields["bcc1"] = struct.pack("<i", len(self.fields["Data"]))[:2]
|
||||||
|
|
||||||
|
|
||||||
class SMBFinger(infection_monkey.network.HostFinger.HostFinger):
|
class SMBFinger(HostFinger):
|
||||||
_SCANNED_SERVICE = 'SMB'
|
_SCANNED_SERVICE = 'SMB'
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import re
|
import re
|
||||||
|
|
||||||
import infection_monkey.config
|
import infection_monkey.config
|
||||||
import infection_monkey.network.HostFinger
|
from infection_monkey.network.HostFinger import HostFinger
|
||||||
from infection_monkey.network.tools import check_tcp_port
|
from infection_monkey.network.tools import check_tcp_port
|
||||||
|
|
||||||
SSH_PORT = 22
|
SSH_PORT = 22
|
||||||
|
@ -12,7 +12,7 @@ BANNER_READ = 1024
|
||||||
LINUX_DIST_SSH = ['ubuntu', 'debian']
|
LINUX_DIST_SSH = ['ubuntu', 'debian']
|
||||||
|
|
||||||
|
|
||||||
class SSHFinger(infection_monkey.network.HostFinger.HostFinger):
|
class SSHFinger(HostFinger):
|
||||||
_SCANNED_SERVICE = 'SSH'
|
_SCANNED_SERVICE = 'SSH'
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|
|
@ -2,7 +2,7 @@ from itertools import zip_longest
|
||||||
from random import shuffle
|
from random import shuffle
|
||||||
|
|
||||||
import infection_monkey.config
|
import infection_monkey.config
|
||||||
import infection_monkey.network.HostFinger
|
from infection_monkey.network.HostFinger import HostFinger
|
||||||
import infection_monkey.network.HostScanner
|
import infection_monkey.network.HostScanner
|
||||||
from infection_monkey.network.tools import check_tcp_ports, tcp_port_to_service
|
from infection_monkey.network.tools import check_tcp_ports, tcp_port_to_service
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ __author__ = 'itamar'
|
||||||
BANNER_READ = 1024
|
BANNER_READ = 1024
|
||||||
|
|
||||||
|
|
||||||
class TcpScanner(infection_monkey.network.HostScanner.HostScanner, infection_monkey.network.HostFinger.HostFinger):
|
class TcpScanner(infection_monkey.network.HostScanner.HostScanner, HostFinger):
|
||||||
_SCANNED_SERVICE = 'unknown(TCP)'
|
_SCANNED_SERVICE = 'unknown(TCP)'
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|
Loading…
Reference in New Issue