> For the complete documentation index, see [llms.txt](https://yigitsengezer.gitbook.io/siber-guvenlik-notlari/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://yigitsengezer.gitbook.io/siber-guvenlik-notlari/network-service-pentesting/smtp-25.md).

# SMTP - 25

## SMTP Nedir?

SMTP, " Simple Mail Transfer Protocol" anlamına gelir. E-posta gönderimini gerçekleştirmek için kullanılır. E-posta hizmetlerini desteklemek için SMTP ve POP'tan oluşan bir protokol çifti gereklidir.

SMTP sunucusu üç temel işlevi yerine getirir:

* SMTP sunucusu üzerinden kimin e-posta gönderdiğini doğrular.&#x20;
* Giden postayı gönderir&#x20;
* Giden posta teslim edilemezse, mesajı gönderene geri gönderir

### Banner Grabbing

```bash
nc -vn 192.168.1.2 25
```

### Kullanıcı Listeleme

```bash
smtp-user-enum -M RCPT -U users.list -D inlanefreight.htb -t 10.129.203.7  
```

### Brute Force

```
hydra -l fiona@inlanefreight.htb -P /usr/share/wordlists/rockyou.txt -t 64 -f 10.129.203.7 smtp 

```

### Komut Listeleme

```bash
telnet 192.168.1.2 25
HELO attacker.xyz
EHLO attacker.xyz
```

### Mail Gönderme

```bash
# CLI
swaks -t victim@example.com -f attacker@example.com --attach @hello.txt --server 192.168.1.1 --header "Subject: Baslik" -au attacker@example.com -ap password123

# GUI
thunderbird
evolution
```

### Open Relay

```
nmap -p25 -Pn --script smtp-open-relay 10.10.11.213
swaks --from notifications@inlanefreight.com --to employees@inlanefreight.com --header 'Subject: Company Notification' --body 'Hi All, we want to hear from you! Please complete the following survey. http://mycustomphishinglink.com/' --server 10.10.11.213
```
