{"id":29863017,"url":"https://github.com/peopleworks/malwarebytesextractor","last_synced_at":"2026-04-16T00:32:51.424Z","repository":{"id":303847099,"uuid":"1015702753","full_name":"peopleworks/MalwareBytesExtractor","owner":"peopleworks","description":"MalwareBytesExtractor is a C# .NET 9 console application that connects to the Malwarebytes Nebula API to extract and store security detection data—especially brute-force attacks—into a SQL Server or PostgreSQL database.","archived":false,"fork":false,"pushed_at":"2025-07-09T18:17:33.000Z","size":1338,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-15T22:54:08.309Z","etag":null,"topics":["database","malware-analysis","net"],"latest_commit_sha":null,"homepage":"https://peopleworksgpt.com/","language":"C#","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/peopleworks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2025-07-07T23:10:18.000Z","updated_at":"2025-07-20T22:56:09.000Z","dependencies_parsed_at":"2025-07-10T02:18:48.053Z","dependency_job_id":"99e3cfbb-22cb-4cf5-aadd-3c2b3eca5f04","html_url":"https://github.com/peopleworks/MalwareBytesExtractor","commit_stats":null,"previous_names":["peopleworks/malwarebytesextractor"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/peopleworks/MalwareBytesExtractor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peopleworks%2FMalwareBytesExtractor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peopleworks%2FMalwareBytesExtractor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peopleworks%2FMalwareBytesExtractor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peopleworks%2FMalwareBytesExtractor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peopleworks","download_url":"https://codeload.github.com/peopleworks/MalwareBytesExtractor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peopleworks%2FMalwareBytesExtractor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31866346,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["database","malware-analysis","net"],"created_at":"2025-07-30T06:34:00.350Z","updated_at":"2026-04-16T00:32:51.401Z","avatar_url":"https://github.com/peopleworks.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"![MalwareBytesExtractor Logo](logo.png)\n\n# MalwareBytesExtractor\n\n**MalwareBytesExtractor** is a C# .NET 9 console application that connects to the [Malwarebytes Nebula API](https://api.malwarebytes.com/nebula/v1/docs), retrieves detailed security detections (especially brute-force and RDP intrusion attempts), enriches the data with IP geolocation, and stores it in either **SQL Server** or **PostgreSQL**. It also includes optional tools for generating **HTML dashboards** and populating **AI demo prompts** for [PeopleWorks GPT](https://peopleworksgpt.com).\n\n---\n\n## 🚀 Features\n\n- ✅ OAuth2 authentication with Malwarebytes Nebula\n- ✅ Retrieves and paginates **1 year of detection history**\n- ✅ Filters and highlights **Remote Intrusion** (RDP, Brute Force)\n- ✅ Enriches detections with **source country** via ip-api.com\n- ✅ Stores results in **SQL Server** or **PostgreSQL**\n- ✅ Structured logs using **Serilog**\n- ✅ Generates **interactive dashboards** in HTML with ECharts\n- ✅ Fills `Prompts` with sample AI queries\n\n---\n\n## ⚙️ Configuration\n\nSet your values in the `appsettings.json`:\n\n```json\n{\n  \"Database\": {\n    \"Provider\": \"SqlServer\", // or \"PostgreSql\"\n    \"ConnectionStrings\": {\n      \"SqlServer\": \"Server=.;Database=SecurityIT;Trusted_Connection=True;\",\n      \"PostgreSql\": \"Host=localhost;Database=SecurityIT;Username=postgres;Password=yourpassword\"\n    }\n  },\n  \"Malwarebytes\": {\n    \"ClientId\": \"your-client-id\",\n    \"ClientSecret\": \"your-client-secret\",\n    \"AccountId\": \"\"\n  }\n}\n````\n\n---\n\n## 🏁 How to Use\n\n### 🔹 Basic Extraction\n\n```bash\ndotnet run --project MalwareBytesExtractor\n```\n\n### 🔹 With optional arguments\n\n| Option               | Description                                |\n| -------------------- | ------------------------------------------ |\n| `--generate-html`    | Generates an interactive HTML dashboard    |\n| `--populate-prompts` | Fills the `Prompts` table for AI demos     |\n| `--from=YYYY-MM-DD`  | Start date (optional, default: 1 year ago) |\n| `--to=YYYY-MM-DD`    | End date (optional, default: today)        |\n\nExample:\n\n```bash\ndotnet run --project MalwareBytesExtractor --generate-html --populate-prompts --from=2025-01-01 --to=2025-07-01\n```\n\n---\n\n## 🧩 Data Model\n\n### MalwareDetection Table\n\n| Field         | Description                           |\n| ------------- | ------------------------------------- |\n| Id            | Unique GUID                           |\n| Hostname      | Name of machine                       |\n| IpAddress     | Public IP of device or attacker       |\n| Username      | Targeted or logged-in user            |\n| DetectionName | Example: `RDP Intrusion Detection`    |\n| DetectionType | e.g., `RID`, `InboundConnection`      |\n| Category      | Malwarebytes category                 |\n| Severity      | Integer level                         |\n| ActionTaken   | Quarantine / Block / None             |\n| CreatedAt     | Date of creation                      |\n| FirstSeen     | First time seen (nullable)            |\n| LastSeen      | Last time seen (nullable)             |\n| SourceCountry | ISO Country (e.g. `FR`)               |\n| SourceJson    | Original API response (for reference) |\n\n---\n\n## 🌍 IP Geolocation\n\n* Powered by [ip-api.com](http://ip-api.com)\n* Free \u0026 authentication-free (great for open-source)\n* Country detection helps enrich reports for AI\n\n---\n\n## 📊 Dashboard Output (optional)\n\nRun with `--generate-html` and an interactive file like `dashboard.html` will be created, with:\n\n* Bar chart of top threat types\n* Line chart of detections over time\n* Map of source countries (when available)\n* Tooltips and filtering\n\n---\n\n## 🧠 AI Prompt Seeding (optional)\n\nRun with `--populate-prompts` to populate the table:\n\n`Prompts` with questions like:\n\n* \"Show me all brute-force attacks from Germany\"\n* \"List detections by machine and severity\"\n* \"What are the most common attack types this year?\"\n\nThis improves PeopleWorks GPT’s ability to offer useful examples to users.\n\n---\n\n## 🧠 Integration with PeopleWorks GPT\n\nThis app feeds data that can be used by [PeopleWorks GPT](https://peopleworksgpt.com) to answer natural language queries like:\n\n\u003e “How many RDP intrusions happened in Q1 2025?”\n\n\u003e “What countries have the most attacks?”\n\n\u003e “Show the trend of detections per machine over time.”\n\n---\n\n## 📁 Project Structure\n\n* `Program.cs` – CLI interface and orchestration\n* `Services/NebulaService.cs` – API interaction \u0026 pagination\n* `Services/DetectionFilter.cs` – detection type filters\n* `Services/GeoService.cs` – enriches with country\n* `Services/DbWriter.cs` – inserts into selected DB\n* `Services/HtmlDashboardGenerator.cs` – generates dashboard\n* `Services/PromptSeeder.cs` – adds demo prompts\n* `Models/MalwareDetection.cs` – main data class\n* `appsettings.json` – config file\n\n---\n\n## 📄 License\n\nThis project is licensed under the **MIT License**. See the [LICENSE](LICENSE) file for details.\n\n---\n\nMade with ❤️ by [PeopleWorks](https://peopleworksgpt.com) to empower AI in cybersecurity.\n\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeopleworks%2Fmalwarebytesextractor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeopleworks%2Fmalwarebytesextractor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeopleworks%2Fmalwarebytesextractor/lists"}