19.04.2013 Views

2KKUU7ita

2KKUU7ita

2KKUU7ita

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

234<br />

Part IV: Hacking Operating Systems<br />

Finding Unneeded and<br />

Unsecured Services<br />

When you know which daemons and applications are running — such as FTP,<br />

telnet, and a web server — it’s nice to know exactly which versions are running<br />

so you can look up their associated vulnerabilities and decide whether<br />

to turn them off. The National Vulnerability Database site (http://nvd.<br />

nist.gov) is a good resource for determining vulnerabilities.<br />

Searches<br />

Several security tools can help determine vulnerabilities. These types of utilities<br />

might not identify all applications down to the exact version number, but<br />

they’re a very powerful way of collecting system information.<br />

Vulnerabilities<br />

Be especially mindful of these known security weaknesses in a system:<br />

✓ Anonymous FTP — especially if it isn’t properly configured — can provide<br />

a way for an attacker to download and access files on your system.<br />

✓ Telnet and FTP are vulnerable to network analyzer captures of the<br />

cleartext user ID and password the applications use. Their logins can<br />

also be brute-force attacked.<br />

✓ Old versions of sendmail have many security issues.<br />

✓ R-services, such as rlogin, rdist, rexecd, rsh, and rcp, are especially vulnerable<br />

to attacks.<br />

Many web servers run on Linux, so you can’t overlook the importance of<br />

checking for weaknesses in Apache, Tomcat, and your specific applications.<br />

For example, a common Linux vulnerability is that usernames can be determined<br />

via Apache when it doesn’t have the UserDir directive disabled in<br />

its httpd.conf file. You can exploit this weakness manually by browsing<br />

to well-known user folders, such as http://www.your~site.com/user_<br />

name or, better yet, by using a vulnerability scanner, such as WebInspect or<br />

QualysGuard, to automatically enumerate the system. Either way, you may<br />

be able to find out which Linux users exist and then launch a web passwordcracking<br />

attack. There are also numerous ways to access system files (including<br />

/etc/passwd) via vulnerable CGI code. I cover hacking web applications<br />

in Chapter 14.<br />

Likewise, FTP is often running unsecured on Linux systems. I’ve found Linux<br />

systems with anonymous FTP enabled that were sharing sensitive healthcare<br />

and financial information to everyone on the local network. Talk about a lack

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

Saved successfully!

Ooh no, something went wrong!