<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Hacking websites with SQL Injection 💉]]></title><description><![CDATA[<blockquote></blockquote>
<h2>What is SQL Injection ?</h2>
<hr />
<p dir="auto"><img src="https://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2016/09/1473921124injection-attack.jpg" alt="alt text" class=" img-responsive img-markdown" /></p>
<p dir="auto"><strong>SQL Injection</strong> is a attack against websites / web applications which are using <strong>SQL Database</strong>.</p>
<p dir="auto">Simply, Hacker will insert malicious SQL command and takeover the database.</p>
<blockquote></blockquote>
<h2>How Does it Work?</h2>
<hr />
<p dir="auto">Let's say, You have a code like this,</p>
<pre><code>&lt;?php

       $username = $_POST['username'];
       $password = md5($_POST['password']); 
       $sql = "SELECT * FROM `users` WHERE username = '$username' AND password = '$password'";
       
?&gt;
</code></pre>
<blockquote></blockquote>
<p dir="auto">If user input,<br />
<strong>Username :</strong> admin<br />
<strong>Password :</strong> admin123</p>
<p dir="auto">The SQL will looks like,</p>
<pre><code>SELECT * FROM `users` WHERE username = 'admin' AND password = '0192023A7BBD73250516F069DF18B500'
</code></pre>
<p dir="auto">It will works fine,</p>
<hr />
<p dir="auto"><strong>But</strong> If user input,</p>
<p dir="auto">If your input,<br />
<strong>Username :</strong> admin' OR 1 = 1 --<br />
<strong>Password :</strong> admin123</p>
<p dir="auto">The SQL will looks like,</p>
<pre><code>SELECT * FROM `users` WHERE username = 'admin' OR 1 = 1 --' AND password = '0192023A7BBD73250516F069DF18B500'
</code></pre>
<p dir="auto">Here you can see, The password query will be commented (Will not Execute).<br />
And <code>1 = 1</code> is always true, The hacker can get all the information of Users.</p>
<blockquote>
<p dir="auto">They can delete or change any record too.</p>
</blockquote>
<p dir="auto"><a href="https://www.youtube.com/watch?v=WFFQw01EYHM" target="_blank" rel="noopener noreferrer nofollow ugc">Click Here | Watch SQl Injection tutorial</a></p>
<blockquote></blockquote>
<p dir="auto"><strong>SQL Injection Strings</strong></p>
<p dir="auto"><a href="http://pentestmonkey.net/cheat-sheet/sql-injection/mysql-sql-injection-cheat-sheet" target="_blank" rel="noopener noreferrer nofollow ugc">Click Here | Some injection Strings</a></p>
<hr />
<h3><strong>How to prevent SQL Injections?</strong></h3>
<p dir="auto">Nowadays, Most of the back-end frameworks handle injections itself. <strong>But</strong> If you don't use any frameworks, You can do it manually.</p>
<p dir="auto">Every language has <strong>built-in functions</strong> for handle <strong>SQL injections</strong> while binding data.</p>
<p dir="auto"><a href="https://www.wikihow.com/Prevent-SQL-Injection-in-PHP" target="_blank" rel="noopener noreferrer nofollow ugc">PHP</a><br />
<a href="https://blog.sqreen.com/preventing-sql-injections-in-python/" target="_blank" rel="noopener noreferrer nofollow ugc">PyTHON</a><br />
<a href="https://stackoverflow.com/questions/14376473/what-are-good-ways-to-prevent-sql-injection" target="_blank" rel="noopener noreferrer nofollow ugc">.NET</a><br />
<a href="https://blog.hailstone.io/how-to-prevent-sql-injection-nodejs/" target="_blank" rel="noopener noreferrer nofollow ugc">NodeJS</a><br />
<a href="https://software-security.sans.org/developer-how-to/fix-sql-injection-in-java-using-prepared-callable-statement" target="_blank" rel="noopener noreferrer nofollow ugc">Java</a></p>
]]></description><link>https://lankadevelopers.lk/topic/197/hacking-websites-with-sql-injection</link><generator>RSS for Node</generator><lastBuildDate>Tue, 11 Aug 2026 12:07:00 GMT</lastBuildDate><atom:link href="https://lankadevelopers.lk/topic/197.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 30 Mar 2019 04:52:35 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Hacking websites with SQL Injection 💉 on Sun, 07 Apr 2019 10:37:33 GMT]]></title><description><![CDATA[<p dir="auto">@Malith ✌️✌️✌️</p>
]]></description><link>https://lankadevelopers.lk/post/1328</link><guid isPermaLink="true">https://lankadevelopers.lk/post/1328</guid><dc:creator><![CDATA[b6]]></dc:creator><pubDate>Sun, 07 Apr 2019 10:37:33 GMT</pubDate></item><item><title><![CDATA[Reply to Hacking websites with SQL Injection 💉 on Sat, 06 Apr 2019 17:45:47 GMT]]></title><description><![CDATA[<p dir="auto">useful b6 keep it up</p>
]]></description><link>https://lankadevelopers.lk/post/1327</link><guid isPermaLink="true">https://lankadevelopers.lk/post/1327</guid><dc:creator><![CDATA[Nubelle]]></dc:creator><pubDate>Sat, 06 Apr 2019 17:45:47 GMT</pubDate></item><item><title><![CDATA[Reply to Hacking websites with SQL Injection 💉 on Fri, 05 Apr 2019 08:22:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://lankadevelopers.lk/uid/1">@ciaompe</a>  :+1: :+1:</p>
]]></description><link>https://lankadevelopers.lk/post/1314</link><guid isPermaLink="true">https://lankadevelopers.lk/post/1314</guid><dc:creator><![CDATA[b6]]></dc:creator><pubDate>Fri, 05 Apr 2019 08:22:17 GMT</pubDate></item><item><title><![CDATA[Reply to Hacking websites with SQL Injection 💉 on Thu, 04 Apr 2019 18:12:43 GMT]]></title><description><![CDATA[<p dir="auto">Awesome, we want this kind of articles. Thanks</p>
]]></description><link>https://lankadevelopers.lk/post/1312</link><guid isPermaLink="true">https://lankadevelopers.lk/post/1312</guid><dc:creator><![CDATA[ciaompe]]></dc:creator><pubDate>Thu, 04 Apr 2019 18:12:43 GMT</pubDate></item><item><title><![CDATA[Reply to Hacking websites with SQL Injection 💉 on Sun, 31 Mar 2019 11:35:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://lankadevelopers.lk/uid/542">@GeethOnion</a> 👌👌👌👌</p>
]]></description><link>https://lankadevelopers.lk/post/1298</link><guid isPermaLink="true">https://lankadevelopers.lk/post/1298</guid><dc:creator><![CDATA[b6]]></dc:creator><pubDate>Sun, 31 Mar 2019 11:35:59 GMT</pubDate></item><item><title><![CDATA[Reply to Hacking websites with SQL Injection 💉 on Sat, 30 Mar 2019 18:21:21 GMT]]></title><description><![CDATA[<p dir="auto">Awesome😍</p>
]]></description><link>https://lankadevelopers.lk/post/1296</link><guid isPermaLink="true">https://lankadevelopers.lk/post/1296</guid><dc:creator><![CDATA[GeethOnion]]></dc:creator><pubDate>Sat, 30 Mar 2019 18:21:21 GMT</pubDate></item><item><title><![CDATA[Reply to Hacking websites with SQL Injection 💉 on Sat, 30 Mar 2019 16:45:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://lankadevelopers.lk/uid/27">@root</a> :grinning: :grinning:</p>
]]></description><link>https://lankadevelopers.lk/post/1295</link><guid isPermaLink="true">https://lankadevelopers.lk/post/1295</guid><dc:creator><![CDATA[b6]]></dc:creator><pubDate>Sat, 30 Mar 2019 16:45:17 GMT</pubDate></item><item><title><![CDATA[Reply to Hacking websites with SQL Injection 💉 on Sat, 30 Mar 2019 15:44:42 GMT]]></title><description><![CDATA[<p dir="auto">This is  awesome bro, nice example . Thanks</p>
]]></description><link>https://lankadevelopers.lk/post/1294</link><guid isPermaLink="true">https://lankadevelopers.lk/post/1294</guid><dc:creator><![CDATA[root]]></dc:creator><pubDate>Sat, 30 Mar 2019 15:44:42 GMT</pubDate></item><item><title><![CDATA[Reply to Hacking websites with SQL Injection 💉 on Sat, 30 Mar 2019 09:29:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://lankadevelopers.lk/uid/2">@dev_lak</a> :+1:</p>
]]></description><link>https://lankadevelopers.lk/post/1293</link><guid isPermaLink="true">https://lankadevelopers.lk/post/1293</guid><dc:creator><![CDATA[b6]]></dc:creator><pubDate>Sat, 30 Mar 2019 09:29:37 GMT</pubDate></item><item><title><![CDATA[Reply to Hacking websites with SQL Injection 💉 on Sat, 30 Mar 2019 05:16:26 GMT]]></title><description><![CDATA[<p dir="auto">very informative bro...</p>
]]></description><link>https://lankadevelopers.lk/post/1292</link><guid isPermaLink="true">https://lankadevelopers.lk/post/1292</guid><dc:creator><![CDATA[dev_lak]]></dc:creator><pubDate>Sat, 30 Mar 2019 05:16:26 GMT</pubDate></item></channel></rss>