Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 97 additions & 0 deletions .github/workflows/create-unattended-kali.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: Build Unattended Kali ISO

on:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

permissions:
contents: write

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set up dependencies
run: |
sudo apt-get update
sudo apt-get install -y wget p7zip-full mkisofs gh

- name: Download latest Kali ISO
run: |
ISO_FILENAME=$(curl -sL https://cdimage.kali.org/current/ | grep -Eo 'kali-linux-.*-installer-amd64\.iso"' | head -n 1 | cut -d'"' -f1)
ISO_URL="https://cdimage.kali.org/current/${ISO_FILENAME}"

echo "ISO_FILENAME=${ISO_FILENAME}" >> $GITHUB_ENV
echo "ISO_URL=${ISO_URL}" >> $GITHUB_ENV

echo "Downloading from ${ISO_URL}"
wget -q --show-progress -O "${ISO_FILENAME}" "${ISO_URL}"

- name: Extract ISO contents
run: |
mkdir -p /tmp/kaliISO
7z x ${{ env.ISO_FILENAME }} -o/tmp/kaliISO

- name: Append boot entry
run: |
curl -sL https://raw.githubusercontent.com/J0nan/RandomThings/refs/heads/main/provisioning/kali/generic/txt.cfg | sudo tee -a /tmp/kaliISO/isolinux/txt.cfg

- name: Rebuild the ISO image
run: |
ORIGINAL_NAME="${ISO_FILENAME%.iso}"
UNATTENDED_ISO_NAME="${ORIGINAL_NAME}_unattended-J0nan.iso"
echo "UNATTENDED_ISO_NAME=${UNATTENDED_ISO_NAME}" >> $GITHUB_ENV

sudo mkisofs -D -r -V "UNATTENDED_KALI" \
-cache-inodes -J -l -b isolinux/isolinux.bin \
-c isolinux/boot.cat -no-emul-boot -boot-load-size 4 \
-boot-info-table -o "${UNATTENDED_ISO_NAME}" /tmp/kaliISO

- name: Split ISO into 1.86GB parts using 7-Zip
run: |
7z a -v1900m "${UNATTENDED_ISO_NAME}.7z" "${UNATTENDED_ISO_NAME}"

- name: Create GitHub Release and Upload Parts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
KALI_VERSION=$(echo "${{ env.ISO_FILENAME }}" | grep -oP '\d{4}\.\d+')
RELEASE_TAG="v${KALI_VERSION}"
RELEASE_TITLE="Kali Unattended ${KALI_VERSION}"
UNATTENDED_ISO_NAME="${{ env.UNATTENDED_ISO_NAME }}"

echo "This release contains an **unattended installer** for Kali Linux version ${KALI_VERSION}." > RELEASE_NOTES.txt
echo "" >> RELEASE_NOTES.txt
echo "### Download the ISO from Transfer.it" >> RELEASE_NOTES.txt
echo "Because GitHub is not reliable on big downloads, the ISO was uploaded to Transfer.it where it will be available until the **PENDING UPLOAD**." >> RELEASE_NOTES.txt
echo "[${UNATTENDED_ISO_NAME}]" >> RELEASE_NOTES.txt
echo "" >> RELEASE_NOTES.txt
echo "### 🔽 Download & Extract Instructions" >> RELEASE_NOTES.txt
echo "" >> RELEASE_NOTES.txt
echo "Due to GitHub's file size limitations, the ISO has been split into 1.86GB parts using 7-Zip." >> RELEASE_NOTES.txt
echo "" >> RELEASE_NOTES.txt
echo "1. Download **all** the \`.7z.001\`, \`.7z.002\`, … files from the release. This is not that realible, so despite whether you use your browser or the curl commands it can fail, just keep trying." >> RELEASE_NOTES.txt
echo "\`\`\`bash" >> RELEASE_NOTES.txt
echo "curl -L -o ${UNATTENDED_ISO_NAME}.7z.001 https://github.com/J0nan/RandomThings/releases/download/${RELEASE_TAG}/${UNATTENDED_ISO_NAME}.7z.001" >> RELEASE_NOTES.txt
echo "" >> RELEASE_NOTES.txt
echo "curl -L -o ${UNATTENDED_ISO_NAME}.7z.002 https://github.com/J0nan/RandomThings/releases/download/${RELEASE_TAG}/${UNATTENDED_ISO_NAME}.7z.002" >> RELEASE_NOTES.txt
echo "" >> RELEASE_NOTES.txt
echo "curl -L -o ${UNATTENDED_ISO_NAME}.7z.003 https://github.com/J0nan/RandomThings/releases/download/${RELEASE_TAG}/${UNATTENDED_ISO_NAME}.7z.003" >> RELEASE_NOTES.txt
echo "\`\`\`" >> RELEASE_NOTES.txt
echo "2. Ensure you have [7‑Zip](https://www.7-zip.org/) (Windows/Linux/macOS)." >> RELEASE_NOTES.txt
echo "3. Right‑click the \`.7z.001\` file and select “Extract”, or run:" >> RELEASE_NOTES.txt
echo "" >> RELEASE_NOTES.txt
echo "\`\`\`bash" >> RELEASE_NOTES.txt
echo "7z x ${UNATTENDED_ISO_NAME}.7z.001" >> RELEASE_NOTES.txt
echo "\`\`\`" >> RELEASE_NOTES.txt
echo "" >> RELEASE_NOTES.txt
echo "This will recreate the \`${UNATTENDED_ISO_NAME}\` ISO file." >> RELEASE_NOTES.txt

echo "Creating GitHub release with tag ${RELEASE_TAG}"
gh release create "${RELEASE_TAG}" *.7z.* \
--title "${RELEASE_TITLE}" \
--notes-file RELEASE_NOTES.txt

11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,14 @@ Kali configuration for unattended installations with some extra tools for day to
### CSRF

A simple HTML file that creates PoCs for performing CSRFs. [Info.](./web-tools/CSRF)

## Infra tools

### SSH

A tool to launch ssh-audit to multiple IP:port. [Info.](./infra-tools/SSH/)

### SSL/TLS

A tool to launch testssl to multiple IP:port. [Info.](./infra-tools/SSL-TLS/)

6 changes: 4 additions & 2 deletions docker-compose files/DeezSpot_bot_docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ As a summary and checklist the following fields highlighted must be changed:
- [ ] ARL_TOKEN=`DEEZER_ARL_TOKEN`
- [ ] EMAIL_DEE=`DEEZER_EMAIL`
- [ ] PWD_DEE=`DEEZER_PASSWORD`
- [ ] EMAIL_SPO=`SPOTIFY_EMAIL`
- [ ] PWD_SPO=`SPOTIFY_PASSWORD`
- [ ] BOT_TOKEN=`TELEGRAM_BOT_TOKEN`
- [ ] API_ID=`TELEGRAM_API_ID`
- [ ] API_HASH=`TELEGRAM_API_HASH`
- [ ] /mnt/`DB_DIR`:/app/DB
- [ ] /mnt/`CREDENTIALS_DIR`:/app/credentials
- [ ] /mnt/`LOGS_DIR`:/app/logs

For information regarding how to get some tokens, credentials or options check the repository: <https://github.com/J0nan/DeezSpot_bot_docker/tree/master#how-to-set-spotify-credentials>
For information regarding how to get some tokens, credentials or options check the repository: <https://github.com/J0nan/DeezSpot_bot_docker?tab=readme-ov-file#where-to-get-some-tokens>
7 changes: 4 additions & 3 deletions docker-compose files/DeezSpot_bot_docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,17 @@ services:
- ARL_TOKEN=DEEZER_ARL_TOKEN # Deezer ARL token # CHANGE ME
- EMAIL_DEE=DEEZER_EMAIL # Email to log in on Deezer # CHANGE ME
- PWD_DEE=DEEZER_PASSWORD # Password to log in on Deezer # CHANGE ME
- EMAIL_SPO=SPOTIFY_EMAIL # Email to log in on Spotify # CHANGE ME
- PWD_SPO=SPOTIFY_PASSWORD # Password to log in on Spotify # CHANGE ME
- BOT_TOKEN=TELEGRAM_BOT_TOKEN # Telegram bot token # CHANGE ME
- API_ID=TELEGRAM_API_ID # Telegram api id # CHANGE ME
- API_HASH=TELEGRAM_API_HASH # Telegram api hash # CHANGE ME
- TZ=Europe/Berlin
volumes:
- /mnt/DB_DIR:/app/DB # CHANGE ME
- /mnt/CREDENTIALS_DIR:/app/credentials # CHANGE ME
- /mnt/LOGS_DIR:/app/logs # CHANGE ME
deploy:
resources:
limits:
cpus: "4"
memory: "2g"
restart: unless-stopped
memory: "2g"
4 changes: 2 additions & 2 deletions docker-compose files/TriliumNext Notes/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
triliumnext:
image: triliumnext/notes:latest
image: triliumnext/trilium:latest
container_name: triliumnext
environment:
- USER_ID=568
Expand All @@ -15,4 +15,4 @@ services:
limits:
cpus: "4"
memory: "4g"
restart: unless-stopped
restart: unless-stopped
65 changes: 65 additions & 0 deletions infra-tools/SSH/auto_ssh-audit.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#!/bin/bash

# Authors: J0nan
# Version: 1.0.0
# Description: Automatically audits SSH configurations on multiple hosts using ssh-audit

# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[1;34m'
NC='\033[0m' # No Color

# Check if ssh-audit is installed
if ! command -v ssh-audit &> /dev/null; then
echo -e "${RED}Error:${NC} 'ssh-audit' is not installed or not in your PATH."
echo -e "${YELLOW}Get it from:${NC} https://github.com/jtesta/ssh-audit"
echo -e "${BLUE}Install using:${NC}
sudo git clone https://github.com/jtesta/ssh-audit /opt/ssh-audit
sudo ln -s /opt/ssh-audit/ssh-audit.py /usr/bin/ssh-audit"
exit 1
fi

# Check if input file is given
if [ -z "$1" ]; then
echo -e "${YELLOW}Usage:${NC} $0 targets.txt"
exit 1
fi

INPUT_FILE="$1"

# Check if file exists
if [ ! -f "$INPUT_FILE" ]; then
echo -e "${RED}Error:${NC} File '$INPUT_FILE' not found!"
exit 1
fi

echo -e "${YELLOW}The ssh_audit command can report it has failed when it has not.${NC}"
echo -e "${BLUE}Starting SSH audits...${NC}"

# Loop through each line
while IFS= read -r target || [[ -n "$target" ]]; do
# Skip empty or commented lines
if [[ -z "$target" || "$target" == \#* ]]; then
continue
fi

# Sanitize filename
filename_safe=$(echo "$target" | tr ':' '-')

echo -e "${GREEN}Auditing SSH on${NC} ${YELLOW}$target${NC}..."

ssh-audit "$target" > "./SSH/ssh_audit_${filename_safe}.txt" 2>/dev/null

# Check if output file exists and is not empty
if [ -s "ssh_audit_${filename_safe}.txt" ]; then
echo -e "${GREEN}✓ Completed:${NC} Report saved to ${BLUE}ssh_audit_${filename_safe}.txt${NC}"
else
echo -e "${RED}✗ Error:${NC} ssh-audit failed or returned no output for ${target}"
fi
echo ""

done < "$INPUT_FILE"

echo -e "${BLUE}All SSH audits complete.${NC}"
60 changes: 60 additions & 0 deletions infra-tools/SSL-TLS/auto_testssl.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#!/bin/bash

# Authors: J0nan
# Version: 1.0.0
# Description: Automatic launches testssl on multiple hosts

# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[1;34m'
NC='\033[0m' # No Color

# Check if testssl is installed
if ! command -v testssl &> /dev/null; then
echo -e "${RED}Error:${NC} 'testssl' is not installed or not in your PATH."
echo -e "${YELLOW}Get it from:${NC} https://github.com/drwetter/testssl.sh"
echo -e "${BLUE}Install using:${NC}
sudo git clone https://github.com/drwetter/testssl.sh.git /opt/testssl.sh
sudo ln -s /opt/testssl.sh/testssl.sh /usr/bin/testssl"
exit 1
fi

# Check if input file is given
if [ -z "$1" ]; then
echo -e "${YELLOW}Usage:${NC} $0 targets.txt"
exit 1
fi

INPUT_FILE="$1"

# Check if file exists
if [ ! -f "$INPUT_FILE" ]; then
echo -e "${RED}Error:${NC} File '$INPUT_FILE' not found!"
exit 1
fi

echo -e "${BLUE}Starting testssl.sh scans...${NC}"

# Loop through each line
while IFS= read -r target || [[ -n "$target" ]]; do
# Skip empty or commented lines
if [[ -z "$target" || "$target" == \#* ]]; then
continue
fi

# Sanitize filename
filename_safe=$(echo "$target" | tr ':' '-')
echo -e "${GREEN}Running testssl against${NC} ${YELLOW}$target${NC}..."
testssl --quiet -s -p -U -P -f -S --htmlfile "./TLS/testssl_${filename_safe}.html" "$target" > /dev/null 2>&1
if [ $? -eq 0 ]; then
echo -e "${GREEN}✓ Completed:${NC} Report saved to ${BLUE}testssl_${filename_safe}.html${NC}"
else
echo -e "${RED}✗ Error:${NC} testssl failed on ${target}"
fi
echo ""

done < "$INPUT_FILE"

echo -e "${BLUE}All scans complete.${NC}"
28 changes: 26 additions & 2 deletions provisioning/kali/generic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
## Table of Content <!-- omit in toc -->

- [Usage](#usage)
- [Automatic Install](#automatic-install)
- [Manual Install](#manual-install)
- [What it does](#what-it-does)
- [Preseed.cfg](#preseedcfg)
- [Credentials](#credentials)
Expand All @@ -21,22 +23,44 @@

This guide is focused in Kali Linux using VirtualBox

### Automatic Install

This guide uses a custom ISO made using [GitHub Actions](../../../.github/workflows/create-unattended-kali.yml) and uploaded to the releases of this repository.

1. [Download](https://github.com/J0nan/RandomThings/releases) the modified ISO. Sometimes downloading with the browsers fails, so on the release there will be `curl` commands to download from a terminal.
2. Decompress the downloaded files.
3. Create a new Virtual Machine.
4. Configure the Hardware, I recommend a minimum of 4096 MB of RAM, 3 CPUs processors and 100 GB of Hard Drive (it can be higher, depending on your hardware).
5. Before booting the VM, change the display setting to use at least 32 MB of Video memory in order to be able to rescale on bigger screen and with higher resolutions.
6. Boot the VirtualMachine.
7. Select one of the two auto install options and wait until Kali is installed.

<center> <img id="Imagen-1" src="photos/Auto-Install-Kali.png" alt="Installer image" width="70%"> </center>

Sometimes for some reason, the cursor glitches out, if that happens just restart lightdm with:

```bash
sudo systemctl restart lightdm
```

### Manual Install

1. [Download](https://www.kali.org/get-kali/#kali-installer-images) Kali Linux.
2. Create a new Virtual Machine.
3. Configure the Hardware, I recommend a minimum of 4096 MB of RAM, 3 CPUs processors and 100 GB of Hard Drive (it can be higher, depending on your hardware).
4. Before booting the VM, change the display setting to use at least 32 MB of Video memory in order to be able to rescale on bigger screen and with higher resolutions.
5. Boot the VirtualMachine.
6. Once booted go to Install and press the `Tab` key instead of the `Enter`, this will show a command line at the bottom, as shown in the next picture.

<center> <img id="Imagen-1" src="photos/Install-Kali.png" alt="Installer image" width="70%"> </center>
<center> <img id="Imagen-2" src="photos/Install-Kali.png" alt="Installer image 2" width="70%"> </center>

7. Once the command line is shown add the following changing the language, country, locale and keymap if needed. If you are not able to copy and paste, you can use any [Pastebin Services](https://github.com/lorien/awesome-pastebins) to copy and paste the content of the preseed.cfg file and type a shorter url instead of the one from Github. Also, you can use [ClickPaste](https://github.com/Collective-Software/ClickPaste) to paste into the Virtual Machine.

```shell
url=https://raw.githubusercontent.com/J0nan/RandomThings/refs/heads/main/provisioning/kali/generic/preseed.cfg language=en country=ES locale=en_US.UTF-8 keymap=es hostname=kali domain=
```

<center> <img id="Imagen-2" src="photos/Install-Kali-With-Command.png" alt="Installer image 2" width="70%"> </center>
<center> <img id="Imagen-3" src="photos/Install-Kali-With-Command.png" alt="Installer image 3" width="70%"> </center>

8. After entering the command press `Enter` and wait until Kali is installed.

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions provisioning/kali/generic/txt.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
label autoinstall
menu label ^Auto Install Spanish keyboard layout
kernel /install.amd/vmlinuz
append net.ifnames=0 preseed/file=/cdrom/simple-cdd/default.preseed simple-cdd/profiles=kali,offline desktop=xfce vga=788 initrd=/install.amd/initrd.gz --- quiet url=https://raw.githubusercontent.com/J0nan/RandomThings/refs/heads/main/provisioning/kali/generic/preseed.cfg language=en country=ES locale=en_US.UTF-8 keymap=es hostname=kali domain=

label autoinstall
menu label ^Auto Install USA keyboard layout
kernel /install.amd/vmlinuz
append net.ifnames=0 preseed/file=/cdrom/simple-cdd/default.preseed simple-cdd/profiles=kali,offline desktop=xfce vga=788 initrd=/install.amd/initrd.gz --- quiet url=https://raw.githubusercontent.com/J0nan/RandomThings/refs/heads/main/provisioning/kali/generic/preseed.cfg language=en country=US locale=en_US.UTF-8 keymap=us hostname=kali domain=
2 changes: 2 additions & 0 deletions web-tools/CSRF/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ This simple HTML, is intended to generate forms to perform CSRF.

It can perform using GET, POST or PUT.

https://j0nan.github.io/RandomThings/web-tools/CSRF/CSRF-PoC.html

## How it works

### GET
Expand Down