当前位置:网站首页>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 * FROM
temmoku_articleAS
AINNER JOIN
temmoku_contentAS
BON 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
边栏推荐
- Minio distributed file storage cluster for full stack development
- Basic concepts of libuv
- 在CANoe中通過Panel面板控制Test Module 運行(初級)
- CANoe仿真功能之自动化序列(Automation Sequences )
- 112 pages of mathematical knowledge sorting! Machine learning - a review of fundamentals of mathematics pptx
- PR 2021 quick start tutorial, first understanding the Premiere Pro working interface
- 有软件负载均衡,也有硬件负载均衡,选择哪个?
- Hero League rotation map automatic rotation
- Combined search /dfs solution - leetcode daily question - number of 1020 enclaves
- Selection of software load balancing and hardware load balancing
猜你喜欢
Defensive C language programming in embedded development
Regular expressions are actually very simple
【深度学习】语义分割:论文阅读:(CVPR 2022) MPViT(CNN+Transformer):用于密集预测的多路径视觉Transformer
33岁可以学PLC吗
听哥一句劝,按这套嵌入式的课程内容和课程体系去学习
Detailed explanation of cookies and sessions
英雄联盟轮播图手动轮播
大学想要选择学习自动化专业,可以看什么书去提前了解?
Mapreduce实例(四):自然排序
Teach you how to write the first MCU program hand in hand
随机推荐
一大波開源小抄來襲
The real future of hardware engineers may not be believed by you if I say so
018.有效的回文
Control the operation of the test module through the panel in canoe (primary)
Mapreduce实例(十):ChainMapReduce
英雄联盟轮播图手动轮播
Use of activiti7 workflow
CANoe的数据回放(Replay Block),还是要结合CAPL脚本才能说的明白
听哥一句劝,按这套嵌入式的课程内容和课程体系去学习
Programmation défensive en langage C dans le développement intégré
MapReduce instance (VIII): Map end join
[CV] target detection: derivation of common terms and map evaluation indicators
Vs All comments and uncomments
Publish and subscribe to redis
Nc29 search in two-dimensional array
六月刷题02——字符串
手把手教您怎么编写第一个单片机程序
How does the single chip microcomputer execute the main function from power on reset?
What you have to know about network IO model
通过bat脚本配置系统环境变量