当前位置:网站首页>Tianmu MVC audit II
Tianmu MVC audit II
2022-07-06 09:51:00 【XRSec】
This article is edited by Er Nong Xi Zhu
Audit controller
After auditing the entry file and figuring out the routing rules in the previous article , We begin to formally audit the controller .
Home Catalog
from app/home/index.php Start audit , There is nothing to say ahead , But notice here , Although it is judgment, it is not PC Execute when logging in , But we can see the query method it calls , I feel very familiar with , More like think The query method defined in , We recall the last audit , The filtering mechanism of audit , Let's search the whole picture where(, Check one by one , See if there is where The condition is two parameters , perhaps int type .
backstage SQL Inject
Everything comes to him who waits , Here we are , Find out $sid Not wrapped in single quotation marks , And has not been cast int type . The catalogue is admin\controller\special.php, We try to reproduce . Good one SQL Inject holes .
The front desk SQL Inject
Just when I thought there was no front desk SQL At the time of Injection , All of a sudden , I found a location . Suddenly remembered a sentence : edge , Too wonderful for words .
Look for . have a look $sid How did it get in , Is it controllable
Search this globally get_category_list(), Found in home/controller/special.php in ,category() In this method , adopt GET Incoming sid This value , Although this method is right $sid Protected by single quotation marks , But in calling get_category_list() Time is running naked , well , Repeat it
Completely ok. The audit is completed when the front desk arrives here
The front desk XSS
stay home\controller\articles.php,articles Method this position htmlspecialchars_decode, This function decodes the materialized symbols , It suddenly caught my attention , Because we have audited , It will change the passed in value html Materialized coding , And then put it in the database . In this position, it decodes the data again , Vegetable chicken intuition tells me , There must be something wrong , Let's look for it $data Where does this variable come from
In this 32 OK, we can see that it is queried from this database .
Let's find out how to write , There is too much content here , Use the debug Look at the query statement :"SELECT * FROMtemmoku_articleASAINNER JOINtemmoku_contentASBON A.aid =B.aid WHERE A.aid=3 ORDER BY A.aid DESC LIMIT 1" In retrospect, I made a very uncomfortable mistake , I'll search jab.'content, No search for , Doubt life ing, however , I remembered later , Search for jab."content To position , Uncomfortable .
ad locum ,admin\public_class\article.php in , Find write jab.content database . Keep going back
Find out user\controller\articles.php Call occurs , Look up ,add Method .
Register an account and open the permission to send articles .
Storage type XSS It's a success
边栏推荐
- 为什么要数据分层
- [flask] crud addition and query operation of data
- CANoe不能自动识别串口号?那就封装个DLL让它必须行
- 解决小文件处过多
- Teach you how to write the first MCU program hand in hand
- [Yu Yue education] reference materials of complex variable function and integral transformation of Shenyang University of Technology
- Nc29 search in two-dimensional array
- There are software load balancing and hardware load balancing. Which one to choose?
- 单片机如何从上电复位执行到main函数?
- MapReduce instance (V): secondary sorting
猜你喜欢

112 pages of mathematical knowledge sorting! Machine learning - a review of fundamentals of mathematics pptx

数据建模有哪些模型

CANoe不能自动识别串口号?那就封装个DLL让它必须行

在CANoe中通过Panel面板控制Test Module 运行(初级)

单片机实现模块化编程:思维+实例+系统教程(实用程度令人发指)

MapReduce instance (IV): natural sorting

C#/. Net phase VI 01C Foundation_ 01: running environment, process of creating new C program, strict case sensitivity, meaning of class library

Combined search /dfs solution - leetcode daily question - number of 1020 enclaves

Several silly built-in functions about relative path / absolute path operation in CAPL script

五月集训总结——来自阿光
随机推荐
Redis分布式锁实现Redisson 15问
一大波開源小抄來襲
Minio distributed file storage cluster for full stack development
Learning SCM is of great help to society
Global and Chinese markets for hardware based encryption 2022-2028: Research Report on technology, participants, trends, market size and share
Meituan Er Mian: why does redis have sentinels?
MapReduce working mechanism
51单片机进修的一些感悟
[deep learning] semantic segmentation: paper reading: (2021-12) mask2former
How does the single chip microcomputer execute the main function from power on reset?
Day 5 of MySQL learning
112 pages of mathematical knowledge sorting! Machine learning - a review of fundamentals of mathematics pptx
【深度学习】语义分割:论文阅读:(CVPR 2022) MPViT(CNN+Transformer):用于密集预测的多路径视觉Transformer
Cooperative development in embedded -- function pointer
33岁可以学PLC吗
小白带你重游Spark生态圈!
嵌入式开发中的防御性C语言编程
[Yu Yue education] Wuhan University of science and technology securities investment reference
Several silly built-in functions about relative path / absolute path operation in CAPL script
The real future of hardware engineers may not be believed by you if I say so