Gflow

Main Menu

  • 블로그 메뉴
  • 홈
  • 태그
  • 미디어로그
  • 위치로그
  • 방명록
  • SNS

[Kernel] Kernel Shellcode Analysis

System/Windows Gflow 2017. 9. 13. 23:30

출처: https://github.com/hacksysteam/HackSysExtremeVulnerableDriver Step 1. Token 이전 kernel exploit에서 payload를 구성하고 아래에 나와 있는 System token을 얻기위한 shellcode를 추가해 현재 프로세스의 권한을 올리고 cmd.exe를 실행시켰습니다.VOID TokenShellcode() { __asm { pushad xor eax, eax mov eax, fs:[eax + 0x124]; KTHREAD offset mov eax, [eax + 0x50]; EPROCESS offset mov ecx, eax mov edx, 0x4; system process PID SearchSystemPID : mov eax, ..

[Kernel] Kernel Shellcode

System/Windows Gflow 2017. 9. 11. 23:30

이전 문서들에서도 보이듯 일반적인 Application exploit과 달리 Kernel exploit에서는 실행할 process를 system 권한으로 만드는 것에 중점을 두게 됩니다. 따라서 특정 Application을 통해 다른 process를 실행시키는 것이 아닌 현재 내가 실행시킬수 있는 프로그램의 권한을 올리는 것이 목적입니다. Step 1. Token Window에서 실행중인 process와 관련된 사용자 계정 및 접근 권한은 token이라는 커널 개체에 의해서 결정됩니다. 다양한 process의 커널 데이터 구조에는 process의 token에 대한 pointer가 들어가 있습니다. 단순히 cmd.exe를 실행시켜 현재 process의 권한을 보면 PC user의 이름만 나타나게 됩니다. ..

[Kernel] Kernel Pool Attack

System/Windows Gflow 2017. 9. 8. 23:30

출처: Kernel Pool Exploitation on Windows7 (Tarjei Mandt) 본 포스팅은 Kernel Pool Exploitation on Windows7 논문을 분석 및 의역하여 작성하였습니다. Step 1. ListEntry Flink Overwrite Kernel에서 Pool chunk를 ListHeads의 목록에서 할당할 때 Flink의 유효성을 제대로 검사하지 못하는 대신 ListHeads[n] LIST_ENTRY 구조체의 유효성만을 검사합니다.for (n = BlockSize – 1; n < 512; n++) { if (ListHeads[n].Flink == &ListHeads[n]) { // empty continue; } } 공격자가 free된 chunk에 POOL ..

[Kernel] Allocate Kernel Memory Free

System/Windows Gflow 2017. 9. 6. 23:30

출처: Kernel Pool Exploitation on Windows7 (Tarjei Mandt) 본 포스팅은 Kernel Pool Exploitation on Windows7 논문을 분석 및 의역하여 작성하였습니다. Step 1. Windows Kernel Pool windows 버전이 바뀔 때마다 memory design NUMA를 더 최적화시켜 memory 관리의 효율이 올라가게 됩니다. 그 결과로 Kernel의 KNODE 구조체에 의해 정의된 node라고 하는 작은 단위로 memory가 관리됩니다. System을 시작하게 되면 memory 관리자는 Pool Descriptor에 의해 관리되는 Memory Pool을 형성하게 됩니다. Paged Pool: 실제 memory에 상주하지 않고 pagi..

[Kernel Exploitation] GDI Bitmap Abuse

System/Windows Gflow 2017. 9. 4. 23:30

출처: https://www.fuzzysecurity.com/tutorials.html 본 포스팅은 fuzzysecurity Tutorials part 17 -> GDI Bitmap Abuse를 분석 및 의역하여 작성하였습니다. Sample Windows Driver code에 존재하는 취약점을 학습하는 데 그 목적이 있습니다. Step 1. 취약점 분석 해당 취약점은 Arbitrary Overwrite가 한 번 가능할 때 Bitmap 객체를 이용한 취약점입니다. 간략히 설명하면 Bitmap 객체를 이용해서 한번의 Write-What-Where 취약점을 그 후에도 무한적으로 이용할 수 있게 세팅하는 것입니다. CreateBitmap() API는 Bitmap 객체를 생성하는 함수입니다.HBITMAP Cre..

[Kernel Exploitation] Pool Overflow

System/Windows Gflow 2017. 8. 31. 23:30

출처: https://www.fuzzysecurity.com/tutorials.html 본 포스팅은 fuzzysecurity Tutorials part 16 -> Pool Overflow를 분석 및 의역하여 작성하였습니다. Sample Windows Driver code에 존재하는 취약점을 학습하는 데 그 목적이 있습니다. Step 1. 취약점 분석 Pool Overflow는 내가 할당한 다음 chunk의 header를 overflow를 통해서 변조시켜 EIP를 변조시키는 기술입니다. 다음은 Pool Overflow에서의 Trigger code입니다. Copy 과정을 거칠 때 사용자가 보내준 Buffer의 size만큼 복사가 이뤄지기 때문에 StackOverflow때와 마찬가지로 RtlCopyMemory..

[Kernel Exploitation] Use After Free

System/Windows Gflow 2017. 8. 29. 23:30

출처: https://www.fuzzysecurity.com/tutorials.html 본 포스팅은 fuzzysecurity Tutorials part 15 -> Use After Free를 분석 및 의역하여 작성하였습니다. Sample Windows Driver code에 존재하는 취약점을 학습하는 데 그 목적이 있습니다. Step 1. 취약점 분석 UAF code를 살펴보면 IOCTL에 따라 각각 다른 함수들이 실행됩니다. non-paged pool chunk를 할당해주는 code입니다. 해당 chunk의 구조는 위에 나와있듯 USE_AFTER_FREE 구조체입니다. 전역 구조체 pointer g_UseAfterFreeObject에 Object에 대한 주소를 담습니다. typedef struct _U..

  • 1
  • ···
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8

Sidebar

블로그 정보

Gflow

www.gflow.co.kr

공지사항

검색

카테고리

  • 분류 전체보기 (52)
    • System (20)
      • Windows (20)
    • Digital Forensic (27)
      • Windows-Forensic (18)
      • Network-Forensic (6)
      • Memmory-Forensic (3)
    • Mobile (4)
      • Android (3)
      • iOS (1)
    • BugBounty (1)
      • Intro (1)
      • Study&Analysis (0)

태그

  • BOF
  • 파인더갭
  • findthegap
  • 정보보안
  • hackerone
  • 네트워크포렌식
  • 보안
  • frida
  • 윈도우
  • 지플로우
  • 해커원
  • URL Injection
  • 앱 취약점
  • 현상금
  • gflow
  • URL 인젝션
  • bugbounty
  • forensics
  • exploit
  • Android
  • 모바일
  • 버그바운티
  • 버그크라우드
  • 후킹
  • 리버싱
  • 안드로이드
  • 취약점
  • hooking
  • 앱해킹
  • bugcrowd

최근 글

최근 댓글

달력

«   2025/08   »
일 월 화 수 목 금 토
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31

보관함

링크

  • Gflow 공식 홈페이지
  • Gflow 페이스북 페이지

통계

  • Total :
  • Today :
  • Yesterday :

관리

  • 관리자
  • 글쓰기
Copyright © Gflow All Rights Reserved

티스토리툴바