0%

Pwnagotchi: using docker image to install bettercap

This time, I try to install bettercap docker image on raspberry Pi3B+.

Install dependency package first

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
root@treehouses:~# apt install libnetfilter-queue1
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
point-rpi
Use 'apt autoremove' to remove it.
The following NEW packages will be installed:
libnetfilter-queue1
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 10.7 kB of archives.
After this operation, 36.9 kB of additional disk space will be used.
Get:1 http://mirrors.ocf.berkeley.edu/raspbian/raspbian buster/main armhf libnetfilter-queue1 armhf 1.0.3-1 [10.7 kB]
Fetched 10.7 kB in 1s (12.1 kB/s)
Selecting previously unselected package libnetfilter-queue1.
(Reading database ... 154638 files and directories currently installed.)
Preparing to unpack .../libnetfilter-queue1_1.0.3-1_armhf.deb ...
Unpacking libnetfilter-queue1 (1.0.3-1) ...
Setting up libnetfilter-queue1 (1.0.3-1) ...
Processing triggers for libc-bin (2.28-10+rpi1) ...
root@treehouses:~# apt show libnetfilter-queue1

Package: libnetfilter-queue1
Version: 1.0.3-1
Priority: optional
Section: libs
Source: libnetfilter-queue
Maintainer: Debian Netfilter Packaging Team <pkg-netfilter-team@lists.alioth.debian.org>
Installed-Size: 36.9 kB
Depends: libc6 (>= 2.4), libmnl0 (>= 1.0.3-4~), libnfnetlink0
Homepage: http://www.netfilter.org/projects/libnetfilter_queue/
Download-Size: 10.7 kB
APT-Manual-Installed: yes
APT-Sources: http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
Description: Netfilter netlink-queue library
libnetfilter_queue is a userspace library providing an API to packets
that have been queued by the kernel packet filter. It is part of a
system that deprecates the old ip_queue / libipq mechanism.

Install bettercap docker image

1
2
3
4
5
6
7
8
9
10
11
12
13
14
root@treehouses:~# docker pull bettercap/bettercap
Using default tag: latest
latest: Pulling from bettercap/bettercap
bdf0201b3a05: Pull complete
1465d5cbc6a8: Pull complete
59da5739fafc: Pull complete
86a51d61314d: Pull complete
544433dabf48: Pull complete
Digest: sha256:c7497e0839238a0a0d4920e583e765d7b53f794dea70f85882baa42c06ad8cbd
Status: Downloaded newer image for bettercap/bettercap:latest
docker.io/bettercap/bettercap:latest
root@treehouses:~# docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
bettercap/bettercap latest c921a193dd94 6 months ago 51.1MB

pull latest source code build of the image

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
root@treehouses:~# docker pull bettercap/dev
Using default tag: latest
latest: Pulling from bettercap/dev
89d9c30c1d48: Pull complete
cb311b5b246f: Pull complete
76358ea99b60: Pull complete
2d8598aa817c: Pull complete
7eb6779e4cc2: Pull complete
Digest: sha256:d7fe702b51a451349e10783e614e127330c8aa78eb2b7bb651fba289def280ad
Status: Downloaded newer image for bettercap/dev:latest
docker.io/bettercap/dev:latest
root@treehouses:~# docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
bettercap/dev latest ff15dd5f24e3 9 days ago 50.8MB
bettercap/bettercap latest c921a193dd94 6 months ago 51.1MB

run bettercap image

1
2
root@treehouses:~# docker run -it --privileged --net=host bettercap/bettercap -h bettercap
standard_init_linux.go:211: exec user process caused "exec format error"

it shows failed.
I found this image is built for x86_64, I can’t run it on Pi(ARM).