Skip to content

Instantly share code, notes, and snippets.

View d0now's full-sized avatar
🇰🇷

Dohyeon Kim d0now

🇰🇷
View GitHub Profile
@d0now
d0now / danted-install.sh
Last active August 19, 2024 07:31
danted easy install on ubuntu
#!/bin/bash
set -ex
apt update
apt install -y dante-server
useradd socks
cat <<EOF >/etc/danted.conf
logoutput: syslog stdout /var/log/danted.log
@d0now
d0now / class_finder.py
Created June 1, 2024 08:55
Binary Ninja RTTI lookup for class name
#
#
from binaryninja.binaryview import BinaryView
from binaryninja.lowlevelil import LowLevelILStore, LowLevelILOperation
from binaryninja.variable import RegisterValueType
from binaryninja.demangle import demangle_gnu3
from binaryninja.exceptions import ILException
def get_llil_lifted(bv: BinaryView):
from glob import glob
from pathlib import Path
from zipfile import ZipFile
def main(args):
with ZipFile(str(args.out), 'w') as zip:
for _f in glob(f"{args.dir}/**", recursive=True):
file = Path(_f)
if file.is_file():
@d0now
d0now / get-all-cves-from-cpe.py
Created April 8, 2024 14:01
Get all CVEs from CPE
import requests
import json
import pathlib
def query(cpe: str, results_per_page=20, startIndex=0):
return requests.get(
"https://services.nvd.nist.gov/rest/json/cves/2.0",
params={
'cpeName': cpe,
@d0now
d0now / binexport_binja.sh
Last active September 12, 2023 06:41 — forked from psifertex/binexport_binja.zsh
BinExport build script for Binary Ninja w/ convenient params
#!/usr/bin/env zsh
# Note:
# CMake, Clang, clang-format, Ninja, and sed are required to build
PRINT_CONFIG_AND_EXIT=0
FORCE_CREATE_LINK=0
while getopts b:d:cfl opt
do
@d0now
d0now / litecov.py
Created July 20, 2023 08:01
BinaryNinja - LiteCov output coverage explorer snippet
from binaryninja.binaryview import BinaryView
from binaryninja.enums import HighlightStandardColor
from binaryninja.log import log_warn, log_info
from binaryninja.interaction import OpenFileNameField, get_form_input
from binaryninja.plugin import PluginCommand
from typing import List
class LiteCov:
@d0now
d0now / 2023-htb-business-ctf-pac-breaker.md
Last active July 16, 2023 21:18
2023 HackTheBox Business CTF - PAC Breaker (pwn)
  1. you can dump stack
  2. get canary, elf base, libc base leak
  3. ROP with no pac included gadgets
  4. profit
@d0now
d0now / linode-for-pwn.sh
Last active June 9, 2023 18:14
linode-for-pwn
#!/usr/bin/env bash
NEWUSER=d0now
set -ex
cd `dirname $0`
export DEBIAN_FRONTEND=noninteractive
export DEBCONF_NONINTERACTIVE_SEEN=true
@d0now
d0now / angr_traverse_paths.py
Created December 27, 2022 15:35
angr stepping example
#!python3
from angr import Project, SIM_PROCEDURES, options
from angr.sim_manager import SimulationManager
from angr.sim_state import SimState
def main(args):
project = Project(args.binary, load_options={
@d0now
d0now / angr_directed_symexec.py
Created December 27, 2022 07:48
angr directed symbolic execution
#!python3
from angr import Project
from angr.sim_state import SimState
from angr.sim_manager import SimulationManager
from angr.exploration_techniques.director import Director, ExecuteAddressGoal
from angr.exploration_techniques.veritesting import Veritesting
hits = {}