Giter VIP home page Giter VIP logo

springbootfinder's Introduction

SpringBootFinder


1

burp插件实现被动探测SpringBoot 框架 基于以下两点实现

  • 递归遍历 urlpath 替换成favicon 再次请求,判断响应body是不是绿色叶子图标
  • 如果404 页面有 "Whitelabel Error Page" 也会提示

效果如下图所示 img

缺点就是 同一个host 下如果请求了不同的路径,都报错的话,会重复


原理就是 递归遍历urlpath 分别替换成favicon.ico 进行请求,然后获取响应体body 在求 散列值和shodan和fofa的算法一样

        String OldReq = helpers.bytesToString(baseRequestResponse.getRequest());
        String Rurl = helpers.analyzeRequest(baseRequestResponse).getUrl().getPath();
        String[] strlist = Rurl.split("/");
        if (strlist.length < 1) {
            return null;
        }
        for (int i = strlist.length - 1; i > 0; i--) { // 反转 path 从后
            if (!"".equals(strlist[i])) {
                NewReq = OldReq.replace(strlist[i], "favicon.ico?");
                IHttpRequestResponse checkRequestResponse = callbacks.makeHttpRequest(baseRequestResponse.getHttpService(), helpers.stringToBytes(NewReq));
                //IResponseInfo oresponse可以获取body的getBodyOffset()
                byte[] res = checkRequestResponse.getResponse();
                oresponse = helpers.analyzeResponse(res); //
                //IHttpRequestResponse 返回的byte[] response
                ores = new String(res);
                oResBodyInfo = ores.substring(oresponse.getBodyOffset());
                byte[] destResponse;
                destResponse = Arrays.copyOfRange(res, oresponse.getBodyOffset(), res.length);
                if (destResponse != null) {
                    if (isSpringBoot(destResponse)) {
                        issues.add();                        
                    }
                }
            }

求图标 散列值

  // 判断响应包的图标是不是spring
    public boolean isSpringBoot(byte[] destResponse) {
        String base64Str = Base64.getMimeEncoder().encodeToString(destResponse);
        int favicon = Hashing.murmur3_32().hashString(base64Str.replace("\r", "") + "\n", StandardCharsets.UTF_8).asInt();
        if (116323821 == favicon) {
            return true;
        } else return false;
    }

img


V2 版本去除冗余代码,优化逻辑,提升性能

优化图标重复漏洞问题,但目录报错还是会重复(因为Burpsuite 认为不同目录的相同漏洞,不算重复漏洞)

springbootfinder's People

Contributors

xiaoliangli1128 avatar

Stargazers

 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.