def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("Image", default="").endswith("\\w3wp.exe"),
                    event.deep_get("ParentImage", default="").endswith("\\w3wp.exe"),
                ]
            ),
            any(
                [
                    "&ipconfig&echo" in event.deep_get("CommandLine", default=""),
                    "&quser&echo" in event.deep_get("CommandLine", default=""),
                    "&whoami&echo" in event.deep_get("CommandLine", default=""),
                    "&c:&echo" in event.deep_get("CommandLine", default=""),
                    "&cd&echo" in event.deep_get("CommandLine", default=""),
                    "&dir&echo" in event.deep_get("CommandLine", default=""),
                    "&echo [E]" in event.deep_get("CommandLine", default=""),
                    "&echo [S]" in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
