폴더 감추기 유틸

from Develop/Driver 2012. 4. 10. 15:50

뮤레카 시절 개발한 파일드라이버를 이용 폴더 접근 방지 유틸


현재 폴더 감추는 유틸들은 대부분 쉐어웨어 방식으로 배포, 프리웨어가 드문 현실


간단한 작업으로 가능.

,

RtlVolumeDeviceToDosName() - 마운트된 디스크의 드라이브 문자 구하기

|
StorageStackDevice를 이용하여 드라이브 문자 구하기

참고로 첫번째 인자로 전달되는 VolumeDeviceObject는 마운트된 볼륨과 관련된 Filesystem DeviceObject를 대상으로 IoGetDiskDeviceObject()를 호출하여 구할 수 있다.

RtlVolumeDeviceToDosName

The RtlVolumeDeviceToDosName routine is obsolete for Windows XP and later. Use IoVolumeDeviceToDosName instead.

RtlVolumeDeviceToDosName returns the MS-DOS path for a specified device object that represents a file system volume.

NTSTATUS
  RtlVolumeDeviceToDosName(
    IN  PVOID  VolumeDeviceObject,
    OUT PUNICODE_STRING  DosName
    );

Parameters

VolumeDeviceObject
Pointer to a device object that represents a volume device object created by a storage class driver.
DosName
Pointer to a Unicode string containing the MS-DOS path of the volume device object specified by VolumeDeviceObject.

Return Value

RtlVolumeDeviceToDosName returns STATUS_SUCCESS or an appropriate error status.

Comments

The behavior of this routine is identical to that of IoVolumeDeviceToDosName. For more information about how to use this routine, see IoVolumeDeviceToDosName.

Drivers that must work on older NT-based operating systems may use this routine. Drivers written for Windows XP and later must use IoVolumeDeviceToDosName instead.

Requirements

Versions: Obsolete for Microsoft Windows XP and later. Use IoVolumeDeviceToDosName instead.

Headers: Declared in ntddk.h. Include ntddk.h.


,

Windows Vista Kernel Remote Debugging 팁들(Tips)

리버스 엔지니어링 2007/10/29 17:15

사용자 삽입 이미지
Vmware에서 윈도우즈를 리모트 디버깅하기 위한 방법은 Lord Of Ring0: Driver Debugging with WinDbg and VMWare에서 소개 되었다. 필자도 해당 방법을 통해서 드라이버 개발과 디버깅 시에 많은 수고를 덜어 왔다.

하지만달전 Vista에서 드라이버 개발을 처음 시작할 때에 가장 황당했던 것이 리모트 디버깅의 세팅이었다. 간단하게 boot.ini에서 다음 스트링을 추가해 주면 되었던 것이 복잡한 명령어들을 사용하도록 바뀐 것이다.


/debugport=com1 /baudrate=115200




간단한 구글링을 통해서 Debugging Windows Vista라는 문서를 찾았고, 사실 문서 내용이 장황하지만, 간단하게 다음 예제처럼 따라 하면 금방 원하는 디버깅이 활성화된 부트 엔트리를 생성할 수 있다.

C:\Windows\system32>bcdedit /copy {current} /d DebugEntry

The entry was successfully copied to {919494ed-866b-11dc-bcb1-000c294d72db}.



C:\Windows\system32>bcdedit /debug {919494ed-866b-11dc-bcb1-000c294d72db} ON

The operation completed successfully.



C:\Windows\system32>bcdedit /default {919494ed-866b-11dc-bcb1-000c294d72db}

The operation completed successfully.



론 중간의 {} 사이의 랜덤 문자열은 때에 따라서 변하므로 주의해야 한다.



또 한가지 windbg의 명령행에서 Lord Of Ring0: Driver Debugging with WinDbg and VMWare의 예제는 resets=0를 지정하여 사용하지만, Vista의 경우에는 어떠한 이유에서인지 해당 값을 1로 세팅해서 사용해야만 했다.

"C:\Program Files\Debugging Tools for Windows\windbg" -b -k com:pipe,port=\\.\pipe\com_1,resets=1



Vista에서 커널을 후빌 수 있는 만반의 준비가 된것이다.



,