[퍼온 글] 파일 열기 보안 경고 > 유틸리티

본문 바로가기
 

[퍼온 글] 파일 열기 보안 경고

페이지 정보

작성자 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 댓글 0건 조회 21,025회 작성일 11-08-13 15:31

본문


인터넷에서 다운로드 받은 파일을 실행하려 하면 종종 이렇게 보안 경고 창이 뜨게 됩니다. 특히 포터블 프로그램들은 대부분 이 경고창이 뜬다고 보시면 되겠습니다.

물론 아래 그림처럼 체크박스를 풀거나, 우클릭 - 속성 - 일반 탭에서 차단 해제 버튼을 눌러줘도 되겠지만, 다수의 파일에 대해서 일일이 수동으로 처리하는건 좀 아니다 싶습니다.


그렇다면 이 난국을 어떻게 해쳐가야 할까요?

일단 원인을 파악하기 위해 ADS에 대해 알아봅시다.

Alternate data streams (ADS)

Alternate data streams allow more than one data stream to be associated with a filename, using the filename format "filename:streamname" (e.g., "text.txt:extrastream"). Alternate streams are not listed in Windows Explorer, and their size is not included in the file's size. Only the main stream of a file is preserved when it is copied to a FAT-formatted USB drive, attached to an e-mail, or uploaded to a website. As a result, using alternate streams for critical data may cause problems. NTFS Streams were introduced in Windows NT 3.1, to enable Services for Macintosh (SFM) to store Macintosh resource forks. Although current versions of Windows Server no longer include SFM, third-party Apple Filing Protocol (AFP) products (such as Group Logic's ExtremeZ-IP) still use this feature of the file system.

Malware has used alternate data streams to hide its code;[15] some malware scanners and other special tools now check for data in alternate streams. Microsoft provides a tool called Streams[16] to allow users to view streams on a selected volume.

Very small ADS are also added within Internet Explorer (and now also other browsers) to mark files that have been downloaded from external sites: they may be unsafe to run locally and the local shell will require confirmation from the user before opening them.[17] When the user indicates that he no longer wants this confirmation dialog, this ADS is simply dropped from the MFT entry for downloaded files.

Some media players have also tried to use ADS to store custom metadata to media files, in order to organize the collections, without modifying the effective data content of the media files themselves (using embedded tags when they are supported by the media file formats such as MPEG and OGG containers); these metadata may be displayed in the Windows Explorer as extra information columns, with the help of a registered Windows Shell extension that can parse them, but most media players prefer to use their own separate database instead of ADS for storing these information (notably because ADS are visible to all users of these files, instead of being managed with distinct per-user security settings and having their values defined according to user preferences).

출처 : http://en.wikipedia.org/wiki/NTFS


꼬부랑 글씨라서 읽어보고 싶지 않으실 텐데, 빨간색으로 표시해둔 부분이 이 글의 핵심입니다. 한마디로 요약하자면 인터넷 익스플로러가(다른 웹 브라우저도 마찬가지) 파일을 다운로드 받을 때 아주 작은 크기의 ADS를 남긴다는 것입니다. 그리고 윈도우 로컬 쉘(explorer.exe)이 ADS를 체크하고 경고창을 띄우는 것이죠.

인터넷에서 다운로드 받는 파일은 각각에 대해 NTFS의 MFT 영역에 Zone.Identifier 라는 ADS가 생성됩니다. 그리고 여기에는 보통 ZoneId=3 이라는 값이 들어가게 되는데 여기서 3은 일반적인 인터넷 사이트를 말합니다.




별로 중요하지는 않지만 여기서 말하는 ZoneId란

1 - 로컬 인트라넷
2 - 신뢰할 수 있는 사이트
3 - 인터넷
4 - 제한된 사이트



그래서 해결책이 뭐냐구요? 보통은 이렇게 합니다. 인터넷에서 파일을 다운로드 받을 때 MFT 영역에 Zone.Identifier 라는 ADS를 생성하지 않도록 설정하는 것이죠. 윈도우 프로페셔널 이상 사용자라면 로컬 그룹 정책 편집기(gpedit.msc)로 들어가서

사용자 구성 - 관리 템플릿 - Windows 구성 요소 - 첨부 파일 관리자 - 첨부 파일에 영역 정보를 보존하지 않음 - 사용


같은 효과를 레지스트리로 처리하려면

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Attachments]
"SaveZoneInformation"=dword:00000001

같은 효과를 커맨드로 처리하려면 (관리자 권한으로 명령 프롬프트 실행)
※ 한 줄짜리 커맨드인데 가로 폭이 좁아서 두 줄로 표현되었습니다.

REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Attachments" /v SaveZoneInformation /t REG_DWORD /d 1 /f


위 내용을 적용하면 끝인가? 아닙니다. 위 내용을 적용한 다음 로컬 쉘(explorer.exe)을 재시작 해줘야 적용됩니다. 그러니까 그냥 재부팅 한번 해주시면 됩니다.

그런데 문제가 두 가지 더 있습니다.

첫째는, 위 내용이 인터넷 익스플로러에만 적용된다는 것이고

둘째는, 위 내용을 적용해도 앞으로 다운로드 받을 파일에만 Zone.Identifier가 생성되지 않지, 기존에 이미 Zone.Identifier 가 생성된 파일들에 대해선 수동으로 삭제를 해줘야 한다는 것입니다.

첫번째 문제는 제가 어쩔 수 없는 부분이고, 두번째 문제는 제거하는 툴이 있습니다.

http://technet.microsoft.com/en-us/sysinternals/bb897440

위 사이트에서 Streams를 다운로드 받아 명령 프롬프트를 관리자 권한으로 열고 작업하시면 됩니다.

예제) streams.exe -s -d c:\

모든 드라이브에 다 적용하고 싶은데 일일이 실행하기 귀찮으시다면... 배치파일 하나 만들어 드리겠습니다. 작업시작.cmd 파일에 우클릭 해서 관리자 권한으로 실행해주세요. 모든 드라이브에 대해 한꺼번에 처리해줍니다.


중간에 Error opening 메시지 많이 나오는건 무시하셔도 됩니다.

첨부파일

  • Streams.zip (44.4K) 35회 다운로드 | DATE : 2011-08-13 15:31:09

댓글목록

등록된 댓글이 없습니다.

Total 153건 2 페이지
유틸리티 목록
번호 제목 글쓴이 조회 날짜
135 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 29308 04-19
134 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 26663 04-17
133 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 22396 04-03
132 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 20609 02-21
131 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 22460 12-20
130 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 12231 12-01
129 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 12877 12-01
128 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 12642 11-30
127 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 11940 11-29
126 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 14024 10-28
125 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 20367 10-27
124 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 22023 10-26
123 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 21290 10-18
122 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 11780 10-03
121 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 11813 09-27
열람중 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 21026 08-13
119 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 21285 08-08
118 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 11947 08-04
게시물 검색