2008년 04월 18일
숨겨진 프로세스를 찾아내자 - Blacklight made by F-Secure
F-Secure 사에서 제작한 루트킷 탐지툴 중 Blacklight라는 툴이 있다. 이 툴은 정확히 말하면 hidden process나 file등을 찾아내는데 주목적을 두고 제작된 툴이라고 할 수 있다. 즉, 누가 무엇을 어떻게 후킹했냐 하는 것에 초점을 맞추기 보다는 누가 무엇을 숨겼냐에 초점을 맞췄다고 생각하면 될 것이다.
아래 글은 openrce.org 포럼에 올라와 있는 article 중 FUTo 라는 글 중 일부를 발췌한 것이다.
Complete picture of how Blacklight detects hidden processes:
즉, 프로세스가 가질 수 있는 ID 가능 범위(0 ~ 0x41DC)까지 모두 순차적으로 진행하면서 OpenProcess 함수를 호출하여 유효성 여부를 검사한다. 그 후 CreateToolhelp32Snapshot 함수를 이용하여 현재 동작 중으로 나타나는 프로세스 리스트를 얻는다. 그리고 비교한다. 만약 스냅샷 함수를 통해 구한 리스트에는 없는데 OpenProcess로 얻은 리스트에는 존재한다면 숨겨져(hidden) 있다고 판단할 수 있다.
물론, 이것을 우회하기 위한 기법이 적용된 루트킷 중 대표적인 것이 FUTo이다.
이글루스 가든 - professional secur...
아래 글은 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 | 2008/04/18 17:50 | 보안 | 트랙백 | 핑백(1) | 덧글(3)






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