Apply New Security Controls to the Set of Attack Services for Which There Isn't Sufficient Mitigation
We’ve already examined cross-site request forgery protection: An unpredictable nonce will have to be sent with each authenticated and authorized page. That is the recommended treatment; in this case, attack to mitigation is 1-to-1.
Table 5.6 adds defenses to each of the attack methods that we enumerated in previous ATASM steps. These are the five attacks and their associated attack surfaces (the CAVs) that we believe are applicable to this system, in this organizational context. Table 5.5 summarized attack surfaces with applied attack methods.
Table 5.6 Attacks and Controls
Specific Attack |
Attack Surface |
System Objective(s) |
Control |
SQL and LDAP injection |
Applications via HTTP |
|
|
Table 5.6 Attacks and Controls (Continued)
Specific Attack |
Attack Surface |
System Objective(s) |
Control |
Cross-Site Scripting (XSS) |
Web server and applications via HTTP |
|
|
(exposed) Direct Object References |
HTTP responses from applications and application server |
manipulate . . . references to access unauthorized data |
|
Cross-Site Request Forgery (CSRF) |
Application server via HTTP (in this case, AppMaker) |
. . . legitimate requests from the victim |
Include a nonpredictable nonce in the response to a successful user authentication. Return the nonce for the session with every authenticated response in a hidden field. Before processing an authenticated request, validate the nonce from the user's session |
Unvalidated Redirects and Forwards |
Web server and applications via HTTP Possibly also the application server |
|
|
SQL = Structured Query Language; LDAP = Lightweight Directory Access Protocol.
Source: Data set in italics is from the Open Web Application Security Project (OWASP) (2013). OWASP Top 10 List.6
Some of the defenses are programming requirements. For instance, rewriting errors that will be returned to users in plain language easily understood by users and not containing any programming information is something that will have to be programmed into the applications. Likewise, input validation, which is required to prevent the two injection errors, must be done within code.
Contrast the coding defenses with not using an object referencing or serialization protocol (RMI) to prevent direct code references from escaping to the user. This, like building nonces into responses or using no redirects or forwards, is a design issue. The applications making up the Web-Sock-A-Rama store will have to be designed such that redirects are unnecessary, such that appropriate protocols are used for any code that runs in the user’s browser.
Importantly, if you scan through the defenses listed in Table 5.6, you may notice that the usual panoply of security controls don’t appear as treatments. Firewalls aren’t listed. Intrusion prevention systems are not listed. The treatments given are specific to the attacks. That doesn’t mean that firewalls shouldn’t be deployed. They should be! In this step, we are hunting for those security controls or defenses that will interrupt each CAV such that we can significantly lower the probability of success for attackers (or eliminate it, if possible). For this reason, defenses tend to be specific and to the point. In the next step, we will build the entire security posture as a defense-in-depth.