This repository has been archived by the owner on Nov 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy patharch-osint
474 lines (428 loc) Β· 16.4 KB
/
arch-osint
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
#! /bin/bash
#################################################################################
#MIT License #
# #
#Copyright (c) 2023 MikeHorn-git #
# #
#Permission is hereby granted, free of charge, to any person obtaining a copy #
#of this software and associated documentation files (the "Software"), to deal #
#in the Software without restriction, including without limitation the rights #
#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell #
#copies of the Software, and to permit persons to whom the Software is #
#furnished to do so, subject to the following conditions: #
# #
#The above copyright notice and this permission notice shall be included in all #
#copies or substantial portions of the Software. #
# #
#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE #
#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, #
#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE #
#SOFTWARE. #
#################################################################################
#Error message
leave="echo [+] Abort, an unexpected error occured" || exit
#Loggin user variable
user=$(echo "$(logname)")
#Colors variables
GREEN="\e[32m"
YELLOW="\e[33m"
MAGENTA="\e[35m"
CYAN="\e[36m"
GREY="\e[90m"
ENDCOLOR="\e[0m"
LRED="\e[91m"
LGREEN="\e[92m"
LGREY="\e[37m"
#Check if run as root
if [ "$EUID" -ne 0 ]; then
echo -e "${LRED}[*] Abort, run as root${ENDCOLOR}" && exit
fi
#Check internet connection
if ! curl -s -D- https://archlinux.org >/dev/null 2>&1; then
echo -e "${LRED}[+] Abort, run with an internet connection${ENDCOLOR}"
fi
setup() {
echo -e "${GREY}[+] Setup${ENDCOLOR}"
echo -e "${GREY}[*] Update system${ENDCOLOR}"
pacman --noconfirm -Syyu
if command -v pacman &>/dev/null; then
echo -e "${LGREEN}[*] Pacman detected${ENDCOLOR}"
else
echo -e "${LRED}[*] Abort, pacman not detected${ENDCOLOR}" || $leave
fi
if command -v git &>/dev/null; then
echo -e "${LGREEN}[*] Git installed${ENDCOLOR}"
else
echo "${GREY}[*] Install Git${ENDCOLOR}"
pacman --noconfirm -S git
fi
if command -v firefox &>/dev/null; then
echo -e "${LGREEN}[*] Firefox installed${ENDCOLOR}"
else
echo -e "${GREY}[*] Install Firefox${ENDCOLOR}"
pacman --noconfirm -S firefox
fi
if command -v pip3 &>/dev/null; then
echo -e "${LGREEN}[*] Pip3 installed${ENDCOLOR}"
else
echo -e "${GREY}[*] Install Pip3${ENDCOLOR}"
pacman --noconfirm -S python-pip
fi
if command -v unrar &>/dev/null; then
echo -e "${LGREEN}[*] Unrar installed${ENDCOLOR}"
else
echo -e "${GREY}[*] Install Unrar${ENDCOLOR}"
pacman --noconfirm -S unrar
fi
clear
sleep 2
echo -e "${GREY}[*] Add blackarch repositorie${ENDCOLOR}"
curl -s -O "https://blackarch.org/strap.sh"
echo 5ea40d49ecd14c2e024deecf90605426db97ea0c strap.sh | sha1sum -c
chmod +x strap.sh
./strap.sh
pacman --noconfirm -Syyu
echo -e "${GREY}[*] Add yay${ENDCOLOR}"
if command -v yay &>/dev/null; then
echo -e "${LGREEN}[*] Yay installed${ENDCOLOR}"
else
echo -e "${GREY}[*] Install Yay${ENDCOLOR}"
pacman --noconfirm -S yay
fi
clear
sleep 5
}
tools() {
echo -e "${YELLOW}[+] Install tools${ENDCOLOR}"
echo -e "${YELLOW}[*] With pacman${ENDCOLOR}"
pacman --noconfirm -S amass atscan binwalk cardpwn crosslinked elasticsearch email2phonenumber exiflooter exiv2 facebookosint fbi fierce finalrecon \
githound gitleaks gobuster goofuzz gophish harpoon holehe instagramosint kamerka linkedin2username maigret maltego metagoofil mpv nmap onionsearch \
osintgram phoneinfoga phonia photon protosint pwnedornot python-shodan python-social-analyzer recon-ng sherlock skiptracer slackpirate sleuthkit \
spiderfoot sqlitebrowser stegoveritas theharvester tinfoleak2 torbrowser-launcher torcrawl translate-shell trape vt-cli wafw00f \
whatbreach yt-dlp
clear
sleep 2
echo -e "${YELLOW}[*] With AUR${ENDCOLOR}"
sudo -u "$user" yay --noconfirm -S python-bdfr-git chatgpt-shell-cli-git dumpsterdiver-git gallery-dl-bin google-earth-pro instaloader ipinfocli \
pinterest-downloader-git pwndb ripme-bin waybackpy
clear
sleep 2
echo -e "${YELLOW}[*] From github in /opt/tools${ENDCOLOR}"
if [ ! -d /opt/tools ]; then
mkdir -p /opt/tools
else
"${LRED}[+] Abort, /opt/tools already exist${ENDCOLOR}"
fi
cd /opt/tools || $leave
git clone https://github.com/p1ngul1n0/blackbird.git
git clone https://github.com/Lazza/Carbon14.git
git clone https://github.com/initstring/cloud_enum.git
git clone https://github.com/Group-IB/cloud_sherlock.git
git clone https://github.com/mhaskar/ExchangeFinder.git
git clone https://github.com/Narasimha1997/fake-sms.git
git clone https://github.com/HunxByts/GhostTrack.git
git clone https://github.com/sharsil/mailcat.git
git clone https://github.com/AzizKpln/Moriarty-Project.git
git clone https://github.com/Malfrats/OSINT-Map.git
git clone https://github.com/C3n7ral051nt4g3ncy/Prot1ntelligence.git
git clone https://github.com/mxrch/revealin.git
git clone https://github.com/GuidoBartoli/sherloq.git
git clone https://github.com/Viralmaniar/SMWYG-Show-Me-What-You-Got.git
git clone https://github.com/snooppr/snoop.git
git clone https://github.com/NicholasDollick/Snooper.git
git clone https://github.com/pielco11/telescan.git
git clone https://github.com/twintproject/twint-zero
cd twint-zero || $leave
go mod init twint-zero
go mod tidy
cd /opt/tools || $leave
git clone https://github.com/BishopFox/unredacter.git
git clone https://github.com/C3n7ral051nt4g3ncy/WebOSINT.git
git clone https://github.com/WebBreacher/yoga.git
git clone https://github.com/s0md3v/Zen.git
mkdir /opt/tools/sonicvisualiser
cd /opt/tools/sonicvisualiser || $leave
curl https://code.soundsoftware.ac.uk/attachments/download/2847/SonicVisualiser-4.5.2-x86_64.AppImage -o sonicvisualiser.AppImage
chmod +x sonicvisualiser.AppImage
clear
sleep 2
echo -e "${YELLOW}[+] Install post dependencies${ENDCOLOR}"
pacman --noconfirm -S inetutils python-aiosmtplib python-ascii_graph python-cachetools python-gevent python-html2text python-opencv \
python-playwright python-praw python-pycrtsh python-pyvirtualdisplay python-requests-html python-tzlocal speedtest-cli
sudo -u "$user" yay --noconfirm -S python-playsound python-pyrogram python-tgcrypto
clear
sleep 2
echo -e "${YELLOW}[*] With pip3${ENDCOLOR}"
pip3 install --break-system-packages ghunt gitfive h8mail ignorant instagram-location-search masto nqntnqnqmb octosuite sterra telepathy tiktok-downloader \
xeuledoc
pip3 install --break-system-packages git+https://github.com/novitae/emdofi.git
chown -R "$user" /opt/tools/
ln -s /opt/tools /home/"$user"/Desktop/tools
cd /home/"$user"/Desktop || $leave
clear
sleep 5
}
resources() {
echo -e "${GREEN}[+] Download resources in /opt/resources${ENDCOLOR}"
if [ ! -d /opt/resources ]; then
mkdir -p /opt/resources
else
echo -e "${LRED}[*] Abort, /opt/resources already exist${ENDCOLOR}" && exit
fi
mkdir /opt/resources/data
mkdir /opt/resources/guides
mkdir /opt/resources/lists
echo -e "${GREEN}[*] Download awesome lists${ENDCOLOR}"
cd /opt/resources/lists || $leave
git clone https://github.com/C3n7ral051nt4g3ncy/OSINT_Inception-links.git
curl -s https://raw.githubusercontent.com/jivoi/awesome-osint/master/README.md -o awesome-osint.md
curl -s https://raw.githubusercontent.com/r3mlab/datajournalism-resources/master/README.md -o datajournalism-resources.md
curl -s https://raw.githubusercontent.com/cqcore/OSINT-Browser-Extensions/main/README.md -o osint-browser-extensions.md
curl -s https://raw.githubusercontent.com/Ph055a/OSINT_Collection/master/README.md -o osint-collection.md
echo -e "${GREEN}[*] Download bookmarks${ENDCOLOR}"
cd /home/"$user"/Desktop || $leave
curl -s -O https://raw.githubusercontent.com/MikeHorn-git/Arch-Osint/main/bookmarks.html
chown "$user" ./bookmarks.html
echo -e "${GREEN}[*] Download osint guides${ENDCOLOR}"
cd /opt/resources/guides || $leave
curl -s https://anonymousplanet.org/export/guide.pdf -o anonymousplanet.pdf
curl -s https://raw.githubusercontent.com/OffcierCia/non-typical-OSINT-guide/main/README.md -o non-typical-OSINT-guide.md
echo -e "${GREEN}[*] Download CTI sources from the deep and dark web${ENDCOLOR}"
cd /opt/resources/data || $leave
git clone https://github.com/fastfire/deepdarkCTI.git
echo -e "${GREEN}[*] Download Google dork list${ENDCOLOR}"
git clone https://github.com/BullsEye0/google_dork_list.git
echo -e "{GREEN}[*] Download international sanctions lists${ENDCOLOR}"
curl -s https://github.com/bigger312/Sanctions-Lists/raw/master/sanction%20Lists%20GIT.xls -o sanction-lists.xls
chown "$user" -R /opt/resources
ln -s /opt/resources /home/"$user"/Desktop/resources
clear
sleep 5
}
misc() {
echo -e "${CYAN}[+] Install miscellaneous features${ENDCOLOR}"
echo -e "${GREEN}[*] Download desktop background${ENDCOLOR}"
cd /home/"$user"/Desktop || $leave
curl -s -O https://raw.githubusercontent.com/MikeHorn-git/Arch-Osint/main/background.jpg
chown "$user" ./background.jpg
echo -e "${CYAN}[*] Hardened arch linux system${ENDCOLOR}"
echo -e "${CYAN}[-] Install hardened kernel${ENDCOLOR}"
pacman --noconfirm linux-hardened-headers linux-hardened
grub-mkconfig -o /boot/grub/grub.cfg
echo -e "${CYAN}[-] Install microcode packages${ENDCOLOR}"
pacman --noconfirm -S amd-ucode intel-ucode
echo -e "${CYAN}[-] Disable core dump${ENDCOLOR}"
sysctl kernel.core_pattern= | /bin/false
mkdir -p /etc/systemd/coredump.conf.d/
bash -c "echo ' [Coredump]
Storage=none' > /etc/systemd/coredump.conf.d/disable.conf"
echo -e "${CYAN}[-] Install hardened tools${ENDCOLOR}"
pacman --noconfirm -S arch-audit haveged lynis
systemctl enable --now haveged.service
echo -e "${CYAN}[-] Restrict files permission${ENDCOLOR}"
chmod 700 /home/"$user"
chmod 700 /boot /usr/src /lib/modules /usr/lib/modules
echo -e "${CYAN}[-] Blacklist kernel modules${ENDCOLOR}"
bash -c "echo ' install firewire-core /bin/true
install thunderbolt /bin/true
install dccp /bin/false
install sctp /bin/false
install rds /bin/false
install tipc /bin/false
install n-hdlc /bin/false
install ax25 /bin/false
install netrom /bin/false
install x25 /bin/false
install rose /bin/false
install decnet /bin/false
install econet /bin/false
install af_802154 /bin/false
install ipx /bin/false
install appletalk /bin/false
install psnap /bin/false
install p8023 /bin/false
install p8022 /bin/false
install can /bin/false
install atm /bin/false
install bluetooth /bin/false
install uvcvideo /bin/false
install vivid /bin/false
install cifs /bin/true
install nfs /bin/true
install nfsv3 /bin/true
install nfsv4 /bin/true
install ksmbd /bin/true
install gfs2 /bin/true
install cramfs /bin/false
install freevxfs /bin/false
install jffs2 /bin/false
install hfs /bin/false
install hfsplus /bin/false
install squashfs /bin/false
install udf /bin/false' > /etc/modprobe.d/blacklist.conf"
clear
echo -e "${CYAN}[*] Hardened firefox with user.js${ENDCOLOR}"
cd /home/"$user"/Desktop || $leave
curl -s -O https://raw.githubusercontent.com/arkenfox/user.js/master/user.js
chown "$user" ./user.js
echo -e "${CYAN}[*] Install and configure ufw with default policy${ENDCOLOR}"
pacman --noconfirm -S ufw
systemctl enable ufw.service --now
ufw default deny incoming
ufw default allow outgoing
ufw enable
echo -e "${GREEN}[*] Install joplin with Osint notebook${ENDCOLOR}"
sudo -u "$user" yay --noconfirm -S joplin-appimage
cd /opt/resources/data || $leave
curl -s -O https://github.com/tjnull/TJ-OSINT-Notebook/raw/main/TJ-OSINT-Notebook-v1.jex
chown "$user" ./TJ-OSINT-Notebook-v1.jex
echo -e "${CYAN}[*] Install macchanger with systemd unit${ENDCOLOR}"
pacman --noconfirm -S macchanger
bash -c "echo ' [Unit]
Description=macchanger on %I
Wants=network-pre.target
Before=network-pre.target
BindsTo=sys-subsystem-net-devices-%i.device
After=sys-subsystem-net-devices-%i.device
[Service]
ExecStart=/usr/bin/macchanger -e %I
Type=oneshot
[Install]
WantedBy=multi-user.target' > /etc/systemd/system/macchanger.service"
systemctl enable macchanger.service --now
echo -e "${CYAN}[*] Install privacy tools${ENDCOLOR}"
pacman --noconfirm -S bleachbit mat2 proxychains-ng torctl
echo -e "${CYAN}[*] Install rkhunter${ENDCOLOR}"
pacman --noconfirm -S rkhunter
echo -e "${CYAN}[*] Install vim with custom vimrc${ENDCOLOR}"
if command -v vim &>/dev/null; then
echo -e "${LGREEN}[-] Vim installed${ENDCOLOR}"
else
pacman --noconfirm -S vim 2>/dev/null
echo -e "${CYAN}[-] Install Vim${ENDCOLOR}"
fi
sudo -u "$user" git clone --depth=1 https://github.com/amix/vimrc.git /home/"$user"/.vim_runtime
sudo -u "$user" sh ~/.vim_runtime/install_awesome_vimrc.sh
clear
echo -e "${CYAN}[*] Install waydroid${ENDCOLOR}"
sudo -u "$user" yay --noconfirm -S waydroid binder_linux-dkms
systemctl enable waydroid-container.service --now
echo -e "${CYAN}[*] Configure zsh shell${ENDCOLOR}"
if [ "$(echo "$SHELL")" == /bin/zsh ]; then
echo -e "${LGREEN}[-] Zsh detected${ENDCOLOR}"
else
echo -e "${CYAN}[-] Install Zsh${ENDCOLOR}"
pacman --noconfirm -S zsh
sudo -u "$user" chsh -s /bin/zsh
echo -e "${CYAN}[-] Change default shell to zsh${ENDCOLOR}"
fi
cd /home/"$user"/Desktop || $leave
echo -e "${CYAN}[-] Install OhMyZsh${ENDCOLOR}"
sudo -u "$user" sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
clear
sleep 5
}
todo() {
echo -e "${MAGENTA}[+] Tasks to be done manually${ENDCOLOR}"
sleep 1
echo -e "${MAGENTA}[*] Change desktop background${ENDCOLOR}"
sleep 1
echo -e "${MAGENTA}[*] Configure bleachbit and torctl for better privacy${ENDCOLOR}"
sleep 1
echo -e "${MAGENTA}[*] Import bookmarks in firefox${ENDCOLOR}"
sleep 1
echo -e "${MAGENTA}[*] Import user.js in firefox directory under ~/.mozilla/${ENDCOLOR}"
sleep 1
echo -e "${MAGENTA}[*] Import Osint jex in joplin from /opt/resources/data${ENDCOLOR}"
sleep 7
exit 1
}
usage() {
echo "Arch-Osint Linux OS VM based on Blackarch."
echo
echo "Syntax: arch-osint -[h|v|a|t|r|m]"
echo "options:"
echo "-h Print this Help."
echo "-v Print software version."
echo "-a Install all scripts."
echo "-t Install tools."
echo "-r Install resources."
echo "-m Install miscellaneous features."
exit 1
}
art() {
echo -e " ........ ...."
echo -e " .:::...."
echo -e " :--:.. .."
echo -e " .:--. .... .."
echo -e " -=:. . . ...::... . . .."
echo -e " :---::. . .::....... ..::::. . ."
echo -e " ==:--:..... ..-:...........:......-"
echo -e " *+:--:... ....:-----:::........ ."
echo -e " **::--:... :::..::--.. .......... .."
echo -e " +*=.--::. .-:::. .. ... .."
echo -e " :#==-::. . .::. :. .."
echo -e " ++=+==: .:: . . .. .."
echo -e " .*--+==: . .... .."
echo -e " :#-:==: .... . ....... ."
echo -e " -*-:=. .: ..... .... . . ."
echo -e " :+:== ... . . ."
echo -e " .+::. . .."
echo -e " +-::: .."
echo -e " :*:-- .. ..."
echo -e " =+: .: .."
echo -e " ++: .:"
echo -e " +*:..... . ."
echo -e " =+: ...... ....."
echo -e " :-:: .... . ."
echo -e " :--."
echo -e " :-:."
echo -e " .::::.."
echo -e " .::::."
echo -e " .................."
}
#Display an help message when no args
if [[ ${#} -eq 0 ]]; then
echo "Help: arch-osint -h"
fi
optstring=":hvatrm"
while getopts ${optstring} arg; do
case "${arg}" in
h)
usage
;;
v)
art
echo -e " ${LGREY}Version 1.0${ENDCOLOR}"
;;
a)
art
setup
tools
resources
misc
todo
;;
t)
art
setup
tools
;;
r)
art
resources
todo
;;
m)
art
misc
;;
?)
echo "Invalid option: -${OPTARG}"
echo "Help: arch-osint -h"
;;
esac
done