hacktricks/mobile-pentesting/android-app-pentesting/make-apk-accept-ca-certificate.md

71 lines
3.9 KiB
Markdown
Raw Normal View History

2022-04-28 16:01:33 +00:00
<details>
<summary><strong>Jifunze AWS hacking kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)</strong></a><strong>!</strong></summary>
2022-04-28 16:01:33 +00:00
2024-02-11 02:13:58 +00:00
Njia nyingine za kusaidia HackTricks:
2022-04-28 16:01:33 +00:00
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
2024-02-11 02:13:58 +00:00
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
* **Shiriki mbinu zako za kuhack kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
2022-04-28 16:01:33 +00:00
</details>
Baadhi ya programu hazipendi vyeti vilivyopakuliwa na mtumiaji, hivyo ili kuchunguza trafiki ya wavuti kwa baadhi ya programu tunapaswa kuchambua tena programu na kuongeza vitu kadhaa na kuirudisha.
2024-02-11 02:13:58 +00:00
# Kiotomatiki
Zana [**https://github.com/shroudedcode/apk-mitm**](https://github.com/shroudedcode/apk-mitm) itafanya **kiotomatiki** mabadiliko muhimu kwenye programu ili kuanza kukamata maombi na pia kulemaza certificate pinning (ikiwapo ipo).
2024-02-11 02:13:58 +00:00
# Kwa Mkono
Kwanza tunachambua programu: `apktool d *jina-la-faili*.apk`
![](../../.gitbook/assets/img9.png)
Kisha tunakwenda kwenye faili ya **Manifest.xml** & tunasonga chini hadi lebo ya `<\application android>` na tutaweka mstari ufuatao ikiwa hauko tayari:
`android:networkSecurityConfig="@xml/network_security_config`
2024-02-11 02:13:58 +00:00
Kabla ya kuongeza:
![](../../.gitbook/assets/img10.png)
2024-02-11 02:13:58 +00:00
Baada ya kuongeza:
![](../../.gitbook/assets/img11.png)
Sasa nenda kwenye folda ya **res/xml** & unda/boresha faili iitwayo network\_security\_config.xml na yaliyomo yafuatayo:
```markup
2024-02-11 02:13:58 +00:00
<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>
```
Kisha hifadhi faili & rudi nyuma kutoka kwenye mafaili yote na jenga upya apk kwa kutumia amri ifuatayo: `apktool b *jina-la-folda/* -o *jina-la-faili-linalotoka.apk*`
![](../../.gitbook/assets/img12.png)
Hatimaye, unahitaji tu **kusaini programu mpya**. [Soma sehemu hii ya ukurasa wa Smali - Kudecompile/\[Kubadilisha\]/Kukusanya ili kujifunza jinsi ya kuaisaini](smali-changes.md#sing-the-new-apk).
2022-04-28 16:01:33 +00:00
<details>
<summary><strong>Jifunze kuhusu kuhack AWS kutoka sifuri hadi shujaa na</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
2022-04-28 16:01:33 +00:00
2024-02-11 02:13:58 +00:00
Njia nyingine za kusaidia HackTricks:
2022-04-28 16:01:33 +00:00
* Ikiwa unataka kuona **kampuni yako ikitangazwa kwenye HackTricks** au **kupakua HackTricks kwa PDF** Angalia [**MIPANGO YA KUJIUNGA**](https://github.com/sponsors/carlospolop)!
* Pata [**bidhaa rasmi za PEASS & HackTricks**](https://peass.creator-spring.com)
* Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
* **Shiriki mbinu zako za kuhack kwa kuwasilisha PRs kwenye** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
2022-04-28 16:01:33 +00:00
</details>