# React Native Application

<details>

<summary><strong>从零开始学习AWS黑客技术，成为专家</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE（HackTricks AWS Red Team Expert）</strong></a><strong>！</strong></summary>

支持HackTricks的其他方式：

* 如果您想看到您的**公司在HackTricks中做广告**或**下载PDF格式的HackTricks**，请查看[**订阅计划**](https://github.com/sponsors/carlospolop)!
* 获取[**官方PEASS & HackTricks周边产品**](https://peass.creator-spring.com)
* 探索[**PEASS家族**](https://opensea.io/collection/the-peass-family)，我们的独家[**NFTs**](https://opensea.io/collection/the-peass-family)
* **加入** 💬 [**Discord群**](https://discord.gg/hRep4RUj7f) 或 [**电报群**](https://t.me/peass) 或 **关注**我们的**Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**。**
* 通过向[**HackTricks**](https://github.com/carlospolop/hacktricks)和[**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github仓库提交PR来分享您的黑客技巧。

</details>

## React Native 应用程序分析

要确认应用程序是否基于React Native框架构建，请按照以下步骤操作：

1. 使用命令`cp com.example.apk example-apk.zip`将APK文件重命名为zip扩展名，并将其提取到一个新文件夹中。
2. 转到新创建的ReactNative文件夹，并找到assets文件夹。在此文件夹中，您应该找到名为`index.android.bundle`的文件，其中包含React JavaScript的压缩格式。
3. 使用命令`find . -print | grep -i ".bundle$"`搜索JavaScript文件。

要进一步分析JavaScript代码，请在相同目录中创建一个名为`index.html`的文件，其中包含以下代码：

```html
<script src="./index.android.bundle"></script>
```

你可以将文件上传到<https://spaceraccoon.github.io/webpack-exploder/>，或按照以下步骤操作：

1. 在Google Chrome中打开`index.html`文件。
2. 通过按下**OS X的Command+Option+J**或**Windows的Control+Shift+J**来打开开发者工具栏。
3. 在开发者工具栏中点击“Sources”。您应该会看到一个JavaScript文件，该文件分为文件夹和文件，组成了主要的捆绑包。

如果找到名为`index.android.bundle.map`的文件，则可以以未经缩小的格式分析源代码。映射文件包含源映射，允许您映射缩小后的标识符。

要搜索敏感凭据和端点，请按照以下步骤操作：

1. 确定要分析JavaScript代码的敏感关键字。React Native应用程序通常使用第三方服务，如Firebase、AWS S3服务端点、私钥等。
2. 在这种特定情况下，观察到应用程序正在使用Dialogflow服务。搜索与其配置相关的模式。
3. 在侦察过程中，幸运地在JavaScript代码中找到了敏感的硬编码凭据。

### 参考资料

* <https://medium.com/bugbountywriteup/lets-know-how-i-have-explored-the-buried-secrets-in-react-native-application-6236728198f7>

<details>

<summary><strong>从零开始学习AWS黑客技术，成为专家</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE（HackTricks AWS Red Team Expert）</strong></a><strong>！</strong></summary>

支持HackTricks的其他方式：

* 如果您想看到您的**公司在HackTricks中做广告**或**下载PDF格式的HackTricks**，请查看[**订阅计划**](https://github.com/sponsors/carlospolop)!
* 获取[**官方PEASS & HackTricks周边产品**](https://peass.creator-spring.com)
* 探索[**PEASS家族**](https://opensea.io/collection/the-peass-family)，我们的独家[**NFTs**](https://opensea.io/collection/the-peass-family)
* **加入** 💬 [**Discord群**](https://discord.gg/hRep4RUj7f) 或 [**电报群**](https://t.me/peass) 或在**Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)\*\* 上\*\*关注我们。
* 通过向[**HackTricks**](https://github.com/carlospolop/hacktricks)和[**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github仓库提交PR来分享您的黑客技巧。

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hacktricks.xsx.tw/mobile-pentesting/android-app-pentesting/react-native-application.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
