In this hyper-connected electronic world, knowing how to send and receive data remotely with sockets is crucial. In this article, we will see how a socket is essentially a digital “plug” that we can attach to a local or remote address in order to establish a connection. We will also explore the architecture and system calls that allow us to create not only a client but also a server...
CTF Walkthrough: Wonderland on TryHackMe
Wonderland is a freely-available capture the flag (CTF) challenge created by NinjaJc01 on TryHackMe. In this CTF walkthrough, we will fall down the cybersecurity rabbit hole and enter a strange pentesting wonderland!
IPv4 Addresses, Routing and Subnet Masks
IPv4 addresses are the most common on the Internet. How can they uniquely identify every connected object? How do they facilitate data routing from one side of this vast network to the other? And why are they progressively being replaced by IPv6 addresses? We will attempt to answer these questions in this article. But before that, it wouldn’t be a bad idea to remind ourselves of the...
Sending and Intercepting a Signal in C
Anyone who’s ever been confronted to segfaults and bus error will already be familiar with the idea of signals. We get a SIGSEGV or a SIGBUS which ends our program’s execution without notice, without explanation and without appeal. But what really is a signal? Is it more than just the operating system’s police baton? And how can we send, block and even intercept one within our...
Threads, Mutexes and Concurrent Programming in C
For efficiency or by necessity, a program can be concurrent rather than sequential. Thanks to its concurrent programming and with its child processes or threads and mutexes, it will be able to perform multiple tasks simultaneously. In a previous article, we came to understand how to create child processes, which are one way to implement concurrent programming. Here, we will concentrate on threads...
Errno and Error Management in C
Underlying any software development is program error detection and analysis. But then an external library function or system call fails, how can we understand what went wrong? These functions usually return -1 or NULL, but they also store the reason behind their failure in errno. Let’s see what errno actually is, and how to retrieve, interpret and print it out. What is Errno? Errno...