Cloud computing is the technology of forming a network of remote servers hosted on the Internet to manage process and store data. This technology has its own drawback from the security point of view. This research work aims to address the most recent attack called the man in the cloud attack and the possible solution to overcome it. The attack is tried to be defended at multilevel, so that we can protect our system to the at most level. The first level is to notify the user by detecting the phishing sites, through which the malware is sent into the user's system. At the second level, the user's token id is encrypted, so that the switching of credentials can be avoided.