IncidentResponsev2

4.58 Remove Unauthorized Services (Local/Cloud - Background Processes, SaaS Apps, Shadow IT)

Task

Identify and remove unauthorized services and applications across local systems, cloud platforms (AWS, Azure, GCP), and SaaS environments to eliminate unapproved, risky, or malicious background processes and shadow IT.


Conditions

Given access to local systems, cloud tenant management consoles, SaaS application reports, and monitoring tools.


Standards


End State

All unauthorized services, apps, and cloud services are identified, removed or disabled, and documented.


Notes


Manual Steps

Step 1: Enumerate Local Background Services and Processes

Windows

Get-Service | Where-Object {$_.Status -eq "Running"} | Select-Object Name, DisplayName, Status

Look for:

Linux

systemctl list-units --type=service --state=running
ps aux

Look for:

macOS

launchctl list
ps aux

Operator Note: Cross-reference running services with baseline and approved software lists.


Step 2: Enumerate Installed Applications (Local)

Windows

Get-WmiObject -Class Win32_Product | Select-Object Name

Linux

dpkg -l

macOS

system_profiler SPApplicationsDataType

Look for:

Operator Note: Alert on remote access tools (AnyDesk, TeamViewer, etc.) if not approved.


Step 3: Enumerate SaaS Applications (Shadow IT)

Microsoft 365 / Azure AD

Get-AzureADServicePrincipal -All $true | Select DisplayName, AppId

Look for:

Google Workspace

Look for:

Shadow IT Discovery (Optional Tools)

Tool Platform Usage
Microsoft Cloud App Security (Defender for Cloud Apps) Azure SaaS discovery
Netskope Cloud SaaS usage monitoring
Zscaler Cloud Shadow IT discovery

Operator Note: SaaS apps added without IT knowledge pose major risk → escalate immediately.


Step 4: Enumerate Cloud Services (AWS / Azure / GCP)

AWS → List active services/resources

aws resourcegroupstaggingapi get-resources
aws ec2 describe-instances
aws lambda list-functions

Look for:

Azure

Get-AzResource

Azure Portal → Resource Groups → Filter by owner / tags.

Look for:

GCP

gcloud projects list
gcloud services list --enabled
gcloud compute instances list

Look for:

Operator Note: Services with owner=unknown or missing tags should be treated as suspect.


Step 5: Remove or Disable Unauthorized Services

Local Services

Windows
Stop-Service -Name "ServiceName"
Set-Service -Name "ServiceName" -StartupType Disabled
Linux
sudo systemctl stop servicename
sudo systemctl disable servicename
macOS
sudo launchctl bootout system /Library/LaunchDaemons/com.unauthorized.service.plist

SaaS (Azure AD / Google Workspace)

Azure AD
Remove-AzureADServicePrincipal -ObjectId <AppId>
Google Workspace

Admin Console → Apps → Connected Apps → Remove access


Cloud Resources (AWS, Azure, GCP)

AWS
aws ec2 terminate-instances --instance-ids <instance-id>
aws lambda delete-function --function-name <function-name>
Azure
Remove-AzResource -ResourceId "<resource-id>"
GCP
gcloud compute instances delete <instance-name> --zone=<zone>

Operator Note: Follow change management process when deleting cloud resources → review with owners first.


Step 6: Validate and Document


Dependencies


Other Available Tools

Tool Platform Installation Usage
PowerShell Windows Built-in Local service/application enumeration
systemctl / launchctl Linux/macOS Native Local service management
Cloud CLI Tools (aws, az, gcloud) Cross-platform Package manager Cloud service management
SaaS App Management Consoles Web Native Azure AD / Google Workspace app control

Operator Recommendations and Additional Tools

Operator Checklist

Best Practices


References


Revision History

Date Version Description Author
2025-05-02 1.0 Created from scratch with deep operator-focused guidance across local, cloud, and SaaS platforms Leo