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