Final answer:
Website defacement is the attack type where an attacker injects code to alter the appearance of a web page, typically to add images or change text. It is different from web cache poisoning, SSRF, and web-server misconfiguration, which are other security concerns.
Step-by-step explanation:
Among the given options, the type of attack where an attacker alters the visual appearance of a web page by injecting code is known as website defacement. This type of attack is specifically meant to change the visual representation of the site, often to spread a particular message or to vandalize the website. Defacement can involve adding image popups, changing text, or altering the site's layout. This is done by exploiting vulnerabilities in the web server or its underlying software.
Other types of attacks, like web cache poisoning and server-side request forgery (SSRF), involve different mechanisms. Web cache poisoning manipulates the web cache system to serve corrupted content to users, whereas SSRF tricks the server into executing unauthorized actions. Web-server misconfiguration can lead to a variety of security issues but is not an attack in itself; rather, it makes a site more vulnerable to attacks.