def rule(event):
    if all(
        [
            event.deep_get("ParentImage", default="").endswith("\\w3wp.exe"),
            any(
                [
                    "appcmd.exe add module" in event.deep_get("CommandLine", default=""),
                    all(
                        [
                            " system.enterpriseservices.internal.publish"
                            in event.deep_get("CommandLine", default=""),
                            event.deep_get("Image", default="").endswith("\\powershell.exe"),
                        ]
                    ),
                    all(
                        [
                            "gacutil" in event.deep_get("CommandLine", default=""),
                            " /I" in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
