A GRC-focused tool that audits user accounts in a database against access control policies. Detects zombie accounts, unauthorized privilege escalation, and stale accounts. Maps findings to MITRE ATT&CK and generates a GRC Executive Summary report.
Runs three automated SQL audit queries against a user account database and produces a structured compliance report:
| Audit | What It Finds | Severity |
|---|---|---|
| Zombie Accounts | Terminated employees with active accounts | CRITICAL |
| Privilege Escalation | Users with admin rights beyond their role level | HIGH |
| Stale Accounts | Active accounts with no login in 90+ days | MEDIUM |
The tool auto-generates a GRC_Executive_Summary.txt report including:
- Finding details with severity ratings (CRITICAL / HIGH / MEDIUM)
- Risk assessment narrative
- Remediation recommendations
- Compliance mapping to ISO 27001, NIST 800-53, and MITRE ATT&CK
The included database contains 6 users with 3 intentional policy violations:
| User | Violation |
|---|---|
| bwilliams | Zombie account — active 90 days after termination |
| atran | Jr. analyst with unauthorized admin rights |
| dchen | No login in 95 days — stale account |
| jsmith, mrodriguez, lkumar | Clean accounts — no violations |
| Finding | Technique |
|---|---|
| Zombie Account | T1078 — Valid Accounts |
| Privilege Escalation | T1078.003 — Valid Accounts: Local Accounts |
| Stale Account | T1078 — Valid Accounts |
- ISO 27001 — A.9.2.1 (User Registration), A.9.2.5 (Access Rights Review)
- NIST 800-53 — AC-2 (Account Management), AC-6 (Least Privilege)
git clone https://github.com/SankethSubhas/sql-user-access-audit
cd sql-user-access-audit
python3 access_audit.pyNo dependencies. Uses Python's built-in sqlite3 module.
access_audit.py # Main audit script
access_review.db # Auto-generated mock database
GRC_Executive_Summary.txt # Auto-generated compliance report
Sanketh Subhas — Cybersecurity Analyst | GRC | SOC
Portfolio: sankethsubhas.pages.dev
GitHub: github.com/SankethSubhas
LinkedIn: linkedin.com/in/sankethsubhas

