topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday December 13, 2024, 7:13 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Any CentOS Security Gurus Here?  (Read 6212 times)

Renegade

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 13,291
  • Tell me something you don't know...
    • View Profile
    • Renegade Minds
    • Donate to Member
Any CentOS Security Gurus Here?
« on: November 14, 2014, 05:02 PM »
I need to harden a CentOS installation. Can someone point me to decent resources that will help me quickly get it hardened?

Please only respond if you are well experienced with CentOS or Linux security.
Slow Down Music - Where I commit thought crimes...

Freedom is the right to be wrong, not the right to do wrong. - John Diefenbaker

40hz

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 11,859
    • View Profile
    • Donate to Member
Re: Any CentOS Security Gurus Here?
« Reply #1 on: November 14, 2014, 07:38 PM »
I'm not a security expert by any stretch.

But the Center for Internet security has some good pubs you should be aware of. They're free to download. Look here. For some odd reason they call them "benchmarks" although it's not what I think of when I think of benchmarks. I've made good use of the Win Server and Ubu versions.

From the manual:

Intended Audience

This document is intended for system and application administrators, security specialists,
auditors, help desk, and platform deployment personnel who plan to develop, deploy, assess,
or secure solutions that incorporate {insert product name here}...

They have a manual for Centos 6 and 7. Check it out.

They also have assessment tools. But those require a paid membership to get access - and the fee is pretty steep unless you do system security for a living.
 8)

Renegade

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 13,291
  • Tell me something you don't know...
    • View Profile
    • Renegade Minds
    • Donate to Member
Re: Any CentOS Security Gurus Here?
« Reply #2 on: November 15, 2014, 04:19 AM »
Cripes... that is way more depth than I have time for. :( 
Slow Down Music - Where I commit thought crimes...

Freedom is the right to be wrong, not the right to do wrong. - John Diefenbaker

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,644
    • View Profile
    • Donate to Member
Re: Any CentOS Security Gurus Here?
« Reply #3 on: November 15, 2014, 06:20 AM »
Far be it from me to be an expert at anything but having 4 CentOS VPS' perhaps maybe one relatively simple thing springs to mind:

CSF - ConfigServer Firewall, easy to install and can be configured through Webmin (if you use it).

It will also give a 'basic' indication of possible vulnerabilities, (eg. user/pass SSH server, unneeded services, etc).

Some of its functions
This suite of scripts provides:

    Straight-forward SPI iptables firewall script
    Daemon process that checks for login authentication failures for:
        Courier imap, Dovecot, uw-imap, Kerio
        openSSH
        cPanel, WHM, Webmail (cPanel servers only)
        Pure-ftpd, vsftpd, Proftpd
        Password protected web pages (htpasswd)
        Mod_security failures (v1 and v2)
        Suhosin failures
        Exim SMTP AUTH
        Custom login failures with separate log file and regular expression matching
    POP3/IMAP login tracking to enforce logins per hour
    SSH login notification
    SU login notification
    Excessive connection blocking
    UI Integration for cPanel, DirectAdmin and Webmin
    Easy upgrade between versions from within cPanel/WHM, DirectAdmin or Webmin
    Easy upgrade between versions from shell
    Pre-configured to work on a cPanel server with all the standard cPanel ports open
    Pre-configured to work on a DirectAdmin server with all the standard DirectAdmin ports open
    Auto-configures the SSH port if it's non-standard on installation
    Block traffic on unused server IP addresses - helps reduce the risk to your server
    Alert when end-user scripts sending excessive emails per hour - for identifying spamming scripts
    Suspicious process reporting - reports potential exploits running on the server
    Excessive user processes reporting
    Excessive user process usage reporting and optional termination
    Suspicious file reporting - reports potential exploit files in /tmp and similar directories
    Directory and file watching - reports if a watched directory or a file changes
    Block traffic on the DShield Block List and the Spamhaus DROP List
    BOGON packet protection
    Pre-configured settings for Low, Medium or High firewall security (cPanel servers only)
    Works with multiple ethernet devices
    Server Security Check - Performs a basic security and settings check on the server (via cPanel/DirectAdmin/Webmin UI)
    Allow Dynamic DNS IP addresses - always allow your IP address even if it changes whenever you connect to the internet
    Alert sent if server load average remains high for a specified length of time
    mod_security log reporting (if installed)
    Email relay tracking - tracks all email sent through the server and issues alerts for excessive usage (cPanel servers only)
    IDS (Intrusion Detection System) - the last line of detection alerts you to changes to system and application binaries
    SYN Flood protection
    Ping of death protection
    Port Scan tracking and blocking
    Permanent and Temporary (with TTL) IP blocking
    Exploit checks
    Account modification tracking - sends alerts if an account entry is modified, e.g. if the password is changed or the login shell
    Shared syslog aware
    Messenger Service - Allows you to redirect connection requests from blocked IP addresses to preconfigured text and html pages to inform the visitor that they have been blocked in the firewall. This can be particularly useful for those with a large user base and help process support requests more efficiently
    Country Code blocking - Allows you to deny or allow access by ISO Country Code
    Port Flooding Detection - Per IP, per Port connection flooding detection and mitigation to help block DOS attacks
    DirectAdmin UI integration
    Updated Webmin UI integration
    WHM root access notification (cPanel servers only)
    lfd Clustering - allows IP address blocks to be automatically propagated around a group of servers running lfd. It allows allows cluster-wide allows, removals and configuration changes
    Quick start csf - deferred startup by lfd for servers with large block and/or allow lists
    Distributed Login Failure Attack detection
    Temporary IP allows (with TTL)
    IPv6 Support with ip6tables
    Integrated UI - no need for a separate Control Panel or Apache to use the csf configuration
    Integrated support for cse within the Integrated UI
    cPanel Reseller access to per reseller configurable options Unblock, Deny, Allow and Search IP address blocks
    System Statistics - Basic graphs showing the performance of the server, e.g. Load Averages, CPU Usage, Memory Usage, etc
    ipset support for large IP lists
    ...lots more!


Stoic Joker

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 6,649
    • View Profile
    • Donate to Member
Re: Any CentOS Security Gurus Here?
« Reply #4 on: November 15, 2014, 08:03 AM »
^Funny how the 'basics' always seem to end up being the most important part. All the fancy stuff won't amount to squat if you botch the basics.

80/20 rule:
Turn off what ain't used (including the unnecessary nifty extras for the parts you are using).
Keep patch levels current.
Pick proper passwords.

I've never seen a breach happen that didn't ultimately involve one of those three.

40hz

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 11,859
    • View Profile
    • Donate to Member
Re: Any CentOS Security Gurus Here?
« Reply #5 on: November 15, 2014, 08:27 AM »
^Funny how the 'basics' always seem to end up being the most important part. All the fancy stuff won't amount to squat if you botch the basics.

80/20 rule:
Turn off what ain't used (including the unnecessary nifty extras for the parts you are using).
Keep patch levels current.
Pick proper passwords.

I've never seen a breach happen that didn't ultimately involve one of those three.

+1. That's been my experience too.

Cripes... that is way more depth than I have time for. :( 

So...better dead than read:P (kidding) ;)

Renegade

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 13,291
  • Tell me something you don't know...
    • View Profile
    • Renegade Minds
    • Donate to Member
Re: Any CentOS Security Gurus Here?
« Reply #6 on: November 15, 2014, 07:13 PM »
So...better dead than read:P (kidding) ;)

I really wish I had time... :'(

Did you see those documents? 179 pages.

I know my limits, and I know that I can't get through implementing 179 pages of technical security material.

But, good pun! :)  :Thmbsup:
Slow Down Music - Where I commit thought crimes...

Freedom is the right to be wrong, not the right to do wrong. - John Diefenbaker

Renegade

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 13,291
  • Tell me something you don't know...
    • View Profile
    • Renegade Minds
    • Donate to Member
Re: Any CentOS Security Gurus Here?
« Reply #7 on: November 15, 2014, 07:14 PM »
^Funny how the 'basics' always seem to end up being the most important part. All the fancy stuff won't amount to squat if you botch the basics.

80/20 rule:
Turn off what ain't used (including the unnecessary nifty extras for the parts you are using).
Keep patch levels current.
Pick proper passwords.

I've never seen a breach happen that didn't ultimately involve one of those three.

Which is what I want to aim for. After that, it's all diminishing returns.
Slow Down Music - Where I commit thought crimes...

Freedom is the right to be wrong, not the right to do wrong. - John Diefenbaker