Skip to content

Instantly share code, notes, and snippets.

Avatar

Alex dhondta

View GitHub Profile
@dhondta
dhondta / poc-python-xdg-0.25.py
Last active Mar 25, 2021
Proof-of-Concept for python-xdg 0.25 Python code injection (CVE-2019-12761)
View poc-python-xdg-0.25.py
#!/usr/bin/python3
import os
import shutil
from xdg.BaseDirectory import xdg_config_dirs
from xdg.Menu import parse
TEMP = "/tmp/poc-xdg"
MENU = "gnome-evil.menu"
RSLT = "{}/result.txt".format(TEMP)
CMD = "ls"
@dhondta
dhondta / evil-config.ini
Last active May 1, 2019
Proof-of-Concept for logging Python code injection
View evil-config.ini
[loggers]
keys=root
[handlers]
keys=stream_handler
[formatters]
keys=formatter
[logger_root]
@dhondta
dhondta / poc-python-parso.py
Last active Mar 25, 2021
Proof-of-Concept for Python parso Cache Load Vulnerability (CVE-2019-12760)
View poc-python-parso.py
#!/usr/bin/python
import parso
import pickle
import random
import shutil
import threading
from hashlib import sha256
from os import makedirs, remove, system
from os.path import dirname, exists, join
from six import b, u
@dhondta
dhondta / README.md
Last active Apr 23, 2021
Tinyscript tool for generating loose comparison hashes for PHP type juggling
View README.md

PHP loose comparison input generator

This can be installed using:

$ pip install tinyscript
$ wget https://gist.githubusercontent.com/dhondta/8937374f087f708c608bcacac431969f/raw/loose-comparison-input-generator.py && chmod +x loose-comparison-input-generator.py && sudo mv loose-comparison-input-generator.py /usr/bin/loose-comparison-input-generator

This tool is especially useful in the use cases hereafter.

@dhondta
dhondta / README.md
Last active Apr 23, 2021
Tinyscript tool for getting IP locations from an email (EML file)
View README.md

Get Email Origin

This can be installed using:

$ pip install -r requirements.txt
$ wget https://gist.githubusercontent.com/dhondta/9a8027062ff770b2aa5d8422ddd78b57/raw/get-email-origin.py && chmod +x get-email-origin.py && sudo mv get-email-origin.py /usr/bin/get-email-origin
@dhondta
dhondta / README.md
Last active Jun 7, 2021
Tinyscript tool for generating preview image(s) of a PDF
View README.md

PDF preview generator

This can be installed using:

$ pip install -r requirements.txt
$ wget https://gist.githubusercontent.com/dhondta/f57dfde304905644ca5c43e48c249125/raw/pdf-preview-generator.py && chmod +x pdf-preview-generator.py && sudo mv pdf-preview-generator.py /usr/bin/pdf-preview-generator
@dhondta
dhondta / README.md
Last active Jan 23, 2020
Tinyscript tool to generate PDF's from reports in a STIX package
View README.md

STIX report to PDF

This can be installed using:

$ pip install tinyscript
$ wget https://gist.githubusercontent.com/dhondta/ca5fb748957b1ec6f13418ac41c94d5b/raw/stix-reports-to-pdf.py && chmod +x stix-reports-to-pdf.py && sudo mv stix-reports-to-pdf.py /usr/bin/stix-reports-to-pdf
@dhondta
dhondta / git-repos-update.sh
Created Sep 20, 2019
Bash RC helper functions
View git-repos-update.sh
# Custom git repos update function
git-repos-update() {
local currdir=$(pwd)
for root in /opt ~/.opt; do
for D in $root/*; do
if [ -d "${D}" ]; then
cd "${D}"
cat .git/config 2>/dev/null | \
grep url | \
cut -d" " -f 3 && \
@dhondta
dhondta / README.md
Last active Jun 15, 2021
Tinyscript steganography tool based on base32/64 padding
View README.md

Paddinganograph

This can be installed using:

$ pip install tinyscript
$ wget https://gist.githubusercontent.com/dhondta/90a07d9d106775b0cd29bb51ffe15954/raw/paddinganograph.py && chmod +x paddinganograph.py && sudo mv paddinganograph.py /usr/bin/paddinganograph

This tool is especially useful in the use cases hereafter.

@dhondta
dhondta / README.md
Last active Sep 10, 2020
Tinyscript steganography tool implementing the Pixel Indicator Technique
View README.md

StegoPIT

This can be installed using:

$ pip install tinyscript
$ wget https://gist.githubusercontent.com/dhondta/30abb35bb8ee86109d17437b11a1477a/raw/stegopit.py && chmod +x stegopit.py && sudo mv stegopit.py /usr/bin/stegopit

This tool is especially useful in the use cases hereafter.