Auditing The Development of Web-Based Applications: Jian Zhen
Auditing The Development of Web-Based Applications: Jian Zhen
Auditing The Development of Web-Based Applications: Jian Zhen
Web-Based Applications
Jian Zhen
Overview
Overview of WWW and HTTP
Web-based Application Concepts
Overview of the Development Cycles
Security Requirements
Web-based Application Security
Application Code Reviews
World-Wide-Web (WWW)
Invented by Tim Berners-Lee and others at
the European Laboratory for Particle
Physics (CERN)
Based on hypertext--a system of
embedding links in text to link to other text
The most popular way of linking to
resources on the Internet
WWW (Cont.)
Hundres of millions of pages indexed by
search engines
Tens of terabytes archived by Alexa
Hundreds of millions users on the Web
WWW and HTTP
Static Web Model
Request at port 80
Response and close
2nd request
2nd response & close
1
Internet
3 2
CORBA/ODBC
Static
Database Pages
Web Applications
Client side
• HTML/DHTML
• JavaScript, VBScript, PerlScript
• Java
• ActiveX
• Plug-ins
Web Applications
Server side
• Frontend: CGIs (Perl, C/C++), Java Servlets,
ISAPI, NSAPI, ASP, etc
• Middleware: CORBA, ODBC, DCOM, etc
• Backend: Oracle, Informix, Sybase, DB2, etc
Web Applications
Complex distributed, Client/Server
applications
Many elements involved and integrated
Rapid development
Requires more planning, design, and
control than “conventional” projects.
Web Development Cycles
Analysis Design
Prototyping
Implementation Testing
Web Development Cycles
Analysis
• Feasibility study
• Identify requirements
• Involvment: your requirements
Web Development Cycles
Design
• Design specifications
• Involvment: system interoperability, resiliency,
capacity planning, mature technologies,
security design
Design Specification
Business System
Requirement Interoperability
Existing and Proposed Operational
System Overview cycle/Workflow
Hardware and System Modules
Software Input-Output
Requirements User Interface
System Schematic Prototypes
Web Development Cycles
Prototyping
• Most time-consuming stage
• Coding
• Build, review, and refine prototype
• Involvement: coding standards, effective
application development environment
Web Development Cycles
Testing
• Unit/System test plans
• Module/Unit testing
• System integration testing
• Involvement: test plans, effective testing
environment, testing stages, code reviews
Web Development Cycles
Delivery/Implementation
• Install systems
• Train users
• Acceptance testing
• Involvement: effective implementation
Security Requirements
Privacy - All user information are protected
Authentication/Access Control- Only
authorized users are allowed to access the
resources
Integrity - User and application data cannot
be tempered with
Auditing - Keeping audit logs and audit
trails and ensuring their integrity
Privacy
Protecting users’ private information
• SSN
• Birthdates
• Employee Ids
• Passwords
Technologies
• Encryption: DES, RSA, SSL
• Local vs. Network
Authentication
Proof of Identity
Required to enforce access control and
accountability, and achieve non-
repudiation
Technologies
• username/password
• Smart Cards, SecurID
• Biometrics
Access Control
Determine who is authorized to receive or
modify information
Common mechanisms
• Mandatory Access Control (MAC)
– Owners cannot modify access list (SeOS)
• Discretionary Access Control (DAC)
– Owners are allowed to modify access (UNIX)
• Role-based Access Control (RBAC)
– Role granted provides necessary access
Auditing
The process of collecting and recording
security-relevant activities on a system
After-the-fact technique
Audit logs are used as evidence
Data Encryption
Confidentiality
• Scrambling data to unreadable format
Integrity
• User and application data are not modified
Technologies
• Public/Secret Key Encryption: RSA, DES
• Digital Signatures: DSS
• Hashes: MD5
Web-based Application Security
Security flaws occur when software bugs
allow violation of security policy
Different security flaw present different
threats
• Opening backdoors
• Stealing information or system resource
• Destroying or tempering data
Where Do Flaws Exist?
Operating Systems
• UNIX, NT
Support Software and Libraries
• Compilers, C Libraries
Applications
• CGI programs, Netscape, Internet Explorer, vi,
Emacs, Sendmail, many others
Web-based Application Security
Different layers of security
• Network security
• Operating System security
• Web server security
• Application security
MUST PROTECT ALL LAYERS!!!
• Rootshell gets defaced!
Web-based Application Security
Common Security Flaws
• Insufficient Input Validations
• Memory Cleansing, i.e. Cookie deletion on the
client
• Environmental Faults
• Buffer Overflows
• Race Conditions
Web-based Application Security
CGI Programming Example
What if we used this Perl code to send mail
to an address given in a fill-out form?
$mail_to= &get_name_from_input; #read the address
open (MAIL, “| /usr/lib/sendmail $mail_to”);
print MAIL “To: $mail_to\nFrom: me\n\nHello\n”;
close MAIL;
CGI Example (cont.)
Look at the open() call
open (MAIL, “| /usr/lib/sendmail $mail_to”);