TechWeb

When Web Servers Attack

Aug 30, 2007 (06:08 AM EDT)

Read the Original Article at http://www.informationweek.com/news/showArticle.jhtml?articleID=208803509


6:00 AM -- Web technology has added lots of complexity to security. Aside from issues of design, secure coding, and protecting user information, Web technology gives rise to a number of new threats. One such threat is using the Web server as a proxy to hack other devices on the same network.

Using one machine to scan or attack another isn't a new concept. For instance, take the concept of idle scan, which uses one machine to do reconnaissance on a target using TCP sequencing.

Just this week, I published a paper on a new attack that takes place via a Web server running in a DMZ. That DMZ may have many machines sitting in it -- development machines, database machines, staging machines, QA machines, customer machines, and others -- connected by the same network. In many cases, this is the most important part of the network to penetrate, because often, this is where all of the most important corporate assets live.

DMZs often are improperly built, allowing any machine on the network to connect out to the world. This configuration makes patch management and software downloading easy, but it also opens up those devices to attack.

Because the Web server and the other devices coexist on a common LAN in the DMZ, we can use the Web server to attack the other devices. For example, we can employ image-uploading scripts that pull content from the Internet.

Figure 1:

In this example, instead of requesting something on the Internet, we request something from the intranet -- or the same LAN that the DMZ lives on. Because the request doesn't actually have to be an image, we can ask the Web server to perform PHP remote file includes, command injection, or injection of an xp_cmdshell via SQL injection.

Once the Web server attacks the other machine on the same network, that machine can connect back out to the Internet and make a connection with the attacker. The attacker now has the ability to execute any command he wants on a server in the DMZ.

Although this situation is not common, it exemplifies one of the security oddities presented by modern Web design, which is sometimes done without an understanding of good network design. Simple egress filtering at the firewall -- or insuring the software you use to download images does not allow connections to internal address spaces -- could fix this issue.

The real question is: How many people will take the initiative and fix these vulnerabilities before the bad guys find them?

— RSnake is a red-blooded lumberjack whose rants can also be found at Ha.ckers and F*the.net. Special to Dark Reading