Skip to content

Installing and using the recording agent for Windows

  • Installation


    Installing and deploying the Windows recording agent.

    Install

  • Configuration


    Configure the Windows recording agent to work with RDP and HTML5 RDP applications and/or direct access.

    Configure

The Windows recording agent is used by cyberelements.io / cyberelements Cleanroom to add new features for RDP sessions:

  • Ability to filter TCP and UDP streams accessible by the user
  • Ability to trigger session recording for any user connecting to the server without going through the user portal or Desktop client (direct access feature)

In addition, additional events are captured during user sessions:

  • Window opening
  • Window closing
  • Program launch
  • Program closing
  • Clipboard contents
  • User activity

Prerequisites

Client compatibility

To find out whether the agent is compatible with different Microsoft Windows operating systems, refer to the compatibility matrix.

The recording agent requires a few prerequisites to function properly. Some of these are only intended for agent-based recording functionality for RDP and HTML5 RDP applications, while others concern direct agent-based access.

General prerequisites

The recording agent sends the user session recording back to cyberelements.io and cyberelements Cleanroom by connecting to the Edge Gateway on port TCP 8443. This requires the network flow between the two machines to be open.

To securely send the recording back to the Edge Gateway, the recording agent establishes a secure connection with the latter using TLS. TLS relies on the use of certificates, and the following constraints must be validated for the connection to be considered reliable and secure:

  • The server certificate, in this case the Edge Gateway, must not have expired (maximum validity date).
  • The server certificate, in this case the Edge Gateway, must be issued by a certification authority recognized as trustworthy by the machine on which the recording agent is installed.

    Additional information

    The server on which the recording agent is installed must have, at a minimum, the root certification authority (CA) of the recording server certificate in its local store of trusted certification authorities.

    It is therefore necessary to:

    1. Retrieve the root CA of the certificate from the recording service on the Edge Gateway.
    2. Upload this CA to the server where the recording agent is installed.
    3. Install the CA in the “Trusted Root Certification Authorities” certificate store on the local machine.
    Example with PowerShell

    You can easily import a certificate in .cer format via PowerShell.
    To do this, open a PowerShell terminal as the machine administrator and run the following command:

    1
    Import-Certificate -FilePath "<PAHT_TO_CERT>" -CertStoreLocation "Cert:\LocalMachine\Root"
    
    Replace <PATH_TO_CERT> with the path to the certificate file.

    Example with PowerShell for the Systancia certificate without sending files

    This example involves installing the Systancia root CA, which is used by default on cyberelements.io or for cyberelements Cleanroom clients using certificates provided by Systancia.

    It is also possible to import the certificate without having to send/download the file to the machine where the recording agent is installed.
    To do this, open a PowerShell terminal as the machine administrator and run the following commands:

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    # Systancia Root certificate
    $base64Cert = "MIIFIDCCBAigAwIBAgIBADANBgkqhkiG9w0BAQUFADCBjTELMAkGA1UEBhMCRlIx
    FDASBgNVBAoTC0lQZGl2YSBSb290MR0wGwYDVQQLExRJUGRpdmEgU2VjdXJpdHkg
    RGVwdDEqMCgGA1UEAxMhSVBkaXZhIFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5
    MR0wGwYJKoZIhvcNAQkBFg5wa2lAaXBkaXZhLmNvbTAeFw0wNTA4MjIxNTAwMzla
    Fw0zMDA4MjIxNTAwMzlaMIGNMQswCQYDVQQGEwJGUjEUMBIGA1UEChMLSVBkaXZh
    IFJvb3QxHTAbBgNVBAsTFElQZGl2YSBTZWN1cml0eSBEZXB0MSowKAYDVQQDEyFJ
    UGRpdmEgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkxHTAbBgkqhkiG9w0BCQEW
    DnBraUBpcGRpdmEuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
    ua59tx+RkIPZbGaSwkV0w5fuPBpY3sbLTk/eR2uN7j9zMu0pq38LfibCVsNGlifh
    GfT5CEbrNL7KvlEVY/It1QluYxNgknlcBP1roJG/xHNcUNmbvCFYLy9N3Nd0J/gC
    Vd8tdB4exqyKEoNuqX18rLpSJJOUZdQCeGdF9r+w6vmHdRMeVS44qIiBPv9Bxzgf
    GXBxAlSqfuDDJ3eZEMsWF/kJrbm4Uhav2ACl5qjHgSSTKMoGoEWOJNkB7Mq/khxc
    TnixIpM2s1rpEfhIetPo4BHsyKv7wqWrS6ouwu5AbzT5t3UqaN77CLqcZJGQ3vC0
    IGKBuEcwigd7W6qkX1/XMwIDAQABo4IBhzCCAYMwDwYDVR0TAQH/BAUwAwEB/zAd
    BgNVHQ4EFgQU+lu7XBGohR2DKD+D+abZEODRHjkwgboGA1UdIwSBsjCBr4AU+lu7
    XBGohR2DKD+D+abZEODRHjmhgZOkgZAwgY0xCzAJBgNVBAYTAkZSMRQwEgYDVQQK
    EwtJUGRpdmEgUm9vdDEdMBsGA1UECxMUSVBkaXZhIFNlY3VyaXR5IERlcHQxKjAo
    BgNVBAMTIUlQZGl2YSBSb290IENlcnRpZmljYXRlIEF1dGhvcml0eTEdMBsGCSqG
    SIb3DQEJARYOcGtpQGlwZGl2YS5jb22CAQAwCwYDVR0PBAQDAgEGMBkGA1UdEQQS
    MBCBDnBraUBpcGRpdmEuY29tMBkGA1UdEgQSMBCBDnBraUBpcGRpdmEuY29tMBEG
    CWCGSAGG+EIBAQQEAwIABzA+BglghkgBhvhCAQ0EMRYvSVBkaXZhIFJvb3QgQ2Vy
    dGlmaWNhdGlvbiBBdXRob3JpdHkgQ2VydGlmaWNhdGUwDQYJKoZIhvcNAQEFBQAD
    ggEBACaAgBQK7TATXieb9OdKm+l7/GpePo8f2bRKnkqeRS+HXBKYkvqVJdbJnhJm
    YPOdmhr9ATzt+488tQREAGzqPCp5eiVExPgvomNeG77X57KqbgCA1F7zGJqjP1FL
    771FIWvFXp80ReM/zhcM+MY3sa5LADgOEl5NhoMNHT8AhLKwZ81j5nuwxyG9ICCN
    5GjwgsnK/agmum4+RKeybIWuC/JTsSnu5OImXsmrlUiakp2l+VsZ1rRRNRNUlSbg
    Q3T8kj5ajB0lv2I0kj4fN9wDxzdHEn7nEAmv0t6Y5Te0g/VK3VWhuqeLStaahgip
    hmOVxbu5Ijfug5/3Eemep34NsYk="
    
    # Convert the certificate and store it in memory
    $certBytes = [Convert]::FromBase64String($base64Cert)
    
    # Create a certificate object
    $cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2
    $cert.Import($certBytes)
    
    # Open the trusted root certificate store on the local machine and add the Systancia root certificate
    $store = New-Object System.Security.Cryptography.X509Certificates.X509Store("Root", "LocalMachine")
    $store.Open([System.Security.Cryptography.X509Certificates.OpenFlags]::ReadWrite)
    $store.Add($cert)
    $store.Close()
    

    To use this method with another CA, please change the value of the base64Cert variable to the base 64-encoded certificate of your choice.

  • The server certificate, in this case the Edge Gateway, must not be revoked.

  • The machine on which the recording agent is installed must be able to contact the server, in this case the Edge Gateway, with a DNS name or IP address that is covered by the server certificate via its Common Name (CN).

Specific prerequisites for RDP applications with agents used on a macOS or Ubuntu user workstation

Warning

The following prerequisites are only necessary if the user launches an RDP application with an agent and their workstation is not Windows (macOS or Ubuntu).

If cyberelements.io or cyberelements Cleanroom users have workstations exclusively running Windows or, if not, exclusively use HTML5 RDP applications, then the following prerequisites can be ignored.

The following registry keys are required on the target server where the recording agent is deployed.

First, the first key will disable the list of authorized startup programs (Microsoft document). By default, a Windows machine only allows explorer.exe as a startup program.

1
2
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Terminal Server\TSAppAllowList]
"fDisabledAllowList"=dword:00000001

If the machine is not an RDS server, then applying the following registry key is always recommended in order to allow the recording agent to open as a startup program:

1
2
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server]
"HonorLegacySettings"=dword:00000001

Specific requirements for direct access

Direct access feature

The direct access feature allows you to trigger a recording of the user's session for RDP or console access (physical connection to the machine or via the hypervisor's console mode) that does not go directly through cyberelements.io or cyberelements Cleanroom.

If the user has permission to access the server, their session will be recorded. If this is not the case, then by default, the user will be disconnected.

For the recording agent to operate in direct access mode, an x509 certificate is required. This certificate must meet the following requirements:

  • The certificate must still be valid (validity period not expired).
  • The certificate must be of the type (advanced key usage field) authentification du client (OID: 1.3.6.1.5.5.7.3.2).
  • The certificate must not be revoked.
  • Constraints arising from OpenSSL security level 2 imply that:
    • The certificate must have a private key of at least 2048 bits with RSA, DSA, and DH ciphers; for elliptic curve keys (ECC), they must be at least 224 bits.
    • The certificate signature must not be MD5 or SHA-1 (SHA-512 is preferred).
  • The recording server will use the Common Name (CN) field to identify the certificate and therefore the machine where a direct recording is triggered. This field must be completed.

Using the recording agent with RDP and HTML5 RDP applications

Enabling the use of the recording agent

If the recording agent is correctly installed and configured, then enabling the use of the agent is done at the level of the preferred RDP or HTML5 RDP application:

Three parameters are involved in the mechanism:

Without agent mode
This option must remain unchecked for the recording agent to work.
Disconnect session if the recorder is not working
This enables or disables a security feature when session recording fails for various reasons. If recording cannot be performed, the user's RDP or HTML5 RDP session will be terminated. We recommend enabling this setting to prevent user connections without recording (for example, in the event of a recording agent malfunction).
Time before disconnection
If the previous option is enabled, this option allows you to set the time in seconds before the disconnection is performed. The default setting is 30 seconds, but it can be reduced to increase responsiveness or increased if, for example, user sessions are known to be long.

Limit lateral movement

Limiting lateral movement is a feature that restricts network connections for the user session. This feature blocks all TCP/UDP traffic within the user session by default, but administrators can open different access flows.

Restrictions are configured in the access policy and can therefore vary depending on the user and have different settings for a single user (by multiplying the access policies assigned to them). A user with multiple access policies for the same application will see network restrictions based on the most permissive access.

Once an RDP or HTML5 RDP application with agent is authorized in an access policy, the Network connections tab becomes available. From there, it is possible to enable filtering and specify authorized networks for the user:

Information

Any changes to these settings will only be applied to users when they next use the relevant RDP or HTML5 RDP application.

Configure direct access recordings with agent

Declare servers prepared for direct access with agent

To declare a server that must operate in direct access with agent mode, you must first open the Machines management module:

Then click on the button to add a new server. A new window will appear to configure the new server:

Name
Machine name as displayed in the cyberelements.io console or cyberelements Cleanroom.
Notification text
Notification message that users will receive when connecting to the server.
Record sessions as videos
Enables or disables video recording of the session. If disabled, only session events will be captured and recorded.
Check video integriyt at playback
When creating the video archive, a hash (SHA-256) of the video file is calculated and stored. When administrators view the archive, they will check that the hash has not been modified. If it has been modified, an alert message will be sent to the administrator, as there will likely be changes to the video recording (e.g., replacement or cut sequences).
Allow manual removal of archives
Allow or deny administrators the ability to delete video archives.

Information

The archives generated retain the settings that were in effect at the time of recording. Changing this setting will only affect new archives.
Delete archives automatically
Setting up automatic deletion of archives after exceeding a specific number of days.

Information

The archives generated retain the settings that were in effect at the time of recording. Changing this setting will only affect new archives.
Use agent mode
Option that must be enabled for the server to have the direct access mechanism with active agent.
Host (CN of the certificate)
Indication of the CN of the certificate used by the recording agent to authenticate itself with the Edge Gateway. This corresponds to the machine certificate settings.
Use no agent
If a parameter is not useful for the desired operating mode, it can be unchecked.

Configuring direct access rights with an agent

Configuring direct access rights with an agent is similar to configuring access policies for applications. New rights are declared and existing rights are modified via Configurations d'enregistrement direct:

You can add a new configuration by clicking on the button .

The various settings tabs are similar to those for application access policies, except for the groups tab, which allows you to add a group manually:

After clicking on the manual add button, a new window will appear to retrieve the name of the group and its domain:

Tip

This feature is particularly useful if you want to add a local group or a group in a different OU than the one set in the LDAP domain configurations.

The other tabs are:

  • Sites: locate the configuration on one or more sites, and by extension, allow the recording agent to connect to one or more Edge Gateways attached to the authorized sites.
  • Machines: add RDP servers declared in the previous chapter.
  • Alerts: link alerts to the configuration.
  • Network connections: limit users' lateral movements during their sessions with functionality identical to the lateral movement limitations of RDP and HTML5 RDP applications.

Recording agent logs

Enabling recording agent logs

Warning!

Enabling logs requires restarting the recording agent service, which will stop any session recordings currently in progress on the server.
Depending on the LogOffOnFailure key settings, the user will either be logged out or remain logged in.

To enable logging for the recording agent, you must perform the following steps:

  1. Create a directory named Log in the agent installation directory (by default, this is C:\Program Files (x86)\Systancia\Safe for cyberelements Cleanroom and C:\Program Files (x86)\Systancia\cyberelements for cyberelements.io).

  2. Restart the CleanroomAgent service, for example with the following PowerShell administrator command:

    1
    Restart-Service -Name 'CleanroomAgent'
    

Each time the recording agent service is started, a new log file will be generated in the Log directory created in step 1.

Contents of the recording agent logs

The logs generated by the recording agent will look like this:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
16-06-25 14:49:02.604 [6364] TRACE Console.infoSystem System directory: C:\Windows\system32
16-06-25 14:49:02.604 [6364] TRACE Console.infoSystem Windows directory: C:\Windows
16-06-25 14:49:02.604 [6364] TRACE Console.infoSystem Windows temporary directory: C:\Windows\TEMP\
16-06-25 14:49:02.605 [6364] TRACE Console.infoSystem User profile directory: C:\Windows\system32\config\systemprofile
16-06-25 14:49:02.605 [6364] TRACE Console.infoSystem Current directory: C:\Windows\system32
16-06-25 14:49:02.605 [6364] TRACE Console.infoSystem Application Data directory: C:\Windows\system32\config\systemprofile\AppData\Roaming
16-06-25 14:49:02.606 [6364] TRACE Console.infoSystem Command line: C:\Program Files (x86)\Systancia\Safe\IpDivaCareSupervisor.exe
16-06-25 14:49:02.606 [6364] TRACE Console.infoSystem Current exe directory: C:/Program Files (x86)/Systancia/Safe/
16-06-25 14:49:02.606 [6364] TRACE Console.infoSystem Root directory: C:/Program Files (x86)/Systancia/
16-06-25 14:49:02.607 [6364] TRACE Console.infoSystem Microsoft Windows NT family
16-06-25 14:49:02.607 [6364] TRACE Console.infoSystem Service Pack 0.0
16-06-25 14:49:02.607 [6364] TRACE Console.infoSystem OEM ID: 0
16-06-25 14:49:02.607 [6364] TRACE Console.infoSystem Number of Processors: 8
16-06-25 14:49:02.607 [6364] TRACE Console.infoSystem Page size: 4096
16-06-25 14:49:02.607 [6364] TRACE Console.infoSystem Processor Type: 586
16-06-25 14:49:02.607 [6364] TRACE Console.infoSystem Active processor mask: 255
16-06-25 14:49:02.608 [6364] TRACE Console.infoSystem Username: Système
16-06-25 14:49:02.608 [6364] TRACE Console.infoSystem -----------------------------------
16-06-25 14:49:02.609 [4620] TRACE main.run Loaded 1 gateways from file C:/Program Files (x86)/Systancia/Safe/gateways.xml
16-06-25 14:49:02.610 [4620] ERROR main.run Error loading public keys. boost::filesystem::directory_iterator::construct: Le fichier spécifié est introuvable [system:2]: "C:/Program Files (x86)/Systancia/pubkeys"
16-06-25 14:49:02.610 [4620] TRACE main.wtssessionchange Copying C:/Program Files (x86)/Systancia/Safe/CareInit.exe to C:/Windows/system32/CareInit.exe
16-06-25 14:49:12.298 [6364] TRACE main.wtssessionchange Session logon or connect :6 event:3
16-06-25 14:49:12.299 [6364] TRACE main.wtssessionchange
16-06-25 14:49:13.301 [6364] TRACE main.wtssessionchange Session logon or connect :6 event:5
16-06-25 14:49:13.303 [6364] TRACE main.wtssessionchange cyberelements_user
16-06-25 14:49:13.319 [6364] TRACE wtssessionchange.wtssessionchange 17 bytes written
16-06-25 14:49:13.319 [6364] TRACE wtssessionchange.wtssessionchange Opened VC clr
16-06-25 14:49:13.371 [6364] TRACE main.wtssessionchange Recording server retrieved via VC clr:my-edge-gateway.domain.local
16-06-25 14:49:13.371 [6364] TRACE main.wtssessionchange care password :K5efPBwVM2cIU0LaYQucZp0FV19nRIE5f5VYoBZz6EqlZOxNGM
16-06-25 14:49:13.371 [6364] TRACE SelectConfig.autoconf poll() is not supported on this platform, using select()
16-06-25 14:49:13.418 [6364] TRACE main.getNetFilterRulesInformation Filter not enabled
16-06-25 14:49:13.419 [6364] TRACE main.getNetFilterRulesInformation FALSE
16-06-25 14:49:13.419 [6364] ERROR main.getNetFilterRulesInformation No public key configured. Cannot verify net filtering rules.
16-06-25 14:49:13.419 [6364] TRACE Socket.incrCounters 0 UDP, 0 TCP, 1 Objs
16-06-25 14:49:13.421 [6364] TRACE main.createRecorderProcess launching whith password :K5efPBwVM2cIU0LaYQucZp0FV19nRIE5f5VYoBZz6EqlZOxNGM
16-06-25 14:49:26.664 [4620] TRACE main.createRecorderProcess Calling logoff.exe 6
16-06-25 14:49:26.990 [6364] TRACE main.wtssessionchange User DOMAIN\cyberelements_user has no other session. Dropping network filter rules
16-06-25 14:49:26.990 [6364] TRACE main.wtssessionchange Session logoff or disconnect :6 event:6
16-06-25 14:49:27.331 [6364] TRACE main.wtssessionchange Session logoff or disconnect :6 event:4
16-06-25 14:49:38.964 [6364] TRACE main.wtssessionchange Session logon or connect :7 event:3
16-06-25 14:49:38.965 [6364] TRACE main.wtssessionchange
16-06-25 14:49:40.75 [6364] TRACE main.wtssessionchange Session logon or connect :7 event:5
16-06-25 14:49:40.76 [6364] TRACE main.wtssessionchange cyberelements_user
16-06-25 14:49:40.178 [6364] TRACE wtssessionchange.wtssessionchange WTSVirtualChannelOpenEx failure.31 Not a Cleanroom session, or the client has no support for the clr virtual channel
16-06-25 14:49:40.179 [6364] TRACE main.wtssessionchange prog :
16-06-25 14:49:40.185 [6364] TRACE main.createRecorderProcess User groups :DOMAIN\Utilisateurs du domaine domain.local\Utilisateurs du domaine \Tout le monde domain.local\Tout le monde BUILTIN\Utilisateurs BUILTIN\Utilisateurs du Bureau à distance AUTORITE NT\REMOTE INTERACTIVE LOGON AUTORITE NT\INTERACTIF AUTORITE NT\Utilisateurs authentifiés domain.local\LOCAL DOMAIN\cyberelements_users domain.local\cyberelements_users 
16-06-25 14:49:40.186 [6364] TRACE getDirectRecordInformation.getDirectRecordInformation gateways: my-edge-gateway.domain.local
16-06-25 14:49:40.199 [6364] TRACE SecChannelClient.ClientCreateCredentials looking for a certificate with name containing:my-rds-server
16-06-25 14:49:40.199 [6364] TRACE SecChannelClient.ClientCreateCredentials looking for a certificate with name containing:my-rds-server.domain.local in the local machine store
16-06-25 14:49:40.201 [6364] TRACE SecChannelClient.ClientCreateCredentials certificate subject:C=FR, S=Grand-Est, L=Sausheim, O=Systancia, CN=my-rds-server.domain.local
16-06-25 14:49:40.201 [6364] TRACE SecChannelClient.ClientCreateCredentials certificate issuer:C=FR, S=Grand-Est, L=Sausheim, O=Systancia, CN=SUB-CA
16-06-25 14:49:40.404 [6364] TRACE Socket.incrCounters 0 UDP, 0 TCP, 1 Objs
16-06-25 14:49:40.404 [6364] TRACE main.createRecorderProcess Net filter enabled
16-06-25 14:49:40.426 [3948] TRACE CleanroomNetFilter.addRule User DOMAIN\cyberelements_user Remote address: 168427818 (10.10.1.42) Remote port: 443 Protocol condition: TCP
16-06-25 14:49:40.427 [3948] TRACE CleanroomNetFilter.addRule User DOMAIN\cyberelements_user Remote address: 168432641 (10.10.20.1) Remote port: 53 Protocol condition: UDP
16-06-25 14:49:40.428 [6364] TRACE CleanroomNetFilter.addRule User DOMAIN\cyberelements_user Application: C:/Program Files (x86)/Systancia/Safe/IpdivaCareRecorder.exe Remote address: 168427791 (10.10.1.15) Remote port: 8443 Protocol condition: TCP
16-06-25 14:49:40.430 [6364] TRACE main.createRecorderProcess launching whith password :DIRECT_33fRBYAwVDEKs8n3bGFwlIgKYd39C2Ubcl4pkLLC0YAouL4Gml
16-06-25 14:49:48.690 [4620] TRACE main.createRecorderProcess Calling logoff.exe 7
16-06-25 14:49:50.13 [6364] TRACE main.wtssessionchange User DOMAIN\cyberelements_user has no other session. Dropping network filter rules
16-06-25 14:49:50.13 [6364] TRACE main.wtssessionchange Session logoff or disconnect :7 event:6
16-06-25 14:49:50.379 [6364] TRACE main.wtssessionchange Session logoff or disconnect :7 event:4
16-06-25 14:49:54.658 [6364] TRACE main.wtssessionchange Removing C:/Windows/system32/CareInit.exe
Initializing the recording agent (lines 1-21)

When the recording agent is initialized (lines 1-18), various information about the system is logged.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
16-06-25 14:49:02.604 [6364] TRACE Console.infoSystem System directory: C:\Windows\system32
16-06-25 14:49:02.604 [6364] TRACE Console.infoSystem Windows directory: C:\Windows
16-06-25 14:49:02.604 [6364] TRACE Console.infoSystem Windows temporary directory: C:\Windows\TEMP\
16-06-25 14:49:02.605 [6364] TRACE Console.infoSystem User profile directory: C:\Windows\system32\config\systemprofile
16-06-25 14:49:02.605 [6364] TRACE Console.infoSystem Current directory: C:\Windows\system32
16-06-25 14:49:02.605 [6364] TRACE Console.infoSystem Application Data directory: C:\Windows\system32\config\systemprofile\AppData\Roaming
16-06-25 14:49:02.606 [6364] TRACE Console.infoSystem Command line: C:\Program Files (x86)\Systancia\Safe\IpDivaCareSupervisor.exe
16-06-25 14:49:02.606 [6364] TRACE Console.infoSystem Current exe directory: C:/Program Files (x86)/Systancia/Safe/
16-06-25 14:49:02.606 [6364] TRACE Console.infoSystem Root directory: C:/Program Files (x86)/Systancia/
16-06-25 14:49:02.607 [6364] TRACE Console.infoSystem Microsoft Windows NT family
16-06-25 14:49:02.607 [6364] TRACE Console.infoSystem Service Pack 0.0
16-06-25 14:49:02.607 [6364] TRACE Console.infoSystem OEM ID: 0
16-06-25 14:49:02.607 [6364] TRACE Console.infoSystem Number of Processors: 8
16-06-25 14:49:02.607 [6364] TRACE Console.infoSystem Page size: 4096
16-06-25 14:49:02.607 [6364] TRACE Console.infoSystem Processor Type: 586
16-06-25 14:49:02.607 [6364] TRACE Console.infoSystem Active processor mask: 255
16-06-25 14:49:02.608 [6364] TRACE Console.infoSystem Username: Système
16-06-25 14:49:02.608 [6364] TRACE Console.infoSystem -----------------------------------

Line 19 specifies the number of Edge Gateways found in the gateways.xml file for direct mode operation.

19
16-06-25 14:49:02.609 [4620] TRACE main.run Loaded 1 gateways from file C:/Program Files (x86)/Systancia/Safe/gateways.xml

Line 20 indicates a problem loading keys in a non-existent directory. This is an old function that does not affect the overall operation of the agent. This error log can therefore be ignored.

20
16-06-25 14:49:02.610 [4620] ERROR main.run Error loading public keys. boost::filesystem::directory_iterator::construct: Le fichier spécifié est introuvable [system:2]: "C:/Program Files (x86)/Systancia/pubkeys"

Line 21 specifies the action of copying the CareInit.exe executable to System32 in order to cover cases where an RDP application with agent is launched from a macOS or Ubuntu machine.
In this condition, the connection to the server requests to run CareInit.exe as a startup program.

21
16-06-25 14:49:02.610 [4620] TRACE main.wtssessionchange Copying C:/Program Files (x86)/Systancia/Safe/CareInit.exe to C:/Windows/system32/CareInit.exe
Connection of an HTML5 RDP or RDP application with agent (lines 22-39)

When a new RDP session is detected, the following logs are written to indicate the detection of a new RDP session and record the username that logged in:

22
23
24
25
16-06-25 14:49:12.298 [6364] TRACE main.wtssessionchange Session logon or connect :6 event:3
16-06-25 14:49:12.299 [6364] TRACE main.wtssessionchange
16-06-25 14:49:13.301 [6364] TRACE main.wtssessionchange Session logon or connect :6 event:5
16-06-25 14:49:13.303 [6364] TRACE main.wtssessionchange cyberelements_user

In the logs above, it is the cyberelements_user user who connected via RDP.

When launching an HTML5 RDP or RDP application with an agent, a specific virtual RDP channel is created in order to send the Edge Gateway connection address and the unique password for connecting to the Edge Gateway recording service to the recording agent.
This indicates two things:

  1. The recording agent has detected that this is an RDP connection initiated by cyberelements Cleanroom or cyberelements.io, so it should not treat the session as direct access.
  2. The recording agent was able to retrieve the address of the Edge Gateway to which it must send the video recordings and events.

This information corresponded to lines 27-29, where in the example the recording agent retrieved the connection address for the Edge Gateway (my-edge-gateway.domain.local) and a one-time password (K5efPBwVM2cIU0LaYQucZp0FV19nRIE5f5VYoBZz6EqlZOxNGM):

29
30
31
16-06-25 14:49:13.319 [6364] TRACE wtssessionchange.wtssessionchange Opened VC clr
16-06-25 14:49:13.371 [6364] TRACE main.wtssessionchange Recording server retrieved via VC clr:my-edge-gateway.domain.local
16-06-25 14:49:13.371 [6364] TRACE main.wtssessionchange care password :K5efPBwVM2cIU0LaYQucZp0FV19nRIE5f5VYoBZz6EqlZOxNGM

Next come the logs concerning the application of network filtering rules, which are detailed in another information section further down the page.

A log specifies when the recording agent initiates the connection with the Edge Gateway and which unique password it uses to authenticate itself.

35
16-06-25 14:49:13.421 [6364] TRACE main.createRecorderProcess launching whith password :K5efPBwVM2cIU0LaYQucZp0FV19nRIE5f5VYoBZz6EqlZOxNGM

Finally, when the user initiates a disconnection, it is captured by the recording agent in order to end the recording and remove any network filtering rules. This corresponds to lines 36-39 of the example log file:

36
37
38
39
16-06-25 14:49:26.664 [4620] TRACE main.createRecorderProcess Calling logoff.exe 6
16-06-25 14:49:26.990 [6364] TRACE main.wtssessionchange User DOMAIN\cyberelements_user has no other session. Dropping network filter rules
16-06-25 14:49:26.990 [6364] TRACE main.wtssessionchange Session logoff or disconnect :6 event:6
16-06-25 14:49:27.331 [6364] TRACE main.wtssessionchange Session logoff or disconnect :6 event:4
Direct RDP access connection (lines 40-61)

When a new RDP session is detected, the following logs are written to indicate the detection of a new RDP session and record the username that logged in:

40
41
42
43
16-06-25 14:49:38.964 [6364] TRACE main.wtssessionchange Session logon or connect :7 event:3
16-06-25 14:49:38.965 [6364] TRACE main.wtssessionchange
16-06-25 14:49:40.75 [6364] TRACE main.wtssessionchange Session logon or connect :7 event:5
16-06-25 14:49:40.76 [6364] TRACE main.wtssessionchange cyberelements_user

In the logs above, it is the cyberelements_user user who connected via RDP.

During a live RDP connection, the specific RDP virtual channel for running RDP or HTML5 RDP applications with an agent is not used. The recording agent therefore concludes that the open session is a direct access session.

44
16-06-25 14:49:40.178 [6364] TRACE wtssessionchange.wtssessionchange WTSVirtualChannelOpenEx failure.31 Not a Cleanroom session, or the client has no support for the clr virtual channel

Due to the detection of direct access, the recording agent logs the different user groups of the user who has just connected:

46
16-06-25 14:49:40.185 [6364] TRACE main.createRecorderProcess User groups :DOMAIN\Utilisateurs du domaine domain.local\Utilisateurs du domaine \Tout le monde domain.local\Tout le monde BUILTIN\Utilisateurs BUILTIN\Utilisateurs du Bureau à distance AUTORITE NT\REMOTE INTERACTIVE LOGON AUTORITE NT\INTERACTIF AUTORITE NT\Utilisateurs authentifiés domain.local\LOCAL DOMAIN\cyberelements_users domain.local\cyberelements_users 

Tip

With this information, you can determine the reasons why direct access recordings are not triggered: if the direct access contract does not authorize one of the user's groups, or if the domain name specified must be the short name (netBIOS name) or the full name.

The recording agent specifies which Edge Gateways it will be able to connect to in order to upload the user's session recording.
As a reminder, these are the Edge Gateways that are part of the gateways.xml file configured during the configuration of the recording agent.

47
16-06-25 14:49:40.186 [6364] TRACE getDirectRecordInformation.getDirectRecordInformation gateways: my-edge-gateway.domain.local

Next is the client certificate that the recording agent uses to authenticate with the recording service.
By default, the recording agent will look for a certificate containing the name of the RDP server in its CN, unless the MachineName key has been defined.
The recording agent then specifies the selected certificate and the information about the certification authority that generated it.

48
49
50
51
16-06-25 14:49:40.199 [6364] TRACE SecChannelClient.ClientCreateCredentials looking for a certificate with name containing:my-rds-server
16-06-25 14:49:40.199 [6364] TRACE SecChannelClient.ClientCreateCredentials looking for a certificate with name containing:my-rds-server.domain.local in the local machine store
16-06-25 14:49:40.201 [6364] TRACE SecChannelClient.ClientCreateCredentials certificate subject:C=FR, S=Grand-Est, L=Sausheim, O=Systancia, CN=my-rds-server.domain.local
16-06-25 14:49:40.201 [6364] TRACE SecChannelClient.ClientCreateCredentials certificate issuer:C=FR, S=Grand-Est, L=Sausheim, O=Systancia, CN=SUB-CA

In the example above, the recording agent searched for a certificate containing my-rds-server and found one with the CN my-rds-server.domain.local issued for the certification authority SUB-CA.

Next come the logs concerning the application of network filtering rules, which are detailed in another information section further down the page.

A log specifies when the recording agent initiates the connection with the Edge Gateway and which unique password it uses to authenticate itself.

57
16-06-25 14:49:40.430 [6364] TRACE main.createRecorderProcess launching whith password :DIRECT_33fRBYAwVDEKs8n3bGFwlIgKYd39C2Ubcl4pkLLC0YAouL4Gml

Finally, when the user initiates a disconnection, it is captured by the recording agent in order to end the recording and remove any network filtering rules. This corresponds to lines 58-61 of the example log file:

58
59
60
61
16-06-25 14:49:48.690 [4620] TRACE main.createRecorderProcess Calling logoff.exe 7
16-06-25 14:49:50.13 [6364] TRACE main.wtssessionchange User DOMAIN\cyberelements_user has no other session. Dropping network filter rules
16-06-25 14:49:50.13 [6364] TRACE main.wtssessionchange Session logoff or disconnect :7 event:6
16-06-25 14:49:50.379 [6364] TRACE main.wtssessionchange Session logoff or disconnect :7 event:4
Applying network filtering rules (lines 31 and 53-56)

For each session detected by the logging agent, the latter will determine whether it is necessary to apply network filtering rules to the user's session.

If no network filtering rules need to be applied, the recording agent will indicate Filter not enabled.

31
16-06-25 14:49:13.418 [6364] TRACE main.getNetFilterRulesInformation Filter not enabled

If network filtering rules need to be applied, the message Net filter enabled will appear.
Following this filter activation line, each of the applied filters is indicated, one per line:

53
54
55
56
16-06-25 14:49:40.404 [6364] TRACE main.createRecorderProcess Net filter enabled
16-06-25 14:49:40.426 [3948] TRACE CleanroomNetFilter.addRule User DOMAIN\cyberelements_user Remote address: 168427818 (10.10.1.42) Remote port: 443 Protocol condition: TCP
16-06-25 14:49:40.427 [3948] TRACE CleanroomNetFilter.addRule User DOMAIN\cyberelements_user Remote address: 168432641 (10.10.20.1) Remote port: 53 Protocol condition: UDP
16-06-25 14:49:40.428 [6364] TRACE CleanroomNetFilter.addRule User DOMAIN\cyberelements_user Application: C:/Program Files (x86)/Systancia/Safe/IpdivaCareRecorder.exe Remote address: 168427791 (10.10.1.15) Remote port: 8443 Protocol condition: TCP

As a reminder, when network filtering is activated, the default behavior is to block all TCP/UDP traffic. Therefore, the filters indicated are the only TCP/UDP traffic authorized for programs running in the user's context.
In the example above, connections to TCP 10.10.1.42:443 and UDP 10.10.20.1:53 are allowed. In addition to these two flows authorized by the administrator, the connection flow to the recording service is also open to allow the session recording to be sent back by the program responsible for it.

Tip

If no flows are authorized for the user, only the lines indicating that filtering is active and that the recording process can contact the Edge Gateway recording service will be displayed.

Failed to connect to recording service

Several issues can cause the recording agent to be unable to connect to the recording service on an Edge Gateway.

The first is a network flow block. In this case, when the recording service attempts to connect to the recording service, it writes logs similar to these:

1
2
3
4
18-06-25 15:29:45.805 [2456] TRACE Socket.connect error during select or socket not writable, rc=0
18-06-25 15:29:45.805 [2456] TRACE Socket.raise error not registered: 0
18-06-25 15:29:45.809 [2456] ERROR main.getDirectRecordInformation Could not connect to gateway my-edge-gateway.domain.local Exception :ESocket:errors.cpp:242
18-06-25 15:29:45.809 [2456] ERROR main.getDirectRecordInformation No gateway available

In this example, line 1 indicates that the flow could not be initiated, while line 3 specifies the Edge Gateway concerned and the connection failure (note also the number 242 at the end of line 3 for this type of problem).

The second problem that may be encountered is the inability of the recording agent, and by extension the RDP server, to resolve the name of the Edge Gateway:

1
2
3
18-06-25 15:37:07.539 [2456] ERROR Socket.DNSLookup getaddrinfo() Hôte inconnu. 
18-06-25 15:37:07.539 [2456] ERROR main.getNetFilterRulesInformation Could not retrieve netfilter rule with gateway wrong-dns-edge-gateway.domain.local Exception :ESocketLookupFailed:socket2.cpp:232
18-06-25 15:37:07.539 [2456] ERROR main.getNetFilterRulesInformation The gateway may need an upgrade

In this example, line 1 confirms the DNS resolution problem with the name of the Edge Gateway.
The second line specifies the connection failure and the name of the Edge Gateway. Note that the line ends with the number 232 when there is a DNS resolution failure.

The third problem that may occur is a connection to a service that is not a recording service, for example, a web server listening on port 8443. In this case, the following logs are obtained:

1
2
3
18-06-25 15:38:33.607 [2456] TRACE IO.read problem when read data
18-06-25 15:38:33.608 [2456] ERROR main.getNetFilterRulesInformation Could not retrieve netfilter rule with gateway wrong-server.domain.local Exception :IOException:io.cpp:140
18-06-25 15:38:33.608 [2456] ERROR main.getNetFilterRulesInformation The gateway may need an upgrade

Line 1 indicates a fault with the exchanged data, line 2 confirms the connection problem and specifies error 140 at the end of the line.

No direct access contract allows direct session recording to be triggered.

During direct access, not all users are necessarily required to be logged in. If this is the case, we find the following logs:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
16-06-25 14:49:38.964 [6364] TRACE main.wtssessionchange Session logon or connect :7 event:3
16-06-25 14:49:38.965 [6364] TRACE main.wtssessionchange
16-06-25 14:49:40.75 [6364] TRACE main.wtssessionchange Session logon or connect :7 event:5
16-06-25 14:49:40.76 [6364] TRACE main.wtssessionchange cyberelements_user
16-06-25 14:49:40.178 [6364] TRACE wtssessionchange.wtssessionchange WTSVirtualChannelOpenEx failure.31 Not a Cleanroom session, or the client has no support for the clr virtual channel
16-06-25 14:49:40.179 [6364] TRACE main.wtssessionchange prog :
16-06-25 14:49:40.185 [6364] TRACE main.createRecorderProcess User groups :DOMAIN\Utilisateurs du domaine domain.local\Utilisateurs du domaine \Tout le monde domain.local\Tout le monde BUILTIN\Utilisateurs BUILTIN\Utilisateurs du Bureau à distance AUTORITE NT\REMOTE INTERACTIVE LOGON AUTORITE NT\INTERACTIF AUTORITE NT\Utilisateurs authentifiés domain.local\LOCAL DOMAIN\cyberelements_users domain.local\cyberelements_users 
16-06-25 14:49:40.186 [6364] TRACE getDirectRecordInformation.getDirectRecordInformation gateways: my-edge-gateway.domain.local
16-06-25 14:49:40.199 [6364] TRACE SecChannelClient.ClientCreateCredentials looking for a certificate with name containing:my-rds-server
16-06-25 14:49:40.199 [6364] TRACE SecChannelClient.ClientCreateCredentials looking for a certificate with name containing:my-rds-server.domain.local in the local machine store
16-06-25 14:49:40.201 [6364] TRACE SecChannelClient.ClientCreateCredentials certificate subject:C=FR, S=Grand-Est, L=Sausheim, O=Systancia, CN=my-rds-server.domain.local
16-06-25 14:49:40.201 [6364] TRACE SecChannelClient.ClientCreateCredentials certificate issuer:C=FR, S=Grand-Est, L=Sausheim, O=Systancia, CN=SUB-CA
16-06-25 14:49:40.404 [6364] TRACE Socket.incrCounters 0 UDP, 0 TCP, 1 Objs
16-06-25 14:49:40.406 [6364] TRACE main.createRecorderProcess no need to record

The logs obtained begin like all direct sessions captured by the recording agent. However, once the connection to the Edge Gateway recording service is established, the latter returns information to the recording agent indicating that the user who connected is not subject to recording.
The recording agent therefore indicates that there is no need to record the user's session (line 14 of the example above).

Line 7 lists all the groups retrieved by the recording agent for the user who connected.
This information allows you to determine the reasons why direct access recordings are not triggered: if the direct access contract does not authorize one of the user's groups, or if the domain name specified must be the short name (netBIOS name) or the full name.