def rule(event):
    if all(
        [
            "\\Microsoft\\Windows NT\\CurrentVersion\\Ports"
            in event.deep_get("TargetObject", default=""),
            any(
                [
                    ".bat" in event.deep_get("Details", default=""),
                    ".com" in event.deep_get("Details", default=""),
                    ".dll" in event.deep_get("Details", default=""),
                    ".exe" in event.deep_get("Details", default=""),
                    ".ps1" in event.deep_get("Details", default=""),
                    ".vbe" in event.deep_get("Details", default=""),
                    ".vbs" in event.deep_get("Details", default=""),
                    "C:" in event.deep_get("Details", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
