You are here

System Security Enhancements

Project ID: 
Current stage: 

Description: This project will enhance the security of our systems in various ways based on the proposals made in the report into the compromise of the SSH servers.

Deliverables: More secure DICE infrastructure.


Customer: Internal.

Case statement:








The expectation is that all of the "main aims" will be completed within the time allotted. If there is spare time then work will be done on the "other possibilities" section of the project.

Resources: 4 weeks effort.


Main Aims

  1. System Auditing:
    We should enable the Linux audit daemon on all DICE machines with a reasonable set of default rules. This will, for instance, make it possible to trace all modifications to important parts of the filesystem and monitor the execution of setuid root files. For important servers we would also like to have a facility to securely send the audit logs to a remote central server.

  2. Enhance logging and automate the log monitoring:
    In particular we need to automatically monitor the syslogs for all DICE systems to spot events, such as kernel panics, which might indicate attempts by a user to leverage a local security hole.

  3. Regularly monitor the file-system:

    It is clear that we need to monitor the file-system of our servers for unauthorized changes. In particular we should monitor:

    1. All setuid root scripts which are runnable by other users.
    2. All files which are not owned by RPMs
    3. Important directories such as /etc/.

    Some of this can be done using the Linux audit daemon but it would be good to have additional coverage. This can be done with intrusion-detection software such as AIDE (Advanced Intrusion
    Detection Environment) which is a file and directory integrity checker.

  4. Regularly sweep for root-kits:

    We should regularly run software to check for the evidence of root-kits having been installed, e.g. chkrootkit and rkhunter. In particular, running more than one check would denitely be useful as they function quite differently.

  5. Bootable image for investigations:
    Develop a bootable ISO which can be used to carry out investigations on suspect machines. This would be based on our standard installroot image with additional packages, such as chkrootkit and rkhunter, which are useful to have readily available. This could be made available via CD, USB and PXE. There is also a need for a read-only filesystem (in our case delivered via AFS) for running scripts such as chkrootkit which use a number of separate tools which could be subverted if they are coming from the local disk.

Other Possibilities

  1. Use SELinux:

    We do not currently use the SELinux framework which would almost certainly have prevented this intrusion occurring. To run it in full "strict" mode might require a great deal of effort to make it work with LCFG. However, it should be possible to get a lot of
    the benefits whilst using the lesser "targetted" mode, which is the standard for Redhat systems. It is denitely worth some further investigation.

  2. Shared database for failed logins:

    We should investigate whether it is possible to create a database of failed logins which is shared across all DICE machines with external SSH access. This could be used to
    automatically block all SSH access for hosts which are attacking our systems.

  3. SSH Honeypot:

    We could use an SSH honeypot which has an SSH firewall hole but which cannot actually be accessed by any users due to restrictions in the SSH daemon config and the
    access.conf file. The location of this service would not be advertised to our users so it
    would only be found by attackers who are port-scanning our network for targets. This
    could then feed into a shared database of banned hosts.

Some parts of the work for this project have already been done or just need some extensions. In particular, the audit daemon work is mostly complete but needs rolling out to all machines.



Risks: We get hacked again...


Proposed date Achieved date Name Description
2012-06-16 3. Monitor fs File-system intrusion monitoring
2012-09-30 2012-06-30 4. Check for ro Regularly sweep for root-kits
2012-07-30 6. SELinux Consider using SELinux
2012-07-16 5. ISO Develop a bootable image for investigations.
2012-08-30 7 Consider using a shared database for failed logins
2012-08-17 2012-05-31 1. Log Checking Enhance logging and automate log monitoring.
2012-06-18 2012-05-31 0. Auditing System Auditing