fiyocms 2.0.6.1 version Replay and vulnerability analysis

0x00 Foreword

0x01 arbitrary file upload

1. Vulnerability reproduction

Vulnerability Location: Dashboard "Themes" default "Files
Here Insert Picture Description
When you click Simpan capture, the src content parameters and parameter modification for the new file name and its contents
Here Insert Picture Description
ah ha ~
Here Insert Picture Description

2. Code Analysis

Position: \ fiyocms / dapur / apps / app_theme / libs / save_file.php
Here Insert Picture Description
from line 27 can be seen using the file_get_contents()function to csave the contents of the parameter to fthe parameter files, but not for any treatment c and f, directly by the POST method by value, resulting in an arbitrary file upload vulnerability.

0x02 read arbitrary files

1. Vulnerability reproduction

Vulnerability location: admin "Themes" default "Files
capture clicks index.php
Here Insert Picture Description
modify parameters, read success
Here Insert Picture Description

2. Code Analysis

Position: /dapur/apps/app_theme/libs/check_file.php
Here Insert Picture Description
can be seen from the lines 13 and 14, by getstitching directly assigned When file path and file name method $file, and then assigned to $furl, and directly without any treatment () method reads file_get_contents by line 23 $furl, there is any file read vulnerability.

0x03 delete any file

1. Vulnerability reproduction

Vulnerability location: admin "Settings" Backup
capture when you click Backup
Here Insert Picture Description
modify the parameter file
Here Insert Picture Description
deleted successfully ~ ~
Here Insert Picture Description

2. Code Analysis

Position: dapur \ apps \ app_config \ controller \ backuper.php
Here Insert Picture Description
can be seen from the 16th line, when it is determined to delete the backup file types to the database directly through the unlink function, not only by the location of the file and the POST method pass through any value deal with it and ../../../../.backup/splicing, resulting in vulnerabilities delete any file.

Guess you like

Origin www.cnblogs.com/0nc3/p/12071258.html