A scheme for solving the security threat to mobile agent (MA) in malicious hosts was
proposed based on asymmetricalencryption. In the scheme, only can the hosts thatgetpermissions run
the codes ofMA, and data for exchanging are also encrypted. After returning to the source hos,t MA
checks the data ithas collected to ascertain if ithas been attacked. The security threats thatMA may
encounter inmalicioushostswere analyzed one by one, and each of them was solvedwith the proposed
scheme.