README.md 2.78 KB
Newer Older
g0t mi1k's avatar
g0t mi1k committed
1
2
## Kali-ARM Build-Scripts
Kali Linux ARM build-scripts.
muts's avatar
muts committed
3

4
These are the same build scripts that we use to generate the pre-generated official Kali Linux ARM images, found here: <https://www.kali.org/get-kali/>
5

g0t mi1k's avatar
g0t mi1k committed
6
There are additional scripts included in this repository, supporting more devices, but these will need to be built in order for them to be used.
7

8
For more information, please see: <https://www.kali.org/docs/arm/>
9

Arszilla's avatar
Arszilla committed
10
---
11

g0t mi1k's avatar
g0t mi1k committed
12
### Building
Arszilla's avatar
Arszilla committed
13
- These scripts are tested on Kali Linux `arm64`, `x64`, and `x86` installations only _(We **recommend x64**)_
g0t mi1k's avatar
g0t mi1k committed
14
- Make sure you run the `./common.d/build_deps.sh` script before trying to build an image, as this installs all required dependencies
g0t mi1k's avatar
g0t mi1k committed
15
- You will need at **least 8GB of RAM or use SWAP file**
mutsio's avatar
mutsio committed
16

g0t mi1k's avatar
g0t mi1k committed
17
An example workflow to build a _[Raspberry Pi 4](https://www.kali.org/docs/arm/raspberry-pi-4/) Kali Linux image_ would look like:
g0t mi1k's avatar
g0t mi1k committed
18
19

```
Arszilla's avatar
Arszilla committed
20
21
22
23
24
$ cd ~/
$ git clone https://gitlab.com/kalilinux/build-scripts/kali-arm
$ cd ~/kali-arm/
$ sudo ./common.d/build_deps.sh
$ sudo ./raspberry-pi.sh
g0t mi1k's avatar
g0t mi1k committed
25
26
```

g0t mi1k's avatar
g0t mi1k committed
27
- Depending on your system hardware & network connectivity, will depend on how long it will take to build _(4 core CPU, 8GB RAM, SSD inside a VM takes using a [local repo](https://www.kali.org/docs/community/setting-up-a-kali-linux-mirror/) about 100 minutes per script)_
Arszilla's avatar
Arszilla committed
28
- On x64 systems, after the script finishes running, you will have an image file located in `~/kali-arm/images/` called `kali-linux-2021.3-rpi-armhf.img.xz`
29
- On x86 systems, as they do not have enough RAM to compress the image, after the script finishes running, you will have an image file located in `~/kali-arm/images/` called `kali-linux-2021.3-rpi-armhf.img`
g0t mi1k's avatar
g0t mi1k committed
30
31
  - _Should you want to try and shrink the file to make it easier to distribute, you will need to use **your own preferred compression**_.

Arszilla's avatar
Arszilla committed
32
---
g0t mi1k's avatar
g0t mi1k committed
33

g0t mi1k's avatar
g0t mi1k committed
34
### Help
g0t mi1k's avatar
g0t mi1k committed
35
36
On any build script, add `--help`. Example:

g0t mi1k's avatar
g0t mi1k committed
37
```
38
$ ./raspberry-pi.sh --help
Fran Rodríguez's avatar
Fran Rodríguez committed
39
 Usage commands:
Fran Rodríguez's avatar
Fran Rodríguez committed
40
# Architectures (arm64, armel, armhf)
41
./raspberry-pi.sh --arch arm64 or ./raspberry-pi.sh -a armhf
g0t mi1k's avatar
g0t mi1k committed
42

Fran Rodríguez's avatar
Fran Rodríguez committed
43
# Desktop manager (xfce, gnome, kde, i3, i3-gaps, lxde, mate, e17 or none)
44
./raspberry-pi.sh --desktop kde or ./raspberry-pi.sh --desktop=kde
g0t mi1k's avatar
g0t mi1k committed
45

Fran Rodríguez's avatar
Fran Rodríguez committed
46
# Minimal image - no desktop manager
47
./raspberry-pi.sh --minimal or ./raspberry-pi.sh -m
Fran Rodríguez's avatar
Fran Rodríguez committed
48
49

# Slim image - no desktop manager & cli tools
50
./raspberry-pi.sh --slim or ./raspberry-pi.sh -s
51
52

# Enable debug & log file (./logs/<file>.log)
53
./raspberry-pi.sh --debug or ./raspberry-pi.sh -d
g0t mi1k's avatar
g0t mi1k committed
54

55
# Perform extra checks on the images build
56
./raspberry-pi.sh --extra or ./raspberry-pi.sh -x
57

g0t mi1k's avatar
g0t mi1k committed
58
# Help screen (this)
59
./raspberry-pi.sh --help or ./raspberry-pi.sh -h
g0t mi1k's avatar
g0t mi1k committed
60
61
```

Arszilla's avatar
Arszilla committed
62
---
g0t mi1k's avatar
g0t mi1k committed
63
64

### Custom Values
Arszilla's avatar
Arszilla committed
65
Changing [builder.txt](builder.txt.example) will allow for custom values, such as using a local LAN mirror:
g0t mi1k's avatar
g0t mi1k committed
66
67

```
68
$ echo 'mirror="http://192.168.1.100/kali"' > ./builder.txt
g0t mi1k's avatar
g0t mi1k committed
69
70
```

Arszilla's avatar
Arszilla committed
71
---
g0t mi1k's avatar
g0t mi1k committed
72

73
Thu Jan 27 15:47:28 UTC 2022