-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
165 additions
and
59 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 |
---|---|---|
@@ -0,0 +1,82 @@ | ||
%YAML 1.1 | ||
--- | ||
|
||
# Created By George P. Burdell 2023-03-14 | ||
# Handle Phishing Rules | ||
|
||
version: "1.0" | ||
rules: | ||
- name: confidence-unknown | ||
# set all rules without a 'confidence' metadata key to "confidence unknown"; populate for SIEM | ||
filter_string: >- | ||
NOT "confidence <ANY>" | ||
actions: | ||
- add_metadata: "confidence unknown" | ||
- name: default-risk-score-50 | ||
# set all phishing related rules with out a risk_score metadata to 50 | ||
filter_string: >- | ||
"filename phishing.rules" OR "msg_regex /phish/i" | ||
actions: | ||
- set_risk_score: "+0,50" | ||
- name: phish-high-confidence | ||
# add 5 to risk_score for phishing related rules wih "confidence high" | ||
filter_string: >- | ||
("filename phishing.rules" OR "msg_regex /phish/i") | ||
AND "confidence high" | ||
actions: | ||
- set_risk_score: "+5" | ||
- name: phish-low-confidence | ||
# subtract 10 to risk_score for phishing related rules wih "confidence low" | ||
filter_string: >- | ||
("filename phishing.rules" OR "msg_regex /phish/i") | ||
AND "confidence low" | ||
actions: | ||
- set_risk_score: "-10" | ||
- name: phish-high-critical | ||
# add 30 to risk_score for critical/high phishing related rules | ||
filter_string: >- | ||
("severity critical" OR "priority high") | ||
AND ("filename phishing.rules" OR "msg_regex /phish/i") | ||
actions: | ||
- set_risk_score: "+30" | ||
- set_priority: 1 | ||
- add_metadata_exclusive: "priority high" | ||
- name: phish-internal-landing-page | ||
# add 50 to risk_score for detection of internal landing page or | ||
# phishing panel being hosted; set rules to drop. | ||
filter_string: >- | ||
("filename phishing.rules" OR "msg_regex /phish/i") | ||
AND (("detection_direction outbound" OR "detection_direction outbound-notexclusive") | ||
AND "protocols http" AND "flow to_client" | ||
) | ||
actions: | ||
- set_risk_score: "+50" | ||
- set_priority: 1 | ||
- add_metadata_exclusive: "priority high" | ||
- regex_sub: '/^alert\x20/drop /' # set to drop | ||
- name: phish-major | ||
# add 15 to risk_score for "severity major" phishing related rules | ||
filter_string: >- | ||
("severity major") | ||
AND ("filename phishing.rules" OR "msg_regex /phish/i") | ||
actions: | ||
- set_risk_score: "+15" | ||
- name: phish-malware-classtype | ||
# Increase risk_score metadata if classtype if 'trojan-activty' or 'command-and-control' | ||
filter_string: >- | ||
("classtype trojan-activity" OR "classtype command-and-control" OR "classtype targeted-activity") | ||
AND ("filename phishing.rules" OR "msg_regex /phish/i") | ||
actions: | ||
- set_risk_score: "+15" | ||
- name: phish-disable-low | ||
# disable phishing rules marked as audit, info, or research | ||
filter_string: >- | ||
("filename phishing.rules" OR "msg_regex /phish/i") | ||
AND ( | ||
"signature_severity informational" OR "signature_severity audit" OR "msg_regex /INFORMATIONAL/i" | ||
OR "rule_regex /[\s\x3B\x28]priority\s*\x3A\s*[45]\s*\x3B/" OR "priority research" OR "priority low" | ||
) | ||
AND NOT "rule_regex /[\s\x3B\x28]flowbits\s*\x3A\s?set/" | ||
actions: | ||
- set_risk_score: "-25" # in case a subsequent rule (re)enables this, the risk score will be accurate. | ||
- disable |