An application firewall actually examines the data in the packet, and can therefore look at application layer attacks (e.g. attackers manipulating the format of a packet) or even 'backdoor' attacks that might allow an attacker to gain access to sensitive data (e.g. session cookies, passwords, etc.) without the knowledge of the application provider. Most applications would be very well protected against this type of attack.

A more sophisticated attack can alter the data in the packet without knowing that the application has sent it; it can even simply read part of the data. For example, a malicious attacker could store the password in an application's random salt, and then read the last (or only) block of encrypted password data as the rest of the packets were decrypted. This type of attack can be done before the encryption of the data is complete.
These attacks have existed since at least 1995, but they have usually been limited to attacking the application layer, with applications designed for data interchange on the application layer (think: FTP, SMTP, SMR, HTTP) being especially vulnerable. The first well-known attack was on the TCP/IP protocol itself, where an attacker could configure his equipment to gain control over the TCP/IP stack in a large infrastructure. Another attack that led to encryption re-implementation at the application layer was the packet spoofing attack (spoofed packets). This attack targets the TCP/IP header, which is where the applications encrypt/decrypt the data packets. The attacker's equipment would intercept the information sent back and forth between client and server, and re-use the information that is the target of the attack.


