Skip to content

Instantly share code, notes, and snippets.

View dadevel's full-sized avatar

Daniel dadevel

View GitHub Profile
@dadevel
dadevel / embed.c
Last active January 10, 2023 10:32
C/C++ File Embedding
#include <stdio.h>
# gcc ./embed.c -o ./embed && ./embed
asm(R"(
.pushsection .rodata
.global flag
.type flag, @object
.balign 1
@dadevel
dadevel / README.md
Last active November 12, 2021 08:27

Netboot Ubuntu from Arch Linux

  • run ./setup.sh

  • change directory to /srv/pxe

  • create ./dnsmasq.conf

  • create ./pxelinux.cfg/default

  • bring up interface

sudo ip addr add 172.30.30.1/24 dev enp0s31f6

@dadevel
dadevel / README.md
Last active November 8, 2023 09:38
BloodHound Queries
@dadevel
dadevel / README.md
Last active April 9, 2024 07:56
BloodHound Query Utility
@dadevel
dadevel / inetdb-rdns.sh
Last active January 10, 2023 10:17
Shodan InternetDB Reverse DNS Lookup
#!/usr/bin/env bash
set -euo pipefail
xargs -I {} -n 1 -P 16 -r -- curl -sS https://internetdb.shodan.io/{} | \
jq -r 'select(.hostnames!=null)|.hostnames[]' | \
sort -Vu
@dadevel
dadevel / ripe-search.py
Last active January 10, 2023 10:23
RIPE Database Search
#!/usr/bin/env python3
from argparse import ArgumentParser
from typing import Any, Iterator
import ipaddress
import json
import requests
def main() -> None:
@dadevel
dadevel / sldextract.py
Last active January 10, 2023 10:23
Second Level Domain Extractor
#!/usr/bin/env python3
import sys
import urllib.parse
import tldextract
# pip3 install --user tldextract
def main() -> None:
for line in sys.stdin:
@dadevel
dadevel / inetdb-recon.sh
Created January 10, 2023 10:15
Shodan InternetDB Recon
#!/usr/bin/env bash
set -euo pipefail
xargs -I {} -n 1 -P 16 -r -- curl -sS https://internetdb.shodan.io/{} | \
jq -r 'select(.ip!=null)|[.ip,(.hostnames|join(",")),(.ports|join(",")),(.cpes|join(",")),(.tags|join(","))]|@tsv' | \
sort -Vu | \
column -ts $'\t'
#!/usr/bin/env python3
from argparse import ArgumentParser, RawDescriptionHelpFormatter
from zipfile import ZipFile
import json
import shutil
# from https://github.com/fox-it/BloodHound.py/blob/273984883d9ca3dd21f6fca35ec88671cac3fc87/bloodhound/ad/trusts.py#L59
TRUST_DIRECTIONS = {
0: 'Disabled',
1: 'Inbound',
@dadevel
dadevel / README.md
Last active September 9, 2024 15:01
Impacket Ticket Helper