Software Security Testing

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 8

Software Security Testing

A Term paper Report


Submitted by

JAGDISH MEDATIYA (08BCE034)


CHINTAN PANCHAL (08BCE044)
MANAN PANCHOLI (08BCE045)

At

NIRMA UNIVERSITY
INSTITUTE OF TECHNOLOGY
AHMEDABAD

APRIL - 2011
ACKNOWLEDGEMENT
We hereby take this opportunity to thank each and everyone who has
helped us in creating and formulating this seminar report. We especially thank
our faculties for guiding us through whole period of preparation and
presentation. We whole-heartedly express our gratitude towards our Prof.
Dipika Shukla for giving us the moral and academic support for representing the
seminar. At last we thank all those who directly or indirectly helped us in
preparing the seminar report.

JAGDISH MEDATIYA (08BCE034)

CHINTAN PANCHAL (08BCE044)

MANAN PANCHOLI (08BCE045)


CERTIFICATE
This is to certify that the Seminar entitled “U.S. Army FusionNet” has been
submitted by PANCHAL CHINTAN, JAGDISH MEDATIYA AND
MANAN PANCHOLI under my guidance in partial fulfillment of the degree
of Bachelor of Technology in Computer Engineering of NIRMA University,
Institute of Technology during the academic year 2010-2011 (Semester-VI).
 
Date:
 
 
 
 
Concern Faculty                           Head, CSE Department            
Prof. Dipika Shukla                   Prof. D.J. PATEL                                       
Security testing has recently moved
beyond the realm of network port scanning
to include probing software behaviour as a
critical aspect of system behaviour (see the
sidebar). Unfortunately, testing software
security is a commonly misunderstood
task. Security testing done properly goes
deeper than simple black-box probing on
Abstract the presentation layer (the sort performed
by so-called application security tools)—
Writing secure code is at the heart of and even beyond the functional testing of
security apparatus.
computing security. Unfortunately
traditional software engineering textbooks Testers must use a risk-based approach,
failed to provide adequate methods and grounded in both the system’s
techniques for students and software Architectural reality and the attacker’s
engineers to bring security engineering mindset, to gauge software security
approaches to software development adequately. By identifying risks in the
process generating secure software as well system and creating tests driven by those
risks, a software security tester can
as correct software. This paper argues that
properly focus on areas of code in which
a security testing phase should be added to an attack is likely to succeed. This
software development process with approach provides a higher level of
systematic approach to generating and software security assurance than possible
conducting destructive security test sets with classical black-box testing.
following a complete coverage principle.
Software engineers must have formal What’s so different about
training on writing secure code. The security?
security testing tasks include penetrating
and destructive tests that are different from Software security is about making
software behave in the presence of a
functional testing tasks currently covered
malicious attack, even though in the real
in software engineering textbooks. world, software failures usually happen
Systematic security testing approaches spontaneously—that is, without intentional
should be seamlessly incorporated into mischief. Not surprisingly, standard
software engineering curricula and software testing literature is only
software development process. Moreover, concerned with what happens when
component-based development and formal software fails, regardless of intent. The
difference between software safety and
methods could be useful to produce secure
software security is therefore the presence
code, as well as automatic security of an intelligent adversary bent on
checking tools. Some experience of breaking the system.
applying security testing principles in our
software engineering course teaching is Security is always relative to the
information and services being protected,
reported. Software Security Testing
the skills and resources of adversaries, and
the costs of potential assurance remedies;
Introduction
security is an exercise in risk management.
Risk analysis, especially at the design
level, can help us identify potential
security problems and their impact. once incorrect or missing access control
identified and ranked, software risks can mechanisms, lack of auditing/ logging or
then help guide software security testing. incorrect logging, and ordering and timing
errors (especially in multithreaded
Vulnerability is an error that an attacker systems). These sorts of flaws almost
can exploit. Many types of vulnerabilities always lead to security risk.
exist, and computer security researchers
have created taxonomies of them.2 Risk management and security
Security vulnerabilities in software testing
systems range from local implementation
errors (such as use of the gets() function
Software security practitioners perform
call in C/C++), through interprocedural
many different tasks to manage software
interface errors (such as a race condition
security risks, including
between an access control check and a file
• creating security abuse/misuse cases;
operation), to much higher design-level
• listing normative security requirements;
mistakes (such as error handling and
• performing architectural risk analysis;
recovery systems that fail in an insecure
building risk-based security test plans;
fashion or object-sharing systems that
• wielding static analysis tools;
mistakenly include transitive trust issues).
• performing security tests;
Vulnerabilities typically fall into two
• performing penetration testing in the
categories—bugs at the implementation
final environment; and
level and flaws at the design level.
• cleaning up after security breaches.
Attackers generally don’t care whether
Three of these are particularly closely
vulnerability is due to a flaw or a bug,
linked—architectural risk analysis, risk-
although bugs tend to be easier to exploit.
based security test planning, and security
Because attacks are now becoming more
testing—because a critical aspect of
sophisticated, the notion of which
security testing relies on probing security
vulnerabilities actually matter is changing.
risks. Last issue’s installment1 explained
Although timing attacks, including the
how to approach a software security risk
well-known race condition, were
analysis, the end product being a set of
considered exotic just a few years ago,
security- related risks ranked by business
they’re common now. Similarly, two-stage
or mission impact. (Figure 1 shows where
buffer overflow attacks using trampolines
we are in our series of articles about
were once the domain of software
software security’s place in the software
scientists, but now appear in 0 day
development life cycle.) The pithy
exploits.
aphorism, “software security is not
security software” provides an important
Design-level vulnerabilities are the hardest
motivator for security testing. Although
defect category to handle, but they’re also
security features such as cryptography,
the most prevalent and critical.
strong authentication, and access control
Unfortunately, ascertaining whether a
play a critical role in software security,
program has design-level vulnerabilities
security itself is an emergent property of
requires great expertise, which makes
the entire system, not just the security
finding such flaws not only difficult, but
mechanisms and features. A buffer
particularly hard to automate. Examples of
overflow is a security problem regardless
design-level problems include error
of whether it exists in a security feature or
handling in object- oriented systems,
in the noncritical GUI. Thus, security
object sharing and trust issues, unprotected
testing must necessarily involve two
data channels (both internal and external),
diverse approaches:
of various security features, which leads to
1. Testing security mechanisms to ensure the incorrect belief that “adding SSL”, is
that their functionality is properly tantamount to securing an application.
implemented, and Software security practitioners bemoan the
2. Performing risk-based security testing over-reliance on “magic crypto fairy dust”
motivated by understanding and simulating as a reaction to this problem. Software
the attacker’s approach. testers charged with security testing often
fall prey to the same thinking.
Many developers erroneously believe that
security involves only the addition and use

How to approach security testing exploit and thus present an observability


Like any other form of testing, security problem. A security test could result in an
testing involves determining who should unanticipated outcome that requires the
do it and what activities they should tester to perform further sophisticated
undertake. analysis. Bottom line: risk-based security
testing relies more on expertise and
Who experience than we would like.
Because security testing involves two
approaches, the question of who should do How
it has two answers. Standard testing Books like How to Break Software
organizations using a traditional approach Security and Exploiting Software help
can perform functional security testing. educate testing professionals on how to
For example, ensuring that access control think like an attacker.4,5Nevertheless,
mechanisms work as advertised is a classic software exploits are surprisingly
functional testing exercise. sophisticated these days, and the level of
discourse found in books and articles is
On the other hand, traditional QA staff will only now coming into alignment.
have more difficulty performing risk-based
security testing. The problem is one of White- and black-box testing and analysis
expertise. First, security tests (especially methods both attempt to understand
those resulting in complete exploit) are software, but they use different approaches
difficult to craft because the designer must depending on whether the analyst or tester
think like an attacker. Second, security has access to source code. White-box
tests don’t often cause direct security analysis involves analyzing and
understanding source code and the design. An example: Java Card security
It’s typically very effective in finding testing
programming errors (bugs when Doing effective security testing requires
automatically scanning code and flaws experience and knowledge. Examples and
when doing risk analysis); in some cases, case studies like the one we present now
this approach amounts to pattern matching are thus useful tools for understanding the
and can even be automated with a static approach.
analyzer (the subject of a future instalment
of this department). One drawback to this In an effort to enhance payment cards with
kind of testing is that it might report a new functionality—such as the ability to
potential vulnerability where none actually provide secure cardholder identification or
exists (a false positive). Nevertheless, remember personal preferences—many
using static analysis methods on source credit card companies are turning to
code is a good technique for analyzing multiapplication smart cards. These cards
certain kinds of software. Similarly, risk use resident software applications to
analysis is a white box approach based on process and store thousands of times more
a deep understanding of software information than traditional magnetic-
architecture. stripe cards.
Black-box analysis refers to analyzing a Security and fraud issues are critical
running program by probing it with concerns for the financial institutions and
various inputs. This kind of testing merchants spearheading smart-card
requires only a running program and adoption. By developing and deploying
doesn’t use source-code analysis of any smart-card technology, credit-card
kind. In the security paradigm, malicious companies provide important new tools in
input can be supplied to the program in an the effort to lower fraud and abuse. For
effort to break it: if the program breaks instance, smart cards typically use a
during a particular test, then we might sophisticated crypto system to authenticate
have discovered a security problem. Black- transactions and verify the identities of the
box testing is possible even without access cardholder and issuing bank .However,
to binary code—that is, a program can be protecting against fraud and maintaining
tested remotely over a network. If the security and privacy are both very complex
tester can supply the proper input (and problems because of the rapidly evolving
observe the test’s effect), then black-box nature of smart-card technology.
testing is possible.
The security community has been involved
Any testing method can reveal possible in security risk analysis and mitigation for
software risks and potential exploits. One Open Platform (now known as Global
problem with almost all kinds of security Platform, or GP) and Java Card since early
testing (regardless of whether it’s black or 1997. Because product security is an
white box) is the lack of it—most QA essential aspect of credit-card companies’
organizations focus on features and spend brand protection regimen, these companies
very little time understanding or probing spend plenty of time and effort on security
non-functional security risks. Exacerbating testing. One central finding emphasizes the
the problem, the QA process is often importance of testing particular vendor
broken in many commercial software implementations according to our two
houses due to time and budget constraints testing categories: adherence to functional
and the belief that QA is not an essential security design and proper behaviour
part of software development. under particular attacks motivated by
security risks.
The latter category, risk-based security
testing (linked directly to risk analysis
findings) ensures that cards can perform
securely in the field even when under
attack. Risk analysis results can be used to
guide manual security testing. As an
example, consider the risk that, as
designed, the object-sharing mechanism in
Java Card is complex and thus is likely to
suffer from security- critical
implementation errors on any given card.
Testing for this sort of risk involves
creating and manipulating stored objects
where sharing is involved. Given a
technical description of this risk, building
specific probing tests is possible.

You might also like