Potential Remote Desktop Protocol Tunneling
Description
Identifies remote interactive logon attempt with from the localhost as a source address. This may indicate the initiation of a Remote Desktop Tunneling session.
Query · eql
sequence with maxspan=2m
[api where process.Ext.api.name == "connect" and process.Ext.api.summary like "connect( ipv4, tcp, 127.0.*, 3389 )" and
not (process.code_signature.trusted == true and process.code_signature.subject_name in ("UiPath, Inc.", "Automation Anywhere, Inc.", "Google LLC", "Tanium Inc.",
"Mozilla Corporation", "Nmap Software LLC", "N-ABLE TECHNOLOGIES LTD", "Connectwise, LLC", "Datto, LLC", "Zabbix SIA", "d.velop AG",
"ESET, spol. s r.o.", "NoMachine S.a.r.l.", "Check Point Software Technologies Ltd.", "Amazon.com Services LLC", "Ericom Software Ltd",
"ZABBIX, Sabiedriba ar ierobezotu atbildibu", "Intuit Inc", "TYCHON, LLC", "Siber Systems", "Axeda Corporation", "Kaseya Holdings Inc.",
"OpsRamp, Inc.", "Paessler GmbH", "Ecosia GmbH")) and
process.thread.Ext.call_stack_final_user_module.name != "Kernel" and process.executable != null and
not _arraysearch(process.thread.Ext.call_stack_final_user_module.code_signature, $entry, $entry.trusted == true) and
not process.thread.Ext.call_stack_final_user_module.path like
("c:\\windows\\assembly\\nativeimages_*.ni.dll",
"c:\\program files\\*", "c:\\program files (x86)\\*") and
not process.thread.Ext.call_stack_final_user_module.name in ("Undetermined", "Unknown") and
not process.executable :
("C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe",
"C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe",
"C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe",
"C:\\Program Files (x86)\\N-able Technologies\\Windows Agent\\bin\\agent.exe",
"C:\\Program Files\\Tenable\\Nessus Agent\\nessus-agent-module.exe",
"C:\\Program Files\\Intuit\\QuickBooks Enterprise Solutions *\\CefSharp.BrowserSubprocess.exe",
"C:\\Program Files\\WindowsApps\\DuckDuckGo.DesktopBrowser_*\\WindowsBrowser\\WebView2\\msedgewebview2.exe",
"C:\\Windows\\LTSvc\\LTSVC.exe") and
not (process.name : "powershell.exe" and
process.parent.executable : ("C:\\Program Files\\Tychon\\TychonEngine.exe",
"C:\\Program Files\\Windows Defender Advanced Threat Protection\\SenseIR.exe",
"C:\\ProgramData\\Microsoft\\Windows Defender Advanced Threat Protection\\Platform\\*\\SenseIR.exe"))
]
[authentication where event.action == "log_on" and
process.Ext.session_info.logon_type in ("RemoteInteractive", "Network") and cidrmatch(source.ip, "127.0.0.0/8", "::1")]