An open API service indexing awesome lists of open source software.

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

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.* ๐Ÿ›ก๏ธ๐ŸŒ