我的服务器受到了流量攻击服务器,怎么办

手机软件办公游戏服务器被攻击了么,怎么解决(急啊.....)-红联Linux系统门户
您的位置:
&& 查看内容 - - -
服务器被攻击了么,怎么解决(急啊.....)
sugar99999发布于
&&字号: &&&&(网友评论&11&条)&
#cat /var/log/message (出现如下日志,有没有什么解决方法,谢....)
Aug 14 10:02:01 www crond(pam_unix)[16763]: session opened for user root by (uid=0)
Aug 14 10:02:05 www crond(pam_unix)[16762]: session closed for user root
Aug 14 10:02:05 www crond(pam_unix)[16764]: session closed for user root
Aug 14 10:02:11 www crond(pam_unix)[16763]: session closed for user root
Aug 14 10:02:39 www sshd(pam_unix)[16817]: session opened for user root by root(uid=0)
Aug 14 10:03:01 www crond(pam_unix)[16851]: session opened for user root by (uid=0)
Aug 14 10:03:01 www crond(pam_unix)[16850]: session opened for user root by (uid=0)
Aug 14 10:03:11 www crond(pam_unix)[16851]: session closed for user root
Aug 14 10:03:14 www crond(pam_unix)[16850]: session closed for user root
Aug 14 10:04:02 www crond(pam_unix)[16914]: session opened for user root by (uid=0)
Aug 14 10:04:02 www crond(pam_unix)[16913]: session opened for user root by (uid=0)
Aug 14 10:04:02 www crond(pam_unix)[16912]: session opened for user root by (uid=0)
Aug 14 10:04:06 www crond(pam_unix)[16912]: session closed for user root
Aug 14 10:04:06 www crond(pam_unix)[16914]: session closed for user root
Aug 14 10:04:11 www crond(pam_unix)[16913]: session closed for user root
Aug 14 10:04:40 www sshd(pam_unix)[16970]: session opened for user root by (uid=0)
Aug 14 10:05:01 www crond(pam_unix)[17002]: session opened for user root by (uid=0)
Aug 14 10:05:02 www crond(pam_unix)[17002]: session closed for user root
作者: pkncoin&发布日期:
不太懂,你是个人服务器吧,建议最好每天都做数据备份,这个问题本人觉得去咨询服务空间商吧,他们应该可以有更好的解决办法的
作者: 丁丁&发布日期:
不懂!!不过帮你顶起来,让会的高手来解决
作者: 丁丁&发布日期:
作者: &发布日期:
高手呢?我也想知道怎么解决阿!!!在顶一下
作者: 丁丁&发布日期:
:time:1:time:1:time:1:time:1:time:1:time:1:time:1:time:1
作者: shyboy8688&发布日期:
一起帮忙啊!
作者: lihome&发布日期:
作者: mdf-001&发布日期:
不会,帮顶。
作者: yong123&发布日期:
我也不想知道!
作者: 苏小小&发布日期:
你用root上去。 history看他做了什么工作了。
一般如果是被攻击了。 这个时候很多系统文件已经被更换了。
所以这个时候只能重新安装系统为好。。
从日志里没什么特别的信息判定是攻击啊?
你下次把系统的telnet ftp都关闭。
把打印服务器升级一下。
共有评论数 11/每页显示数 10
发表评论,与各位同人交流。回复请点击下方的我要评论按钮(游客可回复),要发表贴子请点击
=>Linux教程下载?“”(请点击),Linux教程免费下载。
=>求助Linux问题?论坛有39版块,覆盖所有Linux技术层面。前往“”
=>怎样学Linux我的Linux网站,我的Linux之家!学Linux,从这里开始!
 |  |  |  | 
&2014 红联 Powered by SupSite注册时间 15:20:21
最后登录 13:52:26
用户头衔:注册会员
状态:我不在线
我在观察系统安全日志的时候,一直发现有人在不断的连接我的服务器,
尝试用不同的密码来登录服务器,请问我该如何应付这种情况呢?
[PHP]
May 30 08:38:57 myserver sshd[2751]: Did not receive identification string from 218.241.83.79
May 30 08:42:29 myserver sshd[2772]: Invalid user staff from 218.241.83.79
May 30 00:42:29 myserver sshd[2775]: input_userauth_request: invalid user staff
May 30 08:42:29 myserver sshd[2772]: pam_unix(sshd:auth): user unknown
May 30 08:42:29 myserver sshd[2772]: pam_unix(sshd:auth): au logname= uid=0 euid=0 tty=ssh ruser= rhost=218.241.83.79
May 30 08:42:29 myserver sshd[2772]: pam_succeed_if(sshd:auth): error retrieving information about user staff
May 30 08:42:31 myserver sshd[2772]: Failed password for invalid user staff from 218.241.83.79 port 46406 ssh2
May 30 00:42:31 myserver sshd[2775]: Failed password for invalid user staff from 218.241.83.79 port 46406 ssh2
May 30 00:42:31 myserver sshd[2775]: Received disconnect from 218.241.83.79: 11: Bye Bye
May 30 08:42:36 myserver sshd[2777]: Invalid user sales from 218.241.83.79
May 30 00:42:36 myserver sshd[2780]: input_userauth_request: invalid user sales
May 30 08:42:36 myserver sshd[2777]: pam_unix(sshd:auth): user unknown
May 30 08:42:36 myserver sshd[2777]: pam_unix(sshd:auth): au logname= uid=0 euid=0 tty=ssh ruser= rhost=218.241.83.79
May 30 08:42:36 myserver sshd[2777]: pam_succeed_if(sshd:auth): error retrieving information about user sales
May 30 08:42:38 myserver sshd[2777]: Failed password for invalid user sales from 218.241.83.79 port 47507 ssh2
May 30 00:42:38 myserver sshd[2780]: Failed password for invalid user sales from 218.241.83.79 port 47507 ssh2
May 30 00:42:38 myserver sshd[2780]: Received disconnect from 218.241.83.79: 11: Bye Bye
May 30 08:42:44 myserver sshd[2781]: Invalid user recruit from 218.241.83.79
May 30 00:42:54 myserver sshd[2784]: input_userauth_request: invalid user recruit
May 30 08:42:54 myserver sshd[2781]: pam_unix(sshd:auth): user unknown
May 30 08:42:54 myserver sshd[2781]: pam_unix(sshd:auth): au logname= uid=0 euid=0 tty=ssh ruser= rhost=218.241.83.79
May 30 08:42:54 myserver sshd[2781]: pam_succeed_if(sshd:auth): error retrieving information about user recruit
May 30 08:42:56 myserver sshd[2781]: Failed password for invalid user recruit from 218.241.83.79 port 48083 ssh2
May 30 00:42:56 myserver sshd[2784]: Failed password for invalid user recruit from 218.241.83.79 port 48083 ssh2
May 30 00:42:56 myserver sshd[2784]: Connection closed by 218.241.83.79
May 30 09:49:25 myserver su: pam_unix(su:session): session closed for user root
May 30 11:29:50 myserver sshd[7898]: Did not receive identification string from 221.11.140.231
May 30 11:55:26 myserver sshd[9841]: pam_unix(sshd:auth): au logname= uid=0 euid=0 tty=ssh ruser= rhost=59.52.28.136 user=root
May 30 11:55:29 myserver sshd[9841]: Failed password for root from 59.52.28.136 port 33517 ssh2
May 30 03:55:29 myserver sshd[9844]: Failed password for root from 59.52.28.136 port 33517 ssh2
May 30 03:55:29 myserver sshd[9844]: Received disconnect from 59.52.28.136: 11: Bye Bye
May 30 11:55:35 myserver sshd[9860]: pam_unix(sshd:auth): au logname= uid=0 euid=0 tty=ssh ruser= rhost=59.52.28.136 user=root
May 30 11:55:36 myserver sshd[9860]: Failed password for root from 59.52.28.136 port 34053 ssh2
May 30 03:55:36 myserver sshd[9863]: Failed password for root from 59.52.28.136 port 34053 ssh2
May 30 03:55:36 myserver sshd[9863]: Received disconnect from 59.52.28.136: 11: Bye Bye
May 30 11:55:42 myserver sshd[9877]: pam_unix(sshd:auth): au logname= uid=0 euid=0 tty=ssh ruser= rhost=59.52.28.136 user=root
May 30 11:55:44 myserver sshd[9877]: Failed password for root from 59.52.28.136 port 34444 ssh2
May 30 03:55:44 myserver sshd[9880]: Failed password for root from 59.52.28.136 port 34444 ssh2
May 30 03:55:44 myserver sshd[9880]: Received disconnect from 59.52.28.136: 11: Bye Bye
May 30 11:55:50 myserver sshd[9903]: pam_unix(sshd:auth): au logname= uid=0 euid=0 tty=ssh ruser= rhost=59.52.28.136 user=root
May 30 11:55:52 myserver sshd[9903]: Failed password for root from 59.52.28.136 port 34849 ssh2
May 30 03:55:52 myserver sshd[9906]: Failed password for root from 59.52.28.136 port 34849 ssh2
May 30 03:55:52 myserver sshd[9906]: Received disconnect from 59.52.28.136: 11: Bye Bye
May 30 11:55:58 myserver sshd[9924]: pam_unix(sshd:auth): au logname= uid=0 euid=0 tty=ssh ruser= rhost=59.52.28.136 user=root
May 30 11:56:00 myserver sshd[9924]: Failed password for root from 59.52.28.136 port 35242 ssh2
May 30 03:56:00 myserver sshd[9927]: Failed password for root from 59.52.28.136 port 35242 ssh2
May 30 03:56:00 myserver sshd[9927]: Received disconnect from 59.52.28.136: 11: Bye Bye
May 30 11:56:05 myserver sshd[9946]: pam_unix(sshd:auth): au logname= uid=0 euid=0 tty=ssh ruser= rhost=59.52.28.136 user=root
May 30 11:56:08 myserver sshd[9946]: Failed password for root from 59.52.28.136 port 35587 ssh2
May 30 03:56:08 myserver sshd[9950]: Failed password for root from 59.52.28.136 port 35587 ssh2
May 30 03:56:08 myserver sshd[9950]: Received disconnect from 59.52.28.136: 11: Bye Bye
May 30 11:56:13 myserver sshd[9963]: pam_unix(sshd:auth): au logname= uid=0 euid=0 tty=ssh ruser= rhost=59.52.28.136 user=root
May 30 11:56:15 myserver sshd[9963]: Failed password for root from 59.52.28.136 port 36048 ssh2
May 30 03:56:15 myserver sshd[9966]: Failed password for root from 59.52.28.136 port 36048 ssh2
May 30 03:56:15 myserver sshd[9966]: Received disconnect from 59.52.28.136: 11: Bye Bye
May 30 11:56:21 myserver sshd[9984]: pam_unix(sshd:auth): au logname= uid=0 euid=0 tty=ssh ruser= rhost=59.52.28.136 user=root
May 30 11:56:23 myserver sshd[9984]: Failed password for root from 59.52.28.136 port 36494 ssh2
May 30 03:56:23 myserver sshd[9987]: Failed password for root from 59.52.28.136 port 36494 ssh2
May 30 03:56:23 myserver sshd[9987]: Received disconnect from 59.52.28.136: 11: Bye Bye
May 30 11:56:28 myserver sshd[10001]: pam_unix(sshd:auth): au logname= uid=0 euid=0 tty=ssh ruser= rhost=59.52.28.136 user=root
May 30 11:56:31 myserver sshd[10001]: Failed password for root from 59.52.28.136 port 36949 ssh2
May 30 03:56:31 myserver sshd[10004]: Failed password for root from 59.52.28.136 port 36949 ssh2
May 30 03:56:31 myserver sshd[10004]: Received disconnect from 59.52.28.136: 11: Bye Bye
May 30 11:56:45 myserver sshd[10017]: pam_unix(sshd:auth): au logname= uid=0 euid=0 tty=ssh ruser= rhost=59.52.28.136 user=root
May 30 11:56:47 myserver sshd[10017]: Failed password for root from 59.52.28.136 port 37420 ssh2
注册时间 23:17:00
最后登录 17:34:40
用户头衔:退役版主
状态:我不在线
换个用户作root用吧 有root用户就总有这样的信息的
注册时间 12:00:00
最后登录 14:33:16
用户头衔:资深版主
状态:我不在线
不允许 root 用户登录,再怎么破也没用。。。。。。
我的wiki: http://wiki.linuxgnu.org&br /&
马甲Show:终极幻想 黯然销魂 DawnFantasy FinalFantasy ArmageddonMa
注册时间 15:20:21
最后登录 13:52:26
用户头衔:注册会员
状态:我不在线
我现在贴出来的只是刚好那个家伙在用root进行尝试而已,我的系统本来就是不允许root直接登录的。但是他还是会用其他的用户来不断尝试的,有没有什么自动监测的手段可以消灭这种攻击或尝试?
注册时间 18:38:54
最后登录 11:49:27
用户头衔:注册会员
状态:我不在线
没办法,你走在马路上,不能要求别人不许看你:)
注册时间 13:38:22
最后登录 04:17:59
用户头衔:注册会员
状态:我不在线
你可以用脚本规定3次失败,就封IP。
注册时间 13:23:10
最后登录 07:48:03
用户头衔:注册会员
状态:我不在线
标题:我也遇到这个问题,介绍一下我的解决办法
我的解决办法是使用swatch和iptables结合.
到网上找一找swatch有很多相关文章.
注意,安装swatch时需要很多类如
Time::HiRes
Date::Calc
Date::Format
File::Tail
Date::Parse
之类的东东,
这些都是Perl的可选模块,请用以下方法安装(有些模块在yum里面找不到)
perl -MCPAN -e "shell"
install Some::Module
这些必要的模块安装好了以后再到
rpm.phone.net上找与你的OS对应的swatch安装程序(RPM格式)
安装时加-nodeps参数,
安装好以后再进行设置,设置中发现有人恶意登陆还可以给自己发邮件呢.
我现在的设置是当用户通过ssh登陆一次不成功就立即添加到防火墙,所以以后自己登陆时要小心.!
以下是我的设置:
# Global swatch filter file
# To ignore a IP-range
# ignore /216\.239\.37\./
# Invalid SSH Login Attempts
watchfor /(: [iI]nvalid [uU]ser )(.*)( from ::ffff:)(.*)$/
throttle threshold=3,delay=0:1:0,key=$4
mail addresses=xxx\@,subject="SSH:\ Invalid\ User\ Rule1\ $4"
exec "/sbin/iptables -A swatch_rejects -s $4 -j DROP"
# Failed SSH Login Attempts
watchfor /(: [fF]ailed password for )(.*)( from ::ffff:)(.*)( port )(.*)$/
throttle threshold=3,delay=0:1:0,key=$4
mail addresses=xxxx\@,subject="SSH:\ Invalid\ User\ Rule2\ $4"
exec "/sbin/iptables -A swatch_rejects -s $4 -j DROP"
# Invalid SSH Login Attempts. Another one - just formed differently
# watchfor /([aA]uthentication [fF] logname)(.*)(rhost=)(\d+\.\d+\.\d+\.\d+)(.*)$/
throttle threshold=3,delay=0:1:0,key=$4
mail addresses=xxxx\@,subject="SSH:\ Invalid\ User\ Rule3\ $4"
exec "/sbin/iptables -A swatch_rejects -s $4 -j DROP"
然后在/etc/rc.d/rc.sysinit中添加
# /usr/bin/swatch --tail-file=/var/log/messages --tail-args='--follow=name --lines=1' --config-file=/etc/swatch/ssh-swatch.conf --pid-file=/var/run/swatch.pid --daemon
或者使用下面的服务启动:
#!/bin/bash
This shell script enables the automatic use of YUM
Seth Vidal &skvidal@phy.duke.edu&
# chkconfig:
# description:
Enable daily run of yum, a program updater.
# processname:
# config: /etc/swatch/ssh-swatch.conf
pid=`/bin/ps -e -o cmd,pid | /bin/grep ^swatch | /bin/awk '{print $2}'`
case "$1" in
'start')
# start the swatch process
if [ "$pid" != "" ];
echo 'Swatch System is already initialized.'
if [ -f /usr/bin/swatch -a -f /etc/swatch/ssh-swatch.conf ];
then /usr/bin/swatch --config-file=/etc/swatch/ssh-swatch.conf --tail-file=/var/log/messages --tail-args='--follow=name --lines=1' --pid-file=/var/run/swatch.pid --daemon &
echo 'Swatch System startup complete.' ;;
'stop')
#stop all swatch processes
if [ "$pid" != "" ];
then kill -TERM $pid
##/usr/bin/killall tail
echo 'Swatch System shutdown complete.'
echo 'No Swatch System initialized.'
echo "Usage: /etc/init.d/swatch { start | stop }" ;;
你就大功告成啦............................
预祝你的LINUX愉快之旅!!!
注册时间 15:20:21
最后登录 13:52:26
用户头衔:注册会员
状态:我不在线
谢谢老大,我立刻试试看
注册时间 17:09:59
最后登录 21:52:13
用户头衔:注册会员
状态:我不在线
我的认为是:
open ssh 版本要最新,就用ssh2+root登录,不用密码,方便。
ssh2不是用 1024位的密钥对么?随便让他试验那,大不了2-3个月换一对密钥,换协议也行
我认为服务器,最大的隐患是php代码,次之是mysql和linux漏洞
除了上面的。
我用脚丫子想也知道你服务器 ,已知的linux漏洞你服务器肯定有,因为 90%的人根本不知道每月要补漏洞,他们从不打补丁,还在那幻想 linux比win安全。
说说 你的发行版,你都打了什么安全补丁,大家也探讨一下。
车里焖,&br /&
建议linuxer在做某件事前想想,为什么要这么做。&br /&
在向目的出发前,收集分析他人成功和失败经验,少走弯路。&br /&
linux要么向win或unix学习,要么重新发明一遍win或unix。
注册时间 12:00:00
最后登录 14:33:16
用户头衔:资深版主
状态:我不在线
允许 root 登录是绝对不是一个好策略。至少也要用普通用户登录后,再 su 为 root。至于密钥这个登录方法,不错,就是要把密钥文件保管好。呵呵。
我的wiki: http://wiki.linuxgnu.org&br /&
马甲Show:终极幻想 黯然销魂 DawnFantasy FinalFantasy ArmageddonMa
注册时间 15:20:21
最后登录 13:52:26
用户头衔:注册会员
状态:我不在线
我用的发行版本是fedora5,至于补丁,全部都是最新的,每天都自动yum update。web服务器则是自行编译的apache 2.2.2/ php 4.4.2/ mysql 5.0.21已经禁止了root的远程登录,关闭了ssh。只允许指定用户登录并执行su
注册时间 12:00:00
最后登录 14:33:16
用户头衔:资深版主
状态:我不在线
别人尝试登录你的服务器,基本是无法阻止的。当然,你可以用防火墙封锁了他的IP。
我的wiki: http://wiki.linuxgnu.org&br /&
马甲Show:终极幻想 黯然销魂 DawnFantasy FinalFantasy ArmageddonMa
注册时间 12:52:33
最后登录 15:36:43
用户头衔:注册会员
状态:我不在线
标题:我以前也遇到过
后来我改了配置。
1、不允许root用户登录
2、改变sshd监听的端口,不要用22.
没有签名了
Processed in : 0.038000 second(s) (C)2014LinuxSir -在网络迅速发展的世界中,服务器是赤裸裸暴露在网络中的,基于windows操作系统服务..
扫扫二维码,随身浏览文档
手机或平板扫扫即可继续访问
如何防止网络服务器受到恶意攻击
举报该文档为侵权文档。
举报该文档含有违规或不良信息。
反馈该文档无法正常浏览。
举报该文档为重复文档。
推荐理由:
将文档分享至:
分享完整地址
文档地址:
粘贴到BBS或博客
flash地址:
支持嵌入FLASH地址的网站使用
html代码:
&embed src='/DocinViewer-.swf' width='100%' height='600' type=application/x-shockwave-flash ALLOWFULLSCREEN='true' ALLOWSCRIPTACCESS='always'&&/embed&
450px*300px480px*400px650px*490px
支持嵌入HTML代码的网站使用
您的内容已经提交成功
您所提交的内容需要审核后才能发布,请您等待!
3秒自动关闭窗口解决php流量攻击的有效方法 - A5站长网
当前位置:
解决php流量攻击的有效方法
15:33&&来源:&
  最近很多站长都受到了php流量攻击,有的是攻击别人,有的是自己攻击自己的服务器,使很多服务器瞬间瘫痪网站无法打开,本人也是深受其害,所以总结了几个简单的方法,终于搞定PHPddos攻击的问题了,下面我就和大家分享一下。(在这里先感谢下A5论坛里的朋友之前的帮忙,谢谢A5论坛,谢谢站长)
  先来了解一下什么是phpddos流量攻击,phpddos是一种黑客通过入侵WEB服务器植入phpshell从而控制这个phpshell向其他受害者或自己的服务器发送UDP攻击包进行DDOS攻击,这类攻击有一个最大的特点,就是上传流量瞬间增大,通常流量高达数十甚至近百M,将整台服务器,甚至将整台机柜的宽带堵住,使网站无法运行,而这样的攻击,我们无法从远程解决,一但那个phpshell运行,你的宽带将被全部占用,远程都无法连接。
  被攻击后能做的只有联系机房的工作人员,让他进到你的服务器里把你的IIS关掉,再没查清楚是哪个站点被入侵时,尽量一个站点也不要开,以免再次受到攻击,怎么看是不是这个攻击呢,不能说关掉ISS好了,就是这种攻击了,而要根据更准确的查看,才可以确定是什么问题,打开360安全卫士,然后打开功能大全,到里面找到流量防火墙,在这里你可以看到每一个进程的上传和下载流量的多少,注意隐藏的系统服务也要点开看一下,一般都是上传超大才是phpddos攻击,而且一般都会在w3wp.exe和mysql.exe上传流量会很大,最小也几百M,最大多少G,好知道是这个攻击了,我们就来想办法解决。
  解决方法:
  1.利用360流量防火墙,把w3wp.exe和mysql.exe的上传流量限制一下,根据你服务器自身宽带的情况进行限制,一般限制在200&300KB都没什么问题,这样就不怕phpshell发起大流量攻击了,不过这个办法有一个缺点,就是当你重新启动服务器时,你之前所限制w3wp.exe和mysql.exe就不起作用了,要重新限制一下,用这个方法的朋友一定要注意这一点。
  2.通过更改php运行环境来解决,打开php.ini找到disable_functions=这项,然后把后面改成gzinflate,passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_alter,ini_restore,dl,pfsockopen,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,fsocket,fsockopen。将allow_url_fopen = Off,再找到extension=php_sockets.dll这项,把前面加上分号,就是屏蔽掉这项。
  3.通过查找攻击源解决,批量查找所有网站内是否存在phpshell攻击源代码,源代码为(由于代码太乱以图片方式展示给大家)如图:
  通过批量查找网站内是否有相似上图的源码,找到后删除,把网站权限设置为不可写入,这样在没有修补好这个网站漏洞前,不会再被植入木马了。
  以上三种方法在正常情况下都能解决这个问题(注:如果上面的方法不起作用,那你只能到a5站长网的论坛上请教下别人,相信一定会有解决的办法的),本人总结了三种方法,供大家选用,如果哪位大侠有更好的解决方法,请一定分享。谢谢!本文由(什么减肥药效果最好)网原创,转载请注明出处,谢谢!
责任编辑:扬扬
作者:放手
延伸阅读:关键词:
站长杂谈 草根站长信息中心

我要回帖

更多关于 攻击服务器 的文章

 

随机推荐