---
title: "How to catch crypto miners using syscall signatures"
description: "Modal detects cryptominers abusing its GPU serverless platform by analyzing container syscalls at runtime rather than relying only on user metadata, which abusers can fake with stolen credit cards."
url: "https://swe.quest/articles/how-to-catch-crypto-miners-using-syscall-signatures-d0f6cd50f5ee160a"
canonical: "https://modal.com/blog/catching-cryptominers"
source: "Modal"
published: "2024-06-06"
difficulty: "medium"
kind: "Case study"
reading_minutes: 7
tags: ["threat-detection","sandboxing","linux","serverless","containers"]
---

# How to catch crypto miners using syscall signatures

A post on [Modal](https://swe.quest/sources/modal.md), published 2024-06-06, 7 min read, Case study. Original: [https://modal.com/blog/catching-cryptominers](https://modal.com/blog/catching-cryptominers)

## Summary

Modal detects cryptominers abusing its GPU serverless platform by analyzing container syscalls at runtime rather than relying only on user metadata, which abusers can fake with stolen credit cards. Source and binary analysis and image scanning are ruled out because containers run arbitrary x86 code fetched at runtime, and ptrace-based strace costs about 10µs per context switch, which can slow syscall-heavy programs by more than 100x. Instead, gVisor's sentry kernel already intercepts every syscall, so Modal streams its seccheck tracepoints over a Unix socket to a per-container Rust thread. That thread matches events such as non-Python execve calls against rules, kills flagged containers and feeds auto-banning, with zero false positives reported so far.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Threat detection](https://swe.quest/tags/threat-detection.md) (Security)
- [Sandboxing & isolation](https://swe.quest/tags/sandboxing.md) (Security)
- [Linux](https://swe.quest/tags/linux.md) (Infrastructure)
- [Serverless](https://swe.quest/tags/serverless.md) (Backend & APIs)
- [Containers](https://swe.quest/tags/containers.md) (Infrastructure)

## Prerequisites

- Linux syscalls ([easy posts on Linux](https://swe.quest/tags/linux.md?difficulty=easy))
- containers ([easy posts on Containers](https://swe.quest/tags/containers.md?difficulty=easy))
- strace/ptrace basics

## Keywords

gVisor, seccheck, strace, ptrace, Monero, Modal, execve

## Related posts

- [Modal becomes a gVisor maintainer](https://swe.quest/articles/modal-becomes-a-gvisor-maintainer-053bd8f08ca6c19d.md): Modal · 2026-11-11 · Medium · 9 min read · Sandboxing & isolation, Containers, Multi-tenancy, Hardware, Open source
  Google is donating gVisor to the CNCF under maintainer-led governance, and Modal, which launches over 40 million gVisor containers a day for GPU inference, training, and AI sandboxes, is joining as a maintainer. gVisor's Go-based Sentry application kernel implements the Linux syscall interface and is itself confined by namespaces, cgroups and seccomp, giving tenant isolation without hardware virtualization: about 25 ms boot and 12 MB overhead.
- [Memory snapshots: Checkpoint/restore for sub-second startup](https://swe.quest/articles/memory-snapshots-checkpoint-restore-for-sub-second-startup-543b0ee4c645204a.md): Modal · 2025-01-28 · Medium · 9 min read · Serverless, Containers, Sandboxing & isolation, Performance engineering, Linux
  Modal cuts serverless container cold starts roughly 2.5x by checkpointing a gVisor container's full process tree and filesystem mutations just before it accepts a request, then restoring it instead of re-running Python's syscall-heavy import path (import torch alone makes 26,000 syscalls through OverlayFS and a FUSE lazy-loading server).
- [Scaling real-time file monitoring with eBPF: How we filtered billions of kernel events per minute](https://swe.quest/articles/scaling-real-time-file-monitoring-with-ebpf-how-we-filtered-billions-of-kernel-2f88f92ad0613fab.md): Datadog Engineering · 2025-11-18 · Medium · 9 min read · Linux, Threat detection, Performance engineering, Scaling
  Datadog built file integrity monitoring on eBPF to capture file changes with process and container context, which periodic scans, inotify and auditd could not provide at scale.
- [Server-side sandboxing: Containers and seccomp](https://swe.quest/articles/server-side-sandboxing-containers-and-seccomp-0f7ac1ac690426f8.md): Figma · 2023-10-24 · Medium · 15 min read · Sandboxing & isolation, Containers, Linux, Security
  Containers and seccomp offer lighter-weight sandboxing than VMs, but both shift much more configuration responsibility onto the user.
- [Keeping 20,000 GPUs healthy](https://swe.quest/articles/keeping-20-000-gpus-healthy-44bcabe0aac0be9a.md): Modal · 2025-12-28 · Medium · 9 min read · Hardware, SRE, Observability, Cloud platforms, Performance engineering
  Modal keeps a multi-cloud fleet of over 20,000 concurrent GPUs reliable through instance-type benchmarking, continuously tested machine images, light boot checks, and passive plus active lifetime healthchecks.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
