当前位置:网站首页>[actual combat record] record the whole process of the server being attacked (redis vulnerability)
[actual combat record] record the whole process of the server being attacked (redis vulnerability)
2022-07-03 22:01:00 【Anty_ Ria】
Catalog
summary
In the original project process , Pay more attention to the realization of project functions . And ignore a very important thing —— Disaster recovery capacity of the project . Although I have heard of hacker attacks , But I always feel that I am far away from these things , This kind of thing should not happen to me . Because of negligence , Then I had the experience of being attacked . Fortunately, the offensive means are relatively common , And the server alarms in time , I react quickly , Only then did we strengthen the solution to this crisis .
The whole process of the event
Plan to take a look at the server status before going to bed at night , It doesn't matter , It scares me directly .( Post a part , There are many subsequent attacks )
good heavens , This is really the first time I have encountered such a thing , Enter the alarm log and take a closer look , It is found that the server is offsite SSH Connected to , Blind guess should be brutally cracked password . Then click into the console … I'm a fool , This is really hard to break .
To tell the truth, I'm really flustered at this time , After all, the first experience . But there was a little excitement in the panic , Instantly ignite fighting spirit , Soon after calming down , First submitted Alibaba emergency work order , Then start to settle down and solve .
The earliest alarm was about the mining program , I can't think of the answer . My server is always fine , Where did the mining program come from , Is it because I accidentally downloaded the Trojan horse program ??
I follow the console log , Baidu all the way , Finally, I found a similar case . The server was invaded as a miner , But how can good without loopholes be invaded . I carefully recall my recent operation , Deployed two days ago Redis… wait ! It seems that I just saw one Redis Attack events caused by vulnerabilities .
Go back and watch it again , I found that the situation encountered by that brother was highly consistent with mine . Decisive and direct Baidu Redis dig . Directly open the door to the new world .
Because I have no experience , The whole processing process is fighting against resourcefulness . It can only be said that the attacker will always think one step more than you . When I try to stop Redis The service , One of me Root The account failed because of insufficient permissions .
Then , I try to use chattr Tools to empower , Then a dramatic scene happened , Console prompt command not found .
Is this uninstalled directly for me . Just when I was confused , The mobile phone receives the alarm message again : There are worm codes and Backdoors in the system , I realized that I should first try to block the source of the attacker . But at this time, the key is modified by the other party , Because there are no permissions , modify SSH The password has also failed .
I quickly switched to the console , Obtain again through other verification methods Administrator rights , thus , Everything began to get under control , I quickly revised SSH password , Then start cloud killing .
Have to say ,“ Problem procedure ” Are very hidden . Remove the most prominent documents , What impressed me more were the programs hidden in the system's scheduled tasks and the programs hidden in /tmp Some files under the folder .
But in artificial + Under the fierce offensive of both tools , Filter according to the time when the file was created , Quickly screened and cleaned up a batch of scripts . Then replace Redis Default port , Restart project , Modify the firewall .
But there has always been a ip Hang it here , Blocking cannot block , Just reverse it and see which bastard it is .

I found his website , Find out how to contact , Send an email warning directly !
Then just put this ip adopt iptables Full port black .
So far, the whole event is basically over , There may still be unclean places in the system . Other follow-up work will be done slowly .
This solution summary
The root cause :Redis Loophole
First, let's have a general understanding of the attack process :
Generally speaking , because Redis By default 6379 port . The attacker first uses the scanning tool to scan to open 6379 Port server , Then attack
The user puts his own key , adopt Redis Vulnerabilities in the replacement file mechanism , Sneak it into your server , This is the time , Attacker on
We've got it SSH The ability to connect . You can start further damage to the server .
Stop loss plan
- Shut down the server , The firewall shuts down immediately 6379 port . Cut off the attack input source .
- Rollback using server snapshots .
- Cloud kill , Handle suspicious files .
- Submit work orders quickly , Get advice and help from professionals
Prevention programs
- Often take snapshot backups of the server
- Replacement port , Do not use the default port , Set more complex passwords
- Pay more attention to Redis Update log of , Reacting quickly after the vulnerability is exposed will reduce losses .
- The realization of functions is no longer the first element in development , We should take into account security .
Main cause : Self factors
Insufficient attention has been paid to the risks of cloud deployment , Not enough attention has been paid to vulnerabilities .
summary
Through this event , Gained a lot of additional knowledge , Also alert yourself to unknown things, there are many , You must always be alert , Reduce unnecessary losses .
边栏推荐
- JS Demo calcule combien de jours il reste de l'année
- 十大券商开户注册安全靠谱吗?有没有风险的?
- Blue Bridge Cup Guoxin Changtian single chip microcomputer -- led lamp module (V)
- Preliminary understanding of C program design
- Netfilter ARP log
- Imitation Netease cloud music applet
- 2022 high altitude installation, maintenance and removal of examination question bank and high altitude installation, maintenance and removal of examination papers
- Common SQL sets
- Station B, dark horse programmer, employee management system, access conflict related (there is an unhandled exception at 0x00007ff633a4c54d (in employee management system.Exe): 0xc0000005: read locat
- Is the account opening of Guotai Junan Securities safe and reliable? How to open Guotai Junan Securities Account
猜你喜欢

MySQL——JDBC

Redis concludes that the second pipeline publishes / subscribes to bloom filter redis as a database and caches RDB AOF redis configuration files

Awk getting started to proficient series - awk quick start

(5) User login - services and processes - History Du touch date stat CP

Blue Bridge Cup Guoxin Changtian single chip microcomputer -- software environment (II)

treevalue——Master Nested Data Like Tensor

Station B, dark horse programmer, employee management system, access conflict related (there is an unhandled exception at 0x00007ff633a4c54d (in employee management system.Exe): 0xc0000005: read locat

Common SQL sets

UI automation test: selenium+po mode +pytest+allure integration

What should the future of the Internet be like when Silicon Valley employees flee the big factory and rush to Web3| Footprint Analytics
随机推荐
Global and Chinese market of wireless hard disk 2022-2028: Research Report on technology, participants, trends, market size and share
China's Call Center Industry 14th five year plan direction and operation analysis report Ⓔ 2022 ~ 2028
Global and Chinese market of AC induction motors 2022-2028: Research Report on technology, participants, trends, market size and share
On my first day at work, this API timeout optimization put me down!
What indicators should be paid attention to in current limit monitoring?
Market layout planning and latest dynamic analysis report of China's smart public security industry Ⓕ 2022 ~ 2028
Intimacy communication -- [repair relationship] - use communication to heal injuries
Awk getting started to proficient series - awk quick start
regular expression
Is the account opening of Guotai Junan Securities safe and reliable? How to open Guotai Junan Securities Account
How to install sentinel console
JS notes (III)
Remember the experience of automatically jumping to spinach station when the home page was tampered with
2022 electrician (elementary) examination questions and electrician (elementary) registration examination
Exclusive interview with the person in charge of openkruise: to what extent has cloud native application automation developed now?
2022 G3 boiler water treatment registration examination and G3 boiler water treatment examination papers
[dynamic programming] Ji Suan Ke: Suan tou Jun breaks through the barrier (variant of the longest increasing subsequence)
Après 90 ans, j'ai démissionné pour démarrer une entreprise et j'ai dit que j'allais détruire la base de données Cloud.
How PHP gets all method names of objects
The latest analysis of crane driver (limited to bridge crane) in 2022 and the test questions and analysis of crane driver (limited to bridge crane)