def rule(event):
    if any(
        [
            all(
                [
                    "Select" in event.deep_get("CommandLine", default=""),
                    "Win32_NTLogEvent" in event.deep_get("CommandLine", default=""),
                ]
            ),
            all(
                [
                    any(
                        [
                            event.deep_get("Image", default="").endswith("\\wevtutil.exe"),
                            event.deep_get("OriginalFileName", default="") == "wevtutil.exe",
                        ]
                    ),
                    any(
                        [
                            " qe " in event.deep_get("CommandLine", default=""),
                            " query-events " in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                ]
            ),
            all(
                [
                    any(
                        [
                            event.deep_get("Image", default="").endswith("\\wmic.exe"),
                            event.deep_get("OriginalFileName", default="") == "wmic.exe",
                        ]
                    ),
                    " ntevent" in event.deep_get("CommandLine", default=""),
                ]
            ),
            any(
                [
                    "Get-WinEvent " in event.deep_get("CommandLine", default=""),
                    "get-eventlog " in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
