Giter Site home page Giter Site logo

mysql-jdbc-tricks's Introduction

mysql-jdbc-tricks

这里是很多MySQL JDBC Attack的小技巧,我仅在MySQLJDBC驱动中测试,这里的技巧可能在其他类型的数据库驱动中也存在

文章:https://mp.weixin.qq.com/s/lmoWKK41ZQzZOh-P26VUng

推荐搭建:推荐配合 https://github.com/4ra1n/mysql-fake-server 使用

基本示例

参考Application1Example1代码

这是一个不存在任何过滤的情况,直接执行即可RCE

大小写绕过

参考Application1Example1代码

这里展示了一种简单的防护和绕过,MySQL驱动对于连接参数的大小不做限制,如果开发者不做大小写限制,将会被轻易饶过

YES绕过

参考Application3Example3代码

这里展示了一种简单的防护和绕过,MySQL驱动允许的Bool值是包含true/yes两种的,因此存在一种绕过

编码绕过

参考Application4Example4代码

这里展示了某些情况下的绕过,MySQL驱动允许URL编码,因此如果开发者没有按照标准URL解析和过滤,将会存在绕过

暂时的安全

参考Application5Example5代码

对于这种情况,似乎是安全了,或许有其他的绕过?

另一种形式的传参

参考Application6Example6代码

这也是JDBC攻击很常见的一种情况

额外参数检查绕过

参考Application7Example7Bypass代码

限制额外连接参数情况下如何绕过

特殊情况下的#号绕过

参考Application8Example8Bypass代码

一种特殊情况的绕过,属于一种逻辑漏洞

另一种特殊场景的绕过

参考Application9Example9Bypass代码

另一种特殊情况的绕过,开发者忽略某些参数过滤导致的绕过

可能安全

参考Application10Example10代码

对于这种情况,似乎是安全了,或许有其他的绕过?

mysql-jdbc-tricks's People

Contributors

4ra1n avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.