Thursday, May 27, 2021

Windows 10: Get rid of Microsoft Teams Auto Startup (from a script)

Situation:

You have installed Microsoft Office on your computer.  Whenever you logon to the computer, you see a Microsoft Teams splash that asks you to login, which you have to close every time if you choose not to login.

Possible remedy:

You can go into task manager, click the "Startup" tab, click Microsoft Teams, right-click and disable.  However, this doesn't work permanently as it will come back if you update or reinstall Office.  Also, other users who login to the computer will still get the Microsoft Teams thingy loading automatically at startup.

"Real" fix:

Add this to a user logon script, such as your domain logon script*:

REM Delete Microsoft Teams Auto startup reg key 
reg delete HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v "com.squirrel.Teams.Teams" /f

That second bit is all supposed to be on one line.

*if you don't have a domain logon script, you can just put this in a .bat file and stick into 
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp

Now every time someone logs in, the Teams startup will be automatically removed, so that will be the last time they see it.

Monday, March 15, 2021

Scammers can bypass your Google Workspace Safety Checks

A major source of headache for system administrators these days, and has been for some time, is the uptick in phishing messages that fake the sender address so it appears to be from someone within your organization. If you are like me, this is one of the things that keeps you awake at night. Organizations using Google Workspace can take advantage of a safety feature that purports to prevent this from reaching users. You can access its settings from within the admin console under Apps->Gmail->Settings->Safety.




Unfortunately, there are still a ton of legit e-mail servers that don't authenticate, so that safety feature is not going to be very helpful.  However you can enable the checks that detect someone trying to send a message with an employee's e-mail address, your domain (or a variation on it) or even an employee's name.  These are very common attacks, and such checks regularly prevent nefarious messages from reaching our end users.  

The problem is, due to a poorly-planned filter architecture on Google's part, this whole mechanism can be bypassed, allowing a spoofed message to end up in a spam queue that is managed by an end-user.  

Google Workspace Filter Architecture places spam filters and queues ahead of "safety features" such as spoof checks.

As you can see in the diagram above, the spoof checks are effectively circumvented when they are sent to a group.  A moderator will see the message in the group's spam queue, AKA "Pending messages".  If they approve the message, it will then go through the safety checks, but by then the group manager has already seen it, and may act on it.

Thursday, February 04, 2021

Cordova-plugin-ble-central without BACKGROUND_LOCATION permission

Happy New Year.

I have been developing a Cordova app on Android that uses Bluetooth Low Energy (BLE).  To accomplish this, I have been using Don Coleman's cordova-plugin-ble-central.  This is a neat plugin with a pretty simple API that lets you do serial communications over BLE. It is compatible with both Android AND iOS.  It's installable with NPM, but I recommend you get it directly from his Github.  The one on NPM seems to be broken on newer Android devices.  The issue  is that Google now requires ACCESS_FINE_LOCATION permission if you are using bluetooth, and the one on NPM is older and hasn't been updated to request this permission.  But that's not really what this post is about.

My app is essentially a remote control for a light.   All I am trying to do is communicate over bluetooth when the app is in the foreground.  However, the Don Coleman plugin demands the BACKGROUND_LOCATION permission (presumably this would be required if I was trying to continue to send/receive data notifications while the app is in the background).  The problem is that this permission comes with some fairly hefty declaration requirements if you are trying to get your app into the Play Store.  For example, you have to make a video demonstrating the feature in your app that makes use of this functionality.  As I stated earlier, I have no such feature so it will be impossible for me to get my app to pass review.  

The only solution I could see was to fork Don's plugin and remove the BACKGROUND_LOCATION permission.  So far it seems to work.  If you have a similar problem, perhaps you can benefit from this version of the plugin as well.  A couple of things:

  1. In case it doesn't go without saying, if your app is in the background, you will not be able to do Bluetooth communication using this version of the plugin.
  2. I have only made changes to the Android side. I don't know if the iOS side still somehow requests BACKGROUND_LOCATION permission.  If it does, I will ultimately need to address that as well since my app is going to be available for both platforms.

So here it is: High Tech Harmony's cordova-plugin-ble-central without BACKGROUND_LOCATION

To use it, go to your Cordova build folder of your project and do the following:

(only if you have Don's plugin already)
cordova plugin remove cordova-plugin-ble-central 

cordova plugin add https://github.com/HighTechHarmony/cordova-plugin-ble-central

cordova clean android

cordova build android