
title: Imports Registry Key From a File
author: Oddvar Moe, Sander Wiebing, oscd.community
date: 2020/10/07
description: Detects the import of the specified file to the registry with regedit.exe.
detection:
  SELECTION_1:
    EventID: 1
  SELECTION_2:
    Image: '*\regedit.exe'
  SELECTION_3:
    CommandLine:
    - '* /i *'
    - '*.reg*'
  SELECTION_4:
    CommandLine:
    - '* /e *'
    - '* /a *'
    - '* /c *'
  SELECTION_5:
    CommandLine|re: :[^ \\\\]
  condition: (SELECTION_1 and ((SELECTION_2 and SELECTION_3) and  not (SELECTION_4))
    and  not (SELECTION_5))
falsepositives:
- Legitimate import of keys
fields:
- ParentImage
- CommandLine
id: 73bba97f-a82d-42ce-b315-9182e76c57b1
level: medium
logsource:
  category: process_creation
  product: windows
references:
- https://github.com/LOLBAS-Project/LOLBAS/blob/master/yml/OSBinaries/Regedit.yml
- https://gist.github.com/api0cradle/cdd2d0d0ec9abb686f0e89306e277b8f
status: experimental
tags:
- attack.t1112
- attack.defense_evasion
ruletype: SIGMA
