Prey Project, ping and Cygwin

File this with the obscure issue department…

The Prey Project looked like a nice system for tracking stolen devices and has gotten a lot of good press recently. I decided to try it out. After getting everything setup and working I noticed a lot of Cygwin bash shells running the ping command. The commands accumulated eventually degrading system performance which is when I noticed.

Prey has a partial UNIX environment (MingW) contained in it and consists of shell scripts wrapping a number of UNIX utilities compiled for Windows. I say partial because it doesn’t include the “ping” command which is a dependency for the software. And the shell scripts apparently don’t take into account the potential for a user having other UNIX-like environments installed (Cygwin also has a bash shell and the ping command but there are others as well.) So what was happening is that script (pull) naively looks at what operating system it is installed on and for a ping command and issue what it believes are the correct command line arguments. For Windows it’s this:

ping -n 1

This doesn’t work because Cygwin’s ping.exe doesn’t have a “-n” switch. But for some reason doesn’t fail when it encounters an invalid option. Rather, it tried to ping the IP address This doesn’t work, of course, but the ping command tries forever thus respawning new instances of the bash shell and ping until it kills your computer.

Anyway, I hard coded a change to the script on my system and filed a bug with the Prey developers.

I also submitted an email to the Cygwin mailing list describing the Cygwin ping issue.

Leave a Reply