Application Security: Web service and

Slides:



Advertisements
Similar presentations
Application Security: General apps &Web service
Advertisements

1 Configuring Internet- related services (April 22, 2015) © Abdou Illia, Spring 2015.
How Clients and Servers Work Together. Objectives Web Server Protocols Examine how server and client software work Use FTP to transfer files Initiate.
1 Configuring Web services (Week 15, Monday 4/17/2006) © Abdou Illia, Spring 2006.
Information Networking Security and Assurance Lab National Chung Cheng University The Ten Most Critical Web Application Security Vulnerabilities Ryan J.W.
Application Security Chapter 8 Copyright Pearson Prentice Hall 2013.
Application Layer  We will learn about protocols by examining popular application-level protocols  HTTP  FTP  SMTP / POP3 / IMAP  Focus on client-server.
HTTP Overview Vijayan Sugumaran School of Business Administration Oakland University.
1 The World Wide Web. 2  Web Fundamentals  Pages are defined by the Hypertext Markup Language (HTML) and contain text, graphics, audio, video and software.
Chapter 9 Collecting Data with Forms. A form on a web page consists of form objects such as text boxes or radio buttons into which users type information.
11 SECURING INTERNET MESSAGING Chapter 9. Chapter 9: SECURING INTERNET MESSAGING2 CHAPTER OBJECTIVES  Explain basic concepts of Internet messaging. 
Copyright © Texas Education Agency, All rights reserved.1 Web Technologies Web Administration.
Web Servers Web server software is a product that works with the operating system The server computer can run more than one software product such as .
1 Application Security: Electronic Commerce and Chapter 9 Copyright 2003 Prentice-Hall.
Application Security: Web service and (April 11, 2011) © Abdou Illia – Spring 2011.
Application Security: General apps &Web service (April 11, 2012) © Abdou Illia – Spring 2012.
Chapter 1: Introduction to Web
MCSE Guide to Microsoft Exchange Server 2003 Administration Chapter Four Configuring Outlook and Outlook Web Access.
CP476 Internet Computing Lecture 5 : HTTP, WWW and URL 1 Lecture 5. WWW, HTTP and URL Objective: to review the concepts of WWW to understand how HTTP works.
Web application architecture
1 Application Security: Electronic Commerce and Chapter 9 Panko, Corporate Computer and Network Security Copyright 2004 Prentice-Hall.
 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 21 - Web Servers (IIS, PWS and Apache) Outline 21.1 Introduction 21.2 HTTP Request Types 21.3.
OSI and TCP/IP Models And Some Vulnerabilities AfNOG th May 2011 – 10 th June 2011 Tanzania By Marcus K. G. Adomey.
1 Internet Browsing Vulnerabilities and Security ECE4112 Final Lab Ye Yan Frank Park Scott Kim Neil Joshi.
IIS Security Sridurga Mavram. Contents -Introduction -Security Consideration -Creating a web page -Drawbacks -Security Tools -Conclusion -References.
FTP Server and FTP Commands By Nanda Ganesan, Ph.D. © Nanda Ganesan, All Rights Reserved.
1 Application Security: Electronic Commerce and Chapter 9 Copyright 2003 Prentice-Hall.
Kingdom of Saudi Arabia Ministry of Higher Education Al-Imam Muhammad Ibn Saud Islamic University College of Computer and Information Sciences Chapter.
Application Layer Khondaker Abdullah-Al-Mamun Lecturer, CSE Instructor, CNAP AUST.
Application Services COM211 Communications and Networks CDA College Theodoros Christophides
Security Technology Clients and Mail Servers
1 Figure 9-6: Security Technology  Clients and Mail Servers (Figure 9-7) Mail server software: Sendmail on UNIX, Microsoft Exchange,
Application Security: (April 10, 2013) © Abdou Illia – Spring 2013.
TCP/IP (Transmission Control Protocol / Internet Protocol)
Saving State on the WWW. The Issue  Connections on the WWW are stateless  Every time a link is followed is like the first time to the server — it has.
1 WWW. 2 World Wide Web Major application protocol used on the Internet Simple interface Two concepts –Point –Click.
1 Figure 9-3: Webserver and E-Commerce Security Importance of Webservice and E-Commerce Security  Cost of disruptions  The cost of loss of reputation.
Internet Applications (Cont’d) Basic Internet Applications – World Wide Web (WWW) Browser Architecture Static Documents Dynamic Documents Active Documents.
ASP-2-1 SERVER AND CLIENT SIDE SCRITPING Colorado Technical University IT420 Tim Peterson.
1 Figure 9-3: Webserver and E-Commerce Security Browser Attacks  Take over a client via the browser Interesting information on the client Can use browser.
What’s Really Happening
1 Chapter 1 INTRODUCTION TO WEB. 2 Objectives In this chapter, you will: Become familiar with the architecture of the World Wide Web Learn about communication.
Tonga Institute of Higher Education IT 141: Information Systems
Block 5: An application layer protocol: HTTP
Internet Business Associate v2.0
Instructor Materials Chapter 5 Providing Network Services
WWW and HTTP King Fahd University of Petroleum & Minerals
HTTP – An overview.
Networking CS 3470, Section 1 Sarah Diesburg
K. K. Mookhey Network Intelligence India Pvt. Ltd.
Web Development Web Servers.
Warm Handshake with Websites, Servers and Web Servers:
E-commerce | WWW World Wide Web - Concepts
E-commerce | WWW World Wide Web - Concepts
SUBMITTED BY: NAIMISHYA ATRI(7TH SEM) IT BRANCH
PHP / MySQL Introduction
Tutorial (4): HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
IS333D: MULTI-TIER APPLICATION DEVELOPMENT
Topic 5: Communication and the Internet
Chapter 27 WWW and HTTP.
Application Security: General apps &Web service
Tonga Institute of Higher Education IT 141: Information Systems
Configuring Internet-related services
Networking CS 3470, Section 1 Sarah Diesburg
Format String.
Tonga Institute of Higher Education IT 141: Information Systems
William Stallings Data and Computer Communications
Chapter 7 Network Applications
Web Servers (IIS and Apache)
Web Application Development Using PHP
Presentation transcript:

Application Security: Web service and E-Mail (April 11, 2011) © Abdou Illia – Spring 2011

Learning Objectives Discuss general Application security Discuss Webservice/E-Commerce security Discuss E-Mail security

General Applications Security Issues

Applications Security Issues Few Operating Systems But Many Applications Because OS are harden, most attacks target applications installed on servers. Many applications run with administrative or super user (root) privileges Securing applications is challenging Buffer Overflow Attacks Most widespread vulnerabilities in application programs Buffers are RAM areas where data is stored temporarily If an attacker sends more data than the programmer had allocated to a buffer, a buffer might overflow, overwriting an adjacent section of RAM RAM Buffer1 Buffer2 Buffer3 Buffer4 Buffer5 Buffer6 Buffer7

Buffer Overflow The overflowsample function: Declares a buffer array capable of holding eight ASCII characters Places the buffer in an initialization loop The loop force-feeds 15 “x” into the buffer array through programming error Only 8 “x” could fit Nine “x” must spill over A function written in C void overflowsample (void) { char buffer1[8]; int I; For (I = 0; I < 16; I++) { buffer1[I] = ‘x’; } } When the program is run… What will be the value of buffer1[3]? _____, Buffer1[15]? _____ What would happen? The part of the function’s code designed to check the bounds of the array will prevent any error from happening. The program will generate an error and terminate.

Buffer Overflow Int main() { char name[8]; char etc_passwd[8]; char password[8]; // retrieve the user information printf (“Enter your name:”); gets (name); etc_passwd = get_password (name); printf (“Enter your password:”); gets (password); printf (“Your name and password entries were %s and %s.”, name, password); printf (“The password for %s In the /etc/shadow file Is %s”’ name, etc_passwd); // call procedure to check login authorization authenticate (password, etc_password); return 0; } void authenticate (char * string1, char string2) { char buffer1[8]; char buffer2[8]; strcpy (buffer1, string1); strcpy (buffer2, string2); if (strcmp (buffer1, buffer2) == 0 permit(); }

Buffer Overflow

Stack Entry and Buffer Overflow Stack entry: data buffer & Return address registry 2. Add Data to Buffer 1. Write Return Address Return Address 5. Start of Attacker data Data Buffer 3. Direction of Data Writing 4. Overwrite Return Address When a program must put one subprogram on hold to call another, it writes the return address in RAM areas called stack entries The called subprogram may add data to the buffer to the point it overwrites the return address If the added buffer data is Attack code, this will be a buffer overflow attack http://www.metacafe.com/watch/1452134/buffer_overflow_attacks_explained_with_beer/

Buffer Overflow Attack Occurs when ill-written programs allow data destined to a memory buffer to overwrite instructions in adjacent memory register that contains instructions. If the data contains malware, the malware could run and creates a DoS Example of input data: ABCDEF LET JOHN IN WITHOUT PASSWORD Buffer Instructions 1 2 3 4 5 6 Print Run Program Accept input Buffer Instructions 1 2 3 4 5 6 A B C D E F LET JOHN IN WITHOUT PASSWORD Run Program Accept input 9 9

Preventing Buffer Overflow Use Language tools that provide automatic bounds checking such as Perl, Python, and Java instead lower level language (C, C++, Assembly, etc). However, this is usually not possible or practical because almost all modern OS are written in the C language. Eliminate The Use Of Flawed Library Functions like gets(), strcpy, and strcmp that fail to check the length or bounds of their arguments. Design And Build Security Within Code Use Source Code Scanning Tools. Example: PurifyPlus Software Suite can perform a dynamic analysis of Java, C, or C++ source code. For instance, this simple change informs strcpy() that it only has an eight byte destination buffer and that it must discontinue raw copy at eight bytes. // replace le following line Strcpy (buffer2, strng2); // by Strcpy (buffer2, string2, 8)

General Application Security Minimize number of applications Fewer applications on a computer, fewer attack opportunities Use security baselines for installation Security baselines improve security Add application layer authentication Important for sensitive applications Could be password-based Implement cryptographic systems

Web service security

Webservice Versus E-Commerce Webservice includes basic functionalities for Retrieval of static files Creation of dynamic webpages E-Commerce requires additional software for Online catalogs Shopping carts Connection to back-end database Connection to organizations for payments, etc. E-Commerce Software Webserver Software (IIS, Apache, etc.) Subsidiary E-Commerce Software Component (DHTML, etc.) Custom Programs (in client-side scripting)

Webservice Versus E-Commerce Web applications could be the target of many types of attacks like: Directory browsing Traversal attacks Web defacement Using HTTP proxy to manipulate interaction between client and server IIS IPP Buffer Overflow Browser attacks Time configuration

Web sites’ directory browsing Web server with Directory Browsing disabled User cannot get access to list of files in the directory by knowing or guessing directory names

Web site with directory browsing Web server with Directory Browsing enabled User can get access to the list of files in the directory by knowing or guessing directory names

Traversal Attack Normally, paths start at the WWW root directory Adding ../ might take the attacker up a level, out of the WWW root box If attacker traverses to Command Prompt directory in Windows 2000 or NT, can execute any command with system privileges

Traversal Attacks (Cont.) Preventing traversal attacks Companies filter out / and \ using URL scanning software Attackers respond with hexadecimal and UNICODE representations for / and \ ASCII Character Chart with Decimal, Binary and Hexadecimal Conversions Name Character Code Decimal Binary Hex Null NUL Ctrl @ 00000000 00 Start of Heading SOH Ctrl A 1 00000001 01 Space 32 00100000 20 Exclamation Point ! Shift 1 33 00100010 22 Plus + Shift = 43 00101011 2B Period . 46 00101110 2E Forward Slash / 47 00101111 2F Tilde ~ Shift’ 126 01111110 7E

Website defacement Taking over a web server and replacing normal web pages by hacker-produced pages Effect could last because ISP cache of popular web sites Example of recent website defacements ATTRITION Web Page Hack Mirror: http://attrition.org/mirror/ Zone-H web site for most recent attacks: http://www.zone-h.org: Check Onhold and Archive

Manipulating HTTP requests Attackers use proxies to manipulate communications between browsers and web servers Example using Webscarab

IIS IPP Buffer Overflow The Internet Printing Protocol (IPP) service included in IIS 5.0 and earlier versions is vulnerable to buffer overflow attacks The jill.c program was developed to launch the attack using: GET NULL.printer HTTP/1.0 Host: 420 byte jill.c code to launch the command shell IIS server responds launching the command shell (C:\WINNT\SYSTEM32\>) giving the attacker SYSTEM privileges.

IIS IPP Buffer Overflow (cont.) Link to jill.c code Code compilable using gcc jill.c –o jill on Linux Precompiled version (jill-win32.c) and executable (jill-win32.exe) available at ftp://ftp.technotronic.com/ newfiles/jill-win32.exe. This executable file is ready to run on a Windows machine.

IIS IPP Buffer Overflow (cont.) Source: http://puna.net.nz/archives/Hacking/David_Sheridan_GCIH.doc

HTTP Requests GET By far the most common method used HTTP defines 8 methods (or "verbs") indicating the desired action to be performed on a resource GET HEAD POST PUT DELETE TRACE OPTIONS CONNECT HTTP Requests GET By far the most common method used Requests data from specified host Example of request with GET method GET /index.html HTTP/1.1 Host: www.example.com

HTTP Requests HEAD Asks for response identical to a GET request without response body Useful for retrieving meta-information written in response headers without having to transport the entire content POST Submits data to be processed (e.g. from an HTML form) to a server The data is included in the body of the request PUT Uploads data to the server DELETE Delete specified file TRACE Echoes back the received request so that a client can see what intermediate servers are adding or changing in the request OPTIONS Returns HTTP methods supported by the server. This can be used to check the functionality of a web server.

Browser Attacks Malicious links attack.txt.exe seems to be attack.txt User must click on them to execute (but not always) Common extensions are hidden by default in some operating systems. attack.txt.exe seems to be attack.txt

Browser Attacks (Cont.) Common Attacks Redirection to unwanted webpage Scripts might change the registry, home page Some scripts might “trojanize” when your DNS error-handling routine when you mistype a URL Pop-up windows Web bugs; i.e. links that are nearly invisible, can be used to track users at a website Domain names that are common misspellings of popular domain names Microsoff.com, www.whitehouse.com (a porn site)

E-Mail

E-Mail Protocols SMTP To Send SMTP To Send Receiver’s Mail Server Sender’s Mail Server Simple Mail Transfer Protocol (SMTP) to transmit mail in real time to a user’s mail server or between mail servers Sender-initiated Sending E-Mail Client Receiving E-Mail Client

E-Mail protocols POP or IMAP To Receive Receiver’s Mail Sender’s Mail Server Sender’s Mail Server POP or IMAP to download mail to receiver when the receiver capable of downloading mail. Receiver-initiated Sending E-Mail Client Receiving E-Mail Client Internet Message Application Program (IMAP): More powerful, can manage messages on the receiver’s mail server, less widely used Post Office Protocol (POP): Simple, loosing grounds to IMAP

E-Mail Standards Receiver’s Mail Server Sender’s Mail Server Message Body Format Standard Message RFC 822 or 2822 HTML body UNICODE Sending E-Mail Client Receiving E-Mail Client RFC 822 (English ASCII code) or 2822: for all-text bodies UNICODE: for all languages HTML body: for fancy text and graphics

E-Mail Security E-Mail Encryption Not widely used because of lack of clear standards IETF has not been able to settle upon a single standard because of in-fighting Three standards are used in corporations TLS S/MIME PGP

E-Mail Security E-Mail Encryption TLS only requires a digital certificate for servers S/MIME requires a PKI for digital certificates PGP uses trust among circles of friends: If A trusts B, and B trusts C, A may trust C’s list of public keys Dangerous: Misplaced trust can spread bogus key/name pairs widely