{"id":83,"date":"2017-10-20T02:00:34","date_gmt":"2017-10-20T02:00:34","guid":{"rendered":"http:\/\/hackerintent.co.nf\/?p=83"},"modified":"2017-10-20T02:00:34","modified_gmt":"2017-10-20T02:00:34","slug":"vulnix-ctf","status":"publish","type":"post","link":"https:\/\/takeondevops.com\/?p=83","title":{"rendered":"Vulnix CTF"},"content":{"rendered":"<p>Firstly, we must download and extract the given Box named \u2018Vulnix\u2019 and set up the network configurations, so as to make sure that the Vulnix Box and our Kali box are on the same network. Once that is done, we must start both VMs.<\/p>\n<h3>Identifying the victim machines IP<\/h3>\n<p>In order to identify which IP, we need to be penetrating, we can issue the command, netdiscover -r<br \/>\nin our case it is :<code>netdiscover -r 192.168.1.0\/24<\/code><br \/>\n<img decoding=\"async\" src=\"https:\/\/i0.wp.com\/farm5.staticflickr.com\/4494\/37538694310_4cdf3f5224_b.jpg?w=756&#038;ssl=1\" data-recalc-dims=\"1\" \/><br \/>\nNow, by the MAC Address of the machine, we can tell that our Victim\u2019s IP is 192.168.1.5 (MAC address of devices could be found using Virtual Box).<\/p>\n<h3>Next we need to do a port scanning to identify the open ports that we can use<\/h3>\n<p>nmap -p -Ss- -A<br \/>\nIn our case it is :<code>nmap -p -Ss- -A 192.168.1.5<\/code><br \/>\n<img decoding=\"async\" src=\"https:\/\/i2.wp.com\/farm5.staticflickr.com\/4487\/37544805870_1b1fb18863_z.jpg?w=756&#038;ssl=1\" data-recalc-dims=\"1\" \/><br \/>\n<img decoding=\"async\" src=\"https:\/\/i0.wp.com\/farm5.staticflickr.com\/4501\/37544818970_e2dd8a5892_z.jpg?w=756&#038;ssl=1\" data-recalc-dims=\"1\" \/><br \/>\nNotable ports found : SSH, SMTP, Finger, RSH<\/p>\n<h3>Our next task is to find the users of the Vulnix box<\/h3>\n<p>In order to do this, we issue the command,<br \/>\n<code>smtp-user-enum -M VRFY -U \/usr\/share\/metasploit-framework\/data\/wordlists\/unix_users.txt -t 192.168.1.5<\/code><br \/>\n<img decoding=\"async\" src=\"https:\/\/i0.wp.com\/farm5.staticflickr.com\/4495\/37771113702_55fcafbd7c_z.jpg?w=756&#038;ssl=1\" data-recalc-dims=\"1\" \/><\/p>\n<h3>We can now use the finger command to reveal more user details<\/h3>\n<p>Command is : finger @<br \/>\nIn our case, we just need to verify whether 2 of the above users are valid. users: user and vulnix<br \/>\nSo our commands would be,<br \/>\nfinger user@192.168.1.5 finger vulnix@192.168.1.5<br \/>\n<img decoding=\"async\" src=\"https:\/\/i1.wp.com\/farm5.staticflickr.com\/4506\/37797051841_6a414a99db_b.jpg?w=756&#038;ssl=1\" data-recalc-dims=\"1\" \/><\/p>\n<h3>NFS enumeration<\/h3>\n<p>We can try to mount a NFS directory to find some useful information. The following commands were run to mount such directory.<br \/>\n<img decoding=\"async\" src=\"https:\/\/i0.wp.com\/farm5.staticflickr.com\/4471\/37765110132_2f7c1cb0bc_b.jpg?w=756&#038;ssl=1\" data-recalc-dims=\"1\" \/><\/p>\n<h3>We can run a brute force against the user:\u2019user\u2019 to try to get the password.<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/i0.wp.com\/farm5.staticflickr.com\/4469\/37538768960_f3c5cfca94_z.jpg?w=756&#038;ssl=1\" data-recalc-dims=\"1\" \/><\/p>\n<h3>Now we can SSH into the Vulnix VM as user and gather information about the user, \u2018vulnix\u2019<\/h3>\n<p>Afterwards we create a user in our system by the name \u2018vulnix\u2019 to access the mounted directory.<br \/>\n<img decoding=\"async\" src=\"https:\/\/i0.wp.com\/farm5.staticflickr.com\/4458\/37748453886_272ef24298_b.jpg?w=756&#038;ssl=1\" data-recalc-dims=\"1\" \/><\/p>\n<h3>Generating SSH key pairs &amp; copying the public key of our VM into the authorized keys of vulnix.<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/i1.wp.com\/farm5.staticflickr.com\/4464\/37797088691_2d87cb76f2_b.jpg?w=756&#038;ssl=1\" data-recalc-dims=\"1\" \/><br \/>\nNow we can ssh to the vulnix machine as follows<br \/>\n<img decoding=\"async\" src=\"https:\/\/i2.wp.com\/farm5.staticflickr.com\/4484\/37765145812_f6a64bce23_b.jpg?w=756&#038;ssl=1\" data-recalc-dims=\"1\" \/><\/p>\n<h3>Our next objective is privilege escalation<\/h3>\n<p>This can be done by editing the \/etc\/export<br \/>\n<img decoding=\"async\" src=\"https:\/\/i0.wp.com\/farm5.staticflickr.com\/4511\/37765151432_73c67448b1_b.jpg?w=756&#038;ssl=1\" data-recalc-dims=\"1\" \/><br \/>\nNow we must reboot the Vulnix Box so that the changes can take effect.Then we will need to mount the NFS directory as earlier<\/p>\n<h3>Next we will be copying \/bin\/bash to Vulnix in order to gain access.<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/i1.wp.com\/farm5.staticflickr.com\/4473\/37765154932_3b8bfa1ca1_b.jpg?w=756&#038;ssl=1\" data-recalc-dims=\"1\" \/><\/p>\n<h3>Finally we can login as vulnix and run the copied file to gain root access of Vulnix and capture the flag.<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/i1.wp.com\/farm5.staticflickr.com\/4497\/37087531754_89f1cd2435_z.jpg?w=756&#038;ssl=1\" data-recalc-dims=\"1\" \/><br \/>\nThere seemed to be a problem when executing the bash file. When I looked it up on the internet, I figured out that this was due to my VM being in the Kali VM was a 64bit and the target VM was on 32 bit. Hence, I installed Kali32bit and started all over. (Note the IP address change is due to this change of VMs). Finally by copying the bash file and executing it as vulnix user, I was able to gain root access and capture the flag.<br \/>\n<img decoding=\"async\" src=\"https:\/\/i2.wp.com\/farm5.staticflickr.com\/4459\/37748488946_46f33651db_z.jpg?w=756&#038;ssl=1\" data-recalc-dims=\"1\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Firstly, we must download and extract the given Box named \u2018Vulnix\u2019 and set up the network configurations, so as to make sure that the Vulnix Box and our Kali box are on the same network. Once that is done, we must start both VMs. Identifying the victim machines IP In order to identify which IP, [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","footnotes":""},"categories":[2,5],"tags":[],"class_list":["post-83","post","type-post","status-publish","format-standard","hentry","category-ctf","category-infosec"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Vulnix CTF - Take On Devops<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/takeondevops.com\/?p=83\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Vulnix CTF - Take On Devops\" \/>\n<meta property=\"og:description\" content=\"Firstly, we must download and extract the given Box named \u2018Vulnix\u2019 and set up the network configurations, so as to make sure that the Vulnix Box and our Kali box are on the same network. Once that is done, we must start both VMs. Identifying the victim machines IP In order to identify which IP, [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/takeondevops.com\/?p=83\" \/>\n<meta property=\"og:site_name\" content=\"Take On Devops\" \/>\n<meta property=\"article:published_time\" content=\"2017-10-20T02:00:34+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/farm5.staticflickr.com\/4494\/37538694310_4cdf3f5224_b.jpg\" \/>\n<meta name=\"author\" content=\"ihsan izwer\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"ihsan izwer\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/takeondevops.com\\\/?p=83#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/takeondevops.com\\\/?p=83\"},\"author\":{\"name\":\"ihsan izwer\",\"@id\":\"https:\\\/\\\/takeondevops.com\\\/#\\\/schema\\\/person\\\/465f2fb632235eb4079002754cd66aeb\"},\"headline\":\"Vulnix CTF\",\"datePublished\":\"2017-10-20T02:00:34+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/takeondevops.com\\\/?p=83\"},\"wordCount\":463,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/takeondevops.com\\\/?p=83#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/farm5.staticflickr.com\\\/4494\\\/37538694310_4cdf3f5224_b.jpg\",\"articleSection\":[\"CTF\",\"InfoSec\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/takeondevops.com\\\/?p=83#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/takeondevops.com\\\/?p=83\",\"url\":\"https:\\\/\\\/takeondevops.com\\\/?p=83\",\"name\":\"Vulnix CTF - Take On Devops\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/takeondevops.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/takeondevops.com\\\/?p=83#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/takeondevops.com\\\/?p=83#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/farm5.staticflickr.com\\\/4494\\\/37538694310_4cdf3f5224_b.jpg\",\"datePublished\":\"2017-10-20T02:00:34+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/takeondevops.com\\\/#\\\/schema\\\/person\\\/465f2fb632235eb4079002754cd66aeb\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/takeondevops.com\\\/?p=83#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/takeondevops.com\\\/?p=83\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/takeondevops.com\\\/?p=83#primaryimage\",\"url\":\"https:\\\/\\\/farm5.staticflickr.com\\\/4494\\\/37538694310_4cdf3f5224_b.jpg\",\"contentUrl\":\"https:\\\/\\\/farm5.staticflickr.com\\\/4494\\\/37538694310_4cdf3f5224_b.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/takeondevops.com\\\/?p=83#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/takeondevops.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Vulnix CTF\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/takeondevops.com\\\/#website\",\"url\":\"https:\\\/\\\/takeondevops.com\\\/\",\"name\":\"Take On Devops\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/takeondevops.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/takeondevops.com\\\/#\\\/schema\\\/person\\\/465f2fb632235eb4079002754cd66aeb\",\"name\":\"ihsan izwer\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c82c3d13c92d77259746074978cb7d498778b44914dea60ad0367dec237c349f?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c82c3d13c92d77259746074978cb7d498778b44914dea60ad0367dec237c349f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c82c3d13c92d77259746074978cb7d498778b44914dea60ad0367dec237c349f?s=96&d=mm&r=g\",\"caption\":\"ihsan izwer\"},\"url\":\"https:\\\/\\\/takeondevops.com\\\/?author=3\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Vulnix CTF - Take On Devops","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/takeondevops.com\/?p=83","og_locale":"en_US","og_type":"article","og_title":"Vulnix CTF - Take On Devops","og_description":"Firstly, we must download and extract the given Box named \u2018Vulnix\u2019 and set up the network configurations, so as to make sure that the Vulnix Box and our Kali box are on the same network. Once that is done, we must start both VMs. Identifying the victim machines IP In order to identify which IP, [&hellip;]","og_url":"https:\/\/takeondevops.com\/?p=83","og_site_name":"Take On Devops","article_published_time":"2017-10-20T02:00:34+00:00","og_image":[{"url":"https:\/\/farm5.staticflickr.com\/4494\/37538694310_4cdf3f5224_b.jpg","type":"","width":"","height":""}],"author":"ihsan izwer","twitter_card":"summary_large_image","twitter_misc":{"Written by":"ihsan izwer","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/takeondevops.com\/?p=83#article","isPartOf":{"@id":"https:\/\/takeondevops.com\/?p=83"},"author":{"name":"ihsan izwer","@id":"https:\/\/takeondevops.com\/#\/schema\/person\/465f2fb632235eb4079002754cd66aeb"},"headline":"Vulnix CTF","datePublished":"2017-10-20T02:00:34+00:00","mainEntityOfPage":{"@id":"https:\/\/takeondevops.com\/?p=83"},"wordCount":463,"commentCount":0,"image":{"@id":"https:\/\/takeondevops.com\/?p=83#primaryimage"},"thumbnailUrl":"https:\/\/farm5.staticflickr.com\/4494\/37538694310_4cdf3f5224_b.jpg","articleSection":["CTF","InfoSec"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/takeondevops.com\/?p=83#respond"]}]},{"@type":"WebPage","@id":"https:\/\/takeondevops.com\/?p=83","url":"https:\/\/takeondevops.com\/?p=83","name":"Vulnix CTF - Take On Devops","isPartOf":{"@id":"https:\/\/takeondevops.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/takeondevops.com\/?p=83#primaryimage"},"image":{"@id":"https:\/\/takeondevops.com\/?p=83#primaryimage"},"thumbnailUrl":"https:\/\/farm5.staticflickr.com\/4494\/37538694310_4cdf3f5224_b.jpg","datePublished":"2017-10-20T02:00:34+00:00","author":{"@id":"https:\/\/takeondevops.com\/#\/schema\/person\/465f2fb632235eb4079002754cd66aeb"},"breadcrumb":{"@id":"https:\/\/takeondevops.com\/?p=83#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/takeondevops.com\/?p=83"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/takeondevops.com\/?p=83#primaryimage","url":"https:\/\/farm5.staticflickr.com\/4494\/37538694310_4cdf3f5224_b.jpg","contentUrl":"https:\/\/farm5.staticflickr.com\/4494\/37538694310_4cdf3f5224_b.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/takeondevops.com\/?p=83#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/takeondevops.com\/"},{"@type":"ListItem","position":2,"name":"Vulnix CTF"}]},{"@type":"WebSite","@id":"https:\/\/takeondevops.com\/#website","url":"https:\/\/takeondevops.com\/","name":"Take On Devops","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/takeondevops.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/takeondevops.com\/#\/schema\/person\/465f2fb632235eb4079002754cd66aeb","name":"ihsan izwer","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/c82c3d13c92d77259746074978cb7d498778b44914dea60ad0367dec237c349f?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/c82c3d13c92d77259746074978cb7d498778b44914dea60ad0367dec237c349f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c82c3d13c92d77259746074978cb7d498778b44914dea60ad0367dec237c349f?s=96&d=mm&r=g","caption":"ihsan izwer"},"url":"https:\/\/takeondevops.com\/?author=3"}]}},"jetpack_featured_media_url":"","amp_enabled":true,"_links":{"self":[{"href":"https:\/\/takeondevops.com\/index.php?rest_route=\/wp\/v2\/posts\/83","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/takeondevops.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/takeondevops.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/takeondevops.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/takeondevops.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=83"}],"version-history":[{"count":0,"href":"https:\/\/takeondevops.com\/index.php?rest_route=\/wp\/v2\/posts\/83\/revisions"}],"wp:attachment":[{"href":"https:\/\/takeondevops.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=83"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/takeondevops.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=83"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/takeondevops.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=83"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}