π Lecture 18 β Applets, CGI Scripts
π Overview: This lecture explains how e-commerce websites use server-side processing to create dynamic content by connecting front-end interfaces with back-end databases. It covers key technologies including CGI scripts, SQL queries, servlets, and server-side scripts like ASP, and explains how these tools enable form handling, database queries, and state maintenance for interactive web applications.
ποΈ Topics Covered
The lecture begins with definitions of web servers and databases, then introduces CGI scripts as a method for server-side communication with databases. It covers SQL for querying databases, servlets as fast Java applications on the server, and server-side scripts including ASP, JSP, and PHP. The lecture also discusses ODBC/JDBC drivers, compares different technologies based on compilation vs. interpretation, and provides detailed ASP examples showing form handling and variable usage.
π Lecture Summary
CGI Scripts
The Common Gateway Interface (CGI) is defined as a standard method/protocol that allows data from forms to be used by programs on the server. A script is a program running on the server. CGI scripts include programs written in C, C++ or Perl. When a client makes an HTTP request by clicking a hyperlink referencing a CGI script, the server communicates with the CGI script using the CGI protocol, executes it, and the script can generate a query to the database to retrieve specific information. This information is then supplied to the client as an HTML document.
π Definition β Common Gateway Interface (CGI): A standard method/protocol that allows data from forms to be used by programs on the server.
Example: A web page has two links. When the user clicks "List of IT Books for sale", an HTTP request goes to the CGI script hello2.cgi. This script generates a Select * from ITBOOKS query in SQL and retrieves all information from the IT books table as a result for the user.
Structured Query Language (SQL)
SQL stands for Structured Query Language. It is used to make queries from databases. The general syntax uses the select statement to retrieve data from databases. Using * after select and then from tablename picks the entire information from a table. Specific information can be retrieved by specifying conditions.
π Formula: Select * from tablename β retrieves all columns and rows from the specified table
π Formula: Select column1, column2 from tablename where condition β retrieves specific data based on condition
π Example: Select author, publisher from ITBOOKS where coursename='e-commerce' β retrieves only author and publisher columns for books where the course name is 'e-commerce'
The insert statement is used to insert data into a database. For example, when a user fills a web form and clicks the Register! (submit) button, the information is shipped to an ASP file on the server, which executes an insert query to record the data in a table. The delete and update statements are used for deleting and updating data in tables.
Servlets
Servlets are very fast Java applications on the server side which are available in an active form in the memory of the server. They use JDBC to connect to databases.
Server Side Scripts
These include ASP (Active Server Pages) β Microsoft's product, JSP (Java Server Pages) β Sun Microsystems' product, and PHP (Hypertext Preprocessor) β Apache Software Foundation's product. Their code can be embedded within HTML documents and they use extensions (.asp), (.jsp) or (.php). The server sees the extension of the file and processes the relevant embedded code, providing the result to the client side.
ODBC/JDBC
ODBC (Open Database Connectivity) and JDBC (Java Based Database Connectivity) are drivers present on the server side. Scripts or programs use these to establish connection with databases for querying.
Basic Differences Between CGI Scripts, ASPs, Servlets etc.
Code is translated into executable form in two ways: compilation (using a compiler) or interpretation (line by line at runtime using an interpreter). Compiled code is usually faster than interpreted code. ASP, PHP and Coldfusion interpret their code, except ASP.net where code is compiled. In JSP, a program called the JSP engine compiles the code only once, after which the JSP page is converted into a servlet. A servlet is always in an active form in server memory, so subsequent calls have faster response time β this is the main difference between JSP and a servlet. Another difference is that ASP mostly uses VBScript while JSP uses Java. Among CGI scripts, Perl scripts are interpreted and C++ scripts are compiled. However, CGI scripts are generally slow because each CGI request generates a new process which is heavy for the system, making them less popular today.
π Definition β Option Explicit: A directive in VBScript that forces explicit declaration of all variables using the Dim statement to prevent errors from mistyped variable names.
ASP (Active Server Pages)
ASP runs best on IIS (Internet Information Server), freely available with Windows NT and Windows 2000. The ASP engine is a piece of software that is part of IIS and interprets/translates ASP code. There are seven predefined objects called intrinsic objects in ASP. Two important ones are: the Response object (used to send information to the client) and the Request object (used by the server to retrieve information from the client).
ASP statements are contained within delimiters <% and %>. ASP normally uses VBScript as the scripting language. A variable is defined using the Dim statement. To avoid errors from mistyped variable names, Option Explicit must be written at the top of each ASP file.
π Formula: Response.Write variable β sends the value of the variable to be displayed on the client's web page
π Formula: Request.Form("fieldname") β retrieves data submitted from a form field with the given name
π Example 1: The ASP code sets variables lastname=βAliβ, firstname=βImranβ, myage=30, then outputs: "My name is Imran Ali and my age is 30" using Response.Write.
π Example 2: A form with two text boxes (userlogin and username) submits to an ASP file. The ASP code uses Request.Form("userlogin") and Request.Form("username") to collect data, then displays: "My name is [username] and I am going to use [userlogin] as my login".
π Example 3: VBScript with For loop β sets myString=βecommerceβ, then uses: For j=1 to 3 with Response.Write mystring, printing "ecommerce" three times on the page. Also uses If statement checking time: if time is between 12:00 AM and 12:00 PM, prints "Good Morning Pakistan", otherwise prints "Hello Everyone" followed by the three repetitions of "ecommerce".
π‘ Why this matters: Understanding the difference between compiled (faster) and interpreted (slower) server-side technologies helps in choosing the right tool for e-commerce applications that require fast, scalable responses.
β Key Takeaways
CGI scripts use a standard protocol for server-side programs to handle form data and database queries but are slow because each request creates a new process. Servlets are compiled Java applications that remain active in server memory for fast response times, while JSP pages are compiled once into servlets by a JSP engine. ASP uses VBScript with intrinsic objects like Response and Request for sending and receiving data, and requires Option Explicit to prevent variable errors. SQL uses select, insert, delete, and update statements for database operations, with the select statement allowing both general (*) and specific (where clause) data retrieval. Server-side scripts are embedded in HTML with delimiters and processed by the server before sending results to the client.
π§ Quick Revision Questions
- What is the main difference between CGI scripts and servlets in terms of how they handle multiple requests?
- Write the SQL syntax to retrieve only the "author" and "publisher" columns from a table called "ITBOOKS" for books in the 'e-commerce' course.
- What are the two intrinsic ASP objects mentioned and what is each used for?
- Why must
Option Explicitbe written at the top of ASP files using VBScript? - How does JSP differ from ASP in terms of code execution (interpretation vs. compilation)?
π Lecture 19 β MAINTAINING STATE IN A STATELESS SYSTEM
π Overview: This lecture explains how to maintain state across different steps of an e-commerce transaction despite HTTP being a stateless protocol. It covers various techniques for linking registration, item selection, and order confirmation steps, along with client-server architecture, web server components, and e-commerce software functions.
ποΈ Topics Covered
The lecture covers methods for maintaining state including server-side temporary files, cookies, hidden form fields, and databases. It then explains client-server architecture from 1-tier to 4-tier systems, followed by web server hardware and software components, operating systems, web server performance metrics, hosting options, and finally e-commerce software features including catalog display, shopping carts, transaction processing, and advanced functions like middleware and web services.
π Lecture Summary
MAINTAINING STATE IN A STATELESS SYSTEM
HTTP is stateless, meaning each request is independent. To maintain state across different steps of an e-commerce transaction (Registration β Add to Cart β Confirm Order), programmers must link these steps. Several methods are available.
A temporary file can be created on the server side. Scripts behind each step store information in this temporary file using the same common ID. At the end, the confirm order script inserts this information into a database using an insert query.
Cookies on the client side can store information about Registration and Add to Cart steps. When Confirm Order is clicked, cookies revert to the server side and information is stored in databases against a common ID.
Hidden form fields keep data moving back and forth within forms. The code below shows a form with hidden input fields paired with checkboxes. When users select items and click Add to Cart, selected information goes to a script that opens a new page with a Confirm Order button. The item codes remain hidden in this new form. When Confirm Order is pressed, selected items are stored in the database using the hidden item codes.
π Example β Hidden Fields:
<FORM NAME="Form1">
<INPUT TYPE="HIDDEN" NAME="Shirt1" VALUE="25">
<INPUT TYPE="CHECKBOX" NAME="Check1">Blue Cotton Shirt<br>
<INPUT TYPE="HIDDEN" NAME="Shirt2" VALUE="26">
<INPUT TYPE="CHECKBOX" NAME="Check2">Green Cotton Shirt<br>
<INPUT TYPE="HIDDEN" NAME="Shirt3" VALUE="27">
<INPUT TYPE="CHECKBOX" NAME="Check3">White Silk Shirt...
<P>
<INPUT TYPE="submit" NAME="Go" VALUE="Register!">
<INPUT TYPE="RESET" VALUE="Reset!">
</FORM>
π‘ Why this matters: Hidden fields maintain state between steps without requiring server storage, making them efficient for passing data between forms in multi-step transactions.
Another option is to keep everything in databases, recording each step's information in appropriate tables and linking with a common ID. This is more costly and time-consuming.
Servlets can speed up processing but require solid programming knowledge.
Client server architecture
Client-server architecture can have different tiers depending on where data processing occurs.
-
1-tier architecture: Entire processing takes place at a single location. For example, processing occurs only in the main frame with other machines as display terminals (Fig. 1). Alternatively, all processing may occur at individual terminals with a file server that just stores files (Fig. 2).
-
2-tier architecture: Processing of HTML code occurs on the client side, while web page requests are processed on the server side (Fig. 3).
-
3-tier architecture: The database management system or application software is placed on a different processing tier than the web server (Fig. 4).
-
4-tier architecture: Additional processing zones, such as a payment processing system, can be placed at the 4th tier.
Architecture can be extended to n-tiers as needed.
Web server
A web server is a machine that serves web page requests to clients on the internet. It combines hardware and software. The type of web server depends on the volume and type of web activities. Transaction processing sites generating dynamic pages with high traffic need more efficient, easily upgradeable web server software.
Operating systems for web servers
An operating system is required for a computer to run programs and provide input/output services to connected devices. Commonly used web server operating systems include:
- Microsoft Windows NT Server
- Microsoft Windows 2000 Advanced Server
- Microsoft.NET Server
- Linux or Unix-based operating systems like Solaris
Unix-based web servers are more popular and considered more secure. Linux is an open source operating system that is fast, efficient, and easy to install. Open source software is developed by a community of programmers and available for download at no cost.
Web Server Software
Common examples of web server software include:
- Apache HTTP server: Open source code developed in 1994. It dominates the web because it is free and performs efficiently.
- MS Internet Information Server (IIS): Comes with MS Windows 2000 and NT operating systems. IIS's inclusion of ASP provides an environment where HTML pages and scripts combine to produce dynamic web pages.
- Sun ONE web server (also called iPlanet or Netscape): A joint product of AOL and Sun Microsystems. It runs on many operating systems including Solaris and Windows.
Web Server Hardware
Web server computers generally have more memory, larger and faster hard disk drives, and faster processors than typical desktop PCs. Companies like Dell, Hewlett Packard, and others sell web server hardware and provide configuration tools on their websites.
Performance of web server
Web server performance is evaluated based on two factors:
-
Throughput: The number of HTTP requests that a particular server hardware and software can handle in unit time.
-
Response time: The amount of time a web server requires to process one request.
Web server hardware architectures
Large e-commerce sites may need more than one computer within each tier. Two approaches exist:
- Centralized architecture: Using few but very fast and large computers within each tier.
- Decentralized architecture: Using many less powerful computers and dividing workload among them.
Web hosting choices
ISPs offer various web hosting arrangements:
- Shared hosting: A client's website is hosted on a server that simultaneously hosts other websites, operated by an ISP.
- Dedicated hosting: A web server is arranged for a single client who does not share it. In both shared and dedicated hosting, the ISP owns the hardware but leases it to the client and handles maintenance.
- Co-location hosting: ISP offers physical space for a client to install and maintain its own server hardware and software.
- Self hosting: Companies run a server in-house.
E-commerce software
The size and objectives of e-commerce sites vary, leading to diverse software and hardware products. All e-commerce software must provide:
- Catalog display
- Shopping cart capabilities
- Transaction processing
Large or complex sites also use software that adds:
- Middleware
- Application integration
- Web services
- Integration with ERP Software
- Supply chain management software
- Customer Relationship Management (CRM) Software
- Content Management Software
- Knowledge Management Software
Catalog display
A static catalog is a simple HTML list that requires editing HTML code to change. A dynamic catalog stores item information in a database (usually on a different computer accessible by the web server). It provides photos, detailed descriptions, and search facilities about item availability.
Shopping cart
Early form-based shopping carts required users to remember and type information. Modern electronic shopping carts/baskets automatically keep records of selected items, allow customers to view details, and enable adding or removing items. When a customer clicks an item, all details including price, product number, and order identifying information are stored automatically.
Transaction processing
Transaction processing occurs when a customer clicks the checkout or confirm order button and is subjected to payment processing. It represents the most complex part of online sales. Calculation of taxes, shipping costs, and obtaining updated shipping rates by connecting to shipping companies' websites are important parts.
Advanced functions of e-commerce software
Middleware connects e-commerce software with existing accounting systems.
Application integration ensures e-commerce application programs are compatible and fully integrated with Database Management Software. For example, if a company has an existing inventory database, the e-commerce application must support that system.
π Definition β Web services: A combination of software tools that allow application software in one organization to communicate with other programs/applications over a network using a specific set of standard protocols.
π Example: A company wanting to gather all financial management information in one spreadsheet can use web services to automatically get bank account details, loan information, and stock values from different independent sources. Similarly, web services can obtain price and delivery information from different vendors, review this information, place orders to the right vendor, and track orders until shipment is received.
β Key Takeaways
HTTP's stateless nature requires deliberate methods to maintain state across e-commerce transaction steps. The four main methods are server-side temporary files, cookies, hidden form fields, and database storage β each with different trade-offs in complexity and cost. Client-server architecture scales from simple 1-tier to complex n-tier systems, with each tier handling specific processing functions. Web server performance depends on throughput and response time, while hosting options range from shared to dedicated to co-location to self-hosting. Finally, e-commerce software must provide catalog display, shopping cart, and transaction processing, with advanced features like middleware, application integration, and web services enabling larger operations.
π§ Quick Revision Questions
- What are the four main methods for maintaining state in a stateless HTTP system?
- How do hidden form fields maintain state between the "Add to Cart" and "Confirm Order" steps?
- What is the difference between 1-tier, 2-tier, and 3-tier client-server architectures?
- What two factors are used to evaluate web server performance?
- What is the difference between shared hosting, dedicated hosting, and co-location hosting?
π Lecture 20 β Integration with ERP Systems
π Overview: This lecture explores the integration of e-commerce systems with enterprise software, covering ERP, CRM, SCM, content and knowledge management, and e-commerce software platforms. It then dives deep into critical internet security threats, explaining various malicious programs, attack types, and protective measures essential for safe e-commerce operations.
ποΈ Topics Covered
The lecture begins by introducing Enterprise Resource Planning (ERP) and its integration with e-commerce, followed by Customer Relationship Management (CRM) and Supply Chain Management (SCM) software. It then covers Content Management and Knowledge Management software, lists notable e-commerce software, and explains software agents. The second half of the lecture comprehensively addresses internet security issues, including back doors, Trojan horses, viruses, worms, virus protection methods, hackers, active content threats (applets, JavaScript, ActiveX), and various network attack types like eavesdropping, password attacks, IP spoofing, man-in-the-middle attacks, and denial of service attacks.
π Lecture Summary
Integration with ERP Systems
Enterprise Resource Planning (ERP) is a concept that integrates all aspects of a business (e.g., accounting, logistics, manufacturing, marketing, planning, project management) at a single place. An ERP system such as SAP is expensive. E-commerce sites/software has to fully integrate with ERP software, wherever it is used.
Customer Relationship Management Software
The primary goal of Customer Relationship Management (CRM) is to understand each customerβs needs and customize the product/service to meet those needs. CRM software gathers data from customerβs activities on the web site of e-business. The software uses this data to help managers to conduct analytical study about their business/marketing.
Supply Chain Management (SCM) Software
Supply chain involves all activities associated with flow and transformation of goods from raw material stage to the finished stage and their supply to the end users. Supply Chain Management (SCM) software helps companies to coordinate planning and operations with their partners in industry. SCM planning software helps companies develop demand forecasts using information from each player in supply chain. SCM execution software helps with tasks such as the management of warehouses and transportation facilities.
Content Management Software
Companies have found it important to use the web to share corporate information among their employees, customers, suppliers, etc. Content Management Software helps companies control the large amounts of data, pictures/graphics and other files that play a crucial role in conducting business. It also offers different ways of accessing the corporate information which managers of a business might need for decision making.
Knowledge Management Software
Companies have started to find ways that help them manage the knowledge itself regardless of documentary representation of that knowledge. Software developed to meet this goal is called Knowledge Management Software. It has features that allow it to read documents in electronic format, scanned paper documents, e-mail messages, etc., so as to extract knowledge.
E-commerce Software
Following are the names of some well-known e-commerce software:
- Intershop Enfinity
- IBMβs WebSphere Commerce Professional Edition
- Microsoft Commerce Server 2002
Agents
An agent is a software program that is capable of autonomous action in its environment in order to meet its objectives. Agents can be used for comparisons, filtering, web crawling, auctions, etc. For example, there may be buyer agents and seller agents each with their goals and constraints. They can negotiate deals on behalf of the users. Agents can monitor health indicators and alert the individuals under given conditions.
Security issues over the internet
Security is the biggest factor slowing down the growth of e-commerce worldwide. For instance, when you enter your credit card no. in a text box, it is potentially exposed to millions of people on the internet and can be misused. It is important to know the following terms in connection with the security threats over the internet.
π Security Threats Definition: Any malicious activity that compromises the confidentiality, integrity, or availability of information systems and data over the internet.
Back doors and Trojan horses
Back Doors are those hostile programs which, when run on a machine, install hidden services in order to give attackers remote access capabilities to a compromised machine. Trojan horses are those programs that appear harmless but actually have some malicious purpose. For example, HAPPY99.EXE is a Trojan horse that displays a firework and then sends copies of it to the e-mail addresses found on the system. The term Trojan Horse has been borrowed from history, referring to a huge wooden horse where the whole Greek army was hidden during a war, deceiving the enemy.
π Back Door: A hostile program that installs hidden services to give attackers remote access to a compromised machine.
π Trojan Horse: A program that appears harmless but has a malicious purpose.
Viruses and worms
Viruses and Worms are malicious programs that can travel between computers as attachments on email or independently over a network. These terms are sometimes used interchangeably; however, essentially they are different. Worms spread from computer to computer, but unlike viruses have the capability to travel without any help or human action. A worm can replicate itself, meaning it can send copies of itself to everyone listed in the email address box on a system. Viruses, on the other hand, need to be activated through a human action. Another difference is that viruses modify existing programs on a computer unlike worms which can install back doors or drop viruses on the system they visit. A few years ago a worm called 'Love Bug' was triggered by a 23 years old student in Philippine. Its code was written in VBScript, and it traveled on the internet as an email attachment. It could send copies of itself up to 300 addresses found in the email address box. It could destroy files on the system as well as search for any passwords and forward a list of the same to the attacker. Within days it spread to 40 million computers in more than 20 countries causing a financial loss of about $9 billion.
π Virus: A malicious program that requires human action to activate and modifies existing programs on a computer.
π Worm: A malicious program that can travel and replicate without human action, capable of sending copies of itself to email addresses.
π Example: The Love Bug worm (2000) β Written in VBScript, traveled as email attachment, sent copies to up to 300 email addresses, destroyed files, searched for passwords, spread to 40 million computers in 20+ countries, caused $9 billion loss.
Virus protection
- Install anti-virus software such as McAfee, Norton, Dr. Solomon, Symantec, etc.
- Downloading of plug-ins (programs that work with the browser to enhance its capabilities) from the internet should be avoided.
- Downloading of plug-ins should be done from the vendor's official website.
- Newly obtained disks, programs or files should be scanned for viruses before use.
- Installation of a firewall may also reduce the risk of virus attack.
Hackers
Hackers or crackers are those individuals who write programs or manipulate technologies to gain unauthorized access to computers and networks.
Active contents, active X control
Active content is a term generally used to refer to programs that are embedded in web pages to cause certain action. Malicious Active Content delivered through web pages can reveal credit card nos., user names, passwords, etc., and any other information stored in the cookie files on a system. Applets, JavaScript and Active X Controls can be used to install hidden services to the hacker. An Applet is a compiled Java program that runs on the client's machine when a particular web page request is made. Some malicious content can be sent by the hacker embedded in the Applet. Through JavaScript attacks a hacker can destroy the hard disk, disclose emails in the mailbox, or get any sensitive information. JavaScript programs can read list of URLs visited and seize information in the web forms. For example, if a user enters a credit card no. in the form, JavaScript code can send a copy of it to the hacker. Moreover, malicious content can be delivered through cookies using JavaScript that can reveal contents of files or destroy files. Active X Controls are those objects which contain programs placed on web pages to perform particular tasks. They can originate from many languages (C, Visual Basic, etc.). When downloaded they can run on client machine like any other program. A hostile Active X Control can reformat a user's hard disk, send e-mails to all people listed in the mailbox, or even shut down computers.
π Active Content: Programs embedded in web pages that cause certain actions, which can be malicious.
π Example: JavaScript attack on a web form β When a user enters a credit card number, JavaScript code can send a copy to the hacker.
π‘ Why this matters: Active content is a primary vector for client-side attacks in e-commerce, as users unknowingly download and execute malicious programs when visiting compromised websites.
Outside attacks on a network
Eavesdropping/sniffing/snooping
In this type of attack the hacker has the ability to monitor network traffic using some kind of network-monitoring software. For example, a hacker may install some backdoor or Trojan horse that can monitor the key strokes of a user while typing and send the typed information to the hacker.
π Eavesdropping (Sniffing/Snooping): Monitoring network traffic using network-monitoring software to capture sensitive information.
Password attacks
Such attacks are basically a result of eavesdropping through which the hacker is able to know the account ID or password of a particular user. Then using it the hacker gains access to the network and gather information such as user names, passwords, computer names, resources, etc. That can lead to modification, deletion, or rerouting of network data.
π Password Attack: Gaining unauthorized access by obtaining account IDs and passwords through eavesdropping.
IP address spoofing
There are two IP addresses available on a data packet β IP addresses of the sender and the destination. The address of the destination only matters for routing. It is possible that a hacker (having special capabilities) seizes the control of a router, changes the IP address of the source/sender on data packets, and thus forces the destination machine to send the information/web page to a different machine β that is, the machine of the hacker. This is called IP address spoofing.
π IP Address Spoofing: A hacker seizes control of a router and changes the source IP address on data packets to redirect information to the hacker's machine.
Man in the middle attacks
In it the attacker is able to monitor, capture, and control data between sending and receiving machines. He may apply IP address spoofing technique to divert the packets to its machine, then modify the packets and resend the misleading information to the actual client. Another form of man-in-the-middle attack is where the hacker is able to substitute the IP address of a genuine web site with the IP address of his own web site due to some security hole in the software that runs on a domain name server. A client would think that he is communicating or receiving the information from a genuine web site, though it would not be the case actually.
π Man-in-the-Middle Attack: An attacker monitors, captures, and controls data between two communicating machines, potentially modifying packets or substituting IP addresses.
Denial of services (DOS) attacks
In this type of attack, the attacker gains access to the network and then sends invalid data to network services or applications. These services or applications consequently become unable to perform their normal tasks or functions. Hence, sending a flood of data to a particular service or computer can cause it to overload or shutdown. This attack is specially used to take down websites on the internet, when repeated requests for web pages are deliberately initiated so as to choke down a web server. In early 2000 this attack was launched against some famous ecommerce web sites. Hackers arranged computers with special software initiating thousands of http requests per second for specific web sites causing the web servers to overload. Thus, these servers were made unable to fulfill the web page requests of the genuine users/clients. In distributed denial of service attack, the compromised system itself is used as a source for further attacks. The use of firewalls and a proper Intrusion Detection System (IDS) can minimize the risk of a DOS attack. It is also important to establish a security policy for an e-business organization outlining which assets have to be protected and how to be protected.
π Denial of Service (DOS) Attack: Sending invalid data or a flood of requests to overload a service or computer, making it unable to perform normal functions.
π Distributed Denial of Service (DDOS) Attack: A DOS attack where compromised systems are used as sources for further attacks.
π Example: Early 2000 DOS attacks on famous ecommerce websites β Hackers used computers with special software initiating thousands of HTTP requests per second, causing web servers to overload and deny service to genuine users.
β Key Takeaways
This lecture emphasizes that e-commerce systems must integrate with enterprise software like ERP, CRM, SCM, and content/knowledge management systems to function effectively. The most critical security concepts include understanding the differences between viruses (requiring human action) and worms (self-replicating), with the Love Bug worm exemplifying the devastating global impact of worms. Active content threats via applets, JavaScript, and ActiveX controls pose serious client-side risks as they can execute malicious code on user machines. Network attacks such as eavesdropping, IP spoofing, man-in-the-middle, and DOS attacks require robust defenses including firewalls, intrusion detection systems, and comprehensive security policies. For the exam, students must distinguish between attack types, recall specific examples (like Happy99 and Love Bug), and understand protective measures against each threat.
π§ Quick Revision Questions
- What is the key difference between a virus and a worm in terms of how they spread?
- How does a man-in-the-middle attack differ from IP address spoofing?
- What was the Love Bug worm, and what specific damages did it cause?
- List three types of active content that can be used to deliver malicious code through web pages.
- What is the primary goal of a Denial of Service (DOS) attack, and what protective measures can minimize its risk?
π Lecture 21 β Firewalls
π Overview: This lecture covers the fundamental concepts of network security, focusing on firewalls and their types, proxy servers, virtual private networks (VPNs), and cryptography. Understanding these topics is crucial for protecting organizational networks from external threats and enabling secure e-commerce transactions.
ποΈ Topics Covered
The lecture begins by defining a firewall as a hardware/software combination positioned between the internet and an internal network. It then details three main types of firewalls: packet filter, circuit level, and application gateway. The discussion extends to proxy servers and their caching capabilities, followed by an explanation of virtual private networks (VPNs) using dial-up and internet-based connections. Finally, the lecture addresses security challenges in e-commerce, introduces cryptography as the primary solution, and describes substitution and transposition encryption techniques.
π Lecture Summary
Firewalls
A firewall is a combination of hardware and software that sits between the internet and the internal network of an organization. It examines data entering or leaving the network and filters it according to certain rules to protect the network from outside attacks.
π Definition β Firewall: A hardware and software combination that sits between the internet and an internal network, examining and filtering data according to set rules to protect the network from attack.
Packet filter firewall
This type uses a set of rules to determine whether outgoing or incoming data packets are allowed to pass through the firewall. For example, we can specify IP addresses of sending devices such that packets from these IP addresses are not allowed to enter the network. A packet filter firewall is the simplest type and operates at the data link and network layers of the OSI model.
π Definition β Packet Filter Firewall: A simple firewall that uses rules to filter data packets based on IP addresses, operating at the data link and network layers of the OSI model.
Circuit level firewall
This firewall is similar to the packet filter firewall but operates at the transport layer of the OSI Model, providing greater functionality. It can make packets sent from the internal network to a destination outside the firewall appear as if they originated at the firewall, keeping host information secret. It can also determine whether a TCP/IP connection between a host and an outside machine has been properly established, allowing it to cut off hijacked connections.
π Definition β Circuit Level Firewall: A firewall operating at the transport layer that can hide internal host information and detect properly established TCP/IP connections to prevent hijacking.
Application gateway firewall
This firewall operates at the application layer of the OSI Model and uses strong user authentication to verify host identity. Unlike packet filter firewalls, it filters requests rather than packets. It can block outgoing HTTP or FTP requests and prevent employees from downloading dangerous programs or connecting to certain websites. Circuit level capabilities can be combined with application gateway services to form a hybrid type of firewall.
π Definition β Application Gateway Firewall: A firewall operating at the application layer that filters requests and uses strong user authentication to control connections.
Proxy server
A proxy server sits between an internal trusted network and the untrusted internet. It performs three main functions: it hides host information by affixing its own IP address instead of the requesting machine's IP, acts as a firewall filtering requests for certain web pages, and speeds up processing of HTTP requests by caching web pages. Caching stores requested web pages in memory for a certain period, reducing the time needed to supply subsequent page requests.
π Definition β Proxy Server: A server between a trusted network and the internet that hides host information, filters requests, and caches web pages to speed up processing.
Virtual private network (VPN)
A VPN is a secure, dedicated point-to-point connection over the internet. It uses internet infrastructure instead of special telephone lines. Both the Remote Access Server (RAS) or tunnel server and the Remote Access Client (RAC) or tunnel client are connected to the internet. The client specifies the tunnel server's IP address during configuration. VPN connections are managed by Point to Point Tunneling Protocol (PPTP), which uses encryption to provide secure transport over the public internet. VPN is a cost-saving measure compared to dial-up connections, as clients incur only local call costs to their ISP while maintaining long connections to remote networks.
π Definition β Virtual Private Network (VPN): A secure, dedicated point-to-point connection over the internet using encryption and tunneling protocols.
Security β the biggest challenge
The issue of computer and data security is the biggest hurdle in e-commerce growth. Programs running on servers can damage databases, terminate server software, or alter information. Two organizations combat these threats: Computer Emergency Response Team (CERT) and Systems Administrator, Audit, Network and Security Institute (SANS Institute). The best response from experts is cryptography.
Cryptography
Cryptography is the technique of converting a message into unintelligible form so that unauthorized persons cannot understand it. Two basic techniques are used: substitution, which replaces each letter with another (e.g., "a" with "d", "b" with "e"), and transposition, which scrambles characters by writing a message into a table row by row then reading it column by column. Historically, cryptography has been used for military purposes (Julius Caesar used transposition ciphers; Hitler used the Enigma encryption cipher) and non-military purposes (protecting religious secrets, science, and industry). Today, it has made rapid commercialization of the internet possible, enabling secure online banking and business transactions.
π Definition β Cryptography: The technique of converting a message into an unintelligible form to prevent unauthorized understanding.
π Formula: Substitution β Each letter is replaced with another according to a fixed pattern. π Formula: Transposition β Characters are scrambled by reorganizing their positions (e.g., writing row by row, reading column by column).
π Example: For transposition, the message is first written into a table row by row, then read and rewritten column by column to create a scrambled version.
π‘ Why this matters: Cryptography enables secure e-commerce by protecting sensitive data during transmission, making it possible for banks, businesses, and individuals to conduct transactions online safely.
β Key Takeaways
Firewalls are essential network security tools that filter traffic based on rules, with packet filter, circuit level, and application gateway types operating at different OSI layers with increasing sophistication. Proxy servers add caching capabilities to improve performance while hiding internal network information. VPNs provide cost-effective secure remote access over the internet using tunneling and encryption, offering a cheaper alternative to dial-up connections. Cryptography, through substitution and transposition techniques, is the fundamental solution to security threats in e-commerce, enabling secure online transactions. The biggest challenge to e-commerce growth remains computer and data security, addressed by organizations like CERT and SANS Institute.
π§ Quick Revision Questions
- What are the three main types of firewalls, and which OSI model layer does each operate at?
- How does a proxy server improve web page loading speed, and what is the term for this process?
- Compare the cost implications of using a VPN versus a dial-up connection for remote access.
- What are the two basic cryptographic techniques described in the lecture, and how do they differ?
- Which protocol manages VPN connections and provides secure transport over the public internet?