mirror of
https://github.com/GTFOBins/GTFOBins.github.io
synced 2024-12-25 22:40:10 +01:00
add file-write
This commit is contained in:
parent
a6bc526ada
commit
6f9d02501e
@ -1,5 +1,29 @@
|
|||||||
---
|
---
|
||||||
functions:
|
functions:
|
||||||
|
file-write:
|
||||||
|
- description: write DATA to $WFILE
|
||||||
|
code: |
|
||||||
|
LFILE=$(mktemp --suffix=.s)
|
||||||
|
WFILE=file-to-write
|
||||||
|
elf=$(mktemp -u)
|
||||||
|
vi $LFILE
|
||||||
|
;#####CODE START#####
|
||||||
|
.global _start
|
||||||
|
_start:
|
||||||
|
.intel_syntax noprefix
|
||||||
|
mov rax,2
|
||||||
|
lea rdi,[rip+DATA]
|
||||||
|
mov rsi, 0
|
||||||
|
syscall
|
||||||
|
mov rax,60
|
||||||
|
mov rdi,0
|
||||||
|
syscall
|
||||||
|
DATA:
|
||||||
|
.string "THIS IS THE DATA NEED TO BE WRITTEN USING STRACE"
|
||||||
|
;#####CODE END#####
|
||||||
|
:wq
|
||||||
|
gcc -nostdlib --static $LFILE -o $elf
|
||||||
|
strace -o $WFILE $elf
|
||||||
shell:
|
shell:
|
||||||
- code: strace -o /dev/null /bin/sh
|
- code: strace -o /dev/null /bin/sh
|
||||||
suid:
|
suid:
|
||||||
|
Loading…
Reference in New Issue
Block a user