Query Details

Communication At Risk Due To The Encryption Algorithms Ciphers In Use

Query

**Communication at risk due to the encryption algorithms (Ciphers) in use**

**Description**: This query is using the DeviceNetworkEvents table to filter  by connections where there are encryption algorithms used.
Then, I take a list of the encryption algorithms database from the well-known site iana.org which is an entity that monitors the global allocation of IP addresses, autonomous systems, DNS domain name root servers and other Internet Protocol resources.
Finally, It list cases where there are multiple connections established using non-recommended or non-valid datagram transport layer security (DTLS), which could mean that our users are not protected against eavesdropping, tampering or message forgery. 

```
let CVE = externaldata(Value:string,Description:string,DTLSOK:string,Recommended:string,Reference:string)
[@"https://www.iana.org/assignments/tls-parameters/tls-parameters-4.csv"] with (format="csv");
DeviceNetworkEvents
| extend cipher = parse_json(AdditionalFields).cipher
| extend cipher = tostring(cipher)
| where isnotempty(cipher)
| extend RemoteIPCountry = geo_info_from_ip_address(RemoteIP).country
| extend RemoteIPCountry = tostring(RemoteIPCountry)
| join kind=inner (CVE) on $left.cipher == $right.Description
// just listing non-recommended TLS versions or communications where the Datagram Transport Layer Security (DTLS) is not OK
| where DTLSOK has "N" or Recommended has "N"
// creating a new column to have RFC URL Reference
| extend RFCLink = tolower(Reference)
| extend RFCLink = substring(RFCLink, 1, strlen(RFCLink) - 2)
| extend RFCLink = strcat("rfc-editor.org/rfc/",RFCLink,".html")
| extend RFCLink = tostring(RFCLink)
// sorting by Totalconnections to find out if there are any repetitive connections using low encryption
 | summarize Totalconnections=count() by RemoteIP, RemoteIPCountry, TenantId,DeviceName, LocalIP,ActionType, RemotePort, Protocol, cipher, Value,Description, DTLSOK, Recommended, Reference, RFCLink
| order by Totalconnections
```

Explanation

Sure! Here's a simple summary of the query:

  1. Data Source: The query uses the DeviceNetworkEvents table to look at network connections on devices.
  2. Encryption Algorithms: It focuses on connections that use specific encryption algorithms (ciphers).
  3. Reference List: It pulls a list of encryption algorithms from a well-known site, iana.org, which provides information about various internet protocols.
  4. Filtering: The query filters out connections that use non-recommended or invalid Datagram Transport Layer Security (DTLS) algorithms. These weak algorithms could make users vulnerable to eavesdropping, tampering, or message forgery.
  5. Details: It adds details like the country of the remote IP address and creates a link to the relevant RFC (Request for Comments) document for each cipher.
  6. Summary: Finally, it summarizes the data to show the total number of connections for each combination of remote IP, country, device, and other details, and sorts them to highlight repetitive connections using weak encryption.

In essence, the query identifies and lists network connections that use weak or non-recommended encryption algorithms, potentially putting users at risk.

Details

Sergio Albea profile picture

Sergio Albea

Released: August 29, 2024

Tables

DeviceNetworkEvents

Keywords

DevicesNetworkSecurity

Operators

letexternaldataextendparse_jsontostringisnotemptygeo_info_from_ip_addressjoinonhastolowersubstringstrlenstrcatsummarizecountbyorder

Actions