{"id":705,"date":"2019-12-14T16:02:57","date_gmt":"2019-12-14T16:02:57","guid":{"rendered":"http:\/\/zerothcode.com\/blog\/?p=705"},"modified":"2020-03-28T09:54:13","modified_gmt":"2020-03-28T09:54:13","slug":"sickos-1-1-walkthrough","status":"publish","type":"post","link":"https:\/\/zerothcode.com\/blog\/sickos-1-1-walkthrough\/","title":{"rendered":"SickOS 1.1 \u2014 Walkthrough"},"content":{"rendered":"<section class=\"ev ew ex ey ez\">\n<div class=\"n p\">\n<div class=\"ac ae af ag ah fa aj ak\">\n<h5 id=\"7ed2\" class=\"hi hj cn ar aq hk hl hm hn ho hp hq hr hs ht hu hv\">walkthrough Description from Vulnhub<\/h5>\n<pre class=\"hz ia cn ib ic b id ie if ig ih ii ij ik il im hf\">This (walkthrough) CTF gives a clear analogy how hacking strategies can be performed on a network to compromise it in a safe environment. This vm is very similar to labs I faced in OSCP. The objective being to compromise the network\/machine and gain Administrative\/root privileges on them.\r\nLink: walkthrough<\/pre>\n<p><a class=\"bo dd um un uo up\" href=\"https:\/\/www.vulnhub.com\/entry\/sickos-11,132\/\" target=\"_blank\" rel=\"noopener nofollow noreferrer\">https:\/\/www.vulnhub.com\/entry\/sickos-11,132\/<\/a><\/p>\n<\/div>\n<\/div>\n<\/section>\n<section class=\"ev ew ex ey ez\">\n<div class=\"n p\">\n<div class=\"ac ae af ag ah fa aj ak\">\n<h5 id=\"4721\" class=\"hz ia cn ar ic b id ie if ig ih ii ij ik il im hf\">walkthrough As usual, I started with a simple port scan. This included script scanning, version enumeration on all ports and skipping ping probes, since we know that the machine is online. walkthrough<\/h5>\n<figure class=\"it iu iv iw ix iy em en paragraph-image\">\n<div class=\"iz ja bl jb ak\">\n<div class=\"em en uq\">\n<div class=\"jg r bl jh\">\n<div class=\"ur r\">\n<div class=\"bk jc eq t u jd ak bd je jf\"><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"oo qj eq t u jd ak jm alignnone\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/max\/976\/0*aq9HLReBzY6a9Yuu\" alt=\"walkthrough\" width=\"976\" height=\"645\" \/><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/figure>\n<p id=\"5050\" class=\"hz ia cn ar ic b id ie if ig ih ii ij ik il im hf\" data-selectable-paragraph=\"\">port scan didn\u2019t yield much\u2026 There was an SSH service and a Squid proxy running and that was all.\u00a0 The following screenshot shows the used options.<\/p>\n<\/div>\n<\/div>\n<div class=\"iy\">\n<div class=\"n p\">\n<div class=\"jv jw jx jy jz ka ag kb ah kc aj ak\">\n<figure class=\"it iu iv iw ix iy ke kf paragraph-image\">\n<div class=\"iz ja bl jb ak\">\n<div class=\"em en uu\">\n<div class=\"jg r bl jh\">\n<div class=\"uv r\">\n<div class=\"bk jc eq t u jd ak bd je jf\"><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"oo qj eq t u jd ak jm alignnone\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/max\/1754\/0*-vDZyqZvwwVyMbjb\" alt=\"walkthrough\" width=\"1754\" height=\"485\" \/><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/figure>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"n p\">\n<div class=\"ac ae af ag ah fa aj ak\">\n<p id=\"3d44\" class=\"hz ia cn ar ic b id ie if ig ih ii ij ik il im hf\" data-selectable-paragraph=\"\">After running the module, I got the following result back.<\/p>\n<figure class=\"it iu iv iw ix iy em en paragraph-image\">\n<div class=\"iz ja bl jb ak\">\n<div class=\"em en uw\">\n<div class=\"jg r bl jh\">\n<div class=\"ux r\">\n<div class=\"bk jc eq t u jd ak bd je jf\"><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"oo qj eq t u jd ak jm alignnone\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/max\/708\/0*M5XAFenueya9NIjh\" alt=\"walkthrough\" width=\"708\" height=\"410\" \/><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/figure>\n<p id=\"bfb4\" class=\"hz ia cn ar ic b id ie if ig ih ii ij ik il im hf\" data-selectable-paragraph=\"\">Port 80 seemed to be open, so it was time to scan the site. Nikto has the ability to scan the target behind a proxy. I used it to discover the\u00a0<code class=\"jh jn jo jp jq b\">\/cgi-bin\/status<\/code>\u00a0script that is vulnerable to shellshock.<\/p>\n<\/div>\n<\/div>\n<div class=\"iy\">\n<div class=\"n p\">\n<div class=\"jv jw jx jy jz ka ag kb ah kc aj ak\">\n<figure class=\"it iu iv iw ix iy ke kf paragraph-image\">\n<div class=\"iz ja bl jb ak\">\n<div class=\"em en uy\">\n<div class=\"jg r bl jh\">\n<div class=\"uz r\">\n<div class=\"bk jc eq t u jd ak bd je jf\"><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"oo qj eq t u jd ak jm alignnone\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/max\/1701\/0*LetFd6x3u3-1F0ZB\" alt=\"walkthrough\" width=\"1701\" height=\"860\" \/><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/figure>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"n p\">\n<div class=\"ac ae af ag ah fa aj ak\">\n<p id=\"8c3e\" class=\"hz ia cn ar ic b id ie if ig ih ii ij ik il im hf\" data-selectable-paragraph=\"\">I got excited and quickly wrote a\u00a0<code class=\"jh jn jo jp jq b\">curl<\/code> command. It included a User-Agent header with the shellshock payload + Bash reverse shell, the proxy and of course the target URL. walkthrough<\/p>\n<figure class=\"it iu iv iw ix iy em en paragraph-image\">\n<div class=\"iz ja bl jb ak\">\n<div class=\"em en va\">\n<div class=\"jg r bl jh\">\n<div class=\"vb r\">\n<div class=\"bk jc eq t u jd ak bd je jf\"><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"oo qj eq t u jd ak jm alignnone\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/max\/933\/0*irHthepYG_Sds6Qt\" alt=\"walkthrough\" width=\"933\" height=\"145\" \/><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/figure>\n<p id=\"54cc\" class=\"hz ia cn ar ic b id ie if ig ih ii ij ik il im hf\" data-selectable-paragraph=\"\">After running the command, I immediately got a reverse shell connection back as\u00a0<code class=\"jh jn jo jp jq b\">www-data<\/code>\u00a0.<\/p>\n<figure class=\"it iu iv iw ix iy em en paragraph-image\">\n<div class=\"em en vc\">\n<div class=\"jg r bl jh\">\n<div class=\"vd r\">\n<div class=\"bk jc eq t u jd ak bd je jf\"><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"oo qj eq t u jd ak jm alignnone\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/max\/611\/0*4EpWVCwZHgB-bGRR\" alt=\"walkthrough\" width=\"611\" height=\"342\" \/><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/figure>\n<p id=\"1198\" class=\"hz ia cn ar ic b id ie if ig ih ii ij ik il im hf\" data-selectable-paragraph=\"\">Here comes the enumeration part again. I ran the famous\u00a0<em class=\"ib\">LinEnum<\/em>\u00a0script and looked for credentials, but nothing unusual turned up. I noticed a Python script in the\u00a0<code class=\"jh jn jo jp jq b\">\/var\/www<\/code>\u00a0directory which was really suspicious to me.<\/p>\n<p class=\"hz ia cn ar ic b id ie if ig ih ii ij ik il im hf\" data-selectable-paragraph=\"\">now i had a strong feeling that this file gets executed, so I used <code class=\"jh jn jo jp jq b\">pspy<\/code>\u00a0to monitor the running processes. It&#8217;s an excellent tool, you should check it out:\u00a0<a class=\"bo dd um un uo up\" href=\"https:\/\/github.com\/DominicBreuker\/pspy\" target=\"_blank\" rel=\"noopener nofollow noreferrer\">https:\/\/github.com\/DominicBreuker\/pspy<\/a>\u200b<\/p>\n<\/div>\n<\/div>\n<div class=\"iy\">\n<div class=\"n p\">\n<div class=\"jv jw jx jy jz ka ag kb ah kc aj ak\">\n<figure class=\"it iu iv iw ix iy ke kf paragraph-image\">\n<div class=\"iz ja bl jb ak\">\n<div class=\"em en ai\">\n<div class=\"jg r bl jh\">\n<div class=\"vf r\">\n<div class=\"bk jc eq t u jd ak bd je jf\"><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"oo qj eq t u jd ak jm alignnone\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/max\/1063\/0*aJcDtvDfB4H6mcZo\" alt=\"walkthrough\" width=\"1063\" height=\"520\" \/><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/figure>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"n p\">\n<div class=\"ac ae af ag ah fa aj ak\">\n<p id=\"c7e2\" class=\"hz ia cn ar ic b id ie if ig ih ii ij ik il im hf\" data-selectable-paragraph=\"\">The <code class=\"jh jn jo jp jq b\">connect.py<\/code> script runs periodically under the root user and the best part is that we can edit this file. I took a simple Python reverse shell and replaced the contents of the file with it. walkthrough<\/p>\n<figure class=\"it iu iv iw ix iy em en paragraph-image\">\n<div class=\"em en vg\">\n<div class=\"jg r bl jh\">\n<div class=\"vh r\">\n<div class=\"bk jc eq t u jd ak bd je jf\"><img loading=\"lazy\" decoding=\"async\" class=\"oo qj eq t u jd ak jm alignnone\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/max\/604\/0*vUpHT2EFye8ozzfx\" alt=\"walkthrough\" width=\"604\" height=\"342\" \/><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/figure>\n<p id=\"36db\" class=\"hz ia cn ar ic b id ie if ig ih ii ij ik il im hf\" data-selectable-paragraph=\"\">I didn\u2019t have to wait long to get a connection back. This time the only difference is that I got root privileges.<\/p>\n<figure class=\"it iu iv iw ix iy em en paragraph-image\">\n<div class=\"em en vi\">\n<div class=\"jg r bl jh\">\n<div class=\"vj r\">\n<div class=\"bk jc eq t u jd ak bd je jf\"><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"oo qj eq t u jd ak jm alignnone\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/max\/605\/0*2_TlkIhFiPCCE9S9\" alt=\"walkthrough\" width=\"605\" height=\"571\" \/><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/figure>\n<\/div>\n<\/div>\n<\/section>\n<h4 class=\"entry-title\"><a href=\"http:\/\/zerothcode.com\/blog\/play-store-coronavirus-outbreak\/\">Watch Out: Android Apps in Google Play Store Capitalizing on Coronavirus Outbreak<\/a><\/h4>\n","protected":false},"excerpt":{"rendered":"<p>walkthrough Description from Vulnhub This (walkthrough) CTF gives a clear analogy how hacking strategies can be performed on a network<\/p>\n","protected":false},"author":1,"featured_media":706,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[487],"tags":[],"yst_prominent_words":[120,703,711,707,559,706,700,695,704,698,701,694,699,697,696,702,710,709,708,932],"class_list":["post-705","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ctf"],"_links":{"self":[{"href":"https:\/\/zerothcode.com\/blog\/wp-json\/wp\/v2\/posts\/705","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zerothcode.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zerothcode.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zerothcode.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zerothcode.com\/blog\/wp-json\/wp\/v2\/comments?post=705"}],"version-history":[{"count":0,"href":"https:\/\/zerothcode.com\/blog\/wp-json\/wp\/v2\/posts\/705\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/zerothcode.com\/blog\/wp-json\/wp\/v2\/media\/706"}],"wp:attachment":[{"href":"https:\/\/zerothcode.com\/blog\/wp-json\/wp\/v2\/media?parent=705"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zerothcode.com\/blog\/wp-json\/wp\/v2\/categories?post=705"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zerothcode.com\/blog\/wp-json\/wp\/v2\/tags?post=705"},{"taxonomy":"yst_prominent_words","embeddable":true,"href":"https:\/\/zerothcode.com\/blog\/wp-json\/wp\/v2\/yst_prominent_words?post=705"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}