Skip to content

Commit 0f10da1

Browse files
committed
updates
1 parent 21d0a79 commit 0f10da1

37 files changed

+1212
-111
lines changed

_sources/elk/agent/index.rst.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ Contents:
1010

1111
agent
1212
discover
13+
integrations/index
1314

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
==============
2+
alienvault otx
3+
==============
4+
5+
Indicators go into `logs-ti_otx.pulses_subscribed-*` via a CEL input.
6+
There is some processing done with ingest pipelines.
7+
A transform gets the `active` IoCs and puts them in `logs-ti_otx.pulses_subscribed-*`.
8+
9+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
============
3+
integrations
4+
============
5+
6+
Contents:
7+
8+
.. toctree::
9+
:maxdepth: 1
10+
11+
alienvault-otx
12+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
====
2+
sssd
3+
====
4+
5+
The Data Provider returned an error [org.freedesktop.sssd.Error.DataProvider.Offline]
6+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7+
8+
When the system was added to AD or whatever it used a server that is no longer present.
9+
Either add or update the `ad_server` line in `/etc/sssd/sssd.conf` with a comma separated list of AD servers.
10+

_sources/operating_systems/linux/index.rst.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Contents:
1010

1111
apt
1212
auth/failure
13+
auth/sssd
1314
boot
1415
commands
1516
deprecated

_sources/operating_systems/linux/systemd/journalctl.rst.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,12 @@ View the last 100 lines
1919
2020
journalctl --no-pager -n 100 --unit=my.service
2121
22+
since 5 minutes ago
23+
^^^^^^^^^^^^^^^^^^^
24+
25+
The `ago` is very important for some reason. :|
26+
27+
.. code-block:: console
28+
29+
journalctl -u --since "5 minutes ago"
30+

_sources/ssl/cert_files.rst.txt

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
=================
2+
certificate files
3+
=================
4+
5+
rhel: add a certificate to trust store
6+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7+
8+
This may apply to rhel based distributions as well as rhel itself.
9+
10+
.. code-block:: console
11+
12+
# cp cert-chain.crt /etc/pki/ca-trust/source/anchors/
13+
# update-ca-trust
14+
15+
debian: add a certificate to the trust store
16+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17+
18+
This applies to ubuntu and maybe other debian based distributions.
19+
20+
Make sure the file has a `.crt` extension.
21+
It won't work with `.pem` for some reason.
22+
23+
.. code-block:: console
24+
25+
# apt-get install -y ca-certificates
26+
# cp CERT-FILE.pem /usr/local/share/ca-certificates
27+
# update-ca-certificates
28+
29+
30+
pkcs #12: extract key and cert from keystore
31+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
32+
33+
.. code-block:: console
34+
35+
openssl pkcs12 -info -in KEYSTORE.p12 -nodes
36+
37+
pkcs #12: create a file
38+
^^^^^^^^^^^^^^^^^^^^^^^
39+
40+
.. code-block:: console
41+
42+
openssl pkcs12 -export -out KEYSTORE.p12 -inkey KEY.key -in CERT.pem -name ALIAS
43+
44+
45+
see a cert's fingerprint
46+
^^^^^^^^^^^^^^^^^^^^^^^^
47+
48+
.. code-block:: console
49+
50+
openssl x509 -in FILE.pem -noout -fingerprint
51+

_sources/ssl/checks.rst.txt

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,51 @@
11
==============
2-
Look at certs!
2+
look at certs!
33
==============
44

5-
Check a private key
6-
^^^^^^^^^^^^^^^^^^^
5+
openssl: check a private key
6+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
77

88
.. code-block:: console
99
1010
openssl rsa -in privateKey.key -check
1111
12-
Check a certificate
13-
^^^^^^^^^^^^^^^^^^^
12+
openssl: check a certificate
13+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14+
15+
This will print out the details.
1416

1517
.. code-block:: console
1618
1719
openssl x509 -in certificate.crt -text -noout
1820
19-
Check the subject in a certificate
20-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
21+
openssl: check the subject in a certificate
22+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
23+
24+
Show just the `subject` of the certificate.
2125

2226
.. code-block:: console
2327
2428
openssl x509 -noout -subject -in certificate.crt
2529
26-
Check expiration with keytool
27-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
30+
keytool: check expiration
31+
^^^^^^^^^^^^^^^^^^^^^^^^^
32+
33+
java yay
2834

2935
.. code-block:: console
3036
3137
keytool -list -v -keystore keystore.jks
3238
33-
Check key file
34-
^^^^^^^^^^^^^^
39+
openssl: check key file
40+
^^^^^^^^^^^^^^^^^^^^^^^
3541

3642
.. code-block:: console
3743
3844
openssl rsa -in file.key -check
3945
4046
41-
Check modulus of both key and certificate
42-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
47+
openssl: check modulus of both key and certificate
48+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4349

4450
If these don't match, the key and cert don't belong together.
4551

@@ -48,4 +54,3 @@ If these don't match, the key and cert don't belong together.
4854
openssl rsa -modulus -noout -in file.key | openssl md5
4955
openssl x509 -modulus -noout -in file.crt | openssl md5
5056
51-
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
======================
2+
creating a certificate
3+
======================
4+
5+
create a key
6+
^^^^^^^^^^^^
7+
8+
`2048` bit keys are probably good enough, but if you're paranoid `4096` is bigger.
9+
10+
.. code-block:: console
11+
12+
openssl genrsa -aes256 -out key.key 2048
13+
14+
create a certificate signing request (csr)
15+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
16+
17+
This uses the key from the previous step.
18+
19+
.. code-block:: console
20+
21+
openssl req -new -sha256 -key key.key -out csr.csr
22+
23+
24+
create a csr with a custom configuration
25+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
26+
27+
Prepopulate the `CONFIG.cnf` with whatever settings you want.
28+
Use the key from the `create a key` step above.
29+
30+
.. code-block:: console
31+
32+
openssl req -new -sha256 -config CONFIG.cnf -key key.key -out csr.csr
33+
34+
creating a key and csr in 1 step
35+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
36+
37+
I like doing this in 2 steps, but to each their own.
38+
39+
.. code-block::console
40+
41+
openssl req -newkey rsa:2048 -nodes -keyout NEWKEY.key -config CONFIG.cnf -out NEWCSR.csr -new -sha256
42+
43+
create a self-signed certificate
44+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
45+
46+
Expirations are getting shorter and shorter, hopefully 1 year will be good enough for a while.
47+
48+
.. code-block:: console
49+
50+
openssl req -x509 -sha256 -days 365 -key key.key -in csr.csr -out certificate.crt
51+
52+
53+
ca: sign the csr
54+
^^^^^^^^^^^^^^^^
55+
56+
If you're silly and have your own certificate authority (ca), you can sign your own csr files.
57+
58+
.. code-block:: console
59+
60+
openssl ca -batch -config intermediateCA-openssl.cnf -extensions server_cert -notext -in gitlab.csr -out gitlab.crt
61+
62+
ca: update the db
63+
^^^^^^^^^^^^^^^^^
64+
65+
This will expire certs in the db.
66+
67+
.. code-block:: console
68+
69+
openssl ca -updatedb -config ./intermediateCA-openssl.cnf
70+
71+
ca: format of the index.txt file
72+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
73+
74+
tab delimited
75+
76+
1. Certificate status (V = valid, R = revoked, E = expired)
77+
2. Expiration date in YYMMDDHHMMSSZ format
78+
3. Cert revocation date
79+
4. serial number in hex
80+
5. filename or unknown
81+
6. Certificate distinguished name
82+
83+
84+
remove the passphrase form a key
85+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
86+
87+
You probably shouldn't do this, but you can.
88+
89+
.. code-block:: console
90+
91+
openssl rsa -in [file1.key] -out [file2.key]
92+

_sources/ssl/index.rst.txt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,9 @@ Contents:
88
.. toctree::
99
:maxdepth: 2
1010

11-
download_cert
12-
certstore
13-
create_self_signed_cert
14-
test_for_ssl3
11+
useful_commands
12+
cert_files
13+
create_certificate
1514
create_ca
1615
checks
17-
ca_certs
1816

0 commit comments

Comments
 (0)