gcti_remote_access_tools
Description
Alert process and file create events that are associated with hashes from the GCTI Remote Access Tool list
Query · yara_l
events:
// find a process launch event
($process.metadata.event_type = "PROCESS_LAUNCH" or $process.metadata.event_type = "PROCESS_MODULE_LOAD" or $process.metadata.event_type = "PROCESS_UNCATEGORIZED" or $process.metadata.event_type = "FILE_CREATION")
$process.target.process.file.sha256 != ""
$process.target.process.file.sha256 = $rat_hash
$process.principal.hostname = $hostname
// join graph and event hashes
$gcti.graph.entity.file.sha256 = $rat_hash
// look for files identified as likely remote access tools
$gcti.graph.metadata.entity_type = "FILE"
$gcti.graph.metadata.vendor_name = "Google Cloud Threat Intelligence"
$gcti.graph.metadata.product_name = "GCTI Feed"
$gcti.graph.metadata.source_type = "GLOBAL_CONTEXT"
$gcti.graph.metadata.threat.threat_feed_name = "Remote Access Tools"
match:
$hostname over 5m
outcome:
$risk_score = 65
$event_count = count_distinct($process.metadata.id)
// added to populate alert graph with additional context
// Commented out principal.hostname because it is already represented in graph as match variable. If match changes, can uncomment to add to results
//$principal_hostname = array_distinct($process.principal.hostname)
$principal_process_pid = array_distinct($process.principal.process.pid)
$principal_process_command_line = array_distinct($process.principal.process.command_line)
$principal_process_file_sha256 = array_distinct($process.principal.process.file.sha256)
$principal_process_file_full_path = array_distinct($process.principal.process.file.full_path)
$principal_process_product_specific_process_id = array_distinct($process.principal.process.product_specific_process_id)
$principal_process_parent_process_product_specific_process_id = array_distinct($process.principal.process.parent_process.product_specific_process_id)
$target_process_pid = array_distinct($process.target.process.pid)
$target_process_command_line = array_distinct($process.target.process.command_line)
$target_process_file_sha256 = array_distinct($process.target.process.file.sha256)
$target_process_file_full_path = array_distinct($process.target.process.file.full_path)
$target_process_product_specific_process_id = array_distinct($process.target.process.product_specific_process_id)
$target_process_parent_process_product_specific_process_id = array_distinct($process.target.process.parent_process.product_specific_process_id)
$target_file_full_path = array_distinct($process.target.file.full_path)
$principal_user_userid = array_distinct($process.principal.user.userid)
$target_resource_name = array_distinct($process.target.resource.name)
condition:
$process and $gcti