Internet Security [1] VU 184.216. Engin Kirda engin@infosys.tuwien.ac.at



Similar documents
My FreeScan Vulnerabilities Report

Lesson 13: DNS Security. Javier Osuna GMV Head of Security and Process Consulting Division

1 Introduction: Network Applications

Introduction to Computer Security Benoit Donnet Academic Year

Using the Domain Name System for System Break-ins

Introduction to Computer Networks

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

The Application Layer. CS158a Chris Pollett May 9, 2007.

Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ MEng. Nguyễn CaoĐạt

Local DNS Attack Lab. 1 Lab Overview. 2 Lab Environment. SEED Labs Local DNS Attack Lab 1

Directory and File Transfer Services. Chapter 7

Proxies. Chapter 4. Network & Security Gildas Avoine

Firewall Server 7.2. Release Notes. What's New in Firewall Server 7.2

Articles Fighting SPAM in Lotus Domino

Motivation. Domain Name System (DNS) Flat Namespace. Hierarchical Namespace

1. LAB SNIFFING LAB ID: 10

CipherMail Gateway Quick Setup Guide

Configuring Security for SMTP Traffic

N-CAP Users Guide Everything You Need to Know About Using the Internet! How Firewalls Work

SMTP Servers. Determine if an message should be sent to another machine and automatically send it to that machine using SMTP.

How-to: DNS Enumeration

TELE 301 Network Management. Lecture 17: File Transfer & Web Caching

Applications and Services. DNS (Domain Name System)

Advanced Settings. Help Documentation

ECE 4321 Computer Networks. Network Programming

Securing an Internet Name Server

Part 5 DNS Security. SAST01 An Introduction to Information Security Martin Hell Department of Electrical and Information Technology

Mail agents. Introduction to Internet Mail. Message format (2) Authenticating senders

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

ISP Systems Design. ISP Workshops. Last updated 24 April 2013

Using Webmin and Bind9 to Setup DNS Sever on Linux

Cork Institute of Technology Master of Science in Computing in Education National Framework of Qualifications Level 9

Linux Network Security

Secure Software Programming and Vulnerability Analysis

The Trivial Cisco IP Phones Compromise

Linux MDS Firewall Supplement

BorderWare Firewall Server 7.1. Release Notes

ENTERPRISE LINUX NETWORKING SERVICES

CS5008: Internet Computing

Simple Mail Transfer Protocol

Application Firewalls

Module 2. Configuring and Troubleshooting DNS. Contents:

GL275 - ENTERPRISE LINUX NETWORKING SERVICES

General Network Security

How to Configure the Windows DNS Server

The Application Layer: DNS

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

SPAMfighter SMTP Anti Spam Server

GL-275: Red Hat Linux Network Services. Course Outline. Course Length: 5 days

DNS. Computer Networks. Seminar 12

Chakchai So-In, Ph.D.

. Daniel Zappala. CS 460 Computer Networking Brigham Young University

Introduction. -- some basic concepts and terminology -- examples for attacks on protocols -- main network security services

Firewalls. Firewalls. Idea: separate local network from the Internet 2/24/15. Intranet DMZ. Trusted hosts and networks. Firewall.

P and FTP Proxy caching Using a Cisco Cache Engine 550 an

Services Deployment. Administrator Guide

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

Internet Technology 2/13/2013

How to Add Domains and DNS Records

How To Block Ndr Spam

20-CS X Network Security Spring, An Introduction To. Network Security. Week 1. January 7

VIDEO Intypedia013en LESSON 13: DNS SECURITY. AUTHOR: Javier Osuna García-Malo de Molina. GMV Head of Security and Process Consulting Division

The basic groups of components are described below. Fig X- 1 shows the relationship between components on a network.

Glossary of Technical Terms Related to IPv6

Installation Guide For Choic Enterprise Edition

"Charting the Course... Enterprise Linux Networking Services Course Summary

FTP e TFTP. File transfer protocols PSA1

3. The Domain Name Service

Hosted CanIt. Roaring Penguin Software Inc. 26 April 2011

Building a Linux IPv6 DNS Server

Cisco Secure PIX Firewall with Two Routers Configuration Example

Networking Domain Name System

Cannot send Autosupport , error message: Unknown User

DNS Pharming Attack Lab

ENTERPRISE LINUX NETWORKING SERVICES

Installing GFI MailSecurity

HTG XROADS NETWORKS. Network Appliance How To Guide: EdgeDNS. How To Guide

Transferring Your Internet Services

Botnets. Botnets and Spam. Joining the IRC Channel. Command and Control. Tadayoshi Kohno

Coordinación. The background image of the cover is desgned by GUIDE TO DNS SECURITY 2

Domain Name Server. Training Division National Informatics Centre New Delhi

Mail Avenger. David Mazières New York University

Computer Networks: DNS a2acks CS 1951e - Computer Systems Security: Principles and Prac>ce. Domain Name System

How To Guide Edge Network Appliance How To Guide:

on the RaQ 3. General. server. Services

OCS Training Workshop LAB14. Setup

Penetration Testing with Kali Linux

FAQ (Frequently Asked Questions)

Securing DNS Infrastructure Using DNSSEC

Domain Name System Security

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

REPORT ON AUDIT OF LOCAL AREA NETWORK OF C-STAR LAB

QMAIL & SMTP: A Secure Application for an Unsecure Protocol. Orr Dunkelman. orrd@vipe.technion.ac.il. January 27, 2004 SMTP and QMAIL Slide 1

Introduction to DNS CHAPTER 5. In This Chapter

HowTo: Logging, reporting, log-analysis and log server setup Version 2007nx Release 3. Log server version 2.0

F-Secure Messaging Security Gateway. Deployment Guide

Transcription:

Internet Security [1] VU 184.216 Engin Kirda engin@infosys.tuwien.ac.at Christopher Kruegel chris@auto.tuwien.ac.at

Administration Challenge 2 deadline is tomorrow 177 correct solutions Challenge 4 will be issued next week (around 10th May) first real programming assignment (Java) simple SMTP engine demonstrates how easily email information can be spoofed Internet Security 1 2

Internet Application Security

Internet Applications Traditional services emerged to satisfy needs from the beginning of the Internet often no (or little) security in mind mail transfer (SMTP) name resolution (DNS) file transfer (FTP) remote access (telnet, rservices) Secure replacements introduced to address problems in traditional protocols remote access (ssh) file transfer (scp) Internet Security 1 4

SMTP Simple Mail Transfer Protocol (SMTP) initially specified in RFC 821 de facto standard for email transmission simple, text-based protocol MIME used to encode binary files (attachments) listens on port 25 push protocol (used to exchange emails between servers) clients have to retrieve emails via other protocols such as IMAP or POP Internet Security 1 5

SMTP Session S: 220 www.example.com ESMTP Postfix C: HELO mydomain.com S: 250 Hello mydomain.com C: MAIL FROM: sender@mydomain.com S: 250 Ok C: RCPT TO: friend@example.com S: 250 Ok C: DATA S: 354 End data with <CR><LF>.<CR><LF> C: Subject: test message C: From: sender@mydomain.com C: To: friend@example.com C: C: Hello, C: This is a test. C: Goodbye. C:. S: 250 Ok: queued as 12345 C: QUIT S: 221 Bye Internet Security 1 6

SMTP Security Issues mail servers have wide distribution base and are publicly accessible software vulnerabilities configuration errors sendmail one of the first SMTP implementations (MTAs) long history of vulnerabilities complicated configuration (M4 macro language) e.g., buffer overflow in Sendmail 8.12.9 and before (2003) postfix, qmail secure replacements no authentication of sender is performed huge problem makes unsolicited email such a problem Internet Security 1 7

SMTP Lack of authentication everyone can connect to a SMTP server and transmit a message server cannot check sender identity (besides IP address) Mail relay server accepts message that does not appear to be either for a local address or from a local sender Solutions for authentication SMTH-AUTH access control list with explicit login clients must be aware of SMTP-AUTH POP-before-SMTP logins are simulated by POP request (which require a login) when a client performs a POP request, its IP address is authenticated with the SMTP server for some time (e.g., 30 minutes) Internet Security 1 8

SPAM Unsolicited email message Gather destination email addresses brute force guessing harvesting (web pages, mailing lists, news groups, ) verified address are more valuable (social engineering, web bug) Delivering spam messages own machine (not very smart) other machines open mail relays open proxies web forms zombie nets (compromised machines) Internet Security 1 9

SPAM Countermeasures client filter tools (e.g., SpamAssassin) automatic report systems blacklists identify origins of spam messages and quickly distribute this information infrastructure Sender ID resulted from a merge between SPF (sender policy framework) and Caller-ID works by adding reverse MX records for a domain only listed machines can send email from this domain Internet Security 1 10

DNS Domain Name Service (DNS) initially specified in RFC 1034/1035 distributed database that maps names into IP addresses and vice versa name space is hierarchically divided in domains each domain is managed by a name server clients access name server resolution services through the resolver library uses mostly UDP sometimes TCP for long queries and TCP for zone transfers between name servers Internet Security 1 11

DNS..edu..com..at..example.com..amazon.com..subdomain.example.com. Internet Security 1 12

Name Server Name servers are responsible for mapping names of a domain example subdomain.domain.com is managed by dns.subdomain.domain.com domain.com is managed by master.domain.com Root name servers 13 machines distributed around the world associated with the top level of the hierarchy dispatch queries to the appropriate domains Server types primary (authorative for the domain, loads data from disk) secondary (backup servers, get data through zone transfers) caching-only (relies on other servers but caches results) forwarding (simply forwards query to other servers) Internet Security 1 13

Name Server A server that cannot answer a query forwards the query up in the hierarchy Then, the search is following the correct branch in the hierarchy down to the authorative server The results are usually maintained in a local cache Reverse lookup mapping from IP addresses to names also called pointer queries use dedicated branch in name space starting with ARPA.IN-ADDR example if 128.131.172.79 is resolved, this is mapped into 79.172.131.128.in-addr.arpa Internet Security 1 14

DNS Clients At least one name server has to be specified e.g., Linux uses /etc/resolv.conf Queries can be recursive require a name server to find the answer to the query itself iterative instead of the resolved name another server s address is returned, which can be asked Lookup can be performed with nslookup, host, dig Internet Security 1 15

DNS Data unique message format for requests and replies contains questions, answers, authorative information DNS data is structured in Resource Records, which store the information. Different types of RR exist: A HINFO NS MX defines an IP address for domain name host information (CPU, OS) authorative name server for domain mail server for domain Internet Security 1 16

Zone Transfer Info nslookup... ls -d infosys.tuwien.ac.at. [tunamea.tuwien.ac.at] $ORIGIN infosys.tuwien.ac.at. @ 1D IN SOA uhura.kom.tuwien.ac.at. hostmaster.noc.tuwien.ac.at. ( 1985 ; serial 8H ; refresh 2H ; retry 1W ; expiry 1D ) ; minimum 1D IN NS tunamea.tuwien.ac.at. 1D IN NS tunameb.tuwien.ac.at. 1D IN MX 25 nfs1 amd01 1D IN A 128.131.172.56 amd02 1D IN A 128.131.172.68 amd03 1D IN A 128.131.172.69 Internet Security 1 17

DNS Security Issues DNS often provides rich information IP addresses HINFO records WKS can be gathered via exhaustive queries or via zone transfers IP scanning is not necessary in many cases DNS hijacking Simple DNS spoofing DNS cache poisoning Daemon vulnerabilities BIND named has a bad security history latest problem was a buffer overflow in 2002 Internet Security 1 18

DNS Hijacking Relies on the fact the UDP is used Usually, attacker has to see DNS requests Respond to a request with incorrect data Respond faster than legitimate server It is possible to perform DNS Hijacking by racing with the server with respect to a client racing with a server with respect to another server Blind DNS hijacking requires to guess the request ID many implementations use sequential numbers Internet Security 1 19

Simple DNS Spoofing Used when authentication is performed based on DNS names with reverse lookup e.g. trusted.example.com may login using rlogin without specifying a username/password Concept a DNS query is forwarded to the authorative DNS server for the IP address that logs in (under control of the attacker) this DNS server replies with the (faked) trusted name Internet Security 1 20

Simple DNS Spoofing 128.130.2.1 Gateway 128.130.2.10 Host C 128.130.2.2 DNS Server Internet 172.111.0.11 Host A Gateway 172.111.0.2 DNS Server Host B Internet Security 1 21

Simple DNS Spoofing Host C (128.130.2.10) opens a TCP connection to Host A (172.111.0.11) Server A asks its DNS server (172.111.0.2) to look up the address 128.130.2.10 A s DNS server can t resolve this address and forwards the query C s DNS server (128.130.2.3) gets the request and returns a reply with a wrong name (e.g. trusted.example.com) A gets from its DNS server the answer that 128.130.2.10 is trusted.example.com and allows C to log in without password Internet Security 1 22

Simple DNS Spoofing Countermeasure use double reverse lookup given the IP address i obtain the name n using name n, obtain IP address j check if i=j Internet Security 1 23

DNS Cache Poisoning This attack exploits a bug in some implementations of BIND A server stores in the cache anything that is contained in a DNS reply A malicious DNS server returns additional answers that are stored in the cache (preferably with a long TTL) Some implementations will even accept answer records in DNS requests, caching the information Attacker can control IP address mappings Traffic redirection and man-in-the-middle attacks possible Internet Security 1 24

FTP File Transfer Protocol (FTP) initially specified in RFC 542 provides file transfer service based on TCP client / server architecture client (ftp) sends a connection request to the server (ftpd) server is listening on port 21 client provides username and password to authenticate client uses the GET and PUT commands to transfer files Internet Security 1 25

FTP Control stream and data streams are used control stream for commands data stream for the actual data that is transmitted Client tells the server to connect to one of its local ports using the PORT command Server opens a connection from port 20 to the port specified by the client Transfer is executed and the connection is closed Internet Security 1 26

FTP Protocol Client (a.b.c.d) x x username enter password 21 21 Server (g.h.i.j) e*256+f x x x x x password OK PORT a,b,c,d,e,f 200 Port OK RETR file name file data 21 21 21 21 21 20 Internet Security 1 27

Passive FTP Client (a.b.c.d) x x x x password OK PASV PASSIVE g,h,i,j,k,l 21 21 21 21 Server (g.h.i.j) y x y open connection RETR file name file data k*256+l 21 k*256+l Internet Security 1 28

Writable FTP Home Can be abused to write files into home directories that are normally used for authentication (e.g. rhosts) If an anonymous user is allowed to put such a file in the home directory he can get access to the computer, using a file that contains + + ftp to a site, put the file dummy in the home directory (as.rhosts) and then rlogin -l ftp target.com ftp@target.com:/usr/local/ftp> ls In general, the access of the file system via ftp should be minimized Internet Security 1 29

PASV Connection Theft Attacker can connect to port that was opened by server before the legitimate client does Since the command connection is still established, client commands lead to file transfers between attacker and server Internet Security 1 30

FTP Bounce The PORT command is used by the client to tell the server the address and port to be used when opening a data connection According to the RFC 959 the address does not have to be the same as the one the client has idea is to allow transfers between two hosts without having to go through the client Therefore it is possible to instruct a server to open a connection to a third host Internet Security 1 31

FTP Bounce Can be used to perform a TCP portscan The host running ftpd appears to be the source of the scan It is possible to scan behind a firewall (suppose that only port 21 and 20 are open at the firewall) Can be used to send data to arbitrary ports if an FTP writable directory exists, a file can be transferred to a third host can be used to bypass restrictions (IP based authentication) connection laundry Internet Security 1 32

Remote Access telnet, rlogin horrible security plaintext passwords connection hijacking (hunt) fortunately, it is virtually not used anymore ssh secure replacement ssh version 1 insecure because of possibility to insert data into remote stream ssh version 2 is current, and should be used Internet Security 1 33

Conclusions Traditional Internet applications not built with security in mind some could be easily replaced (telnet, rservices) others cause significant problems SMTP sender authentication DNS simple UDP-based request / reply structure root server bottleneck (denial of service danger) FTP transfer modes using different connections and port combination difficult to firewall connection laundry and bouncing attacks Internet Security 1 34