# US 2021/0173941 A1 · Method for detecting vulnerabilities in software

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0173941 A1
- Document ID: US20210173941A1
- Status: Published application
- Kind: A1
- Application number: 17/157,559
- Filed: 2021-01-25
- Published: 2021-06-10
- Earliest claimed: 2017-12-07
- Assignees: Virtual Forge GmbH
- Applicants: VIRTUAL FORGE GmbH
- Inventors: Hans-Christian Esperer; Yun Ding; Thomas Kastner; Markus Schumacher
- Web page: https://patentgrep.com/patent/US20210173941A1

## CPC

- G06F 21/577: {Assessing vulnerabilities and evaluating computer system security}
- G06F 8/42: {Syntactic analysis}
- G06F 21/53: by executing in a restricted environment, e.g. sandbox or secure virtual machine
- G06F 8/41: Compilation
- G06F 2221/033: Test or assess software
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method, an apparatus, and a storage medium for detecting vulnerabilities in software to protect a computer system from security and compliance breaches are provided. The method includes providing a ruleset code declaring programming interfaces of a target framework and including rules that define an admissible execution context when invoking the programming interfaces, providing a source code to be scanned for vulnerabilities; compiling the source code into a first execution code having additional instructions inserted to facilitate tracking of an actual execution context of the source code, compiling the ruleset code into a second execution code that can be executed together with the first execution code, executing the first execution code within an virtual machine and passing calls of the programming interfaces to the second execution code, and detecting a software vulnerability when the actual execution context disagrees with the admissible execution context.

## Claims

### Claim 1

A method for detecting a vulnerability in software to protect a computer system from a breach, the method comprising:
providing a ruleset comprising programming interfaces of a target framework and comprising rules for an admissible execution context when invoking the programming interfaces;
providing the software to be scanned for the breach;
compiling the software into a first execution code having additional instructions inserted therein to facilitate tracking of an actual execution context of the software;
compiling the ruleset into a second execution code to be executed with the first execution code;
executing the first execution code within a virtual machine;
passing a call of the programming interfaces to the second execution code; and
detecting the breach when the actual execution context is different from the admissible execution context.

### Claim 2 (depends on 1)

The method according to claim 1, wherein each function of the software is invoked once.

### Claim 3 (depends on 2)

The method according to claim 2, wherein:
the software includes branch instructions and return instructions, and the branch instructions and the return instructions are ignored when the first execution code is executed within the virtual machine.

### Claim 4 (depends on 1)

The method according to claim 1, wherein the virtual machine provides an execution context to the ruleset.

### Claim 5 (depends on 1)

The method according to claim 1, wherein the virtual machine provides interception calls to the ruleset and continues execution.

### Claim 6 (depends on 1)

The method according to claim 1, wherein the virtual machine builds data flow graphs.

### Claim 7 (depends on 6)

The computer-implemented method according to claim 6, wherein the data flow graphs are used by the ruleset code to attach data flow information to a finding.

### Claim 8 (depends on 1)

The method according to claim 1, wherein the software is compiled into bytecode which is suitable for code analysis.

### Claim 9 (depends on 1)

The method according to claim 1, wherein a syntax error does not abort the compiling of the software.

### Claim 10 (depends on 9)

The method according to claim 9, wherein during the compiling, instructions are generated to inform a rule engine of syntax errors that occurs during the compiling.
