Coder Social home page Coder Social logo

rmideserialize's Issues

comment

https://xz.aliyun.com/t/7930

已知RMI接口的3个攻击方式中:1实际场景比较少,2和3本质上都是Server反序列化Client发过来的数据,非基础类型都是在Unicast#unmarshalValue的readObject中触发。 所以2和3感觉可以归为1类

LookupPayloadInjectingProxyThread 的修改建议

LookupPayloadInjectingProxyThread的handleData中用于捕获替换RMI请求的if判断:
if(dataBytes.length > 7 && dataBytes[0] == (byte)0x50) {
在一些网络环境下会失效,测试发现ecs上跑的时候会出现这个问题。

原因在于tcp的粘包,有时候这个0x50开头的包会和前面发送的那个包含ip地址的rmi包粘在一起,导致该if判断失效,建议改成:

int indexOf = indexOfByteArray(dataBytes, new byte[]{(byte)0x50, (byte)0xac, (byte)0xed});
    if(dataBytes.length > 7 && indexOf != -1) {
    //blockLen和out.write偏移位也需要改一下,加上indexof

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.