Problem C-3.2
Alice has a picture-based password system, where she has each user pick a set of their 20
favorite pictures, say, of cats, dogs, cars, etc. To login, a user is shown a series of pictures
in pairs—one on the left and one on the right. In each pair, the user has to pick the one
that is in his set of favorites. If the user picks the correct 20 out of the 40 he is shown (as
20 pairs), then the system logs him in. Analyze the security of this system, including the
size of the search space. Is it more secure than a standard password system?
Solution There are two pictures for each choice, one on the left and one on the right.
Thus, with 20 pairs, there is a search space of 220, which is roughly 1,000,000. This is roughly
Problem C-3.3
Charlie likes Alice’s picture-password system of the previous exercise, but he has changed
the login so that it just shows the user 40 different pictures in random order and they have
to indicate which 20 of these are from their set of favorites. Is this an improvement over
Alice’s system? Why or why not?
Solution Note that there are two pictures for each choice in the original plan, one on
Problem C-3.5
On Unix systems, a convenient way of packaging a collection of files is a SHell ARchive,
or shar file. A shar file is a shell script that will unpack itself into the appropriate files and
directories. Shar files are created by the shar command. The implementation of the shar
command in a legacy version of the HP-UX operating system created a temporary file with
an easily predictable filename in directory /tmp. This temporary file is an intermediate file
that is created by shar for storing temporary contents during its execution. Also, if a file
with this name already exists, then shar opens the file and overwrites it with temporary
contents. If directory /tmp allows anyone to write to it, a vulnerability exists. An attacker
can exploit such a vulnerability to overwrite a victim’s file. (1) What knowledge about shar
should the attacker have? (2) Describe the command that the attacker issues in order to
have shar overwrite an arbitrary file of a victim. Hint: the command is issued before shar is
executed. (3) Suggest a simple fix to the shar utility to prevent the attack. Note that this
is not a setuid question.
16