Skip to content

Instantly share code, notes, and snippets.

View MattMoony's full-sized avatar
🦆
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

Matthias Monschein MattMoony

🦆
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
View GitHub Profile
@MattMoony
MattMoony / absolute-images-md.py
Created October 4, 2023 15:21
Resolve image paths to their absolute (full URL) versions in a markdown file - e.g. for re-publishing elsewhere.
#!/usr/bin/env python3
"""
Title: Absolute Image Paths for Markdown
Date: October 2023
Author: mattmoony (https://github.com/MattMoony)
Resolve image paths to their absolute (full URL) versions
in a markdown file - e.g. for re-publishing elsewhere.
@MattMoony
MattMoony / dicectf2022-babyrop-exploit.py
Created February 7, 2022 18:17
Exploit script for DiceCTF 2022's "baby-rop" challenge.
#!/usr/bin/env python3
from pwn import *
from typing import *
def prompt(r: tubes.tube.tube, s: Union[str, bytes], prmpt: bytes = b':') -> None:
r.sendafter(prmpt, (s if type(s) == bytes else s.encode())+b'\n')
def cmd(r: tubes.tube.tube, c: Union[str, bytes]) -> None:
prompt(r, c, prmpt=b'command: ')
@MattMoony
MattMoony / honk.txt
Last active December 18, 2023 23:14
Install "Desktop Goose" on an unsuspecting PC using a Rubber Ducky.
REM Author: m4ttm00ny (most of the code from overwraith - I had to write some fixes though ... )
REM Name: RunGooseDesktop
REM Purpose: A Script that will automatically copy GooseDesktop to %appdata% from another drive "DUCKY" and run it
REM Encoder V2.6.3
REM GOOSE DESKTOP
REM Make unsuspecting PCs go *honk*
REM
REM This script only works in combination with another USB drive named "DUCKY" being plugged into
REM the target computer at the same time. This second USB stick is the one that holds the actual
@MattMoony
MattMoony / AutoStrategyTest.java
Created May 15, 2021 15:05
syp-design-pattern-strategy
/*
* Übungsbeispiel: Strategy
* Autoren: Matthias Monschein, Nico Pessnegger
* Datum: Mai 2021
*
* Beschreibung: Übungsbeispiel zum
* Design-Pattern Strategy.
*
* Aufgabenstellung: Es gilt die Klassen entsprechend
* dem Design-Pattern Strategy umzustrukturieren. Das
@MattMoony
MattMoony / aes-cbc-flipping.py
Created April 28, 2021 13:25
Modify the resulting plaintext of AES/CBC ciphertext using bit-flipping.
#!/usr/bin/env python3
"""
Modify the resulting plaintext of AES/CBC ciphertext using bit-flipping.
Scenario:
You know that AES is being used in CBC mode. You know (parts of) the
plaintext + block size + IV (not too hard to determine these things most
of the time). You can simply change the content of the first encrypted
block of the plaintext by changing the IV. It's also possible to modify
@MattMoony
MattMoony / aes-ecb-recov.py
Last active March 29, 2024 16:58
Recover plaintext from encrypted AES/ECB ciphertext using an oracle.
#!/usr/bin/env python3
"""
Recover plaintext from encrypted AES/ECB ciphertext using an oracle.
Scenario:
You can send whatever you want to the server and you get it back
encrypted with an attached secret. (The secret was attached before the
encryption process). Since ECB is *stateless*, meaning each plaintext
block that is the same will result in the same ciphertext block (as long
@MattMoony
MattMoony / gdb-environ.sh
Created March 28, 2021 21:11
GDB environments - Manjaro Linux
#!/bin/bash
EXT_BASE="/mnt/d/hacking/tools"
activate () {
if [[ $1 == "peda" ]]; then
echo "source $EXT_BASE/peda/peda.py" >> $HOME/.gdbinit
elif [[ $1 == "pwngdb" ]]; then
echo "source $EXT_BASE/Pwngdb/pwngdb.py
source $EXT_BASE/Pwngdb/angelheap/gdbinit.py

Example


Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce posuere, libero convallis aliquet luctus, libero odio tincidunt mi, eget dignissim nisi ante id turpis. Donec hendrerit vel libero et placerat. Donec vitae purus mi. Mauris placerat ornare tristique. Duis lobortis est nisi, eget pulvinar mauris pharetra sit amet. Suspendisse pulvinar, nibh nec semper posuere, massa urna malesuada ligula, et egestas purus nisl semper dui. 
Phasellus magna nisl, pretium eget odio dictum, posuere euismod tortor. In eleifend nisi et neque mattis molestie. Donec a ultrices mi, at molestie orci. Fusce ex nisl, pellentesque in lectus vitae, bibendum fermentum elit. Duis convallis tempor diam vitae aliquet. Ut cursus nisi est, ac volutpat felis malesuada ac. Nulla facilisi. Nulla luctus quis orci vel luctus. Etiam nec dui eget neque pe
#!/usr/bin/env python3
"""
Title: Standalone Markdown
Date: March 2021
Author: mattmoony (https://github.com/MattMoony)
Short python script that converts a markdown file, which
requires a path to load images from to a "standalone"
#!/usr/bin/env python3
"""
Title: IBM-Arnold
Date: March 2021
Author: mattmoony (https://github.com/MattMoony)
Quick implementation of a semi-smart assistant called 'Arnold'
(even though the name can be changed) utilizing IBM Watson services.