import re


def rule(event):
    if re.match(
        r"cmd.{0,5}(?:/c|/r).+powershell.+(?:\\$\\{?input\\}?|noexit).+\"",
        event.deep_get("Payload", default=""),
    ):
        return True
    return False
