Spoofing is the first threat type (the ‘S’) in the STRIDE threat model that has been adopted by much of the application security community. A spoofing attack abuses an existing trust relationship between the target and an (legitimate) entity by falsifying data in the trusted entity’s name.
Due to the deception-focused nature of spoofing, its primary targets are the system’s legitimate users. Many attack patterns make use of social engineering techniques such as pharming or phishing – these are considered out of scope from a software security standpoint.
A common misunderstanding is confusing (or conflating) authentication and authorization and their relevant threats. In an authentication function, an entity can prove its identity in a verifiable manner. In an authorization function, the system decides on whether an entity has access to a particular resource or function. In STRIDE, the threat for authentication is Spoofing, and the threat for authorization is Elevation of Privilege.
As an aside, the difference in risk between Spoofing and Elevation of Privilege-type threats is reflected in the OWASP Top Ten: Broken Authentication is #2, while Broken Access Control is ‘only’ #5!

Unsurprisingly, all aspects of communication can be spoofed by an attacker. In most cases, the ultimate goal is to mislead, trick, or manipulate a legitimate user of the system. CAPEC defines the main types of spoofing as:
The user interface, in general, is an underestimated part of an application’s attack surface. Depending on how it’s implemented, there can be many ways it can be abused to trick or mislead the user. Some examples related to Unicode (see Unicode Technical Report #36) include bidirectional text spoofing which works by abusing control characters that set text direction, and script spoofing / homograph attacks which abuse identical-looking Unicode characters to confuse a user.
In general, the best way to protect against spoofing attacks is to put the systems in question (user authentication, data authenticity, file handling, UI) under heavy scrutiny and review.
Authentication functionality in particular should be reviewed – both on the design and code level – for potential weaknesses. Just as OWASP suggests, it is always a good idea to rely on multi-factor authentication just in case one of the factors becomes weak or vulnerable. Other spoofing attacks are enabled by vulnerabilities (CSRF, path traversal, insufficient data authenticity) that can be mitigated by fixing the core issue. On the UI level, the Unicode consortium itself has recommendations about mitigating visual Unicode-based spoofing.
Of course, many spoofing attacks have a social engineering aspect. To protect against it, users should be made aware of social engineering techniques via cyber awareness training. We discuss spoofing attacks and proper authentication methods to protect against them in all of our courses.