<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://rossgr.github.io/feed.xml" rel="self" type="application/atom+xml" /><link href="https://rossgr.github.io/" rel="alternate" type="text/html" /><updated>2024-10-13T11:14:12-07:00</updated><id>https://rossgr.github.io/feed.xml</id><title type="html">://rossgr</title><subtitle>personal description</subtitle><author><name>Ross Greenall</name></author><entry><title type="html">The Importance of Information Security Policy in The Prevention and Mitigation of Cyber Attacks.</title><link href="https://rossgr.github.io/blogs/importance-of-information-security/" rel="alternate" type="text/html" title="The Importance of Information Security Policy in The Prevention and Mitigation of Cyber Attacks." /><published>2024-10-13T00:00:00-07:00</published><updated>2024-10-13T00:00:00-07:00</updated><id>https://rossgr.github.io/blogs/blog-post-1</id><content type="html" xml:base="https://rossgr.github.io/blogs/importance-of-information-security/"><![CDATA[<p>📖</p>

<p>Most modern businesses rely on digital services and information to operate on a day-to-day basis. If these services and resources become compromised the consequences can be severe both financially and legally, often resulting in considerable damage to a business’s reputation. In 2022, in their annual Cost of a Data Breach Report, IBM highlighted that 83% of organisations experienced more than one data breach. (IBM, 2022). Therefore, the prevention and mitigation of this damage ought to be high on the priority list of any executive. There are many threat actors who wish to gain unauthorised access to a business’s network. These can include “script kiddies,” a person using existing tools and technologies with limited knowledge, “Black Hats,” experienced hackers using their expertise for financial gain or even state sponsored attackers, using the funding and support of governments to perform malicious activities for geopolitical reasons. (Ben Gorman, 2023).</p>

<h2 id="what-do-you-mean-by-information-security-policy">What do you mean by Information Security Policy?</h2>

<p>Information Security Policy refers to policies, standards and guidelines envisioned and executed by a business to protect and ensure sensitive information and data from unauthorised access. (ISMS, no date). These procedures are regarded as integral steps in defense and should be understood and acted on by all employees. Fundamentally, an Information Security Policy should help to guide businesses in the introduction of technologies and situations. This can be done by assessing these using the Confidentiality, Integrity, and Availability (CIA) Triad.</p>

<h3 id="the-cia-triad">The CIA Triad</h3>

<p>The CIA Triad is a core concept in information security. It is a model that is used to help understand how to protect a business’s valuable digital assets. The three components of the triad are Confidentiality, which pertains to the secrecy of information and making it only accessible to authorized entities. (Death, 2023). Integrity, which involves maintaining the accuracy and consistency of information. (Death, 2023). And Availability, which means systems and data are functional and accessible.
Understanding this model will improve the security of any business or project. It is important to think about this model when introducing any new system or technology into the business. It is also important when recapping security protocols to reassess existing technologies within the business and judge them based off the CIA triad. Not only does the triad form the foundation of cyber security systems, but it also helps businesses comply with data privacy legislation and reduce damage in the inevitability of an attack. (RiskXChange, no date). This helps us with the next step, risk management.</p>

<h2 id="risk-management">Risk Management</h2>

<p>When running any digital service there will always be risks associated with it. Being able to understand that unfortunate things will happen at some point, and you cannot protect against every avenue of attack, is the strongest position to be in. Attack vectors that profit off so called Zero Day vulnerabilities are impossible to protect against, as the software or hardware manufacturers themselves are unaware of their existence. Other known vulnerabilities can be prevented however, as the ability to patch or modify system configurations to account for these is possible and can be included as reviewing in part of a well maintained Information Security Policy. It is integral to understand that a strong well thought out and executed risk management plan can limit and, in some cases, prevent damage from occurring. Risk management is defined differently by different organisations and standards.</p>

<h3 id="which-standards-are-used">Which standards are used?</h3>

<p>One of the most well-known and used sets of standards is ISO/IEC 27005, which shows how to conduct an information security risk assessment in accordance with the requirements of ISO 27001. (ITGovernance, 2023). This standard is relevant to any organisation, no matter the size or industry it operates in.</p>

<p>The ISO 27005 risk management approach can be classified into 6 key components.</p>

<h3 id="why-should-my-company-use-this-standard">Why should my company use this standard?</h3>

<p>This standard has been adopted by many companies and is also used by government and non-profit organisations. It is designed to be flexible to adapt to any size of business. This is important as many executives of smaller or lesser organisations consider security to be an optional extra. This is a fallacy. To consider the security of an organisations digital assets as extra would be both reckless and dangerous. Not only to the business and its reputation but it could result in damage to the very customers they rely on or in the worst case, legal action.</p>

<p>There have been several cases where organisations with a poor understanding or commitment to security have ended up facing legal action. This is because they are responsible for the digital assets they collect and store. This is known as compliance. Data being sent, used, or stored must be protected in diverse ways. There are three states that data can be in, these are known as Data at rest, data in transit and data in use. (Marko Dinic, 2022). A failure to protect data in its three states will result in non-compliance. Depending on the severity and situation, the organisation may be in breach of a number of security laws or regulations.</p>

<h2 id="what-legislation-is-there-regarding-security-in-the-uk">What legislation is there regarding security in the UK?</h2>

<h3 id="data-protection-act--uk-general-data-protection">Data Protection Act &amp; UK-General Data Protection.</h3>

<p>There are several laws and regulations that have been designed to protect sensitive data. And there have been instances where major corporations have failed to meet the requirements of these laws and regulations, such as British Airways, who faced a £183m fine following a data breach in 2018. (BBC, 2019). These laws are integral in the creation and maintenance of any Information Security Policy. The first of these laws is called the Data Protection Act (2018). The DPA works in conjunction with the UK-GDPR (General Data Protection Act) to implement strong security measures to safeguard personal data organisations collect and process and also reduce security breaches. (Kyle Chin, 2023). A failure to comply with this law can produce fines of up to £17.5 million pounds or 4% of annual global turnover. UK-GDPR offers similar punishment for organisations failing to meet its standards, one of which includes having a security policy that meets the GDPR’s requirements.</p>

<h3 id="network-and-information-systems-nis-regulations">Network and Information Systems (NIS) Regulations</h3>

<p>The NIS Regulations’ primary function is to “detect and manage the threats to the security of network and information systems in an acceptable and proportional manner” (UK Government, 2023). These regulations are focused more on organisations that are considered to be digital service providers such as search engines or marketplaces and operators of essential services, this means healthcare, energy, transport and other public services. (Kyle Chin, 2023). This may not apply to all businesses, but it is important to be aware of the legislation that is in effect in the UK. Following in the footsteps of the largest organisations in security policy is an effective way to stay up to date and aware of the changing landscape of security threats.</p>

<h2 id="what-are-some-things-i-can-do-to-increase-security-straight-away">What are some things I can do to increase security straight away?</h2>

<h3 id="physical-security">Physical Security</h3>

<p>Introducing new security measures into the office is the best way to start the prevention of cyber-attacks. Physical access to sensitive systems is one of the main causes for disruption. Creating policies around the office environment and providing cybersecurity training to all personnel is necessary. Some examples of new policies could include; mandatory training for staff, a clean desk policy, ID verification on building entry, surveillance systems, visitor tracking systems etc. All these policies should be checked and tested on a regular basis to ensure all employees understand and know the risks.</p>

<h3 id="cybersecurity">Cybersecurity</h3>

<p>The best way to start implementing the ideas shown in this document is to hire a security consultant to setup your organisations security policy using one of the frameworks mentioned above. This will provide a solid foundation for future implementation and review. Some ideas that can be considered are; MFA (Multi Factor Authentication) for access to systems, hierarchical user management system with dedicated groups of users to limit access and control to employees, this will prevent unauthorised usage of tools and storage by rogue or uneducated employees.</p>

<h3 id="conclusion">Conclusion</h3>

<p>To conclude, having a bulletproof Information Security Policy that is based on a well-known and respected framework, such as ISO/IEC 27005, allows your organisation to progress with its digital business. Seeing the common pitfalls of other companies and the damage it does to a business is a keen motivator to get in control of your digital assets. If the only takeaway you make from this blog is introducing a new in-house policy for security, then that is a success. All these things take time and resources to implement, but it is a necessary aspect of managing your information system.</p>

<h3 id="references">References</h3>

<p>IBM. (December 2022), <em>Cost of a Data Breach Report 2023.</em> <strong>IBM</strong> [Accessed on 24th November 2023]</p>

<p>Gorman, Ben. (July 14, 2023), <em>Different Types of Hackers: White Hat, Black Hat, Gray Hat, and More.</em> <strong>AVG</strong> [Online] [Accessed on 25th November 2023] https://www.avg.com/en/signal/types-of-hackers</p>

<p>ISMS. (no date), <em>Information Security Policy</em> [Online] [Accessed on 25th November 2023] https://www.isms.online/information-security/policy/</p>

<p>Death, Darren (October 2023), <em>Information Security Handbook.</em> Second Edition, Packt Publishing.</p>

<p>RiskXChange. (no date), <em>What Is the CIA Triad Security Model?</em> <strong>RiskXChange</strong> [Accessed on 25th November] https://riskxchange.co/1006933/what-is-the-cia-triad/</p>

<p>ITGovernance. (2023), <em>ISO 27005.</em> [Online] [Accessed on 29th November] https://www.itgovernance.co.uk/iso27005</p>

<p>BBC. (July 8, 2019), <em>British Airways faces record £183m fine for data breach</em> [Accessed on 29th November] <em>https://www.bbc.co.uk/news/business-48905907</em></p>

<p>Marko Dinic. (May 02, 2022), <em>A Complete Guide to Encryption — Data at Rest, Data in Motion and Data in Use.</em> [Accessed on 1st December] https://jatheon.com/blog/data-at-rest-data-in-motion-data-in-use/</p>

<p>Kyle Chin. (Aug 11, 2023), <em>List of Cybersecurity Laws and Regulations in the UK.</em> [Accessed on 1st December] https://www.upguard.com/blog/cybersecurity-laws-regulations-uk</p>

<p>UK Government (May 03, 2023), *The Network and Information Systems Regulations 2018. <strong>*</strong>[Accessed on 2nd December] https://www.legislation.gov.uk/uksi/2018/506</p>]]></content><author><name>Ross Greenall</name></author><category term="Cybersecurity" /><category term="Policy" /><summary type="html"><![CDATA[📖]]></summary></entry><entry><title type="html">How To: Using Enum4Linux to Enumerate Information from Windows &amp;amp; Samba Systems.</title><link href="https://rossgr.github.io/blogs/enum4linux/" rel="alternate" type="text/html" title="How To: Using Enum4Linux to Enumerate Information from Windows &amp;amp; Samba Systems." /><published>2024-10-13T00:00:00-07:00</published><updated>2024-10-13T00:00:00-07:00</updated><id>https://rossgr.github.io/blogs/blog-post-2</id><content type="html" xml:base="https://rossgr.github.io/blogs/enum4linux/"><![CDATA[<p>🛠️</p>

<h3 id="what-is-enum4linux"><strong>What is enum4linux?</strong></h3>

<p>Enum4Linux is a tool that allows you to enumerate information from Windows and Samba systems. Samba is an open-source implementation of the <strong>Server Message Block (SMB)</strong> protocol for Unix systems (Robert Sheldon, no date). The Samba platform allows communication between Unix and Windows hosts on a network. This allows Unix hosts to access Windows file and print services and is a vital component in integrating Linux/Unix servers into Active Directory environments (Samba, no date).</p>

<p>Enum4linux is built around the Samba tools suite to enable penetration testers to retrieve information about a target system including its operating system, group membership information, workgroup, or domain membership and even password policy retrieval all using one tool. It attempts to replicate the functionality of enum.exe on Windows machines. (Kali, 2023).</p>

<hr />

<h3 id="what-will-this-tutorial-cover"><strong>What will this tutorial cover?</strong></h3>

<p>In this tutorial, I will cover the concepts of why using a tool like enum4linux is important in the reconnaissance phase of a penetration test. I will show you how to access enum4linux and install it on Kali (if it has not been pre-installed on your system). I will also use the Basic Pentesting box from TryHackMe to demonstrate the tool and its numerous different settings.</p>

<hr />

<h3 id="what-is-enumeration"><strong>What is Enumeration?</strong></h3>

<p><img src="/images/enum4linuxpen.png" alt="" /></p>

<p><strong>*Figure 1:</strong> The 5 penetration testing stages.* (Cyril, 2023).</p>

<p>In a penetration test, there are 5 stages. The first stage, planning and reconnaissance is as important as any other. During this phase, the scope of the test is defined as well as the goals that the test aims to achieve. From this, the tester can begin what is referred to as reconnaissance, this involves gathering intelligence about the target, such as network information, to greater their understanding and work out potential weaknesses in a target.</p>

<p>Enum4linux allows a pentester to extract valuable information about a potential target, such as operating system information, network infrastructure or hostnames for specific devices that may produce a weakness that can be exploited.</p>

<p>There are several different forms of enumeration. To learn more about these types, I refer you to this article by EC-Council <a href="https://www.eccouncil.org/cybersecurity-exchange/ethical-hacking/enumeration-ethical-hacking/">https://www.eccouncil.org/cybersecurity-exchange/ethical-hacking/enumeration-ethical-hacking/</a>.</p>

<hr />

<h3 id="legal-and-ethical-issues">Legal and Ethical Issues.</h3>

<p>It is important to note that using tools such as enum4linux on targets that you do not have explicit permission to do so is considered a crime punishable under most countries laws. Depending on where you are in the world will depend on the severity of the sentence should you act without consent when using tools of this nature, any “hacking” tool should be treated with respect and it is important to understand the technical details before putting them to use.</p>

<p>In the United Kingdom, the Computer Misuse Act 1990, was introduced to handle incidents where people use computer systems to gain unauthorised access to private data, unauthorised access with the intent to damage, and unauthorised access to impair or restrict the operation of a computer. (Computer Misuse Act 1990). There are plenty of online and offline testing environments where you can operate these tools without infringing on ang legal issues.</p>

<p>This also takes into consideration the ethical guidelines we must follow as security professionals. If you have been given permission to use these tools on a network then you must still think about whether it is ethical to do so. Be responsible and maintain clarity when engaging with another person’s computer systems.</p>

<h3 id="installing-enum4linux"><strong>Installing enum4linux.</strong></h3>

<p>If enum4linux did not come preinstalled with your version of Kali Linux, you can install it and its dependencies using this command.</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo </span>apt <span class="nb">install </span>enum4linux
</code></pre></div></div>

<p><img src="/images/enum4linuxkali1.png" alt="" /></p>

<p><strong>*Figure 2.</strong> Screenshot from Kali Linux showing installation of enum4linux.*</p>

<hr />

<h3 id="using-enum4linux"><strong>Using enum4linux.</strong></h3>

<p>Accessing the help pages for enum4linux will give us all the information we need on what the tool can accomplish for us. To view this, we can use the commands:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>enum4linux <span class="nt">--help</span>
enum4linux <span class="nt">-h</span>
</code></pre></div></div>

<p><img src="/images/enum4linuxkali2.png" alt="" /></p>

<p><strong>*Figure 3.</strong> Screenshot highlighting the help pages provided with enum4linux.*</p>

<p>As you can see from the help pages, there are a lot of different options we have access to when using enum4linux. We will run through each of these options individually to get a better understanding of their usability. The only thing you need to follow along is your own virtual machine running Kali and access a vulnerable machine such as Metasploitable or a box from TryHackMe. For this tutorial I will be using the Basic Pentesting box from TryHackMe which can be completed here. This is not a walkthrough of the box and merely showcases the section following the initial nmap scan results. But you are welcome to follow along at home. <a href="https://tryhackme.com/room/basicpentestingjt">https://tryhackme.com/room/basicpentestingjt</a></p>

<hr />

<h3 id="getting-the-user-list"><strong>Getting The User list.</strong></h3>

<p>The first option at our disposal is “-U” to get a list of the users who are listed on the target we are trying to enumerate from. To use this option we can type the following into the terminal.</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>enum4linux <span class="nt">-U</span> <span class="nv">$IP_ADDRESS</span>
</code></pre></div></div>

<p>If unsuccessful, we can use the “-r” option instead. This option will use a method known as RID Cycling to brute force the users. To use the RID cycling mode:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>enum4linux <span class="nt">-r</span> <span class="nv">$IP_ADDRESS</span>
</code></pre></div></div>

<p><strong>What is RID Cycling?</strong></p>

<p>An RID or Relative Identifier is a hexadecimal identifier that is unique. It is used by Windows Server to keep track of objects and identify them. (HackTricks, 2023) Anytime a new user object is added to a domain, the Security Identifier or SID is combined with the RID to create a unique value for this object. The issue here is that RIDs are sequential, so it is possible to brute force these identifiers using this technique. (Microsoft, 2023).</p>

<p><img src="/images/enum4linuxkali3.png" alt="bananaboat" /></p>

<p><strong>*Figure 4</strong> Result of using RID cycling to extract user information from target.*</p>

<p>After running this command, we can see that enum4linux has found several Security Identifiers on the target system. Then using the technique of RID cycling, it has located two Unix users known as kay and jan.</p>

<aside>
💡 This information is important as we could use it in several different ways to gain access to various aspects of the network. One example could be using Hydra to bruteforce the SSH logins of these users.

</aside>

<hr />

<h3 id="enumerating-password-policy-information">Enumerating Password Policy Information.</h3>

<p>Next up, we have the password policy option on enum4linux. To use this option, we can use the flag “-P” as seen on the help pages.</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>enum4linux <span class="nt">-P</span> <span class="nv">$IP_ADDRESS</span>
</code></pre></div></div>

<p>This option will give us details on any password policies active on the domains associated with the target IP address we inserted. The password policy information we receive can be incredibly useful in the later stages of a penetration test, if we need to brute force any passwords, we can adjust our settings to better match the requirements set by the server when a new password is created. This can help avoid detection and reduce the computing power required to gain entry.</p>

<p><img src="/images/enum4linuxkali4.png" alt="" /></p>

<p><strong>*Figure 5.</strong> Output from enum4linux using password policy option.*</p>

<p>After running the command, we can see the following output information. For the domain on the IP address we provided, there is a password policy containing a minimum password length of 5, a maximum password age of 37 days, 6 hours, and 21 minutes. It is also clear that there is no Account Lockout Threshold active. This indicates to us that if we were to brute force a password using a tool such as Hydra, we could have as many attempts as we like without the risk of being locked out.</p>

<hr />

<h3 id="enumerating-share-information"><strong>Enumerating Share Information.</strong></h3>

<p><img src="/images/enum4linuxkali5.png" alt="" /></p>

<p><strong>*Figure 6.</strong> Output from share enumeration setting on enum4linux.*</p>

<p>The share enumeration option on enum4linux returns all the shares (files and folders) on the target system. This includes default or administrative shares such as the IPC share, which is responsible for handling inter-program communication. (NetApp, 2023) We can also see another share called Anonymous which is a disk type share. This could contain useful folders and files that may produce valuable information or data in a penetration test. To use this option:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>enum4linux <span class="nt">-S</span> <span class="nv">$IP_ADDRESS</span>
</code></pre></div></div>

<hr />

<h3 id="extracting-printer-information"><strong>Extracting Printer Information.</strong></h3>

<p>This option is self-explanatory. It detects if there are any printers connected to the target network. In this example, we can see that there are no printers connected. Some printers can be misconfigured to expose their administrative panels or a simple Denial of Service (DoS) attack could render a businesses ability to print documents useless.</p>

<p><img src="/images/enum4linuxkali6.png" alt="" /></p>

<p><strong>*Figure 7.</strong> Output of running printer information option on enum4linux.*</p>

<hr />

<h3 id="finding-operating-system-information"><strong>Finding Operating System Information.</strong></h3>

<p><img src="/images/enum4linuxkali7.png" alt="" /></p>

<p><strong>*Figure 8.</strong> Output of running OS information setting on enum4linux.*</p>

<p>Although if we are running enum4linux we are aware that the Operating System of the target will probably be a Samba server or Windows Server. It can be important to get more information about the version or type exactly. This information can highlight outdated or misconfigured network settings that can be exploited in the later stages of a penetration test.</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>enum4linux <span class="nt">-o</span> <span class="nv">$IP_ADDRESS</span>
</code></pre></div></div>

<p>When we run the OS Detection option, enum4linux uses two different methods to retrieve this information. One using smbclient and one using srvinfo. In the example given smbclient was unsuccessful in finding any information for us so enum4linux switched to srvinfo, which provides information on system processes. It is possible to use other tools such as Nmap to retrieve OS information. In a scenario where we are not sure what our target is, using Nmap to enumerate this information would be the best method. We would see then what is running on the target and focus our tools for enumerating further, by using a tool such as enum4linux to do so.</p>

<hr />

<h3 id="in-conclusion">In Conclusion.</h3>

<p>After reading through this tutorial, you should feel more comfortable using enum4linux to perform enumeration and reconnaissance during the initial phase of a penetration test. Performing overall or specific type enumeration depending on the types of information you’re trying to retrieve will produce a lot of important data and information about Windows Server and Samba systems. This data can help you understand the functionality of a specific target network and also provide details that can later be used to determine an avenue of exploitation. Hopefully, you can now see the value and the powerful nature of this tool and its uses in the industry.</p>

<hr />

<h3 id="references"><strong>References</strong></h3>

<p>Robert Sheldon. (no date), <em>Server Message Block protocol (SMB Protocol)</em> <strong>TechTarget</strong> [Accessed on 2nd December 2023] https://www.techtarget.com/searchnetworking/definition/Server-Message-Block-Protocol</p>

<p>Samba. (no date), <em>Samba Homepage</em> Samba.org [Accessed on 2nd December 2023] <a href="https://www.samba.org/samba/">https://www.samba.org/samba/</a></p>

<p>Kali. (November 24, 2023), <em>enum4linux</em> [Accessed on 2nd December 2023] <a href="https://www.kali.org/tools/enum4linux/">https://www.kali.org/tools/enum4linux/</a></p>

<p>Cyril (January 25, 2023), <em>COMPREHENSIVE GUIDE TO PENETRATION TESTING (SECURITY TESTING),</em> <strong>SecureTriad.</strong> **[Accessed on 2nd December 2023] https://securetriad.io/penetration-testing/</p>

<p>HackTricks (September 03, 2023), <em>rpcclient enumeration</em> [Accessed on 2nd December 2023] <a href="https://book.hacktricks.xyz/network-services-pentesting/pentesting-smb/rpcclient-enumeration">https://book.hacktricks.xyz/network-services-pentesting/pentesting-smb/rpcclient-enumeration</a></p>

<p>Microsoft (September 09, 2023), <em>Security Identifiers</em> [Accessed on 2nd December 2023] https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/manage/understand-security-identifiers</p>

<p>NetApp (January 01, 2023) <em>What the default administrator shares are.</em> [Accessed on 3rd December 2023] https://docs.netapp.com/us-en/ontap/smb-admin/default-administrative-shares-concept.html</p>

<p>Computer Misuse Act 1990 c. 18 Available at: <a href="https://www.legislation.gov.uk/ukpga/1990/18/contents">https://www.legislation.gov.uk/ukpga/1990/18/contents</a> [Accessed on 3rd December 2023]</p>]]></content><author><name>Ross Greenall</name></author><category term="Tools" /><category term="Linux" /><category term="SMB" /><summary type="html"><![CDATA[🛠️]]></summary></entry></feed>