1. A method of detecting a tampered application in an apparatus including a communication unit and a hardware controller, the method comprising: downloading, by the communication unit, an original package of an application, wherein the original package of the downloaded application is a package archive file comprising an execution code to be executed by at least one of a processor or a virtual machine; extracting and installing, by the hardware controller, the execution code from the downloaded original package of the application; re-extracting, by the hardware controller, the execution code from the original package of the application when an execution command of the application is received after the extracted execution code is installed; and comparing, by the hardware controller, the installed execution code with the re-extracted execution code for determining whether or not the installed execution code is tampered.