Skip to content

Instantly share code, notes, and snippets.

View lordidiot's full-sized avatar
🐋

lordidiot

🐋
View GitHub Profile
@lordidiot
lordidiot / 11B, Please.md
Last active March 17, 2021 10:04
CTF.SG CTF 2021

11B, Please [Misc]: Author Writeup

Overview

This challenge was based on a behaviour I learnt from reading Attacking Network Protocols (James Forshaw). The bug has to do with some integer trickery and I thought it was pretty neat. Fun fact, I crafted the challenge idea while on security trooper duty (screw NS T.T), hence the security trooper theme of the challenge.

TL;DR

The writeup is a bit lengthy, here's the quick solution run through. Bribe -2147483648 (INT_MIN) which won't be turned positive by positive, causing money_left to be negative and giving us the flag.

Code Analysis

@lordidiot
lordidiot / sysnote.c
Created September 19, 2021 03:13
Asian Cyber Security Challenge 2021 Exploits
#include <stdio.h>
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/syscall.h>
#define ADD 548
@lordidiot
lordidiot / IC, Please.md
Created March 13, 2022 03:55
CTF.SG CTF 2022 Writeups

IC, Please [Author Writeup]

Challenge Motivations

This challenge was inspired by the series of clone-and-pwn challenges I saw in Real World CTF. It's quite a cool category where they just spin up a random github repository and ask you to find bugs in it. It feels quite "realistic" compared to the usual CTF challenges and gives a different kind of satisfaction when solving.

@lordidiot
lordidiot / v8-dereference.py
Last active May 23, 2022 18:36
GEF extension to handle tagged and compressed pointers in v8 better (WIP)
"""
To use the extension, place the file somewhere and add
`source /path/to/extension`
in your ~/.gdbinit file
Use just as you would with `dereference` (https://gef.readthedocs.io/en/master/commands/dereference/)
but s/deref/veref/g
Many missing features because I quickly whipped this up to solve a challenge.
1) Doesn't check for v8 version (Older versions don't use compressed pointers)
@lordidiot
lordidiot / ALU.md
Created June 10, 2022 14:43
GreyCTF First Blood Writeup

ALU

Have you tried the AoC 22 24 VM?

MD5 (alu.zip) = 8b04d09040e879f7558d59b14e9ef191
- enigmatrix

nc challs.nusgreyhats.org 13500