All Projects → blackarrowsec → Mssqlproxy

blackarrowsec / Mssqlproxy

Licence: other
mssqlproxy is a toolkit aimed to perform lateral movement in restricted environments through a compromised Microsoft SQL Server via socket reuse

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Mssqlproxy

Enumdb
Relational database brute force and post exploitation tool for MySQL and MSSQL
Stars: ✭ 167 (-61.43%)
Mutual labels:  mssql, post-exploitation
Awesome Web Scraping
List of libraries, tools and APIs for web scraping and data processing.
Stars: ✭ 4,510 (+941.57%)
Mutual labels:  proxy
Sqlboiler
Generate a Go ORM tailored to your database schema.
Stars: ✭ 4,497 (+938.57%)
Mutual labels:  mssql
Torat
ToRat is a Remote Administation tool written in Go using Tor as a transport mechanism and RPC for communication
Stars: ✭ 415 (-4.16%)
Mutual labels:  post-exploitation
Grpc Websocket Proxy
A proxy to transparently upgrade grpc-gateway streaming endpoints to use websockets
Stars: ✭ 395 (-8.78%)
Mutual labels:  proxy
Httpteleport
Transfer 10Gbps http traffic over 1Gbps networks :)
Stars: ✭ 422 (-2.54%)
Mutual labels:  proxy
Proxy Www
学会 Proxy 就可以为所欲为吗?对,学会 Proxy 就可以为所欲为!
Stars: ✭ 385 (-11.09%)
Mutual labels:  proxy
Powerhub
A post exploitation tool based on a web application, focusing on bypassing endpoint protection and application whitelisting
Stars: ✭ 431 (-0.46%)
Mutual labels:  post-exploitation
Chromium
Chromium browser with SSL VPN. Use this browser to unblock websites.
Stars: ✭ 4,041 (+833.26%)
Mutual labels:  proxy
Iox
Tool for port forwarding & intranet proxy
Stars: ✭ 411 (-5.08%)
Mutual labels:  proxy
Sifter
Sifter aims to be a fully loaded Op Centre for Pentesters
Stars: ✭ 403 (-6.93%)
Mutual labels:  post-exploitation
Encrypted Dns Server
An easy to install, high-performance, zero maintenance proxy to run an encrypted DNS server.
Stars: ✭ 398 (-8.08%)
Mutual labels:  proxy
Rawgithack
Serves files from github, bitbucket and gitlab, but with the correct content types
Stars: ✭ 422 (-2.54%)
Mutual labels:  proxy
Shadowsocksx Ng R
ShadowsocksX-NG-R: Shadowsocks(R) Client for MacOS
Stars: ✭ 393 (-9.24%)
Mutual labels:  proxy
Ssl Proxy
🔒 Simple zero-config SSL reverse proxy with real autogenerated certificates (LetsEncrypt, self-signed, provided)
Stars: ✭ 427 (-1.39%)
Mutual labels:  proxy
Cerberus
一款功能强大的漏洞扫描器,子域名爆破使用aioDNS,asyncio异步快速扫描,覆盖目标全方位资产进行批量漏洞扫描,中间件信息收集,自动收集ip代理,探测Waf信息时自动使用来保护本机真实Ip,在本机Ip被Waf杀死后,自动切换代理Ip进行扫描,Waf信息收集(国内外100+款waf信息)包括安全狗,云锁,阿里云,云盾,腾讯云等,提供部分已知waf bypass 方案,中间件漏洞检测(Thinkphp,weblogic等 CVE-2018-5955,CVE-2018-12613,CVE-2018-11759等),支持SQL注入, XSS, 命令执行,文件包含, ssrf 漏洞扫描, 支持自定义漏洞邮箱推送功能
Stars: ✭ 389 (-10.16%)
Mutual labels:  proxy
Proxy Web
proxy-web是用go语言写的,基于snail007/goproxy完成的可视化网页应用
Stars: ✭ 402 (-7.16%)
Mutual labels:  proxy
Emp3r0r
linux post-exploitation framework made by linux user
Stars: ✭ 419 (-3.23%)
Mutual labels:  post-exploitation
Exodus
network proxy and tunnel (VPN)
Stars: ✭ 432 (-0.23%)
Mutual labels:  proxy
Shadowsocks Deepin
😎 a powful shadowsocks client for deepin
Stars: ✭ 429 (-0.92%)
Mutual labels:  proxy

mssqlproxy

mssqlproxy is a toolkit aimed to perform lateral movement in restricted environments through a compromised Microsoft SQL Server via socket reuse. The client requires impacket and sysadmin privileges on the SQL server.

Please read this article carefully before continuing.

It consists of three parts:

  • CLR assembly: Compile assembly.cs
  • Core DLL: Compile reciclador.sln
  • Client: mssqlclient.py (based on Impacket's example)

You can compile the libraries or download them from releases (x64).

Compilation

To generate the core DLL, just import the project to Visual Studio (reciclador.sln) and compile it.

To generate the CLR assembly, first you need to find the C# compiler:

Get-ChildItem -Recurse "C:\Windows\Microsoft.NET\" -Filter "csc.exe" | Sort-Object fullname -Descending | Select-Object fullname -First 1 -ExpandProperty fullname

Then,

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe /target:library .\assembly.cs

Usage

Once the two libraries are compiled, upload the core DLL (reciclador) to the target server.

Authentication options are the same as the ones in the original mssqlclient. mssqlproxy options:

proxy mode:
  -reciclador path      Remote path where DLL is stored in server
  -install              Installs CLR assembly
  -uninstall            Uninstalls CLR assembly
  -check                Checks if CLR is ready
  -start                Starts proxy
  -local-port port      Local port to listen on
  -clr local_path       Local CLR path
  -no-check-src-port    Use this option when connection is not direct (e.g. proxy)

We have also implemented two commands (within the SQL shell) for downloading and uploading files. Relating to the proxy stuff, we have four commands:

  • install: Creates the CLR assembly and links it to a stored procedure. You need to provide the -clr param to read the generated CLR from a local DLL file.
  • uninstall: Removes what install created.
  • check: Checks if everything is ready to start the proxy. Requires to provide the server DLL location (-reciclador), which can be uploaded using the upload command.
  • start: Starts the proxy. If -local-port is not specified, it will listen on port 1337/tcp.

Once the proxy is started, you can plug in your proxychains ;)

asciicast

Note #1: if using a non-direct connection (e.g. proxies in between), the -no-check-src-port flag is needed, so the server only checks the source address.

Note #2: at the moment, only IPv4 targets are supported (nor DNS neither IPv6 addresses).

Note #3: use carefully! by now the MSSQL service will crash if you try to establish multiple concurrent connections

Important: It's important to stop the mssqlproxy by pressing Ctrl+C on the client. If not, the server may crash and you will have to restart the MSSQL service manually.

Authors

Pablo Martinez (@xassiz), Juan Manuel Fernandez (@TheXC3LL) [ www.blackarrow.net - www.tarlogic.com ]

References

License

All the code included in this project is licensed under the terms of the MIT license. The mssqlclient.py is based on Impacket.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].