akde/infosec

Information security is ultimately about managing risk


Master/slave configuration

In the master/slave con­fig­u­ra­tion, there is one mas­ter which allows only write access and n slaves which allow only read access.

Impor­tant: The mas­ter must not be in the pro­tect­ed mode.

  • If he can restart­ed or the con­fig file can be changed, set the –pro­tect­ed-mode no flag.
  • If not:
    • On the mas­ter: Set the pass­word with 
      • config set requirepass mypass
    • On the slave: Set the mas­ter’s pass­word with 
      • config set masterauth mypass
    • If a sys­tem wan­t’s the pass­word after log­ging in into the shell again, use the fol­low­ing to authenticate: 
      • auth mypass

Make a node a mas­ter (default):

redis> slaveof no one

Make a node a slave:

redis> slaveof <master_ip> <master_port>

The process is the fol­low­ing, see also the redis-rogue-serv­er script, which needs the addi­tion of the Com­mand module.

  1. Set to slave
  2. Set out­put db file to mod­ule filename
  3. Per­form sync, pass the mod­ule’s bina­ry date escaped
  4. Load the module
  5. Set to master

Now the mod­ule is insert­ed. Note: The mod­ule exp.so has to be com­piled for the cor­rect architecture.

Leave a Reply

About

Personal collection of some infosec stuff. Primary purpose of this site is to collect and organize for myself.

Note: Some content is not publicly visible due to copyright issues. Therefore, some links could be broken.

Checklists

Categories

Checklists: Ports

python -c 'import pty;pty.spawn("/bin/bash")';

python3 -c 'import pty;pty.spawn("/bin/bash")';