def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("Image", default="").endswith("\\wsl.exe"),
                    event.deep_get("OriginalFileName", default="") == "wsl.exe",
                ]
            ),
            any(
                [
                    " -e " in event.deep_get("CommandLine", default=""),
                    " --exec" in event.deep_get("CommandLine", default=""),
                    " --system" in event.deep_get("CommandLine", default=""),
                    " --shell-type " in event.deep_get("CommandLine", default=""),
                    " /mnt/c" in event.deep_get("CommandLine", default=""),
                    " --user root" in event.deep_get("CommandLine", default=""),
                    " -u root" in event.deep_get("CommandLine", default=""),
                    "--debug-shell" in event.deep_get("CommandLine", default=""),
                ]
            ),
            not all(
                [
                    event.deep_get("ParentImage", default="").endswith("\\cmd.exe"),
                    " -d " in event.deep_get("CommandLine", default=""),
                    " -e kill " in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
