{"id":"a85ffc3a-e8fd-4040-93bf-78aff284d801","title":"Use Of The SFTP.EXE Binary As A LOLBIN","description":"Detects the usage of the \"sftp.exe\" binary as a LOLBIN by abusing the \"-D\" flag","author":"Nasreddine Bencherchali (Nextron Systems)","status":"test","level":"medium","date":"2022-11-10","modified":"","tags":["attack.execution","attack.stealth","attack.t1218"],"technique_ids":["T1218"],"logsource":{"category":"process_creation","product":"windows"},"falsepositives":["Unknown"],"references":["https://github.com/LOLBAS-Project/LOLBAS/pull/264"],"source_path":"rules/windows/process_creation/proc_creation_win_lolbin_sftp.yml","source_sha256":"8588ffb75e54c683a4d3540de8d41654a226d932dd3da8ffab0c39dcb91aa512","source_url":"https://github.com/anpa1200/sigma/blob/b249e9683190cffdcaf188ccbfb90bf4759844e1/rules/windows/process_creation/proc_creation_win_lolbin_sftp.yml","license":"Detection Rule License 1.1","license_url":"https://github.com/SigmaHQ/Detection-Rule-License/blob/main/LICENSE.Detection.Rules.md","yaml":"title: Use Of The SFTP.EXE Binary As A LOLBIN\nid: a85ffc3a-e8fd-4040-93bf-78aff284d801\nstatus: test\ndescription: Detects the usage of the \"sftp.exe\" binary as a LOLBIN by abusing the \"-D\" flag\nreferences:\n    - https://github.com/LOLBAS-Project/LOLBAS/pull/264\nauthor: Nasreddine Bencherchali (Nextron Systems)\ndate: 2022-11-10\ntags:\n    - attack.execution\n    - attack.stealth\n    - attack.t1218\nlogsource:\n    category: process_creation\n    product: windows\ndetection:\n    selection:\n        Image|endswith: '\\sftp.exe' # The \"sftp.exe\" located in the OpenSSH directory has no OriginalFileName :(\n        CommandLine|contains:\n            # Since \"-D\" is a valid flag for other usage we assume the user is going to enter a path\n            # Either a full one like \"C:\\Windows\\System32\\calc.exe\" or a relative one \"..\\..\\..\\Windows\\System32\\calc.exe\"\n            # In my testing you can't execute direct binaries by their name via this method (if you found a way please update the rule)\n            - ' -D ..'\n            - ' -D C:\\'\n    condition: selection\nfalsepositives:\n    - Unknown\nlevel: medium\n","validation":"yaml_parsed_not_backend_compiled_or_live_validated","techniques":[{"key":"enterprise/T1218","id":"T1218","name":"System Binary Proxy Execution","page":"techniques/enterprise/T1218/"}],"data_path":"data/detection-rules/a85ffc3a-e8fd-4040-93bf-78aff284d801.json","kind":"sigma"}
