Skip to content

Commit 8ed3d57

Browse files
author
Patrick Bareiss
committed
new github detections
1 parent 75549d2 commit 8ed3d57

File tree

5 files changed

+115
-2
lines changed

5 files changed

+115
-2
lines changed

data_sources/github_enterprise_audit_logs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ id: 8a4d656f-8801-4a2c-ae10-553d2696a59f
33
version: 1
44
date: '2025-01-15'
55
author: Patrick Bareiss, Splunk
6-
description: Data source object for GitHub Enterprise logs
6+
description: Data source object for GitHub Enterprise logs using Audit log streaming as described in this documentation https://docs.github.com/en/enterprise-cloud@latest/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/streaming-the-audit-log-for-your-enterprise#setting-up-streaming-to-splunk using a Splunk HTTP Event Collector.
77
source: http:github
88
sourcetype: httpevent
99
supported_TA:
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: GitHub Organizations Audit Logs
2+
id: ce520b1c-79fe-48ef-a0f9-71fbbd4837b0
3+
version: 1
4+
date: '2025-01-15'
5+
author: Patrick Bareiss, Splunk
6+
description: Data source object for GitHub Organizations logs using the Splunk Add-on for Github using a Personal Access Token.
7+
source: github
8+
sourcetype: github:cloud:audit
9+
supported_TA:
10+
- name: Splunk Add-on for Github
11+
url: https://splunkbase.splunk.com/app/6254
12+
version: 3.1.0
13+
fields:
14+
- _document_id
15+
- action
16+
- actor
17+
- actor_id
18+
- actor_is_bot
19+
- business
20+
- business_id
21+
- created_at
22+
- operation_type
23+
- org
24+
- org_id
25+
- public_repo
26+
- repo
27+
- repo_id
28+
- request_access_security_header
29+
- user
30+
- user_agent
31+
- user_id
32+
example_log: '{ @timestamp: 1736850926658 _document_id: fHPRFHOMZNXLxTZrk1w2IQ action: repository_vulnerability_alerts.disable actor: P4T12ICK actor_id: 8362376 actor_ip: 84.128.62.13 actor_is_bot: false actor_location: { [+] } business: pb business_id: 273781 created_at: 1736850926658 operation_type: modify org: pbtest2 org_id: 194489467 public_repo: false repo: pbtest2/pbtest5 repo_id: 916529548 request_access_security_header: null user: P4T12ICK user_agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 user_id: 8362376 }'

detections/cloud/github_enterprise_disable_dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ description: The following analytic detects when a user disables Dependabot secu
1313
be a precursor to supply chain attacks where attackers exploit vulnerable dependencies. The impact could be severe if vulnerabilities
1414
remain unpatched, potentially leading to code execution, data theft, or other compromises through the software supply chain.
1515
data_source:
16-
- GitHub
16+
- GitHub Enterprise Audit Logs
1717
search: '`github_enterprise` action=repository_vulnerability_alerts.disable
1818
| fillnull
1919
| stats count min(_time) as firstTime max(_time) as lastTime by actor, actor_id, actor_ip, actor_is_bot, actor_location.country_code, business, business_id, org, org_id, repo, repo_id, user, user_agent, user_id, action
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: GitHub Organizations Disable Dependabot
2+
id: 69078d8c-0de6-45de-bb00-14e78e042fd6
3+
version: 1
4+
date: '2025-01-14'
5+
author: Patrick Bareiss, Splunk
6+
status: production
7+
type: Anomaly
8+
description: The following analytic detects when a user disables Dependabot security features within a GitHub repository.
9+
Dependabot helps automatically identify and fix security vulnerabilities in dependencies. The detection monitors GitHub
10+
Enterprise logs for configuration changes that disable Dependabot functionality. This behavior could indicate an attacker
11+
attempting to prevent the automatic detection of vulnerable dependencies, which would allow them to exploit known vulnerabilities
12+
that would otherwise be patched. For a SOC, identifying the disabling of security features like Dependabot is critical as it may
13+
be a precursor to supply chain attacks where attackers exploit vulnerable dependencies. The impact could be severe if vulnerabilities
14+
remain unpatched, potentially leading to code execution, data theft, or other compromises through the software supply chain.
15+
data_source:
16+
- GitHub Organizations Audit Logs
17+
search: '`github_organizations` vendor_action=repository_vulnerability_alerts.disable
18+
| fillnull
19+
| stats count min(_time) as firstTime max(_time) as lastTime by actor, actor_id, actor_ip, actor_is_bot, actor_location.country_code, business, business_id, org, org_id, repo, repo_id, user, user_agent, user_id, vendor_action
20+
| `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`
21+
| `github_organizations_disable_dependabot_filter`'
22+
how_to_implement: You must ingest GitHub Organizations logs using Splunk Add-on for Github using a Personal Access Token https://docs.splunk.com/Documentation/AddOns/released/GitHub/Configureinputs .
23+
known_false_positives: unknown
24+
references:
25+
- https://docs.splunk.com/Documentation/AddOns/released/GitHub/Configureinputs
26+
- https://www.googlecloudcommunity.com/gc/Community-Blog/Monitoring-for-Suspicious-GitHub-Activity-with-Google-Security/ba-p/763610
27+
drilldown_searches:
28+
- name: View the detection results for - "$user$"
29+
search: '%original_detection_search% | search user = "$user$"'
30+
earliest_offset: $info_min_time$
31+
latest_offset: $info_max_time$
32+
- name: View risk events for the last 7 days for - "$user$"
33+
search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$user$") starthoursago=168 | stats count min(_time) as firstTime max(_time) as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories) as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`'
34+
earliest_offset: $info_min_time$
35+
latest_offset: $info_max_time$
36+
tags:
37+
analytic_story:
38+
- GitHub Malicious Activity
39+
asset_type: GitHub
40+
confidence: 90
41+
impact: 30
42+
message: Dependabot security features are disabled in repository $repo$ by $user$
43+
mitre_attack_id:
44+
- T1562.001
45+
observable:
46+
- name: user
47+
type: User
48+
role:
49+
- Victim
50+
product:
51+
- Splunk Enterprise
52+
- Splunk Enterprise Security
53+
- Splunk Cloud
54+
required_fields:
55+
- actor
56+
- actor_id
57+
- actor_ip
58+
- actor_is_bot
59+
- actor_location.country_code
60+
- business
61+
- business_id
62+
- org
63+
- org_id
64+
- repo
65+
- repo_id
66+
- user
67+
- user_agent
68+
- user_id
69+
risk_score: 27
70+
security_domain: network
71+
tests:
72+
- name: True Positive Test
73+
attack_data:
74+
- data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562.001/disable_dependabot/github.json
75+
source: http:github
76+
sourcetype: httpevent
77+

macros/github_organizations.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
definition: sourcetype=github:cloud:audit
2+
description: customer specific splunk configurations(eg- index, source, sourcetype).
3+
Replace the macro definition with configurations for your Splunk Environment.
4+
name: github_organizations

0 commit comments

Comments
 (0)