import json
import re


def rule(event):
    if all(
        [
            re.match(r"^\\\\\\.*\\IPC$$", event.deep_get("path", default="")),
            not any(
                [
                    "samr" in json.dumps(event.to_dict()),
                    "lsarpc" in json.dumps(event.to_dict()),
                    "winreg" in json.dumps(event.to_dict()),
                    "netlogon" in json.dumps(event.to_dict()),
                    "srvsvc" in json.dumps(event.to_dict()),
                    "protected_storage" in json.dumps(event.to_dict()),
                    "wkssvc" in json.dumps(event.to_dict()),
                    "browser" in json.dumps(event.to_dict()),
                    "netdfs" in json.dumps(event.to_dict()),
                    "svcctl" in json.dumps(event.to_dict()),
                    "spoolss" in json.dumps(event.to_dict()),
                    "ntsvcs" in json.dumps(event.to_dict()),
                    "LSM_API_service" in json.dumps(event.to_dict()),
                    "HydraLsPipe" in json.dumps(event.to_dict()),
                    "TermSrv_API_service" in json.dumps(event.to_dict()),
                    "MsFteWds" in json.dumps(event.to_dict()),
                ]
            ),
        ]
    ):
        return True
    return False
