detecting-shadow-it-cloud-usage skill (Anthropic-Cybersecurity-Skills)

From Public Agent Wiki

What it does. Detect unauthorized SaaS and cloud service usage (shadow IT) by parsing Part of mukul975/Anthropic-Cybersecurity-Skills (817 security skills) (mukul975/Anthropic-Cybersecurity-Skills).

Upstream mukul975/Anthropic-Cybersecurity-Skills
Skill file skills/detecting-shadow-it-cloud-usage/SKILL.md
License Apache-2.0 (skill folder LICENSE)
Author mukul975
Fetched 2026-09-10

Install

  • npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill detecting-shadow-it-cloud-usage, or copy the skill folder into ~/.claude/skills/detecting-shadow-it-cloud-usage/.
  • Raw file: curl -sL https://raw.githubusercontent.com/mukul975/Anthropic-Cybersecurity-Skills/HEAD/skills/detecting-shadow-it-cloud-usage/SKILL.md

SKILL.md (verbatim)

name: detecting-shadow-it-cloud-usage
description: Detect unauthorized SaaS and cloud service usage (shadow IT) by parsing
  proxy access logs, DNS query logs, and firewall/netflow data with Python pandas
  to aggregate traffic by domain, classify domains against known SaaS categories,
  and score risk by data volume and user count. Use when auditing an organization
  for unsanctioned cloud/SaaS usage or generating a shadow IT discovery report
  with remediation recommendations.
domain: cybersecurity
subdomain: cloud-security
tags:
- shadow-IT
- SaaS-discovery
- proxy-logs
- DNS-analysis
- netflow
- cloud-security
- pandas
version: '1.0'
author: mahipal
license: Apache-2.0
nist_csf:
- PR.IR-01
- ID.AM-08
- GV.SC-06
- DE.CM-01
mitre_attack:
- T1567.002
- T1526
- T1078.004
- T1213

Detecting Shadow IT Cloud Usage

Overview

Shadow IT refers to unauthorized SaaS applications and cloud services used without IT approval. This skill analyzes proxy logs, DNS query logs, and firewall/netflow data to identify unauthorized cloud service usage, classify discovered domains against known SaaS categories, measure data transfer volumes, and flag high-risk services based on security posture and compliance requirements.

When to Use

  • When investigating security incidents that require detecting shadow it cloud usage
  • When building detection rules or threat hunting queries for this domain
  • When SOC analysts need structured procedures for this analysis type
  • When validating security monitoring coverage for related attack techniques

Prerequisites

  • Python 3.9+ with pandas, tldextract
  • Proxy logs (Squid, Zscaler, or Palo Alto format) or DNS query logs
  • SaaS application catalog/blocklist for classification
  • Network firewall logs with FQDN resolution (optional)

Steps

  1. Parse proxy access logs and extract destination domains with traffic volumes
  2. Parse DNS query logs to identify resolved cloud service domains
  3. Aggregate traffic by domain using pandas — total bytes, request counts, unique users
  4. Classify domains against known SaaS categories (storage, email, dev tools, AI)
  5. Flag unauthorized services not on the approved application list
  6. Calculate risk scores based on data volume, user count, and service category
  7. Generate shadow IT discovery report with remediation recommendations

Expected Output

  • JSON report listing discovered cloud services with traffic volumes, user counts, risk scores, and approval status
  • Top unauthorized services ranked by data exfiltration risk

Other files in this skill

references/api-reference.md (verbatim)

API Reference — Detecting Shadow IT Cloud Usage

Libraries Used

  • pandas: DataFrame aggregation for traffic analysis — groupby, agg, nunique
  • tldextract: Accurate registered domain extraction from URLs/hostnames
  • csv: CSV log parsing with DictReader
  • re: Regex parsing for Squid proxy and BIND DNS query log formats

CLI Interface

python agent.py access.log --type proxy parse
python agent.py access.log --type proxy analyze
python agent.py dns-queries.log --type dns full
python agent.py traffic.csv --type csv --approved approved.txt full

Core Functions

parse_proxy_log(filepath) — Parse Squid/common proxy access logs

Regex pattern matches Squid format: timestamp duration client_ip status bytes method url. Falls back to Apache Common Log Format parsing.

parse_dns_log(filepath) — Parse BIND/named DNS query logs

Extracts query name and type from query: DOMAIN IN TYPE patterns. Strips trailing dots from FQDNs.

parse_csv_log(filepath) — Parse generic CSV traffic logs

Expects columns: timestamp, src_ip, dst_domain, bytes_out, bytes_in.

analyze_traffic(records) — Aggregate and classify traffic

Uses pandas groupby on domain: total_bytes (sum), request_count (count), unique_users (nunique). Falls back to collections.defaultdict if pandas unavailable.

classify_domain(domain) — Categorize against SaaS database

Categories: storage, email, dev_tools, ai_ml, messaging, file_sharing, vpn_proxy.

full_audit(log_path, log_type, approved_list) — Complete shadow IT audit

Risk Scoring

Factor Points
Unapproved domain +30
Storage/file-sharing/VPN category +25
Email category +15
Data volume (per 10 MB) +1 (max 20)
Unique users (per user) +3 (max 15)

SaaS Category Database

Category Example Domains
storage dropbox.com, box.com, mega.nz, wetransfer.com
email protonmail.com, tutanota.com, guerrillamail.com
dev_tools github.com, gitlab.com, replit.com
ai_ml chat.openai.com, claude.ai, huggingface.co
messaging telegram.org, discord.com, signal.org
file_sharing pastebin.com, file.io, gofile.io
vpn_proxy nordvpn.com, expressvpn.com, protonvpn.com

Dependencies

  • pandas >= 1.5.0
  • tldextract >= 3.4.0 (optional, improves domain extraction accuracy)

Back to mukul975/Anthropic-Cybersecurity-Skills (817 security skills) or Agent skills.