<?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 Aleem S on Medium]]></title>
        <description><![CDATA[Stories by Aleem S on Medium]]></description>
        <link>https://medium.com/@aleemS?source=rss-d95cb89ce607------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*7LrY-mSiiJ8nZDU8</url>
            <title>Stories by Aleem S on Medium</title>
            <link>https://medium.com/@aleemS?source=rss-d95cb89ce607------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 14:03:47 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@aleemS/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[A Deep Dive into a Proactive Firewall + IDS/IPS Solution with pfSense and Snort]]></title>
            <link>https://medium.com/@aleemS/a-deep-dive-into-a-proactive-firewall-ids-ips-solution-with-pfsense-and-snort-1c6901466f46?source=rss-d95cb89ce607------2</link>
            <guid isPermaLink="false">https://medium.com/p/1c6901466f46</guid>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[it]]></category>
            <category><![CDATA[firewall]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Aleem S]]></dc:creator>
            <pubDate>Mon, 25 Dec 2023 07:10:47 GMT</pubDate>
            <atom:updated>2023-12-25T07:10:47.763Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tLZacIrSEAvWizvhzkXjtQ.png" /></figure><p>I worked on a project where we had to design an architecture for a small coffee shop business case scenario. My responsibility was to implement a firewall and IDS tool to monitor the network. Initially, I planned to use OS tools like Snort and Smoothwall, but I stumbled upon the idea of integrating Snort within the pfSense firewall. PfSense firewall enables the combination of services, such as Snort, for network monitoring. I would like to share how I integrated it into my case scenario.</p><h4><strong>Setup</strong></h4><p>In our prototype setup using pfSense Firewall and Snort IPS/IDS, the IP addresses are configured as follows:</p><p>Secured Wifi LAN subnet: 192.168.1.0/24</p><p>Guest Wifi LAN subnet: 192.168.2.0/24</p><p>Pfsense VM IP address: 192.168.1.1</p><p>Sample Desktop IP address: 192.168.1.101</p><p>Guest WIFI VM IP address: 192.168.2.100 (192.168.2.0/24)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/569/1*TeLI4OpQAD5J-vbyzzcUag.png" /></figure><p>Our primary security focus was to follow the least privileged principle. Our PfSense firewall is equipped with LAN segmentation features, effectively blocking malicious traffic within the LAN and also scrutinizing traffic from the WAN. The Intrusion Prevention System (IPS), powered by Snort, possesses the capability to block traffic originating from malicious IPs by cross-referencing with a blacklist. To stay ahead of potential threats, we utilized an emerging security rules list containing the latest attack vector signatures. To enhance security, access to the GUI page of the pfSense firewall from the Guest WiFi LAN has been restricted. Furthermore, the Guest WiFi LAN is isolated from the Secured Shop LAN, ensuring that the IPS drops all packets from any private network other than the Secured Shop LAN. The pfSense firewall is configured to trigger alerts in case of detected ping or port scans. The Snort IDS is capable of both dropping and alerting for malicious incoming or outgoing traffic, including Denial of Service (DoS) and Command and Control (C2) attacks from any network. Whitelisting is employed for firewall rules, and NAT rules are in place to permit traffic from the Guest WiFi to access the internet.</p><p>We have setuped 2 LAN’s in PfSense, LAN 1 for secured shop network and LAN 2 for Guest WIFI. We have set up NAT rules to allow guest WIFI to access internet using WAN. Guest WIFI can’t discover hosts from the secured Wi-Fi this way. All the LAN users can access internet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*blZdsJKNoUPbqz9JMWc9DA.png" /><figcaption>Segregating LANs and allowing the traffic to flow through PfSense</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*xWRonyQyn1rJbazHU1vCzA.png" /><figcaption>Creating manual NAT rules to allow all networks to access internet through WAN</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*A65sftLRCnoePrhWOlsubA.png" /><figcaption>LAN firewall rules</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*yKJuW6OhPaiJ225_ZeC5rQ.png" /><figcaption>Guest WIFI LAN firewall rules</figcaption></figure><p>Guest Wifi LAN rules block guest wifi from accessing secured LAN and block any users from accessing firewall GUI login page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*qpT6LqaPU4kUkakiw3aBYg.png" /><figcaption>Snort IDS/IPS interfaces</figcaption></figure><p>We employ three interfaces to actively monitor and prevent malicious attacks across all networks. Specifically, we have implemented an INLINE IPS for the Guest WiFi network, recognizing its higher vulnerability to potential attacks. The INLINE IPS possesses the capability to not only trigger alerts but also to proactively block and blacklist the identified IP addresses, along with their corresponding MAC addresses, mitigating the risk of further escalation. This strategic use of an INLINE IPS enhances our ability to swiftly and effectively respond to potential security threats on the Guest WiFi network, providing an additional layer of protection against malicious activities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/666/1*437Sbr5L6AeHKYhgjxlbWg.png" /><figcaption>Snort Rules for Guest WIFI interface</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*QEhwKOqfuFe13rmaTMe7xw.png" /><figcaption>Blacklisted IP list</figcaption></figure><h4>Conclusion</h4><p>I am also considering experimenting with Suricata. I am working on minimizing false positive logs. This setup is suitable for small businesses that require basic defense for their organization, and the best part is that it’s free.</p><p>In conclusion, our firewall and IDS/IPS solution, anchored by pfSense and Snort, exemplifies a proactive and resilient approach to securing a small business network. There is room for improvement based on specific business needs.</p><p>Let me know if you have any suggestions, and feel free to leave a<strong> clap</strong> if you enjoyed reading my post.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1c6901466f46" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Code for Free: A Comprehensive List of Programming Resources]]></title>
            <link>https://medium.com/@aleemS/code-for-free-a-comprehensive-list-of-programming-resources-41c9ee134f2b?source=rss-d95cb89ce607------2</link>
            <guid isPermaLink="false">https://medium.com/p/41c9ee134f2b</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[learning-to-code]]></category>
            <dc:creator><![CDATA[Aleem S]]></dc:creator>
            <pubDate>Sun, 29 Oct 2023 08:23:04 GMT</pubDate>
            <atom:updated>2023-10-29T08:25:22.324Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v_t1zcElu59G3qlD97KyYQ.jpeg" /><figcaption><a href="https://www.vecteezy.com/free-photos">Attribute</a></figcaption></figure><h4>Introduction</h4><p><strong>Why should you learn programming? </strong>Programming is not just for developing websites or applications; it also enables you to automate repetitive tasks, it can assist in data analysis, creating custom tools, penetration testing, and scripting to automate incident response procedures. For instance, you might need to backup your files every week. You can write a Python program to automate the backup process, copying your files to an external drive every week at a specified time.</p><p>A strong grasp of HTML and JavaScript can be beneficial during web application penetration testing.</p><p><strong>Interested in learning programming?</strong> All you need is a programmer’s mindset, a cup of coffee, and some time to dedicate to programming. Today, I’d like to share some helpful resources I used to learn programming, including Python, Java, HTML, and CSS.</p><p>Many of us prefer not to pay for subscriptions, which is why I’ve included websites that offer coding lessons for free.</p><p>Let’s get started!</p><h4><a href="https://www.codedex.io/">Codedex</a></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9W_wY-W9dbWzJBlhbjwuZA.png" /><figcaption><a href="https://www.codedex.io/">Codedex</a></figcaption></figure><p>If you’re a tech enthusiast or enjoy playing games,<strong> Codedex </strong>is perfect for you. The website provides an interactive platform for learning coding, offering languages such as HTML, Python, CSS, and JavaScript. It allows you to grasp the basics of programming, build projects, and practice your coding skills. They also offer a paid ‘Club’ membership that grants access to more features and advanced modules. Upon completing a module, you earn a badge. Complete all the modules, and you can earn a certificate.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/366/1*0pHUGbMR-8hveDXOTqSfHA.png" /></figure><p>You can even create a customized profile if you wish! This platform is an excellent choice for beginners or kids who want to learn programming.</p><h4><a href="https://www.edx.org/"><strong>edX</strong></a></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Wr0GyCfzZ0iM5ZPUN6hW1Q.png" /><figcaption><a href="https://www.edx.org/">EdX</a></figcaption></figure><p><strong>EdX</strong> is an excellent platform if you prefer a classroom-like learning environment. EdX offers free computer science courses from prestigious universities such as MIT, Harvard, and UC Berkeley. Upon completion, you can request a certificate. You can learn various programming languages, including Java, SQL, Python, and R. I highly recommend enrolling in the CS50 “Introduction to Computer Science” course. This self-paced 12-week course is free and requires no prior programming experience. It helps you build the mindset of a programmer. Completing EdX courses can boost your resume and make you a competitive candidate for programming-related positions, whether you’re starting your career or advancing in your current job.</p><h4><a href="https://www.codecademy.com/">codecademy</a></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TxsBqRdM0saYQgsvfqBgVg.png" /><figcaption><a href="https://www.codecademy.com/">Codecademy</a></figcaption></figure><p><strong>Codecademy</strong> offers self-paced online programming courses, both free and paid. They provide a wide range of courses, from beginner to advanced levels, in various programming languages. Personally, I appreciate this platform because it offers an easy-to-learn environment with numerous exercises to enhance your skills. Codecademy provides ample course materials and additional reading resources throughout the learning journey. They have also introduced free courses related to Large Language Models (LLMs), which are crucial in modern AI development.</p><p>Codecademy includes plenty of quizzes, practice problems, and projects that can enhance your resume or portfolio. Like other platforms, they offer completion certificates for free. This platform is ideal for learners who benefit from reviewing their mistakes, as it provides detailed feedback by highlighting the incorrect code and provide suggestions.</p><h4><a href="https://www.freecodecamp.org/">FreeCodeCamp</a></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CYzX8HegNQ-g_NwE1fMPtA.png" /><figcaption><a href="https://www.freecodecamp.org/">FreeCodeCamp</a></figcaption></figure><p><strong>FreeCodeCamp</strong> is a 501(c)(3) public charity organization that offers 100% free programming courses. Their curriculum covers a wide range of technologies, including HTML, CSS, JavaScript, databases, Git &amp; GitHub, React.js, D3.js, and more. They provide a hands-on approach, encouraging learners to solve real coding problems, collaborate on various projects, and earn a certification of completion at the end. FreeCodeCamp is ideal for someone who enjoys interactive, hands-on, and collaborative learning experiences.</p><h4>Conclusion</h4><p>Consider your pace, interests, and the level of interaction you seek when choosing a learning platform. Each option caters to different learning preferences, ensuring you find the perfect fit for your programming journey. If you prefer graphics, Codex is a fantastic choice. If you enjoy self-paced learning, both FreeCodeCamp and Codecademy are excellent options. For those who do best in a classroom environment, EdX provides a top-notch learning experience.</p><p>Remember, the best platform is the one that aligns with your preferences, goals, and learning style, ensuring a fulfilling and effective programming learning experience.</p><p>Keep hacking and learning! Clap if this blog was helpful!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=41c9ee134f2b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cyber Range: My Homelab Setup]]></title>
            <link>https://medium.com/@aleemS/cyber-range-my-homelab-setup-c1f703ea6f05?source=rss-d95cb89ce607------2</link>
            <guid isPermaLink="false">https://medium.com/p/c1f703ea6f05</guid>
            <category><![CDATA[vpn]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[homelab]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[cisco]]></category>
            <dc:creator><![CDATA[Aleem S]]></dc:creator>
            <pubDate>Tue, 24 Oct 2023 06:55:54 GMT</pubDate>
            <atom:updated>2023-10-29T18:27:39.059Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/756/1*qxrVrh1mWLdHRtksW4zkcQ.png" /></figure><h4><strong>Introduction:</strong></h4><p>I am thrilled to share with you my journey into creating a Cyber Range, a dedicated space where I can practice my cybersecurity skills. While it might not be the most sophisticated setup, I meticulously designed it with the principles of least privilege, Defense in depth and network segmentation in mind, aiming to eliminate pivotal points in my network.</p><p>This dream of having my own cyber range had been on my mind for a long time, but it wasn’t until this fall that I finally took the plunge. I picked up some bare minimum servers, added storage, memory, and fired them up!</p><p>So, without further ado, let’s dive right into it!</p><h4>Why have your own Cyber Range?</h4><ul><li><strong>Skill Development and Practice: </strong>A Cyber Range offers a controlled environment for practicing your cybersecurity skillset. You can experiment with various tools whether its offensive or defensive, techniques, and procedures without the fear of damaging a real network.</li><li><strong>Real-World Simulations: </strong>By creating different scenarios within your Cyber Range, you can simulate real-world cyber threats and attacks. There are plenty of vulnerable box images or Dockers you can install from online and simulate them in your Cyber Range.Examples like OWASP WebGoat, OWASP Juice Shop, Metasploitable, and PentesterLab are just a few to name.</li><li><strong>Safe Learning Environment:</strong> Mistakes are a part of learning. In a Cyber Range, you can make mistakes without real-world consequences. It allows you to learn from failures, refine your techniques, and at the same time enhance your problem-solving abilities.</li><li><strong>Continuous Learning:</strong> Cybersecurity is a constantly growing field. Your Cyber Range provides a platform for continuous learning. You can stay updated with the latest threats, vulnerabilities, and defense strategies, adapting your range to reflect current cybersecurity challenges. You can sandbox new malware or viruses to see how they affect your system without worrying about losing a system.</li></ul><p>All in all, having your own Cyber Range helps you create a safe, controlled, and adaptable environment to test and develop your cybersecurity skills.</p><h4>The Setup: A Symphony of Least Privilege and Network Segmentation</h4><p>I’m not claiming that this setup is the ultimate solution or that it should be replicated exactly. Instead, it suits my current situation, and this is how I prefer my setup to be.</p><h4><strong>Hardware:</strong></h4><ul><li><strong>Dell PowerEdge 2950: </strong>Equipped with 4TB SAS drives and 16 GB RAM.</li><li><strong>HP Proliant DL380 Gen9: </strong>Equipped with 10TB SAS drives and 64 GB RAM.</li><li><strong>Cisco SF300 Managed Switch:</strong> A high-performance managed switch for advanced networking. It has Layer 3 capabilities for advanced routing.</li><li><strong>Netgear GS305E Managed Switch</strong></li><li><strong>HP T620 Plus</strong></li></ul><h4><strong>Setup:</strong></h4><p><strong>Setting Up Segregated Networks:</strong> The internet connection from the ISP is channeled through a modem. I established two distinct networks: one for my home and another for my homelab. To achieve this segregation, I utilized a Netgear Managed Switch and configured two separate VLANs, ensuring clear boundaries between my personal and lab activities.</p><p><strong>Configuring pfSense Firewall and Additional Security Measures: </strong>The 192.168.13.0/24 subnet is connected to the pfSense firewall, which is set up on a HP t620 Plus PC equipped with a dual NIC card. I integrated pfBlockerNG, VPN, and Elasticsearch to block annoying ads, monitor network activities, and facilitate remote access to my homelab. I used Access Control Lists (ACLs), I whitelisted specific rules, limiting access to essential services and minimizing the attack surface. I have plans to implement Suricata (Intrusion Detection System) in the future to enhance security further.</p><p><strong>Segregating NAS and Cyber Range:</strong> To maintain a clear distinction between my NAS and Cyber Range, I deployed a Cisco Managed Switch and configured different VLANs. I established a VLAN for Access Points (AP), enabling connections from devices like laptops and Raspberry Pi to access the Cyber Lab and the internet safely. Utilizing ACLs, I granted the AP subnet access to the NAS and Cyber Range servers. Additionally, I set up static routes for the servers and VPN connections, ensuring seamless access.</p><p><strong>Cyber Range Infrastructure: </strong>For my Cyber Range, I used TrueNAS OS for NAS and the Proxmox hypervisor for Cyber Range. The Cyber Range operates within the 192.168.24.0/24 subnet. To safeguard Proxmox from potential issues and sandboxing, I established a VM bridge with the 10.0.12.0/24 subnet, ensuring Proxmox remains unaffected in case of any problem occurs in within the VM’s.</p><p><strong>RAID Configuration</strong>:I chose RAID 10 (1+0) for my servers since it provides the best of both worlds: high tolerance and fault tolerance. Since it mirrors onto another disk, I can access my data even if one drive goes bad.</p><p><strong>Encryption and Authentication:</strong> I am using ZFS to encrypt the pfSense and TrueNAS drives. ZFS employs AES (Advanced Encryption Standard) with 256-bit keys. For Proxmox, I am utilizing LUKS, which also uses AES with 256-bit keys. Additionally, I have implemented Multi-Factor Authentication (MFA) for the pfSense VPN, enhancing the overall security of my network.</p><h4>Some challenges faced:</h4><p>Since I bought these servers used, they were preconfigured to RAID 6. However, I wanted to change it to RAID 10. I encountered a few hiccups when the HP Proliant DL 380 Gen 9 server’s Intelligent Provisioning (IP) wasn’t found in my firmware. Initially, I was baffled as I was pressing the key, but it always booted normally. To troubleshoot, I conducted some research and attempted to check the logs using iLO. I discovered that the Cache module had gone bad.</p><p>After a few hours of investigation, I concluded that either the NAND memory was faulty or the board was toasted. I decided to try loading an older firmware for IP. Conducting a Google search, I found the file, burned it to a USB drive, booted from the USB, and flashed the new firmware. Upon booting up, it went straight to IP when I pressed the key. I felt a great sense of accomplishment.</p><h4>Final Thoughts:</h4><p>I am planning to implement open-source IDS, honeypot and EDR into my Cyber Range. I intend to host my website on my Cyber Range. I would also be adding a UPS for redundancy. Setting up my lab was a great experience. It took a while to set up, but it was worth it. I plan to enhance my Red Teaming skills by downloading more vulnerable boxes and pwning them. While I enjoy HTB, I also want to practice on my local machine. Additionally, I am planning to learn Malware Reverse Engineering. This will enable me to sandbox notorious malware and analyze them.</p><p>This entire journey allowed me to apply the skills and concepts I acquired in my networking and Cybersecurity-related classes.</p><p>If you enjoyed reading my story, a clap would be appreciated! It would motivate me to write more content.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c1f703ea6f05" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Automated Network Scanner: Using Nmap and Python]]></title>
            <link>https://medium.com/@aleemS/automated-network-scanner-using-nmap-and-python-ba0e9174d4be?source=rss-d95cb89ce607------2</link>
            <guid isPermaLink="false">https://medium.com/p/ba0e9174d4be</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[automated-scanner]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[nmap]]></category>
            <dc:creator><![CDATA[Aleem S]]></dc:creator>
            <pubDate>Sun, 22 Oct 2023 19:56:07 GMT</pubDate>
            <atom:updated>2023-10-22T20:07:30.852Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/256/1*KKqbdeqtC22zT4jb0FyfLA.png" /></figure><p>Understanding network security is crucial for identifying vulnerabilities within your local network. Recently, I developed a Python-based automation script utilizing Nmap, designed for automating network scans. This tool enables users to effortlessly scan and analyze devices within a local network. Moreover, it can be utilized to identify running services, determine their version numbers, and assess their susceptibility to vulnerabilities. I have used a Docker-built image of a virtual machine with vulnerable services running in my home cyber range to test out this tool.</p><p>This tool can be used on Windows or Linux-based systems.</p><h4>Requirements</h4><p>To use this tool, you need to have Python 3 and Nmap installed on your system.</p><ul><li><a href="https://www.python.org/downloads/">Python3</a></li><li><a href="https://nmap.org/download">Nmap</a></li></ul><h4>Installation</h4><p>Before we begin, we need to clone the tool’s repository from<a href="https://github.com/Aleem20/Automated-Network-Scanner"> Github</a>.</p><pre>git clone https://github.com/Aleem20/Automated-Network-Scanner.git</pre><p>Now that we have cloned the directory, we need to change the file path to the tool’s directory.</p><pre>cd Automated-Network-Scanner</pre><p>To run this script, simply type in this command:</p><pre>python3 ANscanner.py</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/808/1*RsIUtedBgtuhd0dvGcJHzQ.png" /></figure><h4><strong>Scanning Your Network</strong></h4><p>To begin scanning, you just have to input the scan number. For example, if you want to scan your network to find all active hosts and any open ports on those hosts, type 1.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/797/1*AW7QTpX9ktnTlO4u84CVKA.png" /><figcaption>Scan option 1</figcaption></figure><p>The tool should start scanning. In the above example scan, we found that two hosts are connected to our network: 12.0.2.1 and 12.0.2.5. Each host’s open ports are listed below them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/1*zoT92HME_zV4gzc8HIyOfg.png" /></figure><p>Once it’s finished scanning, it will ask if you want to re-run the program. Simply type “yes” or “no.”</p><h4>Conclusion</h4><p>Automated Network Scanner allows you to assess your network by first identifying hosts, determining running services, finding open ports, and finally, identifying any vulnerabilities. This capability enables users to document vulnerabilities or use them during penetration testing to exploit potential weaknesses. I had a great time creating this tool and using it in my cyber range. I plan to add more scans in the future. The ability to automate these tasks not only saves time but also ensures a comprehensive analysis of our network security posture.</p><h4><strong>Disclaimer:</strong></h4><ol><li><strong>Educational Use Only:</strong> This tool is meant for educational purposes only.</li><li><strong>Authorized Networks:</strong> Only scan networks and hosts for which you have explicit permission.</li><li><strong>No Malicious Intent</strong>: Do not use this tool for any harmful or malicious activities.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ba0e9174d4be" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hack The Box: LoveTok Challenge]]></title>
            <link>https://medium.com/@aleemS/hack-the-box-lovetok-challenge-da758382576f?source=rss-d95cb89ce607------2</link>
            <guid isPermaLink="false">https://medium.com/p/da758382576f</guid>
            <category><![CDATA[hackthebox-writeup]]></category>
            <category><![CDATA[hackthebox]]></category>
            <category><![CDATA[information-technology]]></category>
            <category><![CDATA[challenge]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Aleem S]]></dc:creator>
            <pubDate>Fri, 20 Oct 2023 07:13:41 GMT</pubDate>
            <atom:updated>2023-10-20T07:16:02.465Z</atom:updated>
            <content:encoded><![CDATA[<p>In this challenge, your primary goal is to identify a vulnerability lurking within LoveTok’s web application. The page looks pretty simple! Let’s begin!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EQl3K5mC09yLNeI4bV33LA.png" /></figure><p>When we launch the HTB instance and pivot to the address, we land on the above page.</p><p>Notice that when we click on the button, the URL changes to <strong>20.189.162:30760/?format=r</strong>.</p><p>I experimented with the concept of path traversal, trying various commands before stumbling upon “cat” command and it worked! It displayed the current date and time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*avvC1YPBh2pM18STfCf4ig.png" /></figure><p>So, we know for a fact that we can pivot to a different page by editing the URL format.</p><p>In this scenario, we could use a web shell.</p><h4>What is webshell?</h4><p>A web shell is a malicious script that, once installed, provides unauthorized access to the web server. With it, one can navigate the web server, manipulate files, and modify configurations. It serves as a pivotal point for finding the root flag.</p><p>Here’s how we want to format it:</p><p>Using ‘<strong>System()’</strong> is crucial as it allows the execution of shell commands. <strong>‘ls’</strong> displays the list of files and folders in the working directory. Combining both, we can use this parameter:</p><p><strong>‘${system($_GET[cmd])}&amp;cmd=ls’.</strong></p><p><strong>‘GET’ </strong>retrieves the value of <strong>‘cmd,</strong>’ and then<strong> ‘system’ </strong>executes the command as a shell. By writing <strong>‘cmd=ls,’</strong> it prints all the files and folders in the working directory. We utilize the ‘<strong>${}’</strong> syntax for variable substitution, allowing the value of ‘<strong>system($_GET[cmd])’ </strong>to be injected into the string.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SXoOOu9coLm9ueDG5wByuw.png" /></figure><p>I found something! We’ve got some files. We can pivot around by modifying the URL parameter again.</p><p>After spending a few minutes, I discovered that the flag file is located one folder up in the system.</p><p>To achieve this, we’ll use the same code as before but add <strong>‘ls%20../’ </strong>to the URL parameter. This modification will attempt to list the files and directories in the parent directory.</p><p><strong>‘${system($_GET[cmd])}&amp;cmd=ls%20../.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CzKP9ItIKp16927vPAPI8A.png" /></figure><p>We found the flag file! Now, we can use the <strong>‘cat’</strong> command to display the content of the file.</p><p>To accomplish this, the URL parameter would be the same, except we’ve added<strong> ‘cat’ </strong>and the filename to display the root flag:</p><p><strong>‘${system($_GET[cmd])}&amp;cmd=cat%20../flaGsNDT’</strong></p><p>Executing this command will allow us to view the content of the root flag file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0cuTjCfldk2VSLV40e_Jnw.png" /></figure><p><strong>Yay</strong>! We found the flag.</p><p><strong>Some takeaways:</strong></p><p><strong>Secure Input Handling:</strong> Properly validate and sanitize all user inputs, especially those used in URL parameters. Implement strict input validation to prevent malicious input from being processed.</p><p><strong>File Path Security: </strong>Avoid direct concatenation of user input to file paths or system commands. Use proper input validation and context-specific encoding to ensure that user input cannot be misused for path traversal attacks.</p><p><strong>Least Privilege Principle:</strong> Ensure that the web server and any processes running on it have the least necessary privileges. Limit the permissions of files and directories to only allow necessary actions.</p><p><strong>Regular Security Audits: </strong>Regularly audit your web applications and servers for security vulnerabilities. Automated tools and manual code reviews can help identify potential security weaknesses and fix them before they could be exploited.</p><p>Thank you for reading my article! Hope it helps! Clap if you enjoyed!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=da758382576f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Proxmox: Diagnostics Cheat Sheet]]></title>
            <link>https://medium.com/@aleemS/proxmox-diagnostics-cheat-sheet-1ff5aaed72a0?source=rss-d95cb89ce607------2</link>
            <guid isPermaLink="false">https://medium.com/p/1ff5aaed72a0</guid>
            <category><![CDATA[cheatsheet]]></category>
            <category><![CDATA[proxmox]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[it]]></category>
            <category><![CDATA[homelab]]></category>
            <dc:creator><![CDATA[Aleem S]]></dc:creator>
            <pubDate>Thu, 19 Oct 2023 23:29:26 GMT</pubDate>
            <atom:updated>2023-10-21T09:27:35.648Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*pO8qaGtlTdY__40k4O3riw.png" /></figure><p><strong>This guide is would help you troubleshoot and diagnose networking issues within Proxmox. This cheat sheet provides essential commands and techniques for managing network interfaces, configuring connections, testing network connectivity, ensuring security, monitoring traffic, and setting up VLANs and bridges.</strong></p><p><strong>Bookmark this cheat sheet for easy access. I will be updating and expanding the content.</strong></p><p><strong>Network Interfaces:</strong></p><ul><li><strong>ip a</strong>: Displays network interfaces.</li><li><strong>ethtool [interface name]</strong>: Displays and changes Ethernet card settings.</li><li><strong>lshw -class network</strong>: Provides detailed information about network interfaces.</li></ul><p><strong>Network Configuration:</strong></p><ul><li><strong>nano /etc/network/interfaces</strong>: Edit network interfaces configuration file.</li><li><strong>nano /etc/netplan/*.yaml</strong>: Edit Netplan configuration files.</li><li><strong>systemctl restart networking</strong>: Restart networking services after configuration changes.</li></ul><p><strong>Network Testing:</strong></p><ul><li><strong>ping [hostname or IP]</strong>: Check network connectivity.</li><li><strong>traceroute [hostname or IP]</strong>: Display the route packets take to reach a destination.</li><li><strong>mtr [hostname or IP]</strong>: Combines ping and traceroute.</li><li><strong>nc -zv [hostname or IP] [port no]</strong>: Check if a specific port is open on a remote host.</li><li><strong>nmap [hostname or IP]</strong>: Scan open ports on a remote host.</li></ul><p><strong>Network Services:</strong></p><ul><li><strong>systemctl status [service name]</strong>: Check the status of a specific network service.</li><li><strong>systemctl start [service name]</strong>: Start a specific network service.</li><li><strong>systemctl stop [service name]</strong>: Stop a specific network service.</li><li><strong>systemctl restart [service name]</strong>: Restart a specific network service.</li></ul><p><strong>Firewall and Security:</strong></p><ul><li><strong>ufw status</strong>: Check the status of the Uncomplicated Firewall.</li><li><strong>ufw allow [port no]</strong>: Allow traffic on a specific port through the firewall.</li><li><strong>ufw deny [port no]</strong>: Deny traffic on a specific port through the firewall.</li><li><strong>fail2ban-client status</strong>: Check the status of Fail2Ban (intrusion prevention software).</li></ul><p><strong>Monitoring and Logs:</strong></p><ul><li><strong>iftop</strong>: Display bandwidth usage on an interface in real-time.</li><li><strong>tcpdump -i [interface name]</strong>: Capture and analyze network packets on a specific interface.</li><li><strong>tail -f /var/log/syslog</strong>: Monitor system logs for network-related events.</li><li><strong>journalctl -xe</strong>: View system journal for detailed information on network services.</li></ul><p><strong>VLANs and Bridges:</strong></p><ul><li><strong>ip link show</strong>: Display information about network interfaces and their associated VLANs/bridges.</li><li><strong>brctl show</strong>: Show the status of bridges on the system.</li><li><strong>vconfig add [interface name] [vlan-id]</strong>: Create a new VLAN interface.</li><li><strong>brctl addbr [bridge-name]</strong>: Create a new bridge interface.</li></ul><p>Clap if this was helpful!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1ff5aaed72a0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flipper Zero: Windows BLE Spam]]></title>
            <link>https://medium.com/@aleemS/flipper-zero-windows-ble-spam-044a75e1b43a?source=rss-d95cb89ce607------2</link>
            <guid isPermaLink="false">https://medium.com/p/044a75e1b43a</guid>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[bluetooth]]></category>
            <category><![CDATA[bluetooth-low-energy]]></category>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[flipper-zero]]></category>
            <dc:creator><![CDATA[Aleem S]]></dc:creator>
            <pubDate>Sun, 15 Oct 2023 22:21:25 GMT</pubDate>
            <atom:updated>2023-10-15T22:51:38.022Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jOwJprLTCYgkXyAuppPu8w.jpeg" /><figcaption>Flipper Zero</figcaption></figure><p><strong>DISCLAIMER: This article is for educational purposes only! Only test it against your own devices!</strong></p><h4>What is Flipper Zero?</h4><p>Flipper Zero is a versatile, handheld device designed for security professionals, hackers, and electronics enthusiasts. It combines various functions into a single compact tool, making it a Swiss Army knife for digital security and electronics tinkering. It has the capability of hacking wireless communication protocols such as RFID, NFC, and others. It can also act as RFID emulation for cloning access cards. It can be used to test BLE devices, as well as replay similar BLE packets to determine if the device is susceptible to replay attacks (MITM) or SPAM swarm! You can read more about <a href="https://flipperzero.one/">Flipper Zero</a> on their website.</p><h4><strong>What is BLE Spam?</strong></h4><p>BLE or <strong>B</strong>luetooth <strong>L</strong>ow <strong>E</strong>nergy spam refers to the malicious activity of flooding a BLE network with a huge number of unwanted data or BLE packets. In a BLE spam attack, an attacker sends a massive number of advertising packets or connection requests to nearby Bluetooth devices. These packets might contain false or misleading information, overwhelming the target devices and disrupting their activity.</p><p>The goal of BLE spam can vary. It might be done to affect the availability of Bluetooth-enabled devices, causing inconvenience to users. Alternatively, it could be an attempt to exhaust the target device’s resources, drain its battery, or even exploit vulnerabilities for unauthorized access.</p><h4>What is Windows BLE Spam?</h4><p>Windows BLE Spam refers to sending numerous spam BLE (Bluetooth Low Energy) packets to Windows PCs, prompting them to establish a pairing connection with a device. Check out the video below for a quick demo!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FXM9ll_vazPQ%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DXM9ll_vazPQ&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FXM9ll_vazPQ%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/8a4c5b4d3f07b46ccce8485b3e6de111/href">https://medium.com/media/8a4c5b4d3f07b46ccce8485b3e6de111/href</a></iframe><h4>Why is BLE Spam Dangerous?</h4><p>BLE spam attacks or often none as beacon attacks can pose significant security risks, especially in environments where BLE devices are prevalent, such as IoT (Internet of Things) setups, smart homes, iPhones, Android phones, and Windows PCs. This could be exploited by bad actors to display false advertisements, send malicious payloads around the surrounding BLE range, or harass someone in close proximity. Custom BLE payloads can be crafted to exploit vulnerabilities in modern BLE-enabled devices. I won’t go into the specifics, but it is quite dangerous. There is a custom payload by <a href="https://github.com/ECTO-1A">ECTO-1A</a> for Flipper Zero, which can crash any Apple device running iOS 17 version.</p><h4><strong>How can you protect yourself against this Windows BLE Spam?</strong></h4><p>It’s pretty simple to block these notorious pop-ups. Either right-click on the Bluetooth icon and open settings, or go to Settings and open Bluetooth settings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/352/1*A0kIfvbjJIQTygn0aypLzQ.png" /></figure><p>Then, scroll down to the bottom of the menu. Uncheck the “Show notification to connect using Swift Pair” box. This is enabled by default in Windows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/705/1*_5bEjhzE5YSRQuRwV4A6ow.png" /></figure><p>This precaution should help protect you against Windows BLE spam. As a rule of thumb, always disable Bluetooth when not in use and avoid pairing with unknown devices.</p><h4>Credits:</h4><ul><li><a href="https://github.com/Spooks4576">Spooks4576 - Overview</a></li><li><a href="https://flipper-xtre.me/">Flipper Xtreme | Custom Firmware for Flipper Zero</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=044a75e1b43a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[WIFI Pineapple : DIY WIFI Pineapple Setup Guide]]></title>
            <link>https://medium.com/@aleemS/wifi-pineapple-diy-wifi-pineapple-setup-guide-93fb12a97845?source=rss-d95cb89ce607------2</link>
            <guid isPermaLink="false">https://medium.com/p/93fb12a97845</guid>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[hak5]]></category>
            <category><![CDATA[wifi]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Aleem S]]></dc:creator>
            <pubDate>Tue, 10 Oct 2023 09:17:44 GMT</pubDate>
            <atom:updated>2023-10-10T09:17:44.867Z</atom:updated>
            <content:encoded><![CDATA[<h3>WIFI Pineapple : DIY WIFI Pineapple Setup Guide</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bsSxIRNRttsr6l3zG6FhHA.jpeg" /><figcaption>Tp-Link Router with WIFI Pineapple Firmware</figcaption></figure><p>I was just poking around for new projects and stumbled upon something cool. I’ve always had my eye on the <a href="https://shop.hak5.org/products/wifi-pineapple">Hak5 Wi-Fi Pineapple</a> to build up my red teaming toolkit, but I needed to stick to a budget. The Hak5 Wifi Pineapple is a powerful and versatile wireless penetration testing. It allows users to create rogue Wi-Fi networks, enabling them to intercept and analyze network traffic for security testing purposes. It could perform Evil Portal, MITM, DNS poisoning and many wireless attacks using web interface.</p><p>After some initial research, I found that the Wifi Pineapple runs on OpenWrt. Also, I found this GitHub project by <a href="https://github.com/xchwarze/wifi-pineapple-cloner-builds">Xchwarze</a> which talks about cloning the Wifi Pineapple.</p><h4>Here’s the outline of this project:</h4><ul><li>Install <a href="https://openwrt.org/releases/19.07/start">OpenWrt</a> firmware.</li><li>Install the Pineapple firmware <a href="https://github.com/xchwarze/wifi-pineapple-cloner-builds/blob/main/releases/archer-c7-v4-universal-sysupgrade.bin">upgrade file</a>.</li><li>Set up Wifi Pineapple.</li></ul><h4>You’ll need the following essentials for this project:</h4><ol><li>Any compatible router with OpenWRT (I’ll be using Tp-Link Archer C7).</li><li>A USB drive for installing modules.</li><li>OpenWrt 19.07.7.</li><li>Wi-Fi Pineapple firmware.</li></ol><p>With these in hand, we’re ready to proceed with the setup process! So, let’s jump right into it!</p><p><strong>Install OpenWrt firmware:</strong></p><p>Download the OpenWrt firmware 19.07.7 using this <a href="https://openwrt.org/releases/19.07/start">link</a>. Then, navigate to your default router login page and upgrade the firmware by simply uploading the OpenWrt router firmware file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7bq3gk4eoCIOBChzB-bM8Q.png" /></figure><p>It will take a few minutes for the router to reboot.<strong> Do not restart or power off your router during this process, as it may brick your devic</strong>e. Once it’s flashed with OpenWrt, it’s time to upgrade to the Pineapple firmware.</p><p><strong>Install the Pineapple firmware upgrade file:</strong></p><p>First, we need to download the Pineapple firmware upgrade file. Choose the appropriate router and download the firmware file from the <a href="https://github.com/xchwarze/wifi-pineapple-cloner-builds">Github repo</a>. For my setup, I will be using the <a href="https://github.com/xchwarze/wifi-pineapple-cloner-builds/blob/main/releases/archer-c7-v4-universal-sysupgrade.bin">Archer C7 v4 universal file</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w_mqzb8KwgYQ5OR4PlxQzg.png" /></figure><p>Connect your device using an Ethernet port and open 192.168.1.1 in your browser. Navigate to the <em>System</em> tab and click on the <em>Flash Image</em> option. Choose the Flash Image and upload the Pineapple firmware sysupgrade file you recently downloaded. Uncheck the “<em>Keep settings and retain the current configuration</em>” box, then click <em>continue</em>. Again, this process should take a couple of minutes. Just a reminder: <strong>do not restart or power off your router</strong> during this time to avoid any interruptions in the firmware upgrade.</p><p><strong>Setup Wifi Pineapple:</strong></p><p>Once the router restarts, connect it to the internet and browse to 172.16.42.1:1471 to setup your WIFI Pineapple. Congratulations, enjoy your newly configured Wifi Pineapple!”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1ONiqNm2KeUfYTZAl7ftpw.png" /><figcaption>Wifi Pineapple Dashboard</figcaption></figure><p>Now that the Wifi Pineapple is set up, let’s proceed with installing modules to make it fully functional.</p><p>Plug the USB drive into the router and format it using the provided tool under <em>Advanced</em> &gt; <em>USB &amp; Storage</em> &gt;<em> Format SD Card</em>. This step ensures your USB drive is ready to install the necessary modules for your Wifi Pineapple.</p><p>Simply click the <em>Get Modules</em> button and then click <em>Install</em> for the modules you would like to use. Be sure to install dependencies for each module once they are installed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ozr7fRgP8tRPF8_kgznmeQ.png" /><figcaption>Installing Modules</figcaption></figure><h4><strong>Conclusion</strong></h4><p>This is just a proof of concept to show that we can build a Wifi Pineapple on a budget, achieving similar functionality as the official one. Of course, I’d still suggest buying the <a href="https://shop.hak5.org/products/wifi-pineapple">Hak5 WIFI Pineapple</a> to support the creators. I had a blast experimenting with my homemade version.</p><p>I’m thinking of getting a compatible router like Gl.iNet, which is pocket-sized and can be powered by a power bank. This could come in handy, especially when traveling with a gigantic router is a hassle. Big thanks to <a href="https://github.com/xchwarze/wifi-pineapple-cloner">Xchwarze</a> for sharing this project with the community.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=93fb12a97845" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Topology Hack The Box - Write-Up]]></title>
            <link>https://medium.com/@aleemS/topology-hack-the-box-write-up-2848ca16686c?source=rss-d95cb89ce607------2</link>
            <guid isPermaLink="false">https://medium.com/p/2848ca16686c</guid>
            <category><![CDATA[topology]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[hackthebox]]></category>
            <category><![CDATA[hackthebox-writeup]]></category>
            <dc:creator><![CDATA[Aleem S]]></dc:creator>
            <pubDate>Tue, 03 Oct 2023 15:01:15 GMT</pubDate>
            <atom:updated>2023-10-03T15:01:15.070Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6wEaaVq9C3DNLtTUbToxGQ.png" /><figcaption>hackthebox.com</figcaption></figure><p>Today I will go through the steps to pawn HTB <strong>Topology </strong>machine. It’s a easy level machine by HTB.</p><h4><strong>Initial Recon</strong></h4><p>I utilized <strong>Nmap</strong> to scan the network and identify all the services running. During the scan, I discovered that an<strong> Apache server</strong> was running on<strong> port</strong> <strong>80</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/1*2G1sGqdiiq5hOe5pWU2TWA.png" /></figure><h4><strong>Enumeration</strong></h4><p>I navigated to<strong> 10.10.11.217:80</strong> which displayed the topology website.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/737/1*VNb6EHRmmrWvY5LuiAMTdg.png" /></figure><p>There was a subdomain called <strong>latex.topology.htb</strong>. After a quick google search, I found that <a href="https://github.com/swisskyrepo/PayloadsAllTheThings/tree/master/LaTeX%20Injection"><strong>LaTeX</strong></a> was a string manipulation injection. Maybe this is useful after awards.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/731/1*AAmjvVm0p82UG1bW98rWMA.png" /></figure><p>I used <a href="https://github.com/xmendez/wfuzz"><strong>wfuzz</strong></a> to find the sub directories of the topology.htb. I used <a href="https://github.com/danielmiessler/SecLists">seclists</a> wordlist.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/719/1*XqlVR-VOp94v5iJO9y4jpw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/719/1*s9CNMl-dpdAbUPNMHCNLrQ.png" /></figure><p>We could use<strong> \lstinputlisting{}</strong> to read the file. Write the file path inside {} brackets. We could then store it in a variable using $. I first tried using “<a href="https://book.hacktricks.xyz/pentesting-web/formula-doc-latex-injection"><strong>\input{/etc/password}</strong></a>” which landed me on a page where it said, “Illegal command, sorry.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/633/1*I-gQ4fv-a8ODWfACMt_yQg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/562/1*6C1P-bh6T8gmIT3rxWUjKQ.png" /></figure><p>I tried again, but now assigned it to a variable. It took me to the <strong>etc/passwd</strong> path. We could observe that there is a user called <strong>vdaisley</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*PPLOuWt0hmyacXDCmEf-tg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/710/1*Ko6-LUrSKDoN2sfCSAjENQ.png" /></figure><p>Then, I reused the same string but this time I changed the file to <strong>/dev/.httpasswd</strong> using “<strong>$\lstinputlisting{/var/www/dev/.htpasswd}$”</strong> because Apache server stores password file in <strong>.htpasswd</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*s-svSPzIr5uxbI2D9ezcBw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/1*cmy2SY4VL0QdOeWvAj5f7g.png" /></figure><p>It worked! We found the hashed password of the user, <strong>vdaisley</strong>.</p><p>I created a file and stored the hash in it. I used <a href="https://github.com/openwall/john"><strong>johntheripper </strong></a>with <a href="https://www.kali.org/tools/wordlists/"><strong>rockyou</strong></a> wordlist to crack the password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/784/1*fYqplYeQ585KSQ93PExjAA.png" /></figure><p>I logged in with the SSH credentials and immediately got the user flag! Well, that wasn’t too difficult.</p><h4>Privilege Escalation</h4><p>Then, I listed all the files in the user directory and found<strong> </strong><a href="https://github.com/DominicBreuker/pspy"><strong>PSPY</strong></a><strong>.</strong> <strong>Pspy64</strong> is a tool which allows users to monitor processes in Linux without root permission. Interestingly, I ran <strong>pspy</strong> and found <a href="http://www.gnuplot.vt.edu/"><strong>gnuplot</strong></a> in /opt directory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/616/1*eXQaRCw2QrSJ_QXDLL09OQ.png" /></figure><p><a href="http://www.gnuplot.vt.edu/">Gnuplot</a> allows users to create 2D or 3D functions or data. It is used to plot dimensions in latex. It has write and execute permission.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/698/1*nA3hTK-ySm6zTgqcMnz0Kw.png" /></figure><p>I created a file in <strong>/opt/gnuplot/random.plt</strong> in order to store the <strong>chmod</strong> command. Then when I run the<strong> cat</strong> command, it is going to execute and give us root access.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/652/1*uC4zMDm6Taqahsrk9GVN8w.png" /></figure><p>Smart enough, it <strong>worked!</strong>. We have the root privileges now. I navigated to the root directory and found the root flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/688/1*-_SzmpHcXx3ZcSd97XMRgw.png" /></figure><p>Topology box is<strong> PWNED</strong>! If you found it helpful,<em> leave a clap</em> or <em>share the post</em>!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2848ca16686c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[RunZero Coin Challenge-Write up]]></title>
            <link>https://medium.com/@aleemS/runzero-coin-challenge-write-up-fec6ac882829?source=rss-d95cb89ce607------2</link>
            <guid isPermaLink="false">https://medium.com/p/fec6ac882829</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[challenge]]></category>
            <category><![CDATA[crypto]]></category>
            <category><![CDATA[wisconsin]]></category>
            <dc:creator><![CDATA[Aleem S]]></dc:creator>
            <pubDate>Tue, 03 Oct 2023 04:13:12 GMT</pubDate>
            <atom:updated>2023-10-03T04:13:12.707Z</atom:updated>
            <content:encoded><![CDATA[<p>I attended Cyphercon 2023, Wisconsin’s largest hacker’s conference, where I participated in numerous CTFs and challenges, including the Run Zero Coin Challenge, a cryptography-based challenge.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lcp5VK6d4ay7EjO69AGKMQ.png" /><figcaption>Source: <a href="https://www.runzero.com/">runzero</a></figcaption></figure><p>Looking at the coin, I noticed that it had Roman numerals printed on it: VI, XVI, XIV, I, VI, III, XV, XIII, which correspond to decimal numbers 6, 16, 14, 1, 6, 3, 15, 13. I attempted to convert these decimal numbers to ASCII, but it didn’t make sense.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/769/1*G0C-VCe6nd8CCkSD84x8QA.png" /><figcaption>Source: <a href="https://www.rapidtables.com/convert/number/ascii-hex-bin-dec-converter.html">https://www.rapidtables.com/convert/number/ascii-hex-bin-dec-converter.html</a></figcaption></figure><p>I attempted to convert the decimals into letters, following a pattern similar to the Caesar cipher: for instance, 1 corresponds to ‘A,’ 2 to ‘B,’ and so on</p><p>.6 16 14 1 6 3 15 13 = <strong>F P N A F C O M</strong></p><p>This is the index page. Seems pretty normal right!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1S_xTpviHz_SHS6SsXGYLg.png" /><figcaption><strong>fpnaf.com</strong></figcaption></figure><p>After inspecting the page thoroughly, I couldn’t find any useful information. Determined to understand more, I researched about robots.txt. robots.txt file serves as a set of instructions for search engine robots, guiding them on how to crawl and index pages within a website. Then I created a redirected URL linked to the robots.txt file, which, interestingly, led me to another page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/885/1*nSSsvy-GSy8gsLRFPICoYA.png" /><figcaption><strong>fpnap.com/robots.txt</strong></figcaption></figure><p>It appeared as a URL. So, I plugged it in, leading me to another page. <a href="https://fpnaf.com/30a70cfed77efbf7.html"><strong>https://fpnaf.com/30a70cfed77efbf7.html</strong></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/846/1*A39YwTJDJKuNdIdm_ruvSw.png" /><figcaption><a href="https://fpnaf.com/30a70cfed77efbf7.html"><strong>https://fpnaf.com/30a70cfed77efbf7.html</strong></a></figcaption></figure><p>It appears that something may be related to the background color! Upon inspecting the page, I found that the <strong>&lt;TD STYLE&gt; </strong>background color was unusual. My thought was that 0 represents light turned off and 1 represents light turned on or black color. So, I went ahead and edited the HTML which had 1 bits in their last place to a brighter color code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*GBTge7O1c0powNQ4C9eHVw.png" /><figcaption><a href="https://fpnaf.com/30a70cfed77efbf7.html"><strong>https://fpnaf.com/30a70cfed77efbf7.html</strong></a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/871/1*k5tr6bgCxXAM79OsjU4vBQ.png" /><figcaption><a href="https://fpnaf.com/30a70cfed77efbf7.html"><strong>https://fpnaf.com/30a70cfed77efbf7.html</strong></a></figcaption></figure><p>Looks like another URL <a href="https://fpnaf.com/C70A45B93819748F.HTML"><strong>https://fpnaf.com/C70A45B93819748F.HTML</strong></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/764/1*sl5WRwM4bevduU44DK23bQ.png" /><figcaption><a href="https://fpnaf.com/C70A45B93819748F.HTML"><strong>https://fpnaf.com/C70A45B93819748F.HTML</strong></a></figcaption></figure><p>I found a folder listed as secret.zip. I downloaded the folder but it seems that the zip file was protected. After downloading it, I realized the zip file was password-protected. Recalling a hint from the source code in the previous step, ‘Attention 13 heads ahead.” I did a quick search and found ROT 13 cipher. I tried hostname (fpnaf) in ROT 13 cipher which translated to “Scans” which turned out to be the password for the zip file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/611/1*b9rGhShvNPdBWSgReHyF6Q.png" /><figcaption><strong>secrets.zip</strong></figcaption></figure><p>When I opened the folder, There were a number of empty folders and subfolders that contained files with unique names.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/909/1*r-IRanhNcgFdgUBTWota1w.png" /><figcaption><strong>secrets.zip folders</strong></figcaption></figure><p>I documented all the provided data in the above format, although this part initially confused me. Upon examining the file names, I noticed they were in ASCII format. For instance, the ‘variation’ folder contained a file named ‘0x0,’ which translates to 0 in decimal. So, I reorganized the content of all the files by converting the ASCII characters to decimal values and arranging them in the correct order. Through this process, I found another encoded text: “ZmluZ2VycHJpbnRzISAvZGM5NmE2MDU4MWQwYzZmNi5odG1s.” I used <a href="https://gchq.github.io/CyberChef/">CyberChef</a> to decode the text.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*VLWhWnQqeqW5HJsyfQVe-A.png" /><figcaption><strong>Source: </strong><a href="https://gchq.github.io/CyberChef/">https://gchq.github.io/CyberChef/</a></figcaption></figure><p>I discovered another URL: ‘fingerprints! /<strong>dc96a60581d0c6f6.html.</strong>’ I visited the URL and found the following content:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*6hfWP1oV1gdvICXXndNzsw.png" /><figcaption><strong>fpnaf.com/dc96a60581d0c6f6.html</strong></figcaption></figure><p>I am done playing cat and mouse game! It seems like the text have been jumbled. I viewed the source code and found that there was a pattern in the Alt tag. So, I am simply rearranged the code and found this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*YQkCSXyf8--kPXiWXcJUvw.png" /><figcaption><strong>fpnaf.com/dc96a60581d0c6f6.html</strong></figcaption></figure><p>Well! Looks like another link. “/<strong>7ce85c4346c3f29a.html</strong>” When I went to the above link, I discovered a page listed as “Asset Inventory.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*TNPE4FIIt3pRziW9GmV33g.png" /><figcaption><strong>fpnaf.com/d7ce85c4346c3f29a.html</strong></figcaption></figure><p>I viewed the source code and found a YouTube video link: <a href="https://www.youtube.com/watch?v=bn9F19Hi1Lk&amp;lc=UgwRVLcsdiCkEuw1To14AaABAg"><strong>https://www.youtube.com/watch?v=bn9F19Hi1Lk&amp;lc=UgwRVLcsdiCkEuw1To14AaABAg</strong></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Y50xI3QnsGdjB9Hne9T7QA.png" /><figcaption><strong>fpnaf.com/d7ce85c4346c3f29a.html</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/489/1*ySV3l0eavcp9ZYRoqh65VA.png" /><figcaption><strong>Source: </strong><a href="https://www.youtube.com/watch?v=bn9F19Hi1Lk&amp;lc=UgwRVLcsdiCkEuw1To14AaABAg"><strong>https://www.youtube.com/watch?v=bn9F19Hi1Lk&amp;lc=UgwRVLcsdiCkEuw1To14AaABAg</strong></a></figcaption></figure><p>Interestingly, there was a highlighted comment in the YouTube video. returned to the page, downloaded the ‘<strong>thisimg.png’</strong> file, and converted it into an audio file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*AcyY7ZkE_gUVGeMe-T3e8A.png" /><figcaption><strong>Source: </strong><a href="https://www.audacityteam.org/">https://www.audacityteam.org/</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*InCFCD-Ebe5SIuLVbOgNaQ.png" /><figcaption><strong>Source: </strong><a href="https://www.audacityteam.org/">https://www.audacityteam.org/</a></figcaption></figure><p>I reversed the audio using “<a href="https://www.audacityteam.org/">Audacity</a>” and ran it through a decoder and found this text.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*dbMgaEbJiFXVeCzWQbjD_Q.png" /><figcaption><strong>Source: </strong><a href="https://www.audacityteam.org/">https://www.audacityteam.org/</a></figcaption></figure><p>Hooray! It appears that there was an end to these lengthy URLs!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*_vWz_-zZYw10mmvynmz_Sg.png" /><figcaption><strong>runZero</strong></figcaption></figure><p>Finally, I completed the Coin challenge. I picked up this gift while attending Cyphercon 2023.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*MA7ohYAjYLYX79eEM-Ixtg.png" /><figcaption><strong>runZero coin</strong></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fec6ac882829" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>