documentation
MBUSTER
MBUSTER API
How to apply

MBUSTER Application Methods

Implementing Libraries for Macro Detection and Blocking

Application of java, js, png, jsp files required for operation on the WAS server.

The file list for MBUSTER integration is as follows:

  • Mbuster.QF.jsp
  • Mbuster.QC.jsp
  • Mbuster_T.jsp
  • MBusterAPI.java
  • captcha.js
  • fingerPrint.js
ExplorerCategoryFile TypeDescription
WAS ServerCalljavaMBusterAPI.java
WAS ServerControljspMbuster_QC.jsp
Mbuster_QF.jsp
Mbuster_T.jsp
WAS ServerControljavascriptmbuster_meta.js
mbuster_api.js
captcha.js
fingerPrint.js
etcetcOther FilesStatic files related to MBUSTER

Integration Method

  • Add MBUSTER integration files to the source code.
  • Call the MBusterAPI.callMBusterApiReject function at the desired integration location.
  • Implement control based on the API communication result (macro detection result).

MBUSTER API Script Insertion and Call Example

  1. Related to MBUSTER
<script type="text/javascript" src="${pageContext.request.contextPath}/mbuster/resource/js/mbuster_meta.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/mbuster/resource/js/mbuster_api.js"></script>
  1. MBUSTER WEB Integration
MBUSTER_API({
    clientIP : ClientIP,
    user_login_id : user_login_id
});

Parameters when calling MBUSTER_API()

RequiredParameterDescription
RequiredclientIpClient IP
user_login_idUser login ID (empty if not available)
⚠️

It is not possible to call the API without passing the required parameters. The client's IP must be passed as an argument.

Modification of mbuster_meta.js file

const service_type = "http";
const macro_domain = "127.0.0.1"; // MBUSTER call domain
const macro_cookie_domain = '127.0.0.1'; // Domain for storing cookies (integration target site)
const macro_port = "8180";
const g_groupName = "www.stclab.com";
 
const mbuster_info_url = {
    T : "./mbuster/Mbuster_T.jsp", // Block
    QC : "./mbuster/Mbuster_QC.jsp", // Captcha
    QF : "./mbuster/Mbuster_QF.jsp" // FingerPrint (Browser Challenge)
};
 
const mbmhIo = true;
ParameterDescriptionExample
requestClient request HttpServerletRequestHttpServerletRequest request
responseClient HttpServerletResponseHttpServerletResponse response
groupNameMBUSTER registered domain group namembuster.io
loginIdUser login ID (client IP if not available)user_id

MBUSTER API Request

@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
    
    HttpSession session = request.getSession();
 
    String groupName = "www.stclab.com";
 
    String userId = (String) session.getAttribute("login_id");
 
    // 1. Call API
    String result = MBusterAPI.callMBusterApiReject(request, response, groupName, userId);
 
    // 2. Control based on API result
    String tmp[] = result.split(":");
 
    if(tmp[0].equals("E")) {
        return true;
    }
 
    else if (tmp[0].equals("F")) {
        return true;
    } else if (tmp[0].equals("T")) {
        RequestDispatcher dispatcher = request.getRequestDispatcher("/mbuster/Mbuster_T.jsp");
        dispatcher.forward(request, response);
        return false;
    } else if (tmp[0].equals("QC")) {
        request.setAttribute("clientIp", tmp[1]);
        request.setAttribute("loginId", tmp[2]);
        request.setAttribute("groupName", tmp[3]);
 
        RequestDispatcher dispatcher = request.getRequestDispatcher("/mbuster/Mbuster_QC.jsp");
        dispatcher.forward(request, response);
        return false;
    } else if (tmp[0].equals("QF")) {
        request.setAttribute("clientIp", tmp[1]);
        request.setAttribute("loginId", tmp[2]);
        request.setAttribute("groupName", tmp[3]);
 
        RequestDispatcher dispatcher = request.getRequestDispatcher("/mbuster/Mbuster_QF.jsp");
        dispatcher.forward(request, response);
        return false;
    }
 
    return true;
}
ParameterDescriptionExample
service_typeAPI service protocol (http / https)http
macro_domainMBUSTER equipment URL (IP or domain)mbuster.co.kr
macro_cookie_domainDomain for storing cookies (integration target site address)www.stclab.com (opens in a new tab)
macro_portMBUSTER API service port (8180 default)8180
g_groupNameMBUSTER registered domain group namewww.stclab.com (opens in a new tab)

MBUSTER API Request Return Results Parameter : result

ItemResult Value
User"0"
Communication Error"E", "F"
Block"T"
CAPTCHA"QC"
Browser Challenge"QF"
In case of communication error or user, call the original page, and control based on the flag in case of a macro.