一、创建用户并授权
1、创建用户、设置密码
[[email protected] CrazyEye]useradd audit [[email protected] CrazyEye]# passwd audit Changing password for user audit. New password: BAD PASSWORD: The password is shorter than 8 characters Retype new password: passwd: all authentication tokens updated successfully.
2、sudoers授权
$cat /etc/sudoers %crazy_audit ALL=NOPASSWD:ALL #/usr/bin/strace,/usr/bin/python3
3、给文件夹授权
chown -R audit.audit /opt/CrazyEye/
二、安装必要工具
1、安装sshpass
curl -O -L http://downloads.sourceforge.net/project/sshpass/sshpass/1.06/sshpass-1.06.tar.gz tar xvzf sshpass-1.06.tar.gz cd sshpass-1.06 ./configure make && sudo make install
2、安装django
[[email protected] CrazyEye]# su audit [[email protected] CrazyEye]$ pwd /usr/local/Python-3.5.3/bin ./pip3 install --upgrade pip ./pip3 install django -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
3、后台授权机器
三、实战测试
1、启动程序
[[email protected] CrazyEye]$ pwd /opt/CrazyEye [[email protected] CrazyEye]$ python manage.py runserver 0.0.0.0:9000
2、登陆截图
1、登陆堡垒机
2、连接到目标主机
3、目标主机操作命令
3、部分日志展示
原文地址:https://www.cnblogs.com/luoahong/p/9497678.html
时间: 2024-11-09 09:29:26