1. dex2jar 다운받기

https://github.com/pxb1988/dex2jar/releases

 

Releases · pxb1988/dex2jar

Tools to work with android .dex and java .class files - pxb1988/dex2jar

github.com

위 링크에서 ZIP 파일을 다운로드 후 원하는 경로에 압축을 푼다.

 

 

2. dex2jar 경로 및 명령어 설정

.bash_profile을 열어 경로와 alias를 등록해둔다

alias dex2jar='d2j-dex2jar.sh'
export dex2jar_home='/Users/my/Tools/dex2jar/dex-tools-2.2-SNAPSHOT'
export PATH=${PATH}:${dex2jar_home}

 

3. dex2jar 실행하기

명령어를 실행해본다. 

% dex2jar
d2j-dex2jar -- convert dex to jar
usage: d2j-dex2jar [options] <file0> [file1 ... fileN]
options:
 --skip-exceptions            skip-exceptions
 -d,--debug-info              translate debug info
 -e,--exception-file <file>   detail exception file, default is $current_dir/[fi
                              le-name]-error.zip
 -f,--force                   force overwrite
 -h,--help                    Print this help message
 -n,--not-handle-exception    not handle any exceptions thrown by dex2jar
 -nc,--no-code
 -o,--output <out-jar-file>   output .jar file, default is $current_dir/[file-na
                              me]-dex2jar.jar
 -os,--optmize-synchronized   optimize-synchronized
 -p,--print-ir                print ir to System.out
 -r,--reuse-reg               reuse register while generate java .class file
 -s                           same with --topological-sort/-ts
 -ts,--topological-sort       sort block by topological, that will generate more
                               readable code, default enabled
version: reader-2.2-SNAPSHOT, translator-2.2-SNAPSHOT, ir-2.2-SNAPSHOT

 

'Tools' 카테고리의 다른 글

[MacOS] psproxy  (0) 2023.04.18
[MacOS] apktool 설치  (0) 2023.04.11
[Jadx-gui] MacOS에서 실행 에러 해결  (0) 2020.05.11
[Burp Suite] Target Scope  (0) 2020.02.14
[파이어폭스] success.txt 요청  (0) 2020.02.12

https://blog.ropnop.com/configuring-burp-suite-with-android-nougat/

 

Configuring Burp Suite With Android Nougat

Android Nougat changed the default behavior for apps, so installing the Burp CA to user certs no longer works. Here’s two ways to bypass it

blog.ropnop.com

 

https://blog.nviso.be/2017/12/22/intercepting-https-traffic-from-apps-on-android-7-using-magisk-burp/ 

 

Intercepting HTTPS Traffic from Apps on Android 7+ using Magisk & Burp

Intercepting HTTPS traffic is a necessity with any mobile security assessment. By adding a custom CA to Android, this can easily be done. As of Android Nougat, however, apps don’t trust clien…

blog.nviso.eu

 

1. 인증서 변환

$ openssl x509 -inform DER -in cacert.der -out burpca.pem

$ openssl x509 -inform PEM -subject_hash_old -in burpca.pem

$ mv burpca.pem 9a5ba575.0

-- 휴대폰으로 복사는 알아서.

 

2. 갤럭시노트8 ( 안드로이드 9 ) 설정

# mount -o remount,rw /system

# cd /system/etc/security/cacerts

# cp /sdcard/Download/9a5ba575.0 ./

# chmod 644 9a5ba575.0

 

 

3. 샤오미 Mi 9 SE ( 안드로이드 10) 설정

- https://github.com/NVISOsecurity/MagiskTrustUserCerts   모듈 설치 후

 

GitHub - NVISOsecurity/MagiskTrustUserCerts: A Magisk module that automatically adds user certificates to the system root CA sto

A Magisk module that automatically adds user certificates to the system root CA store - GitHub - NVISOsecurity/MagiskTrustUserCerts: A Magisk module that automatically adds user certificates to the...

github.com

# cd /data/misc/user/0/cacerts-added

# cp /sdcard/Download/9a5ba575.0 ./

 

'Security > Mobile' 카테고리의 다른 글

[iPhone/iOS] [더한섬닷컴] 탈옥안했는데 탈옥알림  (2) 2022.02.14
Android WebView 디버깅  (0) 2020.02.25
AntiDebug  (0) 2019.03.26

1. 서론

와이프가 아이폰을 쓰는데 한섬 애용자..

더한섬닷컴 앱을 잘 이용하다가 어느날 아래의 사진과 같이 "탈옥된 기기에서 사용할 수 없습니다." 메시지와 함께 사용할 수 없었음.

더한섬닷컴

 

와이프가 나름 노력한다고..

1) 한섬에 탈옥안했는데 탈옥된 메시지가 뜨는데 어떻게 하면 되냐고 문의글 남겼으나, 해결하지 못함.

2) 애플 A/S 센터가서 문의했으나, 해결하지 못함.

   (이건 하드웨어 지점을 방문했다함.. 소프트웨어는 애플 고객센터에 전화해야한다고..)

 

그래서 어쩔 수 없이 리서치를 시작함..

2. 생각정리

여러가지 탈옥탐지 룰이 있겠지만, 먼저 생각을 정리

1) 실제로 탈옥을 하지 않았기 때문에 오탐일거라고 판단함.

2) 오탐이라면 일반앱을 탈옥앱으로 판단했을거라고 가정함.

3) 그 외적인 sshd 파일이 있는지 root 권한이 있는지 등등은 불필요하니까 제외.

 

3. 테스트

한섬 앱의 ipa를 디컴파일하기 전에 ipa 압출풀고 cydia 문자열을 검색해봄.

Info.plist에 cydia 문자열 확인

 

cydia 문자열이 Info.plist에 있음을 확인했고, 내용을 살펴봄.

LSApplicationQueriesSchemes의 리스트

 

LSApplicationQueriesSchemes의 하위에 등록되어 있고 해당 메서드는 다른 앱을 실행할 수 있는 스킴을 등록한 것.

- 자세한 것은 구글을 검색하세염 >.<

저 부분을 보고, 더한섬닷컴 앱의 탈옥 탐지로직 중에 하나가 cydia 스킴을 호출하여 반응여부를 보고 판단할 거라고 생각함.

 

3.1 사파리 브라우저에서 스킴호출 시도

브라우저에서 URL 입력창에 "cydia://package/com.example.package.com" 을 입력 후 엔터를 누르면 스킴을 호출 함.

cydia 스킴 호출

 

"cydia" 이름의 커스텀 스킴을 쓰는 앱이 실행됨.

cydia 커스텀 스킴의 반응

 

cydia 커스텀 스킴으로 실행

 

범인은 UBpay(유비페이) !!!!!

 

3.2 유비페이 삭제 후 더한섬닷컴 실행 확인

유비페이 앱을 삭제 후 한섬 앱을 실행해봤다.

유비페이 삭제

 

한섬 실행 확인

 

와이프의 환호성.. ㅋㅋ

이걸 어느앱의 잘못이라고 해야하는지.. 암튼 해결... 

'Security > Mobile' 카테고리의 다른 글

안드로이드 7.0이상 버프 인증서 디바이스 설치  (0) 2023.04.04
Android WebView 디버깅  (0) 2020.02.25
AntiDebug  (0) 2019.03.26

+ Recent posts