当前位置:网站首页>Buuctf reinforcement question ezsql
Buuctf reinforcement question ezsql
2022-07-01 14:21:00 【Silent boiling water】
The title reappears
- I did this problem three months ago , But I didn't get flag, After other big guys make it , Hurry to learn to record a wave .
- The requirements of the title are clearly written :web There are loopholes in the service , Need reinforcement , If the reinforcement is successful, you can visit an address to get flag
- First visit web Service address , Discovery is a login page , Try immediately SQL Inject , Universal password successfully logged in , There are obvious injection vulnerabilities .
- Next SSH Connect to the target machine address , View directory , Find the login page code for code audit , Find the user login authentication code and SQL sentence , If it is found that the user name and password entered are not filtered, it is directly put into SQL Query statement . Obvious loopholes , The next step is to add a filter function , Complete the reinforcement .
- Find the filter function , After trying one by one , In the use of addslashes( ) Function successfully reinforced .
addslashes() function
In every double quote (") Add backslash before : <?php $str = addslashes('Shanghai is the "biggest" city in China.'); echo($str); ?> addslashes() Function returns a string with a backslash before a predefined character . The predefined characters are : Single quotation marks (') Double quotes (")
The backslash (\)
NULL
- stay xshell Modify the code in , as follows :
- I couldn't do it before , Maybe it's because I put addslashes( ) Function is added to the assignment function formula , Lead to the failure of reinforcement .
$username = $_GET['username'];
$password = $_GET['password'];
// Become the following
$username = addslashes($_GET['username']);
$password = addslashes($_GET['password']);
- After reinforcement, log in again with the master key , Show login failure , Reinforcement successful .
- visit Check Service access address , obtain flag.
边栏推荐
- Open source internship experience sharing: openeuler software package reinforcement test
- Research Report on the development trend and competitive strategy of the global pipeline robot inspection camera industry
- 算网融合赋能行业转型,移动云点亮数智未来新路标
- 基于算力驱动、数据与功能协同的分布式动态(协同)渲染/功能运行时
- After being laid off for three months, the interview ran into a wall everywhere, and the mentality has begun to collapse
- App自动化测试开元平台Appium-runner
- 户外LED显示屏应该考虑哪些问题?
- 微服务大行其道的今天,Service Mesh是怎样一种存在?
- Why did you win the first Taosi culture award of 20000 RMB if you are neither a top R & D expert nor a sales Daniel?
- 被裁三個月,面試到處碰壁,心態已經開始崩了
猜你喜欢
2022 PMP project management examination agile knowledge points (6)
App automation testing Kaiyuan platform appium runner
【IoT毕设.上】STM32+机智云AIoT+实验室安全监控系统
【NLP】预训练模型——GPT1
sqlilabs less10
A new book by teacher Zhang Yujin of Tsinghua University: 2D vision system and image technology (five copies will be sent at the end of the article)
Build your own website (21)
[NLP] pre training model - gpt1
Oracle-数据库对象的使用
队列的基本操作(C语言实现)
随机推荐
Build your own website (21)
C 语言基础
Research Report on development trend and competitive strategy of global 4-aminodiphenylamine industry
Research Report on the development trend and competitive strategy of the global pipeline robot inspection camera industry
使用 Lambda 函数URL + CloudFront 实现S3镜像回源
那个很努力的学生,高考失败了……别慌!你还有一次逆袭机会!
Error:Kotlin: Module was compiled with an incompatible version of Kotlin. The binary version of its
30 Devops interview questions and answers
In depth cooperation | Taosi data cooperates with changhongjia Huawei customers in China to provide tdengine with powerful enterprise level products and perfect service guarantee
Fiori applications are shared through the enhancement of adaptation project
sqlilabs less-11~12
[NLP] pre training model - gpt1
[repair version] imitating the template of I love watching movies website / template of ocean CMS film and television system
[IOT completion. Part 2] stm32+ smart cloud aiot+ laboratory security monitoring system
What class loading mechanisms does the JVM have?
Research Report on the development trend and competitive strategy of the global camera filter bracket industry
佩服,阿里女程序卧底 500 多个黑产群……
Research Report on the development trend and competitive strategy of the global navigation simulator industry
When the main process architecture game, to prevent calls everywhere to reduce coupling, how to open the interface to others to call?
SWT/ANR问题--当发送ANR/SWT时候如何打开binder trace(BinderTraces)