def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("Image", default="").endswith("\\MSBuild.exe"),
                    event.deep_get("OriginalFileName", default="") == "MSBuild.exe",
                ]
            ),
            not any(
                [
                    event.deep_get("ParentImage", default="").endswith("\\devenv.exe"),
                    event.deep_get("ParentImage", default="").endswith("\\cmd.exe"),
                    event.deep_get("ParentImage", default="").endswith("\\msbuild.exe"),
                    event.deep_get("ParentImage", default="").endswith("\\python.exe"),
                    event.deep_get("ParentImage", default="").endswith("\\explorer.exe"),
                    event.deep_get("ParentImage", default="").endswith("\\nuget.exe"),
                ]
            ),
        ]
    ):
        return True
    return False
