ex) info

  • dll 프로젝트 명
    • projugapi
  • 모든 프로젝트 Output File 경로
    • $(SolutionDir)OutputFile\$(Configuration)\$(Platform)\

1.개발 환경에서 라이브러리 설정

  • 포함 경로에 DLL 헤더를 추가하려면 (dll 헤더 추가)
    • C/C++>일반>추가 포함 디렉터리: $(SolutionDir)\dll\projugapi
    • 추가 설명: dll 프로젝트 솔루션 명을 지정합니다.
  • 프로젝트에 DLL 가져오기 라이브러리를 추가하려면
    • 구성 속성>링커>입력: projugapi.lib
    • 추가 설명: .lib 이름을 지정합니다.
  • 추가 라이브러리 디렉터리 설정
    • 구성 속성>링커>일반>추가 라이브러리 디렉터리: $(SolutionDir)\dll\projugapi\$(IntDir)
    • 만약 Output File 경로를 별도로 지정한 경우: $(SolutionDir)OutputFile\$(Configuration)\$(Platform)\

2.유저 환경에서 라이브러리 설정

  • 포함 경로에 DLL 헤더를 추가하려면 (dll 헤더 추가)
    • C/C++>일반>추가 포함 디렉터리: $(SolutionDir)include
    • 추가 설명: 업체가 제공하는 include 폴더 명을 지정합니다.
  • 프로젝트에 DLL 가져오기 라이브러리를 추가하려면
    • 구성 속성>링커>입력: projugapi.lib
    • 추가 설명: .lib 이름을 지정합니다.
  • 추가 라이브러리 디렉터리 설정
    • 구성 속성>링커>일반>추가 라이브러리 디렉터리: $(SolutionDir)lib
    • 추가 설명: 업체가 제공하는 lib 폴더 명을 지정합니다.

3.앱 실행시 오류 메시지가 표시 되는 경우 

  • dll 파일을 실행파일과 동일한 위치에 복사

4.바이너리 샘플 프로그램 배포하는 경우

  • dll, lib, exe 한 곳에 모아서 배포

5.참고 링크

https://learn.microsoft.com/ko-kr/cpp/build/walkthrough-creating-and-using-a-dynamic-link-library-cpp?view=msvc-170

 

연습: 고유한 동적 링크 라이브러리 만들기 및 사용(C++)

C++를 사용하여 Visual Studio에서 Windows DLL(동적 연결 라이브러리)을 만듭니다.

learn.microsoft.com

 

https://reqrypt.org/windivert.html

 

WinDivert: Windows Packet Divert

WinDivert: Windows Packet Divert Windows Packet Divert (WinDivert) is a user-mode packet capture-and-divert package for Windows 10, Windows 11, and Windows Server. WinDivert allows user-mode applications to capture/modify/drop network packets sent to/from

reqrypt.org

 

 

6.빌드 순서 변경

  • 프로젝트에 DLL과 앱 프로젝트가 동일한 위치에 존재한다면 dll부터 빌드를 수행해야 합니다.
  • 아래의 그림을 참고 바랍니다.

 

7.앱 C++ 외부 라이브러리 사용법 (개발 환경 + 유저 환경 라이브러리 동시 설정)

  • 포함 경로에 DLL 헤더를 추가하려면 (dll 헤더 추가)
    • $(SolutionDir)\dll\pgfdapi
    • $(SolutionDir)include 
  • 프로젝트에 DLL 가져오기 라이브러리를 추가하려면
    • pgfdapi.lib
  • 추가 라이브러리 디렉터리 설정
    • $(SolutionDir)OutputFile\$(Configuration)\$(Platform)\
    • $(SolutionDir)lib

* 가장 가독성 좋음.

'Windows App' 카테고리의 다른 글

C언어 구조체 크기 구하기 2  (0) 2024.05.23
C언어 구조체 크기 구하기 1  (0) 2024.05.23
C++ 프로젝트 원격 디버그  (0) 2022.08.09
C언어 추천 도서  (0) 2022.07.15
app SHA256 EV서명 방법  (0) 2022.06.23

 

 

 

간단 합니다.

 

https://learn.microsoft.com/ko-kr/windows-hardware/drivers/debugger/setting-up-a-network-debugging-connection-automatically

 

KDNET 네트워크 커널 디버깅 자동 설정 - Windows drivers

KDNET을 사용하여 Windows 디버깅 도구에 대한 네트워크 커널 디버깅을 자동으로 구성하는 방법을 알아봅니다.

learn.microsoft.com

 

 

타겟 PC에서 kdnet 실행

 

 

bcdedit 로 설정 확인

 

windbg 에 설정 된 값 넣고 커널 디버깅 

 

RtlStringCbPrintfW 시간될 때 정리바람. 

암튼 난 이거 안쓴다.

Visual Studio 확인

샘플.zip
0.00MB

 

Windbg 확인

 

IDA pro 확인

 

32비트 스택은 4바이트 단위로 스택 포인터 증가/감소 한다.

 

64비트 스택은 8바이트 단위로 스택 포인터 증가/감소 한다.

 

https://www.vergiliusproject.com/

Microsoft Windows 커널 구조, 공용체 및 열거형 모음을 제공합니다.

 

Vergilius Project

Take a look into the depths of Windows kernels and reveal more than 60000 undocumented structures.

www.vergiliusproject.com

 

_EPROCESS

 


구조
procexp64.exe-메모장-Taskmgr.exe


!process 0 0 notepad.exe

2: kd> dt_EPROCESS ffffe28970fb7080
ntdll!_EPROCESS
   +0x5a8 ImageFileName    : [15]  "notepad.exe"
 +0x440 UniqueProcessId  : 0x00000000`00000eec Void
  +0x448 ActiveProcessLinks : _LIST_ENTRY [ 0xffffe289`731864c8 - 0xffffe289`72d18788 ]
 +0x570 ObjectTable      : 0xffffbe81`663ef540 _HANDLE_TABLE

2: kd> dx -id 0,0,ffffe289648a0040 -r1 (*((ntdll!_LIST_ENTRY *)0xffffe28970fb74c8))
(*((ntdll!_LIST_ENTRY *)0xffffe28970fb74c8))                 [Type: _LIST_ENTRY]
    [+0x000] Flink            : 0xffffe289731864c8 [Type: _LIST_ENTRY *]
    [+0x008] Blink            : 0xffffe28972d18788 [Type: _LIST_ENTRY *]

2: kd> dx -id 0,0,ffffe289648a0040 -r1 ((ntdll!_HANDLE_TABLE *)0xffffbe81663ef540)
((ntdll!_HANDLE_TABLE *)0xffffbe81663ef540)                 : 0xffffbe81663ef540 [Type: _HANDLE_TABLE *]
    [+0x000] NextHandleNeedingPool : 0x800 [Type: unsigned long]
    [+0x004] ExtraInfoPages   : 0 [Type: long]
    [+0x008] TableCode        : 0xffffbe816bafd001 [Type: unsigned __int64]
    [+0x010] QuotaProcess     : 0xffffe28970fb7080 [Type: _EPROCESS *]
    [+0x018] HandleTableList  [Type: _LIST_ENTRY]
    [+0x028] UniqueProcessId  : 0xeec [Type: unsigned long]
    [+0x02c] Flags            : 0x0 [Type: unsigned long]
    [+0x02c ( 0: 0)] StrictFIFO       : 0x0 [Type: unsigned char]
    [+0x02c ( 1: 1)] EnableHandleExceptions : 0x0 [Type: unsigned char]
    [+0x02c ( 2: 2)] Rundown          : 0x0 [Type: unsigned char]
    [+0x02c ( 3: 3)] Duplicated       : 0x0 [Type: unsigned char]
    [+0x02c ( 4: 4)] RaiseUMExceptionOnInvalidHandleClose : 0x0 [Type: unsigned char]
    [+0x030] HandleContentionEvent [Type: _EX_PUSH_LOCK]
    [+0x038] HandleTableLock  [Type: _EX_PUSH_LOCK]
    [+0x040] FreeLists        [Type: _HANDLE_TABLE_FREE_LIST [1]]
    [+0x040] ActualEntry      [Type: unsigned char [32]]
    [+0x060] DebugInfo        : 0x0 [Type: _HANDLE_TRACE_DEBUG_INFO *]
2: kd> dx -id 0,0,ffffe289648a0040 -r1 (*((ntdll!_LIST_ENTRY *)0xffffbe81663ef558))
(*((ntdll!_LIST_ENTRY *)0xffffbe81663ef558))                 [Type: _LIST_ENTRY]
    [+0x000] Flink            : 0xffffbe816a103cd8 [Type: _LIST_ENTRY *]
    [+0x008] Blink            : 0xffffbe816a109798 [Type: _LIST_ENTRY *]

ActiveProcessList 손상이 발생해도 ObjectTable - HandleTableList 를 참조할 수 있으면 프로세스 리스트를 구성할 수 있다.

//  +0x448 ActiveProcessLinks
2: kd> dt_EPROCESS ffffe289731864c8-448
ntdll!_EPROCESS
   +0x000 Pcb              : _KPROCESS
   +0x440 UniqueProcessId  : 0x00000000`00002360 Void
   +0x448 ActiveProcessLinks : _LIST_ENTRY [ 0xffffe289`70edf4c8 - 0xffffe289`70fb74c8 ]
   +0x5a8 ImageFileName    : [15]  "procexp64.exe"
   +0x570 ObjectTable      : 0xffffbe81`6a103cc0 _HANDLE_TABLE

2: kd> dx -id 0,0,ffffe289648a0040 -r1 ((ntdll!_HANDLE_TABLE *)0xffffbe816a103cc0)
((ntdll!_HANDLE_TABLE *)0xffffbe816a103cc0)                 : 0xffffbe816a103cc0 [Type: _HANDLE_TABLE *]
    [+0x000] NextHandleNeedingPool : 0x1000 [Type: unsigned long]
    [+0x004] ExtraInfoPages   : 0 [Type: long]
    [+0x008] TableCode        : 0xffffbe81674c3001 [Type: unsigned __int64]
    [+0x010] QuotaProcess     : 0xffffe28973186080 [Type: _EPROCESS *]
    [+0x018] HandleTableList  [Type: _LIST_ENTRY]
    [+0x028] UniqueProcessId  : 0x2360 [Type: unsigned long]
    [+0x02c] Flags            : 0x0 [Type: unsigned long]
    [+0x02c ( 0: 0)] StrictFIFO       : 0x0 [Type: unsigned char]
    [+0x02c ( 1: 1)] EnableHandleExceptions : 0x0 [Type: unsigned char]
    [+0x02c ( 2: 2)] Rundown          : 0x0 [Type: unsigned char]
    [+0x02c ( 3: 3)] Duplicated       : 0x0 [Type: unsigned char]
    [+0x02c ( 4: 4)] RaiseUMExceptionOnInvalidHandleClose : 0x0 [Type: unsigned char]
    [+0x030] HandleContentionEvent [Type: _EX_PUSH_LOCK]
    [+0x038] HandleTableLock  [Type: _EX_PUSH_LOCK]
    [+0x040] FreeLists        [Type: _HANDLE_TABLE_FREE_LIST [1]]
    [+0x040] ActualEntry      [Type: unsigned char [32]]
    [+0x060] DebugInfo        : 0x0 [Type: _HANDLE_TRACE_DEBUG_INFO *]
2: kd> dx -id 0,0,ffffe289648a0040 -r1 (*((ntdll!_LIST_ENTRY *)0xffffbe816a103cd8))
(*((ntdll!_LIST_ENTRY *)0xffffbe816a103cd8))                 [Type: _LIST_ENTRY]
    [+0x000] Flink            : 0xffffbe816a10abd8 [Type: _LIST_ENTRY *]
    [+0x008] Blink            : 0xffffbe81663ef558 [Type: _LIST_ENTRY *]


//  +0x448 ActiveProcessLinks
2: kd> dt_EPROCESS ffffe28972d18788-448
ntdll!_EPROCESS
   +0x000 Pcb              : _KPROCESS
   +0x440 UniqueProcessId  : 0x00000000`00000b44 Void
   +0x448 ActiveProcessLinks : _LIST_ENTRY [ 0xffffe289`70fb74c8 - 0xffffe289`6fb934c8 ]
   +0x5a8 ImageFileName    : [15]  "Taskmgr.exe"
   +0x570 ObjectTable      : 0xffffbe81`6a109780 _HANDLE_TABLE

2: kd> dx -id 0,0,ffffe289648a0040 -r1 ((ntdll!_HANDLE_TABLE *)0xffffbe816a109780)
((ntdll!_HANDLE_TABLE *)0xffffbe816a109780)                 : 0xffffbe816a109780 [Type: _HANDLE_TABLE *]
    [+0x000] NextHandleNeedingPool : 0xc00 [Type: unsigned long]
    [+0x004] ExtraInfoPages   : 0 [Type: long]
    [+0x008] TableCode        : 0xffffbe816d5fc001 [Type: unsigned __int64]
    [+0x010] QuotaProcess     : 0xffffe28972d18340 [Type: _EPROCESS *]
    [+0x018] HandleTableList  [Type: _LIST_ENTRY]
    [+0x028] UniqueProcessId  : 0xb44 [Type: unsigned long]
    [+0x02c] Flags            : 0x0 [Type: unsigned long]
    [+0x02c ( 0: 0)] StrictFIFO       : 0x0 [Type: unsigned char]
    [+0x02c ( 1: 1)] EnableHandleExceptions : 0x0 [Type: unsigned char]
    [+0x02c ( 2: 2)] Rundown          : 0x0 [Type: unsigned char]
    [+0x02c ( 3: 3)] Duplicated       : 0x0 [Type: unsigned char]
    [+0x02c ( 4: 4)] RaiseUMExceptionOnInvalidHandleClose : 0x0 [Type: unsigned char]
    [+0x030] HandleContentionEvent [Type: _EX_PUSH_LOCK]
    [+0x038] HandleTableLock  [Type: _EX_PUSH_LOCK]
    [+0x040] FreeLists        [Type: _HANDLE_TABLE_FREE_LIST [1]]
    [+0x040] ActualEntry      [Type: unsigned char [32]]
    [+0x060] DebugInfo        : 0x0 [Type: _HANDLE_TRACE_DEBUG_INFO *]
2: kd> dx -id 0,0,ffffe289648a0040 -r1 (*((ntdll!_LIST_ENTRY *)0xffffbe816a109798))
(*((ntdll!_LIST_ENTRY *)0xffffbe816a109798))                 [Type: _LIST_ENTRY]
    [+0x000] Flink            : 0xffffbe81663ef558 [Type: _LIST_ENTRY *]
    [+0x008] Blink            : 0xffffbe816a1031d8 [Type: _LIST_ENTRY *]

notepad.exe peb 정보 확인

2: kd> !process 0 0 notepad.exe
PROCESS ffffe28971ca7080
    SessionId: 1  Cid: 12d4    Peb: 5d63e29000  ParentCid: 1ab4
    DirBase: 66e1b002  ObjectTable: ffffbe816a102540  HandleCount: 259.
    Image: notepad.exe

2: kd> dt nt!_EPROCESS ffffe28971ca7080
   +0x000 Pcb              : _KPROCESS
   +0x438 ProcessLock      : _EX_PUSH_LOCK
   +0x440 UniqueProcessId  : 0x00000000`000012d4 Void
   +0x448 ActiveProcessLinks : _LIST_ENTRY [ 0xfffff800`3e81e130 - 0xffffe289`7301f4c8 ]
   +0x458 RundownProtect   : _EX_RUNDOWN_REF
   +0x460 Flags2           : 0xd000
   +0x460 JobNotReallyActive : 0y0
   +0x460 AccountingFolded : 0y0
   +0x460 NewProcessReported : 0y0
   +0x460 ExitProcessReported : 0y0
   +0x460 ReportCommitChanges : 0y0
   +0x460 LastReportMemory : 0y0
   +0x460 ForceWakeCharge  : 0y0
   +0x460 CrossSessionCreate : 0y0
   +0x460 NeedsHandleRundown : 0y0
   +0x460 RefTraceEnabled  : 0y0
   +0x460 PicoCreated      : 0y0
   +0x460 EmptyJobEvaluated : 0y0
   +0x460 DefaultPagePriority : 0y101
   +0x460 PrimaryTokenFrozen : 0y1
   +0x460 ProcessVerifierTarget : 0y0
   +0x460 RestrictSetThreadContext : 0y0
   +0x460 AffinityPermanent : 0y0
   +0x460 AffinityUpdateEnable : 0y0
   +0x460 PropagateNode    : 0y0
   +0x460 ExplicitAffinity : 0y0
   +0x460 ProcessExecutionState : 0y00
   +0x460 EnableReadVmLogging : 0y0
   +0x460 EnableWriteVmLogging : 0y0
   +0x460 FatalAccessTerminationRequested : 0y0
   +0x460 DisableSystemAllowedCpuSet : 0y0
   +0x460 ProcessStateChangeRequest : 0y00
   +0x460 ProcessStateChangeInProgress : 0y0
   +0x460 InPrivate        : 0y0
   +0x464 Flags            : 0x144d0c01
   +0x464 CreateReported   : 0y1
   +0x464 NoDebugInherit   : 0y0
   +0x464 ProcessExiting   : 0y0
   +0x464 ProcessDelete    : 0y0
   +0x464 ManageExecutableMemoryWrites : 0y0
   +0x464 VmDeleted        : 0y0
   +0x464 OutswapEnabled   : 0y0
   +0x464 Outswapped       : 0y0
   +0x464 FailFastOnCommitFail : 0y0
   +0x464 Wow64VaSpace4Gb  : 0y0
   +0x464 AddressSpaceInitialized : 0y11
   +0x464 SetTimerResolution : 0y0
   +0x464 BreakOnTermination : 0y0
   +0x464 DeprioritizeViews : 0y0
   +0x464 WriteWatch       : 0y0
   +0x464 ProcessInSession : 0y1
   +0x464 OverrideAddressSpace : 0y0
   +0x464 HasAddressSpace  : 0y1
   +0x464 LaunchPrefetched : 0y1
   +0x464 Background       : 0y0
   +0x464 VmTopDown        : 0y0
   +0x464 ImageNotifyDone  : 0y1
   +0x464 PdeUpdateNeeded  : 0y0
   +0x464 VdmAllowed       : 0y0
   +0x464 ProcessRundown   : 0y0
   +0x464 ProcessInserted  : 0y1
   +0x464 DefaultIoPriority : 0y010
   +0x464 ProcessSelfDelete : 0y0
   +0x464 SetTimerResolutionLink : 0y0
   +0x468 CreateTime       : _LARGE_INTEGER 0x01d96e9d`1bb04a5e
   +0x470 ProcessQuotaUsage : [2] 0x3c78
   +0x480 ProcessQuotaPeak : [2] 0x3d00
   +0x490 PeakVirtualSize  : 0x00000201`0a4d2000
   +0x498 VirtualSize      : 0x00000201`0a4cf000
   +0x4a0 SessionProcessLinks : _LIST_ENTRY [ 0xffff9680`8a3ba010 - 0xffffe289`7301f520 ]
   +0x4b0 ExceptionPortData : 0xffffe289`6bb80db0 Void
   +0x4b0 ExceptionPortValue : 0xffffe289`6bb80db0
   +0x4b0 ExceptionPortState : 0y000
   +0x4b8 Token            : _EX_FAST_REF
   +0x4c0 MmReserved       : 0
   +0x4c8 AddressCreationLock : _EX_PUSH_LOCK
   +0x4d0 PageTableCommitmentLock : _EX_PUSH_LOCK
   +0x4d8 RotateInProgress : (null) 
   +0x4e0 ForkInProgress   : (null) 
   +0x4e8 CommitChargeJob  : (null) 
   +0x4f0 CloneRoot        : _RTL_AVL_TREE
   +0x4f8 NumberOfPrivatePages : 0x27c
   +0x500 NumberOfLockedPages : 0
   +0x508 Win32Process     : 0xffffba32`87ea58b0 Void
   +0x510 Job              : (null) 
   +0x518 SectionObject    : 0xffffbe81`61f66c10 Void
   +0x520 SectionBaseAddress : 0x00007ff6`c2e50000 Void
   +0x528 Cookie           : 0x5b1df88c
   +0x530 WorkingSetWatch  : (null) 
   +0x538 Win32WindowStation : 0x00000000`000000b4 Void
   +0x540 InheritedFromUniqueProcessId : 0x00000000`00001ab4 Void
   +0x548 OwnerProcessId   : 0x1ab6
   +0x550 Peb              : 0x0000005d`63e29000 _PEB
   +0x558 Session          : 0xffff9680`8a3ba000 _MM_SESSION_SPACE
   +0x560 Spare1           : (null) 
   +0x568 QuotaBlock       : 0xffffe289`6adc3cc0 _EPROCESS_QUOTA_BLOCK
   +0x570 ObjectTable      : 0xffffbe81`6a102540 _HANDLE_TABLE
   +0x578 DebugPort        : (null) 
   +0x580 WoW64Process     : (null) 
   +0x588 DeviceMap        : 0xffffbe81`62c0d210 Void
   +0x590 EtwDataSource    : 0xffffe289`730f7c90 Void
   +0x598 PageDirectoryPte : 0
   +0x5a0 ImageFilePointer : 0xffffe289`73054790 _FILE_OBJECT
   +0x5a8 ImageFileName    : [15]  "notepad.exe"
   +0x5b7 PriorityClass    : 0x2 ''
   +0x5b8 SecurityPort     : (null) 
   +0x5c0 SeAuditProcessCreationInfo : _SE_AUDIT_PROCESS_CREATION_INFO
   +0x5c8 JobLinks         : _LIST_ENTRY [ 0x00000000`00000000 - 0x00000000`00000000 ]
   +0x5d8 HighestUserAddress : 0x00007fff`ffff0000 Void
   +0x5e0 ThreadListHead   : _LIST_ENTRY [ 0xffffe289`7301dae8 - 0xffffe289`71c8f568 ]
   +0x5f0 ActiveThreads    : 7
   +0x5f4 ImagePathHash    : 0xd8414f97
   +0x5f8 DefaultHardErrorProcessing : 1
   +0x5fc LastThreadExitStatus : 0n0
   +0x600 PrefetchTrace    : _EX_FAST_REF
   +0x608 LockedPagesList  : (null) 
   +0x610 ReadOperationCount : _LARGE_INTEGER 0x0
   +0x618 WriteOperationCount : _LARGE_INTEGER 0x0
   +0x620 OtherOperationCount : _LARGE_INTEGER 0x0
   +0x628 ReadTransferCount : _LARGE_INTEGER 0x0
   +0x630 WriteTransferCount : _LARGE_INTEGER 0x0
   +0x638 OtherTransferCount : _LARGE_INTEGER 0x0
   +0x640 CommitChargeLimit : 0
   +0x648 CommitCharge     : 0x36b
   +0x650 CommitChargePeak : 0x36b
   +0x680 Vm               : _MMSUPPORT_FULL
   +0x7c0 MmProcessLinks   : _LIST_ENTRY [ 0xfffff800`3e84dbe8 - 0xffffe289`7301f840 ]
   +0x7d0 ModifiedPageCount : 5
   +0x7d4 ExitStatus       : 0n259
   +0x7d8 VadRoot          : _RTL_AVL_TREE
   +0x7e0 VadHint          : 0xffffe289`6f298460 Void
   +0x7e8 VadCount         : 0x6e
   +0x7f0 VadPhysicalPages : 0
   +0x7f8 VadPhysicalPagesLimit : 0
   +0x800 AlpcContext      : _ALPC_PROCESS_CONTEXT
   +0x820 TimerResolutionLink : _LIST_ENTRY [ 0x00000000`00000000 - 0x00000000`00000000 ]
   +0x830 TimerResolutionStackRecord : (null) 
   +0x838 RequestedTimerResolution : 0
   +0x83c SmallestTimerResolution : 0
   +0x840 ExitTime         : _LARGE_INTEGER 0x0
   +0x848 InvertedFunctionTable : (null) 
   +0x850 InvertedFunctionTableLock : _EX_PUSH_LOCK
   +0x858 ActiveThreadsHighWatermark : 7
   +0x85c LargePrivateVadCount : 0
   +0x860 ThreadListLock   : _EX_PUSH_LOCK
   +0x868 WnfContext       : 0xffffbe81`63c96240 Void
   +0x870 ServerSilo       : (null) 
   +0x878 SignatureLevel   : 0 ''
   +0x879 SectionSignatureLevel : 0 ''
   +0x87a Protection       : _PS_PROTECTION
   +0x87b HangCount        : 0y000
   +0x87b GhostCount       : 0y000
   +0x87b PrefilterException : 0y0
   +0x87c Flags3           : 0x41c000
   +0x87c Minimal          : 0y0
   +0x87c ReplacingPageRoot : 0y0
   +0x87c Crashed          : 0y0
   +0x87c JobVadsAreTracked : 0y0
   +0x87c VadTrackingDisabled : 0y0
   +0x87c AuxiliaryProcess : 0y0
   +0x87c SubsystemProcess : 0y0
   +0x87c IndirectCpuSets  : 0y0
   +0x87c RelinquishedCommit : 0y0
   +0x87c HighGraphicsPriority : 0y0
   +0x87c CommitFailLogged : 0y0
   +0x87c ReserveFailLogged : 0y0
   +0x87c SystemProcess    : 0y0
   +0x87c HideImageBaseAddresses : 0y0
   +0x87c AddressPolicyFrozen : 0y1
   +0x87c ProcessFirstResume : 0y1
   +0x87c ForegroundExternal : 0y1
   +0x87c ForegroundSystem : 0y0
   +0x87c HighMemoryPriority : 0y0
   +0x87c EnableProcessSuspendResumeLogging : 0y0
   +0x87c EnableThreadSuspendResumeLogging : 0y0
   +0x87c SecurityDomainChanged : 0y0
   +0x87c SecurityFreezeComplete : 0y1
   +0x87c VmProcessorHost  : 0y0
   +0x87c VmProcessorHostTransition : 0y0
   +0x87c AltSyscall       : 0y0
   +0x87c TimerResolutionIgnore : 0y0
   +0x87c DisallowUserTerminate : 0y0
   +0x880 DeviceAsid       : 0n0
   +0x888 SvmData          : (null) 
   +0x890 SvmProcessLock   : _EX_PUSH_LOCK
   +0x898 SvmLock          : 0
   +0x8a0 SvmProcessDeviceListHead : _LIST_ENTRY [ 0xffffe289`71ca7920 - 0xffffe289`71ca7920 ]
   +0x8b0 LastFreezeInterruptTime : 0
   +0x8b8 DiskCounters     : 0xffffe289`71ca7ac0 _PROCESS_DISK_COUNTERS
   +0x8c0 PicoContext      : (null) 
   +0x8c8 EnclaveTable     : (null) 
   +0x8d0 EnclaveNumber    : 0
   +0x8d8 EnclaveLock      : _EX_PUSH_LOCK
   +0x8e0 HighPriorityFaultsAllowed : 0
   +0x8e8 EnergyContext    : 0xffffe289`71ca7ae8 _PO_PROCESS_ENERGY_CONTEXT
   +0x8f0 VmContext        : (null) 
   +0x8f8 SequenceNumber   : 0x293
   +0x900 CreateInterruptTime : 0x0000001b`6f01fe24
   +0x908 CreateUnbiasedInterruptTime : 0x0000001b`6f01fe24
   +0x910 TotalUnbiasedFrozenTime : 0
   +0x918 LastAppStateUpdateTime : 0x0000001b`6f01fe24
   +0x920 LastAppStateUptime : 0y0000000000000000000000000000000000000000000000000000000000000 (0)
   +0x920 LastAppState     : 0y000
   +0x928 SharedCommitCharge : 0xbd2
   +0x930 SharedCommitLock : _EX_PUSH_LOCK
   +0x938 SharedCommitLinks : _LIST_ENTRY [ 0xffffbe81`6dd8c4d8 - 0xffffbe81`6dd8c938 ]
   +0x948 AllowedCpuSets   : 0
   +0x950 DefaultCpuSets   : 0
   +0x948 AllowedCpuSetsIndirect : (null) 
   +0x950 DefaultCpuSetsIndirect : (null) 
   +0x958 DiskIoAttribution : (null) 
   +0x960 DxgProcess       : 0xffffbe81`68855ab0 Void
   +0x968 Win32KFilterSet  : 0
   +0x970 ProcessTimerDelay : _PS_INTERLOCKED_TIMER_DELAY_VALUES
   +0x978 KTimerSets       : 0
   +0x97c KTimer2Sets      : 0
   +0x980 ThreadTimerSets  : 6
   +0x988 VirtualTimerListLock : 0
   +0x990 VirtualTimerListHead : _LIST_ENTRY [ 0xffffe289`71ca7a10 - 0xffffe289`71ca7a10 ]
   +0x9a0 WakeChannel      : _WNF_STATE_NAME
   +0x9a0 WakeInfo         : _PS_PROCESS_WAKE_INFORMATION
   +0x9d0 MitigationFlags  : 0x21
   +0x9d0 MitigationFlagsValues : <anonymous-tag>
   +0x9d4 MitigationFlags2 : 0x40000000
   +0x9d4 MitigationFlags2Values : <anonymous-tag>
   +0x9d8 PartitionObject  : 0xffffe289`648af0a0 Void
   +0x9e0 SecurityDomain   : 0x00000001`00000088
   +0x9e8 ParentSecurityDomain : 0x00000001`00000088
   +0x9f0 CoverageSamplerContext : (null) 
   +0x9f8 MmHotPatchContext : (null) 
   +0xa00 DynamicEHContinuationTargetsTree : _RTL_AVL_TREE
   +0xa08 DynamicEHContinuationTargetsLock : _EX_PUSH_LOCK
   +0xa10 DynamicEnforcedCetCompatibleRanges : _PS_DYNAMIC_ENFORCED_ADDRESS_RANGES
   +0xa20 DisabledComponentFlags : 0
   +0xa28 PathRedirectionHashes : (null) 

0: kd> !process 0 0 lsass.exe
PROCESS ffff9d8f19eec080
    SessionId: 0  Cid: 035c    Peb: bfc5a80000  ParentCid: 02c4
    DirBase: 212a34002  ObjectTable: ffffd88b29f2f180  HandleCount: 1447.
    Image: lsass.exe

0: kd> dt nt!_EPROCESS ffff9d8f19eec080 UniqueProcessId Token ImageFilename
   +0x440 UniqueProcessId : 0x00000000`0000035c Void
   +0x4b8 Token           : _EX_FAST_REF
   +0x5a8 ImageFileName   : [15]  "lsass.exe"
0: kd> dx -id 0,0,ffff9d8f17ca0040 -r1 (*((ntkrnlmp!_EX_FAST_REF *)0xffff9d8f19eec538))
(*((ntkrnlmp!_EX_FAST_REF *)0xffff9d8f19eec538))                 [Type: _EX_FAST_REF]
    [+0x000] Object           : 0xffffd88b2a4713c3 [Type: void *]
    [+0x000 ( 3: 0)] RefCnt           : 0x3 [Type: unsigned __int64]
    [+0x000] Value            : 0xffffd88b2a4713c3 [Type: unsigned __int64]
0: kd> !token 0xffffd88b2a4713c0
_TOKEN 0xffffd88b2a4713c0
TS Session ID: 0
User: S-1-5-18
User Groups: 
 00 S-1-5-32-544
    Attributes - Default Enabled Owner 
 01 S-1-1-0
    Attributes - Mandatory Default Enabled 
 02 S-1-5-11
    Attributes - Mandatory Default Enabled 
 03 S-1-16-16384
    Attributes - GroupIntegrity GroupIntegrityEnabled 
Primary Group: S-1-5-18
Privs: 
 02 0x000000002 SeCreateTokenPrivilege            Attributes - Enabled 
 03 0x000000003 SeAssignPrimaryTokenPrivilege     Attributes - 
 04 0x000000004 SeLockMemoryPrivilege             Attributes - Enabled Default 
 05 0x000000005 SeIncreaseQuotaPrivilege          Attributes - 
 07 0x000000007 SeTcbPrivilege                    Attributes - Enabled Default 
 08 0x000000008 SeSecurityPrivilege               Attributes - 
 09 0x000000009 SeTakeOwnershipPrivilege          Attributes - 
 10 0x00000000a SeLoadDriverPrivilege             Attributes - 
 11 0x00000000b SeSystemProfilePrivilege          Attributes - Enabled Default 
 12 0x00000000c SeSystemtimePrivilege             Attributes - 
 13 0x00000000d SeProfileSingleProcessPrivilege   Attributes - Enabled Default 
 14 0x00000000e SeIncreaseBasePriorityPrivilege   Attributes - Enabled Default 
 15 0x00000000f SeCreatePagefilePrivilege         Attributes - Enabled Default 
 16 0x000000010 SeCreatePermanentPrivilege        Attributes - Enabled Default 
 17 0x000000011 SeBackupPrivilege                 Attributes - 
 18 0x000000012 SeRestorePrivilege                Attributes - 
 19 0x000000013 SeShutdownPrivilege               Attributes - 
 20 0x000000014 SeDebugPrivilege                  Attributes - Enabled Default 
 21 0x000000015 SeAuditPrivilege                  Attributes - Enabled Default 
 22 0x000000016 SeSystemEnvironmentPrivilege      Attributes - 
 23 0x000000017 SeChangeNotifyPrivilege           Attributes - Enabled Default 
 25 0x000000019 SeUndockPrivilege                 Attributes - 
 28 0x00000001c SeManageVolumePrivilege           Attributes - 
 29 0x00000001d SeImpersonatePrivilege            Attributes - Enabled Default 
 30 0x00000001e SeCreateGlobalPrivilege           Attributes - Enabled Default 
 31 0x00000001f SeTrustedCredManAccessPrivilege   Attributes - 
 32 0x000000020 SeRelabelPrivilege                Attributes - 
 33 0x000000021 SeIncreaseWorkingSetPrivilege     Attributes - Enabled Default 
 34 0x000000022 SeTimeZonePrivilege               Attributes - Enabled Default 
 35 0x000000023 SeCreateSymbolicLinkPrivilege     Attributes - Enabled Default 
 36 0x000000024 SeDelegateSessionUserImpersonatePrivilege  Attributes - Enabled Default 
Authentication ID:         (0,3e7)
Impersonation Level:       Anonymous
TokenType:                 Primary
Source: *SYSTEM*           TokenFlags: 0x2000 ( Token in use )
Token ID: d694             ParentToken ID: 0
Modified ID:               (0, e53e)
RestrictedSidCount: 0      RestrictedSids: 0x0000000000000000
OriginatingLogonSession: 0
PackageSid: (null)
CapabilityCount: 0      Capabilities: 0x0000000000000000
LowboxNumberEntry: 0x0000000000000000
Security Attributes:
Unable to get the offset of nt!_AUTHZBASEP_SECURITY_ATTRIBUTE.ListLink
Process Token TrustLevelSid: (null)

+ Recent posts