A comprehensive penetration testing and security assessment platform built with FastAPI and Next.js. RedRecon provides a secure environment for practicing ethical hacking techniques and red team exercises.
- Frontend: Next.js 14 + TypeScript + Tailwind CSS
- Backend: FastAPI + Python 3.10+
- Database: MongoDB Atlas
- Authentication: JWT with bcrypt password hashing
- Deployment:
- Frontend: Vercel
- Backend: Azure App Service
- User Authentication: Secure JWT-based registration and login
- Network Scanning: Simulated Nmap-style port scanning and reconnaissance
- Payload Testing: XSS, SQLi, CSRF, LFI, and RFI payload simulation
- Activity Logging: Comprehensive logging of all security testing activities
- CVE Database: Access to vulnerability information and exploit data
- PCAP Analysis: Sample network traffic analysis
- Lab Setup Guide: Instructions for setting up penetration testing environments
redrecon/
βββ backend/ # FastAPI application
β βββ main.py # Application entry point
β βββ db.py # MongoDB connection
β βββ models.py # Pydantic models
β βββ auth.py # JWT authentication
β βββ routes/ # API endpoints
β βββ utils/ # Utility functions
βββ frontend/ # Next.js application
β βββ app/ # App router pages
β βββ components/ # React components
β βββ lib/ # Utility libraries
β βββ styles/ # CSS styles
βββ .env.example # Environment variables template
βββ README.md
- Python 3.10+
- Node.js 18+
- MongoDB Atlas account
- Azure account (for backend deployment)
- Vercel account (for frontend deployment)
-
Clone the repository
git clone <repository-url> cd redrecon/backend
-
Create virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Set up environment variables
cp .env.example .env # Edit .env with your MongoDB URI and JWT secret -
Run the development server
uvicorn main:app --reload
The API will be available at http://localhost:8000
-
Navigate to frontend directory
cd ../frontend -
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env.local # Edit .env.local with your API URL -
Run the development server
npm run dev
The frontend will be available at http://localhost:3000
MONGO_URI=mongodb+srv://<USERNAME>:<PASSWORD>@<CLUSTER>.mongodb.net/redrecon?retryWrites=true&w=majority
JWT_SECRET_KEY=your-super-secure-jwt-secret-keyNEXT_PUBLIC_API_URL=http://localhost:8000-
Create Azure App Service
- Choose Linux + Python 3.10
- Set startup command:
gunicorn -w 4 -k uvicorn.workers.UvicornWorker main:app
-
Configure environment variables in Azure
- Add
MONGO_URIandJWT_SECRET_KEYin Configuration settings
- Add
-
Deploy via GitHub Actions or ZIP deployment
-
Connect GitHub repository to Vercel
-
Set environment variables
NEXT_PUBLIC_API_URL=https://your-backend-url.azurewebsites.net
-
Deploy automatically via Git push
Once the backend is running, visit http://localhost:8000/docs for interactive API documentation powered by FastAPI and Swagger UI.
POST /api/register- User registrationPOST /api/login- User authenticationGET /api/me- Get current user profilePOST /api/scan- Perform network scanPOST /api/payload- Test security payloadsGET /api/logs- Retrieve activity logsGET /api/cves- Get CVE informationGET /api/pcap- Get PCAP analysis dataGET /api/setup- Get lab setup guide
- JWT Authentication: Secure token-based authentication
- Password Hashing: bcrypt for secure password storage
- CORS Protection: Configured for production domains
- Input Validation: Pydantic models for API validation
- Rate Limiting: Built-in protection against abuse
cd backend
python -m pytestcd frontend
npm run testcurl -X POST "http://localhost:8000/api/scan" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"target": "192.168.1.1"}'curl -X POST "http://localhost:8000/api/payload" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"payload_type": "xss",
"target_url": "https://example.com",
"payload": "<script>alert(1)</script>"
}'- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This platform is designed for educational purposes and authorized security testing only. Users are responsible for ensuring they have proper authorization before testing any systems. The developers are not responsible for any misuse of this platform.
This project is licensed under the MIT License - see the LICENSE file for details.
For support, please open an issue on GitHub or contact the development team.
