다큐프라임(EBS)

지식채널e(EBS)

세계의 눈(EBS)

다큐 오늘(EBS)

EBS 기획특강(EBS)

EBS 인문학 특강(EBS)

세계테마기행(EBS)


해외걸작 다큐(KBS1)

글로벌 다큐멘터리(KBS1)

다큐 공감(KBS1)

KBS 스페셜(KBS1)

걸어서 세계속으로(KBS1)

명견만리(KBS1)


다큐멘터리 3일(KBS2)

세상의 모든 다큐(KBS2)


MBC 스페셜(MBC)

MBC 다큐프라임(MBC)


SBS 스페셜(SBS)

일요 특선 다큐멘터리(SBS)


JTBC 스페셜 다큐멘터리(JTBC)




KBS1

KBS2

MBC : MBC 스페셜(23:10)

SBS

EBS : 지식채널e(12:40), EBS 기획특강(13:20), 다큐 오늘(20:40), 세계테마기행(20:50), 다큐프라임(21:50)

JTBC


KBS1

KBS2

MBC

SBS

EBS : 지식채널e(12:40), EBS 기획특강(13:20), 다큐 오늘(20:40), 세계테마기행(20:50), 다큐프라임(21:50)

JTBC : JTBC 스페셜 다큐멘터리(01:50)


KBS1 : 해외걸작 다큐(00:20)

KBS2

MBC

SBS

EBS : 지식채널e(12:40), 다큐 오늘(20:40), 세계테마기행(20:50), 다큐프라임(21:50)

JTBC : JTBC 스페셜 다큐멘터리(01:50)


KBS1 : KBS 스페셜(22:00)

KBS2 : 세상의 모든 다큐(00:35)

MBC

SBS

EBS : 다큐 오늘(20:40), 세계테마기행(20:50)

JTBC : JTBC 스페셜 다큐멘터리(01:50)


KBS1 : 명견만리(22:00)

KBS2

MBC : MBC 다큐프라임(01:05)

SBS

EBS : 다큐 오늘(20:40)

JTBC : JTBC 스페셜 다큐멘터리(01:50)


KBS1 : 걸어서 세계속으로(09:40), 글로벌 다큐멘터리(20:10)

KBS2

MBC

SBS

EBS : 세계의 눈(16:45)

JTBC : JTBC 스페셜 다큐멘터리(01:50)


KBS1 : 다큐 공감(20:05)

KBS2 : 다큐멘터리 3일(22:40)

MBC

SBS : 일요 특선 다큐멘터리(07:30), SBS 스페셜(23:10)

EBS : 세계의 눈(16:45)

JTBC

블로그 이미지

SanseoLab

,

mona.py 란 corelan 팀에서 파이썬으로 만든 취약점 분석 도구이다.

원래 이뮤니티 디버거에서 사용하기 위한 용도였지만 windbg에서도 pykd를 통해 사용 가능하다.


사용법은 디버거의 명령 라인에서 

!mona [명령어]

를 사용하면 된다.




!mona modules (!mona mod)


Base | Top | Size | Rebase | SafeSEH | ASLR | NXCompat | OS Dll | Ver, Modulename, Path


주소 시작 | 주소 끝 | 크기 | DLL 재배치 | SafeSEH 사용 여부 | ASLR 사용 여부 | NXCompat 사용 여부 | OS DLL인지 여부 | 버전과 모듈 이름 그리고 경로


위와 같이 익스플로잇 방어 기법들의 사용 여부와 기본적인 정보들을 보여준다.

참고로 Rebase는 DLL에서 사용하는 것으로서 보안 보다는 DLL의 특징에 의한 것이다. 취약점 공격 시에는 ASLR이나 같다고 할 수 있다.

그리고 NXCompat은 DEP라고 생각하면 된다.




!mona rop


ROP 생성을 도와준다.

rop -m [모듈] : 지정한 모듈에서 가젯 검색

rop -n : 널바이트로 시작하는 모듈을 제외하고 로드된 모든 가젯 검색.




!mona pattern_create [숫자] (pc 숫자)


[숫자]바이트의 정해진 패턴을 출력한다.

이 글을 볼 정도면 다 알겠지만 굳이 예를 들자면, 

주로 버퍼 오버플로우 검사 시에 A를 길게 써 넣어서 EIP가 A인 41414141로 바뀐 스택 버퍼 오버플로우가 발생했다고 하자. 

이 경우에 정확히 어느 주소에 ESP가 위치해서 EIP가 저걸로 바꼈는지 찾아야 할텐데 AAA..들의 나열 대신 저 정해진 패턴을 버퍼에 입력하면,

즉 Aa0Aa1Aa2....Ab9... 이런 내용을 버퍼로 넣었다고 치면 EIP에 들어온 내용을 검색해 보면 몇 번째 문자열에서 EIP의 주소가 바뀌게 되는 지를 알 수 있다.

참고로 C:\logs\ 의 경로에 프로세스 이름 별로 pattern.txt 파일에 위의 패턴이 저장되므로 복사해서 사용할 수 있다.




!mona pattern_offset [패턴]


패턴을 검색한다. 패턴은 4바이트를 집어넣어야 한다. 

예를들면 EIP에 들어온 값이 0x41613041이라고 하자.

그럼 !mona po 41613041을 친다.

이것은 문자열로 보면 Aa0A이기 때문에 결과는 오프셋이 0 즉, 처음이라고 나오게 된다.




이외에도 많은 명령어들이 존재한다.


? / eval                | Evaluate an expression

assemble / asm     | Convert instructions to opcode. Separate multiple instructions 

                           with #

bpseh / sehbp       | Set a breakpoint on all current SEH Handler function pointers

breakfunc / bf       | Set a breakpoint on an exported function in on or more dll's

breakpoint / bp     | Set a memory breakpoint on read/write or execute of a given address

bytearray / ba       | Creates a byte array, can be used to find bad characters

calltrace / ct         | Log all CALL instructions

compare / cmp      | Compare contents of a binary file with a copy in memory

config / conf         | Manage configuration file (mona.ini)

copy / cp             | Copy bytes from one location to another

deferbp / bu         | Set a deferred breakpoint

dump                  | Dump the specified range of memory to a file

egghunter / egg     | Create egghunter code

encode / enc         | Encode a series of bytes

filecompare / fc      | Compares 2 or more files created by mona using the same output commands

find / f                  | Find bytes in memory

findmsp / findmsf    | Find cyclic pattern in memory

findwild / fw           | Find instructions in memory, accepts wildcards

fwptr / fwp             | Find Writeable Pointers that get called

geteat / eat            | Show EAT of selected module(s)

getiat / iat              | Show IAT of selected module(s)

getpc                    | Show getpc routines for specific registers

gflags / gf              | Show current GFlags settings from PEB.NtGlobalFlag

header                 | Read a binary file and convert content to a nice 'header' string

heap                     | Show heap related information

help                      | show help

hidedebug / hd       | Attempt to hide the debugger

info                   | Show information about a given address in the context of the 

                          loaded application

infodump / if          | Dumps specific parts of memory to file

jmp / j                  | Find pointers that will allow you to jump to a register

jop                       | Finds gadgets that can be used in a JOP exploit

kb / kb                  | Manage Knowledgebase data

modules / mod        | Show all loaded modules and their properties

noaslr                    | Show modules that are not aslr or rebased

nosafeseh               | Show modules that are not safeseh protected

nosafesehaslr          | Show modules that are not safeseh protected, not aslr and 

                             not rebased

offset                     | Calculate the number of bytes between two addresses

pageacl / pacl          | Show ACL associated with mapped pages

pattern_create / pc    | Create a cyclic pattern of a given size

pattern_offset / po    | Find location of 4 bytes in a cyclic pattern

peb / peb               | Show location of the PEB

rop             | Finds gadgets that can be used in a ROP exploit and do ROP magic 

                   with them

ropfunc       | Find pointers to pointers (IAT) to interesting functions that can be 

                   used in your ROP chain

seh                       | Find pointers to assist with SEH overwrite exploits

sehchain / exchain   | Show the current SEH chain

skeleton        | Create a Metasploit module skeleton with a cyclic pattern for a 

                    given type of exploit

stackpivot             | Finds stackpivots (move stackpointer to controlled area)

stacks                  | Show all stacks for all threads in the running application

string / str            | Read or write a string from/to memory

suggest                | Suggest an exploit buffer structure

teb / teb               | Show TEB related information

unicodealign / ua   | Generate venetian alignment code for unicode stack buffer 

                           overflow

update / up          | Update mona to the latest version


자세한 세부 사항은 직접 찾아보자.


https://www.corelan.be/index.php/2011/07/14/mona-py-the-manual/

블로그 이미지

SanseoLab

,

구글링을 하다 보면 퍼징과 관련된 괜찮은 자료들이 많이 나온다.


- 윈도우 멀티미디어 취약점 분석 방법론

- 주요 국산 SW 대상 신규 취약점 발굴 및 분석방법 연구

- 취약점 발굴을 위한 프로그램 입력 데이터 흐름분석 연구 최종보고서


이 외에도 교재로

- Fuzzing Brute Force Vulnerability Discovery

이게 추천된다는데 아직 안봐서 모르겠다.


여기까지 취약점을 찾기 위한 퍼징과 관련된 글이었다.


이제 취약한 부분을 찾은 후에 셸코드를 작성하고 등등 그것을 exploit해야 한다.

이것은 기본 개념들을 매우 잘 설명한 책이 있어서 책 이름을 쓰겠다.

인터넷에 나와 있는 자료는 이 책을 공부한 후에 해도 충분하다고 생각한다.


- 윈도우 시스템 해킹 가이드 버그헌팅과 익스플로잇

블로그 이미지

SanseoLab

,