22.12.2012 Views

Front cover - IBM Redbooks

Front cover - IBM Redbooks

Front cover - IBM Redbooks

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.

9.6 Summary<br />

The output of the command is fairly straightforward to interpret. The last<br />

column of the netstat command output indicates the state of every service.<br />

Services that are waiting for incoming connections are in the LISTEN state.<br />

2. After identifying which services are listening, open the /etc/services file and<br />

check it using the Internet Assigned Numbers Authority (IANA) services to<br />

map the service to port numbers within the operating system.<br />

3. Close down the unnecessary ports by removing the running services.<br />

Listing open files<br />

It is useful to identify TCP sockets that are in LISTEN state and idle UDP sockets<br />

that are waiting for data to arrive.<br />

Use the lsof command, which is a variant of the netstat -af command, to do<br />

this. The lsof command is included with AIX 5.1 and is located on the AIX<br />

Toolbox for Linux ApplicationsCD.<br />

For example, to display the TCP sockets in LISTEN state and the UDP sockets in<br />

IDLE state, run the lsof command as follows:<br />

# lsof -i | egrep "COMMAND|LISTEN|UDP"<br />

After identifying the process ID, it is possible to obtain more information about<br />

the program by executing the following command:<br />

" # ps -fp PID#"<br />

The output contains the path to the command name, which can be used to<br />

access the program’s man page.<br />

In this chapter we have reviewed the tools and techniques used to protect IT<br />

systems from and prevent attacks.<br />

We <strong>cover</strong>ed operating system hardening tips, common tools and programs used<br />

to create a solid defense, and popular methods used by security professionals to<br />

gather intelligence in case an attacker breaches the outer defenses.<br />

The information we have presented can be of benefit to any size organization,<br />

from a small home-based enterprise to a very large organization with offices<br />

around the world.<br />

The most important thing to remember, though, is that no IT system is 100%<br />

secure 100% of the time.<br />

Chapter 9. Server hardening 411

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

Saved successfully!

Ooh no, something went wrong!