diff --git a/.github/workflows/create-unattended-kali.yml b/.github/workflows/create-unattended-kali.yml new file mode 100644 index 0000000..1bd8ccd --- /dev/null +++ b/.github/workflows/create-unattended-kali.yml @@ -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 + diff --git a/README.md b/README.md index a60ab16..1c60c98 100644 --- a/README.md +++ b/README.md @@ -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/) + diff --git a/docker-compose files/DeezSpot_bot_docker/README.md b/docker-compose files/DeezSpot_bot_docker/README.md index 29c1628..1c424e4 100644 --- a/docker-compose files/DeezSpot_bot_docker/README.md +++ b/docker-compose files/DeezSpot_bot_docker/README.md @@ -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: +For information regarding how to get some tokens, credentials or options check the repository: diff --git a/docker-compose files/DeezSpot_bot_docker/docker-compose.yml b/docker-compose files/DeezSpot_bot_docker/docker-compose.yml index 09a1483..9290d84 100644 --- a/docker-compose files/DeezSpot_bot_docker/docker-compose.yml +++ b/docker-compose files/DeezSpot_bot_docker/docker-compose.yml @@ -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 \ No newline at end of file + memory: "2g" \ No newline at end of file diff --git a/docker-compose files/TriliumNext Notes/docker-compose.yml b/docker-compose files/TriliumNext Notes/docker-compose.yml index ad8e8b4..01b8b03 100644 --- a/docker-compose files/TriliumNext Notes/docker-compose.yml +++ b/docker-compose files/TriliumNext Notes/docker-compose.yml @@ -1,6 +1,6 @@ services: triliumnext: - image: triliumnext/notes:latest + image: triliumnext/trilium:latest container_name: triliumnext environment: - USER_ID=568 @@ -15,4 +15,4 @@ services: limits: cpus: "4" memory: "4g" - restart: unless-stopped \ No newline at end of file + restart: unless-stopped diff --git a/infra-tools/SSH/auto_ssh-audit.sh b/infra-tools/SSH/auto_ssh-audit.sh new file mode 100644 index 0000000..a603424 --- /dev/null +++ b/infra-tools/SSH/auto_ssh-audit.sh @@ -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}" diff --git a/infra-tools/SSL-TLS/auto_testssl.sh b/infra-tools/SSL-TLS/auto_testssl.sh new file mode 100644 index 0000000..de4f421 --- /dev/null +++ b/infra-tools/SSL-TLS/auto_testssl.sh @@ -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}" diff --git a/provisioning/kali/generic/README.md b/provisioning/kali/generic/README.md index 94bdca2..155794f 100644 --- a/provisioning/kali/generic/README.md +++ b/provisioning/kali/generic/README.md @@ -3,6 +3,8 @@ ## Table of Content - [Usage](#usage) + - [Automatic Install](#automatic-install) + - [Manual Install](#manual-install) - [What it does](#what-it-does) - [Preseed.cfg](#preseedcfg) - [Credentials](#credentials) @@ -21,6 +23,28 @@ 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. + +
Installer image
+ +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). @@ -28,7 +52,7 @@ This guide is focused in Kali Linux using VirtualBox 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. -
Installer image
+
Installer image 2
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. @@ -36,7 +60,7 @@ This guide is focused in Kali Linux using VirtualBox 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= ``` -
Installer image 2
+
Installer image 3
8. After entering the command press `Enter` and wait until Kali is installed. diff --git a/provisioning/kali/generic/photos/Auto-Install-Kali.png b/provisioning/kali/generic/photos/Auto-Install-Kali.png new file mode 100644 index 0000000..59dec1c Binary files /dev/null and b/provisioning/kali/generic/photos/Auto-Install-Kali.png differ diff --git a/provisioning/kali/generic/txt.cfg b/provisioning/kali/generic/txt.cfg new file mode 100644 index 0000000..d0bb830 --- /dev/null +++ b/provisioning/kali/generic/txt.cfg @@ -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= diff --git a/web-tools/CSRF/README.md b/web-tools/CSRF/README.md index d590f4f..314f316 100644 --- a/web-tools/CSRF/README.md +++ b/web-tools/CSRF/README.md @@ -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