# 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
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://yigitsengezer.gitbook.io/siber-guvenlik-notlari/network-service-pentesting/smtp-25.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
