1 hepix umeå may 25-29 2009 security auditing of mail services at infn diy auditing ombretta...

18
1 HEPIX Umeå May 25-29 2009 SECURITY AUDITING SECURITY AUDITING OF MAIL SERVICES OF MAIL SERVICES AT INFN AT INFN DIY DIY AUDITING AUDITING Ombretta Pinazza , on behalf of INFN Mailing and Security WG Fulvia Costa, Francesco Ferrera, Diego Leanza, Alessia Spitaleri Patrizia Belluomo , Franco Brasolin, Roberto Cecchini, Michele Michelotto

Upload: gervase-mccoy

Post on 04-Jan-2016

226 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: 1 HEPIX Umeå May 25-29 2009 SECURITY AUDITING OF MAIL SERVICES AT INFN DIY AUDITING Ombretta Pinazza, on behalf of INFN Mailing and Security WG Fulvia

1

HEPIX UmeåMay 25-29 2009

SECURITY AUDITING SECURITY AUDITING OF MAIL SERVICES OF MAIL SERVICES AT INFN AT INFN

DIY DIY AUDITINGAUDITING

Ombretta Pinazza, on behalf of INFN Mailing and Security WGFulvia Costa, Francesco Ferrera, Diego Leanza, Alessia SpitaleriPatrizia Belluomo , Franco Brasolin, Roberto Cecchini, Michele Michelotto

Page 2: 1 HEPIX Umeå May 25-29 2009 SECURITY AUDITING OF MAIL SERVICES AT INFN DIY AUDITING Ombretta Pinazza, on behalf of INFN Mailing and Security WG Fulvia

2

O. Pinazza HEPIX Umeå, May 25-29, 2009

Contents

Project description Why security auditing Contingencies and planning

Methodology From the first phase toward a regular

procedure Results

Security overview Feedback from the sites

Conclusions

Page 3: 1 HEPIX Umeå May 25-29 2009 SECURITY AUDITING OF MAIL SERVICES AT INFN DIY AUDITING Ombretta Pinazza, on behalf of INFN Mailing and Security WG Fulvia

3

O. Pinazza HEPIX Umeå, May 25-29, 2009

Why auditing? How?

It’s required by the italian laws for public organizations

As a service for the INFN community As an opportunity for our working groups The overall procedure shall be systematic and

well documented

PolicyPolicy

AuditAudit

EvidenceEvidence

ActionsActions ReportReport

AssessmentAssessment

Page 4: 1 HEPIX Umeå May 25-29 2009 SECURITY AUDITING OF MAIL SERVICES AT INFN DIY AUDITING Ombretta Pinazza, on behalf of INFN Mailing and Security WG Fulvia

4

O. Pinazza HEPIX Umeå, May 25-29, 2009

External/Internal auditing

Professional auditors are extremely expensive

A cross-sites analysis using common parameters could be comparable to an external view

Local admins take care of monitoring and internal auditing

UNIBO

Ssh, dns, scanmail scan

Page 5: 1 HEPIX Umeå May 25-29 2009 SECURITY AUDITING OF MAIL SERVICES AT INFN DIY AUDITING Ombretta Pinazza, on behalf of INFN Mailing and Security WG Fulvia

5

O. Pinazza HEPIX Umeå, May 25-29, 2009

Objectives - expectations

Act in advance on emergencies: attacks to DNS, conficker worm, bugs and vulnerabilities

A step toward a common security policy Feedback from site administrators First results

Screenshot of the publicly visible services Identified several misconfigured and

vulnerable services

Page 6: 1 HEPIX Umeå May 25-29 2009 SECURITY AUDITING OF MAIL SERVICES AT INFN DIY AUDITING Ombretta Pinazza, on behalf of INFN Mailing and Security WG Fulvia

6

O. Pinazza HEPIX Umeå, May 25-29, 2009

Phase one

SSH Vulnerable versions Filter policies (firewall, bastion hosts, …)

HTTP and HTTPS PHP and apache vulnerabilities Several public servers Unconfigured servers, open DBs, wikis, …

DNS Root queries Recursive queries Vulnerabilities (Debian, …)

Conficker

Security Auditing

WG

Page 7: 1 HEPIX Umeå May 25-29 2009 SECURITY AUDITING OF MAIL SERVICES AT INFN DIY AUDITING Ombretta Pinazza, on behalf of INFN Mailing and Security WG Fulvia

7

O. Pinazza HEPIX Umeå, May 25-29, 2009

Mail services

not only OS or software vulnerabilities check for misconfigured servers, open

relays, explicit banners, unauthorized services

dangerous ESMTP features SMTP AUTH

Mailing Auditing

WG

Page 8: 1 HEPIX Umeå May 25-29 2009 SECURITY AUDITING OF MAIL SERVICES AT INFN DIY AUDITING Ombretta Pinazza, on behalf of INFN Mailing and Security WG Fulvia

8

O. Pinazza HEPIX Umeå, May 25-29, 2009

Methodology 1

Define the hosts subset to be analyzed MX query to all DNS servers to build the list of official mail servers Nmap scan of all INFN subnets to reveal open “mailing” services Sys admin indication

Analysis of the mailing services TCL scripts managing the connection and saving the dialog in a file Perl scripts handling ssl and starttls connections Perl scripts parsing output files and recognizing problems

SMTP Banner, exposed information, ESMTP features SMTP/SSL: port 25 or 465, INFN CA or self cert., features STARTTLS (587/tcp) SMTP AUTH

Page 9: 1 HEPIX Umeå May 25-29 2009 SECURITY AUDITING OF MAIL SERVICES AT INFN DIY AUDITING Ombretta Pinazza, on behalf of INFN Mailing and Security WG Fulvia

9

O. Pinazza HEPIX Umeå, May 25-29, 2009

Methodology 2

The aim is to verify if multiple services are available on the same host

Mailboxes POP, POPS IMAP, IMAPS

Other services HTTP, HTTPS LDAP POPPASSD

Page 10: 1 HEPIX Umeå May 25-29 2009 SECURITY AUDITING OF MAIL SERVICES AT INFN DIY AUDITING Ombretta Pinazza, on behalf of INFN Mailing and Security WG Fulvia

10

O. Pinazza HEPIX Umeå, May 25-29, 2009

Methodology 3

Reporting Global document with an evaluation of the

security level, containing recommendations for the sites, based on common policies

Detailed modular reports on a web site with restricted access

Instructions, help and configuration documents

WIP Needs of an organized database Automatize data collection and analysis, and

scan comparison

Page 11: 1 HEPIX Umeå May 25-29 2009 SECURITY AUDITING OF MAIL SERVICES AT INFN DIY AUDITING Ombretta Pinazza, on behalf of INFN Mailing and Security WG Fulvia

11

O. Pinazza HEPIX Umeå, May 25-29, 2009

Results 1

SSH 3048 server open High severity problems (Nessus):

Scan dateScan date NumberNumberNov 2008Nov 2008 8989

Dec 2008Dec 2008 5555

Jan 2009Jan 2009 5959

34 sites (*.infn.it)

151 subnets (B/C/trunks)

110.000 IPs 8.800

scanned

Page 12: 1 HEPIX Umeå May 25-29 2009 SECURITY AUDITING OF MAIL SERVICES AT INFN DIY AUDITING Ombretta Pinazza, on behalf of INFN Mailing and Security WG Fulvia

12

O. Pinazza HEPIX Umeå, May 25-29, 2009

Results 2

DateDateRecursive Recursive queriesqueries Root queriesRoot queries

offoffokok nono okok nono

Jan Jan 20092009

2929 3131 ?? ?? 00

Feb Feb 20092009

4343 1818 3737 2424 44

Mar Mar 20092009

5252 1010 4949 1313 33

DNS 65 official servers per 34 sites

Page 13: 1 HEPIX Umeå May 25-29 2009 SECURITY AUDITING OF MAIL SERVICES AT INFN DIY AUDITING Ombretta Pinazza, on behalf of INFN Mailing and Security WG Fulvia

13

O. Pinazza HEPIX Umeå, May 25-29, 2009

Results 3

Scan dateScan dateweb serversweb servers

total numbertotal numberHigh severity High severity

problemsproblems

Medium Medium severity severity

problemsproblems

Low severity Low severity or no or no

problemsproblems

Mar 2008Mar 2008 11931193 218218 576576 399399

May 2009May 2009 12521252 199199 557557 496496

Web servers - spring 2008

9 9

4 4 4

2 2

0

2

4

6

8

10

12

1-10

11-20

21-30

31-40

41-50

51-100

mo

re

Sit

es

Web servers - spring 2009

8

13

34

1

3

1

0

2

4

6

8

10

12

1-10

11-20

21-30

31-40

41-50

51-100

mo

re

Sit

es

Web (HTTP and HTTPS)

Page 14: 1 HEPIX Umeå May 25-29 2009 SECURITY AUDITING OF MAIL SERVICES AT INFN DIY AUDITING Ombretta Pinazza, on behalf of INFN Mailing and Security WG Fulvia

14

O. Pinazza HEPIX Umeå, May 25-29, 2009

Results 4

CensusCensus20072007

CensusCensus20082008

Scan Scan 20092009

Hosts 71* 80* 150

Avg per site 2.7 3.1 4.4

* Census: declared by sites admins

Mailing services

Page 15: 1 HEPIX Umeå May 25-29 2009 SECURITY AUDITING OF MAIL SERVICES AT INFN DIY AUDITING Ombretta Pinazza, on behalf of INFN Mailing and Security WG Fulvia

15

O. Pinazza HEPIX Umeå, May 25-29, 2009

Results 5

Services distribution over 150 hosts

mailbox only 35 (24%)

SMTP 103(69%)

SMTP + WEB 6 (4%)

SMTP + mailbox 15 (10%)

SMTP + mailbox + WEB

16 (11%)

SMTP only 66 (64%, 44% of all

hosts)mailbox + WEB 9 (6%)

WEB only 1 (1%)

Page 16: 1 HEPIX Umeå May 25-29 2009 SECURITY AUDITING OF MAIL SERVICES AT INFN DIY AUDITING Ombretta Pinazza, on behalf of INFN Mailing and Security WG Fulvia

16

O. Pinazza HEPIX Umeå, May 25-29, 2009

Results 6

3434 INFN sitesINFN sites 150150 HostsHosts

22 (64%) SMTP AUTH 55 MX

11 (32%) SMTP/SSL on 465

77 SMTP

Security evaluation of mail servicesSecurity evaluation of mail services

14 (41%) 35 (23%)

7 (21%) 10 (7%)

13 (38%) 4 (3%)High severity problems (bugged version, open relay, clear text auth, …)Medium severity problems (unconf. web, dangerous ESMTP feat., …)not working (official MX off, wrong IP/name corresp. on DNS, …)ok

Page 17: 1 HEPIX Umeå May 25-29 2009 SECURITY AUDITING OF MAIL SERVICES AT INFN DIY AUDITING Ombretta Pinazza, on behalf of INFN Mailing and Security WG Fulvia

17

O. Pinazza HEPIX Umeå, May 25-29, 2009

Conclusions

Positive feedback from sites admins: 74% sites have promptly checked their reports Sent corrections, comments, requests Several colleagues have intervened

immediately to patch and protect their systems

This self made analysis can represent a starting base for an organized auditing procedure

INFN is trying to hire an IT graduate to carry on with the auditing activity

Page 18: 1 HEPIX Umeå May 25-29 2009 SECURITY AUDITING OF MAIL SERVICES AT INFN DIY AUDITING Ombretta Pinazza, on behalf of INFN Mailing and Security WG Fulvia

18

O. Pinazza HEPIX Umeå, May 25-29, 2009

Thanks

Security auditing group: Roberto Cecchini, Franco Brasolin, Michele

Michelotto, Patrizia Belluomo Mailing auditing group:

Fulvia Costa, Franco Ferrera, Diego Leanza, Alessia Spitaleri