R136A1

앱 보안(7) Insecurebankv2 본문

Android

앱 보안(7) Insecurebankv2

r136a1x27 2021. 10. 8. 20:57

git clone https://github.com/dineshshetty/Android-InsecureBankv2.git 

 

GitHub - dineshshetty/Android-InsecureBankv2: Vulnerable Android application for developers and security enthusiasts to learn ab

Vulnerable Android application for developers and security enthusiasts to learn about Android insecurities - GitHub - dineshshetty/Android-InsecureBankv2: Vulnerable Android application for develop...

github.com

InsecureBankv2.apk 가상환경(Nox)에 설치

AndroLabSever > app.py 실행 (python2)

pip install -r requirements.txt

 

nox adb 로 연결된 상태에서

Preference에서 IP를 ipconfig 내 아이피 주소로 설정

 

루트인 디바이스는 안돼서 다른 디바이스 생성 62001

 

dinesh

Dinesh@123$

 

jack

Jack@123$

 

adb 연결해놓기

 

버튼 눌러도 아무 반응이 없는 문제 → 서버 작동 문제

1) app.py를 PowerShell 관리자권한으로 실행하기

cd "{경로}"

- 앱 껐다 켜보기

 

database file 문제

OperationalError: (sqlite3.OperationalError) unable to open database file
(Background on this error at: https://sqlalche.me/e/14/e3q8)
 [!] 500 Internal Server Error: The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

 

2) adb shell 에서 /data/data/com.android.insecurebankv2/databases 의 권한 chmod 777로 바꾸기

3) 경로에 한글이 있으면 제대로 인식이 안될수도. 바탕화면같은 곳으로 이동하여 app.py powershell로 재실행

4) adb shell 해서 adb에 패킷 보내서 연결 살리기

https://github.com/dineshshetty/Android-InsecureBankv2/issues/24 

 

I cannot login · Issue #24 · dineshshetty/Android-InsecureBankv2

OperationalError: (sqlite3.OperationalError) unable to open database file (Background on this error at: http://sqlalche.me/e/e3q8) [!] 500 Internal Server Error: The server encountered an internal ...

github.com

취약점 리스트

  1. Flawed Broadcast Receivers
  2. Intent Sniffing and Injection
  3. Weak Authorization mechanism
  4. Local Encryption issues
  5. Vulnerable Activity Components
  6. Root Detection and Bypass
  7. Emulator Detection and Bypass
  8. Insecure Content Provider access
  9. Insecure Webview implementation
  10. Weak Cryptography implementation
  11. Application Patching
  12. Sensitive Information In Memory
  13. Insecure Loggin mechanism
  14. Android Pasteboard vulnerability
  15. Application Debuggable
  16. Android keyboard cache issues
  17. Android Backup vulnerability
  18. Runtime Manipulation
  19. Insecure SDcard storage
  20. Insecure HTTP connections
  21. Parameter Manipulation
  22. Hardcoded secrets
  23. Username Enumeration issue
  24. Developer Backdoors
  25. Weak change pssword implementation

참고: OWASP Mobile Top 10

https://owasp.org/www-project-mobile-top-10/

 

5. Vulnerable Activity Components

액티비티 = 화면 = AndroidMenifest.xml <activity>에 선언

 

exported = https://developer.android.com/guide/topics/manifest/activity-element?hl=ko 

 

<액티비티>  |  Android 개발자  |  Android Developers

Declares an activity (an Activity subclass) that implements part of the application's visual user interface. All activities must be represented by {@code } elements in the manifest file. Any that are not declared there will not be seen by the system…

developer.android.com

다른 activity 구성요소로부터 원격으로 실행시킬 수 있는지

= run app.package.attacksurface com.android.insecurebankv2 에서도 attacksurface에서 activity로 가능

 

로그인 화면에서 id만 알고 password를 바꿀 수 있는지 하려고

 

drozer에서

run app.activity.start --component com.android.insecurebankv2 com.android.insecurebankv2.ChangePassword

 

 

22. Hardcoded secrets

com > insecurebankv2 > CryptoClass.class에서

하드코딩된 "This is the super secret key 123"

-------------------

broadcast : id, query 해서 패스워드 조사

frida 루팅 우회

 

Comments