Operating Systems Lecture Notes

2014 November 18 • Directories


Although technically not phishing, as undergrads we used to pull a similar trick. Whenever we'd find an unattended terminal with someone logged in, we'd create a file which seemed to be named

$ ls -w
I am a jerk.java

$

(Java didn't exist when we were undergrads, but you get the idea). When the victim tried to get rid of this childish prank, they got

$ rm 'I am a jerk.java'
rm: I am a jerk.java: No such file or directory

$ 

The trick is the file's actually named

$ ls -B
I ax\010m a jerk.java

$ 

that is, the file name contains the characters x-backspace-m (‘\010’ is the octal escape for the ASCII backspace character), which together print as just ‘m’. What you see is not exactly what you have, giving this prank a resemblance to a phishing attack (which also didn't exist when we were undergrads).

Most modern operating systems deal with this problem by including some indication of troublesome characters in listings

$ ls 
I ax?m a jerk.java

$
which is why I used the -w ls option above to avoid revealing the trick too early.
This page last modified on 2006 January 24.