[목차]

 

1. 런타임 조작 실습 2

 

 


​​

 

1. 런타임 조작 실습 2

 

# 공략 방법

분석 방법 정하기(디버깅으로 주솟값+반환값 확인 또는 클래스 검색)

> 힌트 찾기 > 분석 방법에 따른 코드 작성 > 응답 값 변조

# 힌트 키워드 찾기

DVIA 앱에서 [Runtime Manipulation] 메뉴 선택 후

Login Method 2 팝업 내 에러 메시지 확인

 

 

- 데이터 미 입력 후 로그인 시도 시

 

Error

One or more input fields is empty

- 입력한 계정정보가 맞지 않는 경우 에러 메시지

 

Oops

Incorrect Username or Password

 

 

 

 

# 기드라 사용 실습

(1) 로직 확인

(1-1) 키워드 검색으로 참조하고 있는 주소 확인

 

 

앞선 실습에서는

RuntimeManipulation 첫 번째 주소를

확인했는데 이번에는 두 번째 참조 주소 확인!

 

 

 

(1-2) 분기점 및 반환 값 확인

 

비교 레지스터는 w8.

분기점에서 값이 0인 경우(If)

아래로 내려가 Incorrect~ 에러가

뜨는데 이를 1로 변환 시

목표 지점인 오른쪽으로

우회 시킬 수 있겠다.

 

 

 

(1-3) 분기점 주소 확인

0x1bded4

 

 

 

 

(2) DVIA 바이너리 변조

코드 작성 후

//(1) 실 주소 확인 후 변조
var realBase = Module.findBaseAddress('DVIA-v2')
console.log("[+] ASLR로 바뀐 바이너리 실제 메모리 주소 : " + realBase)

var jailBreak_address = realBase.add('0x1bded4')
console.log("[+] 분기점 실제 주소 : " + jailBreak_address)


//(2) 반환 값 변조 
Interceptor.attach(jailBreak_address,{
	onEnter:function(args){
		console.log("[+] 변조 전 반환 값 : ")
		console.log(JSON.stringify(this.context))
		this.context.x8 = 0x1
		console.log("[+] 변조 후 반환 값 : ")
		console.log(JSON.stringify(this.context))
	}
})
 

 

돌려보면

 

 

인증 우회 성공!

 

 

 

 

 

 

728x90
반응형

+ Recent posts