XCTF Web Record (bug)

bug

Enter the page, there is no useful information, one registration, one to retrieve the password:
Insert picture description here
first register one, log in to see: the
Insert picture description here
second option click, prompt:
Insert picture description here
in the retrieve password, try to enter, capture:
Insert picture description here
try to change the username admin: The
Insert picture description here
modification is successful, login is performed, and the login is successful.

Click on the second option:
Insert picture description here

Show that the IP is not allowed, construct X-Forwarded-For:
Insert picture description here
ok:
Insert picture description here
View source code:
Insert picture description here
Prompt file operation, upload, download, delete? ? (Upload, download, delete):
Insert picture description here

The upload is successful and the file is uploaded.

Upload picture:
Insert picture description here
upload php file:
Insert picture description here
upload picture of content text php code:
Insert picture description here

Most likely, I know that the content cannot be detected in the php format, and the file name cannot be php.

So the payload:

内容:<script language='php'>111</script>
文件名:php4 php5 phtml等(这里好像只能php4,php5)

Insert picture description here

to sum up

Logic loopholes.

Extension of php file extension.

php file content format:

<? ... ?> (在配置文件中通过short_open_tag打开)
<?php ... ?> 
<script language="php"> ... </script> 
<% ... %> (ASP风格标签,在5.3.0版中放弃使用)

Guess you like

Origin blog.csdn.net/qq_45742511/article/details/114663794