Dons Deals

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Sunday, 14 April 2013

How to scan Linux for vulnerabilities with lynis

Posted on 21:24 by Unknown

How to scan Linux for vulnerabilities with lynis

Linuxaria Everything about GNU-Linux and Open source

 
Pills, Review
 Add comments
Apr 122013
 

Article by Dan Nanni first published on xmodulo.com

As a system administrator, Linux security technician or system auditor, your responsibility can involve any combination of these: software patch management, malware scanning, file integrity checks, security audit, configuration error checking, etc. If there is an automatic vulnerability scanning tool, it can save you a lot of time checking up on common security issues.

One such vulnerability scanner on Linux is lynis. This tool is actually supported on multiple platforms including CentOS, Debian, Fedora, FreeBSD, Mac OS and Ubuntu.




To install lynis on Linux, open a terminal and run the following commands:

$ wget http://www.rootkit.nl/files/lynis-1.3.0.tar.gz  $ sudo tar xvfvz lynis-1.3.0.tar.gz -C /opt

To scan Linux for vulnerabilities with lynis, run the following.

$ cd /opt/lynis-1.3.0/  $ sudo /opt/lynis-1.3.0/lynis --check-all -Q

Once lynis starts scanning your system, it will perform auditing in a number of categories:

  • System tools: system binaries
  • Boot and services: boot loaders, startup services
  • Kernel: run level, loaded modules, kernel configuration, core dumps
  • Memory and processes: zombie processes, IO waiting processes
  • Users, groups and authentication: group IDs, sudoers, PAM configuration, password aging, default mask
  • Shells
  • File systems: mount points, /tmp files, root file system
  • Storage: usb-storage, firewire ohci
  • NFS
  • Software: name services: DNS search domain, BIND
  • Ports and packages: vulnerable/upgradable packages, security repository
  • Networking: nameservers, promiscuous interfaces, connections
  • Printers and spools: cups configuration
  • Software: e-mail and messaging
  • Software: firewalls: iptables, pf
  • Software: webserver: Apache, nginx
  • SSH support: SSH configuration
  • SNMP support
  • Databases: MySQL root password
  • LDAP services
  • Software: php: php options
  • Squid support
  • Logging and files: syslog daemon, log directories
  • Insecure services: inetd
  • Banners and identification
  • Scheduled tasks: crontab/cronjob, atd
  • Accounting: sysstat data, auditd
  • Time and synchronization: ntp daemon
  • Cryptography: SSL certificate expiration
  • Virtualization
  • Security frameworks: AppArmor, SELinux, grsecurity status
  • Software: file integrity
  • Software: malware scanners
  • Home directories: shell history files

The screenshot of lynis in action is shown below:

 

Once scanning is completed, the auditing report of your system is generated and stored in /var/log/lynis.log.

The audit report contains warnings for potential vulnerabilities detected by the tool. For example:

$ sudo grep Warning /var/log/lynis.log
[20:20:04] Warning: Root can directly login via SSH [test:SSH-7412] [impact:M]  [20:20:04] Warning: PHP option expose_php is possibly turned on, which can reveal useful information for attackers. [test:PHP-2372] [impact:M]  [20:20:06] Warning: No running NTP daemon or available client found [test:TIME-3104] [impact:M]

The audit report also contains a number of suggestions that can help harden your Linux system. For example:

$ sudo grep Suggestion /var/log/lynis.log
[20:19:41] Suggestion: Install a PAM module for password strength testing like pam_cracklib or pam_passwdqc [test:AUTH-9262]  [20:19:41] Suggestion: When possible set expire dates for all password protected accounts [test:AUTH-9282]  [20:19:41] Suggestion: Configure password aging limits to enforce password changing on a regular base [test:AUTH-9286]  [20:19:41] Suggestion: Default umask in /etc/profile could be more strict like 027 [test:AUTH-9328]  [20:19:42] Suggestion: Default umask in /etc/login.defs could be more strict like 027 [test:AUTH-9328]  [20:19:42] Suggestion: Default umask in /etc/init.d/rc could be more strict like 027 [test:AUTH-9328]  [20:19:42] Suggestion: To decrease the impact of a full /tmp file system, place /tmp on a separated partition [test:FILE-6310]  [20:19:42] Suggestion: Disable drivers like USB storage when not used, to prevent unauthorized storage or data theft [test:STRG-1840]  [20:19:42] Suggestion: Disable drivers like firewire storage when not used, to prevent unauthorized storage or data theft [test:STRG-1846]  [20:20:03] Suggestion: Install package apt-show-versions for patch management purposes [test:PKGS-7394]  . . . .

So what are you waiting for ?
One run can give you some good suggestion on how to improve the security of your system, a regular scan can help you in notice changes and malware.


Go there, more info in Comments...
http://linuxaria.com/pills/how-to-scan-linux-for-vulnerabilities-with-lynis?lang=en

Popular Posts:

  • Automate easily your tasks on Ubuntu with Cuttlefish
  • The Biggest Failure in Open Source Is…
  • Free & Open Source Rootkit and Malware Detection Tools
  • Speed up your download with Aria2
  • MariaDB is conquering the “desktop” distributions

Popular posts

  • Automate easily your tasks on Ubuntu with Cuttlefish
  • The Biggest Failure in Open Source Is…
  • Free & Open Source Rootkit and Malware Detection Tools
  • Speed up your download with Aria2
  • MariaDB is conquering the “desktop” distributions


Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • ZigBee - a specification for a suite of high level communication protocols used to create personal area networks built from small low-power digital radios
    ZigBee From Wikipedia, the free encyclopedia Jump to: navigation , search ZigBee ...
  • Open Sorce Hardware - The Wandboard is a low cost board based on the i.MX6 multicore ARM Cortex-A9 family of processors. In consists of a core module based on the EDM standard and a simple to extend baseboard
    Here's an Open Source Wandboard - Freescale i.MX6 ARM Cortex-A9 Opensource Community Development Board. The Wandboard is a low ...
  • 1967 Chevy Camaro Complete Rebuild - Videos, HowStuffWorks Videos "NAPA Videos"
    Video Playlist - West Coast Customs Shop, Completely Tears Down a 1967 Chevy Camaro and then does a Complete Rebuild...
  • Installing and Updating GRUB 2 in Fedora Linux
    This Page has allot of info on Installing, Updating and Trouble Shooting Grub 2 in Fedora Linux. There are some good How To's for...
  • Dynaco Stereo 400 Power Amplifier - Dead Channel Fix - Dynaco Repairs For PC-28 Amplifier Boards
    My Dynaco Stereo 400 Amp... The Page Below these e-mails with Kevin Boales. Looks like the one that I found. Back in ...
  • Open source PLC's - PLC (programmable logic controller)
    Here's some Great Looking Open source PLC Projects. The OSPLC Small & Large Bricks are open-source PLC (programmable logic ...
  • NetProMax PC with Motherboard P5PE-VM ASUSTeK
    Here are some links to info on the NetProMax PC with Motherboard P5PE-VM ASUSTeK ... Don ASUSTe...
  • Running a PXE Boot Server in Parted Magic
    Here's some good info on Running PXE Boot Server in Parted Magic... Don PXE – Parted Magic PXE PXE: the "classic" way ...
  • Americas Health Care - Obama Care - Key Features of the Affordable Care Act - Health Care and Education Reconciliation Act
    Finally! Some real info, as in... This is the date that the Affordable Care Act, goes into effect. Open enrollment in the Heal...
  • Building a Brushless Motor Controller using an ATmega Chip - by Davide Gironi
    Here's a very in depth Article on Building a Brushless Motor Controller using an ATmega Chip - by Davide Gironi... Do...

Blog Archive

  • ▼  2013 (354)
    • ►  December (12)
    • ►  November (33)
    • ►  October (23)
    • ►  September (46)
    • ►  August (52)
    • ►  July (36)
    • ►  June (45)
    • ►  May (17)
    • ▼  April (38)
      • Fuduntu team members have already moved to begin d...
      • Auto Scantool ODB-II Hacking with Android Tablet a...
      • Video Player Built from the TI Stellaris Launchpad
      • Fedora 14 Linux Services - This service is enabled...
      • Setup Your Own Certificate Authority (CA) on Linux...
      • Wringing out Water on the ISS - for Science! - You...
      • Singers Create – Make music online with UJAM Make ...
      • Automotive Diagnostic Scanners - ELM327 is a progr...
      • Have you Checked your Mobile Phone Bill, Lately?
      • PCB Dead Bug Prototype Soldering BGA Components - ...
      • Medical Bed Mattresses FDA Safety Communication - ...
      • Intelligent Ringer adjusts your ringer volume base...
      • Installing and Updating GRUB 2 in Fedora Linux
      • Monitorix - A Lightweight System and Network Monit...
      • Sad News about Fuduntu Linux - on April 14 2013, i...
      • Project Unity - The Multiple Retro Video Gaming Co...
      • How to scan Linux for vulnerabilities with lynis
      • SUSE Studio 1.3: Linux Appliances Head to the Clou...
      • Guitar Keyboard Midi Computer Hacks and Automatons
      • Microsoft announced that MS13-036 security update ...
      • So, now there's a FaceBook Phone???
      • Whats the Weather like on Titan? - Space.com
      • Where do our Online Profiles go when we Die? - Ina...
      • Hijacking airplanes with an Android phone
      • Google Street View Hyperlapse A Teehan+Lax Labs ex...
      • Firefox is going to handle SSL and Non SSL Mixed W...
      • The Other Red Christmas Flower - Amaryllis Plantin...
      • Most Men Don't Need PSA Tests, Doctors' Group Says...
      • Robots and Remote Control Lawn Mower Projects
      • Alone in the Wilderness, Dick Proenneke lived alon...
      • Linux Command Line - How to use YUM to install and...
      • BuildIts - Electric Tricycle - All-Terrain Electri...
      • The Theremin is an early electronic musical instru...
      • Steampunk theremin goggles by Sarah - Gravity Road...
      • MariaDB is a drop-in replacement for MySQL (with i...
      • SenseLamp is a lamp shade that can be remotely con...
      • Melatonin & Type 2 Diabetes May Be Linked – WebMD
      • Images carrying an encrypted data payload Buried u...
    • ►  March (19)
    • ►  February (22)
    • ►  January (11)
  • ►  2012 (145)
    • ►  December (27)
    • ►  November (31)
    • ►  October (14)
    • ►  September (15)
    • ►  August (48)
    • ►  July (10)
Powered by Blogger.

About Me

Unknown
View my complete profile