
Consider the following five systems:
- A Web server
- A desktop system
- A “Next Gen” or Unified Threat Management (UTM) firewall
- A Network Based Intrusion Prevention System (NIPS)
- An isolated system only used to process Web server logs
Here’s the $42 question; if we assume the above network has an Internet connection, which of these systems are susceptible to remote attack (meaning over the wire from the Internet, not via direct access to the keyboard)?
Seriously, don’t just skim the question, give it some serious thought. Your answer is obviously going to have a direct impact on how you implement a security posture or assess network risk. Pretty major stuff.
Let’s talk about each system individually before we say exactly how many are vulnerable to remote attack. The Web server has at least TCP/80 exposed to the Internet. This provides a socket that a remote attacker can connect to in order to interact with code running on the Web server. Its this interaction with local code that makes the Web server susceptible to potential attack. Consider this the classic view of risk as we’ve known these system are vulnerable for many years.
So let’s talk about the desktop. While desktops usually do not have sockets exposed to access from the Internet, they do initiate communication sessions with remote servers. Java, ActiveX, etc. can be leveraged by those remote servers in order to interact with code running on the desktop itself (think Conficker and you’ll get the idea). So as it turns out the desktop is vulnerable as well because a remote system can interact with locally executing code via these outbound sessions.
So what about the UTM firewall? If it has no open ports and does not originate outbound sessions, surly it must be safe, right? Think about how a UTM firewall operates. The IP header and payload is scrutinized in order to provide Malware, content, SPAM, etc. checking. In other words, the packet is read into memory and processed by local code in order to provide these services. “Processed by local code” means of course we’re interacting with it. So its entirely possible that a remote attacker could leverage this level of access to whack the system (usually this takes the form of a simple DoS attack, but remote code execution has shown up in the wild).
OK, what about the NIPS? That one is easy. Both NIPS and UTM firewalls are based on the same underlying technology (stateful inspection) so the same problems arise here as well. The NIPS is also vulnerable to remote exploit.
So that leaves us with just the isolated system which is parsing Web server logs. Safe or not? Turns out, this system can be remotely whacked as well, the attacker just has to be a bit more clever. Let’s follow the path from the attacker’s system to this internal host.
The attacker hits the Web server, which dutifully writes what it sees to a log file. If I can embed malicious code in the log file, that will get passed to the isolated internal system when it parses the Web logs. Mike Poor told me of an interesting hack he ran into at a client where a remote attacker injected Java code in the user agent field as they visited his client’s Web site. When the local Admin used a Web browser to view their Web server logs (of course running as an Administrator equivalent!), the browser saw the Java code and executed it locally. The code then attempted to create a reverse socket connection so the attacker could gain remote access to the box.
So for those who are keeping score, every system listed above is vulnerable to remote attack.
What’s the moral of the story? Exposure to remote attack is not about “open listening ports on the local system”, its about “permitting a remote system to interact with code running on the local system”. This can either be directly as in the first four examples, or indirectly as in the last one. Once we realize that remote code access is the true root cause of the problem, we also realize our exposure to risk is a lot higher than we thought.

