def rule(event):
    if any(
        [
            any(
                [
                    any(
                        [
                            all(
                                [
                                    ":\\Users\\" in event.deep_get("Image", default=""),
                                    "\\AppData\\Local\\packages\\KaliLinux"
                                    in event.deep_get("Image", default=""),
                                ]
                            ),
                            all(
                                [
                                    ":\\Users\\" in event.deep_get("Image", default=""),
                                    "\\AppData\\Local\\Microsoft\\WindowsApps\\kali.exe"
                                    in event.deep_get("Image", default=""),
                                ]
                            ),
                        ]
                    ),
                    all(
                        [
                            ":\\Program Files\\WindowsApps\\KaliLinux."
                            in event.deep_get("Image", default=""),
                            event.deep_get("Image", default="").endswith("\\kali.exe"),
                        ]
                    ),
                ]
            ),
            all(
                [
                    any(
                        [
                            event.deep_get("ParentImage", default="").endswith("\\wsl.exe"),
                            event.deep_get("ParentImage", default="").endswith("\\wslhost.exe"),
                        ]
                    ),
                    any(
                        [
                            any(
                                [
                                    "\\kali.exe" in event.deep_get("Image", default=""),
                                    "\\KaliLinux" in event.deep_get("Image", default=""),
                                ]
                            ),
                            any(
                                [
                                    "Kali.exe" in event.deep_get("CommandLine", default=""),
                                    "Kali-linux" in event.deep_get("CommandLine", default=""),
                                    "kalilinux" in event.deep_get("CommandLine", default=""),
                                ]
                            ),
                        ]
                    ),
                    not any(
                        [
                            " -i " in event.deep_get("CommandLine", default=""),
                            " --install " in event.deep_get("CommandLine", default=""),
                            " --unregister " in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
