본문으로 바로가기

제로보드 pl7

category Security/Web 2007. 3. 8. 22:42
반응형

명칭 : 제로보드 XSS 취약점
발령일시 : 3월14일
해당시스템 : 4.1 pl 7
위험도 : ★★★★★
최초 보고자 : 유동훈




한국 보안회사 아이넷캅의 유동훈님이 발견한 제로보드 버그가 발표되어 화제를 모으고 있다.

이번 버그는 바로 얼마전 유행했던 웹쉘 인젝션 기법이 아닌 새로운 것으로써 XSS(크로스 사이트 스크립팅) 공격의 일종으로 알려지고 있다.

또한 이 새로운 제로보드 버그는 관리자를 직접 겨냥한 XSS 공격으로써 실제 공격과 응용된 공격이 이루어지면 상당한 파장을 일으킬 것으로 예상되고 있다.

이 공격의 주된 원리는 IP 세션 무력화 기법을 사용하여 제로보드에 사용된 관련 알고리즘을 우회하는 공격으로 보면 된다.

좀 더 자세히 설명을 드리자면 메모함의 제목과 사용자의 정보가 기록되는 부분인 email 과 homepage 를 입력하는 부분에서 발생하며

관리자가 레벨 권한 수정을 위해 관리자 페이지에 접속하면 공격코드가 실행되는 원리가 구현되고 있다.

즉, 악성코드를 쪽지의 제목에 붙인후 전송하는 공격기법인 것이다.

그러나 이 취약점을 발견한 유동훈님은 보안상의 이유로 실제 공격이 가능한 익스플로이트(PoC) 코드의 릴리즈는 하지 않겠다고 본인이 작성한 보안 문서를 통해 발표한 것으로 알려지고 있다.

제로보드 취약점 분석 내용 :
* Title: zeroboard IP session bypass XSS vulnerability


0x01. Description


Zeroboard is a popular web notice board used in Korea.

INetCop Security found XSS vulnerability in the latest zeroboard version 4.1 pl 7 (2005. 4. 4).
Basically, zeroboard uses the following algorithm so that session may not be abused
by the attack related with cookie. (e.g: cookie spoofing, sniffing)

After login, is part that handle session: --

bbs/login_check.php:
...
  24  // 회원로그인이 성공하였을 경우 세션을 생성하고 페이지를 이동함
  25          if($member_data[no]) {
  26
  27                  if($auto_login) {
  28                          makeZBSessionID($member_data[no]);
  29                  }
  30
  31                  // 4.0x 용 세션 처리
  32                  $zb_logged_no = $member_data[no];
  33                  $zb_logged_time = time();
  34                  $zb_logged_ip = $REMOTE_ADDR; <--- Recording IP address
  35                  $zb_last_connect_check = '0';
  36
  37                  session_register("zb_logged_no");
  38                  session_register("zb_logged_time");
  39                  session_register("zb_logged_ip");
  40                  session_register("zb_last_connect_check");
  41
--

If IP address is different from present session user's, connection terminates: --

bbs/lib.php:

  94                  // 세션 값을 체크하여 로그인을 처리
  95                  } elseif($HTTP_SESSION_VARS["zb_logged_no"]) {
  96
  97                          // 로그인 시간이 지정된 시간을 넘었거나 로그인
아이피가 현재 사용자의 아이피와 다를 경우 로그아웃 시킴
  98                          if(time()-
$HTTP_SESSION_VARS["zb_logged_time"]>
$_zbDefaultSetup["login_time"]||$HTTP_SESSION_VARS["zb_logged_ip&q
uot;]!=$REMOTE_ADDR)
{
  99
 100                                  $zb_logged_no=""; // session initialization
 101                                  $zb_logged_time="";
 102                                  $zb_logged_ip="";
 103                                  session_register("zb_logged_no"
1;;
 104                                  session_register("zb_logged_ip"
1;;
 105                                  session_register("zb_logged_time"&
#41;;
 106                                  session_destroy();
 107
 108                          // 유효할 경우 로그인 시간을 다시 설정
 109                          } else {
--


This seems to be intercepting cookie hacking.
But, if we take advantage of IP session disablement technique, session bypassing may be possible.
Detailed explanation about the way to exploit this vulnerability is found at the following

reference.

URL: http://x82.inetcop.org/h0me/papers/iframe_tag_exploit.txt (Korean)

As a result, hacker through administrator's web browser exploit code workably become.


--


0x02. Vulnerable Packages


Vendor site: http://www.nzeo.com/

Low versions including Zeroboard 4.1 pl 7 (2005. 4. 4) version.
-zb41pl7.tar.Z

Disclosure Timeline:
2003-04.??: Vulnerabilities found.
2006-02.17: 1st vendor contact. (didn't respond)
2006-02.22: 2nd vendor contact. (didn't respond)
2006-02.25: Vendor responded, patch released.
2006-03.12: Public disclosure.


0x03. Exploit


We have 2 `Proof-of-Concept' exploit about this vulnerability.

This XSS vulnerability happens in memo box title and user email, homepage information input.
When administrator logins and checks a user information page, attack code can be achieved,
and there is another way, which injects an attack code in memo title.
After exploit, an attacker can inject PHP code through an administrator web page function.
Through this PHP code injection, the attacker(normal user) can change the password of

administrator,
and take administrator's privilege

To prevent the abuse of this vulnerabilty, INetCop Security will not publish POC code.


0x04. Patch


INetCop Security released temporary patch:
INetCop Security Patch URL: http://inetcop.net/upfiles/Zeroboard-4.1_pl7_patch.tgz

And vendor's patch after INetCop Security advisory:
Vendor Patch URL: http://www.nzeo.com/bbs/zboard.php?id=cgi_bugreport2&no=5406

--
Thank you.

P.S: I give thanks to Securityproof that suffer translation.
Korean Advisory URL: http://www.inetcop.org/upfiles/33INCSA.2006-0x82-029-zeroboard.pdf


--
By "dong-houn yoU" (Xpl017Elz), in INetCop(c) Security.

MSN & E-mail: szoahc(at)hotmail(dot)com,
            xploit(at)hackermail(dot)com

INetCop Security Home: http://www.inetcop.org
           My World: http://x82.inetcop.org

GPG public key: http://x82.inetcop.org/h0me/pr0file/x82.k3y
--


===============
   기사제공
해/커/즈/뉴/스
===============

반응형

'Security > Web' 카테고리의 다른 글

Directory traversal  (0) 2007.03.08
Directory traversal  (0) 2007.03.08
제로보드 pl7  (0) 2007.03.08
XSS - 메일로 전송하기  (0) 2007.03.08
DB 에러메시지를 이용하여 데이터추출하기  (0) 2007.03.08