-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add basic support for IP indicators in MVT (#556)
* Add prelimary ipv4-addr ioc matching support under collection domains * Add IP addresses as a valid IOC type This currently just supports IPv4 addresses which are treated as domains internally in MVT. --------- Co-authored-by: renini <renini@local>
- Loading branch information
Showing
3 changed files
with
24 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ def generate_test_stix_file(file_path): | |
os.remove(file_path) | ||
|
||
domains = ["example.org"] | ||
ip_addresses = ["198.51.100.1"] | ||
processes = ["Launch"] | ||
emails = ["[email protected]"] | ||
filenames = ["/var/foobar/txt"] | ||
|
@@ -33,6 +34,15 @@ def generate_test_stix_file(file_path): | |
res.append(i) | ||
res.append(Relationship(i, "indicates", malware)) | ||
|
||
for a in ip_addresses: | ||
i = Indicator( | ||
indicator_types=["malicious-activity"], | ||
pattern="[ipv4-addr:value='{}']".format(a), | ||
pattern_type="stix", | ||
) | ||
res.append(i) | ||
res.append(Relationship(i, "indicates", malware)) | ||
|
||
for p in processes: | ||
i = Indicator( | ||
indicator_types=["malicious-activity"], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters