Shopping-cart back door gives author admin privileges
Malicious Perl script just the tip of the iceberg?
During the period of active Y2K remediation last year, much was made of the possibility that unscrupulous, fly-by-night contractors might install back doors to networks they were engaged to repair. Recent events suggest that some of the more familiar, household names in IT services and software development deserve similar attention. Last week we learned that a playful employee installed a back door in Micro$oft Internet Information Server (IIS). We've wondered how many mass-marketed, household software applications might have their own hidden agendas, ever since the flap over RealNetworks' media player emerged, revealing that the company had been abusing the application to spy on their customers' tastes in music. Now we find that a CGI shopping-cart script by Danise.net is coded with a feature allowing its author, or an intruder, to execute any command on any server running it with the same privileges as the CGI process itself, according to a Bugtraq alert contributed by Blarg Online Services Technical Support Representative Joe Harris. Harris originally discovered the back door while helping a Blarg customer install and debug the Dansie Shopping Cart application. Author Craig Danise apparently coded a routine into the application which enables him to use a nine-character password to execute commands on a customer's server remotely. The password is the same for each copy of the application, giving him universal access. A cloaked e-mail routine, also coded into each copy of the software, reports the specific URLs where the applications are installed back to Danise. The script must be installed with world-readable permissions, meaning that anyone with access to a server on which the cart is installed can retrieve the password and control that server. "Dansie.net, armed with the server name and URL to the CGI executable provided by the cloaked email routine, would be able to run commands on any Web server on the Internet that has the Dansie Shopping Cart installed. It takes little imagination to dream up the potential havoc and privacy violations this level of access could result in, from stealing private customer records to a full-blown crack of an e-commerce server," Harris wrote. The apparent motive for the back door is to enable Danise to monitor his customers for copyright violations, and to receive e-mail notice when bootleg copies are installed. We've had an unconfirmed report of one instance where Danise used his back door to delete the software from the server of one customer who had hard-coded a few custom features into his copy of it. We have in the past warned that Perl scripts are ripe for this sort of exploitation, but Harris takes some issue with our unmitigated contempt for them. "Perl scripts are not the problem. Perl is not the problem. Incompetence is the problem. There are too many amateurs out there writing sloppy code. They get a brief lesson in Perl from some book and think that this makes them the Internet's gift to programming," Harris told The Register. "Most of the problems stem from programmers who don't understand the whole picture of what happens between browser, common gateway interface [CGI], and server. It's this lack of knowledge that leads to exploitable CGI programmes," he added. Fair enough, but we've seen enough weak CGI scripts written by the cognoscenti to stick to our guns here, though with the allowances that some are definitely better than others, and that naive users are often implicated in their own vulnerability. As one member of a BBS discussion pointed out, "If I knew what I was doing, I wouldn't need a script." All the more reason for users to beware. Issues related to this discovery are elaborated in a Deja.com discussion started by Kasey Johns, who also discovered the malicious script. ®
Sponsored: Fast data protection ROI?