Now even telephones come with antivirus software.

Programs that flag viruses and keep out intruders have been fixtures for decades on desktop computers. On Wednesday, Samsung Electronics Co., the world's largest smartphone maker by sales, is expected to announce that it will install security software from Lookout Inc. on all new phones running Android software from Google Inc. and a security suite called "Knox."

Behind...