Don’t Let Your Permissions Be Hijacked!
summary
Shows a practical attack where a database DDL trigger sneaks in during index or stats maintenance and uses EXECUTE AS to make a DB owner escalate into a server principal, letting an attacker become sysadmin during a nightly job. Demonstrates fixes: run maintenance as EXECUTE AS USER = dbo or sandbox users/logins (user without login), deny ALTER ANY DATABASE DDL TRIGGER to dev roles, use job proxies, and package elevated actions in certificate-signed procedures grant granular server perms so deployments can be audited and cannot hijack permissions.
AI-written summary · about
chapters (13)
- 0:00Start
- 12:29THE EVIL DDL TRIGGER
- 13:46THE EXECUTE AS COMMANDS
- 18:42RUNNING DATABASE MAINTENANCE
- 19:51DDL IN GENERAL
- 26:25ACCESS OUTSIDE THE DATABASE
- 27:26APPLICATION USERS
- 32:54CERTIFICATE SIGNING AND PERMISSION HIJACKING
- 34:14AGENT JOBS
- 35:01SOME AGENT PRINCIPLES
- 41:21ATTACKS THROUGH DEPLOYMENT
- 42:27DEFENCE AGAINST DEPLOYMENT ATTACKS
- 45:29SUMMARY
related talks
54m10 Deadly Sins of SQL Server Configuration
53mSurprising ways to escalate privileges in Entra ID
51mHacker’s Perspective on Your Infrastructure: Lessons from the Field
44mwhoami priv - show me your privileges and I will lead you to SYSTEM
21mSQL Horror Stories
58mPrivilege Escalation in Microsoft Azure
01h 01mKeep your nose out of it. Denying yourself access to production
21mSQL Horror Stories
