Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions cve_testers/cve_2019_12258.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

"""
This script is used to check whether a machine is vulnerable to CVE-2019-12258, one of the urgent11 vulnerabilities
published in August 2019 (https://nvd.nist.gov/vuln/detail/CVE-2019-12258).
published in August 2019 by Armis Security (https://armis.com/urgent11, https://nvd.nist.gov/vuln/detail/CVE-2019-12258).
CVE-2019-12258 is a relatively simple vulnerability, which allows DoS attacks on an existing tcp session without
prior knowledge of the session sequence numbers.
The check implemented here works as follows:
Expand Down Expand Up @@ -109,10 +109,10 @@ def is_ip_vulnerable_wrapper(self, ip, interface):
print('Checking ip {}...'.format(ip))
for tcp_port in self.tcp_ports:
if self.is_ip_vulnerable(ip, tcp_port, interface):
print('The host {} is vulnerable to CVE-2019-12258'.format(ip))
print('The host {} is vulnerable to CVE-2019-12258'.format(ip))
return
if self.verbose > VERBOSE_NONE:
print('The host {} is not vulnerable to CVE-2019-12258'.format(ip))
print('The host {} is not vulnerable to CVE-2019-12258'.format(ip))

def is_ip_vulnerable_ip_range(self, interface):
for ip in iter_iprange(self.ip, self.ip_end):
Expand All @@ -128,7 +128,7 @@ def test_for_cve(self, interface):
def main():
if sys.version_info[0] < 3:
raise Exception("Python 3 or a more recent version is required.")
parser = argparse.ArgumentParser(description="Script for testing whether PLCs are vulnerable to CVE-2019-12258")
parser = argparse.ArgumentParser(description="Script for testing whether PLCs are vulnerable to CVE-2019-12258")
parser.add_argument('-ip', '--ip', help='IP to test, or start of ip range', required=True)
port_group = parser.add_mutually_exclusive_group(required=True)
port_group.add_argument('-p', '--port', help='port to use.', type=int)
Expand Down