← Sessions

Workshop

Introduction to security research. Find a CVE with CodeQL.

Room:
Workshop
Level:
Intermediate

This workshop will introduce fundamentals of security research and CodeQL when looking for security vulnerabilities in software. We'll share how to look for vulnerabilities in code and how to use static analysis to help us find sources, sinks and vulnerabilities.

Using an example of a vulnerability in an open source project that the speaker has found, CVE-2024-32022, we will walk through how we could detect it manually by reading code, learn how to write CodeQL, and by the end write a CodeQL query to find this vulnerability and its variants.

Perhaps by the end of this session you will be inspired to find vulnerabilities yourself?

Outline

The workshop lasts 2 hours. It will be divided into two parts: theory and the hands-on session. The theory lasts 35 minutes and consists of:

Introduction to security research

We will start by examining a simple command injection vulnerability and how we could detect it manually. This will lead to introduction to what are sources, sinks and data flow in code, and how we can manually find vulnerabilities in code by identifying sources, sinks and data flow.

Introduction to CodeQL

After introducing the fundamentals of security research and manually identifying vulnerabilities in code, we will present how we can automate the process with CodeQL. We will introduce CodeQL, GitHub’s static code analysis tool, and how it works underneath to find vulnerabilities in code.

CodeQL query writing

In this part, we introduce how to write a simple query with CodeQL, what are predicates and classes in CodeQL, and how to create them in CodeQL.

The hands-on session consists of a number of exercises, with which we will incrementally write a CodeQL query using what we’ve learned during the theoretical part of this workshop. By the end of the workshop, you will have written a query that will detect a vulnerability that the speaker has found - CVE-2024-32022 and will be equipped to start writing your own CodeQL queries and do security research. We will also briefly introduce how you could use the multi-repository variant analysis (MRVA) tool to run your queries at scale.

Before you come

OOP principles

Who it is for

security engineers, security researchers

Add to calendar