def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("OriginalFileName", default="")
                    in ["PingCastleReporting.exe", "PingCastleCloud.exe", "PingCastle.exe"],
                    any(
                        [
                            "--scanner aclcheck" in event.deep_get("CommandLine", default=""),
                            "--scanner antivirus" in event.deep_get("CommandLine", default=""),
                            "--scanner computerversion"
                            in event.deep_get("CommandLine", default=""),
                            "--scanner foreignusers" in event.deep_get("CommandLine", default=""),
                            "--scanner laps_bitlocker" in event.deep_get("CommandLine", default=""),
                            "--scanner localadmin" in event.deep_get("CommandLine", default=""),
                            "--scanner nullsession" in event.deep_get("CommandLine", default=""),
                            "--scanner nullsession-trust"
                            in event.deep_get("CommandLine", default=""),
                            "--scanner oxidbindings" in event.deep_get("CommandLine", default=""),
                            "--scanner remote" in event.deep_get("CommandLine", default=""),
                            "--scanner share" in event.deep_get("CommandLine", default=""),
                            "--scanner smb" in event.deep_get("CommandLine", default=""),
                            "--scanner smb3querynetwork"
                            in event.deep_get("CommandLine", default=""),
                            "--scanner spooler" in event.deep_get("CommandLine", default=""),
                            "--scanner startup" in event.deep_get("CommandLine", default=""),
                            "--scanner zerologon" in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                    "--no-enum-limit" in event.deep_get("CommandLine", default=""),
                    all(
                        [
                            "--healthcheck" in event.deep_get("CommandLine", default=""),
                            "--level Full" in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                    all(
                        [
                            "--healthcheck" in event.deep_get("CommandLine", default=""),
                            "--server " in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                ]
            ),
            not any(
                [
                    event.deep_get("Image", default="").endswith("\\PingCastleReporting.exe"),
                    event.deep_get("Image", default="").endswith("\\PingCastleCloud.exe"),
                    event.deep_get("Image", default="").endswith("\\PingCastle.exe"),
                ]
            ),
        ]
    ):
        return True
    return False
