Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | |||||
| 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| 10 | 11 | 12 | 13 | 14 | 15 | 16 |
| 17 | 18 | 19 | 20 | 21 | 22 | 23 |
| 24 | 25 | 26 | 27 | 28 | 29 | 30 |
| 31 |
Tags
- 보안제품개발
- AndroGoat
- blockchain
- BOB후기
- FlagOneLoginActivity
- BOB 합격후기
- XSS
- golang
- Burp Suite CA
- jadx
- 블록체인
- BOB10기합격후기
- 비트코인
- 앱변조
- NOX
- Burp Suite
- SlubBackdoor #응용 #악성코드 #악성코드_제작 #Python #깃허브를_이용한_악성코드
- Frida
- injuredandroid
- apk easy tool
- BOB10기
- bitcoin
- 솔루션개발
- injuredandroid.apk
- UTXO
- BOB면접
- smali
- 안드로이드 앱 진단 환경설정
- 자산추적
- FlagTwoActivity
Archives
- Today
- Total
Kye0m's Security
[Diva] Hardcoding issues(Part2) 본문
Diva - Hardcoding issues(part2)

이번문제도 특정 key값을 입력하여 푸는 문제이다.
[풀이과정]

access버튼을 눌렀을 때, 파일함수 후킹을 통해 Hardcode2Activity.access에서 함수가 실행되는 것을 알 수 있다.
public void access(View view) {
EditText hckey = (EditText) findViewById(R.id.hc2Key);
if (this.djni.access(hckey.getText().toString()) != 0) {
Toast.makeText((Context) this, (CharSequence) "Access granted! See you on the other side :)", 0).show();
} else {
Toast.makeText((Context) this, (CharSequence) "Access denied! See you in hell :D", 0).show();
}
}
}
jadx-gui를 통해서 확인해보면, this.djni.access에 String을 입력했을 때, 참이되어서 나오면
통과할 수 있는 것을 확인할 수 있다.
public class DivaJni {
private static final String soName = "divajni";
public native int access(String str);
public native int initiateLaunchSequence(String str);
static {
System.loadLibrary(soName);
}
}
divajni 라이브러리를 호출하는것을 알 수 있다.

libdivanji.so를 분석을 위해, adb pull 명령어를 통해서 데스크탑으로 옮겨왔다.

ida로 분석을 해보면, Java_jakhar_aseem_diva_DivaJni_access에서 'olsdfgad;lh'와 memcmp를 한 결과를 반환한다.
비교하는 문자열이 하드코딩 되었기 때문에 해당 문자열을 입력하면 문제를 해결할 수 있다.

'앱 모의해킹 > Diva' 카테고리의 다른 글
| [Diva] Access control issues(Part3) (0) | 2022.10.02 |
|---|---|
| [Diva] - Hardcoding issues(Part1) (1) | 2022.09.29 |
| [Diva] -Insecure Logging (1) | 2022.09.29 |