Lian_Yu — TryHackMe Walkthrough
嗯,用户让我帮忙总结一篇文章的内容,控制在100个字以内,而且不需要特定的开头。首先,我需要仔细阅读这篇文章,了解它的主要内容。 这篇文章看起来像是一个CTF(Capture The Flag)挑战的详细步骤。作者描述了如何通过一系列技术手段,包括网络扫描、目录爆破、提取凭证、隐写术和权限提升,最终获得目标系统的完全控制权。 用户的需求是用中文总结内容,并且控制在100字以内。这意味着我需要抓住文章的核心要点:攻击过程、使用的工具和技术、以及最终的结果。 接下来,我需要将这些要点浓缩成一句话。确保涵盖攻击过程、使用的技术(如网络扫描、目录爆破等)、提取凭证和权限提升,以及最终的目标(获取用户和root权限)。 最后,检查字数是否符合要求,并确保语言简洁明了。 </think> 文章描述了一次CTF挑战中的攻击过程,通过Nmap扫描、目录爆破、提取凭证、隐写术和权限提升等技术手段,成功获取目标系统的用户和root权限。 2026-4-14 14:46:24 Author: infosecwriteups.com(查看原文) 阅读量:8 收藏

Death Esther

Press enter or click to view image in full size

Introduction

In this walkthrough, I tackle the Lian_Yu room, moving from initial enumeration to full root access by chaining web discovery, credential extraction, steganography, and privilege escalation.

Task 1. Find the Flags

Welcome to Lian_YU, this Arrowverse themed beginner CTF box! Capture the flags and have fun.

Question 1. Deploy the VM and Start the Enumeration.

No answer needed

Question 2. What is the Web Directory you found?

2100

Question 3. What is the file name you found?

green_arrow.ticket

Question 4. What is the FTP Password?

!#th3h00d

Question 5. what is the file name with SSH password?

shado

Question 6. User.txt

THM{P30P7E_K33P_53CRET5__C0MPUT3R5_D0N'T}

Question 7. Root.txt

THM{MY_W0RD_I5_MY_B0ND_IF_I_ACC3PT_YOUR_CONTRACT_THEN_IT_WILL_BE_COMPL3TED_OR_I'LL_BE_D34D}

Initial Reconnaissance

I started with an Nmap scan using default scripts and version detection to quickly map the exposed attack surface.

nmap -sV -sC 10.49.161.195

The scan quickly revealed a small but interesting set of open services:

  • FTP running on port 21
  • SSH exposed on port 22
  • A web server on port 80
  • RPC service on port 111

The presence of FTP alongside a web service immediately stood out. In many cases, misconfigured FTP services become an easy entry point, so I kept that in mind as I moved forward.

Web Enumeration

With the web server exposed, I shifted focus to port 80 and opened the target in the browser.

Press enter or click to view image in full size

At first glance, nothing useful was visible on the surface. No obvious inputs, no leaks, nothing actionable. That usually means one thing. Time to dig deeper.

Directory Bruteforcing

I started enumerating hidden paths using dirsearch with a well-known wordlist.

dirsearch -u http://10.49.161.195 -w SecLists/Discovery/Web-Content/DirBuster-2007_directory-list-2.3-medium.txt
Target: http://10.49.161.195/
[20:13:50] Starting:
[20:14:30] 301 - 236B - /island -> http://10.49.161.195/island/
[20:18:22] 403 - 199B - /server-status
Task Completed

The scan returned an interesting directory:

/island

That gave me a new attack vector to explore.

Hidden Clues in Source Code

After navigating to /island, I checked the page source instead of just relying on what was rendered.

Press enter or click to view image in full size

Inside the source, I found a hidden keyword:

vigilante

At this stage, it looked like a potential username. It could be tied to FTP or SSH, but without a password, it was not immediately usable. Still, it was a valuable piece of intel, so I noted it down and continued enumerating.

Deeper Enumeration

I pushed further into the /island directory with another round of directory brute forcing.

dirsearch -u http://10.49.161.195/island/ -w SecLists/Discovery/Web-Content/DirBuster-2007_directory-list-2.3-medium.txt
Target: http://10.49.161.195/
[20:25:42] Starting: island/
[20:26:01] 301 - 241B - /island/2100 -> http://10.49.161.195/island/2100/
Task Completed

This revealed another hidden path:

/island/2100

Opening it in the browser did not immediately reveal anything useful.

Press enter or click to view image in full size

While inspecting the source code, I noticed a reference pointing toward a file with a .ticket extension. That immediately suggested there might be something intentionally hidden. I followed the same enumeration approach and continued digging deeper to locate it.

dirsearch -u http://10.49.161.195/island/2100 -w SecLists/Discovery/Web-Content/DirBuster-2007_directory-list-2.3-medium.txt -e .ticket
Target: http://10.49.161.195/
[20:25:42] Starting: island/2100
[20:26:01] 301 - 241B - /green_arrow.ticket -> http://10.49.161.195/island/2100/green_arrow.ticket
Task Completed

This time, I discovered a file:

/island/2100/green_arrow.ticket

Extracting Credentials

Opening the file revealed an encoded string.

RTy8yhBQdscX

The format suggested it was not random. After analyzing the pattern, I identified it as Base58 encoding. I decoded it to retrieve the original value.

Press enter or click to view image in full size

The decoded output gave me a potential password:

!#th3h00d

At this point, I had a likely username and password combination gathered through enumeration. The next step was to validate where these credentials could be used.

Gaining Access to FTP

With a potential username and password in hand, I moved to validate them against the FTP service.

ftp 10.49.161.195
Name: vigilante
Password: !#th3h00d

The login was successful, confirming that the credentials were valid for FTP access.

Exploring FTP Storage

Once inside, I listed the available files on the server.

ls

The directory contained three image files:

  • Leave_me_alone.png
  • Queen's_Gambit.png
  • aa.jpg

Press enter or click to view image in full size

I downloaded all of them locally for further analysis.

get Leave_me_alone.png
get Queen's_Gambit.png
get aa.jpg

Enumerating User Directories

Before moving ahead, I checked the /home directory to understand the system users.

cd /home
ls

This revealed two users:

  • slade
  • vigilante

That aligned well with the username I had already discovered earlier.

Analyzing Downloaded Files

I started inspecting the downloaded images. One file immediately stood out.

Get Death Esther’s stories in your inbox

Join Medium for free to get updates from this writer.

Remember me for faster sign in

The file Leave_me_alone.png refused to open, and even metadata analysis showed an issue.

Press enter or click to view image in full size

The error suggested that the file format was corrupted or manipulated. To verify this, I opened the file in a hex editor.

Press enter or click to view image in full size

At first, nothing obvious stood out. But after comparing the header with a valid PNG signature, it became clear that the file header was incorrect.

Press enter or click to view image in full size

I corrected the header manually.

Press enter or click to view image in full size

After fixing it, the image opened successfully.

Press enter or click to view image in full size

Inside the image, I found a password:

password

Extracting Hidden Data

Next, I moved to the other image file to check for hidden content. I used steghide to extract any embedded data.

steghide extract -sf aa.jpg

After providing the passphrase, it extracted a zip file:

ss.zip

Unzipping it revealed two files.

cat passwd.txt
cat shado

The contents were:

passwd.txt

This is your visa to Land on Lian_Yu # Just for Fun ***
a small Note about it

Having spent years on the island, Oliver learned how to be resourceful and
set booby traps all over the island in the common event he ran into dangerous
people. The island is also home to many animals, including pheasants,
wild pigs and wolves.

shado

M3tahuman

The second file looked like a password, and given the earlier user enumeration, it was likely tied to one of the system users.

User Access via SSH

Using the discovered credentials, I attempted SSH access.

ssh [email protected]
Username: slade  
Password: M3tahuman

The login was successful, confirming valid user access on the system.

User Flag

Once inside, I listed the directory contents. The user flag was present in the home directory.

Press enter or click to view image in full size

THM{P30P7E_K33P_53CRET5__C0MPUT3R5_D0N'T}

That marked successful user-level access on the machine.

Privilege Escalation

With user access established, I shifted focus toward privilege escalation. The first step was to check which commands I could run with elevated privileges.

sudo -l

Press enter or click to view image in full size

The output showed that /usr/bin/pkexec could be executed with root privileges. Whenever I find a binary listed under sudo, my next move is to verify if it can be abused for escalation.

For that, I referred to GTFOBins, a well-known resource that documents how common Linux binaries can be leveraged to bypass restrictions and escalate privileges in misconfigured environments.

I looked up pkexec on GTFOBins and found a working method to spawn a root shell.

Press enter or click to view image in full size

The technique was straightforward:

sudo pkexec /bin/sh

This works because when executed via sudo, pkexec does not drop elevated privileges and can spawn a shell as root. ([GTFOBins][2])

Press enter or click to view image in full size

This gave me a root shell.

Root Flag

With root access confirmed, I navigated to retrieve the final flag.

THM{MY_W0RD_I5_MY_B0ND_IF_I_ACC3PT_YOUR_CONTRACT_THEN_IT_WILL_BE_COMPL3TED_OR_I'LL_BE_D34D}

Press enter or click to view image in full size

Thanks for reading.

Press enter or click to view image in full size


文章来源: https://infosecwriteups.com/lian-yu-tryhackme-walkthrough-2dc9ad347dee?source=rss----7b722bfd1b8d---4
如有侵权请联系:admin#unsafe.sh