Hardening Linux. and introducing Securix GNU/Linux



Similar documents
Safety measures in Linux

A REVIEW OF METHODS FOR SECURING LINUX OPERATING SYSTEM

Configuring Secure Linux Hosts

The current version installed on your server is el6.x86_64 and it's the latest available.

How To Set Up An Ip Firewall On Linux With Iptables (For Ubuntu) And Iptable (For Windows)

Secure Network Filesystem (Secure NFS) By Travis Zigler

Application Whitelisting - Extend your Security Arsenal? Mike Baldi Cyber Security Architect Honeywell Process Solutions

Securing Linux. Presented by: Darren Mobley

Best Practices to Secure Linux Server homing Oracle

Unix Security Technologies: Host Security Tools. Peter Markowsky <peterm[at]ccs.neu.edu>

F-SECURE MESSAGING SECURITY GATEWAY

Locking down a Hitachi ID Suite server

Track 2 Workshop PacNOG 7 American Samoa. Firewalling and NAT

Host Hardening. Presented by. Douglas Couch & Nathan Heck Security Analysts for ITaP 1

Penetration Testing with Kali Linux

Best Practices in Hardening Apache Services under Linux

Secure Software Programming and Vulnerability Analysis

BorderWare Firewall Server 7.1. Release Notes

EXPLORING LINUX KERNEL: THE EASY WAY!

Network-Enabled Devices, AOS v.5.x.x. Content and Purpose of This Guide...1 User Management...2 Types of user accounts2

Guidance Regarding Skype and Other P2P VoIP Solutions

LINUX NETWORK SECURITY

IMPLEMENTATION OF INTELLIGENT FIREWALL TO CHECK INTERNET HACKERS THREAT

Auditing and Hardening Unix Systems Using CIS benchmarks on SUSE Linux

CMS Operational Policy for Infrastructure Router Security

Thick Client Application Security

Automating Linux Malware Analysis Using Limon Sandbox Monnappa K A monnappa22@gmail.com

Reverse Shells Enable Attackers To Operate From Your Network. Richard Hammer August 2006

Implications of Security and Accreditation for 4DWX (Information Assurance) By Scott Halvorson Forecasters Training 26 February 2009

Linux Network Security

Installing Ubuntu LTS with full disk encryption

Vulnerability Assessment and Penetration Testing

CMS Operational Policy for Firewall Administration

Architecture and Data Flow Overview. BlackBerry Enterprise Service Version: Quick Reference

Network Security. Chapter 3. Cornelius Diekmann. Version: October 21, Lehrstuhl für Netzarchitekturen und Netzdienste Institut für Informatik

Overview of Network Security The need for network security Desirable security properties Common vulnerabilities Security policy designs

1 hours, 30 minutes, 38 seconds Heavy scan. All scanned network resources. Copyright 2001, FTP access obtained

Evading Infrastructure Security Mohamed Bedewi Penetration Testing Consultant

Network Defense Tools

Exploiting nginx chunked overflow bug, the undisclosed attack vector

Configuring Security Features of Session Recording

CCM 4350 Week 11. Security Architecture and Engineering. Guest Lecturer: Mr Louis Slabbert School of Science and Technology.

A Guide to New Features in Propalms OneGate 4.0

Linux Server Configuration Guidelines

Stratusphere. Architecture Overview

Security Guide. BlackBerry Enterprise Service 12. for ios, Android, and Windows Phone. Version 12.0

UNCLASSIFIED

Network Security and Firewall 1

7 Network Security. 7.1 Introduction 7.2 Improving the Security 7.3 Internet Security Framework. 7.5 Absolute Security?

Firewalls. Chapter 3

Davor Guttierrez 3 Gen d.o.o. Optimizing Linux Servers

NETWORK SECURITY HACKS

CS 356 Lecture 25 and 26 Operating System Security. Spring 2013

Fifty Critical Alerts for Monitoring Windows Servers Best practices

Deploying IBM Lotus Domino on Red Hat Enterprise Linux 5. Version 1.0

NATIONAL SECURITY AGENCY Ft. George G. Meade, MD

RSA SecurID Ready Implementation Guide

SY system so that an unauthorized individual can take over an authorized session, or to disrupt service to authorized users.

Linux Embedded devices with PicoDebian Martin Noha

SSH and FTP on Ubuntu WNYLUG Neal Chapman 09/09/2009

Installation Guide for WebSphere Application Server (WAS) and its Fix Packs on AIX V5.3L

CS 665: Computer System Security. Network Security. Usage environment. Sources of vulnerabilities. Information Assurance Module

RH033 Red Hat Linux Essentials or equivalent experience with Red Hat Linux..

How To Set Up A Network Map In Linux On A Ubuntu 2.5 (Amd64) On A Raspberry Mobi) On An Ubuntu (Amd66) On Ubuntu 4.5 On A Windows Box

Contents III: Contents II: Contents: Rule Set Based Access Control (RSBAC) 4.2 Model Specifics 5.2 AUTH

Small Systems Solutions is the. Premier Red Hat and Professional. VMware Certified Partner and Reseller. in Saudi Arabia, as well a competent

Windows Client/Server Local Area Network (LAN) System Security Lab 2 Time allocation 3 hours

Oracle Database Security and Audit

Summary of the SEED Labs For Authors and Publishers

Linux Server Support by Applied Technology Research Center. Proxy Server Configuration

Malware Analysis Quiz 6

Determine if the expectations/goals/strategies of the firewall have been identified and are sound.

Wavelink Avalanche Mobility Center Linux Reference Guide

CS 640 Introduction to Computer Networks. Network security (continued) Key Distribution a first step. Lecture24

HOW TO CONFIGURE CISCO FIREWALL PART I

Building Energy Security Framework

Topics in Network Security

2. From a control perspective, the PRIMARY objective of classifying information assets is to:

Secure VidyoConferencing SM TECHNICAL NOTE. Protecting your communications VIDYO

Security Enhanced Linux and the Path Forward

How To Install Storegrid Server On Linux On A Microsoft Ubuntu 7.5 (Amd64) Or Ubuntu (Amd86) (Amd77) (Orchestra) (For Ubuntu) (Permanent) (Powerpoint

BYOD Guidance: BlackBerry Secure Work Space

Internet Security and Acceleration Server 2000 with Service Pack 1 Audit. An analysis by Foundstone, Inc.

Getting Started with the Linux Intrusion Detection

74% 96 Action Items. Compliance

PowerChute TM Network Shutdown Security Features & Deployment

Today s Topics. Protect - Detect - Respond A Security-First Strategy. HCCA Compliance Institute April 27, Concepts.

The Trivial Cisco IP Phones Compromise

Linux Boot Camp. Our Lady of the Lake University Computer Information Systems & Security Department Kevin Barton Artair Burnett

Using Red Hat Enterprise Linux with Georgia Tech's RHN Satellite Server Installing Red Hat Enterprise Linux

FISMA / NIST REVISION 3 COMPLIANCE

SCP - Strategic Infrastructure Security

Assuria can help protectively monitor firewalls for PCI compliance. Assuria can also check the configurations of personal firewalls on host devices

Network Infrastructure Security Recommendations

GE Measurement & Control. Cyber Security for NEI 08-09

Building Your Firewall Rulebase Lance Spitzner Last Modified: January 26, 2000

Deployment Guide: Transparent Mode

UNCLASSIFIED CPA SECURITY CHARACTERISTIC REMOTE DESKTOP. Version 1.0. Crown Copyright 2011 All Rights Reserved

Introduction to Operating Systems

CONTENTS. PCI DSS Compliance Guide

Transcription:

Hardening Linux and introducing Securix GNU/Linux

Hardening basics From lowest to highest level Tune every part of system and applications Follow standards and security policies Regularly check system health Install security patches when possible Log and audit every action

Physical security Locked rack BIOS setup password Console in different rack // How it helps? Avoid unauthorized access where somebody can: - shutdown server - reboot server into single-user mode and change password - boot live CD and access data - sniff data on ethernet cable - steal hard disks

Encrypting partitions its essential to have encrypted all partitions except /boot and swap ( /, usr, home, var, opt, tmp) no impact on resources where is HW acceleration possible my recommendation is LUKS cryptsetup -c aes-xts-plain -y -s 512 -h whirlpool luksformat /dev/xyz // How it helps? data stored are unreadable for attacker passwords can t be changed during boot from live CD

Securing Grub protect grub using password password --md5 $1$Ul0TR0$fK/7jE2gCbkBAnzBQWWYf/ generate hash using grub-md5-crypt protect single-user boot via password as well setup fallback option // How it helps? avoid unauthorized single-user mode boot fallback in case of problems with new kernel

Kernel configuration enabled only options which are really needed - smaller/faster kernel - secure - big piece of code isn't really needed enabled PaX and Grsecurity - no LSM - robust multi-level security system Securix have minimalistic predefined kernel setup which should boot on many systems by default

/etc/securetty limit root access to console and serial port only # file: /etc/securetty # limit root access console vc/1 tty1 tty2 # serial console access ttys0 ttys1...

Use phrases, not passwords

Use phrases, not passwords

/etc/sysctl.conf build with focus on security and network stack tuning some examples: # Kernel EXEC shield kernel.exec-shield = 1 # Make the addresses of mmap base, stack, heap and VDSO page randomized kernel.randomize_va_space = 2 # Reboot system when kernel panic occur, oops will wait 30 seconds untill call panic() kernel.panic = 30 kernel.panic_on_oops = 30 # Disable magic-sysrq key kernel.sysrq = 0

/etc/sysctl.conf # Prevent SYN attack net.ipv4.tcp_syncookies = 1 net.ipv4.tcp_max_syn_backlog = 4096 net.ipv4.tcp_syn_retries = 5 net.ipv4.tcp_synack_retries = 2 # Enable IP spoofing protection, turn on source route verification net.ipv4.conf.all.rp_filter = 1 net.ipv4.conf.default.rp_filter = 1 # Increase allowed local port range net.ipv4.ip_local_port_range = 1024 64000 # Enable tcp_window_scaling net.ipv4.tcp_window_scaling = 1...and much more

iptables configuration script for pushing/editing/saving firewall rules port scan detection access logging traffic divided into chains strict default policy

/etc/security/limits.conf # default limits * soft core 0 * hard core 0 * hard nproc 200 * hard nofile 2000 * hard fsize 1024000 * - maxlogins 3 # operator group limits @operators hard nproc 2000 @operators hard nofile 4000 @operators hard fsize 10240000 @operators - maxlogins 10 # service group limits @services hard nproc 40000 @services hard nofile 45000 @services hard fsize 1024000000 @services - maxlogins 100

/etc/ssh/sshd_config Port 55522 Protocol 2 ServerKeyBits 2048 Ciphers aes256-cbc,aes256-ctr,blowfish-cbc Compression yes ClientAliveInterval 15 ClientAliveCountMax 3 TCPKeepAlive no PermitRootLogin no PermitEmptyPasswords no UsePrivilegeSeparation yes StrictModes yes AllowTcpForwarding no X11Forwarding no GatewayPorts no...

PaX - NOEXEC The goal of NOEXEC is to prevent the injection and execution of code into a task's address space and render this exploit technique unusable under PaX. - segmentation based non-executable page protection [IA-32 only] (SEGMEXEC) - paging based non-executable page protection (PAGEEXEC) - mmap() and mprotect() restrictions (MPROTECT)

Pax - ASLR decrease success rate of attacks that require advanced knowledge of memory addresses via Address Space Layout Randomization (ASLR) - Main executable code/data/bss segment base address randomization (RANDEXEC) - ET_EXEC ELF - mmap() and brk() managed memory [libraries, heap, thread stacks, shared memory, etc] address randomization (RANDMMAP) ET_DYN ELF - User stack base address randomization (RANDUSTACK) - Kernel stack base address randomization (RANDKSTACK)

Grsecurity Unlike other expensive security "solutions" that pretend to achieve security through known-vulnerability patching, signature-based detection, or other reactive methods, grsecurity provides real proactive security. The only solution that hardens both your applications and operating system, grsecurity is essential for public-facing servers and shared-hosting environments. Grsecurity increased authentication for administrators, audit important system events, and confine your system with no manual configuration through advanced Role-Based Access Control.

Grsecurity - features high scalable Role-Based Access Control learning mode for RBAC policies restrict access to /dev/kmem, /proc/<pid>/maps, /proc, kernel processes, linking, FIFO, dmesg, IO, ptrace,... trusted path execution hardened chroot environment fork bomb protection & randomized PIDs

Grsecurity - features 2 network protections - randomized IP IDs, larger entropy pools, random TCP sequence numbers, randomized TCP source ports, tcp/udp blackhole, altered ping payload, socket restrictions,... auditing - exec & chroot exec, ptrace, chdir, un/mount, signal sent, fork failure, time change, append client IP address where possible, denied RWX mmap/mprotect (PaX)...and much more

Grsecurity benchmark Apache Benchmark: This test profile measures how many requests per second a given system can sustain when carrying out 700,000 requests with 100 requests being carried out concurrently. Source: http://grsecurity.net/~spender/benchmarks.txt Vanilla All grsecurity/pax features enabled All but RBAC All but UDEREF All but KERNEXEC/UDEREF All but KERNEXEC/UDEREF/SANITIZE All but KERNEXEC/UDEREF/SANITIZE/STACKLEAK

Grsecurity benchmark Apache Benchmark: This test profile measures how many requests per second a given system can sustain when carrying out 700,000 requests with 100 requests being carried out concurrently. 5500 11000 8250 Source: http://grsecurity.net/~spender/benchmarks.txt Vanilla All grsecurity/pax features enabled All but RBAC All but UDEREF All but KERNEXEC/UDEREF All but KERNEXEC/UDEREF/SANITIZE All but KERNEXEC/UDEREF/SANITIZE/STACKLEAK Score 0 2750

Why not SELinux? build as Linux Security Module (LSM) doesn't contain features as Grsecurity (NX, ASLR, DoS and fingerprint mitigation, entropy pools, auditing,...) complicated policy & no learning mode worse performance in benchmark tests developed and maintained by NSA ( Big Brother )

Securix GNU/Linux

Securix GNU/Linux follow best practices and standards with high focus on security and performance all services and system configuration secured by default own monitoring system which can fix or inform administrator about problems by email or motd (rkhunter, checksec.sh, secxmon.sh, secxwatch.sh, XCCDF, OVAL,...) update tool which can align system with current Securix configuration actively implement protection against new attack vectors (via update tool) where applicable

Securix GNU/Linux

Securix GNU/Linux anyone can contribute or suggest improvement! build good pre-defined RBAC policies binaries build with SSP and PIE protection proactive security against buffer/heap/stack overflow and exploits every new settings must be tested on production environment basically it is still Hardened Gentoo with great support on forums, IRCs and mailing lists...stay tuned

Securix Installer

Securix Installer written in bash under GPLv3 license system environment check and setup advanced auto-partitioning with LVM and LUKS support (noatime, nodev, nosuid, noexec) auto-detection/setup of architecture, bonding, serial console, http proxy, profile,... all you need is setup some essential variables like root passphrase, hostname, root mail, etc. following methods KISS (Keep It Simple Stupid) and DASQ (Don't Ask Stupid Questions)

Q&A?

Thank you! Martin Čmelík [ cm3l1k1 ] martin.cmelik [ at ] security-portal.cz www.security-portal.cz www.securix.org

Links www.securix.org www.grsecurity.net http://pax.grsecurity.net/docs/ http://www.gentoo.org/proj/en/hardened/ http://en.wikibooks.org/wiki/grsecurity http://www.pjvenda.net/linux/doc/pax-performance/ www.cs.virginia.edu/~jcg8f/selinux%20grsecurity%20paper.pdf www.ece.cmu.edu/~dbrumley/courses/18739c-s11/docs/aslr.pdf http://www.cyberciti.biz/...

Top security stories of 2011 (by Kaspersky)

Top security stories of 2011 (by Kaspersky) Rise of Hactivism - Anonymous, LulzSec,... HBGary Federal Hack RSA, Comodo and DigiNotar incident Duqu (Stuxnet) - undetectable for years Sony Playstation Network hack Rise of Android / Mobile malware CarrierIQ - spy and monitoring tool...we need Securix