Fortify Flashcards

1
Q

HP Fortify SCA has 6 analyzers: data flow, control flow, semantic, structural, configuration, and buffer. Each analyzer finds different types of vulnerabilities.

A

Data Flow This analyzer detects potential vulnerabilities that involve tainted data (user-controlled input) put to potentially dangerous use. The data flow analyzer uses global, inter-procedural taint propagation analysis to detect the flow of data between a source (site of user input) and a sink (dangerous function call or operation). For example, the data flow analyzer detects whether a user-controlled input string of unbounded length is being copied into a statically sized buffer, and detects whether a user controlled string is being used to construct SQL query text. Control Flow This analyzer detects potentially dangerous sequences of operations. By analyzing control flow paths in a program, the control flow analyzer determines whether a set of operations are executed in a certain order. For example, the control flow analyzer detects time of check/time of use issues and uninitialized variables, and checks whether utilities, such as XML readers, are configured properly before being used. Structural This detects potentially dangerous flaws in the structure or definition of the program. For example, the structural analyzer detects assignment to member variables in Java servlets, identifies the use of loggers that are not declared static final, and flags instances of dead code that will never be executed because of a predicate that is always false. Semantic This analyzer detects potentially dangerous uses of functions and APIs at the intra-procedural level. Basically a smart GREP. Configuration This analyzer searches for mistakes, weaknesses, and policy violations in an application’s deployment configuration files. Buffer This analyzer detects buffer overflow vulnerabilities that involve writing or reading more data than a buffer can hold.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Other Fortify steps

A

Your source code is translated into an intermediate model, which is optimized for analysis by SCA. Some types of code require multiple stages of translation. For instance, a C# file needs first to be compiled into a debug .DLL or .EXE, and then that .NET binary file disassembled into Microsoft Intermediate Language (MSIL) by the .NET SDK utility ildasm.exe. Whereas other files like a Java file or ASP file are translated in one pass by the appropriate Fortify SCA translator for that language. SCA loads the model into memory and loads the analyzers. Each analyzer loads rules and applies those roles to functions in your program model, in a coordinated manner. The matches are written into an FPR file, with the vulnerability match information, security advice, source code, source cross-reference and code navigation information, user filtering specification, any custom rules, and digital signatures all zipped into the package.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Fortify Source Code Analyser

A

Fortify Source Code Analyzer (SCA) is a set of software security analyzers that search for violations of security‐specific coding rules and guidelines in a variety of languages. • The rich data provided by Fortify SCA language technology enables the analyzers to pinpoint and prioritize violations so that fixes can be fast and accurate. • The analysis information produced by SCA helps you deliver more secure software, as well as making security code reviews more efficient, consistent, and complete.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Using Fortify

A

At the highest level, using Fortify SCA involves: • Choosing to run SCA as a stand‐alone process or integrating Fortify SCA as part of the build tool • Translating the source code into an intermediate translated format, preparing the code base for scanning by the different analyzers • Scanning the translated code, producing security vulnerability reports • Auditing the results of the scan, either by transferring the resulting FPR file to Audit Workbench or Fortify 360 Server for analysis, or directly with the results displayed onscreen

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Analyzers

A

Data Flow: The data flow analyzer detects potential vulnerabilities that involve tainted data (user‐controlled input) put to potentially dangerous use. Eg. Buffer overflow, SQL Injections. • Control Flow: The control flow analyzer detects potentially dangerous sequences of operations. Eg. time of check/time of use issues and uninitialized variables. • Semantic: The semantic analyzer detects potentially dangerous uses of functions and APIs at the intra‐procedural level. Eg. Deprecated functions, unsafe functions. • Structural: The structural analyzer detects potentially dangerous flaws in the structure or definition of the program. For Eg. Dead Code. • Configuration: The configuration analyzer searches for mistakes, weaknesses, and policy violations in an application’s deployment configuration files.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Analysis Phases

A

• Fortify SCA performs source code analysis • Build Integration: The first phase of source code analysis involves making a decision whether to integrate SCA into the build compiler system. • Translation: Source code gathered using a series of commands is translated into an intermediate format which is associated with a build ID. The build ID is usually the name of the project being scanned. • Analysis: Source files identified during the translation phase are scanned and an analysis results file, typically in the Fortify project (FPR) format, is generated. FPR files are indicated by the .fpr file extension. • Verification of the translation and analysis: Ensure that the source files were scanned using the correct rulepacks and that no significant errors were reported.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Analysis Commands

A

The following is an example of the sequence of commands you use to analyze code: • Clean and build  sourceanalyzer -b -clean • Translation  sourceanalyzer -b … •Scan  sourceanalyzer -b -scan -f results.fpr

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Translation Options

A

Output Options: • -append : Appends results to the file specified with -f. If this option is not specified, Fortify SCA adds the new findings to the FPR file, and labels the older result as previous findings. • -build-label : The label of the project being scanned. • -build-project : The name of the project being scanned. • -build-version : The version of the project being scanned. • -f : The file to which results are written. • -format : Controls the output format. Valid options are fpr, fvdl, text, and auto. • -html-report : Creates an HTML summary of the results produced.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Translation Options

A

Analysis Options: • -disable-default-ruletype : Disables all rules of the specified type in the default rulepacks. • -encoding : Specifies the encoding for encoded source files. • -filter : Specifies a results filter file. • -findbugs : Enables FindBugs analysis for Java code. • -quick : Scans the project in Quick Scan Mode. • -rules [|] : Specifies a custom rulepack or directory. • -disable-source-rendering : Source files are not included in the FPR file. • -scan : Causes Fortify SCA to perform analysis for the specified build ID.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Translation Options

A

Build Integration Options • -b : Specifies the build ID. • -bin : Used with -scan to specify a subset of source files to scan. Only the source files that were linked in the named binary at build time are included in the scan. • -exclude : Removes files from the list of files to translate. For example: sourceanalyzer –cp “**/*.jar”  “**/*” -exclude “**/Test.java“ • -nc : When specified before a compiler command line.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Translation Options

A

Runtime Options • -auth-silent : Available on Fortify SCA Per Use edition only.  Suppresses the prompt that displays the number of lines the scan requires to analyze the source code. • -64 : Runs Fortify SCA under the 64‐bit JRE. • -logfile : Specifies the log file that is produced by Fortify SCA. • -quiet : Disables the command line progress bar. • -verbose : Sends verbose status messages to the console. • -Xmx : Specifies the maximum amount of memory used by Fortify SCA.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Fortify on Demand Step 1: Initiate

A

Create and customize applications. Choose your desired assessment type. Upload source code, byte code or binaries, or provide URL of target application.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Step 2: Assess

A

Micro Focus security professionals perform an assessment and verify results. Verifiable false-positives are removed from the system before results are published with a star-rating and assessment against pass/fail criteria. Lightning-fast turnaround time (typically a few hours) depending upon assessment level and type.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Step 3: Report

A

Communicate relevant metrics, filtering by severity, vulnerability category, business unit, region or other company data. Quickly show identified critical vulnerabilities, applications at highest risk and trending history.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Step 4: Remediate

A

Click on the application name to get up-to-date audit information: scan owner, analysis type and any notes. Drill down even further for stack trace, line of code details, request/response and remediation recommendations. Manage and assign remediation tasks through the portal.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

HP WebInspect

A

Dynamic Analysis, also known as Dynamic Application Security Testing (DAST), available from HP WebInspect. Detects vulnerabilities in running Web applications and Web services by simulating comprehensive attack scenarios Validates whether a particular vulnerability is in fact genuinely exploitable Speeds remediation by enabling you to know with certainty which issues to address first and why

17
Q

HP Fortify on Demand

A

With HP Fortify on Demand, you can immediately get started testing the security of your applications. Upload Your Code We Analyze It You Receive a Report

18
Q
A
19
Q

Static vs Dynamic Code

A

Static analysis is performed in a non-runtime environment. Typically a static analysis tool will inspect program code for all possible run-time behaviors and seek out coding flaws, back doors, and potentially malicious code. Dynamic analysis adopts the opposite approach and is executed while a program is in operation.