{"id":12250,"date":"2021-05-13T12:31:26","date_gmt":"2021-05-13T07:01:26","guid":{"rendered":"https:\/\/www.varutra.com\/?p=12250"},"modified":"2022-12-02T12:44:19","modified_gmt":"2022-12-02T07:14:19","slug":"second-order-sql-injection-attack","status":"publish","type":"post","link":"https:\/\/www.varutra.com\/varutravrt3\/second-order-sql-injection-attack\/","title":{"rendered":"SECOND ORDER SQL INJECTION ATTACK"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" width=\"1920\" height=\"1080\" src=\"https:\/\/varutra-1a3b6.kxcdn.com\/wp-content\/uploads\/2021\/05\/Second-Order-SQL-Injection-1-1024x573.png\"  class=\"sh-overlay-item sh-table-cell ls-is-cached lazyloaded\" data-rel=\"lightcase\" title=\"Second Order SQL Injection - Varutra Consulting\"><\/p>\n<h3><strong><u>Second Order SQL Injection Attack:<\/u><\/strong><\/h3>\n<p>Second Order SQL Injection Attack are those which are not widely discussed. Important to know that these cannot be detected by tools or via scanning. One needs to understand the application logic and flow of the applications to detect this vulnerability. These attacks are based on the logical flaw in the web application so by conducting the Secure\/ <a href=\"https:\/\/www.varutra.com\/application-security\/\">Source Code Review<\/a> anyone can a better understanding of the application flows which helps to detect such injection attacks.<\/p>\n<p>Generally, an Injection attacks happen when the developer trusts the input or fails to sanitize user input to build up the query being used in the application. The primary reason or cause for injection vulnerabilities is usually insufficient user input validation.<\/p>\n<p>&nbsp;<\/p>\n<h3><strong><u>Exploitation Scenario &#8211; Second Order SQL Injection with Example:<\/u><\/strong><\/h3>\n<p>To illustrate the vulnerability, let us consider a website that has User login, signup, and password change functionality.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-12253 aligncenter\" src=\"https:\/\/www.varutra.com\/wp-content\/uploads\/2021\/05\/Login-Page.png\" alt=\"Login Page\" width=\"573\" height=\"186\" srcset=\"https:\/\/www.varutra.com\/varutravrt3\/wp-content\/uploads\/2021\/05\/Login-Page.png 573w, https:\/\/www.varutra.com\/varutravrt3\/wp-content\/uploads\/2021\/05\/Login-Page-300x97.png 300w\" sizes=\"(max-width: 573px) 100vw, 573px\" \/><\/p>\n<p style=\"text-align: center\">Fig: 1.1: Login Page<\/p>\n<p style=\"text-align: left\">In Fig-1.2 there are two users in the database in the \u2018<strong>users<\/strong>\u2019 table.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-12258 aligncenter\" src=\"https:\/\/www.varutra.com\/wp-content\/uploads\/2021\/05\/Pre-registration-database.png\" alt=\"Pre-registration database\" width=\"571\" height=\"219\" srcset=\"https:\/\/www.varutra.com\/varutravrt3\/wp-content\/uploads\/2021\/05\/Pre-registration-database.png 571w, https:\/\/www.varutra.com\/varutravrt3\/wp-content\/uploads\/2021\/05\/Pre-registration-database-300x115.png 300w\" sizes=\"(max-width: 571px) 100vw, 571px\" \/><\/p>\n<p style=\"text-align: center\">Fig: 1.2: Pre-registration database<\/p>\n<p>Let us consider a new user registers, then login and changes the password. It\u2019s a very common functionality among all dynamic web applications.\u00a0 Firstly, the users are required to either signup or sign in. Here in Fig 1.3 new user sign-up with username \u2018<strong>test<\/strong>\u2019 and password \u2018<strong>123456<\/strong>\u2019.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-12254 aligncenter\" src=\"https:\/\/www.varutra.com\/wp-content\/uploads\/2021\/05\/New-User-Registered-\u2013-Creating-an-account.png\" alt=\"New User Registered \u2013 Creating an account\" width=\"573\" height=\"201\" srcset=\"https:\/\/www.varutra.com\/varutravrt3\/wp-content\/uploads\/2021\/05\/New-User-Registered-\u2013-Creating-an-account.png 573w, https:\/\/www.varutra.com\/varutravrt3\/wp-content\/uploads\/2021\/05\/New-User-Registered-\u2013-Creating-an-account-300x105.png 300w\" sizes=\"(max-width: 573px) 100vw, 573px\" \/><\/p>\n<p style=\"text-align: center\">Fig: 1.3: New User Registered \u2013 Creating an account<\/p>\n<p style=\"text-align: left\">In Fig-1.4 we observe that a \u2018<strong>test<\/strong>\u2019 user is created in the database.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-12257 aligncenter\" src=\"https:\/\/www.varutra.com\/wp-content\/uploads\/2021\/05\/Post-registration-database.png\" alt=\"Post-registration database\" width=\"571\" height=\"230\" srcset=\"https:\/\/www.varutra.com\/varutravrt3\/wp-content\/uploads\/2021\/05\/Post-registration-database.png 571w, https:\/\/www.varutra.com\/varutravrt3\/wp-content\/uploads\/2021\/05\/Post-registration-database-300x121.png 300w\" sizes=\"(max-width: 571px) 100vw, 571px\" \/><\/p>\n<p style=\"text-align: center\">Fig: 1.4: Post-registration database<\/p>\n<p>To Perform Second Order SQL Injection an attacker will register with the following username<\/p>\n<p>\u2018<strong>test\u2019 &#8212;<\/strong>\u2019 and creates the new account.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-12255 aligncenter\" src=\"https:\/\/www.varutra.com\/wp-content\/uploads\/2021\/05\/New-User-Registered.png\" alt=\"New User Registered\" width=\"573\" height=\"162\" srcset=\"https:\/\/www.varutra.com\/varutravrt3\/wp-content\/uploads\/2021\/05\/New-User-Registered.png 573w, https:\/\/www.varutra.com\/varutravrt3\/wp-content\/uploads\/2021\/05\/New-User-Registered-300x85.png 300w\" sizes=\"(max-width: 573px) 100vw, 573px\" \/><\/p>\n<p style=\"text-align: center\">Fig: 1.5: New User Registered<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-12260 aligncenter\" src=\"https:\/\/www.varutra.com\/wp-content\/uploads\/2021\/05\/User-Successfully-Registered.png\" alt=\"User Successfully Registered\" width=\"573\" height=\"169\" srcset=\"https:\/\/www.varutra.com\/varutravrt3\/wp-content\/uploads\/2021\/05\/User-Successfully-Registered.png 573w, https:\/\/www.varutra.com\/varutravrt3\/wp-content\/uploads\/2021\/05\/User-Successfully-Registered-300x88.png 300w\" sizes=\"(max-width: 573px) 100vw, 573px\" \/><\/p>\n<p style=\"text-align: center\">Fig: 1.6:: User Successfully Registered<\/p>\n<p style=\"text-align: left\">In Fig-1.7 we observe that \u2018<strong>test\u2019 &#8212;<\/strong> \u2019 user is created in the database.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-12256 aligncenter\" src=\"https:\/\/www.varutra.com\/wp-content\/uploads\/2021\/05\/Post-registration-database-2.png\" alt=\"Post-registration database \" width=\"571\" height=\"255\" srcset=\"https:\/\/www.varutra.com\/varutravrt3\/wp-content\/uploads\/2021\/05\/Post-registration-database-2.png 571w, https:\/\/www.varutra.com\/varutravrt3\/wp-content\/uploads\/2021\/05\/Post-registration-database-2-300x134.png 300w\" sizes=\"(max-width: 571px) 100vw, 571px\" \/><\/p>\n<p style=\"text-align: center\">Fig: 1.7: Post-registration database<\/p>\n<p>Now the attacker login with the \u2018<strong>test\u2019 &#8212;<\/strong>\u2019 account and go to change password functionality and then changes the password.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-12252 aligncenter\" src=\"https:\/\/www.varutra.com\/wp-content\/uploads\/2021\/05\/Login-Form.png\" alt=\"Login Form\" width=\"573\" height=\"194\" srcset=\"https:\/\/www.varutra.com\/varutravrt3\/wp-content\/uploads\/2021\/05\/Login-Form.png 573w, https:\/\/www.varutra.com\/varutravrt3\/wp-content\/uploads\/2021\/05\/Login-Form-300x102.png 300w\" sizes=\"(max-width: 573px) 100vw, 573px\" \/><\/p>\n<p style=\"text-align: center\">Fig: 1.8: Login Form<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-12251 aligncenter\" src=\"https:\/\/www.varutra.com\/wp-content\/uploads\/2021\/05\/Change-Password-Functionality.png\" alt=\"Change Password Functionality\" width=\"573\" height=\"293\" srcset=\"https:\/\/www.varutra.com\/varutravrt3\/wp-content\/uploads\/2021\/05\/Change-Password-Functionality.png 573w, https:\/\/www.varutra.com\/varutravrt3\/wp-content\/uploads\/2021\/05\/Change-Password-Functionality-300x153.png 300w\" sizes=\"(max-width: 573px) 100vw, 573px\" \/><\/p>\n<p style=\"text-align: center\">Fig: 1.9: Change Password Functionality<\/p>\n<p>In Fig 1.9 as there is password change functionality,<strong> the attacker will change the password from \u201cabc\u201d to \u201chacked\u201d <\/strong>and click on the \u2018<em>Reset\u2019 <\/em>button.<\/p>\n<p>Note that the username is<strong>\u00a0\u2018test\u2019 &#8212;<\/strong>\u00a0<strong>\u2019<\/strong>so below is the query processing in the backend in MySQL to update the password.<\/p>\n<p>UPDATE users SET password=&#8217;hacked&#8217;<\/p>\n<p>WHERE username=&#8217;test&#8217;&#8211;&#8216; and password=&#8217;abc&#8217;<\/p>\n<p>&nbsp;<\/p>\n<p>As the username in WHERE clause is<strong>\u00a0\u2018test\u2019 \u2013\u2019<\/strong>,\u00a0 after<strong>\u00a0&#8212;<\/strong> the query will get discarded and it will consider\u00a0 <strong>&#8216;and password=&#8217;abc&#8217;<\/strong> as a comment because in MySQL<a href=\"https:\/\/docs.oracle.com\/cd\/B13789_01\/server.101\/b10759\/sql_elements006.htm\"><strong>\u00a0&#8212;<\/strong>\u00a0is used to start comments<\/a>. So Logically query ends up like: &#8211;<\/p>\n<p>UPDATE users\u00a0 SET password=&#8217;123&#8242;\u00a0 WHERE username=&#8217;test&#8217;<\/p>\n<p>&nbsp;<\/p>\n<p>The Query results in updating the password for the user\u00a0<strong>\u2018<\/strong><strong>test<\/strong><strong>\u2019<\/strong>\u00a0instead of<strong>\u00a0\u2018<\/strong><strong>test\u2018 &#8212;<\/strong><strong>\u2019<\/strong>. Henceattacker has performed <em>Second-Order SQLInjection<\/em> successfully. For demonstration, we have considered \u2018<strong>test<\/strong>\u2019 user but its common most of the websites have users as admin, administrator, etc. It is very easy to guess such usernames and an attacker can perform the attack on such guessable usernames or accounts.<\/p>\n<p>&nbsp;<\/p>\n<p>Post-Exploitation of the attack we can login into the database and check the \u2018<strong>users<\/strong>\u2019 table:<\/p>\n<p>We can observe that password of the \u2018<strong>test<\/strong>\u2019 user is changed instead of \u2018<strong>test\u2019 &#8212;<\/strong>\u2019.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-12259 aligncenter\" src=\"https:\/\/www.varutra.com\/wp-content\/uploads\/2021\/05\/Successful-Second-Order-SQL-Injection.png\" alt=\"Successful Second Order SQL Injection\" width=\"571\" height=\"214\" srcset=\"https:\/\/www.varutra.com\/varutravrt3\/wp-content\/uploads\/2021\/05\/Successful-Second-Order-SQL-Injection.png 571w, https:\/\/www.varutra.com\/varutravrt3\/wp-content\/uploads\/2021\/05\/Successful-Second-Order-SQL-Injection-300x112.png 300w\" sizes=\"(max-width: 571px) 100vw, 571px\" \/><\/p>\n<p style=\"text-align: center\">Fig: 1.10:\u00a0Successful Second Order SQL Injection<\/p>\n<p>&nbsp;<\/p>\n<h3><strong><u>Attack Probability:<\/u><\/strong><\/h3>\n<p>The success rate of identifying a first-order SQL Injection is common as compared with the second-order SQL injection.<\/p>\n<ul>\n<li>The First-order Injections often referred to as \u2018<em>shooting fish in a barrel<\/em>\u2019 can be observed directly by different scanners (Burp Suite, Acunetixetc.) whereas the relative probability of second-order SQL Injection is low.<\/li>\n<li>The Second-order SQL Injection attack must be performed \u201cblindly\u201d in most of cases because the attacker performs the attack on the backend functionality without any prior knowledge of the system.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3><strong><u>Impact:<\/u><\/strong><\/h3>\n<p>With the successful exploitation of this vulnerability, a remote user or an attacker can compromise the user account. Any successful attack will result in an impact on CIA (Confidentiality, Integrity, and Availability) of the critical data.<\/p>\n<p>&nbsp;<\/p>\n<h3><strong><u>Recommendation:<\/u><\/strong><\/h3>\n<ul>\n<li>The most effective way to prevent SQL injection attacks is to use of stored Procedures, parameterized queries, or prepared statements.<\/li>\n<li>Do not parse the user input directly. Properly sanitize the user input.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3><strong><u>References:<\/u><\/strong><\/h3>\n<ul>\n<li><a href=\"https:\/\/portswigger.net\/kb\/issues\/00100210_sql-injection-second-order\">https:\/\/portswigger.net\/kb\/issues\/00100210_sql-injection-second-order<\/a><\/li>\n<li><a href=\"https:\/\/www.researchgate.net\/publication\/290768140_Detection_Method_of_the_Second-Order_SQL_Injection_in_Web_Applications\">https:\/\/www.researchgate.net\/publication\/290768140_Detection_Method_of_the_Second-Order_SQL_Injection_in_Web_Applications<\/a><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>Author,<\/p>\n<p><strong>Mohammed Musharraf Raza<\/strong><\/p>\n<p>Attack &amp; Pentest Team<\/p>\n<p>Varutra Consulting Pvt. Ltd.<\/p>","protected":false},"excerpt":{"rendered":"<p>Second Order SQL Injection Attack: Second Order SQL Injection Attack are those which are not widely discussed. Important to know that these cannot be detected&#8230;<\/p>\n","protected":false},"author":4,"featured_media":12272,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"inline_featured_image":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[57,272],"tags":[425,424],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO Pro 4.6.3 - aioseo.com -->\n\t\t<meta name=\"description\" content=\"Understand What is Second Order SQL Injection attack, Exploitation Scenario with Examples, Attack Probability, Impact, and Preventive Measures for it.\" \/>\n\t\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t\t<link rel=\"canonical\" href=\"https:\/\/www.varutra.com\/varutravrt3\/second-order-sql-injection-attack\/\" \/>\n\t\t<meta name=\"generator\" content=\"All in One SEO Pro (AIOSEO) 4.6.3\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Varutra Consulting\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Second Order SQL Injection Attack and Exploitation Scenario\" \/>\n\t\t<meta property=\"og:description\" content=\"Understand What is Second Order SQL Injection attack, Exploitation Scenario with Examples, Attack Probability, Impact, and Preventive Measures for it.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.varutra.com\/varutravrt3\/second-order-sql-injection-attack\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/www.varutra.com\/wp-content\/uploads\/2021\/05\/Second-Order-SQL-Injection-1.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/www.varutra.com\/wp-content\/uploads\/2021\/05\/Second-Order-SQL-Injection-1.png\" \/>\n\t\t<meta property=\"og:image:width\" content=\"1060\" \/>\n\t\t<meta property=\"og:image:height\" content=\"593\" \/>\n\t\t<meta property=\"article:section\" content=\"Vulnerability Disclosure\" \/>\n\t\t<meta property=\"article:tag\" content=\"sql\" \/>\n\t\t<meta property=\"article:tag\" content=\"sql injection\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2021-05-13T07:01:26+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2022-12-02T07:14:19+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Second Order SQL Injection Attack and Exploitation Scenario\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Understand What is Second Order SQL Injection attack, Exploitation Scenario with Examples, Attack Probability, Impact, and Preventive Measures for it.\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/www.varutra.com\/wp-content\/uploads\/2021\/05\/Second-Order-SQL-Injection-1.png\" \/>\n\t\t<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t\t<meta name=\"twitter:data1\" content=\"kalpblogger\" \/>\n\t\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/second-order-sql-injection-attack\\\/#article\",\"name\":\"Second Order SQL Injection Attack and Exploitation Scenario\",\"headline\":\"SECOND ORDER SQL INJECTION ATTACK\",\"author\":{\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/author\\\/kalpblogger\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/wp-content\\\/uploads\\\/2021\\\/05\\\/Second-Order-SQL-Injection-1.png\",\"width\":1060,\"height\":593,\"caption\":\"Second Order SQL Injection\"},\"datePublished\":\"2021-05-13T12:31:26+05:30\",\"dateModified\":\"2022-12-02T12:44:19+05:30\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/second-order-sql-injection-attack\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/second-order-sql-injection-attack\\\/#webpage\"},\"articleSection\":\"Vulnerability Disclosure, Web Application Security, sql, sql injection\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/second-order-sql-injection-attack\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/\",\"nextItem\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/second-order-sql-injection-attack\\\/#listItem\"},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/second-order-sql-injection-attack\\\/#listItem\",\"position\":2,\"name\":\"SECOND ORDER SQL INJECTION ATTACK\",\"previousItem\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/#listItem\"}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/#organization\",\"name\":\"Varutra\",\"url\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.varutra.com\\\/wp-content\\\/uploads\\\/2021\\\/11\\\/Varutra-Found-e1612984024606.jpg\",\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/second-order-sql-injection-attack\\\/#organizationLogo\"},\"image\":{\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/second-order-sql-injection-attack\\\/#organizationLogo\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/author\\\/kalpblogger\\\/#author\",\"url\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/author\\\/kalpblogger\\\/\",\"name\":\"kalpblogger\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/second-order-sql-injection-attack\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5e96a9b330da7c941c1e39217a2fbe38?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"kalpblogger\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/second-order-sql-injection-attack\\\/#webpage\",\"url\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/second-order-sql-injection-attack\\\/\",\"name\":\"Second Order SQL Injection Attack and Exploitation Scenario\",\"description\":\"Understand What is Second Order SQL Injection attack, Exploitation Scenario with Examples, Attack Probability, Impact, and Preventive Measures for it.\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/second-order-sql-injection-attack\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/author\\\/kalpblogger\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/author\\\/kalpblogger\\\/#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/wp-content\\\/uploads\\\/2021\\\/05\\\/Second-Order-SQL-Injection-1.png\",\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/second-order-sql-injection-attack\\\/#mainImage\",\"width\":1060,\"height\":593,\"caption\":\"Second Order SQL Injection\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/second-order-sql-injection-attack\\\/#mainImage\"},\"datePublished\":\"2021-05-13T12:31:26+05:30\",\"dateModified\":\"2022-12-02T12:44:19+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/#website\",\"url\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/\",\"name\":\"Varutra Consulting\",\"description\":\"Secure your digital world with our Cybersecurity services.\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.varutra.com\\\/varutravrt3\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO Pro -->\r\n\t\t<title>Second Order SQL Injection Attack and Exploitation Scenario<\/title>\n\n","aioseo_head_json":{"title":"Second Order SQL Injection Attack and Exploitation Scenario","description":"Understand What is Second Order SQL Injection attack, Exploitation Scenario with Examples, Attack Probability, Impact, and Preventive Measures for it.","canonical_url":"https:\/\/www.varutra.com\/varutravrt3\/second-order-sql-injection-attack\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"og:locale":"en_US","og:site_name":"Varutra Consulting","og:type":"article","og:title":"Second Order SQL Injection Attack and Exploitation Scenario","og:description":"Understand What is Second Order SQL Injection attack, Exploitation Scenario with Examples, Attack Probability, Impact, and Preventive Measures for it.","og:url":"https:\/\/www.varutra.com\/varutravrt3\/second-order-sql-injection-attack\/","og:image":"https:\/\/www.varutra.com\/wp-content\/uploads\/2021\/05\/Second-Order-SQL-Injection-1.png","og:image:secure_url":"https:\/\/www.varutra.com\/wp-content\/uploads\/2021\/05\/Second-Order-SQL-Injection-1.png","og:image:width":"1060","og:image:height":"593","article:section":"Vulnerability Disclosure","article:tag":["sql","sql injection"],"article:published_time":"2021-05-13T07:01:26+00:00","article:modified_time":"2022-12-02T07:14:19+00:00","twitter:card":"summary_large_image","twitter:title":"Second Order SQL Injection Attack and Exploitation Scenario","twitter:description":"Understand What is Second Order SQL Injection attack, Exploitation Scenario with Examples, Attack Probability, Impact, and Preventive Measures for it.","twitter:image":"https:\/\/www.varutra.com\/wp-content\/uploads\/2021\/05\/Second-Order-SQL-Injection-1.png","twitter:label1":"Written by","twitter:data1":"kalpblogger","twitter:label2":"Est. reading time","twitter:data2":"4 minutes","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.varutra.com\/varutravrt3\/second-order-sql-injection-attack\/#article","name":"Second Order SQL Injection Attack and Exploitation Scenario","headline":"SECOND ORDER SQL INJECTION ATTACK","author":{"@id":"https:\/\/www.varutra.com\/varutravrt3\/author\/kalpblogger\/#author"},"publisher":{"@id":"https:\/\/www.varutra.com\/varutravrt3\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/www.varutra.com\/varutravrt3\/wp-content\/uploads\/2021\/05\/Second-Order-SQL-Injection-1.png","width":1060,"height":593,"caption":"Second Order SQL Injection"},"datePublished":"2021-05-13T12:31:26+05:30","dateModified":"2022-12-02T12:44:19+05:30","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.varutra.com\/varutravrt3\/second-order-sql-injection-attack\/#webpage"},"isPartOf":{"@id":"https:\/\/www.varutra.com\/varutravrt3\/second-order-sql-injection-attack\/#webpage"},"articleSection":"Vulnerability Disclosure, Web Application Security, sql, sql injection"},{"@type":"BreadcrumbList","@id":"https:\/\/www.varutra.com\/varutravrt3\/second-order-sql-injection-attack\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.varutra.com\/varutravrt3\/#listItem","position":1,"name":"Home","item":"https:\/\/www.varutra.com\/varutravrt3\/","nextItem":"https:\/\/www.varutra.com\/varutravrt3\/second-order-sql-injection-attack\/#listItem"},{"@type":"ListItem","@id":"https:\/\/www.varutra.com\/varutravrt3\/second-order-sql-injection-attack\/#listItem","position":2,"name":"SECOND ORDER SQL INJECTION ATTACK","previousItem":"https:\/\/www.varutra.com\/varutravrt3\/#listItem"}]},{"@type":"Organization","@id":"https:\/\/www.varutra.com\/varutravrt3\/#organization","name":"Varutra","url":"https:\/\/www.varutra.com\/varutravrt3\/","logo":{"@type":"ImageObject","url":"https:\/\/www.varutra.com\/wp-content\/uploads\/2021\/11\/Varutra-Found-e1612984024606.jpg","@id":"https:\/\/www.varutra.com\/varutravrt3\/second-order-sql-injection-attack\/#organizationLogo"},"image":{"@id":"https:\/\/www.varutra.com\/varutravrt3\/second-order-sql-injection-attack\/#organizationLogo"}},{"@type":"Person","@id":"https:\/\/www.varutra.com\/varutravrt3\/author\/kalpblogger\/#author","url":"https:\/\/www.varutra.com\/varutravrt3\/author\/kalpblogger\/","name":"kalpblogger","image":{"@type":"ImageObject","@id":"https:\/\/www.varutra.com\/varutravrt3\/second-order-sql-injection-attack\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/5e96a9b330da7c941c1e39217a2fbe38?s=96&d=mm&r=g","width":96,"height":96,"caption":"kalpblogger"}},{"@type":"WebPage","@id":"https:\/\/www.varutra.com\/varutravrt3\/second-order-sql-injection-attack\/#webpage","url":"https:\/\/www.varutra.com\/varutravrt3\/second-order-sql-injection-attack\/","name":"Second Order SQL Injection Attack and Exploitation Scenario","description":"Understand What is Second Order SQL Injection attack, Exploitation Scenario with Examples, Attack Probability, Impact, and Preventive Measures for it.","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.varutra.com\/varutravrt3\/#website"},"breadcrumb":{"@id":"https:\/\/www.varutra.com\/varutravrt3\/second-order-sql-injection-attack\/#breadcrumblist"},"author":{"@id":"https:\/\/www.varutra.com\/varutravrt3\/author\/kalpblogger\/#author"},"creator":{"@id":"https:\/\/www.varutra.com\/varutravrt3\/author\/kalpblogger\/#author"},"image":{"@type":"ImageObject","url":"https:\/\/www.varutra.com\/varutravrt3\/wp-content\/uploads\/2021\/05\/Second-Order-SQL-Injection-1.png","@id":"https:\/\/www.varutra.com\/varutravrt3\/second-order-sql-injection-attack\/#mainImage","width":1060,"height":593,"caption":"Second Order SQL Injection"},"primaryImageOfPage":{"@id":"https:\/\/www.varutra.com\/varutravrt3\/second-order-sql-injection-attack\/#mainImage"},"datePublished":"2021-05-13T12:31:26+05:30","dateModified":"2022-12-02T12:44:19+05:30"},{"@type":"WebSite","@id":"https:\/\/www.varutra.com\/varutravrt3\/#website","url":"https:\/\/www.varutra.com\/varutravrt3\/","name":"Varutra Consulting","description":"Secure your digital world with our Cybersecurity services.","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.varutra.com\/varutravrt3\/#organization"}}]}},"aioseo_meta_data":{"post_id":"12250","title":"Second Order SQL Injection Attack&nbsp;and Exploitation Scenario","description":"Understand What is Second Order SQL Injection attack, Exploitation Scenario with Examples, Attack Probability, Impact, and Preventive Measures for it.","keywords":[],"keyphrases":"{\"focus\":{\"keyphrase\":\"Second Order SQL Injection \",\"analysis\":{\"keyphraseInTitle\":{\"title\":\"Focus keyphrase in SEO title\",\"description\":\"Focus keyphrase found in SEO title.\",\"score\":9,\"maxScore\":9,\"error\":0},\"keyphraseInDescription\":{\"title\":\"Focus keyphrase in meta description\",\"description\":\"Focus keyphrase found in meta description.\",\"score\":9,\"maxScore\":9,\"error\":0},\"keyphraseLength\":{\"title\":\"Focus keyphrase length\",\"description\":\"Good job!\",\"score\":9,\"maxScore\":9,\"error\":0,\"length\":4},\"keyphraseInURL\":{\"title\":\"Focus keyphrase in URL\",\"description\":\"Focus keyphrase used in the URL.\",\"score\":5,\"maxScore\":5,\"error\":0},\"keyphraseInIntroduction\":{\"title\":\"Focus keyphrase in introduction\",\"description\":\"Your Focus keyphrase does not appear in the first paragraph. Make sure the topic is clear immediately.\",\"score\":3,\"maxScore\":9,\"error\":1},\"keyphraseInSubHeadings\":{\"title\":\"Focus keyphrase in Subheadings\",\"description\":\"Your H2 and H3 subheadings reflects the topic of your copy. Good job!\",\"score\":9,\"maxScore\":9,\"error\":0},\"keyphraseInImageAlt\":{\"title\":\"Focus keyphrase in image alt attributes\",\"description\":\"Focus keyphrase found in image alt attribute(s).\",\"score\":9,\"maxScore\":9,\"error\":0}},\"score\":90},\"additional\":[{\"keyphrase\":\"Second Order SQL Injection Attack\",\"score\":58,\"analysis\":{\"keyphraseInDescription\":{\"title\":\"Keyphrase in meta description\",\"description\":\"Keyphrase found in meta description.\",\"score\":9,\"maxScore\":9,\"error\":0},\"keyphraseLength\":{\"title\":\"Keyphrase length\",\"description\":\"Keyphrase is slightly long. Try to make it shorter.\",\"score\":6,\"maxScore\":9,\"error\":1,\"length\":5},\"keyphraseInIntroduction\":{\"title\":\"Keyphrase in introduction\",\"description\":\"Your Keyphrase does not appear in the first paragraph. Make sure the topic is clear immediately.\",\"score\":3,\"maxScore\":9,\"error\":1},\"keyphraseInImageAlt\":{\"title\":\"Keyphrase in image alt attributes\",\"description\":\"Keyphrase not found in image alt attribute(s). Add an image with your Keyphrase as alt text.\",\"score\":3,\"maxScore\":9,\"error\":1}}},{\"keyphrase\":\"SQL Injection Attack\",\"score\":67,\"analysis\":{\"keyphraseInDescription\":{\"title\":\"Keyphrase in meta description\",\"description\":\"Keyphrase found in meta description.\",\"score\":9,\"maxScore\":9,\"error\":0},\"keyphraseLength\":{\"title\":\"Keyphrase length\",\"description\":\"Good job!\",\"score\":9,\"maxScore\":9,\"error\":0,\"length\":3},\"keyphraseInIntroduction\":{\"title\":\"Keyphrase in introduction\",\"description\":\"Your Keyphrase does not appear in the first paragraph. Make sure the topic is clear immediately.\",\"score\":3,\"maxScore\":9,\"error\":1},\"keyphraseInImageAlt\":{\"title\":\"Keyphrase in image alt attributes\",\"description\":\"Keyphrase not found in image alt attribute(s). Add an image with your Keyphrase as alt text.\",\"score\":3,\"maxScore\":9,\"error\":1}}},{\"keyphrase\":\"Injection Attack\",\"score\":67,\"analysis\":{\"keyphraseInDescription\":{\"title\":\"Keyphrase in meta description\",\"description\":\"Keyphrase found in meta description.\",\"score\":9,\"maxScore\":9,\"error\":0},\"keyphraseLength\":{\"title\":\"Keyphrase length\",\"description\":\"Good job!\",\"score\":9,\"maxScore\":9,\"error\":0,\"length\":2},\"keyphraseInIntroduction\":{\"title\":\"Keyphrase in introduction\",\"description\":\"Your Keyphrase does not appear in the first paragraph. Make sure the topic is clear immediately.\",\"score\":3,\"maxScore\":9,\"error\":1},\"keyphraseInImageAlt\":{\"title\":\"Keyphrase in image alt attributes\",\"description\":\"Keyphrase not found in image alt attribute(s). Add an image with your Keyphrase as alt text.\",\"score\":3,\"maxScore\":9,\"error\":1}}},{\"keyphrase\":\"SQL Injection\",\"score\":83,\"analysis\":{\"keyphraseInDescription\":{\"title\":\"Keyphrase in meta description\",\"description\":\"Keyphrase found in meta description.\",\"score\":9,\"maxScore\":9,\"error\":0},\"keyphraseLength\":{\"title\":\"Keyphrase length\",\"description\":\"Good job!\",\"score\":9,\"maxScore\":9,\"error\":0,\"length\":2},\"keyphraseInIntroduction\":{\"title\":\"Keyphrase in introduction\",\"description\":\"Your Keyphrase does not appear in the first paragraph. Make sure the topic is clear immediately.\",\"score\":3,\"maxScore\":9,\"error\":1},\"keyphraseInImageAlt\":{\"title\":\"Keyphrase in image alt attributes\",\"description\":\"Keyphrase found in image alt attribute(s).\",\"score\":9,\"maxScore\":9,\"error\":0}}}]}","primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"featured","og_image_url":"https:\/\/www.varutra.com\/wp-content\/uploads\/2021\/05\/Second-Order-SQL-Injection-1.png","og_image_width":"1060","og_image_height":"593","og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":"Vulnerability Disclosure","og_article_tags":[],"twitter_use_og":true,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":"{\"article\":{\"articleType\":\"BlogPosting\"},\"course\":{\"name\":\"\",\"description\":\"\",\"provider\":\"\"},\"faq\":{\"pages\":[]},\"product\":{\"reviews\":[]},\"recipe\":{\"ingredients\":[],\"instructions\":[],\"keywords\":[]},\"software\":{\"reviews\":[],\"operatingSystems\":[]},\"webPage\":{\"webPageType\":\"WebPage\"}}","pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"limit_modified_date":false,"open_ai":null,"created":"2021-10-27 15:11:20","updated":"2022-12-02 07:16:02"},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t<a href=\"https:\/\/www.varutra.com\/varutravrt3\" title=\"Home\">Home<\/a>\n<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t<a href=\"https:\/\/www.varutra.com\/varutravrt3\/category\/vulnerability-disclosure\/\" title=\"Vulnerability Disclosure\">Vulnerability Disclosure<\/a>\n<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\tSECOND ORDER SQL INJECTION ATTACK\n<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.varutra.com\/varutravrt3"},{"label":"Vulnerability Disclosure","link":"https:\/\/www.varutra.com\/varutravrt3\/category\/vulnerability-disclosure\/"},{"label":"SECOND ORDER SQL INJECTION ATTACK","link":"https:\/\/www.varutra.com\/varutravrt3\/second-order-sql-injection-attack\/"}],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/www.varutra.com\/varutravrt3\/wp-json\/wp\/v2\/posts\/12250"}],"collection":[{"href":"https:\/\/www.varutra.com\/varutravrt3\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.varutra.com\/varutravrt3\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.varutra.com\/varutravrt3\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.varutra.com\/varutravrt3\/wp-json\/wp\/v2\/comments?post=12250"}],"version-history":[{"count":5,"href":"https:\/\/www.varutra.com\/varutravrt3\/wp-json\/wp\/v2\/posts\/12250\/revisions"}],"predecessor-version":[{"id":20285,"href":"https:\/\/www.varutra.com\/varutravrt3\/wp-json\/wp\/v2\/posts\/12250\/revisions\/20285"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.varutra.com\/varutravrt3\/wp-json\/wp\/v2\/media\/12272"}],"wp:attachment":[{"href":"https:\/\/www.varutra.com\/varutravrt3\/wp-json\/wp\/v2\/media?parent=12250"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.varutra.com\/varutravrt3\/wp-json\/wp\/v2\/categories?post=12250"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.varutra.com\/varutravrt3\/wp-json\/wp\/v2\/tags?post=12250"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}