Denys Vlasenko | b920a38 | 2017-07-24 17:20:13 +0200 | [diff] [blame] | 1 | #!/bin/sh |
2 | # Makes "symlink attack" tarball (needs GNU tar for --append) | ||||
3 | |||||
4 | true >anything.txt | ||||
5 | tar cvf tar_symlink_attack.tar anything.txt | ||||
6 | rm anything.txt | ||||
7 | |||||
8 | ln -s /tmp symlink | ||||
9 | tar --append -f tar_symlink_attack.tar symlink | ||||
10 | rm symlink | ||||
11 | |||||
12 | mkdir symlink | ||||
13 | echo BUG >symlink/bb_test_evilfile | ||||
14 | tar --append -f tar_symlink_attack.tar symlink/bb_test_evilfile | ||||
15 | rm symlink/bb_test_evilfile | ||||
16 | rmdir symlink |