CyberPatrol is a controversial but popular product for censoring family, library, and corporate computer systems against (ostensibly) sexual, hateful, or other forbidden categories of websites. A security hole in the way CyberPatrol handles credit cards can be used to retrieve the original credit card information (in its clear text format).
Credit:
The information has been provided by Joey Maier.
Registration for CyberPatrol is handled directly by the software, rather than through an SSL-encrypted web interface. The client, downloadable from http://www.cyberpatrol.com/, presents the user with a registration form requesting standard information. Before any information is sent to Microsys, the client verifies that the credit card number qualifies as a valid Luhn number. Assuming it is, the client sends the registration information to cybercentral.microsys.com (204.57.42.15) via normal http (using a POST request). The email address, expiration date of the credit card, name, address, and phone number are all sent in clear text, without any attempt to obfuscate or encrypt. (Please note that the form, which is illustrated at http://www.cyberpatrol.com/trial/reg_sof.htm, claims, "The above information will be scrambled before being sent").
The credit card information is not much better off: It is sent using an extraordinarily ineffective substitution cipher, equivalent to that which may be found in the games pages of many newspapers. This code is as follows:
The following is an example of a POST request that is destined for cybercentral.microsys.com (the card number was generated for this test only and was never submitted)
Similar information could be found in the logs of a corporate or educational proxy administrator; the important thing to note is the amount of personal information plainly visible along the right side of the sniffed request.
Interestingly enough, it appears the client determines its own price. All that is required for an attacker to retrieve this information is for a sniffer to be placed upstream before 204.57.42.15, the IP address of Microsys's servers. Microsys has no method in place to detect, address, or reasonably frustrate such a sniffer.
Reproduction:
1. Download and install CyberPatrol client.
2. Take a firewall that supports advanced configuration and configure it to block PUSH-ACK and RST packets (See below for details). This will allow the CyberPatrol client to do an nslookup and handshake through the firewall, but won't let it actually send the POST info to cybercentral.microsys.com. Test your rules first with a valid card you own; if you got them wrong, you want to find out without being accused of credit fraud.
3. Generate some card numbers.
4. Start snort and use it to sniff the POST requests that the client is trying to send.
5. Try to register (If your firewall is properly blocking the POST request, this will fail and the cyberpatrol client will hang)
6. Use the perl script below to parse the snort log and dump the credit card information to stdout in plain text.
Firewall rules used:
These are the IPFilter rules used in the reproduction described above. (Obviously, there's some redundancy here, but the author wanted to err on the side of caution. The IPF gods among you can certainly produce a cleaner ruleset.)
==============================================================
block in on ne1 proto tcp from any to any
block in quick on ne1 proto tcp from any to any flags R
block out quick on ne1 proto tcp from any to any flags R
block in quick on ne0 proto tcp from any to any flags R
block out quick on ne0 proto tcp from any to any flags R
block in quick on ne0 proto tcp from any to cybercentral.microsys.com flags PA
block out quick on ne0 proto tcp from any to cybercentral.microsys.com flags PA
block in quick on ne1 proto tcp from any to cybercentral.microsys.com flags PA
block out quick on ne1 proto tcp from any to cybercentral.microsys.com flags PA
pass in quick on ne1 proto tcp from cybercentral.microsys.com to 192.168.23.0/24
pass out on ne1 proto tcp from any to cybercentral.microsys.com flags S
pass in on ne1 proto tcp from cybercentral.microsys.com to 192.168.23.0/24 flags S/SA
==============================================================
Demostration:
Here's an example of the output from the perl script included below:
Exploit:
#################################################
# Name: cpetrol.pl
#
# Author: Joey Maier <maierj@home.com>
#
# purpose: parse snort logs of cyberpatrol
# registration and dump the registration
# information (including the credit
# card numbers) in plain text to
# stdout.
#
# useage: ./cpetrol.pl
#
# requirements: You have to have a snort log
# of the registration, it has
# to be named "log", and it
# needs to be in this directory
#
# Greets: Thanks to Dan Kaminsky for his
# help in researching this bug.
#
#################################################