┌───────────────────────┐
│                       │
│                       │
│                       │
│                       │
│                       │
│                       │
│                       │
│                       │
│                       │
│                       │
│                       │
│                       │
│                       │
│                       │
│                       │
└───────────────────────┘
Bossline
~ craig
[ 0. Summary ]─────────────────────────────────────────────────────────────//───

Bossline is another intermediate level linux machine from Proving Grounds. It
involves exposing secrets through a known CVE for the initial foothold, and
escalating to root access via a custom wrapper script with sudo execution
privileges.

[ 1. Recon ]───────────────────────────────────────────────────────────────//───

nmap doesn't turn up much - ssh on port 22 and some sort of XML based
application on port 8080, which we can see looks like a local s3 bucket service.
Hitting port 8080 in the browser, we can see the XML output of a list buckets
request. At the moment, there are no buckets which we're privileged to view.
I'm not sure if there's any enumeration we can do on this just yet, but lets
have a quick look for some known vulnerabilities in local S3. Google shows
that there's a known XXE exploit, CVE-2025-27136, which may allow us to read
files on the server due to insecure XML parsing when creating a new bucket.


[ 2. Local Access ]────────────────────────────────────────────────────────//───

The CVE reports include a PoC XML payload, so we can try and create a new bucket
with the payload, and attempt to leak /etc/passwd:
We see no errors, and an ARN has been returned for our new bucket, so that feels
like a success! Let's retrieve the bucket and see if it exposes the contents of
the server side file:
Sweet! We can access sensitive files on the server - and what's more, we've
exposed a user who can remotely access the machine - bosco.

A logical assumption from here is that we can use the uncovered vulnerability
to hopefully find an ssh key for bosco, so let's update our XML payload and
have a look.

Looking for the /.ssh/authorized_keys file returns a file not found error, but
we don't get the same response when using /.ssh/id_rsa - that's promising!
Indeed we have leaked the private key for bosco, and can use it to directly ssh
into the machine, claiming our first flag.
[ 3. Root Access ]─────────────────────────────────────────────────────────//───

First things first, let's see if we can run any programs using sudo. It seems
we can, kedro, which upon inspection is actually a python script. Very
interesting.
I'm no python expert, so claude informed me this is basically a wrapper around
the kedro command line tool, and will pass any command line arguments directly
to it. There must be something we can work with here.

I had to spend a while researching kedro as I hadn't heard of it before, but in
essence it's a tool to help build data pipelines. There was a semi-recent CVE
which enabled RCE, CVE-2024-9701, and I followed this red herring for a while.
It required writing a malicious payload which would be executed during a
deserialization operation, and the kicker was, the machine was running the
vulnerable version. 

I scoured the box for evidence of an existing project, trying to work out where
I was meant to write my payload, and how I could trigger the deserialization. I
came up empty handed, and that's when I changed tactic.

The kedro CLI allows me to create a new project, and I realised I could use
the sudo-enabled script to run my project like so:

    sudo /usr/local/bin/kedro run

After some errors about no nodes in my pipeline, I found the CLI also allowed me
to create a new pipeline, and populated some required files with boilerplate
code. 

With some trial and error, and a lot of googling to understand what happens
when kedro runs, I was able to get my pipeline to execute the python code in
the nodes.py file! Let's stick a reverse shell in there now.
Triggering my project via the wrapper script executed my pipeline, as root, and
popped a reverse shell, from which we can read the final flag:
──[ EOF ]──────────────────────────────────────────────────────────────────//───