07.06.2014 Views

2 - Raspberry PI Community Projects

2 - Raspberry PI Community Projects

2 - Raspberry PI Community Projects

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

• those that qualify a message as a cracking attempt (stored in a file in the /etc/logcheck/<br />

cracking.d/ directory);<br />

• those canceling such a qualification (/etc/logcheck/cracking.ignore.d/);<br />

• those classifying a message as a security alert (/etc/logcheck/violations.d/);<br />

• those canceling this classification (/etc/logcheck/violations.ignore.d/);<br />

• finally, those applying to the remaining messages (considered as system events).<br />

CAUTION<br />

Ignoring a message<br />

Any message tagged as a cracking aempt or a security alert (following a rule<br />

stored in a /etc/logcheck/violations.d/myfile file) can only be ignored by<br />

a rule in a /etc/logcheck/violations.ignore.d/myfile or /etc/logcheck/<br />

violations.ignore.d/myfile-extension file.<br />

A system event is always signaled unless a rule in one of the /etc/logcheck/ignore.d.<br />

{paranoid,server,workstation}/ directories states the event should be ignored. Of course,<br />

the only directories taken into account are those corresponding to verbosity levels equal or<br />

greater than the selected operation mode.<br />

TIP<br />

Your logs as screen<br />

background<br />

Some administrators like seeing their log messages scroll by in real time; the<br />

root-tail command (in the root-tail) package can be used to integrate the<br />

logs into the background of their graphical desktop. The xconsole program<br />

(in the x11-apps package) can also have them scrolling in a small window.<br />

Messages are directly taken from syslogd via the /dev/xconsole named pipe.<br />

14.3.2. Monitoring Activity<br />

14.3.2.1. In Real Time<br />

top is an interactive tool that displays a list of currently running processes. The default sorting<br />

is based on the current amount of processor use and can be obtained with the P key. Other<br />

sort orders include a sort by occupied memory (M key), by total processor time (T key) and by<br />

process identifier (N key). The k key allows killing a process by entering its process identifier.<br />

The r key allows renicing a process, i.e. changing its priority.<br />

When the system seems to be overloaded, top is a great tool to see which processes are competing<br />

for processor time or consume too much memory. In particular, it is often interesting to<br />

check if the processes consuming resources match the real services that the machine is known<br />

to host. An unknown process running as the www-data user should really stand out and be<br />

investigated, since it's probably an instance of software installed and executed on the system<br />

through a vulnerability in a web application.<br />

top is a very flexible tool and its manual page gives details on how to customize its display and<br />

adapt it to one's personal needs and habits.<br />

Chapter 14 — Security<br />

383

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

Saved successfully!

Ooh no, something went wrong!