def rule(event):
    if all(
        [
            "\\Microsoft\\Windows\\CurrentVersion\\WINEVT\\Channels\\"
            in event.deep_get("TargetObject", default=""),
            event.deep_get("TargetObject", default="").endswith("\\ChannelAccess"),
            any(
                [
                    "(A;;0x1;;;LA)" in event.deep_get("Details", default=""),
                    "(A;;0x1;;;SY)" in event.deep_get("Details", default=""),
                    "(A;;0x5;;;BA)" in event.deep_get("Details", default=""),
                ]
            ),
            not any(
                [
                    event.deep_get("Image", default="")
                    == "C:\\Windows\\servicing\\TrustedInstaller.exe",
                    all(
                        [
                            event.deep_get("Image", default="").startswith("C:\\Windows\\WinSxS\\"),
                            event.deep_get("Image", default="").endswith("\\TiWorker.exe"),
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
