https://github.com/dimaskiddo/lmd-ng
Linux Malware Detect Next Generation (LMD-NG) a Vibe Code Golang Rewrite from the Original LMD/MalDet
https://github.com/dimaskiddo/lmd-ng
clamav detect golang linux lmd maldet malware malware-detection rewrite vibecode
Last synced: about 1 month ago
JSON representation
Linux Malware Detect Next Generation (LMD-NG) a Vibe Code Golang Rewrite from the Original LMD/MalDet
- Host: GitHub
- URL: https://github.com/dimaskiddo/lmd-ng
- Owner: dimaskiddo
- License: mit
- Created: 2026-04-27T15:31:00.000Z (about 1 month ago)
- Default Branch: master
- Last Pushed: 2026-04-28T04:54:50.000Z (about 1 month ago)
- Last Synced: 2026-04-28T06:28:55.509Z (about 1 month ago)
- Topics: clamav, detect, golang, linux, lmd, maldet, malware, malware-detection, rewrite, vibecode
- Language: Go
- Homepage:
- Size: 64.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Agents: AGENTS.md
Awesome Lists containing this project
README
# ๐ก๏ธ Linux Malware Detect Next Generation (LMD-NG)
Welcome to the future of multi-platform security! **LMD-NG** is a complete, ground-up rewrite of the legendary **Linux Malware Detect (LMD/MalDet)**. While the original LMD was built specifically for Linux, **LMD-NG** brings that same battle-tested logic to **Windows** and **macOS**, supercharged with the speed, safety, and modern features of **Pure Golang**! ๐นโจ
Whether you're protecting a high-traffic server, a personal workstation, or a fleet of cloud instances, LMD-NG is designed to be your lightweight, lightning-fast, and cross-platform guardian. With **real-time email alerts** and **automated quarantine**, you can rest easy knowing your systems are protected across all major operating systems! ๐ฆพ
---
## โจ Why LMD-NG?
* **โก Blazing Performance:** Rewritten in Pure Go for maximum efficiency and minimal resource footprint.
* **๐ฆ Zero Dependencies:** Compiled with `CGO_ENABLED=0`. It's a single static binary that just *works*.
* **๐ Truly Cross-Platform:** Breaking free from the Linux-only roots of the original LMD, LMD-NG runs natively on **Windows**, **macOS**, and **Linux**! ๐
* **๐ต๏ธ Real-Time Protection:** Native file system monitoring (using `fsnotify`) catches threats the moment they land.
* **๐ Modern Signature Updates:** Seamlessly pulls the latest threat definitions to keep you safe.
* **๐ฆ Native ClamAV Support:** Built-in loader for ClamAV databases with **zero** `libclamav` dependency. Access a massive signature library natively!
* **๐ ๏ธ Service Integration:** Easily install/uninstall as a system service with a single command.
* **๐ Secure Quarantine:** Safely isolates threats with optional AES encryption to prevent accidental execution.
* **๐ง Email Notifications:** Get instant HTML-formatted alerts when malware is detected. Supports SMTP with SSL/TLS.
* **๐ Structured Logging:** Clean, modern logs using Go's `slog` for better observability.
---
## ๐ Getting Started
Getting up and running with LMD-NG is as easy as a breeze! ๐ฌ๏ธ
### ๐ Prerequisites
* **Go** (1.21+ recommended) - The engine under the hood.
* **Make** - For automated building magic.
* **GoReleaser** (Optional) - For building your own mass distributions.
---
## ๐ ๏ธ Deployment
### ๐ณ **Using Container**
Ready to containerize your security? We've got you covered!
1. **Install Docker** following the [official guide](https://docs.docker.com/get-docker/).
2. **Fire it up!**
```sh
docker run -d \
-v :/usr/app/lmd-ng/config.yaml \
-v :/data:rw \
--name lmd-ng \
--restart unless-stopped \
dimaskiddo/lmd-ng:latest \
lmd-ng daemon --config /usr/app/lmd-ng/config.yaml
```
### ๐ฆ **Using Pre-Built Binaries**
Speed is of the essence! Grab a pre-built binary and go.
1. Download the latest release from our [Releases Page](https://github.com/dimaskiddo/lmd-ng/releases).
2. **Extract and Run:**
```sh
# Give it execution power!
chmod +x lmd-ng
# Check version
./lmd-ng version
# Run first database signature update
./lmd-ng update
# Start the daemon
./lmd-ng daemon
```
### ๐๏ธ **Build From Source**
For the true crafters who love to build their own tools:
1. **Clone the repository:**
```sh
git clone https://github.com/dimaskiddo/lmd-ng.git
cd lmd-ng
```
2. **Install dependencies:**
```sh
make vendor
```
3. **Build the magic:**
```sh
make build
```
4. **Find your binary** in the `dist/` directory! ๐
---
## ๐น๏ธ Usage & Commands
LMD-NG comes with a powerful CLI. Here are the most common commands:
* **`lmd-ng daemon`**: Start the resident monitor and internal scheduler. ๐โโ๏ธ
* **`lmd-ng scan `**: Perform a manual, on-demand scan of a specific directory. ๐
* **`lmd-ng update`**: Manually trigger a signature database update. ๐
* **`lmd-ng quarantine list`**: List all files currently in quarantine. ๐
* **`lmd-ng quarantine add `**: Manually move a suspicious file to quarantine. ๐ฅ
* **`lmd-ng quarantine restore `**: Restore a file from quarantine to its original location. ๐ค
* **`lmd-ng quarantine remove `**: Permanently delete a quarantined file (requires `--force`). ๐๏ธ
* **`lmd-ng service install`**: Automatically register LMD-NG as a background service (supports Windows Services, macOS Launchd, and Linux Systemd/Upstart). โ๏ธ
* **`lmd-ng service uninstall`**: Cleanly remove the system service. ๐งน
* **`lmd-ng version`**: Display the version information. โน๏ธ
---
## ๐งช Running The Tests
We take security seriously! Run the tests to ensure everything is perfect:
```sh
go test ./...
```
*(Note: Integration tests validate the compiled binary in `dist/` for real-world accuracy!)*
---
## ๐๏ธ Built With Love & Power
* **[Go](https://golang.org/)** - The legendary programming language.
* **[Cobra](https://github.com/spf13/cobra)** - Modern CLI framework.
* **[fsnotify](https://github.com/fsnotify/fsnotify)** - Cross-platform file system watcher.
* **[kardianos/service](https://github.com/kardianos/service)** - Multi-platform service manager.
---
## โ๏ธ Authors
* **Dimas Restu Hidayanto** - *Initial Work & Architecture* - [DimasKiddo](https://github.com/dimaskiddo)
Love this project? Give it a โญ and help us grow!
---
## โ๏ธ License
Copyright (C) 2026 Dimas Restu Hidayanto.
Distributed under the **MIT License**. See `LICENSE` for more information.
---
**LMD-NG** โ *Next Generation Security for a Modern World.* ๐ก๏ธ๐