>  기사  >  운영 및 유지보수  >  SQLMapAPI와 결합된 Burpsuit로 생성된 일괄 주입 플러그인은 무엇입니까?

SQLMapAPI와 결합된 Burpsuit로 생성된 일괄 주입 플러그인은 무엇입니까?

WBOY
WBOY앞으로
2023-05-12 19:19:041260검색

1.1 변경 사항:

필터 설정 추가

표시 결과 최적화

실행 프롬프트 정보 추가

도메인 이름 정규 일치 추가

전체 플러그인은 작업 패널, sqlmapapi 매개변수 구성의 세 가지 패널로 나뉩니다. 패널, 필터 조건 패널.

Task Panel

SQLMapAPI와 결합된 Burpsuit로 생성된 일괄 주입 플러그인은 무엇입니까?

Server: SQLmapapi 서비스의 IP 및 포트

THREAD: 동시에 감지된 작업 수

Domain: 감지할 도메인 이름, 정기적인 일치 지원

CLEAN: 작업 캐시 목록 지우기

TEST: SQLmapapi 연결 성공 여부 테스트

START: 감지 켜기

왼쪽 하단은 작업 목록 및 작업 상태, 왼쪽 하단 버튼은 정보 프롬프트 영역, 하단은 요청입니다. 세부 정보 및 스캔 결과.

sqlmapapi 매개변수 구성 패널

SQLMapAPI와 결합된 Burpsuit로 생성된 일괄 주입 플러그인은 무엇입니까?

여기의 설정은 sqlmap의 매개변수 설정을 참조합니다.

Tamper: 목록은 sqlmap에 포함된 탬퍼입니다. 사용자 정의 탬퍼는 입력 상자에 "," 쉼표로 구분하여 입력할 수 있습니다.

LogFile: 스캔 로그 파일을 설정합니다. 이 파일의 저장 경로는 sqlmapapi 서버의 경로입니다.

필터 조건 패널

SQLMapAPI와 결합된 Burpsuit로 생성된 일괄 주입 플러그인은 무엇입니까?

ExcludeSuffix: 지정된 접미사가 있는 일부 요청을 제외하고 일치를 위해 정규식을 사용하는 데 사용됩니다. 예: 그림, CSS, JS 등

IngoreCase: ExcludeSuffix의 대소문자 구분 여부를 제한합니다. 기본값은 구분하지 않습니다.

IngoreParams: 요청 중복을 감지할 때 무시해야 하는 매개변수(예: 요청의 임의 숫자 timeStamp 등)는 "," 쉼표로 구분됩니다.

ExcludeParams: 요청을 필터링할 때 이 매개변수가 존재하는 경우 해당 요청은 테스트 목록에 추가되지 않습니다(예: 확인 코드 checkCode 등).

위 내용은 이 기간 동안 실제 사용 중에 일부 수정된 내용입니다. 향후 여러분의 제안을 바탕으로 플러그인이 더욱 최적화될 예정입니다.

다음은 프로그램의 일부 코드 및 구현 아이디어입니다.

청취 섹션 구현 코드 요청

public void processHttpMessage(int toolFlag, boolean messageIsRequest, IHttpRequestResponse messageInfo) {
        boolean addFlag = false;// 是否添加到扫描列表
        // 判断是否为request请求、开关是否打开
        if (messageIsRequest && sqlmapApiPanel.isStart()) {
            String host = helpers.analyzeRequest(messageInfo).getUrl().getHost();
            if (host.matches(targetDomian)) {
                IRequestInfo iRequestInfo = helpers.analyzeRequest(messageInfo);
                // 从?号处截断URL 可区分http 和 https
                String url = String.valueOf(iRequestInfo.getUrl());
                url = url.indexOf("?") > 0 ? url.substring(0, url.indexOf("?")) : url;
                // 排除指定后缀URL(eg : .jpg|.png|.ico)
                if (!excludeSuffix.matcher(url).matches()) {
                    // 构造任务实体
                    TaskEntity entity = new TaskEntity(iRequestInfo.getUrl(), //
                            iRequestInfo.getMethod(), //
                            callbacks.saveBuffersToTempFiles(messageInfo), //
                            iRequestInfo);
                    // 进行数据去重检测
                    String hash = bCrypt.hashpw(entity.getSignString(-1, ingoreParams), SALT);
                    Integer repeatCheckValue = 1;
                    if (String.valueOf(iRequestInfo.getHeaders()).indexOf("Chris-To-Sqlmap") != -1) {
                        if (repeatCheck.containsKey(hash)) {
                            repeatCheckValue = repeatCheck.get(hash) + 1;
                            hash = hash + repeatCheckValue;
                        }
                        addFlag = true;
                    }
                    // 检测当前数据包是否重复,检测当前数据包是否要根据参数可选过滤
                    else if (!repeatCheck.containsKey(hash) && !entity.hasParams(excludeParams)) {
                        // repeatCheck
                        if (!entity.getParamBody().isEmpty()) {// 检测post参数是否为空
                            addFlag = true;
                        } else if (!entity.getParamUrl().isEmpty()) {// 检测get参数是否为空
                            addFlag = true;
                        } else if (sqlmapApiOption.getLevel() >= 3 && !entity.getParamCookie().isEmpty()) {// level参数大于3是应检测cookie注入
                            addFlag = true;
                        }
                    }
                    if (addFlag) {
                        int row = listTasks.size();
                        repeatCheck.put(hash, repeatCheckValue);
                        listTasks.add(entity);
                        fireTableRowsInserted(row, listTasks.size());
                    }
                }
            }
        }
    }

작업 실행 섹션 구현 코드:

public void run() {
                while (true) {
                    if (!threadFlag) {
                        try {
                            sqlmapApiPanel.setMessage("Waiting.");
                            sleep(3 * 1000);
                        } catch (InterruptedException e) {
                            stderr.print(e.getMessage());
                        }
                        continue;
                    }
                    // 增加任务
                    if (runingTasks.size()  removeList = new ArrayList();
                        for (String key : runingTasks.keySet()) {
                            TaskEntity entityRuning = runingTasks.get(key);
                            String status = sqlmapapi.flushStatus(sqlmapapiServer, entityRuning);
                            sqlmapApiPanel.setMessage("Flash task [" + key + "] " + status + " .");
                            if ("terminated".equals(status)) {
                                entityRuning.setTaskStatus(status);
                                entityRuning.setTaskScanData(sqlmapapi.flushScanData(sqlmapapiServer, entityRuning));
                                sqlmapApiPanel.setMessage("Task [" + key + "] finished .");
                                removeList.add(key);
                            } else if ("not running".equals(status)) {
                                stderr.println(entityRuning.getTaskid() + " not running");
                                // entityRuning.setTaskEngineid(taskStart(entityRuning));
                            } else {
                                entityRuning.setTaskStatus(status);
                            }
                            try {
                                sleep(3 * 1000);
                            } catch (InterruptedException e) {
                                stderr.print(e.getMessage());
                            }
                        }
                        if (!removeList.isEmpty()) {
                            for (String key : removeList) {
                                runingTasks.remove(key);
                            }
                        }
                        fireTableRowsInserted(0, listTasks.size());
                    } else {
                        try {
                            sleep(3 * 1000);
                        } catch (InterruptedException e) {
                            stderr.print(e.getMessage());
                        }
                    }
                }
            }

위 내용은 SQLMapAPI와 결합된 Burpsuit로 생성된 일괄 주입 플러그인은 무엇입니까?의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!

성명:
이 기사는 yisu.com에서 복제됩니다. 침해가 있는 경우 admin@php.cn으로 문의하시기 바랍니다. 삭제