Salesforce
Overview
- Vendor: Salesforce
- Supported environment: SaaS
- Detection based on: Telemetry
- Supported application or feature: Application Logs
Salesforce provides customer relationship management software and applications focused on sales, customer service, marketing automation, e-commerce, analytics, and application development.
Configure
This setup guide will show you how to provide an integration between Salesforce events and Sekoia.io.
Configure OAuth
Create a new Connected App
- On the Salesforce App Manager, go to the Setup
- On the left menu, select
platform tools
>Apps
>App Manager
- On the
App Manager
page, clickNew Connected App
- In the basic information section, type the name of the connected app and a contact email
- In the
API
section, turn onEnable OAuth Settings
- Type any callback url then select
Manage user data via APIs (api)
andPerform requests at any time (refresh_token, offline_access)
as the OAuth scopes. - Click
Save
Set the client credentials
- On the management page of the connected app, click
Manage
- Click
Edit Policies
button - In the
Client Credentials Flow
, select a user with aSystem Administrator
profile in theRun As
field. - Click
Save
Get consumer key and secret
- On the management page of the connected app, in the API section, click
Manage Consumer Details
- In the
Consumer details
section, copy the consumer key and the consumer secret
Create an intake
Go to the intake page and create a new intake from the format Salesforce. Copy the intake key.
Pull events
To start to pull events, you have to:
- Go to the playbooks page and create a new playbook with the Salesforce trigger
- Set up the module configuration with the consumer key and consumer secret. Set up the trigger configuration with the intake key
- Start the playbook and enjoy your events
Note
Salesforce generates Events Log Files hourly. It can take up to an hour for your logs to arrive. See this documentation for more details
Raw Events Samples
In this section, you will find examples of raw logs as generated natively by the source. These examples are provided to help integrators understand the data format before ingestion into Sekoia.io. It is crucial for setting up the correct parsing stages and ensuring that all relevant information is captured.
{
"EVENT_TYPE": "Apex Execution",
"USER": "john.doe@example.com",
"CLASS_NAME": "AccountTrigger",
"METHOD_NAME": "beforeInsert",
"EXECUTION_TIME": 100,
"ERROR_MESSAGE": "",
"DEBUG_LOG_ID": "XYZ987ABC",
"NAMESPACE": "my_namespace",
"SANDBOX": true
}
{
"EVENT_TYPE": "API",
"USER": "john.doe@example.com",
"API_METHOD": "update",
"OBJECT_TYPE": "Account",
"OBJECT_ID": "001",
"TIMESTAMP": "2023-07-03T11:30:00Z",
"RESPONSE_CODE": 200,
"ERROR_MESSAGE": "",
"API_VERSION": "49.0",
"API_ENDPOINT": "/services/data/v49.0/sobjects/Account/001"
}
{
"EVENT_TYPE": "ApiTotalUsage",
"TIMESTAMP": "20230718225959.250",
"REQUEST_ID": "4rBNTaVtlWrsM8G-mMBYk-",
"ORGANIZATION_ID": "00D68000004DKqo",
"USER_ID": "00568000004ogT4",
"API_FAMILY": "REST",
"API_VERSION": "58.0",
"API_RESOURCE": "/v58.0/query",
"CLIENT_NAME": "",
"HTTP_METHOD": "GET",
"CLIENT_IP": "141.95.144.78",
"COUNTS_AGAINST_API_LIMIT": "1",
"CONNECTED_APP_ID": "0H468000000kPN4",
"ENTITY_NAME": "EventLogFile",
"STATUS_CODE": "200",
"TIMESTAMP_DERIVED": "2023-07-18T22:59:59.250Z"
}
{
"EVENT_TYPE": "Audit Trail",
"USER": "john.doe@example.com",
"ACTION": "Field Update",
"OBJECT_TYPE": "Opportunity",
"OBJECT_ID": "002",
"FIELD_NAME": "Stage",
"OLD_VALUE": "Prospecting",
"NEW_VALUE": "Closed Won",
"TIMESTAMP": "2023-07-03T14:00:00Z",
"RECORD_NAME": "Acme Opportunity",
"RECORD_OWNER": "jane.smith@example.com",
"RECORD_CREATED_DATE": "2023-07-01",
"RECORD_LAST_MODIFIED_DATE": "2023-07-03"
}
{
"API_TYPE": "myAPI",
"API_VERSION": "1.0",
"CLIENT_ID": "myClient123",
"COMPONENT_NAME": "myComponent",
"CONNECTION_TYPE": "wifi",
"CONTROLLER_TYPE": "myController",
"ENTITY_NAME": "myEntity",
"LOGIN_KEY": "myLoginKey",
"LOGIN_STATUS": "success",
"LOGIN_SUB_TYPE": "myLoginSubType",
"LOGIN_TYPE": "myLoginType",
"METHOD_NAME": "myMethod",
"OPERATION_TYPE": "myOperation",
"ORGANIZATION_ID": "myOrg123",
"QUIDDITY": "myQuiddity",
"REFERER_URI": "https://example.com",
"REQUEST_ID": "myRequest123",
"REQUEST_STATUS": "completed",
"SESSION_KEY": "mySessionKey",
"USER_INITIATED_LOGOUT": true,
"USER_TYPE": "admin",
"APP_NAME": "myAPP",
"BROWSER_NAME": "Chrome",
"BROWSER_TYPE": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36",
"BROWSER_VERSION": "93.0.4577.82",
"CIPHER_SUITE": "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
"CLIENT_GEO": "United States/California",
"CLIENT_IP": "1.2.3.4",
"DEVICE_ID": "customDeviceId",
"DEVICE_MODEL": "myDeviceModel",
"DEVICE_PLATFORM": "iOS",
"DURATION": 123,
"EVENT_TYPE": "LightningPageView",
"HTTP_METHOD": "GET",
"MEDIA_TYPE": "someMediaType",
"MESSAGE": "custom message",
"OS_NAME": "Windows",
"OS_VERSION": "10.0",
"PAGE_START_TIME": 1471564788642,
"PAGE_URL": "/sObject/0064100000JXITSAA5/view",
"QUERY": "?queryParam1=val1&queryParam2=val2",
"REQUEST_SIZE": 123321,
"RESPONSE_SIZE": 321321,
"TIMESTAMP_DERIVED": "2015-07-27T11:32:59.555Z",
"TLS_PROTOCOL": "tlsProtocol",
"UI_EVENT_ID": "ltng:error",
"UI_EVENT_TYPE": "eventType",
"USER_ID": "00530000009M943",
"USER_NAME": "test_user"
}
{
"API_TYPE": "myAPI",
"API_VERSION": "1.0",
"CLIENT_ID": "myClient123",
"COMPONENT_NAME": "myComponent",
"CONNECTION_TYPE": "wifi",
"CONTROLLER_TYPE": "myController",
"ENTITY_NAME": "myEntity",
"LOGIN_KEY": "myLoginKey",
"LOGIN_STATUS": "success",
"LOGIN_SUB_TYPE": "myLoginSubType",
"LOGIN_TYPE": "myLoginType",
"METHOD_NAME": "myMethod",
"OPERATION_TYPE": "myOperation",
"ORGANIZATION_ID": "myOrg123",
"QUIDDITY": "myQuiddity",
"REFERER_URI": "https://example.com",
"REQUEST_ID": "myRequest123",
"REQUEST_STATUS": "completed",
"SESSION_KEY": "mySessionKey",
"USER_INITIATED_LOGOUT": true,
"USER_TYPE": "admin",
"APP_NAME": "myAPP",
"BROWSER_NAME": "Chrome",
"USER_AGENT": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36",
"BROWSER_VERSION": "93.0.4577.82",
"CIPHER_SUITE": "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
"SOURCE_IP": "1.2.3.4",
"DEVICE_ID": "customDeviceId",
"DEVICE_MODEL": "myDeviceModel",
"DEVICE_PLATFORM": "iOS",
"EXEC_TIME": 123,
"EVENT_TYPE": "LightningPageView",
"METHOD": "GET",
"MEDIA_TYPE": "someMediaType",
"MESSAGE": "custom message",
"OS_NAME": "Windows",
"OS_VERSION": "10.0",
"PAGE_START_TIME": 1471564788642,
"URI": "/sObject/0064100000JXITSAA5/view",
"REQUEST_SIZE": 123321,
"RESPONSE_SIZE": 321321,
"TIMESTAMP_DERIVED": "2015-07-27T11:32:59.555Z",
"TLS_PROTOCOL": "tlsProtocol",
"UI_EVENT_ID": "ltng:error",
"UI_EVENT_TYPE": "eventType",
"USER_ID": "00530000009M943",
"USER_NAME": "test_user"
}
{
"EVENT_TYPE": "Login",
"USER": "john.doe@example.com",
"LOGIN_STATUS": "Success",
"IP_ADDRESS": "192.168.0.1",
"LOGIN_TIME": "2023-07-03T10:15:00Z",
"DEVICE_TYPE": "Desktop",
"BROWSER": "Chrome",
"PLATFORM": "Windows 10",
"LOGIN_GEO_LOCATION": "San Francisco, CA",
"SESSION_ID": "ABC123XYZ",
"LOGIN_URL": "https://login.salesforce.com"
}
{
"EVENT_TYPE": "Report/Dashboard",
"USER": "john.doe@example.com",
"ACTION": "Run",
"REPORT_NAME": "Sales Performance",
"TIMESTAMP": "2023-07-03T12:45:00Z",
"DASHBOARD_ID": "ABCDEF123",
"FILTERS": {
"REGION": "West",
"TIMEFRAME": "Last Month"
},
"REPORT_URL": "https://example.salesforce.com/001/o"
}
Detection section
The following section provides information for those who wish to learn more about the detection capabilities enabled by collecting this intake. It includes details about the built-in rule catalog, event categories, and ECS fields extracted from raw events. This is essential for users aiming to create custom detection rules, perform hunting activities, or pivot in the events page.
Related Built-in Rules
The following Sekoia.io built-in rules match the intake Salesforce. This documentation is updated automatically and is based solely on the fields used by the intake which are checked against our rules. This means that some rules will be listed but might not be relevant with the intake.
SEKOIA.IO x Salesforce on ATT&CK Navigator
Account Added To A Security Enabled Group
Detection in order to investigate who has added a specific Domain User in Domain Admins or Group Policy Creator Owners (Security event 4728)
- Effort: master
Account Removed From A Security Enabled Group
Detection in order to investigate who has removed a specific Domain User in Domain Admins or Group Policy Creator Owners (Security event 4729)
- Effort: master
Burp Suite Tool Detected
Burp Suite is a cybersecurity tool. When used as a proxy service, its purpose is to intercept packets and modify them to send them to the server. Burp Collaborator is a network service that Burp Suite uses to help discover many kinds of vulnerabilities (vulnerabilities scanner).
- Effort: intermediate
CVE-2018-11776 Apache Struts2
Apache Struts versions 2.3 to 2.3.34 and 2.5 to 2.5.16 suffer from possible Remote Code Execution when alwaysSelectFullNamespace is true (either by user or a plugin like Convention Plugin) and then: results are used with no namespace and in same time, its upper package have no or wildcard namespace and similar to results, same possibility when using url tag which doesn't have value and action set and in same time, its upper package have no or wildcard namespace.
- Effort: intermediate
CVE-2018-13379 Fortinet Exploit
Detects the successful exploitation of the Fortinet FortiOS CVE-2018-13379. This CVE is one of the most exploited CVEs since 2018. It is exploited by APT threat actors as well as cybercriminals. The exploitation of this CVE lead an unauthenticated user to get full access to FortiOS system file through SSL VPN via specially crafted HTTP resource requests. The exploit read /dev/cmdb/sslvpn_websession file, that contains login and passwords in (clear/text). An HTTP response status code = 200, means the file was successfully accessed. This vulnerability affects FortiOS 5.6.3 to 5.6.7 and FortiOS 6.0.0 to 6.0.4.
- Effort: advanced
CVE-2019-0604 SharePoint
Detects the exploitation of the SharePoint vulnerability (CVE-2019-0604).
- Effort: advanced
CVE-2019-11510 Pulse Secure Exploit
Detects the successful exploitation of the Pulse Secure vulnerability CVE-2019-11510. This CVE is one of the most exploited CVEs since 2019. It is exploited by diverse threat actors, leading sometimes in ransomware deployement among these groups: Maze, Conti, Egregor, DoppelPaymer, NetWalker and REvil. But also APT actors such as APT29. The exploitation of this CVE allows a remote, unauthenticated attacker to compromise a vulnerable VPN server. The attacker may be able to gain access to all active users and their plain-text credentials. It may also be possible for the attacker to execute arbitrary commands on each VPN client as it successfully connects to the VPN server. The exploit reads /etc/passwd file to get access to login and passwords in (clear/text). An HTTP response status code = 200, means the file was successfully accessed. This vulnerability affects 8.1R15.1, 8.2 before 8.2R12.1, 8.3 before 8.3R7.1, and 9.0 before 9.0R3.4 products.
- Effort: elementary
CVE-2019-19781 Citrix NetScaler (ADC)
Detects CVE-2019-19781 exploitation attempt against Citrix NetScaler (ADC), Application Delivery Controller and Citrix Gateway Attack.
- Effort: elementary
CVE-2019-2725 Oracle Weblogic Exploit
Detects the successful exploitation of a deserialization vulnerability in Oracle Weblogic Server, CVE-2019-2725. This vulnerability affects versions 10.X and 12.1.3 of WebLogic that have the components wls9_async_response.war and wls-wsat.war enabled. It is a remote code execution which can be exploited without authentication via HTTP. An HTTP response status code = 202, means the target is vulnerable, the analyst then has to look in depth to check if a webshell has been uploaded or something else has been done.
- Effort: elementary
CVE-2020-0688 Microsoft Exchange Server Exploit
Detects the exploitation of CVE-2020-0688. The POC exploit a .NET serialization vulnerability in the Exchange Control Panel (ECP) web page. The vulnerability is due to Microsoft Exchange Server not randomizing the keys on a per-installation basis resulting in them using the same validationKey and decryptionKey values. With knowledge of these, values an attacker can craft a special viewstate to use an OS command to be executed by NT_AUTHORITY\SYSTEM using .NET deserialization. To exploit this vulnerability, an attacker needs to leverage the credentials of an account it had already compromised to authenticate to OWA.
- Effort: elementary
CVE-2020-1147 SharePoint
Detection of SharePoint vulnerability CVE-2020-1147.
- Effort: advanced
CVE-2020-14882 Oracle WebLogic Server
Detects the exploitation of the Oracle WebLogic Server vulnerability (CVE-2020-16952).
- Effort: advanced
CVE-2020-17530 Apache Struts RCE
Detects the exploitation of the Apache Struts RCE vulnerability (CVE-2020-17530).
- Effort: intermediate
CVE-2020-5902 F5 BIG-IP Exploitation Attempts
Detects the exploitation attempt of the vulnerability found in F5 BIG-IP and described in CVE-2020-5902.
- Effort: elementary
CVE-2021-20021 SonicWall Unauthenticated Administrator Access
Detects the exploitation of SonicWall Unauthenticated Admin Access.
- Effort: advanced
CVE-2021-20023 SonicWall Arbitrary File Read
Detects Arbitrary File Read, which can be used with other vulnerabilities as a mean to obtain outputs generated by attackers, or sensitive data.
- Effort: advanced
CVE-2021-21972 VMware vCenter
The vSphere Client (HTML5) contains a remote code execution vulnerability in a vCenter Server plugin. A malicious actor with network access to port 443 may exploit this issue to execute commands with unrestricted privileges on the underlying operating system that hosts vCenter Server. This affects VMware vCenter Server (7.x before 7.0 U1c, 6.7 before 6.7 U3l and 6.5 before 6.5 U3n) and VMware Cloud Foundation (4.x before 4.2 and 3.x before 3.10.1.2). POST request on the following PATH "/ui/vropspluginui/rest/services/uploadova". If in response body (500) the words it has "uploadFile", that means the vCenter is available to accept files via POST without any restrictions.
- Effort: intermediate
CVE-2021-21985 VMware vCenter
The VMware vSphere Client (HTML5) contains a remote code execution vulnerability due to lack of input validation in the Virtual SAN Health Check plug-in which is enabled by default in vCenter Server. A malicious actor with network access to port 443 may exploit this issue to execute commands with unrestricted privileges on the underlying operating system that hosts vCenter Server. This affects VMware vCenter Server (7.0 before 7.0 U2b, 6.7 before 6.7 U3n and 6.5 before 6.5 U3p) and VMware Cloud Foundation (4.x before 4.2.1 and 3.x before 3.10.2.1).
- Effort: advanced
CVE-2021-22123 Fortinet FortiWeb OS Command Injection
Detects Fortinet FortiWeb OS Command Injection (August 2021) vulnerability exploitation attempt. A remote, authenticated attacker can execute arbitrary commands on the system hosting a vulnerable FortiWeb WAF by sending a POST request with the command in the name field. At the time of writing this rule, it would appear that the request would respond in code 500 for a successful exploitation attempt.
- Effort: advanced
CVE-2021-22893 Pulse Connect Secure RCE Vulnerability
Detects potential exploitation of the authentication by-pass vulnerability that can allow an unauthenticated user to perform remote arbitrary file execution on the Pulse Connect Secure gateway. It is highly recommended to apply the Pulse Secure mitigations and seach for indicators of compromise on affected servers if you are in doubt over the integrity of your Pulse Connect Secure product.
- Effort: intermediate
CVE-2021-26855 Exchange SSRF
Detects the exploitation of ProyxLogon vulerability on Exchange servers.
- Effort: advanced
CVE-2021-34473 ProxyShell Attempt
Detects CVE-2021-34473 ProxyShell attempt against Microsoft Exchange Server, Remote Code Execution Vulnerability.
- Effort: advanced
CVE-2021-41773 Apache 2.4.49 Path Traversal
Detects successful exploitation of the Apache Path Traversal CVE-2021-41773.
- Effort: advanced
CVE-2021-43798 Grafana Directory Traversal
Grafana version 8.x has a 0day arbitrary file read (with no fix yet) based on a directory traversal vulnerability
- Effort: intermediate
Cobalt Strike HTTP Default GET beaconing
Detects GET HTTP queries from known Cobalt Strike beacons (source code 4.3)
- Effort: advanced
Cobalt Strike HTTP Default POST Beaconing
Detects POST HTTP queries from known Cobalt Strike beacons (source code 4.3)
- Effort: advanced
Computer Account Deleted
Detects computer account deletion.
- Effort: master
Covenant Default HTTP Beaconing
Detects potential Covenant communications through the user-agent and specific urls
- Effort: intermediate
Cryptomining
Detection of domain names potentially related to cryptomining activities.
- Effort: master
Detect requests to Konni C2 servers
This rule detects requests to Konni C2 servers. These patterns come from an analysis done in 2022, September.
- Effort: elementary
Discord Suspicious Download
Discord is a messaging application. It allows users to create their own communities to share messages and attachments. Those attachments have little to no overview and can be downloaded by almost anyone, which has been abused by attackers to host malicious payloads.
- Effort: intermediate
Domain Trust Created Or Removed
A trust was created or removed to a domain. An attacker could perform that in order to do lateral movement easily between domains or shutdown the ability of two domains to communicate.
- Effort: advanced
Download Files From Suspicious TLDs
Detects download of certain file types from hosts in suspicious TLDs
- Effort: master
Dynamic DNS Contacted
Detect communication with dynamic dns domain. This kind of domain is often used by attackers. This rule can trigger false positive in non-controlled environment because dynamic dns is not always malicious.
- Effort: master
Entra ID Sign-In Via Known AiTM Phishing Kit
Detects a sign-in attempt from an IP address belonging to a known adversary-in-the-middle phishing kit.
- Effort: elementary
Exfiltration Domain
Detects traffic toward a domain flagged as a possible exfiltration vector.
- Effort: master
FoggyWeb HTTP Default GET/POST Requests
Detects GET or POST request pattern observed within the first FoggyWeb campaign detected by Microsoft.
- Effort: advanced
GitLab CVE-2021-22205
Detects GitLab vulnerability CVE-2021-22205 exploitation success. It allows an attacker to do some remote code execution with user git. The HTTP return code 422 indicates a successfull exploitation.
- Effort: intermediate
Koadic MSHTML Command
Detects Koadic payload using MSHTML module
- Effort: intermediate
LokiBot Default C2 URL
Detects default C2 URL for trojan LokiBot
- Effort: elementary
Nimbo-C2 User Agent
Nimbo-C2 Uses an unusual User-Agent format in its implants.
- Effort: intermediate
Password Change On Directory Service Restore Mode (DSRM) Account
The Directory Service Restore Mode (DSRM) account is a local administrator account on Domain Controllers. Attackers may change the password to gain persistence.
- Effort: intermediate
Possible Malicious File Double Extension
Detects request to potential malicious file with double extension
- Effort: elementary
Possible Replay Attack
This event can be a sign of Kerberos replay attack or, among other things, network device configuration or routing problems.
- Effort: intermediate
Potential Azure AD Phishing Page (Adversary-in-the-Middle)
Detects an HTTP request to an URL typical of the Azure AD authentication flow, but towards a domain that is not one the legitimate Microsoft domains used for Azure AD authentication.
- Effort: intermediate
Potential Bazar Loader User-Agents
Detects potential Bazar loader communications through the user-agent
- Effort: elementary
Potential Lemon Duck User-Agent
Detects LemonDuck user agent. The format used two sets of alphabetical characters separated by dashes, for example "User-Agent: Lemon-Duck-[A-Z]-[A-Z]".
- Effort: elementary
Potential LokiBot User-Agent
Detects potential LokiBot communications through the user-agent
- Effort: intermediate
Privilege Escalation Awesome Scripts (PEAS)
Detect PEAS privileges escalation scripts and binaries
- Effort: elementary
ProxyShell Microsoft Exchange Suspicious Paths
Detects suspicious calls to Microsoft Exchange resources, in locations related to webshells observed in campaigns using this vulnerability.
- Effort: elementary
RSA SecurID Failed Authentification
Detects many failed attempts to authenticate followed by a successfull login for a super admin account.
- Effort: advanced
Raccoon Stealer 2.0 Legitimate Third-Party DLL Download URL
Detects Raccoon Stealer 2.0 malware downloading legitimate third-party DLLs from its C2 server. These legitimate DLLs are used by the information stealer to collect data on the compromised hosts.
- Effort: elementary
Remote Access Tool Domain
Detects traffic toward a domain flagged as a Remote Administration Tool (RAT).
- Effort: master
Remote Monitoring and Management Software - AnyDesk
Detect artifacts related to the installation or execution of the Remote Monitoring and Management tool AnyDesk.
- Effort: master
SEKOIA.IO Intelligence Feed
Detect threats based on indicators of compromise (IOCs) collected by SEKOIA's Threat and Detection Research team.
- Effort: elementary
Sekoia.io EICAR Detection
Detects observables in Sekoia.io CTI tagged as EICAR, which are fake samples meant to test detection.
- Effort: master
SharePoint Authenticated SSRF
Detects succesful SSRF from an authenticated SharePoint user.
- Effort: elementary
Suspicious Download Links From Legitimate Services
Detects users clicking on Google docs links to download suspicious files. This technique was used a lot by Bazar Loader in the past.
- Effort: intermediate
Suspicious TOR Gateway
Detects suspicious TOR gateways. Gateways are often used by the victim to pay and decrypt the encrypted files without installing TOR. Tor intercepts the network traffic from one or more apps on user’s computer, usually the user web browser, and shuffles it through a number of randomly-chosen computers before passing it on to its destination. This disguises user location, and makes it harder for servers to pick him/her out on repeat visits, or to tie together separate visits to different sites, this making tracking and surveillance more difficult. Before a network packet starts its journey, user’s computer chooses a random list of relays and repeatedly encrypts the data in multiple layers, like an onion. Each relay knows only enough to strip off the outermost layer of encryption, before passing what’s left on to the next relay in the list.
- Effort: advanced
Suspicious URI Used In A Lazarus Campaign
Detects suspicious requests to a specific URI, usually on an .asp page. The website is often compromised.
- Effort: intermediate
TOR Usage Generic Rule
Detects TOR usage globally, whether the IP is a destination or source. TOR is short for The Onion Router, and it gets its name from how it works. TOR intercepts the network traffic from one or more apps on user’s computer, usually the user web browser, and shuffles it through a number of randomly-chosen computers before passing it on to its destination. This disguises user location, and makes it harder for servers to pick him/her out on repeat visits, or to tie together separate visits to different sites, this making tracking and surveillance more difficult. Before a network packet starts its journey, user’s computer chooses a random list of relays and repeatedly encrypts the data in multiple layers, like an onion. Each relay knows only enough to strip off the outermost layer of encryption, before passing what’s left on to the next relay in the list.
- Effort: master
TrevorC2 HTTP Communication
Detects TrevorC2 HTTP communication based on the HTTP request URI and the user-agent.
- Effort: elementary
User Account Created
Detects user creation on windows servers, which shouldn't happen in an Active Directory environment. Apply this on your windows server logs and not on your DC logs. One default account defaultuser0
is excluded as only used during Windows set-up. This detection use Security Event ID 4720.
- Effort: master
User Account Deleted
Detects local user deletion
- Effort: master
Event Categories
The following table lists the data source offered by this integration.
Data Source | Description |
---|---|
Application logs |
collect activities from the source |
Web logs |
collect network activities from source |
User interface |
collect user activities from source |
DNS records |
collect information about DNS communication |
Authentication logs |
collect audit log from the source |
In details, the following table denotes the type of events produced by this integration.
Name | Values |
---|---|
Kind | `` |
Category | authentication , network |
Type | end , info |
Transformed Events Samples after Ingestion
This section demonstrates how the raw logs will be transformed by our parsers. It shows the extracted fields that will be available for use in the built-in detection rules and hunting activities in the events page. Understanding these transformations is essential for analysts to create effective detection mechanisms with custom detection rules and to leverage the full potential of the collected data.
{
"message": "{\"EVENT_TYPE\":\"Apex Execution\",\"USER\":\"john.doe@example.com\",\"CLASS_NAME\":\"AccountTrigger\",\"METHOD_NAME\":\"beforeInsert\",\"EXECUTION_TIME\":100,\"ERROR_MESSAGE\":\"\",\"DEBUG_LOG_ID\":\"XYZ987ABC\",\"NAMESPACE\":\"my_namespace\",\"SANDBOX\":true}",
"event": {
"category": [
"network"
],
"dataset": "Apex Execution",
"type": [
"info"
]
},
"salesforce": {
"class": {
"name": "AccountTrigger"
},
"method": {
"name": "beforeInsert"
}
},
"user": {
"email": "john.doe@example.com"
}
}
{
"message": "{\"EVENT_TYPE\":\"API\",\"USER\":\"john.doe@example.com\",\"API_METHOD\":\"update\",\"OBJECT_TYPE\":\"Account\",\"OBJECT_ID\":\"001\",\"TIMESTAMP\":\"2023-07-03T11:30:00Z\",\"RESPONSE_CODE\":200,\"ERROR_MESSAGE\":\"\",\"API_VERSION\":\"49.0\",\"API_ENDPOINT\":\"/services/data/v49.0/sobjects/Account/001\"}",
"event": {
"category": [
"network"
],
"dataset": "API",
"type": [
"info"
]
},
"@timestamp": "2023-07-03T11:30:00Z",
"http": {
"request": {
"method": "update"
}
},
"salesforce": {
"api": {
"version": "49.0"
},
"object": {
"type": "Account"
}
},
"url": {
"path": "/services/data/v49.0/sobjects/Account/001"
},
"user": {
"email": "john.doe@example.com"
}
}
{
"message": "{\"EVENT_TYPE\":\"ApiTotalUsage\",\"TIMESTAMP\":\"20230718225959.250\",\"REQUEST_ID\":\"4rBNTaVtlWrsM8G-mMBYk-\",\"ORGANIZATION_ID\":\"00D68000004DKqo\",\"USER_ID\":\"00568000004ogT4\",\"API_FAMILY\":\"REST\",\"API_VERSION\":\"58.0\",\"API_RESOURCE\":\"/v58.0/query\",\"CLIENT_NAME\":\"\",\"HTTP_METHOD\":\"GET\",\"CLIENT_IP\":\"141.95.144.78\",\"COUNTS_AGAINST_API_LIMIT\":\"1\",\"CONNECTED_APP_ID\":\"0H468000000kPN4\",\"ENTITY_NAME\":\"EventLogFile\",\"STATUS_CODE\":\"200\",\"TIMESTAMP_DERIVED\":\"2023-07-18T22:59:59.250Z\"}",
"event": {
"category": [
"network"
],
"dataset": "ApiTotalUsage",
"type": [
"info"
]
},
"@timestamp": "2034-02-09T04:23:42.595925Z",
"http": {
"request": {
"method": "GET"
},
"response": {
"status_code": 200
}
},
"organization": {
"id": "00D68000004DKqo"
},
"related": {
"ip": [
"141.95.144.78"
]
},
"salesforce": {
"api": {
"version": "58.0"
},
"entity": {
"name": "EventLogFile"
},
"request": {
"id": "4rBNTaVtlWrsM8G-mMBYk-",
"resource": "/v58.0/query"
}
},
"source": {
"address": "141.95.144.78",
"ip": "141.95.144.78"
},
"user": {
"id": "00568000004ogT4"
}
}
{
"message": "{\"EVENT_TYPE\":\"Audit Trail\",\"USER\":\"john.doe@example.com\",\"ACTION\":\"Field Update\",\"OBJECT_TYPE\":\"Opportunity\",\"OBJECT_ID\":\"002\",\"FIELD_NAME\":\"Stage\",\"OLD_VALUE\":\"Prospecting\",\"NEW_VALUE\":\"Closed Won\",\"TIMESTAMP\":\"2023-07-03T14:00:00Z\",\"RECORD_NAME\":\"Acme Opportunity\",\"RECORD_OWNER\":\"jane.smith@example.com\",\"RECORD_CREATED_DATE\":\"2023-07-01\",\"RECORD_LAST_MODIFIED_DATE\":\"2023-07-03\"}",
"event": {
"action": "Field Update",
"category": [
"network"
],
"dataset": "Audit Trail",
"type": [
"info"
]
},
"@timestamp": "2023-07-03T14:00:00Z",
"salesforce": {
"object": {
"type": "Opportunity"
}
},
"user": {
"email": "john.doe@example.com"
}
}
{
"message": "{ \"API_TYPE\": \"myAPI\", \"API_VERSION\": \"1.0\", \"CLIENT_ID\": \"myClient123\", \"COMPONENT_NAME\": \"myComponent\", \"CONNECTION_TYPE\": \"wifi\", \"CONTROLLER_TYPE\": \"myController\", \"ENTITY_NAME\": \"myEntity\", \"LOGIN_KEY\": \"myLoginKey\", \"LOGIN_STATUS\": \"success\", \"LOGIN_SUB_TYPE\": \"myLoginSubType\", \"LOGIN_TYPE\": \"myLoginType\", \"METHOD_NAME\": \"myMethod\", \"OPERATION_TYPE\": \"myOperation\", \"LOGIN_STATUS\": \"success\", \"ORGANIZATION_ID\": \"myOrg123\", \"QUIDDITY\": \"myQuiddity\", \"REFERER_URI\": \"https://example.com\", \"REQUEST_ID\": \"myRequest123\", \"REQUEST_STATUS\": \"completed\", \"SESSION_KEY\": \"mySessionKey\", \"USER_INITIATED_LOGOUT\": true, \"USER_TYPE\": \"admin\", \"APP_NAME\": \"myAPP\", \"BROWSER_NAME\": \"Chrome\", \"BROWSER_TYPE\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36\", \"BROWSER_VERSION\": \"93.0.4577.82\", \"CIPHER_SUITE\": \"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256\", \"CLIENT_GEO\": \"United States/California\", \"CLIENT_IP\": \"1.2.3.4\", \"DEVICE_ID\": \"customDeviceId\", \"DEVICE_MODEL\": \"myDeviceModel\", \"DEVICE_PLATFORM\": \"iOS\", \"DURATION\": 123, \"EVENT_TYPE\": \"LightningPageView\", \"HTTP_METHOD\": \"GET\", \"MEDIA_TYPE\": \"someMediaType\", \"MESSAGE\": \"custom message\", \"OS_NAME\": \"Windows\", \"OS_VERSION\": \"10.0\", \"PAGE_START_TIME\": 1471564788642, \"PAGE_URL\": \"/sObject/0064100000JXITSAA5/view\", \"QUERY\": \"?queryParam1=val1&queryParam2=val2\", \"REQUEST_SIZE\": 123321, \"RESPONSE_SIZE\": 321321, \"TIMESTAMP_DERIVED\": \"2015-07-27T11:32:59.555Z\", \"TLS_PROTOCOL\": \"tlsProtocol\", \"UI_EVENT_ID\": \"ltng:error\", \"UI_EVENT_TYPE\": \"eventType\", \"USER_ID\": \"00530000009M943\", \"USER_NAME\": \"test_user\" }",
"event": {
"action": "eventType",
"category": [
"network"
],
"code": "ltng:error",
"dataset": "LightningPageView",
"duration": 123,
"reason": "custom message",
"start": "2016-08-18T23:59:48.642000Z",
"type": [
"info"
]
},
"@timestamp": "2015-07-27T11:32:59.555000Z",
"host": {
"id": "customDeviceId",
"os": {
"name": "Windows",
"version": "10.0"
}
},
"http": {
"request": {
"bytes": 123321,
"method": "GET"
},
"response": {
"bytes": 321321,
"mime_type": "someMediaType"
}
},
"network": {
"application": "myAPP"
},
"organization": {
"id": "myOrg123"
},
"related": {
"ip": [
"1.2.3.4"
]
},
"salesforce": {
"api": {
"type": "myAPI",
"version": "1.0"
},
"client": {
"id": "myClient123"
},
"component": {
"name": "myComponent"
},
"connection": {
"type": "wifi"
},
"controller": {
"type": "myController"
},
"device": {
"model": "myDeviceModel",
"platform": "iOS"
},
"entity": {
"name": "myEntity"
},
"login": {
"key": "myLoginKey",
"status": "success",
"sub_type": "myLoginSubType"
},
"method": {
"name": "myMethod"
},
"operation": {
"type": "myOperation"
},
"quiddity": {
"name": "myQuiddity"
},
"referer": {
"uri": "https://example.com"
},
"request": {
"id": "myRequest123",
"status": "completed"
},
"session": {
"key": {
"id": "mySessionKey"
}
},
"user": {
"initiated_logout": true,
"type": "admin"
}
},
"source": {
"address": "1.2.3.4",
"geo": {
"country_name": "United States",
"region_name": "California"
},
"ip": "1.2.3.4"
},
"tls": {
"cipher": "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
"version": "tlsProtocol"
},
"url": {
"path": "/sObject/0064100000JXITSAA5/view",
"query": "queryParam1=val1&queryParam2=val2"
},
"user": {
"id": "00530000009M943"
},
"user_agent": {
"device": {
"name": "Other"
},
"name": "Chrome",
"original": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36",
"os": {
"name": "Windows",
"version": "10"
},
"version": "93.0.4577"
}
}
{
"message": "{ \"API_TYPE\": \"myAPI\", \"API_VERSION\": \"1.0\", \"CLIENT_ID\": \"myClient123\", \"COMPONENT_NAME\": \"myComponent\", \"CONNECTION_TYPE\": \"wifi\", \"CONTROLLER_TYPE\": \"myController\", \"ENTITY_NAME\": \"myEntity\", \"LOGIN_KEY\": \"myLoginKey\", \"LOGIN_STATUS\": \"success\", \"LOGIN_SUB_TYPE\": \"myLoginSubType\", \"LOGIN_TYPE\": \"myLoginType\", \"METHOD_NAME\": \"myMethod\", \"OPERATION_TYPE\": \"myOperation\", \"LOGIN_STATUS\": \"success\", \"ORGANIZATION_ID\": \"myOrg123\", \"QUIDDITY\": \"myQuiddity\", \"REFERER_URI\": \"https://example.com\", \"REQUEST_ID\": \"myRequest123\", \"REQUEST_STATUS\": \"completed\", \"SESSION_KEY\": \"mySessionKey\", \"USER_INITIATED_LOGOUT\": true, \"USER_TYPE\": \"admin\", \"APP_NAME\": \"myAPP\", \"BROWSER_NAME\": \"Chrome\", \"USER_AGENT\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36\", \"BROWSER_VERSION\": \"93.0.4577.82\", \"CIPHER_SUITE\": \"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256\", \"SOURCE_IP\": \"1.2.3.4\", \"DEVICE_ID\": \"customDeviceId\", \"DEVICE_MODEL\": \"myDeviceModel\", \"DEVICE_PLATFORM\": \"iOS\", \"EXEC_TIME\": 123, \"EVENT_TYPE\": \"LightningPageView\", \"METHOD\": \"GET\", \"MEDIA_TYPE\": \"someMediaType\", \"MESSAGE\": \"custom message\", \"OS_NAME\": \"Windows\", \"OS_VERSION\": \"10.0\", \"PAGE_START_TIME\": 1471564788642, \"URI\": \"/sObject/0064100000JXITSAA5/view\", \"REQUEST_SIZE\": 123321, \"RESPONSE_SIZE\": 321321, \"TIMESTAMP_DERIVED\": \"2015-07-27T11:32:59.555Z\", \"TLS_PROTOCOL\": \"tlsProtocol\", \"UI_EVENT_ID\": \"ltng:error\", \"UI_EVENT_TYPE\": \"eventType\", \"USER_ID\": \"00530000009M943\", \"USER_NAME\": \"test_user\" }",
"event": {
"action": "eventType",
"category": [
"network"
],
"code": "ltng:error",
"dataset": "LightningPageView",
"duration": 123,
"reason": "custom message",
"start": "2016-08-18T23:59:48.642000Z",
"type": [
"info"
]
},
"@timestamp": "2015-07-27T11:32:59.555000Z",
"host": {
"id": "customDeviceId",
"os": {
"name": "Windows",
"version": "10.0"
}
},
"http": {
"request": {
"bytes": 123321,
"method": "GET"
},
"response": {
"bytes": 321321,
"mime_type": "someMediaType"
}
},
"network": {
"application": "myAPP"
},
"organization": {
"id": "myOrg123"
},
"related": {
"ip": [
"1.2.3.4"
]
},
"salesforce": {
"api": {
"type": "myAPI",
"version": "1.0"
},
"client": {
"id": "myClient123"
},
"component": {
"name": "myComponent"
},
"connection": {
"type": "wifi"
},
"controller": {
"type": "myController"
},
"device": {
"model": "myDeviceModel",
"platform": "iOS"
},
"entity": {
"name": "myEntity"
},
"login": {
"key": "myLoginKey",
"status": "success",
"sub_type": "myLoginSubType"
},
"method": {
"name": "myMethod"
},
"operation": {
"type": "myOperation"
},
"quiddity": {
"name": "myQuiddity"
},
"referer": {
"uri": "https://example.com"
},
"request": {
"id": "myRequest123",
"status": "completed"
},
"session": {
"key": {
"id": "mySessionKey"
}
},
"user": {
"initiated_logout": true,
"type": "admin"
}
},
"source": {
"address": "1.2.3.4",
"ip": "1.2.3.4"
},
"tls": {
"cipher": "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
"version": "tlsProtocol"
},
"url": {
"path": "/sObject/0064100000JXITSAA5/view"
},
"user": {
"id": "00530000009M943"
},
"user_agent": {
"device": {
"name": "Other"
},
"name": "Chrome",
"original": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36",
"os": {
"name": "Windows",
"version": "10"
},
"version": "93.0.4577"
}
}
{
"message": "{\"EVENT_TYPE\":\"Login\",\"USER\":\"john.doe@example.com\",\"LOGIN_STATUS\":\"Success\",\"IP_ADDRESS\":\"192.168.0.1\",\"LOGIN_TIME\":\"2023-07-03T10:15:00Z\",\"DEVICE_TYPE\":\"Desktop\",\"BROWSER\":\"Chrome\",\"PLATFORM\":\"Windows 10\",\"LOGIN_GEO_LOCATION\":\"San Francisco, CA\",\"SESSION_ID\":\"ABC123XYZ\",\"LOGIN_URL\":\"https://login.salesforce.com\"}",
"event": {
"category": [
"authentication"
],
"dataset": "Login",
"type": [
"start"
]
},
"@timestamp": "2023-07-03T10:15:00Z",
"related": {
"ip": [
"192.168.0.1"
]
},
"salesforce": {
"login": {
"status": "Success"
}
},
"source": {
"address": "192.168.0.1",
"ip": "192.168.0.1"
},
"user": {
"email": "john.doe@example.com"
}
}
{
"message": "{\"EVENT_TYPE\":\"Report/Dashboard\",\"USER\":\"john.doe@example.com\",\"ACTION\":\"Run\",\"REPORT_NAME\":\"Sales Performance\",\"TIMESTAMP\":\"2023-07-03T12:45:00Z\",\"DASHBOARD_ID\":\"ABCDEF123\",\"FILTERS\":{\"REGION\":\"West\",\"TIMEFRAME\":\"Last Month\"},\"REPORT_URL\":\"https://example.salesforce.com/001/o\"}",
"event": {
"action": "Run",
"category": [
"network"
],
"dataset": "Report/Dashboard",
"type": [
"info"
]
},
"@timestamp": "2023-07-03T12:45:00Z",
"url": {
"domain": "example.salesforce.com",
"original": "https://example.salesforce.com/001/o",
"path": "/001/o",
"port": 443,
"registered_domain": "salesforce.com",
"scheme": "https",
"subdomain": "example",
"top_level_domain": "com"
},
"user": {
"email": "john.doe@example.com"
}
}
Extracted Fields
The following table lists the fields that are extracted, normalized under the ECS format, analyzed and indexed by the parser. It should be noted that infered fields are not listed.
Name | Type | Description |
---|---|---|
@timestamp |
date |
Date/time when the event originated. |
event.action |
keyword |
The action captured by the event. |
event.category |
keyword |
Event category. The second categorization field in the hierarchy. |
event.code |
keyword |
Identification code for this event. |
event.dataset |
keyword |
Name of the dataset. |
event.duration |
long |
Duration of the event in nanoseconds. |
event.reason |
keyword |
Reason why this event happened, according to the source |
event.start |
date |
event.start contains the date when the event started or when the activity was first observed. |
event.type |
keyword |
Event type. The third categorization field in the hierarchy. |
host.id |
keyword |
Unique host id. |
host.os.name |
keyword |
Operating system name, without the version. |
host.os.version |
keyword |
Operating system version as a raw string. |
http.request.bytes |
long |
Total size in bytes of the request (body and headers). |
http.request.method |
keyword |
HTTP request method. |
http.response.bytes |
long |
Total size in bytes of the response (body and headers). |
http.response.mime_type |
keyword |
Mime type of the body of the response. |
http.response.status_code |
long |
HTTP response status code. |
network.application |
keyword |
Application level protocol name. |
organization.id |
keyword |
Unique identifier for the organization. |
salesforce.api.type |
keyword |
Salesforce api type |
salesforce.api.version |
keyword |
Salesforce api version |
salesforce.class.name |
keyword |
Salesforce class name |
salesforce.client.id |
keyword |
Salesforce client id |
salesforce.component.name |
keyword |
Salesforce component name |
salesforce.connection.type |
keyword |
Salesforce connection type |
salesforce.controller.type |
keyword |
Salesforce controller type |
salesforce.device.model |
keyword |
Salesforce device model |
salesforce.device.platform |
keyword |
Salesforce device platform |
salesforce.entity.name |
keyword |
Salesforce entity name |
salesforce.login.key |
keyword |
Salesforce login key |
salesforce.login.status |
keyword |
Salesforce login status |
salesforce.login.sub_type |
keyword |
Salesforce login sub type |
salesforce.method.name |
keyword |
Salesforce method name |
salesforce.object.type |
keyword |
Salesforce object type |
salesforce.operation.type |
keyword |
Salesforce operation type |
salesforce.quiddity.name |
keyword |
Salesforce quiddity name |
salesforce.referer.uri |
keyword |
Salesforce referer uri |
salesforce.request.id |
keyword |
Salesforce request id |
salesforce.request.resource |
keyword |
Salesforce request resource |
salesforce.request.status |
keyword |
Salesforce request status |
salesforce.session.key.id |
keyword |
Salesforce session key id |
salesforce.user.initiated_logout |
boolean |
Salesforce user initiated logout |
salesforce.user.type |
keyword |
Salesforce user type |
source.geo.country_name |
keyword |
Country name. |
source.geo.region_name |
keyword |
Region name. |
source.ip |
ip |
IP address of the source. |
tls.cipher |
keyword |
String indicating the cipher used during the current connection. |
tls.version |
keyword |
Numeric part of the version parsed from the original string. |
url.original |
wildcard |
Unmodified original url as seen in the event source. |
url.path |
wildcard |
Path of the request, such as "/search". |
url.query |
keyword |
Query string of the request. |
user.email |
keyword |
User email address. |
user.id |
keyword |
Unique identifier of the user. |
user.name |
keyword |
Short name or login of the user. |
user_agent.name |
keyword |
Name of the user agent. |
user_agent.original |
keyword |
Unparsed user_agent string. |
user_agent.version |
keyword |
Version of the user agent. |
For more information on the Intake Format, please find the code of the Parser, Smart Descriptions, and Supported Events here.