vulnerability analysis

87
Chapter 20 in “Introduction to Computer Security” Vulnerability Vulnerability Analysis Analysis

Upload: livana

Post on 25-Feb-2016

37 views

Category:

Documents


3 download

DESCRIPTION

Vulnerability Analysis. Chapter 20 in “Introduction to Computer Security”. Vulnerability Analysis. Background Penetration Studies Example Vulnerabilities Classification Frameworks. Overview. What is a vulnerability? Penetration studies Flaw Hypothesis Methodology Examples - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Vulnerability Analysis

Chapter 20 in “Introduction to Computer Security”

Vulnerability AnalysisVulnerability Analysis

Page 2: Vulnerability Analysis

Slide Slide 22

Vulnerability AnalysisVulnerability Analysis

BackgroundPenetration StudiesExample VulnerabilitiesClassification Frameworks

Page 3: Vulnerability Analysis

Slide Slide 33

OverviewOverviewWhat is a vulnerability?Penetration studies

Flaw Hypothesis MethodologyExamples

Vulnerability examplesClassification schemes

RISOSPANRL TaxonomyAslam’s Model

Page 4: Vulnerability Analysis

Slide Slide 44

DefinitionsDefinitions

Vulnerability, security flaw: failure of security policies, procedures, and controls that allow a subject to commit an action that violates the security policy

Subject is called an attackerUsing the failure to violate the policy is exploiting the vulnerability or breaking in

Page 5: Vulnerability Analysis

Slide Slide 55

Formal VerificationFormal Verification

Mathematically verifying that a system satisfies certain constraintsPreconditions state assumptions about the systemPostconditions are result of applying system operations to preconditions, inputsRequired: postconditions satisfy constraints

Page 6: Vulnerability Analysis

Slide Slide 66

Penetration TestingPenetration TestingTesting to verify that a system satisfies certain constraintsHypothesis stating system characteristics, environment, and state relevant to vulnerabilityResult is compromised system stateApply tests to try to move system from state in hypothesis to compromised system state

Page 7: Vulnerability Analysis

Slide Slide 77

NotesNotesPenetration testing is a testing technique, not a verification technique

It can prove the presence of vulnerabilities, but not the absence of vulnerabilities

For formal verification to prove absence, proof and preconditions must include all external factors

Realistically, formal verification proves absence of flaws within a particular program, design, or environment and not the absence of flaws in a computer system as a whole (think incorrect configurations, etc.)

Page 8: Vulnerability Analysis

Slide Slide 88

Penetration StudiesPenetration StudiesTest for evaluating the strengths and effectiveness of all security controls on system

Also called tiger team attack or red team attackGoal: violate site security policyNot a replacement for careful design, implementation, and structured testing

Page 9: Vulnerability Analysis

Slide Slide 99

GoalsGoalsAttempt to violate specific constraints in security and/or integrity policy

Implies metric for determining successMust be well-defined

Example: subsystem designed to allow owner to require others to give password before accessing file (i.e., password protect files)

Goal: test this controlMetric: did testers get access either without a password or by gaining unauthorized access to a password?

Page 10: Vulnerability Analysis

Slide Slide 1010

GoalsGoalsFind some number of vulnerabilities, or vulnerabilities within a period of time

If vulnerabilities categorized and studied, can draw conclusions about care taken in design, implementation, and operationOtherwise, list helpful in closing holes but not more

Example: vendor gets confidential documents, 30 days later publishes them on web

Goal: obtain access to such a file; you have 30 daysAlternate goal: gain access to any of these files; no time limit (a Trojan horse would give access for over 30 days)

Page 11: Vulnerability Analysis

Slide Slide 1111

Layering of TestsLayering of Tests1. External attacker with no knowledge of system

• Locate system, learn enough to be able to access it2. External attacker with access to system

• Can log in, or access network servers• Often try to expand level of access

3. Internal attacker with access to system• Testers are authorized users with restricted accounts

(like ordinary users)• Typical goal is to gain unauthorized privileges or

information

Page 12: Vulnerability Analysis

Slide Slide 1212

Layering of Tests (con’t)Layering of Tests (con’t)Studies conducted from attacker’s point of viewEnvironment is that in which attacker would functionIf information about a particular layer irrelevant, layer can be skipped

Example: penetration testing during design, development skips layer 1Example: penetration test on system with guest account usually skips layer 2

Page 13: Vulnerability Analysis

Slide Slide 1313

MethodologyMethodologyUsefulness of penetration study comes from documentation, conclusions

Indicates whether flaws are endemic or notIt does not come from success or failure of attempted penetration

Degree of penetration’s success also a factorIn some situations, obtaining access to unprivileged account may be less successful than obtaining access to privileged account

Page 14: Vulnerability Analysis

Slide Slide 1414

Flaw Hypothesis MethodologyFlaw Hypothesis Methodology1. Information gathering

• Become familiar with system’s functioning2. Flaw hypothesis

• Draw on knowledge to hypothesize vulnerabilities3. Flaw testing

• Test them out4. Flaw generalization

• Generalize vulnerability to find others like it5. (maybe) Flaw elimination

• Testers eliminate the flaw (usually not included)

Page 15: Vulnerability Analysis

Slide Slide 1515

Information GatheringInformation GatheringDevise model of system and/or components

Look for discrepencies in componentsConsider interfaces among components

Need to know system well (or learn quickly!)Design documents, manuals help

Unclear specifications often misinterpreted, or interpreted differently by different people

Look at how system manages privileged users

Page 16: Vulnerability Analysis

Slide Slide 1616

Flaw HypothesizingFlaw HypothesizingExamine policies, procedures

May be inconsistencies to exploitMay be consistent, but inconsistent with design or implementationMay not be followed

Examine implementationsUse models of vulnerabilities to help locate potential problemsUse manuals; try exceeding limits and restrictions; try omitting steps in procedures

Page 17: Vulnerability Analysis

Slide Slide 1717

Flaw Hypothesizing (Flaw Hypothesizing (con’tcon’t))Identify structures, mechanisms controlling system

These are what attackers will useEnvironment in which they work, and were built, may have introduced errors

Throughout, draw on knowledge of other systems with similarities

Which means they may have similar vulnerabilities

Result is list of possible flaws

Page 18: Vulnerability Analysis

Slide Slide 1818

Flaw TestingFlaw TestingFigure out order to test potential flaws

Priority is function of goalsExample: to find major design or implementation problems, focus on potential system critical flawsExample: to find vulnerability to outside attackers, focus on external access protocols and programs

Figure out how to test potential flawsBest way: demonstrate from the analysis

Common when flaw arises from faulty spec, design, or operationOtherwise, must try to exploit it

Page 19: Vulnerability Analysis

Slide Slide 1919

Flaw Testing (Flaw Testing (con’tcon’t))Design test to be least intrusive as possible

Must understand exactly why flaw might ariseProcedure

Back up systemVerify system configured to allow exploit

Take notes of requirements for detecting flawVerify existence of flaw

May or may not require exploiting the flawMake test as simple as possible, but success must be convincing

Must be able to repeat test successfully

Page 20: Vulnerability Analysis

Slide Slide 2020

Flaw GeneralizationFlaw GeneralizationAs tests succeed, classes of flaws emergeSometimes two different flaws may combine for devastating attack

Example: flaw 1 gives external attacker access to unprivileged account on system; second flaw allows any user on that system to gain full privileges any external attacker can get full privileges

Page 21: Vulnerability Analysis

Slide Slide 2121

Flaw EliminationFlaw EliminationUsually not included as testers are not best folks to fix this

Designers and implementers areRequires understanding of context, details of flaw including environment, and possibly exploit

Design flaw uncovered during development can be corrected and parts of implementation redone

Don’t need to know how exploit worksDesign flaw uncovered at production site may not be corrected fast enough to prevent exploitation

So need to know how exploit works

Page 22: Vulnerability Analysis

Slide Slide 2222

Corporate Computer SystemCorporate Computer SystemCase 1Case 1

Goal: determine whether corporate security measures were effective in keeping external attackers from accessing systemTesters focused on policies and procedures

Both technical and non-technical

Page 23: Vulnerability Analysis

Slide Slide 2323

Step 1: Information GatheringStep 1: Information Gathering

Searched InternetGot names of employees, officialsGot telephone number of local branch, and from them got copy of annual report

Constructed much of the company’s organization from this data

Including list of some projects on which individuals were working

Page 24: Vulnerability Analysis

Slide Slide 2424

Step 2: Get Telephone DirectoryStep 2: Get Telephone DirectoryCorporate directory would give more needed information about structure

Tester impersonated new employeeLearned two numbers needed to have something delivered off-site: employee number of person requesting shipment, and employee’s Cost Center number

Testers called secretary of executive they knew most about

One impersonated an employee, got executive’s employee numberAnother impersonated auditor, got Cost Center number

Had corporate directory sent to off-site “subcontractor”

Page 25: Vulnerability Analysis

Slide Slide 2525

Step 3: Flaw HypothesisStep 3: Flaw HypothesisControls blocking people giving passwords away not fully communicated to new employees

Testers impersonated secretary of senior executive

Called appropriate officeClaimed senior executive upset he had not been given names of employees hired that weekGot the names

Page 26: Vulnerability Analysis

Slide Slide 2626

Step 4: Flaw TestingStep 4: Flaw TestingTesters called newly hired people

Claimed to be with computer centerProvided “Computer Security Awareness Briefing” over phoneDuring this, learned:

Types of comnputer systems usedEmployees’ numbers, logins, and passwords

Called computer center to get modem numbersThese bypassed corporate firewalls

Success

Page 27: Vulnerability Analysis

Slide Slide 2727

Burroughs B6700Burroughs B6700Case 2Case 2

System architecture: based on strict file typingEntities: ordinary users, privileged users, privileged programs, OS tasks

Ordinary users tightly restrictedOther 3 can access file data without restriction but constrained from compromising integrity of system

No assemblers; compilers output executable codeData files, executable files have different types

Only compilers can produce executablesWriting to executable or its attributes changes its type to data

Class exercise: obtain status of privileged user

Page 28: Vulnerability Analysis

Slide Slide 2828

Step 1: Information GatheringStep 1: Information Gathering

System had tape drivesWriting file to tape preserved file contentsHeader record prepended to tape that indicates file attributes including type

Data could be copied from one tape to another

If you change data, it’s still data

Page 29: Vulnerability Analysis

Slide Slide 2929

Step 2: Flaw HypothesisStep 2: Flaw Hypothesis

System cannot detect change to executable file if that file is altered off-line

Page 30: Vulnerability Analysis

Slide Slide 3030

Step 3: Flaw TestingStep 3: Flaw TestingWrite small program to change type of any file from data to executable

Compiled, but could not be used yet as it would alter file attributes, making target a data fileWrite this to tape

Write a small utility to copy contents of tape 1 to tape 2

Utility also changes header record of contents to indicate file was a compiler (and so could output executables)

Page 31: Vulnerability Analysis

Slide Slide 3131

Creating the CompilerCreating the CompilerRun copy program

As header record copied, type becomes “compiler”Reinstall program as a new compilerWrite new subroutine, compile it normally, and change machine code to give privileges to anyone calling it (this makes it data, of course)

Now use new compiler to change its type from data to executable

Write third program to call thisNow you have privileges

Page 32: Vulnerability Analysis

Slide Slide 3232

Vulnerability ClassificationVulnerability ClassificationDescribe flaws from differing perspectives

Exploit-orientedHardware, software, interface-oriented

Goals vary; common ones are:Specify, design, implement computer system without vulnerabilitiesAnalyze computer system to detect vulnerabilitiesAddress any vulnerabilities introduced during system operationDetect attempted exploitations of vulnerabilities

Page 33: Vulnerability Analysis

Slide Slide 3333

Example FlawsExample FlawsUse these to compare classification schemesFirst one: race condition (xterm)Second one: buffer overflow on stack leading to execution of injected code (fingerd)Both are very well known, and fixes available!

And should be installed everywhere …

Page 34: Vulnerability Analysis

Slide Slide 3434

Flaw #1: Flaw #1: xtermxtermxterm emulates terminal under X11 window system

Must run as root user on UNIX systemsNo longer universally true; reason irrelevant here

Log feature: user can log all input, output to fileUser names fileIf file does not exist, xterm creates it, makes owner the userIf file exists, xterm checks user can write to it, and if so opens file to append log to it

Page 35: Vulnerability Analysis

Slide Slide 3535

File ExistsFile ExistsCheck that user can write to file requires special system call

Because root can append to any file, check in open will always succeed

Check that user can write to file “/usr/tom/X”if (access(‘’/usr/tom/X’’, W_OK) == 0){

Open “/usr/tom/X” to append log entriesif ((fd = open(‘’/usr/tom/X’’, O_WRONLY|O_APPEND))< 0){

/* handle error: cannot open file */}

}

Page 36: Vulnerability Analysis

Slide Slide 3636

ProblemProblemBinding of file name “/usr/tom/X” to file object can change between first and second lines

(a) is at access; (b) is at openNote file opened is not file checked

/etc

passwd X

open(“/usr/tom/X”, O_WRITE)

passwd data

/etc

passwd

usr

access(“/usr/tom/X”, W_OK)

X datapasswd data X data

(a) (b)

tomX

usr

tom

Page 37: Vulnerability Analysis

Slide Slide 3737

Flaw #2: Flaw #2: fingerdfingerd

Exploited by Internet Worm of 1988Recurs in many places, even now

finger client send request for information to server fingerd (finger daemon)

Request is name of at most 512 charsWhat happens if you send more?

Page 38: Vulnerability Analysis

Slide Slide 3838

Buffer OverflowBuffer OverflowExtra chars overwrite rest of stack, as shownCan make those chars change return address to point to beginning of bufferIf buffer contains small program to spawn shell, attacker gets shell on target system

main localvariables

return addressof main

other returnstate info

gets localvariables

parameter togets

input buffer

main localvariables

address ofinput buffer

other returnstate info

gets localvariables

program toinvoke shell

Aftermessage

Page 39: Vulnerability Analysis

Slide Slide 3939

FrameworksFrameworksGoals dictate structure of classification scheme

Guide development of attack tool focus is on steps needed to exploit vulnerabilityAid software development process focus is on design and programming errors causing vulnerabilities

Following schemes classify vulnerability as n-tuple, each element of n-tuple being classes into which vulnerability falls

Some have 1 axis; others have multiple axes

Page 40: Vulnerability Analysis

Slide Slide 4040

Research Into Secure Operating Research Into Secure Operating Systems (RISOS)Systems (RISOS)

Goal: aid computer, system managers in understanding security issues in OSes, and help determine how much effort required to enhance system securityAttempted to develop methodologies and software for detecting some problems, and techniques for avoiding and ameliorating other problemsExamined Multics, TENEX, TOPS-10, GECOS, OS/MVT, SDS-940, EXEC-8

Page 41: Vulnerability Analysis

Slide Slide 4141

Classification SchemeClassification SchemeIncomplete parameter validationInconsistent parameter validationImnplicit sharing f privileged/confidential dataAsynchronous validation/inadequate serializationInadequate identification/authentication/authorizationViolable prohibition/limitExploitable logic error

Page 42: Vulnerability Analysis

Slide Slide 4242

Incomplete Parameter ValidationIncomplete Parameter ValidationParameter not checked before useExample: emulating integer division in kernel (RISC chip involved)

Caller provided addresses for quotient, remainderQuotient address checked to be sure it was in user’s protection domainRemainder address not checked

Set remainder address to address of process’ level of privilegeCompute 25/5 and you have level 0 (kernel) privileges

Check for type, format, range of values, access rights, presence (or absence)

Page 43: Vulnerability Analysis

Slide Slide 4343

Inconsistent Parameter Inconsistent Parameter ValidationValidation

Each routine checks parameter is in proper format for that routine but the routines require different formatsExample: each database record 1 line, colons separating fields

One program accepts colons, newlines as pat of data within fieldsAnother program reads them as field and record separatorsThis allows bogus records to be entered

Page 44: Vulnerability Analysis

Slide Slide 4444

Implicit Sharing of Privileged / Implicit Sharing of Privileged / Confidential DataConfidential Data

OS does not isolate users, processes properlyExample: file password protection

OS allows user to determine when paging occursFiles protected by passwords

Passwords checked char by char; stops at first incorrect char

Position guess for password so page fault occurred between 1st, 2nd char

If no page fault, 1st char was wrong; if page fault, it was right

Continue until password discovered

Page 45: Vulnerability Analysis

Slide Slide 4545

Asynchronous Validation / Asynchronous Validation / Inadequate SerializationInadequate Serialization

Time of check to time of use flaws, intermixing reads and writes to create inconsistenciesExample: xterm flaw discussed earlier

Page 46: Vulnerability Analysis

Slide Slide 4646

Inadequate Identification / Inadequate Identification / Authorization / AuthenticationAuthorization / AuthenticationErroneously identifying user, assuming another’s privilege, or tricking someone into executing program without authorizationExample: OS on which access to file named “SYS$*DLOC$” meant process privileged

Check: can process access any file with qualifier name beginning with “SYS” and file name beginning with “DLO”?If your process can access file “SYSA*DLOC$”, which is ordinary file, your process is privileged

Page 47: Vulnerability Analysis

Slide Slide 4747

Violable Prohibition / LimitViolable Prohibition / LimitBoundary conditions not handled properlyExample: OS kept in low memory, user process in high memory

Boundary was highest address of OSAll memory accesses checked against thisMemory accesses not checked beyond end of high memory

Such addresses reduced modulo memory sizeSo, process could access (memory size)+1, or word 1, which is part of OS …

Page 48: Vulnerability Analysis

Slide Slide 4848

Exploitable Logic ErrorExploitable Logic ErrorProblems not falling into other classes

Incorrect error handling, unexpected side effects, incorrect resource allocation, etc.

Example: unchecked return from monitorMonitor adds 1 to address in user’s PC, returns

Index bit (indicating indirection) is a bit in wordAttack: set address to be –1; adding 1 overflows, changes index bit, so return is to location stored in register 1

Arrange for this to point to bootstrap program stored in other registers

On return, program executes with system privileges

Page 49: Vulnerability Analysis

Slide Slide 4949

Legacy of RISOSLegacy of RISOSFirst funded project examining vulnerabilitiesValuable insight into nature of flaws

Security is a function of site requirements and threatsSmall number of fundamental flaws recurring in many contextsOS security not critical factor in design of OSes

Spurred additional research efforts into detection, repair of vulnerabilities

Page 50: Vulnerability Analysis

Slide Slide 5050

Program Analysis (PA)Program Analysis (PA)

Goal: develop techniques to find vulnerabilitiesTried to break problem into smaller, more manageable piecesDeveloped general strategy, applied it to several OSes

Found previously unknown vulnerabilities

Page 51: Vulnerability Analysis

Slide Slide 5151

Classification SchemeClassification SchemeImproper protection domain initialization and enforcement

Improper choice of initial protection domainImproper isolation of implementation detailImproper changeImproper namingImproper deallocation or deletion

Improper validationImproper synchronization

Improper indivisibilityImproper sequencing

Improper choice of operand or operation

Page 52: Vulnerability Analysis

Slide Slide 5252

Improper Choice of Initial Improper Choice of Initial Protection DomainProtection Domain

Initial incorrect assignment of privileges, security and integrity classesExample: on boot, protection mode of file containing identifiers of all users can be altered by any user

Under most policies, should not be allowed

Page 53: Vulnerability Analysis

Slide Slide 5353

Improper Isolation of Improper Isolation of Implementation DetailImplementation Detail

Mapping an abstraction into an implementation in such a way that the abstraction can be bypassedExample: Flows that allow users to bypass the operating system and write directly to absolute I/O location.

Page 54: Vulnerability Analysis

Slide Slide 5454

Improper ChangeImproper ChangeData is inconsistent over a period of timeExample: xterm flaw

Meaning of “/usr/tom/X” changes between access and open

Example: parameter is validated, then accessed; but parameter is changed between validation and access

Burroughs B6700 allowed allowed this

Page 55: Vulnerability Analysis

Slide Slide 5555

Improper NamingImproper Naming

Multiple objects with same nameExample: Trojan horse

loadmodule attack discussed earlier; “bin” could be a directory or a program

Example: multiple hosts with same IP address

Messages may be erroneously routed

Page 56: Vulnerability Analysis

Slide Slide 5656

Improper Deallocation or Improper Deallocation or DeletionDeletion

Failing to clear memory or disk blocks (or other storage) after it is freed for use by othersExample: program that contains passwords that a user typed dumps core

Passwords plainly visible in core dump

Page 57: Vulnerability Analysis

Slide Slide 5757

Improper ValidationImproper Validation

Inadequate checking of bounds, type, or other attributes or valuesExample: fingerd’s failure to check input length

Page 58: Vulnerability Analysis

Slide Slide 5858

Improper IndivisibilityImproper IndivisibilityInterrupting operations that should be uninterruptable

Often: “interrupting atomic operations”Example: mkdir flaw (UNIX Version 7)

Created directories by executing privileged operation to create file node of type directory, then changed ownership to userOn loaded system, could change binding of name of directory to be that of password file after directory created but before change of ownershipAttacker can change administrator’s password

Page 59: Vulnerability Analysis

Slide Slide 5959

Improper SequencingImproper SequencingRequired order of operations not enforcedExample: one-time password scheme

System runs multiple copies of its serverTwo users try to access same account

Server 1 reads password from fileServer 2 reads password from fileBoth validate typed password, allow user to log inServer 1 writes new password to fileServer 2 writes new password to file

Should have every read to file followed by a write, and vice versa; not two reads or two writes to file in a row

Page 60: Vulnerability Analysis

Slide Slide 6060

Improper Choice of Operand or Improper Choice of Operand or OperationOperation

Calling inappropriate or erroneous instructionsExample: cryptographic key generation software calling pseudorandom number generators that produce predictable sequences of numbers

Page 61: Vulnerability Analysis

Slide Slide 6161

LegacyLegacy

First to explore automatic detection of security flaws in programs and systemsMethods developed but not widely used

Parts of procedure could not be automatedComplexityProcedures for obtaining system-independent patterns describing flaws not complete

Page 62: Vulnerability Analysis

Slide Slide 6262

NRL TaxonomyNRL TaxonomyGoals:

Determine how flaws entered systemDetermine when flaws entered systemDetermine where flaws are manifested in system

3 different schemes used:Genesis of flawsTime of flawsLocation of flaws

Page 63: Vulnerability Analysis

Slide Slide 6363

Genesis of FlawsGenesis of Flaws

Inadvertent (unintentional) flaws classified using RISOS categories; not shown above

If most inadvertent, better design/coding reviews neededIf most intentional, need to hire more trustworthy developers and do more security-related testing

Intentional

Malicious

Trojan horseNonreplicating

ReplicatingTrapdoor

Logic/time bomb

Nonmalicious

Covert channel

Other

Storage

Timing

Page 64: Vulnerability Analysis

Slide Slide 6464

Time of FlawsTime of Flaws

Development phase: all activities up to release of initial version of softwareMaintenance phase: all activities leading to changes in software performed under configuration controlOperation phase: all activities involving patching and not under configuration control

Time ofintroduction

Development

Maintenance

Operation

Requirement/specif ication/designSource code

Object code

Page 65: Vulnerability Analysis

Slide Slide 6565

Location of FlawLocation of Flaw

Focus effort on locations where most flaws occur, or where most serious flaws occur

Location

Software

Hardw are

Operating system

Support

Application

Privileged utilitiesUnpri vileged utilities

System initializationMemory managementProcess management/schedulingDevice managementFile managementIdentification/authenticationOther/unkno wn

Page 66: Vulnerability Analysis

Slide Slide 6666

LegacyLegacyAnalyzed 50 flawsConcluded that, with a large enough sample size, an analyst could study relationships between pairs of classes

This would help developers focus on most likely places, times, and causes of flaws

Focused on social processes as well as technical detailsBut much information required for classification not available for the 50 flaws

Page 67: Vulnerability Analysis

Slide Slide 6767

Aslam’s ModelAslam’s ModelGoal: treat vulnerabilities as faults and develop scheme based on fault treesFocuses specifically on UNIX flawsClassifications unique and unambiguous

Organized as a binary tree, with a question at each node. Answer determines branch you takeLeaf node gives you classification

Suited for organizing flaws in a database

Page 68: Vulnerability Analysis

Slide Slide 6868

Top LevelTop LevelCoding faults: introduced during software development

Example: fingerd’s failure to check length of input string before storing it in buffer

Emergent faults: result from incorrect initialization, use, or application

Example: allowing message transfer agent to forward mail to arbitrary file on system (it performs according to specification, but results create a vulnerability)

Page 69: Vulnerability Analysis

Slide Slide 6969

Coding FaultsCoding FaultsSynchronization errors: improper serialization of operations, timing window between two operations creates flaw

Example: xterm flawCondition validation errors: bounds not checked, access rights ignored, input not validated, authentication and identification fails

Example: fingerd flaw

Page 70: Vulnerability Analysis

Slide Slide 7070

Emergent FaultsEmergent FaultsConfiguration errors: program installed incorrectly

Example: tftp daemon installed so it can access any file; then anyone can copy any fileTrivial File Transfer Protocol, a simple form of the File Transfer Protocol (FTP). TFTP uses the User Datagram Protocol (UDP)and provides no security features.

Environmental faults: faults introduced by environmentExample: on some UNIX systems, any shell with “-” as first char of name is interactive, so find a setuid shell script, create a link to name “-gotcha”, run it, and you has a privileged interactive shell

Page 71: Vulnerability Analysis

Slide Slide 7171

LegacyLegacy

Tied security flaws to software faultsIntroduced a precise classification scheme

Each vulnerability belongs to exactly 1 class of security flawsDecision procedure well-defined, unambiguous

Page 72: Vulnerability Analysis

Slide Slide 7272

Comparison and AnalysisComparison and AnalysisPoint of view

If multiple processes involved in exploiting the flaw, how does that affect classification?

xterm, fingerd flaws depend on interaction of two processes (xterm and process to switch file objects; fingerd and its client)

Levels of abstractionHow does flaw appear at different levels?

Levels are abstract, design, implementation, etc.

Page 73: Vulnerability Analysis

Slide Slide 7373

xtermxterm and PA Classification and PA Classification

Implementation levelxterm: improper changeattacker’s program: improper deallocation or deletionoperating system: improper indivisibility

Page 74: Vulnerability Analysis

Slide Slide 7474

xtermxterm and PA Classification and PA ClassificationConsider higher level of abstraction, where directory is simply an object

create, delete files maps to writing; read file status, open file maps to readingoperating system: improper sequencing

During read, a write occurs, violating Bernstein conditions

Consider even higher level of abstractionattacker’s process: improper choice of initial protection domain

Should not be able to write to directory containing log fileSemantics of UNIX users require this at lower levels

Page 75: Vulnerability Analysis

Slide Slide 7575

xtermxterm and RISOS Classification and RISOS Classification

Implementation levelxterm: asynchronous validation/inadequate serializationattacker’s process: exploitable logic error and violable prohibition/limitoperating system: inconsistent parameter validation

Page 76: Vulnerability Analysis

Slide Slide 7676

xtermxterm and RISOS Classification and RISOS ClassificationConsider higher level of abstraction, where directory is simply an object (as before)

all: asynchronous validation/inadequate serialization

Consider even higher level of abstractionattacker’s process: inadequate identification/authentication/authorization

Directory with log file not protected adequatelySemantics of UNIX require this at lower levels

Page 77: Vulnerability Analysis

Slide Slide 7777

xtermxterm and NRL Classification and NRL ClassificationTime, location unambiguous

Time: during developmentLocation: Support:privileged utilities

Genesis: ambiguousIf intentional:

Lowest level: inadvertent flaw of serialization/aliasing

If unintentional:Lowest level: nonmalicious: other

At higher levels, parallels that of RISOS

Page 78: Vulnerability Analysis

Slide Slide 7878

xterm xterm and Aslam’s Classificationand Aslam’s ClassificationImplementation level

attacker’s process: object installed with incorrect permissionsattacker’s process can delete file

xterm: access rights validation errorxterm doesn’t properly valisate file at time of access

operating system: improper or inadequate serialization errordeletion, creation should not have been interspersed with access, open

Note: in absence of explicit decision procedure, all could go into class race condition

Page 79: Vulnerability Analysis

Slide Slide 7979

The PointThe PointThe schemes lead to ambiguity

Different researchers may classify the same vulnerability differently for the same classification scheme

Not true for Aslam’s, but that misses connections between different classifications

xterm is race condition as well as others; Aslam does not show this

Page 80: Vulnerability Analysis

Slide Slide 8080

fingerdfingerd and PA Classification and PA Classification

Implementation levelfingerd: improper validationattacker’s process: improper choice of operand or operationoperating system: improper isolation of implementation detail

Page 81: Vulnerability Analysis

Slide Slide 8181

fingerdfingerd and PA Classification and PA ClassificationConsider higher level of abstraction, where storage space of return address is object

operating system: improper changefingerd: improper validation

Because it doesn’t validate the type of instructions to be executed, mistaking data for valid ones

Consider even higher level of abstraction, where security-related value in memory is changing and data executed that should not be executable

operating system: improper choice of initial protection domain

Page 82: Vulnerability Analysis

Slide Slide 8282

fingerdfingerd and RISOS Classification and RISOS Classification

Implementation levelfingerd: incomplete parameter validationattacker’s process: violable prohibition/limitoperating system: inadequate identification/authentication/authorization

Page 83: Vulnerability Analysis

Slide Slide 8383

fingerdfingerd and RISOS Classification and RISOS ClassificationConsider higher level of abstraction, where storage space of return address is object

operating system: asynchronous validation/inadequate serializationfingerd: inadequate identification/authentication/authorization

Consider even higher level of abstraction, where security-related value in memory is changing and data executed that should not be executable

operating system: inadequate identification/authentication/authorization

Page 84: Vulnerability Analysis

Slide Slide 8484

fingerdfingerd and NRL Classification and NRL Classification

Time, location unambiguousTime: during developmentLocation: support: privileged utilities

Genesis: ambiguousKnown to be inadvertent flawParallels that of RISOS

Page 85: Vulnerability Analysis

Slide Slide 8585

fingerdfingerd and Aslam Classification and Aslam Classification

Implementation levelfingerd: boundary condition errorattacker’s process: boundary condition error

operating system: environmental faultIf decision procedure not present, could also have been access rights validation errors

Page 86: Vulnerability Analysis

Slide Slide 8686

SummarySummary

Classification schemes requirementsDecision procedure for classifying vulnerabilityEach vulnerability should have unique classification

Above schemes do not meet these criteriaInconsistent among different levels of abstractionPoint of view affects classification

Page 87: Vulnerability Analysis

Slide Slide 8787

Key PointsKey PointsGiven large numbers of non-secure systems in use now, unrealistic to expect less vulnerable systems to replace themPenetration studies are effective tests of systems provided the test goals are known and tests are structured wellVulnerability classification schemes aid in flaw generalization and hypothesis