Code of the Week #7: Asymmetrical Integer

Welcome back to “Code of the Week,” where we explore the often hidden and subtle vulnerabilities in our codebases. This week, we’re tackling an issue in C programming that arises from the nuanced behavior of signed integers. The code The challenge is to identify the vulnerability in the following C function, which reads data from a network socket: #define MAX_PACKET 1024 char *read_data(int sockfd) { char buf[MAX_PACKET]; int length = network_get_int(sockfd); if(length < 0) length *= -1; if(length >= MAX_PACKET) exit(-1); if(read(sockfd, buf, length) <= 0) exit(-1); /* .

Continuer

Code of the Week #6: A Free Race

Welcome back to “Code of the Week,” where we uncover subtle yet impactful vulnerabilities in our codebases. This week, we’re diving into a tricky issue in Rust that revolves around object lifetimes and unsafe code. The code The task is to identify the vulnerability in the following Rust function, which signs data using a cryptographic function: pub fn sign(data: Option<&[u8]>) { let p = match data { Some(data) => BioSlice::new(data).as_ptr(), None => std::ptr::null_mut(), }; unsafe { let cms = cvt_p(CMS_sign(p)); // Further processing.

Continuer

Code of the Week #5: The Race to the Points

Welcome back to “Code of the Week,” where we delve into the subtle yet impactful vulnerabilities lurking in our codebases. This week, we’re exploring a common yet often overlooked issue in web applications. The code The challenge is to spot the bug in the following Flask application code. Assume this snippet is part of a larger application where users submit codes (more largely part of a gift) to receive points:

Continuer

Code of the Week #4: The Hidden Flaws

Welcome to another insightful entry in our “Code of the Week” series, where we unravel the subtle intricacies and hidden vulnerabilities within our code. This week marks our fourth exploration into code pitfalls that are often overlooked but can have significant implications if left unaddressed. Today, we delve into a critical aspect of web application security – Cross-Site Request Forgery (CSRF) protections. Our focus will be on a commonly employed but occasionally flawed implementation of CSRF token validation.

Continuer

Code of the Week #3: The Hidden Flaws

Welcome back to our “Code of the Week” series! This is the third installment where we continue our deep dive into the less obvious, but equally critical, vulnerabilities hidden within our code. Today, we’re going to uncover another sneaky issue that, much like our previous episodes, might be sitting unnoticed, ready to cause havoc under the right circumstances. This time around, we’re examining a scenario that’s commonplace in many applications but contains a subtle flaw that could lead to significant vulnerabilities, especially when handling user input and array indexing.

Continuer

Code of the Week #2: The Hidden Flaws

Hey, everyone! It’s time for the second episode of our “Code of the Week” journey, where we zero in on the more obscure, yet critical vulnerabilities lurking in our codebases. This week, we’re shed light on a subtler, yet potentially devastating issue. In this episode, we’re delving into the world of thread safety and authentication mechanisms, focusing on a vulnerability that arises from using static class attributes in a multithreaded environment.

Continuer

Code of the Week #1: The Hidden Flaws

Hey everyone! Welcome to the first installment of “Code of the Week,” where we dive deep into the lesser-seen side of coding vulnerabilities. We’re skipping past the usual suspects like SQL injections and XSS because, let’s face it, there’s enough out there on those already. Instead, we’re on the lookout for those sneaky, hidden flaws that don’t get enough spotlight but can cause just as much trouble. The goal here is simple: spot those tricky bugs, understand why they’re a problem, figure out how to fix them, and learn how to catch them automatically next time.

Continuer

Hackcyom est une entreprise de conseil en cybersécurité et secure cloud computing.

Hackcyom est une société d’expertise en sécurité de l’information financée par des fonds privés et indépendante, basée à Paris, en France. Grâce à notre expertise et à nos méthodologies, nous offrons des services de conseil, d’audit, d’ingénierie et d’innovation en cybersécurité hautement qualifiés. Nous sommes fiers de nous spécialiser dans des projets de sécurité de l’information très complexes nécessitant expertise et tact. L’une de nos spécialisations aide les opérateurs cloud à concevoir et sécuriser leurs services et infrastructures. En France, Hackcyom est le leader dans le domaine de niche du conseil sur la sécurité de l’information des clouds souverains (qualifiés ou candidats à la qualification SecNumCloud). Nous intervenons aussi sur le conseil sur d’autres qualification comme PAMS, PDIS, ISO27001, NIS2, DORA, etc. Hackcyom fournit également services d’audit, des tests d’intrusion, une analyse des risques (EBIOS Risk Manager), du conseil et de l’assistance en ingénierie sécurisée, du conseil SDLC, du conseil en gestion du chiffrement, etc. Hackcyom se prononce comme “axiome”, le terme mathématique parce que nous aimerions que nos clients travaillent et se concentrent sur leurs métiers en considérant leur sécurité de l’information acquise grâce à nous.


10 rue de la Paix, 75002 Paris