19.04.2013 Views

2KKUU7ita

2KKUU7ita

2KKUU7ita

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

236<br />

Part IV: Hacking Operating Systems<br />

Figure 12-8:<br />

Using Amap<br />

to check<br />

application<br />

versions.<br />

✓ netstat shows the services running on a local machine. Enter this<br />

command while logged in:<br />

netstat –anp<br />

✓ List Open Files (lsof) displays processes that are listening and files<br />

that are open on the system.<br />

To run lsof, log in and enter this command at a Linux command<br />

prompt: lsof –i +M. The lsof command can come in handy when<br />

you suspect that malware has found its way onto the system.<br />

Countermeasures against attacks<br />

on unneeded services<br />

You can and should disable the unneeded services on your Linux systems.<br />

This is one of the best ways to keep your Linux system secure. Like reducing<br />

the number of entry points (such as open doors and windows) in your house,<br />

the more entry points you eliminate, the fewer places an intruder can break in.<br />

Disabling unneeded services<br />

The best method of disabling unneeded services depends on how the<br />

daemon is loaded in the first place. You have several places to disable services,<br />

depending on the version of Linux you’re running.<br />

If you don’t need to run a particular service, take the safe route: Turn it off!<br />

Just give people on the network ample warning that it’s going to happen in the<br />

event someone needs the service for their work.<br />

inetd.conf (or xinetd.conf)<br />

If it makes good business sense — that is, if you don’t need them — disable<br />

unneeded services by commenting out the loading of daemons you don’t use.<br />

Follow these steps:

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

Saved successfully!

Ooh no, something went wrong!