한글도메인 또는 한글파일명을 가지고 있는 경우 


BLOCKED: URL is not RFC compliant!


위와같은 블락이 됩니다. 하여 아래와 같이 패치하면 간단히 해결 됩니다.


우리나라는 한글 사용으로 인해 RFC 규약에 맞지 않습니다.


한글 사용시에는 WebKnight 설정에서 다음의 사항들을 체크해보시기 바랍니다.

URL Scanning → Deny Url HighBitShellcode 옵션 해제
→ RFC Compliant Url 옵션 해제
→ RFC Compliant HTTP Url 옵션 해제
Referer → Referer URL RFC Compliant 옵션 해제
→ Referer URL RFC HTTP Compliant 옵션 해제
→ Deny Referer High Bit Shellcode 옵션 해제
Querystring → Deny Querystring High Bit Shellcode 옵션 해제

.net 확장자 변경 .NET 2012/03/29 14:13


visual studio 개발툴 설정 --------------------------


이 기능은 이미 Visual Studio 2005 부터 제공이 되고 있었습니다. ( 2003 버전은 확인해 보지 못해서, 설치되신 분 알려주세요.. )
 
아래와 같이, Visual Studio 의 도구->옵션->텍스트 편집기->파일 확장명 에서 추가할 수 있습니다.


위와 같이 원하는 확장명을 입력하고, 다시 .umcx 페이지를 열게 되면, 아래와 같이 일반적인 웹페이지를 작성하는 것과 같이 이쁜 컬러와 자동완성 기능을 사용할 수 있습니다.



다음은 web.config 의 httpHandlers 섹션에 다음과 같이 작성합니다.
<httpHandlers>
         <add path="*.umcxverb="*type="System.Web.UI.PageHandlerFactoryvalidate="true"/>

여기에서 위의 Type 에 등록된 클래스를 조금 짚고 넘어 가겠습니다.
PageHandlerFactory 는 IHttpHandlerFactory 를 구현한 클래스 입니다.
이 인터페이스는 IHttpHandler 를 리턴하는 GetHandler 메서드를 구현하기만 하면 됩니다.
public IHttpHandler GetHandler(HttpContext context,
        string requestType, String url, String pathTranslated)
 
이 인터페이스를 구현한 클래스를 web.config 의 httpHandlers 에 등록하게 되면 좀더 유연하게 가령, 요청이 get , post 방식에 따라 서로 다른 HttpHandler 를 반환 할 수 있습니다.
IIS 에서 확장자 매핑하면서 get,post 등 요청 방식을 지정할 수 있게 되어있습니다.
하지만 위 인터페이스를 활용하여 요청방식에 따른 각기 기능을 하나의 클래스에 넣을 수 도 있구요, 페이지 요청 방식에 따라 서로 상이한 페이지를 보여 줄 수 도 있습니다.
다음 기회 언젠가 좀 더 자세히 파 보도록 하겠습니다.
 
다시 원점으로 돌아와서,
하지만 이것만으로 끝이 아니랍니다.
우라가 작성한 페이지를 컴파일하고 컴파일 하는 동안 코드를 생성하는데 사용되는 빌드 공급자를 정의해 주어야 합니다.
 
이것또한 최상위 web.config 에 다음과 같이 정의되어 있지요
<buildProviders>
        <add extension=".aspxtype="System.Web.Compilation.PageBuildProvider" />
        <add extension=".ascxtype="System.Web.Compilation.UserControlBuildProvider" />
        <add extension=".mastertype="System.Web.Compilation.MasterPageBuildProvider" />
        <add extension=".asmxtype="System.Web.Compilation.WebServiceBuildProvider" />
        <add extension=".ashxtype="System.Web.Compilation.WebHandlerBuildProvider" />
        <add extension=".soaptype="System.Web.Compilation.WebServiceBuildProvider" />
        <add extension=".resxtype="System.Web.Compilation.ResXBuildProvider" />
        <add extension=".resourcestype="System.Web.Compilation.ResourcesBuildProvider" />
        <add extension=".wsdltype="System.Web.Compilation.WsdlBuildProvider" />
        <add extension=".xsdtype="System.Web.Compilation.XsdBuildProvider" />
        <add extension=".jstype="System.Web.Compilation.ForceCopyBuildProvider" />
        <add extension=".lictype="System.Web.Compilation.IgnoreFileBuildProvider" />
        <add extension=".licxtype="System.Web.Compilation.IgnoreFileBuildProvider" />
        <add extension=".excludetype="System.Web.Compilation.IgnoreFileBuildProvider" />
        <add extension=".refreshtype="System.Web.Compilation.IgnoreFileBuildProvider" />
</buildProviders>
자주 보던 확장자들이 많이 있지요?
 
<compilation>
</compilation>
Web.config 의 위 섹션이 응용 프로그램의 컴파일을 담당하는 섹션입니다.
우리가 웹사이트를 작성하고 이후 수정된 사항을 복사만 하더라도 컴파일 되어 자동으로 적용되어 지는 미리 컴파일 기능 또한 위 섹션에서 담당하게 되지요~
 
이제 감이 오셨나요?
그럼 우리가 만든 페이지가 컴파일 되도록 하기 위해선 다음과 같이 섹션을 추가해 줍니다
<compilation debug="false">
         <buildProviders>
                  <add extension=".umcxtype="System.Web.Compilation.PageBuildProvider" />
         </buildProviders>
</compilation>
 


'.NET' 카테고리의 다른 글

.net 확장자 변경  (0) 2012/03/29
RegisterClientScriptBlock 과 RegisterStartupScript 의 고찰  (0) 2012/03/28
.net 확장자 변경시 iis 설정  (0) 2012/03/14
c# md5 클래스  (0) 2011/10/21
xml gzip 인코딩 파싱  (1) 2011/06/17
LINQ msdn  (0) 2010/12/10

웹방화벽을 설치하자. 
소프트웨어 적으로 소스적으로  SQL injection 같은 필터링은 완전하지 않다.
물리적인 차단 방법이 최고 ㅎㅎ

공개 프로그램이지만, 윈도우 서버용으로 나온 Webnight 에 관해서 여러 고수님들의 사이트를 참고하여 정리해 본다.
WebKnight.xml  : 각종 환경설정 (일반적인 차단/허용 설정)
Robots.xml        : AQTRONIX 회사에서 직접 차단되는 각종 코드내역 목록들
Log Analysis      : 접근하는 모든 Log 파일들 -> 모니터링 및 Block 부분된 곳 찾을수 있다.

-- 설치부분

1. 웹나이트를 설치한다.
2. 압축파일에 동봉된 xml룰을 C:\Program Files\AQTRONIX Webknight 위치에 복사해서 WebKnight.xml 로 만든다.
3. WebKnight Configuration -> Global Filter Capabilities -> Is Installed As Global Filter 해제 

-- 운영부분

1. WebKnight Configuration -> Incident Response Handling -> Response Log Only [탐지모드]

    - 이 부분은 블럭킹이 됐을때 실제로 블럭킹을 할것인지 로그만 남기고 넘겨줄 것인지 결정하는 부분

    - 차단 모드로 변경할려면 Response Directly 나 Respnose Rediret 옵션을 활성화 한다. (Response Log Only 반드시 체크해제)

    - 차단 모드는 Response Redirect 옵션을 활성화 하여 특정 에러페이지를 표시하는 방법 추천

 
2. WebKnight Configuration -> Headers -> Max Headers

   - 여기서 각종헤더부분에 용량을 결정한다.


 
3. WebKnight Configuration -> URL Scanning -> URL Denied Sequences

   - 여기서 사용하지 않을 경로를 입력해 준다.

   - 예) /admin/ 이런 경로가 들어가 있으면 URL 에서 해당 경로를 사용할수가 없게된다.

 
4. WebKnight Configuration -> Mapped Path -> Allowed Paths

   - 여기서는 사용할 파일경로를 입력해 준다.

   - 웹나이트는 이 옵션을 통해 허용되지 않은 경로에 대한 접근을 모두 차단한다.

 


5. WebKnight Configuration -> Requested File -> Use Denied Files

    - BLOCKED: accessing/running 'test' file

    - 파일이름에 해당 단어가 매칭되면 차단한다.

 
6. WebKnight Configuration -> Requested File -> Denied Extentions

    - 파일 확장자 차단.

  

BLOCKED: URL is not RFC compliant!

-> 경로에 한글이 있으면 블록됨

-> URL RFC Compliant 해제

 

BLOCKED: 'collect' not allowed in User Agent

-> Allblog.net RssSync4 Image Collector 가 이미지를 수집하려 오다 블록됨

-> robots.xml 에서 collect를 삭제

 

BLOCKED: Referrer URL is not RFC compliant!

-> Embedded Web Browser 에서 검색 실패

-> 파라미터 중 한글 차단

예) http://search-srv.webcompass.co.kr/sense/slimband_under.php?affiliate_id=mncast&type=refer&current_engine=naver&reco_param=bms;이지%20투%20디제이@오투매니아다운@biorad@오투매니아다운로드@리듬잇~~

-> Referrer > Referrer URL RFC Compliant > 체크해제

 

 

BLOCKED: Referrer URL is not RFC compliant!

-> daum  신지식 검색 링크에서 url에 공백이 포함되어서 들어옴

-> Referrer > Referrer URL RFC Compliant 해제

  

BLOCKED: Header 'Referer:' too long

-> Embbed 기기로 접속했을 때, Referrer 가 길어져 차단됨

-> Request Limits > Max Headers > Referer 의 크기를 늘려줌

 

BLOCKED: Empty User Agent not allowed

->아이피 조회해보니 구글에 있는 아이피던데.. 어디에 쓰이는 지 몰라.. 처리할 지 고민 중…

  

BLOCKED: User Agent not RFC compliant

-> http://search.empas.com 에서 들어오는것에서 차단됨

-> User Agent에서 Deny User Agent Non RFC 선택해제

  

BLOCKED: 'user-agent: mozilla' not allowed in User Agent

-> Robots.xml 을 열어 Other Bad로 이동해 보면 와 User_Agents_Other_Bad_Sequence 두개 항목이 있는데 이 두곳에서 해당

-> User_Agents_Other_Bad, User_Agents_Other_Bad_Sequence에서 Mozilla 관련된 부분 삭제


BLOCKED: accessing/running 'test.' file

--> Requested File 에서 Denied Fileds 안의 test. 부분 삭제

1 2 3 4 5 ... 16