Chapter 8. Scanners

This chapter will examine scanners, the benefits they offer, and the threats they pose.

What Is a Scanner?

A scanner is a security tool that detects system vulnerabilities. Here's a primitive example:

 #!/usr/bin/perl $count==0; open(MAIL, "|/usr/lib/sendmail mikal") || die "Cannot open mail\n"; print MAIL "To: Administration\n"; print MAIL "Subject: Password Report\n"; print MAIL "Reply-To: Password-scanner\n"; open(PASSWORDS, "cat /etc/passwd|"); while(<PASSWORDS>) { $linenumber=$.; @fields=split(/:/, $_); if($fields[1] eq "") { $count++; print MAIL "\n***WARNING***\n"; print MAIL "Line $linenumber has a blank password.\n"; print MAIL "Here's the record: @fields\n"; } } close(PASSWORDS); if($count < 1) { print MAIL "I found ...

Get Maximum Linux Security now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.