Persisting Through Existing Services
Last updated
Was this helpful?
Last updated
Was this helpful?
The usual way of achieving persistence in a web server is by uploading a web shell to the web directory.
Upload the shell into web directory C:\inetpub\wwwroot
We can then run commands from the web server :
triggers
in MSSQL allow you to bind actions to be performed when specific events occur in the database. Before creating the trigger, we must first reconfigure a few things on the database. First, we need to enable the xp_cmdshell stored procedure.
Enabling xp_cmdshell;
By default, only database users with sysadmin role can run xp_cmdshell, lets change this permission such that any website accessing the database can run xp_cmdshell.
Finally, create trigger as;
content of evilscript.ps1