Security and Protection Xavier Martorell-Bofill 1 Ren Serral-Graci 1 - - PowerPoint PPT Presentation

security and protection
SMART_READER_LITE
LIVE PREVIEW

Security and Protection Xavier Martorell-Bofill 1 Ren Serral-Graci 1 - - PowerPoint PPT Presentation

Security and Protection Xavier Martorell-Bofill 1 Ren Serral-Graci 1 Universitat Politcnica de Catalunya (UPC) May 26, 2014 Introduction About security Security components Lectures System administration introduction 1 Operating System


slide-1
SLIDE 1

Security and Protection

René Serral-Gracià Xavier Martorell-Bofill1

1Universitat Politècnica de Catalunya (UPC)

May 26, 2014

slide-2
SLIDE 2

Introduction About security Security components

Lectures

1

System administration introduction

2

Operating System installation

3

User management

4

Application management

5

System monitoring

6

Filesystem Maintenance

7

Local services

8

Network services

9

Security and Protection

10 Virtualization

  • R. Serral-Gracià, et. al

Security 2

slide-3
SLIDE 3

Introduction About security Security components

Outline

1

Introduction Goals

2

About security

3

Security components

  • R. Serral-Gracià, et. al

Security 3

slide-4
SLIDE 4

Introduction About security Security components

Goals

Knowledge Main aspects of system’s security

Local security Network security

Network services security Abilities Installation, execution and analysis about the results of security auditing tools

  • R. Serral-Gracià, et. al

Security 4

slide-5
SLIDE 5

Introduction About security Security components

Outline

1

Introduction

2

About security

3

Security components

  • R. Serral-Gracià, et. al

Security 5

slide-6
SLIDE 6

Introduction About security Security components

What does security mean?

Confidentiality

Protection against undesired data access

Integrity

Protection against unwanted destruction modification, or data loss

Availability

System must be up and running for legitimate users

Consistency

Avoid unwanted changes to system behavior

Isolation

Avoid unauthorized access to external people (hackers)

  • R. Serral-Gracià, et. al

Security 6

slide-7
SLIDE 7

Introduction About security Security components

Perfect security?

There is not such a thing

Even if the machine is down With enough resources (time, money, . . . ) everything is hackable Natural disasters

Goal: get a “secure enough” system Secure against automatic attacks (script kiddies) Easy to be back up and running

  • R. Serral-Gracià, et. al

Security 7

slide-8
SLIDE 8

Introduction About security Security components

Security and usability

Normally two sides of the same coin Highest security, lowest usability

Limited access to services and apps Constant identifications

Burdensome to the users Slow and tiring

More usability means less security Too much security can have the opposed effect Users write all their passwords in a post-it Use tools to automate resource access

  • R. Serral-Gracià, et. al

Security 8

slide-9
SLIDE 9

Introduction About security Security components

Goals in attacking a computer

Get information Get/destroy data Denial of Service Obtain resources Use machines as proxy to other attacks (DDoS)

  • R. Serral-Gracià, et. al

Security 9

slide-10
SLIDE 10

Introduction About security Security components

Some attacks

Obtain passwords Filesystem abuse Unexpected parameters Buffer overflows Race conditions Resource abuse Troyan, Viruses, . . . Port scanning Spoofing: IP , DNS, ARP , . . . Man-in-the-middle Sniffers Worms, . . . Social Engineering . . .

  • R. Serral-Gracià, et. al

Security 10

slide-11
SLIDE 11

Introduction About security Security components

Outline

1

Introduction

2

About security

3

Security components Physical Security (I) Local Security Network Security

  • R. Serral-Gracià, et. al

Security 11

slide-12
SLIDE 12

Introduction About security Security components

Physical Security

Physical access to the console

Reboot with a system disk Data stealing (hard drive, backups) System alteration Computer stealing

Physical access to network cables

Network Monitoring Denial of Service

Physical access to the office

Look for passwords below the keyboard!

Access to destroyed documents

  • R. Serral-Gracià, et. al

Security 12

slide-13
SLIDE 13

Introduction About security Security components

Physical Security (II)

Sometimes it doesn’t take a malicious attack to destroy data

Accidents: power shortages, fire, . . . Ambient conditions: temperature, humidity, . . . Natural catastrophes: hurricanes, earthquakes, . . . Other: bugs, food, beverages, . . .

Sensors, special materials, raised floor, . . .

  • R. Serral-Gracià, et. al

Security 13

slide-14
SLIDE 14

Introduction About security Security components

Local Security

Goal: protect against attacks form the users of the system Attacker has a non privileged user account Even a privileged one Users willing to escalate privileges Protect the system locally before connecting it to the network

  • R. Serral-Gracià, et. al

Security 14

slide-15
SLIDE 15

Introduction About security Security components

Passwords

Enforce a strong password policy

Long passwords (+8 characters) Mix of numbers, letters, and special characters Hard to guess Easy to remember NOT a dictionary word – or variation

Password expiration policy

Be careful it can become quite annoying

Check password strength on each change/periodically Protect encrypted passwords (/etc/shadow)

  • R. Serral-Gracià, et. al

Security 15

slide-16
SLIDE 16

Introduction About security Security components

Permission and protection

Minimum access policy An user should not access a file he/she doesn’t need Grant the minimum privileges and . . .

assign more under demand Grant only group level permissions

Assign a sensible file creation mask

umask 027 (rwx r-x ---), 022 (rwx r-x r-x)

Be aware of potentially dangerous files

with SetUID bit Holding system configuration

  • R. Serral-Gracià, et. al

Security 16

slide-17
SLIDE 17

Introduction About security Security components

Resource abuse

Excessive use of resources by a single user

CPU/processes Memory Disk

Set up limits and quotas

/etc/security/limits.conf ulimit disk quotas

  • R. Serral-Gracià, et. al

Security 17

slide-18
SLIDE 18

Introduction About security Security components

Filesystem integrity

Often attackers modify the filesystem to hide the attack

Modification of log files Rootkits

Tools to detect changes in the filesystem

Through digital signature of files

Partition/Devices in read-only

  • R. Serral-Gracià, et. al

Security 18

slide-19
SLIDE 19

Introduction About security Security components

System Logs

May contain information about the attacks

Permit to know if a system has been compromised Post-mortem analysis

Unsecure to store them on the same server

Better in a remote server Print them?

  • R. Serral-Gracià, et. al

Security 19

slide-20
SLIDE 20

Introduction About security Security components

Local security – Example

tiger: security auditing tool

$ sudo tiger Configuring... Will try to check using config for x86_64 running Linux 3.6.8...

  • -CONFIG-- [con005c] Using configuration files for Linux 3.6.8. Using

configuration files for generic Linux 3. Tiger security scripts *** 3.2.3, 2008.09.10.09.30 *** 11:21> Beginning security report for asuso.lomillor.org. 11:21> Starting file systems scans in background... 11:21> Checking password files... 11:21> Checking group files... 11:21> Checking user accounts... 11:29> Checking .rhosts files... 11:29> Checking .netrc files... 11:29> Checking ttytab, securetty, and login configuration files... 11:29> Checking PATH settings... 11:30> Checking anonymous ftp setup... 11:30> Checking mail aliases... 11:30> Checking cron entries... 11:30> Checking services configuration... 11:30> Checking NFS export entries... 11:30> Checking permissions and ownership of system files... 11:30> Checking for indications of break-in... 11:30> Performing rootkit checks... 11:37> Performing system specific checks... 12:12> Performing root directory checks... 12:12> Checking for secure backup devices... 12:12> Checking for the presence of log files... 12:12> Checking for the setting of user s umask... 12:12> Checking for listening processes... 12:12> Checking SSHD s configuration... 12:12> Checking the printers control file... 12:12> Checking ftpusers configuration... 12:12> Checking NTP configuration... 12:12> Waiting for filesystems scans to complete... 12:12> Filesystems scans completed... 12:12> Performing check of embedded pathnames... 12:14> Security report completed for asuso.lomillor.org. Security report is in /var/log/tiger/security.report.hostname.121204-11:21

  • R. Serral-Gracià, et. al

Security 20

slide-21
SLIDE 21

Introduction About security Security components

Exercise

Which issues might present if an attacker modifies the environment variables? (i.e., PATH)

  • R. Serral-Gracià, et. al

Security 21

slide-22
SLIDE 22

Introduction About security Security components

Network Security

Goal: Protect against attacks coming from the outside Aimed at:

The services we are offering The network itself The information our servers is keeping

  • R. Serral-Gracià, et. al

Security 22

slide-23
SLIDE 23

Introduction About security Security components

Network Security

Mandatory to use firewalls Two level security: Protected vs DMZ

Public services HTTP SMTP Private network

  • R. Serral-Gracià, et. al

Security 23

slide-24
SLIDE 24

Introduction About security Security components

Offered services

Security level depends on the offered services System and user information

finger, rdate, rusers, . . .

Remote login and connection

telnet, rlogin, rsh, . . .

File and data sharing

NFS, Samba, LDAP , FTP , HTTP , . . .

E-mail

  • R. Serral-Gracià, et. al

Security 24

slide-25
SLIDE 25

Introduction About security Security components

Network security

Minimum access policy Disable all the services

Or even uninstall them

Enable only the required services

and limit the access only to current users

Validate the configuration of the installed services Even if disabled

  • R. Serral-Gracià, et. al

Security 25

slide-26
SLIDE 26

Introduction About security Security components

Network security

Monitor the activity of the installed services nmap: list running services

$ nmap 10.1.1.1 Starting Nmap 6.00 ( http://nmap.org ) at 2012-12-04 12:03 CET Nmap scan report for 10.1.1.1 (10.1.1.1) Host is up (0.00031s latency). Not shown: 989 closed ports PORT STATE SERVICE 22/tcp

  • pen

ssh 25/tcp

  • pen

smtp 111/tcp

  • pen

rpcbind 139/tcp

  • pen

netbios-ssn 445/tcp

  • pen

microsoft-ds 631/tcp

  • pen

ipp 2049/tcp open nfs 3306/tcp open mysql 5900/tcp open vnc 8080/tcp open http-proxy 9090/tcp open zeus-admin

  • R. Serral-Gracià, et. al

Security 26

slide-27
SLIDE 27

Introduction About security Security components

Limit access to the services

Who has acces to what services? How to validate user identity

Through IP addresses? → IP Spoofing

Reverse DNS → DNS Spoofing User level – authentication, digital certificates, . . .

Service forwarding

ssh -R 12443:10.1.1.10:443 rserral@gw.ac.upc.edu ssh -L 443:gw.ac.upc.edu:12443 rserral@10.1.1.10

Kerberos

  • R. Serral-Gracià, et. al

Security 27

slide-28
SLIDE 28

Introduction About security Security components

Kerberos

Protocol used for network authentication Based on Secret key cryptography (password) Kerberos server is used as identity proof

Client contacts Key Distribution Center for a ticket

KDC encrypts a ticket using client’s passwd Client gets the ticket

The ticket enables access to specific services

Transparent for the user

  • R. Serral-Gracià, et. al

Security 28

slide-29
SLIDE 29

Introduction About security Security components

Intrusion Detection Systems (IDS)

Network based

Traffic analysis to search for attacks

Host based

System activity to search for attacks

logs, filesystem, . . .

  • R. Serral-Gracià, et. al

Security 29

slide-30
SLIDE 30

Introduction About security Security components

Security through obscurity

Not a very good security policy

Offers a false sense of security

Added security on an already secured environment Examples

Change web server version Change default ports for applications

  • R. Serral-Gracià, et. al

Security 30

slide-31
SLIDE 31

Introduction About security Security components

Contingency plan

Actuation protocol in case of system failure What to do? Who to notify? Using which information? It must be defined for each failure

Service failure Hardware failure Data center collapsing

Do simulations to prove its usefulness Accordingly to company policies

  • R. Serral-Gracià, et. al

Security 31

slide-32
SLIDE 32

Introduction About security Security components

Security tools

Local system configuration

titan tiger

Network system configuration

nmap nessus

IDS

tripwire snort locgcheck

  • R. Serral-Gracià, et. al

Security 32

slide-33
SLIDE 33

Introduction About security Security components

Some advice

Never be overconfident

There is always someone smarter

Be somewhat paranoid Be prepared for the worst

Backups Virtualization

Run attacks to your systems

Better yet from the outside

Be up to date

Security evolves constantly Security forums, newsletters, . . .

  • R. Serral-Gracià, et. al

Security 33

slide-34
SLIDE 34

Introduction About security Security components

Activitat

De la xarxa vista al final del tema de Xarxa indica:

On posaries el (o els) firewall Quines consideracions tindries a l’hora de configurar-los

Internet

Servidor 1 Client 11 Servidor 2 Client 1 Client 10 Client 25

  • R. Serral-Gracià, et. al

Security 34

slide-35
SLIDE 35

Introduction About security Security components

Activitat

Preguntes Indica si compraries algun equip mà c s a part dels equips de xarxa anteriors Distribueix els serveis entre tots els servidors Indica on instal·laries el (o els) firewall i quins criteris seguiries per configurar-los

  • R. Serral-Gracià, et. al

Security 35