WINDOWS 기반 제로보드(Xpress Engine) 에 IIS / MySQL / PHP / PhpMyAdmin 3.3.4 / URL ReWrite / 제로보드(Xpress Engine) 설치

 

1. IIS7 및 WWW 서비스 설치

 - Windows 7 - WWW / World Wide Web (in IIS) Install

 

2. IIS7 의 WWW 서비스에 PHP 설치하기

 - WIndows 7 - WWW in IIS7 / PHP 5.3.2 Install

 

3. IIS7 의 WWW 서비스와 PHP 가 설치된 환경에 MySQL 설치하기

 - Windows 7 - PHP & WWW in IIS7 / MySQL Install.

 

4. MySQL 에서 새로운 유저 추가 하기

 - MySQL / Database and User Add.

 

5. IIS7 의 WWW 서비스와 PHP 및 MySQL 이 설치된 환경에 phpMyAdmin 설치하기

 - Windows 7 - WWW in IIS7 / phpMyAdmin Install

 

6. IIS7 의 WWW 서비스에 URL Rewrite 모듈 설치하기

 - Windows 7 - WWW in IIS7 / URL Rewrite Install

 

7. IIS7 + PHP + MySQL + URL Rewrite Module이 설치된 환경에 XpressEngine 설치하기

 - Windows 7 - PHP & MySQL & WWW in IIS7 / XpressEngine Install

 

출저 : Xpress Engine 사이트의 "웹마스터 팁" 게시판의 "키네시스" 님이 작성한 글을 발췌해 설치순서별로 재정리된 문서입니다.

링크경로 : https://www.xpressengine.com/index.php?mid=tip&search_target=title_content&search_keyword=iis+php+mysql&document_srl=18999169

블로그 이미지

소프토어

,

안녕하세요 ^.^

중소기업에 필요한 무료 보안 소프트웨어로 한국인터넷진흥원에서 권장하고있는 WebKnight 에 대해서 포스팅합니다.

 

설치 프로그램 및 메뉴얼은 아래의 링크에서 다운로드 받으시면 됩니다.

2016년 4월 28일 현재 무료로 다운로드 받을 수 있는 버젼은 WebKnight 4.4 버젼입니다.

(4.5 버젼이 최신버젼이지만 결제를 해야하는것같네요;;)

 

WebKnight 다운로드

 - AQTRONIX - 홈페이지(다운로드 게시판)

 - 주소 : http://www.aqtronix.com/?PageID=136

 

기본 설치 메뉴얼

 - 한국인터넷진흥원 - KISA 보호나라 (자료실-보안공지 게시판)

 - 주소 : http://www.krcert.or.kr/data/secNoticeList.do

 

위의 설치가 정상적으로 완료되었고, 현재 아무런 세팅도 변경을 하지 않은 상태라면 자신의 웹페이지 접속 시 아래와 같은 문구가 나옵니다.

 

WebKnight Application Firewall Alert


Your request triggered an alert! If you feel that you have received this page in error, please contact the

administrator of this web site.



What is WebKnight?
AQTRONIX WebKnight is an application firewall for web

servers and is released under the GNU General Public

License. It is an ISAPI filter for securing web servers by

blocking certain requests. If an alert is triggered

WebKnight will take over and protect the web server.
 



For more information on WebKnight:

http://www.aqtronix.com/WebKnight/

AQTRONIX WebKnight

 

설치는 비교적 간단하고 위의 링크된 메뉴얼로도 충분하다고 생각하기 때문에 생략하겠습니다.

이제 부터가 정말 셋팅의 시작인데요. 적응하는데 한참 걸렸습니다. 모두 영문이기 때문에 거부감이 먼저 듭니다.

 

1. WebKnight 실행 (WebKnight 설정)

WebKnight 가 설치된 경로(C:\Program Files\AQTRONIX Webknight) 의 Config.exe 를 실행합니다.

그리고 아래와 같이 설정을 하나씩 맞추어 가면서 자신의 홈페이지를 확인해 주세요.

권장하는 방법은 먼저 차단되는 것을 확인 후 설정을 바꾸어 차단이 풀리는지 체크해 나가는 것이 효율적입니다.

 

2. Log Analysis 실행 (WebKnight 로그 뷰어)

WebKnight 가 설치된 경로(C:\Program Files\AQTRONIX Webknight) 의 LogAnalysis.exe 를 실행합니다.

설정파일을 선택하는 창이 뜨는데 "WebKnight.xml" 를 선택하시면 됩니다.

 

아마도 처음에 위의 경고문구가 뜬 이유는 아래와 같은 메세지로 차단되었을 가능성이 큽니다.

바로 폴더목록에 자신의 웹사이트 루트경로가 포함되지 않았기 때문입니다.

 

[차단 사유]
BLOCKED: Not in allowed path list 'C:\www\xe'

아래의 에러조치 참고하세요.

 

이런식으로 로그뷰어에서의 BLOCKED 된 내용을 확인하며, WebKnight 설정을 하나씩 진행해야 합니다.

이제 아래 내용 참고하셔서 하나씩 진행해보세요.

 

// 기본설정 : 기본적인 세팅입니다.

내용 : 한국 시간대를 사용하기위해
조치 : [Logging] Use GMT 언체크

 

내용 : IIS + PHP 기반이기 때문에 사용 체크
조치 : [Wep Applications] Allow ASP - 체크, Allow ASP NET - 체크, Allow PHP - 체크

 

내용 : 대부분의 웹서버에서 부모 경로는 사용하지 않기 때문에
조치 : [URL Scanning] Url Parent Path - Disabled 설정

 

내용 : 웹사이트에서 한글을 사용한다면... (url 또는 파일(이미지)에 한글이 포함되는 경우 차단됨)
조치 : [URL Scanning] Url High Bit Shellcode - Disabled
조치 : [URL Scanning] RFC Compliant Url - Disabled
조치 : [URL Scanning] RFC Compliant HTTP Url - Disable
조치 : [Referrer] Referrer URL RFC Compliant - Disabled
조치 : [Referrer] URL RFC HTTPCompliant - Disabled
조치 : [Host] RFC Compliant Host Header - Disabled

 

내용 : IIS 6.0 세팅
조치 : [Global Filter Capabilities] Is Installed As Global Filter - 언체크
조치 : [Logging] Per Process Logging - 체크 (단, IIS5 고립모드라면 언체크)

 

// 에러조치 : 기본 세팅 후 WebKnight 에서 차단되는 항목에 대해서 설정변경

현상 : 윈도우 웹브라우져에서 접속차단됨
에러 : BLOCKED: Not in allowed path list 'c:\www\xe'
조치 : [Mapped Path] Allowed Paths - c:\www\xe 추가 (www\xe 는 자신의 index.php 가 위치한 경로라고 보시면 됩니다.)

※ 위 경로(c:\www\xe) 는 보안을 위해 예로 설명드린 것입니다.

 

현상 : 안드로이드폰(G-PRO2)에서 접속차단됨
에러 : BLOCKED: '=http://' not allowed in cookie
조치 : [Cookie] Denied Cookie Sequences - =http:// 항목 삭제

 

에러 : BLOCKED: accessing/running '.dat' file
조치 : [Requested File] Denied Extensions - .dat 항목 삭제

 

에러 : BLOCKED: Content-Type 'text/xml' not allowed
조치 : [Content Type] Allowed Content Types - text/xml 항목 추가

 

에러 : BLOCKED: Content-Type 'application/json' not allowed
조치 : [Content Type] Allowed Content Types - application/json 항목 추가

 

현상 : 회원가입 시 마지막에 등록 버튼 클릭시 발생
에러 : BLOCKED: Content-Type 'multipart/form-data; boundary=---------------------------7e01032a20594' not allowed
조치 : [Content Type] Allowed Content Types - multipart/form-data 항목 추가

 

현상 : Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html) 구글봇 차단된듯
에러 : BLOCKED: Content-Type 'text/plain' not allowed
조치 : [Content Type] Allowed Content Types - text/plain 항목 추가

 

현상 : 새로고침을 여러번 할경우 블랙리스트에 등록
에러 : BLOCKED: Blacklisted IP address (multiple HTTP client errors)
조치 : [Response Monitor] HTTP Client Errors - Disabled

 

현상 : 파일명(이미지)에 /admin 이 포함되어 차단
에러 : BLOCKED: '/admin' not allowed in URL
조치 : [URL Scanning] Denied Url Sequences - /admin 항목 삭제 (/admin_/ , /_admin/ 도 있지만 삭제하지 않음)

 

현상 : 게시글 삭제 시 발생
에러 : BLOCKED: '.php' not allowed in querystring
조치 : [Querystring] Denied Querystring Sequences - .php 항목 제거

 

현상 : 게시글 삭제 시 발생
에러 : BLOCKED: Encoding exploit in querystring (embedded encoding)
조치 : [Querystring] Querystring Encoding Exploits - Disabled

 

현상 : XE 통합검색 시 발생 & 구글봇 발생
에러 : BLOCKED: 'style=' not allowed in querystring

에러 : BLOCKED: 'style=' not allowed in headers

조치 : [Querystring] Denied Querystring Sequences - style= 항목제거

조치 : [Header] Denied Header Sequences - style= 항목제거

 

현상 : 관리자 페이지 쉬운설치 업데이트 시 발생

에러 : BLOCKED: Encoding exploit in data (embedded encoding)

조치 : [Post] Postdata Encoding Exploits - Disabled

 

에러 : ALERT: '&' not allowed in URL (running multiple CGI processes in single request)
조치 : [Url Scanning] Url Running Multiple CGI - Disabled

 

현상 : 장문의 글작성 시 (짧은글 작성시에는 차단이 없었음) - 본 현상은 현재 문서 작성시에 발생함 -.-

에러 : BLOCKED: Possible SQL injection in data: ;`,--,min(
에러 : BLOCKED: 'style=' not allowed in data
에러 : BLOCKED: '=http://' not allowed in data

에러 : BLOCKED: 'style=http://' not allowed in data

에러 : BLOCKED: 'data:' not allowed in data
에러 : BLOCKED: 'XSS style' regex not allowed in data
에러 : BLOCKED: 'href http' regex not allowed in data
에러 : BLOCKED: 'href' regex not allowed in data

조치 : [SQL Injection] SQL Injection Keywords - ; , ` , -- , min(  4개 항목제거  

조치 : [Post] Denied Post Sequences - style= 항목제거

조치 : [Post] Denied Post Sequences - =http:// 항목제거

조치 : [Post] Denied Post Sequences - style=http:// 항목제거

조치 : [Post] Denied Post Sequences - data: 항목제거

조치 : [Post] Denied Post Regular Expressions - XSS Style <.+?(\b|\n|[\f\v"'`/])style(\b|\n|[\f\v])*= 항목제거
조치 : [Post] Denied Post Regular Expressions - href http <.+?(\b|\n|[\f\v"'`/])href(\b|\n|[\f\v])*=(\b|\n|[\f\v])*("|')*http 항목제거
조치 : [Post] Denied Post Regular Expressions - href      <.+?(\b|\n|[\f\v"'`/])href(\b|\n|[\f\v])*= 항목제거
조치 : [Querystring] Denied Querystring Regular Expressions - href      <.+?(\b|\n|[\f\v"'`/])href(\b|\n|[\f\v])*= 항목제거

 

현상 : 웹사이트 초기 접속시 발생

에러 : BLOCKED: '/scripts' not allowed in URL

조치 : [URL Scanning] Denied Url Sequences - /scripts 항목제거
 

현상 : 관리자 페이지에서 회원삭제 시 url에 member_srls[] 가 들어가는데 '[]' 이부분이 차단됨
에러 : BLOCKED: Parameter name not valid 'member_srls[]'
조치 : [Post] Postdata Parameter Name Require Regular Expression - Monitor

 

현상 : 특정 게시판에 글 작성시에 다음파일 참조 시 발생 (/common/js/plugins/jquery.fileupload/js/jquery.fileupload.js)
에러 : BLOCKED: accessing/running 'upload' file
조치 : [Requested File] Denied Files - upload 항목제거

 

[2016-04-28] 추가 사항

현상 : 간혹 검색하거나 새로고침 시 발생 (이유모름)
에러 : BLOCKED: Parameter pollution in querystring
조치 : [Querystring] Querystring Parameter Pollution - Monitor

 

현상 : 관리자 페이지에서 회원가입 정보 수정 후 저장 시 발생 (Post Message 가 너무 길어서 발생한듯 하다)
에러 : BLOCKED: Maximum variable length exceeded in data
조치 : [Post] Maximum Postdata Variable Length - Disabled

 

[2016-04-29] 추가 사항

현상 : 특정 이미지 파일에 .. 이 포함된 경우 루트경로로 오인

에러 : BLOCKED: Parent Path attempt ('..')

조치 : [Mapped Path] Parent Path - Disabled

 

현상 : 누리고 표준결제 시스템 결제 진행 중 취소/완료 시 발생

에러 : BLOCKED: 'charset=' not allowed in data

조치 : [Post] Denied Post Sequences - charset= 항목제거

 

현상 : 게시판 장문의 글 작성 시 발생

에러 : BLOCKED: 'XSS charset' regex not allowed in data

조치 : [Post] Denied Post Regular Expressions - XSS charset      <.+?(\b|\n|[\f\v"'`/])charset(\b|\n|[\f\v])*= 항목제거

 

현상 : XpressEngine 신규 설치 시 초기 화면로드가 안됨

에러 : BLOCKED: '/install/' not allowed in URL

조치 : [URL Scanning] Denied Url Sequences - /install/ 항목제거

 

현상 : XpressEngine 신규 설치 시 SQL 세팅 후 NEXT 클릭 시 발생

에러 : BLOCKED: Parameter pollution in data

조치 : [Post] Postdata Parameter Pollution - Disabled

 

현상 : phpMyAdmin 접속 시 백지화 현상 (실제 phpMyAdmin 폴더이름과 무관함)

에러 : BLOCKED: '/phpmyadmin' not allowed in URL

에러 : BLOCKED: Parameter pollution in querystring
에러 : BLOCKED: Parameter name not valid 'scripts[],scripts[],scripts[],scripts[],scripts[],scripts[],scripts[],scripts[],scripts[],scripts[],scripts[],scripts[],scripts[],scripts[],scripts[],scripts[],scripts[],scripts[],scripts[],scripts[]'

조치 : [URL Scanning] Denied Url Sequences - /phpmyadmin 항목 삭제

조치 : [Querystring] Querystring Parameter Pollution - Disabled

조치 : [Querystring] Querystring Parameter Name Require Regular Expression - Disabled

 

현상 : 누리고 표준결제 시스템 가상계좌 발급 최종 완료 시 발생

에러 : BLOCKED: '=https://' not allowed in data

조치 : [Post] Denied Post Sequences - =http:// 항목제거

 

[2016-04-30] 추가 사항

현상 : 윈도우10 누리고 표준결제 진행 시 발생
에러 : BLOCKED: Payload not allowed (Content-Type header not allowed for this method)
조치 : [Methods] Denied Payload - Disabled
조치 : [Methods] Allowed Verbs - Disabled

 

에러 : BLOCKED: 'onmessage' not allowed in querystring

에러 : BLOCKED: 'onmessage' not allowed in data
조치 : [Querystring] Denied Querystring Sequences - onmessage 항목제거

조치 : [Post] Denied Post Sequences - onmessage 항목제거

 

현상 : 스케치북5 게시판 모듈 스킨에 shadow 가 포함된 이미지 차단
에러 : BLOCKED: accessing/running 'shadow' file
조치 : [Requested File] Denied Extensions - shadow 항목제거

 

현상 : 관리자 쇼핑몰 결제관리 페이지 접근시 차단
에러 : BLOCKED: 'Visa' information disclosure
에러 : BLOCKED: 'Mastercard' information disclosure
조치 : [Response Monitor] Information Disclosure - Disabled

 

[2016-05-13] 추가 사항
현상 : XE 파일첨부 시 100% 후 증발현상 및 업로드 속도가 현저하게 느림

에러 : 에러 메시지 발생 없음

조치 : [Post] Denied Post Sequences - Monitor
조치 : [Post] Denied Post Regular Expressions - Disabled

 

[2016-05-17] 추가 사항

현상 : XE 로그아웃 시 발생

에러 : BLOCKED: 'onmessage' not allowed in headers

에러 : BLOCKED: 'onsearch' not allowed in headers

조치 : [Header] Denied Header Sequences - onmessage 항목제거

조치 : [Header] Denied Header Sequences - onsearch 항목제거

 

자신의 홈페이지 특성에 따라 위와같은 현상과 에러가 나올수도 있고 더많은 현상이 있을 수 있습니다.

참고하시길 바랍니다.

 

PS. WebKnight 를 처음 접해보기 때문에 내용이 부족할 수 있습니다.

추가로 부족한 부분이나 수정할 부분이 있다면 댓글 남겨주시면 적극 반영하도록 하겠습니다.

블로그 이미지

소프토어

,