Skip to content

maxwellokumu/okaudit-claude-skills / identity-access/privileged-account-monitor

privileged-account-monitor

Verified

Review privileged account activity logs for baseline exceedances, off-hours access, sensitive actions, and new unknown users. Use this skill for admin activity review and privileged access monitoring.

FileKindSize
README.mdmarkdown1.7 KB
SKILL.mdskill md1.8 KB
main.pyscript17.9 KB
sample_input/privileged_logs.csvother3.3 KB
skill.yamlconfig1.2 KB
# privileged-account-monitor

Review privileged account activity logs for anomalies including baseline exceedances,
off-hours access, sensitive actions, and new unknown users. Supports local CSV/JSON
logs and live AWS CloudTrail.

---

## Requirements

```bash
pip install python-dotenv boto3
```

---

## Usage

```bash
# Local mode — CSV logs
python main.py --logs sample_input/privileged_logs.csv

# Local mode — custom baseline and hours
python main.py \
  --logs sample_input/privileged_logs.csv \
  --baseline 50 \
  --hours "08:00-18:00"

# AWS mode — live CloudTrail (past 7 days)
python main.py --mode aws

# AWS mode — dry run
python main.py --mode aws --dry-run
```

---

## Log Format (CSV)

```csv
timestamp,user,action,source_ip,resource
2025-07-01T08:15:00,alice,ListBuckets,10.0.0.1,s3
2025-07-01T02:30:00,svc-deploy,TerminateInstances,10.0.0.50,ec2
```

---

## Sensitive Actions Flagged

`DeleteBucket`, `PutBucketPolicy`, `DeleteTrail`, `StopLogging`, `CreateUser`,
`DeleteUser`, `AttachUserPolicy`, `PutUserPolicy`, `CreateAccessKey`,
`DeleteAccessKey`, `UpdateLoginProfile`, `TerminateInstances`, `DeleteVpc`,
`PassRole`, `ConsoleLoginFailure`, and more.

---

## Sample Output (truncated)

```markdown
# Privileged Account Monitor Report

**Baseline Threshold:** 100 actions/day
**Business Hours:** 07:00-19:00
**Total Events Analysed:** 21

## User Activity Summary

| User | Total Actions | Days Active | Max/Day | Off-Hours | Sensitive | Flags |
|------|--------------|-------------|---------|-----------|-----------|-------|
| `svc-deploy` | 4 | 2 | 2 | 3 | 3 | 🌙 Off-Hours 🔴 Sensitive |
| `root` | 5 | 1 | 5 | 0 | 2 | 🔴 Sensitive 🆕 New User |
```
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 323kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 323kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 323kUpdated Claude CodeCodexVerifiedInstall