hlogin7

Similar documents
hlogin2

Deok9_Exploit Technique

01.ROP(Return Oriented Programming)-x86 Excuse the ads! We need some help to keep our site up. List Return Oriented Programming(ROP) -x86 Gadgets - PO

Reusing Dynamic Linker For Exploitation Author : Date : 2012 / 05 / 13 Contact : Facebook : fb.me/kwonpwn

강의10

Level 4 ( hell_fire -> evil_wizard ) ~]$ cat evil_wizard.c /* The Lord of the BOF : The Fellowship of the BOF - evil_wizard

6주차.key

INTRO Basic architecture of modern computers Basic and most used assembly instructions on x86 Installing an assembly compiler and RE tools Practice co

untitled

을 할 때, 결국 여러 가지 단어를 넣어서 모두 찾아야 한다는 것이다. 그 러나 가능한 모든 용어 표현을 상상하기가 쉽지 않고, 또 모두 찾기도 어 렵다. 용어를 표준화하여 한 가지 표현만 쓰도록 하여야 한다고 하지만, 말은 쉬워도 모든 표준화된 용어를 일일이 외우기는

untitled

08.BROP(Blind Return Oriented Programming) Excuse the ads! We need some help to keep our site up. List BROP(Blind Return Oriented Programming) BROP st

No Slide Title

Linux Binary Hardening with Glibc Hyeonho Seo

simple ROP Exploit

*세지6문제(306~316)OK

10.

IDA 5.x Manual hwp

various tricks for remote linux exploits v3.pptx

PRO1_02E [읽기 전용]

목차 1. 개요 USB 드라이버 설치 (FTDI DRIVER) FTDI DRIVER 실행파일 USB 드라이버 확인방법 DEVICE-PROGRAMMER 설치 DEVICE-PROGRAMMER

Sena Technologies, Inc. HelloDevice Super 1.1.0

PowerPoint Template

github_introduction.key

외교부 재외국민보호과-pdf

0x00 Contents 0x About Nickster 0x Analaysis 0x Exploit

Chap06(Interprocess Communication).PDF

vi 사용법


Microsoft Word - FunctionCall

Return-to-libc

chap7.key

Microsoft Word - Network Programming_NewVersion_01_.docx

hd1300_k_v1r2_Final_.PDF

SRC PLUS 제어기 MANUAL

Microsoft PowerPoint - o8.pptx

Microsoft PowerPoint - a10.ppt [호환 모드]

chapter4

Microsoft PowerPoint - a8a.ppt [호환 모드]

13주-14주proc.PDF

MPLAB C18 C

목차 1. 제품 소개 특징 개요 Function table 기능 소개 Copy Compare Copy & Compare Erase

MySQL-Ch10

chap01_time_complexity.key

untitled

2009년 상반기 사업계획

<C0CCBCBCBFB52DC1A4B4EBBFF82DBCAEBBE7B3EDB9AE2D D382E687770>

목 차 1. 개요 취약점분석추진배경 취약점요약 취약점정보 취약점대상시스템목록 분석 공격기법및기본개념 시나리오 공격코드

시스코 무선랜 설치운영 매뉴얼(AP1200s_v1.1)

DDX4038BT DDX4038BTM DDX4038 DDX4038M 2010 Kenwood Corporation All Rights Reserved. LVT A (MN)

03장.스택.key

untitled

untitled

Microsoft PowerPoint - chap12 [호환 모드]


À©µµ³×Æ®¿÷ÇÁ·Î±×·¡¹Ö4Àå_ÃÖÁ¾

Deok9_PE Structure

PRO1_09E [읽기 전용]

Microsoft Word - FS_ZigBee_Manual_V1.3.docx


PWR PWR HDD HDD USB USB Quick Network Setup Guide xdsl/cable Modem PC DVR 1~3 1.. DVR DVR IP xdsl Cable xdsl Cable PC PC DDNS (

Microsoft PowerPoint APUE(Intro).ppt

1. 안드로이드개발환경설정 안드로이드개발을위해선툴체인을비롯한다양한소프트웨어패키지가필요합니다 툴체인 (Cross-Compiler) 설치 안드로이드 2.2 프로요부터는소스에기본툴체인이 prebuilt 라는이름으로포함되어있지만, 리눅스 나부트로더 (U-boot)

C# Programming Guide - Types

Interstage5 SOAP서비스 설정 가이드

2. GCC Assembler와 AVR Assembler의차이 A. GCC Assembler 를사용하는경우 i. Assembly Language Program은.S Extension 을갖는다. ii. C Language Program은.c Extension 을갖는다.

untitled

The_IDA_Pro_Book

MicrocontrollerAcademy_Lab_ST_040709

Microsoft PowerPoint - System Programming Lab Week1.ppt [호환 모드]

02.Create a shellcode that executes "/bin/sh" Excuse the ads! We need some help to keep our site up. List Create a shellcode that executes "/bin/sh" C

USB USB DV25 DV25 REC SRN-475S REC SRN-475S LAN POWER LAN POWER Quick Network Setup Guide xdsl/cable Modem PC DVR 1~3 1.. DVR DVR IP xdsl Cable xdsl C

Microsoft Word - ExecutionStack

ORANGE FOR ORACLE V4.0 INSTALLATION GUIDE (Online Upgrade) ORANGE CONFIGURATION ADMIN O

컴파일러

歯처리.PDF

<4D F736F F D20B3BBBACEC7D8C5B7B4EBC8B820BAB8B0EDBCAD2E646F6378>

02 C h a p t e r Java

DE1-SoC Board

Microsoft Word - ASG AT90CAN128 모듈.doc

1


untitled

Microsoft PowerPoint - ch09_파이프 [호환 모드]

2009년 상반기 사업계획

A Hierarchical Approach to Interactive Motion Editing for Human-like Figures

Microsoft Word - CL5000,5500_KOR_UM_ _.doc

Microsoft Word - Reverse Engineering Code with IDA Pro-2-1.doc

제목을 입력하세요.

Computer Security Chapter 08. Format String 김동진 1 Secure Software Lab.

TTA Verified : HomeGateway :, : (NEtwork Testing Team)

Microsoft PowerPoint - polling.pptx

(Asynchronous Mode) ( 1, 5~8, 1~2) & (Parity) 1 ; * S erial Port (BIOS INT 14H) - 1 -

Smart Power Scope Release Informations.pages

프로그램을 학교 등지에서 조금이라도 배운 사람들을 위한 프로그래밍 노트 입니다. 저 역시 그 사람들 중 하나 입니다. 중고등학교 시절 학교 도서관, 새로 생긴 시립 도서관 등을 다니며 책을 보 고 정리하며 어느정도 독학으르 공부하긴 했지만, 자주 안하다 보면 금방 잊어

Poison null byte Excuse the ads! We need some help to keep our site up. List 1 Conditions 2 Exploit plan 2.1 chunksize(p)!= prev_size (next_chunk(p) 3

rosaec_workshop_talk

Microsoft Word - MSOffice_WPS_analysis.doc

VOL /2 Technical SmartPlant Materials - Document Management SmartPlant Materials에서 기본적인 Document를 관리하고자 할 때 필요한 세팅, 파일 업로드 방법 그리고 Path Type인 Ph

Microsoft PowerPoint - 04-UDP Programming.ppt

Transcription:

0x07. Return Oriented Programming

ROP?

, (DEP, ASLR).

ROP (Return Oriented Programming) (excutable memory) rop. plt, got got overwrite RTL RTL Chain DEP, ASLR gadget

Basic knowledge

plt, got call function before global offset table link_map struct address 2 4 plt jmp got push global offset table 1 push reloc_offset 3 5 got jmp plt + 6 jmp _dl_runtime_resolve call function 12 enter dynamic linker _dl_lookup_symbol_x 8 get SYMTAB address get libc address return _dl_fixup 7 _dl_fixup get.strtab address get function name offset 9 calc real libc address _dl_runtime_resolve 6 call _dl_fixup function name address return _dl_runtime_resolve 11 reloc_offset link_map struct address

plt, got call function before global offset table link_map struct address 2 4 plt jmp got push global offset table 1 push reloc_offset 3 5 got 10 function address jmp _dl_runtime_resolve call function 12 enter dynamic linker _dl_lookup_symbol_x 8 get SYMTAB address get libc address return _dl_fixup 7 _dl_fixup get.strtab address get function name offset 9 calc real libc address _dl_runtime_resolve 6 call _dl_fixup function name address return _dl_runtime_resolve 11 reloc_offset link_map struct address

plt, got call function after plt 1 2 jmp got got function address 3 call function

got overwrite plt 1 2 jmp got got function address 3 call function 3 call arbitrary function

RTL Chain Stack return address 1 return address 2 return address 3 return address 4 ESP Stack return address 1 pop pop ret parameter 1 function argv[1] = parameter 1 argv[2] = parameter 2 1 call function excute function function epilogue 2 parameter 2 return address 2

RTL Chain Stack return address 1 return address 2 return address 3 return address 4 ESP Stack return address 1 pop pop ret parameter 1 function argv[1] = parameter 1 argv[2] = parameter 2 1 call function excute function function epilogue 2 parameter 2 return address 2

RTL Chain Stack return address 1 return address 2 return address 3 return address 4 Stack return address 1 pop pop ret parameter 1 function argv[1] = parameter 1 argv[2] = parameter 2 1 call function excute function function epilogue 2 parameter 2 ESP return address 2

ROP Gadget pop - pop - return gadget ret. gadget next return address pop esp next return address, gadget. ex) return address 2

ROP Gadget 1. gadget 2. gadget ret. 3. gadget 4. gadget

ROP (Return Oriented Programming)

ROP (Return Oriented Programming).code section call recv@plt call recv() argv[1] = fd argv[2] = buf_address argv[3] = sizeof(buf) argv[4] = 0 next instruction stack stack next instruction fd fd buf_address buf_address sizeof(buf) sizeof(buf) 0 0

ROP (stage 1).code section call recv@plt call recv() argv[1] = fd argv[2] = buf_address argv[3] = sizeof(buf) argv[4] = 0 next instruction stack corruption, return send@plt stack stack fd buf_address send function ABCD hacker file descriptor recv_got sizeof(buf) 4 0 0

ROP (stage 1) send(hacker_fd, recv_got, 4, 0) recv_got 4. recv_got? got system offset. got plt + 6. got.

ROP (stage 1) offset? offset ex) p recv = 0xb7f03bf0 p system = 0xb7e56190 offset = recv - system system = recv - offset p/x recv - system = 0xada60 p/x recv - 0xada60 = 0xb7e56190 < system >

ROP (stage 0).code section call recv@plt call recv() argv[1] = fd argv[2] = buf_address argv[3] = sizeof(buf) argv[4] = 0 next instruction stack corruption, return recv@plt stack stack stack ppppr return system fd buf_address recv function hacker file descriptor bss ABCD bss sizeof(buf) len(cmd) 0 0

ROP (stage 0) recv(hacker_fd, bss, len(cmd), 0) bss cmd (recv). system(bss) recv cmd bss bss system bss..bss section? C 0..

ROP (Return Oriented Programming) 1. gdb. 2. set follow-fork-mode child. 3.. 4. run ( ) 5. nc localhost port. 6.. 7. pid killall [binaryname]. ex) nc localhost 7777 python test.py ex) killall python

DEMO

ROP (Return Oriented Programming)

ROP (Return Oriented Programming) help.

ROP (Return Oriented Programming). - send, recv -.bss section 8 - recv stack corruption ROP (stage 1) - send hacker. - offset system. ROP (stage 0) - recv system bss section. - stage 1 system rtl chain

ROP (stage 1) recv stack corruption. vuln 100, recv 200. vuln 100 byte sfp 4 byte return address

ROP (stage 1) find gadget for stage 1

ROP (stage 1) calc system address struct.pack( <I, 0x12345678) == \x78\x56\x34\x12

ROP (stage 0) find gadget for stage 0 readelf -S python find.bss section

ROP (stage 0) objdump -d python grep -04 ret find ppppr

ROP (stage 0)

ROP (stage 0)