> For the complete documentation index, see [llms.txt](https://cas-cyber.gitbook.io/cas-cybersecurity/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cas-cyber.gitbook.io/cas-cybersecurity/windows-hacking/throwback-network/webshells-and-you.md).

# Webshells and you!

![pdsense login page](/files/a983i5I49CpUrnU6nXh9)

Your team has informed you that the pfSense box be may be running in a default configuration which makes gaining access easy. Use this information to your advantage and gain access to the pfSense configuration panel before moving on.

### pfSense Configuration Panel Overview&#x20;

After logging into the pfSense configuration panel, we are greeted by a dashboard showing the status of the firewall. This configuration panel gives us a lot of information and a lot of power. We can view and alter the way that the firewall acts as well as monitor the status of the network. To use pfSense to our advantage we will look for a command prompt or web shell to execute commands and get a reverse shell on the machine.

Default login works:

username: admin

password: pfsense

![](/files/z9ueOV9rMcVVkKHSh8uL)

### Web Shells Overview

Traditionally, web shells have represented to some extent a means to an end, however, they can also be used in more permanent scenarios. Common implementations include simple command execution, simple reverse shells that can be ‘caught’ with netcat, and more complex meterpreter shells. Provided that you are not starting with something like a meterpreter shell, you’ll likely move into upgrading shortly thereafter. One important note, **websites typically run as a low privileged user such as www-data**, so be prepared to move into privilege escalation following gaining your shell.

### Finding an Attack Vector

In order to execute commands in a web app, we first need to find our vector that executes these commands. The web shell can be a command line interface directly integrated into the web server, a limited functionality shell, or a PHP command execution shell. In the case of pfSense, it can execute commands in a command prompt as well as PHP Commands.&#x20;

![pfsense php Command Execution Shell](/files/famZ2Jukvq1yptbmJ5X5)

### Questions

![](/files/96lLDvF3aRLxMkNrYeCx)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://cas-cyber.gitbook.io/cas-cybersecurity/windows-hacking/throwback-network/webshells-and-you.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
