Chapter 6: Hostile Code Guide to Computer Network Security.

Slides:



Advertisements
Similar presentations
1 Copyright © 2002 Pearson Education, Inc.. 2 Chapter 1 Introduction to Perl and CGI.
Advertisements

Cross-Site Scripting Issues and Defenses Ed Skoudis Predictive Systems © 2002, Predictive Systems.
WEB DESIGN TABLES, PAGE LAYOUT AND FORMS. Page Layout Page Layout is an important part of web design Why do you think your page layout is important?
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 22 World Wide Web and HTTP.
DT228/3 Web Development WWW and Client server model.
Kyung Hee University 1 1 Application Layer. 2 Kyung Hee University Position of Application Layer.
Copyright 2004 Monash University IMS5401 Web-based Systems Development Topic 2: Elements of the Web (g) Interactivity.
Server-Side vs. Client-Side Scripting Languages
ASP Tutorial. What is ASP? ASP (Active Server Pages) is a Microsoft technology that enables you to make dynamic and interactive web pages. –ASP usually.
Introduction to Web Database Processing
Introduction to Web Interface Technology (CSE2030)
Dynamic Web Pages Bert Wachsmuth. Review  Internet, IP addresses, ports, client-server, http, smtp  HTML, XHTML, XML  Style Sheets, external, internal,
1 CS6320 – Why Servlets? L. Grewe 2 What is a Servlet? Servlets are Java programs that can be run dynamically from a Web Server Servlets are Java programs.
How Clients and Servers Work Together. Objectives Learn about the interaction of clients and servers Explore the features and functions of Web servers.
Guide To UNIX Using Linux Third Edition
CP476 Internet Computing Browser and Web Server 1 Web Browsers A client software program that allows you to access and view Web pages on the Internet –Examples.
 2004 Prentice Hall, Inc. All rights reserved. Chapter 25 – Perl and CGI (Common Gateway Interface) Outline 25.1 Introduction 25.2 Perl 25.3 String Processing.
Form Handling, Validation and Functions. Form Handling Forms are a graphical user interfaces (GUIs) that enables the interaction between users and servers.
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.
1 Web Developer & Design Foundations with XHTML Chapter 6 Key Concepts.
CGI Common Gateway Interface. CGI is the scheme to interface other programs to the Web Server.
INTRODUCTION TO WEB DATABASE PROGRAMMING
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
1 Servlet How can a HTML page, displayed using a browser, cause a program on a server to be executed?
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
Comp2513 Forms and CGI Server Applications Daniel L. Silver, Ph.D.
Chapter 6: Forms JavaScript - Introductory. Previewing the Product Registration Form.
Chapter 17 - Deploying Java Applications on the Web1 Chapter 17 Deploying Java Applications on the Web.
1 In the good old days... Years ago… the WWW was made up of (mostly) static documents. –Each URL corresponded to a single file stored on some hard disk.
Section 17.1 Add an audio file using HTML Create a form using HTML Add text boxes using HTML Add radio buttons and check boxes using HTML Add a pull-down.
Java CGI Lecture notes by Theodoros Anagnostopoulos.
10/13/2015 ©2006 Scott Miller, University of Victoria 1 Content Serving Static vs. Dynamic Content Web Servers Server Flow Control Rev. 2.0.
Web Pages with Features. Features on Web Pages Interactive Pages –Shows current date, get server’s IP, interactive quizzes Processing Forms –Serach a.
Active Server Pages  In this chapter, you will learn:  How browsers and servers interacted on the Internet when the Internet first became popular 
Chapter 8 Collecting Data with Forms. Chapter 8 Lessons Introduction 1.Plan and create a form 2.Edit and format a form 3.Work with form objects 4.Test.
1 Welcome to CSC 301 Web Programming Charles Frank.
1 © Netskills Quality Internet Training, University of Newcastle HTML Forms © Netskills, Quality Internet Training, University of Newcastle Netskills is.
1 © Copyright 2000 Ethel Schuster The Web… in 15 minutes Ethel Schuster
Application Layer Khondaker Abdullah-Al-Mamun Lecturer, CSE Instructor, CNAP AUST.
CGI Common Gateway Interface. CGI is the scheme to interface other programs to the Web Server.
1 MSCS 237 Overview of web technologies (A specific type of distributed systems)
CSU - DEO Introduction to CGI - Fort Collins, CO Copyright © XTR Systems, LLC Introduction to the Common Gateway Interface (CGI) Instructor: Joseph DiVerdi,
Introduction to JavaScript CS101 Introduction to Computing.
WWW: an Internet application Bill Chu. © Bei-Tseng Chu Aug 2000 WWW Web and HTTP WWW web is an interconnected information servers each server maintains.
Web Pages with Features. Features on Web Pages Interactive Pages –Shows current date, get server’s IP, interactive quizzes Processing Forms –Serach a.
PwC New Technologies New Risks. PricewaterhouseCoopers Technology and Security Evolution Mainframe Technology –Single host –Limited Trusted users Security.
1 WWW. 2 World Wide Web Major application protocol used on the Internet Simple interface Two concepts –Point –Click.
Module: Software Engineering of Web Applications Chapter 2: Technologies 1.
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Web Programming Overview. Introduction HTML is limited - it cannot manipulate data How Web pages are extended (include): –Java: an object-oriented programming.
How CGI and Java Servlets are Run By David Stein 14 November 2006.
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 22 World Wide Web and HTTP.
The Common Gateway Interface (CGI) Pat Morin COMP2405.
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.
Computer & Network Security
Tonga Institute of Higher Education IT 141: Information Systems
Section 6.3 Server-side Scripting
WWW and HTTP King Fahd University of Petroleum & Minerals
World Wide Web policy.
Section 17.1 Section 17.2 Add an audio file using HTML
Introduction to Programming the WWW I
PHP / MySQL Introduction
Tutorial (4): HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 27 WWW and HTTP.
Tonga Institute of Higher Education IT 141: Information Systems
Tonga Institute of Higher Education IT 141: Information Systems
Cross-Site Scripting Issues and Defenses Ed Skoudis Predictive Systems
Presentation transcript:

Chapter 6: Hostile Code Guide to Computer Network Security

Kizza - Guide to Computer Network Security 2 Scripting technology is making the Web interactive and automated as Web servers accept inputs from users and respond to user inputs. It has also introduced a huge security problem to an already security burdened cyberspace. Hostile scripts, embedded in Web pages, as well as HTML formatted , attachments, and applets introduce a new security paradigm in cyberspace security. Security problems are introduced in two areas: at the server and at the client.

Kizza - Guide to Computer Network Security 3 Introduction to the Common Gateway Interface (CGI) The Common Gateway Interface, or CGI, is a standard to specify a data format that servers, browsers, and programs must use in order to exchange information. A program written in any language that uses this standard to exchange data between a Web server and a client’s browser is a CGI script. A CGI script is an external gateway program to interface with information servers such as HTTP or Web servers and client browsers.

Kizza - Guide to Computer Network Security 4 CGI scripts are great in that they allow the web servers to be dynamic and interactive with the client browser as the server receives and accepts user inputs and responds to them in a measured and relevant way to satisfy the user CGI programs are of two types: those written in programming languages such as C/C++ and Fortran that can be compiled to produce an executable module stored on the server, and scripts written in scripting languages such as PERL, Java, and Unix shell.

Kizza - Guide to Computer Network Security 5 CGI scripts written in scripting languages are not complied like those in non- scripting languages. Instead, they are text code which is interpreted by the interpreter on the information server or in the browser and run right away Both CGI programs or scripts, when executed at the information server, help organize information for both the server and the client. CGI scripts go beyond dynamic form filling to automating a broad range of services in search engines and directories like making download available, granting access rights to users, and order confirmation.

Kizza - Guide to Computer Network Security 6 CGI Scripts in a Three-Way Handshake Server – CGI Interface –The CGI scripts reside on the server side and are executed by the server to respond to the client demands. –An interface in Figure 2, separates the server and the script, and consists of information from the server supplied to the script that includes input variables extracted from an HTTP header from the client and information from the script back to the server. –Output information from the server to the script and from the script to the server is passed through environment variables and through script command lines which inputs that instruct a script to do certain tasks such as search and query.

Kizza - Guide to Computer Network Security 7 CGI Script Security Issues A CGI script is an open gateway that allows anyone anywhere to run an executable program on a server and even send their own programs to run on the server. Yet CGI scripting is the fastest growing component of the Internet It presents security problems to cyberspace in several ways including:

Kizza - Guide to Computer Network Security 8 –Program development: During program development, CGI scripts are written in high level programming language and complied before being executed or they are written in a scripting language and they are interpreted before they are executed. In either way, because programming complexity and owing to lack of program development discipline, errors introduced into the program are difficult to find, especially in non-compiled scripts. –Transient nature of execution: When CGI scripts come into the server, they run as separate processes from that of the host server. Although this is good because it isolates the server from most script errors, the imported scripts may introduce hostile code into the server. –Cross-pollination: The hostile code introduced into the server by a transient script can propagate into other server applications and can even be re-transmitted to other servers by a script bouncing off this server or originating from this server. –Resource-guzzling: Scripts that are resource intensive could cause a security problem to a server with limited resources. –Remote execution: Since servers can send CGI scripts to execute on surrogate servers, both the sending and receiving servers are left open to hostile code usually transmitted by the script.

Kizza - Guide to Computer Network Security 9 All these situations present a possible security threat when one breaks into a script. Broken scripts are extremely dangerous as they: –May allow an attacker access to the system’s password file for decryption. –May allow mailing of a map of the system which gives the attacker more time offline to analyze the system’s vulnerabilities –May allow starting a login server on a high port and telneting in. –May allow a distributed denial of service attack against the server. –May allow erasing or altering the server’s log files.

Kizza - Guide to Computer Network Security 10 Other security threats may include: –Malicious code provided by one client for another client: This can happen, for example, in sites that host discussion groups where one client can embed malicious HTML tags in a message intended for another client. –Malicious code sent inadvertently by a client: When a client sends malicious data intended to be used only by itself. This occurs when the client relies on an untrustworthy source of information when submitting a request.

Kizza - Guide to Computer Network Security 11 Web Script Security Issues There are now thousands of Web scripts doing a variety of web services from form filling to information gathering. Most of these scripts either transient or reside on Web servers. Because of popularity and widespread use, most client and server Web browsers today have the capability to interpret scripts embedded in Web pages downloaded from a Web server. Most browsers are installed with the capability to run scripts enabled by default.

Kizza - Guide to Computer Network Security 12 Dealing with the Script Security Problems The love of Web automation is not likely to change soon and the future of a dynamic Web is here to stay. More and more programs written for the Web are interacting with networked clients and servers, raising the fear of a possibility that clients and servers may be attacked by these programs using embedded scripts to gain unauthorized access. It is, therefore, necessary to be aware of the following: –Script command line statements: Scripting languages such as PERL, PHP, and the Bourne shell pass information needed to perform tasks through command line statements which are then executed by an interpreter. This can be very dangerous. –Clients may use special characters in input strings to confuse other clients, servers, or scripts. –Problems with server-side include user-created documents in NCSA HTTPd that provide simple information, such as current date, the file's last modification date, and the size or last modification of other files, to clients on the fly. Sometimes this information can provide a powerful interface to CGI. In an unfortunate situation, server-side scripts are a security risk because they let clients execute dangerous commands on the server.

Kizza - Guide to Computer Network Security 13 To avoid these problems: –use only the data from a CGI, only if it will not harm the system –check all data into or out of the script to make sure that it is safe.