This detection identifies potential data exfiltration or unauthorized file transfers by monitoring for specific “sendsafe” patterns that may indicate an adversary attempting to move sensitive assets out of the environment. The SOC team should proactively hunt for this behavior in Azure Sentinel to validate the legitimacy of these low-severity events and prevent subtle, long-term data leakage before it escalates into a significant breach.
rule sendsafe {
meta:
author = " J from THL <j@techhelplist.com>"
date = "2016/09"
reference = "http://pastebin.com/WPWWs406"
version = 2
maltype = "Spammer"
filetype = "memory"
strings:
$a = "Enterprise Mailing Service"
$b = "Blacklisted by rule: %s:%s"
$c = "/SuccessMails?CampaignNum=%ld"
$d = "/TimedOutMails?CampaignNum=%ld"
$e = "/InvalidMails?CampaignNum=%ld"
$f = "Failed to download maillist, retrying"
$g = "No maillist loaded"
$h = "Successfully sent using SMTP account %s (%d of %ld messages to %s)"
$i = "Successfully sent %d of %ld messages to %s"
$j = "Sending to %s in the same connection"
$k = "New connection required, will send to %s"
$l = "Mail transaction for %s is over."
$m = "Domain %s is bad (found in cache)"
$n = "Domain %s found in cache"
$o = "Domain %s isn't found in cache, resolving it"
$p = "All tries to resolve %s failed."
$q = "Failed to receive response for %s from DNS server"
$r = "Got DNS server response: domain %s is bad"
$s = "Got error %d in response for %s from DNS server"
$t = "MX's IP for domain %s found in cache:"
$u = "Timeout waiting for domain %s to be resolved"
$v = "No valid MXes for domain %s. Marking it as bad"
$w = "Resolving MX %s using existing connection to DNS server"
$x = "All tries to resolve MX for %s are failed"
$y = "Resolving MX %s using DNS server"
$z = "Failed to receive response for MX %s from DNS server"
condition:
13 of them
}
This YARA rule can be deployed in the following contexts:
This rule contains 26 string patterns in its detection logic.
Here are 4 specific false positive scenarios for the sendsafe detection rule in an enterprise environment, along with suggested filters or exclusions:
Scenario: Enterprise Email Gateway Scanning
sendsafe YARA signature may trigger on the legitimate scanning engine’s internal communication with the mail store.10.20.30.0/24) or filter by process name ProofpointAgent.exe and Microsoft.Exchange.Transport.exe.Scenario: Scheduled Endpoint Protection Updates
sendsafe heuristic patterns before they are fully integrated into the OS registry.CrowdStrikeService.exe or SentinelOneAgent.exe running under the SYSTEM account.Scenario: Automated Backup Verification Jobs
sendsafe configuration repository on a central server.