OSTEP - Virtualization - Processes API

Unix creates a process with a pair of system calls: fork() exec() A third system call can be used by a process to wait until a process it has created to complete. wait() fork() It is used to create a new process In the following example: #include <stdio.h> #include <stdlib.h> #include <unistd.h> int main(int argc, char* argv[]) { printf("Hello world (pid:%d)\n", (int) getpid()); // rc = return code int rc = fork(); if (rc < 0) { // Fork failed fprintf(stderr, "Fork failed\n"); exit(1); } else if (rc == 0) { // Child (new process) printf("Hello, I'm a child (pid:%d)\n", (int) getpid()); } else { // Parent goes down this path printf("Hello, I am a parent of %d (pid:%d)\n", rc, (int) getpid()); } return 0; } A new child process is created when fork() is called.
Read more

OSTEP - Virtualization - Processes

This series contains my notes on the free on line book Operating Systems: Three easy pieces. As a user wants to be able to run multiple processes at once, we have to be able to create the illusion that there are as many processors as each program needs. The OS does this by virtualizing the CPU. (Executing instructions from one process and then changes to another program) This allows multiple programs to run at once.
Read more

Operating Systems - Three easy pieces - Introduction

This series contains my notes on the free on line book Operating Systems: Three easy pieces. I will create a entry on each topic or on anything I feel worth remembering/mentioning. This entry is the first one, consisting on a introduction to the book, and a few resources I found to be handy. Links and references XV6 Advanced XV6 OSTEP projects Main focus There are three main topics on operating systems development.
Read more

Rose-OS - Makefile teardown

In this post, I will be describing programs and resources used to build Rose-OS and how we combine then into a single, automated Makefile. Programs used to generate the kernel gcc nasm bochs (Emulator) ld cat rm gcc Is the compiler we use to compile our code. Normally, this command preprocesses, compiles, assembles and links our code, but we can stop it from doing this with some command-line options.
Read more

Photography Style

Abstract Generally, photography has been present in my life since I was a kid, now that I’m taking the craft more seriously, I’m starting to analyze my style amongst other things. This is a status update on the aforementioned topic. Background My father got me into photography. He always liked the art, but he is a very cathodic, deliberate photographer. If he had to define his style in one short sentence, it would be: “I deliberately take one good shot”.
Read more

Loading a simple kernel written in C

In this post, we are describing how to write a simple C program and loading it from a 32-bit boot sector code. In this post, our kernel is as simple as it can get. It consists of a stored variable in a specific location in the code. Boot sector The code we are going to use in this section has nothing new. We are changing from 16-bit to 32-bit to be able to access more memory range.
Read more

Entering 32-bit protected mode

In this post, we will cover how to enter 32-bit protected mode. This is a requirement if we want to be able to create a OS with the features we are used to. Otherwise, we will have very little storage space allowed due to the 16-bit reference limit. Boot sector To enter 32-bit protected mode, we first have to bootstrap our code from a 16-bit sector. This is necesary because the initial code location is stored in a space-restricted zone.
Read more

Neural Network to detect network Botnet traffic

Goal In this post, I will summarise a project I made for my master in Cybersecurity for UNED. Our goal is to be able to detect Botnet traffic. Using Keras to detect Botnet traffic Keras is a perfect tool for Machine Learning experts and other developers alike. It can be as complicated as you want to make it, or as simple as you need it to be. Chose data One of the most important decisions when attempting a project like so from the ground up is to choose or create the dataset you are going to use in the project wisely.
Read more

Vim tips - grep

In this post we will discover how searching in vim works. From the vim help pages: Vim has two ways to find matches for a pattern: Internal and external. The advantage of the internal grep is that it works on all systems and uses the powerful Vim search patterns. An external grep program can be used when the Vim grep does not do what you want. As the vim manual page states, there are two main ways to find matches in vim.
Read more

Setup an automated testing server with Jenkins and AWS Device farm

In this post we will configure a fully functional testing server. We will have gone through configuration of Jenkins, AWS Device Farm and the integration between both services. We will configure: Jenkins initial configuration Jenkins remote build trigger Jenkins GitHub SSH credentials Jenkins Build environment AWS Device Farm initial setup AWS Device Farm YAML configuration file Jenkins AWS Device Farm plugin General overview What to do next Introduction At Wave we are working on a geolocation app for parents and schools to keep track of kids as they go and come from school by bus.
Read more