├── .github
├── ISSUE_TEMPLATE
│ └── new-version.md
└── workflows
│ └── build.yml
├── .gitignore
├── README.md
└── img
├── 1.png
├── 2.png
├── 3.png
└── zsxq.jpg
/.github/ISSUE_TEMPLATE/new-version.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: New Version
3 | about: 请求构建指定Frida版本
4 | title: "[VERSION]"
5 | labels: version
6 | assignees: ''
7 |
8 | ---
9 |
10 | 标题必须为 `[VERSION]版本号` 的格式
11 |
12 | issues的内容无所谓,可以为空
13 |
14 | 以 [https://github.com/frida/frida/tags](https://github.com/frida/frida/tags) 为准,一般类似 `15.1.19` 这样
15 |
16 | 可以参考 [已有请求编译版本集锦](https://github.com/anjia0532/strongR-frida-android/issues?q=is%3Aissue+label%3Aversion+)
17 |
18 | **注意:**
19 |
20 | 本项目只是提供构建,核心防frida检测都是依赖于 [Git Patch Files](https://github.com/AAAA-Project/Patchs/tree/master/strongR-frida/frida-core)
21 |
22 | 如果patch失败,请去[Git Patch Files](https://github.com/AAAA-Project/Patchs/tree/master/strongR-frida/frida-core) 提issues,本人无力解决这个问题。
23 |
24 | 已知问题,因为git的patch是基于文件的,不同版本的patch可能不能通用,意味着可能存在patch成功但是构建的frida运行不了,或者patch成功,但是构建frida失败,或者直接patch失败。
25 |
26 | 针对这个问题,目前尚无精力完善,可以fork后自行修改或者尝试在本地编译frida。
27 |
--------------------------------------------------------------------------------
/.github/workflows/build.yml:
--------------------------------------------------------------------------------
1 | name: strongR-frida
2 |
3 | on:
4 | workflow_dispatch:
5 |
6 | jobs:
7 | check_version:
8 | runs-on: ubuntu-20.04
9 |
10 | outputs:
11 | FRIDA_VERSION: ${{ steps.pullFridaLatestRelease.outputs.FRIDA_VERSION }}
12 | ALREADY_RELEASE: ${{ steps.checkReleaseVersion.outputs.ALREADY_RELEASE }}
13 | ISSUE_NUMBER: ${{ steps.pullIssuesVersion.outputs.ISSUE_NUMBER }}
14 | steps:
15 | - name: Check repo's version issues
16 | id: pullIssuesVersion
17 | uses: actions/github-script@v3.1.0
18 | with:
19 | github-token: ${{secrets.GITHUB_TOKEN}}
20 | script: |
21 | const issuesResponse = await github.issues.listForRepo({
22 | owner: '${{ secrets.GIT_OWNER }}',
23 | repo: '${{ secrets.GIT_REPO }}',
24 | state: "open",
25 | labels: "version",
26 | sort: "created",
27 | direction: "desc",
28 | per_page: 1
29 | })
30 |
31 | let ver
32 | let issue_number = -1
33 | if (Array.isArray(issuesResponse["data"]) && issuesResponse["data"].length) {
34 | let title = issuesResponse["data"][0]["title"]
35 | let start = 0
36 | if (title.includes("[VERSION]")){
37 | start = 9
38 | }
39 | ver = issuesResponse["data"][0]["title"].substring(start).trim()
40 | issue_number = issuesResponse["data"][0]["number"]
41 | }
42 | console.log("Frida Version from issues is ", ver)
43 | core.setOutput('FRIDA_VERSION', ver)
44 | core.setOutput('ISSUE_NUMBER', issue_number)
45 |
46 | - name: Pull Frida Latest Release
47 | id: pullFridaLatestRelease
48 | uses: actions/github-script@v3.1.0
49 | with:
50 | github-token: ${{secrets.GITHUB_TOKEN}}
51 | script: |
52 | const releaseVersion = '${{ steps.pullIssuesVersion.outputs.FRIDA_VERSION }}'
53 | if (releaseVersion){
54 | console.log("Frida Version From Issues is ", releaseVersion)
55 | core.setOutput('FRIDA_VERSION', releaseVersion);
56 | } else {
57 | const releaseResponse = await github.repos.getLatestRelease({
58 | owner: 'frida',
59 | repo: 'frida',
60 | })
61 | const {
62 | data: { tag_name: ver }
63 | } = releaseResponse;
64 | console.log("Frida Version From Frida repo LastRelease is ", ver)
65 | core.setOutput('FRIDA_VERSION', ver);
66 | }
67 |
68 | - name: Check release version
69 | id: checkReleaseVersion
70 | uses: actions/github-script@v3.1.0
71 | with:
72 | github-token: ${{secrets.GITHUB_TOKEN}}
73 | script: |
74 | let alreadyRelease = false;
75 | try {
76 | const releaseVersion = '${{ steps.pullFridaLatestRelease.outputs.FRIDA_VERSION }}'
77 | const releaseResponse = await github.repos.getReleaseByTag({
78 | owner: '${{ secrets.GIT_OWNER }}',
79 | repo: '${{ secrets.GIT_REPO }}',
80 | tag: releaseVersion
81 | });
82 | const {
83 | data: { tag_name: ver }
84 | } = releaseResponse;
85 | if (ver == '${{ steps.pullFridaLatestRelease.outputs.FRIDA_VERSION }}'){
86 | core.setOutput('ALREADY_RELEASE', '1');
87 | alreadyRelease = true;
88 | }
89 | else{
90 | core.setOutput('ALREADY_RELEASE', '0');
91 | }
92 | } catch (e) {
93 | if(e.message == 'Not Found'){
94 | core.setOutput('ALREADY_RELEASE', '0');
95 | }
96 | else{
97 | core.setFailed(e.message);
98 | }
99 | }
100 |
101 | if (${{ steps.pullIssuesVersion.outputs.ISSUE_NUMBER }} > 0){
102 | const issuesComment = await github.issues.createComment({
103 | owner: '${{ secrets.GIT_OWNER }}',
104 | repo: '${{ secrets.GIT_REPO }}',
105 | issue_number: ${{ steps.pullIssuesVersion.outputs.ISSUE_NUMBER }},
106 | body: '构建进展 [https://github.com/anjia0532/strongR-frida-android/actions/runs/${{ github.run_id }}](https://github.com/anjia0532/strongR-frida-android/actions/runs/${{ github.run_id }})\n\n知识星球:\n\n
'
107 | });
108 | console.log("create issues comment resp:",issuesComment["status"]);
109 | if(alreadyRelease){
110 | const issuesResponse = await github.issues.update({
111 | owner: '${{ secrets.GIT_OWNER }}',
112 | repo: '${{ secrets.GIT_REPO }}',
113 | issue_number: ${{ steps.pullIssuesVersion.outputs.ISSUE_NUMBER }},
114 | state: 'closed'
115 | });
116 | console.log("update issues resp:", issuesResponse["status"] == 200 ? "success" : "failed" );
117 |
118 |
119 | const issuesComment = await github.issues.createComment({
120 | owner: '${{ secrets.GIT_OWNER }}',
121 | repo: '${{ secrets.GIT_REPO }}',
122 | issue_number: ${{ steps.pullIssuesVersion.outputs.ISSUE_NUMBER }},
123 | body: '构建结果 [https://github.com/${{ secrets.GIT_OWNER }}/${{ secrets.GIT_REPO }}/releases/tag/${{ steps.pullFridaLatestRelease.outputs.FRIDA_VERSION }}](https://github.com/${{ secrets.GIT_OWNER }}/${{ secrets.GIT_REPO }}/releases/tag/${{ steps.pullFridaLatestRelease.outputs.FRIDA_VERSION }})
\n知识星球::\n\n
'
124 | });
125 | console.log("create issues comment resp:", issuesComment["status"] == 201 ? "success" : "failed" )
126 | }
127 | }
128 | create_release:
129 | needs: check_version
130 | runs-on: ubuntu-20.04
131 | if: needs.check_version.outputs.ALREADY_RELEASE == '0'
132 |
133 | steps:
134 | - uses: actions/create-release@master
135 | id: createRelease
136 | name: Create Runner Release
137 | env:
138 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
139 | with:
140 | tag_name: "${{ needs.check_version.outputs.FRIDA_VERSION }}"
141 | release_name: "${{ needs.check_version.outputs.FRIDA_VERSION }}"
142 | prerelease: false
143 | body: "[Frida ${{ needs.check_version.outputs.FRIDA_VERSION }}](https://github.com/frida/frida/releases/tag/${{ needs.check_version.outputs.FRIDA_VERSION }})\n\n知识星球:\n\n
"
144 |
145 | android_build:
146 | runs-on: ubuntu-20.04
147 | needs: [check_version, create_release]
148 |
149 | steps:
150 | - uses: actions/checkout@v2.3.4
151 |
152 | - uses: actions/setup-node@v2.1.4
153 | with:
154 | node-version: '10'
155 |
156 | # - uses: fusion-engineering/setup-git-credentials@v2
157 | # with:
158 | # credentials: ${{secrets.GIT_CREDENTIALS}}
159 |
160 | - name: set up JDK 1.8
161 | uses: actions/setup-java@v1
162 | with:
163 | java-version: 1.8
164 |
165 | - name: Setup Android NDK
166 | id: setup-ndk
167 | uses: nttld/setup-ndk@v1.0.3
168 | with:
169 | ndk-version: r22
170 |
171 | - name: Set up Python 3.8
172 | uses: actions/setup-python@v2
173 | with:
174 | python-version: 3.8
175 |
176 | - name: install dependencies
177 | run: |
178 | sudo apt-get update && DEBIAN_FRONTEND=noninteractive sudo apt-get install build-essential tree ninja-build gcc-multilib g++-multilib lib32stdc++-9-dev flex bison xz-utils ruby ruby-dev python3-requests python3-setuptools python3-dev python3-pip libc6-dev libc6-dev-i386 -y
179 | sudo gem install fpm -v 1.11.0 --no-document
180 | python3 -m pip install lief
181 |
182 | - name: build frida for Android
183 | shell: bash
184 | run: |
185 | git config --global user.name "${{ secrets.GIT_NAME }}"
186 | git config --global user.email "${{ secrets.GIT_EMAIL }}"
187 | git clone ${{ secrets.PATCH_REPO }}
188 | export ANDROID_NDK_ROOT=${{ steps.setup-ndk.outputs.ndk-path }}
189 | git clone --recurse-submodules https://github.com/frida/frida
190 | cd frida/frida-core
191 | git am ../../Patchs/strongR-frida/frida-core/*.patch
192 | cd ../
193 | make core-android-arm
194 | make core-android-arm64
195 | make core-android-x86
196 | make core-android-x86_64
197 |
198 | - name: Check release version
199 | id: checkReleaseVersion
200 | uses: actions/github-script@v3.1.0
201 | with:
202 | github-token: ${{secrets.GITHUB_TOKEN}}
203 | script: |
204 | try {
205 | const releaseVersion = '${{ needs.check_version.outputs.FRIDA_VERSION }}'
206 | const releaseResponse = await github.repos.getReleaseByTag({
207 | owner: '${{ secrets.GIT_OWNER }}',
208 | repo: '${{ secrets.GIT_REPO }}',
209 | tag: releaseVersion
210 | })
211 | const {
212 | data: { id: releaseId, html_url: htmlUrl, upload_url: uploadUrl }
213 | } = releaseResponse;
214 | core.setOutput('id', releaseId);
215 | core.setOutput('html_url', htmlUrl);
216 | core.setOutput('upload_url', uploadUrl);
217 | core.setOutput('version', releaseVersion);
218 | } catch (e) {
219 | core.setFailed(e.message);
220 | }
221 |
222 | - name: Upload android arm frida-server for strongR-frida
223 | uses: actions/upload-release-asset@v1.0.2
224 | env:
225 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
226 | with:
227 | upload_url: '${{ steps.checkReleaseVersion.outputs.upload_url }}'
228 | asset_path: '${{ github.workspace }}/frida/build/frida-android-arm/bin/frida-server'
229 | asset_name: 'hluda-server-${{ needs.check_version.outputs.FRIDA_VERSION }}-android-arm'
230 | asset_content_type: application/octet-stream
231 |
232 | - name: Upload android arm64 frida-server for strongR-frida
233 | uses: actions/upload-release-asset@v1.0.2
234 | env:
235 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
236 | with:
237 | upload_url: '${{ steps.checkReleaseVersion.outputs.upload_url }}'
238 | asset_path: '${{ github.workspace }}/frida/build/frida-android-arm64/bin/frida-server'
239 | asset_name: 'hluda-server-${{ needs.check_version.outputs.FRIDA_VERSION }}-android-arm64'
240 | asset_content_type: application/octet-stream
241 |
242 | - name: Upload android x86 frida-server for strongR-frida
243 | uses: actions/upload-release-asset@v1.0.2
244 | env:
245 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
246 | with:
247 | upload_url: '${{ steps.checkReleaseVersion.outputs.upload_url }}'
248 | asset_path: '${{ github.workspace }}/frida/build/frida-android-x86/bin/frida-server'
249 | asset_name: 'hluda-server-${{ needs.check_version.outputs.FRIDA_VERSION }}-android-x86'
250 | asset_content_type: application/octet-stream
251 |
252 | - name: Upload android x86_64 frida-server for strongR-frida
253 | uses: actions/upload-release-asset@v1.0.2
254 | env:
255 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
256 | with:
257 | upload_url: '${{ steps.checkReleaseVersion.outputs.upload_url }}'
258 | asset_path: '${{ github.workspace }}/frida/build/frida-android-x86_64/bin/frida-server'
259 | asset_name: 'hluda-server-${{ needs.check_version.outputs.FRIDA_VERSION }}-android-x86_64'
260 | asset_content_type: application/octet-stream
261 |
262 |
263 | - name: Close Version Issues
264 | id: closeVersionIssues
265 | uses: actions/github-script@v3.1.0
266 | with:
267 | github-token: ${{secrets.GITHUB_TOKEN}}
268 | script: |
269 | try {
270 | if (${{ needs.check_version.outputs.ISSUE_NUMBER }} > 0){
271 | const issuesResponse = await github.issues.update({
272 | owner: '${{ secrets.GIT_OWNER }}',
273 | repo: '${{ secrets.GIT_REPO }}',
274 | issue_number: ${{ needs.check_version.outputs.ISSUE_NUMBER }},
275 | state: 'closed'
276 | })
277 | console.log("update issues resp:", issuesResponse["status"] == 200 ? "success" : "failed" )
278 |
279 | const issuesComment = await github.issues.createComment({
280 | owner: '${{ secrets.GIT_OWNER }}',
281 | repo: '${{ secrets.GIT_REPO }}',
282 | issue_number: ${{ needs.check_version.outputs.ISSUE_NUMBER }},
283 | body: '构建结果 [https://github.com/${{ secrets.GIT_OWNER }}/${{ secrets.GIT_REPO }}/releases/tag/${{ needs.check_version.outputs.FRIDA_VERSION }}](https://github.com/${{ secrets.GIT_OWNER }}/${{ secrets.GIT_REPO }}/releases/tag/${{ needs.check_version.outputs.FRIDA_VERSION }})
\n知识星球::\n\n
'
284 | });
285 | console.log("create issues comment resp:", issuesComment["status"] == 201 ? "success" : "failed" )
286 | }
287 | } catch (e) {
288 | core.setFailed(e.message);
289 | }
290 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ### JetBrains template
2 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
3 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
4 |
5 | # User-specific stuff
6 | .idea/**/workspace.xml
7 | .idea/**/tasks.xml
8 | .idea/**/usage.statistics.xml
9 | .idea/**/dictionaries
10 | .idea/**/shelf
11 | /.idea/
12 | /.idea
13 | # Generated files
14 | .idea/**/contentModel.xml
15 |
16 | # Sensitive or high-churn files
17 | .idea/**/dataSources/
18 | .idea/**/dataSources.ids
19 | .idea/**/dataSources.local.xml
20 | .idea/**/sqlDataSources.xml
21 | .idea/**/dynamic.xml
22 | .idea/**/uiDesigner.xml
23 | .idea/**/dbnavigator.xml
24 |
25 | # Gradle
26 | .idea/**/gradle.xml
27 | .idea/**/libraries
28 |
29 | # Gradle and Maven with auto-import
30 | # When using Gradle or Maven with auto-import, you should exclude module files,
31 | # since they will be recreated, and may cause churn. Uncomment if using
32 | # auto-import.
33 | # .idea/artifacts
34 | # .idea/compiler.xml
35 | # .idea/jarRepositories.xml
36 | # .idea/modules.xml
37 | # .idea/*.iml
38 | # .idea/modules
39 | # *.iml
40 | # *.ipr
41 |
42 | # CMake
43 | cmake-build-*/
44 |
45 | # Mongo Explorer plugin
46 | .idea/**/mongoSettings.xml
47 |
48 | # File-based project format
49 | *.iws
50 |
51 | # IntelliJ
52 | out/
53 |
54 | # mpeltonen/sbt-idea plugin
55 | .idea_modules/
56 |
57 | # JIRA plugin
58 | atlassian-ide-plugin.xml
59 |
60 | # Cursive Clojure plugin
61 | .idea/replstate.xml
62 |
63 | # Crashlytics plugin (for Android Studio and IntelliJ)
64 | com_crashlytics_export_strings.xml
65 | crashlytics.properties
66 | crashlytics-build.properties
67 | fabric.properties
68 |
69 | # Editor-based Rest Client
70 | .idea/httpRequests
71 |
72 | # Android studio 3.1+ serialized cache file
73 | .idea/caches/build_file_checksums.ser
74 |
75 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # strongR-frida-android
2 |
3 | Follow [FRIDA](https://github.com/frida/frida) upstream to automatic patch and build an anti-detection version of frida-server for android.
4 |
5 | 跟随 FRIDA 上游自动修补程序,并为 Android 构建反检测版本的 frida-server。
6 |
7 | **Hint: Don't fork this repository**
8 |
9 | ## 构建指定版本frida
10 |
11 | [创建新的issues](https://github.com/anjia0532/strongR-frida-android/issues/new/choose) 选择 `New Version` 模板
12 |
13 | 标题格式为 `[VERSION]frida版本号`,别自己瞎搞,以 [https://github.com/frida/frida/tags](https://github.com/frida/frida/tags) 为准,一般类似 `15.1.19` 这样
14 |
15 | 可以参考 [已有请求编译版本集锦](https://github.com/anjia0532/strongR-frida-android/issues?q=is%3Aissue+label%3Aversion+)
16 |
17 | **注意:**
18 |
19 | 本项目只是提供构建,核心防frida检测都是依赖于 [Git Patch Files](https://github.com/AAAA-Project/Patchs/tree/master/strongR-frida/frida-core)
20 |
21 | 如果patch失败,请去[Git Patch Files](https://github.com/AAAA-Project/Patchs/tree/master/strongR-frida/frida-core) 提issues,本人无力解决这个问题。
22 |
23 | 已知问题,因为git的patch是基于文件的,不同版本的patch可能不能通用,意味着可能存在patch成功但是构建的frida运行不了,或者patch成功,但是构建frida失败,或者直接patch失败。
24 |
25 | 针对这个问题,目前尚无精力完善,可以fork后自行修改或者尝试在本地编译frida。
26 |
27 | ## Patchs
28 |
29 | [Git Patch Files](https://github.com/AAAA-Project/Patchs/tree/master/strongR-frida/frida-core)
30 |
31 | |module|name|
32 | |-|-|
33 | |frida-core|0001-string_frida_rpc.patch|
34 | |frida-core|0002-io_re_frida_server.patch|
35 | |frida-core|0003-pipe_linjector.patch|
36 | |frida-core|0004-io_frida_agent_so.patch|
37 | |frida-core|0005-symbol_frida_agent_main.patch|
38 | |frida-core|0006-thread_gum_js_loop.patch|
39 | |frida-core|0007-thread_gmain.patch|
40 | |frida-core|0008-protocol_unexpected_command.patch|
41 |
42 | ## Download
43 |
44 | [Latest Release](https://github.com/anjia0532/strongR-frida-android/releases/latest)
45 |
46 | ## References
47 |
48 | - [https://github.com/feicong/strong-frida](https://github.com/feicong/strong-frida)
49 | - [https://github.com/qtfreet00/AntiFrida](https://github.com/qtfreet00/AntiFrida)
50 | - [https://t.zsxq.com/miIunQN](https://t.zsxq.com/miIunQN)
51 | - [https://github.com/darvincisec/DetectFrida](https://github.com/darvincisec/DetectFrida)
52 | - [https://github.com/b-mueller/frida-detection-demo](https://github.com/b-mueller/frida-detection-demo)
53 |
54 | ## Thanks
55 |
56 | - [@feicong](https://github.com/feicong)
57 | - [@r0ysue](https://github.com/r0ysue)
58 | - [@hellodword](https://github.com/hellodword)
59 | - [@qtfreet00](https://github.com/qtfreet00)
60 |
61 | ## Discussion
62 |
63 |
64 |
65 | ## Advert
66 |
67 |
68 |
69 |
70 |
--------------------------------------------------------------------------------
/img/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anjia0532/strongR-frida-android/95b4c7426983f5d13b092db37ac4e466df2bb59d/img/1.png
--------------------------------------------------------------------------------
/img/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anjia0532/strongR-frida-android/95b4c7426983f5d13b092db37ac4e466df2bb59d/img/2.png
--------------------------------------------------------------------------------
/img/3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anjia0532/strongR-frida-android/95b4c7426983f5d13b092db37ac4e466df2bb59d/img/3.png
--------------------------------------------------------------------------------
/img/zsxq.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anjia0532/strongR-frida-android/95b4c7426983f5d13b092db37ac4e466df2bb59d/img/zsxq.jpg
--------------------------------------------------------------------------------