def rule(event):
    if all(
        [
            any(
                [
                    "\\Microsoft\\Teams\\Cookies" in event.deep_get("CommandLine", default=""),
                    "\\Microsoft\\Teams\\Local Storage\\leveldb"
                    in event.deep_get("CommandLine", default=""),
                ]
            ),
            not event.deep_get("Image", default="").endswith(
                "\\Microsoft\\Teams\\current\\Teams.exe"
            ),
        ]
    ):
        return True
    return False
