Egloos | Log-in


숨겨진 프로세스를 찾아내자 - Blacklight made by F-Secure

F-Secure 사에서 제작한 루트킷 탐지툴 중 Blacklight라는 툴이 있다. 이 툴은 정확히 말하면 hidden process나 file등을 찾아내는데 주목적을 두고 제작된 툴이라고 할 수 있다. 즉, 누가 무엇을 어떻게 후킹했냐 하는 것에 초점을 맞추기 보다는 누가 무엇을 숨겼냐에 초점을 맞췄다고 생각하면 될 것이다.

아래 글은 openrce.org 포럼에 올라와 있는 article 중 FUTo 라는 글 중 일부를 발췌한 것이다.

Complete picture of how Blacklight detects hidden processes:

1. Blacklight start looping through the range of valid process IDs, 0 through 0x41DC.
2. Blacklight calls OpenProcess on every process PID.
3. OpenProcess calls NtOpenProcess.
4. NtOpenProcess calls PsLookupProcessByProcessId to verify the process exists.
5. PsLookupProcessByProcessId uses the PspCidTable to verify the processes exists.
6. NtOpenProcess calls ObOpenObjectByPointer to get the handle to the process.
7. If OpenProcess was successful, Blacklight stores the information about the process and continues to loop.
8. Once the process list has been created by exhausting all possible PIDs. Blacklight compares the PIDB list with the list it creates by calling CreateToolhelp32Snapshot. CrateToolhelp32Snapshot is a Win32 API that takes a snapshot of all running processes on the system. A discrepancy between the two lists implies that there is a hidden process. This case is reported by Blacklight.


즉, 프로세스가 가질 수 있는 ID 가능 범위(0 ~ 0x41DC)까지 모두 순차적으로 진행하면서 OpenProcess 함수를 호출하여 유효성 여부를 검사한다. 그 후 CreateToolhelp32Snapshot 함수를 이용하여 현재 동작 중으로 나타나는 프로세스 리스트를 얻는다. 그리고 비교한다. 만약 스냅샷 함수를 통해 구한 리스트에는 없는데 OpenProcess로 얻은 리스트에는 존재한다면 숨겨져(hidden) 있다고 판단할 수 있다.

물론, 이것을 우회하기 위한 기법이 적용된 루트킷 중 대표적인 것이 FUTo이다.







이글루스 가든 - professional secur...

by fullc0de | 2008/04/18 17:50 | 보안 | 트랙백 | 핑백(1) | 덧글(3)

Linked at 빌게이츠가 부를때까지 -_- .. at 2008/05/13 20:37

... ame_url=/ArticleRead.nhn%3Farticleid=23856숨겨진 프로세스를 찾아내자 - Blacklight made by F-Securehttp://fullc0de.egloos.com/3708461PspCidTable 을 이용한 프로세스 목록 구하기 예제http://somma.egloos.com/3678104[UnExported Symbol] ... more

Commented by kkamagui at 2008/04/19 18:56
ID 전범위를 다 Open해서 비교하다니... 글 보고 깜짝 놀랐습니다. 생각도 못한 방법이군요. ^^ 하지만 OpenProcess 또한 후킹해 놓으면 비교가 안되겠군요. ;)
좋은 글 잘보고 갑니다. ^^
Commented by fullc0de at 2008/04/20 01:03
kkamagui // 그래서 FUTo 라는 루트킷이 이와같은 방법을 우회하는 기법을 사용합니다. 위에 제가 링크해둔 openRCE 글의 후반부를 읽어보시면 이해가 되실듯 ^^
Commented by 붉은울림 at 2008/04/23 13:41
링크는 제가 데려가겠습니다..
※ 이 포스트는 더 이상 덧글을 남길 수 없습니다.

◀ 이전 페이지          다음 페이지 ▶