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