Analysis by: Wilbert Luy

ALIASES:

Linux.Coinminer (Symantec)

 PLATFORM:

Linux

 OVERALL RISK RATING:
 DAMAGE POTENTIAL:
 DISTRIBUTION POTENTIAL:
 REPORTED INFECTION:
 INFORMATION EXPOSURE:

  • Threat Type: Coinminer

  • Destructiveness: No

  • Encrypted: No

  • In the wild: Yes

  OVERVIEW

Infection Channel: Downloaded from the Internet, Dropped by other malware

This Coinminer arrives on a system as a file dropped by other malware or as a file downloaded unknowingly by users when visiting malicious sites.

  TECHNICAL DETAILS

File Size: 2,209,192 bytes
File Type: ELF
Memory Resident: Yes
Initial Samples Received Date: 30 Aug 2019
Payload: Drops files, Connects to URLs/IPs

Arrival Details

This Coinminer arrives on a system as a file dropped by other malware or as a file downloaded unknowingly by users when visiting malicious sites.

Installation

This Coinminer drops the following files:

  • /lib64/security/pam_unix.so -> if 64-bit, compromised pam_unix.so file
  • /lib/x86_64-linux-gnu/security/pam_unix.so -> if 32-bit, compromised pam_unix.so file

It adds the following processes:

  • ./pamdicks.org

Other Details

This Coinminer does the following:

  • It checks for the presence of the following files:
    /lib64/security/pam_unix.so
    /lib/x86_64-linux-gnu/security/pam_unix.so.
    If present, it will replace it with a malicious copy of "pam_unix.so", otherwise it will create its own "pam_unix.so"
  • It checks if setenforce is running; if found running, it will execute the following command:
    execute (setenforce 0)
  • It sets the following configurations if /etc/selinux/config is present:
    SELINUX=disabled
    SELINUXTYPE=targeted, to disabled setenforce
  • It checks for the first process id -100 in /var/run/bioset is running.
    If the process id is not running the malware will create an additional process of itself.
  • It connects to the following mining pools:
    • pool.cpuminerpool.com:443
    • pool.minexmr.com:80
    • pool.minexmr.com:5555
    • xmr.pool
    • aeon.pool

It accepts the following parameters:

  • -a, --algo=ALGO specifies the algorithm to use cryptonight cryptonight-lite cryptonight-heavy
  • -o, --url=URL URL of mining server
  • -O, --userpass=U:P username:password pair for mining server
  • -u, --user=USERNAME username for mining server
  • -p, --pass=PASSWORD password for mining server
  • --rig-id=ID rig identifier for pool-side statistics (needs pool support)
  • -t, --threads=N number of miner threads
  • -v, --av=N algorithm variation, 0 auto select
  • -k, --keepalive sends keepalived packet for prevent timeout (needs pool support)
  • --nicehash enables nicehash.com support
  • --tls enables SSL/TLS support (needs pool support)
  • --tls-fingerprint=F pool TLS certificate fingerprint, if set, enables strict certificate pinning
  • -r, --retries=N number of times of retrying before switching to backup server (default: 5)
  • -R, --retry-pause=N time to pause between retries (default: 5)
  • --cpu-affinity set process affinity to CPU core(s), mask 0x3 for cores 0 and 1
  • --cpu-priority sets process priority (0 idle, 2 normal to 5 highest)
  • --no-huge-pages disables huge pages support
  • --no-color disables colored output
  • --variant algorithm PoW variant
  • --donate-level=N donate level, default 5% (5 minutes in 100 minutes)
  • --user-agent sets custom user-agent string for pool
  • -B, --background runs the miner in the background
  • -c, --config=FILE loads a JSON-format configuration file
  • -l, --log-file=FILE logs all output to a file
  • -S, --syslog uses system log for output messages
  • --max-cpu-usage=N maximum CPU usage for automatic threads mode (default 75)
  • --safe safe adjust threads and av settings for current CPU
  • --asm=ASM ASM code for cn/2, possible values: auto, none, intel, ryzen.
  • --print-time=N prints hashrate report every N seconds
  • --api-port=N port for the miner API
  • --api-access-token=T access token for API
  • --api-worker-id=ID custom worker-id for API
  • --api-id=ID custom instance ID for API
  • --api-ipv6 enables IPv6 support for API
  • --api-no-restricted enables full remote access (only if API token set)
  • --dry-run test configuration and exit
  • -h, --help display this help and exit
  • -V, --version output version information and exit

It executes the following command to disable/stop/delete Windows components:

  • -B -> background
  • -o -> url
  • -u -> username
  • -p -> password
  • -h/--help -> help
  • -V/--version -> version

  SOLUTION

Minimum Scan Engine: 9.850
FIRST VSAPI PATTERN FILE: 15.360.05
FIRST VSAPI PATTERN DATE: 11 Sep 2019
VSAPI OPR PATTERN File: 15.361.00
VSAPI OPR PATTERN Date: 12 Sep 2019

Scan your computer with your Trend Micro product to delete files detected as Coinminer.Linux.SKIDMAP.WGL. If the detected files have already been cleaned, deleted, or quarantined by your Trend Micro product, no further step is required. You may opt to simply delete the quarantined files. Please check the following Trend Micro Support pages for more information:


Did this description help? Tell us how we did.