[default] dispatch.earliest_time = -30d dispatch.latest_time = now [RDP Sensitive Settings Changed] description = Detects tampering of RDP Terminal Service/Server sensitive settings.Such as allowing unauthorized users access to a system via the 'fAllowUnsolicited' or enabling RDP via 'fDenyTSConnections', etc.Below is a list of registry keys/values that are monitored by this rule:- Shadow: Used to enable Remote Desktop shadowing, which allows an administrator to view or control a user's session.- DisableRemoteDesktopAntiAlias: Disables anti-aliasing for remote desktop sessions.- DisableSecuritySettings: Disables certain security settings for Remote Desktop connections.- fAllowUnsolicited: Allows unsolicited remote assistance offers.- fAllowUnsolicitedFullControl: Allows unsolicited remote assistance offers with full control.- InitialProgram: Specifies a program to run automatically when a user logs on to a remote computer.- ServiceDll: Used in RDP hijacking techniques to specify a custom DLL to be loaded by the Terminal Services service.- SecurityLayer: Specifies the security layer used for RDP connections. search = (((TargetObject IN ("*\\Control\\Terminal Server\\*", "*\\Windows NT\\Terminal Services\\*")) TargetObject="*\\Shadow" (Details IN ("DWORD (0x00000001)", "DWORD (0x00000002)", "DWORD (0x00000003)", "DWORD (0x00000004)"))) OR ((TargetObject IN ("*\\Control\\Terminal Server\\*", "*\\Windows NT\\Terminal Services\\*")) (TargetObject IN ("*\\DisableRemoteDesktopAntiAlias", "*\\DisableSecuritySettings", "*\\fAllowUnsolicited", "*\\fAllowUnsolicitedFullControl")) Details="DWORD (0x00000001)") OR TargetObject IN ("*\\Control\\Terminal Server\\InitialProgram*", "*\\Control\\Terminal Server\\WinStations\\RDP-Tcp\\InitialProgram*", "*\\Terminal Server\\WinStations\\RDP-Tcp\\SecurityLayer*", "*\\Windows NT\\Terminal Services\\InitialProgram*") OR TargetObject="*\\services\\TermService\\Parameters\\ServiceDll") NOT ((TargetObject="*\\SecurityLayer" Details="DWORD (0x00000002)") OR (TargetObject="*\\services\\TermService\\Parameters\\ServiceDll" (Details IN ("%%SystemRoot%%\\System32\\termsrv.dll", "%%SystemRoot%%\\SysWOW64\\termsrv.dll", "%%windir%%\\System32\\termsrv.dll", "%%windir%%\\SysWOW64\\termsrv.dll", "%SystemRoot%\\System32\\termsrv.dll", "%SystemRoot%\\SysWOW64\\termsrv.dll", "%windir%\\System32\\termsrv.dll", "%windir%\\SysWOW64\\termsrv.dll", "C:\\Windows\\System32\\termsrv.dll", "C:\\Windows\\SysWOW64\\termsrv.dll"))) OR ((TargetObject IN ("*\\Control\\Terminal Server\\InitialProgram*", "*\\Control\\Terminal Server\\WinStations\\RDP-Tcp\\InitialProgram*", "*\\Windows NT\\Terminal Services\\InitialProgram*")) (Details IN ("(Empty)", "")))) NOT ((Image IN ("C:\\Windows\\System32\\*", "C:\\Windows\\SysWOW64\\*", "C:\\Windows\\WinSxS\\*")) Image="*\\containerworker.exe" TargetObject="*\\Windows\\Containers\\Layers\\*")