当前位置:网站首页>[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}
边栏推荐
- 【直播报名】Location Cache 模块浅析及 OCP 监控、报警详解
- Binlog and iptables prevent nmap scanning, xtrabackup full + incremental backup, and the relationship between redlog and binlog
- Value and technical thinking of vectorization engine for HTAP
- 划分数据1
- rs485通信OSI模型网络层
- 二分查找法
- MySQL - hiding and deleting indexes
- [dish of learning notes dog learning C] initial level of structure
- 数据可视化-《白蛇2:青蛇劫起》(1)
- Five network IO models
猜你喜欢
![[white hat talks about web security] Chapter 2 browser security](/img/dc/3640da863f9e5e527c9de27e55e99c.png)
[white hat talks about web security] Chapter 2 browser security

零基础学习CANoe Panel(7)—— 文件选择(PathDiaglog)

Signal processing: < three > DFT and FFT

【直播报名】Location Cache 模块浅析及 OCP 监控、报警详解

MySQL engine

Qt创建应用程序托盘及相关功能

Array element removal problem

UVM - two way communication

【攻防世界WEB】难度五星15分进阶题:ics-07

Qt应用程序防止多开,即单例运行
随机推荐
PC Museum (2) 1972 hp-9830a
[C Primer Plus Chapter 3 after class programming questions]
QT create application tray and related functions
Mockito3.8 how to mock static methods (how to mock PageHelper)
Hongmeng's first note
西门子200smart自创库与说明
零基础学习CANoe Panel(7)—— 文件选择(PathDiaglog)
[AHK] AutoHotKey tutorial ①
Siemens 200smart self created library and description
Zero basic learning canoe panel (10) -- checkbox
563 pages (300000 words) overall design scheme of smart Chemical Park (phase I)
js树形结构,根据里层id找出它所属的每层父级集合
[dish of learning notes dog learning C] evaluation expression
零基础学习CANoe Panel(7)—— 开关/显示控件(Input/Output Box )
Redistribution distributed lock types
Disk storage chain B-tree and b+ tree
实时天气API
[white hat talks about web security] Chapter 1 my security world view
Four components and working principle of frequency converter
Zero basic learning canoe panel (7) -- file selection (pathdiaglog)














