[GKCTF 2021]easycms Writeup ——蝉知7.7

[GKCTF 2021]easycms

It is a static web page. Nothing you click on is useful (except for friend links). Use dirsearch to scan it.

image-20230706184519066

Scanned/.admin

image-20230706190327102

then visitadmin.php

image-20230707103234332

The URL behind this refereris after base64 decoding /admin.php. I originally wanted to change it directly and /flagfound that it didn't work. I could only try to log in from

image-20230707002121305

I originally planned to crack the account password directly, but I tried a weak password adminand 12345succeeded directly.

At first I tried to upload files, but the upload kept failing, so I had to try another method.

image-20230707103830426

Click 设计-->主题and then select a theme, click 自定义, there is a导出主题

image-20230707105200248

Just put something in there

image-20230707105231086

After clicking Save, a file will be downloaded to us. Copy the download link of the file.

image-20230707105359793+

http://node4.anna.nssctf.cn:28640/admin.php?m=ui&f=downloadtheme&theme=L3Zhci93d3cvaHRtbC9zeXN0ZW0vdG1wL3RoZW1lL2RlZmF1bHQvMS56aXA=

You can see themethat it is the ciphertext after base64 encryption, and decode it to get

/var/www/html/system/tmp/theme/default/1.zip

Guessing it may exist 任意文件下载, change the content after the theme to /flagthe base-encrypted string to get the payload:

http://node4.anna.nssctf.cn:28640/admin.php?m=ui&f=downloadtheme&theme=L2ZsYWc=

After downloading, it is a compressed package. Change the file extension to .txtor open it directly notepad++to get the flag.

postscript

Since it was a CVE, I looked around to see if there were any other ways to play, and then played again following the other masters’ methods.

[Code Audit] There is a command execution vulnerability in Chanzhi Enterprise Portal System v7.7

The steps to log in to the administrator backend are the same.

It can be seen from 设计-->高级here that the code can be edited, but we are prompted to create a file

image-20230707111407416

Then go to WeChat settings in settings, write something and save it

image-20230707112531322

Click Completed Access, enter ../../../system/tmp/kzgi.txt/0the last txt name here as the original ID, which is the file prompted by the previous modified template, and enter the rest as you like.

image-20230707113400640

? ? ? ? , OK, sent, can’t call

image-20230707113618649

The above is pure clown behavior, please do not imitate it.

おすすめ

転載: blog.csdn.net/Leaf_initial/article/details/131593737