No description
Find a file
Your Name a525add973 init
2025-02-08 14:16:59 +02:00
src init 2025-02-08 14:16:59 +02:00
tools/Install init 2025-02-08 14:16:59 +02:00
WebPortal init 2025-02-08 14:16:59 +02:00
.cursorrules init 2025-02-08 14:16:59 +02:00
.gitignore init 2025-02-08 14:16:59 +02:00
appsettings.json init 2025-02-08 14:16:59 +02:00
ARCHITECTURE.md init 2025-02-08 14:16:59 +02:00
CODE_GUIDELINES.md init 2025-02-08 14:16:59 +02:00
FILESTRUCTURE.md init 2025-02-08 14:16:59 +02:00
install.ps1 init 2025-02-08 14:16:59 +02:00
install_log.txt init 2025-02-08 14:16:59 +02:00
PROJECT.md init 2025-02-08 14:16:59 +02:00
RDP_Security.sln init 2025-02-08 14:16:59 +02:00
README.md init 2025-02-08 14:16:59 +02:00

RDP Security Agent

A Windows service that provides secure RDP access management through a REST API.

Features

  • RDP service management (enable/disable)
  • RDP port configuration
  • Active session monitoring
  • IP whitelist management
  • Secure API with key authentication
  • Automatic service startup
  • Comprehensive logging

Installation

  1. Download the latest release
  2. Extract the files to a temporary location
  3. Open PowerShell as Administrator
  4. Navigate to the extracted folder
  5. Run the installation script:
.\tools\Install\install.ps1

The installer will:

  • Create necessary directories
  • Install the Windows service
  • Configure firewall rules
  • Generate an API key
  • Start the service

Uninstallation

  1. Open PowerShell as Administrator
  2. Navigate to the installation folder
  3. Run the uninstallation script:
.\tools\Install\uninstall.ps1

API Documentation

Authentication

All API requests require an API key to be sent in the X-API-Key header.

Endpoints

RDP Management

  • GET /api/rdp/status - Get RDP service status
  • POST /api/rdp/enable - Enable RDP service
  • POST /api/rdp/disable - Disable RDP service
  • PUT /api/rdp/port/{port} - Change RDP port

Session Management

  • GET /api/sessions - List active sessions
  • GET /api/sessions/{id} - Get session details
  • POST /api/sessions/{id}/terminate - Terminate a session

Whitelist Management

  • GET /api/whitelist - List whitelisted IPs
  • POST /api/whitelist - Add IP to whitelist
  • DELETE /api/whitelist/{ip} - Remove IP from whitelist

Configuration

The service configuration is stored in C:\ProgramData\RdpAgent\config.json.

Logs

Service logs are stored in C:\ProgramData\RdpAgent\logs\.

Security Considerations

  • The service runs under the NETWORK SERVICE account
  • API access is restricted by API key authentication
  • All sensitive data is encrypted
  • The service maintains an audit log of all operations

Support

For issues and feature requests, please create an issue in the repository.