def rule(event):
    if all(
        [
            event.deep_get("ParentImage", default="").endswith("\\sqlservr.exe"),
            any(
                [
                    event.deep_get("Image", default="").endswith("\\bash.exe"),
                    event.deep_get("Image", default="").endswith("\\bitsadmin.exe"),
                    event.deep_get("Image", default="").endswith("\\cmd.exe"),
                    event.deep_get("Image", default="").endswith("\\netstat.exe"),
                    event.deep_get("Image", default="").endswith("\\nltest.exe"),
                    event.deep_get("Image", default="").endswith("\\ping.exe"),
                    event.deep_get("Image", default="").endswith("\\powershell.exe"),
                    event.deep_get("Image", default="").endswith("\\pwsh.exe"),
                    event.deep_get("Image", default="").endswith("\\regsvr32.exe"),
                    event.deep_get("Image", default="").endswith("\\rundll32.exe"),
                    event.deep_get("Image", default="").endswith("\\sh.exe"),
                    event.deep_get("Image", default="").endswith("\\systeminfo.exe"),
                    event.deep_get("Image", default="").endswith("\\tasklist.exe"),
                    event.deep_get("Image", default="").endswith("\\wsl.exe"),
                ]
            ),
            not all(
                [
                    event.deep_get("ParentImage", default="").startswith(
                        "C:\\Program Files\\Microsoft SQL Server\\"
                    ),
                    event.deep_get("ParentImage", default="").endswith(
                        "DATEV_DBENGINE\\MSSQL\\Binn\\sqlservr.exe"
                    ),
                    event.deep_get("Image", default="") == "C:\\Windows\\System32\\cmd.exe",
                    event.deep_get("CommandLine", default="").startswith(
                        '"C:\\Windows\\system32\\cmd.exe" '
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
