about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorSilvino <silvino@bk.ru>2019-07-02 18:33:31 +0100
committerSilvino <silvino@bk.ru>2019-07-02 18:33:31 +0100
commit6bb04903d70881ce2d17d5e1ce7685f02c48dd24 (patch)
treeaa5f5ce42984bf8cc0dd7783375dae634d38a0be
parentbb4fd340e7a1faffc363c6baa2f67e84b3a34f0c (diff)
parent1fb8842d469c36e5b43e843d3759e3c18c120c47 (diff)
downloaddoc-6bb04903d70881ce2d17d5e1ce7685f02c48dd24.tar.gz
core revison
-rw-r--r--core/hardening.html27
-rw-r--r--core/linux.html4
-rw-r--r--core/reboot.html16
-rw-r--r--core/toolchain.html3
4 files changed, 36 insertions, 14 deletions
diff --git a/core/hardening.html b/core/hardening.html
index d94cda6..200adfb 100644
--- a/core/hardening.html
+++ b/core/hardening.html
@@ -44,12 +44,12 @@
 
         <h3>1.2 - Linux PAM</h3>
 
-        <p>Cat /etc/pam.d/system-auth. Check pam modules, test on virtual machine, user can lockout during tests.</p>
+        <p>Cat /etc/pam.d/system-auth. Check pam modules, test on virtual machine, user can lockout during tests. Check files (processes); getfacl filename.</p>
 
         <p>Check files (processes) set uid and set gid;</p>
 
         <pre>
-        # find / -perm -4000 >> /root/setuid_files
+        # find / -perm 4000 >> /root/setuid_files
         # find / -perm 2000 >> /root/setguid_files
         </pre>
 
@@ -75,8 +75,17 @@
         # chmod g-s filename
         </pre>
 
-        <p>Check files (processes); getfacl filename.</p>
-        , disable admins and root from sshd.</p>
+        <p>Find world writable files;</p>
+
+        <pre>
+        # find /dir -xdev -type d \( -perm -0002 -a ! -perm -1000 \) -print
+        </pre>
+
+        <p>No owner files;</p>
+
+        <pre>
+        # find /dir -xdev \( -nouser -o -nogroup \) -print
+        </pre>
 
         <h3>1.3. Capabilities</h3>
 
@@ -133,6 +142,16 @@
         # auditctl -w /sbin/insmod -p x -k module_insertion
         </pre>
 
+        <h3>1.6 Network</h3>
+
+        <p>Find listening services with command;</p>
+
+        <pre>
+        # ss -tulpn
+        # nmap -sT -O localhost
+        # nmap -sT -O machine.example.org
+        </pre>
+
         <h2>2.6.0.2 Lynis</h2>
 
         <pre>
diff --git a/core/linux.html b/core/linux.html
index 670d0e7..d265925 100644
--- a/core/linux.html
+++ b/core/linux.html
@@ -686,8 +686,7 @@
 
         <h3 id="crypt">2.1.2.14 Cryptographic API</h3>
 
-        <pre>
-
+        <dl>
             <dt>CONFIG_CRYPTO_LRW</dt>
             <dd>Liskov Rivest Wagner, a tweakable, non malleable, non movable
             narrow block cipher mode for dm-crypt.</dd>
@@ -714,6 +713,7 @@
 
             <dt>CONFIG_CRYPTO_TWOFISH=y<dt>
             <dd>Twofish cipher algorithm</dd>
+        </dl>
 
 	    <pre>
 	    *   MD4 digest algorithm
diff --git a/core/reboot.html b/core/reboot.html
index f7a34d6..fbf9cc1 100644
--- a/core/reboot.html
+++ b/core/reboot.html
@@ -2,13 +2,13 @@
 <html dir="ltr" lang="en">
     <head>
         <meta charset='utf-8'>
-        <title>1.4. Boot</title>
+        <title>1.3. Boot</title>
     </head>
     <body>
 
         <a href="index.html">Core OS Index</a>
 
-        <h1>1.4. Boot</h1>
+        <h1>1.3. Boot</h1>
 
         <p>Follow this instructions with active chroot,
         first <a href="configure.html#chroot">mount partitions</a>
@@ -31,7 +31,7 @@
           /bin/bash --login
         </pre>
 
-        <h2 id="linux">1.4.1. Kernel</h2>
+        <h2 id="linux">1.3.1. Kernel</h2>
 
         <p>Install <a href="ports/linux-gnu">linux-gnu</a> port,
         linux libre kernel is a true source based kernel that
@@ -60,7 +60,7 @@
         # pkgadd /usr/ports/packages/linux-gnu#4.9.86-2.pkg.tar.gz
         </pre>
 
-        <h2 id="dracut">1.4.2. Dracut</h2>
+        <h2 id="dracut">1.3.2. Dracut</h2>
 
         <p>Install dracut;</p>
 
@@ -101,7 +101,7 @@
         # dracut --kver 4.9.86-gnu
         </pre>
 
-        <h2 id="grub">1.4.3. Grub</h2>
+        <h2 id="grub">1.3.3. Grub</h2>
 
         <p>Create grub file in /etc/default/grub with values;</p>
 
@@ -146,7 +146,7 @@
         # grub-probe --target=hints_string /
         </pre>
 
-        <h3>1.4.3.1. Rescue iso</h3>
+        <h3>1.3.3.1. Rescue iso</h3>
 
         <p>Simple way to have "resque" system is to mount boot as read only,
         this assures that even as root nothing can be changed without remount.
@@ -176,7 +176,7 @@
         }
         </pre>
 
-        <h2 id="recover">1.4.4. Recover</h2>
+        <h2 id="recover">1.3.4. Recover</h2>
 
         <h3>Root password</h3>
 
@@ -204,7 +204,7 @@
 
         <p>Reboot computer using power / reset.</p>
 
-        <h2 id="checkup">1.4.5. Checkup</h2>
+        <h2 id="checkup">1.3.5. Checkup</h2>
 
         <p>If you have qemu installed you can see if it boots, in this
         example sdb is usb external drive;</p>
diff --git a/core/toolchain.html b/core/toolchain.html
index 9662217..34a6c34 100644
--- a/core/toolchain.html
+++ b/core/toolchain.html
@@ -25,6 +25,9 @@
         export LDFLAGS="-z relro"
         </pre>
 
+        <p>Above should compile most of the packages, for more 
+        "restrict" and other flags combinations check <a href="conf/pkgmk.conf.harden">pkgmk.conf.handen</a>.</p>
+
         <h3>Core</h3>
 
         <p>Ports in core collection that need to be changed in order
>
8a34fa5 ^

39677ec ^
8a34fa5 ^

650a1fb ^


8a34fa5 ^

9e8b325 ^
8a34fa5 ^
4d67199 ^
28a5219 ^



4d67199 ^
28a5219 ^
4d67199 ^
8a34fa5 ^
650a1fb ^
8a34fa5 ^
b55bd70 ^
9833610 ^
b55bd70 ^
7e597ae ^
9833610 ^
8a34fa5 ^
9833610 ^
b55bd70 ^
7e597ae ^

c976bc6 ^
9833610 ^



8a34fa5 ^


bf35794 ^
c09bf8d ^





937cabf ^
c09bf8d ^






4688ad1 ^
c09bf8d ^

b55bd70 ^
b355755 ^
c09bf8d ^
b55bd70 ^

c09bf8d ^
b55bd70 ^
e995c1b ^
c09bf8d ^
e995c1b ^



e369292 ^
c09bf8d ^

7e597ae ^



b55bd70 ^
7e597ae ^
2dd5212 ^
7e597ae ^
2dd5212 ^



4688ad1 ^
c09bf8d ^
e6cbe9c ^
c09bf8d ^

adaa28a ^


fde45eb ^
adaa28a ^
7e597ae ^
b55bd70 ^
adaa28a ^


b55bd70 ^
7e597ae ^


b55bd70 ^
7e597ae ^
e6cbe9c ^
adaa28a ^

9e8b325 ^
c0705ee ^
8a34fa5 ^
9e8b325 ^
dc5d967 ^
9e8b325 ^
8a34fa5 ^



8a34fa5 ^
c0705ee ^
8a34fa5 ^

d7e1708 ^
8a34fa5 ^
8a8b795 ^
8a34fa5 ^
9e8b325 ^


8a34fa5 ^



9e8b325 ^


8a34fa5 ^

9e8b325 ^
8a34fa5 ^


8a34fa5 ^
9e8b325 ^







8a34fa5 ^



9e8b325 ^






dba2306 ^
9e8b325 ^

8a34fa5 ^
9e8b325 ^
8a34fa5 ^
adaa28a ^

8cc7f3b ^
adaa28a ^


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