def rule(event):
    if all(
        [
            any(
                [
                    any(
                        [
                            event.deep_get("Image", default="").endswith("\\cscript.exe"),
                            event.deep_get("Image", default="").endswith("\\mshta.exe"),
                            event.deep_get("Image", default="").endswith("\\regsvr32.exe"),
                            event.deep_get("Image", default="").endswith("\\rundll32.exe"),
                            event.deep_get("Image", default="").endswith("\\wscript.exe"),
                        ]
                    ),
                    any(
                        [
                            event.deep_get("ParentImage", default="").endswith("\\cscript.exe"),
                            event.deep_get("ParentImage", default="").endswith("\\mshta.exe"),
                            event.deep_get("ParentImage", default="").endswith("\\regsvr32.exe"),
                            event.deep_get("ParentImage", default="").endswith("\\rundll32.exe"),
                            event.deep_get("ParentImage", default="").endswith("\\wscript.exe"),
                        ]
                    ),
                ]
            ),
            any(
                [
                    event.deep_get("TargetFilename", default="").endswith(".docm"),
                    event.deep_get("TargetFilename", default="").endswith(".dotm"),
                    event.deep_get("TargetFilename", default="").endswith(".xlsm"),
                    event.deep_get("TargetFilename", default="").endswith(".xltm"),
                    event.deep_get("TargetFilename", default="").endswith(".potm"),
                    event.deep_get("TargetFilename", default="").endswith(".pptm"),
                ]
            ),
        ]
    ):
        return True
    return False
