def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("ParentImage", default="").endswith("\\Sysmon.exe"),
                    event.deep_get("ParentImage", default="").endswith("\\Sysmon64.exe"),
                ]
            ),
            not any(
                [
                    all(
                        [
                            event.deep_get("Image", default="").startswith("C:\\Users\\"),
                            "\\AppData\\Local\\Temp\\" in event.deep_get("Image", default=""),
                            any(
                                [
                                    event.deep_get("Image", default="").endswith("\\Sysmon.exe"),
                                    event.deep_get("Image", default="").endswith("\\Sysmon64.exe"),
                                ]
                            ),
                        ]
                    ),
                    any(
                        [
                            ":\\Windows\\Sysmon.exe" in event.deep_get("Image", default=""),
                            ":\\Windows\\Sysmon64.exe" in event.deep_get("Image", default=""),
                            ":\\Windows\\System32\\conhost.exe"
                            in event.deep_get("Image", default=""),
                            ":\\Windows\\System32\\WerFault.exe"
                            in event.deep_get("Image", default=""),
                            ":\\Windows\\System32\\WerFaultSecure.exe"
                            in event.deep_get("Image", default=""),
                            ":\\Windows\\System32\\wevtutil.exe"
                            in event.deep_get("Image", default=""),
                            ":\\Windows\\SysWOW64\\wevtutil.exe"
                            in event.deep_get("Image", default=""),
                        ]
                    ),
                    event.deep_get("Image", default="") == "",
                ]
            ),
        ]
    ):
        return True
    return False
