Prev | Current Page 188 | Next

Rich Cannings, Himanshu Dwivedi, Zane Lackey, and Alex Stamos

"Hacking Exposed Web 2.0: Web 2.0 Security Secrets and Solutions"


Regardless of which way the scan is conducted, the first step in a JavaScript portscan is
determining which hosts are up on the internal network. While this was traditionally
performed by pinging hosts with Internet Control Message Protocol (ICMP), in the
browser it is accomplished by using HTML elements. By using an HTML tag
pointing at sequential IP addresses on the network and the JavaScript onload and
onerror functions, malicious JavaScript inside the browser can determine which hosts
on the internal network are reachable and which are not. Once the available hosts are
enumerated, actual portscanning of the hosts can begin. Scanning for internal web
servers (TCP port 80) is the simplest exercise, as it can be completed by using the HTML