-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstartScript.sh
117 lines (79 loc) · 2 KB
/
startScript.sh
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
#!/bin/bash
echo "Current users on system"
who
mkdir ~/vbox
echo
echo "Copying /usr/bin and /usr/sbin..."
cp -R /usr/bin ~/vbox/usrBinBack
cp -R /usr/sbin ~/vbox/usrsSbinBack
cp -R /bin ~/vbox/binBack
cp -R /sbin ~/vbox/sbinBack
cp /etc/hosts ~/vbox/hosts
cp /etc/resolv.conf ~/vbox/resolv.conf
echo
echo "Done..."
echo
echo "Stoping cron service"
systemctl stop crond
echo
echo "Printing crontabs"
echo
ls /var/spool/cron
ls /var/spool/cron/crontabs
ls /etc/cron.d
echo "CHECK THESE FILES ^^^"
echo 'jimmu:VeRsiC@' | chpasswd
echo 'suizei:RoxiMl#' | chpasswd
echo 'annei:LAinyD$' | chpasswd
echo 'itoku:DELOwA!' | chpasswd
echo 'root:ERculT@' | chpasswd
echo 'kinmei:VeRsiC@' | chpasswd
echo 'bidatsu:RoxiMl#' | chpasswd
echo 'kotoku:LAinyD$' | chpasswd
echo 'yomei:DELOwA!' | chpasswd
echo 'sushun:ERculT@' | chpasswd
echo 'suiko:VeRsiC@' | chpasswd
echo 'jomei:RoxiMl#' | chpasswd
echo 'kogyoku:LAinyD$' | chpasswd
echo 'itoku:DELOwA!' | chpasswd
echo 'saimei:ERculT@' | chpasswd
echo 'tenji:VeRsiC@' | chpasswd
echo 'kobun:RoxiMl#' | chpasswd
echo 'jito:LAinyD$' | chpasswd
echo 'monmu:DELOwA!' | chpasswd
echo 'geme:ERculT@' | chpasswd
echo
echo
echo
echo "Creating backup user"
useradd naruto
echo 'naruto:IdaveR#' | chpasswd
gpasswd -a naruto sudo
echo
echo "Sudo Group users:"
echo
cat /etc/group | grep "sudo"
echo
echo "Sudoers permissions:"
cat /etc/sudoers | grep "ALL"
echo
echo "Iptables Rules now"
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -p tcp --dport 53 -j ACCEPT
iptables -A INPUT -p icmp --icmp-type 8 -j ACCEPT
iptables -A INPUT -p icmp --icmp-type 0 -j ACCEPT
# DROP ALL
iptables -A INPUT -j DROP
iptables -L
echo
echo "Fucking with firewall"
echo
cp /sbin/iptables /sbin/ipt
rm /sbin/iptables
echo
echo "Aliases for current user:"
alias
echo
echo "All done.. Now go check /etc/ssh/sshd_config, your .bashrc file, printenv, update firewall if needed, and hope"