Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #44 from CybercentreCanada/uri_hostname
Browse files Browse the repository at this point in the history
Inspect URI hostname as IP or Domain
  • Loading branch information
gdesmar authored Nov 8, 2023
2 parents 57c9ff7 + 42a01b5 commit 0cdab42
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions netrep/netrep.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ def execute(self, request: ServiceRequest):

if request.file_type.startswith("uri/"):
iocs["uri"].append(request.task.fileinfo.uri_info.uri)
if re.match(IP_ONLY_REGEX, request.task.fileinfo.uri_info.hostname):
iocs["ip"].append(request.task.fileinfo.uri_info.hostname)
else:
iocs["domain"].append(request.task.fileinfo.uri_info.hostname)

# Filter out URIs that are emails prefixed by http/s
# (commonly tagged by OLETools but causes phishing heuristic to be raised because of '@')
Expand Down

0 comments on commit 0cdab42

Please sign in to comment.