def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("Image", default="").endswith("\\cmd.exe"),
                    event.deep_get("Image", default="").endswith("\\powershell.exe"),
                ]
            ),
            "[System/EventID=" in event.deep_get("CommandLine", default=""),
            "/create" in event.deep_get("CommandLine", default=""),
            "/delete" in event.deep_get("CommandLine", default=""),
            "/ec" in event.deep_get("CommandLine", default=""),
            "/so" in event.deep_get("CommandLine", default=""),
            "/tn run" in event.deep_get("CommandLine", default=""),
        ]
    ):
        return True
    return False
