def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("Image", default="").endswith("\\mstsc.exe"),
                    event.deep_get("OriginalFileName", default="") == "mstsc.exe",
                ]
            ),
            any(
                [
                    event.deep_get("CommandLine", default="").endswith(".rdp"),
                    event.deep_get("CommandLine", default="").endswith('.rdp"'),
                ]
            ),
            any(
                [
                    ":\\Users\\Public\\" in event.deep_get("CommandLine", default=""),
                    ":\\Windows\\System32\\spool\\drivers\\color"
                    in event.deep_get("CommandLine", default=""),
                    ":\\Windows\\System32\\Tasks_Migrated "
                    in event.deep_get("CommandLine", default=""),
                    ":\\Windows\\Tasks\\" in event.deep_get("CommandLine", default=""),
                    ":\\Windows\\Temp\\" in event.deep_get("CommandLine", default=""),
                    ":\\Windows\\Tracing\\" in event.deep_get("CommandLine", default=""),
                    "\\AppData\\Local\\Temp\\" in event.deep_get("CommandLine", default=""),
                    "\\Downloads\\" in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
