mirror of
https://github.com/HackTricks-wiki/hacktricks.git
synced 2025-10-10 18:36:50 +00:00
47 lines
1.8 KiB
Markdown
47 lines
1.8 KiB
Markdown
{{#include ../../banners/hacktricks-training.md}}
|
|
|
|
일부 애플리케이션은 사용자가 다운로드한 인증서를 좋아하지 않으므로, 특정 앱의 웹 트래픽을 검사하기 위해 실제로 애플리케이션을 디컴파일하고 몇 가지를 추가한 후 다시 컴파일해야 합니다.
|
|
|
|
# 자동
|
|
|
|
도구 [**https://github.com/shroudedcode/apk-mitm**](https://github.com/shroudedcode/apk-mitm)는 요청을 캡처하기 위해 애플리케이션에 필요한 변경 사항을 **자동으로** 수행하며, 인증서 핀닝을 비활성화합니다(있는 경우).
|
|
|
|
# 수동
|
|
|
|
먼저 앱을 디컴파일합니다: `apktool d *file-name*.apk`
|
|
|
|

|
|
|
|
그런 다음 **Manifest.xml** 파일로 들어가 `<\application android>` 태그로 스크롤하여 다음 줄이 이미 없으면 추가합니다:
|
|
|
|
`android:networkSecurityConfig="@xml/network_security_config"`
|
|
|
|
추가 전:
|
|
|
|

|
|
|
|
추가 후:
|
|
|
|

|
|
|
|
이제 **res/xml** 폴더로 들어가 network_security_config.xml이라는 파일을 생성하거나 수정하고 다음 내용을 추가합니다:
|
|
```markup
|
|
<network-security-config>
|
|
<base-config>
|
|
<trust-anchors>
|
|
<!-- Trust preinstalled CAs -->
|
|
<certificates src="system" />
|
|
<!-- Additionally trust user added CAs -->
|
|
<certificates src="user" />
|
|
</trust-anchors>
|
|
</base-config>
|
|
</network-security-config>
|
|
```
|
|
그런 다음 파일을 저장하고 모든 디렉토리에서 나와서 다음 명령어로 apk를 다시 빌드합니다: `apktool b *folder-name/* -o *output-file.apk*`
|
|
|
|

|
|
|
|
마지막으로, **새 애플리케이션에 서명해야 합니다**. [서명하는 방법을 배우려면 이 페이지의 Smali - Decompiling/\[Modifying\]/Compiling 섹션을 읽으세요](smali-changes.md#sing-the-new-apk).
|
|
|
|
{{#include ../../banners/hacktricks-training.md}}
|