From ad919ba28bfdfcccac1aa514abd4cea66c3d858f Mon Sep 17 00:00:00 2001 From: Andrea Cardaci Date: Mon, 23 Mar 2020 19:50:55 +0100 Subject: [PATCH] Improve tac and add sudo and suid --- _gtfobins/tac.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/_gtfobins/tac.md b/_gtfobins/tac.md index de17fe8..2dfecf4 100644 --- a/_gtfobins/tac.md +++ b/_gtfobins/tac.md @@ -1,8 +1,16 @@ --- +description: Make sure that `RANDOM` does not appear into the file to read otherwise the content of the file is corrupted by reversing the order of `RANDOM`-separated chunks. functions: file-read: - - description: It reads data from files, it may be used to do privileged reads or disclose files outside a restricted file system. - code: | + - code: | LFILE=file_to_read - tac "$LFILE" + tac -s 'RANDOM' "$LFILE" + suid: + - code: | + LFILE=file_to_read + ./tac -s 'RANDOM' "$LFILE" + sudo: + - code: | + LFILE=file_to_read + sudo tac -s 'RANDOM' "$LFILE" ---