Skip to content
Get 10% Discount on Every Courses
Login/Register
Call: +91-9930824239
Email: services@macksofy.com
Macksofy TrainingsMacksofy Trainings
  • About Us
    • About Macksofy Technologies | Cyber Security Training
    • Our Esteem Clients
  • Courses

      Beginner

      • SEC-100 CyberCore Security Essentials
      • Certified Ethical Hacker CEHV13 with Artificial Intelligence
      • Certified Ethical Hacker with Artificial Intelligence CEHV13 Practical
      • Certified Ethical Hacker CEHv12
      • The Certified SOC Analyst CSA
      • Certified Threat Intelligence Analyst (CTIA)
      • Computer Hacking Forensic Investigator (CHFI)
      • Foundational Wireless Network PEN 210 Course

      Intermediate

      • SEC-100 CyberCore Security Essentials
      • SOC-200: Foundational Security Operations and Defensive Analysis
      • Foundational Wireless Network PEN 210
      • Certified Threat Intelligence Analyst (CTIA)
      • The Certified SOC Analyst CSA
      • Advanced Windows Exploitation EXP-401
      • Advanced macOS Control Bypasses EXP-312

      Professional

      • Certified Penetration Testing Professional CPENT
      • Advanced macOS Control Bypasses OSMR | EXP 312
      • Windows User Mode Exploit Development OSED | EXP 301
      • OSWE | WEB 300 Advanced Web Attacks and Exploitation
      • OSWA | WEB 200 Foundational Web Application Assessments with Kali Linux
      • OSEP | PEN-300 Advanced Evasion Techniques and Breaching Defenses
      • OSCP | PEN 200 Penetration Testing with Kali Linux
  • Certifications
    • Offsec Certification Voucher
    • EC Council Certification Voucher
  • Our Training
    • OSCP+ Training and Certification
    • Sec 100 Cybercore Security Essentials
    • Certified Ethical Hacker (CEH) V13
    • Certified Ethical Hacker Training
    • Certified Threat Intelligence Analyst (CTIA)
    • OSWE (WEB-300) Training And Certification Offsec India
    • The Certified Penetration Testing Professional (CPENT)
    • Computer Hacking Forensic Investigator CHFI
  • Blog
  • Contact Us
Enroll Now
Macksofy TrainingsMacksofy Trainings
  • About Us
    • About Macksofy Technologies | Cyber Security Training
    • Our Esteem Clients
  • Courses

      Beginner

      • SEC-100 CyberCore Security Essentials
      • Certified Ethical Hacker CEHV13 with Artificial Intelligence
      • Certified Ethical Hacker with Artificial Intelligence CEHV13 Practical
      • Certified Ethical Hacker CEHv12
      • The Certified SOC Analyst CSA
      • Certified Threat Intelligence Analyst (CTIA)
      • Computer Hacking Forensic Investigator (CHFI)
      • Foundational Wireless Network PEN 210 Course

      Intermediate

      • SEC-100 CyberCore Security Essentials
      • SOC-200: Foundational Security Operations and Defensive Analysis
      • Foundational Wireless Network PEN 210
      • Certified Threat Intelligence Analyst (CTIA)
      • The Certified SOC Analyst CSA
      • Advanced Windows Exploitation EXP-401
      • Advanced macOS Control Bypasses EXP-312

      Professional

      • Certified Penetration Testing Professional CPENT
      • Advanced macOS Control Bypasses OSMR | EXP 312
      • Windows User Mode Exploit Development OSED | EXP 301
      • OSWE | WEB 300 Advanced Web Attacks and Exploitation
      • OSWA | WEB 200 Foundational Web Application Assessments with Kali Linux
      • OSEP | PEN-300 Advanced Evasion Techniques and Breaching Defenses
      • OSCP | PEN 200 Penetration Testing with Kali Linux
  • Certifications
    • Offsec Certification Voucher
    • EC Council Certification Voucher
  • Our Training
    • OSCP+ Training and Certification
    • Sec 100 Cybercore Security Essentials
    • Certified Ethical Hacker (CEH) V13
    • Certified Ethical Hacker Training
    • Certified Threat Intelligence Analyst (CTIA)
    • OSWE (WEB-300) Training And Certification Offsec India
    • The Certified Penetration Testing Professional (CPENT)
    • Computer Hacking Forensic Investigator CHFI
  • Blog
  • Contact Us

HackTheBox Writeup – Passage

  • Home
  • Cyber News
  • HackTheBox Writeup – Passage
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Cyber News

HackTheBox Writeup – Passage

  • October 25, 2024
  • 0

Greetings from Macksofy Technologies. Below is the detailed walkthrough of the Passage machine which got retired from HackTheBox

The IP of this box is 10.10.10.206

Port Scan

Running NMAP full port scan on it , we get

We got only
2 Open Ports that too for SSH and Web
Moving towards the Web Part
Web
Checking the IP in the browser, we get a RSS Feed page

Scrolling down further in the page, we see that it is powered by CuteNews

Clicking on the RSS button on the above which we saw before , it redirects us to rss.php on the CuteNews web directory

If we look clearly, we can see the CuteNews version ,i.e, 2.1.2 and now moving onto searching for potential exploit through searchsploitNow we try to just access the CuteNews directory, it leads us to the login page

We have an Authenticated Arbitrary File Upload vulnerability on this version, since we dont have any credentials so we will register a new user and then login

As soon as we register, it redirects us to the dashboard with our newly created user

Clicking on the Personal Options, it redirects us to the user settings page and from there we can upload our avatar

We will use a small php web shell to upload in the avatar section

Now we intercept the upload functionality into burp and modify the settings and add the GIF code and change the MIME type to JPEG so that we can bypass the restriction

After sending the request, we can see that our file got uploaded successfully

We can right click and view the image to see the location of the shell

Now we can confirm that we have code execution successfully

Getting reverse shell and checking out netcat listener

We have shell as www-data and now move onto user privilege escalation

Checking into the /CuteNews/cdata/users in the webroot directory, we have a file named lines which has many base64 encoded strings

One of the base64 encoded strings had serialized objects which contained password for user paul which was SHA-256 hashed

We cracked the password online and then switched to user paul

We have our user flag here and then move to privilege escalation to root

Privilege Escalation
Checking the SSH directory of the current user, we see that it has public and private keys which can be used for the other user nadav on the box

So we directly SSH to the other user and get in

Checking the current id of the user , we see that the current user is in the sudoer’s group but we cant use sudo here as it will require password which we dont know in this case

When running linpeas script, we see that the server has USBCreator installed which has a vulnerability where we can use take advantage of the sudo which wont require password , to know more about the vulnerability check the references section in the end of this writeup

To get root shell, we will first upload our SSH to the box and then move further to exploit the vulnerability

The below commands is what stated in the explanation of the writeup, here we upload the ssh key to the root’s ssh folder

We connect to root user through ssh with our keys and get in successfully

References
USBCreator D-Bus Privilege Escalation in Ubuntu Desktop
unit42.paloaltonetworks.com
Tags: ctf, hackthebox, htb, linux, medium

Share on:
HackTheBox Writeup – Academy
HackTheBox Writeup – Luanne

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

macksofy_white (1)

Welcome To Macksofy Technologies Cyber Security Training Certification Courses Macksofy Ethical Hacking Training Institute develops and delivers proprietary vendor neutral professional certifications like for the cyber security industry.

Popular Courses

  • SEC 100 Course
  • Certified Ethical Hacker (CEH) Version 13
  • PEN 200 Course
  • Penetration Testing Professional CPENT

Useful Links

  • Privacy Policy
  • Terms & Condition
  • Refund and Returns Policy

Get Contact

  • Phone: +91-9930824239
  • E-mail: services@macksofy.com
  • Location: Mumbai | Hyderabad | Dubai | Oman | Canada
Icon-facebook Icon-linkedin2 Icon-instagram Icon-twitter

Disclaimer: Some graphics used on this website are sourced from public domains and are freely available for use. This site may also contain copyrighted material whose use has not always been specifically authorized by the copyright owner. All product names, trademarks, and brands mentioned are the property of their respective owners. Certification titles referenced are trademarks of the issuing organizations.

References to companies, products, and services on this website are for identification purposes only. We do not own, claim copyright over, or have explicit permission to use these names, logos, or trademarks, and their inclusion does not imply endorsement.

For further information or concerns, please contact us directly.

©2024. All rights reserved by Macksofy Technology.
Macksofy TrainingsMacksofy Trainings

Sign in

Lost your password?

Sign up

Already have an account? Sign in