Skip to content

Instantly share code, notes, and snippets.

View aesophor's full-sized avatar
🌖

ᴀᴇꜱᴏᴘʜᴏʀ aesophor

🌖
View GitHub Profile
@serg06
serg06 / interval_map.h
Last active August 20, 2024 06:16
[C++] Short IntervalMap data structure implementation
/*
* NOTE 1: This works on VC++ but might need a little extra syntax to work on GCC.
* NOTE 2: It breaks when calling set_interval on the minimum key (std::numeric_limits<K>::lowest()) and maybe on the maximum key too.
*
* OPERATIONS:
*
* N = number of unique intervals. (Neighboring intervals with the same value are joined.)
* Iterators run in key-sorted order. (Or reverse, if you like - they're bidirectional.)
*
* get_min(): O(1)
@ramnes
ramnes / confused.gif
Last active March 20, 2024 18:40
How did this gif end up here?
confused.gif
@veritymissed
veritymissed / CORS_XSS_CSRF筆記.md
Last active December 1, 2022 03:01
CORS/XSS/CSRF 筆記

CORS/XSS/CSRF 筆記

最近常常被這幾個英文簡寫搞混,稍微做個筆記。 後兩者XSS與CSRF是Web攻擊型態的其中兩種。前者CORS只是指稱一種我們在Web架構設計中可能出現的現象,以及這樣的現象在目前的規範中有什麼特點,有什麼設定上要注意的?

CORS

C ross O rigin R equest S haring (跨來源資源請求)

@MetGang
MetGang / C++Tricks.md
Last active January 13, 2023 15:41
C++ Tricks
@luk6xff
luk6xff / ARMonQEMUforDebianUbuntu.md
Last active March 8, 2025 20:31 — forked from bruce30262/ARMDebianUbuntu.md
Emulating ARM with QEMU on Debian/Ubuntu

You might want to read this to get an introduction to armel vs armhf.

If the below is too much, you can try Ubuntu-ARMv7-Qemu but note it contains non-free blobs.

Running ARM programs under linux (without starting QEMU VM!)

First, cross-compile user programs with GCC-ARM toolchain. Then install qemu-arm-static so that you can run ARM executables directly on linux

If there's no qemu-arm-static in the package list, install qemu-user-static instead

#!/usr/bin/python3
import re
import subprocess
import tkinter as tk
from Xlib import display
def lambda_factory(index):
global labels
global buttons
@thiagozs
thiagozs / gomock.md
Last active February 13, 2025 18:36
Tutorial gomock

08/16/17 by  Sergey Grebenshchikov

No Comments

This is a quick tutorial on how to test code using the GoMock mocking library and the standard library testing package testing.

GoMock is a mock framework for Go. It enjoys a somewhat official status as part of the github.com/golang organization, integrates well with the built-in testing package, and provides a flexible expectation API.

@ricardo2197
ricardo2197 / return to dl-resolve.md
Last active October 8, 2024 13:07
Return-to dl-resolve

0ctf babystack with return-to dl-resolve

In this write-up I will discuss how I managed to solve the challenge "babystack" from 0ctf with a technique called return to dl-resolve. I did not know this kind of return-to attack before the contest. In the following sections a detailed explanation of the entire exploit will be presented.

1. Binary analysis

I downloaded the provided binary babystack and quickly fired up binaryninja alongside with gdb to analyze it. I quickly realized a buffer overflow vulnerability is present within sub_804843b. My first approach was to solve this challenge using a return-to-libc attack by leaking the base address of the library and call system in order to get a shell.
This technique is contingent on:

  1. Leaking libc base address
  2. Knowing the version of libc to get the offset of system.

However, the version of libc on the remote server was unknown and the ELF did not provide any function that can be us

@LiamKarlMitchell
LiamKarlMitchell / HideVirtualBox.bat
Created February 3, 2018 12:11
Hide Virtual Machine.
@echo off
@reg copy HKLM\HARDWARE\ACPI\DSDT\VBOX__ HKLM\HARDWARE\ACPI\DSDT\NOBOX__ /s /f
@reg delete HKLM\HARDWARE\ACPI\DSDT\VBOX__ /f
@reg add HKLM\HARDWARE\DESCRIPTION\System /v SystemBiosVersion /t REG_MULTI_SZ /d "NOBOX - 1" /f
@reg add HKLM\HARDWARE\DESCRIPTION\System /v VideoBiosVersion /t REG_MULTI_SZ /d "NOBOX - 1" /f
@taskkill /f /im VBoxTray.exe
@exit