다들 아시겠지만 Android 7.0 이상은 인증서의 위치가 달라지게 되었습니다. (User인증서와 System인증서의 권한이 분리됨)
-User 라는것은 스마트폰에서 (http://burp)에서 다운받은 인증서를 몇 번의 터치로 설치하는것
#에뮬레이터 비트 확인
1
2
|
adb shell getprop ro.product.cpu.abi
adb shell getprop ro.product.cpu.abi2
|
#녹스 사전준비 필요
*설치 : https://kr.bignox.com/kr/download/fullPackage
* 애뮬레이터 생성 후 실행
* 애뮬레이터 내 개발자모드에서 USB디버깅 활성화
-인증서파일 다운로드
-openssl 사용하여 pem으로 변환 후 해시값 추출
윈도우는 http://slproweb.com/products/Win32OpenSSL.html 여기서 openssl을 다운받자 (openssl 1.0 다운받은경우는 openssl.cnf파일 필요)
-openssl 명령어로 cacert.der 파일을 pem으로 변환
openssl x509 -inform DER -in <추출한 인증서> -out cacert.pem
- 해시값 추출
openssl x509 -inform PEM -subject_hash_old -in cacert.pem
- 파일명은 해시값으로 하면 됨(확장자는 xxxxxxxx.0)
- 인증서 파일 에뮬레이터로 이동
(adb.exe는 안드로이드 스튜디오로 설치했다면 android-sdk/platform-tools경로에 있음)
*애뮬레이터 내 인증서 위치해야할 경로 : /system/etc/security/cacerts/
|
nox_adb devices -l
nox_adb connect -s 127.0.0.1:62001
nox_adb root
nox_adb shell mount -o remount,rw /system
nox_adb push {파일} {경로}
|
*마지막 부조건 재부팅 해줘야함
|
nox_adb shell "reboot"
|
*Burp Suite 사용
[애뮬레이터 설정 > wifi > 길게 꾸욱 누르면 저 창 선택할 수 있음]
[버프에서 Proxy Option에 같은 IP:HOST 설정후 인터셉트 결과]
이미 디바이스에 설치된 인증서를 이용하여 RootCA로 등록.
cp /storage/emulated/0/ca.pem /system/etc/security/cacerts
>>참고
http://egloos.zum.com/earthfall/v/3890490
https://www.lesstif.com/pages/viewpage.action?pageId=7635159
https://facebook.com/teamrootmi
https://metalkin.tistory.com/81
'모의해킹 > 안드로이드' 카테고리의 다른 글
Frida를 이용한 안드로이드 해킹 연구 발표자료 (0) | 2019.11.22 |
---|---|
Frida 후킹 후 메모리덤프 하기 (메모리 평문노출 취약점) (0) | 2019.11.19 |
smali 문법정리 (0) | 2019.11.18 |
android killer 분석 및 사용법 정리 (0) | 2019.09.04 |