Skip to content

Instantly share code, notes, and snippets.

View gquere's full-sized avatar

Guillaume Quéré gquere

View GitHub Profile
@gquere
gquere / stm32h5_create_segments.py
Created March 30, 2026 09:12
IDA script to map STM32H5 peripherals
import idaapi
import idc
import ida_segment
peripherals = [
(0x08FFF800, 0x08FFF8FF, "MCUID"),
(0x47001400, 0x470017FF, "OCTOSPI1"),
(0x47000400, 0x470007FF, "FMC"),
(0x4600F000, 0x4600F3FF, "DLYBOS1"),
(0x46008C00, 0x46008FFF, "SDMMC2"),
#!/usr/bin/env python3
import requests
import json
import urllib3
import sys
# SUPPRESS WARNINGS ############################################################
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
#!/usr/bin/env python3
import argparse
import requests
import json
import urllib3
from urllib.parse import urlparse
import os
import re
from getpass import getpass
@gquere
gquere / dump_i2c_eeprom.c
Created August 17, 2020 13:44
dump I2C EEPROM memory from Linux device ioctl
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <fcntl.h>
#include <linux/i2c-dev.h>
#define READ_SIZE (256)
#define NB_PAGES (256)
@gquere
gquere / weblogic_password.decrypt.py
Last active January 22, 2025 09:53
Weblogic password decrypt python
#!/usr/bin/env python3
# python3 port from https://github.com/L-codes/ctf-scripts/blob/master/crypto/weblogic_password.py
# /console/ login account
# -i ~/wls<VERSION>/user_projects/domains/<DOMAIN_NAME>/security/SerializedSystemIni.dat
# -f ~/wls<VERSION>/user_projects/domains/<DOMAIN_NAME>/config/config.xml
from Cryptodome.Cipher import ARC2, AES, DES3
from Cryptodome.Hash import SHA
import struct
import re
#!/usr/bin/env python3
import argparse
import requests
import json
import urllib3
from urllib.parse import urlparse
import os
import re
from getpass import getpass
@gquere
gquere / fortigate_decrypt.py
Last active August 15, 2023 17:27
Decrypt FortiGate configuration secrets CVE-2019-6693
#!/usr/bin/env python3
from Cryptodome.Cipher import AES
import base64
import sys
key = b'Mary had a littl'
data = base64.b64decode(sys.argv[1])
iv = data[0:4] + b'\x00' * 12
@gquere
gquere / crack_tomcat_hash.md
Created March 29, 2023 12:34
Crack tomcat-users.xml salted sha256 hash using john
@gquere
gquere / PostgreSQL_pentest.md
Last active March 17, 2023 14:18
PostgreSQL pentest notes

PostgreSQL RCE

Need Superuser rights.

Shared object

Simple SO to run blind commands:

//gcc -I$(pg_config --includedir-server) -shared -fPIC -o pg_exec.so pg_exec.c
#include <string.h>