{"id":27036907,"url":"https://github.com/phannhat17/hust-edr-server","last_synced_at":"2025-04-05T01:15:00.684Z","repository":{"id":284373523,"uuid":"939332597","full_name":"phannhat17/Hust-EDR-Server","owner":"phannhat17","description":"Simple EDR System integrate with ELK stack","archived":false,"fork":false,"pushed_at":"2025-04-01T15:32:57.000Z","size":648,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-01T16:45:18.600Z","etag":null,"topics":["cybersecurity","edr","go","grpc","server"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phannhat17.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-26T11:25:12.000Z","updated_at":"2025-04-01T15:38:54.000Z","dependencies_parsed_at":"2025-03-25T15:44:17.829Z","dependency_job_id":"320e8b8e-f72a-48b7-8ea9-446274b80175","html_url":"https://github.com/phannhat17/Hust-EDR-Server","commit_stats":null,"previous_names":["phannhat17/hust-edr-server"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phannhat17%2FHust-EDR-Server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phannhat17%2FHust-EDR-Server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phannhat17%2FHust-EDR-Server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phannhat17%2FHust-EDR-Server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phannhat17","download_url":"https://codeload.github.com/phannhat17/Hust-EDR-Server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247271527,"owners_count":20911587,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cybersecurity","edr","go","grpc","server"],"created_at":"2025-04-05T01:15:00.035Z","updated_at":"2025-04-05T01:15:00.676Z","avatar_url":"https://github.com/phannhat17.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HUST EDR Server\n\nA modern Endpoint Detection and Response (EDR) system with a beautiful React frontend and Flask backend.\n\n## Features\n\n- Real-time security alerts from ElastAlert\n- Rule management for detection and alerting\n- Modern UI built with React, TanStack Router, and Shadcn UI components\n- Secure API integration\n\n## Project Structure\n\n- `agent/`: EDR agent\n   - Updating\n\n- `backend/`: Flask API server\n  - Connects to Elasticsearch for alerts and rule management\n  - Manages ElastAlert rules and configuration\n  - Provides RESTful API endpoints\n\n- `frontend/`: React application built with Vite\n  - Modern UI with Shadcn components\n  - TanStack Router for routing\n  - TanStack Query for API data fetching\n  - Type-safe integration with backend\n\n## Setup and Installation\n\n### Prerequisites\n\n- Python 3.8+\n- Docker compose\n- Node.js 16+ and npm \u0026 pnpm\n- Elasticsearch instance\n- ElastAlert container (optional, for rule execution)\n- Go lang for agent compile or you can use the prebuilt executable available in the Releases section.\n\n### Backend Setup\n\n1. Navigate to the backend directory\n   ```\n   cd backend\n   ```\n\n2. Create a virtual environment\n   ```\n   python -m venv .venv\n   source .venv/bin/activate  # On Windows: .venv\\Scripts\\activate\n   ```\n\n3. Install dependencies\n   ```\n   pip install -r requirements.txt\n   ```\n\n4. Compile proto for python gRPC\n   ```\n   python -m grpc_tools.protoc -I../agent/proto --python_out=./app/grpc --grpc_python_out=./app/grpc ../agent/proto/agent.proto\n   ```\n   Then You need to modify the import line in the generated `backend/app/grpc/agent_pb2_grpc.py` file from:\n   ```\n   import agent_pb2 as agent__pb2\n   ```\n   To\n   ```\n   from . import agent_pb2 as agent__pb2\n   ```\n   This is necessary because the file is used within a Python package and requires a relative import.\n   Or you can use this command with the current directory is `backend`\n   ```\n   sed -i 's/import agent_pb2 as agent__pb2/from . import agent_pb2 as agent__pb2/' ./app/grpc/agent_pb2_grpc.py\n   ```\n\n\n5. Configure environment variables in `.env` file (copy from `.env.example`)\n   ```\n   cp .env.example .env\n   # Edit .env file with your configuration\n   ```\n   If your Elasticsearch instance uses a self-signed SSL certificate (which is the default for new Elasticsearch instances), you will need to manually copy that certificate into `backend/cacert.pem` file.\n\n   \u003e If you follow the default Elasticsearch installation method on Ubuntu, the certificate will be located at `/etc/elasticsearch/certs/http_ca.crt`\n\n\n6. Run the Flask development server\n   ```\n   python server.py\n   ```\n\n\u003e **Security Note**: The frontend is currently making direct API calls from the browser, which may lead to CORS policy violations and prevent successful communication with the backend. As a temporary workaround, CORS has been disabled to allow these requests. This will be addressed and properly configured in future versions (hopefully 😅).\n\n### Frontend Setup\n\n1. Navigate to the frontend directory\n   ```\n   cd frontend\n   ```\n\n2. Install dependencies\n   ```\n   pnpm install\n   ```\n\n3. Configure environment variables in `.env` file (copy from `.env.example`)\n   ```\n   cp .env.example .env\n   # Edit .env file with your configuration\n   ```\n\n4. Run the development server\n   ```\n   npm run dev -- --host\n   ``` \n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphannhat17%2Fhust-edr-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphannhat17%2Fhust-edr-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphannhat17%2Fhust-edr-server/lists"}