> For the complete documentation index, see [llms.txt](https://alham-rizvi.gitbook.io/alhamrizvi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://alham-rizvi.gitbook.io/alhamrizvi/picoctf-writeups/picoctf/general-skills/printer-shares.md).

# Printer Shares — Writeup

**Challenge:** Printer Shares **Category:** General Skills

***

## Description

We are given a network printer service running on port `57520`. The hint suggests using `smbclient`, indicating that the service is likely an SMB file share.

***

## Step 1: Check Connectivity

First, verify that the service is reachable:

```bash
nc -vz mysterious-sea.picoctf.net 57520
```

The connection succeeds, confirming the service is active.

***

## Step 2: Enumerate SMB Shares

List available SMB shares using:

```bash
smbclient -L //mysterious-sea.picoctf.net -p 57520
```

After pressing Enter for the password (anonymous login), we see:

```
shares          Disk      Public Share With Guests
IPC$            IPC       IPC Service
```

***

## Step 3: Connect to the Share

Connect to the accessible share:

```bash
smbclient //mysterious-sea.picoctf.net/shares -p 57520
```

Again, press Enter for the password.

***

## Step 4: List Files

Inside the SMB shell:

```bash
ls
```

Output:

```
dummy.txt
flag.txt
```

***

## Step 5: Retrieve the Flag

Download the flag file:

```bash
get flag.txt
```

Exit the SMB session and read the file:

```bash
cat flag.txt
```

***

## Flag

```
picoCTF{5mb_pr1nter_5h4re5_2f61915b}
```


---

# 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://alham-rizvi.gitbook.io/alhamrizvi/picoctf-writeups/picoctf/general-skills/printer-shares.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.
