def rule(event):
    if all(
        [
            event.deep_get("FileName", default="").endswith("\\Microsoft\\Protect\\CREDHIST"),
            not any(
                [
                    any(
                        [
                            event.deep_get("Image", default="").startswith("C:\\Program Files\\"),
                            event.deep_get("Image", default="").startswith(
                                "C:\\Program Files (x86)\\"
                            ),
                            event.deep_get("Image", default="").startswith(
                                "C:\\Windows\\system32\\"
                            ),
                            event.deep_get("Image", default="").startswith(
                                "C:\\Windows\\SysWOW64\\"
                            ),
                        ]
                    ),
                    event.deep_get("Image", default="") == "C:\\Windows\\explorer.exe",
                ]
            ),
        ]
    ):
        return True
    return False
