Skip to content

Commit d7e3958

Browse files
Change docker to download rather than build frida-inject
1 parent 836bc63 commit d7e3958

File tree

1 file changed

+17
-76
lines changed

1 file changed

+17
-76
lines changed

Dockerfile

Lines changed: 17 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ RUN ARCH=arm64 \
8787
################################################################################
8888
# KERNEL-ARM64BE #
8989
################################################################################
90-
FROM platform as kernel-arm64be
90+
FROM platform AS kernel-arm64be
9191
COPY --from=ghcr.io/frida/x-tools-linux-be-target /root/Image.gz /root/zImage-arm64be
9292

9393
################################################################################
@@ -160,73 +160,6 @@ RUN make \
160160
-j8 \
161161
install
162162

163-
################################################################################
164-
# FRIDA SOURCE #
165-
################################################################################
166-
FROM platform AS frida-source
167-
WORKDIR /root/
168-
RUN git clone -b 17.1.4 https://github.com/frida/frida-core.git
169-
170-
################################################################################
171-
# FRIDA-arm32 #
172-
################################################################################
173-
FROM ghcr.io/frida/x-tools-linux-armhf:latest AS frida-arm32
174-
COPY --from=frida-source /root/frida-core /root/frida-core
175-
WORKDIR /root/frida-core
176-
RUN ./configure \
177-
--host=$XTOOLS_HOST
178-
RUN make
179-
180-
################################################################################
181-
# FRIDA-arm32be #
182-
################################################################################
183-
FROM ghcr.io/frida/x-tools-linux-armbe8:latest AS frida-arm32be
184-
COPY --from=frida-source /root/frida-core /root/frida-core
185-
WORKDIR /root/frida-core
186-
RUN ./configure \
187-
--host=$XTOOLS_HOST
188-
RUN make
189-
190-
################################################################################
191-
# FRIDA-arm64 #
192-
################################################################################
193-
FROM ghcr.io/frida/x-tools-linux-arm64:latest AS frida-arm64
194-
COPY --from=frida-source /root/frida-core /root/frida-core
195-
WORKDIR /root/frida-core
196-
RUN ./configure \
197-
--host=$XTOOLS_HOST
198-
RUN make
199-
200-
################################################################################
201-
# FRIDA-arm64be #
202-
################################################################################
203-
FROM ghcr.io/frida/x-tools-linux-arm64be:latest AS frida-arm64be
204-
COPY --from=frida-source /root/frida-core /root/frida-core
205-
WORKDIR /root/frida-core
206-
RUN ./configure \
207-
--host=$XTOOLS_HOST
208-
RUN make
209-
210-
################################################################################
211-
# FRIDA-x86 #
212-
################################################################################
213-
FROM ghcr.io/frida/x-tools-linux-x86:latest AS frida-x86
214-
COPY --from=frida-source /root/frida-core /root/frida-core
215-
WORKDIR /root/frida-core
216-
RUN ./configure \
217-
--host=$XTOOLS_HOST
218-
RUN make
219-
220-
################################################################################
221-
# FRIDA-x64 #
222-
################################################################################
223-
FROM ghcr.io/frida/x-tools-linux-x86_64:latest AS frida-x64
224-
COPY --from=frida-source /root/frida-core /root/frida-core
225-
WORKDIR /root/frida-core
226-
RUN ./configure \
227-
--host=$XTOOLS_HOST
228-
RUN make
229-
230163
################################################################################
231164
# INITRD-BASE #
232165
################################################################################
@@ -267,8 +200,10 @@ RUN aarch64-linux-gnu-gcc \
267200
RUN cp -av /usr/arm-linux-gnueabihf/lib/ /root/initramfs/lib
268201
RUN cp -av /usr/aarch64-linux-gnu/lib/ /root/initramfs/lib64
269202
RUN ln -s /lib64/ld-linux-aarch64.so.1 /root/initramfs/lib/ld-linux-aarch64.so.1
270-
COPY --from=frida-arm64 /root/frida-core/build/inject/frida-inject /root/initramfs/bin/frida-inject-64
271-
COPY --from=frida-arm32 /root/frida-core/build/inject/frida-inject /root/initramfs/bin/frida-inject-32
203+
RUN wget -qO- https://github.com/frida/frida/releases/download/17.1.4/frida-inject-17.1.4-linux-arm64.xz | xz -d > /root/initramfs/bin/frida-inject-64
204+
RUN chmod +x /root/initramfs/bin/frida-inject-64
205+
RUN wget -qO- https://github.com/frida/frida/releases/download/17.1.4/frida-inject-17.1.4-linux-armhf.xz | xz -d > /root/initramfs/bin/frida-inject-32
206+
RUN chmod +x /root/initramfs/bin/frida-inject-32
272207
COPY assets/target/target.c /root/target.c
273208
COPY assets/target/module.c /root/module.c
274209
RUN aarch64-linux-gnu-gcc \
@@ -331,8 +266,10 @@ COPY assets/initrd/passwd /root/initramfs/etc/passwd
331266
COPY assets/initrd/motd /root/initramfs/etc/motd
332267
COPY assets/initrd/.profile /root/initramfs/.profile
333268
COPY assets/initrd/.cshellrc /root/initramfs/.cshellrc
334-
COPY --from=frida-arm64be /root/frida-core/build/inject/frida-inject /root/initramfs/bin/frida-inject-64
335-
COPY --from=frida-arm32be /root/frida-core/build/inject/frida-inject /root/initramfs/bin/frida-inject-32
269+
RUN wget -qO- https://github.com/frida/frida/releases/download/17.1.4/frida-inject-17.1.4-linux-arm64be.xz | xz -d > /root/initramfs/bin/frida-inject-64
270+
RUN chmod +x /root/initramfs/bin/frida-inject-64
271+
RUN wget -qO- https://github.com/frida/frida/releases/download/17.1.4/frida-inject-17.1.4-linux-armbe8.xz | xz -d > /root/initramfs/bin/frida-inject-32
272+
RUN chmod +x /root/initramfs/bin/frida-inject-32
336273
COPY assets/target/target.c /root/target.c
337274
COPY assets/target/module.c /root/module.c
338275
RUN aarch64_be-linux-gnu-gcc \
@@ -403,8 +340,10 @@ RUN cp /usr/i686-linux-gnu/lib/libm.so.6 /root/initramfs/lib/libm.so.6
403340
RUN cp /usr/i686-linux-gnu/lib/librt.so.1 /root/initramfs/lib/librt.so.1
404341
RUN cp /usr/i686-linux-gnu/lib/libpthread.so.0 /root/initramfs/lib/libpthread.so.0
405342
RUN cp /usr/i686-linux-gnu/lib/libc.so.6 /root/initramfs/lib/libc.so.6
406-
COPY --from=frida-x64 /root/frida-core/build/inject/frida-inject /root/initramfs/bin/frida-inject-64
407-
COPY --from=frida-x86 /root/frida-core/build/inject/frida-inject /root/initramfs/bin/frida-inject-32
343+
RUN wget -qO- https://github.com/frida/frida/releases/download/17.1.4/frida-inject-17.1.4-linux-x86_64.xz | xz -d > /root/initramfs/bin/frida-inject-64
344+
RUN chmod +x /root/initramfs/bin/frida-inject-64
345+
RUN wget -qO- https://github.com/frida/frida/releases/download/17.1.4/frida-inject-17.1.4-linux-x86.xz | xz -d > /root/initramfs/bin/frida-inject-32
346+
RUN chmod +x /root/initramfs/bin/frida-inject-32
408347
COPY assets/target/target.c /root/target.c
409348
COPY assets/target/module.c /root/module.c
410349
RUN gcc \
@@ -469,8 +408,10 @@ COPY --from=initrd-arm64 /root/initramfs-arm64.img /root/initramfs-arm64.img
469408
COPY --from=initrd-arm64be /root/initramfs-arm64be.img /root/initramfs-arm64be.img
470409
COPY --from=initrd-x64 /root/initramfs-x64.img /root/initramfs-x64.img
471410

472-
COPY --from=frida-x64 /root/frida-core/build/inject/frida-inject /usr/bin/frida-inject-64
473-
COPY --from=frida-x86 /root/frida-core/build/inject/frida-inject /usr/bin/frida-inject-32
411+
RUN wget -qO- https://github.com/frida/frida/releases/download/17.1.4/frida-inject-17.1.4-linux-x86_64.xz | xz -d > /usr/bin/frida-inject-64
412+
RUN chmod +x /usr/bin/frida-inject-64
413+
RUN wget -qO- https://github.com/frida/frida/releases/download/17.1.4/frida-inject-17.1.4-linux-x86.xz | xz -d > /usr/bin/frida-inject-32
414+
RUN chmod +x /usr/bin/frida-inject-32
474415

475416
COPY --from=initrd-x64 /root/initramfs/bin/target64 /usr/bin/target64
476417
COPY --from=initrd-x64 /root/initramfs/bin/module64.so /usr/bin/module64.so

0 commit comments

Comments
 (0)