Boot viruses infect the boot sector of floppy disks or hard disks, replacing the boot program and loading when the computer boots. Program viruses infect executable files and load when those programs run, infecting other files. Hybrid viruses combine these methods by infecting programs and then the boot sector, infecting files during booting and program execution. Polymorphic viruses encrypt their code differently with each infection to avoid detection. Macro viruses infect documents by inserting macros in the Normal template, infecting other documents opened from that template. ActiveX and Java controls pose security risks by allowing unauthorized access unless web browsers are properly configured.