Kernel

    [Windows][HEVD] stack overflow

    HEVD 취약한 드라이버 함수중에 제일 쉬운애다.. 하지만 이것도 거의 한 2주가 걸렸다 ㅠ 뭐가 문제였는진 아직도 잘 모르겠지만.. Environment windows 10 x64 2004 Vuln func NTSTATUS TriggerBufferOverflowStack( _In_ PVOID UserBuffer, _In_ SIZE_T Size) { ... } 취약점이 존재하는 함수는 TriggerBufferOverflowStack 이다. #ifdef SECURE // Secure Note: This is secure because the developer is passing a size // equal to size of KernelBuffer to RtlCopyMemory()/memcpy(). Hen..

    [Windows][HEVD] build 환경 구축(feat. Windows driver 개발 환경 구축)

    윈도우 커널 드라이버 공부를 위해 https://github.com/hacksysteam/HackSysExtremeVulnerableDriver hacksysteam/HackSysExtremeVulnerableDriver HackSys Extreme Vulnerable Windows Driver. Contribute to hacksysteam/HackSysExtremeVulnerableDriver development by creating an account on GitHub. github.com 이것을 이용할 계획이다. 취약점(현재 28개였던것같음)이 존재하는 드라이버를 만들어서 공부용으로 올려놓으신것이다. 일단... 사실 이건 이 드라이버를 빌드하기 위해서만 필요한 빌드 환경 구축은 아니고, 계속 뭐..

    [Windows] VMware windbg 설정(+ windbg preview)

    당연히 windbg 는 일단 설치가 되어 있어야 한다. (https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/debugger-download-tools) Environment Host: Windows 10 64bit Guest: VMware 15, Windows 10 64bit Guest OS에 Secure boot 해제 시켜놔야 한다.(Settings > Options > Advanced) Settings Guest OS windbg 를 설치한 Host OS에서 C:\Program Files (x86)\Windows Kits\10\Debuggers\x64 경로에 보면 kdnet.exe 와 verifiedNICList.xml 을 찾을 수..

    [Linux] prepare_kernel_cred & commit_creds

    prepare_kernel_cred 와 commit_creds 함수는 보통 kernel exploit을 작성할 때 root 권한을 얻어오는 작업을 수행할 때 사용하는 함수이다. 이 함수들의 소스코드에 대한 분석을 진행해보았다. prepare_kernel_cred ... static struct kmem_cache *cred_jar; ... /* * initialise the credentials stuff */ void __init cred_init(void) { /* allocate a slab in which we can store credentials */ cred_jar = kmem_cache_create("cred_jar", sizeof(struct cred), 0, SLAB_HWCACHE_AL..