{"id":423,"date":"2020-02-03T22:03:14","date_gmt":"2020-02-03T22:03:14","guid":{"rendered":"https:\/\/zineausa.com\/blog\/?p=423"},"modified":"2020-02-05T18:08:55","modified_gmt":"2020-02-05T18:08:55","slug":"metasploit-ctf-2020-writeup","status":"publish","type":"post","link":"https:\/\/zineausa.com\/blog\/2020\/02\/metasploit-ctf-2020-writeup\/","title":{"rendered":"Metasploit Community CTF 2020 Writeup"},"content":{"rendered":"\n<p>This <a href=\"https:\/\/metasploitctf.com\/\">competition <\/a>started at noon on 1\/30\/20 and ran for 4 days until 2\/3\/2020. There were a total of 18 flags and a grand prize of $500 with a 1 year pro <a href=\"https:\/\/www.hackthebox.eu\/\">HTB <\/a>subscription. My team of 4, which I pulled from a local meetup (Nova Hackers) and random people from the Metasploit CTF chat (credit to team member ethicaljeans for helping out and his Metasploit CTF 2020 Writeup <a href=\"https:\/\/www.linkedin.com\/pulse\/my-first-cybersecurity-ctf-metasploit-team-christopher-jackson\/\">here<\/a>), were only able to get one flag, however, we got it fast enough to be ranked 89 out of 1000 teams :P.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-33.png\" alt=\"\" class=\"wp-image-511\" width=\"223\" height=\"428\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-33.png 370w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-33-156x300.png 156w\" sizes=\"auto, (max-width: 223px) 100vw, 223px\" \/><\/figure><\/div>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"464\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-1-1024x464.png\" alt=\"\" class=\"wp-image-424\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-1-1024x464.png 1024w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-1-600x272.png 600w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-1-300x136.png 300w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-1-768x348.png 768w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-1.png 1251w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Kind of sad, but definitely a lot of lessons learned. This blog post will be focused on some of the things that I wish I did differently or looked at more in detail, mostly so that we do better in future CTFs. I&#8217;ll be doing some more digging after the competition ends with the help of friendly folks in the slack to add content to this post.<\/p>\n\n\n\n<p>First thing we did was install openvpn on the jumpbox. This was in response to one of us attempting a brute force from the jumpbox and almost crashing it (it was me heh). Took about five minutes to install openvpn and distribute the .ovpn file, by following<a href=\"https:\/\/www.cyberciti.biz\/faq\/ubuntu-18-04-lts-set-up-openvpn-server-in-5-minutes\/\"> this guide<\/a>. This solution wasn\u2019t perfect though, as I didn\u2019t take the time to forward some ports back to the clients for reverse shells and such, so it was mostly for enumeration and we did reverse shells from the jumpbox directly.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i.pcmag.com\/imagery\/reviews\/00JXUu9pun1kRsTQWb6Pvh8-7.fit_lpad.size_624x364.jpg\" alt=\"Image result for openvpn logo&quot;\" width=\"340\" height=\"198\"\/><\/figure><\/div>\n\n\n\n<p>Metasploit CTF 2020 Writeup Cards index (for faster navigation):<br><a href=\"https:\/\/zineausa.com\/blog\/2020\/02\/metasploit-ctf-2020-writeup\/#4ofclubs\">4 of Clubs<\/a> (With solution)<br><a href=\"https:\/\/zineausa.com\/blog\/2020\/02\/metasploit-ctf-2020-writeup\/#7ofclubs\">7 of Clubs<\/a> (Partial solution)  <br><a href=\"https:\/\/zineausa.com\/blog\/2020\/02\/metasploit-ctf-2020-writeup\/#2ofdiamonds\">2 of Diamonds<\/a>  (With solution)<br><a href=\"https:\/\/zineausa.com\/blog\/2020\/02\/metasploit-ctf-2020-writeup\/#3ofspades\">7 of Diamonds<\/a> (With external solution)   <br><a href=\"https:\/\/zineausa.com\/blog\/2020\/02\/metasploit-ctf-2020-writeup\/#queenofdiamonds\">Queen of Diamonds<\/a> (With external solution) <br><a href=\"https:\/\/zineausa.com\/blog\/2020\/02\/metasploit-ctf-2020-writeup\/#aceofdiamonds\">Ace of Diamonds<\/a> (With external solution)   <br><a href=\"https:\/\/zineausa.com\/blog\/2020\/02\/metasploit-ctf-2020-writeup\/#7ofclubs\">7 of Hearts<\/a>(Partial solution)   <br><a href=\"https:\/\/zineausa.com\/blog\/2020\/02\/metasploit-ctf-2020-writeup\/#10ofhearts\">10 of Hearts<\/a>  (With solution) <br><a href=\"https:\/\/zineausa.com\/blog\/2020\/02\/metasploit-ctf-2020-writeup\/#queenofhearts\">Queen of Hearts<\/a> (With solution)  <br><a href=\"https:\/\/zineausa.com\/blog\/2020\/02\/metasploit-ctf-2020-writeup\/#3ofspades\">3 of Spades<\/a> (With solution) <br><a href=\"https:\/\/zineausa.com\/blog\/2020\/02\/metasploit-ctf-2020-writeup\/#3ofspades\">Ace of Spades<\/a> (With external solution)   <br><\/p>\n\n\n\n<p><strong>As for the flags and the main part of the write-up, this post will be organized by port #s: <\/strong><br><a name=\"4ofclubs\"><\/a><\/p>\n\n\n\n<a name=\"4ofclubs\"><p class=\"has-text-color has-medium-font-size has-vivid-cyan-blue-color\"><strong>ICMP Jumpbox (4 of clubs):<\/strong><\/p><\/a>\n\n\n\n<p>Apparently if you ran a wireshark or some sort of tcpdump on the jumpbox, you would have caught an icmp transmission between the target box and the jumpbox with the card encoded with base-64. (Credit to cloud755 for this solution).<\/p>\n\n\n\n<p class=\"code\">sudo tcpdump -i eth0 icmp -w flags.pcap<\/p>\n\n\n\n<p>We get a bunch of ICMP packets like this..<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"356\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-4-1024x356.png\" alt=\"\" class=\"wp-image-432\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-4-1024x356.png 1024w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-4-600x208.png 600w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-4-300x104.png 300w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-4-768x267.png 768w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-4.png 1448w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Pasting this into cyberchef gets:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"649\" height=\"1024\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-6-649x1024.png\" alt=\"\" class=\"wp-image-434\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-6-649x1024.png 649w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-6-600x947.png 600w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-6-190x300.png 190w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-6.png 703w\" sizes=\"auto, (max-width: 649px) 100vw, 649px\" \/><\/figure>\n\n\n\n<p>Seems like we&#8217;ll just need to base64 decode into a png file and we get the flag.<\/p>\n\n\n\n<p class=\"code\">cat try1 | base64 &#8211;decode &gt; try1.png<\/p>\n\n\n\n<p>Now we check the header to make sure it&#8217;s good.<\/p>\n\n\n\n<p class=\"code\">cat try1.png | xxd | head<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"546\" height=\"174\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-23.png\" alt=\"\" class=\"wp-image-476\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-23.png 546w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-23-300x96.png 300w\" sizes=\"auto, (max-width: 546px) 100vw, 546px\" \/><\/figure>\n\n\n\n<p>This results in a partial flag here:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-24.png\" alt=\"\" class=\"wp-image-477\" width=\"242\" height=\"301\"\/><\/figure><\/div>\n\n\n\n<p>You just have to run the pcap for long enough to get the whole file and combine the data.. don&#8217;t have enough time right now to do it but that&#8217;s the gist of it.<\/p>\n\n\n\n<p>I supposed the lessons learned here is to always do a tcpdump of your client box.. in case someone is broadcasting something lol.<\/p><a name=\"3ofspades\"><\/a>\n\n\n\n<p class=\"has-text-color has-medium-font-size has-vivid-cyan-blue-color\"><strong>Port 22 (3 of spades, 7 of diamonds, ace of spades):<\/strong><\/p>\n\n\n\n<p>If you successfully SSH\u2019d into this port based on credentials for port 25 and 79, you would have access to three flags.. what?!<\/p>\n\n\n\n<p>For the 7 of diamonds and ace of spades, Thomas Vandoren, who came in ninth as part of the CTF_Circle team, has a blog post about that <a href=\"https:\/\/thomasvandoren.com\/metasploit-2020-writeup.html\">here<\/a>.<\/p>\n\n\n\n<p>For the 3 of spades, you would have been able to look in ken\u2019s home directory and retrieved a flag which you would need to xor in cyberchef (credit to Relwarc17 for this solution below).<\/p>\n\n\n\n<p>We made a password and username file from the hashes we got off port 79\/25.. Then used this hydra command to bruteforce:<\/p>\n\n\n\n<p>hydra -L usrs -P passwds 172.16.29.133 -t 4 ssh<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"146\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-26-1024x146.png\" alt=\"\" class=\"wp-image-482\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-26-1024x146.png 1024w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-26-600x86.png 600w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-26-300x43.png 300w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-26-768x110.png 768w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-26.png 1029w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Got the login: mckusick\/foobar, we ssh in and it&#8217;s an openbsd system.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"390\" height=\"43\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-27.png\" alt=\"\" class=\"wp-image-483\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-27.png 390w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-27-300x33.png 300w\" sizes=\"auto, (max-width: 390px) 100vw, 390px\" \/><\/figure>\n\n\n\n<p>That&#8217;s unfortunate.. there is no user as ken in our cracked passwords list and the hint is:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"381\" height=\"39\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-28.png\" alt=\"\" class=\"wp-image-484\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-28.png 381w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-28-300x31.png 300w\" sizes=\"auto, (max-width: 381px) 100vw, 381px\" \/><\/figure>\n\n\n\n<p>However, with some enumeration you&#8217;ll find that this instance of OpenBSD 6.x is vulnerable to this <a href=\"https:\/\/www.exploit-db.com\/exploits\/47780\">exploit<\/a> (thanks Shifty Sheep for this link and the explanation below)!<\/p>\n\n\n\n<p>Executing this POC manually, you are able to privesc and then use UUencode to copy the binary to your jumpbox and use uudeview to put it back together.<\/p>\n\n\n\n<p>However, you&#8217;ll see that the png file is missing the right headers and needs to be decrypted:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"610\" height=\"140\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-37.png\" alt=\"\" class=\"wp-image-559\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-37.png 610w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-37-600x138.png 600w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-37-300x69.png 300w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/figure>\n\n\n\n<p>Running it through Cyberchef to check for XOR using png as a known plaintext string reveals a key of &#8220;4d5a&#8221;. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"759\" height=\"123\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-38.png\" alt=\"\" class=\"wp-image-560\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-38.png 759w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-38-600x97.png 600w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-38-300x49.png 300w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-38-750x123.png 750w\" sizes=\"auto, (max-width: 759px) 100vw, 759px\" \/><\/figure>\n\n\n\n<p>Using that in Cyberchef to convert the file reveals the flag (Thanks again Shifty Sheep)!<br><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"452\" height=\"196\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-39.png\" alt=\"\" class=\"wp-image-561\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-39.png 452w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-39-300x130.png 300w\" sizes=\"auto, (max-width: 452px) 100vw, 452px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"546\" height=\"149\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-40.png\" alt=\"\" class=\"wp-image-562\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-40.png 546w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-40-300x82.png 300w\" sizes=\"auto, (max-width: 546px) 100vw, 546px\" \/><\/figure>\n\n\n\n<p class=\"has-text-color has-medium-font-size has-vivid-cyan-blue-color\"><strong>Port 23:<\/strong><\/p>\n\n\n\n<p>This was a fun one, alluding to the movie Kindergarten Cop (joke about steroids below from my teammate lol). <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"745\" height=\"152\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/1.png\" alt=\"\" class=\"wp-image-436\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/1.png 745w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/1-600x122.png 600w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/1-300x61.png 300w\" sizes=\"auto, (max-width: 745px) 100vw, 745px\" \/><\/figure>\n\n\n\n<p>However, if you answered \u201chack\u201d quickly for the second prompt, you would get a binary spit out.<\/p>\n\n\n\n<p>We accomplished this by using nc and feeding it a file with hack typed out on two lines (credits to my team member ethicaljeans for this idea)<\/p>\n\n\n\n<p class=\"code\"> nc 172.16.53.5 23 &lt; hack.txt &gt; kimble.bin <\/p>\n\n\n\n<p>Using binwalk we were able to find where the file started.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"212\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-2-1-1024x212.png\" alt=\"\" class=\"wp-image-438\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-2-1-1024x212.png 1024w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-2-1-600x124.png 600w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-2-1-300x62.png 300w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-2-1-768x159.png 768w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-2-1.png 1243w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>We then used dd to separate the file (we ended up merging parts 1 through 6 since it was one big elf file).<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"631\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-3-1-1024x631.png\" alt=\"\" class=\"wp-image-439\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-3-1-1024x631.png 1024w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-3-1-600x370.png 600w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-3-1-300x185.png 300w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-3-1-768x473.png 768w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-3-1.png 1116w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>It seemed to be an elf file so we installed pax-utils and analyzed the file.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"853\" height=\"717\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-4-1.png\" alt=\"\" class=\"wp-image-440\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-4-1.png 853w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-4-1-600x504.png 600w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-4-1-300x252.png 300w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-4-1-768x646.png 768w\" sizes=\"auto, (max-width: 853px) 100vw, 853px\" \/><\/figure>\n\n\n\n<p>Apparently it is an executable dump which we tried to reverse engineer using Radare2 based on <a href=\"https:\/\/medium.com\/@jacob16682\/reverse-engineering-using-radare2-588775ea38d5\">this guide<\/a>. Out comes a gdb like hex editor and I literally stopped there lol<a name=\"2ofdiamonds\">.<\/a><\/p>\n\n\n\n<p class=\"has-medium-font-size has-text-color has-vivid-cyan-blue-color\"><strong>Port 25 (2 of diamonds):<\/strong><\/p>\n\n\n\n<p>This was the challenge from 2018, read all about it in <a href=\"https:\/\/ethicalhackers.club\/metasploit-community-ctf-2018-2-of-diamonds-write-up\/\">detail here<\/a>, or from my teammate&#8217;s perspective <a href=\"https:\/\/www.linkedin.com\/pulse\/my-first-cybersecurity-ctf-metasploit-team-christopher-jackson\/\">here<\/a>.<\/p>\n\n\n\n<p>But to sum it up.. connecting manually to SMTP manually results in \u201c2-of-diamonds Sendmail 5.51\/5.17 ready\u201d<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"500\" height=\"204\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image.png\" alt=\"\" class=\"wp-image-427\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image.png 500w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-300x122.png 300w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/figure>\n\n\n\n<p>Googling for 2 of diamonds metasploit ctf 2019 at this point resulted in <a href=\"https:\/\/ethicalhackers.club\/metasploit-community-ctf-2018-2-of-diamonds-write-up\/\">this writeup<\/a> which leads you to the rest of the clues.<\/p>\n\n\n\n<p>There was an old smtp exploit which was kind of buggy, but gets you a shell temporarily. Utilizing finger (port 79) to get a shell was much more stable.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"897\" height=\"103\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-22.png\" alt=\"\" class=\"wp-image-473\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-22.png 897w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-22-600x69.png 600w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-22-300x34.png 300w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-22-768x88.png 768w\" sizes=\"auto, (max-width: 897px) 100vw, 897px\" \/><\/figure>\n\n\n\n<p>Getting on the machine there is a binary once you change user to hunter:msfhack that has a sticky bit and you can use it to copy the adventures game into a tmp directory. You play it to get the password to use crypt to decrypt the flag located in the library of the games directory.<\/p>\n\n\n\n<p>Use download from the meterpreter session to get it to your box.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"266\" height=\"354\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/2_of_diamonds.png\" alt=\"\" class=\"wp-image-441\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/2_of_diamonds.png 266w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/2_of_diamonds-225x300.png 225w\" sizes=\"auto, (max-width: 266px) 100vw, 266px\" \/><\/figure><\/div>\n\n\n\n<p>Hash was: e2b066035ac74d756bfbc314a9d41817  <\/p>\n\n\n\n<p>This was the only flag we actually got :P.<\/p>\n\n\n\n<p>If you cat etc\/passwd you get a list of users and hashes (since its an old linux box), which will be used for port 22<\/p>\n\n\n\n<p class=\"code\">root:<em>:0:10:Charlie &amp;:\/:\/bin\/csh\ntoor:<\/em>:0:10:Bourne-again Superuser:\/:<br>\ndaemon:<em>:1:31:The devil himself:\/:\noperator::2:28:System &amp;:\/usr\/guest\/operator:\/bin\/csh\nuucp::66:1:UNIX-to-UNIX Copy:\/usr\/spool\/uucppublic:\/usr\/lib\/uucp\/uucico\nnobody:<\/em>:32767:9999:Unprivileged user:\/nonexistent:\/dev\/null<br>\nnotes:*:5:31:Notesfile maintainer:\/usr\/spool\/notes:\/bin\/csh<br>\nkarels:QOrZFUGpxDUlo:6:10:Mike &amp;:\/usr\/guest\/karels:\/bin\/csh<br>\nsam:Yd6H6R7ejeIP2:7:10:&amp; Leffler:\/usr\/guest\/sam:\/bin\/csh<br>\nwnj:ZDjXDBwXle2gc:8:10:Bill Joy:\/usr\/guest\/wnj:\/bin\/csh<br>\nmckusick:6l7zMyp8dZLZU:201:10:Kirk &amp;:\/usr\/guest\/mckusick:\/bin\/csh<br>\ndmr:AiInt5qKdjmHs:10:31:Dennis Ritchie:\/usr\/guest\/dmr:<br>\nken:sq5UDrPlKj1nA:11:31:&amp; Thompson:\/usr\/guest\/ken:<br>\nshannon:NYqgD2jjeuozk:12:31:Bill &amp;:\/usr\/guest\/shannon:\/bin\/csh<br>\npeter:y5G5mbEX4HhOY:13:31:peter b. kessler:\/usr\/guest\/peter:\/bin\/csh<br>\nkre:vpyVBWM3ARc0.:14:31:Robert Elz:\/usr\/guest\/kre:\/bin\/csh<br>\ningres:64c19dZOElp9I:267:74:&amp; Group:\/usr\/ingres:\/bin\/csh<br>\nralph:s.EZm\/wQTqbro:16:31:&amp; Campbell:\/usr\/guest\/ralph:\/bin\/csh<br>\nlinton:1\/WWIjn5Sd8qM:19:31:Mark &amp;:\/usr\/guest\/linton:\/bin\/csh<br>\nsklower:p0taJy06Qye1g:20:31:Keith &amp;:\/usr\/guest\/sklower:\/bin\/csh<br>\neric:PcEfNNJN.UHpM:22:31:&amp; Allman:\/usr\/guest\/eric:\/usr\/new\/csh<br>\nrrh:lj1vXnxTAPnDc:23:31:Robert R. Henry:\/usr\/guest\/rrh:\/bin\/csh<br>\narnold:5vTJh54EqjZsU:25:31:Kenneth C R C &amp;:\/usr\/guest\/arnold:\/bin\/csh<br>\njkf:G6cip\/I8C792U:26:31:John Foderaro:\/usr\/guest\/jkf:\/bin\/csh<br>\nghg:FA\/4weg1\/wy2c:32:31:George Goble:\/usr\/guest\/ghg:\/bin\/csh<br>\nbloom:n0QtVD80F82MM:33:10:Jim &amp;:\/usr\/guest\/bloom:\/bin\/csh<br>\nmiriam:hnZ1ZK5H2qapE:36:10:&amp; Amos:\/usr\/guest\/miriam:\/bin\/csh<br>\nkjd:ogYPQZGnihezk:37:10:Kevin Dunlap:\/usr\/guest\/kjd:\/bin\/csh<br>\nrwh:LReNSwE9gQF7w:38:10:Robert W. Henry:\/usr\/guest\/rwh:\/bin\/csh<br>\ntef:OciUqGHcs9YOw:39:31:Thomas Ferrin:\/usr\/guest\/tef:\/bin\/csh<br>\nvan:STpwu\/Ggmk78A:40:31:&amp; Jacobson:\/usr\/guest\/van:\/bin\/csh<br>\nrich:uxxJaRZvgyiPg:41:31:&amp; Hyde:\/usr\/guest\/rich:\/bin\/csh<br>\njim:.6s.pzMqjyMrU:42:10:&amp; McKie:\/usr\/guest\/jim:\/bin\/csh<br>\ndonn:5cJ5uHclmVJKA:43:31:&amp; Seeley:\/usr\/guest\/donn:\/bin\/csh<br>\nfalcon:.MTZpW8TC8tqs:32766:31:Prof. Steven &amp;:\/usr\/games:\/usr\/games\/wargames<br>\nhunter:IE4EHKRqf6Wvo:32765:31:Hunter Hedges:\/usr\/guest\/hunter:\/bin\/sh<\/p>\n\n\n\n<p>We attempt to try to crack this with hashcat with this command:<\/p>\n\n\n\n<p class=\"code\">hashcat64.exe -a 0 -m 1500 passwd rockyou.txt &#8211;force &#8211;self-test-disable -d 1,2,3  &#8211;gpu-temp-abort 100 &#8211;show<\/p>\n\n\n\n<p>We get a few cracks, which can be used on other ports like SSH:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"812\" height=\"310\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-25.png\" alt=\"\" class=\"wp-image-480\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-25.png 812w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-25-600x229.png 600w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-25-300x115.png 300w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-25-768x293.png 768w\" sizes=\"auto, (max-width: 812px) 100vw, 812px\" \/><\/figure>\n\n\n\n<p class=\"has-text-color has-medium-font-size has-vivid-cyan-blue-color\"><strong>Port 79:<\/strong><\/p>\n\n\n\n<p>See above, just a port used for the 2 of diamonds challenge.<\/p>\n\n\n\n<a name=\"queenofdiamonds\"><\/a><p class=\"has-text-color has-medium-font-size has-vivid-cyan-blue-color\"><strong>Port 80 (Queen of Diamonds):<\/strong><\/p>\n\n\n\n<p>Mike Boya, who was part of the #3 team, has a detailed writeup on this challenge <a href=\"https:\/\/mike-boya.github.io\/post\/metasploitctf2020-queen-of-diamonds-write-up\/\">here<\/a>. See below for the steps we attempted to take, though!<\/p>\n\n\n\n<p>Viewing this in a browser results in an image. The QR code in the image leads to&nbsp;<a rel=\"noreferrer noopener\" href=\"http:\/\/closebutnocigar.lookdeeper\/\" target=\"_blank\">http:\/\/closebutnocigar.lookdeeper<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"1000\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/ms_logo.png\" alt=\"\" class=\"wp-image-428\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/ms_logo.png 750w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/ms_logo-600x800.png 600w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/ms_logo-225x300.png 225w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n\n\n\n<p>The bg color is #001994, which lead me to try the 1994 port, which resulted in \u201cclose but no cigar.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"534\" height=\"45\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-5-1.png\" alt=\"\" class=\"wp-image-443\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-5-1.png 534w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-5-1-300x25.png 300w\" sizes=\"auto, (max-width: 534px) 100vw, 534px\" \/><\/figure>\n\n\n\n<p>Running the image through stegoveritasresults a file named 39E33, which seems to be empty.<\/p>\n\n\n\n<p class=\"code\">stegoveritas ms_logo.png<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"648\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-2-1024x648.png\" alt=\"\" class=\"wp-image-429\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-2-1024x648.png 1024w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-2-600x380.png 600w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-2-300x190.png 300w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-2-768x486.png 768w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-2-1536x973.png 1536w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-2.png 1565w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Looking closer, the QR code has some weird looking pixels in it. Concatenating the last byte of each RGB value of each pixel comes up with a trainspotting reference (credit to Luke for this info): <\/p>\n\n\n\n<p class=\"code\"><code>Choose Life. But why would I want to do a thing like that when I have hacking?<\/code>  <\/p>\n\n\n\n<p>No further solution at this point.<\/p>\n\n\n\n<p class=\"has-text-color has-medium-font-size has-vivid-cyan-blue-color\"><strong>Port 111<\/strong>:<\/p>\n\n\n\n<p>Rpcclient?<\/p><a name=\"10ofhearts\"><\/a>\n\n\n\n<p>No solution at this point<\/p>\n\n\n\n<p class=\"has-text-color has-medium-font-size has-vivid-cyan-blue-color\"><strong>Port 564 (10 of Hearts)<\/strong>:<\/p>\n\n\n\n<p>nmap responded with:<\/p>\n\n\n\n<p class=\"code\"> 564\/tcp   open  9pfs          syn-ack ttl 63 <\/p>\n\n\n\n<p>Lets try to mount the plan9 file system (credit to edspiner and gu4r15m0)<\/p>\n\n\n\n<p class=\"code\">sudo apt install 9mount<\/p>\n\n\n\n<p> 9mount -i &#8216;tcp!172.16.29.133!564&#8217; 9fs\/ <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"108\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-29-1024x108.png\" alt=\"\" class=\"wp-image-488\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-29-1024x108.png 1024w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-29-600x63.png 600w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-29-300x32.png 300w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-29-768x81.png 768w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-29.png 1113w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Inspecting the header reveals that it&#8217;s not a standard png file.. hmmm<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"574\" height=\"63\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-30.png\" alt=\"\" class=\"wp-image-489\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-30.png 574w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-30-300x33.png 300w\" sizes=\"auto, (max-width: 574px) 100vw, 574px\" \/><\/figure>\n\n\n\n<p>using a dd command to do a byte-by-byte copy results in the proper card (thanks again gu4r15m0)<\/p>\n\n\n\n<p class=\"code\"> dd cbs=1 if=9fs\/10_of_hearts.png of=10_of_hearts.png <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"216\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-31-1024x216.png\" alt=\"\" class=\"wp-image-490\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-31-1024x216.png 1024w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-31-600x126.png 600w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-31-300x63.png 300w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-31-768x162.png 768w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-31.png 1330w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"266\" height=\"354\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/10_of_hearts.png\" alt=\"\" class=\"wp-image-491\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/10_of_hearts.png 266w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/10_of_hearts-225x300.png 225w\" sizes=\"auto, (max-width: 266px) 100vw, 266px\" \/><\/figure><\/div>\n\n\n\n<p>hash: d39e801b0a11b8aa563c74b03582c24f<\/p><a name=\"aceofdiamonds\"><\/a>\n\n\n\n<p class=\"has-text-color has-medium-font-size has-vivid-cyan-blue-color\"> <strong>Port 880 (Ace of Diamonds):<\/strong> <\/p>\n\n\n\n<p>Seems to be some sort of repo manager frontend when browsed to.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"302\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-6-1-1024x302.png\" alt=\"\" class=\"wp-image-444\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-6-1-1024x302.png 1024w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-6-1-600x177.png 600w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-6-1-300x89.png 300w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-6-1-768x227.png 768w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-6-1.png 1501w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Based on some errors we see, seems to be some sort of sonatype nexus repo manager.<\/p>\n\n\n\n<p>There might be an <a href=\"https:\/\/blog.trendmicro.com\/trendlabs-security-intelligence\/cve-2019-7238-insufficient-access-controls-in-sonatype-nexus-repository-manager-3-allows-remote-code-execution\/\">exploit <\/a>but you need to know where the repos are served..<\/p>\n\n\n\n<p>External link to Metasploit CTF 2020 Writeup for port 880 by Jackson <a href=\"http:\/\/jackson-t.ca\/metasploitctf-2020-rmf.html\">here<\/a>.<\/p>\n\n\n\n<p class=\"has-text-color has-medium-font-size has-vivid-cyan-blue-color\"><strong>Port 888<\/strong>:<\/p>\n\n\n\n<p>ypserv<\/p>\n\n\n\n<p> No solution at this point. <\/p>\n\n\n\n<p class=\"has-text-color has-medium-font-size has-vivid-cyan-blue-color\"><strong>Port 1994<\/strong>:<\/p>\n\n\n\n<p>Related to port 80, see <a href=\"https:\/\/zineausa.com\/blog\/2020\/02\/metasploit-ctf-2020-writeup\/#queenofdiamonds\">Queen of Diamonds<\/a> area for more details.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"534\" height=\"45\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-5-2.png\" alt=\"\" class=\"wp-image-445\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-5-2.png 534w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-5-2-300x25.png 300w\" sizes=\"auto, (max-width: 534px) 100vw, 534px\" \/><\/figure>\n\n\n\n<p class=\"has-text-color has-medium-font-size has-vivid-cyan-blue-color\"><strong>Port 4369<\/strong>:<\/p>\n\n\n\n<p>Epmd exploit related to erlang.<\/p>\n\n\n\n<p>Nmap resulted in this:  <\/p>\n\n\n\n<p class=\"code\">4369\/tcp  open  epmd          syn-ack ttl 63 <br><\/p>\n\n\n\n<p> No solution at this point. <\/p>\n\n\n\n<a name=\"port5100\"><\/a><p class=\"has-text-color has-medium-font-size has-vivid-cyan-blue-color\"><strong>Port 5100: <\/strong><\/p>\n\n\n\n<p>Related to erlang and port 8444, which is where we got the cookie &#8216;api&#8217; from.<\/p>\n\n\n\n<p>Using that cookie, you can pop a reverse shell with msf with the details below (thanks mat).<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"292\" height=\"209\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-35.png\" alt=\"\" class=\"wp-image-555\"\/><\/figure>\n\n\n\n<p>Once you are in the system you can see how the card checker program works once you have popped a reverse shell.<\/p>\n\n\n\n<p>Looking at the tgz of the card checker program locally, you will find two flag pictures in a file called &#8220;flags.hrl&#8221;<\/p>\n\n\n\n<p>Perapera1\/opt1 used one of the card checker scripts as a baseline and changed it to output a csv of DEC to convert back into a binary, check it out  <a href=\"https:\/\/pastebin.com\/Gi8D23Mu\">here!<\/a><\/p>\n\n\n\n<p class=\"has-text-color has-medium-font-size has-vivid-cyan-blue-color\"><strong>Port 5900<\/strong>:<\/p>\n\n\n\n<p>This was the VNC port that had auth and you cloud use vncclient [target:port] to get in.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"486\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-7-1024x486.png\" alt=\"\" class=\"wp-image-446\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-7-1024x486.png 1024w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-7-600x285.png 600w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-7-300x142.png 300w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-7-768x364.png 768w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-7-1536x729.png 1536w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-7.png 1819w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>However, If you tried to move the mouse it would absolutely fly.<\/p>\n\n\n\n<p>Similarly to what you see in this <a href=\"https:\/\/twitter.com\/SamNChiet\/status\/1222647282237169671\">goose video<\/a> LOL (credits to ignis).<\/p>\n\n\n\n<p>Although it\u2019s reported that some were able to slowly but carefully navigate the file system to dump the flag, by clicking the term% box, pressing del, and typing lc then enter (credits to cryptoderp for this solution).<\/p>\n\n\n\n<p>Lessons learned here is to be patient\u2026<\/p>\n\n\n\n<p class=\"has-text-color has-medium-font-size has-vivid-cyan-blue-color\"><strong>Port 7770<\/strong>:<\/p>\n\n\n\n<p>Minimalst file access proxy<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"489\" height=\"157\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-8.png\" alt=\"\" class=\"wp-image-448\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-8.png 489w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-8-300x96.png 300w\" sizes=\"auto, (max-width: 489px) 100vw, 489px\" \/><\/figure><a name=\"queenofhearts\"><\/a>\n\n\n\n<p> No solution at this point. <\/p>\n\n\n\n<p class=\"has-text-color has-medium-font-size has-vivid-cyan-blue-color\"><strong>Port 8000 (Queen of&nbsp;Hearts<\/strong>):<\/p>\n\n\n\n<p>This was a blog post about giraffes. Initially it looked like a pretty broken site but referred to an account with melman as the username.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"766\" height=\"576\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-9.png\" alt=\"\" class=\"wp-image-449\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-9.png 766w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-9-600x451.png 600w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-9-300x226.png 300w\" sizes=\"auto, (max-width: 766px) 100vw, 766px\" \/><\/figure>\n\n\n\n<p>Doing so results in some interesting <a href=\"https:\/\/en.wikipedia.org\/wiki\/List_of_Madagascar_(franchise)_characters#Melman\">articles <\/a>and we find that the last name of the character, and the password, is Mankiewicz.<\/p>\n\n\n\n<p>First step was to make it resolve the broken links to 127.0.0.1. The way I did this was to setup a proxy in burpsuite to forward all&nbsp;<a rel=\"noreferrer noopener\" href=\"http:\/\/127.0.0.1:8000\/\" target=\"_blank\">127.0.0.1:8000<\/a>&nbsp;requests to the target box at 8000.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"914\" height=\"358\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-10.png\" alt=\"\" class=\"wp-image-450\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-10.png 914w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-10-600x235.png 600w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-10-300x118.png 300w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-10-768x301.png 768w\" sizes=\"auto, (max-width: 914px) 100vw, 914px\" \/><\/figure>\n\n\n\n<p>Now the site looks like this, much much better.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"850\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-11-1024x850.png\" alt=\"\" class=\"wp-image-451\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-11-1024x850.png 1024w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-11-600x498.png 600w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-11-300x249.png 300w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-11-768x638.png 768w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-11.png 1068w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Next there is a post that refers to posting a gallery, and a nikto scan actually reveals the version of the nextgen gallery plugin, which is vulnerable to a sql injection vulnerability.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"412\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-12-1024x412.png\" alt=\"\" class=\"wp-image-452\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-12-1024x412.png 1024w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-12-600x241.png 600w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-12-300x121.png 300w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-12-768x309.png 768w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-12-1536x618.png 1536w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-12.png 1857w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>We log in with the melman:Mankiewicz account. Attempting to post an album to the post and looking through the pictures results in this sort of connection attempt, which I saved from burpsuite (right click and save as) and loaded it into sqlmap.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"296\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-3-1024x296.png\" alt=\"\" class=\"wp-image-431\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-3-1024x296.png 1024w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-3-600x173.png 600w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-3-300x87.png 300w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-3-768x222.png 768w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-3.png 1191w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"411\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-13-1024x411.png\" alt=\"\" class=\"wp-image-454\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-13-1024x411.png 1024w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-13-600x241.png 600w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-13-300x120.png 300w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-13-768x308.png 768w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-13.png 1249w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>This is the sqlmap command I chose to use, it narrows in on the specific kind of sql injection attack (Order By), as well as the parameter which is vulnerable.<\/p>\n\n\n\n<p>sqlmap -r sqlirequest &#8211;test-filter=&#8217;ORDER BY&#8217; -p displayed_gallery%5Border_by%5D<\/p>\n\n\n\n<p>The connection kept dropping and failing to spit out certain data like hashes and other sensitive data (see the manual attempts below).<\/p>\n\n\n\n<p>(Working sql injection)<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"908\" height=\"611\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-14.png\" alt=\"\" class=\"wp-image-455\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-14.png 908w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-14-600x404.png 600w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-14-300x202.png 300w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-14-768x517.png 768w\" sizes=\"auto, (max-width: 908px) 100vw, 908px\" \/><figcaption><br><\/figcaption><\/figure>\n\n\n\n<p>(magically broken when trying to pull a hash)<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"873\" height=\"616\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-15.png\" alt=\"\" class=\"wp-image-456\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-15.png 873w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-15-600x423.png 600w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-15-300x212.png 300w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-15-768x542.png 768w\" sizes=\"auto, (max-width: 873px) 100vw, 873px\" \/><\/figure>\n\n\n\n<p>The key to this problem was actually using a tamper scripts in the command to circumvent the WAF protection or something similar. (Credits to missfitz and <a href=\"https:\/\/thomasvandoren.com\/metasploit-2020-writeup.html\">thomas <\/a>for this solution).<\/p>\n\n\n\n<p class=\"code\"> sqlmap -r sqlirequest &#8211;test-filter=&#8217;ORDER BY&#8217; -p displayed_gallery%5Border_by%5D &#8211;tamper=between,randomcase,space2comment<\/p>\n\n\n\n<p>However, there was another piece that was missing from my query. I didn\u2019t look for additional databases and assumed the one that was active (wordpress) was the correct one. However, if you looked the card was stored a second database called flag_card (credit to missfitz and Luke for this info).<\/p>\n\n\n\n<p>We will run the following command to dump the database names (credit to <a href=\"https:\/\/thomasvandoren.com\/metasploit-2020-writeup.html\">thomas <\/a>again):<\/p>\n\n\n\n<p> sqlmap -r sqlirequest &#8211;dbms=mysql &#8211;level=5 &#8211;risk=3 &#8211;dump &#8211;threads=10 &#8211;hex &#8211;technique=BEUQ &#8211;tamper=between,randomcase,space2comment &#8211;dbs &#8211;tables<\/p>\n\n\n\n<p>And finally, to dump the card, we will use:<\/p>\n\n\n\n<p class=\"code\">sqlmap -r sqlirequest &#8211;dbms=mysql &#8211;level=5 &#8211;risk=3 &#8211;dump &#8211;threads=10 &#8211;hex &#8211;technique=BEUQ &#8211;tamper=between,randomcase,space2comment -D flag_card -T card<\/p>\n\n\n\n<p>However, as <a href=\"https:\/\/thomasvandoren.com\/metasploit-2020-writeup.html\">thomas <\/a>pointed out this blind query takes a very long time so he came up with a sqlmap patch solution to pull the md5 out directly.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted code\">diff --git a\/lib\/core\/agent.py b\/lib\/core\/agent.py\nindex aad9db4b0..189262695 100644\n--- a\/lib\/core\/agent.py\n+++ b\/lib\/core\/agent.py\n@@ -595,6 +595,9 @@ class Agent(object):\n        Note: used primarily in dumping of custom tables\n        \"\"\"\n\n+        if field == 'image':\n+            return 'MD5(image)'\n+\n        retVal = field\n        if conf.db and table and conf.db in table:\n            table = table.split(conf.db)[-1].strip('.')<\/pre>\n\n\n\n<p>The flag ended up having a hash of: 111b62aef6e0a5ea78fe7485fc9b3333 <\/p>\n\n\n\n<p>Lessons learned here is to always look for other databases when doing sql injections, and also if your connection keeps getting dropped or certain valid queries are dropped, look into anti defensive mechanisms (e.g. use tamper scripts).<\/p>\n\n\n\n<a name=\"7ofclubs\"><\/a><p class=\"has-text-color has-medium-font-size has-vivid-cyan-blue-color\"><strong>Port 8444 (7 of Clubs and 7 of Hearts):<\/strong><\/p>\n\n\n\n<p>Content addressed card storage<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"214\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-16-1024x214.png\" alt=\"\" class=\"wp-image-458\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-16-1024x214.png 1024w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-16-600x125.png 600w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-16-300x63.png 300w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-16-768x160.png 768w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-16-1536x320.png 1536w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-16.png 1802w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Solution provided by perapera1\/opt1:<\/p>\n\n\n\n<p>Look at the source of the page:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-34.png\" alt=\"\" class=\"wp-image-531\" width=\"580\" height=\"337\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-34.png 724w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-34-600x349.png 600w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-34-300x174.png 300w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/figure>\n\n\n\n<p>Now.. moving to <a href=\"https:\/\/zineausa.com\/blog\/2020\/02\/metasploit-ctf-2020-writeup\/#port5100\">port 5100<\/a> to complete this challenge with this erlang cookie.<\/p>\n\n\n\n<p><strong>Port 31008<\/strong>:<\/p>\n\n\n\n<p>Ssh port<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"469\" height=\"98\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-17.png\" alt=\"\" class=\"wp-image-459\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-17.png 469w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-17-300x63.png 300w\" sizes=\"auto, (max-width: 469px) 100vw, 469px\" \/><\/figure>\n\n\n\n<p> No solution at this point. <\/p>\n\n\n\n<p class=\"has-text-color has-medium-font-size has-vivid-cyan-blue-color\"><strong>Port 31009<\/strong>:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"464\" height=\"67\" src=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-18.png\" alt=\"\" class=\"wp-image-460\" srcset=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-18.png 464w, https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/image-18-300x43.png 300w\" sizes=\"auto, (max-width: 464px) 100vw, 464px\" \/><\/figure>\n\n\n\n<p> No solution at this point. <\/p>\n\n\n\n<p>Hope you enjoyed this Metasploit CTF 2020 Writeup. Thanks to the Rapid7 team and everyone else involved in setting this CTF up! Read more about the results in their blog post <a href=\"https:\/\/blog.rapid7.com\/2020\/02\/03\/congrats-to-the-winners-of-the-2020-metasploit-community-ctf\/\">here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This competition started at noon on 1\/30\/20 and ran for 4 days until 2\/3\/2020. There were a total of 18 flags and a grand prize of $500 with a 1 year pro HTB subscription. My team of 4, which I pulled from a local meetup (Nova Hackers) and random people from the Metasploit CTF chat [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":499,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[23,24,22],"class_list":["post-423","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-writeups","tag-ctf","tag-metasploit","tag-writeup"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Metasploit Community CTF 2020 Writeup - Zinea InfoSec Blog<\/title>\n<meta name=\"description\" content=\"Writeup of the Metasploit CTF hosted in 2020. Detailed flag information as well as links to external writeups for those that I wasn&#039;t able to capture.\" \/>\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\/2020\/02\/metasploit-ctf-2020-writeup\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Metasploit Community CTF 2020 Writeup - Zinea InfoSec Blog\" \/>\n<meta property=\"og:description\" content=\"Writeup of the Metasploit CTF hosted in 2020. Detailed flag information as well as links to external writeups for those that I wasn&#039;t able to capture.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/zineausa.com\/blog\/2020\/02\/metasploit-ctf-2020-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=\"2020-02-03T22:03:14+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-02-05T18:08:55+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/msfctf.png\" \/>\n\t<meta property=\"og:image:width\" content=\"680\" \/>\n\t<meta property=\"og:image:height\" content=\"450\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/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=\"13 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/2020\\\/02\\\/metasploit-ctf-2020-writeup\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/2020\\\/02\\\/metasploit-ctf-2020-writeup\\\/\"},\"author\":{\"name\":\"Zinea\",\"@id\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/#\\\/schema\\\/person\\\/e3c58d4f0650f7fb571c01fcf836b1d0\"},\"headline\":\"Metasploit Community CTF 2020 Writeup\",\"datePublished\":\"2020-02-03T22:03:14+00:00\",\"dateModified\":\"2020-02-05T18:08:55+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/2020\\\/02\\\/metasploit-ctf-2020-writeup\\\/\"},\"wordCount\":2610,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/2020\\\/02\\\/metasploit-ctf-2020-writeup\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/02\\\/msfctf.png\",\"keywords\":[\"ctf\",\"metasploit\",\"writeup\"],\"articleSection\":[\"Writeups\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/zineausa.com\\\/blog\\\/2020\\\/02\\\/metasploit-ctf-2020-writeup\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/2020\\\/02\\\/metasploit-ctf-2020-writeup\\\/\",\"url\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/2020\\\/02\\\/metasploit-ctf-2020-writeup\\\/\",\"name\":\"Metasploit Community CTF 2020 Writeup - Zinea InfoSec Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/2020\\\/02\\\/metasploit-ctf-2020-writeup\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/2020\\\/02\\\/metasploit-ctf-2020-writeup\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/02\\\/msfctf.png\",\"datePublished\":\"2020-02-03T22:03:14+00:00\",\"dateModified\":\"2020-02-05T18:08:55+00:00\",\"description\":\"Writeup of the Metasploit CTF hosted in 2020. Detailed flag information as well as links to external writeups for those that I wasn't able to capture.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/2020\\\/02\\\/metasploit-ctf-2020-writeup\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/zineausa.com\\\/blog\\\/2020\\\/02\\\/metasploit-ctf-2020-writeup\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/2020\\\/02\\\/metasploit-ctf-2020-writeup\\\/#primaryimage\",\"url\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/02\\\/msfctf.png\",\"contentUrl\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/02\\\/msfctf.png\",\"width\":680,\"height\":450},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/2020\\\/02\\\/metasploit-ctf-2020-writeup\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/zineausa.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Metasploit Community CTF 2020 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":"Metasploit Community CTF 2020 Writeup - Zinea InfoSec Blog","description":"Writeup of the Metasploit CTF hosted in 2020. Detailed flag information as well as links to external writeups for those that I wasn't able to capture.","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\/2020\/02\/metasploit-ctf-2020-writeup\/","og_locale":"en_US","og_type":"article","og_title":"Metasploit Community CTF 2020 Writeup - Zinea InfoSec Blog","og_description":"Writeup of the Metasploit CTF hosted in 2020. Detailed flag information as well as links to external writeups for those that I wasn't able to capture.","og_url":"https:\/\/zineausa.com\/blog\/2020\/02\/metasploit-ctf-2020-writeup\/","og_site_name":"Zinea InfoSec Blog","article_publisher":"https:\/\/www.facebook.com\/zineausa\/","article_published_time":"2020-02-03T22:03:14+00:00","article_modified_time":"2020-02-05T18:08:55+00:00","og_image":[{"width":680,"height":450,"url":"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/msfctf.png","type":"image\/png"}],"author":"Zinea","twitter_card":"summary_large_image","twitter_creator":"@ZineaLLC","twitter_site":"@ZineaLLC","twitter_misc":{"Written by":"Zinea","Est. reading time":"13 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/zineausa.com\/blog\/2020\/02\/metasploit-ctf-2020-writeup\/#article","isPartOf":{"@id":"https:\/\/zineausa.com\/blog\/2020\/02\/metasploit-ctf-2020-writeup\/"},"author":{"name":"Zinea","@id":"https:\/\/zineausa.com\/blog\/#\/schema\/person\/e3c58d4f0650f7fb571c01fcf836b1d0"},"headline":"Metasploit Community CTF 2020 Writeup","datePublished":"2020-02-03T22:03:14+00:00","dateModified":"2020-02-05T18:08:55+00:00","mainEntityOfPage":{"@id":"https:\/\/zineausa.com\/blog\/2020\/02\/metasploit-ctf-2020-writeup\/"},"wordCount":2610,"commentCount":0,"publisher":{"@id":"https:\/\/zineausa.com\/blog\/#organization"},"image":{"@id":"https:\/\/zineausa.com\/blog\/2020\/02\/metasploit-ctf-2020-writeup\/#primaryimage"},"thumbnailUrl":"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/msfctf.png","keywords":["ctf","metasploit","writeup"],"articleSection":["Writeups"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/zineausa.com\/blog\/2020\/02\/metasploit-ctf-2020-writeup\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/zineausa.com\/blog\/2020\/02\/metasploit-ctf-2020-writeup\/","url":"https:\/\/zineausa.com\/blog\/2020\/02\/metasploit-ctf-2020-writeup\/","name":"Metasploit Community CTF 2020 Writeup - Zinea InfoSec Blog","isPartOf":{"@id":"https:\/\/zineausa.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/zineausa.com\/blog\/2020\/02\/metasploit-ctf-2020-writeup\/#primaryimage"},"image":{"@id":"https:\/\/zineausa.com\/blog\/2020\/02\/metasploit-ctf-2020-writeup\/#primaryimage"},"thumbnailUrl":"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/msfctf.png","datePublished":"2020-02-03T22:03:14+00:00","dateModified":"2020-02-05T18:08:55+00:00","description":"Writeup of the Metasploit CTF hosted in 2020. Detailed flag information as well as links to external writeups for those that I wasn't able to capture.","breadcrumb":{"@id":"https:\/\/zineausa.com\/blog\/2020\/02\/metasploit-ctf-2020-writeup\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/zineausa.com\/blog\/2020\/02\/metasploit-ctf-2020-writeup\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/zineausa.com\/blog\/2020\/02\/metasploit-ctf-2020-writeup\/#primaryimage","url":"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/msfctf.png","contentUrl":"https:\/\/zineausa.com\/blog\/wp-content\/uploads\/2020\/02\/msfctf.png","width":680,"height":450},{"@type":"BreadcrumbList","@id":"https:\/\/zineausa.com\/blog\/2020\/02\/metasploit-ctf-2020-writeup\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/zineausa.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Metasploit Community CTF 2020 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\/423","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=423"}],"version-history":[{"count":79,"href":"https:\/\/zineausa.com\/blog\/wp-json\/wp\/v2\/posts\/423\/revisions"}],"predecessor-version":[{"id":569,"href":"https:\/\/zineausa.com\/blog\/wp-json\/wp\/v2\/posts\/423\/revisions\/569"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/zineausa.com\/blog\/wp-json\/wp\/v2\/media\/499"}],"wp:attachment":[{"href":"https:\/\/zineausa.com\/blog\/wp-json\/wp\/v2\/media?parent=423"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zineausa.com\/blog\/wp-json\/wp\/v2\/categories?post=423"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zineausa.com\/blog\/wp-json\/wp\/v2\/tags?post=423"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}