1 / 14

Chapter 13 사례 연구 (Case Studies)

Hacking Exposed. Chapter 13 사례 연구 (Case Studies). 김 용 배 네트워크 실험실. 목차. 사례 연구 #1 : URL 부터 명령어 라인과 백까지. 사례 연구 #2 : 보안을 고려하지 않은 XOR. 사례 연구 #3 : 크로스 - 사이트 스크립팅 칼렌더. 사례연구 #1. URL 부터 명령어 라인과 백까지. URL 부터 명령어 라인과 백까지. /onlineserv/HB/DimlDisplayer.cgi?DIML_FILE=SummaryDetail.diml.

olympe
Download Presentation

Chapter 13 사례 연구 (Case Studies)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Hacking Exposed Chapter 13 사례 연구(Case Studies) 김 용 배 네트워크 실험실

  2. 목차 사례 연구 #1 : URL부터 명령어 라인과 백까지 사례 연구 #2 : 보안을 고려하지 않은 XOR 사례 연구 #3 : 크로스-사이트 스크립팅 칼렌더

  3. 사례연구 #1 URL부터 명령어 라인과 백까지

  4. URL부터 명령어 라인과 백까지 /onlineserv/HB/DimlDisplayer.cgi?DIML_FILE=SummaryDetail.diml • etc/passwd 발견후 .Porfile, .kshrc, and . Kshenv 파일에 사용자의 홈 디렉토리 검사 • chroot 웹루트들을 드러낸다. /home/jail/usr/bank/HB/AXIS.cfg • 파일뿐만 아니라 디렉토리 내용을 볼수 있다. /onlineserv/HB/DimlDisplayer.cgi?DIML_FILE=../../../../../etc/passwd%00SummaryDetail.diml

  5. /cgi-bin/admin/allstats.cgi Server_name=&…  문자열 전송(Post) /cgi-bin/admin/a_form.cgi <p>Attempting to run:<code>./analyze –n https-80-bank-64□ -I /u/webs/logs/https-80-bank-64/access –c hnrfeuokc –t S5m5h24 –l c+5h5 –p ctl 2>&1</code></p>  form.cgi의 출력 /cgi-bin/admin/a_form.cgi?server_name=ls&…  ls명령 스크립트에 전달 <p>Attempting to run:<code>./analyze –n ls –x –i /u/webs/logs/ https-80-bank-64/access –c hnrfeuokc –t S5m5h24 –l c+5h5 –p ctl 2>&1</code></p>  -n 옵션이 Server_name에 할당됨

  6. /cgi-bin/admin/a_form.cgi?server_name=%0als%0a&…  %0a : 새로운 행 문자 %0als%0a: ls명령 <hr><h1 align=center>Starting analysis</h1><hr> <p>Attempting to run: <code>./analyze –n ls -i /u/web/logs/https-80-bank-64/access –c z –t z –l z –p c 2>&1</code></p> <p>This may take a bit.</p><hr size=4> .analyze: option requires an argument n Usage : ./analyze [-n name] [-x] [-r] [-p order] [-I file] [-o file] [-c opts] [-t opts] [-l opts] For a list of all options, see: ./analyze –h | more a_form.cgi admin-log.1999-09 admin-log.2001-09 admin.css admin.exec admindb.cfg admindb.cgi allstats.cgi …..

  7. # 대응방법 • 부적절한 chroot 환경(호스트) • 프로그램과 필요한 파일등을 특정 디렉토리에 놓는다. • 디렉토리에 프로그램을 감금 • 디렉토르 가로지르기(웹) • 강한 입력 유효성을 적용, 받을수 있는 파일 이름들의 배열URL에 배열 인덱스를 통화하는것이 나을수 있음. • 독립변수로 파일 이름들을 받는 애플리케이션 프로그램 조심 • 물려받은 스크립트들(웹) • /cgi-bin/admin이 사용되지 않았지만 서버에 남아 있음, 제거 • 유닉스 셀(ksh)로 작성되어짐(보안상 취약)

  8. 사례연구 #2 보안을 고려하지 않은 XOR

  9. 보안을 고려하지 않은 XOR • 온라인 웹 애플리케이션 프로그램에 문서처리 능력들을 집어넣고자하는 중요한 합법적인 서비스 회사 • 확실한 사용자 이름/패스워드 조합을 가진 게스트 계정 로그온 증명서들을 추측 • IIS취약점(+.htr소스는 공개)을 사용하는 ASP 스크립트로 부터비즈니스 논리를 얻음 • 게스트 계정을 이용하여,표준 웹 브라우져에 의해 파일 이름으로 그것들을 요구함으로써 디렉토리안에 있는 include 파일들을 볼수 있다.

  10. # 대응방법 • 게스트/테스트/데모 계정과 샘플 파일드이 커다란 No-No • 보안 패치들을 최신으로 유지 • .inc 파일들을 .asp 파일로 변경 • 파일 시스템의 완전 무결성

  11. 사례연구 #3 크로스-사이트 스크립팅 칼렌더

  12. 크로스-사이트 스크립팅 칼렌더 • 한 사용자로 부터 입력을 받고 다른 사람들에게 출력을 표시하도록 설계된 웹 애플리케이션 프로그램 • 잠재적인 입력 필드로 간단한 자바 스크립트 경고 메시지 주입. <SCRIPT Language=“Javascript”> alert(“Hello”);</SCRIPT>

  13. # 대응방법 • 한가지 단점이 전체 애플리케이션 프로그램 타협을 이루는데 어떻게 사용될수 있는지에 대한 예 • 서버 측의 입력 유효성 루틴은 멈출수 없음. • 철저한 테스트 • 소스 레벨 보안성 검검

  14. Q & A

More Related