-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
executable file
·138 lines (100 loc) · 4.39 KB
/
Makefile
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
work_dir := $(shell pwd)/work
work_dir_metasploit := $(shell pwd)/msf
work_dir_set := $(shell pwd)/set
############## PARROT OS - CORE
# Builds up the Parrot OS - Core
build-core:
cd core/ && docker build -t parrot-core -f Dockerfile .
# Builds up the Parrot OS - Core - Systemd
build-core-systemd:
cd systemd_k8s/core/ && docker build -t parrot-core-systemd -f Dockerfile .
# Run Parrot OS - Core
run-core:
docker run -it --rm --privileged --workdir /usr --network host -v $(work_dir):/core --name parrot-core parrot-core /bin/bash
#Example with the --network host turned off
#docker run -it -p 87:8087 --rm --privileged --workdir /usr -v $(work_dir):/core --name parrot-core parrot-core /bin/bash
# Run Parrot OS - Core - systemd
run-core-s:
docker run -it --rm --privileged --workdir /usr --network host -v $(work_dir):/core-systemd --name parrot-core-systemd parrot-core-systemd /bin/bash
#Example with the --network host turned off
#docker run -it --rm --privileged --workdir /usr -v $(work_dir):/core-systemd --name parrot-core-systemd parrot-core-systemd /bin/bash
# Scan for vuln. in Parrot OS Core Docker Image
core-scan:
trivy image parrot-core
# Scan for vuln. in Parrot OS Core systemd Docker Image
core-s-scan:
trivy image parrot-core-systemd
# Docker stats for Parrot OS Core Docker Image
core-stats:
docker stats -a parrot-core
# Docker stats for Parrot OS Core systemd Docker Image
core-s-stats:
docker stats -a parrot-core-systemd
############## PARROT OS - SECURITY
# Builds up the Parrot OS - Security
build-security:
cd core/ && docker build -t parrot-security -f Dockerfile .
# Builds up the Parrot OS - Core - systemd
build-security-systemd:
cd systemd_k8s/security/ && docker build -t parrot-security-systemd -f Dockerfile .
# Run Parrot OS - Security
run-security:
docker run -it --rm --privileged --workdir /usr --network host -v $(work_dir):/security --name parrot-security parrot-security /bin/bash
#Example with the --network host turned off
#docker run -it -p 87:8087 --rm --privileged --workdir /usr -v $(work_dir):/security --name parrot-security parrot-security /bin/bash
# Run Parrot OS - Security - systemd
run-security-s:
docker run -it --rm --privileged --workdir /usr --network host -v $(work_dir):/security-systemd --name parrot-security-systemd parrot-security-systemd /bin/bash
#Example with the --network host turned off
#docker run -it --rm --privileged --workdir /usr -v $(work_dir):/security-systemd --name parrot-security-systemd parrot-security-systemd /bin/bash
# Scan for vuln. in Parrot OS Security Docker Image
security-scan:
trivy image parrot-security
# Scan for vuln. in Parrot OS Security systemd Docker Image
security-s-scan:
trivy image parrot-security-systemd
# Docker stats for Parrot OS Security Docker Image
security-stats:
docker stats -a parrot-security
# Docker stats for Parrot OS Security systemd Docker Image
security-s-stats:
docker stats -a parrot-security-systemd
############## PARROT - OS - Individual tools
nmap:
docker run -it --rm --privileged --workdir /usr --network host -v $(work_dir):/pnmap --name nmap parrotsec/nmap -f localhost
metasploit:
docker run -it --rm --privileged --workdir /usr --network host -v $(work_dir_metasploit):/root/ --name msf parrotsec/metasploit
pset:
docker run -it --rm --privileged --workdir /usr --network host -v $(work_dir_set):/root/.set parrotsec/set --name set parrotsec/set
bettercap:
docker run -it --rm --privileged --workdir /usr --network host parrotsec/bettercap
sqlmap:
# Usage
docker run -it --rm --privileged --workdir /usr parrotsec/sqlmap <sqlmap options>
# Example
docker run --rm -ti parrotsec/sqlmap -u parrotsec.org --wizard
############## DOCKER COMPOSE:
# Start all services from docker-compose.yaml
up:
docker compose up -d --build
down:
docker compose down -v --rmi all
############## CLEAN:
# Removes Docker volumes
rm-volumes:
rm -rf core/ security/ pnmap/ msf/; sudo chown $(shell whoami):$(shell whoami) ./set; rm -rf set/
# Stop and remove all docker images
rmrf:
docker stop $$(docker ps -q) && docker rm $$(docker ps -aq)
# Docker system prune, option "-a" removes all unused images, not only dangling images
prune:
docker system prune -a
# Docker volume prune, removes all unused volumes
volume-prune:
docker volume prune -f
############## K8s - Kind cluster
cc:
kind create cluster --config=kind/config.yaml
# Deletes Kind cluster
dc:
kind delete cluster