SOT

SOT

SOAR
Security Orchestration, Automation and Response

Automation of response to information security incidents using dynamic playbooks and information security tools, building an attack chain and with an object-oriented approach

NG SOAR
Next Generation SOAR

Automation of response to information security incidents with built-in basic correlation (SIEM), vulnerability Scanner (VS), collection of raw events directly from information security tools, dynamic playbooks, building an attack chain and an object-oriented approach. AM and VM are included

AM
Asset Management

Description of the IT landscape, detection of new objects on the network, categorization of assets, inventory, life cycle management of equipment and software on automated workstations and servers of organizations

VS
Vulnerability Scanner

Scanning information assets with enrichment from any external services (additional scanners, The Data Security Threats Database and other analytical databases) to analyze the security of the infrastructure.

VM
Vulnerability Management

Building a process for detecting and eliminating technical vulnerabilities, collecting information from existing security scanners, update management platforms, expert external services and other solutions

FinCERT
Financial Computer Emergency Response Team

Bilateral interaction with the Central Bank, namely the transfer of information about incidents and receipt of prompt notifications/bulletins from the regulator

GovCERT
Government Computer Emergency Response Team

Bilateral interaction with the state coordination center for computer incidents, namely the transfer of information about incidents and receipt of prompt notifications/bulletins from the regulator

Mail us to sales@securityvision.ru or get demo presentation

Static analysis of source code

Static analysis of source code
27.03.2023


  |  Слушать на Google Podcasts  |   Слушать на Mave  |   Слушать на Яндекс Музыке  |  


Roman Dushkov, Security Vision


Modern development strives to simplify code, increase its predictability and efficiency. Let's consider how to turn a continuous DevOps process into a secure DevSecOps process that cares about users and their security.


One way is Runtime application self-protection (RASP). It analyses the behaviour of applications and determines on the one hand their capabilities and on the other hand the zones of their operation, as applications can go beyond the boundaries of expected behaviour, access unnecessary information and simply be unsafe for end users.


Another way is that, unlike analysing an already running application, the code written by developers is sometimes examined. In this article we will study the tools of application source code analysis (Application Security Testing (AST)) by the example of Static AST ( SAST). SAST-analysers are used to examine the code for vulnerable commands, illogical interrelations and information that should not be present in good code.



Fig. 1 - Static code analysis mechanisms


The process of SAST-systems' work can be compared to a conveyor which receives text written by developers and outputs a report with a list of errors. Such a pipeline will work differently for texts written in different languages, but vendors usually offer analysis tools for all popular programming languages.


For the pipeline to work effectively, it must not only be created, but also periodically adjusted, improved and accelerated. For this purpose vendors constantly enrich their knowledge base, adding to the report with errors the ways of their elimination. Such knowledge bases include references such as OWASP, GitHub and CVSS.


So, two important factors for effective SAST are understanding the language in which the application is written and knowing how bugs can be fixed. Now let's break down step by step how the system processes text. Let's imagine that instead of an application we write an article - after the main text is written, it is passed to editors who 1) correct errors 2) make the text more readable 3) find keywords for quick search and display the article in search engines. The application source code is also analysed in different ways.


First, syntactic analysis is resorted to. Syntax differs not only in Russian, English, German and other human languages, but also for Python, GO and C++ and other programming languages. However, to a certain extent all languages are similar: just as in human languages we can identify the subject, predicate and other parts of speech, so in programming languages we can identify operators, commands and comments. Syntactic analysis allows you to detect individual fragments and regions, as in the 1000-character theorem. The work of a syntactic analyser is similar to the work of Asset Management systems, when all IT-assets of a company are laid out in order to build a network map and quickly find, for example, servers under repair. Or, if we return to the text of this article - syntax checking in Microsoft Word, as a result of which the necessary punctuation marks are inserted, the text itself is divided into paragraphs and phrases that are comfortable for reading, and a structure appears that is more convenient for SAST algorithms to perceive.


After that, the semantic analyser is switched on, which looks for a correlation between the form of the message and its semantic content. For example, zero in programming can be represented as an integer (0), a floating-point number (0,000000001) or a Boolean variable (False). You can interact with each variable in different ways: for example, you can add another number to an integer. And the True/False variable can be handled according to the rules of mathematical logic. When analysing the source code at this stage, the system determines the possibilities of commands and operators that can be optimized. From the analyser's point of view, you may not know the exact values of variables but see that the data came from an external source. Such data may be compromised, so you should inform the developer how to avoid, for example, SQL injections and buffer overflows.


Another way to analyse vulnerabilities in code is to study the transports used to transfer information. In life, each of you has probably encountered courier services (delivery of flowers, food from supermarkets and restaurants, storage of keys in safes when using Airbnb, etc.). Each delivery method has its own advantages: speed, mobility of the courier, size of the truck for transporting furniture, reliability and security. When creating applications, different transport protocols are also used, some of which are aimed at file processing, data retrieval in DBMS, API applications and others.


It is important to determine the possible risks of using different protocols - part of this work is taken care of by the SAST class system, or secrets in code repository. The latter storage is similar to mini safes for hotel keys or password storage in a browser: instead of using logins and passwords, you can apply variables to the systems, which will be securely stored separately and called while the application is running. This way, an attacker who gets the source code will not be able to find authorisation data in a system that is important to you, and therefore will not be able to attack it so easily.


Since we do not only orchestrate various means of information protection, but also automate routine and complex processes, we would like to conclude the description of SAST systems by highlighting the criticality of the procedures themselves. On the one hand, it is important to spot a vulnerability in time, but it is even more important to cover it quickly and efficiently. If the vulnerable software is already in use, but the vulnerability itself has not yet been addressed, you can either accept the risks or ensure the availability of data by introducing new security policies. There are various developer communities that help describe problems and test their work. Within companies that use off-the-shelf software, there is often no way to see and fix the source code, so vulnerabilities are inevitable. When organising processes, it is important to work efficiently on both sides: development should be secure, and fixing existing problems should be a simple and straightforward process.


Using the technologies described above, it is possible to analyse code before it is compiled, i.e. before a new version of the product is released, so developers can add SAST for security to their processes at the development stage, together with common CI/CD methods. The product itself will not fix weak and vulnerable code sections, but it will highlight possible risks. In the future, security can be further enhanced with special secret repositories, vulnerability scanners or code analysers that work dynamically.

Recommended

Review of the publication NIST SP 800-218 "Secure Software Development Framework (SSDF) Version 1.1: Recommendations for Mitigating the Risk of Software Vulnerabilities"
Review of the publication NIST SP 800-218 "Secure Software Development Framework (SSDF) Version 1.1: Recommendations for Mitigating the Risk of Software Vulnerabilities"
Security Vision Next Generation SOAR: Next Generation Cyber Threat Response Product
Security Vision Next Generation SOAR: Next Generation Cyber Threat Response Product
Review of NIST Publication SP 800-128 "Guide for Security-Focused Configuration Management of Information Systems"
Review of NIST Publication SP 800-128 "Guide for Security-Focused Configuration Management of Information Systems"
Practical protection of personal data. How should a company handle and protect personal data? Part 2
Practical protection of personal data. How should a company handle and protect personal data? Part 2
Overview of information security tools: users and data
Overview of information security tools: users and data
Review of the publication NIST SP 800-213 "IoT Device Cybersecurity Guidance for the Federal Government: Establishing IoT Device Cybersecurity Requirements"
Review of the publication NIST SP 800-213 "IoT Device Cybersecurity Guidance for the Federal Government: Establishing IoT Device Cybersecurity Requirements"
Security of transfers and payment for goods via SBP. Part 1
Security of transfers and payment for goods via SBP. Part 1
Protecting web applications: anti-DDoS
Protecting web applications: anti-DDoS
Review of the publication NIST SP 800-167 "Guide to Application Whitelisting"
Review of the publication NIST SP 800-167 "Guide to Application Whitelisting"
Review of the publication NIST SP 800-210 "General Access Control Guidance for Cloud Systems"
Review of the publication NIST SP 800-210 "General Access Control Guidance for Cloud Systems"
Darknet - what it is, how criminals use it, what to watch out for
Darknet - what it is, how criminals use it, what to watch out for
Biometric personal data, changes in regulation of its processing and market impact
Biometric personal data, changes in regulation of its processing and market impact

Recommended

Review of the publication NIST SP 800-218 "Secure Software Development Framework (SSDF) Version 1.1: Recommendations for Mitigating the Risk of Software Vulnerabilities"
Review of the publication NIST SP 800-218 "Secure Software Development Framework (SSDF) Version 1.1: Recommendations for Mitigating the Risk of Software Vulnerabilities"
Security Vision Next Generation SOAR: Next Generation Cyber Threat Response Product
Security Vision Next Generation SOAR: Next Generation Cyber Threat Response Product
Review of NIST Publication SP 800-128 "Guide for Security-Focused Configuration Management of Information Systems"
Review of NIST Publication SP 800-128 "Guide for Security-Focused Configuration Management of Information Systems"
Practical protection of personal data. How should a company handle and protect personal data? Part 2
Practical protection of personal data. How should a company handle and protect personal data? Part 2
Overview of information security tools: users and data
Overview of information security tools: users and data
Review of the publication NIST SP 800-213 "IoT Device Cybersecurity Guidance for the Federal Government: Establishing IoT Device Cybersecurity Requirements"
Review of the publication NIST SP 800-213 "IoT Device Cybersecurity Guidance for the Federal Government: Establishing IoT Device Cybersecurity Requirements"
Security of transfers and payment for goods via SBP. Part 1
Security of transfers and payment for goods via SBP. Part 1
Protecting web applications: anti-DDoS
Protecting web applications: anti-DDoS
Review of the publication NIST SP 800-167 "Guide to Application Whitelisting"
Review of the publication NIST SP 800-167 "Guide to Application Whitelisting"
Review of the publication NIST SP 800-210 "General Access Control Guidance for Cloud Systems"
Review of the publication NIST SP 800-210 "General Access Control Guidance for Cloud Systems"
Darknet - what it is, how criminals use it, what to watch out for
Darknet - what it is, how criminals use it, what to watch out for
Biometric personal data, changes in regulation of its processing and market impact
Biometric personal data, changes in regulation of its processing and market impact

Other articles

Don't trust and check seven times: how Zero Trust works
Don't trust and check seven times: how Zero Trust works
Principles of information security
Principles of information security
Information leakage channels. Part 1
Information leakage channels. Part 1
Review of NIST publication SP 1800-5, ‘IT Asset Management’
Review of NIST publication SP 1800-5, ‘IT Asset Management’
MITRE's publication ‘11 Strategies for a World-Class SOC Centre’. Strategy #7 ‘Choose and Collect the Right Data’
MITRE's publication ‘11 Strategies for a World-Class SOC Centre’. Strategy #7 ‘Choose and Collect the Right Data’
Review of the publication NIST SP 800-161 Rev. 1 (Draft) "Cybersecurity Supply Chain Risk Management Practices for Systems and Organizations"
Review of the publication NIST SP 800-161 Rev. 1 (Draft) "Cybersecurity Supply Chain Risk Management Practices for Systems and Organizations"
MITRE publication ‘11 Strategies for a World-Class SOC Centre’. Strategy #2 ‘Ensure the SOC has the authority it needs to fulfil its mission’
MITRE publication ‘11 Strategies for a World-Class SOC Centre’. Strategy #2 ‘Ensure the SOC has the authority it needs to fulfil its mission’
Business Continuity Product (Security Vision BCP) as a link between IT and IS processes
Business Continuity Product (Security Vision BCP) as a link between IT and IS processes
Cyberhygiene: 15 healthy habits for living with information
Cyberhygiene: 15 healthy habits for living with information

Other articles

Don't trust and check seven times: how Zero Trust works
Don't trust and check seven times: how Zero Trust works
Principles of information security
Principles of information security
Information leakage channels. Part 1
Information leakage channels. Part 1
Review of NIST publication SP 1800-5, ‘IT Asset Management’
Review of NIST publication SP 1800-5, ‘IT Asset Management’
MITRE's publication ‘11 Strategies for a World-Class SOC Centre’. Strategy #7 ‘Choose and Collect the Right Data’
MITRE's publication ‘11 Strategies for a World-Class SOC Centre’. Strategy #7 ‘Choose and Collect the Right Data’
Review of the publication NIST SP 800-161 Rev. 1 (Draft) "Cybersecurity Supply Chain Risk Management Practices for Systems and Organizations"
Review of the publication NIST SP 800-161 Rev. 1 (Draft) "Cybersecurity Supply Chain Risk Management Practices for Systems and Organizations"
MITRE publication ‘11 Strategies for a World-Class SOC Centre’. Strategy #2 ‘Ensure the SOC has the authority it needs to fulfil its mission’
MITRE publication ‘11 Strategies for a World-Class SOC Centre’. Strategy #2 ‘Ensure the SOC has the authority it needs to fulfil its mission’
Business Continuity Product (Security Vision BCP) as a link between IT and IS processes
Business Continuity Product (Security Vision BCP) as a link between IT and IS processes
Cyberhygiene: 15 healthy habits for living with information
Cyberhygiene: 15 healthy habits for living with information