Disclosed is a terminal device. The terminal device includes: a communication interface comprising communication circuitry, a memory configured to store at least one command, and a processor, connected to the communication interface and the memory and configured to control the terminal device, the processor, by executing the at least one command, is further configured to: based on receiving, from an external server, sequence information of a plurality of attack words and a system call pattern associated with the sequence information, store the received sequence information and the received system call pattern in the memory, compare a system call command sequentially generated in the terminal device with the stored sequence information and the stored system call pattern, perform a security operation based on the comparison, and the sequence information of the plurality of attack words and the system call pattern associated with the sequence information may be generated by an external server, based on each of the plurality of attack words being identified from target information as occurring by a predetermined number or more.