Skip to content

Commit 11ca403

Browse files
authored
Merge pull request #3263 from zake1god/new-research-detection-endpoint
New Analytic - Telegram API Request Via CommandLine
2 parents dbede3b + 554d02d commit 11ca403

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Potential Telegram API Request Via CommandLine
2+
id: d6b0d627-d0bf-46b1-936f-c48284767d21
3+
version: 1
4+
date: '2025-02-19'
5+
author: Nasreddine Bencherchali, Splunk, Zaki Zarkasih Al Mustafa
6+
status: production
7+
type: Anomaly
8+
description: The following analytic detects the presence of "api.telegram.org" in the CommandLine of a process. It leverages data from Endpoint Detection and Response (EDR) agents, focusing on process execution logs that include command-line details. This activity can be significant as the telegram API has been used as an exfiltration mechanism or even as a C2 channel. If confirmed malicious, this could allow an attacker or malware to exfiltrate data or receive additional C2 instruction, potentially leading to further compromise and persistence within the network.
9+
data_source:
10+
- Sysmon EventID 1
11+
- Windows Event Log Security 4688
12+
- CrowdStrike ProcessRollup2
13+
search: '| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process= "*api.telegram.org*" NOT Processes.process IN ("*-osint -url*", "* --single-argument*") by Processes.dest Processes.user Processes.parent_process_name Processes.parent_process_id Processes.process_name Processes.process Processes.process_id Processes.process_guid | `drop_dm_object_name(Processes)` | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)` | `potential_telegram_api_request_via_commandline_filter`'
14+
how_to_implement: The detection is based on data that originates from Endpoint Detection and Response (EDR) agents. These agents are designed to provide security-related telemetry from the endpoints where the agent is installed. To implement this search, you must ingest logs that contain the process GUID, process name, and parent process. Additionally, you must ingest complete command-line executions. These logs must be processed using the appropriate Splunk Technology Add-ons that are specific to the EDR product. The logs must also be mapped to the `Processes` node of the `Endpoint` data model. Use the Splunk Common Information Model (CIM) to normalize the field names and speed up the data modeling process.
15+
known_false_positives: False positive may stem from application or users requesting the API directly via CommandLine for testing purposes. Investigate the matches and apply the necessary filters.
16+
references:
17+
- https://www.virustotal.com/gui/file/0b3ef5e04329cefb5bb4bf30b3edcb32d1ec6bbcb29d22695a079bfb5b56e8ac/behavior
18+
- https://www.virustotal.com/gui/file/72c59eeb15b5ec1d95e72e4b06a030bc058822bc10e5cb807e78a4624d329666/behavior
19+
- https://www.virustotal.com/gui/file/72c59eeb15b5ec1d95e72e4b06a030bc058822bc10e5cb807e78a4624d329666/content
20+
- https://www.virustotal.com/gui/file/1c4541bf70b6e251ef024ec4dde8dce400539c2368461c0d90e15a81b11ace44/content
21+
drilldown_searches:
22+
- name: View the detection results for - "$dest$"
23+
search: '%original_detection_search% | search dest = "$dest$"'
24+
earliest_offset: $info_min_time$
25+
latest_offset: $info_max_time$
26+
- name: View risk events for the last 7 days for - "$dest$"
27+
search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$dest$")
28+
starthoursago=168 | stats count min(_time) as firstTime max(_time) as lastTime
29+
values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories)
30+
as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic)
31+
as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)`
32+
| `security_content_ctime(lastTime)`'
33+
earliest_offset: $info_min_time$
34+
latest_offset: $info_max_time$
35+
rba:
36+
message: Process $process_name$ with command line $process$ in $dest$
37+
risk_objects:
38+
- field: dest
39+
type: system
40+
score: 30
41+
threat_objects:
42+
- field: process_name
43+
type: process_name
44+
tags:
45+
analytic_story:
46+
- XMRig
47+
asset_type: Endpoint
48+
mitre_attack_id:
49+
- T1102.002
50+
- T1041
51+
product:
52+
- Splunk Enterprise
53+
- Splunk Enterprise Security
54+
- Splunk Cloud
55+
security_domain: endpoint
56+
tests:
57+
- name: True Positive Test
58+
attack_data:
59+
- data:
60+
https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1102.002/telegram_api_cli/telegram_cli.log
61+
source: XmlWinEventLog:Microsoft-Windows-Sysmon/Operational
62+
sourcetype: XmlWinEventLog

0 commit comments

Comments
 (0)