Redis Unauthorized Access Vulnerability

Source: Internet
Author: User

The company's server was swept out of a redis-related vulnerability, an unauthorized access vulnerability!

That is, there should be no password set, so the vulnerability was scanned, set a password to be finished
Modifying a configuration file
The Redis configuration file defaults to/etc/redis.conf, which finds the following line:

#requirepass foobared
Remove the previous comment and modify it to the desired password:

Requirepass MyPassword (where MyPassword is the password to set)

Restart Redis
If Redis is already configured as a service, you can restart it in the following ways:

Service Redis Restart
If Redis is not configured for service services, it can be restarted in the following ways:
OFF: redis-cli shutdown or the PID of the kill Redis process
Start./src/redis-server redis.conf &

Ps-ef |grep Redis View Reids related processes

Login Verification
After setting up the Redis authentication password, the client needs to enter the authentication password by using the-a parameter, without adding the parameter although it can log on successfully, but does not have any operation permission. As follows:

$./redis-cli-h 127.0.0.1-p 6379
127.0.0.1:6379> keys *
(Error) Noauth Authentication required.
Login with password authentication and verify the operation permissions:

$./redis-cli-h 127.0.0.1-p 6379-a MyPassword
127.0.0.1:6379> Config Get Requirepass
1) "Requirepass"
2) "MyPassword"
See an output similar to the above stating that the Reids Password Authentication configuration was successful

Redis add password before must and research and development of students to do good communication, otherwise, you to increase the password, they may be carrying

Redis Unauthorized Access Vulnerability

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.