Showing posts with label Security. Show all posts
Showing posts with label Security. Show all posts

Sunday, 25 August 2024

Understanding and Implementing BIMI TXT Records

Brand Indicators for Message Identification (BIMI) is an innovative standard that empowers brands to showcase their logo in email clients that are compatible with BIMI. This feature not only bolsters brand recognition but also fosters trust among email recipients. Here's a concise guide on what BIMI TXT records are and how to utilize them.

A BIMI TXT record is a string of text incorporated into your domain's DNS records. It contains the URL of your logo file, which should be a Scalable Vector Graphics (SVG) file.

To establish a BIMI record, you initially need an SVG logo file uploaded to your domain's web storage. Subsequently, you will need to create a TXT record with the following content:

v=BIMI1;l=[your SVG file URL]

This simple step allows your brand's logo to appear in supporting email clients, enhancing your brand's visibility and trustworthiness.

Friday, 8 March 2024

Mastering Threat Detection with Microsoft 365 Defender Advanced Hunting: Queries and Strategies for Proactive Cybersecurity

Microsoft 365 Defender Advanced Hunting is a powerful, query-based threat hunting tool that allows security professionals to proactively search for threats across their organization's digital environment. This capability is part of Microsoft Defender XDR and enables you to inspect events across devices, emails, applications, and identities within your network by leveraging up to 30 days of raw data. Advanced Hunting is designed to help you identify both known and potential threats through unconstrained searching, using the Kusto Query Language (KQL) for crafting queries.

The tool supports two modes: guided and advanced. If you're new to KQL or prefer a more structured approach, the guided mode offers a query builder to assist you. For those more experienced with KQL, the advanced mode allows for direct query crafting from scratch. It's also possible to use the queries developed during hunting to create custom detection rules, which can then automatically monitor for similar threat patterns and respond to them as needed.

Advanced hunting covers data from various sources within the Microsoft ecosystem, including Microsoft Defender for Endpoint, Office 365, Cloud Apps, and Identity, providing a comprehensive view of your organization's security posture. It's crucial to have the appropriate roles and permissions to access this feature, and data freshness is maintained rigorously with event data being available almost immediately and entity data updated every 15 minutes​​.

Several practical examples showcase the flexibility and power of Advanced Hunting:

Identify Devices with a Specific File:

This query checks if devices have files from a known malicious sender, useful for identifying devices affected by a malware distribution campaign.

EmailAttachmentInfo
| where SenderFromAddress =~ "MaliciousSender@example.com"
| where isnotempty(SHA256)
| join (
    DeviceFileEvents
    | project FileName, SHA256, DeviceName, DeviceId
) on SHA256

Monitor Specific PowerShell Activities:

This example targets PowerShell processes and searches for suspicious commands that could indicate exploitation attempts.

DeviceProcessEvents
| where FileName in~ ("powershell.exe", "powershell_ise.exe")
| where ProcessCommandLine has_any("WebClient", "DownloadFile", "DownloadData", "DownloadString", "WebRequest", "Shellcode", "http", "https")
| project Timestamp, DeviceName, InitiatingProcessFileName, InitiatngProcessCommandLine, FileName, ProcessCommandLine

Logon Events Post-Receiving a Malicious File:

This query investigates logon events occurring within a short timeframe after receiving a malicious file, helping to identify potential breaches.

EmailEvents
| where Timestamp > ago(7d)
| where ThreatTypes has "Malware"
| project EmailReceivedTime = Timestamp, Subject, SenderFromAddress, AccountName = tostring(split(RecipientEmailAddress, "@")[0])
| join (
    DeviceLogonEvents
    | where Timestamp > ago(7d)
    | project LogonTime = Timestamp, AccountName, DeviceName
) on AccountName
| where (LogonTime - EmailReceivedTime) between (0min .. 30min)

Activities from Specific Cloud Apps:

A query to monitor activities from cloud apps, like Microsoft SharePoint Online, involving specific users or IP addresses.

CloudAppEvents
| where Application == "Microsoft SharePoint Online"
| take 100

Investigate Cloud App File Uploads:

For tracking file uploads to SharePoint Online, this modified query adapts to the new CloudAppEvents table.

CloudAppEvents
| where ActionType == "FileUploaded" and Application == "Microsoft SharePoint Online"
| where ObjectType == "File" and ObjectName endswith ".xlsx"
| project Timestamp, ActionType, Application, ObjectName, AccountObjectId, AccountDisplayName, IPAddress, CountryCode

Investigate Defender Folder Access Control

This tracks processes that have been blocked

DeviceEvents
| where ActionType in ('ControlledFolderAccessViolationAudited','ControlledFolderAccessViolationBlocked')

Each of these queries utilizes the Kusto Query Language (KQL) to interrogate various datasets available through Microsoft 365 Defender, from endpoint activities to cloud application events. They demonstrate how flexible and powerful Advanced Hunting can be when identifying, investigating, and responding to potential security threats across an organization's Microsoft 365 environment​​​​​​​

Wednesday, 5 July 2023

Simplifying Passwords: Addressing the Confusion and Overload

In today's digital landscape, password security continues to be a crucial concern for individuals and organizations alike. With an alarming 50% of cyber attacks resulting from stolen credentials (according to the Verizon 2022 Data Breach Investigation Report), it's imperative to revisit our approach to passwords. While some companies have started updating their password requirements, many still rely on outdated practices such as complex combinations of letters, numbers, and special characters. Unfortunately, studies have shown that these requirements often lead to weaker passwords due to user behaviors like password reuse or minor variations. In this blog post, we'll explore a simpler and more effective approach to password security that encourages stronger passwords and reduces the burden on users.

The Problem with Complex Password Requirements

Traditionally, organizations have set stringent password requirements, hoping to enhance security. These requirements often include a mix of uppercase and lowercase letters, numbers, and special characters, as well as mandatory periodic password changes. While these practices may seem logical, they inadvertently create confusion and overload for users. Users tend to resort to insecure methods like writing down passwords or reusing variations of a single password across multiple accounts.

The Simplicity Approach

In recent years, security experts and researchers have advocated for a simpler and more user-friendly approach to password security. One such recommendation is to use a passphrase composed of three randomly chosen words. These words can be connected by a break (e.g., a hyphen) or left as is. The essential aspect is to create a password that is both simple and memorable for the user.

By using a passphrase, users are more likely to create unique and complex passwords. For example, instead of using a password like "P@$$w0rd2023," which is easily guessable and prone to brute-force attacks, one could create a stronger and more memorable passphrase like "correct-horse-battery." This approach not only encourages users to generate stronger passwords but also reduces the burden of remembering complex combinations of characters.

The Importance of Multi-Factor Authentication (MFA) 

While simplifying passwords is a step in the right direction, it's essential to supplement this approach with additional security measures. One highly recommended method is Multi-Factor Authentication (MFA), which adds an extra layer of protection to user accounts. MFA requires users to verify their identity through a second factor, such as a mobile phone or a physical security key, in addition to their password.

By enabling MFA, even if an attacker manages to obtain a user's password, they would still require physical possession of the second factor to gain unauthorized access. This additional layer of security greatly mitigates the risk of successful account breaches and unauthorized logins.

Wednesday, 29 March 2023

Browser Notification Scams: How to Remove Them from Microsoft Edge and Chrome


Have you ever encountered a browser notification that warns you of a virus or malware on your computer? If so, you may have fallen victim to a browser notification scam. These scams use social engineering tactics to trick you into clicking on a link or downloading a file that will infect your computer with malware.

Here are some tips on how to remove the notification setting for the site from Microsoft Edge and Chrome:

Microsoft Edge:

  1. Open Microsoft Edge and click on the three dots in the upper-right corner of the screen.
  2. Select "Settings" from the drop-down menu..
  3. Click on " Cookies and Site permissions" section.
  4. Click on "All sites" to see a list of sites that have custom permissions.
  5. Find the site that is sending the fake virus warning and click on the three dots next to it.
  6. Select "Remove" to remove the site from the list of allowed sites.

Chrome:

  1. Open Chrome and click on the three dots in the upper-right corner of the screen.
  2. Select "Settings" from the drop-down menu.
  3. Click on "Privacy and security" in the left-hand menu.
  4. Click on "Site settings" under the "Permissions" section.
  5. Click on "Notifications" to see a list of sites that are allowed to send notifications.
  6. Find the site that is sending the fake virus warning and click on the three dots next to it.
  7. Select "Remove" to remove the site from the list of allowed sites.

By removing the notification setting for the site, you will no longer receive fake virus warnings or other scam notifications from that site.

Remember to always be cautious when clicking on links or downloading files from unknown sources. If you suspect that your computer has been infected with malware, run a full system scan using your antivirus software. 

Thursday, 16 March 2023

2 Zero day fixed in March 2023 (CVE-2023-23397 & CVE-2023-23401)

Microsoft has released an important security update for Outlook and Windows SmartScreen as part of its March 2023 Patch Tuesday. The update fixes two critical vulnerabilities that are being actively exploited by cybercriminals.

The first vulnerability (CVE-2023-23397) affects all supported versions of Microsoft Outlook for Windows. It allows attackers to use specially crafted email messages or calendar invitations to steal your login credentials without even knowing your password. The attack works by exploiting a flaw in how Outlook handles HTML content embedded in emails or invitations. By sending you a malicious email or invitation, an attacker can trick Outlook into sending your credentials to a remote server controlled by them.

The second vulnerability (CVE-2023-23401) affects Windows SmartScreen, a feature that helps protect you from malicious websites and downloads. It allows attackers to bypass SmartScreen's security checks and execute arbitrary code on your computer. The attack works by exploiting a flaw in how SmartScreen handles certain file types that can be downloaded from the internet. By convincing you to download and open a malicious file, an attacker can run any code they want on your computer.

Both vulnerabilities are rated as critical by Microsoft and have been exploited in the wild by unknown threat actors. Therefore, it is highly recommended that you update your Outlook and Windows SmartScreen as soon as possible to protect yourself from these attacks.

You need to update your Outlook and Windows SmartScreen as soon as possible but in the short term Consider blocking outbound network traffic to TCP port 445 if you can. If you don’t need to authenticate to external servers (or you can create a definitive allow list of servers that you need to access, and block all others), then preventing server connection traffic is a sensible precaution anyway. (Microsoft lists this as an official mitigation.)

Remember to always keep your software up to date and avoid opening suspicious emails or files from unknown sources. Stay safe online!

Tuesday, 28 February 2023

Windows UAC and Local admin rights


User Account Control (UAC) is a security feature in Windows that helps prevent unauthorized changes to your computer. It was introduced in Windows Vista and has been an important security mechanism in all versions of Windows since then. UAC works by prompting the user for permission before allowing any action that requires administrative privileges.

UAC is an important security mechanism in Windows that helps protect your computer from unauthorized changes and malware. Turning off UAC is not recommended and can make your computer vulnerable to attacks. It is always better to keep UAC enabled and take extra precautions to protect your system from potential threats

But when it comes to local admin rights even with UAC enabled you should still split these local rights to another account.  A users everyday account should have little to no extra permissions then want is needed for the everyday work they do.

But they are times when having these rights are a positive as it gives users flexibility and faster response to install software and updates without the need of IT support, this brings more user autonomy and lowers the involvement of IT support.

Given a user a local admin account just for admin tasks while also maintaining a normal account is the best of both words when it comes to user autonomy and security.

Wednesday, 1 June 2022

Find which Windows program is accessing a external device like a web cam

  1. You need the devices "Physical Object" name, you get this by doing to "Device Manager" and double clicking on the device and switching to the details tab.

    From there you can use the drop down box and select "Physical Object", right click on the value and select copy.

  2. You will need Process Explorer for this part.  you can get it from the following location:

    Process Explorer - Windows Sysinternals | Microsoft Docs

  3. Run Process Explorer as administrator and then go to Find and select "Find Handle or DLL"

  4. Paste in the "Physical Object" name from step 1 and press search.

    You will need to give it a few minutes as it can be slow.
Once its listed the process you can see if its being accessed by programs you where expecting of it something else is going on.

Tuesday, 18 May 2021

Interactive Logon: Machine inactivity limit not working right

This is a good setting to roll out across your network as it means that devices left unattended for long periods of time will lock them self's but there is a catch.

When you set this time out you must set the screen saver wait time too to be less or equal to the timeout.

If you don't it can default to 60 seconds and lock the desktop even before the machine inactivity limit is reached.  Does not matter if screen saver is enabled or not it still uses the screen saver wait setting.

You can not set the wait setting high then the inactivity limit.

Tuesday, 9 March 2021

On-Perm Exchange security issues (March 2021) patch now

Overview

CVE-2021-26855
CVE-2021-26855 - Security Update Guide - Microsoft - Microsoft Exchange Server Remote Code Execution Vulnerability

CVE-2021-26857
CVE-2021-26857 - Security Update Guide - Microsoft - Microsoft Exchange Server Remote Code Execution Vulnerability

CVE-2021-26858
CVE-2021-26858 - Security Update Guide - Microsoft - Microsoft Exchange Server Remote Code Execution Vulnerability

CVE-2021-27065
CVE-2021-27065 - Security Update Guide - Microsoft - Microsoft Exchange Server Remote Code Execution Vulnerability

On the 2nd of Match Microsoft released information on an attack that was using the above CVE to take over Exchange servers on-perm.  Namely 2010, 2013, 2016, and 2019.

HAFNIUM targeting Exchange Servers with 0-day exploits - Microsoft Security

Following this news they also released updates and patch's for the affected systems

Released: March 2021 Exchange Server Security Updates - Microsoft Tech Community

Patchs

Older and unsupported upgrade paths
March 2021 Exchange Server Security Updates for older Cumulative Updates of Exchange Server - Microsoft Tech Community

Exchange 2010 (SP3)
Description of the security update for Microsoft Exchange Server 2010 Service Pack 3: March 2, 2021 (KB5000978)

Exchange 2013 (CU 23)
Description of the security update for Microsoft Exchange Server 2019, 2016, and 2013: March 2, 2021 (KB5000871)

Exchange 2016 (CU19 or CU18)
Description of the security update for Microsoft Exchange Server 2019, 2016, and 2013: March 2, 2021 (KB5000871)

Exchange 2019 (CU8 or CU7)
Description of the security update for Microsoft Exchange Server 2019, 2016, and 2013: March 2, 2021 (KB5000871)

Mitigation

The goal would be to patch as soon as possible but you can mitigate the risks with the following

Microsoft Exchange Server Vulnerabilities Mitigations – updated March 6, 2021 – Microsoft Security Response Center

With an automatic script located here too to make it quicker
CSS-Exchange/Security at main · microsoft/CSS-Exchange · GitHub

Download

CSS-Exchange/ExchangeMitigations.ps1 at main · microsoft/CSS-Exchange · GitHub

Run with the following

ExchangeMitigations.ps1 -WebSiteNames “Default Web Site” -ApplyAllMitigations -Verbose

Test

You can test to see if your system has been compromised with the Test-ProxyLogon script from
CSS-Exchange/Security at main · microsoft/CSS-Exchange · GitHub

Download

Run with the following

Get-ExchangeServer | .\Test-ProxyLogon.ps1 -OutPath $home\desktop\logs

Thursday, 18 February 2021

Windows Administrative shares

 By default Windows automatically makes the following shares

ADMIN$
IPC$
NETLOGON
SYSVOL
PRINT$
FAX$
DRIVELETTER$

These are administrative shares and are they to help with the remote admin / function of a server.  Normally only admins can access these.  But sometimes if you are trying to meet a security compliancy you will need to disable these on workstations and some server.

You can do this by changing the following reg key 

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\AutoShareServer

To 0 (Zero) and if its not there you will need to make a REG_DWORD and set it to 0 (Zero)

Remove administrative shares - Windows Server | Microsoft Docs

Ideally I would leave them be; as they do come in handy and the client / server should have firewalls configured to limit risk.

Friday, 9 October 2020

Windows Account Lockout policy

 When setting up the Windows networks with account lockouts for failed logins I would recommend a 10/10/60 as a baseline

10 Failures over 10 minute with a 60 minute lockout.  the lockout can be longer but I found going lower on the other values can lead to accounts getting locked for Kerberos ticket failures when people leave them self's logged in.

https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/account-lockout-threshold

Friday, 17 July 2020

Basic Security for Microsoft 365

There is a lot to think about when setting up Microsoft 365 and how it fits in to you business but security should be a priority when using a 24 hour / 7 day a week access applications.








Step 1 Check your score

After setting up all the accounts and moving all your data to Microsoft, Check your Security score,  this is a good starting point and can help guide you on if you are moving in the right direction.


Step 2 Security Defaults

Enable Security Defaults,  This enforces the following for every user

  • Requiring all users to register for Azure Multi-Factor Authentication.
  • Requiring administrators to perform multi-factor authentication.
  • Blocking legacy authentication protocols.
  • Requiring users to perform multi-factor authentication when necessary.
  • Protecting privileged activities like access to the Azure portal.

Step 3 Application Consent

Look at Application consent settings for you Organization,  this is found in the Microsoft 365 Admin portal under Settings > Org settings > Services Tab > User consent to apps or Settings > Integrated apps.

This is a case by case step, depending on the size of you business and will need to be looked at by your Administrators.  but this setting allows users to connect applications / websites to there account.  there are a lot of valid reasons for this But also a few not so valid reasons like giving an attacker access to your emails.

If you do choose to disable the users ability to do this it would be an idea to set up an administrative flow to allow users to request access from the sites IT / Administrator.

 
*Side note* on Admin Consent, it appears to have moved (17/07/2020) to the following location Azure Directory > Enterprise Applications > User settings

Step 4 External Sharing

Look at what you are allowing to be shared to external people from your users One drives and SharePoint sites.

SharePoint admin center > Policies > Sharing


This is the global setting and sets the limits for the sites them self's,  you can also control what is shared per SharePoint site but it can go no higher then the Global settings.

To change it per site you will need to go to SharePoint admin center > Sites > Active sites > Select the site you wish to change > Policies > External Sharing

Again this can go no high then what is set at the global level.

Step 5 Passwords

Enable Dynamically banned Passwords,  This will help with users that are setting to simpler or known password combinations


To do this go to Azure Active Directory > Security >  Password Protection

Step 6 Company Branding

Brand your login portal,  such a simple thing can help with security as it will help give basic fake login portal away.


You can access this by going too Azure Active Directory > Company branding

Step 7 Enable Audit Log

Not sure why but M365 does not have audit logs enabled by default, but this can be done by

  1. https://protection.office.com/
  2. Select Search
  3. Select Audit Log search
It can also be done via power shell too 

Security Roadmap after the basics

Once you have the basic set up and its worth looking at the Microsoft 365 Security Road Map which gives you the recommendations from Microsoft for securing you 365 experience in the long term.

While all this is great you can not forget about the users devices.

You should always
  1. Have a Anti Virus installed
  2. Encrypt everything
  3. Use a firewall (on Device and Network)

  


Wednesday, 15 July 2020

CVE-2020-1350 | Windows DNS Server Remote Code Execution Vulnerability (Short Temp Fix)

A DNS Security risk has been found in Windows DNS that could / will be weaponised as a worm.


Short Term Fix Until you install the patch
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DNS\Parameters 
  DWORD = TcpReceivePacketSize 
  Value = 0xFF00


The DNS service has to be restarted.

This workaround may break some DNS request, Microsoft says that standard DNS queries "should" be ok, but recommend diagnostic logging of the DNS server before applying to confirm.


The Default (also max) Value = 0xFFFF
The Recommended Value = 0xFF00 (255 bytes less than the max)

Once you have the security patch installed you can remove the "TcpReceivePacketSize" Registry key returning it all back to default.