known_crypto() function tests your network’s ability to detect and block connections to known cryptocurrency mining domains. Unauthorized cryptomining (cryptojacking) uses organizational resources to mine cryptocurrency without permission.
Data Source
This module uses a curated list of cryptomining domains:- Mining Domains List -
https://gist.githubusercontent.com/asluppiter/88aa3cb285948e4f982dd94218e5baf3/raw/bffe8bb462eb8b3fb6cd647be65d67de059cb789/mining
This list contains domains associated with cryptocurrency mining pools and browser-based mining scripts commonly used in cryptojacking attacks.
How It Works
Download Mining Domains List
Downloads the latest list of known cryptomining domains from the GitHub Gist repository.
HTTP Connection Testing
Attempts HTTP GET requests to each cryptomining domain with a 5-second timeout.
Output Format
Results are saved to Mining_Results.txt with the following format:What to Monitor
Network Traffic
Monitor for sustained outbound connections to mining pools, which indicate active cryptomining.
CPU/GPU Usage
Unusual spikes in processor usage across multiple systems may indicate cryptojacking malware.
Web Filtering
Web security gateways should categorize and block cryptomining domains.
DNS Queries
DNS security should prevent resolution of known mining pool domains.
Cryptojacking Attack Vectors
Browser-Based Mining
Browser-Based Mining
Malicious JavaScript embedded in compromised websites that mines cryptocurrency using visitors’ browsers. Common libraries:
- Coinhive (defunct but variants exist)
- CoinImp
- Crypto-Loot
Malware-Based Mining
Malware-Based Mining
Dedicated cryptomining malware installed on systems:
- XMRig miners
- Monero mining trojans
- Fileless cryptominers
Cloud Instance Mining
Cloud Instance Mining
Compromised cloud resources used for mining:
- Hijacked AWS/Azure instances
- Kubernetes cluster compromise
- Container escape attacks
Supply Chain Attacks
Supply Chain Attacks
Cryptominers embedded in software supply chain:
- Compromised npm/PyPI packages
- Modified container images
- Infected software installers
Common Mining Pools
The test may include connections to pools mining various cryptocurrencies:- Monero (XMR) - Most common due to CPU mining capability
- Ethereum (ETH) - GPU-based mining pools
- Bitcoin (BTC) - Large mining pool operators
- Zcash (ZEC) - Privacy-focused cryptocurrency
Testing Workflow
Detection Strategies
Endpoint Layer
Deploy endpoint detection tools that identify cryptomining malware and excessive CPU usage.
Security Controls to Validate
- Web Application Firewalls (WAF) - Block mining scripts in web traffic
- DNS Filtering - Prevent resolution of mining pool domains
- Secure Web Gateways (SWG) - Categorize and block cryptomining sites
- Endpoint Protection - Detect and remove cryptomining malware
- Network Analysis - Identify Stratum protocol traffic to mining pools
- Cloud Security - Monitor resource consumption anomalies
This test attempts connections to 15 random cryptomining domains. Some may be offline or blocked at the infrastructure level, which is expected and will show as FAILED.
Performance Impact Indicators
Signs of active cryptomining in your environment:- Sustained high CPU/GPU usage (70-100%)
- Increased system temperature and fan noise
- Degraded application performance
- Higher than normal electricity consumption
- Network traffic to known mining pools
- Processes named similar to legitimate system services