O'Reilly logo

Maximum Linux Security by Anonymous

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required