A method of controlling a mobile terminal, the method comprising: detecting an attempt to set a short-range communication mode of the mobile terminal without input from a user; shutting down the detected attempt to set a short-range communication mode; saving, in a quarantine area, a file corresponding to the attempt to set the short-range communication mode; detecting an attempt to switch from one operating mode to another operating mode without a user's permission; shutting down the detected attempt to switch from one operating mode to another operating mode; saving, in the quarantine area, a file corresponding to the attempt to switch from one operating mode to another operating mode; detecting that more than a predetermined number of messages are being generated at the mobile terminal; blocking transmission of messages from the mobile terminal when more than the predetermined number of messages are detected; saving, in the quarantine area, a file responsible for the messages being generated; performing a virus scan on a plurality of files saved in the quarantine area; classifying the saved plurality of files into one of a safe file, an infection-suspicious file or an infected file based on a result of the performing of the virus scan; displaying a plurality of icons corresponding to the saved plurality of files in a quarantine display window, the plurality of icons being classified into three types of icons according to a type of the saved plurality of files; and executing a predetermined operation according to a type of a file corresponding to a touched and dragged icon when one of the plurality of icons is touched and dragged out of the quarantine display window, wherein executing the predetermined operation comprises: executing a safe file when an icon corresponding to the safe file is touched and dragged out of the quarantine display window, displaying a message regarding whether to execute the infection-suspicious file when an icon corresponding to an infection-suspicious file is touched and dragged out of the quarantine display window, and displaying a message regarding whether to delete the infected file when an icon corresponding to an infected file is touched and dragged out of the quarantine display window. detecting an attempt to set a short-range communication mode of the mobile terminal without input from a user; shutting down the detected attempt to set a short-range communication mode; saving, in a quarantine area, a file corresponding to the attempt to set the short-range communication mode; detecting an attempt to switch from one operating mode to another operating mode without a user's permission; shutting down the detected attempt to switch from one operating mode to another operating mode; saving, in the quarantine area, a file corresponding to the attempt to switch from one operating mode to another operating mode; detecting that more than a predetermined number of messages are being generated at the mobile terminal; blocking transmission of messages from the mobile terminal when more than the predetermined number of messages are detected; saving, in the quarantine area, a file responsible for the messages being generated; performing a virus scan on a plurality of files saved in the quarantine area; classifying the saved plurality of files into one of a safe file, an infection-suspicious file or an infected file based on a result of the performing of the virus scan; displaying a plurality of icons corresponding to the saved plurality of files in a quarantine display window, the plurality of icons being classified into three types of icons according to a type of the saved plurality of files; and executing a predetermined operation according to a type of a file corresponding to a touched and dragged icon when one of the plurality of icons is touched and dragged out of the quarantine display window, wherein executing the predetermined operation comprises: executing a safe file when an icon corresponding to the safe file is touched and dragged out of the quarantine display window, displaying a message regarding whether to execute the infection-suspicious file when an icon corresponding to an infection-suspicious file is touched and dragged out of the quarantine display window, and displaying a message regarding whether to delete the infected file when an icon corresponding to an infected file is touched and dragged out of the quarantine display window.