当前位置:网站首页>2019年10月SQL注入的两倍
2019年10月SQL注入的两倍
2022-08-03 22:04:00 【New Reading of the Classic of Tea.】
October 2019 Twice SQL Injection
The title reminds us that it is a secondary injection (SQL injection (secondary injection)Injection) - Zhihu), secondary injection vulnerability is a widespread form of security vulnerability in web applications.
The principle of secondary injection:
When inserting data into the database for the first time, I just used addslashes or escaped the special characters with the help of get_magic_quotes_gpc, but addslashes has a feature that although the parameters are filtered, "\" will be added to performEscape, but "\" will not be inserted into the database, and the original data will be retained when writing to the database.
After the data is stored in the database, the developer considers the data to be trusted.When the next query needs to be performed, the "dirty" data is directly removed from the database without further inspection and processing, which will cause secondary SQL injection.For example, when inserting data for the first time, there are single quotation marks in the data and it is directly inserted into the database; then in the next use, a secondary injection is formed in the process of piecing together.
Register an account at will and log in, enter the sql statement, and find that the server escapes our single quotes with \ and does not filter keywords
At this point we need to register a malicious username to log in to get what we want to know
The registered user name is 1' union select database() #, the password is a user
Return to the login page and enter the username (1' union select database() #) and password (a)
Login found that the database ctftraining was exposed
Use the same method to explode the table: Username: 1' union select group_concat(table_name) from information_schema.tables where table_schema='ctftraining' #
strong>, password: a, register and loginGet flag, news, users three tables
Check the fields of the flag table: Username: 1' union select group_concat(column_name) from information_schema.columns where table_name='flag' #, password: a, the same registration and login
Get the flag field
Check the contents of the flag field: Username: 1' union select flag from flag #, Password: a
Get flag
This is the end, let's spread the flowers
边栏推荐
- Unification of east-west and north-south communications
- CAS: 1192802-98-4 _uv cracking of biotin - PEG2 - azide
- CAS:1797415-74-7_TAMRA-Azide-PEG-Biotin
- 2022年全国职业院校技能大赛网络安全 B模块 任务十windows操作系统渗透测试 国赛原题
- 472. Concatenated Words
- B. Paranoid String
- Flink--Join以及Flink函数
- dataframe multi-level index replace index df.swaplevel(axis=1)
- CAS:122567-66-2_DSPE-Biotin_DSPE-Biotin
- 优化查询(工作中)
猜你喜欢
随机推荐
这几个常用 alias,带你高效做事(下)
《强化学习周刊》第56期:GraphIRL、REDEEMER & 眼科强化学习的潜在研究
21天打卡挑战学习MySQL—Day第一周 第一篇
封装、包、访问权限修饰符、static变量
October 2019 Twice SQL Injection
Data_web(九)mongodb增量同步到mongodb
HCIP第十四天
如何设计 DAO 的 PoW 评判标准 并平衡不可能三角
2022的七夕,奉上7个精美的表白代码,同时教大家快速改源码自用
466. Count The Repetitions
E - Swap
A. Color the Picture- Codeforces Round #810 (Div. 1)
软考系统分析师备考经验分享:论持久战
深度学习和机器学习有什么区别?
Bytebase数据库 Schema 变更管理工具
码率vs.分辨率,哪一个更重要?
2022年全国职业院校技能大赛网络安全 B模块 B-1任务一:主机发现与信息收集 国赛原题
Flutter 桌面探索 | 自定义可拖拽导航栏
授人以渔 - 如何自行查询任意 SAP UI5 控件属性的文档和技术实现细节试读版
投资性大于游戏性 NFT游戏到底是不是门好生意