19.09.2017 Views

the-web-application-hackers-handbook

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 13 n Attacking Users: O<strong>the</strong>r Techniques 565<br />

NOTE Despite <strong>the</strong> restrictions imposed by <strong>the</strong> same-origin policy, various<br />

techniques can be used in this situation to allow two-way asynchronous interaction<br />

with <strong>the</strong> attacker’s server from a script that has been injected into a target<br />

<strong>application</strong>. One simple method is to perform dynamic cross-domain script<br />

includes to <strong>the</strong> attacker’s domain. These requests can both transmit captured<br />

data back to <strong>the</strong> attacker (within <strong>the</strong> URL query string) and receive instructions<br />

about actions that should be performed (within <strong>the</strong> returned script code).<br />

Here are some actions that may be carried out within this type of framework:<br />

n Logging keystrokes and sending <strong>the</strong>se to <strong>the</strong> attacker<br />

n Hijacking <strong>the</strong> user’s session with <strong>the</strong> vulnerable <strong>application</strong><br />

n Fingerprinting <strong>the</strong> victim’s browser and exploiting known browser vulnerabilities<br />

accordingly<br />

n Performing port scans of o<strong>the</strong>r hosts (which may be on a private network<br />

accessible by <strong>the</strong> compromised user browser) and sending <strong>the</strong> results to<br />

<strong>the</strong> attacker<br />

n Attacking o<strong>the</strong>r <strong>web</strong> <strong>application</strong>s accessible via <strong>the</strong> compromised user’s<br />

browser by forcing <strong>the</strong> browser to send malicious requests<br />

n Brute-forcing <strong>the</strong> user’s browsing history and sending this to <strong>the</strong> attacker<br />

One example of a sophisticated browser exploitation framework is BeEF,<br />

developed by Wade Alcon, which implements <strong>the</strong> functionality just described.<br />

Figure 13-8 shows BeEF capturing information from a compromised user,<br />

including computer details, <strong>the</strong> URL and page content currently displayed, and<br />

keystrokes entered by <strong>the</strong> user.<br />

Figure 13-8: Data captured from a compromised user by BeEF

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!