Questions tagged [static-analysis]

Static analysis is the examination of computer source code without executing it. Most commonly static analysis is used to find bugs or ensure conformance to coding guidelines. The classic example is a compiler which finds lexical, syntactic and even some semantic mistakes. A source code security analyzer examines source code to detect and report weaknesses that can lead to security vulnerabilities.

Static analysis is the process of detecting errors and defects in software's source code. Although manual code review is technically static analysis, the term is most commonly used to refer to an automated code review process. Static code analysis (aka static analysis security testing or SAST) inputs source texts of programs and give recommendations to the programmer on what code fragments he/she should consider. Although an automated tool can not completely replace manual review, SAST is seen as by many organizations to be a cost effective supplement.

The tasks solved by static code analysis software can be divided into 3 categories:

  1. Detecting errors in programs.
  2. Recommendations on code formatting. Some static analyzers check if the source code corresponds to code formatting standards of practice such as the number of indents in various constructs, use of spaces/tabs, etc.
  3. Metrics computation. Static code analyzers can generate numerical values for properties of software or its specifications.

http://stackoverflow.com/questions/49716/what-is-static-code-analysis

SAST tools can employ model checking, data-flow analysis, abstract interpretation, and heuristic analysis. See Brian Chess, Jacob West (Fortify Software) (2007). Secure Programming with Static Analysis. Addison-Wesley. ISBN 978-0-321-42477-8, and the National Institute of Standards and Technology (NIST) Software Assurance Metrics and Tool Evaluation (SAMATE) Project

57 questions
3
votes
1 answer

Helping developers find logic and authorisation flaws

Professional penetration testers are usually good at finding all sorts of vulnerabilities, including logic flaws, that are highly-specific to the site being tested. However, being a manual activity, penetration testing is performed infrequently, so…
paj28
  • 32,736
  • 8
  • 92
  • 130
3
votes
3 answers

Best Practice for Suppressing Fortify SCA Findings

I have been searching for an answer as to how you should treat false positives in Fortify scans. For a long time, if something was determined to be a false positive, I would document the reasoning behind why that issue was a false positive and…
3
votes
0 answers

Identifying kernel pointer infoleaks via static analysis

Leaking pointers from the kernel can be useful to an attacker. Normally, pointers are printed using a special identifier, %pK, which will sanitize them. However, there are times when a kernel pointer is unintentionally revealed, for example because…
forest
  • 64,616
  • 20
  • 206
  • 257
3
votes
1 answer

What is the industry standard practice for saving a potentially (likely) malicious PDF for analysis?

I've received an email with an attached PDF which has many signs of being a malicious attachment. Lacking the time and resources to analyze it at the moment, I'd like to store it for later use, and possibly share it with another researcher. What is…
user3.1415927
  • 301
  • 1
  • 7
3
votes
2 answers

Common JavaScript Vulnerabilities

Can someone recommend a secure coding guideline for JavaScript? Is there a set of common vulnerabilities that are closely related to the JavaScript programming language? What I am searching for are equivalent vulnerabilities to stack, heap or buffer…
3
votes
1 answer

How to handle 3rd party vulnerable code?

We have recently done a static analysis of our application/s, and there are few critical findings for a 3rd party code i.e. jquery and swagger UI. What are security best practices in this case to mitigate the risk?
wonder
  • 103
  • 6
3
votes
0 answers

Taint analysis in a functional language

I recently read a paper titling "All You Ever Wanted to Know about Dynamic Taint Analysis and Forward Symbolic Execution (but Might Have Been Afraid to Ask)" by Dr. EJ Schwartz. In the paper, he mainly talked about their applications in binary level…
madipi
  • 131
  • 1
2
votes
0 answers

Can static analysis of JavaScript be done?

Is it possible to statistically analyze JavaScript to find obfuscated JavaScript? Any algorithms or equations with coefficients that can find obfuscated JavaScript?
2
votes
1 answer

How to perform security analysis of jwt authentication libraries

I am working on security analysis of jwt python libraries. I want to analyze how the libraries work and how they were used in development. Not the source code. Also I have to check the jwt libraries against known attacks like: None algorithm RS256…
Alaa
  • 73
  • 7
2
votes
3 answers

How do you test security tools

I am planning to purchase a security tool like fortify, or sonarqube or snyk. How do you evaluate if the scanner really picks up static vulnerabilities and malware, as well runtime attacks? Any good docker image sample which contains good malware…
2
votes
1 answer

Scanning a binary against YARA rules dictionary

I have found a malware binary, Which i am curious to see what patterns has been found from this file. Also i have a collection of ~1000 ioc's and yara-rule's related to Malwares and RAT's. I used Loki, yara-gui, The yara64 (i don't remember the link…
0_o
  • 1,142
  • 1
  • 9
  • 19
2
votes
0 answers

PHP static code analysis tool that follows includes (framework compatible)

I have been looking for a PHP taint analysis tool, or a PHP parser that can include files within its analysis. For example: include "asdf.php" //this is a function defined in asdf.php echo test($_GET["test"]); The tool should include asdf.php…
2
votes
2 answers

Way to find security bugs in Scala source code open-source way?

I looked on Web to find way for finding security bugs specially SQL Injection and XSS in Scala code with little success. Some posts recommended to write custom detectors for FindBugs plugin, others were more focused on code quality tools. Am I…
Krishna Pandey
  • 1,497
  • 1
  • 16
  • 26
2
votes
0 answers

Any worthy open source Java Source Code Analysis tool from finding Security Vulnerabilities perspective?

I have been breaking my head to find out real good Open-source Source Code Analysis tool which can uncover security vulnerabilities. I did an extensive search on web and found out three major links which lists open-source/commercial source code…
Krishna Pandey
  • 1,497
  • 1
  • 16
  • 26
1
vote
3 answers

What are main differences between Source Code Analysis vs Static Application Security Testing(SAST)?

Do these 2 terminologies refer to the same thing? https://www.owasp.org/index.php/Source_Code_Analysis_Tools http://en.wikipedia.org/wiki/List_of_tools_for_static_code_analysis#.NET Some of the tools overlap. Makes you wonder. If they are different…
DoodleKana
  • 329
  • 2
  • 4
  • 12