Detectionmediumtest

Perl Inline Command Execution

Detects execution of perl using the "-e"/"-E" flags. This is could be used as a way to launch a reverse shell or execute live perl code.

Open in Detection LabConvert ruleBuild Package
Nasreddine BencherchaliCreated 2023-01-02f426547a-e0f7-441a-b63e-854ac5bdf54dwindows
Log Source
WindowsProcess Creation
ProductWindows← raw: windows
CategoryProcess Creation← raw: process_creation

Events generated when a new process is spawned on the system. Covers command-line arguments, parent/child relationships, and process metadata.

Detection Logic
Detection Logic2 selectors
detection:
    selection_img:
        - Image|endswith: '\perl.exe'
        - OriginalFileName: 'perl.exe' # Also covers perlX.XX.exe
    selection_cli:
        CommandLine|contains: ' -e'
    condition: all of selection_*
False Positives
Unknown

False positive likelihood has not been assessed. Additional context may be needed during triage.

Rule Metadata
Rule ID
f426547a-e0f7-441a-b63e-854ac5bdf54d
Status
test
Level
medium
Type
Detection
Created
2023-01-02
Path
rules/windows/process_creation/proc_creation_win_perl_inline_command_execution.yml
Raw Tags
attack.executionattack.t1059
View on GitHub