当前位置:网站首页>Kdevtmpfsi processing of mining virus -- Practice
Kdevtmpfsi processing of mining virus -- Practice
2022-06-23 17:49:00 【OwenZhang】
Symptoms
The server CPU The use of resources has always been 100% The state of , adopt top Command view , Detect suspicious processes kdevtmpfsi. adopt google Search for , It's a mining virus .
Investigation method
First : see kdevtmpfsi process , Use ps -ef | grep kdevtmpfsips -ef | grep kinsing Command view , See the picture below .
PS: adopt
ps -efOrder to find outkdevtmpfsiProcess number , direct kill -9 Process number and delete /tmp/kdevtmpfsi Executable files . But I haven't 1 Minute process is running again , Then I can think of ,kdevtmpfsiThere are daemons or scheduled tasks . adoptcrontab -lSee if there are any suspicious planned tasks .
The second step : According to the above results, we know kdevtmpfsi Process number is 10393, Use systemctl status 10393 Find out kdevtmpfsi There are daemons , See the picture below .
The third step :kill fall kdevtmpfsi Daemon kill -9 30903 30904, Again killall -9 kdevtmpfsi Mining virus , Finally delete kdevtmpfsi Execution procedure rm -f /tmp/kdevtmpfsi.
After the fact check
- adopt Does the command search have kdevtmpfsi file
- find / -name "kdevtmpfsi"
- find / -name "kinsing"
- see Linux ssh Log in to the audit log .
CentosAndRedHatThe audit log path is/var/log/secure,UbuntuAndDebianThe audit log path is/var/log/auth.log. - Check crontab Is there any suspicious task in the planned task
- find / -name kdevtmpfsi
- find / -name kinsing
- cd /var/spool/cron
- Check whether there are related Trojan horse scheduled tasks executing
- If so, delete and restart crontab
- Turn off scheduled tasks
- service crond stop
Follow up work traceability , Find program vulnerabilities , No access ip, Is not normal ip. Source program download .
Use clamav To the whole Linux Do a full scan , Identify the infected file and delete .
Find the variant name of the daemon file .
Delete all
- find / -name "kdevtmpfsi" | xargs rm -rf
- find / -name "kinsing" | xargs rm -rf
So far, the anti-virus work has basically come to an end . Observe the server service in the next few days , Whether the process is abnormal .
Later protection
- Enable
ssh Public key login, Disable password login . Virtual machine: Perfect security strategy , Inlet flow , Generally only open 80 443 Just port , The outlet flow can be unlimited by default , If there is a need to limit according to demand .The physical machine: Can passHardware firewallperhapsOn the machine iptablesTo open the flow rules at the entrance and exit .- This machine does not directly need to provide external services , You can reject all traffic at the entrance of the external network card , adopt
jumperMachine intranet login service machine . - The company has the ability to build security scanning services , Check the machine regularly for leaks and fix .
Summary : Here are some measures , Incomplete . Here is just the effect of throwing a brick to attract jade , More measures need to be combined with the actual situation of their own business , Otherwise, it will be a castle in the air .
Then check the network connection of the system
netstat -anpt
1
Found that there are still connections
Next, check the file locations that can be connected
ps aux | grep 6712
1
Found the file in /tmp/kinsing stay tmp There is no such file in view , Maybe it's just that the process hasn't shut down
Use the command to close the abnormal process
kill -9 6712
1
Check the network connection again , No problem
Add a little knowledge
ps -ef | grep kdevtmpfsi
The reason why the process number has been changing
ps -ef | grep xx The displayed process is the process you are looking for , Every time you check it, it changes
Ha ha ha , I'm weak
My blog will be synchronized to tencent cloud + Community , Invite everyone to join us :https://cloud.tencent.com/developer/support-plan?invite_code=3jmgtho7tfs40
边栏推荐
- Hapoxy cluster service setup
- Why do we say that the data service API is the standard configuration of the data midrange?
- Database Experiment 2 query
- How code 39 check bits are calculated
- QT layout manager [qvboxlayout, qhboxlayout, qgridlayout]
- Meituan Sanmian: how do you understand the principle of redis master-slave replication?
- MySQL transaction submission process
- [JS reverse hundred examples] pedata encryption information and zlib Application of gunzipsync()
- Freemark uses FTL files to generate word
- What is the personal finance interest rate in 2022? How do individuals choose financial products?
猜你喜欢

qYKVEtqdDg

Performance test bottleneck tuning in 10 minutes! If you want to enter a large factory, you must know

美团三面:聊聊你理解的Redis主从复制原理?

What can the accelerated implementation of digital economy bring to SMEs?

Date selection of hotel check-in time and check-out time

Wechat applet: time selector for the estimated arrival date of the hotel

C # connection to database

Meituan Sanmian: how do you understand the principle of redis master-slave replication?

How important is 5g dual card dual access?
![QT layout manager [qvboxlayout, qhboxlayout, qgridlayout]](/img/62/a0425a325f123ba91a7a69cf854d2c.png)
QT layout manager [qvboxlayout, qhboxlayout, qgridlayout]
随机推荐
Réponse 02: pourquoi le cercle Smith peut - il "se sentir haut et bas et se tenir à droite et à droite"?
数据库 实验二 查询
手机开户流程是什么?现在网上开户安全么?
qYKVEtqdDg
MySQL - reasons for using repeatable read
[go] calling Alipay to scan code for payment in a sandbox environment
ABP framework - data access infrastructure (Part 2)
MySQL的 安裝、配置、卸載
Another breakthrough! Alibaba cloud enters the Gartner cloud AI developer service Challenger quadrant
Is it cost-effective to buy a long-term financial product?
MySQL的 安装、配置、卸载
解析 | 模-数(A/D)转换器
POC about secureworks' recent azure Active Directory password brute force vulnerability
混沌工程在云原生中间件稳定性治理中的实践分享
C#与数据库连接
Petitpotam – NTLM relay to ad CS
Explanation of the principle and code implementation analysis of rainbow docking istio
Year end: the "time value" and business methodology of live broadcast E-commerce
Self supervised learning (SSL)
Look, this is the principle analysis of modulation and demodulation! Simulation documents attached