Skip to content

Instantly share code, notes, and snippets.

View parastuffs's full-sized avatar
🐦

Quentin Delhaye parastuffs

🐦
  • ECAM
  • Brussels
View GitHub Profile
@parastuffs
parastuffs / ULB Exchange on Thunderbird.md
Last active November 28, 2023 10:37
ULB Exchange on Thunderbird

So you want to use your professional @ulb.be email address in a non-Outlook application? Silly you, as if it would be straightforward and a well thought out entreprise-wide migration.

Easy, but not free way

Install the ExQuilla extension, then add your account through its dedicated menu in the options. By the end of the 30-days trial, you should receive a banner notification in Thunderbird to purchase a licence (10€/year).

Almost as easy and free

  1. Install DavMail.
  2. Do yourself a favor and autostart it at boot.
// ***** fonction pour aller un pas plus loin ****
int StepperMotor ( int _step, bool dir){
// ***** mise à jour de l'état ****
switch(_step){
case 0 :
digitalWrite(IN1, LOW);
digitalWrite(IN2, LOW);
digitalWrite(IN3, LOW);
digitalWrite(IN4, HIGH);
break;
#include "Arduino.h"
#include "Audio.h"
#include "BluetoothSerial.h" //Header File for Serial Bluetooth, will be added by default into Arduino
#include "FS.h"
#define SD_CS 5
#define SPI_MOSI 23
#define SPI_MISO 19
#define SPI_SCK 18
#define button_A 4 // Top face
/**
Make sure that the 'MCP9800' library is installed.
https://github.com/JChristensen/MCP9800/tree/master
*/
#include <MCP9800.h>
MCP9800 mySensor;
void setup()

Stack overflow - Shellcode

Building the basic stack overflow, we can exploit the same vulnerability to spawn a shell.

Context: vulnerable code

This time, we won't be using gets but strcpy that copies a string into a buffer.

#include <stdlib.h>
#include 
@parastuffs
parastuffs / stack-overflow.md
Last active March 16, 2023 09:35
How to run code from an arbitrary address by use of a buffer owerflow.

Stack overflow

By abusing the leniency of some C functions when it comes to filling buffers with user-provided information, we can reach other restricted parts of the program, or even execute arbitrary code.

In this demonstration, we will see how a buffer is filled in the stack using the gets function and how overflowing it will allow us the execute a function that should never be called otherwise in the program.

All the addresses used in the snippets and explanations are specific to the setup used to build this write-up. You will need to adapt them to your use-case in order to replicate the behaviour of this exploit.

GDB primer

Some useful GDB commands for the exercise:

Hello,

To access the BEAMS computing server, you need to connect to two VPNs:

  1. ULB's (if your not on premise): https://monulb.ulb.be/fr/web/support/-/comment-utiliser-ulb-vpn- (you can translate the page in English at the bottom)

  2. BEAMS's through openVPN (If you're not connected to a BEAMS network through WiFi of Ethernet). If you don't have one yet, you can ask Axel Dero (axel.dero@ulb.ac.be) to create you a certificate.

You can then connect through SSH to the IP 192.168.0.60. Your username is xx and you password xx

@parastuffs
parastuffs / OpenROAD_instructions.md
Last active February 10, 2022 16:31
Tips and tricks to install and use OpenROAD

Tips regarding the installation on Debian (Bullseye)

  • DependencyInstaller.sh should be run before anything else. Problem is, it only recognizes Ubuntu and CentOS. The content can be applied in a Debiane environment almost seamlessly, though. On the BEAMS server, the following needed to be installed: libboost1.74-dev libeigen3-dev libspdlog-dev swig
  • lemon is not suitable in the official repo, so it needs to be installed manually:
    wget http://lemon.cs.elte.hu/pub/sources/lemon-1.3.1.tar.gz
    tar -xf lemon-1.3.1.tar.gz
    cd lemon-1.3.1

cmake -B build .

@parastuffs
parastuffs / latexdiff-vc.md
Last active September 9, 2021 15:00
How to use latexdiff with git

In a directory with git VCS: latexdiff-vc --git --flatten -r <rev-hash> full.tex where full.tex is the root tex file, including (or inputting) several subfiles or not.

You can then compile the resulting .tex file: pdflatex -shell-escape full-diff.tex

Note that the --pdf option is supposed to do it in one go, but the need for -shell-escape in my case makes the process fail.

If you simply want to generate a diff file with the previous commit in your tree,

@parastuffs
parastuffs / ARIA_perso.md
Last active May 10, 2021 16:18
ARIA - Création de personnage

Création de personnage.

  1. Caractéristiques

À répéter cinq fois : lancer 3d6 et choisir (1) de garder le résultat de côté ou (2) relancer les dés. On peut relancer une seule fois les dés, le nouveau résultat écrasant le précédent, même s'il est pire.

Une fois les cinq résultats obtenus, on les attribue à chaque caractéristique.

  1. Compétences : bases