安全矩阵

 找回密码
 立即注册
搜索
查看: 728|回复: 0

PySQLTools - Mssql利用工具

[复制链接]

181

主题

182

帖子

721

积分

高级会员

Rank: 4

积分
721
发表于 2022-11-25 08:40:45 | 显示全部楼层 |阅读模式
PySQLTools - Mssql利用工具
Ridter Hack分享吧 2022-11-24 08:30 发表于湖南
转载自:PySQLTools - Mssql利用工具

声明:该公众号分享的安全工具和项目均来源于网络,仅供安全研究与学习之用,如用于其他用途,由使用者承担全部法律及连带责任,与工具作者和本公众号无关。
                        

工具介绍
SharpSQLTools Python版本,支持Windows及密码两种认证方式,方便在没windows机器或代理场景下使用。
编辑

工具使用
Windows认证方式为:
  1. python PySQLTools.py localhost/administrator:'password'@10.211.55.251 -windows-auth -debu
复制代码


账号密码认证方式为:
  1. python PySQLTools.py sa:'password'@10.211.55.251
复制代码


如果碰到以下错误:
  1. [-] [('SSL routines', '', 'unsafe legacy renegotiation disabled')]
复制代码


可添加OPENSSL配置文件来加载,如:
  1. OPENSSL_CONF=openssl.conf python PySQLTools.py sa:'password'@10.211.55.251
复制代码


支持功能如下(直接扣来的没改,可以自己搞一个新的CLR来定制对应功能):
  1. enable_xp_cmdshell         - you know what it means
  2. disable_xp_cmdshell        - you know what it means
  3. xp_cmdshell {cmd}          - executes cmd using xp_cmdshell
  4. sp_oacreate {cmd}          - executes cmd using sp_oacreate
  5. xp_dirtree {path}          - executes xp_dirtree on the path
  6. sp_start_job {cmd}         - executes cmd using the sql server agent (blind)
  7. enable_ole                 - you know what it means
  8. disable_ole                - you know what it means
  9. upload {local} {remote}    - upload a local file to a remote path (OLE required)
  10. download {remote} {local}  - download a remote file to a local path (OLE required)
  11. enable_clr                 - you know what it means
  12. disable_clr                - you know what it means
  13. install_clr                - create assembly and procedure
  14. uninstall_clr              - drop clr
  15. clr_pwd                    - print current directory by clr
  16. clr_ls {directory}         - list files by clr
  17. clr_cd {directory}         - change directory by clr
  18. clr_ps                     - list process by clr
  19. clr_netstat                - netstat by clr
  20. clr_ping {host}            - ping by clr
  21. clr_cat {file}             - view file contents by clr
  22. clr_rm {file}              - delete file by clr
  23. clr_exec {cmd}             - for example: clr_exec whoami;clr_exec -p c:.exe;clr_exec -p c:\cmd.exe -a /c whoami
  24. clr_efspotato {cmd}        - exec by EfsPotato like clr_exec
  25. clr_badpotato {cmd}        - exec by BadPotato like clr_exec
  26. clr_combine {remotefile}   - When the upload module cannot call CMD to perform copy to merge files
  27. clr_dumplsass {path}       - dumplsass by clr
  28. clr_rdp                    - check RDP port and Enable RDP
  29. clr_getav                  - get anti-virus software on this machin by clr
  30. clr_adduser {user} {pass}  - add user by clr
  31. clr_download {url} {path}  - download file from url by clr
  32. clr_scloader {code} {key}  - Encrypt Shellcode by Encrypt.py (only supports x64 shellcode.bin)
  33. clr_scloader1 {file} {key} - Encrypt Shellcode by Encrypt.py and Upload Payload.txt
  34. clr_scloader2 {remotefile} - Upload Payload.bin to target before Shellcode Loader
  35. use_link {link}            - linked server to use (set use_link localhost to go back to local or use_link .. to get back one step)
  36. enum_db                    - enum databases
  37. enum_links                 - enum linked servers
  38. enum_impersonate           - check logins that can be impersonate
  39. enum_logins                - enum login users
  40. enum_users                 - enum current db users
  41. enum_owner                 - enum db owner
  42. exec_as_user {user}        - impersonate with execute as user
  43. exec_as_login {login}      - impersonate with execute as login
  44. ! {cmd}                    - executes a local shell cmd
  45. show_query                 - show query
  46. mask_query                 - mask query
复制代码


下载地址
点击下方名片进入公众号
回复关键字【1124】获取下载链接
Hack分享吧






回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|安全矩阵

GMT+8, 2024-4-19 21:10 , Processed in 0.012306 second(s), 18 queries .

Powered by Discuz! X4.0

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表