Skip to content

Commit

Permalink
Update network_cnc_generic.py
Browse files Browse the repository at this point in the history
  • Loading branch information
doomedraven authored May 9, 2024
1 parent ecd3817 commit 2e79c8b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions modules/signatures/all/network_cnc_generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ def check_ip_in_ranges(ip_address, ip_ranges):
return True
return False

msf_ips_file = "extra/msft-public-ips.csv"
msf_public_ips_list = os.path.join(CUCKOO_ROOT, msf_ips_file)
ip_ranges = load_ip_ranges_from_csv(msf_public_ips_list)


class NetworkCountryDistribution(Signature):
name = "network_country_distribution"
Expand Down Expand Up @@ -82,10 +86,8 @@ class NetworkMultipleDirectIPConnections(Signature):
def run(self):
count = 0
ips = []
msf_ips_file = "extra/msft-public-ips.csv"
msf_public_ips_list = os.path.join(CUCKOO_ROOT, msf_ips_file)

if "network" in self.results and "hosts" in self.results["network"]:
ip_ranges = load_ip_ranges_from_csv(msf_public_ips_list)
for host in self.results["network"]["hosts"]:
ip = host["ip"]
hostname = host["hostname"]
Expand Down

0 comments on commit 2e79c8b

Please sign in to comment.