Category Archives: sysadmin

How to link a CLSID and APPID to a program – Microsoft Community

Generally, Windows manages quite well and this error is nothing too much to concern oneself with, however, for those running a Server or Network Service (for example a printer) this error if left unresolved can become troublesome and disruptive to day to day operations.

Within the error message Microsoft informs the user they can manually adjust some settings to resolve issue and this would be fine but for a few issues that your average punter would not know how to get around.

Thus I thought I’d take the opportunity to explore a method that generally resolves the error once and for all and has some very simple steps anyone can follow if they feel they need to repair the issue manually.

Step 1 — Locate the log and view the error message

  • The Windows Event Viewer is a GUI that allows us to view all events recorded by the Windows operating system. This GUI can be accessed by:
    • Right-clicking on Start
    • Left-clicking on Event Viewer

      Image

 

  • As you can see the Event Viewer window is separated into three panes. To access the System logs which record the event we are addressing here do the following:
    • In the left pane click on Windows Logs to expand view then select System
    • This will open the System logs inside the middle pane. If you’ve not done this before, or in a while, it will take a moment for the logs to populate the middle pane – this is normal.
    • Once the middle pane is populated you will see a list of events starting with the most recent ones at the top.

      You can scroll through this to locate Event ID 10016, or to speed things up you can specifically filter what is displayed in middle pane by doing the following:

      In the right pane click on Filter Current Log

      A window pops up with the center field filled in with <All Event IDs>. Simply click inside this field then type 10016 then click OK

      The result: Your middle pane now only displays a list of Event ID 10016 DistributedCOM errors with the most recent at the top of list.

      Sample Image of views just discussed

      Image

 

  • Judging by my long list my computer is near death. You’re all invited to the Service – please bring donations not flowers Image

    All right enough with the jokes – this long list really is nothing to panic about at all – its pretty normal in reality and most events are the same just at different times and dates. As I said earlier Windows generally sorts these out itself too, so the log itself is simply a time stamp of an event that took place that may now be stable. However, we can get to the root of the cause and help prevent it repeating by reading the actual log.

 

  • To read a log you simply double-left-click on the event who’s log you wish to view, in the middle pane. This opens a new window like so:

    Image

    This window by default opens displaying the General tab

    As you can see there is a lot of information some of which you’d need to scroll to read, however if you click the Copy button then open a text editor like Notepad you can paste all the details there for an easier read.

    Image

    The information above high lighted in the red box is what we want. The things to note here are the following:

    1. Source: The source of error was Microsoft Windows DistributedCOM

    2. User: The System was attempting to use the DistributedCOM when error occurred.

    3. Description: This tells you about the error and gives you some clues.

    The application-specific permission settings do not grant Local Activation permission for the COM Server application with
    CLSID {8D8F4F83-3594-4F07-8369-FC3C3CAE4919}
    and APPID {F72671A9-012C-4725-9D2F-2A4D32D65169}
    to the user NT AUTHORITY\SYSTEM SID (S-1-5-18) from address LocalHost (Using LRPC) running in the application container Unavailable SID (Unavailable). This security permission can be modified using the Component Services administrative tool.

 

  • From the above information we’ve establish the Windows System attempted to perform an action involving the Microsoft Windows DistributedCOM server, however permission settings were not granted from Local Activation. We are told the Security Identified (SID) is the user NT Authority\System SID (S-1-5-18) which essentially has the highest privileges allowed for your computer.

    We are given a Class ID (CLSID) and also an Application ID (APPID) with the alphanumeric key name which is recorded in your Windows Registry. With those two keys we can work out which application the System was making use of when the error occurred.

    Finally, Microsoft informs us we are able to modify the settings which ought to prevent this issue taking place again. More on that later as you’ll soon discover its not quite as simple as the statement makes out.

Step 2 — Working out what Microsoft DistributedCOM file we need to modify

  • As we have discovered the CLSID and APPID, and we know their information is stored in the Windows Registry we can very easily get the information we need from the Default value for each of these keys.

    Something many may not know though is where precisely in the Registry to look for these keys, and given how important it is not to mess with things you don’t know in case you create a bigger problem, I’ll explain where the keys will be and then how to view the information we need without the need to open the Registry Editor (regedit.exe).

 

  • The CLSID {8D8F4F83-3594-4F07-8369-FC3C3CAE4919} key will be located here:

    HKEY_CLASSES_ROOT\CLSID\{8D8F4F83-3594-4F07-8369-FC3C3CAE4919}

 

  • The APPID {F72671A9-012C-4725-9D2F-2A4D32D65169} we are interested in will be located here:

    HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AppID\{F72671A9-012C-4725-9D2F-2A4D32D65169}

    Both of these keys are located elsewhere in the Windows Registry, however these two locations can provide sufficient information for us to work out which Microsoft DistributedCOM file we need to modify.

    The information we need is contained in both of these keys Default value although occasionally one of the keys may not contain this information as we are about to discover in this example. That is not unusual, however it would be very peculiar to discover each key Defaulted to a completely different DistributedCOM file.

    To get the information we want without opening the Registry Editor, we will make use of an elevated command prompt console.

 

  • Right-click on Start
  • Left-click on Command Prompt (Admin)
  • When the User Account Control pops up click Yes
  • You will now see the Administrator: Command Prompt console.

    In this console type or copy & paste the following command:

    Code:
    reg query "HKEY_CLASSES_ROOT\CLSID\{8D8F4F83-3594-4F07-8369-FC3C3CAE4919}" /ve

    Press Enter key to execute

    Next type or copy & paste the following command:

    Code:
    reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AppID\{F72671A9-012C-4725-9D2F-2A4D32D65169}" /ve

    Press Enter key to execute

    Sample Image of what you’ll see

    Image

    You can see the CLSID key’s Default value contains a Data value of CDP Activity Store

    The APPID key’s Default value has no Data value set

    We now know that the Microsoft DistributedCOM we need to modify is the CDP Activity Store component, and that according to Microsoft’s error message we are able to modify.

    I’ll explain shortly how to get to this, but to illustrate the suggestion from Microsoft is not quite as simple as that, let’s take a look at the location I’ll be needing to modify.

    Sample Image

    Image

    The area inside the red frame is what we need to modify and according to Microsoft we can. Do you notice the problem?

    The fields are grayed out meaning you cannot modify this at all.

    The reason for this is because this is a component owned by the System.

    The NT AUTHORITY\SYSTEM has the highest privileges on the Local Service Account and normally us mere Administrators, or Local Account users have limited permissions to access things and make changes.

    Yet Microsoft told us we can modify, and they were not kidding. To do this we first need to take ownership of both the CLSID and APPID keys in the Windows Registry that we just checked their Default Value Data value.

Step 3 — Taking ownership of the CLSID and APPID keys

  • Taking ownership of these registry keys can be done several ways. For those comfortable working with the Registry Editor application, this perhaps is a relatively simple way to achieve the goal.

    For those less familiar with the Registry Editor, a safer way to do this is to make use of a Microsoft Tool especially developed for situations like this called SetACL.exe

    Now it’s important to realize this tool does not come with your Windows installation per se, but it can be freely downloaded from the following location: https://helgeklein.com/downloads/SetACL/current/SetACL (executable version).zip

    As you can see by the URL the download comes as a compressed ZIP folder. Once downloaded, extract the folder by right-clicking and selecting Extract All. This will pop a window up as in sample image below.

    Sample Image

    Image 

    This will create a non-compressed folder of the same name. When you open this folder, you’ll see another folder of the same name.

    Open that folder and you will see two folders, 32 bit and 64 bit

    Simply open the folder that matches your System Type (i.e. whether you have a 64 bit OS or a 32 bit OS, then copy the SetACL file inside the folder and paste it into your C:\Windows\System32 folder.

    By doing this you can then use this tool anywhere within an elevated Command Prompt or with an elevated PowerShell console.

    The tool itself comes with many useful commands, but for the purposes of this article we’ll be using just two commands on each of the Registry keys identified in our Event ID 10016 Error Description.

    So, returning to the Administrator: Command Prompt window type or copy & paste the following:

    Code:
    SetACL.exe -on "HKEY_CLASSES_ROOT\CLSID\{8D8F4F83-3594-4F07-8369-FC3C3CAE4919}" -ot reg -actn setowner -ownr "n:Administrators"
    

    Press Enter key to Execute

    Code:
    SetACL.exe -on "HKEY_CLASSES_ROOT\CLSID\{8D8F4F83-3594-4F07-8369-FC3C3CAE4919}" -ot reg -actn ace -ace "n:Administrators;p:full"

    Press Enter key to execute

    Code:
    SetACL.exe -on "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AppID\{F72671A9-012C-4725-9D2F-2A4D32D65169}" -ot reg -actn setowner -ownr "n:Administrators"

    Press Enter key to execute

    Code:
    SetACL.exe -on "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AppID\{F72671A9-012C-4725-9D2F-2A4D32D65169}" -ot reg -actn ace -ace "n:Administrators;p:full"

    Press Enter key to execute

    Note: The Registry key and its path,
    for example: “HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AppID\{F72671A9-012C-4725-9D2F-2A4D32D65169}”
    in the above commands should be replaced with the Registry key and path relevant to your error which you are wanting to take ownership of.

    Don’t forget to leave the speech marks in too!

    Sample Image

    Image

    You can see in above image all commands completed successfully

    Note: If you’d prefer to manually take ownership via the Registry Editor, but are not sure how, just ask in the Discussion section of this article and I’ll post instructions on how to do this.

Step 4 — Go modify the DistributedCOM component

  • If you recall earlier, the Description in our Event ID 10016 log told us we can modify the Security Permissions using the Component Services Administrative Tool.

    I posted an image of that tool opened earlier with the section we needed to use to modify things all grayed out; hence the need to take ownership of those two registry keys first.

    Now we can open this tool and make the necessary modifications.

 

  • To open the Component Services Administrative Tool by:
    • Right-clicking on Start
    • Left-clicking on Control Panel
    • Selecting to View by Large icons
    • Left-clicking on Administrative Tools
    • Left-clicking on Component Services

      This opens the following window

      Image

 

  • As you can see this is divided into three panes. Now remember we are trying to make a modification to a DistributedCOM or DCOM for short, so this is what we need to open. To do that:
    • In left pane you want to expand the Component Services until you see a list of subfolders, once of which is named DCOM Config
    • In the left pane simply left-click on DCOM Config folder
    • The middle pane will now populate with a long set of Component Services. To make it a little easier to view in the top toolbar click on View > Detail

      TIP: Now I don’t know about you but that was a lot of clicking to get to here. Here’s a tip for the future to speed things up a little:

      1. Right-click on Start and select Run
      2. In the run dialog type dcomcnfg then click OK
      3. Now just expand and click DCOM Config as before then View > Detail

      Which ever way you choose to open this the end result is:

      Image

 

  • By selecting View > Detail we can now see a list of components and their Application ID (AppID). This is useful as if you recall our Event log gave is the AppID {F72671A9-012C-4725-9D2F-2A4D32D65169} so we know this is what we want to find here.

    We also discovered via the Class ID that the CDP Activity Store was something to look out for.

    One of the common ones seen in errors like this is the Immersive Shell and if you scrolled down the list you’d soon see it there along with its AppID. However, as you’ll discover if we scroll this list looking for CDP Activity Store it is not present at all, although there is a CDP Reference Host listed.

    Could that be what we need? No, take a look at its AppID. It does not match the one we are seeking. So now what?

    Microsoft for some bizarre reason chose not to include the basic function Find with this tool so we cannot go Ctrl F and hope to search for our AppID, however, if you look at that list carefully you will see it is listed in Alphanumeric order which thank goodness will save a lot of time.

    As the component CDP ACtivity Store was not present we must now scroll to bottom of components and instead seek the AppID Registry key instead.

    And look there it is!

    Image

 

  • To modify the Security Permissions simply right-click and choose Properties

    This will open the Properties window for our AppID Registry key.

    In this window select the Security tab

    Sample Image

    Image

    As you can see its no longer grayed out. Thus we can now make the necessary modifications.

 

  • In the top panel ‘Launch and Activation Permissions’ simply:
    • Check the radio button next to Customize, then
    • Click this panels Edit button

      This will open the following:

      Image 

      If you take a look in the Group or user names field you will either see the member your error message mentioned or not.

      If you could see the member then left-click it and in the lower field you would check the Allow box next to Local Activation as that is what our error mentioned :

      The application-specific permission settings do not grant Local Activation permission …

      This same error message though also mentioned something else important:

      … to the user NT AUTHORITY\SYSTEM SID (S-1-5-18) …

      In my example this user is not listed at all and that is why the error is being triggered. So we need to add this user and grant it permissions.

 

  • To add the user click the Add button you can see in image above. This will open a new window like so:

    Image

    We need to type in the empty field our missing User which in this example is the user SYSTEM. After entering the user name we then click the Check Names button. This will underscore the user name. Now click OK

    Sample Image

    Image

 

  • Having done the above we are back to the previous window. In the top pane click on SYSTEM which you just added.
  • Now in the bottom pane place a check in the Allow box next to Local Activation

    Sample Image

    Image 

    When you’ve checked the box click OK which will close this window and return you to the Properties window.

    In the Properties window also click OK

    Now close the Component Services tool


Step 5 — Final Tidy Up

At this point if you wish you could restore permissions for the two registry keys back to their original status. In my case the CLASS ID was owned by the SYSTEM, and the AppID was owned by TrustedInstaller, so to change it back I’d enter the following commands in an elevated command prompt:

Code:
SetACL.exe -on "HKEY_CLASSES_ROOT\CLSID\{8D8F4F83-3594-4F07-8369-FC3C3CAE4919}" -ot reg -actn setowner -ownr "n:SYSTEM"
Code:
SetACL.exe -on "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AppID\{F72671A9-012C-4725-9D2F-2A4D32D65169}" -ot reg -actn setowner -ownr "n:NT SERVICE\TrustedInstaller"

After each command you press Enter key to execute

Sample Image

Image

Note: At this point if you are not intending on restarting computer, then you will need to restart the Service for these changes to take effect.

Simply press Windows key and S then type Services and press Enter key.

Scroll down and right-click the Service and select Restart

That’s it – all done!

Source: How to link a CLSID and APPID to a program – Microsoft Community

Suricata inline versus legacy IPS mode | Netgate Forum

 I will just add a little more detail to the explanation to highlight the differences between inline IPS mode and the legacy IDS/IPS hybrid mode.

In legacy mode, the pcap library is used to make a copy (clone if you will) of every packet as it comes in from the NIC on its way to the pf firewall engine.  The original packet continues on to the pf firewall engine and is either passed or blocked depending on the current rules in the firewall.  Meanwhile, the cloned packet is sent over to Suricata (or Snort if using that package) for inspection against the IDS/IPS rules.  Should the cloned packet (or packets, since sometimes Suricata needs to see a group of packets before a decision can be made) be judged as “bad” by the Suricata engine, then a system call is made to insert the offending IP address from the packet into a special table in the pf firewall engine called snort2c.  IP addresses in this special table are blocked.  However, note that this decision making and subsequent insertion of the IP address into the snort2c table has happened well after the original packet (or packets if a group of packets was required to make a decision) has traversed the pf engine.  So that original packet will have already gotten past the IPS mechanism.  Packets that subsequently come through from the same IP address will now get blocked, though.  Hence I use the term “hybrid IDS/IPS” because a true IPS would never leak a packet.  A true IPS would hold up the original packet while it was being inspected, and then either pass it or drop it.  Legacy mode does not hold up the original packet.  It is allowed to continue on to the firewall while the cloned copy is used to make the decision for blocking future packets from the IP address.

With the new inline IPS mode, Suricata activates and uses the relatively new Netmap mechanism that was added to FreeBSD.  Netmap is a way for applications to create a highspeed pipe between the NIC driver layer and the rest of the system.  So packets coming and going on a given network interface must pass through the Netmap pipe.  Suricata inline-mode controls the “door” in this pipe.  Each packet stream coming from the NIC (or going to the NIC) is inspected by Suricata and a “pass” or “drop” decision is made.  If a packet is dropped, it is never forwarded on to the pfSense kernel and thus never makes it to the pf engine.  Since every single packet must traverse this Netmap pipe, there is no leakage.  No copies of the packets are made for examination.  Everything occurs with the original packet.

The downside of the new inline mode is that for now only some NIC drivers support working with the Netmap API mechanism.  So while legacy mode is pretty much NIC card and driver agnostic (meaning it works with any hardware), the inline mode is highly dependent on your firewall having a NIC driver that supports Netmap.  Another problem that currently exists is the Netmap pipe seems to break traffic shaping on the interface.  I suspect this is a fixable problem, but no solution is in place yet.

So consider these two issues before choosing to use the inline IPS mode:  (1) do I have a supported NIC and driver; and (2) can I do without traffic shaping on interfaces where I run Suricata?

Source: Suricata inline versus legacy IPS mode | Netgate Forum

Note:

Important Information About IPS Inline Mode Blocking

When using Inline IPS Mode blocking, you must manually change the rule action from ALERT to DROP for every rule which you wish to block traffic when triggered.

The default action for rules is ALERT. This will produce alerts but will not block traffic when using Inline IPS Mode for blocking.

Use the “dropsid.conf” feature on the SID MGMT tab to select rules whose action should be changed from ALERT to DROP. If you run the Snort rules and have an IPS policy selected on the CATEGORIES tab, then rules defined as DROP by the selected IPS policy will have their action automatically changed to DROP when the “IPS Policy Mode” selector is configured for “Policy”.

Recover Raspberry Pi Password

Install the memory card into a computer.

Edit cmdline.txt. Append "init=/bin/sh" to the parameter string.

Save the file, then reinsert the mem card into the Pi and boot it.

Remount the file system as read/write: mount -o remount, rw /

Change the password: passwd pi

Bring the the Pi up to normal run level: sync; exec /sbin/init

Test password.

Shut down, remove the mem card. Use the other computer to edit cmdline.txt to remove the init cmd.

What is Meet Now in Windows 10 and how to remove it – gHacks Tech News

Removing Meet Now via the Group Policy

System administrators may disable (or enable) the Meet Now icon on the Windows 10 taskbar using the Group Policy. The Group Policy is only available in professional editions of Windows 10, and not in Windows 10 Home.

Here is how that is done:

  1. You need elevated rights to use the Group Policy.
  2. Use Windows-R to open the runbox.
  3. Type gpedit.msc and select OK.
  4. Go to User Configuration > Administrative Templates > Start Menu and Taskbar
  5. Double-click on “Remove the Meet Now icon”.
  6. Set the feature to “Enabled” to hide the icon on the taskbar of the Windows 10 operating system.
  7. Restart the PC.

Removing Meet Now using the Registry

You may also remove Meet Now on Windows 10 using the Registry.

  1. Use Windows-R to open the runbox.
  2. Type regedit.exe and select OK.
  3. For individual users, go to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
    1. Right-click on Explorer and select New > Dword (32-bit) Value.
    2. Name it HideSCAMeetNow.
    3. Set its value to 1.
  4. For all users, go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer
    1. Right-click on Explorer and select New > Dword (32-bit) Value.
    2. Name it HideSCAMeetNow.
    3. Set its value to 1.
  5. Restart the PC.

Source: What is Meet Now in Windows 10 and how to remove it – gHacks Tech News

How to Rename User Profile Folder in Windows 10

Synopsis: Create a local administrator account, rename the user account, rename the user profile folder, and map the renamed folder to the user account in the registry.

Create a system restore point.

Create a new local admin account.

Log out and log in as the new admin account.

Run lusrmgr & rename the user account.

Rename the profile folder–> \Users\oldname to newname.

Map the renamed folder in the registry.

Regedit: Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList

There will be sub-keys with long names. Search for the ProfileImagePath value to find the one the corresponds with the old profile folder name. Edit that value to reflect the new folder name. You can find the SID using wmic useraccount get name,SID

Log out, and login as the renamed user. In some cases a reboot may be necessary. Test that everything is working properly.

Source: How to Rename User Profile Folder in Windows 10

openvpn – How to force all traffic through VPN?

How to force all traffic through OpenVPN

 

Add the following directive to the server configuration file:

push “redirect-gateway def1”

If your VPN setup is over a wireless network, where all clients and the server are on the same wireless subnet, add the local flag:

push “redirect-gateway local def1”

Pushing the redirect-gateway option to clients will cause all IP network traffic originating on client machines to pass through the OpenVPN server. The server will need to be configured to deal with this traffic somehow, such as by NATing it to the internet, or routing it through the server site’s HTTP proxy.

If you want to configure this on the client side, put

redirect-gateway def1

in your client.ovpn file.

Guide for Allowing Users to Install Programs without Admin Password in Windows 10

How to Allow Users to Install Software without Admin Rights in Windows 10

An admin account on a Windows PC enjoys more privileges than any other account types. This account can install apps and make modifications to the system easily without too many steps. However, sometimes you may want to enable allow users to install software without admin rights in Windows 10. It’s totally cool and possible for you. The following guide will demonstrate multiple ways to do that.

Method 1: Change Your Standard Account to Admin Account to Install Programs

One of the ways to be able to install program without admin rights in Windows 10 is to convert your standard user account to an administrator account on your PC. You can ask your administrator to do this for you by following the following steps:

Open the Start Menu, search for Command Prompt, right-click on it and select Run as administrator.

run cmd as admin

When the command prompt window opens, type in the following command and hit enter. Make sure to replace myname with the username of the account you’re converting to an admin account.

net localgroup Administrators <myname> /add

command prompt

The account should instantly be converted to an admin account and you should then be able to install programs on your Windows 10 machine.

Source: Guide for Allowing Users to Install Programs without Admin Password in Windows 10

List Hard Drives using Command Prompt and PowerShell

List Hard Drives using Command Prompt & PowerShell in Windows 10

Source: List Hard Drives using Command Prompt and PowerShell

Some stuff about things