Sunday, April 7, 2024

Vulnerability Management - Applied Microsoft patches not getting detected

Recently tools like MECM, which are used for patch management in environments where Windows OS is used, are showing status as compliant when patches are pushed via them. But when scanned using a vulnerability management solution, the same systems are showing missing patches.

Now that the context is set, I would like to discuss the cause.

It is because of UBR (Update Build Revision) number. VM solutions are looking for UBR number to check if the latest patch is applied or not. UBR can be read from registry at key "HKLM:\SOFTWARE\Microsoft\Windows". Microsoft always changes the UBR value and updates it when there is a new patch. So ensure, whenever patches are pushed using patching solutions, UBR numbers are updated accordingly.

Following are some troubleshooting steps I found using simple Google search 😬:

  1. Check for updates: Make sure that systems are configured to check for updates automatically and that they are connected to the internet. You can check for updates manually by going to Settings > Update & Security > Windows Update and clicking “Check for updates”.
  2. Restart the Windows Update service: If the Windows Update service is not functioning properly, you can try restarting the service. To do this, open the Services console (services.msc) and locate the Windows Update service. Right-click on the service and select “Restart”.
  3. Reset the Windows Update components: If restarting the service does not resolve the issue, you can try resetting the Windows Update components. Microsoft provides a script that can automate this process.
  4. Manually install updates: If the UBR value is still not updating properly, you can try manually installing the updates on the affected server. You can download the updates from the Microsoft Update Catalog and install them manually.
  5. Check for errors in the event logs: Check the Event Viewer logs for any errors or warnings related to the Windows Update service or the installation of updates. These logs may provide additional clues about the cause of the issue.
  6. If using MECM, you can try reinstalling the MECM clients on affected servers.

Please refer the below URLs for more details:
https://www.vcloudinfo.com/2020/12/how-to-decode-windows-version-numbers.html

https://community.spiceworks.com/t/windows-ubr-value-not-updating-after-windows-update/948275

https://support.hcltechsw.com/csm?id=kb_article&sysparm_article=KB0094555

Happy Learning
hashtagvulnerabilitymanagement hashtagcybersecurity

Vulnerability Management - Vulnerabilities vs Vulnerable Instance (Rapid7)

Rapid7 considers a vulnerability different from a vulnerable instance.


Vulnerabilities:

A “vulnerability” is a unique, defined, and publicly disclosed software weakness. Each vulnerability is typically identified by an enumeration system, barring a few exceptions based on the type of software. Although multiple enumeration systems exist, the Common Vulnerabilities and Exposures (CVE) system is the most widely used and accepted system today.

Vulnerability Instances:

A “vulnerability instance” refers to the specific condition on an asset that causes it to be vulnerable to a vulnerability. An asset can be vulnerable to the same vulnerability in multiple ways. Common causes for this scenario are:
  1. Having multiple versions of the same software installed on an asset at the same time; all of which are vulnerable to the same vulnerability.
  2. Being vulnerable to the same vulnerability through multiple network ports.
So just be careful when you are comparing numbers between raw reports and InsightVM's dashboards. Raw reports will always show more numbers (if you have selected 'Vulnerability Proof' and 'Service Port' column) than what the dashboard is showing. I did not observe this kind of distinction in Qualys and Tenable yet.

Please refer below URL for more details:
https://docs.rapid7.com/insightvm/vulnerability-metrics-explained/

Happy Learning
hashtagvulnerabilitymanagement hashtagcybersecurity

Vulnerability Management - Orphan Vulnerabilities

The vulnerabilities with unknown status are known as orphan vulnerabilities. So the question is why we cannot know the status of such vulnerabilities ?

Suppose you ran an authenticated scan against a server. Some vulnerabilities were detected which required authentication. Now, if because of some reason you discontinue to run authenticated scans then the scanner has no way to know whether the vulnerabilities detected in previous scan still exist or not. So, even if you remediate these vulnerabilities they will still exist in the database. The only way would be to manually purge the asset data or run authenticated scan once again. Even if an agent is installed on the server still the vulnerabilities will exist in the database (because VM solutions track data collected by a scanning appliance and an agent separately).

If you are scanning the same server with agent as well then the following action can be taken (in case of Rapid7 InsightVM):
You can enable complementary scanning (i.e. Scanner will skip authenticated checks wherever agent is installed).

Please refer below URLs for more details:
In case of Rapid7:
https://docs.rapid7.com/insightvm/using-the-insight-agent-with-insightvm/

In case of Qualys:
https://qualysguard.qg2.apps.qualys.com/qwebhelp/fo_portal/host_assets/agent_merge_data.htm

Happy Learning !!
hashtag

Vulnerability Management - Mass target vulnerability remediation

We all know about various prioritization techniques used for targeted vulnerability remediation.

But how will you bring down a huge number of vulnerability count ?

Following are the ways which I observed till now:
  1. Increase compliance percentage for patch management (ensure all the in scope assets are onboarded to patch management solution and patches are getting pushed regularly).
  2. Disable deprecated protocols such as SMBv1.0 and SMBv1.1 etc.
  3. Remove softwares which are no longer used in your environment.
  4. Decommission EOL operating systems (of course after running scream test).
I still think if you are not breaking anything then you are not remediating 😅. Joke apart, above mentioned points are easy wins or so called low hanging fruits hence easy to target.

Happy Learning !!
hashtag

Saturday, November 4, 2023

Vulnerability Management - Suppress Vulnerabilities

Today I will share with you a way by which you can ignore 99.9% of vulnerabilities in your environment. Ha ha ... Just kidding.


But on a serious note there are few vulnerabilities which you can suppress. Let's see them one by one.


1. SSL related vulnerabilities on systems in LAN network:


e.g. SSL Certificate Cannot Be Trusted (https://www.tenable.com/plugins/nessus/51192)

e.g. SSL Self-Signed Certificate (https://www.tenable.com/plugins/nessus/57582)

e.g. SSL Certificate with Wrong Hostname (https://www.tenable.com/plugins/nessus/45411) 


Reason -> Organizations use use self-signed certificates for systems in LAN.


2. Vulnerabilities which are difficult to exploit due to enforcement of policy

e.g. Microsoft Office Trust Access to VBA Project Model Object Enabled (https://www.tenable.com/plugins/nessus/123461)


Reason -> VBA can be disabled using GPO.


3. Vulnerabilities due to how a OS vendor handles their patching regime and discloses vulnerabilities

e.g. CentOS vulnerabilities on Tenable Core not being mitigated (https://community.tenable.com/s/article/CentOS-vulnerabilities-on-Tenable-Core-not-being-mitigated?language=en_US)


4. In almost all organizations patching on Windows servers is done via various patching tools (not via automatic updates)

e.g. MS KB3119884: Improperly Issued Digital Certificates Could Allow Spoofing (https://www.tenable.com/plugins/nessus/87313)

The plugin was flagged on Windows 2012 R2 servers but was fixed in Windows server 2016 


5. Non availability of patches from OS vendors


e.g. Curl 7.84 <= 8.2.1 Header DoS (CVE-2023-38039) for Windows 10 and Windows 11 OS (https://learn.microsoft.com/en-us/answers/questions/1387774/curl-7-84-(-8-2-1-header-dos-(cve-2023-38039)-for)

(https://www.tenable.com/plugins/nessus/181409)


e.g. Curl 7.69 < 8.4.0 Heap Buffer Overflow (https://www.tenable.com/plugins/nessus/182875)


Reason -> Platform support teams will not update packages from open source projects as it might break things and they will not get vendor support.


I know this is not much but as the saying goes "a little help is worth much more for the wretched". Ultimately you need to use EPSS, CISA KEV, and various threat intel sources for prioritization to reduce actionable vulnerabilities.


Happy Learning !!

Vulnerability Management - Scanning approach to Load Balancers

As we all know how much important are high availability solutions these days. A load balancer (LB) is one such system which provides high availability apart from various other features such as security, scalability and performance. 

A LB is a device or software that sits between clients and servers in a network. It distributes incoming traffic across multiple servers to ensure that the load is balanced and network services remain available. LBs are by their very nature intended to hide what is behind them. 

But scanning through a LB can create unwanted results. As it directs network traffic intelligently among multiple servers, when you scan THROUGH a LB using a VIP, you will get different results for the same VIP address for multiple scans. 

Following issues may arise while scanning through LB:

  • Scanning LBs will show any vulnerabilities of the LBs themselves, which may lead you to thinking that the vulnerability is on the actual server when it is not.
  • Scanning through LBs, assuming there are multiple servers behind those LBs, may give you different results each time you scan the IP. For example, the first scan you hit Server1, then second scan you hit Server2. If those servers are not completely the same the results can show variations.
  • Suppose you are scanning a /24 subnet with 10 assets or so, due to high intensity of the scan, LBs may go into hardware protection mode and just send a reply for every single query that a scanner makes to it. This will result in 255 assets showing alive. 

Hence, you should never scan THROUGH a LB. Either deploy agents, or place a scanner on the inside network of the LB. To scan a LB itself you would need to use its management IP address. 

When scanning using a Virtual IP Address (VIP), currently from scanning solution's perspective, there isn't a way to tell whether an IP address is a VIP or not. You would need to write a script to pull the configs from the LBs and pull the VIPs. 

Please refer the below URLs for more details:

What is a LB? (https://aws.amazon.com/what-is/load-balancing/#:~:text=Load%20balancers%20increase%20the%20fault,or%20upgrades%20without%20application%20downtime)

Scanning approach to LBs (https://community.tenable.com/s/question/0D5f200005YPgFsCAL/scanning-approach-to-load-balancers?language=en_US)

What is a Virtual IP Address (VIP)? (https://www.pubconcierge.com/blog/virtual-ip-what-is-it-and-how-it-works/) 


Happy Learning !!

Tuesday, October 3, 2023

Vulnerability Management - Vulnerability Dashboard using Power BI

Was playing with Power BI today. Created a simple dashboard using CISA KEV vulnerability data from https://nucleussec.com/cisa-kev/ (Nucleus Security)

What’s the difference between Power BI and Excel?
Will not comment rather I would say "What’s the difference between an alligator and a crocodile? You’ll see one later and one in a while." 😁

Happy Learning !!

CyberSecurity - Why do we need standard data formats ?

As we all know there are data formats for various standards related to storage, representation and exchange of information in CyberSecurity domain for e.g.

For

1. Vulnerability - CVE

2. Platform - CPE, SWID and PURL

3. Configuration - CCE

4. Vulnerability Scoring - CVSS

5. SBOM - CycloneDX and SPDX

6. Identity Information - SAML and JWT

7. Malware Information - MAEC and MISP

8. Threat Information - STIX and TAXII

9. Log File - CSV, JSON, KVP (Key Value Pair) and CEF (Common Event Format)


and the list goes on.


Standard data formats are necessary because of the following reasons:

1. Enables correlation, integration and automation

2. Exchanging information among security vendors; among security researchers

3. Allows for the faster development of countermeasures (signatures and security patches)

4. Reduces potential duplication of malware and vulnerability analysis efforts by researchers


Happy Learning !!

Vulnerability Management - Basics for beginners

Beginners in Vulnerability Management domain have doubts such as from where to begin or what to study. I have created a document and tried to answer such doubts. It is always good to learn basics and then move towards advanced concepts. I have tried to provide links to corresponding points in the document as much as I can. Cases where you don't find any link or the link present is expired, you can always google :).


Following are the points I want to highlight through this post:

  1. For beginners please don't try to search interview questions directly. First create a theoretical base and realize the concepts by performing practicals.
  2. Slow and steady wins the race, so, give 4-6 months of time. While going through the document you can observe, 40%-60% concepts are basics, hence you will not be wasting time by learning them. After some time if you don't find Vulnerability Management interesting, you can always navigate to other subdomains like incident response and penetration testing.
  3. You will get hands-on on enterprise solutions once you join an organization. You will face a different set of challenges there. Many on LinkedIn create posts to address such challenges but first clear your basics to understand such posts/articles.
  4. Once you have performed above steps, you can search interview questions and start appearing for interviews.
  5. I do not recommend directly going for global certifications as a lot of content is there on internet.


Finally, I find articles from Balint F. very interesting.

https://www.linkedin.com/in/balint-fazakas/recent-activity/articles/


Happy Learning !!


Monday, September 18, 2023

Vulnerability Management - Correlation using CPE

As we all know correlation is a very important aspect of vulnerability scanning. While performing a vulnerability scan, first assets are identified. Then a corresponding CPE is identified for each identified asset. Then CVEs are mapped to identified CPEs and thus vulnerabilities are correlated to identified assets.


CPE names are created on an as needed basis meaning CPEs are only generated when a CVE is released and the vulnerable target does not have an existing CPE. This implies the absence of a matched CPE name also indicates the absence of any issues.


The root of the problem is that to generate a useful CPE for a software component it needs to be predictably created and totally unique in order to match it against a central database which is then in-turn mapped to known vulnerabilities. The two fundamental limiting issues are:

  1. No central control over the naming of open-source components (i.e. not unique and predictable)
  2. The pace and manner in which components are created makes a central dictionary impractical


Use of CPEs for correlation has introduced false positives as well as false negatives. Following are the drawbacks of using CPE for correlation:

  1. There are CVEs which are not mapped to CPEs.
  2. There are assets which are not mapped to CPEs. 
  3. According to CPE naming specification, version 2.3 representing user-defined configurations of installed products is out of scope.
  4. CPE has no provisions to tell you whether a vulnerable extension is installed or not.


Please refer below URLs for more details:

https://owasp.org/www-project-web-security-testing-guide/latest/5-Reporting/02-Naming_Schemes

https://www.arxiv-vanity.com/papers/1705.05347/

https://www.veracode.com/blog/managing-appsec/using-cpes-open-source-vulnerabilities-think-again


Solution: Switching to more evolved naming schemes such as SWID and PURL.

https://owasp.org/assets/files/posts/A%20Proposal%20to%20Operationalize%20Component%20Identification%20for%20Vulnerability%20Management.pdf


Happy Learning !!

Sunday, August 20, 2023

Vulnerability Management - Interview Questions

Most of the questions are straightforward. You can google 90% of the questions. 

Happy Learning !!

Vulnerability Management - SCAP and DISA STIG

As free versions of commercial vulnerability management vendors do not provide compliance scanning options, we can use freely available tools such as SCC (DISA) and CAT Lite (CIS) from learning perspective.


I have created a document depicting the use of SCC from DISA. You can google basic concepts such as CIS, DISA, STIG, SRG, CIS Benchmarks, SCAP, OVAL, CVE, CPE, XCCDF, CCE and OCIL etc.


I find Wikipedia definition perfect, "SCAP comprises a number of open standards that are widely used to enumerate software flaws and configuration issues related to security. Applications which conduct security monitoring use the standards when measuring systems to find vulnerabilities, and offer methods to score those findings in order to evaluate the possible impact. The SCAP suite of specifications standardize the nomenclature and formats used by these automated vulnerability management, measurement, and policy compliance products.


A vendor of a computer system configuration scanner can get their product validated against SCAP, demonstrating that it will interoperate with other scanners and express the scan results in a standardized way." 


Point of this post was as free tools, resources and videos are available, let's make use of these and come out of the mindset that we can learn only when we will join some organization. I agree, there is no substitute to industry experience but nobody can stop you from learning. Let's create labs, read documentation, demonstrate PoCs, and share the gained knowledge with community. Thanks to all content creators on YouTube and Linkedin, I have learned a lot from you and I am still learning.


Happy Learning !!


Vulnerability Management - SSL vs TLS

 In one of the interviews, interviewer asked me "What is the difference between SSL and TLS ?"


I said TLS is successor of SSL. But he was not satisfied with my one line answer. Then he asked "Does that mean there is no difference between SSL and TLS ?"


So guys following are the high level differences between SSL and TLS:


  1. Hashing --> SSL uses MD5, SHA-1 while TLS uses SHA-256
  2. Key exchange algorithm --> SSL uses KEA while TLS uses DH, ECDH, DHE, ECDHE, PSK etc.
  3. Data encryption --> SSL uses DES, RC4 etc. while TLS uses AES etc.
  4. Integrity --> SSL uses MAC while TLS uses HMAC


The point of this post is, don't be like me, be like Bob.

Whenever Bob studies a concept, he always asks himself WHY ? (For e.g. in this case) "Why TLS is needed when SSL is already there ?"


So, being in cybersecurity domain, you are not always expected to know low level details of each and every protocol but atleast you should know high level details and be able to corelate your answer with vulnerabilities (For e.g. in this case, SSL3.0 is vulnerable to BEAST and POODLE attacks whereas TLS1.0 fixes them).


Happy Learning !!

Monday, August 7, 2023

Vulnerability Management - Secure privileged account use

As performing a vulnerability scan or audit with an account lacking sufficient privileges may result in incomplete result, scanning solutions must be provided with privileged authentication and access levels to access the end system.


Since accounts used are privileged ones, following are the strategies Tenable recommends to avoid any kind of misuse:


1. Implement compensating controls for privileged accounts to limit risk, such as:


a. Log monitoring for when the account is in use outside of standard change control hours, with alerts for activities outside of normal windows.

b. Perform frequent password rotation for privileged accounts more often than the “normal” internal standard.

c. Enable accounts only when the time window for scans is active; disable accounts at other times.

d. On non-Windows systems, do not allow remote root logins. Configure your scans to utilize escalation such as su, sudo, pbrun, .k5login, or dzdo.

e. Use key authentication instead of password authentication.


2. Use Nessus Agents where available.


3. If you do not grant an exception with compensating controls, perform a scan with an account having lower privileges than what Tenable recommends and observe any missing results. Modify the account privileges so that all expected results are shown. Changes to the audit file or plugins may impact results later.


Please refer below URLs for more details:

https://docs.tenable.com/nessus/compliance-checks-reference/Content/CredentialedScanningandPrivilegedAccountUse.htm


Happy Learning !!

Vulnerability Management - On a lighter note !!

Few nessus agents were appearing offline in Nessus Manager. I was working with a Windows engineer to troubleshoot the issue.


Normally, to resolve this issue, we try to unlink and re-link the Nessus Agent, from the Agent host.


As an administrator, from a command prompt, run the following commands:

Based on your operating system, use either C:\Program Files\Tenable\Nessus Agent or C:\ProgramData\Tenable\Nessus Agent.


> net stop "Tenable Nessus Agent"

> "C:\Program Files\Tenable\Nessus Agent\nessuscli" agent unlink (--force)

> "C:\Program Files\Tenable\Nessus Agent\nessuscli" agent link --key=<key> --host=<host> --port=<port>

> net start "Tenable Nessus Agent"


I shared the steps with the engineer and asked him to execute them. While he was running those commands, suddenly he asked me, if we are stopping the "Tenable Nessus Agent" service then what is the use of running subsequent commands ? I went blank for a couple of minutes.


Happy Learning !!

Vulnerability Management - Duplicate entries in vulnerability database

 Let's first understand what a reimage is ->


A reimage is the process of installing a new operating system on a machine. This process includes wiping, or clearing, the hard drive entirely, and installing a fresh operating system. When the reimage is complete, it is almost like getting a brand new machine!


Now, both Qualys and Tenable stamp a machine with a tracking UUID the first time they scan it. This way, if a machine changes IP addresses, or has multiple network interfaces, they can track the machine without creating duplicates.


But when you reimage a machine, Identification Attributes change, which in turn means same vulnerability will be repeated. How ? Suppose a developer is using a particular version of a library. This particular version is affected with a vulnerability. The developer after working for few days decides to move out of the organization. The machine is sent to reimage. Now, another developer gets this machine. When Tenable agent is installed, it creates a new UUID. If the new developer installs and uses the same library then a duplicate entry will be created.


As the machine was using the same mac address and hostname, for the particular instance (Hostname + Port + Vulnerability), there will be two entries (two UUIDs). Tenable considered the machine as two different machines. Hence solution to such issue is:


Save the whole key before you rebuild the machine, then restore the key before you re-scan it, or before you install the Qualys/Tenable agent if you use agents (Qualys stores its UUID in the Registry, in HKLM\Software\Qualys, Tenable stores its UUID in HKLM\Software\Tenable).


Please refer below URLs for more details:

https://dfarq.homeip.net/rebuild-machines-without-making-duplicates-in-qualys-or-tenable/#ixzz86yZsaJIb

https://community.tenable.com/s/article/How-Does-Tenable-io-Identify-an-Asset-as-Unique

https://hub.wpi.edu/article/183/prepare-a-computer-for-reimage


For duplication, there are other use cases also. This is just one of the use case.


Happy Learning !!

Vulnerability Management - Understanding vulnerability posture

Understanding the vulnerability posture of an organisation at a basic level helps you drive remediation efforts. So, I don't know what t...